void 0.9.3 → 0.10.1
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/{auth-cmd-CPkWrQR9.mjs → auth-cmd-DBnbrX9Y.mjs} +2 -2
- package/dist/{better-auth-shared-CmEQZs1T.d.mts → better-auth-shared-a7H3wk9J.d.mts} +2 -2
- package/dist/{cache-1SVxZ7BK.mjs → cache-DNX0hLsO.mjs} +1 -1
- package/dist/{cancel-deploy-JaFClLr7.mjs → cancel-deploy-CDzkVaYZ.mjs} +1 -1
- package/dist/cli/cli.mjs +205 -36
- package/dist/{client-DIfOFf1W.mjs → client-D4awzTnj.mjs} +149 -45
- package/dist/{create-project-DCUrFJxa.mjs → create-project-CGodxfzH.mjs} +1 -1
- package/dist/{db-UW4IYQFw.mjs → db-ERzz4oly.mjs} +14 -14
- package/dist/{delete-CYknzwXU.mjs → delete-CJZGDLBR.mjs} +1 -1
- package/dist/{deploy-RQXpVBL-.mjs → deploy-Cwa5sooV.mjs} +74 -102
- package/dist/{domain-B7RntQ1r.mjs → domain-WvoAHE6w.mjs} +1 -1
- package/dist/{env-C_ZcxxED.mjs → env-Cx4czPsR.mjs} +1 -1
- package/dist/{env-helpers-Bd2wVdxz.d.mts → env-helpers-ZatKyjen.d.mts} +1 -1
- package/dist/{gen-O5mXZ76K.mjs → gen-Dgi4D7GC.mjs} +1 -1
- package/dist/git-metadata-Ce0AtSZL.mjs +82 -0
- package/dist/github-cmd-CUB041gj.mjs +308 -0
- package/dist/{handler-hm9KldPP.d.mts → handler-DczZlaXR.d.mts} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +18 -18
- package/dist/{init-DGrLx2ls.mjs → init-DvaRDMIc.mjs} +122 -77
- package/dist/{link-7MoXUMaI.mjs → link-CpbWJY3P.mjs} +2 -2
- package/dist/{list-N2mCHv8q.mjs → list-BkwE5vH4.mjs} +1 -1
- package/dist/{login-tt1OmNVg.mjs → login-Ca6mhQVI.mjs} +1 -1
- package/dist/{logs-Cl7q2CjZ.mjs → logs-ArQzZquo.mjs} +1 -1
- package/dist/{mcp-BXD35N2J.mjs → mcp-Cc2MMXdQ.mjs} +1 -1
- package/dist/{node-Df8UjQ2H.mjs → node-B07cZs0d.mjs} +3 -3
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +1 -0
- 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 +1 -1
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{plugin-inference--7geW5Z2.mjs → plugin-inference-C3fLzFvP.mjs} +2 -0
- package/dist/{prepare-DT-7QII_.mjs → prepare-DH2WnEpD.mjs} +3 -3
- package/dist/{preset-2aBxMfY1.mjs → preset-B7ZQZn0u.mjs} +2 -2
- package/dist/{project-cmd-CLrqSbqj.mjs → project-cmd-CWZeawuN.mjs} +8 -8
- package/dist/{protocol-B9GZA4Bn.d.mts → protocol-63PHtCHS.d.mts} +3 -3
- package/dist/{rollback-CEbAwbHK.mjs → rollback-BJ60ktsW.mjs} +1 -1
- package/dist/{runner-DLZ9E_cX.mjs → runner-BQyKUqAL.mjs} +1 -1
- package/dist/runtime/ai.mjs +1 -1
- 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/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +1 -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 +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- 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.d.mts +3 -3
- package/dist/{scan-B2H1Vo2C.mjs → scan-DGEp1-1Q.mjs} +17 -9
- package/dist/{secret-C_uTY7xx.mjs → secret-BRbXyu7E.mjs} +1 -1
- package/package.json +2 -2
- package/schema.json +3 -3
- package/skills/void/docs/guide/deployment.md +37 -11
- package/skills/void/docs/guide/edge/headers.md +10 -3
- package/skills/void/docs/guide/edge/rewrites.md +5 -5
- package/skills/void/docs/reference/cli.md +65 -2
- /package/dist/{auth-migrations-CuQkjjWE.mjs → auth-migrations-BP-hMzYl.mjs} +0 -0
- /package/dist/{auth-CDeb2XAl.d.mts → auth-nEUVHuFI.d.mts} +0 -0
- /package/dist/{better-auth-shared-QAfk8CAS.mjs → better-auth-shared-D0Mbmx5V.mjs} +0 -0
- /package/dist/{defer-CouVukrf.mjs → defer-C-bdSM_b.mjs} +0 -0
- /package/dist/{drizzle-DYstYz0j.mjs → drizzle-DqstQTGq.mjs} +0 -0
- /package/dist/{env-raw-RDkMnSTC.mjs → env-raw-Dtj1UAoK.mjs} +0 -0
- /package/dist/{fetch-error-CimrygMq.d.mts → fetch-error-BQMdPvge.d.mts} +0 -0
- /package/dist/{fetch-error-BFIoojjf.mjs → fetch-error-C6qffTl2.mjs} +0 -0
- /package/dist/{head-BsSTGnIe.d.mts → head-JAH2l3fg.d.mts} +0 -0
- /package/dist/{headers-VkAnACKX.mjs → headers-BNWymgnH.mjs} +0 -0
- /package/dist/{package-json-B2TD0JLu.mjs → package-json-Bg_GJdJB.mjs} +0 -0
- /package/dist/{pg-CMZ_5wsC.mjs → pg-CempqvEJ.mjs} +0 -0
- /package/dist/{providers-3Kkv63Ha.d.mts → providers-BkiAlEad.d.mts} +0 -0
- /package/dist/{runner-pg-Cv9V7ydr.mjs → runner-pg-BAheiT6v.mjs} +0 -0
- /package/dist/{skills-BRKc--As.mjs → skills--OMgLmXW.mjs} +0 -0
- /package/dist/{standard-schema-Dnsh2vnl.d.mts → standard-schema-BCBv-QaP.d.mts} +0 -0
- /package/dist/{subcommand-prompt-OD-x_Tsm.mjs → subcommand-prompt-ClwpLlKD.mjs} +0 -0
- /package/dist/{types-DEWCqHtl.d.mts → types-BnHMXezo.d.mts} +0 -0
- /package/dist/{yarn-pnp-0SwYgQxx.mjs → yarn-pnp-DhCHHLAz.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as getToken, h as removeToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
|
|
2
2
|
import { c as R } from "./dist-abzUneor.mjs";
|
|
3
|
-
import { n as runLoginCommand } from "./login-
|
|
3
|
+
import { n as runLoginCommand } from "./login-Ca6mhQVI.mjs";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
5
5
|
//#region src/cli/auth-cmd.ts
|
|
6
6
|
async function runAuthCommand(root, args) {
|
|
@@ -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-nEUVHuFI.mjs";
|
|
2
|
+
import { t as VoidAuthProvider } from "./providers-BkiAlEad.mjs";
|
|
3
3
|
import { DBFieldAttribute } from "better-auth/db";
|
|
4
4
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
5
5
|
import { Context } from "hono";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as dim, n as cliTitle, r as createSpinner } from "./output-DeiS4oEX.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as getToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
|
|
3
3
|
import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
5
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { d as getToken, n as PlatformClient } from "./client-D4awzTnj.mjs";
|
|
3
3
|
import { c as R, g as ge, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
4
4
|
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
5
|
//#region src/cli/cancel-deploy.ts
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -282,6 +282,7 @@ function parseDomainArgs(args) {
|
|
|
282
282
|
const rest = args.slice(1);
|
|
283
283
|
for (let i = 0; i < rest.length; i++) if (rest[i] === "--project" && rest[i + 1]) projectSlug = rest[++i];
|
|
284
284
|
else if (rest[i] === "--verbose") verbose = true;
|
|
285
|
+
else if (rest[i].startsWith("-")) throw new Error(`domain: Unknown flag '${rest[i]}'.`);
|
|
285
286
|
else if (!hostname) hostname = rest[i];
|
|
286
287
|
if ((subcommand === "add" || subcommand === "delete" || subcommand === "status") && !hostname) throw new Error(`domain: Usage: void domain ${subcommand} <hostname> [--project <name>].`);
|
|
287
288
|
return {
|
|
@@ -452,10 +453,12 @@ const VALID_METHODS = new Set([
|
|
|
452
453
|
"patch",
|
|
453
454
|
"delete"
|
|
454
455
|
]);
|
|
456
|
+
const NAME_RE = /^[a-z_][a-z0-9_]*$/;
|
|
457
|
+
const NAME_WITH_HYPHENS_RE = /^[a-z_][a-z0-9_-]*$/;
|
|
455
458
|
function parseModelArgs(args) {
|
|
456
459
|
const [name, ...rest] = args;
|
|
457
460
|
if (!name) throw new Error("gen: Usage: void gen model <name> [columns...].");
|
|
458
|
-
if (
|
|
461
|
+
if (!NAME_RE.test(name)) throw new Error("gen: Model name must be lowercase alphanumeric with underscores and no leading digits.");
|
|
459
462
|
const columns = [];
|
|
460
463
|
for (const col of rest) {
|
|
461
464
|
const match = col.match(/^([a-z_][a-z0-9_]*):([a-z]+)(\?)?$/);
|
|
@@ -478,7 +481,7 @@ function parseMigrationArgs(args) {
|
|
|
478
481
|
const [name, extra] = args;
|
|
479
482
|
if (!name) throw new Error("gen: Usage: void gen migration <name>.");
|
|
480
483
|
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
481
|
-
if (
|
|
484
|
+
if (!NAME_RE.test(name)) throw new Error("gen: Migration name must be lowercase alphanumeric with underscores and no leading digits.");
|
|
482
485
|
return {
|
|
483
486
|
subcommand: "migration",
|
|
484
487
|
name
|
|
@@ -509,6 +512,7 @@ function parseMiddlewareArgs(args) {
|
|
|
509
512
|
const [name, extra] = args;
|
|
510
513
|
if (!name) throw new Error("gen: Usage: void gen middleware <name>.");
|
|
511
514
|
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
515
|
+
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error("gen: Middleware name must be lowercase alphanumeric with underscores or hyphens and no leading digits.");
|
|
512
516
|
return {
|
|
513
517
|
subcommand: "middleware",
|
|
514
518
|
name
|
|
@@ -543,7 +547,7 @@ function parseCronArgs(args) {
|
|
|
543
547
|
const [name, extra] = args;
|
|
544
548
|
if (!name) throw new Error("gen: Usage: void gen cron <name>.");
|
|
545
549
|
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
546
|
-
if (
|
|
550
|
+
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error("gen: Cron name must be lowercase alphanumeric with underscores or hyphens and no leading digits.");
|
|
547
551
|
return {
|
|
548
552
|
subcommand: "cron",
|
|
549
553
|
name
|
|
@@ -553,7 +557,7 @@ function parseQueueArgs(args) {
|
|
|
553
557
|
const [name, extra] = args;
|
|
554
558
|
if (!name) throw new Error("gen: Usage: void gen queue <name>.");
|
|
555
559
|
if (extra) throw new Error(`gen: Unexpected argument '${extra}'.`);
|
|
556
|
-
if (
|
|
560
|
+
if (!NAME_WITH_HYPHENS_RE.test(name)) throw new Error("gen: Queue name must be lowercase alphanumeric with underscores or hyphens and no leading digits.");
|
|
557
561
|
return {
|
|
558
562
|
subcommand: "queue",
|
|
559
563
|
name
|
|
@@ -571,6 +575,91 @@ function parseGenArgs(args) {
|
|
|
571
575
|
throw new Error("gen: Usage: void gen <model|migration|route|middleware|ssr|cron|queue>.");
|
|
572
576
|
}
|
|
573
577
|
//#endregion
|
|
578
|
+
//#region src/cli/github-args.ts
|
|
579
|
+
const githubSubcommands = [
|
|
580
|
+
{
|
|
581
|
+
name: "install",
|
|
582
|
+
description: "Open the GitHub App install page in your browser"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
name: "installations",
|
|
586
|
+
description: "List your GitHub App installations"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
name: "connect",
|
|
590
|
+
arg: "[project]",
|
|
591
|
+
description: "Connect a repository to a project for auto-deploy"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
name: "link",
|
|
595
|
+
description: "Link your GitHub account to Void"
|
|
596
|
+
}
|
|
597
|
+
];
|
|
598
|
+
function parseGithubArgs(args) {
|
|
599
|
+
const [subcommand, ...rest] = args;
|
|
600
|
+
if (subcommand === "install") {
|
|
601
|
+
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
602
|
+
return { subcommand };
|
|
603
|
+
}
|
|
604
|
+
if (subcommand === "installations") {
|
|
605
|
+
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
606
|
+
return { subcommand };
|
|
607
|
+
}
|
|
608
|
+
if (subcommand === "link") {
|
|
609
|
+
if (rest.length > 0) throw new Error(`github: Unexpected argument '${rest[0]}'.`);
|
|
610
|
+
return { subcommand };
|
|
611
|
+
}
|
|
612
|
+
if (subcommand === "connect") {
|
|
613
|
+
let projectName = "";
|
|
614
|
+
let installationId;
|
|
615
|
+
let repo;
|
|
616
|
+
let branch;
|
|
617
|
+
let executor;
|
|
618
|
+
for (let i = 0; i < rest.length; i++) {
|
|
619
|
+
const arg = rest[i];
|
|
620
|
+
if (arg === "--installation") {
|
|
621
|
+
if (i + 1 >= rest.length) throw new Error("github: --installation requires a value.");
|
|
622
|
+
const value = rest[++i];
|
|
623
|
+
if (value.trim() === "") throw new Error("github: --installation requires a value.");
|
|
624
|
+
installationId = value;
|
|
625
|
+
} else if (arg === "--repo") {
|
|
626
|
+
if (i + 1 >= rest.length) throw new Error("github: --repo requires a value.");
|
|
627
|
+
const value = rest[++i];
|
|
628
|
+
if (value.trim() === "") throw new Error("github: --repo requires a value.");
|
|
629
|
+
repo = value;
|
|
630
|
+
} else if (arg === "--branch") {
|
|
631
|
+
if (i + 1 >= rest.length) throw new Error("github: --branch requires a value.");
|
|
632
|
+
const value = rest[++i];
|
|
633
|
+
if (value.trim() === "") throw new Error("github: --branch requires a value.");
|
|
634
|
+
branch = value;
|
|
635
|
+
} else if (arg === "--project") {
|
|
636
|
+
if (i + 1 >= rest.length) throw new Error("github: --project requires a value.");
|
|
637
|
+
const value = rest[++i];
|
|
638
|
+
if (value.trim() === "") throw new Error("github: --project requires a value.");
|
|
639
|
+
if (projectName) throw new Error(`github: Unexpected argument '${value}'.`);
|
|
640
|
+
projectName = value;
|
|
641
|
+
} else if (arg === "--executor") {
|
|
642
|
+
if (i + 1 >= rest.length) throw new Error("github: --executor requires a value.");
|
|
643
|
+
const value = rest[++i];
|
|
644
|
+
if (value.trim() === "") throw new Error("github: --executor requires a value.");
|
|
645
|
+
if (value !== "container" && value !== "github_actions") throw new Error("github: invalid --executor (expected container|github_actions).");
|
|
646
|
+
executor = value;
|
|
647
|
+
} else if (arg.startsWith("-")) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
648
|
+
else if (projectName) throw new Error(`github: Unexpected argument '${arg}'.`);
|
|
649
|
+
else projectName = arg;
|
|
650
|
+
}
|
|
651
|
+
return {
|
|
652
|
+
subcommand,
|
|
653
|
+
projectName,
|
|
654
|
+
installationId,
|
|
655
|
+
repo,
|
|
656
|
+
branch,
|
|
657
|
+
executor
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
throw new Error("github: Usage: void github <install|installations|connect|link>.");
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
574
663
|
//#region src/cli/ascii.ts
|
|
575
664
|
const asciiArts = [
|
|
576
665
|
`
|
|
@@ -609,16 +698,23 @@ const HELP_TREE = {
|
|
|
609
698
|
},
|
|
610
699
|
{
|
|
611
700
|
command: "--github",
|
|
612
|
-
description: "Only create GitHub Actions workflow"
|
|
701
|
+
description: "Only create the GitHub Actions deploy workflow (OIDC, no stored token)"
|
|
613
702
|
}
|
|
614
703
|
],
|
|
615
|
-
examples: [
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
704
|
+
examples: [
|
|
705
|
+
{
|
|
706
|
+
command: "void init",
|
|
707
|
+
description: "Scaffold or configure the current project"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
command: "void init --agents",
|
|
711
|
+
description: "Install agent instructions and MCP config"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
command: "void init --github",
|
|
715
|
+
description: "Scaffold the GitHub Actions deploy workflow"
|
|
716
|
+
}
|
|
717
|
+
]
|
|
622
718
|
},
|
|
623
719
|
deploy: {
|
|
624
720
|
summary: "Build and deploy the current project to Void.",
|
|
@@ -855,6 +951,66 @@ const HELP_TREE = {
|
|
|
855
951
|
}
|
|
856
952
|
}
|
|
857
953
|
},
|
|
954
|
+
github: {
|
|
955
|
+
summary: "Connect a GitHub repository for automatic deploys.",
|
|
956
|
+
usage: ["void github <command>"],
|
|
957
|
+
commands: [
|
|
958
|
+
{
|
|
959
|
+
command: "install",
|
|
960
|
+
description: "Open the GitHub App install page in your browser"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
command: "installations",
|
|
964
|
+
description: "List your GitHub App installations"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
command: "connect [project]",
|
|
968
|
+
description: "Connect a repository to a project for auto-deploy"
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
command: "link",
|
|
972
|
+
description: "Link your GitHub account to Void"
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
children: {
|
|
976
|
+
install: basicSubcommand("Open the GitHub App install page in your browser.", "void github install"),
|
|
977
|
+
installations: basicSubcommand("List your GitHub App installations.", "void github installations"),
|
|
978
|
+
link: basicSubcommand("Link your GitHub account to Void.", "void github link"),
|
|
979
|
+
connect: {
|
|
980
|
+
summary: "Connect a repository to a project for automatic deploys.",
|
|
981
|
+
usage: ["void github connect [project] [options]"],
|
|
982
|
+
options: [
|
|
983
|
+
{
|
|
984
|
+
command: "--project <name>",
|
|
985
|
+
description: "Project name (alias for positional)"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
command: "--installation <id>",
|
|
989
|
+
description: "GitHub App installation ID"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
command: "--repo <owner/repo>",
|
|
993
|
+
description: "Repository full name (owner/repo)"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
command: "--branch <name>",
|
|
997
|
+
description: "Branch to deploy from (required in non-interactive mode)"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
command: "--executor <type>",
|
|
1001
|
+
description: "Build executor: container (default) | github_actions"
|
|
1002
|
+
}
|
|
1003
|
+
],
|
|
1004
|
+
examples: [{
|
|
1005
|
+
command: "void github connect [project]",
|
|
1006
|
+
description: "Connect a repository to a project"
|
|
1007
|
+
}, {
|
|
1008
|
+
command: "void github connect my-app --installation 42 --repo owner/repo --branch main",
|
|
1009
|
+
description: "Non-interactive connect (all flags explicit)"
|
|
1010
|
+
}]
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
858
1014
|
db: {
|
|
859
1015
|
summary: "Manage local and remote database state.",
|
|
860
1016
|
usage: ["void db <command>"],
|
|
@@ -1161,6 +1317,8 @@ function printGlobalHelp() {
|
|
|
1161
1317
|
"",
|
|
1162
1318
|
...globalCommandGroup("domain"),
|
|
1163
1319
|
"",
|
|
1320
|
+
...globalCommandGroup("github"),
|
|
1321
|
+
"",
|
|
1164
1322
|
categoryTitle("database"),
|
|
1165
1323
|
...globalCommandLines("db", {
|
|
1166
1324
|
execute: "execute <sql>",
|
|
@@ -1344,6 +1502,7 @@ function parseProjectArgs(args) {
|
|
|
1344
1502
|
const [subcommand, ...rest] = args;
|
|
1345
1503
|
if (subcommand === "status") {
|
|
1346
1504
|
const [name, extra] = rest;
|
|
1505
|
+
if (name?.startsWith("-")) throw new Error(`project: Unknown flag '${name}'.`);
|
|
1347
1506
|
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1348
1507
|
return {
|
|
1349
1508
|
subcommand,
|
|
@@ -1352,6 +1511,7 @@ function parseProjectArgs(args) {
|
|
|
1352
1511
|
}
|
|
1353
1512
|
if (subcommand === "link") {
|
|
1354
1513
|
const [name, extra] = rest;
|
|
1514
|
+
if (name?.startsWith("-")) throw new Error(`project: Unknown flag '${name}'.`);
|
|
1355
1515
|
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1356
1516
|
return {
|
|
1357
1517
|
subcommand,
|
|
@@ -1385,6 +1545,7 @@ function parseProjectArgs(args) {
|
|
|
1385
1545
|
}
|
|
1386
1546
|
if (subcommand === "rollback") {
|
|
1387
1547
|
const [deployId, extra] = rest;
|
|
1548
|
+
if (deployId?.startsWith("-")) throw new Error(`project: Unknown flag '${deployId}'.`);
|
|
1388
1549
|
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1389
1550
|
return {
|
|
1390
1551
|
subcommand,
|
|
@@ -1393,6 +1554,7 @@ function parseProjectArgs(args) {
|
|
|
1393
1554
|
}
|
|
1394
1555
|
if (subcommand === "cancel") {
|
|
1395
1556
|
const [deployId, extra] = rest;
|
|
1557
|
+
if (deployId?.startsWith("-")) throw new Error(`project: Unknown flag '${deployId}'.`);
|
|
1396
1558
|
if (extra) throw new Error(`project: Unexpected argument '${extra}'.`);
|
|
1397
1559
|
return {
|
|
1398
1560
|
subcommand,
|
|
@@ -1524,7 +1686,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1524
1686
|
const sub = args[1];
|
|
1525
1687
|
try {
|
|
1526
1688
|
if ((!sub || sub.startsWith("-")) && process.stdin.isTTY) {
|
|
1527
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1689
|
+
const { promptSubcommand } = await import("../subcommand-prompt-ClwpLlKD.mjs");
|
|
1528
1690
|
const result = await promptSubcommand(command, subcommands);
|
|
1529
1691
|
if (!result) process.exit(0);
|
|
1530
1692
|
await run(root, parse(buildArgs(result, args.slice(1))));
|
|
@@ -1553,7 +1715,7 @@ else if (command === "deploy") {
|
|
|
1553
1715
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1554
1716
|
process.exit(1);
|
|
1555
1717
|
}
|
|
1556
|
-
import("../deploy-
|
|
1718
|
+
import("../deploy-Cwa5sooV.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1557
1719
|
runDeploy(root, {
|
|
1558
1720
|
projectSlug: deployArgs.projectSlug,
|
|
1559
1721
|
dir: deployArgs.dir,
|
|
@@ -1565,13 +1727,14 @@ else if (command === "deploy") {
|
|
|
1565
1727
|
process.exit(1);
|
|
1566
1728
|
});
|
|
1567
1729
|
});
|
|
1568
|
-
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-
|
|
1569
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1570
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1571
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1572
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1573
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1574
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1730
|
+
} else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-DBnbrX9Y.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1731
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-CWZeawuN.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1732
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BRbXyu7E.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1733
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-WvoAHE6w.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1734
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-ERzz4oly.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1735
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-Cx4czPsR.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1736
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-Dgi4D7GC.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1737
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-CUB041gj.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
1575
1738
|
else if (command === "prepare") {
|
|
1576
1739
|
const root = process.cwd();
|
|
1577
1740
|
let prepareArgs;
|
|
@@ -1581,7 +1744,7 @@ else if (command === "prepare") {
|
|
|
1581
1744
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1582
1745
|
process.exit(1);
|
|
1583
1746
|
}
|
|
1584
|
-
import("../prepare-
|
|
1747
|
+
import("../prepare-DH2WnEpD.mjs").then(({ runPrepareCommand }) => {
|
|
1585
1748
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1586
1749
|
R.error(err.message ?? err);
|
|
1587
1750
|
process.exit(1);
|
|
@@ -1589,7 +1752,7 @@ else if (command === "prepare") {
|
|
|
1589
1752
|
});
|
|
1590
1753
|
} else if (command === "init") {
|
|
1591
1754
|
const root = process.cwd();
|
|
1592
|
-
import("../init-
|
|
1755
|
+
import("../init-DvaRDMIc.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1593
1756
|
let initArgs;
|
|
1594
1757
|
try {
|
|
1595
1758
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1602,7 +1765,7 @@ else if (command === "prepare") {
|
|
|
1602
1765
|
process.exit(1);
|
|
1603
1766
|
});
|
|
1604
1767
|
});
|
|
1605
|
-
} else if (command === "mcp") import("../mcp-
|
|
1768
|
+
} else if (command === "mcp") import("../mcp-Cc2MMXdQ.mjs").then(({ runMcp }) => {
|
|
1606
1769
|
runMcp();
|
|
1607
1770
|
});
|
|
1608
1771
|
else if (command === "-v" || command === "--version") {
|
|
@@ -1641,6 +1804,11 @@ else if (command === "-v" || command === "--version") {
|
|
|
1641
1804
|
hint: "add | delete | list | status",
|
|
1642
1805
|
description: "Configure custom domains"
|
|
1643
1806
|
},
|
|
1807
|
+
{
|
|
1808
|
+
name: "github",
|
|
1809
|
+
hint: "install | installations | connect | link",
|
|
1810
|
+
description: "Connect a GitHub repository for automatic deploys"
|
|
1811
|
+
},
|
|
1644
1812
|
{
|
|
1645
1813
|
name: "db",
|
|
1646
1814
|
hint: "status | reset | seed | execute | migrate | studio | export | rename-migrations",
|
|
@@ -1671,36 +1839,37 @@ else if (command === "-v" || command === "--version") {
|
|
|
1671
1839
|
];
|
|
1672
1840
|
(async () => {
|
|
1673
1841
|
printVoidHeader();
|
|
1674
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1842
|
+
const { promptSubcommand } = await import("../subcommand-prompt-ClwpLlKD.mjs");
|
|
1675
1843
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1676
1844
|
if (!result) process.exit(0);
|
|
1677
1845
|
const cmd = result.subcommand;
|
|
1678
1846
|
const root = process.cwd();
|
|
1679
1847
|
switch (cmd) {
|
|
1680
1848
|
case "init": {
|
|
1681
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1849
|
+
const { runInitCommand, parseInitArgs } = await import("../init-DvaRDMIc.mjs");
|
|
1682
1850
|
await runInitCommand(root, parseInitArgs([]));
|
|
1683
1851
|
return;
|
|
1684
1852
|
}
|
|
1685
1853
|
case "deploy": {
|
|
1686
|
-
const { runDeploy } = await import("../deploy-
|
|
1854
|
+
const { runDeploy } = await import("../deploy-Cwa5sooV.mjs").then((n) => n.t);
|
|
1687
1855
|
await runDeploy(root);
|
|
1688
1856
|
return;
|
|
1689
1857
|
}
|
|
1690
1858
|
case "mcp": {
|
|
1691
|
-
const { runMcp } = await import("../mcp-
|
|
1859
|
+
const { runMcp } = await import("../mcp-Cc2MMXdQ.mjs");
|
|
1692
1860
|
runMcp();
|
|
1693
1861
|
return;
|
|
1694
1862
|
}
|
|
1695
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-
|
|
1696
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
1697
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
1698
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
1699
|
-
case "
|
|
1700
|
-
case "
|
|
1701
|
-
case "
|
|
1863
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-DBnbrX9Y.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
1864
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-CWZeawuN.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1865
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-BRbXyu7E.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1866
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-WvoAHE6w.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1867
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-CUB041gj.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
1868
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-ERzz4oly.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1869
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-Cx4czPsR.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1870
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-Dgi4D7GC.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1702
1871
|
case "prepare": {
|
|
1703
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1872
|
+
const { runPrepareCommand } = await import("../prepare-DH2WnEpD.mjs");
|
|
1704
1873
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1705
1874
|
return;
|
|
1706
1875
|
}
|