diff --git a/.changeset/loud-cobras-smoke.md b/.changeset/loud-cobras-smoke.md new file mode 100644 index 00000000..385b949a --- /dev/null +++ b/.changeset/loud-cobras-smoke.md @@ -0,0 +1,6 @@ +--- +"@vinxi/server-functions": patch +"vinxi": patch +--- + +new CLI infra using citty and server-function fix diff --git a/.prettierrc b/.prettierrc index b35e33e7..3446d363 100644 --- a/.prettierrc +++ b/.prettierrc @@ -8,6 +8,7 @@ "^node:(.*)$", "^[./]" ], + "importAttributes": true, "importOrderSeparation": true, "importOrderSortSpecifiers": true, "overrides": [ diff --git a/examples/vanilla/spa/package.json b/examples/vanilla/spa/package.json index 05eb069a..e94038fb 100644 --- a/examples/vanilla/spa/package.json +++ b/examples/vanilla/spa/package.json @@ -10,9 +10,9 @@ }, "dependencies": { "@picocss/pico": "^1.5.10", - "@vinxi/server-functions": "0.0.35", + "@vinxi/server-functions": "0.0.37", "autoprefixer": "^10.4.15", "tailwindcss": "^3.3.3", - "vinxi": "0.0.43" + "vinxi": "0.0.45" } } diff --git a/examples/vanilla/stack/package.json b/examples/vanilla/stack/package.json index bfe79ab6..1859d14e 100644 --- a/examples/vanilla/stack/package.json +++ b/examples/vanilla/stack/package.json @@ -1,5 +1,5 @@ { - "name": "example-vanilla-spa", + "name": "example-vanilla-stack", "type": "module", "private": true, "version": null, @@ -10,7 +10,8 @@ }, "dependencies": { "@picocss/pico": "^1.5.10", - "@vinxi/server-functions": "workspace:^", + "@vinxi/server-functions": "0.0.37", + "@vitejs/plugin-react": "^4.0.4", "autoprefixer": "^10.4.15", "tailwindcss": "^3.3.3", "vinxi": "0.0.45" diff --git a/packages/vinxi-server-functions/index.js b/packages/vinxi-server-functions/index.js index cb23bf8f..8ef632d3 100644 --- a/packages/vinxi-server-functions/index.js +++ b/packages/vinxi-server-functions/index.js @@ -4,15 +4,8 @@ import { serverFunctions } from "./plugin.js"; export default function serverFns(app) { app.addRouter(serverFunctions.router()); - const clientRouters = app.config.routers.filter( + app.addRouterPlugins( (router) => router.target === "browser", + () => [serverFunctions.client()], ); - - clientRouters.forEach((router) => { - if (router.plugins) { - router.plugins = () => [serverFunctions.client(), ...router.plugins()]; - } else if (router.plugins === undefined) { - router.plugins = () => [serverFunctions.client()]; - } - }); } diff --git a/packages/vinxi-server-functions/server-handler.js b/packages/vinxi-server-functions/server-handler.js index 35c8de09..e3d99150 100644 --- a/packages/vinxi-server-functions/server-handler.js +++ b/packages/vinxi-server-functions/server-handler.js @@ -6,7 +6,8 @@ async function loadModule(id) { if (import.meta.env.DEV) { const mod = await import( /* @vite-ignore */ - import.meta.env.MANIFEST["server"].chunks[id].output.path + import.meta.env.MANIFEST[import.meta.env.ROUTER_NAME].chunks[id].output + .path ); return mod; } @@ -16,7 +17,7 @@ async function loadModule(id) { } return await import( /* @vite-ignore */ - import.meta.env.MANIFEST["server"].chunks[id].output.path + import.meta.env.MANIFEST[import.meta.env.ROUTER_NAME].chunks[id].output.path ); } @@ -45,7 +46,7 @@ export async function handleServerAction(event) { // Wait for any mutations const response = await result; event.node.res.setHeader("Content-Type", "application/json"); - event.node.res.setHeader("Router", "server"); + event.node.res.setHeader("Router", "server-fns"); return JSON.stringify(response ?? null); } catch (x) { diff --git a/packages/vinxi/bin/cli.mjs b/packages/vinxi/bin/cli.mjs index 057862ad..49cee451 100755 --- a/packages/vinxi/bin/cli.mjs +++ b/packages/vinxi/bin/cli.mjs @@ -1,94 +1,165 @@ #!/usr/bin/env node import chokidar from "chokidar"; -import mri from "mri"; +import { defineCommand, runMain } from "citty"; +import fs from "fs"; +// import mri from "mri"; +import { fileURLToPath } from "url"; import { exec } from "node:child_process"; import { loadApp } from "../lib/load-app.js"; import { log } from "../lib/logger.js"; -import { resolve } from "../lib/path.js"; -async function main() { - const args = mri(process.argv.slice(2)); - const command = args._[0]; - const rootDir = resolve(args._[1] || "."); +const packageJson = JSON.parse( + fs.readFileSync( + fileURLToPath(new URL("../package.json", import.meta.url)), + "utf-8", + ), +); - const configFile = args.config; - globalThis.MANIFEST = {}; - const app = await loadApp(configFile, args); +const command = defineCommand({ + meta: { + name: "vinxi", + version: packageJson.version, + description: "Vinxi: The JavaScript/TypeScript Server SDK", + }, + args: { + config: { + type: "string", + description: "Path to config file (default: app.config.js)", + }, + }, + subCommands: () => ({ + dev: { + meta: { + name: "dev", + version: packageJson.version, + description: "Start a Vinxi development server", + }, + args: { + config: { + type: "string", + description: "Path to config file (default: app.config.js)", + }, + force: { + type: "boolean", + description: "Force optimize deps (default: false)", + }, + devtools: { + type: "boolean", + description: "Enable devtools (default: false)", + }, + port: { + type: "number", + description: "Port to listen on (default: 3000)", + }, + host: { + type: "boolean", + description: "Expose to host (default: false)", + }, + stack: { + type: "string", + description: "Stacks", + alias: "s", + }, + }, + async run({ args }) { + const configFile = args.config; + globalThis.MANIFEST = {}; + const app = await loadApp(configFile, args); - if (command === "dev") { - let devServer; - /** @type {import('chokidar').FSWatcher} */ - let watcher; + let devServer; + /** @type {import('chokidar').FSWatcher} */ + let watcher; - function createWatcher() { - watcher = chokidar.watch( - ["app.config.*", "vite.config.*", configFile].filter(Boolean), - { - ignoreInitial: true, - }, - ); - watcher.on("all", async (ctx, path) => { - log("change detected in", path); - log("reloading app"); - const newApp = await loadApp(configFile, args); - if (!newApp) return; - restartDevServer(newApp); - }); - } + function createWatcher() { + watcher = chokidar.watch( + ["app.config.*", "vite.config.*", configFile].filter(Boolean), + { + ignoreInitial: true, + }, + ); + watcher.on("all", async (ctx, path) => { + log("change detected in", path); + log("reloading app"); + const newApp = await loadApp(configFile, args); + if (!newApp) return; + restartDevServer(newApp); + }); + } - async function restartDevServer(newApp) { - const { createDevServer } = await import("../lib/dev-server.js"); - await devServer?.close(); - devServer = await createDevServer(newApp, { - force: args.force, - devtools: args.devtools || Boolean(process.env.DEVTOOLS), - port: Number(process.env.PORT ?? 3000), - }); - log("restarting dev server"); - devServer.listen(); - } + async function restartDevServer(newApp) { + const { createDevServer } = await import("../lib/dev-server.js"); + await devServer?.close(); + devServer = await createDevServer(newApp, { + force: args.force, + devtools: args.devtools || Boolean(process.env.DEVTOOLS), + port: Number(process.env.PORT ?? 3000), + }); + log("restarting dev server"); + devServer.listen(); + } - if (!app) { - let fsWatcher = (watcher = chokidar.watch( - ["app.config.*", "vite.config.*", configFile].filter(Boolean), - { - ignoreInitial: true, - persistent: true, - }, - )); - fsWatcher.on("all", async (path) => { - log("change detected in", path); - log("reloading app"); - const newApp = await loadApp(configFile, args); - if (!newApp) return; + if (!app) { + let fsWatcher = (watcher = chokidar.watch( + ["app.config.*", "vite.config.*", configFile].filter(Boolean), + { + ignoreInitial: true, + persistent: true, + }, + )); + fsWatcher.on("all", async (path) => { + log("change detected in", path); + log("reloading app"); + const newApp = await loadApp(configFile, args); + if (!newApp) return; - fsWatcher.close(); + fsWatcher.close(); + createWatcher(); + restartDevServer(newApp); + }); + return; + } createWatcher(); - restartDevServer(newApp); - }); - return; - } - createWatcher(); - const { createDevServer } = await import("../lib/dev-server.js"); - devServer = await createDevServer(app, { - force: args.force, - port: Number(process.env.PORT ?? 3000), - devtools: args.devtools || Boolean(process.env.DEVTOOLS), - }); - devServer.listen(); - } else if (command === "build") { - process.env.NODE_ENV = "production"; - const { createBuild } = await import("../lib/build.js"); - await createBuild(app, {}); - } else if (command === "start") { - await exec(`node .output/server/index.mjs`); - } else { - throw new Error(`Unknown command ${command}`); - } -} -main().catch((err) => { - console.error(err); - process.exit(1); + const { createDevServer } = await import("../lib/dev-server.js"); + devServer = await createDevServer(app, { + force: args.force, + port: Number(process.env.PORT ?? 3000), + devtools: args.devtools || Boolean(process.env.DEVTOOLS), + }); + devServer.listen(); + }, + }, + build: { + meta: { + name: "build", + version: packageJson.version, + description: "Build your Vinxi app", + }, + args: { + config: { + type: "string", + description: "Path to config file (default: app.config.js)", + }, + stack: { + type: "string", + description: "Stacks", + }, + preset: { + type: "string", + description: "Server preset (default: node-server)", + }, + }, + async run({ args }) { + const configFile = args.config; + globalThis.MANIFEST = {}; + const app = await loadApp(configFile, args); + process.env.NODE_ENV = "production"; + const { createBuild } = await import("../lib/build.js"); + await createBuild(app, { preset: args.preset }); + }, + }, + }), }); + +runMain(command); diff --git a/packages/vinxi/lib/app.js b/packages/vinxi/lib/app.js index a3c48390..1c601505 100644 --- a/packages/vinxi/lib/app.js +++ b/packages/vinxi/lib/app.js @@ -1,5 +1,6 @@ // @ts-ignore import { createHooks } from "hookable"; +import resolve from "resolve"; import { isMainThread } from "worker_threads"; import invariant, { InvariantError } from "./invariant.js"; @@ -24,7 +25,10 @@ import { resolveRouterConfig, routerSchema } from "./router-modes.js"; root: string; }; addRouter: (router: any) => App; + addRouterPlugins: (apply: (router: import("./router-mode.js").Router) => boolean, plugins: () => any[]) => void; getRouter: (name: string) => import("./router-mode.js").Router; + resolveSync: (mod: string) => string; + import: (mod: string) => Promise; stack: (stack: (app: App) => void | Promise) => Promise; dev(): Promise; build(): Promise; @@ -121,6 +125,28 @@ export function createApp({ config.routers.push(resolvedRouter); return app; }, + addRouterPlugins(apply, plugins) { + const routers = app.config.routers.filter(apply); + + routers.forEach((router) => { + if (router.plugins) { + let prevPlugins = router.plugins; + router.plugins = () => [ + ...(plugins?.() ?? []), + ...(prevPlugins() ?? []), + ]; + } else if (router.plugins === undefined) { + router.plugins = plugins; + } + }); + }, + resolveSync(mod) { + return resolve.sync(mod, { basedir: config.root }); + }, + async import(mod) { + const resolved = app.resolveSync(mod); + return await import(resolved); + }, getRouter(/** @type {string} */ name) { const router = config.routers.find((router) => router.name === name); if (!router) { diff --git a/packages/vinxi/lib/build.js b/packages/vinxi/lib/build.js index 13afa32e..8b68d3cb 100644 --- a/packages/vinxi/lib/build.js +++ b/packages/vinxi/lib/build.js @@ -76,7 +76,9 @@ export async function createBuild(app, buildConfig) { dev: false, preset: + buildConfig.preset ?? process.env.TARGET ?? + process.env.SERVER_PRESET ?? process.env.NITRO_PRESET ?? app.config.server.preset, alias: { diff --git a/packages/vinxi/lib/load-app.js b/packages/vinxi/lib/load-app.js index 366d6854..500ebce9 100644 --- a/packages/vinxi/lib/load-app.js +++ b/packages/vinxi/lib/load-app.js @@ -87,7 +87,7 @@ async function applyStacks(app, s) { const stacks = await Promise.all( s.map(async (stack) => { if (stack.includes("/") || stack.includes("@")) { - var res = resolve.sync(stack, { basedir: app.config.root }); + var res = app.resolveSync(stack); const mod = await import(res); return mod.default; } diff --git a/packages/vinxi/package.json b/packages/vinxi/package.json index 97604307..641f3230 100644 --- a/packages/vinxi/package.json +++ b/packages/vinxi/package.json @@ -143,6 +143,7 @@ "boxen": "^7.1.1", "c12": "^1.4.2", "chokidar": "^3.5.3", + "citty": "^0.1.4", "consola": "^3.2.3", "defu": "^6.1.2", "dts-buddy": "^0.2.4", diff --git a/packages/vinxi/stack/react.js b/packages/vinxi/stack/react.js new file mode 100644 index 00000000..612f1f9e --- /dev/null +++ b/packages/vinxi/stack/react.js @@ -0,0 +1,10 @@ +import { createStack } from "./index.js"; + +export default createStack(async (app) => { + const { default: reactRefresh } = await app.import("@vitejs/plugin-react"); + + app.addRouterPlugins( + (router) => router.target === "browser", + () => [reactRefresh()], + ); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8d8e0d3..62b80da5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,7 +53,7 @@ importers: version: link:../packages/vinxi-mdx '@vinxi/react': specifier: 0.0.11 - version: link:../packages/vinxi-react + version: 0.0.11 '@vitejs/plugin-react': specifier: ^4.0.4 version: 4.1.0(vite@4.5.0) @@ -119,7 +119,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react-server': - specifier: 0.0.26 + specifier: 0.0.27 version: link:../../../../packages/vinxi-react-server '@vinxi/react-server-dom': specifier: 0.0.3 @@ -137,7 +137,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -153,16 +153,16 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vinxi/react-server-dom': specifier: 0.0.3 version: 0.0.3(react-dom@0.0.0-experimental-035a41c4e-20230704)(react@0.0.0-experimental-035a41c4e-20230704)(vite@4.5.0) '@vinxi/server-components': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../../../../packages/vinxi-server-components '@vinxi/server-functions': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../../../../packages/vinxi-server-functions '@vitejs/plugin-react': specifier: ^4.0.4 @@ -186,7 +186,7 @@ importers: specifier: ^1.9.0 version: 1.9.0 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -202,7 +202,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -220,7 +220,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -245,7 +245,7 @@ importers: specifier: 3.6.5 version: link:../../../../packages/vinxi-mdx '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -266,7 +266,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi vite-plugin-inspect: specifier: ^0.7.38 @@ -303,7 +303,7 @@ importers: specifier: 0.0.29 version: 0.0.29(vinxi@packages+vinxi) '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -327,7 +327,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -355,7 +355,7 @@ importers: specifier: 0.0.1-beta.194 version: 0.0.1-beta.194(react-dom@0.0.0-experimental-035a41c4e-20230704)(react@0.0.0-experimental-035a41c4e-20230704) '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -376,7 +376,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -392,7 +392,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react path-to-regexp: specifier: ^6.2.1 @@ -423,7 +423,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi examples/react/ssr/basic: @@ -432,7 +432,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -450,7 +450,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -478,7 +478,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -502,7 +502,7 @@ importers: specifier: ^1.7.4 version: 1.7.4 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi ws: specifier: ^8.13.0 @@ -533,7 +533,7 @@ importers: specifier: 0.0.1-beta.111 version: 0.0.1-beta.111(react-dom@0.0.0-experimental-035a41c4e-20230704)(react@0.0.0-experimental-035a41c4e-20230704) '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -557,7 +557,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: '@types/react': @@ -573,7 +573,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -594,7 +594,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi wouter: specifier: ^2.11.0 @@ -622,7 +622,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi vite: specifier: ^4.5.0 @@ -643,7 +643,7 @@ importers: specifier: 0.0.29 version: 0.0.29(vinxi@packages+vinxi) '@vinxi/solid': - specifier: 0.0.13 + specifier: 0.0.14 version: link:../../../../packages/vinxi-solid autoprefixer: specifier: ^10.4.15 @@ -655,7 +655,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi vite-plugin-solid: specifier: ^2.7.0 @@ -679,7 +679,7 @@ importers: specifier: ^7.20.1 version: 7.20.3 '@vinxi/solid': - specifier: 0.0.13 + specifier: 0.0.14 version: link:../../../../packages/vinxi-solid autoprefixer: specifier: ^10.4.15 @@ -691,7 +691,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi vite-plugin-solid: specifier: ^2.7.0 @@ -725,7 +725,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../../packages/vinxi devDependencies: axios: @@ -735,7 +735,7 @@ importers: examples/vanilla/empty: dependencies: vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi examples/vanilla/partyroom: @@ -753,7 +753,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi examples/vanilla/spa: @@ -762,7 +762,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/server-functions': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../../../packages/vinxi-server-functions autoprefixer: specifier: ^10.4.15 @@ -771,7 +771,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi examples/vanilla/stack: @@ -780,8 +780,11 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/server-functions': - specifier: workspace:^ + specifier: 0.0.37 version: link:../../../packages/vinxi-server-functions + '@vitejs/plugin-react': + specifier: ^4.0.4 + version: 4.1.0(vite@4.5.0) autoprefixer: specifier: ^10.4.15 version: 10.4.16(postcss@8.4.31) @@ -789,7 +792,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi devDependencies: '@types/resolve': @@ -820,7 +823,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi frameworks/solid-start: @@ -836,13 +839,13 @@ importers: specifier: ^0.8.3 version: 0.8.3(solid-js@1.8.5) '@vinxi/solid': - specifier: 0.0.13 + specifier: 0.0.14 version: link:../../packages/vinxi-solid solid-js: specifier: ^1.7.11 version: 1.8.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../packages/vinxi packages/doc: {} @@ -882,6 +885,9 @@ importers: chokidar: specifier: ^3.5.3 version: 3.5.3 + citty: + specifier: ^0.1.4 + version: 0.1.4 consola: specifier: ^3.2.3 version: 3.2.3 @@ -953,7 +959,7 @@ importers: version: 1.7.4 unimport: specifier: ^3.2.0 - version: 3.4.0(rollup@4.2.0) + version: 3.4.0(rollup@3.29.4) unstorage: specifier: ^1.9.0 version: 1.9.0 @@ -981,7 +987,7 @@ importers: version: 0.2.14 vite-plugin-inspect: specifier: ^0.7.38 - version: 0.7.41(rollup@4.2.0)(vite@4.5.0) + version: 0.7.41(vite@4.5.0) ws: specifier: ^8.13.0 version: 8.14.2 @@ -1056,7 +1062,7 @@ importers: specifier: ^2.5.5 version: 2.5.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../vinxi packages/vinxi-directives: @@ -1087,7 +1093,7 @@ importers: specifier: ^0.34.6 version: 0.34.6(vitest@0.28.5) vinxi: - specifier: ^0.0.43 + specifier: ^0.0.45 version: link:../vinxi vitest: specifier: ^0.28.5 @@ -1161,7 +1167,7 @@ importers: specifier: 0.0.0-experimental-035a41c4e-20230704 version: 0.0.0-experimental-035a41c4e-20230704 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../vinxi packages/vinxi-react-server: @@ -1170,7 +1176,7 @@ importers: specifier: 0.0.29 version: 0.0.29(vinxi@packages+vinxi) '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../vinxi-react '@vinxi/react-server-dom': specifier: ^0.0.3 @@ -1189,7 +1195,7 @@ importers: specifier: 0.0.0-experimental-035a41c4e-20230704 version: 0.0.0-experimental-035a41c4e-20230704 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../vinxi packages/vinxi-router: @@ -1202,13 +1208,13 @@ importers: version: 4.2.1(typescript@5.1.6) devDependencies: vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../vinxi packages/vinxi-server-components: dependencies: '@vinxi/plugin-directives': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../vinxi-directives acorn: specifier: ^8.10.0 @@ -1230,7 +1236,7 @@ importers: version: 0.23.4 devDependencies: vinxi: - specifier: ^0.0.43 + specifier: ^0.0.45 version: link:../vinxi vitest: specifier: ^0.28.5 @@ -1239,7 +1245,7 @@ importers: packages/vinxi-server-functions: dependencies: '@vinxi/plugin-directives': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../vinxi-directives acorn: specifier: ^8.10.0 @@ -1261,7 +1267,7 @@ importers: version: 0.23.4 devDependencies: vinxi: - specifier: ^0.0.43 + specifier: ^0.0.45 version: link:../vinxi vitest: specifier: ^0.28.5 @@ -1276,7 +1282,7 @@ importers: specifier: ^1.7.11 version: 1.8.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../vinxi test: @@ -1349,7 +1355,7 @@ importers: test/templates/react: dependencies: '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -1364,7 +1370,7 @@ importers: specifier: 0.0.0-experimental-035a41c4e-20230704 version: 0.0.0-experimental-035a41c4e-20230704(react@0.0.0-experimental-035a41c4e-20230704) vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi devDependencies: '@types/react': @@ -1380,16 +1386,16 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../packages/vinxi-react '@vinxi/react-server-dom': specifier: 0.0.3 version: 0.0.3(react-dom@0.0.0-experimental-035a41c4e-20230704)(react@0.0.0-experimental-035a41c4e-20230704)(vite@4.5.0) '@vinxi/server-components': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../../../packages/vinxi-server-components '@vinxi/server-functions': - specifier: 0.0.35 + specifier: 0.0.37 version: link:../../../packages/vinxi-server-functions '@vitejs/plugin-react': specifier: ^4.0.4 @@ -1410,7 +1416,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi devDependencies: '@types/react': @@ -1426,7 +1432,7 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@vinxi/react': - specifier: 0.0.11 + specifier: 0.0.12 version: link:../../../packages/vinxi-react '@vitejs/plugin-react': specifier: ^4.0.4 @@ -1447,7 +1453,7 @@ importers: specifier: ^3.3.3 version: 3.3.5 vinxi: - specifier: 0.0.43 + specifier: 0.0.45 version: link:../../../packages/vinxi wouter: specifier: ^2.11.0 @@ -4836,7 +4842,6 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 rollup: 3.29.4 - dev: false /@rollup/pluginutils@5.0.5(rollup@4.2.0): resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} @@ -4851,12 +4856,14 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 rollup: 4.2.0 + dev: false /@rollup/rollup-android-arm-eabi@4.2.0: resolution: {integrity: sha512-8PlggAxGxavr+pkCNeV1TM2wTb2o+cUWDg9M1cm9nR27Dsn287uZtSLYXoQqQcmq+sYfF7lHfd3sWJJinH9GmA==} cpu: [arm] os: [android] requiresBuild: true + dev: false optional: true /@rollup/rollup-android-arm64@4.2.0: @@ -4864,6 +4871,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: false optional: true /@rollup/rollup-darwin-arm64@4.2.0: @@ -4871,6 +4879,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@rollup/rollup-darwin-x64@4.2.0: @@ -4878,6 +4887,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@rollup/rollup-linux-arm-gnueabihf@4.2.0: @@ -4885,6 +4895,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: false optional: true /@rollup/rollup-linux-arm64-gnu@4.2.0: @@ -4892,6 +4903,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@rollup/rollup-linux-arm64-musl@4.2.0: @@ -4899,6 +4911,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@rollup/rollup-linux-x64-gnu@4.2.0: @@ -4906,6 +4919,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@rollup/rollup-linux-x64-musl@4.2.0: @@ -4913,6 +4927,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@rollup/rollup-win32-arm64-msvc@4.2.0: @@ -4920,6 +4935,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@rollup/rollup-win32-ia32-msvc@4.2.0: @@ -4927,6 +4943,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@rollup/rollup-win32-x64-msvc@4.2.0: @@ -4934,6 +4951,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@sideway/address@4.1.4: @@ -5509,7 +5527,7 @@ packages: hasBin: true dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.0.5(rollup@4.2.0) + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) '@unocss/config': 0.56.5 '@unocss/core': 0.56.5 '@unocss/preset-uno': 0.56.5 @@ -5684,7 +5702,7 @@ packages: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.0.5(rollup@4.2.0) + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) '@unocss/config': 0.56.5 '@unocss/core': 0.56.5 '@unocss/inspector': 0.56.5 @@ -5786,6 +5804,10 @@ packages: vite: 4.5.0(@types/node@14.18.63) dev: false + /@vinxi/react@0.0.11: + resolution: {integrity: sha512-b50IJD9C3qgAtdd4QSsFF/olg0ZUKznS+N9rR+XQdIssVc63zB/TRlJiQaGUqink3lYRlhWiBEdoV5N1uvPzoA==} + dev: false + /@vitejs/plugin-react@3.1.0(vite@4.5.0): resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==} engines: {node: ^14.18.0 || >=16.0.0} @@ -10286,6 +10308,7 @@ packages: '@rollup/rollup-win32-ia32-msvc': 4.2.0 '@rollup/rollup-win32-x64-msvc': 4.2.0 fsevents: 2.3.3 + dev: false /run-applescript@5.0.0: resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} @@ -11202,6 +11225,24 @@ packages: vfile: 4.2.1 dev: false + /unimport@3.4.0: + resolution: {integrity: sha512-M/lfFEgufIT156QAr/jWHLUn55kEmxBBiQsMxvRSIbquwmeJEyQYgshHDEvQDWlSJrVOOTAgnJ3FvlsrpGkanA==} + dependencies: + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + escape-string-regexp: 5.0.0 + fast-glob: 3.3.1 + local-pkg: 0.4.3 + magic-string: 0.30.5 + mlly: 1.4.2 + pathe: 1.1.1 + pkg-types: 1.0.3 + scule: 1.0.0 + strip-literal: 1.3.0 + unplugin: 1.5.0 + transitivePeerDependencies: + - rollup + dev: false + /unimport@3.4.0(rollup@3.29.4): resolution: {integrity: sha512-M/lfFEgufIT156QAr/jWHLUn55kEmxBBiQsMxvRSIbquwmeJEyQYgshHDEvQDWlSJrVOOTAgnJ3FvlsrpGkanA==} dependencies: @@ -11614,7 +11655,7 @@ packages: serve-static: 1.15.0 ufo: 1.3.1 unenv: 1.7.4 - unimport: 3.4.0(rollup@4.2.0) + unimport: 3.4.0 unstorage: 1.9.0 vite: 4.3.9(@types/node@18.18.8) zod: 3.22.4 @@ -11754,6 +11795,30 @@ packages: - supports-color dev: false + /vite-plugin-inspect@0.7.41(vite@4.5.0): + resolution: {integrity: sha512-gASdFRO4CHDQF8qAk9LZEJyzlIJM4bFvDn7hz0e2r1PS6uq+yukd8+jHctOAbvCceQoTS5iDAgd4/mWcGWYoMw==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': '*' + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + dependencies: + '@antfu/utils': 0.7.6 + '@rollup/pluginutils': 5.0.5(rollup@3.29.4) + debug: 4.3.4 + error-stack-parser-es: 0.1.1 + fs-extra: 11.1.1 + open: 9.1.0 + picocolors: 1.0.0 + sirv: 2.0.3 + vite: 4.5.0(@types/node@14.18.63) + transitivePeerDependencies: + - rollup + - supports-color + dev: false + /vite-plugin-solid@2.7.2(solid-js@1.8.5)(vite@4.5.0): resolution: {integrity: sha512-GV2SMLAibOoXe76i02AsjAg7sbm/0lngBlERvJKVN67HOrJsHcWgkt0R6sfGLDJuFkv2aBe14Zm4vJcNME+7zw==} peerDependencies: