diff --git a/package.json b/package.json index ca55ddb..2d73d02 100644 --- a/package.json +++ b/package.json @@ -21,11 +21,16 @@ "svelte": "^5.1.0", "svelte-check": "^4.0.0", "tailwindcss": "^4.0.0", + "ts-node": "^10.9.2", + "tsx": "^4.22.4", "typescript": "^6.0.3", "vite": "^8.1.0", "vitest": "^4.1.9", "wrangler": "^4.105.0" }, + "engines": { + "node": ">=22.20" + }, "packageManager": "pnpm@11.9.0+sha512.bd682d5d03fe525ef7c9fd6780c6884d1e756ac4c9c9fe00c538782824310dcf90e3ddc4f53835f06dfaebd5085e41855e0bcbb3b60de2ac5bbab89e5036f03b", "dependencies": { "mdsvex": "^0.12.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6080dd..16bbb4d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,16 +20,16 @@ importers: devDependencies: '@sveltejs/adapter-cloudflare': specifier: ^7.2.9 - version: 7.2.9(@sveltejs/kit@2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(wrangler@4.105.0(@cloudflare/workers-types@4.20260627.1)) + version: 7.2.9(@sveltejs/kit@2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(wrangler@4.105.0(@cloudflare/workers-types@4.20260627.1)) '@sveltejs/kit': specifier: ^2.8.0 - version: 2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + version: 2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) '@sveltejs/vite-plugin-svelte': specifier: ^7.1.2 - version: 7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + version: 7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) '@tailwindcss/vite': specifier: ^4.0.0 - version: 4.3.1(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + version: 4.3.1(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) '@types/mdast': specifier: ^4.0.4 version: 4.0.4 @@ -42,15 +42,21 @@ importers: tailwindcss: specifier: ^4.0.0 version: 4.3.1 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@26.0.1)(typescript@6.0.3) + tsx: + specifier: ^4.22.4 + version: 4.22.4 typescript: specifier: ^6.0.3 version: 6.0.3 vite: specifier: ^8.1.0 - version: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) + version: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) vitest: specifier: ^4.1.9 - version: 4.1.9(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + version: 4.1.9(@types/node@26.0.1)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) wrangler: specifier: ^4.105.0 version: 4.105.0(@cloudflare/workers-types@4.20260627.1) @@ -736,6 +742,18 @@ packages: peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 + '@tsconfig/node10@1.0.12': + resolution: {integrity: sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} @@ -757,6 +775,9 @@ packages: '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/node@26.0.1': + resolution: {integrity: sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==} + '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -798,11 +819,18 @@ packages: '@vitest/utils@4.1.9': resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==} + acorn-walk@8.3.5: + resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} + engines: {node: '>=0.4.0'} + acorn@8.17.0: resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} engines: {node: '>=0.4.0'} hasBin: true + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + aria-query@5.3.1: resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} engines: {node: '>= 0.4'} @@ -853,6 +881,9 @@ packages: resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} engines: {node: '>=18'} + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -871,6 +902,10 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + diff@4.0.4: + resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} + engines: {node: '>=0.3.1'} + enhanced-resolve@5.21.6: resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} engines: {node: '>=10.13.0'} @@ -1021,6 +1056,9 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + mdast-util-to-hast@13.2.1: resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} @@ -1209,14 +1247,36 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.22.4: + resolution: {integrity: sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==} + engines: {node: '>=18.0.0'} + hasBin: true + typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + undici@7.28.0: resolution: {integrity: sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==} engines: {node: '>=20.18.1'} @@ -1251,6 +1311,9 @@ packages: unist-util-visit@5.1.0: resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + vfile-message@2.0.4: resolution: {integrity: sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==} @@ -1388,6 +1451,10 @@ packages: utf-8-validate: optional: true + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + youch-core@0.3.3: resolution: {integrity: sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==} @@ -1769,18 +1836,18 @@ snapshots: dependencies: acorn: 8.17.0 - '@sveltejs/adapter-cloudflare@7.2.9(@sveltejs/kit@2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(wrangler@4.105.0(@cloudflare/workers-types@4.20260627.1))': + '@sveltejs/adapter-cloudflare@7.2.9(@sveltejs/kit@2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(wrangler@4.105.0(@cloudflare/workers-types@4.20260627.1))': dependencies: '@cloudflare/workers-types': 4.20260627.1 - '@sveltejs/kit': 2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + '@sveltejs/kit': 2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) worktop: 0.8.0-next.18 wrangler: 4.105.0(@cloudflare/workers-types@4.20260627.1) - '@sveltejs/kit@2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0))': + '@sveltejs/kit@2.68.0(@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)))(svelte@5.56.4)(typescript@6.0.3)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4))': dependencies: '@standard-schema/spec': 1.1.0 '@sveltejs/acorn-typescript': 1.0.10(acorn@8.17.0) - '@sveltejs/vite-plugin-svelte': 7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + '@sveltejs/vite-plugin-svelte': 7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) '@types/cookie': 0.6.0 acorn: 8.17.0 cookie: 0.6.0 @@ -1792,20 +1859,20 @@ snapshots: set-cookie-parser: 3.1.1 sirv: 3.0.2 svelte: 5.56.4 - vite: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) + vite: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) optionalDependencies: typescript: 6.0.3 '@sveltejs/load-config@0.2.0': {} - '@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0))': + '@sveltejs/vite-plugin-svelte@7.1.2(svelte@5.56.4)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4))': dependencies: deepmerge: 4.3.1 magic-string: 0.30.21 obug: 2.1.3 svelte: 5.56.4 - vite: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) - vitefu: 1.1.3(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + vite: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) + vitefu: 1.1.3(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) '@tailwindcss/node@4.3.1': dependencies: @@ -1868,12 +1935,20 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.1 '@tailwindcss/oxide-win32-x64-msvc': 4.3.1 - '@tailwindcss/vite@4.3.1(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0))': + '@tailwindcss/vite@4.3.1(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4))': dependencies: '@tailwindcss/node': 4.3.1 '@tailwindcss/oxide': 4.3.1 tailwindcss: 4.3.1 - vite: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) + vite: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) + + '@tsconfig/node10@1.0.12': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} '@tybys/wasm-util@0.10.3': dependencies: @@ -1899,6 +1974,10 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/node@26.0.1': + dependencies: + undici-types: 8.3.0 + '@types/trusted-types@2.0.7': {} '@types/unist@2.0.11': {} @@ -1916,13 +1995,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.9(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0))': + '@vitest/mocker@4.1.9(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4))': dependencies: '@vitest/spy': 4.1.9 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) + vite: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) '@vitest/pretty-format@4.1.9': dependencies: @@ -1948,8 +2027,14 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 + acorn-walk@8.3.5: + dependencies: + acorn: 8.17.0 + acorn@8.17.0: {} + arg@4.1.3: {} + aria-query@5.3.1: {} assertion-error@2.0.1: {} @@ -1980,6 +2065,8 @@ snapshots: cookie@1.1.1: {} + create-require@1.1.1: {} + deepmerge@4.3.1: {} dequal@2.0.3: {} @@ -1992,6 +2079,8 @@ snapshots: dependencies: dequal: 2.0.3 + diff@4.0.4: {} + enhanced-resolve@5.21.6: dependencies: graceful-fs: 4.2.11 @@ -2134,6 +2223,8 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 + make-error@1.3.6: {} + mdast-util-to-hast@13.2.1: dependencies: '@types/hast': 3.0.4 @@ -2382,11 +2473,37 @@ snapshots: trim-lines@3.0.1: {} + ts-node@10.9.2(@types/node@26.0.1)(typescript@6.0.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.12 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 26.0.1 + acorn: 8.17.0 + acorn-walk: 8.3.5 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.4 + make-error: 1.3.6 + typescript: 6.0.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + tslib@2.8.1: optional: true + tsx@4.22.4: + dependencies: + esbuild: 0.28.1 + optionalDependencies: + fsevents: 2.3.3 + typescript@6.0.3: {} + undici-types@8.3.0: {} + undici@7.28.0: {} unenv@2.0.0-rc.24: @@ -2433,6 +2550,8 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 + v8-compile-cache-lib@3.0.1: {} + vfile-message@2.0.4: dependencies: '@types/unist': 2.0.11 @@ -2448,7 +2567,7 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0): + vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -2456,18 +2575,20 @@ snapshots: rolldown: 1.1.3 tinyglobby: 0.2.17 optionalDependencies: + '@types/node': 26.0.1 esbuild: 0.28.1 fsevents: 2.3.3 jiti: 2.7.0 + tsx: 4.22.4 - vitefu@1.1.3(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)): + vitefu@1.1.3(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)): optionalDependencies: - vite: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) + vite: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) - vitest@4.1.9(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)): + vitest@4.1.9(@types/node@26.0.1)(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)): dependencies: '@vitest/expect': 4.1.9 - '@vitest/mocker': 4.1.9(vite@8.1.0(esbuild@0.28.1)(jiti@2.7.0)) + '@vitest/mocker': 4.1.9(vite@8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4)) '@vitest/pretty-format': 4.1.9 '@vitest/runner': 4.1.9 '@vitest/snapshot': 4.1.9 @@ -2484,8 +2605,10 @@ snapshots: tinyexec: 1.2.4 tinyglobby: 0.2.17 tinyrainbow: 3.1.0 - vite: 8.1.0(esbuild@0.28.1)(jiti@2.7.0) + vite: 8.1.0(@types/node@26.0.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.22.4) why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 26.0.1 transitivePeerDependencies: - msw @@ -2526,6 +2649,8 @@ snapshots: ws@8.21.0: {} + yn@3.1.1: {} + youch-core@0.3.3: dependencies: '@poppinss/exception': 1.2.3 diff --git a/src/lib/docs-content/remark-code-blocks.js b/src/lib/docs-content/remark-code-blocks.ts similarity index 56% rename from src/lib/docs-content/remark-code-blocks.js rename to src/lib/docs-content/remark-code-blocks.ts index 09e9edc..04e2802 100644 --- a/src/lib/docs-content/remark-code-blocks.js +++ b/src/lib/docs-content/remark-code-blocks.ts @@ -1,43 +1,38 @@ -// @ts-check -import { createHighlighter, createCssVariablesTheme } from 'shiki'; +import { createHighlighter, createCssVariablesTheme, type Highlighter } from 'shiki'; +import type { Root } from 'mdast'; import { visit } from 'unist-util-visit'; -const cssVarsTheme = createCssVariablesTheme({ name: 'css-variables', variablePrefix: '--shiki-', fontStyle: true }); +declare global { + // eslint-disable-next-line no-var + var __shikiHighlighterPromise: Promise | undefined; +} -/** @type {import('shiki').Highlighter | undefined} */ -let hl; +const cssVarsTheme = createCssVariablesTheme({ name: 'css-variables', variablePrefix: '--shiki-', fontStyle: true }); -async function getHighlighter() { - if (!hl) { - hl = await createHighlighter({ - themes: [cssVarsTheme], - langs: [ - 'bash', 'sh', 'shell', - 'json', 'jsonc', 'yaml', 'toml', - 'typescript', 'javascript', 'jsx', 'tsx', - 'svelte', - 'markdown', - 'rust', 'go', - 'sql', - 'python', - 'html', 'css', - 'diff', - 'text' - ] - }); - } - return hl; +if (!globalThis.__shikiHighlighterPromise) { + globalThis.__shikiHighlighterPromise = createHighlighter({ + themes: [cssVarsTheme], + langs: [ + 'bash', 'sh', 'shell', + 'json', 'jsonc', 'yaml', 'toml', + 'typescript', 'javascript', 'jsx', 'tsx', + 'svelte', + 'markdown', + 'rust', 'go', + 'sql', + 'python', + 'html', 'css', + 'diff', + 'text' + ] + }); } -/** - * Converts fenced code blocks to component tags with Shiki-highlighted - * HTML pre-rendered at build time using the css-variables theme. - * - * @returns {(tree: import('mdast').Root) => Promise} - */ -export function remarkCodeBlocks() { +const highlighterPromise: Promise = globalThis.__shikiHighlighterPromise; + +export function remarkCodeBlocks(): (tree: Root) => Promise { return async (tree) => { - const highlighter = await getHighlighter(); + const highlighter = await highlighterPromise; const supported = new Set(highlighter.getLoadedLanguages()); visit(tree, 'code', (node, index, parent) => { @@ -69,7 +64,7 @@ export function remarkCodeBlocks() { .filter(Boolean) .join(' '); - /** @type {any} */ (parent.children)[index] = { + (parent.children as any[])[index] = { type: 'html', value: `` }; diff --git a/svelte.config.js b/svelte.config.ts similarity index 90% rename from svelte.config.js rename to svelte.config.ts index 417a321..f27b50f 100644 --- a/svelte.config.js +++ b/svelte.config.ts @@ -2,8 +2,10 @@ import adapter from '@sveltejs/adapter-cloudflare'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { mdsvex } from 'mdsvex'; import { resolve } from 'path'; +import type { Config } from '@sveltejs/kit'; +import type { PreprocessorGroup } from 'svelte/compiler'; import { remarkCallouts } from './src/lib/docs-content/remark-callouts.js'; -import { remarkCodeBlocks } from './src/lib/docs-content/remark-code-blocks.js'; +import { remarkCodeBlocks } from './src/lib/docs-content/remark-code-blocks.ts'; /** * Post-mdsvex preprocessor: injects Callout/CodeBlock imports into .svx files. @@ -13,7 +15,7 @@ import { remarkCodeBlocks } from './src/lib/docs-content/remark-code-blocks.js'; * This preprocessor runs after mdsvex and injects the required imports so * Svelte can resolve the component names at compile time. */ -function injectDocComponents() { +function injectDocComponents(): PreprocessorGroup { return { markup({ content, filename }) { if (!filename?.endsWith('.svx')) return; @@ -37,8 +39,7 @@ function injectDocComponents() { }; } -/** @type {import('@sveltejs/kit').Config} */ -const config = { +const config: Config = { extensions: ['.svelte', '.svx'], preprocess: [ vitePreprocess(), diff --git a/wrangler.jsonc b/wrangler.jsonc index e36fd5b..67d757a 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -1,8 +1,7 @@ { - // Pages project — no "main" entry, so wrangler treats this as Pages, not a Worker. - // pages_build_output_dir is the key field that signals this distinction. + "$schema": "./node_modules/wrangler/config-schema.json", "name": "coveragetracker-dev", "pages_build_output_dir": ".svelte-kit/cloudflare", - "compatibility_date": "2024-11-01", + "compatibility_date": "2026-06-16", "compatibility_flags": ["nodejs_compat"] }