From 3a28b85f0ae792d8a93b08e972ed172b0d3cabac Mon Sep 17 00:00:00 2001 From: Marcel <65048232+dromzeh@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:05:00 +0100 Subject: [PATCH 1/6] feat: initial ts config files --- .eslintrc.cjs | 1 + package.json | 5 +- pnpm-lock.yaml | 292 ++++++++++++++++++++------ src/routes/{+layout.js => +layout.ts} | 0 tailwind.config.cjs | 1 + tsconfig.json | 13 ++ 6 files changed, 245 insertions(+), 67 deletions(-) rename src/routes/{+layout.js => +layout.ts} (100%) create mode 100644 tsconfig.json diff --git a/.eslintrc.cjs b/.eslintrc.cjs index c693dc99..2480f924 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -3,6 +3,7 @@ module.exports = { extends: [ "plugin:svelte/recommended", ], + ignorePatterns: ['*.cjs'], rules: { 'svelte/no-trailing-spaces': 'error' }, diff --git a/package.json b/package.json index 56e34384..1335b94d 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,8 @@ "@svackages/sveltekit-hook-redirect": "^0.0.1", "@sveltejs/adapter-cloudflare": "^2.3.0", "@sveltejs/kit": "1.20.4", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", "axios": "^1.4.0", "file-saver": "^2.0.5", "glob": "^10.2.7", @@ -55,6 +57,7 @@ "nprogress": "^0.2.0", "svelte-lazy": "^1.2.1", "svelte-loading-spinners": "^0.3.4", - "tiny-glob": "^0.2.9" + "tiny-glob": "^0.2.9", + "typescript": "^5.1.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f83a4389..480b7b6d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,12 @@ dependencies: '@sveltejs/kit': specifier: 1.20.4 version: 1.20.4(svelte@3.59.1)(vite@4.3.9) + '@typescript-eslint/eslint-plugin': + specifier: ^5.60.0 + version: 5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.43.0)(typescript@5.1.3) + '@typescript-eslint/parser': + specifier: ^5.60.0 + version: 5.60.0(eslint@8.43.0)(typescript@5.1.3) axios: specifier: ^1.4.0 version: 1.4.0 @@ -59,6 +65,9 @@ dependencies: tiny-glob: specifier: ^0.2.9 version: 0.2.9 + typescript: + specifier: ^5.1.3 + version: 5.1.3 devDependencies: '@babel/eslint-parser': @@ -126,7 +135,7 @@ devDependencies: version: 1.3.2(@popperjs/core@2.11.8)(svelte@3.59.1) svelte-preprocess: specifier: ^5.0.4 - version: 5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(svelte@3.59.1) + version: 5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(svelte@3.59.1)(typescript@5.1.3) svelte-simple-modal: specifier: ^1.5.2 version: 1.5.2(svelte@3.59.1) @@ -552,12 +561,10 @@ packages: dependencies: eslint: 8.43.0 eslint-visitor-keys: 3.4.1 - dev: true /@eslint-community/regexpp@4.5.1: resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true /@eslint/eslintrc@2.0.3: resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} @@ -574,12 +581,10 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - dev: true /@eslint/js@8.43.0: resolution: {integrity: sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true /@fast-csv/format@4.3.5: resolution: {integrity: sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==} @@ -647,16 +652,13 @@ packages: minimatch: 3.1.2 transitivePeerDependencies: - supports-color - dev: true /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - dev: true /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true /@iconify/svelte@3.1.4(svelte@3.59.1): resolution: {integrity: sha512-YDwQlN46ka8KPRayDb7TivmkAPizfTXi6BSRNqa1IV0+byA907n8JcgQafA7FD//pW5XCuuAhVx6uRbKTo+CfA==} @@ -925,6 +927,10 @@ packages: /@types/cookie@0.5.1: resolution: {integrity: sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==} + /@types/json-schema@7.0.12: + resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} + dev: false + /@types/node@14.18.51: resolution: {integrity: sha512-P9bsdGFPpVtofEKlhWMVS2qqx1A/rt9QBfihWlklfHHpUpjtYse5AzFz6j4DWrARLYh6gRnw9+5+DJcrq3KvBA==} dev: true @@ -933,19 +939,151 @@ packages: resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} dev: true + /@types/semver@7.5.0: + resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + dev: false + + /@typescript-eslint/eslint-plugin@5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.43.0)(typescript@5.1.3): + resolution: {integrity: sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.5.1 + '@typescript-eslint/parser': 5.60.0(eslint@8.43.0)(typescript@5.1.3) + '@typescript-eslint/scope-manager': 5.60.0 + '@typescript-eslint/type-utils': 5.60.0(eslint@8.43.0)(typescript@5.1.3) + '@typescript-eslint/utils': 5.60.0(eslint@8.43.0)(typescript@5.1.3) + debug: 4.3.4 + eslint: 8.43.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.4 + natural-compare-lite: 1.4.0 + semver: 7.5.2 + tsutils: 3.21.0(typescript@5.1.3) + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/parser@5.60.0(eslint@8.43.0)(typescript@5.1.3): + resolution: {integrity: sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.60.0 + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.3) + debug: 4.3.4 + eslint: 8.43.0 + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/scope-manager@5.60.0: + resolution: {integrity: sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/visitor-keys': 5.60.0 + dev: false + + /@typescript-eslint/type-utils@5.60.0(eslint@8.43.0)(typescript@5.1.3): + resolution: {integrity: sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.3) + '@typescript-eslint/utils': 5.60.0(eslint@8.43.0)(typescript@5.1.3) + debug: 4.3.4 + eslint: 8.43.0 + tsutils: 3.21.0(typescript@5.1.3) + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/types@5.60.0: + resolution: {integrity: sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: false + + /@typescript-eslint/typescript-estree@5.60.0(typescript@5.1.3): + resolution: {integrity: sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/visitor-keys': 5.60.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.2 + tsutils: 3.21.0(typescript@5.1.3) + typescript: 5.1.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/utils@5.60.0(eslint@8.43.0)(typescript@5.1.3): + resolution: {integrity: sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.43.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 5.60.0 + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.3) + eslint: 8.43.0 + eslint-scope: 5.1.1 + semver: 7.5.2 + transitivePeerDependencies: + - supports-color + - typescript + dev: false + + /@typescript-eslint/visitor-keys@5.60.0: + resolution: {integrity: sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.60.0 + eslint-visitor-keys: 3.4.1 + dev: false + /acorn-jsx@5.3.2(acorn@8.9.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.9.0 - dev: true /acorn@8.9.0: resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} engines: {node: '>=0.4.0'} hasBin: true - dev: true /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} @@ -963,7 +1101,6 @@ packages: fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 - dev: true /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} @@ -1036,7 +1173,11 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: false /async@3.2.4: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} @@ -1165,7 +1306,6 @@ packages: /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - dev: true /camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} @@ -1196,7 +1336,6 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - dev: true /chart.js@4.3.0: resolution: {integrity: sha512-ynG0E79xGfMaV2xAHdbhwiPLczxnNNnasrmPEXriXsPJGjmhOBYzFVEsB65w2qMDz+CaBJJuJD0inE/ab/h36g==} @@ -1340,7 +1479,6 @@ packages: /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} @@ -1362,6 +1500,13 @@ packages: /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: false + /dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} @@ -1370,7 +1515,6 @@ packages: engines: {node: '>=6.0.0'} dependencies: esutils: 2.0.3 - dev: true /dotenv@16.3.1: resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} @@ -1485,7 +1629,6 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: true /eslint-plugin-svelte@2.30.0(eslint@8.43.0)(svelte@3.59.1): resolution: {integrity: sha512-2/qj0BJsfM0U2j4EjGb7iC/0nbUvXx1Gn78CdtyuXpi/rSomLPCPwnsZsloXMzlt6Xwe8LBlpRvZObSKEHLP5A==} @@ -1519,7 +1662,6 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - dev: true /eslint-scope@7.2.0: resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} @@ -1527,7 +1669,6 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - dev: true /eslint-visitor-keys@2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} @@ -1537,7 +1678,6 @@ packages: /eslint-visitor-keys@3.4.1: resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true /eslint@8.43.0: resolution: {integrity: sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==} @@ -1585,7 +1725,6 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color - dev: true /esm-env@1.0.0: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} @@ -1597,31 +1736,26 @@ packages: acorn: 8.9.0 acorn-jsx: 5.3.2(acorn@8.9.0) eslint-visitor-keys: 3.4.1 - dev: true /esquery@1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 - dev: true /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 - dev: true /estraverse@4.3.0: resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} engines: {node: '>=4.0'} - dev: true /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} - dev: true /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} @@ -1630,7 +1764,6 @@ packages: /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - dev: true /event-emitter@0.3.5: resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} @@ -1670,7 +1803,6 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true /fast-glob@3.2.12: resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} @@ -1684,11 +1816,9 @@ packages: /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - dev: true /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} @@ -1700,7 +1830,6 @@ packages: engines: {node: ^10.12.0 || >=12.0.0} dependencies: flat-cache: 3.0.4 - dev: true /file-saver@2.0.5: resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==} @@ -1718,7 +1847,6 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - dev: true /flat-cache@3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} @@ -1726,11 +1854,9 @@ packages: dependencies: flatted: 3.2.7 rimraf: 3.0.2 - dev: true /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - dev: true /follow-redirects@1.15.2: resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} @@ -1839,11 +1965,22 @@ packages: engines: {node: '>=8'} dependencies: type-fest: 0.20.2 - dev: true /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.12 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 3.0.0 + dev: false + /globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -1851,9 +1988,12 @@ packages: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true + /grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: false + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - dev: true /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} @@ -1863,7 +2003,6 @@ packages: /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - dev: true /has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} @@ -1888,7 +2027,6 @@ packages: /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} - dev: true /immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -1899,12 +2037,10 @@ packages: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - dev: true /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - dev: true /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} @@ -1957,7 +2093,6 @@ packages: /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - dev: true /is-promise@2.2.2: resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} @@ -1991,7 +2126,6 @@ packages: hasBin: true dependencies: argparse: 2.0.1 - dev: true /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} @@ -2001,11 +2135,9 @@ packages: /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} @@ -2050,7 +2182,6 @@ packages: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true /lie@3.1.1: resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} @@ -2085,7 +2216,6 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 - dev: true /lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -2137,7 +2267,6 @@ packages: /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true /lodash.union@4.6.0: resolution: {integrity: sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==} @@ -2157,6 +2286,13 @@ packages: yallist: 3.1.1 dev: true + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: false + /lru-cache@9.1.2: resolution: {integrity: sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==} engines: {node: 14 || >=16.14} @@ -2289,9 +2425,12 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: false + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true /next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} @@ -2337,21 +2476,18 @@ packages: prelude-ls: 1.2.1 type-check: 0.4.0 word-wrap: 1.2.3 - dev: true /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 - dev: true /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 - dev: true /pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -2361,12 +2497,10 @@ packages: engines: {node: '>=6'} dependencies: callsites: 3.1.0 - dev: true /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -2387,6 +2521,11 @@ packages: minipass: 6.0.2 dev: false + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: false + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -2494,7 +2633,6 @@ packages: /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - dev: true /prettier-plugin-svelte@2.10.1(prettier@2.8.8)(svelte@3.59.1): resolution: {integrity: sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==} @@ -2578,7 +2716,6 @@ packages: /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} - dev: true /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -2628,7 +2765,6 @@ packages: /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - dev: true /resolve@1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} @@ -2654,7 +2790,6 @@ packages: hasBin: true dependencies: glob: 7.1.6 - dev: true /rollup@3.25.1: resolution: {integrity: sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==} @@ -2702,6 +2837,14 @@ packages: hasBin: true dev: true + /semver@7.5.2: + resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: false + /set-cookie-parser@2.6.0: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} @@ -2731,6 +2874,11 @@ packages: mrmime: 1.0.1 totalist: 3.0.1 + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: false + /sorcery@0.11.0: resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} hasBin: true @@ -2801,7 +2949,6 @@ packages: /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - dev: true /sucrase@3.32.0: resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} @@ -2828,7 +2975,6 @@ packages: engines: {node: '>=8'} dependencies: has-flag: 4.0.0 - dev: true /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -2895,7 +3041,7 @@ packages: svelte: 3.59.1 dev: true - /svelte-preprocess@5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(svelte@3.59.1): + /svelte-preprocess@5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(svelte@3.59.1)(typescript@5.1.3): resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==} engines: {node: '>= 14.10.0'} requiresBuild: true @@ -2941,6 +3087,7 @@ packages: sorcery: 0.11.0 strip-indent: 3.0.0 svelte: 3.59.1 + typescript: 5.1.3 dev: true /svelte-simple-modal@1.5.2(svelte@3.59.1): @@ -2999,7 +3146,6 @@ packages: /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true /thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} @@ -3062,17 +3208,25 @@ packages: resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} dev: true + /tsutils@3.21.0(typescript@5.1.3): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 5.1.3 + dev: false + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 - dev: true /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} - dev: true /type@1.2.0: resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==} @@ -3082,6 +3236,11 @@ packages: resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} dev: true + /typescript@5.1.3: + resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} + engines: {node: '>=14.17'} + hasBin: true + /undici@5.22.1: resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} engines: {node: '>=14.0'} @@ -3118,7 +3277,6 @@ packages: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.0 - dev: true /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -3179,7 +3337,6 @@ packages: /word-wrap@1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} - dev: true /worktop@0.8.0-next.15: resolution: {integrity: sha512-0ycNO52P6nVwsjr1y20zuf0nqJatAb8L7MODBfQIxbxndHV5O4s50oZZMHWhJG1RLpHwbK0Epq8aaQK4E2GlgQ==} @@ -3218,6 +3375,10 @@ packages: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: false + /yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} @@ -3230,7 +3391,6 @@ packages: /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - dev: true /zip-stream@4.1.0: resolution: {integrity: sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==} diff --git a/src/routes/+layout.js b/src/routes/+layout.ts similarity index 100% rename from src/routes/+layout.js rename to src/routes/+layout.ts diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 0f4fe841..40feaa34 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,3 +1,4 @@ +// @ts-nocheck /** @type {import('tailwindcss').Config} */ const plugin = require('tailwindcss/plugin') diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..cb286cec --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true + } +} From cde6db18ed45f84fd3156afe97e6760241572f58 Mon Sep 17 00:00:00 2001 From: Marcel <65048232+dromzeh@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:37:11 +0100 Subject: [PATCH 2/6] feat: start rewriting `/lib/` --- .eslintrc.cjs | 39 ++++++++++---- ...{bytesToFileSize.js => bytesToFileSize.ts} | 2 +- ...ageResolution.js => getImageResolution.ts} | 2 +- .../casing/{fixCasing.js => fixCasing.ts} | 2 +- .../{isoFormat.js => isoFormat.ts} | 10 ++-- src/lib/utils/{discord.js => discord.ts} | 0 .../{downloadFiles.js => downloadFiles.ts} | 0 src/lib/utils/filterSearch.js | 38 -------------- src/lib/utils/filterSearch.ts | 51 +++++++++++++++++++ src/lib/utils/{github.js => github.ts} | 24 +++++---- src/lib/utils/{i18n.js => i18n.ts} | 0 src/lib/utils/{keybinds.js => keybinds.ts} | 0 .../sort/{sortAssets.js => sortAssets.ts} | 0 src/types/github.ts | 24 +++++++++ src/types/searchBar.ts | 0 tsconfig.json | 3 +- 16 files changed, 130 insertions(+), 65 deletions(-) rename src/lib/helpers/asset/{bytesToFileSize.js => bytesToFileSize.ts} (81%) rename src/lib/helpers/asset/{getImageResolution.js => getImageResolution.ts} (78%) rename src/lib/helpers/casing/{fixCasing.js => fixCasing.ts} (77%) rename src/lib/helpers/timeConvertion/{isoFormat.js => isoFormat.ts} (85%) rename src/lib/utils/{discord.js => discord.ts} (100%) rename src/lib/utils/{downloadFiles.js => downloadFiles.ts} (100%) delete mode 100644 src/lib/utils/filterSearch.js create mode 100644 src/lib/utils/filterSearch.ts rename src/lib/utils/{github.js => github.ts} (77%) rename src/lib/utils/{i18n.js => i18n.ts} (100%) rename src/lib/utils/{keybinds.js => keybinds.ts} (100%) rename src/lib/utils/sort/{sortAssets.js => sortAssets.ts} (100%) create mode 100644 src/types/github.ts create mode 100644 src/types/searchBar.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2480f924..ab4adec3 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,10 +1,31 @@ module.exports = { - parser: "babel-eslint", - extends: [ - "plugin:svelte/recommended", - ], - ignorePatterns: ['*.cjs'], - rules: { - 'svelte/no-trailing-spaces': 'error' - }, - } \ No newline at end of file + root: true, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:svelte/recommended', + 'prettier' + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + ignorePatterns: ['*.cjs'], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020, + extraFileExtensions: ['.svelte'] + }, + env: { + browser: true, + es2017: true, + node: true + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + ] +} \ No newline at end of file diff --git a/src/lib/helpers/asset/bytesToFileSize.js b/src/lib/helpers/asset/bytesToFileSize.ts similarity index 81% rename from src/lib/helpers/asset/bytesToFileSize.js rename to src/lib/helpers/asset/bytesToFileSize.ts index f2f8130b..960bd30e 100644 --- a/src/lib/helpers/asset/bytesToFileSize.js +++ b/src/lib/helpers/asset/bytesToFileSize.ts @@ -1,4 +1,4 @@ -export function bytesToFileSize(bytes) { +export function bytesToFileSize(bytes: number) { const sizes = ['B', 'KB', 'MB', 'GB', 'TB'] if (bytes === 0) return '0 B' const i = Math.floor(Math.log2(bytes) / 10) diff --git a/src/lib/helpers/asset/getImageResolution.js b/src/lib/helpers/asset/getImageResolution.ts similarity index 78% rename from src/lib/helpers/asset/getImageResolution.js rename to src/lib/helpers/asset/getImageResolution.ts index 99f26f02..af02e9a8 100644 --- a/src/lib/helpers/asset/getImageResolution.js +++ b/src/lib/helpers/asset/getImageResolution.ts @@ -1,4 +1,4 @@ -export async function getImageResolution(image) { +export async function getImageResolution(image: string | HTMLImageElement) { if (!image) return 'Unknown' const img = typeof image === 'string' ? new Image() : image img.src = typeof image === 'string' ? image : image.src diff --git a/src/lib/helpers/casing/fixCasing.js b/src/lib/helpers/casing/fixCasing.ts similarity index 77% rename from src/lib/helpers/casing/fixCasing.js rename to src/lib/helpers/casing/fixCasing.ts index 46a8d945..cf225e40 100644 --- a/src/lib/helpers/casing/fixCasing.js +++ b/src/lib/helpers/casing/fixCasing.ts @@ -1,5 +1,5 @@ // e.g 'a-b-c' -> 'A B C' -export function fixCasing(word) { +export function fixCasing(word: string) { const formattedWord = word.replace(/-/g, ' ') return formattedWord.replace(/\b\w/g, (l) => l.toUpperCase()) } diff --git a/src/lib/helpers/timeConvertion/isoFormat.js b/src/lib/helpers/timeConvertion/isoFormat.ts similarity index 85% rename from src/lib/helpers/timeConvertion/isoFormat.js rename to src/lib/helpers/timeConvertion/isoFormat.ts index de60247a..73a1b1ee 100644 --- a/src/lib/helpers/timeConvertion/isoFormat.js +++ b/src/lib/helpers/timeConvertion/isoFormat.ts @@ -1,7 +1,7 @@ -export function formatTimeAgo(isoTimestamp) { +export function formatTimeAgo(isoTimestamp: string) { const now = new Date() const timestamp = new Date(isoTimestamp) - const elapsedMilliseconds = now - timestamp + const elapsedMilliseconds = now.getTime() - timestamp.getTime() const elapsedSeconds = Math.floor(elapsedMilliseconds / 1000) if (elapsedSeconds < 60) { @@ -37,7 +37,7 @@ export function formatTimeAgo(isoTimestamp) { } // ISO 8601 -> DD/Suffix Month YYYY, HH:MM:SS -export function formatDateReadable(dateString) { +export function formatDateReadable(dateString: string) { const date = new Date(dateString) const day = date.getDate() const month = date.toLocaleString('default', { month: 'long' }) @@ -46,7 +46,7 @@ export function formatDateReadable(dateString) { const suffix = getOrdinalSuffix(day) return `${day}${suffix} ${month} ${year}, ${time}` } -function getOrdinalSuffix(day) { +function getOrdinalSuffix(day: number) { const suffixes = ['th', 'st', 'nd', 'rd'] const lastDigit = day % 10 const suffixIndex = @@ -55,7 +55,7 @@ function getOrdinalSuffix(day) { } // ISO 8601 -> Unix Timestamp -export function iso8601ToUnix(isoString) { +export function iso8601ToUnix(isoString: string) { const date = new Date(isoString) return Math.floor(date.getTime() / 1000) } diff --git a/src/lib/utils/discord.js b/src/lib/utils/discord.ts similarity index 100% rename from src/lib/utils/discord.js rename to src/lib/utils/discord.ts diff --git a/src/lib/utils/downloadFiles.js b/src/lib/utils/downloadFiles.ts similarity index 100% rename from src/lib/utils/downloadFiles.js rename to src/lib/utils/downloadFiles.ts diff --git a/src/lib/utils/filterSearch.js b/src/lib/utils/filterSearch.js deleted file mode 100644 index 3c0e5183..00000000 --- a/src/lib/utils/filterSearch.js +++ /dev/null @@ -1,38 +0,0 @@ -export const filterGamesSearchBar = (allGames, query) => { - if (!query || query.length < 1) { - return [] - } - - const lowercaseQuery = query.toLowerCase() - const keywords = lowercaseQuery.split(' ').filter((kw) => kw.length > 0) - - // create a new array of game/location objects - const formattedGames = allGames.map((game) => { - return { - name: game.name.toLowerCase(), - locations: game.subfolders.map((subfolders) => - subfolders.name.toLowerCase() - ), - } - }) - - const gamesWithLocations = formattedGames.flatMap((game) => - game.locations.map((location) => ({ - gameName: game.name.replace(/ /g, '-').toLowerCase(), - locationName: location.toLowerCase(), - })) - ) - - // filter the array based on the search query - const filteredGames = gamesWithLocations.filter((game) => { - const gameName = game.gameName - const locationName = game.locationName - return keywords.every( - (kw) => gameName.includes(kw) || locationName.includes(kw) - ) - }) - - // console.log(filteredGames) - // return filteredGames.slice(0, 5) if limiting the number of results - return filteredGames -} diff --git a/src/lib/utils/filterSearch.ts b/src/lib/utils/filterSearch.ts new file mode 100644 index 00000000..809d3a12 --- /dev/null +++ b/src/lib/utils/filterSearch.ts @@ -0,0 +1,51 @@ +import { Game, Subfolder, FormattedGame, FilteredGame } from '@/types/searchBar.ts' + +export const filterGamesSearchBar = ( + allGames: Game[], + query: string +): FilteredGame[] => { + if (!query || query.length < 1) { + return [] + } + + const lowercaseQuery = query.toLowerCase() + const keywords = lowercaseQuery.split(' ').filter((kw) => kw.length > 0) + + // create a new array of game/location objects + const formattedGames: FormattedGame[] = allGames.map((game: Game) => { + return { + name: game.name.toLowerCase(), + locations: game.subfolders.map((subfolder: Subfolder) => + subfolder.name.toLowerCase() + ), + } + }) + + const gamesWithLocations: FilteredGame[] = formattedGames.reduce( + (accumulator: FilteredGame[], game: FormattedGame) => { + const locationsWithNames: FilteredGame[] = game.locations.map( + (location: string) => ({ + gameName: game.name.replace(/ /g, '-').toLowerCase(), + locationName: location.toLowerCase(), + }) + ) + return accumulator.concat(locationsWithNames) + }, + [] + ) + + // filter the array based on the search query + const filteredGames: FilteredGame[] = gamesWithLocations.filter( + (game: FilteredGame) => { + const gameName = game.gameName + const locationName = game.locationName + return keywords.every( + (kw) => gameName.includes(kw) || locationName.includes(kw) + ) + } + ) + + // console.log(filteredGames) + // return filteredGames.slice(0, 5) if limiting the number of results + return filteredGames +} diff --git a/src/lib/utils/github.js b/src/lib/utils/github.ts similarity index 77% rename from src/lib/utils/github.js rename to src/lib/utils/github.ts index a83ff60a..53c6b41b 100644 --- a/src/lib/utils/github.js +++ b/src/lib/utils/github.ts @@ -1,7 +1,8 @@ import axios from 'axios' +import { CommitAuthor, Commit, Release } from '../../types/github' // gets the latest commits -export async function getCommitsRecent(perPage) { +export async function getCommitsRecent(perPage?: number): Promise { try { const branch = window.location.href.startsWith('https://wanderer.moe/') ? 'main' @@ -10,16 +11,14 @@ export async function getCommitsRecent(perPage) { const { data } = await axios.get( `https://api.github.com/repos/wanderer-moe/site/commits?per_page=${perPage}&sha=${branch}` ) + const commits = await Promise.all( data.map( async ({ - commit: { - message, - author: { name, date }, - }, + commit: { message, author }, author: { login: username }, sha, - }) => { + }: any) => { let commitMsg = message if (commitMsg.includes('\n')) { commitMsg = commitMsg.split('\n')[0] @@ -27,13 +26,18 @@ export async function getCommitsRecent(perPage) { const shaSpliced = sha.slice(0, 7) return { commitMsg, - authorInfo: { name, username, date }, + authorInfo: { + name: author.name, + username, + date: author.date, + }, shaSpliced, sha, } } ) ) + return commits } catch (error) { console.error(error) @@ -42,11 +46,12 @@ export async function getCommitsRecent(perPage) { } // gets the latest release -export async function getReleases(releaseCount) { +export async function getReleases(releaseCount?: number): Promise { try { const { data } = await axios.get( `https://api.github.com/repos/wanderer-moe/site/releases?per_page=${releaseCount}` ) + const releases = await Promise.all( data.map( async ({ @@ -56,12 +61,13 @@ export async function getReleases(releaseCount) { body = '', author: { login: author }, published_at: date, - }) => { + }: any) => { if (!date) return null return { tag, name, url, body, author, date } } ) ) + return releases.filter(Boolean) } catch (error) { console.error(error) diff --git a/src/lib/utils/i18n.js b/src/lib/utils/i18n.ts similarity index 100% rename from src/lib/utils/i18n.js rename to src/lib/utils/i18n.ts diff --git a/src/lib/utils/keybinds.js b/src/lib/utils/keybinds.ts similarity index 100% rename from src/lib/utils/keybinds.js rename to src/lib/utils/keybinds.ts diff --git a/src/lib/utils/sort/sortAssets.js b/src/lib/utils/sort/sortAssets.ts similarity index 100% rename from src/lib/utils/sort/sortAssets.js rename to src/lib/utils/sort/sortAssets.ts diff --git a/src/types/github.ts b/src/types/github.ts new file mode 100644 index 00000000..b057d675 --- /dev/null +++ b/src/types/github.ts @@ -0,0 +1,24 @@ +export interface CommitAuthor { + name: string + date: string +} + +export interface Commit { + commitMsg: string + authorInfo: { + name: string + username: string + date: string + } + shaSpliced: string + sha: string +} + +export interface Release { + tag: string + name: string + url: string + body: string + author?: string + date: string +} diff --git a/src/types/searchBar.ts b/src/types/searchBar.ts new file mode 100644 index 00000000..e69de29b diff --git a/tsconfig.json b/tsconfig.json index cb286cec..693fe514 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,5 +9,6 @@ "skipLibCheck": true, "sourceMap": true, "strict": true - } + }, + "exclude": ["i18n"] } From b47f69feb5f26bdee7305953de5f9b61ce091f15 Mon Sep 17 00:00:00 2001 From: Marcel <65048232+dromzeh@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:40:14 +0100 Subject: [PATCH 3/6] fix: declare type import --- src/lib/utils/filterSearch.ts | 2 +- src/lib/utils/github.ts | 2 +- src/lib/utils/sort/sortAssets.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/utils/filterSearch.ts b/src/lib/utils/filterSearch.ts index 809d3a12..36a3047b 100644 --- a/src/lib/utils/filterSearch.ts +++ b/src/lib/utils/filterSearch.ts @@ -1,4 +1,4 @@ -import { Game, Subfolder, FormattedGame, FilteredGame } from '@/types/searchBar.ts' +import type { Game, Subfolder, FormattedGame, FilteredGame } from '@/types/searchBar.ts' export const filterGamesSearchBar = ( allGames: Game[], diff --git a/src/lib/utils/github.ts b/src/lib/utils/github.ts index 53c6b41b..4eed0255 100644 --- a/src/lib/utils/github.ts +++ b/src/lib/utils/github.ts @@ -1,5 +1,5 @@ import axios from 'axios' -import { CommitAuthor, Commit, Release } from '../../types/github' +import type { CommitAuthor, Commit, Release } from '../../types/github' // gets the latest commits export async function getCommitsRecent(perPage?: number): Promise { diff --git a/src/lib/utils/sort/sortAssets.ts b/src/lib/utils/sort/sortAssets.ts index e0aa4180..82bb9d2c 100644 --- a/src/lib/utils/sort/sortAssets.ts +++ b/src/lib/utils/sort/sortAssets.ts @@ -1,5 +1,5 @@ // sort images based on selected sorting option -import { iso8601ToUnix } from '@/lib/helpers/timeConvertion/isoFormat.js' +import { iso8601ToUnix } from '@/lib/helpers/timeConvertion/isoFormat' export function sortAssets(images, selectedSortingOption) { switch (selectedSortingOption.name) { From e4f97165d384e66978f6196d9735c6010285eac2 Mon Sep 17 00:00:00 2001 From: Marcel <65048232+dromzeh@users.noreply.github.com> Date: Thu, 22 Jun 2023 20:32:14 +0100 Subject: [PATCH 4/6] fix: remove `.js` on imports --- src/components/AssetItem.svelte | 4 ++-- src/components/GameContainer.svelte | 4 ++-- src/components/nav/HomeSidebar.svelte | 4 ++-- src/components/popouts/SearchBar.svelte | 2 +- src/components/popouts/ViewImage.svelte | 4 ++-- src/components/popouts/download/DownloadIndicator.svelte | 4 ++-- src/lib/utils/{i18n.ts => i18n.js} | 0 src/routes/+layout.svelte | 2 +- src/routes/+page.js | 2 +- src/routes/+page.svelte | 1 - src/routes/[game]/+page.svelte | 4 ++-- src/routes/[game]/[asset]/+page.svelte | 6 +++--- src/routes/oc-generator/[game]/+page.svelte | 2 +- 13 files changed, 19 insertions(+), 20 deletions(-) rename src/lib/utils/{i18n.ts => i18n.js} (100%) diff --git a/src/components/AssetItem.svelte b/src/components/AssetItem.svelte index 2cb57445..8769312d 100644 --- a/src/components/AssetItem.svelte +++ b/src/components/AssetItem.svelte @@ -1,6 +1,6 @@ + @@ -30,7 +30,7 @@ import { page } from '$app/stores' >{$t('errors.refresh')}

-

{$page.error.message}

+

{$page.error?.message}

From c0bd1125aa73530725f3e6d5129600470a0b50cb Mon Sep 17 00:00:00 2001 From: Marcel <65048232+dromzeh@users.noreply.github.com> Date: Thu, 22 Jun 2023 20:52:56 +0100 Subject: [PATCH 6/6] temp rm searchbar & add missing lang declarations --- src/components/nav/Nav.svelte | 37 ------- src/components/popouts/SearchBar.svelte | 109 -------------------- src/lib/utils/filterSearch.ts | 90 ++++++++-------- src/routes/[game]/+page.svelte | 2 +- src/routes/[game]/[asset]/+page.svelte | 2 +- src/routes/contributors/+page.svelte | 2 +- src/routes/oc-generator/[game]/+page.svelte | 2 +- src/types/searchBar.ts | 0 tsconfig.json | 5 +- 9 files changed, 53 insertions(+), 196 deletions(-) delete mode 100644 src/components/popouts/SearchBar.svelte delete mode 100644 src/types/searchBar.ts diff --git a/src/components/nav/Nav.svelte b/src/components/nav/Nav.svelte index 67b68e21..73d2841a 100644 --- a/src/components/nav/Nav.svelte +++ b/src/components/nav/Nav.svelte @@ -1,16 +1,7 @@ -
@@ -32,21 +23,6 @@ let isSearchOpen = false
-
- -
- -{#if isSearchOpen} - -{/if} diff --git a/src/components/popouts/SearchBar.svelte b/src/components/popouts/SearchBar.svelte deleted file mode 100644 index 475d117f..00000000 --- a/src/components/popouts/SearchBar.svelte +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - diff --git a/src/lib/utils/filterSearch.ts b/src/lib/utils/filterSearch.ts index 36a3047b..df2564ba 100644 --- a/src/lib/utils/filterSearch.ts +++ b/src/lib/utils/filterSearch.ts @@ -1,51 +1,51 @@ -import type { Game, Subfolder, FormattedGame, FilteredGame } from '@/types/searchBar.ts' +// import type { Game, Subfolder, FormattedGame, FilteredGame } from '@/types/searchBar' -export const filterGamesSearchBar = ( - allGames: Game[], - query: string -): FilteredGame[] => { - if (!query || query.length < 1) { - return [] - } +// export const filterGamesSearchBar = ( +// allGames: Game[], +// query: string +// ): FilteredGame[] => { +// if (!query || query.length < 1) { +// return [] +// } - const lowercaseQuery = query.toLowerCase() - const keywords = lowercaseQuery.split(' ').filter((kw) => kw.length > 0) +// const lowercaseQuery = query.toLowerCase() +// const keywords = lowercaseQuery.split(' ').filter((kw) => kw.length > 0) - // create a new array of game/location objects - const formattedGames: FormattedGame[] = allGames.map((game: Game) => { - return { - name: game.name.toLowerCase(), - locations: game.subfolders.map((subfolder: Subfolder) => - subfolder.name.toLowerCase() - ), - } - }) +// // create a new array of game/location objects +// const formattedGames: FormattedGame[] = allGames.map((game: Game) => { +// return { +// name: game.name.toLowerCase(), +// locations: game.subfolders.map((subfolder: Subfolder) => +// subfolder.name.toLowerCase() +// ), +// } +// }) - const gamesWithLocations: FilteredGame[] = formattedGames.reduce( - (accumulator: FilteredGame[], game: FormattedGame) => { - const locationsWithNames: FilteredGame[] = game.locations.map( - (location: string) => ({ - gameName: game.name.replace(/ /g, '-').toLowerCase(), - locationName: location.toLowerCase(), - }) - ) - return accumulator.concat(locationsWithNames) - }, - [] - ) +// const gamesWithLocations: FilteredGame[] = formattedGames.reduce( +// (accumulator: FilteredGame[], game: FormattedGame) => { +// const locationsWithNames: FilteredGame[] = game.locations.map( +// (location: string) => ({ +// gameName: game.name.replace(/ /g, '-').toLowerCase(), +// locationName: location.toLowerCase(), +// }) +// ) +// return accumulator.concat(locationsWithNames) +// }, +// [] +// ) - // filter the array based on the search query - const filteredGames: FilteredGame[] = gamesWithLocations.filter( - (game: FilteredGame) => { - const gameName = game.gameName - const locationName = game.locationName - return keywords.every( - (kw) => gameName.includes(kw) || locationName.includes(kw) - ) - } - ) +// // filter the array based on the search query +// const filteredGames: FilteredGame[] = gamesWithLocations.filter( +// (game: FilteredGame) => { +// const gameName = game.gameName +// const locationName = game.locationName +// return keywords.every( +// (kw) => gameName.includes(kw) || locationName.includes(kw) +// ) +// } +// ) - // console.log(filteredGames) - // return filteredGames.slice(0, 5) if limiting the number of results - return filteredGames -} +// // console.log(filteredGames) +// // return filteredGames.slice(0, 5) if limiting the number of results +// return filteredGames +// } diff --git a/src/routes/[game]/+page.svelte b/src/routes/[game]/+page.svelte index c14ad9d1..204300ca 100644 --- a/src/routes/[game]/+page.svelte +++ b/src/routes/[game]/+page.svelte @@ -1,4 +1,4 @@ -