From 48f1ddc0b4595f3a00803ef019dc245e34c8c246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 10:58:05 +0200 Subject: [PATCH 1/7] chore: express demo --- examples/express/CHANGELOG.md | 188 ++++++ examples/express/express-entry.ts | 95 +++ examples/express/package.json | 31 + examples/express/pages/+config.ts | 8 + examples/express/pages/index/+Page.tsx | 17 + examples/express/pages/index/Counter.tsx | 12 + examples/express/server/vike-handler.ts | 19 + examples/express/tsconfig.json | 18 + examples/express/vite.config.ts | 17 + pnpm-lock.yaml | 805 ++++++++++++++++++++++- 10 files changed, 1206 insertions(+), 4 deletions(-) create mode 100755 examples/express/CHANGELOG.md create mode 100644 examples/express/express-entry.ts create mode 100755 examples/express/package.json create mode 100644 examples/express/pages/+config.ts create mode 100644 examples/express/pages/index/+Page.tsx create mode 100644 examples/express/pages/index/Counter.tsx create mode 100644 examples/express/server/vike-handler.ts create mode 100755 examples/express/tsconfig.json create mode 100755 examples/express/vite.config.ts diff --git a/examples/express/CHANGELOG.md b/examples/express/CHANGELOG.md new file mode 100755 index 00000000..cddf6b4d --- /dev/null +++ b/examples/express/CHANGELOG.md @@ -0,0 +1,188 @@ +# vite-plugin-vercel-simple + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@6.0.1 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@6.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@5.0.5 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@5.0.4 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@5.0.3 + +## null + +### Patch Changes + +- vite-plugin-vercel@5.0.2 + +## null + +### Patch Changes + +- vite-plugin-vercel@5.0.1 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@5.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@4.0.2 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@4.0.1 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@4.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@3.0.2 + +## null + +### Patch Changes + +- Updated dependencies [8e7cad4] + - vite-plugin-vercel@3.0.1 + +## null + +### Patch Changes + +- Updated dependencies [ec8dcba] + - vite-plugin-vercel@3.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@2.0.1 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@2.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@1.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.7 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.6 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.5 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@1.0.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.3 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.2 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.1 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.3.0 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.2.2 + +## null + +### Patch Changes + +- Updated dependencies + - vite-plugin-vercel@0.2.1 diff --git a/examples/express/express-entry.ts b/examples/express/express-entry.ts new file mode 100644 index 00000000..da7c68f8 --- /dev/null +++ b/examples/express/express-entry.ts @@ -0,0 +1,95 @@ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { vikeHandler } from './server/vike-handler'; +import { createMiddleware } from '@universal-middleware/express'; +import express from 'express'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const isProduction = process.env.NODE_ENV === 'production'; +const root = __dirname; +const port = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000; +const hmrPort = process.env.HMR_PORT + ? parseInt(process.env.HMR_PORT, 10) + : 24678; + +interface Middleware< + Context extends Record, +> { + ( + request: Request, + context: Context, + ): Response | void | Promise | Promise; +} + +export function handlerAdapter< + Context extends Record, +>(handler: Middleware) { + return createMiddleware( + async (context) => { + const rawRequest = context.platform.request as unknown as Record< + string, + unknown + >; + rawRequest.context ??= {}; + const response = await handler( + context.request, + rawRequest.context as Context, + ); + + if (!response) { + context.passThrough(); + return new Response('', { + status: 404, + }); + } + + return response; + }, + { + alwaysCallNext: false, + }, + ); +} + +export default startServer(); + +async function startServer() { + const app = express(); + + if (isProduction) { + app.use(express.static(`${root}/dist/client`)); + } else { + // Instantiate Vite's development server and integrate its middleware to our server. + // ⚠️ We should instantiate it *only* in development. (It isn't needed in production + // and would unnecessarily bloat our server in production.) + const vite = await import('vite'); + const viteDevMiddleware = ( + await vite.createServer({ + root, + server: { middlewareMode: true, hmr: { port: hmrPort } }, + }) + ).middlewares; + app.use(viteDevMiddleware); + } + + app.get( + '/hello', + handlerAdapter(() => { + console.log('HELLO'); + return new Response('Hello'); + }), + ); + + /** + * Vike route + * + * @link {@see https://vike.dev} + **/ + app.all('*', handlerAdapter(vikeHandler)); + + app.listen(port, () => { + console.log(`Server listening on http://localhost:${port}`); + }); +} diff --git a/examples/express/package.json b/examples/express/package.json new file mode 100755 index 00000000..c131e4c0 --- /dev/null +++ b/examples/express/package.json @@ -0,0 +1,31 @@ +{ + "name": "vite-plugin-vercel-simple", + "private": true, + "version": null, + "description": "", + "type": "module", + "scripts": { + "dev": "tsx ./express-entry.ts", + "build": "vite build", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "keywords": [], + "author": "", + "devDependencies": { + "@types/express": "^4.17.21", + "@types/node": "^18.19.31", + "@universal-middleware/express": "^0.0.2", + "@vercel/node": "^3.0.26", + "@vitejs/plugin-react-swc": "^3.6.0", + "express": "^4.19.2", + "react": "^18.2.0", + "tsx": "^4.16.2", + "typescript": "^5.4.5", + "vike": "^0.4.178", + "vike-react": "^0.4.16", + "vite": "^5.2.9" + }, + "dependencies": { + "vite-plugin-vercel": "workspace:*" + } +} diff --git a/examples/express/pages/+config.ts b/examples/express/pages/+config.ts new file mode 100644 index 00000000..228e864c --- /dev/null +++ b/examples/express/pages/+config.ts @@ -0,0 +1,8 @@ +import vikeReact from 'vike-react/config'; +import type { Config } from 'vike/types'; + +// Default config (can be overridden by pages) +export default { + title: 'My Vike App', + extends: vikeReact, +} satisfies Config; diff --git a/examples/express/pages/index/+Page.tsx b/examples/express/pages/index/+Page.tsx new file mode 100644 index 00000000..ce09e2eb --- /dev/null +++ b/examples/express/pages/index/+Page.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import { Counter } from './Counter.js'; + +export default function Page() { + return ( + <> +

Welcome

+ This page is: +
    +
  • Rendered to HTML.
  • +
  • + Interactive. +
  • +
+ + ); +} diff --git a/examples/express/pages/index/Counter.tsx b/examples/express/pages/index/Counter.tsx new file mode 100644 index 00000000..46393a1e --- /dev/null +++ b/examples/express/pages/index/Counter.tsx @@ -0,0 +1,12 @@ +import React, { useState } from 'react'; + +export { Counter }; + +function Counter() { + const [count, setCount] = useState(0); + return ( + + ); +} diff --git a/examples/express/server/vike-handler.ts b/examples/express/server/vike-handler.ts new file mode 100644 index 00000000..3153f9ba --- /dev/null +++ b/examples/express/server/vike-handler.ts @@ -0,0 +1,19 @@ +/// +import { renderPage } from 'vike/server'; + +export async function vikeHandler< + Context extends Record, +>(request: Request, context?: Context): Promise { + const pageContextInit = { ...context, urlOriginal: request.url }; + const pageContext = await renderPage(pageContextInit); + const response = pageContext.httpResponse; + + const { readable, writable } = new TransformStream(); + + response?.pipe(writable); + + return new Response(readable, { + status: response?.statusCode, + headers: response?.headers, + }); +} diff --git a/examples/express/tsconfig.json b/examples/express/tsconfig.json new file mode 100755 index 00000000..84050321 --- /dev/null +++ b/examples/express/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "strict": true, + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "module": "ESNext", + "noEmit": true, + "moduleResolution": "node", + "target": "ES2022", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "types": ["vite/client"] + } +} diff --git a/examples/express/vite.config.ts b/examples/express/vite.config.ts new file mode 100755 index 00000000..3de45ecf --- /dev/null +++ b/examples/express/vite.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react-swc'; + +import vike from 'vike/plugin'; +import vercel from 'vite-plugin-vercel'; + +export default defineConfig({ + plugins: [ + react(), + vike(), + vercel({ + // `smart` param only exist to circumvent a pnpm issue in this repo + // You should not use this parameter outside this repository + smart: false, + }), + ], +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 456df3cc..1cd79b2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,7 +70,7 @@ importers: version: 5.5.3 vike: specifier: ^0.4.160 - version: 0.4.177(vite@5.3.2(@types/node@18.19.31)) + version: 0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: specifier: ^5.2.9 version: 5.3.2(@types/node@18.19.31) @@ -103,6 +103,49 @@ importers: specifier: ^3.22.4 version: 3.23.8 + examples/express: + dependencies: + vite-plugin-vercel: + specifier: workspace:* + version: link:../../packages/vercel + devDependencies: + '@types/express': + specifier: ^4.17.21 + version: 4.17.21 + '@types/node': + specifier: ^18.19.31 + version: 18.19.31 + '@universal-middleware/express': + specifier: ^0.0.2 + version: 0.0.2 + '@vercel/node': + specifier: ^3.0.26 + version: 3.2.0(@swc/core@1.4.16) + '@vitejs/plugin-react-swc': + specifier: ^3.6.0 + version: 3.6.0(vite@5.3.2(@types/node@18.19.31)) + express: + specifier: ^4.19.2 + version: 4.19.2 + react: + specifier: ^18.2.0 + version: 18.2.0 + tsx: + specifier: ^4.16.2 + version: 4.16.2 + typescript: + specifier: ^5.4.5 + version: 5.5.3 + vike: + specifier: ^0.4.178 + version: 0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)) + vike-react: + specifier: ^0.4.16 + version: 0.4.16(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(vike@0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)))(vite@5.3.2(@types/node@18.19.31)) + vite: + specifier: ^5.2.9 + version: 5.3.2(@types/node@18.19.31) + examples/simple: dependencies: vite-plugin-vercel: @@ -178,7 +221,7 @@ importers: version: 5.5.3 vike: specifier: ^0.4.177 - version: 0.4.177(vite@5.3.2(@types/node@18.19.31)) + version: 0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: specifier: ^5.3.2 version: 5.3.2(@types/node@18.19.31) @@ -206,7 +249,7 @@ importers: version: 5.5.3 vike: specifier: ^0.4.177 - version: 0.4.177(vite@5.3.2(@types/node@18.19.31)) + version: 0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: specifier: ^5.3.2 version: 5.3.2(@types/node@18.19.31) @@ -780,6 +823,19 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} + '@hattip/core@0.0.45': + resolution: {integrity: sha512-4BK9dPU7sLvmP9sUq048uSaKFvQY2Qa6D0xQteQBIiDYuTdbopcUQLETM1sdkUeUtFxHPwPu/NclfJAC5INarw==} + + '@hattip/headers@0.0.45': + resolution: {integrity: sha512-owgxAt1jdhEcAdDfnlpPa8iQx/swItReYUlo8UFZ0GUCMiWJvnpl6rTdUsS6bCwMK9IJOliivN4dHEY8VKdGQw==} + + '@hattip/polyfills@0.0.45': + resolution: {integrity: sha512-H8a+NVu/rAspycnkLSLVvWu3ei/ndFhA+3KQS1p2YjCcuf4Wuj4EWfScrwgL4d6CR0J+FxqX1P9NDGa4tdJQmQ==} + + '@hattip/walk@0.0.45': + resolution: {integrity: sha512-GYEQN5n2JUzjLl9hdMJ+0mbsfwvldRKMBdxx+l29SxmRhOwyWURDyaSfX7UEkEmmxjbg4YqEoWyYgaAtxeW7Jw==} + hasBin: true + '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -822,6 +878,9 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@kamilkisiela/fast-url-parser@1.1.4': + resolution: {integrity: sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==} + '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -1071,6 +1130,12 @@ packages: '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + '@types/body-parser@1.19.5': + resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} + + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -1080,9 +1145,18 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/express-serve-static-core@4.19.5': + resolution: {integrity: sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==} + + '@types/express@4.17.21': + resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/http-errors@2.0.4': + resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -1092,6 +1166,9 @@ packages: '@types/mdx@2.0.13': resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} + '@types/mime@1.3.5': + resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} @@ -1110,6 +1187,12 @@ packages: '@types/prop-types@15.7.12': resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + '@types/qs@6.9.15': + resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} + + '@types/range-parser@1.2.7': + resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + '@types/react-dom@18.2.25': resolution: {integrity: sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==} @@ -1119,6 +1202,12 @@ packages: '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + '@types/send@0.17.4': + resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} + + '@types/serve-static@1.15.7': + resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} + '@types/unist@2.0.10': resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} @@ -1186,6 +1275,9 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@universal-middleware/express@0.0.2': + resolution: {integrity: sha512-qw9v/OOpmfcz69369xeDq3u8ZRJhd8l+0B6qo5uCcgUh7zWt5mOl6gPVciIxXuyrlgcHVW86hNoyf7pPLIQGlg==} + '@vercel/build-utils@8.2.2': resolution: {integrity: sha512-+Nf/Yk3GeMI47L/g5KYEvsj7yqVkhb6vZqjxavUBRVPSsgJ7fuNVfYvvpFj/Y0BYysEF8XNUxKFuwGROiop/ow==} @@ -1242,9 +1334,25 @@ packages: '@vitest/utils@1.5.0': resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==} + '@whatwg-node/events@0.1.1': + resolution: {integrity: sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==} + engines: {node: '>=16.0.0'} + + '@whatwg-node/fetch@0.9.18': + resolution: {integrity: sha512-hqoz6StCW+AjV/3N+vg0s1ah82ptdVUb9nH2ttj3UbySOXUvytWw2yqy8c1cKzyRk6mDD00G47qS3fZI9/gMjg==} + engines: {node: '>=16.0.0'} + + '@whatwg-node/node-fetch@0.5.11': + resolution: {integrity: sha512-LS8tSomZa3YHnntpWt3PP43iFEEl6YeIsvDakczHBKlay5LdkXFr8w7v8H6akpG5nRrzydyB0k1iE2eoL6aKIQ==} + engines: {node: '>=16.0.0'} + abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + accepts@1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -1330,6 +1438,9 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + array-flatten@1.1.1: + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -1376,6 +1487,10 @@ packages: bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + body-parser@1.20.2: + resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -1395,10 +1510,22 @@ packages: peerDependencies: esbuild: '>=0.17' + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -1516,10 +1643,25 @@ packages: console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + convert-hrtime@3.0.0: resolution: {integrity: sha512-7V+KqSvMiHp8yWDuwfww06XleMWVVB9b9tURBx+G7UTADuo5hYPuowKloz4OzOqbPezxgo+fdQ1522WzPG4OeA==} engines: {node: '>=8'} + cookie-signature@1.0.6: + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + + cookie@0.6.0: + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} @@ -1558,6 +1700,14 @@ packages: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -1577,6 +1727,10 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -1584,10 +1738,18 @@ packages: delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -1623,6 +1785,9 @@ packages: engines: {node: '>=16'} hasBin: true + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + emoji-regex@10.3.0: resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} @@ -1632,10 +1797,22 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + encodeurl@1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + es-module-lexer@1.4.1: resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} @@ -1871,6 +2048,10 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} + express@4.19.2: + resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==} + engines: {node: '>= 0.10.0'} + extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -1881,6 +2062,9 @@ packages: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} + fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1894,6 +2078,9 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-querystring@1.1.2: + resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} + fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} @@ -1915,6 +2102,10 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + finalhandler@1.2.0: + resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + engines: {node: '>= 0.8'} + find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -1945,6 +2136,14 @@ packages: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -1965,6 +2164,9 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gauge@3.0.2: resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} engines: {node: '>=10'} @@ -1977,6 +2179,10 @@ packages: get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -1985,6 +2191,9 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} + get-tsconfig@4.7.5: + resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -2010,6 +2219,9 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -2024,9 +2236,24 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + hast-util-to-estree@3.1.0: resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} @@ -2040,6 +2267,10 @@ packages: resolution: {integrity: sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw==} engines: {node: '>=6'} + http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -2089,6 +2320,10 @@ packages: inline-style-parser@0.2.3: resolution: {integrity: sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==} + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} @@ -2156,6 +2391,10 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} + isbot-fast@1.2.0: + resolution: {integrity: sha512-twjuQzy2gKMDVfKGQyQqrx6Uy4opu/fiVUTTpdqtFsd7OQijIp5oXvb27n5EemYXaijh5fomndJt/SPRLsEdSg==} + engines: {node: '>=6.0.0'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -2322,6 +2561,13 @@ packages: mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + merge-descriptors@1.0.1: + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -2329,6 +2575,10 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + methods@1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + micromark-core-commonmark@2.0.0: resolution: {integrity: sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==} @@ -2425,6 +2675,11 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -2472,9 +2727,15 @@ packages: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -2491,10 +2752,17 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} + node-fetch-native@1.6.4: + resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + node-fetch@2.6.9: resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} engines: {node: 4.x || >=6.0.0} @@ -2546,6 +2814,14 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} + + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -2617,6 +2893,10 @@ packages: resolution: {integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==} engines: {node: '>=6'} + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -2640,6 +2920,9 @@ packages: resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} engines: {node: '>=16 || 14 >=14.17'} + path-to-regexp@0.1.7: + resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + path-to-regexp@6.1.0: resolution: {integrity: sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==} @@ -2734,6 +3017,10 @@ packages: property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} + proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} @@ -2741,9 +3028,21 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + qs@6.11.0: + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + engines: {node: '>=0.6'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + + raw-body@2.5.2: + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} + react-dom@18.2.0: resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: @@ -2752,6 +3051,12 @@ packages: react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + react-streaming@0.3.37: + resolution: {integrity: sha512-DPYfmyDZsjSJX0jc27bCAWbKR3z1Bh5olu6kDkL8ghL2cg55MtojicDh4Xpn3OwpWIS5RxVX/ss99/pOkAOfIg==} + peerDependencies: + react: '>=18' + react-dom: '>=18' + react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} @@ -2795,6 +3100,9 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + restore-cursor@4.0.0: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2841,9 +3149,24 @@ packages: engines: {node: '>=10'} hasBin: true + send@0.18.0: + resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + engines: {node: '>= 0.8.0'} + + serve-static@1.15.0: + resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + engines: {node: '>= 0.8.0'} + set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -2860,6 +3183,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -2921,9 +3248,17 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} @@ -3043,6 +3378,10 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -3100,6 +3439,9 @@ packages: ts-toolbelt@6.15.5: resolution: {integrity: sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==} + tslib@2.6.3: + resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tsup@8.1.0: resolution: {integrity: sha512-UFdfCAXukax+U6KzeTNO2kAARHcWxmKsnvSPXUcfA1D+kU05XDccCrkffCQpFaWDsZfV0jMyTsxU39VfCp6EOg==} engines: {node: '>=18'} @@ -3119,6 +3461,11 @@ packages: typescript: optional: true + tsx@4.16.2: + resolution: {integrity: sha512-C1uWweJDgdtX2x600HjaFaucXTilT7tgUZHbOE4+ypskZ1OP8CRCSDkCxG6Vya9EwaFIVagWwpaVAn5wzypaqQ==} + engines: {node: '>=18.0.0'} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -3131,6 +3478,10 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} @@ -3182,21 +3533,44 @@ packages: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + urlpattern-polyfill@10.0.0: + resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + utils-merge@1.0.1: + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} + v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + vfile-message@4.0.2: resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} + vike-react@0.4.16: + resolution: {integrity: sha512-lawyL8HHjVgDNwPRp21qsmOLHokGdjElm6zgKaVg0ul5Dcv6JxglaTfqq5P8NU6V8MW4vYd7WqxSpv64iscu4Q==} + peerDependencies: + react: '>=18.0.0' + react-dom: '>=18.0.0' + vike: '>=0.4.178' + vite: '>=4.3.8' + vike@0.4.177: resolution: {integrity: sha512-ZCyJkeNJ+ssmkoVyrET1tDsKfW+y7Is3vwzkSDeac+disp8KITJWUMvgJsOPKII/q6eNZGbJWnZ+v3Xli0rong==} engines: {node: '>=18.0.0'} @@ -3208,6 +3582,17 @@ packages: react-streaming: optional: true + vike@0.4.178: + resolution: {integrity: sha512-TSfb9HYUIQjvcvlS24pZmTakYa2yxUg7Bjtu24VLDj9BULLsltXcd+ladgCJyUBJqV0y/eMa/aefyqRWgjX7Cg==} + engines: {node: '>=18.0.0'} + hasBin: true + peerDependencies: + react-streaming: '>=0.3.36' + vite: '>=4.4.0' + peerDependenciesMeta: + react-streaming: + optional: true + vite-node@1.5.0: resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3793,6 +4178,24 @@ snapshots: '@fastify/busboy@2.1.1': {} + '@hattip/core@0.0.45': {} + + '@hattip/headers@0.0.45': + dependencies: + '@hattip/core': 0.0.45 + + '@hattip/polyfills@0.0.45': + dependencies: + '@hattip/core': 0.0.45 + '@whatwg-node/fetch': 0.9.18 + node-fetch-native: 1.6.4 + + '@hattip/walk@0.0.45': + dependencies: + '@hattip/headers': 0.0.45 + cac: 6.7.14 + mime-types: 2.1.35 + '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -3840,6 +4243,8 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + '@kamilkisiela/fast-url-parser@1.1.4': {} + '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.24.4 @@ -4086,6 +4491,15 @@ snapshots: dependencies: '@types/estree': 1.0.5 + '@types/body-parser@1.19.5': + dependencies: + '@types/connect': 3.4.38 + '@types/node': 18.19.31 + + '@types/connect@3.4.38': + dependencies: + '@types/node': 18.19.31 + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -4096,10 +4510,26 @@ snapshots: '@types/estree@1.0.5': {} + '@types/express-serve-static-core@4.19.5': + dependencies: + '@types/node': 18.19.31 + '@types/qs': 6.9.15 + '@types/range-parser': 1.2.7 + '@types/send': 0.17.4 + + '@types/express@4.17.21': + dependencies: + '@types/body-parser': 1.19.5 + '@types/express-serve-static-core': 4.19.5 + '@types/qs': 6.9.15 + '@types/serve-static': 1.15.7 + '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.2 + '@types/http-errors@2.0.4': {} + '@types/json-schema@7.0.15': {} '@types/mdast@4.0.3': @@ -4108,6 +4538,8 @@ snapshots: '@types/mdx@2.0.13': {} + '@types/mime@1.3.5': {} + '@types/ms@0.7.34': {} '@types/node-fetch@2.6.11': @@ -4125,6 +4557,10 @@ snapshots: '@types/prop-types@15.7.12': {} + '@types/qs@6.9.15': {} + + '@types/range-parser@1.2.7': {} + '@types/react-dom@18.2.25': dependencies: '@types/react': 18.2.79 @@ -4136,6 +4572,17 @@ snapshots: '@types/semver@7.5.8': {} + '@types/send@0.17.4': + dependencies: + '@types/mime': 1.3.5 + '@types/node': 18.19.31 + + '@types/serve-static@1.15.7': + dependencies: + '@types/http-errors': 2.0.4 + '@types/node': 18.19.31 + '@types/send': 0.17.4 + '@types/unist@2.0.10': {} '@types/unist@3.0.2': {} @@ -4223,6 +4670,12 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@universal-middleware/express@0.0.2': + dependencies: + '@hattip/core': 0.0.45 + '@hattip/polyfills': 0.0.45 + '@hattip/walk': 0.0.45 + '@vercel/build-utils@8.2.2': {} '@vercel/edge-config-fs@0.1.0': {} @@ -4336,8 +4789,28 @@ snapshots: loupe: 2.3.7 pretty-format: 29.7.0 + '@whatwg-node/events@0.1.1': {} + + '@whatwg-node/fetch@0.9.18': + dependencies: + '@whatwg-node/node-fetch': 0.5.11 + urlpattern-polyfill: 10.0.0 + + '@whatwg-node/node-fetch@0.5.11': + dependencies: + '@kamilkisiela/fast-url-parser': 1.1.4 + '@whatwg-node/events': 0.1.1 + busboy: 1.6.0 + fast-querystring: 1.1.2 + tslib: 2.6.3 + abbrev@1.1.1: {} + accepts@1.3.8: + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + acorn-import-attributes@1.9.5(acorn@8.11.3): dependencies: acorn: 8.11.3 @@ -4412,6 +4885,8 @@ snapshots: argparse@2.0.1: {} + array-flatten@1.1.1: {} + array-union@2.1.0: {} assertion-error@1.1.0: {} @@ -4442,6 +4917,23 @@ snapshots: dependencies: file-uri-to-path: 1.0.0 + body-parser@1.20.2: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.2 + type-is: 1.6.18 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -4462,8 +4954,22 @@ snapshots: esbuild: 0.21.5 load-tsconfig: 0.2.5 + busboy@1.6.0: + dependencies: + streamsearch: 1.1.0 + + bytes@3.1.2: {} + cac@6.7.14: {} + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + callsites@3.1.0: {} camelize@1.0.1: {} @@ -4570,8 +5076,18 @@ snapshots: console-control-strings@1.1.0: {} + content-disposition@0.5.4: + dependencies: + safe-buffer: 5.2.1 + + content-type@1.0.5: {} + convert-hrtime@3.0.0: {} + cookie-signature@1.0.6: {} + + cookie@0.6.0: {} + create-require@1.1.1: {} cross-env@7.0.3: @@ -4612,6 +5128,10 @@ snapshots: data-uri-to-buffer@4.0.1: {} + debug@2.6.9: + dependencies: + ms: 2.0.0 + debug@4.3.4: dependencies: ms: 2.1.2 @@ -4626,12 +5146,22 @@ snapshots: deep-is@0.1.4: {} + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + delayed-stream@1.0.0: {} delegates@1.0.0: {} + depd@2.0.0: {} + dequal@2.0.3: {} + destroy@1.2.0: {} + detect-indent@6.1.0: {} detect-libc@2.0.3: {} @@ -4666,17 +5196,27 @@ snapshots: signal-exit: 4.0.2 time-span: 4.0.0 + ee-first@1.1.1: {} + emoji-regex@10.3.0: {} emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} + encodeurl@1.0.2: {} + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 strip-ansi: 6.0.1 + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + es-module-lexer@1.4.1: {} es-module-lexer@1.5.0: {} @@ -4982,6 +5522,42 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 + express@4.19.2: + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.2 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookie: 0.6.0 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.2.0 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.1 + methods: 1.1.2 + on-finished: 2.4.1 + parseurl: 1.3.3 + path-to-regexp: 0.1.7 + proxy-addr: 2.0.7 + qs: 6.11.0 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.18.0 + serve-static: 1.15.0 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + extend@3.0.2: {} extendable-error@0.1.7: {} @@ -4992,6 +5568,8 @@ snapshots: iconv-lite: 0.4.24 tmp: 0.0.33 + fast-decode-uri-component@1.0.1: {} + fast-deep-equal@3.1.3: {} fast-glob@3.3.2: @@ -5006,6 +5584,10 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-querystring@1.1.2: + dependencies: + fast-decode-uri-component: 1.0.1 + fastq@1.17.1: dependencies: reusify: 1.0.4 @@ -5027,6 +5609,18 @@ snapshots: dependencies: to-regex-range: 5.0.1 + finalhandler@1.2.0: + dependencies: + debug: 2.6.9 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.1 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -5065,6 +5659,10 @@ snapshots: dependencies: fetch-blob: 3.2.0 + forwarded@0.2.0: {} + + fresh@0.5.2: {} + fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -5086,6 +5684,8 @@ snapshots: fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + gauge@3.0.2: dependencies: aproba: 2.0.0 @@ -5102,10 +5702,22 @@ snapshots: get-func-name@2.0.2: {} + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + get-stream@6.0.1: {} get-stream@8.0.1: {} + get-tsconfig@4.7.5: + dependencies: + resolve-pkg-maps: 1.0.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -5144,6 +5756,10 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + graceful-fs@4.2.11: {} graphemer@1.4.0: {} @@ -5152,8 +5768,20 @@ snapshots: has-flag@4.0.0: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + has-unicode@2.0.1: {} + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + hast-util-to-estree@3.1.0: dependencies: '@types/estree': 1.0.5 @@ -5201,6 +5829,14 @@ snapshots: hex-rgb@4.3.0: {} + http-errors@2.0.0: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 @@ -5240,6 +5876,8 @@ snapshots: inline-style-parser@0.2.3: {} + ipaddr.js@1.9.1: {} + is-alphabetical@2.0.1: {} is-alphanumerical@2.0.1: @@ -5289,6 +5927,8 @@ snapshots: is-windows@1.0.2: {} + isbot-fast@1.2.0: {} + isexe@2.0.0: {} jackspeak@2.3.6: @@ -5543,10 +6183,16 @@ snapshots: dependencies: '@types/mdast': 4.0.3 + media-typer@0.3.0: {} + + merge-descriptors@1.0.1: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} + methods@1.1.2: {} + micromark-core-commonmark@2.0.0: dependencies: decode-named-character-reference: 1.0.2 @@ -5764,6 +6410,8 @@ snapshots: dependencies: mime-db: 1.52.0 + mime@1.6.0: {} + mimic-fn@2.1.0: {} mimic-fn@4.0.0: {} @@ -5802,8 +6450,12 @@ snapshots: mrmime@2.0.0: {} + ms@2.0.0: {} + ms@2.1.2: {} + ms@2.1.3: {} + mz@2.7.0: dependencies: any-promise: 1.3.0 @@ -5816,8 +6468,12 @@ snapshots: natural-compare@1.4.0: {} + negotiator@0.6.3: {} + node-domexception@1.0.0: {} + node-fetch-native@1.6.4: {} + node-fetch@2.6.9: dependencies: whatwg-url: 5.0.0 @@ -5857,6 +6513,12 @@ snapshots: object-assign@4.1.1: {} + object-inspect@1.13.2: {} + + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -5934,6 +6596,8 @@ snapshots: parse-ms@2.1.0: {} + parseurl@1.3.3: {} + path-browserify@1.0.1: {} path-exists@4.0.0: {} @@ -5949,6 +6613,8 @@ snapshots: lru-cache: 10.2.0 minipass: 7.0.4 + path-to-regexp@0.1.7: {} + path-to-regexp@6.1.0: {} path-to-regexp@6.2.1: {} @@ -6026,12 +6692,30 @@ snapshots: property-information@6.5.0: {} + proxy-addr@2.0.7: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + pseudomap@1.0.2: {} punycode@2.3.1: {} + qs@6.11.0: + dependencies: + side-channel: 1.0.6 + queue-microtask@1.2.3: {} + range-parser@1.2.1: {} + + raw-body@2.5.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + react-dom@18.2.0(react@18.2.0): dependencies: loose-envify: 1.4.0 @@ -6040,6 +6724,15 @@ snapshots: react-is@18.2.0: {} + react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + dependencies: + '@brillout/import': 0.2.3 + '@brillout/json-serializer': 0.5.10 + '@brillout/picocolors': 1.0.13 + isbot-fast: 1.2.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react@18.2.0: dependencies: loose-envify: 1.4.0 @@ -6095,6 +6788,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + restore-cursor@4.0.0: dependencies: onetime: 5.1.2 @@ -6159,8 +6854,46 @@ snapshots: semver@7.6.2: {} + send@0.18.0: + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + + serve-static@1.15.0: + dependencies: + encodeurl: 1.0.2 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.18.0 + transitivePeerDependencies: + - supports-color + set-blocking@2.0.0: {} + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + + setprototypeof@1.2.0: {} + shebang-command@1.2.0: dependencies: shebang-regex: 1.0.0 @@ -6173,6 +6906,13 @@ snapshots: shebang-regex@3.0.0: {} + side-channel@1.0.6: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.2 + siginfo@2.0.0: {} signal-exit@3.0.7: {} @@ -6225,8 +6965,12 @@ snapshots: stackback@0.0.2: {} + statuses@2.0.1: {} + std-env@3.7.0: {} + streamsearch@1.1.0: {} + string-argv@0.3.2: {} string-width@4.2.3: @@ -6347,6 +7091,8 @@ snapshots: dependencies: is-number: 7.0.0 + toidentifier@1.0.1: {} + totalist@3.0.1: {} tr46@0.0.3: {} @@ -6419,6 +7165,8 @@ snapshots: ts-toolbelt@6.15.5: {} + tslib@2.6.3: {} + tsup@8.1.0(@swc/core@1.4.16)(postcss@8.4.38)(ts-node@10.9.1(@swc/core@1.4.16)(@types/node@18.19.31)(typescript@5.5.3))(typescript@5.5.3): dependencies: bundle-require: 4.0.2(esbuild@0.21.5) @@ -6443,6 +7191,13 @@ snapshots: - supports-color - ts-node + tsx@4.16.2: + dependencies: + esbuild: 0.21.5 + get-tsconfig: 4.7.5 + optionalDependencies: + fsevents: 2.3.3 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -6451,6 +7206,11 @@ snapshots: type-fest@0.20.2: {} + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + typescript@4.9.5: {} typescript@5.5.3: {} @@ -6512,14 +7272,22 @@ snapshots: universalify@0.1.2: {} + unpipe@1.0.0: {} + uri-js@4.4.1: dependencies: punycode: 2.3.1 + urlpattern-polyfill@10.0.0: {} + util-deprecate@1.0.2: {} + utils-merge@1.0.1: {} + v8-compile-cache-lib@3.0.1: {} + vary@1.1.2: {} + vfile-message@4.0.2: dependencies: '@types/unist': 3.0.2 @@ -6531,7 +7299,34 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vike@0.4.177(vite@5.3.2(@types/node@18.19.31)): + vike-react@0.4.16(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(vike@0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)))(vite@5.3.2(@types/node@18.19.31)): + dependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-streaming: 0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + vike: 0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)) + vite: 5.3.2(@types/node@18.19.31) + + vike@0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)): + dependencies: + '@brillout/import': 0.2.3 + '@brillout/json-serializer': 0.5.10 + '@brillout/picocolors': 1.0.13 + '@brillout/require-shim': 0.1.2 + '@brillout/vite-plugin-server-entry': 0.4.6 + acorn: 8.11.3 + cac: 6.7.14 + es-module-lexer: 1.5.0 + esbuild: 0.19.12 + fast-glob: 3.3.2 + semver: 7.6.2 + sirv: 2.0.4 + source-map-support: 0.5.21 + vite: 5.3.2(@types/node@18.19.31) + optionalDependencies: + react-streaming: 0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + + vike@0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)): dependencies: '@brillout/import': 0.2.3 '@brillout/json-serializer': 0.5.10 @@ -6547,6 +7342,8 @@ snapshots: sirv: 2.0.4 source-map-support: 0.5.21 vite: 5.3.2(@types/node@18.19.31) + optionalDependencies: + react-streaming: 0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0) vite-node@1.5.0(@types/node@18.19.31): dependencies: From 8a851968bf9416c6f814a5f1d43c5349c753497f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 14:19:44 +0200 Subject: [PATCH 2/7] chore: more robust support for exports parsing --- examples/demo/package.json | 2 +- examples/express/express-entry.ts | 11 ++-- examples/express/package.json | 1 + examples/express/vite.config.ts | 11 ++++ packages/vercel/package.json | 3 +- packages/vercel/src/build.ts | 72 ++++++++++---------------- packages/vike-integration/package.json | 2 +- pnpm-lock.yaml | 68 +++++------------------- 8 files changed, 60 insertions(+), 110 deletions(-) diff --git a/examples/demo/package.json b/examples/demo/package.json index 5870b7e3..884114d0 100644 --- a/examples/demo/package.json +++ b/examples/demo/package.json @@ -26,7 +26,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": "^5.4.5", - "vike": "^0.4.160", + "vike": "^0.4.178", "vite": "^5.2.9", "vite-plugin-vercel": "workspace:*" }, diff --git a/examples/express/express-entry.ts b/examples/express/express-entry.ts index da7c68f8..bebb9b78 100644 --- a/examples/express/express-entry.ts +++ b/examples/express/express-entry.ts @@ -5,9 +5,8 @@ import { vikeHandler } from './server/vike-handler'; import { createMiddleware } from '@universal-middleware/express'; import express from 'express'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const isProduction = process.env.NODE_ENV === 'production'; +const __filename = globalThis.__filename ?? fileURLToPath(import.meta.url); +const __dirname = globalThis.__dirname ?? dirname(__filename); const root = __dirname; const port = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000; const hmrPort = process.env.HMR_PORT @@ -53,12 +52,12 @@ export function handlerAdapter< ); } -export default startServer(); +export default await startServer(); async function startServer() { const app = express(); - if (isProduction) { + if (process.env.NODE_ENV === 'production') { app.use(express.static(`${root}/dist/client`)); } else { // Instantiate Vite's development server and integrate its middleware to our server. @@ -92,4 +91,6 @@ async function startServer() { app.listen(port, () => { console.log(`Server listening on http://localhost:${port}`); }); + + return app; } diff --git a/examples/express/package.json b/examples/express/package.json index c131e4c0..dcb6bd74 100755 --- a/examples/express/package.json +++ b/examples/express/package.json @@ -17,6 +17,7 @@ "@universal-middleware/express": "^0.0.2", "@vercel/node": "^3.0.26", "@vitejs/plugin-react-swc": "^3.6.0", + "@vite-plugin-vercel/vike": "workspace:*", "express": "^4.19.2", "react": "^18.2.0", "tsx": "^4.16.2", diff --git a/examples/express/vite.config.ts b/examples/express/vite.config.ts index 3de45ecf..0b555ac6 100755 --- a/examples/express/vite.config.ts +++ b/examples/express/vite.config.ts @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react-swc'; import vike from 'vike/plugin'; import vercel from 'vite-plugin-vercel'; +import vercelVike from '@vite-plugin-vercel/vike'; export default defineConfig({ plugins: [ @@ -13,5 +14,15 @@ export default defineConfig({ // You should not use this parameter outside this repository smart: false, }), + vercelVike({ source: '/.*' }), ], + vercel: { + additionalEndpoints: [ + { + source: 'express-entry.ts', + destination: 'ssr_', + addRoute: false, + }, + ], + }, }); diff --git a/packages/vercel/package.json b/packages/vercel/package.json index 0a10bb58..11533695 100644 --- a/packages/vercel/package.json +++ b/packages/vercel/package.json @@ -47,7 +47,7 @@ "eslint": "^8.57.0", "tsup": "^8.1.0", "typescript": "^5.5.3", - "vike": "^0.4.177", + "vike": "^0.4.178", "vite": "^5.3.2" }, "dependencies": { @@ -57,7 +57,6 @@ "@vercel/nft": "^0.27.2", "@vercel/routing-utils": "^3.1.0", "esbuild": "^0.23.0", - "eval": "^0.1.8", "fast-glob": "^3.3.2", "magicast": "^0.3.4", "zod": "^3.23.8" diff --git a/packages/vercel/src/build.ts b/packages/vercel/src/build.ts index 539cb456..3a303617 100644 --- a/packages/vercel/src/build.ts +++ b/packages/vercel/src/build.ts @@ -1,6 +1,6 @@ import { ResolvedConfig } from 'vite'; import glob from 'fast-glob'; -import path, { basename, dirname } from 'path'; +import path, { basename } from 'path'; import { getOutput, getRoot, pathRelativeTo } from './utils'; import { build, BuildOptions, type Plugin } from 'esbuild'; import { VercelOutputIsr, ViteVercelApiEntry } from './types'; @@ -8,9 +8,8 @@ import { assert } from './assert'; import { vercelOutputVcConfigSchema } from './schemas/config/vc-config'; import fs, { copyFile } from 'fs/promises'; import type { Header, Rewrite } from '@vercel/routing-utils'; -import _eval from 'eval'; import { vercelEndpointExports } from './schemas/exports'; -import { generateCode, loadFile } from 'magicast'; +import { generateCode, loadFile, type ASTNode } from 'magicast'; import { getNodeVersion } from '@vercel/build-utils'; import { nodeFileTrace } from '@vercel/nft'; import { findRoot } from '@manypkg/find-root'; @@ -104,6 +103,10 @@ const standardBuildOptions: BuildOptions = { }, minify: false, plugins: [], + define: { + 'process.env.NODE_ENV': '"production"', + 'import.meta.env.NODE_ENV': '"production"', + }, }; export async function buildFn( @@ -300,56 +303,35 @@ function replaceBrackets(source: string) { .join('/'); } -async function removeDefaultExport(filepath: string) { - const mod = await loadFile(filepath); - try { - delete mod.exports.default; - } catch (_) { - // ignore - } +function isPrimitive(test: unknown) { + return test !== Object(test); +} - return generateCode(mod).code; +export function _eval(code: unknown): boolean { + const func = new Function(`{ return function(){ return ${code} } };`); + return func.call(null).call(null); +} + +function evalExport(exp: unknown) { + if (!exp) return; + + const code = isPrimitive(exp) ? exp : generateCode(exp as ASTNode).code; + + return _eval(code); } async function extractExports(filepath: string) { try { - // default export is removed so that generated bundle contains only - // named exports related code - const contents = await removeDefaultExport(filepath); - - const buildOptions = { - ...standardBuildOptions, - format: 'cjs', - minify: false, - write: false, - legalComments: 'none', - } satisfies BuildOptions; - - buildOptions.stdin = { - sourcefile: filepath, - contents, - loader: filepath.endsWith('.ts') - ? 'ts' - : filepath.endsWith('.tsx') - ? 'tsx' - : filepath.endsWith('.js') - ? 'js' - : filepath.endsWith('.jsx') - ? 'jsx' - : 'default', - resolveDir: dirname(filepath), - }; + const mod = await loadFile(filepath); - buildOptions.banner = { - js: `const __filename = ${JSON.stringify(filepath)}; -const __dirname = ${JSON.stringify(dirname(filepath))}; -`, + const subject = { + edge: evalExport(mod.exports.edge), + headers: evalExport(mod.exports.headers), + streaming: evalExport(mod.exports.streaming), + isr: evalExport(mod.exports.isr), }; - const output = await build(buildOptions); - const bundle = new TextDecoder().decode(output.outputFiles[0]?.contents); - - return vercelEndpointExports.parse(_eval(bundle, filepath, {}, true)); + return vercelEndpointExports.parse(subject); } catch (e) { console.warn(`Warning: failed to read exports of '${filepath}'`, e); } diff --git a/packages/vike-integration/package.json b/packages/vike-integration/package.json index 9dae9e83..452b75fc 100644 --- a/packages/vike-integration/package.json +++ b/packages/vike-integration/package.json @@ -34,7 +34,7 @@ "@vercel/node": "^3.2.0", "tsup": "^8.1.0", "typescript": "^5.5.3", - "vike": "^0.4.177", + "vike": "^0.4.178", "vite": "^5.3.2", "vite-plugin-vercel": "workspace:*" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1cd79b2c..105168a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,8 +69,8 @@ importers: specifier: ^5.4.5 version: 5.5.3 vike: - specifier: ^0.4.160 - version: 0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) + specifier: ^0.4.178 + version: 0.4.178(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: specifier: ^5.2.9 version: 5.3.2(@types/node@18.19.31) @@ -121,6 +121,9 @@ importers: '@vercel/node': specifier: ^3.0.26 version: 3.2.0(@swc/core@1.4.16) + '@vite-plugin-vercel/vike': + specifier: workspace:* + version: link:../../packages/vike-integration '@vitejs/plugin-react-swc': specifier: ^3.6.0 version: 3.6.0(vite@5.3.2(@types/node@18.19.31)) @@ -138,7 +141,7 @@ importers: version: 5.5.3 vike: specifier: ^0.4.178 - version: 0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)) + version: 0.4.178(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vike-react: specifier: ^0.4.16 version: 0.4.16(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(vike@0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)))(vite@5.3.2(@types/node@18.19.31)) @@ -185,9 +188,6 @@ importers: esbuild: specifier: ^0.23.0 version: 0.23.0 - eval: - specifier: ^0.1.8 - version: 0.1.8 fast-glob: specifier: ^3.3.2 version: 3.3.2 @@ -220,8 +220,8 @@ importers: specifier: ^5.5.3 version: 5.5.3 vike: - specifier: ^0.4.177 - version: 0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) + specifier: ^0.4.178 + version: 0.4.178(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: specifier: ^5.3.2 version: 5.3.2(@types/node@18.19.31) @@ -248,8 +248,8 @@ importers: specifier: ^5.5.3 version: 5.5.3 vike: - specifier: ^0.4.177 - version: 0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) + specifier: ^0.4.178 + version: 0.4.178(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: specifier: ^5.3.2 version: 5.3.2(@types/node@18.19.31) @@ -2033,10 +2033,6 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - eval@0.1.8: - resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} - engines: {node: '>= 0.8'} - eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} @@ -3089,9 +3085,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - require-like@0.1.2: - resolution: {integrity: sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -3571,17 +3564,6 @@ packages: vike: '>=0.4.178' vite: '>=4.3.8' - vike@0.4.177: - resolution: {integrity: sha512-ZCyJkeNJ+ssmkoVyrET1tDsKfW+y7Is3vwzkSDeac+disp8KITJWUMvgJsOPKII/q6eNZGbJWnZ+v3Xli0rong==} - engines: {node: '>=18.0.0'} - hasBin: true - peerDependencies: - react-streaming: '>=0.3.5' - vite: '>=4.4.0' - peerDependenciesMeta: - react-streaming: - optional: true - vike@0.4.178: resolution: {integrity: sha512-TSfb9HYUIQjvcvlS24pZmTakYa2yxUg7Bjtu24VLDj9BULLsltXcd+ladgCJyUBJqV0y/eMa/aefyqRWgjX7Cg==} engines: {node: '>=18.0.0'} @@ -5491,11 +5473,6 @@ snapshots: etag@1.8.1: {} - eval@0.1.8: - dependencies: - '@types/node': 18.19.31 - require-like: 0.1.2 - eventemitter3@5.0.1: {} execa@5.1.1: @@ -6782,8 +6759,6 @@ snapshots: require-from-string@2.0.2: {} - require-like@0.1.2: {} - resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -7304,29 +7279,10 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-streaming: 0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - vike: 0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)) + vike: 0.4.178(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)) vite: 5.3.2(@types/node@18.19.31) - vike@0.4.177(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)): - dependencies: - '@brillout/import': 0.2.3 - '@brillout/json-serializer': 0.5.10 - '@brillout/picocolors': 1.0.13 - '@brillout/require-shim': 0.1.2 - '@brillout/vite-plugin-server-entry': 0.4.6 - acorn: 8.11.3 - cac: 6.7.14 - es-module-lexer: 1.5.0 - esbuild: 0.19.12 - fast-glob: 3.3.2 - semver: 7.6.2 - sirv: 2.0.4 - source-map-support: 0.5.21 - vite: 5.3.2(@types/node@18.19.31) - optionalDependencies: - react-streaming: 0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - - vike@0.4.178(react-streaming@0.3.37(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(vite@5.3.2(@types/node@18.19.31)): + vike@0.4.178(react-streaming@0.3.37)(vite@5.3.2(@types/node@18.19.31)): dependencies: '@brillout/import': 0.2.3 '@brillout/json-serializer': 0.5.10 From 9387d604d00a232561951a1dbf80336fbeace5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 14:29:09 +0200 Subject: [PATCH 3/7] chore: small improvments --- examples/express/package.json | 3 ++- examples/express/tsconfig.json | 3 ++- examples/express/vite.config.ts | 10 +++++----- packages/vercel/src/index.ts | 15 ++++++++------- pnpm-lock.yaml | 6 ++++++ 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/examples/express/package.json b/examples/express/package.json index dcb6bd74..8314d4d2 100755 --- a/examples/express/package.json +++ b/examples/express/package.json @@ -14,10 +14,11 @@ "devDependencies": { "@types/express": "^4.17.21", "@types/node": "^18.19.31", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", "@universal-middleware/express": "^0.0.2", "@vercel/node": "^3.0.26", "@vitejs/plugin-react-swc": "^3.6.0", - "@vite-plugin-vercel/vike": "workspace:*", "express": "^4.19.2", "react": "^18.2.0", "tsx": "^4.16.2", diff --git a/examples/express/tsconfig.json b/examples/express/tsconfig.json index 84050321..355a86b6 100755 --- a/examples/express/tsconfig.json +++ b/examples/express/tsconfig.json @@ -13,6 +13,7 @@ "moduleResolution": "node", "target": "ES2022", "lib": ["DOM", "DOM.Iterable", "ESNext"], - "types": ["vite/client"] + "types": ["vite/client"], + "jsx": "react" } } diff --git a/examples/express/vite.config.ts b/examples/express/vite.config.ts index 0b555ac6..00702e47 100755 --- a/examples/express/vite.config.ts +++ b/examples/express/vite.config.ts @@ -3,24 +3,24 @@ import react from '@vitejs/plugin-react-swc'; import vike from 'vike/plugin'; import vercel from 'vite-plugin-vercel'; -import vercelVike from '@vite-plugin-vercel/vike'; export default defineConfig({ plugins: [ react(), vike(), vercel({ - // `smart` param only exist to circumvent a pnpm issue in this repo - // You should not use this parameter outside this repository - smart: false, + // You usually want the server to handle all routes + source: '/.*', }), - vercelVike({ source: '/.*' }), ], vercel: { additionalEndpoints: [ { + // entry file to the server. Default export must be a node server or a function source: 'express-entry.ts', + // replaces default Vike target destination: 'ssr_', + // already added by default Vike route addRoute: false, }, ], diff --git a/packages/vercel/src/index.ts b/packages/vercel/src/index.ts index 9f4fab47..7d48bfff 100644 --- a/packages/vercel/src/index.ts +++ b/packages/vercel/src/index.ts @@ -168,7 +168,8 @@ async function getStaticHtmlFiles(src: string) { * Auto import `@vite-plugin-vercel/vike` if it is part of dependencies. * Ensures that `vike/plugin` is also present to ensure predictable behavior */ -async function tryImportVpvv() { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +async function tryImportVpvv(options: any) { try { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore @@ -176,7 +177,7 @@ async function tryImportVpvv() { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const vpvv = await import('@vite-plugin-vercel/vike'); - return vpvv.default(); + return vpvv.default(options); } catch (e) { try { // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -185,7 +186,7 @@ async function tryImportVpvv() { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const vpvv = await import('@vite-plugin-vercel/vike'); - return vpvv.default(); + return vpvv.default(options); } catch (e) { return null; } @@ -197,12 +198,12 @@ async function tryImportVpvv() { // FIXME: Could be fixed by: // - shared-workspace-lockfile=false in .npmrc. See https://pnpm.io/npmrc#shared-workspace-lockfile // - Moving demo test in dedicated repo, with each a correct package.json -export default function allPlugins( - options: { smart?: boolean } = {}, -): PluginOption[] { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export default function allPlugins(options: any = {}): PluginOption[] { + const { smart, ...rest } = options; return [ vercelPluginCleanup(), vercelPlugin(), - options.smart !== false ? tryImportVpvv() : null, + smart !== false ? tryImportVpvv(rest) : null, ]; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 105168a8..84d8f9b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,6 +115,12 @@ importers: '@types/node': specifier: ^18.19.31 version: 18.19.31 + '@types/react': + specifier: ^18.2.79 + version: 18.2.79 + '@types/react-dom': + specifier: ^18.2.25 + version: 18.2.25 '@universal-middleware/express': specifier: ^0.0.2 version: 0.0.2 From a894ad4afcc3f2d537fa0b390bf972bf7839bfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 14:30:54 +0200 Subject: [PATCH 4/7] chore: pnpm-lock --- pnpm-lock.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84d8f9b4..33c3617b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,9 +127,6 @@ importers: '@vercel/node': specifier: ^3.0.26 version: 3.2.0(@swc/core@1.4.16) - '@vite-plugin-vercel/vike': - specifier: workspace:* - version: link:../../packages/vike-integration '@vitejs/plugin-react-swc': specifier: ^3.6.0 version: 3.6.0(vite@5.3.2(@types/node@18.19.31)) From dec16bbc3e3af54fea573a444c4986c39d4335d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 14:40:42 +0200 Subject: [PATCH 5/7] chore: upgrade CI script --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 36555172..ee9c7ea9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -20,9 +20,9 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v4 with: - version: 8 + version: 9 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: From 8e5cb4364f6a70329b6b242a75db86bdcc49dc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 14:42:19 +0200 Subject: [PATCH 6/7] chore: upgrade CI script --- .github/workflows/node.js.yml | 2 -- package.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ee9c7ea9..2937cd44 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,8 +21,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 9 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: diff --git a/package.json b/package.json index fc86f031..26cfb4af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-vercel-workspace-root", - "packageManager": "pnpm@9.1.2", + "packageManager": "pnpm@9.4.0", "private": "true", "type": "module", "scripts": { From f768d15d650dbb7fe3285df7ad1544b72906bfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Thu, 4 Jul 2024 14:46:01 +0200 Subject: [PATCH 7/7] chore: fix typecheck --- examples/express/tsconfig.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/express/tsconfig.json b/examples/express/tsconfig.json index 355a86b6..d0c4a18a 100755 --- a/examples/express/tsconfig.json +++ b/examples/express/tsconfig.json @@ -1,8 +1,6 @@ { "compilerOptions": { "strict": true, - "allowJs": true, - "checkJs": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true,