From 675cb024d92166299c27c1ea3e19dd6185e1b580 Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Sat, 20 Aug 2022 19:36:21 +0200 Subject: [PATCH] Migrate to latest Svelte Kit. --- package-lock.json | 786 ++++++++++++------ package.json | 3 +- src/{app.css => app.postcss} | 0 src/hooks.ts | 10 +- src/lib/legal.ts | 40 + src/lib/summaries.ts | 6 +- src/routes/+layout.server.ts | 7 + src/routes/+layout.svelte | 23 + src/routes/{index.svelte => +page.svelte} | 13 +- src/routes/__layout.svelte | 131 --- .../article/{index.ts => +page.server.ts} | 21 +- .../article/{index.svelte => +page.svelte} | 32 +- src/routes/article/[id].svelte | 38 - src/routes/article/[id].ts | 21 - src/routes/article/[id]/+page.server.ts | 20 + src/routes/article/[id]/+page.svelte | 33 + .../{index.ts => +page.server.ts} | 21 +- .../{index.svelte => +page.svelte} | 32 +- src/routes/dossier_legislatif/[id].svelte | 43 - .../{[id].ts => [id]/+page.server.ts} | 13 +- .../dossier_legislatif/[id]/+page.svelte | 37 + src/routes/id/{index.ts => +page.server.ts} | 21 +- src/routes/id/{index.svelte => +page.svelte} | 32 +- src/routes/id/[...eli].svelte | 39 - src/routes/id/[...eli].ts | 21 - src/routes/id/[...eli]/+page.server.ts | 20 + src/routes/id/[...eli]/+page.svelte | 33 + src/routes/idcc/{index.ts => +page.server.ts} | 21 +- .../idcc/{index.svelte => +page.svelte} | 32 +- src/routes/idcc/[id].svelte | 35 - src/routes/idcc/[id].ts | 21 - src/routes/idcc/[id]/+page.server.ts | 20 + src/routes/idcc/[id]/+page.svelte | 30 + src/routes/jo/{index.ts => +page.server.ts} | 21 +- src/routes/jo/{index.svelte => +page.svelte} | 32 +- src/routes/jo/[id].svelte | 35 - src/routes/jo/[id].ts | 21 - src/routes/jo/[id]/+page.server.ts | 20 + src/routes/jo/[id]/+page.svelte | 30 + .../recherche/{index.ts => +page.server.ts} | 23 +- .../recherche/{index.svelte => +page.svelte} | 15 +- .../section_ta/{index.ts => +page.server.ts} | 21 +- .../section_ta/{index.svelte => +page.svelte} | 32 +- src/routes/section_ta/[id].svelte | 43 - .../{[id].ts => [id]/+page.server.ts} | 13 +- src/routes/section_ta/[id]/+page.svelte | 37 + .../{index.ts => +page.server.ts} | 21 +- .../{index.svelte => +page.svelte} | 32 +- src/routes/texte_version/[id].svelte | 43 - .../{[id].ts => [id]/+page.server.ts} | 13 +- src/routes/texte_version/[id]/+page.svelte | 37 + .../textekali/{index.ts => +page.server.ts} | 21 +- .../textekali/{index.svelte => +page.svelte} | 36 +- src/routes/textekali/[id].svelte | 42 - .../{[id].ts => [id]/+page.server.ts} | 13 +- src/routes/textekali/[id]/+page.svelte | 37 + .../textelr/{index.ts => +page.server.ts} | 21 +- .../textelr/{index.svelte => +page.svelte} | 32 +- src/routes/textelr/[id].svelte | 38 - src/routes/textelr/[id].ts | 21 - src/routes/textelr/[id]/+page.server.ts | 20 + src/routes/textelr/[id]/+page.svelte | 33 + .../versions/{index.ts => +page.server.ts} | 21 +- .../versions/{index.svelte => +page.svelte} | 32 +- src/routes/versions/[...eli].svelte | 43 - .../{[...eli].ts => [...eli]/+page.server.ts} | 13 +- src/routes/versions/[...eli]/+page.svelte | 37 + tailwind.config.cjs | 1 + 68 files changed, 1316 insertions(+), 1289 deletions(-) rename src/{app.css => app.postcss} (100%) create mode 100644 src/routes/+layout.server.ts create mode 100644 src/routes/+layout.svelte rename src/routes/{index.svelte => +page.svelte} (81%) delete mode 100644 src/routes/__layout.svelte rename src/routes/article/{index.ts => +page.server.ts} (79%) rename src/routes/article/{index.svelte => +page.svelte} (73%) delete mode 100644 src/routes/article/[id].svelte delete mode 100644 src/routes/article/[id].ts create mode 100644 src/routes/article/[id]/+page.server.ts create mode 100644 src/routes/article/[id]/+page.svelte rename src/routes/dossier_legislatif/{index.ts => +page.server.ts} (79%) rename src/routes/dossier_legislatif/{index.svelte => +page.svelte} (69%) delete mode 100644 src/routes/dossier_legislatif/[id].svelte rename src/routes/dossier_legislatif/{[id].ts => [id]/+page.server.ts} (52%) create mode 100644 src/routes/dossier_legislatif/[id]/+page.svelte rename src/routes/id/{index.ts => +page.server.ts} (79%) rename src/routes/id/{index.svelte => +page.svelte} (72%) delete mode 100644 src/routes/id/[...eli].svelte delete mode 100644 src/routes/id/[...eli].ts create mode 100644 src/routes/id/[...eli]/+page.server.ts create mode 100644 src/routes/id/[...eli]/+page.svelte rename src/routes/idcc/{index.ts => +page.server.ts} (79%) rename src/routes/idcc/{index.svelte => +page.svelte} (73%) delete mode 100644 src/routes/idcc/[id].svelte delete mode 100644 src/routes/idcc/[id].ts create mode 100644 src/routes/idcc/[id]/+page.server.ts create mode 100644 src/routes/idcc/[id]/+page.svelte rename src/routes/jo/{index.ts => +page.server.ts} (79%) rename src/routes/jo/{index.svelte => +page.svelte} (74%) delete mode 100644 src/routes/jo/[id].svelte delete mode 100644 src/routes/jo/[id].ts create mode 100644 src/routes/jo/[id]/+page.server.ts create mode 100644 src/routes/jo/[id]/+page.svelte rename src/routes/recherche/{index.ts => +page.server.ts} (83%) rename src/routes/recherche/{index.svelte => +page.svelte} (81%) rename src/routes/section_ta/{index.ts => +page.server.ts} (79%) rename src/routes/section_ta/{index.svelte => +page.svelte} (71%) delete mode 100644 src/routes/section_ta/[id].svelte rename src/routes/section_ta/{[id].ts => [id]/+page.server.ts} (50%) create mode 100644 src/routes/section_ta/[id]/+page.svelte rename src/routes/texte_version/{index.ts => +page.server.ts} (79%) rename src/routes/texte_version/{index.svelte => +page.svelte} (70%) delete mode 100644 src/routes/texte_version/[id].svelte rename src/routes/texte_version/{[id].ts => [id]/+page.server.ts} (51%) create mode 100644 src/routes/texte_version/[id]/+page.svelte rename src/routes/textekali/{index.ts => +page.server.ts} (79%) rename src/routes/textekali/{index.svelte => +page.svelte} (71%) delete mode 100644 src/routes/textekali/[id].svelte rename src/routes/textekali/{[id].ts => [id]/+page.server.ts} (50%) create mode 100644 src/routes/textekali/[id]/+page.svelte rename src/routes/textelr/{index.ts => +page.server.ts} (79%) rename src/routes/textelr/{index.svelte => +page.svelte} (72%) delete mode 100644 src/routes/textelr/[id].svelte delete mode 100644 src/routes/textelr/[id].ts create mode 100644 src/routes/textelr/[id]/+page.server.ts create mode 100644 src/routes/textelr/[id]/+page.svelte rename src/routes/versions/{index.ts => +page.server.ts} (79%) rename src/routes/versions/{index.svelte => +page.svelte} (71%) delete mode 100644 src/routes/versions/[...eli].svelte rename src/routes/versions/{[...eli].ts => [...eli]/+page.server.ts} (50%) create mode 100644 src/routes/versions/[...eli]/+page.svelte diff --git a/package-lock.json b/package-lock.json index 5f9d979..8d83618 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,8 +14,9 @@ "@iconify/svelte": "^2.2.1", "@playwright/test": "^1.22.2", "@sveltejs/adapter-node": "^1.0.0-next.86", - "@sveltejs/kit": "next", + "@sveltejs/kit": "^1.0.0-next.427", "@tailwindcss/typography": "^0.5.3", + "@tricoteuses/explorer-tools": "^0.1.4", "@types/fs-extra": "^9.0.13", "@types/he": "^1.1.2", "@typescript-eslint/eslint-plugin": "^5.27.0", @@ -123,9 +124,9 @@ "dev": true }, "node_modules/@iconify-icons/codicon": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/@iconify-icons/codicon/-/codicon-1.2.15.tgz", - "integrity": "sha512-CrRvt+0kKM6LVWNFErvWFOZEFwRPnvW2HLpIab148WNECXfNgVdTYhZRwtClNq59pEZ13cv0lg+cQm/ZDGlm+w==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@iconify-icons/codicon/-/codicon-1.2.16.tgz", + "integrity": "sha512-85rBsFEhhq2qSBfIEF0hzUk31i4GjeRzNyd0DZGFWo5v+PgAeTBiv8ftsTDf8d2fxy9F5kesT/R7bOtRy1xKmw==", "dev": true, "dependencies": { "@iconify/types": "*" @@ -162,9 +163,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -207,13 +208,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.24.2.tgz", - "integrity": "sha512-Q4X224pRHw4Dtkk5PoNJplZCokLNvVbXD9wDQEMrHcEuvWpJWEQDeJ9gEwkZ3iCWSFSWBshIX177B231XW4wOQ==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.25.0.tgz", + "integrity": "sha512-j4EZhTTQI3dBeWblE21EV//swwmBtOpIrLdOIJIRv4uqsLdHgBg1z+JtTg+AeC5o2bAXIE26kDNW5A0TimG8Bg==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.24.2" + "playwright-core": "1.25.0" }, "bin": { "playwright": "cli.js" @@ -222,6 +223,12 @@ "node": ">=14" } }, + "node_modules/@polka/url": { + "version": "1.0.0-next.21", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", + "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", + "dev": true + }, "node_modules/@rollup/pluginutils": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", @@ -242,16 +249,24 @@ "dev": true }, "node_modules/@sveltejs/kit": { - "version": "1.0.0-next.405", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.405.tgz", - "integrity": "sha512-jHSa74F7k+hC+0fof75g/xm/+1M5sM66Qt6v8eLLMSgjkp36Lb5xOioBhbl6w0NYoE5xysLsBWuu+yHytfvCBA==", + "version": "1.0.0-next.427", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.427.tgz", + "integrity": "sha512-HUt1knOXaEM18y7E3k0CvhTxmoNhp0KbgfbLPmuRvSrQxRMsTnTpupZwW5mmU0VZkm4HHsf8mwftGy4WR8qf1Q==", "dev": true, "hasInstallScript": true, "dependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.1", - "chokidar": "^3.5.3", + "cookie": "^0.5.0", + "devalue": "^2.0.1", + "kleur": "^4.1.4", + "magic-string": "^0.26.2", + "mime": "^3.0.0", + "node-fetch": "^3.2.4", "sade": "^1.8.1", - "tiny-glob": "^0.2.9" + "set-cookie-parser": "^2.4.8", + "sirv": "^2.0.2", + "tiny-glob": "^0.2.9", + "undici": "^5.8.1" }, "bin": { "svelte-kit": "svelte-kit.js" @@ -305,6 +320,16 @@ "tailwindcss": ">=3.0.0 || insiders" } }, + "node_modules/@tricoteuses/explorer-tools": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@tricoteuses/explorer-tools/-/explorer-tools-0.1.4.tgz", + "integrity": "sha512-ghgmyaz2uyoiX8Z5krhHkF/QxCZN1CFf9FncN2gyaC3jTjmLACgD50aA3sUmQbm5eEhHuINVvCqvWedsixiRxg==", + "dev": true, + "dependencies": { + "@iconify-icons/codicon": "^1.2.15", + "@iconify/svelte": "^2.2.1" + } + }, "node_modules/@types/fs-extra": { "version": "9.0.13", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", @@ -327,9 +352,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.6.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.5.tgz", - "integrity": "sha512-Xjt5ZGUa5WusGZJ4WJPbOT8QOqp6nDynVFRKcUt32bOgvXEoc6o085WNkYTMO7ifAj2isEfQQ2cseE+wT6jsRw==", + "version": "18.7.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.8.tgz", + "integrity": "sha512-/YP55EMK2341JkODUb8DM9O0x1SIz2aBvyF33Uf1c76St3VpsMXEIW0nxuKkq/5cxnbz0RD9cfwNZHEAZQD3ag==", "dev": true }, "node_modules/@types/pug": { @@ -348,14 +373,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz", - "integrity": "sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", + "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/type-utils": "5.33.0", - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -381,14 +406,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz", - "integrity": "sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", + "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" }, "engines": { @@ -408,13 +433,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz", - "integrity": "sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", + "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -425,12 +450,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz", - "integrity": "sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", + "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -451,9 +476,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz", - "integrity": "sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", + "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -464,13 +489,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz", - "integrity": "sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", + "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -491,15 +516,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.0.tgz", - "integrity": "sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", + "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -515,12 +540,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz", - "integrity": "sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", + "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.33.0", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -659,9 +684,9 @@ } }, "node_modules/augmented-data-viewer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/augmented-data-viewer/-/augmented-data-viewer-0.1.1.tgz", - "integrity": "sha512-Hn6MA2SOkiA028dhNtZnqozERvhPehWBaV8ebTtrB2wMozqfsUZlI+jNVKJKosMtyjduRi13Pv6RSzKFYPYp5Q==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/augmented-data-viewer/-/augmented-data-viewer-0.1.5.tgz", + "integrity": "sha512-LuzvtNsO3rxfl9PbASCJiptr7svRyUhaoHi2PPcD+OqGqgrMd7kuEbeNDAtl7PC/cU2eIQPvjPnN9QO3lLlU5w==", "dev": true, "dependencies": { "@iconify-icons/codicon": "^1.2.15", @@ -794,9 +819,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001375", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", - "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", + "version": "1.0.30001379", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001379.tgz", + "integrity": "sha512-zXf+qxuN8OJrK5Bl5HbJg8cc5/Zm01WNW4ooVWUh92YlKqQZW3fwN5lXLB+kI8wkP5vTWkIIN+rutZuJhf4ykw==", "dev": true, "funding": [ { @@ -852,6 +877,18 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -899,6 +936,15 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -936,9 +982,9 @@ } }, "node_modules/daisyui": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.22.0.tgz", - "integrity": "sha512-H08aQP+Mfl2fQOmyaxd1NP54gQbr2xRUj2MmFFvfJ5EDGbthVBICDMNFKyia/zBfR58G8eTJo3CmydglM81/7Q==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.24.0.tgz", + "integrity": "sha512-Fdu/4LCdTfWLWAbCuPxvnaRotEfJ+hVPgZ2kv/aUk9RZ00Yk8fGdJtIf0kXJ3IgUKOr8rCXUpfQY6DQU9usPCQ==", "dev": true, "dependencies": { "color": "^4.2", @@ -951,6 +997,15 @@ "postcss": "^8.1.6" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1021,6 +1076,12 @@ "node": ">=0.8.0" } }, + "node_modules/devalue": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.1.tgz", + "integrity": "sha512-I2TiqT5iWBEyB8GRfTDP0hiLZ0YeDJZ+upDxjBfOC2lebO5LezQMv7QvIUTzdb64jQyAKLf1AHADtGN+jw6v8Q==", + "dev": true + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -1067,9 +1128,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.213", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.213.tgz", - "integrity": "sha512-+3DbGHGOCHTVB/Ms63bGqbyC1b8y7Fk86+7ltssB8NQrZtSCvZG6eooSl9U2Q0yw++fL2DpHKOdTU0NVEkFObg==", + "version": "1.4.225", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.225.tgz", + "integrity": "sha512-ICHvGaCIQR3P88uK8aRtx8gmejbVJyC6bB4LEC3anzBrIzdzC7aiZHY4iFfXhN4st6I7lMO0x4sgBHf/7kBvRw==", "dev": true }, "node_modules/es6-promise": { @@ -1456,9 +1517,9 @@ } }, "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -1604,18 +1665,6 @@ "node": ">=4.0" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/espree": { "version": "9.3.3", "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", @@ -1721,6 +1770,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1764,6 +1825,29 @@ "reusify": "^1.0.4" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -1818,11 +1902,23 @@ } }, "node_modules/flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/fraction.js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", @@ -1903,15 +1999,15 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { @@ -2274,6 +2370,18 @@ "node": ">=8.6" } }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -2322,6 +2430,15 @@ "node": ">=4" } }, + "node_modules/mrmime": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", + "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2356,6 +2473,43 @@ "tslib": "^2.0.3" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "dev": true, + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", @@ -2537,9 +2691,9 @@ } }, "node_modules/playwright-core": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.24.2.tgz", - "integrity": "sha512-zfAoDoPY/0sDLsgSgLZwWmSCevIg1ym7CppBwllguVBNiHeixZkc1AdMuYUPZC6AdEYc4CxWEyLMBTw2YcmRrA==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.0.tgz", + "integrity": "sha512-kZ3Jwaf3wlu0GgU0nB8UMQ+mXFTqBIFz9h1svTlNduNKjnbPXFxw7mJanLVjqxHJRn62uBfmgBj93YHidk2N5Q==", "dev": true, "bin": { "playwright": "cli.js" @@ -2857,9 +3011,9 @@ } }, "node_modules/rollup": { - "version": "2.77.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz", - "integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==", + "version": "2.77.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz", + "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -2945,6 +3099,12 @@ "node": ">=10" } }, + "node_modules/set-cookie-parser": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.5.1.tgz", + "integrity": "sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2975,6 +3135,20 @@ "is-arrayish": "^0.3.1" } }, + "node_modules/sirv": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.2.tgz", + "integrity": "sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==", + "dev": true, + "dependencies": { + "@polka/url": "^1.0.0-next.20", + "mrmime": "^1.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -3090,9 +3264,9 @@ } }, "node_modules/svelte-check": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-2.8.0.tgz", - "integrity": "sha512-HRL66BxffMAZusqe5I5k26mRWQ+BobGd9Rxm3onh7ZVu0nTk8YTKJ9vu3LVPjUGLU9IX7zS+jmwPVhJYdXJ8vg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-2.8.1.tgz", + "integrity": "sha512-cibyY1sgt3ONIDnQbSgV2X9AJFhwEslRHNo95lijrYfPzVEvTvbmL2ohsUyqB5L7j1GhLXtQbjCJ4lZZ/fwbeQ==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.9", @@ -3199,9 +3373,9 @@ } }, "node_modules/svelte2tsx": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.5.13.tgz", - "integrity": "sha512-JAwln2Gd6gQk8q/Qz91rk8msSqe4M2ABrku8YeDMsFnrqjPTWLnHYvxlXLAlHE5el1Q8sfExTePHF3xAZPh/mw==", + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.5.14.tgz", + "integrity": "sha512-/9hGkIUMVwZDJoERS6k1x+y6Ir+PpkxbL/UWQ2+RhK/PwUoIaDTCfw79/H1bgYNUTr/7ZaYanJGPuaWARNbbyQ==", "dev": true, "dependencies": { "dedent-js": "^1.0.1", @@ -3252,18 +3426,6 @@ "postcss": "^8.0.9" } }, - "node_modules/tailwindcss/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/tailwindcss/node_modules/postcss-load-config": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", @@ -3330,6 +3492,15 @@ "node": ">=8.0" } }, + "node_modules/totalist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.0.tgz", + "integrity": "sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -3394,6 +3565,15 @@ "node": ">=4.2.0" } }, + "node_modules/undici": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.9.1.tgz", + "integrity": "sha512-6fB3a+SNnWEm4CJbgo0/CWR8RGcOCQP68SF4X0mxtYTq2VNN8T88NYrWVBAeSX+zb7bny2dx2iYhP3XHi00omg==", + "dev": true, + "engines": { + "node": ">=12.18" + } + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -3451,15 +3631,15 @@ "dev": true }, "node_modules/vite": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.5.tgz", - "integrity": "sha512-bRvrt9Tw8EGW4jj64aYFTnVg134E8hgDxyl/eEHnxiGqYk7/pTPss6CWlurqPOUzqvEoZkZ58Ws+Iu8MB87iMA==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz", + "integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==", "dev": true, "dependencies": { "esbuild": "^0.14.47", "postcss": "^8.4.16", "resolve": "^1.22.1", - "rollup": "^2.75.6" + "rollup": ">=2.75.6 <2.77.0 || ~2.77.0" }, "bin": { "vite": "bin/vite.js" @@ -3491,6 +3671,15 @@ } } }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3613,9 +3802,9 @@ "dev": true }, "@iconify-icons/codicon": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/@iconify-icons/codicon/-/codicon-1.2.15.tgz", - "integrity": "sha512-CrRvt+0kKM6LVWNFErvWFOZEFwRPnvW2HLpIab148WNECXfNgVdTYhZRwtClNq59pEZ13cv0lg+cQm/ZDGlm+w==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@iconify-icons/codicon/-/codicon-1.2.16.tgz", + "integrity": "sha512-85rBsFEhhq2qSBfIEF0hzUk31i4GjeRzNyd0DZGFWo5v+PgAeTBiv8ftsTDf8d2fxy9F5kesT/R7bOtRy1xKmw==", "dev": true, "requires": { "@iconify/types": "*" @@ -3646,9 +3835,9 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", @@ -3682,15 +3871,21 @@ } }, "@playwright/test": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.24.2.tgz", - "integrity": "sha512-Q4X224pRHw4Dtkk5PoNJplZCokLNvVbXD9wDQEMrHcEuvWpJWEQDeJ9gEwkZ3iCWSFSWBshIX177B231XW4wOQ==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.25.0.tgz", + "integrity": "sha512-j4EZhTTQI3dBeWblE21EV//swwmBtOpIrLdOIJIRv4uqsLdHgBg1z+JtTg+AeC5o2bAXIE26kDNW5A0TimG8Bg==", "dev": true, "requires": { "@types/node": "*", - "playwright-core": "1.24.2" + "playwright-core": "1.25.0" } }, + "@polka/url": { + "version": "1.0.0-next.21", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", + "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", + "dev": true + }, "@rollup/pluginutils": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", @@ -3708,15 +3903,23 @@ "dev": true }, "@sveltejs/kit": { - "version": "1.0.0-next.405", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.405.tgz", - "integrity": "sha512-jHSa74F7k+hC+0fof75g/xm/+1M5sM66Qt6v8eLLMSgjkp36Lb5xOioBhbl6w0NYoE5xysLsBWuu+yHytfvCBA==", + "version": "1.0.0-next.427", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.427.tgz", + "integrity": "sha512-HUt1knOXaEM18y7E3k0CvhTxmoNhp0KbgfbLPmuRvSrQxRMsTnTpupZwW5mmU0VZkm4HHsf8mwftGy4WR8qf1Q==", "dev": true, "requires": { "@sveltejs/vite-plugin-svelte": "^1.0.1", - "chokidar": "^3.5.3", + "cookie": "^0.5.0", + "devalue": "^2.0.1", + "kleur": "^4.1.4", + "magic-string": "^0.26.2", + "mime": "^3.0.0", + "node-fetch": "^3.2.4", "sade": "^1.8.1", - "tiny-glob": "^0.2.9" + "set-cookie-parser": "^2.4.8", + "sirv": "^2.0.2", + "tiny-glob": "^0.2.9", + "undici": "^5.8.1" } }, "@sveltejs/vite-plugin-svelte": { @@ -3744,6 +3947,16 @@ "lodash.merge": "^4.6.2" } }, + "@tricoteuses/explorer-tools": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@tricoteuses/explorer-tools/-/explorer-tools-0.1.4.tgz", + "integrity": "sha512-ghgmyaz2uyoiX8Z5krhHkF/QxCZN1CFf9FncN2gyaC3jTjmLACgD50aA3sUmQbm5eEhHuINVvCqvWedsixiRxg==", + "dev": true, + "requires": { + "@iconify-icons/codicon": "^1.2.15", + "@iconify/svelte": "^2.2.1" + } + }, "@types/fs-extra": { "version": "9.0.13", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", @@ -3766,9 +3979,9 @@ "dev": true }, "@types/node": { - "version": "18.6.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.5.tgz", - "integrity": "sha512-Xjt5ZGUa5WusGZJ4WJPbOT8QOqp6nDynVFRKcUt32bOgvXEoc6o085WNkYTMO7ifAj2isEfQQ2cseE+wT6jsRw==", + "version": "18.7.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.8.tgz", + "integrity": "sha512-/YP55EMK2341JkODUb8DM9O0x1SIz2aBvyF33Uf1c76St3VpsMXEIW0nxuKkq/5cxnbz0RD9cfwNZHEAZQD3ag==", "dev": true }, "@types/pug": { @@ -3787,14 +4000,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz", - "integrity": "sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", + "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/type-utils": "5.33.0", - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -3804,52 +4017,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz", - "integrity": "sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", + "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz", - "integrity": "sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", + "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" } }, "@typescript-eslint/type-utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz", - "integrity": "sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", + "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz", - "integrity": "sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", + "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz", - "integrity": "sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", + "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3858,26 +4071,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.0.tgz", - "integrity": "sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", + "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz", - "integrity": "sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", + "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.33.0", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -3975,9 +4188,9 @@ "dev": true }, "augmented-data-viewer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/augmented-data-viewer/-/augmented-data-viewer-0.1.1.tgz", - "integrity": "sha512-Hn6MA2SOkiA028dhNtZnqozERvhPehWBaV8ebTtrB2wMozqfsUZlI+jNVKJKosMtyjduRi13Pv6RSzKFYPYp5Q==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/augmented-data-viewer/-/augmented-data-viewer-0.1.5.tgz", + "integrity": "sha512-LuzvtNsO3rxfl9PbASCJiptr7svRyUhaoHi2PPcD+OqGqgrMd7kuEbeNDAtl7PC/cU2eIQPvjPnN9QO3lLlU5w==", "dev": true, "requires": { "@iconify-icons/codicon": "^1.2.15", @@ -4060,9 +4273,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001375", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", - "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", + "version": "1.0.30001379", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001379.tgz", + "integrity": "sha512-zXf+qxuN8OJrK5Bl5HbJg8cc5/Zm01WNW4ooVWUh92YlKqQZW3fwN5lXLB+kI8wkP5vTWkIIN+rutZuJhf4ykw==", "dev": true }, "chalk": { @@ -4089,6 +4302,17 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, "color": { @@ -4132,6 +4356,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -4160,9 +4390,9 @@ "dev": true }, "daisyui": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.22.0.tgz", - "integrity": "sha512-H08aQP+Mfl2fQOmyaxd1NP54gQbr2xRUj2MmFFvfJ5EDGbthVBICDMNFKyia/zBfR58G8eTJo3CmydglM81/7Q==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-2.24.0.tgz", + "integrity": "sha512-Fdu/4LCdTfWLWAbCuPxvnaRotEfJ+hVPgZ2kv/aUk9RZ00Yk8fGdJtIf0kXJ3IgUKOr8rCXUpfQY6DQU9usPCQ==", "dev": true, "requires": { "color": "^4.2", @@ -4171,6 +4401,12 @@ "tailwindcss": "^3" } }, + "data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "dev": true + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4221,6 +4457,12 @@ "minimist": "^1.2.6" } }, + "devalue": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.1.tgz", + "integrity": "sha512-I2TiqT5iWBEyB8GRfTDP0hiLZ0YeDJZ+upDxjBfOC2lebO5LezQMv7QvIUTzdb64jQyAKLf1AHADtGN+jw6v8Q==", + "dev": true + }, "didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -4258,9 +4500,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.213", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.213.tgz", - "integrity": "sha512-+3DbGHGOCHTVB/Ms63bGqbyC1b8y7Fk86+7ltssB8NQrZtSCvZG6eooSl9U2Q0yw++fL2DpHKOdTU0NVEkFObg==", + "version": "1.4.225", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.225.tgz", + "integrity": "sha512-ICHvGaCIQR3P88uK8aRtx8gmejbVJyC6bB4LEC3anzBrIzdzC7aiZHY4iFfXhN4st6I7lMO0x4sgBHf/7kBvRw==", "dev": true }, "es6-promise": { @@ -4451,9 +4693,9 @@ "dev": true }, "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -4512,15 +4754,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } } } }, @@ -4651,6 +4884,17 @@ "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, "fast-json-stable-stringify": { @@ -4689,6 +4933,16 @@ "reusify": "^1.0.4" } }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4728,11 +4982,20 @@ } }, "flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "requires": { + "fetch-blob": "^3.1.2" + } + }, "fraction.js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", @@ -4790,12 +5053,12 @@ } }, "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" } }, "globals": { @@ -5078,6 +5341,12 @@ "picomatch": "^2.3.1" } }, + "mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "dev": true + }, "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -5114,6 +5383,12 @@ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", "dev": true }, + "mrmime": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", + "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5142,6 +5417,23 @@ "tslib": "^2.0.3" } }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true + }, + "node-fetch": { + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.10.tgz", + "integrity": "sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==", + "dev": true, + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } + }, "node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", @@ -5275,9 +5567,9 @@ "dev": true }, "playwright-core": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.24.2.tgz", - "integrity": "sha512-zfAoDoPY/0sDLsgSgLZwWmSCevIg1ym7CppBwllguVBNiHeixZkc1AdMuYUPZC6AdEYc4CxWEyLMBTw2YcmRrA==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.0.tgz", + "integrity": "sha512-kZ3Jwaf3wlu0GgU0nB8UMQ+mXFTqBIFz9h1svTlNduNKjnbPXFxw7mJanLVjqxHJRn62uBfmgBj93YHidk2N5Q==", "dev": true }, "postcss": { @@ -5453,9 +5745,9 @@ } }, "rollup": { - "version": "2.77.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz", - "integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==", + "version": "2.77.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz", + "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -5511,6 +5803,12 @@ "lru-cache": "^6.0.0" } }, + "set-cookie-parser": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.5.1.tgz", + "integrity": "sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==", + "dev": true + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5535,6 +5833,17 @@ "is-arrayish": "^0.3.1" } }, + "sirv": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.2.tgz", + "integrity": "sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==", + "dev": true, + "requires": { + "@polka/url": "^1.0.0-next.20", + "mrmime": "^1.0.0", + "totalist": "^3.0.0" + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -5617,9 +5926,9 @@ "dev": true }, "svelte-check": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-2.8.0.tgz", - "integrity": "sha512-HRL66BxffMAZusqe5I5k26mRWQ+BobGd9Rxm3onh7ZVu0nTk8YTKJ9vu3LVPjUGLU9IX7zS+jmwPVhJYdXJ8vg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-2.8.1.tgz", + "integrity": "sha512-cibyY1sgt3ONIDnQbSgV2X9AJFhwEslRHNo95lijrYfPzVEvTvbmL2ohsUyqB5L7j1GhLXtQbjCJ4lZZ/fwbeQ==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.9", @@ -5665,9 +5974,9 @@ } }, "svelte2tsx": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.5.13.tgz", - "integrity": "sha512-JAwln2Gd6gQk8q/Qz91rk8msSqe4M2ABrku8YeDMsFnrqjPTWLnHYvxlXLAlHE5el1Q8sfExTePHF3xAZPh/mw==", + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.5.14.tgz", + "integrity": "sha512-/9hGkIUMVwZDJoERS6k1x+y6Ir+PpkxbL/UWQ2+RhK/PwUoIaDTCfw79/H1bgYNUTr/7ZaYanJGPuaWARNbbyQ==", "dev": true, "requires": { "dedent-js": "^1.0.1", @@ -5704,15 +6013,6 @@ "resolve": "^1.22.1" }, "dependencies": { - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, "postcss-load-config": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", @@ -5756,6 +6056,12 @@ "is-number": "^7.0.0" } }, + "totalist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.0.tgz", + "integrity": "sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==", + "dev": true + }, "tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -5800,6 +6106,12 @@ "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true }, + "undici": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.9.1.tgz", + "integrity": "sha512-6fB3a+SNnWEm4CJbgo0/CWR8RGcOCQP68SF4X0mxtYTq2VNN8T88NYrWVBAeSX+zb7bny2dx2iYhP3XHi00omg==", + "dev": true + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -5838,18 +6150,24 @@ "dev": true }, "vite": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.5.tgz", - "integrity": "sha512-bRvrt9Tw8EGW4jj64aYFTnVg134E8hgDxyl/eEHnxiGqYk7/pTPss6CWlurqPOUzqvEoZkZ58Ws+Iu8MB87iMA==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz", + "integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==", "dev": true, "requires": { "esbuild": "^0.14.47", "fsevents": "~2.3.2", "postcss": "^8.4.16", "resolve": "^1.22.1", - "rollup": "^2.75.6" + "rollup": ">=2.75.6 <2.77.0 || ~2.77.0" } }, + "web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "dev": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 80aaaf1..1ac87e0 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,9 @@ "@iconify/svelte": "^2.2.1", "@playwright/test": "^1.22.2", "@sveltejs/adapter-node": "^1.0.0-next.86", - "@sveltejs/kit": "next", + "@sveltejs/kit": "^1.0.0-next.427", "@tailwindcss/typography": "^0.5.3", + "@tricoteuses/explorer-tools": "^0.1.4", "@types/fs-extra": "^9.0.13", "@types/he": "^1.1.2", "@typescript-eslint/eslint-plugin": "^5.27.0", diff --git a/src/app.css b/src/app.postcss similarity index 100% rename from src/app.css rename to src/app.postcss diff --git a/src/hooks.ts b/src/hooks.ts index e6303e9..6bb3da1 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -1,12 +1,4 @@ -import type { GetSession, Handle } from "@sveltejs/kit" - -import config from "$lib/server/config" - -export const getSession: GetSession = async () => { - return { - title: config.title, - } -} +import type { Handle } from "@sveltejs/kit" export const handle: Handle = async ({ event, resolve }) => { // Add CORS support. diff --git a/src/lib/legal.ts b/src/lib/legal.ts index 97ca01d..e4876f2 100644 --- a/src/lib/legal.ts +++ b/src/lib/legal.ts @@ -1,3 +1,5 @@ +import type { MenuItem } from "@tricoteuses/explorer-tools" + export interface Article { META: { META_COMMUN: MetaCommun @@ -182,6 +184,44 @@ export interface XmlHeader { "@version": "1.0" } +export const appMenu: MenuItem[] = [ + { href: "/recherche", label: "Recherche" }, + { + items: [ + { href: "/article", label: "ARTICLE" }, + { href: "/dossier_legislatif", label: "DOSSIER_LEGISLATIF" }, + { href: "/id", label: "ID" }, + { href: "/idcc", label: "IDCC" }, + { href: "/jo", label: "JO" }, + { href: "/section_ta", label: "SECTION_TA" }, + { href: "/texte_version", label: "TEXTE_VERSION" }, + { href: "/textekali", label: "TEXTEKALI" }, + { href: "/textelr", label: "TEXTELR" }, + { href: "/versions", label: "VERSIONS" }, + ], + label: "Données", + }, + // { + // items: [ + // { href: "/jo", label: "JO" }, + // ], + // label: "JORF", + // title: "Textes publiés au Journal officiel de la République française", + // }, + // { + // items: [ + // { href: "/article", label: "ARTICLE" }, + // // { href: "/eli/ids", label: "ID" }, + // { href: "/section_ta", label: "SECTION_TA" }, + // { href: "/texte_version", label: "TEXTE_VERSION" }, + // { href: "/textelr", label: "TEXTELR" }, + // // { href: "/eli/versions", label: "VERSIONS" }, + // ], + // label: "LEGI", + // title: "Codes, lois et règlements consolidés", + // }, +] + export function assertNeverLegalObjectType(type: never): never { throw `Unexpected type for legal object: ${type}` } diff --git a/src/lib/summaries.ts b/src/lib/summaries.ts index 9271799..6661236 100644 --- a/src/lib/summaries.ts +++ b/src/lib/summaries.ts @@ -192,9 +192,10 @@ export function summarizeLegalObject( const dossierLegislatif = value as DossierLegislatif | undefined return dossierLegislatif?.META.META_DOSSIER_LEGISLATIF.TITRE } - case "id": + case "id": { const idWrapper = value as IdWrapper | undefined return idWrapper?.eli + } case "idcc": { const idcc = value as Idcc | undefined return idcc?.META.META_SPEC.META_CONTENEUR.TITRE @@ -225,9 +226,10 @@ export function summarizeLegalObject( const textelr = value as Textelr | undefined return textelr?.META.META_COMMUN.ID } - case "versions": + case "versions": { const versionsWrapper = value as VersionsWrapper | undefined return versionsWrapper?.eli + } default: assertNeverLegalObjectType(type) } diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts new file mode 100644 index 0000000..1ee96be --- /dev/null +++ b/src/routes/+layout.server.ts @@ -0,0 +1,7 @@ +import config from "$lib/server/config" + +import type { LayoutServerLoad } from "./$types" + +export const load: LayoutServerLoad = () => { + return { appTitle: config.title } +} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte new file mode 100644 index 0000000..10d0e64 --- /dev/null +++ b/src/routes/+layout.svelte @@ -0,0 +1,23 @@ + + + + {$page.data.appTitle} + + + + +
+ +
diff --git a/src/routes/index.svelte b/src/routes/+page.svelte similarity index 81% rename from src/routes/index.svelte rename to src/routes/+page.svelte index 39311dd..9f29950 100644 --- a/src/routes/index.svelte +++ b/src/routes/+page.svelte @@ -1,13 +1,7 @@ - - {title} - -
@@ -17,7 +11,10 @@ src="/tricoteuses_jacobines_1301x1907.jpg" />
-

