diff --git a/sites/svelte.dev/package-lock.json b/sites/svelte.dev/package-lock.json index 0f5717799d..09940bb908 100644 --- a/sites/svelte.dev/package-lock.json +++ b/sites/svelte.dev/package-lock.json @@ -19,30 +19,30 @@ }, "devDependencies": { "@resvg/resvg-js": "^2.4.1", - "@sveltejs/adapter-vercel": "^2.4.2", - "@sveltejs/kit": "^1.15.7", + "@sveltejs/adapter-vercel": "^2.4.3", + "@sveltejs/kit": "^1.16.3", "@sveltejs/site-kit": "^5.0.4", - "@types/marked": "^4.0.8", + "@types/marked": "^4.3.0", "@types/prismjs": "^1.26.0", "degit": "^2.8.4", "dotenv": "^16.0.3", "jimp": "^0.22.7", - "marked": "^4.3.0", + "marked": "^5.0.1", "node-fetch": "^3.3.1", - "prettier": "^2.8.7", + "prettier": "^2.8.8", "prettier-plugin-svelte": "^2.10.0", "prism-svelte": "^0.5.0", "prismjs": "^1.29.0", - "satori": "^0.4.14", + "satori": "^0.7.4", "satori-html": "^0.3.2", "shelljs": "^0.8.5", - "shiki": "^0.14.1", - "shiki-twoslash": "^3.1.1", - "svelte": "^3.58.0", - "svelte-check": "^3.2.0", + "shiki": "^0.14.2", + "shiki-twoslash": "^3.1.2", + "svelte": "^3.59.1", + "svelte-check": "^3.3.2", "typescript": "^5.0.4", - "vite": "^4.3.0", - "vite-imagetools": "^4.0.19" + "vite": "^4.3.5", + "vite-imagetools": "^5.0.3" } }, "node_modules/@esbuild/android-arm": { @@ -1229,9 +1229,9 @@ } }, "node_modules/@sveltejs/kit": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.15.9.tgz", - "integrity": "sha512-Og+4WlguPVPS0PmAHefp4KxvTVZfyDN09aORVXIdKSzqzodSJiLs7Fhi/Q0z0YjmcoNLWF24tI0a6mTusL6Yfg==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.16.3.tgz", + "integrity": "sha512-8uv0udYRpVuE1BweFidcWHfL+u2gAANKmvIal1dN/FWPBl7DJYbt9zYEtr3bNTiXystT8Sn0Wp54RfwpbPqHjQ==", "hasInstallScript": true, "dependencies": { "@sveltejs/vite-plugin-svelte": "^2.1.1", @@ -1243,7 +1243,7 @@ "magic-string": "^0.30.0", "mime": "^3.0.0", "sade": "^1.8.1", - "set-cookie-parser": "^2.5.1", + "set-cookie-parser": "^2.6.0", "sirv": "^2.0.2", "tiny-glob": "^0.2.9", "undici": "~5.22.0" @@ -1342,9 +1342,9 @@ "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==" }, "node_modules/@types/marked": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.8.tgz", - "integrity": "sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-zK4gSFMjgslsv5Lyvr3O1yCjgmnE4pr8jbG8qVn4QglMwtpvPCf4YT2Wma7Nk95OxUUJI8Z+kzdXohbM7mVpGw==", "dev": true }, "node_modules/@types/node": { @@ -2470,12 +2470,12 @@ "dev": true }, "node_modules/imagetools-core": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/imagetools-core/-/imagetools-core-3.3.1.tgz", - "integrity": "sha512-xllF2GDRg0SXCQQRxBAtE6N9dPAttc+ro+QDLnRmVSE5lH5clQxD2Al4XluirXj0T7lIH5VbetFmBLowW6ps+w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/imagetools-core/-/imagetools-core-4.0.2.tgz", + "integrity": "sha512-VG5x5MA2W5aQEBMFmk2rgRt+apkR6MSqxLgkw2QDfhOXsS+2R2dCMTjdlcEWUrn8M291bbsW4A15yF5YODc5Dw==", "dev": true, "dependencies": { - "sharp": "^0.31.3" + "sharp": "^0.32.0" }, "engines": { "node": ">=12.0.0" @@ -2783,15 +2783,15 @@ } }, "node_modules/marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.1.tgz", + "integrity": "sha512-Nn9peC4lvIZdcfp8Uze6xk4ZYowkcj/K6+e/6rLHadhtjqeip/bYRxMgt3124IGGJ3RPs2uX5YVmAGbUutY18g==", "dev": true, "bin": { "marked": "bin/marked.js" }, "engines": { - "node": ">= 12" + "node": ">= 18" } }, "node_modules/merge2": { @@ -2995,9 +2995,9 @@ } }, "node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==", "dev": true }, "node_modules/node-domexception": { @@ -3622,9 +3622,9 @@ } }, "node_modules/satori": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/satori/-/satori-0.4.14.tgz", - "integrity": "sha512-zzkxey12UY6T1rQUhbgPAxeSBL5AJM7aefM4jX3TijN0I8LOHDUX4mh2MXEuqMWUgzV32aR/0nwPka7Eu42wYA==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/satori/-/satori-0.7.4.tgz", + "integrity": "sha512-LG/s98vpB7JGREfK1HNrAoUezRg/dyKyn8AuRG190j3Puq3xzt9S8Q6eUeA/1IpBgguNR0xvnucEOVB6+a2yGg==", "dev": true, "dependencies": { "@shuding/opentype.js": "1.4.0-beta.0", @@ -3683,17 +3683,17 @@ "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" }, "node_modules/sharp": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", - "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", + "version": "0.32.1", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.1.tgz", + "integrity": "sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg==", "dev": true, "hasInstallScript": true, "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", + "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.3.8", + "semver": "^7.5.0", "simple-get": "^4.0.1", "tar-fs": "^2.1.1", "tunnel-agent": "^0.6.0" @@ -3974,17 +3974,17 @@ } }, "node_modules/svelte": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.58.0.tgz", - "integrity": "sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==", + "version": "3.59.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.1.tgz", + "integrity": "sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==", "engines": { "node": ">= 8" } }, "node_modules/svelte-check": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.2.0.tgz", - "integrity": "sha512-6ZnscN8dHEN5Eq5LgIzjj07W9nc9myyBH+diXsUAuiY/3rt0l65/LCIQYlIuoFEjp2F1NhXqZiJwV9omPj9tMw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.3.2.tgz", + "integrity": "sha512-67j3rI0LDc2DvL0ON/2pvCasVVD3nHDrTkZNr4eITNfo2oFXdw7SIyMOiFj4swu+pjmFQAigytBK1IWyik8dBw==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", @@ -4335,9 +4335,9 @@ "dev": true }, "node_modules/vite": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.3.tgz", - "integrity": "sha512-MwFlLBO4udZXd+VBcezo3u8mC77YQk+ik+fbc0GZWGgzfbPP+8Kf0fldhARqvSYmtIWoAJ5BXPClUbMTlqFxrA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==", "dependencies": { "esbuild": "^0.17.5", "postcss": "^8.4.23", @@ -4382,13 +4382,13 @@ } }, "node_modules/vite-imagetools": { - "version": "4.0.19", - "resolved": "https://registry.npmjs.org/vite-imagetools/-/vite-imagetools-4.0.19.tgz", - "integrity": "sha512-vZaPsjLDgEqZrbj+ZsniRKthmoj4mvVrMOK/FZhRAbrVB4LOsil0BO2Gcq20e/JRlom4DzqtLw1UQUkfcqgCrA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/vite-imagetools/-/vite-imagetools-5.0.3.tgz", + "integrity": "sha512-K4578Kq7d608i4U/tCPfHVn9iOIUd+VyjtxuFtp3wSXOJZbsAZNc7V3G53s8LHiDY+ROKeoWyfXtq1VwTv9UFQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.0", - "imagetools-core": "^3.3.1" + "imagetools-core": "^4.0.2" }, "engines": { "node": ">=12.0.0" diff --git a/sites/svelte.dev/package.json b/sites/svelte.dev/package.json index f87bc5ee0f..cf0d5c2dba 100644 --- a/sites/svelte.dev/package.json +++ b/sites/svelte.dev/package.json @@ -27,29 +27,29 @@ }, "devDependencies": { "@resvg/resvg-js": "^2.4.1", - "@sveltejs/adapter-vercel": "^2.4.2", - "@sveltejs/kit": "^1.15.7", + "@sveltejs/adapter-vercel": "^2.4.3", + "@sveltejs/kit": "^1.16.3", "@sveltejs/site-kit": "^5.0.4", - "@types/marked": "^4.0.8", + "@types/marked": "^4.3.0", "@types/prismjs": "^1.26.0", "degit": "^2.8.4", "dotenv": "^16.0.3", "jimp": "^0.22.7", - "marked": "^4.3.0", + "marked": "^5.0.1", "node-fetch": "^3.3.1", - "prettier": "^2.8.7", + "prettier": "^2.8.8", "prettier-plugin-svelte": "^2.10.0", "prism-svelte": "^0.5.0", "prismjs": "^1.29.0", - "satori": "^0.4.14", + "satori": "^0.7.4", "satori-html": "^0.3.2", "shelljs": "^0.8.5", - "shiki": "^0.14.1", - "shiki-twoslash": "^3.1.1", - "svelte": "^3.58.0", - "svelte-check": "^3.2.0", + "shiki": "^0.14.2", + "shiki-twoslash": "^3.1.2", + "svelte": "^3.59.1", + "svelte-check": "^3.3.2", "typescript": "^5.0.4", - "vite": "^4.3.0", - "vite-imagetools": "^4.0.19" + "vite": "^4.3.5", + "vite-imagetools": "^5.0.3" } } diff --git a/sites/svelte.dev/src/routes/(authed)/repl/[id].json/+server.js b/sites/svelte.dev/src/routes/(authed)/repl/[id].json/+server.js index 7b72caa79f..cb791723db 100644 --- a/sites/svelte.dev/src/routes/(authed)/repl/[id].json/+server.js +++ b/sites/svelte.dev/src/routes/(authed)/repl/[id].json/+server.js @@ -1,10 +1,10 @@ import { dev } from '$app/environment'; import { client } from '$lib/db/client'; import * as gist from '$lib/db/gist'; +import examples_data from '$lib/generated/examples-data.js'; import { get_example } from '$lib/server/examples'; -import { get_examples_list } from '$lib/server/examples/get-examples'; +import { get_examples_data, get_examples_list } from '$lib/server/examples/get-examples'; import { error, json } from '@sveltejs/kit'; -import examples_data from '$lib/generated/examples-data.js'; export const prerender = 'auto'; @@ -87,9 +87,17 @@ export async function GET({ params }) { return json({ id: params.id, name: app.name, + // @ts-ignore owner: app.userid, relaxed: false, // @ts-expect-error app.files has a `source` property components: munge(app.files) }); } + +/** @type {import('./$types.js').EntryGenerator} */ +export async function entries() { + return get_examples_list(get_examples_data()) + .map(({ examples }) => examples) + .flatMap((val) => val.map(({ slug }) => ({ id: slug }))); +} diff --git a/sites/svelte.dev/src/routes/+page.svelte b/sites/svelte.dev/src/routes/+page.svelte index 5506f9ae55..e55e130df9 100644 --- a/sites/svelte.dev/src/routes/+page.svelte +++ b/sites/svelte.dev/src/routes/+page.svelte @@ -1,6 +1,6 @@