From 65ddbe976fb51dcdbb15a0aaea48592328f43c62 Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 11:14:48 +0200 Subject: [PATCH 01/34] rm default style --- front/src/layouts/Layout.astro | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/front/src/layouts/Layout.astro b/front/src/layouts/Layout.astro index 7b552be..5c9eaae 100644 --- a/front/src/layouts/Layout.astro +++ b/front/src/layouts/Layout.astro @@ -19,33 +19,4 @@ const { title } = Astro.props; - - + \ No newline at end of file -- 2.47.1 From 65d52eb8fadb526d145ec89407bf05b0256fce1b Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 11:15:12 +0200 Subject: [PATCH 02/34] add pb dependancie --- front/package.json | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/front/package.json b/front/package.json index 97f82dd..81e3fe7 100644 --- a/front/package.json +++ b/front/package.json @@ -2,7 +2,7 @@ "name": "front", "type": "module", "version": "0.0.1", - "private":"true", + "private": "true", "scripts": { "dev": "astro dev", "start": "astro dev", @@ -11,23 +11,25 @@ "astro": "astro" }, "dependencies": { + "@astrojs/node": "^8.2.5", "@astrojs/tailwind": "^5.1.0", "@tailwindcss/typography": "^0.5.12", "astro": "^4.6.3", "lucide-astro": "^0.372.0", + "pocketbase": "^0.21.1", "simple-icons-astro": "^11.12.0", "tailwindcss": "^3.4.3", "typescript": "^5.2.2" }, "devDependencies": { - "@astrojs/check": "^0", - "@types/node": "^20", - "@typescript-eslint/eslint-plugin": "^6", - "@typescript-eslint/parser": "^6", - "@vitest/coverage-v8": "^1", - "eslint": "^8", - "eslint-plugin-astro": "^0.31", - "typescript": "^5", - "vitest": "^1" - } + "@astrojs/check": "^0", + "@types/node": "^20", + "@typescript-eslint/eslint-plugin": "^6", + "@typescript-eslint/parser": "^6", + "@vitest/coverage-v8": "^1", + "eslint": "^8", + "eslint-plugin-astro": "^0.31", + "typescript": "^5", + "vitest": "^1" + } } -- 2.47.1 From 79656cfccdc244eba4f91275681c5b67f8925f47 Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 11:15:33 +0200 Subject: [PATCH 03/34] fix: site output type --- front/astro.config.mjs | 9 +- front/package-lock.json | 182 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 187 insertions(+), 4 deletions(-) diff --git a/front/astro.config.mjs b/front/astro.config.mjs index 30bdc47..8c09f89 100644 --- a/front/astro.config.mjs +++ b/front/astro.config.mjs @@ -1,4 +1,5 @@ import { defineConfig } from 'astro/config'; +import node from '@astrojs/node'; // https://astro.build/config export default defineConfig({ @@ -13,8 +14,8 @@ export default defineConfig({ port: 3000 }, trailingSlash: 'never', - output: 'static', //'server', - // adapter: node({ - // mode: 'standalone' - // }), + output: 'server', + adapter: node({ + mode: 'standalone' + }), }); diff --git a/front/package-lock.json b/front/package-lock.json index 4fda794..1c86d27 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -8,10 +8,12 @@ "name": "front", "version": "0.0.1", "dependencies": { + "@astrojs/node": "^8.2.5", "@astrojs/tailwind": "^5.1.0", "@tailwindcss/typography": "^0.5.12", "astro": "^4.6.3", "lucide-astro": "^0.372.0", + "pocketbase": "^0.21.1", "simple-icons-astro": "^11.12.0", "tailwindcss": "^3.4.3", "typescript": "^5.2.2" @@ -153,6 +155,18 @@ "vfile": "^6.0.1" } }, + "node_modules/@astrojs/node": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/@astrojs/node/-/node-8.2.5.tgz", + "integrity": "sha512-IdVD4dBNyg+ScmCATZ0FM7vNLAHq0TSdiJ3LpR4jcWIUhpN1ps5Jg+9CfzMaLmCCe/SJUZejK5EnzqUJdnGYyg==", + "dependencies": { + "send": "^0.18.0", + "server-destroy": "^1.0.1" + }, + "peerDependencies": { + "astro": "^4.2.0" + } + }, "node_modules/@astrojs/prism": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.1.0.tgz", @@ -3123,6 +3137,14 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -3131,6 +3153,15 @@ "node": ">=6" } }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-libc": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", @@ -3232,6 +3263,11 @@ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, "node_modules/electron-to-chromium": { "version": "1.4.745", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.745.tgz", @@ -3252,6 +3288,14 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -3322,6 +3366,11 @@ "node": ">=6" } }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3708,6 +3757,14 @@ "node": ">=0.10.0" } }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -3909,6 +3966,14 @@ "url": "https://github.com/sponsors/rawify" } }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -4312,6 +4377,21 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/human-signals": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", @@ -6006,6 +6086,17 @@ "node": ">= 6" } }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -6409,6 +6500,11 @@ "pathe": "^1.1.2" } }, + "node_modules/pocketbase": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.21.1.tgz", + "integrity": "sha512-0PvCP4pKtxsV9kwldEGyibEvhwOcx9jSCrz3WN5CgPILJfM0z76f1op9WE8/8UgikDsMdRsc5iBLfKintrJS1g==" + }, "node_modules/postcss": { "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", @@ -6770,6 +6866,14 @@ "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", "optional": true }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -7578,6 +7682,68 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, "node_modules/sharp": { "version": "0.32.6", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", @@ -7749,6 +7915,14 @@ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/std-env": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", @@ -8208,6 +8382,14 @@ "node": ">=8.0" } }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", -- 2.47.1 From a2290c21e16575d5ae56a2311352eecffba34f15 Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 11:45:17 +0200 Subject: [PATCH 04/34] add astro util --- front/src/libs/AstroUtils.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 front/src/libs/AstroUtils.ts diff --git a/front/src/libs/AstroUtils.ts b/front/src/libs/AstroUtils.ts new file mode 100644 index 0000000..c97a8ed --- /dev/null +++ b/front/src/libs/AstroUtils.ts @@ -0,0 +1,5 @@ +export default class AstroUtils { + public static async wrap(fn: () => T | Promise) { + return await fn() + } +} \ No newline at end of file -- 2.47.1 From 7c68628456d12a31a6d59b146df2ab614a86f5eb Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 11:45:39 +0200 Subject: [PATCH 05/34] add register form test --- front/src/pages/account/register.astro | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 front/src/pages/account/register.astro diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro new file mode 100644 index 0000000..a73cb13 --- /dev/null +++ b/front/src/pages/account/register.astro @@ -0,0 +1,44 @@ +--- +import PocketBase from 'pocketbase'; +import Layout from '../../layouts/Layout.astro'; +import AstroUtils from '../../libs/AstroUtils'; + +//const connected = await getUser(Astro.cookies) + +// if(connected) { +// return Astro.redirect(route('/')) +// } + + +const res = await AstroUtils.wrap(async () => { + if (Astro.request.method !== 'POST'){ + return + } + const form = await Astro.request.formData() + const request = { + username: form.get("username") as String, + name: form.get("name") as String, + email: form.get("email") as String, + password: form.get("password") as String, + passwordConfirm: form.get("passwordConfirm") as String, + emailVisibility: false + } + const pb = new PocketBase('http://127.0.0.1:3001'); + + console.log(request); + const record = await pb.collection('users').create(request); + console.log(record); + +}) +--- + + +
+ + + + + + +
+
\ No newline at end of file -- 2.47.1 From a724c1270f6f15ac7c06d441c21f49b0602fe0db Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 12:07:37 +0200 Subject: [PATCH 06/34] fix: change register form name --- front/src/pages/account/register.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index a73cb13..54c4d53 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -34,8 +34,8 @@ const res = await AstroUtils.wrap(async () => {
- - + + -- 2.47.1 From 70382d7bd853a7011b1a5607da365b71a6b4dedc Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 12:08:49 +0200 Subject: [PATCH 07/34] feat: login page test --- front/src/pages/account/login.astro | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 front/src/pages/account/login.astro diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro new file mode 100644 index 0000000..a597d49 --- /dev/null +++ b/front/src/pages/account/login.astro @@ -0,0 +1,46 @@ +--- +import Layout from "../../layouts/Layout.astro"; +import PocketBase from 'pocketbase'; +import AstroUtils from "../../libs/AstroUtils"; +import Schema from 'models/Schema' + + +// const usr = await getUser(Astro.cookies) +// if (usr) { +// return Astro.redirect(route('/', {message: 'Vous êtes déjà connecté !'})) +// } + + +const res = await AstroUtils.wrap(async () => { + if (Astro.request.method !== 'POST') { + return + } + const form = await Astro.request.formData(); + const request = { + email: form.get("username") as String, + password: form.get("password") as String + } + const pb = new PocketBase('http://127.0.0.1:3001'); + + const authData = await pb.collection('users').authWithPassword( + request.email, + request.password, + ); + + console.log(authData) + + // after the above you can also access the auth data from the authStore + console.log(pb.authStore.isValid); + console.log(pb.authStore.token); + console.log(pb.authStore.model.id); + +}) +--- + + + + + + + + \ No newline at end of file -- 2.47.1 From 5a49f5beda671f3371bb13397baf8b063810ad20 Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 20 Apr 2024 12:09:05 +0200 Subject: [PATCH 08/34] rm some log --- front/src/pages/account/login.astro | 2 -- 1 file changed, 2 deletions(-) diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index a597d49..3717ce2 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -27,8 +27,6 @@ const res = await AstroUtils.wrap(async () => { request.password, ); - console.log(authData) - // after the above you can also access the auth data from the authStore console.log(pb.authStore.isValid); console.log(pb.authStore.token); -- 2.47.1 From 4761fef61bc78aca86bee258c7d93b16ae3b912c Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 11:24:01 +0200 Subject: [PATCH 09/34] auth WIP --- front/src/libs/AuthUtils.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/front/src/libs/AuthUtils.ts b/front/src/libs/AuthUtils.ts index c740d86..ede83e5 100644 --- a/front/src/libs/AuthUtils.ts +++ b/front/src/libs/AuthUtils.ts @@ -1,4 +1,22 @@ +import { AstroCookies } from "astro"; +import { PocketBase } from "PocketBase"; + +const pb = new PocketBase('https://pb-tweb.cb85.fr'); + +export async function getUser(cookies:AstroCookies): Promise { + const sessionID = cookies.get('session')?value + + if(!sessionID){ + return + } + + const authData = await pb.collection('users').authRefresh(); + + console.log(pb.authStore.isValid); + console.log(pb.authStore.token); + console.log(pb.authStore.model.id); +} //référence a loop //fonction get user pour récupéré un utilisateur (notament coté client) //sessionID = JWS -- 2.47.1 From b1fce87215da2b052e88ed6e573cfb1ff6893342 Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 18:26:06 +0200 Subject: [PATCH 10/34] add eslint config --- front/.eslintignore | 8 ++ front/.eslintrc.json | 324 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 332 insertions(+) create mode 100644 front/.eslintignore create mode 100644 front/.eslintrc.json diff --git a/front/.eslintignore b/front/.eslintignore new file mode 100644 index 0000000..cc8d5f6 --- /dev/null +++ b/front/.eslintignore @@ -0,0 +1,8 @@ +node_modules + +out +.next + +next-env.d.ts +*.js +__tests__ diff --git a/front/.eslintrc.json b/front/.eslintrc.json new file mode 100644 index 0000000..04202f3 --- /dev/null +++ b/front/.eslintrc.json @@ -0,0 +1,324 @@ +{ + "env": { + "browser": true, + "es6": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "plugin:astro/recommended", + "plugin:@typescript-eslint/strict", + "plugin:@typescript-eslint/stylistic" + ], + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "overrides": [ + { + "files": [ + "*.astro" + ], + "parser": "astro-eslint-parser", + "parserOptions": { + "extraFileExtensions": [ + ".astro" + ], + "parser": "@typescript-eslint/parser" + } + }, + { + "files": [ + "*.ts", + "*.tsx", + "*.astro" + ], + "rules": { + "no-extra-parens": "off", + "no-unused-expressions": "off", + "no-shadow": "off", + "quotes": "off", + "semi": "off", + "space-before-function-paren": "off" + } + } + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "jsx": true, + "project": "tsconfig.json", + "sourceType": "module", + "ecmaVersion": 2018 + } + }, + "plugins": [ + "@typescript-eslint" + ], + "root": true, + "rules": { + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/space-before-function-paren": [ + "error", + { + "anonymous": "never", + "asyncArrow": "always", + "named": "never" + } + ], + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/unified-signatures": "error", + + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": [ + "error", + { + "default": "generic" + } + ], + "arrow-body-style": "error", + "arrow-parens": [ + "error", + "always" + ], + "@typescript-eslint/ban-types": [ + "error", + { + "types": { + "{}": false + } + } + ], + "complexity": [ + "warn", + 10 + ], + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-definitions": "error", + "constructor-super": "error", + "curly": "error", + "dot-notation": "error", + "eol-last": "error", + "eqeqeq": [ + "error", + "smart" + ], + "@typescript-eslint/explicit-member-accessibility": [ + "error", + { + "accessibility": "explicit" + } + ], + "for-direction": "error", + "getter-return": "error", + "guard-for-in": "error", + "id-blacklist": [ + "error", + "any", + "Number", + "number", + "String", + "string", + "Boolean", + "boolean", + "Undefined" + ], + "id-length": [ + "warn", + { + "exceptions": [ + "_" + ] + } + ], + "id-match": "error", + "indent": [ + "error", + "tab", + { + "SwitchCase": 1 + } + ], + "linebreak-style": [ + "error", + "unix" + ], + "max-classes-per-file": [ + "error", + 1 + ], + "max-depth": [ + "warn", + 2 + ], + "max-len": [ + "warn", + { + "code": 256 + } + ], + "@typescript-eslint/member-delimiter-style": [ + "error", + { + "multiline": { + "delimiter": "none", + "requireLast": true + }, + "singleline": { + "delimiter": "comma", + "requireLast": false + } + } + ], + "@typescript-eslint/member-ordering": "error", + "new-parens": "error", + + "no-async-promise-executor": "error", + "no-await-in-loop": "warn", + "no-bitwise": "error", + "no-caller": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-console": "off", + "no-constant-condition": "error", + "no-control-regex": "warn", + "no-debugger": "error", + "no-delete-var": "error", + "no-dupe-args": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + "no-empty-character-class": "error", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-empty-interface": "error", + "no-eval": "error", + "no-ex-assign": "error", + "@typescript-eslint/no-explicit-any": "off", + + + "no-extra-boolean-cast": "error", + "no-extra-parens": "off", + "@typescript-eslint/no-extra-parens": [ + "error", + "all", + { + "ignoreJSX": "all" + } + ], + "no-extra-semi": "error", + "no-fallthrough": "off", + "no-func-assign": "error", + "no-import-assign": "error", + "no-inner-declarations": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": "error", + "no-label-var": "error", + "no-loss-of-precision": "error", + "no-misleading-character-class": "error", + "@typescript-eslint/no-misused-new": "error", + "no-multiple-empty-lines": "error", + "@typescript-eslint/no-namespace": "error", + "no-new-wrappers": "error", + "no-obj-calls": "error", + "no-promise-executor-return": "error", + "@typescript-eslint/no-parameter-properties": "off", + "no-prototype-builtins": "error", + "no-regex-spaces": "error", + "no-setter-return": "error", + "@typescript-eslint/no-shadow": "error", + "no-shadow": [ + "error", + { + "builtinGlobals": false, + "hoist": "all" + } + ], + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-template-curly-in-string": "warn", + "no-throw-literal": "error", + "no-trailing-spaces": "error", + "no-undef": "error", + "no-undef-init": "error", + "no-underscore-dangle": "off", + "no-unexpected-multiline": "error", + "no-unreachable": "warn", + "no-unreachable-loop": "warn", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", + "no-unused-expressions": [ + "error", + { + "allowTernary": true + } + ], + "@typescript-eslint/no-unused-expressions": [ + "error", + { + "allowTernary": true + } + ], + "no-unused-labels": "error", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": ["error", { + "args": "all", + "argsIgnorePattern": "^_", + "caughtErrors": "all", + "caughtErrorsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "ignoreRestSiblings": true + }], + "@typescript-eslint/no-non-null-assertion": ["warn"], + "no-var": "error", + "object-shorthand": [ + "warn", + "methods" + ], + "one-var": [ + "error", + "never" + ], + "prefer-const": "error", + "quote-props": [ + "error", + "consistent-as-needed" + ], + "quotes": "off", + "@typescript-eslint/quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "radix": "error", + "require-atomic-updates": "warn", + "semi": "off", + "@typescript-eslint/semi": [ + "error", + "never" + ], + "space-before-function-paren": [ + "error", + { + "anonymous": "never", + "asyncArrow": "always", + "named": "never" + } + ], + "spaced-comment": ["error", "always", { "block": { "exceptions": ["*"] } }], + "use-isnan": "error", + "valid-typeof": "warn" + } +} -- 2.47.1 From 5776fe08d98d8c641e65e52f7d503a46e071e4be Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 18:32:25 +0200 Subject: [PATCH 11/34] feat: user model --- front/src/models/User/index.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 front/src/models/User/index.ts diff --git a/front/src/models/User/index.ts b/front/src/models/User/index.ts new file mode 100644 index 0000000..449ecd2 --- /dev/null +++ b/front/src/models/User/index.ts @@ -0,0 +1,19 @@ + + +export interface PBData{ + id: string | null + collectionId: string | null + collectionName: string | null + created: string | null // TODO: passé ca en date auto + updated: string | null // TODO: passé ca en date auto +} + +export default interface UserObj extends PBData{ + avatar: string | null + username: string + email: string + emailVisibility: false + password: string | null + passwordConfirm: string | null + name: string | null +} -- 2.47.1 From 313c1970963d8704c7b6675a3ed1b511efb963e7 Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 18:33:01 +0200 Subject: [PATCH 12/34] env var WIP --- front/src/env.d.ts | 21 +++++++++++++++++++++ front/src/libs/Env.ts | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 front/src/libs/Env.ts diff --git a/front/src/env.d.ts b/front/src/env.d.ts index f964fe0..1515a63 100644 --- a/front/src/env.d.ts +++ b/front/src/env.d.ts @@ -1 +1,22 @@ +/// /// + + +export interface ImportMetaEnv { + NODE_ENV: string + APP_URL: string + + POCKETBASEURL: string +} + +interface ImportMeta { + readonly env: ImportMetaEnv +} + + +declare namespace App { + /** + * Middlewares variables + */ + interface Locals {} +} diff --git a/front/src/libs/Env.ts b/front/src/libs/Env.ts new file mode 100644 index 0000000..1521696 --- /dev/null +++ b/front/src/libs/Env.ts @@ -0,0 +1,17 @@ +import type { ImportMetaEnv } from 'env' + +/** + * Get the environment variable + * + * @param key the env variable key + * @param defaultValue a default value if applicable + * @returns the environment value or undefined if not found + */ +export function getEnv(key: keyof ImportMetaEnv, defaultValue: string): string +export function getEnv(key: keyof ImportMetaEnv, defaultValue?: string | undefined): string | undefined +export function getEnv(key: keyof ImportMetaEnv, defaultValue?: string | undefined): string | undefined { + // get the env variable through Astro > NodeJS > input + const res = import.meta.env[key] ?? process.env[key] ?? defaultValue + + return res ?? undefined +} -- 2.47.1 From b48c842e415277808f0f9c74f35d4909e4e61255 Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 18:33:20 +0200 Subject: [PATCH 13/34] auth utile --- front/src/libs/AuthUtils.ts | 90 +++++++++++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 19 deletions(-) diff --git a/front/src/libs/AuthUtils.ts b/front/src/libs/AuthUtils.ts index ede83e5..f88e62f 100644 --- a/front/src/libs/AuthUtils.ts +++ b/front/src/libs/AuthUtils.ts @@ -1,30 +1,82 @@ -import { AstroCookies } from "astro"; -import { PocketBase } from "PocketBase"; +import { AstroCookies } from 'astro' +import PocketBase from 'pocketbase' +import UserObj from 'models/User' +import { getEnv } from 'libs/Env' -const pb = new PocketBase('https://pb-tweb.cb85.fr'); +const pb = new PocketBase(getEnv('POCKET_BASE','https://pb-tweb.cb85.fr')) // XXX: 'https://pb-tweb.cb85.fr' -export async function getUser(cookies:AstroCookies): Promise { - const sessionID = cookies.get('session')?value +export async function clearUser(cookies: AstroCookies): Promise { + const sessionID = cookies.get('session')?.value - if(!sessionID){ - return - } + if(!sessionID){ + return + } - const authData = await pb.collection('users').authRefresh(); - - console.log(pb.authStore.isValid); - console.log(pb.authStore.token); - console.log(pb.authStore.model.id); + cookies.delete('session',{ + path: '/' + }) } -//référence a loop -//fonction get user pour récupéré un utilisateur (notament coté client) -//sessionID = JWS +export async function login(cookies: AstroCookies, user: {user: string, password: string}): boolean { -//fonction set user crée un cookies de session -//passé le cookies astro dans les paramètre + const authData = await pb.collection('users').authWithPassword(user.user, user.password) -//utiliser cookie.set pour crée un nouveau cookies + let secure = true + if (getEnv('NODE_ENV', 'production') !== 'production') { + secure = false + } + if(authData){ + cookies.set('session', authData.token,{ + httpOnly: true, + path: '/', + secure: secure, + sameSite: 'Strict', + maxAge: 365000, + }) + return true + } + return false +} + +export async function getUser(cookies: AstroCookies): Promise { + const sessionID = cookies.get('session')?.value + + if(!sessionID){ + return + } + if(!pb.authStore.isValid){ + return + } + + console.log(pb.authStore.model) + return pb.authStore.model + +} + +export async function setUser(cookies: AstroCookies, user: UserObj): Promise{ + + const record = await pb.collection('users').create(user) + + console.log(record) + + const session = pb.authStore.token + + console.log(session) + + let secure = true + + if (getEnv('NODE_ENV', 'production') !== 'production') { + secure = false + } + + cookies.set('session', session,{ + httpOnly: true, + path: '/', + secure: secure, + sameSite: 'Strict', + maxAge: 365000, + }) +} \ No newline at end of file -- 2.47.1 From 2cc3219b30652b333182d8a00ba71c7a3756eefa Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 18:34:49 +0200 Subject: [PATCH 14/34] add astro login page --- front/src/pages/account/index.astro | 16 +++++++++++++++ front/src/pages/account/login.astro | 27 ++++++++++--------------- front/src/pages/account/register.astro | 28 ++++++++++++-------------- 3 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 front/src/pages/account/index.astro diff --git a/front/src/pages/account/index.astro b/front/src/pages/account/index.astro new file mode 100644 index 0000000..4b1e795 --- /dev/null +++ b/front/src/pages/account/index.astro @@ -0,0 +1,16 @@ +--- +import Layout from 'layouts/Layout.astro'; +import { getUser } from 'libs/AuthUtils'; + + +const user = await getUser(Astro.cookies); + +if(!user){ + return Astro.redirect("/account/login"); +} + +--- + + +

Bonjour {user.name}

+
diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index 3717ce2..d8251eb 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -2,13 +2,14 @@ import Layout from "../../layouts/Layout.astro"; import PocketBase from 'pocketbase'; import AstroUtils from "../../libs/AstroUtils"; -import Schema from 'models/Schema' +import { getUser, login } from "libs/AuthUtils"; -// const usr = await getUser(Astro.cookies) -// if (usr) { -// return Astro.redirect(route('/', {message: 'Vous êtes déjà connecté !'})) -// } + +const usr = await getUser(Astro.cookies) +if (usr) { + // return Astro.redirect(route('/', {message: 'Vous êtes déjà connecté !'})) +} const res = await AstroUtils.wrap(async () => { @@ -17,20 +18,14 @@ const res = await AstroUtils.wrap(async () => { } const form = await Astro.request.formData(); const request = { - email: form.get("username") as String, - password: form.get("password") as String + user: form.get("username") as string, + password: form.get("password") as string } - const pb = new PocketBase('http://127.0.0.1:3001'); - const authData = await pb.collection('users').authWithPassword( - request.email, - request.password, - ); - // after the above you can also access the auth data from the authStore - console.log(pb.authStore.isValid); - console.log(pb.authStore.token); - console.log(pb.authStore.model.id); + await login(Astro.cookies, request) + + return Astro.redirect("/account") }) --- diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index 54c4d53..5c508aa 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -2,12 +2,14 @@ import PocketBase from 'pocketbase'; import Layout from '../../layouts/Layout.astro'; import AstroUtils from '../../libs/AstroUtils'; +import { getUser, setUser } from 'libs/AuthUtils'; +import UserObj from 'models/User'; -//const connected = await getUser(Astro.cookies) +const connected = await getUser(Astro.cookies) -// if(connected) { -// return Astro.redirect(route('/')) -// } +if(connected) { + return Astro.redirect(route('/')) +} const res = await AstroUtils.wrap(async () => { @@ -15,19 +17,15 @@ const res = await AstroUtils.wrap(async () => { return } const form = await Astro.request.formData() - const request = { - username: form.get("username") as String, - name: form.get("name") as String, - email: form.get("email") as String, - password: form.get("password") as String, - passwordConfirm: form.get("passwordConfirm") as String, + const request : UserObj = { + username: form.get("username") as string, + name: form.get("name") as string, + email: form.get("email") as string, + password: form.get("password") as string, + passwordConfirm: form.get("passwordConfirm") as string, emailVisibility: false } - const pb = new PocketBase('http://127.0.0.1:3001'); - - console.log(request); - const record = await pb.collection('users').create(request); - console.log(record); + await setUser(Astro.cookies, request); }) --- -- 2.47.1 From 76755baa1deb403d5fae03a14df6c6e95463b1e1 Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 25 Apr 2024 19:52:01 +0200 Subject: [PATCH 15/34] fix: make some build fix --- front/.vscode/settings.json | 9 +++++ front/astro.config.mjs | 51 +++++++++++++------------- front/src/libs/AuthUtils.ts | 47 ++++++++++++++++++------ front/src/models/User/index.ts | 4 +- front/src/pages/account/register.astro | 4 +- front/tsconfig.json | 3 ++ 6 files changed, 77 insertions(+), 41 deletions(-) create mode 100644 front/.vscode/settings.json diff --git a/front/.vscode/settings.json b/front/.vscode/settings.json new file mode 100644 index 0000000..a1c11fe --- /dev/null +++ b/front/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "editor.quickSuggestions": { + "strings": "on" + }, + "tailwindCSS.includeLanguages": { + "astro": "html" + }, + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/front/astro.config.mjs b/front/astro.config.mjs index 33092eb..e777e77 100644 --- a/front/astro.config.mjs +++ b/front/astro.config.mjs @@ -1,30 +1,29 @@ -import { defineConfig } from 'astro/config'; -import node from '@astrojs/node'; -import tailwind from "@astrojs/tailwind"; +import node from '@astrojs/node' +import tailwind from '@astrojs/tailwind' +import { defineConfig } from 'astro/config' -import react from "@astrojs/react"; +import react from '@astrojs/react' // https://astro.build/config export default defineConfig({ - // integrations: [tailwind(), test, routing(), version(), buildInfos()], - compressHTML: true, - build: { - assets: 'assets', - inlineStylesheets: 'auto' - }, - server: { - host: true, - port: 3000 - }, - trailingSlash: 'never', - output: 'server', - adapter: node({ - mode: 'standalone' - }), - integrations: [tailwind(), react()], - vite: { - optimizeDeps: { - include: ['leaflet'] - } - } -}); \ No newline at end of file + compressHTML: true, + build: { + assets: 'assets', + inlineStylesheets: 'auto' + }, + server: { + host: true, + port: 3000 + }, + trailingSlash: 'never', + output: 'server', + adapter: node({ + mode: 'standalone' + }), + integrations: [tailwind(), react()], + vite: { + optimizeDeps: { + include: ['leaflet'] + } + } +}) diff --git a/front/src/libs/AuthUtils.ts b/front/src/libs/AuthUtils.ts index f88e62f..4ddc672 100644 --- a/front/src/libs/AuthUtils.ts +++ b/front/src/libs/AuthUtils.ts @@ -1,6 +1,6 @@ -import { AstroCookies } from 'astro' +import type { AstroCookies } from 'astro' +import type UserObj from 'models/User' import PocketBase from 'pocketbase' -import UserObj from 'models/User' import { getEnv } from 'libs/Env' @@ -18,7 +18,7 @@ export async function clearUser(cookies: AstroCookies): Promise { }) } -export async function login(cookies: AstroCookies, user: {user: string, password: string}): boolean { +export async function login(cookies: AstroCookies, user: {user: string, password: string}): Promise { const authData = await pb.collection('users').authWithPassword(user.user, user.password) @@ -33,7 +33,7 @@ export async function login(cookies: AstroCookies, user: {user: string, password httpOnly: true, path: '/', secure: secure, - sameSite: 'Strict', + sameSite: 'strict', maxAge: 365000, }) return true @@ -44,15 +44,40 @@ export async function login(cookies: AstroCookies, user: {user: string, password export async function getUser(cookies: AstroCookies): Promise { const sessionID = cookies.get('session')?.value + const bpAuth = pb.authStore + if(!sessionID){ - return + return null } - if(!pb.authStore.isValid){ - return + if(!bpAuth.isValid){ + return null + } + if(!bpAuth){ + return null } - console.log(pb.authStore.model) - return pb.authStore.model + console.log(bpAuth.model) + + if(!bpAuth.model){ + return null + } + + const output: UserObj = { + id: bpAuth.model.id as string, + collectionId: bpAuth.model.collectionId as string, + collectionName: bpAuth.model.collectionName as string, + created: bpAuth.model.created as string, + updated: bpAuth.model.updated as string, + avatar: bpAuth.model.avatar as string, + username: bpAuth.model.username as string, + email: bpAuth.model.email as string, + emailVisibility: false, + name: bpAuth.model.name as string, + password: undefined, + passwordConfirm: undefined + } + + return output } @@ -76,7 +101,7 @@ export async function setUser(cookies: AstroCookies, user: UserObj): Promise { return } const form = await Astro.request.formData() - const request : UserObj = { + const request = { username: form.get("username") as string, name: form.get("name") as string, email: form.get("email") as string, diff --git a/front/tsconfig.json b/front/tsconfig.json index 283dfb5..6cb8fa3 100644 --- a/front/tsconfig.json +++ b/front/tsconfig.json @@ -5,4 +5,7 @@ // hide an issue with typescript "noUnusedLocals": false }, + "ts-node": { + "esm": true + } } \ No newline at end of file -- 2.47.1 From cd234f5b37fe5a780feb49d58b2a65cd98d28ceb Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 10:41:37 +0200 Subject: [PATCH 16/34] rm usless thing --- front/src/env.d.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/front/src/env.d.ts b/front/src/env.d.ts index 1515a63..0a69926 100644 --- a/front/src/env.d.ts +++ b/front/src/env.d.ts @@ -1,22 +1,11 @@ -/// -/// - export interface ImportMetaEnv { NODE_ENV: string APP_URL: string - POCKETBASEURL: string + POCKETBASE_URL: string } interface ImportMeta { readonly env: ImportMetaEnv } - - -declare namespace App { - /** - * Middlewares variables - */ - interface Locals {} -} -- 2.47.1 From 459c1252e04084f14af0393407e7402de86c4f0e Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 10:41:54 +0200 Subject: [PATCH 17/34] update package --- front/package-lock.json | 746 +++------------------------------------- front/package.json | 4 +- 2 files changed, 50 insertions(+), 700 deletions(-) diff --git a/front/package-lock.json b/front/package-lock.json index 18efe40..607c8c3 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -15,7 +15,6 @@ "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "astro": "4.5.12", - "astro-geo-map": "^2.0.0", "leaflet": "^1.9.4", "lucide-astro": "^0.372.0", "pocketbase": "^0.21.1", @@ -24,10 +23,11 @@ "react-leaflet": "^4.2.1", "simple-icons-astro": "^11.12.0", "tailwindcss": "^3.4.3", - "typescript": "^5.2.2" + "typescript": "^5" }, "devDependencies": { "@astrojs/check": "^0", + "@astrojs/ts-plugin": "^1.6.1", "@types/leaflet": "^1.9.12", "@types/node": "^20", "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -250,6 +250,20 @@ "node": ">=8" } }, + "node_modules/@astrojs/ts-plugin": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@astrojs/ts-plugin/-/ts-plugin-1.6.1.tgz", + "integrity": "sha512-13mkBo5K3J/mUN/pt/4qxbwBJSmm/X2HAzOZaYg2AildnN/JxiZ2rm60LMssUXhHHhrxQoKslCh06l9sHSkCMQ==", + "dev": true, + "dependencies": { + "@astrojs/compiler": "^2.7.0", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@volar/language-core": "~2.1.5", + "@volar/typescript": "~2.1.5", + "semver": "^7.3.8", + "vscode-languageserver-textdocument": "^1.0.11" + } + }, "node_modules/@babel/code-frame": { "version": "7.24.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", @@ -1314,148 +1328,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@puppeteer/browsers": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-0.5.0.tgz", - "integrity": "sha512-Uw6oB7VvmPRLE4iKsjuOh8zgDabhNX67dzo8U/BB0f9527qx+4eeUs+korU98OhG5C4ubg7ufBgVi63XYwS6TQ==", - "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" - }, - "bin": { - "browsers": "lib/cjs/main-cli.js" - }, - "engines": { - "node": ">=14.1.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@puppeteer/browsers/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/@puppeteer/browsers/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/@puppeteer/browsers/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/@puppeteer/browsers/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/@puppeteer/browsers/node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@react-leaflet/core": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz", @@ -1842,15 +1714,6 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", - "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", @@ -2314,17 +2177,6 @@ "node": ">=0.4.0" } }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2619,21 +2471,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/astro-geo-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astro-geo-map/-/astro-geo-map-2.0.0.tgz", - "integrity": "sha512-TNaga+8wNU6dln4qnW8xtUjgWWutMV4kcVLkS+ELJ9OBec+Xxe8nhffi/rkh7WlgoQ+gP12Z5lCV/SVC8e2bzA==", - "dependencies": { - "change-case": "^4.1.2", - "leaflet": "1.9.0", - "puppeteer": "^19.1.0" - } - }, - "node_modules/astro-geo-map/node_modules/leaflet": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.0.tgz", - "integrity": "sha512-lL8433PmoPoTSfPoPMzsQdTKmH36Rn2bQx9/j0bbZ98LimrsMof0P+7AQ0LntwRbjXe601j/IY1P2mwBRnN/1Q==" - }, "node_modules/astrojs-compiler-sync": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/astrojs-compiler-sync/-/astrojs-compiler-sync-0.3.5.tgz", @@ -2919,14 +2756,6 @@ "ieee754": "^1.2.1" } }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -2940,19 +2769,11 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "engines": { "node": ">=6" } }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, "node_modules/camelcase": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", @@ -2991,16 +2812,6 @@ } ] }, - "node_modules/capital-case": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", - "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", @@ -3041,25 +2852,6 @@ "node": ">=4" } }, - "node_modules/change-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", - "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", - "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -3125,18 +2917,8 @@ "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "node_modules/chromium-bidi": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.7.tgz", - "integrity": "sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ==", - "dependencies": { - "mitt": "3.0.0" - }, - "peerDependencies": { - "devtools-protocol": "*" - } + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "optional": true }, "node_modules/ci-info": { "version": "4.0.0", @@ -3192,6 +2974,7 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -3205,6 +2988,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -3213,6 +2997,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -3227,6 +3012,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -3237,17 +3023,20 @@ "node_modules/cliui/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -3261,6 +3050,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3272,6 +3062,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3380,16 +3171,6 @@ "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", "dev": true }, - "node_modules/constant-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", - "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3403,31 +3184,6 @@ "node": ">= 0.6" } }, - "node_modules/cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", - "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - } - }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3589,11 +3345,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/devtools-protocol": { - "version": "0.0.1107588", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz", - "integrity": "sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==" - }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -3645,15 +3396,6 @@ "node": ">=6.0.0" } }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/dset": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.3.tgz", @@ -3704,6 +3446,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "optional": true, "dependencies": { "once": "^1.4.0" } @@ -3719,19 +3462,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/error-ex/node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - }, "node_modules/es-module-lexer": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz", @@ -4233,39 +3963,6 @@ "node": ">=0.10.0" } }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4313,14 +4010,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dependencies": { - "pend": "~1.2.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4434,7 +4123,8 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "optional": true }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -4475,6 +4165,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -4813,15 +4504,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/header-case": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", - "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", - "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", @@ -4856,18 +4538,6 @@ "node": ">= 0.8" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/human-signals": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", @@ -4908,6 +4578,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -5289,11 +4960,6 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -5516,14 +5182,6 @@ "get-func-name": "^2.0.1" } }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dependencies": { - "tslib": "^2.0.3" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -6430,15 +6088,11 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==" - }, "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "optional": true }, "node_modules/mlly": { "version": "1.6.1", @@ -6514,15 +6168,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, "node_modules/node-abi": { "version": "3.60.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.60.0.tgz", @@ -6541,25 +6186,6 @@ "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", "optional": true }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", @@ -6637,6 +6263,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "devOptional": true, "dependencies": { "wrappy": "1" } @@ -6808,19 +6435,11 @@ "node": ">=6" } }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -6828,23 +6447,6 @@ "node": ">=6" } }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/parse-latin": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-5.0.1.tgz", @@ -6870,30 +6472,12 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "dev": true }, - "node_modules/path-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", - "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6956,6 +6540,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, "engines": { "node": ">=8" } @@ -6975,11 +6560,6 @@ "node": "*" } }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -7375,14 +6955,6 @@ "node": ">=6" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -7412,15 +6984,11 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "optional": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -7435,109 +7003,6 @@ "node": ">=6" } }, - "node_modules/puppeteer": { - "version": "19.11.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-19.11.1.tgz", - "integrity": "sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g==", - "deprecated": "< 21.8.0 is no longer supported", - "hasInstallScript": true, - "dependencies": { - "@puppeteer/browsers": "0.5.0", - "cosmiconfig": "8.1.3", - "https-proxy-agent": "5.0.1", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "puppeteer-core": "19.11.1" - } - }, - "node_modules/puppeteer-core": { - "version": "19.11.1", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.11.1.tgz", - "integrity": "sha512-qcuC2Uf0Fwdj9wNtaTZ2OvYRraXpAK+puwwVW8ofOhOgLPZyz1c68tsorfIZyCUOpyBisjr+xByu7BMbEYMepA==", - "dependencies": { - "@puppeteer/browsers": "0.5.0", - "chromium-bidi": "0.4.7", - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.1107588", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "proxy-from-env": "1.1.0", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.13.0" - }, - "engines": { - "node": ">=14.14.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/puppeteer-core/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/puppeteer-core/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/puppeteer-core/node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/puppeteer-core/node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7818,6 +7283,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -7842,6 +7308,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "engines": { "node": ">=4" } @@ -8481,16 +7948,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "node_modules/sentence-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", - "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, "node_modules/server-destroy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", @@ -8644,15 +8101,6 @@ "node": ">=8" } }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/source-map-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", @@ -9105,11 +8553,6 @@ "node": ">=0.8" } }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" - }, "node_modules/tinybench": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.7.0.tgz", @@ -9161,11 +8604,6 @@ "node": ">=0.6" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -9223,7 +8661,8 @@ "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -9308,38 +8747,6 @@ "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.5.3.tgz", "integrity": "sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==" }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "node_modules/unbzip2-stream/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -9526,22 +8933,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/upper-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", - "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/upper-case-first": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", - "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", - "dependencies": { - "tslib": "^2.0.3" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -10344,20 +9735,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -10578,32 +9955,14 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "devOptional": true }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "engines": { "node": ">=10" } @@ -10691,15 +10050,6 @@ "node": ">=8" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, "node_modules/yocto-queue": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", diff --git a/front/package.json b/front/package.json index ba65761..f4cfa5b 100644 --- a/front/package.json +++ b/front/package.json @@ -3,7 +3,6 @@ "type": "module", "version": "0.0.1", "private": "true", - "private": "true", "scripts": { "dev": "astro dev", "start": "node ./dist/server/entry.mjs", @@ -28,10 +27,11 @@ "react-leaflet": "^4.2.1", "simple-icons-astro": "^11.12.0", "tailwindcss": "^3.4.3", - "typescript": "^5.2.2" + "typescript": "^5" }, "devDependencies": { "@astrojs/check": "^0", + "@astrojs/ts-plugin": "^1.6.1", "@types/leaflet": "^1.9.12", "@types/node": "^20", "@typescript-eslint/eslint-plugin": "^6.21.0", -- 2.47.1 From 55740b6219a29185bcb7db0499f20f78c4902a2c Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 10:44:16 +0200 Subject: [PATCH 18/34] fix error issue --- front/src/libs/AuthUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/libs/AuthUtils.ts b/front/src/libs/AuthUtils.ts index 4ddc672..c8f8125 100644 --- a/front/src/libs/AuthUtils.ts +++ b/front/src/libs/AuthUtils.ts @@ -4,7 +4,7 @@ import PocketBase from 'pocketbase' import { getEnv } from 'libs/Env' -const pb = new PocketBase(getEnv('POCKET_BASE','https://pb-tweb.cb85.fr')) // XXX: 'https://pb-tweb.cb85.fr' +const pb = new PocketBase(getEnv('POCKETBASE_URL','https://pb-tweb.cb85.fr')) // XXX: 'https://pb-tweb.cb85.fr' export async function clearUser(cookies: AstroCookies): Promise { const sessionID = cookies.get('session')?.value @@ -74,7 +74,7 @@ export async function getUser(cookies: AstroCookies): Promise { emailVisibility: false, name: bpAuth.model.name as string, password: undefined, - passwordConfirm: undefined + passwordConfirm: undefined, } return output -- 2.47.1 From 063660db9dea3e943f1ce3b602933808639a214c Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 10:46:26 +0200 Subject: [PATCH 19/34] fix userObj type --- front/src/models/User/index.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/front/src/models/User/index.ts b/front/src/models/User/index.ts index 1bae64b..1f5e6d2 100644 --- a/front/src/models/User/index.ts +++ b/front/src/models/User/index.ts @@ -1,19 +1,19 @@ export interface PBData{ - id: string | null - collectionId: string | null - collectionName: string | null - created: string | null // TODO: passé ca en date auto - updated: string | null // TODO: passé ca en date auto + id?: string | null + collectionId?: string | null + collectionName?: string | null + created?: string | null // TODO: passé ca en date auto + updated?: string | null // TODO: passé ca en date auto } export default interface UserObj extends PBData{ - avatar: string | null + avatar?: string | null username: string email: string - emailVisibility: false - password: string | undefined - passwordConfirm: string | undefined + emailVisibility?: boolean + password?: string | undefined + passwordConfirm?: string | undefined name: string | null } -- 2.47.1 From 7a510a53a17a3024fe98383cfd7e2146f1f4f8e1 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 10:46:35 +0200 Subject: [PATCH 20/34] rm email visibility --- front/src/pages/account/register.astro | 1 - 1 file changed, 1 deletion(-) diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index a75c80c..3fa79b1 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -23,7 +23,6 @@ const res = await AstroUtils.wrap(async () => { email: form.get("email") as string, password: form.get("password") as string, passwordConfirm: form.get("passwordConfirm") as string, - emailVisibility: false } await setUser(Astro.cookies, request); -- 2.47.1 From 06bdeff18844ec2a286b9d6f4af78614d7ec4ece Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 14:18:46 +0200 Subject: [PATCH 21/34] add PB middleware --- front/src/env.d.ts | 14 ++++++++++++++ front/src/middleware/index.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 front/src/middleware/index.ts diff --git a/front/src/env.d.ts b/front/src/env.d.ts index 0a69926..d858407 100644 --- a/front/src/env.d.ts +++ b/front/src/env.d.ts @@ -1,11 +1,25 @@ +/// +/// +import PocketBase from 'pocketbase' export interface ImportMetaEnv { NODE_ENV: string APP_URL: string POCKETBASE_URL: string + + GOOGLE_API_KEY: string } interface ImportMeta { readonly env: ImportMetaEnv } + + +// eslint-disable-next-line @typescript-eslint/no-namespace +declare namespace App { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface Locals { + pb: PocketBase + } +} diff --git a/front/src/middleware/index.ts b/front/src/middleware/index.ts new file mode 100644 index 0000000..89e6322 --- /dev/null +++ b/front/src/middleware/index.ts @@ -0,0 +1,27 @@ +import PocketBase from 'pocketbase' + +import { defineMiddleware } from 'astro/middleware' +import { getEnv } from 'libs/Env' + +export const onRequest = defineMiddleware(async ({ locals, request }: any, next: () => any) => { + locals.pb = new PocketBase(getEnv('POCKETBASE_URL','http://localhost:8080')) + + // load the store data from the request cookie string + locals.pb.authStore.loadFromCookie(request.headers.get('cookie') || '') + + try { + // get an up-to-date auth store state by verifying and refreshing the loaded auth model (if any) + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + locals.pb.authStore.isValid && await locals.pb.collection('users').authRefresh() + } catch (_) { + // clear the auth store on failed refresh + locals.pb.authStore.clear() + } + + const response = await next() + + // send back the default 'pb_auth' cookie to the client with the latest store state + response.headers.append('set-cookie', locals.pb.authStore.exportToCookie()) + + return response +}) -- 2.47.1 From 02e84ed9d66d23cb688576c2a122d8b2938af3c0 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 16:00:53 +0200 Subject: [PATCH 22/34] login okay --- front/src/pages/account/index.astro | 12 +++++++----- front/src/pages/account/login.astro | 24 ++++++++++++++---------- front/src/pages/account/register.astro | 26 ++++++++++++++------------ 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/front/src/pages/account/index.astro b/front/src/pages/account/index.astro index 4b1e795..fbb2ced 100644 --- a/front/src/pages/account/index.astro +++ b/front/src/pages/account/index.astro @@ -1,16 +1,18 @@ --- -import Layout from 'layouts/Layout.astro'; -import { getUser } from 'libs/AuthUtils'; +import Layout from 'layouts/Layout.astro' +import PocketBase from 'pocketbase' -const user = await getUser(Astro.cookies); +const pb = Astro.locals.pb as PocketBase +const auth = pb.authStore +const user = auth.model -if(!user){ +if(!auth.isValid){ return Astro.redirect("/account/login"); } --- -

Bonjour {user.name}

+

Bonjour {user!.name}

diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index d8251eb..9ad54b0 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -1,29 +1,33 @@ --- -import Layout from "../../layouts/Layout.astro"; -import PocketBase from 'pocketbase'; -import AstroUtils from "../../libs/AstroUtils"; -import { getUser, login } from "libs/AuthUtils"; +import Layout from "layouts/Layout.astro"; +import AstroUtils from "libs/AstroUtils"; +import PocketBase from 'pocketbase' +const pb = Astro.locals.pb as PocketBase -const usr = await getUser(Astro.cookies) -if (usr) { - // return Astro.redirect(route('/', {message: 'Vous êtes déjà connecté !'})) +if(pb.authStore.isValid){ + return Astro.redirect("/account") } - const res = await AstroUtils.wrap(async () => { if (Astro.request.method !== 'POST') { return } + // FIXME checké si utilisateur deja connecté + const locals = Astro.locals + const form = await Astro.request.formData(); const request = { user: form.get("username") as string, password: form.get("password") as string } - - await login(Astro.cookies, request) + try { + await locals.pb.collection('users').authWithPassword(request.user,request.password); + } catch (error) { + console.log(error) + } return Astro.redirect("/account") diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index 3fa79b1..f016d0f 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -1,18 +1,16 @@ --- -import PocketBase from 'pocketbase'; -import Layout from '../../layouts/Layout.astro'; -import AstroUtils from '../../libs/AstroUtils'; -import { getUser, setUser } from 'libs/AuthUtils'; -import type UserObj from 'models/User'; +import Layout from 'layouts/Layout.astro'; +import AstroUtils from 'libs/AstroUtils'; +import PocketBase from 'pocketbase' -const connected = await getUser(Astro.cookies) -if(connected) { - return Astro.redirect(route('/')) +const pb = Astro.locals.pb as PocketBase + +if(pb.authStore.isValid){ + return Astro.redirect("/account") } - -const res = await AstroUtils.wrap(async () => { +await AstroUtils.wrap(async () => { if (Astro.request.method !== 'POST'){ return } @@ -24,8 +22,12 @@ const res = await AstroUtils.wrap(async () => { password: form.get("password") as string, passwordConfirm: form.get("passwordConfirm") as string, } - await setUser(Astro.cookies, request); - + try{ + await pb.collection('users').create(request) + return Astro.redirect('account/login') + }catch(e){ + console.log(e); + } }) --- -- 2.47.1 From 5f642a6aa0f16ad30d7815438ece311d165ab264 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 16:25:04 +0200 Subject: [PATCH 23/34] feat/ login on est pas mal --- front/src/pages/account/index.astro | 3 +++ front/src/pages/account/login.astro | 6 ++---- front/src/pages/account/logout.astro | 13 +++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 front/src/pages/account/logout.astro diff --git a/front/src/pages/account/index.astro b/front/src/pages/account/index.astro index fbb2ced..39a434b 100644 --- a/front/src/pages/account/index.astro +++ b/front/src/pages/account/index.astro @@ -15,4 +15,7 @@ if(!auth.isValid){

Bonjour {user!.name}

+
diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index 9ad54b0..6f3cd39 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -24,13 +24,11 @@ const res = await AstroUtils.wrap(async () => { } try { - await locals.pb.collection('users').authWithPassword(request.user,request.password); + pb.collection('users').authWithPassword(request.user,request.password); + return Astro.redirect("/account") } catch (error) { console.log(error) } - - return Astro.redirect("/account") - }) --- diff --git a/front/src/pages/account/logout.astro b/front/src/pages/account/logout.astro new file mode 100644 index 0000000..28472f1 --- /dev/null +++ b/front/src/pages/account/logout.astro @@ -0,0 +1,13 @@ +--- +import PocketBase from 'pocketbase' + + +const pb = Astro.locals.pb as PocketBase + +if(pb.authStore.isValid){ + pb.authStore.clear() +} + +return Astro.redirect('/account/login') + +--- \ No newline at end of file -- 2.47.1 From 2b11a223cdfdacdaa82632df67209bf7e2a85b52 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 16:33:05 +0200 Subject: [PATCH 24/34] rm auth util --- front/src/libs/AuthUtils.ts | 107 ------------------------------------ 1 file changed, 107 deletions(-) delete mode 100644 front/src/libs/AuthUtils.ts diff --git a/front/src/libs/AuthUtils.ts b/front/src/libs/AuthUtils.ts deleted file mode 100644 index c8f8125..0000000 --- a/front/src/libs/AuthUtils.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { AstroCookies } from 'astro' -import type UserObj from 'models/User' -import PocketBase from 'pocketbase' -import { getEnv } from 'libs/Env' - - -const pb = new PocketBase(getEnv('POCKETBASE_URL','https://pb-tweb.cb85.fr')) // XXX: 'https://pb-tweb.cb85.fr' - -export async function clearUser(cookies: AstroCookies): Promise { - const sessionID = cookies.get('session')?.value - - if(!sessionID){ - return - } - - cookies.delete('session',{ - path: '/' - }) -} - -export async function login(cookies: AstroCookies, user: {user: string, password: string}): Promise { - - const authData = await pb.collection('users').authWithPassword(user.user, user.password) - - let secure = true - - if (getEnv('NODE_ENV', 'production') !== 'production') { - secure = false - } - - if(authData){ - cookies.set('session', authData.token,{ - httpOnly: true, - path: '/', - secure: secure, - sameSite: 'strict', - maxAge: 365000, - }) - return true - } - return false -} - -export async function getUser(cookies: AstroCookies): Promise { - const sessionID = cookies.get('session')?.value - - const bpAuth = pb.authStore - - if(!sessionID){ - return null - } - if(!bpAuth.isValid){ - return null - } - if(!bpAuth){ - return null - } - - console.log(bpAuth.model) - - if(!bpAuth.model){ - return null - } - - const output: UserObj = { - id: bpAuth.model.id as string, - collectionId: bpAuth.model.collectionId as string, - collectionName: bpAuth.model.collectionName as string, - created: bpAuth.model.created as string, - updated: bpAuth.model.updated as string, - avatar: bpAuth.model.avatar as string, - username: bpAuth.model.username as string, - email: bpAuth.model.email as string, - emailVisibility: false, - name: bpAuth.model.name as string, - password: undefined, - passwordConfirm: undefined, - } - - return output - -} - -export async function setUser(cookies: AstroCookies, user: UserObj): Promise{ - - const record = await pb.collection('users').create(user) - - console.log(record) - - const session = pb.authStore.token - - console.log(session) - - let secure = true - - if (getEnv('NODE_ENV', 'production') !== 'production') { - secure = false - } - - cookies.set('session', session,{ - httpOnly: true, - path: '/', - secure: secure, - sameSite: 'strict', - maxAge: 365000, - }) -} -- 2.47.1 From 41ed28532682d75380ea6392fc9ce5c1b97d3404 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 16:34:36 +0200 Subject: [PATCH 25/34] rm user model --- front/src/models/User/index.ts | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 front/src/models/User/index.ts diff --git a/front/src/models/User/index.ts b/front/src/models/User/index.ts deleted file mode 100644 index 1f5e6d2..0000000 --- a/front/src/models/User/index.ts +++ /dev/null @@ -1,19 +0,0 @@ - - -export interface PBData{ - id?: string | null - collectionId?: string | null - collectionName?: string | null - created?: string | null // TODO: passé ca en date auto - updated?: string | null // TODO: passé ca en date auto -} - -export default interface UserObj extends PBData{ - avatar?: string | null - username: string - email: string - emailVisibility?: boolean - password?: string | undefined - passwordConfirm?: string | undefined - name: string | null -} -- 2.47.1 From 9a4357394ac7ff7eac80ac251e8c2bae0147071d Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 26 Apr 2024 17:05:16 +0200 Subject: [PATCH 26/34] Fix: make locals global --- front/src/env.d.ts | 19 +++++++++++++------ front/src/pages/account/index.astro | 2 +- front/src/pages/account/login.astro | 7 ++----- front/src/pages/account/logout.astro | 2 +- front/src/pages/account/register.astro | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/front/src/env.d.ts b/front/src/env.d.ts index d858407..d0ad1e8 100644 --- a/front/src/env.d.ts +++ b/front/src/env.d.ts @@ -16,10 +16,17 @@ interface ImportMeta { } -// eslint-disable-next-line @typescript-eslint/no-namespace -declare namespace App { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - export interface Locals { - pb: PocketBase - } +// declare namespace App { +// interface Locals { +// pb: PocketBase +// } +// } + + +declare global { + namespace App { + interface Locals { + pb: PocketBase + } + } } diff --git a/front/src/pages/account/index.astro b/front/src/pages/account/index.astro index 39a434b..84f7cad 100644 --- a/front/src/pages/account/index.astro +++ b/front/src/pages/account/index.astro @@ -3,7 +3,7 @@ import Layout from 'layouts/Layout.astro' import PocketBase from 'pocketbase' -const pb = Astro.locals.pb as PocketBase +const pb = Astro.locals.pb const auth = pb.authStore const user = auth.model diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index 6f3cd39..4561636 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -4,7 +4,7 @@ import AstroUtils from "libs/AstroUtils"; import PocketBase from 'pocketbase' -const pb = Astro.locals.pb as PocketBase +const pb = Astro.locals.pb if(pb.authStore.isValid){ return Astro.redirect("/account") @@ -13,10 +13,7 @@ if(pb.authStore.isValid){ const res = await AstroUtils.wrap(async () => { if (Astro.request.method !== 'POST') { return - } - // FIXME checké si utilisateur deja connecté - const locals = Astro.locals - + } const form = await Astro.request.formData(); const request = { user: form.get("username") as string, diff --git a/front/src/pages/account/logout.astro b/front/src/pages/account/logout.astro index 28472f1..01eb3ca 100644 --- a/front/src/pages/account/logout.astro +++ b/front/src/pages/account/logout.astro @@ -2,7 +2,7 @@ import PocketBase from 'pocketbase' -const pb = Astro.locals.pb as PocketBase +const pb = Astro.locals.pb if(pb.authStore.isValid){ pb.authStore.clear() diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index f016d0f..51fe66a 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -4,7 +4,7 @@ import AstroUtils from 'libs/AstroUtils'; import PocketBase from 'pocketbase' -const pb = Astro.locals.pb as PocketBase +const pb = Astro.locals.pb if(pb.authStore.isValid){ return Astro.redirect("/account") -- 2.47.1 From f53f19dc934b615c9318ccbe6094ff0f16aa4fdd Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 27 Apr 2024 18:59:52 +0200 Subject: [PATCH 27/34] add some log --- front/src/pages/account/login.astro | 4 +++- front/src/pages/account/register.astro | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/front/src/pages/account/login.astro b/front/src/pages/account/login.astro index 4561636..038e0f4 100644 --- a/front/src/pages/account/login.astro +++ b/front/src/pages/account/login.astro @@ -21,10 +21,12 @@ const res = await AstroUtils.wrap(async () => { } try { - pb.collection('users').authWithPassword(request.user,request.password); + await pb.collection('users').authWithPassword(request.user,request.password); return Astro.redirect("/account") } catch (error) { console.log(error) + console.warn('user password is incorrect') + return Astro.redirect("/account/login");// route('/account/login', {message: 'Compte invalide, valider les identifiants'})) //XXX: comprendre comment le system de route fonctionne } }) --- diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index 51fe66a..b54a454 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -24,7 +24,7 @@ await AstroUtils.wrap(async () => { } try{ await pb.collection('users').create(request) - return Astro.redirect('account/login') + return Astro.redirect('/account/login') }catch(e){ console.log(e); } -- 2.47.1 From 362b0e7af70e17ad8782b495c71332f79ac7577b Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 27 Apr 2024 19:42:49 +0200 Subject: [PATCH 28/34] test 2FA --- front/src/pages/account/register.astro | 53 +++++++++++++++++++------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index b54a454..1a9e67f 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -15,24 +15,34 @@ await AstroUtils.wrap(async () => { return } const form = await Astro.request.formData() - const request = { - username: form.get("username") as string, - name: form.get("name") as string, - email: form.get("email") as string, - password: form.get("password") as string, - passwordConfirm: form.get("passwordConfirm") as string, - } - try{ - await pb.collection('users').create(request) - return Astro.redirect('/account/login') - }catch(e){ - console.log(e); + if(form.get("type") == "userPassword"){ + const request = { + username: form.get("username") as string, + name: form.get("name") as string, + email: form.get("email") as string, + password: form.get("password") as string, + passwordConfirm: form.get("passwordConfirm") as string, + } + try{ + await pb.collection('users').create(request) + return Astro.redirect('/account/login') + }catch(e){ + console.log(e); + } + }else if (form.get("type") == "discord2FA") { + // console.log("pouet") + // await pb.collection('user').authWithOAuth2({provider: 'discord'}) + // console.log("pouetF"); + + }else{ + Astro.redirect("/404") } }) ---
+ @@ -40,4 +50,21 @@ await AstroUtils.wrap(async () => {
-
\ No newline at end of file + +
+ + +
+
+ + \ No newline at end of file -- 2.47.1 From 564a18ea28160359f7a38027c1076ea0d7c82946 Mon Sep 17 00:00:00 2001 From: Clement Date: Sat, 27 Apr 2024 19:43:21 +0200 Subject: [PATCH 29/34] update npm package --- front/package-lock.json | 1432 +++++++++++++++++++++++++++++++++++++++ front/package.json | 1 + 2 files changed, 1433 insertions(+) diff --git a/front/package-lock.json b/front/package-lock.json index 607c8c3..cd5086b 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -35,6 +35,7 @@ "@vitest/coverage-v8": "^1", "eslint": "^8.57.0", "eslint-plugin-astro": "^0.31.4", + "eslint-plugin-jsx-a11y": "^6.8.0", "typescript": "^5", "vitest": "^1" } @@ -581,6 +582,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.24.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", @@ -2295,6 +2308,42 @@ "dequal": "^2.0.3" } }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-iterate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", @@ -2313,6 +2362,64 @@ "node": ">=8" } }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2322,6 +2429,12 @@ "node": "*" } }, + "node_modules/ast-types-flow": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", + "dev": true + }, "node_modules/astro": { "version": "4.5.12", "resolved": "https://registry.npmjs.org/astro/-/astro-4.5.12.tgz", @@ -2525,6 +2638,30 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axe-core": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", + "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/axobject-query": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", @@ -2765,6 +2902,25 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3213,6 +3369,63 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true + }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3283,6 +3496,40 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -3462,11 +3709,169 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-abstract": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz", "integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==" }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/esbuild": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", @@ -3632,6 +4037,73 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz", + "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.23.2", + "aria-query": "^5.3.0", + "array-includes": "^3.1.7", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "=4.7.0", + "axobject-query": "^3.2.1", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "es-iterator-helpers": "^1.0.15", + "hasown": "^2.0.0", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.entries": "^1.1.7", + "object.fromentries": "^2.0.7" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/axobject-query": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", + "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -4085,6 +4557,15 @@ "node": ">=8" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -4153,6 +4634,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4190,6 +4698,25 @@ "node": "*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-stream": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", @@ -4201,6 +4728,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -4252,6 +4796,21 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -4272,6 +4831,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -4317,6 +4888,15 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -4325,6 +4905,57 @@ "node": ">=4" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -4629,12 +5260,69 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "optional": true }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "optional": true }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -4646,6 +5334,22 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", @@ -4668,6 +5372,18 @@ "node": ">=4" } }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", @@ -4679,6 +5395,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-docker": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", @@ -4709,6 +5455,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -4717,6 +5475,21 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4756,6 +5529,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4764,6 +5561,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -4784,6 +5596,49 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", @@ -4795,6 +5650,51 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", @@ -4806,6 +5706,46 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-wsl": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", @@ -4820,6 +5760,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4902,6 +5848,19 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, "node_modules/jackspeak": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", @@ -4989,6 +5948,21 @@ "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", "dev": true }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -5014,6 +5988,24 @@ "node": ">=6" } }, + "node_modules/language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "dev": true + }, + "node_modules/language-tags": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", + "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", + "dev": true, + "dependencies": { + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/leaflet": { "version": "1.9.4", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", @@ -6248,6 +7240,91 @@ "node": ">= 6" } }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -6667,6 +7744,15 @@ "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.21.1.tgz", "integrity": "sha512-0PvCP4pKtxsV9kwldEGyibEvhwOcx9jSCrz3WN5CgPILJfM0z76f1op9WE8/8UgikDsMdRsc5iBLfKintrJS1g==" }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.38", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", @@ -7141,6 +8227,51 @@ "node": ">=8.10.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/rehype": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/rehype/-/rehype-13.0.1.tgz", @@ -7827,6 +8958,24 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -7846,6 +8995,23 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", @@ -7953,6 +9119,38 @@ "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -8008,6 +9206,24 @@ "@shikijs/core": "1.3.0" } }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -8232,6 +9448,55 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/stringify-entities": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", @@ -8708,6 +9973,79 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typesafe-path": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/typesafe-path/-/typesafe-path-0.2.2.tgz", @@ -8747,6 +10085,21 @@ "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.5.3.tgz", "integrity": "sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==" }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -9749,6 +11102,66 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-pm": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.1.1.tgz", @@ -9769,6 +11182,25 @@ "node": ">=4" } }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/why-is-node-running": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", diff --git a/front/package.json b/front/package.json index f4cfa5b..b440d32 100644 --- a/front/package.json +++ b/front/package.json @@ -39,6 +39,7 @@ "@vitest/coverage-v8": "^1", "eslint": "^8.57.0", "eslint-plugin-astro": "^0.31.4", + "eslint-plugin-jsx-a11y": "^6.8.0", "typescript": "^5", "vitest": "^1" } -- 2.47.1 From 56345d9933c727a8c0d54b2478493bef51472f66 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 3 May 2024 10:46:43 +0200 Subject: [PATCH 30/34] sync register change --- front/package-lock.json | 47 ++++++++++++++++++++++++++ front/package.json | 1 + front/src/pages/account/register.astro | 19 +++++++---- 3 files changed, 60 insertions(+), 7 deletions(-) diff --git a/front/package-lock.json b/front/package-lock.json index cd5086b..9c76a0f 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -15,6 +15,7 @@ "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "astro": "4.5.12", + "cross-fetch": "^4.0.0", "leaflet": "^1.9.4", "lucide-astro": "^0.372.0", "pocketbase": "^0.21.1", @@ -3340,6 +3341,14 @@ "node": ">= 0.6" } }, + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -7178,6 +7187,25 @@ "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", "optional": true }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", @@ -9869,6 +9897,11 @@ "node": ">=0.6" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -11088,6 +11121,20 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/front/package.json b/front/package.json index b440d32..4642098 100644 --- a/front/package.json +++ b/front/package.json @@ -19,6 +19,7 @@ "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "astro": "4.5.12", + "cross-fetch": "^4.0.0", "leaflet": "^1.9.4", "lucide-astro": "^0.372.0", "pocketbase": "^0.21.1", diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index 1a9e67f..70d2ebb 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -1,11 +1,11 @@ --- import Layout from 'layouts/Layout.astro'; import AstroUtils from 'libs/AstroUtils'; -import PocketBase from 'pocketbase' - const pb = Astro.locals.pb +const oauths = await pb.collection('users').listAuthMethods(); + if(pb.authStore.isValid){ return Astro.redirect("/account") } @@ -51,20 +51,25 @@ await AstroUtils.wrap(async () => { +
-
+ discord? \ No newline at end of file -- 2.47.1 From f863a918bfd1bc295fc09889513a968aaab10bec Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 3 May 2024 10:50:51 +0200 Subject: [PATCH 31/34] update bruno test --- bruno/OpenData datatourisme/Google API.bru | 30 +++++++++++++++++++ .../environments/dev.bru | 3 +- .../list oaut methode.bru | 11 +++++++ bruno/OpenData datatourisme/oauth test.bru | 18 +++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 bruno/OpenData datatourisme/Google API.bru create mode 100644 bruno/OpenData datatourisme/list oaut methode.bru create mode 100644 bruno/OpenData datatourisme/oauth test.bru diff --git a/bruno/OpenData datatourisme/Google API.bru b/bruno/OpenData datatourisme/Google API.bru new file mode 100644 index 0000000..189895a --- /dev/null +++ b/bruno/OpenData datatourisme/Google API.bru @@ -0,0 +1,30 @@ +meta { + name: Google API + type: http + seq: 3 +} + +post { + url: https://places.googleapis.com/v1/places:searchNearby + body: json + auth: none +} + +headers { + X-Goog-Api-Key: {{GOOGLE_API_KEY}} +} + +body:json { + { + "includedTypes": ["restaurant"], + "maxResultCount": 10, + "locationRestriction": { + "circle": { + "center": { + "latitude": 37.7937, + "longitude": -122.3965}, + "radius": 500.0 + } + } + } +} diff --git a/bruno/OpenData datatourisme/environments/dev.bru b/bruno/OpenData datatourisme/environments/dev.bru index e9ed20c..47ad763 100644 --- a/bruno/OpenData datatourisme/environments/dev.bru +++ b/bruno/OpenData datatourisme/environments/dev.bru @@ -1,3 +1,4 @@ vars:secret [ - app_key + app_key, + GOOGLE_API_KEY ] diff --git a/bruno/OpenData datatourisme/list oaut methode.bru b/bruno/OpenData datatourisme/list oaut methode.bru new file mode 100644 index 0000000..f7f7b17 --- /dev/null +++ b/bruno/OpenData datatourisme/list oaut methode.bru @@ -0,0 +1,11 @@ +meta { + name: list oaut methode + type: http + seq: 5 +} + +get { + url: https://pb-tweb.cb85.fr/api/collections/users/auth-methods + body: none + auth: none +} diff --git a/bruno/OpenData datatourisme/oauth test.bru b/bruno/OpenData datatourisme/oauth test.bru new file mode 100644 index 0000000..50421b2 --- /dev/null +++ b/bruno/OpenData datatourisme/oauth test.bru @@ -0,0 +1,18 @@ +meta { + name: oauth test + type: http + seq: 4 +} + +post { + url: https://pb-tweb.cb85.fr/api/collections/users/auth-with-oauth2 + body: json + auth: none +} + +body:json { + { + provider: "google" + + } +} -- 2.47.1 From 509a19f0c9cfce74f41f98782f2301cb12459e1e Mon Sep 17 00:00:00 2001 From: Clement Date: Wed, 15 May 2024 23:43:55 +0200 Subject: [PATCH 32/34] Oauth OK --- front/src/middleware/index.ts | 20 ++++-- front/src/pages/account/oauth.astro | 97 ++++++++++++++++++++++++++ front/src/pages/account/register.astro | 36 +++++----- 3 files changed, 132 insertions(+), 21 deletions(-) create mode 100644 front/src/pages/account/oauth.astro diff --git a/front/src/middleware/index.ts b/front/src/middleware/index.ts index 89e6322..03f8253 100644 --- a/front/src/middleware/index.ts +++ b/front/src/middleware/index.ts @@ -3,11 +3,12 @@ import PocketBase from 'pocketbase' import { defineMiddleware } from 'astro/middleware' import { getEnv } from 'libs/Env' -export const onRequest = defineMiddleware(async ({ locals, request }: any, next: () => any) => { +export const onRequest = defineMiddleware(async ({ locals, cookies}, next) => { locals.pb = new PocketBase(getEnv('POCKETBASE_URL','http://localhost:8080')) // load the store data from the request cookie string - locals.pb.authStore.loadFromCookie(request.headers.get('cookie') || '') + const pbcookie = cookies.get('session')?.value + locals.pb.authStore.loadFromCookie('pb_auth=' + pbcookie || '') try { // get an up-to-date auth store state by verifying and refreshing the loaded auth model (if any) @@ -20,8 +21,19 @@ export const onRequest = defineMiddleware(async ({ locals, request }: any, next: const response = await next() - // send back the default 'pb_auth' cookie to the client with the latest store state - response.headers.append('set-cookie', locals.pb.authStore.exportToCookie()) + let secure = true + if (getEnv('NODE_ENV', 'production') !== 'production') { + secure = false + } + const pbcookieStr = locals.pb.authStore.exportToCookie() + + cookies.set('session',pbcookieStr.slice(pbcookieStr.indexOf('=')+1,pbcookieStr.indexOf(';')),{ + httpOnly: true, + path: '/', + secure: secure, + sameSite: 'lax', + maxAge: 365000 + }) return response }) diff --git a/front/src/pages/account/oauth.astro b/front/src/pages/account/oauth.astro new file mode 100644 index 0000000..bd0df8d --- /dev/null +++ b/front/src/pages/account/oauth.astro @@ -0,0 +1,97 @@ +--- + +const pb = Astro.locals.pb +const redirectUrl = Astro.url.protocol + "//" + Astro.url.host + '/account/oauth'; + +console.log(redirectUrl) + +const params = Astro.url.searchParams + +const code = params.get('code') + +console.log(Astro.request.headers.get('cookie')) +//TODO socké dans les cookies +// load the previously stored provider's data +const providerstr = Astro.cookies.get('provider') + +if (!providerstr) { + console.error("Fail to load provider") + console.log(providerstr) + return +} +const provider = providerstr.json() + +if (!code) { + console.error("Fail to load code params"); + return +} + +// compare the redirect's state param and the stored provider's one +if (provider.state !== params.get('state')) { + throw "State parameters don't match."; +} + +pb.collection('users').authWithOAuth2Code( + provider.name, + code, + provider.codeVerifier, + redirectUrl, + // pass optional user create data + { + emailVisibility: false, + } +).then((authData) => { + //REDIRECT + console.log("oauth OK !!"); + console.log(JSON.stringify(authData, null, 2)); +}).catch((err) => { + console.log("oauth fail !!"); + console.log(err); +}); + +--- + + + + + + + OAuth2 redirect page + + +
Authenticating...
+ + + + + \ No newline at end of file diff --git a/front/src/pages/account/register.astro b/front/src/pages/account/register.astro index 70d2ebb..2c57d4f 100644 --- a/front/src/pages/account/register.astro +++ b/front/src/pages/account/register.astro @@ -1,11 +1,28 @@ --- import Layout from 'layouts/Layout.astro'; import AstroUtils from 'libs/AstroUtils'; +import { getEnv } from 'libs/Env'; const pb = Astro.locals.pb const oauths = await pb.collection('users').listAuthMethods(); + +console.log(JSON.stringify(oauths.authProviders[0])); + +let secure = true +if (getEnv('NODE_ENV', 'production') !== 'production') { + secure = false +} + +Astro.cookies.set('provider', oauths.authProviders[0],{ + httpOnly: true, + path: '/', + secure: secure, + sameSite: 'lax', + maxAge: 365000 + }) + if(pb.authStore.isValid){ return Astro.redirect("/account") } @@ -55,21 +72,6 @@ await AstroUtils.wrap(async () => {
- discord? + discord? - - \ No newline at end of file + \ No newline at end of file -- 2.47.1 From ee732dc7223e9403e30768cc94055af432bdf7fc Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 16 May 2024 09:41:20 +0200 Subject: [PATCH 33/34] rm some package from package.json --- front/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/front/package.json b/front/package.json index 4642098..3ed30b1 100644 --- a/front/package.json +++ b/front/package.json @@ -19,13 +19,11 @@ "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "astro": "4.5.12", - "cross-fetch": "^4.0.0", "leaflet": "^1.9.4", "lucide-astro": "^0.372.0", "pocketbase": "^0.21.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-leaflet": "^4.2.1", "simple-icons-astro": "^11.12.0", "tailwindcss": "^3.4.3", "typescript": "^5" -- 2.47.1 From d8fc85ca5eafb5bac6cd0fdbecc6116127a2bec9 Mon Sep 17 00:00:00 2001 From: Clement Date: Thu, 16 May 2024 09:41:56 +0200 Subject: [PATCH 34/34] feat: MAP WORKING --- front/src/pages/maps.astro | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/front/src/pages/maps.astro b/front/src/pages/maps.astro index 1675880..f1e59aa 100644 --- a/front/src/pages/maps.astro +++ b/front/src/pages/maps.astro @@ -1,17 +1,26 @@ --- import Layout from 'layouts/Layout.astro'; -import { Marker, Popup } from 'leaflet'; -import { MapContainer } from 'react-leaflet' +import 'leaflet/dist/leaflet.css' --- - - - - A pretty CSS3 popup.
Easily customizable. -
-
-
+
+ + + \ No newline at end of file -- 2.47.1