Tricoteuses

+

+ {$page.data.appTitle} + Légifrance +

Un site et des API pour permettre aux développeurs d'utiliser plus facilement les données publiques légales de la - import "../app.css" - - import Icon from "@iconify/svelte" - import chevronDown from "@iconify-icons/codicon/chevron-down" - import chevronRight from "@iconify-icons/codicon/chevron-right" - import threeBars from "@iconify-icons/codicon/three-bars" - - import { session } from "$app/stores" - - type MenuItem = MenuItemLink | MenuItemSubMenu - - interface MenuItemBase { - href?: string - items?: MenuItemLink[] - label: string - title?: string - } - - interface MenuItemLink extends MenuItemBase { - href: string - } - - interface MenuItemSubMenu extends MenuItemBase { - items: MenuItemLink[] - } - - const menuItems: MenuItem[] = [ - { href: "/recherche", label: "Recherche" }, - { - items: [ - { href: "/article", label: "ARTICLE" }, - { href: "/dossier_legislatif", label: "DOSSIER_LEGISLATIF" }, - { href: "/id", label: "ID" }, - { href: "/idcc", label: "IDCC" }, - { href: "/jo", label: "JO" }, - { href: "/section_ta", label: "SECTION_TA" }, - { href: "/texte_version", label: "TEXTE_VERSION" }, - { href: "/textekali", label: "TEXTEKALI" }, - { href: "/textelr", label: "TEXTELR" }, - { href: "/versions", label: "VERSIONS" }, - ], - label: "Données", - }, - // { - // items: [ - // { href: "/jo", label: "JO" }, - // ], - // label: "JORF", - // title: "Textes publiés au Journal officiel de la République française", - // }, - // { - // items: [ - // { href: "/article", label: "ARTICLE" }, - // // { href: "/eli/ids", label: "ID" }, - // { href: "/section_ta", label: "SECTION_TA" }, - // { href: "/texte_version", label: "TEXTE_VERSION" }, - // { href: "/textelr", label: "TEXTELR" }, - // // { href: "/eli/versions", label: "VERSIONS" }, - // ], - // label: "LEGI", - // title: "Codes, lois et règlements consolidés", - // }, - ] - const title = $session.title - - -

