void 0.10.4 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents-Bmr5tFFb.mjs +1454 -0
- package/dist/{auth-cmd-CblKzAdD.mjs → auth-cmd-DlgNwByu.mjs} +10 -10
- package/dist/{better-auth-shared-D0Mbmx5V.mjs → better-auth-shared-BQooDxbw.mjs} +1 -1
- package/dist/{better-auth-shared-jkksALri.d.mts → better-auth-shared-BvnM9px6.d.mts} +2 -2
- package/dist/{build-cmd-CJQSRupz.mjs → build-cmd-Br8qL0rA.mjs} +15 -17
- package/dist/{cache-CMzjhxHh.mjs → cache-wH-mP8UE.mjs} +10 -12
- package/dist/{cancel-deploy-S2N8NSv6.mjs → cancel-deploy-BEBOEgtu.mjs} +16 -18
- package/dist/cli/cli.mjs +62 -51
- package/dist/{client-YIzxv2ZO.mjs → client-Cj96iiBH.mjs} +118 -8
- package/dist/{config-8dLIngKW.mjs → config-1twldYCW.mjs} +10 -10
- package/dist/{config--wXmVOoe.mjs → config-BdUctCZD.mjs} +6 -6
- package/dist/{create-project-pLQdzEPe.mjs → create-project-DD9n8Ho-.mjs} +28 -23
- package/dist/{db-hAmBumot.mjs → db-DjKE2-A-.mjs} +151 -150
- package/dist/{delete-CfSe3EJO.mjs → delete-D2kr3Kmk.mjs} +13 -15
- package/dist/{deploy-DpOdwtla.mjs → deploy-C4PbkFyE.mjs} +114 -119
- package/dist/{discover-C8N1I4tK.mjs → discover-BuVVSAum.mjs} +4 -4
- package/dist/{dist-5cGIJHQQ.mjs → dist-BuiRJkTd.mjs} +59 -27
- package/dist/{domain-CkowysQx.mjs → domain-_luIsM_B.mjs} +14 -16
- package/dist/{env-CIwG2y7G.mjs → env-CO5XAS9t.mjs} +23 -25
- package/dist/{env-helpers-B_ks681T.d.mts → env-helpers-z4stu8uc.d.mts} +1 -1
- package/dist/{env-types-CaJaIRXU.mjs → env-types-D51bnR-c.mjs} +4 -4
- package/dist/{env-validation-LH6eoyW-.mjs → env-validation-CeC2FL66.mjs} +4 -4
- package/dist/{fetch-error-C6qffTl2.mjs → fetch-error-Dj3crt0e.mjs} +3 -3
- package/dist/{gen-q6McxXgE.mjs → gen-Cf79J4aw.mjs} +42 -44
- package/dist/{github-cmd-BvEKQmcD.mjs → github-cmd-DnqxyOsb.mjs} +197 -91
- package/dist/{handler-B7rCOy21.d.mts → handler-imD0UVDT.d.mts} +4 -5
- package/dist/{headers-BNWymgnH.mjs → headers-BwvFGhkx.mjs} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +102 -83
- package/dist/{init-CZP69LJu.mjs → init-KirOzVDs.mjs} +132 -134
- package/dist/link-CUmiosyb.mjs +45 -0
- package/dist/{list-B7qXBBjo.mjs → list-3GEw7b6m.mjs} +10 -12
- package/dist/{login-B3l_sDwT.mjs → login-DJReaT_Q.mjs} +14 -15
- package/dist/{logs-AXm660MB.mjs → logs-D-rQ56Lq.mjs} +9 -11
- package/dist/{magic-string.es-C1Fb0uxq.mjs → magic-string.es-ZQjdJFFn.mjs} +3 -3
- package/dist/{mcp-D2plINxM.mjs → mcp-D7yc0dXY.mjs} +2 -3
- package/dist/{node-B07cZs0d.mjs → node-yFFk626c.mjs} +6 -6
- package/dist/{package-json-Bg_GJdJB.mjs → package-json-B0NuUWGd.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +2 -1
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +3 -3
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +5 -2
- package/dist/{plugin-inference-C3fLzFvP.mjs → plugin-inference-CJxi_fWI.mjs} +4 -4
- package/dist/{prepare-DRRboRqH.mjs → prepare-C_cVurhP.mjs} +15 -18
- package/dist/{preset-B7ZQZn0u.mjs → preset-CVvwCeIy.mjs} +4 -4
- package/dist/{project-cmd-InegJruy.mjs → project-cmd-DnU7u9QF.mjs} +13 -14
- package/dist/{project-paths-CCMrHYQm.mjs → project-paths-tpdR1mJR.mjs} +2 -2
- package/dist/{project-tsconfig-BTNuNoJ0.mjs → project-tsconfig-D9uSVVpA.mjs} +4 -4
- package/dist/{protocol-6UZCowS1.d.mts → protocol-6hTJ04T1.d.mts} +3 -3
- package/dist/{resolve-project-D4O1_fZz.mjs → resolve-project-D2HI3TrG.mjs} +2 -2
- package/dist/{rollback-CHVE-DeT.mjs → rollback-Yh7bCKob.mjs} +21 -23
- package/dist/{route-types-D03ryMXz.mjs → route-types-CfKfhbIg.mjs} +234 -3
- package/dist/{runner-BQyKUqAL.mjs → runner-h272wcPj.mjs} +4 -5
- package/dist/{runner-pg-EuhrFW3D.mjs → runner-pg-waxJOnBb.mjs} +1 -1
- package/dist/runtime/ai.mjs +2 -2
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +3 -3
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/db-pg.d.mts +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public-client.mjs +2 -0
- package/dist/runtime/env-public.d.mts +3 -4
- package/dist/runtime/env-public.mjs +3 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +2 -2
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live-server.mjs +2 -0
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +3 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/remote/index.mjs +11 -1
- package/dist/runtime/sandbox.d.mts +1 -4
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -0
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/runtime/ws.mjs +2 -0
- package/dist/{scan-VCAM1oh3.mjs → scan-Dp_Gyzs3.mjs} +3 -3
- package/dist/{scan-DGEp1-1Q.mjs → scan-i7Yz54fv.mjs} +26 -8
- package/dist/{secret-CVKwIOm3.mjs → secret-u7FRvg8d.mjs} +22 -24
- package/dist/{skills-Dl3u05da.mjs → skills-DsdNDtX3.mjs} +6 -7
- package/dist/{subcommand-prompt-B8ng0FTS.mjs → subcommand-prompt-DtES-oP6.mjs} +34 -35
- package/dist/sveltekit.mjs +2 -2
- package/dist/validate-DT7nFMlf.mjs +504 -0
- package/dist/{yarn-pnp-WLW2IHUY.mjs → yarn-pnp-CW8LB6g_.mjs} +1 -1
- package/package.json +19 -19
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +32 -11
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +45 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +5 -5
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +4 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +29 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +403 -390
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +2 -1
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +1 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +18 -6
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +35 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +70 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +11 -7
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +3 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +141 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +145 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +16 -28
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +16 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +15 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +255 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +175 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +70 -5
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +2 -2
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +9 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +63 -11
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +347 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +27 -3
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +176 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +8 -0
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +36 -4
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +11 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +65 -13
- package/skills/void/docs/reference/cli.md +19 -1
- package/dist/agents-MhSzNMiC.mjs +0 -151
- package/dist/collect-9rO3JFNM.mjs +0 -55
- package/dist/config-hhMYPVRT.mjs +0 -21
- package/dist/dist-abzUneor.mjs +0 -1287
- package/dist/drizzle-DqstQTGq.mjs +0 -232
- package/dist/link-BKLElphS.mjs +0 -47
- package/dist/output-DeiS4oEX.mjs +0 -139
- package/dist/plan-aD3wRDqF.mjs +0 -271
- package/dist/project-CH9pdo16.mjs +0 -72
- package/dist/project-slug-rX3kTOfY.mjs +0 -10
- package/dist/validate-CNWm-PsL.mjs +0 -186
- /package/dist/{auth-migrations-BP-hMzYl.mjs → auth-migrations-BTZ-ATvQ.mjs} +0 -0
- /package/dist/{auth-Dz2CCn4T.d.mts → auth-qgMlYp7Z.d.mts} +0 -0
- /package/dist/{canonical-json-CEyQaVDa.mjs → canonical-json-DuDiiUsQ.mjs} +0 -0
- /package/dist/{cf-access-DKDsgwOU.mjs → cf-access-Bqw81xAf.mjs} +0 -0
- /package/dist/{defer-C-bdSM_b.mjs → defer-YsYDUoii.mjs} +0 -0
- /package/dist/{dotenv-lS94ymhM.mjs → dotenv-D_UbC_vc.mjs} +0 -0
- /package/dist/{env-raw-Dtj1UAoK.mjs → env-raw-CoS20LHP.mjs} +0 -0
- /package/dist/{fetch-error-B6RaJ-eZ.d.mts → fetch-error-Sp1R4mZv.d.mts} +0 -0
- /package/dist/{git-metadata-Ce0AtSZL.mjs → git-metadata-CBKaL0v5.mjs} +0 -0
- /package/dist/{head-eOUCWUNy.d.mts → head-nmvOgFjd.d.mts} +0 -0
- /package/dist/{log-BdD_Fpms.mjs → log-ChfPKsVd.mjs} +0 -0
- /package/dist/{pathe.M-eThtNZ-BrPhGF_K.mjs → pathe.M-eThtNZ-CQzLbt4c.mjs} +0 -0
- /package/dist/{pg-CempqvEJ.mjs → pg-J2HbZIkX.mjs} +0 -0
- /package/dist/{providers-BJIoduK9.d.mts → providers-BNKRacMr.d.mts} +0 -0
- /package/dist/{providers-BwPbdHdi.mjs → providers-CJlNS3kT.mjs} +0 -0
- /package/dist/{proxy-M3pxItg2.mjs → proxy-D-3_D-Gl.mjs} +0 -0
- /package/dist/{chunk-DJd-R1mw.mjs → rolldown-runtime-DJK8HYOj.mjs} +0 -0
- /package/dist/{standard-schema-Cy0lfeWv.d.mts → standard-schema-DJ0HW7QP.d.mts} +0 -0
- /package/dist/{types-BodZGegX.d.mts → types-lLjNE9Qp.d.mts} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, u as import_picocolors, w as intro, x as cancel } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { S as writeProjectConfig, b as readProjectConfig, d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
3
|
+
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-DD9n8Ho-.mjs";
|
|
4
|
+
import { r as resolveProjectBySlug } from "./resolve-project-D2HI3TrG.mjs";
|
|
5
|
+
//#region src/cli/link.ts
|
|
6
|
+
async function runLink(root, slug) {
|
|
7
|
+
console.log();
|
|
8
|
+
intro(cliTitle("project link"));
|
|
9
|
+
const existing = readProjectConfig(root);
|
|
10
|
+
if (existing) {
|
|
11
|
+
log.warn(`Already linked to ${import_picocolors.default.blue(existing.slug)}.${getSiteDomain(root)}`);
|
|
12
|
+
outro("To re-link, delete .void/project.json and run again.");
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const token = getToken(root);
|
|
16
|
+
if (!token) {
|
|
17
|
+
cancel("No auth token found. Run `void auth login` first.");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const client = new PlatformClient(token, { root });
|
|
21
|
+
const projects = await client.listProjects();
|
|
22
|
+
if (slug) {
|
|
23
|
+
const config = resolveProjectBySlug(projects, slug);
|
|
24
|
+
if (!config) {
|
|
25
|
+
cancel(`project: No project found with slug '${slug}'.`);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
writeProjectConfig(root, config);
|
|
29
|
+
outro(`Linked to ${import_picocolors.default.blue(config.slug)}.${getSiteDomain(root)}`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = await promptProjectSelection(projects, "Select a project:", root, { confirmExisting: true });
|
|
33
|
+
if (result.action === "create") {
|
|
34
|
+
const config = await promptAndCreateProject(root, client);
|
|
35
|
+
outro(`Created and linked to ${import_picocolors.default.blue(config.slug)}.${getSiteDomain(root)}`);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
writeProjectConfig(root, {
|
|
39
|
+
projectId: result.project.id,
|
|
40
|
+
slug: result.project.slug
|
|
41
|
+
});
|
|
42
|
+
outro(`Linked to ${import_picocolors.default.blue(result.project.slug)}.${getSiteDomain(root)}`);
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { runLink };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
|
-
import { r as resolveProjectBySlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, c as ensureUtc, f as tablePrefix, s as dim, u as import_picocolors, w as intro } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug } from "./resolve-project-D2HI3TrG.mjs";
|
|
6
4
|
//#region src/cli/list.ts
|
|
7
5
|
async function runListCommand(root, slug) {
|
|
8
6
|
console.log();
|
|
9
|
-
|
|
7
|
+
intro(cliTitle("project status"));
|
|
10
8
|
const token = getToken(root);
|
|
11
9
|
if (!token) {
|
|
12
|
-
|
|
10
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
13
11
|
process.exit(1);
|
|
14
12
|
}
|
|
15
13
|
const client = new PlatformClient(token, { root });
|
|
@@ -18,7 +16,7 @@ async function runListCommand(root, slug) {
|
|
|
18
16
|
if (slug) {
|
|
19
17
|
const config = resolveProjectBySlug(await client.listProjects(), slug);
|
|
20
18
|
if (!config) {
|
|
21
|
-
|
|
19
|
+
log.error(`project: No project found with slug '${slug}'.`);
|
|
22
20
|
process.exit(1);
|
|
23
21
|
}
|
|
24
22
|
projectId = config.projectId;
|
|
@@ -26,7 +24,7 @@ async function runListCommand(root, slug) {
|
|
|
26
24
|
} else {
|
|
27
25
|
const linked = readProjectConfig(root);
|
|
28
26
|
if (!linked) {
|
|
29
|
-
|
|
27
|
+
log.error("No linked project found. Pass a project name: void project status <name>");
|
|
30
28
|
process.exit(1);
|
|
31
29
|
}
|
|
32
30
|
projectId = linked.projectId;
|
|
@@ -37,11 +35,11 @@ async function runListCommand(root, slug) {
|
|
|
37
35
|
async function showDeployments(client, projectId, slug) {
|
|
38
36
|
const { deployments, activeDeploymentId } = await client.listDeployments(projectId);
|
|
39
37
|
if (deployments.length === 0) {
|
|
40
|
-
|
|
38
|
+
outro(`No deployments for ${slug}.`);
|
|
41
39
|
return;
|
|
42
40
|
}
|
|
43
41
|
const latest = deployments[0];
|
|
44
|
-
if (latest.status === "failed" && latest.error_message)
|
|
42
|
+
if (latest.status === "failed" && latest.error_message) log.error(`project: Latest deploy failed: '${latest.error_message}'.`);
|
|
45
43
|
const rows = deployments.map((d) => formatDeploymentRow(d, activeDeploymentId));
|
|
46
44
|
const idWidth = Math.max(2, ...rows.map((r) => r.id.length));
|
|
47
45
|
const typeWidth = Math.max(4, ...rows.map((r) => r.appType.length));
|
|
@@ -55,7 +53,7 @@ async function showDeployments(client, projectId, slug) {
|
|
|
55
53
|
console.log(prefix);
|
|
56
54
|
console.log(header);
|
|
57
55
|
for (const line of lines) console.log(line);
|
|
58
|
-
|
|
56
|
+
outro(`${slug} — ${deployments.length} deployment(s)`);
|
|
59
57
|
}
|
|
60
58
|
function computeDisplayStatus(d, activeDeploymentId) {
|
|
61
59
|
if (d.status === "failed") return "failed";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as runLogin, a as isExpiredTokenError, f as getToken, g as removeToken, m as isStagingMode, n as PlatformClient, p as getTokenSource, v as saveToken } from "./client-
|
|
3
|
-
import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, j as isCancel, k as select, o as createSpinner, u as import_picocolors, w as intro, x as cancel } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { _ as runLogin, a as isExpiredTokenError, f as getToken, g as removeToken, m as isStagingMode, n as PlatformClient, p as getTokenSource, v as saveToken } from "./client-Cj96iiBH.mjs";
|
|
4
3
|
//#region src/cli/login.ts
|
|
5
4
|
async function promptForLoginToken(root = process.cwd()) {
|
|
6
|
-
const provider = await
|
|
5
|
+
const provider = await select({
|
|
7
6
|
message: "Choose a login provider:",
|
|
8
7
|
options: [{
|
|
9
8
|
value: "github",
|
|
@@ -13,8 +12,8 @@ async function promptForLoginToken(root = process.cwd()) {
|
|
|
13
12
|
label: "Google"
|
|
14
13
|
}]
|
|
15
14
|
});
|
|
16
|
-
if (
|
|
17
|
-
|
|
15
|
+
if (isCancel(provider)) {
|
|
16
|
+
cancel("Login cancelled.");
|
|
18
17
|
process.exit(0);
|
|
19
18
|
}
|
|
20
19
|
const providerName = provider === "github" ? "GitHub" : "Google";
|
|
@@ -34,7 +33,7 @@ async function promptForLoginToken(root = process.cwd()) {
|
|
|
34
33
|
}
|
|
35
34
|
async function runLoginCommand(root = process.cwd()) {
|
|
36
35
|
console.log();
|
|
37
|
-
|
|
36
|
+
intro(cliTitle("login"));
|
|
38
37
|
const existing = getToken(root);
|
|
39
38
|
let expiredEnvToken = false;
|
|
40
39
|
if (existing) {
|
|
@@ -43,30 +42,30 @@ async function runLoginCommand(root = process.cwd()) {
|
|
|
43
42
|
try {
|
|
44
43
|
await client.whoami();
|
|
45
44
|
if (tokenSource === "ci") {
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
log.warn("Already authenticated via `VOID_TOKEN`.");
|
|
46
|
+
outro("Unset `VOID_TOKEN` to log in with a different account.");
|
|
48
47
|
return;
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
log.warn("Already logged in.");
|
|
50
|
+
outro("To re-login, run `void auth logout` first.");
|
|
52
51
|
return;
|
|
53
52
|
} catch (error) {
|
|
54
53
|
if (!isExpiredTokenError(error)) throw error;
|
|
55
54
|
if (tokenSource === "ci") {
|
|
56
55
|
expiredEnvToken = true;
|
|
57
|
-
|
|
56
|
+
log.warn("`VOID_TOKEN` is invalid or expired. Continuing with a new login.");
|
|
58
57
|
} else {
|
|
59
58
|
removeToken(root);
|
|
60
|
-
|
|
59
|
+
log.warn("Stored auth token expired. Starting a new login.");
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
await promptForLoginToken(root);
|
|
65
64
|
if (expiredEnvToken) {
|
|
66
|
-
|
|
65
|
+
outro(`${isStagingMode(root) ? "Staging token saved." : "Token saved."} Unset \`VOID_TOKEN\` to use it.`);
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
|
-
|
|
68
|
+
outro(isStagingMode(root) ? "Staging token saved." : "Token saved.");
|
|
70
69
|
}
|
|
71
70
|
//#endregion
|
|
72
71
|
export { runLoginCommand as n, promptForLoginToken as t };
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
4
|
-
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, s as dim, u as import_picocolors, w as intro } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
5
3
|
//#region src/cli/logs.ts
|
|
6
4
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
7
5
|
console.log();
|
|
8
|
-
|
|
6
|
+
intro(cliTitle("project logs"));
|
|
9
7
|
const token = getToken(root);
|
|
10
8
|
if (!token) {
|
|
11
|
-
|
|
9
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
12
10
|
process.exit(1);
|
|
13
11
|
}
|
|
14
12
|
if (!/^\d+(m|h|d)$/.test(range)) {
|
|
15
|
-
|
|
13
|
+
log.error(`logs: Invalid range '${range}'. Use a format like 15m, 2h, or 3d.`);
|
|
16
14
|
process.exit(1);
|
|
17
15
|
}
|
|
18
16
|
const linked = readProjectConfig(root);
|
|
19
17
|
if (!linked) {
|
|
20
|
-
|
|
18
|
+
log.error("No linked project. Run `void project link` first.");
|
|
21
19
|
process.exit(1);
|
|
22
20
|
}
|
|
23
21
|
const client = new PlatformClient(token, { root });
|
|
@@ -25,16 +23,16 @@ async function runLogsCommand(root, filter, range, deployment, level) {
|
|
|
25
23
|
try {
|
|
26
24
|
entries = await client.getLogs(linked.projectId, range, 200, deployment || void 0, level || void 0);
|
|
27
25
|
} catch (err) {
|
|
28
|
-
|
|
26
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
29
27
|
process.exit(1);
|
|
30
28
|
}
|
|
31
29
|
entries = filterLogEntries(entries, level, filter);
|
|
32
30
|
if (entries.length === 0) {
|
|
33
|
-
|
|
31
|
+
outro(`No logs found in the last ${range}.`);
|
|
34
32
|
return;
|
|
35
33
|
}
|
|
36
34
|
for (const entry of entries) printEntry(entry);
|
|
37
|
-
|
|
35
|
+
outro(dim(`${entries.length} log entries`));
|
|
38
36
|
}
|
|
39
37
|
function printEntry(entry) {
|
|
40
38
|
const time = formatTime(entry.timestamp);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var comma = ",".charCodeAt(0);
|
|
3
3
|
var semicolon = ";".charCodeAt(0);
|
|
4
4
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
5
|
-
var intToChar = new Uint8Array(64);
|
|
6
|
-
var charToInt = new Uint8Array(128);
|
|
5
|
+
var intToChar = /* @__PURE__ */ new Uint8Array(64);
|
|
6
|
+
var charToInt = /* @__PURE__ */ new Uint8Array(128);
|
|
7
7
|
for (let i = 0; i < chars.length; i++) {
|
|
8
8
|
const c = chars.charCodeAt(i);
|
|
9
9
|
intToChar[i] = c;
|
|
@@ -218,7 +218,7 @@ function getBtoa() {
|
|
|
218
218
|
throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
const btoa =
|
|
221
|
+
const btoa = /*#__PURE__*/ getBtoa();
|
|
222
222
|
var SourceMap = class {
|
|
223
223
|
constructor(properties) {
|
|
224
224
|
this.version = 3;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { a as writeProjectConfig } from "./project-CH9pdo16.mjs";
|
|
1
|
+
import { a as join, n as dirname } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { S as writeProjectConfig, f as getToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
4
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
6
5
|
import { createInterface } from "node:readline";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as join } from "./pathe.M-eThtNZ-
|
|
2
|
-
import {
|
|
3
|
-
import { f as readConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import { n as applySqliteAuthMigrations, t as applyPgAuthMigrations } from "./auth-migrations-
|
|
6
|
-
import { getMiniflareDatabasePath } from "./runner-
|
|
1
|
+
import { a as join } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { c as loadVoidAuthConfig, s as findVoidAuthConfig } from "./scan-i7Yz54fv.mjs";
|
|
3
|
+
import { f as readConfig } from "./config-1twldYCW.mjs";
|
|
4
|
+
import { a as resolveVoidAuthMigrationSchema } from "./route-types-CfKfhbIg.mjs";
|
|
5
|
+
import { n as applySqliteAuthMigrations, t as applyPgAuthMigrations } from "./auth-migrations-BTZ-ATvQ.mjs";
|
|
6
|
+
import { getMiniflareDatabasePath } from "./runner-h272wcPj.mjs";
|
|
7
7
|
import { loadEnv } from "vite";
|
|
8
8
|
//#region src/auth/node.ts
|
|
9
9
|
async function runLocalVoidAuthMigrations(root, dialect, persistRoot = join(root, ".void"), databaseId = "local", configPath = findVoidAuthConfig(root)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./pathe.M-eThtNZ-
|
|
1
|
+
import { a as join, n as dirname } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
//#region src/shared/package-json.ts
|
|
4
4
|
const DEFAULT_DEPENDENCY_FIELDS = ["dependencies", "devDependencies"];
|
package/dist/pages/client.d.mts
CHANGED
package/dist/pages/client.mjs
CHANGED
|
@@ -147,7 +147,8 @@ async function createPageNavigationEngine(config) {
|
|
|
147
147
|
}
|
|
148
148
|
function getStaticPageDataUrl(url) {
|
|
149
149
|
const { pathname } = new URL(url || "/", window.location.origin);
|
|
150
|
-
|
|
150
|
+
const filePath = pathname === "/" ? "index" : pathname.replace(/^\/+/, "");
|
|
151
|
+
return `${STATIC_PAGE_DATA_PREFIX}/${filePath}.json`;
|
|
151
152
|
}
|
|
152
153
|
function isUsablePageData(pageData, matchedId) {
|
|
153
154
|
return typeof pageData === "object" && pageData !== null && "component" in pageData && typeof pageData.component === "string" && "props" in pageData && typeof pageData.props === "object" && pageData.props !== null && typeof pageData.component === "string" && pageData.component === matchedId && !routeMeta[pageData.component]?.island && Boolean(components[pageData.component]);
|
package/dist/pages/head.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-
|
|
1
|
+
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-nmvOgFjd.mjs";
|
|
2
2
|
export { HeadConfig, HeadDescriptor, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead };
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-
|
|
2
|
-
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-
|
|
1
|
+
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-nmvOgFjd.mjs";
|
|
2
|
+
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-lLjNE9Qp.mjs";
|
|
3
3
|
import { serializePageData } from "./serialize.mjs";
|
|
4
4
|
import { RewriteDestination } from "void/routes";
|
|
5
5
|
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as join } from "../pathe.M-eThtNZ-
|
|
2
|
-
import { r as resolvePagesDir } from "../project-paths-
|
|
3
|
-
import { f as readConfig } from "../config-
|
|
4
|
-
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-
|
|
5
|
-
import { i as parseRedirectsFile } from "../headers-
|
|
1
|
+
import { a as join } from "../pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { r as resolvePagesDir } from "../project-paths-tpdR1mJR.mjs";
|
|
3
|
+
import { f as readConfig } from "../config-1twldYCW.mjs";
|
|
4
|
+
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-Dp_Gyzs3.mjs";
|
|
5
|
+
import { i as parseRedirectsFile } from "../headers-BwvFGhkx.mjs";
|
|
6
6
|
import { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead } from "./head.mjs";
|
|
7
7
|
import { serializePageData } from "./serialize.mjs";
|
|
8
8
|
//#region src/pages/manifest.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as resolve, n as dirname } from "../pathe.M-eThtNZ-
|
|
2
|
-
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-
|
|
1
|
+
import { c as resolve, n as dirname } from "../pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-Dp_Gyzs3.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { normalizePath } from "vite";
|
|
5
5
|
//#region src/pages/islands-plugin.ts
|
|
@@ -116,7 +116,7 @@ function watchPagesForRescan(server, pagesDir, root, onRescan) {
|
|
|
116
116
|
pending = scanPages(root, { pagesDir }).then((pageScan) => {
|
|
117
117
|
onRescan(pageScan);
|
|
118
118
|
for (const env of Object.values(server.environments)) {
|
|
119
|
-
const mod = env.moduleGraph.getModuleById("\
|
|
119
|
+
const mod = env.moduleGraph.getModuleById("\0virtual:void-islands-renderer");
|
|
120
120
|
if (mod) env.moduleGraph.invalidateModule(mod);
|
|
121
121
|
}
|
|
122
122
|
pending = null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { w as ValidationError } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-
|
|
1
|
+
import { w as ValidationError } from "../handler-imD0UVDT.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-6hTJ04T1.mjs";
|
|
3
3
|
export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
|
package/dist/pages/protocol.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isConvertedResponse } from "../runtime/response.mjs";
|
|
2
|
-
import { i as ValidationError, r as separateDeferred, t as DEFERRED } from "../defer-
|
|
2
|
+
import { i as ValidationError, r as separateDeferred, t as DEFERRED } from "../defer-YsYDUoii.mjs";
|
|
3
3
|
import { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead } from "./head.mjs";
|
|
4
4
|
import { serializePageData } from "./serialize.mjs";
|
|
5
5
|
//#region src/pages/protocol.ts
|
|
@@ -239,6 +239,8 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
242
|
+
c.header("X-VoidPages", "true");
|
|
243
|
+
c.header("Vary", "X-VoidPages");
|
|
242
244
|
return streamDeferredResponse(JSON.stringify(pageObj) + "\n", deferredMap, c, "application/x-ndjson", (group, data) => JSON.stringify({
|
|
243
245
|
__deferred: group,
|
|
244
246
|
data
|
|
@@ -258,7 +260,8 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
|
|
|
258
260
|
const shared = c.get("shared") ?? {};
|
|
259
261
|
const middlewareHead = c.get("headDefaults");
|
|
260
262
|
function buildMutationPageObj(props, errors) {
|
|
261
|
-
const
|
|
263
|
+
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
264
|
+
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
262
265
|
return {
|
|
263
266
|
component: componentId,
|
|
264
267
|
props,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as join, s as relative } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as globSync } from "./dist-
|
|
1
|
+
import { a as join, s as relative } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-tpdR1mJR.mjs";
|
|
3
|
+
import { n as globSync } from "./dist-BuiRJkTd.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { parseSync } from "vite";
|
|
6
6
|
import { parse } from "es-module-lexer/js";
|
|
@@ -359,7 +359,7 @@ const SSR_SERVER_ENTRY_RELATIVE_PATHS = ["src/main.ssr.ts", "src/main.ssr.tsx"];
|
|
|
359
359
|
const SSR_CLIENT_ENTRY_RELATIVE_PATHS = ["src/main.client.ts", "src/main.client.tsx"];
|
|
360
360
|
function resolveSingleEntry(root, entries, label, paths = readProjectPaths(root)) {
|
|
361
361
|
const matches = entries.map((entryName) => ({
|
|
362
|
-
relativePath: relative(root, join(paths.ssrDir, entryName))
|
|
362
|
+
relativePath: relative(root, join(paths.ssrDir, entryName)),
|
|
363
363
|
absolutePath: join(paths.ssrDir, entryName)
|
|
364
364
|
})).filter((entry) => existsSync(entry.absolutePath));
|
|
365
365
|
if (matches.length === 0) return null;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { a as join } from "./pathe.M-eThtNZ-
|
|
2
|
-
import {
|
|
3
|
-
import { i as resolveProjectPaths } from "./project-paths-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { r as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as discoverSchema } from "./discover-C8N1I4tK.mjs";
|
|
12
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-CaJaIRXU.mjs";
|
|
13
|
-
import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-DqstQTGq.mjs";
|
|
1
|
+
import { a as join } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { D as outro, E as note, T as log, a as cliTitle, w as intro } from "./agents-Bmr5tFFb.mjs";
|
|
3
|
+
import { i as resolveProjectPaths } from "./project-paths-tpdR1mJR.mjs";
|
|
4
|
+
import { c as loadVoidAuthConfig, r as scanRoutes, s as findVoidAuthConfig } from "./scan-i7Yz54fv.mjs";
|
|
5
|
+
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-D9uSVVpA.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-1twldYCW.mjs";
|
|
7
|
+
import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-CJxi_fWI.mjs";
|
|
8
|
+
import { i as generateVoidAuthDrizzleSchema, n as generateQueueTypes, r as generateVoidAuthDatabaseModule, s as generateDbDts, t as generateRouteTypes } from "./route-types-CfKfhbIg.mjs";
|
|
9
|
+
import { t as discoverSchema } from "./discover-BuVVSAum.mjs";
|
|
10
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-D51bnR-c.mjs";
|
|
14
11
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
15
12
|
import { fileURLToPath } from "node:url";
|
|
16
13
|
import { loadEnv } from "vite";
|
|
@@ -93,12 +90,12 @@ async function prepareProject(root) {
|
|
|
93
90
|
//#region src/cli/prepare.ts
|
|
94
91
|
async function runPrepareCommand(root, _args) {
|
|
95
92
|
console.log();
|
|
96
|
-
|
|
93
|
+
intro(cliTitle("prepare"));
|
|
97
94
|
const result = await prepareProject(root);
|
|
98
|
-
if (result.written.length > 0)
|
|
99
|
-
if (result.removed.length > 0)
|
|
100
|
-
if (result.written.length === 0 && result.removed.length === 0)
|
|
101
|
-
|
|
95
|
+
if (result.written.length > 0) note(result.written.join("\n"), "Wrote");
|
|
96
|
+
if (result.removed.length > 0) note(result.removed.join("\n"), "Removed stale files");
|
|
97
|
+
if (result.written.length === 0 && result.removed.length === 0) log.info("No generated files changed.");
|
|
98
|
+
outro("Project codegen is ready.");
|
|
102
99
|
}
|
|
103
100
|
//#endregion
|
|
104
101
|
export { runPrepareCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as join, c as resolve } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { s as hasSsrEntry } from "./plugin-inference-
|
|
4
|
-
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-
|
|
1
|
+
import { a as join, c as resolve } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-tpdR1mJR.mjs";
|
|
3
|
+
import { s as hasSsrEntry } from "./plugin-inference-CJxi_fWI.mjs";
|
|
4
|
+
import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-B0NuUWGd.mjs";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
//#region src/cli/preset.ts
|
|
7
7
|
/**
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, f as tablePrefix, s as dim, u as import_picocolors, w as intro } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
4
3
|
//#region src/cli/projects.ts
|
|
5
4
|
async function runProjectsCommand(root) {
|
|
6
5
|
console.log();
|
|
7
|
-
|
|
6
|
+
intro(cliTitle("project list"));
|
|
8
7
|
const token = getToken(root);
|
|
9
8
|
if (!token) {
|
|
10
|
-
|
|
9
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
11
10
|
process.exit(1);
|
|
12
11
|
}
|
|
13
12
|
const projects = await new PlatformClient(token, { root }).listProjects();
|
|
14
13
|
if (projects.length === 0) {
|
|
15
|
-
|
|
14
|
+
outro("No projects found.");
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
18
17
|
const rows = projects.map((p) => ({
|
|
@@ -28,38 +27,38 @@ async function runProjectsCommand(root) {
|
|
|
28
27
|
console.log(prefix);
|
|
29
28
|
console.log(header);
|
|
30
29
|
for (const line of lines) console.log(line);
|
|
31
|
-
|
|
30
|
+
outro(`${projects.length} project(s)`);
|
|
32
31
|
}
|
|
33
32
|
//#endregion
|
|
34
33
|
//#region src/cli/project-cmd.ts
|
|
35
34
|
async function runProjectCommand(root, args) {
|
|
36
35
|
if (args.subcommand === "status") {
|
|
37
|
-
const { runListCommand } = await import("./list-
|
|
36
|
+
const { runListCommand } = await import("./list-3GEw7b6m.mjs");
|
|
38
37
|
return runListCommand(root, args.name || void 0);
|
|
39
38
|
}
|
|
40
39
|
if (args.subcommand === "link") {
|
|
41
|
-
const { runLink } = await import("./link-
|
|
40
|
+
const { runLink } = await import("./link-CUmiosyb.mjs");
|
|
42
41
|
return runLink(root, args.name || void 0);
|
|
43
42
|
}
|
|
44
43
|
if (args.subcommand === "list") return runProjectsCommand(root);
|
|
45
44
|
if (args.subcommand === "logs") {
|
|
46
|
-
const { runLogsCommand } = await import("./logs-
|
|
45
|
+
const { runLogsCommand } = await import("./logs-D-rQ56Lq.mjs");
|
|
47
46
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
48
47
|
}
|
|
49
48
|
if (args.subcommand === "rollback") {
|
|
50
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
49
|
+
const { runRollbackCommand } = await import("./rollback-Yh7bCKob.mjs");
|
|
51
50
|
return runRollbackCommand(root, args.deployId || void 0);
|
|
52
51
|
}
|
|
53
52
|
if (args.subcommand === "cancel") {
|
|
54
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
53
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-BEBOEgtu.mjs");
|
|
55
54
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
56
55
|
}
|
|
57
56
|
if (args.subcommand === "delete") {
|
|
58
|
-
const { runDeleteCommand } = await import("./delete-
|
|
57
|
+
const { runDeleteCommand } = await import("./delete-D2kr3Kmk.mjs");
|
|
59
58
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
60
59
|
}
|
|
61
60
|
if (args.subcommand === "purge-cache") {
|
|
62
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
61
|
+
const { runPurgeCacheCommand } = await import("./cache-wH-mP8UE.mjs");
|
|
63
62
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as join, i as isAbsolute, o as normalize, s as relative } from "./pathe.M-eThtNZ-
|
|
1
|
+
import { a as join, i as isAbsolute, o as normalize, s as relative } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
//#region src/project-paths.ts
|
|
4
4
|
const SOURCE_CONVENTION_DIRECTORIES = [
|
|
@@ -23,7 +23,7 @@ const ENV_CONFIG_FILES = [
|
|
|
23
23
|
"env.js",
|
|
24
24
|
"env.mjs"
|
|
25
25
|
];
|
|
26
|
-
const SOURCE_CONVENTIONS = new Set([
|
|
26
|
+
const SOURCE_CONVENTIONS = /* @__PURE__ */ new Set([
|
|
27
27
|
...SOURCE_CONVENTION_DIRECTORIES,
|
|
28
28
|
...AUTH_CONFIG_FILES,
|
|
29
29
|
...ENV_CONFIG_FILES
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, n as dirname, s as relative } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join, n as dirname, s as relative } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-tpdR1mJR.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
//#region src/codegen/write-if-changed.ts
|
|
5
5
|
function writeFileIfChanged(path, content) {
|
|
@@ -45,8 +45,8 @@ function createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options =
|
|
|
45
45
|
if (options.redirectDbModule !== false) paths["void/db"] = ["./db.d.ts"];
|
|
46
46
|
if (hasSchema) {
|
|
47
47
|
const isDir = existsSync(pathsConfig.schemaDir) && !existsSync(pathsConfig.schemaFile);
|
|
48
|
-
const schemaRel = relative(outDir, pathsConfig.schemaDir)
|
|
49
|
-
const schemaFileRel = relative(outDir, pathsConfig.schemaFile)
|
|
48
|
+
const schemaRel = relative(outDir, pathsConfig.schemaDir);
|
|
49
|
+
const schemaFileRel = relative(outDir, pathsConfig.schemaFile);
|
|
50
50
|
paths["@schema"] = [isDir ? `${schemaRel}/index.ts` : schemaFileRel];
|
|
51
51
|
paths["@schema/*"] = [`${schemaRel}/*`];
|
|
52
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as HeadDescriptor, t as HeadConfig } from "./head-
|
|
2
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-
|
|
3
|
-
import { a as PageRenderMode, t as DevCssAsset } from "./types-
|
|
1
|
+
import { n as HeadDescriptor, t as HeadConfig } from "./head-nmvOgFjd.mjs";
|
|
2
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-imD0UVDT.mjs";
|
|
3
|
+
import { a as PageRenderMode, t as DevCssAsset } from "./types-lLjNE9Qp.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/pages/protocol.d.ts
|
|
6
6
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __exportAll } from "./
|
|
2
|
-
import { a as join } from "./pathe.M-eThtNZ-
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
+
import { a as join } from "./pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
//#region src/cli/resolve-project.ts
|
|
5
5
|
var resolve_project_exports = /* @__PURE__ */ __exportAll({
|