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
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as runLoginCommand } from "./login-
|
|
1
|
+
import { T as log } from "./agents-Bmr5tFFb.mjs";
|
|
2
|
+
import { f as getToken, g as removeToken, n as PlatformClient } from "./client-Cj96iiBH.mjs";
|
|
3
|
+
import { n as runLoginCommand } from "./login-DJReaT_Q.mjs";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
5
5
|
//#region src/cli/auth-cmd.ts
|
|
6
6
|
async function runAuthCommand(root, args) {
|
|
7
7
|
switch (args.subcommand) {
|
|
8
8
|
case "login": return runLoginCommand(root);
|
|
9
9
|
case "logout":
|
|
10
|
-
if (removeToken(root))
|
|
11
|
-
else
|
|
10
|
+
if (removeToken(root)) log.success("Logged out.");
|
|
11
|
+
else log.info("Not logged in.");
|
|
12
12
|
return;
|
|
13
13
|
case "whoami": {
|
|
14
14
|
const token = getToken(root);
|
|
15
15
|
if (!token) {
|
|
16
|
-
|
|
16
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
17
17
|
process.exit(1);
|
|
18
18
|
}
|
|
19
19
|
const user = await new PlatformClient(token, { root }).whoami();
|
|
20
|
-
|
|
20
|
+
log.info(`${user.login} (${user.plan})`);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
case "token": {
|
|
24
24
|
if (!getToken(root)) await runLoginCommand(root);
|
|
25
25
|
const token = getToken(root);
|
|
26
26
|
if (!token) {
|
|
27
|
-
|
|
27
|
+
log.error("Login failed. Run `void auth login` to try again.");
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
const platform = process.platform;
|
|
31
31
|
const cmd = platform === "darwin" ? "pbcopy" : platform === "win32" ? "clip" : "xclip -selection clipboard";
|
|
32
32
|
try {
|
|
33
33
|
execSync(cmd, { input: token });
|
|
34
|
-
|
|
34
|
+
log.success("Token copied to clipboard.");
|
|
35
35
|
} catch {
|
|
36
|
-
|
|
36
|
+
log.warn("Could not copy to clipboard. Re-run `void login` to generate a new token.");
|
|
37
37
|
}
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-
|
|
1
|
+
import { a as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-CJlNS3kT.mjs";
|
|
2
2
|
import { authContext } from "./runtime/auth.mjs";
|
|
3
3
|
import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import { betterAuth } from "better-auth";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as VoidAuthConfig, n as AuthState } from "./auth-
|
|
2
|
-
import { t as VoidAuthProvider } from "./providers-
|
|
1
|
+
import { i as VoidAuthConfig, n as AuthState } from "./auth-qgMlYp7Z.mjs";
|
|
2
|
+
import { t as VoidAuthProvider } from "./providers-BNKRacMr.mjs";
|
|
3
3
|
import { DBFieldAttribute } from "better-auth/db";
|
|
4
4
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
5
5
|
import { Context } from "hono";
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as getToken, n as PlatformClient, t as PlatformApiError } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.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, t as PlatformApiError } from "./client-Cj96iiBH.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D2HI3TrG.mjs";
|
|
6
4
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
7
5
|
//#region src/cli/build-cmd.ts
|
|
8
6
|
const POLL_MS = 1e3;
|
|
@@ -61,10 +59,10 @@ async function runBuildCommand(root, args) {
|
|
|
61
59
|
}
|
|
62
60
|
async function runBuildLogsCommand(root, args) {
|
|
63
61
|
console.log();
|
|
64
|
-
|
|
62
|
+
intro(cliTitle("build logs"));
|
|
65
63
|
const token = getToken(root);
|
|
66
64
|
if (!token) {
|
|
67
|
-
|
|
65
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
68
66
|
process.exit(1);
|
|
69
67
|
}
|
|
70
68
|
const client = new PlatformClient(token, { root });
|
|
@@ -73,14 +71,14 @@ async function runBuildLogsCommand(root, args) {
|
|
|
73
71
|
if (requestedSlug) {
|
|
74
72
|
const resolved = resolveProjectBySlug(await client.listProjects(), requestedSlug);
|
|
75
73
|
if (!resolved) {
|
|
76
|
-
|
|
74
|
+
log.error(`build: No project found with slug '${requestedSlug}'.`);
|
|
77
75
|
process.exit(1);
|
|
78
76
|
}
|
|
79
77
|
projectId = resolved.projectId;
|
|
80
78
|
} else {
|
|
81
79
|
const linked = readProjectConfig(root);
|
|
82
80
|
if (!linked) {
|
|
83
|
-
|
|
81
|
+
log.error("build: No project specified. Pass a project with --project <slug>, set VOID_PROJECT, or link one with `void project link`.");
|
|
84
82
|
process.exit(1);
|
|
85
83
|
}
|
|
86
84
|
projectId = linked.projectId;
|
|
@@ -89,32 +87,32 @@ async function runBuildLogsCommand(root, args) {
|
|
|
89
87
|
if (!buildId) {
|
|
90
88
|
const builds = await client.listBuilds(projectId, 1);
|
|
91
89
|
if (builds.length === 0) {
|
|
92
|
-
|
|
90
|
+
outro("No builds found. Push to your connected branch to trigger one.");
|
|
93
91
|
return;
|
|
94
92
|
}
|
|
95
93
|
buildId = builds[0].id;
|
|
96
94
|
}
|
|
97
95
|
const write = args.output ? (line) => appendFileSync(args.output, `${line}\n`) : (line) => console.log(line);
|
|
98
|
-
const onRetry = (err) =>
|
|
96
|
+
const onRetry = (err) => log.warn(`build: transient error while following (${err instanceof Error ? err.message : String(err)}); retrying…`);
|
|
99
97
|
let first;
|
|
100
98
|
for (;;) try {
|
|
101
99
|
first = await client.getBuildLogs(projectId, buildId, 0);
|
|
102
100
|
break;
|
|
103
101
|
} catch (err) {
|
|
104
102
|
if (isFatalFollowError(err)) {
|
|
105
|
-
if (err instanceof PlatformApiError && err.status === 404)
|
|
106
|
-
else
|
|
103
|
+
if (err instanceof PlatformApiError && err.status === 404) log.error(`build: Build '${buildId}' not found for this project.`);
|
|
104
|
+
else log.error(err instanceof Error ? err.message : String(err));
|
|
107
105
|
process.exit(1);
|
|
108
106
|
}
|
|
109
107
|
if (!args.follow) {
|
|
110
|
-
|
|
108
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
111
109
|
process.exit(1);
|
|
112
110
|
}
|
|
113
111
|
onRetry(err);
|
|
114
112
|
await sleep(POLL_MS);
|
|
115
113
|
}
|
|
116
114
|
if (first.external) {
|
|
117
|
-
|
|
115
|
+
log.message(`This build ran on GitHub Actions. View logs:\n${import_picocolors.default.cyan(first.external)}`);
|
|
118
116
|
return;
|
|
119
117
|
}
|
|
120
118
|
if (args.output) writeFileSync(args.output, "");
|
|
@@ -131,10 +129,10 @@ async function runBuildLogsCommand(root, args) {
|
|
|
131
129
|
onRetry
|
|
132
130
|
}));
|
|
133
131
|
if (!terminal) {
|
|
134
|
-
|
|
132
|
+
outro(dim("Build still running — pass -f to follow."));
|
|
135
133
|
return;
|
|
136
134
|
}
|
|
137
|
-
|
|
135
|
+
outro(dim(`Build ${status}.`));
|
|
138
136
|
}
|
|
139
137
|
//#endregion
|
|
140
138
|
export { runBuildCommand };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
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, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, o as createSpinner, s as dim, 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, t as getRequestedProjectSlug } from "./resolve-project-D2HI3TrG.mjs";
|
|
6
4
|
//#region src/cli/cache.ts
|
|
7
5
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
8
6
|
console.log();
|
|
9
|
-
|
|
7
|
+
intro(cliTitle("project purge-cache"));
|
|
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,14 +16,14 @@ async function runPurgeCacheCommand(root, projectSlug) {
|
|
|
18
16
|
if (requestedSlug) {
|
|
19
17
|
const config = resolveProjectBySlug(await client.listProjects(), requestedSlug);
|
|
20
18
|
if (!config) {
|
|
21
|
-
|
|
19
|
+
log.error(`project: No project found with slug '${requestedSlug}'.`);
|
|
22
20
|
process.exit(1);
|
|
23
21
|
}
|
|
24
22
|
projectId = config.projectId;
|
|
25
23
|
} else {
|
|
26
24
|
const linked = readProjectConfig(root);
|
|
27
25
|
if (!linked) {
|
|
28
|
-
|
|
26
|
+
log.error("No linked project. Run `void project link` first.");
|
|
29
27
|
process.exit(1);
|
|
30
28
|
}
|
|
31
29
|
projectId = linked.projectId;
|
|
@@ -35,13 +33,13 @@ async function runPurgeCacheCommand(root, projectSlug) {
|
|
|
35
33
|
try {
|
|
36
34
|
const result = await client.purgeCache(projectId);
|
|
37
35
|
s.stop("Cache purged.");
|
|
38
|
-
|
|
36
|
+
log.success(`Purged ${result.purged} cached page(s).`);
|
|
39
37
|
} catch (err) {
|
|
40
38
|
s.stop("Cache purge failed.");
|
|
41
|
-
|
|
39
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
42
40
|
process.exit(1);
|
|
43
41
|
}
|
|
44
|
-
|
|
42
|
+
outro(dim("Edge cache will clear within seconds."));
|
|
45
43
|
}
|
|
46
44
|
//#endregion
|
|
47
45
|
export { runPurgeCacheCommand };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
4
|
-
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
1
|
+
import { D as outro, S as confirm, T as log, a as cliTitle, j as isCancel, 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/cancel-deploy.ts
|
|
6
|
-
const ACTIVE_STATUSES = new Set([
|
|
4
|
+
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
7
5
|
"pending",
|
|
8
6
|
"uploading",
|
|
9
7
|
"migrating",
|
|
@@ -11,15 +9,15 @@ const ACTIVE_STATUSES = new Set([
|
|
|
11
9
|
]);
|
|
12
10
|
async function runCancelDeployCommand(root, deployId) {
|
|
13
11
|
console.log();
|
|
14
|
-
|
|
12
|
+
intro(cliTitle("project cancel"));
|
|
15
13
|
const token = getToken(root);
|
|
16
14
|
if (!token) {
|
|
17
|
-
|
|
15
|
+
log.error("Not logged in. Run `void auth login` first.");
|
|
18
16
|
process.exit(1);
|
|
19
17
|
}
|
|
20
18
|
const linked = readProjectConfig(root);
|
|
21
19
|
if (!linked) {
|
|
22
|
-
|
|
20
|
+
log.error("No linked project found. Run `void project link` first.");
|
|
23
21
|
process.exit(1);
|
|
24
22
|
}
|
|
25
23
|
const client = new PlatformClient(token, { root });
|
|
@@ -27,29 +25,29 @@ async function runCancelDeployCommand(root, deployId) {
|
|
|
27
25
|
const target = deployId ? deployments.find((d) => d.id === deployId) : deployments.find((d) => ACTIVE_STATUSES.has(d.status));
|
|
28
26
|
if (!target) {
|
|
29
27
|
if (deployId) {
|
|
30
|
-
|
|
28
|
+
log.error(`project: Deployment '${deployId}' was not found.`);
|
|
31
29
|
process.exit(1);
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
log.warn("No active deploy found.");
|
|
32
|
+
outro("Nothing canceled.");
|
|
35
33
|
return;
|
|
36
34
|
}
|
|
37
35
|
if (!ACTIVE_STATUSES.has(target.status)) {
|
|
38
36
|
if (deployId) {
|
|
39
|
-
|
|
37
|
+
log.error(`project: Deployment '${target.id}' is already '${target.status}'.`);
|
|
40
38
|
process.exit(1);
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
log.warn(`project: Deployment '${target.id}' is already '${target.status}'.`);
|
|
41
|
+
outro("Nothing canceled.");
|
|
44
42
|
return;
|
|
45
43
|
}
|
|
46
|
-
const ok = await
|
|
47
|
-
if (
|
|
48
|
-
|
|
44
|
+
const ok = await confirm({ message: `Cancel deployment ${formatDeployment(target)}?` });
|
|
45
|
+
if (isCancel(ok) || !ok) {
|
|
46
|
+
outro("Canceled.");
|
|
49
47
|
return;
|
|
50
48
|
}
|
|
51
49
|
await client.cancelDeployment(linked.projectId, target.id);
|
|
52
|
-
|
|
50
|
+
outro(`Cancellation requested for deployment ${target.id}.`);
|
|
53
51
|
}
|
|
54
52
|
function formatDeployment(deployment) {
|
|
55
53
|
const suffix = deployment.commit ? ` (${deployment.commit.slice(0, 7)})` : "";
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as join } from "../pathe.M-eThtNZ-
|
|
3
|
-
import {
|
|
4
|
-
import { c as R, u as Se, y as ye } from "../dist-abzUneor.mjs";
|
|
5
|
-
import { r as getPackageDir } from "../agents-MhSzNMiC.mjs";
|
|
2
|
+
import { a as join } from "../pathe.M-eThtNZ-CQzLbt4c.mjs";
|
|
3
|
+
import { D as outro, E as note, T as log, d as sectionTitle, i as categoryTitle, l as helpLine, r as getPackageDir, u as import_picocolors } from "../agents-Bmr5tFFb.mjs";
|
|
6
4
|
import { readFileSync } from "node:fs";
|
|
7
5
|
import { parseArgs } from "node:util";
|
|
8
6
|
//#region src/cli/args.ts
|
|
@@ -477,7 +475,7 @@ const genSubcommands = [
|
|
|
477
475
|
description: "Generate a queue consumer file"
|
|
478
476
|
}
|
|
479
477
|
];
|
|
480
|
-
const COLUMN_TYPES = new Set([
|
|
478
|
+
const COLUMN_TYPES = /* @__PURE__ */ new Set([
|
|
481
479
|
"string",
|
|
482
480
|
"text",
|
|
483
481
|
"datetime",
|
|
@@ -486,7 +484,7 @@ const COLUMN_TYPES = new Set([
|
|
|
486
484
|
"real",
|
|
487
485
|
"blob"
|
|
488
486
|
]);
|
|
489
|
-
const VALID_METHODS = new Set([
|
|
487
|
+
const VALID_METHODS = /* @__PURE__ */ new Set([
|
|
490
488
|
"get",
|
|
491
489
|
"post",
|
|
492
490
|
"put",
|
|
@@ -643,6 +641,10 @@ const githubSubcommands = [
|
|
|
643
641
|
{
|
|
644
642
|
name: "link",
|
|
645
643
|
description: "Link your GitHub account to Void"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
name: "join",
|
|
647
|
+
description: "Join your organization's shared GitHub App installations"
|
|
646
648
|
}
|
|
647
649
|
];
|
|
648
650
|
function parseGithubArgs(args) {
|
|
@@ -659,6 +661,10 @@ function parseGithubArgs(args) {
|
|
|
659
661
|
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
660
662
|
return { subcommand };
|
|
661
663
|
}
|
|
664
|
+
if (subcommand === "join") {
|
|
665
|
+
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
666
|
+
return { subcommand };
|
|
667
|
+
}
|
|
662
668
|
if (subcommand === "connect") {
|
|
663
669
|
let projectName = "";
|
|
664
670
|
let installationId;
|
|
@@ -774,7 +780,7 @@ function parseGithubArgs(args) {
|
|
|
774
780
|
projectName
|
|
775
781
|
};
|
|
776
782
|
}
|
|
777
|
-
throw new Error("github: Usage: void github <install|installations|connect|update|status|link>.");
|
|
783
|
+
throw new Error("github: Usage: void github <install|installations|connect|update|status|link|join>.");
|
|
778
784
|
}
|
|
779
785
|
//#endregion
|
|
780
786
|
//#region src/cli/ascii.ts
|
|
@@ -1095,12 +1101,17 @@ const HELP_TREE = {
|
|
|
1095
1101
|
{
|
|
1096
1102
|
command: "link",
|
|
1097
1103
|
description: "Link your GitHub account to Void"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
command: "join",
|
|
1107
|
+
description: "Join your organization's shared GitHub App installations"
|
|
1098
1108
|
}
|
|
1099
1109
|
],
|
|
1100
1110
|
children: {
|
|
1101
1111
|
install: basicSubcommand("Open the GitHub App install page in your browser.", "void github install"),
|
|
1102
1112
|
installations: basicSubcommand("List your GitHub App installations.", "void github installations"),
|
|
1103
1113
|
link: basicSubcommand("Link your GitHub account to Void.", "void github link"),
|
|
1114
|
+
join: basicSubcommand("Join your organization's shared GitHub App installations.", "void github join"),
|
|
1104
1115
|
connect: {
|
|
1105
1116
|
summary: "Connect a repository to a project for automatic deploys.",
|
|
1106
1117
|
usage: ["void github connect [project] [options]"],
|
|
@@ -1521,7 +1532,7 @@ function withProjectOption(summary, usage) {
|
|
|
1521
1532
|
}
|
|
1522
1533
|
function printGlobalHelp() {
|
|
1523
1534
|
printVoidHeader();
|
|
1524
|
-
|
|
1535
|
+
note([
|
|
1525
1536
|
globalCommandLine(["init"], "void init"),
|
|
1526
1537
|
...globalOptionLines(["init"]),
|
|
1527
1538
|
"",
|
|
@@ -1566,8 +1577,8 @@ function printGlobalHelp() {
|
|
|
1566
1577
|
helpLine("void help <command>", "Show command-specific help"),
|
|
1567
1578
|
helpLine("void <command> --help", "Show command-specific help")
|
|
1568
1579
|
].join("\n"), sectionTitle("Commands"));
|
|
1569
|
-
|
|
1570
|
-
|
|
1580
|
+
note([helpLine("VOID_TOKEN", "Auth token (or use `void auth login`)"), helpLine("VOID_PROJECT", "Deploy target project name override")].join("\n"), sectionTitle("Environment"));
|
|
1581
|
+
outro("https://void.cloud");
|
|
1571
1582
|
}
|
|
1572
1583
|
function printVoidHeader() {
|
|
1573
1584
|
const version = JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf-8")).version;
|
|
@@ -1597,7 +1608,7 @@ function printHelpPage(path) {
|
|
|
1597
1608
|
appendHelpSection(lines, "Options", page.options);
|
|
1598
1609
|
appendHelpSection(lines, "Examples", page.examples);
|
|
1599
1610
|
if (page.commands) lines.push("", `Run \`void help ${path.join(" ")} <command>\` for command-specific help.`);
|
|
1600
|
-
|
|
1611
|
+
note(lines.join("\n"), sectionTitle(`void ${path.join(" ")}`));
|
|
1601
1612
|
}
|
|
1602
1613
|
function appendHelpSection(lines, title, entries) {
|
|
1603
1614
|
if (!entries || entries.length === 0) return;
|
|
@@ -1673,7 +1684,7 @@ function parsePrepareArgs(args) {
|
|
|
1673
1684
|
}
|
|
1674
1685
|
//#endregion
|
|
1675
1686
|
//#region src/cli/project-args.ts
|
|
1676
|
-
const LOG_LEVELS = new Set([
|
|
1687
|
+
const LOG_LEVELS = /* @__PURE__ */ new Set([
|
|
1677
1688
|
"error",
|
|
1678
1689
|
"warn",
|
|
1679
1690
|
"info",
|
|
@@ -1908,13 +1919,13 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1908
1919
|
const sub = args[1];
|
|
1909
1920
|
try {
|
|
1910
1921
|
if ((!sub || sub.startsWith("-")) && process.stdin.isTTY) {
|
|
1911
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1922
|
+
const { promptSubcommand } = await import("../subcommand-prompt-DtES-oP6.mjs");
|
|
1912
1923
|
const result = await promptSubcommand(command, subcommands);
|
|
1913
1924
|
if (!result) process.exit(0);
|
|
1914
1925
|
await run(root, parse(buildArgs(result, args.slice(1))));
|
|
1915
1926
|
} else await run(root, parse(args.slice(1)));
|
|
1916
1927
|
} catch (err) {
|
|
1917
|
-
|
|
1928
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
1918
1929
|
process.exit(1);
|
|
1919
1930
|
}
|
|
1920
1931
|
}
|
|
@@ -1925,7 +1936,7 @@ if (helpPath) if (helpPath.length === 0) printGlobalHelp();
|
|
|
1925
1936
|
else try {
|
|
1926
1937
|
printHelpPage(helpPath);
|
|
1927
1938
|
} catch (err) {
|
|
1928
|
-
|
|
1939
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
1929
1940
|
process.exit(1);
|
|
1930
1941
|
}
|
|
1931
1942
|
else if (command === "deploy") {
|
|
@@ -1934,10 +1945,10 @@ else if (command === "deploy") {
|
|
|
1934
1945
|
try {
|
|
1935
1946
|
deployArgs = parseDeployArgs(args.slice(1));
|
|
1936
1947
|
} catch (err) {
|
|
1937
|
-
|
|
1948
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
1938
1949
|
process.exit(1);
|
|
1939
1950
|
}
|
|
1940
|
-
import("../deploy-
|
|
1951
|
+
import("../deploy-C4PbkFyE.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1941
1952
|
runDeploy(root, {
|
|
1942
1953
|
projectSlug: deployArgs.projectSlug,
|
|
1943
1954
|
dir: deployArgs.dir,
|
|
@@ -1945,57 +1956,57 @@ else if (command === "deploy") {
|
|
|
1945
1956
|
skipBuild: deployArgs.skipBuild,
|
|
1946
1957
|
debug: deployArgs.debug
|
|
1947
1958
|
}).catch((err) => {
|
|
1948
|
-
|
|
1959
|
+
log.error(err.message ?? err);
|
|
1949
1960
|
process.exit(1);
|
|
1950
1961
|
});
|
|
1951
1962
|
});
|
|
1952
|
-
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-
|
|
1953
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1954
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1955
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1956
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1957
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1958
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1959
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1960
|
-
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1963
|
+
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-DlgNwByu.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1964
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DnU7u9QF.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1965
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-u7FRvg8d.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1966
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-_luIsM_B.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1967
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DjKE2-A-.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1968
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-CO5XAS9t.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1969
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-Cf79J4aw.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1970
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-DnqxyOsb.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
1971
|
+
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-Br8qL0rA.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
1961
1972
|
else if (command === "prepare") {
|
|
1962
1973
|
const root = process.cwd();
|
|
1963
1974
|
let prepareArgs;
|
|
1964
1975
|
try {
|
|
1965
1976
|
prepareArgs = parsePrepareArgs(args.slice(1));
|
|
1966
1977
|
} catch (err) {
|
|
1967
|
-
|
|
1978
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
1968
1979
|
process.exit(1);
|
|
1969
1980
|
}
|
|
1970
|
-
import("../prepare-
|
|
1981
|
+
import("../prepare-C_cVurhP.mjs").then(({ runPrepareCommand }) => {
|
|
1971
1982
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1972
|
-
|
|
1983
|
+
log.error(err.message ?? err);
|
|
1973
1984
|
process.exit(1);
|
|
1974
1985
|
});
|
|
1975
1986
|
});
|
|
1976
1987
|
} else if (command === "init") {
|
|
1977
1988
|
const root = process.cwd();
|
|
1978
|
-
import("../init-
|
|
1989
|
+
import("../init-KirOzVDs.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1979
1990
|
let initArgs;
|
|
1980
1991
|
try {
|
|
1981
1992
|
initArgs = parseInitArgs(args.slice(1));
|
|
1982
1993
|
} catch (err) {
|
|
1983
|
-
|
|
1994
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
1984
1995
|
process.exit(1);
|
|
1985
1996
|
}
|
|
1986
1997
|
runInitCommand(root, initArgs).catch((err) => {
|
|
1987
|
-
|
|
1998
|
+
log.error(err.message ?? err);
|
|
1988
1999
|
process.exit(1);
|
|
1989
2000
|
});
|
|
1990
2001
|
});
|
|
1991
|
-
} else if (command === "mcp") import("../mcp-
|
|
2002
|
+
} else if (command === "mcp") import("../mcp-D7yc0dXY.mjs").then(({ runMcp }) => {
|
|
1992
2003
|
runMcp();
|
|
1993
2004
|
});
|
|
1994
2005
|
else if (command === "-v" || command === "--version") {
|
|
1995
2006
|
const version = JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf-8")).version;
|
|
1996
2007
|
console.log(version);
|
|
1997
2008
|
} else if (command && command !== "help" && command !== "--help" && command !== "-h") {
|
|
1998
|
-
|
|
2009
|
+
log.error(`cli: Unknown command '${command}'. Run \`void --help\` for usage.`);
|
|
1999
2010
|
process.exit(1);
|
|
2000
2011
|
} else if (!command && process.stdin.isTTY) {
|
|
2001
2012
|
const topLevelCommands = [
|
|
@@ -2029,7 +2040,7 @@ else if (command === "-v" || command === "--version") {
|
|
|
2029
2040
|
},
|
|
2030
2041
|
{
|
|
2031
2042
|
name: "github",
|
|
2032
|
-
hint: "install | installations | connect | update | status | link",
|
|
2043
|
+
hint: "install | installations | connect | update | status | link | join",
|
|
2033
2044
|
description: "Connect a GitHub repository for automatic deploys"
|
|
2034
2045
|
},
|
|
2035
2046
|
{
|
|
@@ -2067,38 +2078,38 @@ else if (command === "-v" || command === "--version") {
|
|
|
2067
2078
|
];
|
|
2068
2079
|
(async () => {
|
|
2069
2080
|
printVoidHeader();
|
|
2070
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
2081
|
+
const { promptSubcommand } = await import("../subcommand-prompt-DtES-oP6.mjs");
|
|
2071
2082
|
const result = await promptSubcommand("", topLevelCommands);
|
|
2072
2083
|
if (!result) process.exit(0);
|
|
2073
2084
|
const cmd = result.subcommand;
|
|
2074
2085
|
const root = process.cwd();
|
|
2075
2086
|
switch (cmd) {
|
|
2076
2087
|
case "init": {
|
|
2077
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
2088
|
+
const { runInitCommand, parseInitArgs } = await import("../init-KirOzVDs.mjs");
|
|
2078
2089
|
await runInitCommand(root, parseInitArgs([]));
|
|
2079
2090
|
return;
|
|
2080
2091
|
}
|
|
2081
2092
|
case "deploy": {
|
|
2082
|
-
const { runDeploy } = await import("../deploy-
|
|
2093
|
+
const { runDeploy } = await import("../deploy-C4PbkFyE.mjs").then((n) => n.t);
|
|
2083
2094
|
await runDeploy(root);
|
|
2084
2095
|
return;
|
|
2085
2096
|
}
|
|
2086
2097
|
case "mcp": {
|
|
2087
|
-
const { runMcp } = await import("../mcp-
|
|
2098
|
+
const { runMcp } = await import("../mcp-D7yc0dXY.mjs");
|
|
2088
2099
|
runMcp();
|
|
2089
2100
|
return;
|
|
2090
2101
|
}
|
|
2091
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-
|
|
2092
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
2093
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
2094
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
2095
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-
|
|
2096
|
-
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-
|
|
2097
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
2098
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
2099
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
2102
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-DlgNwByu.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
2103
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DnU7u9QF.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
2104
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-u7FRvg8d.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
2105
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-_luIsM_B.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
2106
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-DnqxyOsb.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
2107
|
+
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-Br8qL0rA.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
2108
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DjKE2-A-.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
2109
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-CO5XAS9t.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
2110
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-Cf79J4aw.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
2100
2111
|
case "prepare": {
|
|
2101
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
2112
|
+
const { runPrepareCommand } = await import("../prepare-C_cVurhP.mjs");
|
|
2102
2113
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
2103
2114
|
return;
|
|
2104
2115
|
}
|
|
@@ -2107,7 +2118,7 @@ else if (command === "-v" || command === "--version") {
|
|
|
2107
2118
|
return;
|
|
2108
2119
|
}
|
|
2109
2120
|
})().catch((err) => {
|
|
2110
|
-
|
|
2121
|
+
log.error(err instanceof Error ? err.message : String(err));
|
|
2111
2122
|
process.exit(1);
|
|
2112
2123
|
});
|
|
2113
2124
|
} else printGlobalHelp();
|