- -
- -
diff --git a/src/routes/article/index.ts b/src/routes/article/+page.server.ts similarity index 79% rename from src/routes/article/index.ts rename to src/routes/article/+page.server.ts index 6edae89..eceb122 100644 --- a/src/routes/article/index.ts +++ b/src/routes/article/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { Article } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { article: articles as unknown as JSONObject[] }, - } + return { article: articles } } diff --git a/src/routes/article/index.svelte b/src/routes/article/+page.svelte similarity index 73% rename from src/routes/article/index.svelte rename to src/routes/article/+page.svelte index 2b357a0..4b04c5b 100644 --- a/src/routes/article/index.svelte +++ b/src/routes/article/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { Article } from "$lib/legal" import { summarizeArticleProperties } from "$lib/summaries" - let articles: Article[] - export { articles as article } - export let error: unknown + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ article: articles } = data)
@@ -51,18 +51,12 @@
--> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/article/[id].svelte b/src/routes/article/[id].svelte deleted file mode 100644 index 686bbfc..0000000 --- a/src/routes/article/[id].svelte +++ /dev/null @@ -1,38 +0,0 @@ - - -
-

ARTICLE

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/article/[id].ts b/src/routes/article/[id].ts deleted file mode 100644 index 9d7069a..0000000 --- a/src/routes/article/[id].ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" - -import type { Article } from "$lib/legal" -import { db } from "$lib/server/database" - -export const GET: RequestHandler = async ({ params }) => { - const article = ( - await db<{ data: Article }[]>` - SELECT data FROM article - WHERE id = ${params.id} - ` - ).map(({ data }) => data)[0] - - if (article === undefined) { - return { status: 404 } - } - return { - body: { article: article as unknown as JSONObject }, - } -} diff --git a/src/routes/article/[id]/+page.server.ts b/src/routes/article/[id]/+page.server.ts new file mode 100644 index 0000000..7db7589 --- /dev/null +++ b/src/routes/article/[id]/+page.server.ts @@ -0,0 +1,20 @@ +import { error } from "@sveltejs/kit" + +import type { Article } from "$lib/legal" +import { db } from "$lib/server/database" + +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { + const article = ( + await db<{ data: Article }[]>` + SELECT data FROM article + WHERE id = ${params.id} + ` + ).map(({ data }) => data)[0] + + if (article === undefined) { + throw error(404, `Article ${params.id} non trouvé`) + } + return { article } +} diff --git a/src/routes/article/[id]/+page.svelte b/src/routes/article/[id]/+page.svelte new file mode 100644 index 0000000..b1daf4d --- /dev/null +++ b/src/routes/article/[id]/+page.svelte @@ -0,0 +1,33 @@ + + +
+

ARTICLE

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/dossier_legislatif/index.ts b/src/routes/dossier_legislatif/+page.server.ts similarity index 79% rename from src/routes/dossier_legislatif/index.ts rename to src/routes/dossier_legislatif/+page.server.ts index 6a6d2a1..c731eea 100644 --- a/src/routes/dossier_legislatif/index.ts +++ b/src/routes/dossier_legislatif/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { DossierLegislatif } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -66,8 +59,6 @@ export const GET: RequestHandler = async ({ url }) => { ` ).map(({ data }) => data) return { - body: { - dossier_legislatif: dossiersLegislatifs as unknown as JSONObject[], - }, + dossier_legislatif: dossiersLegislatifs, } } diff --git a/src/routes/dossier_legislatif/index.svelte b/src/routes/dossier_legislatif/+page.svelte similarity index 69% rename from src/routes/dossier_legislatif/index.svelte rename to src/routes/dossier_legislatif/+page.svelte index 831ab85..12512fd 100644 --- a/src/routes/dossier_legislatif/index.svelte +++ b/src/routes/dossier_legislatif/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { DossierLegislatif } from "$lib/legal" import { summarizeDossierLegislatifProperties } from "$lib/summaries" - let dossiersLegislatifs: DossierLegislatif[] - export { dossiersLegislatifs as dossier_legislatif } - export let error: unknown + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ dossier_legislatif: dossiersLegislatifs } = data)
@@ -51,18 +51,12 @@
--> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/dossier_legislatif/[id].svelte b/src/routes/dossier_legislatif/[id].svelte deleted file mode 100644 index b657003..0000000 --- a/src/routes/dossier_legislatif/[id].svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
-

DOSSIER_LEGISLATIF

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/dossier_legislatif/[id].ts b/src/routes/dossier_legislatif/[id]/+page.server.ts similarity index 52% rename from src/routes/dossier_legislatif/[id].ts rename to src/routes/dossier_legislatif/[id]/+page.server.ts index 0972005..df75eaa 100644 --- a/src/routes/dossier_legislatif/[id].ts +++ b/src/routes/dossier_legislatif/[id]/+page.server.ts @@ -1,10 +1,11 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import type { DossierLegislatif } from "$lib/legal" import { db } from "$lib/server/database" -export const GET: RequestHandler = async ({ params }) => { +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { const dossierLegislatif = ( await db<{ data: DossierLegislatif }[]>` SELECT data FROM dossier_legislatif @@ -13,9 +14,7 @@ export const GET: RequestHandler = async ({ params }) => { ).map(({ data }) => data)[0] if (dossierLegislatif === undefined) { - return { status: 404 } - } - return { - body: { dossier_legislatif: dossierLegislatif as unknown as JSONObject }, + throw error(404, `Dossier législatif ${params.id} non trouvé`) } + return { dossier_legislatif: dossierLegislatif } } diff --git a/src/routes/dossier_legislatif/[id]/+page.svelte b/src/routes/dossier_legislatif/[id]/+page.svelte new file mode 100644 index 0000000..b1a2fe0 --- /dev/null +++ b/src/routes/dossier_legislatif/[id]/+page.svelte @@ -0,0 +1,37 @@ + + +
+

DOSSIER_LEGISLATIF

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/id/index.ts b/src/routes/id/+page.server.ts similarity index 79% rename from src/routes/id/index.ts rename to src/routes/id/+page.server.ts index 64a22b9..4b00f28 100644 --- a/src/routes/id/index.ts +++ b/src/routes/id/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { IdWrapper } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -63,7 +56,5 @@ export const GET: RequestHandler = async ({ url }) => { OFFSET ${offset} LIMIT ${limit} ` - return { - body: { id: idsWrapper as unknown as JSONObject[] }, - } + return { id: idsWrapper } } diff --git a/src/routes/id/index.svelte b/src/routes/id/+page.svelte similarity index 72% rename from src/routes/id/index.svelte rename to src/routes/id/+page.svelte index dd8db03..0285c7c 100644 --- a/src/routes/id/index.svelte +++ b/src/routes/id/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { IdWrapper } from "$lib/legal" import { summarizeIdWrapperProperties } from "$lib/summaries" - let idsWrapper: IdWrapper[] - export { idsWrapper as id } - export let error: unknown + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ id: idsWrapper } = data)
@@ -51,18 +51,12 @@
--> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/id/[...eli].svelte b/src/routes/id/[...eli].svelte deleted file mode 100644 index d3df1ad..0000000 --- a/src/routes/id/[...eli].svelte +++ /dev/null @@ -1,39 +0,0 @@ - - -
-

ID

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/id/[...eli].ts b/src/routes/id/[...eli].ts deleted file mode 100644 index f9581f4..0000000 --- a/src/routes/id/[...eli].ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" - -import type { IdWrapper } from "$lib/legal" -import { db } from "$lib/server/database" - -export const GET: RequestHandler = async ({ params }) => { - const idWrapper = ( - await db<{ data: IdWrapper }[]>` - SELECT eli, id FROM id - WHERE eli = ${params.eli} - ` - )[0] - - if (idWrapper === undefined) { - return { status: 404 } - } - return { - body: { id: idWrapper as unknown as JSONObject }, - } -} diff --git a/src/routes/id/[...eli]/+page.server.ts b/src/routes/id/[...eli]/+page.server.ts new file mode 100644 index 0000000..f08bed0 --- /dev/null +++ b/src/routes/id/[...eli]/+page.server.ts @@ -0,0 +1,20 @@ +import { error } from "@sveltejs/kit" + +import type { IdWrapper } from "$lib/legal" +import { db } from "$lib/server/database" + +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { + const idWrapper = ( + await db<{ data: IdWrapper }[]>` + SELECT eli, id FROM id + WHERE eli = ${params.eli} + ` + )[0] + + if (idWrapper === undefined) { + throw error(404, `ELI ${params.eli} non trouvé`) + } + return { id: idWrapper } +} diff --git a/src/routes/id/[...eli]/+page.svelte b/src/routes/id/[...eli]/+page.svelte new file mode 100644 index 0000000..f31656a --- /dev/null +++ b/src/routes/id/[...eli]/+page.svelte @@ -0,0 +1,33 @@ + + +
+

ID

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/idcc/index.ts b/src/routes/idcc/+page.server.ts similarity index 79% rename from src/routes/idcc/index.ts rename to src/routes/idcc/+page.server.ts index 723545c..80e1011 100644 --- a/src/routes/idcc/index.ts +++ b/src/routes/idcc/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { Idcc } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { idcc: idccArray as unknown as JSONObject[] }, - } + return { idcc: idccArray } } diff --git a/src/routes/idcc/index.svelte b/src/routes/idcc/+page.svelte similarity index 73% rename from src/routes/idcc/index.svelte rename to src/routes/idcc/+page.svelte index 3147f5a..a78d5ed 100644 --- a/src/routes/idcc/index.svelte +++ b/src/routes/idcc/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { Idcc } from "$lib/legal" import { summarizeIdccProperties } from "$lib/summaries" - export let error: unknown - let idccArray: Idcc[] - export { idccArray as idcc } + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ idcc: idccArray } = data)
@@ -51,18 +51,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/idcc/[id].svelte b/src/routes/idcc/[id].svelte deleted file mode 100644 index f746f60..0000000 --- a/src/routes/idcc/[id].svelte +++ /dev/null @@ -1,35 +0,0 @@ - - -
-

IDCC

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/idcc/[id].ts b/src/routes/idcc/[id].ts deleted file mode 100644 index fe4ca05..0000000 --- a/src/routes/idcc/[id].ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" - -import type { Idcc } from "$lib/legal" -import { db } from "$lib/server/database" - -export const GET: RequestHandler = async ({ params }) => { - const idcc = ( - await db<{ data: Idcc }[]>` - SELECT data FROM idcc - WHERE id = ${params.id} - ` - ).map(({ data }) => data)[0] - - if (idcc === undefined) { - return { status: 404 } - } - return { - body: { idcc: idcc as unknown as JSONObject }, - } -} diff --git a/src/routes/idcc/[id]/+page.server.ts b/src/routes/idcc/[id]/+page.server.ts new file mode 100644 index 0000000..d9e5baf --- /dev/null +++ b/src/routes/idcc/[id]/+page.server.ts @@ -0,0 +1,20 @@ +import { error } from "@sveltejs/kit" + +import type { Idcc } from "$lib/legal" +import { db } from "$lib/server/database" + +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { + const idcc = ( + await db<{ data: Idcc }[]>` + SELECT data FROM idcc + WHERE id = ${params.id} + ` + ).map(({ data }) => data)[0] + + if (idcc === undefined) { + throw error(404, `IDCC ${params.id} non trouvé`) + } + return { idcc } +} diff --git a/src/routes/idcc/[id]/+page.svelte b/src/routes/idcc/[id]/+page.svelte new file mode 100644 index 0000000..7e2d4b4 --- /dev/null +++ b/src/routes/idcc/[id]/+page.svelte @@ -0,0 +1,30 @@ + + +
+

IDCC

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/jo/index.ts b/src/routes/jo/+page.server.ts similarity index 79% rename from src/routes/jo/index.ts rename to src/routes/jo/+page.server.ts index f5cc29e..68e2f1c 100644 --- a/src/routes/jo/index.ts +++ b/src/routes/jo/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { Jo } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { jo: jos as unknown as JSONObject[] }, - } + return { jo: jos } } diff --git a/src/routes/jo/index.svelte b/src/routes/jo/+page.svelte similarity index 74% rename from src/routes/jo/index.svelte rename to src/routes/jo/+page.svelte index f7dcae4..b80ae29 100644 --- a/src/routes/jo/index.svelte +++ b/src/routes/jo/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { Jo } from "$lib/legal" import { summarizeJoProperties } from "$lib/summaries" - export let error: unknown - let jos: Jo[] - export { jos as jo } + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ jo: jos } = data)
@@ -51,18 +51,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/jo/[id].svelte b/src/routes/jo/[id].svelte deleted file mode 100644 index 7f426af..0000000 --- a/src/routes/jo/[id].svelte +++ /dev/null @@ -1,35 +0,0 @@ - - -
-

JO

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/jo/[id].ts b/src/routes/jo/[id].ts deleted file mode 100644 index dd700b5..0000000 --- a/src/routes/jo/[id].ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" - -import type { Jo } from "$lib/legal" -import { db } from "$lib/server/database" - -export const GET: RequestHandler = async ({ params }) => { - const jo = ( - await db<{ data: Jo }[]>` - SELECT data FROM jo - WHERE id = ${params.id} - ` - ).map(({ data }) => data)[0] - - if (jo === undefined) { - return { status: 404 } - } - return { - body: { jo: jo as unknown as JSONObject }, - } -} diff --git a/src/routes/jo/[id]/+page.server.ts b/src/routes/jo/[id]/+page.server.ts new file mode 100644 index 0000000..e667bc5 --- /dev/null +++ b/src/routes/jo/[id]/+page.server.ts @@ -0,0 +1,20 @@ +import { error } from "@sveltejs/kit" + +import type { Jo } from "$lib/legal" +import { db } from "$lib/server/database" + +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { + const jo = ( + await db<{ data: Jo }[]>` + SELECT data FROM jo + WHERE id = ${params.id} + ` + ).map(({ data }) => data)[0] + + if (jo === undefined) { + throw error(404, `JO ${params.id} non trouvé`) + } + return { jo } +} diff --git a/src/routes/jo/[id]/+page.svelte b/src/routes/jo/[id]/+page.svelte new file mode 100644 index 0000000..767ff68 --- /dev/null +++ b/src/routes/jo/[id]/+page.svelte @@ -0,0 +1,30 @@ + + +
+

JO

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/recherche/index.ts b/src/routes/recherche/+page.server.ts similarity index 83% rename from src/routes/recherche/index.ts rename to src/routes/recherche/+page.server.ts index a1ff55e..032230d 100644 --- a/src/routes/recherche/index.ts +++ b/src/routes/recherche/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { Article } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset, q } = query @@ -73,10 +66,8 @@ export const GET: RequestHandler = async ({ url }) => { WHERE id = ${articleId} ` ).map(({ data }) => data) - return { - body: { articles: articles as unknown as JSONObject[], q }, - } + return { articles, q } } } - return { body: {} } + return {} } diff --git a/src/routes/recherche/index.svelte b/src/routes/recherche/+page.svelte similarity index 81% rename from src/routes/recherche/index.svelte rename to src/routes/recherche/+page.svelte index 1243e80..7cd269f 100644 --- a/src/routes/recherche/index.svelte +++ b/src/routes/recherche/+page.svelte @@ -4,13 +4,14 @@ import { TreeView } from "augmented-data-viewer" import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" import { summarizeArticleProperties } from "$lib/summaries" - export let articles: unknown[] - export let error: unknown - export let q: string | undefined + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ articles, q } = data)
@@ -33,11 +34,7 @@ -{#if error != null} - -{/if} - -{#if error == null && q !== undefined} +{#if q !== undefined} {#if articles === undefined}

Aucun article trouvé

{:else} diff --git a/src/routes/section_ta/index.ts b/src/routes/section_ta/+page.server.ts similarity index 79% rename from src/routes/section_ta/index.ts rename to src/routes/section_ta/+page.server.ts index 4ecfea0..e115eea 100644 --- a/src/routes/section_ta/index.ts +++ b/src/routes/section_ta/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { SectionTa } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { section_ta: sectionTaArray as unknown as JSONObject[] }, - } + return { section_ta: sectionTaArray } } diff --git a/src/routes/section_ta/index.svelte b/src/routes/section_ta/+page.svelte similarity index 71% rename from src/routes/section_ta/index.svelte rename to src/routes/section_ta/+page.svelte index 31870c1..d19e2fe 100644 --- a/src/routes/section_ta/index.svelte +++ b/src/routes/section_ta/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { SectionTa } from "$lib/legal" import { summarizeSectionTaProperties } from "$lib/summaries" - export let error: unknown - let sectionTaArray: SectionTa[] - export { sectionTaArray as section_ta } + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ section_ta: sectionTaArray } = data)
@@ -51,18 +51,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/section_ta/[id].svelte b/src/routes/section_ta/[id].svelte deleted file mode 100644 index 6a02471..0000000 --- a/src/routes/section_ta/[id].svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
-

SECTION_TA

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/section_ta/[id].ts b/src/routes/section_ta/[id]/+page.server.ts similarity index 50% rename from src/routes/section_ta/[id].ts rename to src/routes/section_ta/[id]/+page.server.ts index 4690abd..c1d60d9 100644 --- a/src/routes/section_ta/[id].ts +++ b/src/routes/section_ta/[id]/+page.server.ts @@ -1,10 +1,11 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import type { SectionTa } from "$lib/legal" import { db } from "$lib/server/database" -export const GET: RequestHandler = async ({ params }) => { +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { const sectionTa = ( await db<{ data: SectionTa }[]>` SELECT data FROM section_ta @@ -13,9 +14,7 @@ export const GET: RequestHandler = async ({ params }) => { ).map(({ data }) => data)[0] if (sectionTa === undefined) { - return { status: 404 } - } - return { - body: { section_ta: sectionTa as unknown as JSONObject }, + throw error(404, `Section TA ${params.id} non trouvée`) } + return { section_ta: sectionTa } } diff --git a/src/routes/section_ta/[id]/+page.svelte b/src/routes/section_ta/[id]/+page.svelte new file mode 100644 index 0000000..bf2fe0f --- /dev/null +++ b/src/routes/section_ta/[id]/+page.svelte @@ -0,0 +1,37 @@ + + +
+

SECTION_TA

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/texte_version/index.ts b/src/routes/texte_version/+page.server.ts similarity index 79% rename from src/routes/texte_version/index.ts rename to src/routes/texte_version/+page.server.ts index 4ba96ff..0d5c29b 100644 --- a/src/routes/texte_version/index.ts +++ b/src/routes/texte_version/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { TexteVersion } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { texte_version: texteVersionArray as unknown as JSONObject[] }, - } + return { texte_version: texteVersionArray } } diff --git a/src/routes/texte_version/index.svelte b/src/routes/texte_version/+page.svelte similarity index 70% rename from src/routes/texte_version/index.svelte rename to src/routes/texte_version/+page.svelte index 4abce6b..8f519d5 100644 --- a/src/routes/texte_version/index.svelte +++ b/src/routes/texte_version/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { TexteVersion } from "$lib/legal" import { summarizeTexteVersionProperties } from "$lib/summaries" - export let error: unknown - let texteVersionArray: TexteVersion[] - export { texteVersionArray as texte_version } + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ texte_version: texteVersionArray } = data)
@@ -51,18 +51,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/texte_version/[id].svelte b/src/routes/texte_version/[id].svelte deleted file mode 100644 index 0095b7d..0000000 --- a/src/routes/texte_version/[id].svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
-

TEXTE_VERSION

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/texte_version/[id].ts b/src/routes/texte_version/[id]/+page.server.ts similarity index 51% rename from src/routes/texte_version/[id].ts rename to src/routes/texte_version/[id]/+page.server.ts index dfe9b35..23aaf6b 100644 --- a/src/routes/texte_version/[id].ts +++ b/src/routes/texte_version/[id]/+page.server.ts @@ -1,10 +1,11 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import type { TexteVersion } from "$lib/legal" import { db } from "$lib/server/database" -export const GET: RequestHandler = async ({ params }) => { +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { const texteVersion = ( await db<{ data: TexteVersion }[]>` SELECT data FROM texte_version @@ -13,9 +14,7 @@ export const GET: RequestHandler = async ({ params }) => { ).map(({ data }) => data)[0] if (texteVersion === undefined) { - return { status: 404 } - } - return { - body: { texte_version: texteVersion as unknown as JSONObject }, + throw error(404, `Texte version ${params.id} non trouvé`) } + return { texte_version: texteVersion } } diff --git a/src/routes/texte_version/[id]/+page.svelte b/src/routes/texte_version/[id]/+page.svelte new file mode 100644 index 0000000..6b5be11 --- /dev/null +++ b/src/routes/texte_version/[id]/+page.svelte @@ -0,0 +1,37 @@ + + +
+

TEXTE_VERSION

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/textekali/index.ts b/src/routes/textekali/+page.server.ts similarity index 79% rename from src/routes/textekali/index.ts rename to src/routes/textekali/+page.server.ts index 5f06d97..2b1e66e 100644 --- a/src/routes/textekali/index.ts +++ b/src/routes/textekali/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { Textekali } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { textekali: textekaliArray as unknown as JSONObject[] }, - } + return { textekali: textekaliArray } } diff --git a/src/routes/textekali/index.svelte b/src/routes/textekali/+page.svelte similarity index 71% rename from src/routes/textekali/index.svelte rename to src/routes/textekali/+page.svelte index 44053cf..439fb02 100644 --- a/src/routes/textekali/index.svelte +++ b/src/routes/textekali/+page.svelte @@ -1,17 +1,21 @@
@@ -51,18 +55,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/textekali/[id].svelte b/src/routes/textekali/[id].svelte deleted file mode 100644 index 467bda3..0000000 --- a/src/routes/textekali/[id].svelte +++ /dev/null @@ -1,42 +0,0 @@ - - -
-

TEXTEKALI

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/textekali/[id].ts b/src/routes/textekali/[id]/+page.server.ts similarity index 50% rename from src/routes/textekali/[id].ts rename to src/routes/textekali/[id]/+page.server.ts index 835c1fb..67336c3 100644 --- a/src/routes/textekali/[id].ts +++ b/src/routes/textekali/[id]/+page.server.ts @@ -1,10 +1,11 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import type { Textekali } from "$lib/legal" import { db } from "$lib/server/database" -export const GET: RequestHandler = async ({ params }) => { +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { const textekali = ( await db<{ data: Textekali }[]>` SELECT data FROM textekali @@ -13,9 +14,7 @@ export const GET: RequestHandler = async ({ params }) => { ).map(({ data }) => data)[0] if (textekali === undefined) { - return { status: 404 } - } - return { - body: { textekali: textekali as unknown as JSONObject }, + throw error(404, `Texte KALI ${params.id} non trouvé`) } + return { textekali } } diff --git a/src/routes/textekali/[id]/+page.svelte b/src/routes/textekali/[id]/+page.svelte new file mode 100644 index 0000000..729eeeb --- /dev/null +++ b/src/routes/textekali/[id]/+page.svelte @@ -0,0 +1,37 @@ + + +
+

TEXTEKALI

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/textelr/index.ts b/src/routes/textelr/+page.server.ts similarity index 79% rename from src/routes/textelr/index.ts rename to src/routes/textelr/+page.server.ts index 7c12e57..4cf439f 100644 --- a/src/routes/textelr/index.ts +++ b/src/routes/textelr/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { Textelr } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -65,7 +58,5 @@ export const GET: RequestHandler = async ({ url }) => { LIMIT ${limit} ` ).map(({ data }) => data) - return { - body: { textelr: textelrArray as unknown as JSONObject[] }, - } + return { textelr: textelrArray } } diff --git a/src/routes/textelr/index.svelte b/src/routes/textelr/+page.svelte similarity index 72% rename from src/routes/textelr/index.svelte rename to src/routes/textelr/+page.svelte index a62bc53..061bc54 100644 --- a/src/routes/textelr/index.svelte +++ b/src/routes/textelr/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { Textelr } from "$lib/legal" import { summarizeTextelrProperties } from "$lib/summaries" - export let error: unknown - let textelrArray: Textelr[] - export { textelrArray as textelr } + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ textelr: textelrArray } = data)
@@ -51,18 +51,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/textelr/[id].svelte b/src/routes/textelr/[id].svelte deleted file mode 100644 index 94bb743..0000000 --- a/src/routes/textelr/[id].svelte +++ /dev/null @@ -1,38 +0,0 @@ - - -
-

TEXTELR

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/textelr/[id].ts b/src/routes/textelr/[id].ts deleted file mode 100644 index ed63ce6..0000000 --- a/src/routes/textelr/[id].ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" - -import type { Textelr } from "$lib/legal" -import { db } from "$lib/server/database" - -export const GET: RequestHandler = async ({ params }) => { - const textelr = ( - await db<{ data: Textelr }[]>` - SELECT data FROM textelr - WHERE id = ${params.id} - ` - ).map(({ data }) => data)[0] - - if (textelr === undefined) { - return { status: 404 } - } - return { - body: { textelr: textelr as unknown as JSONObject }, - } -} diff --git a/src/routes/textelr/[id]/+page.server.ts b/src/routes/textelr/[id]/+page.server.ts new file mode 100644 index 0000000..125ef4a --- /dev/null +++ b/src/routes/textelr/[id]/+page.server.ts @@ -0,0 +1,20 @@ +import { error } from "@sveltejs/kit" + +import type { Textelr } from "$lib/legal" +import { db } from "$lib/server/database" + +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { + const textelr = ( + await db<{ data: Textelr }[]>` + SELECT data FROM textelr + WHERE id = ${params.id} + ` + ).map(({ data }) => data)[0] + + if (textelr === undefined) { + throw error(404, `Texte LR ${params.id} non trouvé`) + } + return { textelr: textelr } +} diff --git a/src/routes/textelr/[id]/+page.svelte b/src/routes/textelr/[id]/+page.svelte new file mode 100644 index 0000000..e941d59 --- /dev/null +++ b/src/routes/textelr/[id]/+page.svelte @@ -0,0 +1,33 @@ + + +
+

TEXTELR

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/src/routes/versions/index.ts b/src/routes/versions/+page.server.ts similarity index 79% rename from src/routes/versions/index.ts rename to src/routes/versions/+page.server.ts index bd5cfb4..0b30fcc 100644 --- a/src/routes/versions/index.ts +++ b/src/routes/versions/+page.server.ts @@ -1,11 +1,12 @@ import { type Audit, auditSetNullish, cleanAudit } from "@auditors/core" -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import { auditSearchQueryContent } from "$lib/auditors/queries" import type { VersionsWrapper } from "$lib/legal" import { db } from "$lib/server/database" +import type { PageServerLoad } from "./$types" + export function auditQuery( audit: Audit, query: URLSearchParams, @@ -33,7 +34,7 @@ export function auditQuery( return audit.reduceRemaining(data, errors, remainingKeys, auditSetNullish({})) } -export const GET: RequestHandler = async ({ url }) => { +export const load: PageServerLoad = async ({ url }) => { const [query, queryError] = auditQuery(cleanAudit, url.searchParams) as [ { limit: number; offset: number; q?: string }, unknown, @@ -46,15 +47,7 @@ export const GET: RequestHandler = async ({ url }) => { 2, )}\n\nError:\n${JSON.stringify(queryError, null, 2)}`, ) - return { - // status: 400, - - body: { - error: { - query: queryError as unknown as JSONObject, - }, - }, - } + throw error(400, JSON.stringify(queryError, null, 2)) } const { limit, offset } = query @@ -63,7 +56,5 @@ export const GET: RequestHandler = async ({ url }) => { OFFSET ${offset} LIMIT ${limit} ` - return { - body: { versions: versionsWrapper as unknown as JSONObject[] }, - } + return { versions: versionsWrapper } } diff --git a/src/routes/versions/index.svelte b/src/routes/versions/+page.svelte similarity index 71% rename from src/routes/versions/index.svelte rename to src/routes/versions/+page.svelte index 4333786..acaefac 100644 --- a/src/routes/versions/index.svelte +++ b/src/routes/versions/+page.svelte @@ -4,14 +4,14 @@ import { TreeView } from "augmented-data-viewer" // import { page } from "$app/stores" - import ErrorAlert from "$lib/components/errors/ErrorAlert.svelte" import Pagination from "$lib/components/Pagination.svelte" - import type { VersionsWrapper } from "$lib/legal" import { summarizeVersionsWrapperProperties } from "$lib/summaries" - let versionsWrapper: VersionsWrapper[] - export { versionsWrapper as versions } - export let error: unknown + import type { PageData } from "./$types" + + export let data: PageData + + $: ({ versions: versionsWrapper } = data)
@@ -51,18 +51,12 @@ --> -{#if error != null} - -{/if} + -{#if error == null} - - - -{/if} + diff --git a/src/routes/versions/[...eli].svelte b/src/routes/versions/[...eli].svelte deleted file mode 100644 index 61b4475..0000000 --- a/src/routes/versions/[...eli].svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
-

VERSIONS

- {#if summary !== undefined} -

- -

- {/if} -
- -{#if error != null} - -{/if} - -{#if error == null} - -{/if} diff --git a/src/routes/versions/[...eli].ts b/src/routes/versions/[...eli]/+page.server.ts similarity index 50% rename from src/routes/versions/[...eli].ts rename to src/routes/versions/[...eli]/+page.server.ts index d08db5c..f9bd499 100644 --- a/src/routes/versions/[...eli].ts +++ b/src/routes/versions/[...eli]/+page.server.ts @@ -1,10 +1,11 @@ -import type { RequestHandler } from "@sveltejs/kit" -import type { JSONObject } from "@sveltejs/kit/types/private" +import { error } from "@sveltejs/kit" import type { VersionsWrapper } from "$lib/legal" import { db } from "$lib/server/database" -export const GET: RequestHandler = async ({ params }) => { +import type { PageServerLoad } from "./$types" + +export const load: PageServerLoad = async ({ params }) => { const versionsWrapper = ( await db<{ data: VersionsWrapper }[]>` SELECT eli, id, data FROM versions @@ -13,9 +14,7 @@ export const GET: RequestHandler = async ({ params }) => { )[0] if (versionsWrapper === undefined) { - return { status: 404 } - } - return { - body: { versions: versionsWrapper as unknown as JSONObject }, + throw error(404, `Versions ${params.eli} non trouvé`) } + return { versions: versionsWrapper } } diff --git a/src/routes/versions/[...eli]/+page.svelte b/src/routes/versions/[...eli]/+page.svelte new file mode 100644 index 0000000..5d77d83 --- /dev/null +++ b/src/routes/versions/[...eli]/+page.svelte @@ -0,0 +1,37 @@ + + +
+

VERSIONS

+ {#if summary !== undefined} +

+ +

+ {/if} +
+ + diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 61fffc9..ee55bf5 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -4,6 +4,7 @@ const typography = require("@tailwindcss/typography") const config = { content: [ "./src/**/*.{html,js,svelte,ts}", + "./node_modules/@tricoteuses/explorer-tools/**/*.{html,js,svelte,ts}", "./node_modules/augmented-data-viewer/**/*.{html,js,svelte,ts}", ],