void 0.20.1 → 0.20.2
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/README.md +5 -1
- package/dist/{auth-W9WII-mN.mjs → auth-DPl6kck4.mjs} +46 -26
- package/dist/{auth-cmd-CAH62yDU.mjs → auth-cmd-gniL2fNt.mjs} +5 -4
- package/dist/auth-link-NZdjCmSc.mjs +28 -0
- package/dist/{build-cmd-CJvZvPQO.mjs → build-cmd-sI18tX_O.mjs} +3 -3
- package/dist/{cache-BlNeQjuP.mjs → cache-IHn5MwBC.mjs} +3 -3
- package/dist/{cancel-deploy-CmlAZ9P6.mjs → cancel-deploy-C5qTOdLi.mjs} +3 -3
- package/dist/cf-access-DRsQRe6k.mjs +75 -0
- package/dist/cli/cli.mjs +308 -1958
- package/dist/cli/env-schema-probe.mjs +11 -2
- package/dist/{client-Clirrol3.mjs → client-dHfSJvAN.mjs} +300 -81
- package/dist/{cloudflare-auth-B1QtTO1b.mjs → cloudflare-auth-6M5llVPC.mjs} +2 -2
- package/dist/{cloudflare-cmd-B6_OZx2V.mjs → cloudflare-cmd-4RPGN3KB.mjs} +2 -2
- package/dist/{cloudflare-connect-j5D4hhrG.mjs → cloudflare-connect-t1UU5svD.mjs} +2 -2
- package/dist/{cloudflare-operations-CPTpRW6d.mjs → cloudflare-operations-BzWnlC1_.mjs} +1 -1
- package/dist/{config-BQFq7QvD.mjs → config-uNGuFsI2.mjs} +1 -1
- package/dist/{connect-C04Wdy_h.mjs → connect-Bfk31O_8.mjs} +6 -6
- package/dist/{create-project-ChGZ1DFd.mjs → create-project-Bk9Z0-Jg.mjs} +6 -5
- package/dist/{db-D2d_mUsB.mjs → db-BkRoptAt.mjs} +47 -30
- package/dist/{delete-D8GigDk8.mjs → delete-DouASY9P.mjs} +3 -3
- package/dist/{deploy-iXZ3F0N6.mjs → deploy-DTaWUS1S.mjs} +121 -110
- package/dist/{dev-inbox-DkgRWLkW.mjs → dev-inbox-P0u4tM8Y.mjs} +1 -1
- package/dist/{domain-B1VmoSr0.mjs → domain-1RhhOVrC.mjs} +4 -4
- package/dist/email-C-lGh51B.mjs +795 -0
- package/dist/{env-D4Emu-M_.mjs → env-DBKmK4vc.mjs} +1 -0
- package/dist/{env-BcQzYgoG.mjs → env-DJHsPE7Z.mjs} +5 -5
- package/dist/{env-validation-ENpMy6Ez.mjs → env-validation-CF6KvTRf.mjs} +3 -1
- package/dist/{gen-DI2YwdBM.mjs → gen-B_wPnVTK.mjs} +2 -2
- package/dist/{github-cmd-xItS5Zwf.mjs → github-cmd-PW7ZnWTp.mjs} +3 -3
- package/dist/{headers-D8QfRX9Y.mjs → headers-BAHwgHdW.mjs} +1 -1
- package/dist/help-CwOX-zmI.mjs +2216 -0
- package/dist/{inbound-afAcWeQ9.d.mts → inbound-CH5Mksyy.d.mts} +34 -48
- package/dist/{inbound-2d0zi2yS.mjs → inbound-aVHEUhKo.mjs} +130 -100
- package/dist/index.mjs +54 -17
- package/dist/{init-BD-9THgn.mjs → init-BWZ7q5Z4.mjs} +11 -11
- package/dist/{link-RMdgjF1v.mjs → link-Rmvu2Wl_.mjs} +4 -4
- package/dist/{list-3F52R_yO.mjs → list-DEE2S6mY.mjs} +4 -4
- package/dist/{login-pV69H-ZO.mjs → login-Uvferzmm.mjs} +28 -10
- package/dist/{logs-DFHHD6wE.mjs → logs-27FenuiC.mjs} +4 -4
- package/dist/{mime-BJD7d_qL.mjs → mime-D5Nmdzf7.mjs} +23 -9
- package/dist/{node-Dk3H2jmU.mjs → node-Ez5KW5rn.mjs} +2 -2
- package/dist/operator-auth-B3e08unv.mjs +52 -0
- package/dist/operator-client-LUZnlnYk.mjs +82 -0
- package/dist/{operator-cmd-DYWRbWUA.mjs → operator-cmd-CjOTmAYE.mjs} +35 -55
- package/dist/{output-tFQLLj26.mjs → output-B0cfNSx5.mjs} +316 -2
- package/dist/pages/index.mjs +2 -2
- package/dist/platform-auth-config-DrbQXXiW.mjs +368 -0
- package/dist/platform-auth-protection-Bhtvp0B_.mjs +219 -0
- package/dist/platform-auth-recovery-CeOKGVeJ.mjs +310 -0
- package/dist/{platform-cmd-DxJ2FRwR.mjs → platform-cmd-BFhieCdV.mjs} +16 -6
- package/dist/{platform-domain-ChvbJkdy.mjs → platform-domain-C74PULqV.mjs} +4 -4
- package/dist/{platform-lifecycle-DN4MzJF_.mjs → platform-lifecycle-BwAIgz-t.mjs} +1667 -191
- package/dist/{platform-management-Db2PXw0B.mjs → platform-management-COogu_Se.mjs} +33 -7
- package/dist/{platform-recovery-C_YO-tIs.mjs → platform-recovery-ewqLefp1.mjs} +6 -5
- package/dist/{prepare-CBetXvsN.mjs → prepare-CtDJjoOj.mjs} +2 -2
- package/dist/{prepare-BfJvFUtJ.mjs → prepare-blNRQvQl.mjs} +2 -2
- package/dist/prerender-render.d.mts +11 -0
- package/dist/prerender-render.mjs +111 -0
- package/dist/{project-cmd-Mo0V9yKS.mjs → project-cmd-DmZK9Hxf.mjs} +32 -14
- package/dist/project-team-D8jOJMUJ.mjs +130 -0
- package/dist/project-token-DA34bf-C.mjs +75 -0
- package/dist/{provision-Blnstcm2.mjs → provision-CSJOjjQk.mjs} +2 -0
- package/dist/{requests-BcKOVpRg.mjs → requests-CUExwGQQ.mjs} +3 -3
- package/dist/{rollback-Bx85-0xh.mjs → rollback-CDNGU1gr.mjs} +4 -4
- package/dist/runtime/ai.mjs +3 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +3 -3
- package/dist/runtime/email-protocol.d.mts +15 -0
- package/dist/runtime/email-protocol.mjs +70 -0
- package/dist/runtime/email.d.mts +2 -2
- package/dist/runtime/email.mjs +189 -96
- package/dist/runtime/remote/index.mjs +5 -3
- package/dist/{secret-ByhJ9AMl.mjs → secret-Bzzi2e9E.mjs} +5 -5
- package/dist/{skills-Q46GZMO-.mjs → skills-C0RvGjeE.mjs} +1 -1
- package/dist/{subcommand-prompt-WfySCQ7S.mjs → subcommand-prompt-Bmyn5Rlc.mjs} +1 -1
- package/package.json +12 -7
- package/skills/void/SKILL.md +35 -4
- package/skills/void/docs/guide/deployment.md +2 -0
- package/skills/void/docs/guide/email.md +102 -110
- package/skills/void/docs/guide/platform-administration.md +214 -2
- package/skills/void/docs/guide/platform-development.md +64 -2
- package/skills/void/docs/guide/project-collaboration.md +94 -0
- package/skills/void/docs/guide/self-hosted-platform.md +184 -30
- package/skills/void/docs/reference/cli.md +249 -21
- package/dist/cf-access-AJ1ehiFR.mjs +0 -42
- package/dist/cf-access-DsSsZUPr.mjs +0 -67
- package/dist/email-uKyQYUVY.mjs +0 -1016
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as __exportAll } from "../rolldown-runtime-rQ84J-ij.mjs";
|
|
3
2
|
import { o as join } from "../dist-BrsS7cai.mjs";
|
|
4
|
-
import { D as log,
|
|
5
|
-
import { t as
|
|
3
|
+
import { D as log, d as formatCloudflareUserMessage, p as getPackageDir } from "../output-B0cfNSx5.mjs";
|
|
4
|
+
import { a as printVoidHeader, i as printHelpPage, o as operatorGroups, r as printGlobalHelp, s as parseOperatorArgs, t as getHelpPath } from "../help-CwOX-zmI.mjs";
|
|
5
|
+
import { r as OperatorClientError } from "../operator-client-LUZnlnYk.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
|
+
import { PLATFORM_LOGIN_KINDS, parsePlatformLoginId } from "@void/platform";
|
|
7
8
|
import { parseArgs } from "node:util";
|
|
8
9
|
//#region src/cli/args.ts
|
|
9
10
|
function parseDeployArgs(args) {
|
|
@@ -83,7 +84,11 @@ function parseDeployArgs(args) {
|
|
|
83
84
|
const authSubcommands = [
|
|
84
85
|
{
|
|
85
86
|
name: "login",
|
|
86
|
-
description: "Log in with
|
|
87
|
+
description: "Log in with an enabled platform login method"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "link",
|
|
91
|
+
description: "Link another login method to your account"
|
|
87
92
|
},
|
|
88
93
|
{
|
|
89
94
|
name: "logout",
|
|
@@ -99,13 +104,20 @@ const authSubcommands = [
|
|
|
99
104
|
}
|
|
100
105
|
];
|
|
101
106
|
function parseAuthArgs(args) {
|
|
102
|
-
const [subcommand, extra] = args;
|
|
107
|
+
const [subcommand, extra, trailing] = args;
|
|
108
|
+
if (subcommand === "link") {
|
|
109
|
+
if (trailing || extra !== void 0 && !/^[a-z][a-z0-9_-]{0,63}$/.test(extra)) throw new Error("auth: Usage: void auth link [connection-id].");
|
|
110
|
+
return {
|
|
111
|
+
subcommand,
|
|
112
|
+
...extra ? { connectionId: extra } : {}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
103
115
|
if (!subcommand || ![
|
|
104
116
|
"login",
|
|
105
117
|
"logout",
|
|
106
118
|
"whoami",
|
|
107
119
|
"token"
|
|
108
|
-
].includes(subcommand)) throw new Error("auth: Usage: void auth <login|logout|whoami|token>.");
|
|
120
|
+
].includes(subcommand)) throw new Error("auth: Usage: void auth <login|link|logout|whoami|token>.");
|
|
109
121
|
if (extra) throw new Error(`auth: Unexpected argument '${extra}'.`);
|
|
110
122
|
return { subcommand };
|
|
111
123
|
}
|
|
@@ -470,7 +482,7 @@ const PLATFORM_FLAG = {
|
|
|
470
482
|
const emailSubcommands = [
|
|
471
483
|
{
|
|
472
484
|
name: "usage",
|
|
473
|
-
description: "Show monthly
|
|
485
|
+
description: "Show monthly recipient attempts, inbound receipts, and quota"
|
|
474
486
|
},
|
|
475
487
|
{
|
|
476
488
|
name: "logs",
|
|
@@ -492,7 +504,7 @@ const emailSubcommands = [
|
|
|
492
504
|
},
|
|
493
505
|
{
|
|
494
506
|
name: "domain",
|
|
495
|
-
arg: "<add|status|list|sync|remove>",
|
|
507
|
+
arg: "<add|status|list|sync|rotate-secret|remove>",
|
|
496
508
|
description: "Send and receive at your own domain on a Cloudflare zone"
|
|
497
509
|
},
|
|
498
510
|
{
|
|
@@ -521,6 +533,7 @@ const EMAIL_DOMAIN_VERBS = [
|
|
|
521
533
|
"status",
|
|
522
534
|
"list",
|
|
523
535
|
"sync",
|
|
536
|
+
"rotate-secret",
|
|
524
537
|
"remove"
|
|
525
538
|
];
|
|
526
539
|
/**
|
|
@@ -553,7 +566,6 @@ function parseEmailArgs(args) {
|
|
|
553
566
|
const platformValues = [];
|
|
554
567
|
const backendValues = [];
|
|
555
568
|
const subdomainValues = [];
|
|
556
|
-
let forceCount = 0;
|
|
557
569
|
const positional = [];
|
|
558
570
|
const rest = args.slice(1);
|
|
559
571
|
for (let i = 0; i < rest.length; i++) if (rest[i] === "--project" || rest[i]?.startsWith("--project=")) {
|
|
@@ -583,12 +595,7 @@ function parseEmailArgs(args) {
|
|
|
583
595
|
if (value === void 0 || value.trim() === "") throw new Error("email: --subdomain requires a value (a subdomain label or host).");
|
|
584
596
|
subdomainValues.push(value);
|
|
585
597
|
i = next;
|
|
586
|
-
} else if (rest[i] === "--force" || rest[i]?.startsWith("--force=")) {
|
|
587
|
-
if (rest[i] !== "--force") throw new Error("email: --force takes no value.");
|
|
588
|
-
forceCount++;
|
|
589
598
|
} else positional.push(rest[i]);
|
|
590
|
-
if (forceCount > 1) throw new Error("email: --force can only be specified once.");
|
|
591
|
-
const force = forceCount > 0 ? true : void 0;
|
|
592
599
|
if (projectValues.length > 1) throw new Error("email: --project can only be specified once.");
|
|
593
600
|
const projectSlug = projectValues[0];
|
|
594
601
|
if (backendValues.length > 1) throw new Error("email: --backend can only be specified once.");
|
|
@@ -613,12 +620,10 @@ function parseEmailArgs(args) {
|
|
|
613
620
|
projectSlug,
|
|
614
621
|
limit,
|
|
615
622
|
platform,
|
|
616
|
-
subdomain
|
|
617
|
-
force
|
|
623
|
+
subdomain
|
|
618
624
|
});
|
|
619
625
|
}
|
|
620
626
|
if (subdomain !== void 0) throw new Error("email: --subdomain applies to `void email domain add` only.");
|
|
621
|
-
if (force !== void 0) throw new Error("email: --force applies to `void email domain remove` only.");
|
|
622
627
|
if (positional.length > 1) throw new Error(`email: \`void email ${subcommand}\` takes exactly one positional argument (got ${positional.length}: ${positional.map((p) => JSON.stringify(p)).join(", ")}).`);
|
|
623
628
|
const address = positional[0];
|
|
624
629
|
if ((subcommand === "allow" || subcommand === "disallow") && !address) throw new Error(`email: Usage: void email ${subcommand} <address> [--project <name>].`);
|
|
@@ -644,9 +649,8 @@ function parseEmailArgs(args) {
|
|
|
644
649
|
*/
|
|
645
650
|
function parseEmailDomainArgs(positional, flags) {
|
|
646
651
|
const verb = positional[0];
|
|
647
|
-
if (!verb || !EMAIL_DOMAIN_VERBS.includes(verb)) throw new Error("email: Usage: void email domain <add|status|list|sync|remove> [<domain>] [--project <name>].");
|
|
652
|
+
if (!verb || !EMAIL_DOMAIN_VERBS.includes(verb)) throw new Error("email: Usage: void email domain <add|status|list|sync|rotate-secret|remove> [<domain>] [--project <name>].");
|
|
648
653
|
if (flags.subdomain !== void 0 && verb !== "add") throw new Error("email: --subdomain applies to `void email domain add` only.");
|
|
649
|
-
if (flags.force !== void 0 && verb !== "remove") throw new Error("email: --force applies to `void email domain remove` only.");
|
|
650
654
|
const domain = positional[1];
|
|
651
655
|
if (verb === "list") {
|
|
652
656
|
if (domain !== void 0) throw new Error("email: `void email domain list` takes no domain argument.");
|
|
@@ -657,7 +661,6 @@ function parseEmailDomainArgs(positional, flags) {
|
|
|
657
661
|
domainVerb: verb,
|
|
658
662
|
domain,
|
|
659
663
|
subdomain: flags.subdomain,
|
|
660
|
-
force: flags.force,
|
|
661
664
|
projectSlug: flags.projectSlug,
|
|
662
665
|
limit: flags.limit,
|
|
663
666
|
platform: flags.platform
|
|
@@ -1119,1922 +1122,113 @@ function parseGithubArgs(args) {
|
|
|
1119
1122
|
throw new Error("github: Usage: void github <install|installations|connect|update|status|disconnect|link|join>.");
|
|
1120
1123
|
}
|
|
1121
1124
|
//#endregion
|
|
1122
|
-
//#region src/cli/
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
`
|
|
1137
|
-
_ __
|
|
1138
|
-
_ ______ (__)___/ /
|
|
1139
|
-
| | / / __ \\/ / __ /
|
|
1140
|
-
| |/ / /_/ / / /_/ /
|
|
1141
|
-
|___/\\____/_/\\__,_/`
|
|
1142
|
-
];
|
|
1143
|
-
const OPERATOR_MAX_TIMEOUT_MS = 36e5;
|
|
1144
|
-
var OperatorClientError = class extends Error {
|
|
1145
|
-
code;
|
|
1146
|
-
status;
|
|
1147
|
-
details;
|
|
1148
|
-
constructor(message, code = "operator_error", status, details) {
|
|
1149
|
-
super(message);
|
|
1150
|
-
this.code = code;
|
|
1151
|
-
this.status = status;
|
|
1152
|
-
this.details = details;
|
|
1153
|
-
this.name = "OperatorClientError";
|
|
1154
|
-
}
|
|
1155
|
-
toJSON() {
|
|
1156
|
-
return {
|
|
1157
|
-
error: this.code,
|
|
1158
|
-
message: this.message,
|
|
1159
|
-
...this.status === void 0 ? {} : { status: this.status },
|
|
1160
|
-
...this.details === void 0 ? {} : { details: this.details }
|
|
1161
|
-
};
|
|
1162
|
-
}
|
|
1163
|
-
};
|
|
1164
|
-
var OperatorClient = class {
|
|
1165
|
-
token;
|
|
1166
|
-
fetcher;
|
|
1167
|
-
origin;
|
|
1168
|
-
constructor(origin, token, fetcher = fetch) {
|
|
1169
|
-
this.token = token;
|
|
1170
|
-
this.fetcher = fetcher;
|
|
1171
|
-
this.origin = normalizePlatformApiUrl(origin);
|
|
1172
|
-
}
|
|
1173
|
-
async request(path, options = {}) {
|
|
1174
|
-
if (!path.startsWith("/") || path.startsWith("//") || path.includes("?") || path.includes("#")) throw new OperatorClientError("Invalid operator API path.");
|
|
1175
|
-
const timeoutMs = options.timeoutMs ?? (options.method === "POST" ? 3e5 : 3e4);
|
|
1176
|
-
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1e3 || timeoutMs > 36e5) throw new OperatorClientError(`Operator request timeout must be an integer from 1 to ${OPERATOR_MAX_TIMEOUT_MS / 1e3} seconds.`, "invalid_timeout");
|
|
1177
|
-
const url = new URL(`${this.origin}/operator/v1${path}`);
|
|
1178
|
-
for (const [name, value] of Object.entries(options.query ?? {})) url.searchParams.set(name, value);
|
|
1179
|
-
const timeoutController = new AbortController();
|
|
1180
|
-
const timer = setTimeout(() => timeoutController.abort(), timeoutMs);
|
|
1181
|
-
timer.unref();
|
|
1182
|
-
const signal = options.signal ? AbortSignal.any([options.signal, timeoutController.signal]) : timeoutController.signal;
|
|
1183
|
-
try {
|
|
1184
|
-
let response;
|
|
1185
|
-
try {
|
|
1186
|
-
response = await this.fetcher(url, {
|
|
1187
|
-
method: options.method ?? "GET",
|
|
1188
|
-
headers: {
|
|
1189
|
-
...cfAccessHeaders(process.env, this.origin),
|
|
1190
|
-
Authorization: `Bearer ${this.token}`,
|
|
1191
|
-
Accept: "application/json",
|
|
1192
|
-
...options.body ? { "Content-Type": "application/json" } : {}
|
|
1193
|
-
},
|
|
1194
|
-
...options.body ? { body: JSON.stringify(options.body) } : {},
|
|
1195
|
-
redirect: "manual",
|
|
1196
|
-
signal
|
|
1197
|
-
});
|
|
1198
|
-
} catch (error) {
|
|
1199
|
-
if (options.signal?.aborted) throw error;
|
|
1200
|
-
if (timeoutController.signal.aborted) throw new OperatorClientError(`Operator request exceeded the ${timeoutMs / 1e3}-second timeout. ${options.method === "POST" ? "Its outcome may be unknown; inspect platform state before retrying." : "Check connectivity and try again."}`, "request_timeout");
|
|
1201
|
-
throw new OperatorClientError(`Operator request to ${this.origin} failed. ${options.method === "POST" ? "Its outcome may be unknown; inspect platform state before retrying." : "Check connectivity and try again."}`, "connection_failed");
|
|
1202
|
-
}
|
|
1203
|
-
if (response.status >= 300 && response.status < 400) throw new OperatorClientError("The operator API redirected the request. Credentials were not forwarded; use the exact platform API origin.", "redirect_rejected", response.status);
|
|
1204
|
-
let data;
|
|
1205
|
-
try {
|
|
1206
|
-
data = await response.json();
|
|
1207
|
-
} catch {
|
|
1208
|
-
throw new OperatorClientError(`Operator API returned invalid JSON (HTTP ${response.status}).${options.method === "POST" ? " Inspect platform state before retrying." : ""}`, "invalid_response", response.status);
|
|
1209
|
-
}
|
|
1210
|
-
if (!data || typeof data !== "object" || Array.isArray(data)) throw new OperatorClientError("Operator API returned an invalid response object.", "invalid_response", response.status);
|
|
1211
|
-
const result = data;
|
|
1212
|
-
if (!response.ok) throw new OperatorClientError(typeof result.message === "string" ? result.message : `Operator request failed (HTTP ${response.status}).`, typeof result.error === "string" ? result.error : "request_failed", response.status, result.details);
|
|
1213
|
-
if (result.partial === true || result.ok === false) throw new OperatorClientError("The operation did not fully complete. Inspect the partial result before retrying.", "partial_failure", response.status, result);
|
|
1214
|
-
return result;
|
|
1215
|
-
} finally {
|
|
1216
|
-
clearTimeout(timer);
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
};
|
|
1220
|
-
//#endregion
|
|
1221
|
-
//#region src/cli/operator-args.ts
|
|
1222
|
-
const operatorCommands = [
|
|
1223
|
-
{
|
|
1224
|
-
group: "auth",
|
|
1225
|
-
action: "login",
|
|
1226
|
-
description: "Sign in as a platform administrator",
|
|
1227
|
-
path: "/session",
|
|
1228
|
-
values: { provider: "OAuth provider" },
|
|
1229
|
-
booleans: ["token-stdin"]
|
|
1230
|
-
},
|
|
1231
|
-
{
|
|
1232
|
-
group: "auth",
|
|
1233
|
-
action: "logout",
|
|
1234
|
-
description: "Revoke the current operator session and remove its local credential",
|
|
1235
|
-
path: "/session/logout"
|
|
1236
|
-
},
|
|
1237
|
-
{
|
|
1238
|
-
group: "auth",
|
|
1239
|
-
action: "status",
|
|
1240
|
-
description: "Inspect operator identity, expiry, and capabilities",
|
|
1241
|
-
path: "/session"
|
|
1242
|
-
},
|
|
1243
|
-
{
|
|
1244
|
-
group: "auth",
|
|
1245
|
-
action: "token",
|
|
1246
|
-
description: "Print an operator token; exchange an API session with --token-stdin",
|
|
1247
|
-
path: "/session",
|
|
1248
|
-
booleans: ["token-stdin"]
|
|
1249
|
-
},
|
|
1250
|
-
{
|
|
1251
|
-
group: "user",
|
|
1252
|
-
action: "list",
|
|
1253
|
-
description: "List users",
|
|
1254
|
-
path: "/users",
|
|
1255
|
-
values: { search: "Search login or email" }
|
|
1256
|
-
},
|
|
1257
|
-
{
|
|
1258
|
-
group: "user",
|
|
1259
|
-
action: "show",
|
|
1260
|
-
description: "Inspect a user, usage, and projects",
|
|
1261
|
-
path: "/users/:id",
|
|
1262
|
-
positional: ["id"]
|
|
1263
|
-
},
|
|
1264
|
-
{
|
|
1265
|
-
group: "user",
|
|
1266
|
-
action: "plan",
|
|
1267
|
-
description: "Change a user plan",
|
|
1268
|
-
path: "/users/:id/plan",
|
|
1269
|
-
positional: ["id", "plan"],
|
|
1270
|
-
method: "POST"
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
group: "user",
|
|
1274
|
-
action: "suspend",
|
|
1275
|
-
description: "Suspend a user and their projects",
|
|
1276
|
-
path: "/users/:id/suspend",
|
|
1277
|
-
positional: ["id"],
|
|
1278
|
-
values: { reason: "Reason for suspension" },
|
|
1279
|
-
method: "POST"
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
group: "user",
|
|
1283
|
-
action: "restore",
|
|
1284
|
-
description: "Restore a suspended user",
|
|
1285
|
-
path: "/users/:id/restore",
|
|
1286
|
-
positional: ["id"],
|
|
1287
|
-
method: "POST"
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
group: "user",
|
|
1291
|
-
action: "delete",
|
|
1292
|
-
description: "Delete a user and all owned resources",
|
|
1293
|
-
path: "/users/:id/delete",
|
|
1294
|
-
positional: ["id"],
|
|
1295
|
-
method: "POST"
|
|
1296
|
-
},
|
|
1297
|
-
{
|
|
1298
|
-
group: "project",
|
|
1299
|
-
action: "list",
|
|
1300
|
-
description: "List tenant projects",
|
|
1301
|
-
path: "/projects",
|
|
1302
|
-
values: {
|
|
1303
|
-
user: "Owner user ID",
|
|
1304
|
-
search: "Search projects"
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
|
-
{
|
|
1308
|
-
group: "project",
|
|
1309
|
-
action: "show",
|
|
1310
|
-
description: "Inspect a project and its resources",
|
|
1311
|
-
path: "/projects/:id",
|
|
1312
|
-
positional: ["id"]
|
|
1313
|
-
},
|
|
1314
|
-
{
|
|
1315
|
-
group: "project",
|
|
1316
|
-
action: "delete",
|
|
1317
|
-
description: "Delete a project and its resources",
|
|
1318
|
-
path: "/projects/:id/delete",
|
|
1319
|
-
positional: ["id"],
|
|
1320
|
-
method: "POST"
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
group: "deployment",
|
|
1324
|
-
action: "list",
|
|
1325
|
-
description: "List tenant deployments",
|
|
1326
|
-
path: "/deployments",
|
|
1327
|
-
values: {
|
|
1328
|
-
project: "Project ID",
|
|
1329
|
-
search: "Search deployments",
|
|
1330
|
-
status: "Deployment status"
|
|
1331
|
-
}
|
|
1332
|
-
},
|
|
1333
|
-
{
|
|
1334
|
-
group: "deployment",
|
|
1335
|
-
action: "show",
|
|
1336
|
-
description: "Inspect a deployment",
|
|
1337
|
-
path: "/deployments/:id",
|
|
1338
|
-
positional: ["id"]
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
group: "deployment",
|
|
1342
|
-
action: "cancel",
|
|
1343
|
-
description: "Cancel a deployment",
|
|
1344
|
-
path: "/deployments/:id/cancel",
|
|
1345
|
-
positional: ["id"],
|
|
1346
|
-
method: "POST"
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
group: "deployment",
|
|
1350
|
-
action: "logs",
|
|
1351
|
-
description: "Read runtime logs (JSON follow emits one object per line)",
|
|
1352
|
-
path: "/deployments/:id/logs",
|
|
1353
|
-
positional: ["id"],
|
|
1354
|
-
values: {
|
|
1355
|
-
since: "Duration or ISO timestamp",
|
|
1356
|
-
cursor: "Opaque continuation cursor"
|
|
1357
|
-
},
|
|
1358
|
-
booleans: ["follow"]
|
|
1359
|
-
},
|
|
1360
|
-
{
|
|
1361
|
-
group: "build",
|
|
1362
|
-
action: "show",
|
|
1363
|
-
description: "Inspect a managed build",
|
|
1364
|
-
path: "/builds/:id",
|
|
1365
|
-
positional: ["id"]
|
|
1366
|
-
},
|
|
1367
|
-
{
|
|
1368
|
-
group: "build",
|
|
1369
|
-
action: "logs",
|
|
1370
|
-
description: "Read build logs (JSON follow emits one object per line)",
|
|
1371
|
-
path: "/builds/:id/logs",
|
|
1372
|
-
positional: ["id"],
|
|
1373
|
-
values: { since: "Last received sequence number" },
|
|
1374
|
-
booleans: ["follow"]
|
|
1375
|
-
},
|
|
1376
|
-
{
|
|
1377
|
-
group: "signup",
|
|
1378
|
-
action: "show",
|
|
1379
|
-
description: "Inspect signup restrictions and allowlist",
|
|
1380
|
-
path: "/signup"
|
|
1381
|
-
},
|
|
1382
|
-
{
|
|
1383
|
-
group: "signup",
|
|
1384
|
-
action: "restrict",
|
|
1385
|
-
description: "Restrict signup to the allowlist",
|
|
1386
|
-
path: "/signup/restrict",
|
|
1387
|
-
method: "POST"
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
group: "signup",
|
|
1391
|
-
action: "open",
|
|
1392
|
-
description: "Open public signup",
|
|
1393
|
-
path: "/signup/open",
|
|
1394
|
-
method: "POST"
|
|
1395
|
-
},
|
|
1396
|
-
{
|
|
1397
|
-
group: "signup",
|
|
1398
|
-
action: "allow",
|
|
1399
|
-
description: "Add a github or email allowlist pattern",
|
|
1400
|
-
path: "/signup/allow",
|
|
1401
|
-
positional: ["type", "pattern"],
|
|
1402
|
-
values: { note: "Allowlist note" },
|
|
1403
|
-
method: "POST"
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
group: "signup",
|
|
1407
|
-
action: "remove",
|
|
1408
|
-
description: "Remove a github or email allowlist pattern",
|
|
1409
|
-
path: "/signup/remove",
|
|
1410
|
-
positional: ["type", "pattern"],
|
|
1411
|
-
method: "POST"
|
|
1412
|
-
},
|
|
1413
|
-
{
|
|
1414
|
-
group: "invitation",
|
|
1415
|
-
action: "list",
|
|
1416
|
-
description: "List invitations",
|
|
1417
|
-
path: "/invitations"
|
|
1418
|
-
},
|
|
1419
|
-
{
|
|
1420
|
-
group: "invitation",
|
|
1421
|
-
action: "send",
|
|
1422
|
-
description: "Send invitations to comma-separated email addresses",
|
|
1423
|
-
path: "/invitations/send",
|
|
1424
|
-
positional: ["emails"],
|
|
1425
|
-
method: "POST"
|
|
1426
|
-
},
|
|
1427
|
-
{
|
|
1428
|
-
group: "invitation",
|
|
1429
|
-
action: "revoke",
|
|
1430
|
-
description: "Revoke an invitation",
|
|
1431
|
-
path: "/invitations/:id/revoke",
|
|
1432
|
-
positional: ["id"],
|
|
1433
|
-
method: "POST"
|
|
1434
|
-
},
|
|
1435
|
-
{
|
|
1436
|
-
group: "system",
|
|
1437
|
-
action: "overview",
|
|
1438
|
-
description: "Inspect platform usage and capacity",
|
|
1439
|
-
path: "/system/overview"
|
|
1440
|
-
},
|
|
1441
|
-
{
|
|
1442
|
-
group: "system",
|
|
1443
|
-
action: "health",
|
|
1444
|
-
description: "Check platform health",
|
|
1445
|
-
path: "/system/health"
|
|
1446
|
-
},
|
|
1447
|
-
{
|
|
1448
|
-
group: "system",
|
|
1449
|
-
action: "cli-versions",
|
|
1450
|
-
description: "Inspect CLI version adoption and deployment statistics",
|
|
1451
|
-
path: "/system/cli-versions"
|
|
1452
|
-
},
|
|
1453
|
-
{
|
|
1454
|
-
group: "system",
|
|
1455
|
-
action: "events",
|
|
1456
|
-
description: "List operator audit events",
|
|
1457
|
-
path: "/system/events"
|
|
1458
|
-
},
|
|
1459
|
-
{
|
|
1460
|
-
group: "system",
|
|
1461
|
-
action: "backfill-queue-tokens",
|
|
1462
|
-
description: "Repair missing queue authentication tokens",
|
|
1463
|
-
path: "/system/backfill-queue-tokens",
|
|
1464
|
-
method: "POST"
|
|
1465
|
-
},
|
|
1466
|
-
{
|
|
1467
|
-
group: "system",
|
|
1468
|
-
action: "sandbox-drain",
|
|
1469
|
-
description: "Drain and verify managed Sandbox container applications",
|
|
1470
|
-
path: "/system/sandbox-drain",
|
|
1471
|
-
values: { cursor: "Opaque cursor returned by --plan" },
|
|
1472
|
-
method: "POST"
|
|
1473
|
-
},
|
|
1474
|
-
{
|
|
1475
|
-
group: "worker",
|
|
1476
|
-
action: "list",
|
|
1477
|
-
description: "List hosted platform workers",
|
|
1478
|
-
path: "/workers",
|
|
1479
|
-
values: { environment: "production or staging" }
|
|
1480
|
-
},
|
|
1481
|
-
{
|
|
1482
|
-
group: "worker",
|
|
1483
|
-
action: "show",
|
|
1484
|
-
description: "Inspect hosted worker versions",
|
|
1485
|
-
path: "/workers/:id",
|
|
1486
|
-
positional: ["id"],
|
|
1487
|
-
values: { environment: "production or staging" }
|
|
1488
|
-
},
|
|
1489
|
-
{
|
|
1490
|
-
group: "worker",
|
|
1491
|
-
action: "rollback",
|
|
1492
|
-
description: "Roll back a hosted worker to a version",
|
|
1493
|
-
path: "/workers/:id/rollback",
|
|
1494
|
-
positional: ["id", "versionId"],
|
|
1495
|
-
values: { environment: "production or staging" },
|
|
1496
|
-
method: "POST"
|
|
1497
|
-
},
|
|
1498
|
-
{
|
|
1499
|
-
group: "worker",
|
|
1500
|
-
action: "rollback-all",
|
|
1501
|
-
description: "Roll back all hosted workers to their previous versions",
|
|
1502
|
-
path: "/workers/rollback-all",
|
|
1503
|
-
values: { environment: "production or staging" },
|
|
1504
|
-
method: "POST"
|
|
1505
|
-
},
|
|
1506
|
-
{
|
|
1507
|
-
group: "worker",
|
|
1508
|
-
action: "events",
|
|
1509
|
-
description: "List hosted worker events or inspect a batch",
|
|
1510
|
-
path: "/workers/events",
|
|
1511
|
-
positional: ["batchId"],
|
|
1512
|
-
optionalPositional: true,
|
|
1513
|
-
values: { environment: "production or staging" }
|
|
1514
|
-
}
|
|
1125
|
+
//#region src/cli/platform-config-args.ts
|
|
1126
|
+
const PLATFORM_AUTH_ACTIONS = [
|
|
1127
|
+
"list",
|
|
1128
|
+
"show",
|
|
1129
|
+
"initialize",
|
|
1130
|
+
"add",
|
|
1131
|
+
"configure",
|
|
1132
|
+
"test",
|
|
1133
|
+
"enable",
|
|
1134
|
+
"disable",
|
|
1135
|
+
"link",
|
|
1136
|
+
"admission",
|
|
1137
|
+
"protection",
|
|
1138
|
+
"recover"
|
|
1515
1139
|
];
|
|
1516
|
-
|
|
1517
|
-
|
|
1140
|
+
function parsePlatformConfigArgs(args) {
|
|
1141
|
+
if (args.length && args[0] !== "auth") throw new Error("platform: Usage: void platform config auth [command] [options].");
|
|
1518
1142
|
const positional = [];
|
|
1519
|
-
const values = {};
|
|
1520
1143
|
const flags = /* @__PURE__ */ new Set();
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1523
|
-
"
|
|
1524
|
-
"
|
|
1525
|
-
"
|
|
1526
|
-
"
|
|
1527
|
-
|
|
1528
|
-
|
|
1144
|
+
const values = /* @__PURE__ */ new Map();
|
|
1145
|
+
const valueFlags = [
|
|
1146
|
+
"connection",
|
|
1147
|
+
"installation",
|
|
1148
|
+
"id",
|
|
1149
|
+
"file",
|
|
1150
|
+
"client-secret-env",
|
|
1151
|
+
"test-id"
|
|
1152
|
+
];
|
|
1153
|
+
for (let index = 1; index < args.length; index++) {
|
|
1529
1154
|
const arg = args[index];
|
|
1530
1155
|
if (!arg.startsWith("-")) {
|
|
1531
1156
|
positional.push(arg);
|
|
1532
1157
|
continue;
|
|
1533
1158
|
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1159
|
+
const name = arg.slice(2);
|
|
1160
|
+
if (!arg.startsWith("--") || ![
|
|
1161
|
+
"json",
|
|
1162
|
+
"plan",
|
|
1163
|
+
"yes"
|
|
1164
|
+
].includes(name) && !valueFlags.includes(name)) throw new Error(`platform: Unknown config auth flag ${arg}.`);
|
|
1165
|
+
if (flags.has(name) || values.has(name)) throw new Error(`platform: Duplicate flag ${arg}.`);
|
|
1166
|
+
if (!valueFlags.includes(name)) {
|
|
1167
|
+
flags.add(name);
|
|
1168
|
+
continue;
|
|
1542
1169
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1170
|
+
const value = args[++index];
|
|
1171
|
+
if (!value || value.startsWith("-")) throw new Error(`platform: ${arg} requires a value.`);
|
|
1172
|
+
values.set(name, value);
|
|
1173
|
+
}
|
|
1174
|
+
const [action = "", target = "", ...extra] = positional;
|
|
1175
|
+
if (extra.length || action && !PLATFORM_AUTH_ACTIONS.includes(action)) throw new Error(`platform: Usage: void platform config auth <${PLATFORM_AUTH_ACTIONS.join("|")}>.`);
|
|
1176
|
+
const needsTarget = action && action !== "list" && action !== "initialize" && action !== "admission";
|
|
1177
|
+
if (needsTarget && !target || !needsTarget && target) throw new Error(`platform: ${action || "config auth"} ${needsTarget ? "requires a method" : "does not accept a method"}.`);
|
|
1178
|
+
if (action === "add") {
|
|
1179
|
+
if (!PLATFORM_LOGIN_KINDS.includes(target)) throw new Error(`platform: Login kind must be ${PLATFORM_LOGIN_KINDS.join(", ")}.`);
|
|
1180
|
+
} else if (action === "protection") {
|
|
1181
|
+
if (![
|
|
1182
|
+
"enable",
|
|
1183
|
+
"disable",
|
|
1184
|
+
"show"
|
|
1185
|
+
].includes(target)) throw new Error("platform: Usage: void platform config auth protection <enable|disable|show>.");
|
|
1186
|
+
} else if (target) parsePlatformLoginId(target);
|
|
1187
|
+
if (flags.has("plan") && flags.has("yes")) throw new Error("platform: --plan and --yes cannot be combined.");
|
|
1188
|
+
if ((!action || action === "list" || action === "show") && (flags.has("plan") || flags.has("yes"))) throw new Error("platform: Select a configuration change before using --plan or --yes.");
|
|
1189
|
+
if (values.has("id") && action !== "add") throw new Error("platform: --id is only valid when adding a login method.");
|
|
1190
|
+
if (values.has("installation") && action !== "recover" && action !== "protection") throw new Error("platform: --installation is only valid for recovery or platform protection.");
|
|
1191
|
+
if (values.has("file") && ![
|
|
1192
|
+
"add",
|
|
1193
|
+
"configure",
|
|
1194
|
+
"admission",
|
|
1195
|
+
"recover",
|
|
1196
|
+
"protection"
|
|
1197
|
+
].includes(action) || values.has("client-secret-env") && ![
|
|
1198
|
+
"add",
|
|
1199
|
+
"configure",
|
|
1200
|
+
"recover"
|
|
1201
|
+
].includes(action)) throw new Error("platform: --file is valid for add, configure, admission, recover, or protection; --client-secret-env is valid for add, configure, or recover.");
|
|
1202
|
+
if (values.has("test-id") && action !== "enable" && action !== "link") throw new Error("platform: --test-id is only valid for enable or link.");
|
|
1203
|
+
const secretEnv = values.get("client-secret-env") ?? "";
|
|
1204
|
+
if (secretEnv && !/^[A-Za-z_][A-Za-z0-9_]*$/.test(secretEnv)) throw new Error("platform: --client-secret-env requires an environment-variable name.");
|
|
1205
|
+
if (values.has("id")) parsePlatformLoginId(values.get("id"));
|
|
1206
|
+
return {
|
|
1207
|
+
subcommand: "config",
|
|
1549
1208
|
action,
|
|
1550
|
-
|
|
1209
|
+
target,
|
|
1210
|
+
connection: values.get("connection") ?? "",
|
|
1211
|
+
installation: values.get("installation") ?? "",
|
|
1212
|
+
id: values.get("id") ?? "",
|
|
1213
|
+
file: values.get("file") ?? "",
|
|
1214
|
+
clientSecretEnv: secretEnv,
|
|
1215
|
+
testId: values.get("test-id") ?? "",
|
|
1551
1216
|
json: flags.has("json"),
|
|
1552
1217
|
plan: flags.has("plan"),
|
|
1553
|
-
yes: flags.has("yes")
|
|
1554
|
-
follow: flags.has("follow"),
|
|
1555
|
-
tokenStdin: flags.has("token-stdin"),
|
|
1556
|
-
provider: values.provider ?? "github",
|
|
1557
|
-
method: "GET",
|
|
1558
|
-
path: "",
|
|
1559
|
-
query: {},
|
|
1560
|
-
body: {}
|
|
1218
|
+
yes: flags.has("yes")
|
|
1561
1219
|
};
|
|
1562
|
-
if (!action && args.length === 1) return parsed;
|
|
1563
|
-
const command = operatorCommands.find((entry) => entry.group === group && entry.action === action);
|
|
1564
|
-
if (!command) throw new Error(`platform: Usage: void platform ${group} <${operatorCommands.filter((entry) => entry.group === group).map(({ action }) => action).join("|")}>.`);
|
|
1565
|
-
const count = command.positional?.length ?? 0;
|
|
1566
|
-
if (parameters.length > count || !command.optionalPositional && parameters.length !== count) throw new Error(`platform: Usage: void platform ${group} ${action}${command.positional?.map((name) => ` <${name}>`).join("") ?? ""}.`);
|
|
1567
|
-
const paged = action === "list" || action === "events" || action === "logs";
|
|
1568
|
-
const allowed = /* @__PURE__ */ new Set([
|
|
1569
|
-
"connection",
|
|
1570
|
-
...command.method ? ["timeout"] : [],
|
|
1571
|
-
...Object.keys(command.values ?? {}),
|
|
1572
|
-
...paged ? ["limit", ...action !== "logs" ? ["page"] : []] : []
|
|
1573
|
-
]);
|
|
1574
|
-
for (const name of Object.keys(values)) if (!allowed.has(name)) throw new Error(`platform: Unknown flag '--${name}' for ${group} ${action}.`);
|
|
1575
|
-
for (const name of flags) if (![
|
|
1576
|
-
"json",
|
|
1577
|
-
...command.method ? ["yes", "plan"] : [],
|
|
1578
|
-
...command.booleans ?? []
|
|
1579
|
-
].includes(name)) throw new Error(`platform: Unknown flag '--${name}' for ${group} ${action}.`);
|
|
1580
|
-
if (parsed.plan && parsed.yes) throw new Error("platform: --plan and --yes cannot be combined.");
|
|
1581
|
-
parsed.path = command.path;
|
|
1582
|
-
parsed.method = command.method ?? "GET";
|
|
1583
|
-
for (const [index, name] of (command.positional ?? []).entries()) {
|
|
1584
|
-
const value = parameters[index];
|
|
1585
|
-
if (value === void 0) continue;
|
|
1586
|
-
if (value === "." || value === "..") throw new Error("platform: An object ID cannot be a dot path segment.");
|
|
1587
|
-
if (parsed.path.includes(`:${name}`)) parsed.path = parsed.path.replace(`:${name}`, encodeURIComponent(value));
|
|
1588
|
-
else if (group === "worker" && action === "events") parsed.path += `/${encodeURIComponent(value)}`;
|
|
1589
|
-
else parsed.body[name] = name === "emails" ? value.split(",").map((email) => email.trim()) : value;
|
|
1590
|
-
}
|
|
1591
|
-
for (const [name, value] of Object.entries(values)) {
|
|
1592
|
-
if (name === "connection" || name === "provider") continue;
|
|
1593
|
-
if (name === "timeout") {
|
|
1594
|
-
const maximum = OPERATOR_MAX_TIMEOUT_MS / 1e3;
|
|
1595
|
-
if (!/^[1-9]\d*$/.test(value) || Number(value) > maximum) throw new Error(`platform: --timeout must be an integer from 1 to ${maximum} seconds.`);
|
|
1596
|
-
parsed.timeoutMs = Number(value) * 1e3;
|
|
1597
|
-
continue;
|
|
1598
|
-
}
|
|
1599
|
-
if (name === "page" || name === "limit") {
|
|
1600
|
-
const maximum = name === "limit" ? action === "logs" ? 500 : 100 : 1e6;
|
|
1601
|
-
if (!/^[1-9]\d*$/.test(value) || Number(value) > maximum) throw new Error(`platform: --${name} must be an integer from 1 to ${maximum}.`);
|
|
1602
|
-
}
|
|
1603
|
-
if (name === "since" && group === "build" && (!/^\d+$/.test(value) || !Number.isSafeInteger(Number(value)))) throw new Error("platform: --since must be a nonnegative safe integer for build logs.");
|
|
1604
|
-
if (name === "environment" && !["production", "staging"].includes(value)) throw new Error("platform: --environment must be production or staging.");
|
|
1605
|
-
if (parsed.method === "POST") parsed.body[name] = value;
|
|
1606
|
-
else parsed.query[name] = value;
|
|
1607
|
-
}
|
|
1608
|
-
if (parsed.body.type && !["github", "email"].includes(String(parsed.body.type))) throw new Error("platform: Signup pattern type must be github or email.");
|
|
1609
|
-
return parsed;
|
|
1610
|
-
}
|
|
1611
|
-
//#endregion
|
|
1612
|
-
//#region src/cli/help.ts
|
|
1613
|
-
var help_exports = /* @__PURE__ */ __exportAll({
|
|
1614
|
-
getHelpPath: () => getHelpPath,
|
|
1615
|
-
printGlobalHelp: () => printGlobalHelp,
|
|
1616
|
-
printHelpPage: () => printHelpPage,
|
|
1617
|
-
printVoidHeader: () => printVoidHeader
|
|
1618
|
-
});
|
|
1619
|
-
function operatorHelpTree() {
|
|
1620
|
-
return Object.fromEntries(operatorGroups.map((group) => {
|
|
1621
|
-
const commands = operatorCommands.filter((entry) => entry.group === group);
|
|
1622
|
-
return [group, {
|
|
1623
|
-
summary: `Administer platform ${group}. Operator credentials are separate from deployment credentials.`,
|
|
1624
|
-
usage: [`void platform ${group} <command> [options]`],
|
|
1625
|
-
commands: commands.map((entry) => ({
|
|
1626
|
-
command: entry.action,
|
|
1627
|
-
description: entry.description
|
|
1628
|
-
})),
|
|
1629
|
-
children: Object.fromEntries(commands.map((entry) => [entry.action, {
|
|
1630
|
-
summary: `${entry.description}.`,
|
|
1631
|
-
usage: [`void platform ${group} ${entry.action}${entry.positional?.map((name) => entry.optionalPositional ? ` [${name}]` : ` <${name}>`).join("") ?? ""} [options]`],
|
|
1632
|
-
options: [
|
|
1633
|
-
{
|
|
1634
|
-
command: "--connection <id-or-url>",
|
|
1635
|
-
description: "Choose a registered connection; otherwise use VOID_API_URL or the active connection"
|
|
1636
|
-
},
|
|
1637
|
-
{
|
|
1638
|
-
command: "--json",
|
|
1639
|
-
description: "Write structured JSON to stdout (JSON Lines while following logs)"
|
|
1640
|
-
},
|
|
1641
|
-
...entry.method ? [
|
|
1642
|
-
{
|
|
1643
|
-
command: "--plan",
|
|
1644
|
-
description: "Validate and preview without changing anything"
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
command: "--yes",
|
|
1648
|
-
description: "Apply after preview without prompting; required in unattended scripts"
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
command: "--timeout <seconds>",
|
|
1652
|
-
description: "Mutation deadline (default 300 seconds; maximum 3600 seconds)"
|
|
1653
|
-
}
|
|
1654
|
-
] : [],
|
|
1655
|
-
...[
|
|
1656
|
-
"list",
|
|
1657
|
-
"events",
|
|
1658
|
-
"logs"
|
|
1659
|
-
].includes(entry.action) ? [{
|
|
1660
|
-
command: "--limit <number>",
|
|
1661
|
-
description: entry.action === "logs" ? "Maximum 500 log records" : "Maximum 100 records per page"
|
|
1662
|
-
}, ...entry.action !== "logs" ? [{
|
|
1663
|
-
command: "--page <number>",
|
|
1664
|
-
description: "One-based page number"
|
|
1665
|
-
}] : []] : [],
|
|
1666
|
-
...Object.entries(entry.values ?? {}).map(([flag, description]) => ({
|
|
1667
|
-
command: `--${flag} <value>`,
|
|
1668
|
-
description
|
|
1669
|
-
})),
|
|
1670
|
-
...(entry.booleans ?? []).map((flag) => ({
|
|
1671
|
-
command: `--${flag}`,
|
|
1672
|
-
description: flag === "follow" ? "Poll new logs until interrupted or the build ends" : "Read a full API session from stdin for explicit operator session exchange"
|
|
1673
|
-
}))
|
|
1674
|
-
]
|
|
1675
|
-
}]))
|
|
1676
|
-
}];
|
|
1677
|
-
}));
|
|
1678
|
-
}
|
|
1679
|
-
const HELP_TREE = {
|
|
1680
|
-
connect: {
|
|
1681
|
-
summary: "Connect this project to Cloudflare or an existing Void platform.",
|
|
1682
|
-
usage: ["void connect [url] [--platform <cloudflare|void>] [--no-login]"],
|
|
1683
|
-
options: [{
|
|
1684
|
-
command: "--platform <cloudflare|void>",
|
|
1685
|
-
description: "Choose the deployment destination"
|
|
1686
|
-
}, {
|
|
1687
|
-
command: "--no-login",
|
|
1688
|
-
description: "Save a Void connection without authenticating"
|
|
1689
|
-
}],
|
|
1690
|
-
examples: [
|
|
1691
|
-
{
|
|
1692
|
-
command: "void connect",
|
|
1693
|
-
description: "Choose a destination and sign in"
|
|
1694
|
-
},
|
|
1695
|
-
{
|
|
1696
|
-
command: "void connect https://platform.example.com",
|
|
1697
|
-
description: "Join a Void platform"
|
|
1698
|
-
},
|
|
1699
|
-
{
|
|
1700
|
-
command: "void connect --platform cloudflare",
|
|
1701
|
-
description: "Sign in and select a Cloudflare account"
|
|
1702
|
-
}
|
|
1703
|
-
]
|
|
1704
|
-
},
|
|
1705
|
-
init: {
|
|
1706
|
-
summary: "Set up Void in a new or existing project.",
|
|
1707
|
-
usage: ["void init [options]"],
|
|
1708
|
-
options: [
|
|
1709
|
-
{
|
|
1710
|
-
command: "--agents",
|
|
1711
|
-
description: "Set up agent instructions and skills"
|
|
1712
|
-
},
|
|
1713
|
-
{
|
|
1714
|
-
command: "--tsconfig",
|
|
1715
|
-
description: "Only update tsconfig.json"
|
|
1716
|
-
},
|
|
1717
|
-
{
|
|
1718
|
-
command: "--git",
|
|
1719
|
-
description: "Initialize a Git repository without prompting"
|
|
1720
|
-
},
|
|
1721
|
-
{
|
|
1722
|
-
command: "--no-git",
|
|
1723
|
-
description: "Skip Git repository initialization"
|
|
1724
|
-
},
|
|
1725
|
-
{
|
|
1726
|
-
command: "--github",
|
|
1727
|
-
description: "Only create the GitHub Actions deploy workflow (OIDC, no stored token)"
|
|
1728
|
-
}
|
|
1729
|
-
],
|
|
1730
|
-
examples: [
|
|
1731
|
-
{
|
|
1732
|
-
command: "void init",
|
|
1733
|
-
description: "Scaffold or configure the current project"
|
|
1734
|
-
},
|
|
1735
|
-
{
|
|
1736
|
-
command: "void init --agents",
|
|
1737
|
-
description: "Install agent instructions and skills"
|
|
1738
|
-
},
|
|
1739
|
-
{
|
|
1740
|
-
command: "void init --github",
|
|
1741
|
-
description: "Scaffold the GitHub Actions deploy workflow"
|
|
1742
|
-
}
|
|
1743
|
-
]
|
|
1744
|
-
},
|
|
1745
|
-
deploy: {
|
|
1746
|
-
summary: "Build and deploy. Offers to link an existing Cloudflare Worker when no destination is configured.",
|
|
1747
|
-
usage: ["void deploy [options]"],
|
|
1748
|
-
options: [
|
|
1749
|
-
{
|
|
1750
|
-
command: "--project <name>",
|
|
1751
|
-
description: "Deploy target project name"
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
command: "--dir <path>",
|
|
1755
|
-
description: "Deploy a static directory and skip build"
|
|
1756
|
-
},
|
|
1757
|
-
{
|
|
1758
|
-
command: "--spa",
|
|
1759
|
-
description: "Use SPA mode for static deploys"
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
command: "--skip-build",
|
|
1763
|
-
description: "Skip the build step and use existing output (static deploys on Cloudflare)"
|
|
1764
|
-
},
|
|
1765
|
-
{
|
|
1766
|
-
command: "--platform <cloudflare|void>",
|
|
1767
|
-
description: "Override the platform saved by void init"
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
command: "--require-email",
|
|
1771
|
-
description: "Fail instead of deploying without email when the mail domain is not set up (with --platform cloudflare)"
|
|
1772
|
-
},
|
|
1773
|
-
{
|
|
1774
|
-
command: "--debug",
|
|
1775
|
-
description: "Mirror the deploy log to stderr (always written to ~/.void/logs)"
|
|
1776
|
-
}
|
|
1777
|
-
],
|
|
1778
|
-
examples: [
|
|
1779
|
-
{
|
|
1780
|
-
command: "void deploy",
|
|
1781
|
-
description: "Deploy the linked project"
|
|
1782
|
-
},
|
|
1783
|
-
{
|
|
1784
|
-
command: "void deploy --project my-app",
|
|
1785
|
-
description: "Deploy to a specific project"
|
|
1786
|
-
},
|
|
1787
|
-
{
|
|
1788
|
-
command: "void deploy --dir dist --spa",
|
|
1789
|
-
description: "Deploy a static SPA directory"
|
|
1790
|
-
},
|
|
1791
|
-
{
|
|
1792
|
-
command: "void deploy --platform cloudflare",
|
|
1793
|
-
description: "Deploy to your own Cloudflare account"
|
|
1794
|
-
}
|
|
1795
|
-
]
|
|
1796
|
-
},
|
|
1797
|
-
auth: {
|
|
1798
|
-
summary: "Log in, log out, and inspect local auth state.",
|
|
1799
|
-
usage: ["void auth <command>"],
|
|
1800
|
-
commands: [
|
|
1801
|
-
{
|
|
1802
|
-
command: "login",
|
|
1803
|
-
description: "Log in with GitHub or Google"
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
command: "logout",
|
|
1807
|
-
description: "Log out and remove credentials"
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
command: "whoami",
|
|
1811
|
-
description: "Show the logged-in username"
|
|
1812
|
-
},
|
|
1813
|
-
{
|
|
1814
|
-
command: "token",
|
|
1815
|
-
description: "Copy auth token to clipboard"
|
|
1816
|
-
}
|
|
1817
|
-
],
|
|
1818
|
-
children: {
|
|
1819
|
-
login: basicSubcommand("Log in with GitHub or Google.", "void auth login"),
|
|
1820
|
-
logout: basicSubcommand("Log out and remove credentials.", "void auth logout"),
|
|
1821
|
-
whoami: basicSubcommand("Show the logged-in username.", "void auth whoami"),
|
|
1822
|
-
token: basicSubcommand("Copy auth token to clipboard.", "void auth token")
|
|
1823
|
-
}
|
|
1824
|
-
},
|
|
1825
|
-
cloudflare: {
|
|
1826
|
-
summary: "Manage Cloudflare authentication used by Void.",
|
|
1827
|
-
usage: ["void cloudflare <command>"],
|
|
1828
|
-
commands: [
|
|
1829
|
-
{
|
|
1830
|
-
command: "login",
|
|
1831
|
-
description: "Sign in or switch users with browser OAuth"
|
|
1832
|
-
},
|
|
1833
|
-
{
|
|
1834
|
-
command: "status",
|
|
1835
|
-
description: "Show identity, authentication, and the deployment account"
|
|
1836
|
-
},
|
|
1837
|
-
{
|
|
1838
|
-
command: "logout",
|
|
1839
|
-
description: "Remove the local browser session"
|
|
1840
|
-
}
|
|
1841
|
-
],
|
|
1842
|
-
children: {
|
|
1843
|
-
login: basicSubcommand("Sign in again or switch Cloudflare users with browser OAuth.", "void cloudflare login"),
|
|
1844
|
-
status: basicSubcommand("Show Cloudflare identity, authentication, accessible accounts, and the pinned deployment account.", "void cloudflare status"),
|
|
1845
|
-
logout: basicSubcommand("Remove the local browser session.", "void cloudflare logout")
|
|
1846
|
-
}
|
|
1847
|
-
},
|
|
1848
|
-
platform: {
|
|
1849
|
-
summary: "Install Void platforms and administer users, projects, access, and operations. Use `void connect` to join one.",
|
|
1850
|
-
usage: ["void platform <command>"],
|
|
1851
|
-
commands: [
|
|
1852
|
-
...operatorGroups.map((group) => ({
|
|
1853
|
-
command: `${group} <command>`,
|
|
1854
|
-
description: `Administer platform ${group}`
|
|
1855
|
-
})),
|
|
1856
|
-
{
|
|
1857
|
-
command: "list",
|
|
1858
|
-
description: "List installed and connected platforms"
|
|
1859
|
-
},
|
|
1860
|
-
{
|
|
1861
|
-
command: "use [id]",
|
|
1862
|
-
description: "Select the default Void platform"
|
|
1863
|
-
},
|
|
1864
|
-
{
|
|
1865
|
-
command: "status [id]",
|
|
1866
|
-
description: "Inspect a platform and its health"
|
|
1867
|
-
},
|
|
1868
|
-
{
|
|
1869
|
-
command: "discover",
|
|
1870
|
-
description: "Recover installations from a Cloudflare account"
|
|
1871
|
-
},
|
|
1872
|
-
{
|
|
1873
|
-
command: "domain set <domain>",
|
|
1874
|
-
description: "Add an application domain to a test platform"
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
command: "install",
|
|
1878
|
-
description: "Install a Void platform in Cloudflare"
|
|
1879
|
-
},
|
|
1880
|
-
{
|
|
1881
|
-
command: "upgrade [id]",
|
|
1882
|
-
description: "Upgrade an installed Void platform"
|
|
1883
|
-
},
|
|
1884
|
-
{
|
|
1885
|
-
command: "rollback [id]",
|
|
1886
|
-
description: "Restore a compatible earlier platform runtime"
|
|
1887
|
-
},
|
|
1888
|
-
{
|
|
1889
|
-
command: "repair [id]",
|
|
1890
|
-
description: "Reconcile an installed Void platform"
|
|
1891
|
-
},
|
|
1892
|
-
{
|
|
1893
|
-
command: "disable [id]",
|
|
1894
|
-
description: "Disable traffic without deleting data"
|
|
1895
|
-
},
|
|
1896
|
-
{
|
|
1897
|
-
command: "enable [id]",
|
|
1898
|
-
description: "Restore traffic for a disabled platform"
|
|
1899
|
-
},
|
|
1900
|
-
{
|
|
1901
|
-
command: "uninstall [id]",
|
|
1902
|
-
description: "Safely remove an installed Void platform"
|
|
1903
|
-
}
|
|
1904
|
-
],
|
|
1905
|
-
children: {
|
|
1906
|
-
...operatorHelpTree(),
|
|
1907
|
-
domain: {
|
|
1908
|
-
summary: "Add an application domain while keeping existing workers.dev URLs.",
|
|
1909
|
-
usage: ["void platform domain set <domain> [options]"],
|
|
1910
|
-
children: { set: {
|
|
1911
|
-
summary: "Set up DNS and verify HTTPS before making an application domain canonical. Rerun to resume.",
|
|
1912
|
-
usage: ["void platform domain set <domain> [options]"],
|
|
1913
|
-
options: [
|
|
1914
|
-
{
|
|
1915
|
-
command: "--installation <id>",
|
|
1916
|
-
description: "Choose an installed platform; otherwise select interactively"
|
|
1917
|
-
},
|
|
1918
|
-
{
|
|
1919
|
-
command: "--zone <domain>",
|
|
1920
|
-
description: "Containing Cloudflare zone; detected when it already exists"
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
command: "--dedicated-zone",
|
|
1924
|
-
description: "Add catch-all routes for a zone dedicated to this platform"
|
|
1925
|
-
},
|
|
1926
|
-
{
|
|
1927
|
-
command: "--plan",
|
|
1928
|
-
description: "Preview without making changes"
|
|
1929
|
-
},
|
|
1930
|
-
{
|
|
1931
|
-
command: "--yes",
|
|
1932
|
-
description: "Apply without an interactive confirmation"
|
|
1933
|
-
}
|
|
1934
|
-
]
|
|
1935
|
-
} }
|
|
1936
|
-
},
|
|
1937
|
-
list: basicSubcommand("List installed and connected platforms.", "void platform list"),
|
|
1938
|
-
use: basicSubcommand("Select the default Void platform.", "void platform use [id]"),
|
|
1939
|
-
status: basicSubcommand("Inspect a platform and its health.", "void platform status [id]"),
|
|
1940
|
-
discover: {
|
|
1941
|
-
summary: "Recover owned platform installations from Cloudflare.",
|
|
1942
|
-
usage: ["void platform discover [--account <id>] [--installation <id-or-name>]"],
|
|
1943
|
-
options: [{
|
|
1944
|
-
command: "--account <id>",
|
|
1945
|
-
description: "Cloudflare account id"
|
|
1946
|
-
}, {
|
|
1947
|
-
command: "--installation <id-or-name>",
|
|
1948
|
-
description: "Recover only one installation from a shared account"
|
|
1949
|
-
}]
|
|
1950
|
-
},
|
|
1951
|
-
install: {
|
|
1952
|
-
summary: "Install or resume a Void platform with a domain, or workers.dev for testing.",
|
|
1953
|
-
usage: ["void platform install [options]"],
|
|
1954
|
-
options: [
|
|
1955
|
-
{
|
|
1956
|
-
command: "--name <slug>",
|
|
1957
|
-
description: "Installation name"
|
|
1958
|
-
},
|
|
1959
|
-
{
|
|
1960
|
-
command: "--workers-dev",
|
|
1961
|
-
description: "Use workers.dev for testing; add a domain later"
|
|
1962
|
-
},
|
|
1963
|
-
{
|
|
1964
|
-
command: "--display-name <name>",
|
|
1965
|
-
description: "Human-readable platform name"
|
|
1966
|
-
},
|
|
1967
|
-
{
|
|
1968
|
-
command: "--account <id>",
|
|
1969
|
-
description: "Cloudflare account id"
|
|
1970
|
-
},
|
|
1971
|
-
{
|
|
1972
|
-
command: "--application-domain <domain>",
|
|
1973
|
-
description: "Base domain for applications (zone apex is simplest)"
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
command: "--zone <domain>",
|
|
1977
|
-
description: "Cloudflare zone containing the app domain"
|
|
1978
|
-
},
|
|
1979
|
-
{
|
|
1980
|
-
command: "--dedicated-zone",
|
|
1981
|
-
description: "Allow zone-wide application catch-all routes"
|
|
1982
|
-
},
|
|
1983
|
-
{
|
|
1984
|
-
command: "--control-plane-domain <domain>",
|
|
1985
|
-
description: "Optional API hostname"
|
|
1986
|
-
},
|
|
1987
|
-
{
|
|
1988
|
-
command: "--plan",
|
|
1989
|
-
description: "Print the exact plan without changing Cloudflare"
|
|
1990
|
-
},
|
|
1991
|
-
{
|
|
1992
|
-
command: "--resume",
|
|
1993
|
-
description: "Resume the matching local installation"
|
|
1994
|
-
},
|
|
1995
|
-
{
|
|
1996
|
-
command: "--runtime <path>",
|
|
1997
|
-
description: "Deploy an integrity-checked runtime directory instead of the package"
|
|
1998
|
-
},
|
|
1999
|
-
{
|
|
2000
|
-
command: "--yes",
|
|
2001
|
-
description: "Acknowledge changes without an interactive prompt"
|
|
2002
|
-
}
|
|
2003
|
-
]
|
|
2004
|
-
},
|
|
2005
|
-
upgrade: lifecycleHelp("upgrade", "Upgrade an installed platform without deleting resources."),
|
|
2006
|
-
rollback: {
|
|
2007
|
-
summary: "Restore a compatible earlier runtime without reversing database migrations.",
|
|
2008
|
-
usage: ["void platform rollback [id] --runtime <earlier-path> [--from-runtime <current-path>] [--plan] [--yes]"],
|
|
2009
|
-
options: [
|
|
2010
|
-
{
|
|
2011
|
-
command: "--runtime <path>",
|
|
2012
|
-
description: "Earlier compatible runtime to restore"
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
command: "--from-runtime <path>",
|
|
2016
|
-
description: "Current installed runtime when it differs from the packaged runtime"
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
command: "--plan",
|
|
2020
|
-
description: "Print the exact plan without making changes"
|
|
2021
|
-
},
|
|
2022
|
-
{
|
|
2023
|
-
command: "--yes",
|
|
2024
|
-
description: "Acknowledge non-interactive Cloudflare changes"
|
|
2025
|
-
}
|
|
2026
|
-
]
|
|
2027
|
-
},
|
|
2028
|
-
repair: lifecycleHelp("repair", "Reconcile drift using the installation ownership manifest."),
|
|
2029
|
-
disable: lifecycleHelp("disable", "Disable platform traffic without deleting data."),
|
|
2030
|
-
enable: lifecycleHelp("enable", "Restore configured traffic for a disabled platform."),
|
|
2031
|
-
uninstall: {
|
|
2032
|
-
summary: "Safely remove installer-owned platform resources.",
|
|
2033
|
-
usage: ["void platform uninstall [id] [options]"],
|
|
2034
|
-
options: [
|
|
2035
|
-
{
|
|
2036
|
-
command: "--plan",
|
|
2037
|
-
description: "Print the exact deletion and retention plan"
|
|
2038
|
-
},
|
|
2039
|
-
{
|
|
2040
|
-
command: "--yes",
|
|
2041
|
-
description: "Acknowledge changes without an interactive prompt"
|
|
2042
|
-
},
|
|
2043
|
-
{
|
|
2044
|
-
command: "--purge-data",
|
|
2045
|
-
description: "Delete installer-owned data even when it contains apps"
|
|
2046
|
-
},
|
|
2047
|
-
{
|
|
2048
|
-
command: "--keep-zone",
|
|
2049
|
-
description: "Explicitly retain an installer-created zone"
|
|
2050
|
-
}
|
|
2051
|
-
]
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
},
|
|
2055
|
-
project: {
|
|
2056
|
-
summary: "Manage Void projects and deployments.",
|
|
2057
|
-
usage: ["void project <command>"],
|
|
2058
|
-
commands: [
|
|
2059
|
-
{
|
|
2060
|
-
command: "status [name]",
|
|
2061
|
-
description: "Show deployments for a project"
|
|
2062
|
-
},
|
|
2063
|
-
{
|
|
2064
|
-
command: "link [name]",
|
|
2065
|
-
description: "Link this directory to a project"
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
command: "list",
|
|
2069
|
-
description: "List your projects"
|
|
2070
|
-
},
|
|
2071
|
-
{
|
|
2072
|
-
command: "logs",
|
|
2073
|
-
description: "Show runtime logs from the deployed project"
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
command: "requests",
|
|
2077
|
-
description: "Show request-level traffic (status, method, timing)"
|
|
2078
|
-
},
|
|
2079
|
-
{
|
|
2080
|
-
command: "rollback [deployId]",
|
|
2081
|
-
description: "Roll back to a previous deployment"
|
|
2082
|
-
},
|
|
2083
|
-
{
|
|
2084
|
-
command: "cancel [deployId]",
|
|
2085
|
-
description: "Cancel an active deployment"
|
|
2086
|
-
},
|
|
2087
|
-
{
|
|
2088
|
-
command: "delete [name]",
|
|
2089
|
-
description: "Delete a project and all its resources"
|
|
2090
|
-
},
|
|
2091
|
-
{
|
|
2092
|
-
command: "purge-cache",
|
|
2093
|
-
description: "Purge all cached pages"
|
|
2094
|
-
}
|
|
2095
|
-
],
|
|
2096
|
-
children: {
|
|
2097
|
-
status: basicSubcommand("Show deployments for a project.", "void project status [name]", "void project status my-app"),
|
|
2098
|
-
link: basicSubcommand("Link this directory to a Void project.", "void project link [name]", "void project link my-app"),
|
|
2099
|
-
list: basicSubcommand("List your projects.", "void project list"),
|
|
2100
|
-
logs: {
|
|
2101
|
-
summary: "Show runtime logs from the deployed project.",
|
|
2102
|
-
usage: ["void project logs [options]"],
|
|
2103
|
-
options: [
|
|
2104
|
-
{
|
|
2105
|
-
command: "--filter <text>",
|
|
2106
|
-
description: "Substring search over log messages"
|
|
2107
|
-
},
|
|
2108
|
-
{
|
|
2109
|
-
command: "--level <level>",
|
|
2110
|
-
description: "Filter by level: error|warn|info|log|debug|all (default: all)"
|
|
2111
|
-
},
|
|
2112
|
-
{
|
|
2113
|
-
command: "--range <range>",
|
|
2114
|
-
description: "Time range to query (default: 1h)"
|
|
2115
|
-
},
|
|
2116
|
-
{
|
|
2117
|
-
command: "--deployment <id>",
|
|
2118
|
-
description: "Limit logs to one deployment"
|
|
2119
|
-
}
|
|
2120
|
-
],
|
|
2121
|
-
examples: [
|
|
2122
|
-
{
|
|
2123
|
-
command: "void project logs --range 30m",
|
|
2124
|
-
description: "Show recent project logs"
|
|
2125
|
-
},
|
|
2126
|
-
{
|
|
2127
|
-
command: "void project logs --level error",
|
|
2128
|
-
description: "Show only error-level entries and exceptions"
|
|
2129
|
-
},
|
|
2130
|
-
{
|
|
2131
|
-
command: "void project logs --filter websocket",
|
|
2132
|
-
description: "Substring search over log messages"
|
|
2133
|
-
}
|
|
2134
|
-
]
|
|
2135
|
-
},
|
|
2136
|
-
requests: {
|
|
2137
|
-
summary: "Show request-level traffic (status, method, type, timing). Surfaces 5xx that the edge router generated itself and requests to static/SPA projects that never invoke a worker — neither of which appears in `project logs`.",
|
|
2138
|
-
usage: ["void project requests [options]"],
|
|
2139
|
-
options: [{
|
|
2140
|
-
command: "--status <filter>",
|
|
2141
|
-
description: "Filter by status: a class like 5xx or an exact code like 500"
|
|
2142
|
-
}, {
|
|
2143
|
-
command: "--range <range>",
|
|
2144
|
-
description: "Time range to query (default: 1h)"
|
|
2145
|
-
}],
|
|
2146
|
-
examples: [{
|
|
2147
|
-
command: "void project requests --status 5xx",
|
|
2148
|
-
description: "Show recent server-error responses, including edge-generated ones"
|
|
2149
|
-
}, {
|
|
2150
|
-
command: "void project requests --range 24h",
|
|
2151
|
-
description: "Show all request traffic in the last day"
|
|
2152
|
-
}]
|
|
2153
|
-
},
|
|
2154
|
-
rollback: basicSubcommand("Roll back to a previous deployment.", "void project rollback [deployId]"),
|
|
2155
|
-
cancel: basicSubcommand("Cancel an active deployment.", "void project cancel [deployId]"),
|
|
2156
|
-
delete: {
|
|
2157
|
-
summary: "Delete a project and all its resources.",
|
|
2158
|
-
usage: ["void project delete [name] [options]"],
|
|
2159
|
-
options: [{
|
|
2160
|
-
command: "--force, -f",
|
|
2161
|
-
description: "Delete without confirmation"
|
|
2162
|
-
}],
|
|
2163
|
-
examples: [{
|
|
2164
|
-
command: "void project delete my-app",
|
|
2165
|
-
description: "Delete a project"
|
|
2166
|
-
}]
|
|
2167
|
-
},
|
|
2168
|
-
"purge-cache": {
|
|
2169
|
-
summary: "Purge all cached pages for a project.",
|
|
2170
|
-
usage: ["void project purge-cache [options]"],
|
|
2171
|
-
options: [{
|
|
2172
|
-
command: "--project <name>",
|
|
2173
|
-
description: "Project name override"
|
|
2174
|
-
}]
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
},
|
|
2178
|
-
secret: {
|
|
2179
|
-
summary: "Manage production secrets for Void projects.",
|
|
2180
|
-
usage: ["void secret <command>"],
|
|
2181
|
-
commands: [
|
|
2182
|
-
{
|
|
2183
|
-
command: "list",
|
|
2184
|
-
description: "List project secrets"
|
|
2185
|
-
},
|
|
2186
|
-
{
|
|
2187
|
-
command: "put <name>",
|
|
2188
|
-
description: "Set a project secret"
|
|
2189
|
-
},
|
|
2190
|
-
{
|
|
2191
|
-
command: "delete <name>",
|
|
2192
|
-
description: "Delete a project secret"
|
|
2193
|
-
},
|
|
2194
|
-
{
|
|
2195
|
-
command: "sync <file>",
|
|
2196
|
-
description: "Sync secrets from a dotenv file"
|
|
2197
|
-
}
|
|
2198
|
-
],
|
|
2199
|
-
children: {
|
|
2200
|
-
list: withProjectOption("List project secrets.", "void secret list [options]"),
|
|
2201
|
-
put: withProjectOption("Set a project secret.", "void secret put <name> [options]"),
|
|
2202
|
-
delete: withProjectOption("Delete a project secret.", "void secret delete <name> [options]"),
|
|
2203
|
-
sync: withProjectOption("Sync secrets from a dotenv file.", "void secret sync <file> [options]")
|
|
2204
|
-
}
|
|
2205
|
-
},
|
|
2206
|
-
domain: {
|
|
2207
|
-
summary: "Configure custom domains for Void projects.",
|
|
2208
|
-
usage: ["void domain <command>"],
|
|
2209
|
-
commands: [
|
|
2210
|
-
{
|
|
2211
|
-
command: "add <hostname>",
|
|
2212
|
-
description: "Add a custom domain"
|
|
2213
|
-
},
|
|
2214
|
-
{
|
|
2215
|
-
command: "delete <hostname>",
|
|
2216
|
-
description: "Remove a custom domain"
|
|
2217
|
-
},
|
|
2218
|
-
{
|
|
2219
|
-
command: "list",
|
|
2220
|
-
description: "List custom domains and status"
|
|
2221
|
-
},
|
|
2222
|
-
{
|
|
2223
|
-
command: "status <hostname>",
|
|
2224
|
-
description: "Check domain verification status"
|
|
2225
|
-
}
|
|
2226
|
-
],
|
|
2227
|
-
children: {
|
|
2228
|
-
add: withProjectOption("Add a custom domain.", "void domain add <hostname> [options]"),
|
|
2229
|
-
delete: withProjectOption("Remove a custom domain.", "void domain delete <hostname> [options]"),
|
|
2230
|
-
list: withProjectOption("List custom domains and status.", "void domain list [options]"),
|
|
2231
|
-
status: {
|
|
2232
|
-
summary: "Check domain verification status. Prints a rolled-up state with a one-line diagnostic.",
|
|
2233
|
-
usage: ["void domain status <hostname> [options]"],
|
|
2234
|
-
options: [{
|
|
2235
|
-
command: "--project <name>",
|
|
2236
|
-
description: "Project name override"
|
|
2237
|
-
}, {
|
|
2238
|
-
command: "--verbose",
|
|
2239
|
-
description: "Also print the raw multi-line status breakdown"
|
|
2240
|
-
}]
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
},
|
|
2244
|
-
email: {
|
|
2245
|
-
summary: "Inspect email activity, manage verified recipients, and send and receive at your own domain.",
|
|
2246
|
-
usage: ["void email <command>"],
|
|
2247
|
-
commands: [
|
|
2248
|
-
{
|
|
2249
|
-
command: "usage",
|
|
2250
|
-
description: "Show monthly outbound/inbound counts and quota"
|
|
2251
|
-
},
|
|
2252
|
-
{
|
|
2253
|
-
command: "logs",
|
|
2254
|
-
description: "Show recent email delivery activity"
|
|
2255
|
-
},
|
|
2256
|
-
{
|
|
2257
|
-
command: "destinations",
|
|
2258
|
-
description: "List verified recipient addresses"
|
|
2259
|
-
},
|
|
2260
|
-
{
|
|
2261
|
-
command: "allow <address>",
|
|
2262
|
-
description: "Add a recipient and trigger CF verification"
|
|
2263
|
-
},
|
|
2264
|
-
{
|
|
2265
|
-
command: "disallow <address>",
|
|
2266
|
-
description: "Remove a recipient from the allowlist"
|
|
2267
|
-
},
|
|
2268
|
-
{
|
|
2269
|
-
command: "domain <add|status|list|sync|remove>",
|
|
2270
|
-
description: "Send and receive at your own domain on a Cloudflare zone"
|
|
2271
|
-
},
|
|
2272
|
-
{
|
|
2273
|
-
command: "status --platform cloudflare",
|
|
2274
|
-
description: "Show the email setup state and address map on your own account"
|
|
2275
|
-
},
|
|
2276
|
-
{
|
|
2277
|
-
command: "setup --platform cloudflare",
|
|
2278
|
-
description: "Set email up on your own Cloudflare account (one confirmation)"
|
|
2279
|
-
}
|
|
2280
|
-
],
|
|
2281
|
-
children: {
|
|
2282
|
-
usage: withProjectOption("Show monthly outbound/inbound counts and quota.", "void email usage [options]"),
|
|
2283
|
-
logs: {
|
|
2284
|
-
summary: "Show recent email delivery activity.",
|
|
2285
|
-
usage: ["void email logs [options]"],
|
|
2286
|
-
options: [{
|
|
2287
|
-
command: "--project <name>",
|
|
2288
|
-
description: "Project name override"
|
|
2289
|
-
}, {
|
|
2290
|
-
command: "--limit <n>",
|
|
2291
|
-
description: "How many entries to show (positive integer)"
|
|
2292
|
-
}]
|
|
2293
|
-
},
|
|
2294
|
-
destinations: withProjectOption("List verified recipient addresses.", "void email destinations [options]"),
|
|
2295
|
-
allow: withProjectOption("Add a recipient and trigger a Cloudflare verification email.", "void email allow <address> [options]"),
|
|
2296
|
-
disallow: withProjectOption("Remove a recipient from the verified allowlist.", "void email disallow <address> [options]"),
|
|
2297
|
-
domain: {
|
|
2298
|
-
summary: "Send and receive at your own domain on a Cloudflare zone.",
|
|
2299
|
-
usage: ["void email domain <verb> [<domain>] [options]"],
|
|
2300
|
-
commands: [
|
|
2301
|
-
{
|
|
2302
|
-
command: "add <domain>",
|
|
2303
|
-
description: "Register the domain (OAuth grant, or a scoped API token)"
|
|
2304
|
-
},
|
|
2305
|
-
{
|
|
2306
|
-
command: "status <domain>",
|
|
2307
|
-
description: "Show state; re-probes the credential and relay, polls a pending row"
|
|
2308
|
-
},
|
|
2309
|
-
{
|
|
2310
|
-
command: "list",
|
|
2311
|
-
description: "List registered email domains"
|
|
2312
|
-
},
|
|
2313
|
-
{
|
|
2314
|
-
command: "sync <domain>",
|
|
2315
|
-
description: "Redeploy the relay at the current version and rotate its secret"
|
|
2316
|
-
},
|
|
2317
|
-
{
|
|
2318
|
-
command: "remove <domain>",
|
|
2319
|
-
description: "Delete the registration, stored credential, and relay secret"
|
|
2320
|
-
}
|
|
2321
|
-
],
|
|
2322
|
-
options: [{
|
|
2323
|
-
command: "--subdomain <label|host>",
|
|
2324
|
-
description: "On add: register this subdomain instead of the proposed mail.<domain>"
|
|
2325
|
-
}, {
|
|
2326
|
-
command: "--project <name>",
|
|
2327
|
-
description: "Project name override"
|
|
2328
|
-
}],
|
|
2329
|
-
children: {
|
|
2330
|
-
add: {
|
|
2331
|
-
summary: "Register a domain on a Cloudflare zone you own for sending and receiving. Proposes mail.<domain> when the apex already carries MX.",
|
|
2332
|
-
usage: ["void email domain add <domain> [options]"],
|
|
2333
|
-
options: [{
|
|
2334
|
-
command: "--subdomain <label|host>",
|
|
2335
|
-
description: "Register this subdomain instead of the proposed mail.<domain>"
|
|
2336
|
-
}, {
|
|
2337
|
-
command: "--project <name>",
|
|
2338
|
-
description: "Project name override"
|
|
2339
|
-
}]
|
|
2340
|
-
},
|
|
2341
|
-
status: withProjectOption("Show a registered domain, re-probing its credential and relay.", "void email domain status <domain> [options]"),
|
|
2342
|
-
list: withProjectOption("List registered email domains.", "void email domain list [options]"),
|
|
2343
|
-
sync: withProjectOption("Redeploy the relay at the current version and rotate its secret.", "void email domain sync <domain> [options]"),
|
|
2344
|
-
remove: {
|
|
2345
|
-
summary: "Delete the registration, stored credential, and relay secret.",
|
|
2346
|
-
usage: ["void email domain remove <domain> [options]"],
|
|
2347
|
-
options: [{
|
|
2348
|
-
command: "--force",
|
|
2349
|
-
description: "Drop the row even when Cloudflare-side cleanup fails"
|
|
2350
|
-
}, {
|
|
2351
|
-
command: "--project <name>",
|
|
2352
|
-
description: "Project name override"
|
|
2353
|
-
}]
|
|
2354
|
-
}
|
|
2355
|
-
}
|
|
2356
|
-
},
|
|
2357
|
-
status: {
|
|
2358
|
-
summary: "Show the email setup state and address map. Exit 1 when not ready.",
|
|
2359
|
-
usage: ["void email status --platform cloudflare"],
|
|
2360
|
-
options: [{
|
|
2361
|
-
command: "--platform cloudflare",
|
|
2362
|
-
description: "Your own Cloudflare account (the only platform with a status today)"
|
|
2363
|
-
}]
|
|
2364
|
-
},
|
|
2365
|
-
setup: {
|
|
2366
|
-
summary: "Set email up on your own Cloudflare account: enable Email Routing, onboard Email Sending, write send_email + addresses into wrangler.jsonc. Asks once before changing the account.",
|
|
2367
|
-
usage: ["void email setup --platform cloudflare"],
|
|
2368
|
-
options: [{
|
|
2369
|
-
command: "--platform cloudflare",
|
|
2370
|
-
description: "Your own Cloudflare account (required; the Void platform needs no setup)"
|
|
2371
|
-
}]
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
},
|
|
2375
|
-
github: {
|
|
2376
|
-
summary: "Connect a GitHub repository for automatic deploys.",
|
|
2377
|
-
usage: ["void github <command>"],
|
|
2378
|
-
commands: [
|
|
2379
|
-
{
|
|
2380
|
-
command: "install",
|
|
2381
|
-
description: "Open the GitHub App install page in your browser"
|
|
2382
|
-
},
|
|
2383
|
-
{
|
|
2384
|
-
command: "installations",
|
|
2385
|
-
description: "List your GitHub App installations"
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
command: "connect [project]",
|
|
2389
|
-
description: "Connect a repository to a project for auto-deploy"
|
|
2390
|
-
},
|
|
2391
|
-
{
|
|
2392
|
-
command: "update [project]",
|
|
2393
|
-
description: "Update an existing connection's branch, build executor, or deploy workflow"
|
|
2394
|
-
},
|
|
2395
|
-
{
|
|
2396
|
-
command: "status [project]",
|
|
2397
|
-
description: "Show a project's GitHub connection (repo, branch, executor, workflow)"
|
|
2398
|
-
},
|
|
2399
|
-
{
|
|
2400
|
-
command: "disconnect [project]",
|
|
2401
|
-
description: "Disconnect a project from its GitHub repository"
|
|
2402
|
-
},
|
|
2403
|
-
{
|
|
2404
|
-
command: "link",
|
|
2405
|
-
description: "Link your GitHub account to Void"
|
|
2406
|
-
},
|
|
2407
|
-
{
|
|
2408
|
-
command: "join",
|
|
2409
|
-
description: "Join your organization's shared GitHub App installations"
|
|
2410
|
-
}
|
|
2411
|
-
],
|
|
2412
|
-
children: {
|
|
2413
|
-
install: basicSubcommand("Open the GitHub App install page in your browser.", "void github install"),
|
|
2414
|
-
installations: basicSubcommand("List your GitHub App installations.", "void github installations"),
|
|
2415
|
-
link: basicSubcommand("Link your GitHub account to Void.", "void github link"),
|
|
2416
|
-
join: basicSubcommand("Join your organization's shared GitHub App installations.", "void github join"),
|
|
2417
|
-
connect: {
|
|
2418
|
-
summary: "Connect a repository to a project for automatic deploys.",
|
|
2419
|
-
usage: ["void github connect [project] [options]"],
|
|
2420
|
-
options: [
|
|
2421
|
-
{
|
|
2422
|
-
command: "--project <name>",
|
|
2423
|
-
description: "Project name (alias for positional)"
|
|
2424
|
-
},
|
|
2425
|
-
{
|
|
2426
|
-
command: "--installation <id>",
|
|
2427
|
-
description: "GitHub App installation ID"
|
|
2428
|
-
},
|
|
2429
|
-
{
|
|
2430
|
-
command: "--repo <owner/repo>",
|
|
2431
|
-
description: "Repository full name (owner/repo)"
|
|
2432
|
-
},
|
|
2433
|
-
{
|
|
2434
|
-
command: "--branch <name>",
|
|
2435
|
-
description: "Branch to deploy from (required in non-interactive mode)"
|
|
2436
|
-
},
|
|
2437
|
-
{
|
|
2438
|
-
command: "--executor <type>",
|
|
2439
|
-
description: "Build executor: container (default) | github_actions; prompted interactively when omitted"
|
|
2440
|
-
},
|
|
2441
|
-
{
|
|
2442
|
-
command: "--workflow <path>",
|
|
2443
|
-
description: "Authorized deploy workflow file (default .github/workflows/void-deploy.yml); prompted interactively when using github_actions"
|
|
2444
|
-
}
|
|
2445
|
-
],
|
|
2446
|
-
examples: [
|
|
2447
|
-
{
|
|
2448
|
-
command: "void github connect [project]",
|
|
2449
|
-
description: "Connect a repository to a project"
|
|
2450
|
-
},
|
|
2451
|
-
{
|
|
2452
|
-
command: "void github connect my-app --installation 42 --repo owner/repo --branch main",
|
|
2453
|
-
description: "Non-interactive connect (all flags explicit)"
|
|
2454
|
-
},
|
|
2455
|
-
{
|
|
2456
|
-
command: "void github connect my-app --repo owner/repo --branch main --executor github_actions",
|
|
2457
|
-
description: "Non-interactive connect using the GitHub Actions executor"
|
|
2458
|
-
}
|
|
2459
|
-
]
|
|
2460
|
-
},
|
|
2461
|
-
update: {
|
|
2462
|
-
summary: "Update an existing connection's branch, build executor, or deploy workflow.",
|
|
2463
|
-
usage: ["void github update [project] [options]"],
|
|
2464
|
-
options: [
|
|
2465
|
-
{
|
|
2466
|
-
command: "--project <name>",
|
|
2467
|
-
description: "Project name (alias for positional)"
|
|
2468
|
-
},
|
|
2469
|
-
{
|
|
2470
|
-
command: "--branch <name>",
|
|
2471
|
-
description: "New branch to deploy from"
|
|
2472
|
-
},
|
|
2473
|
-
{
|
|
2474
|
-
command: "--executor <type>",
|
|
2475
|
-
description: "New build executor: container | github_actions; prompted interactively when omitted"
|
|
2476
|
-
},
|
|
2477
|
-
{
|
|
2478
|
-
command: "--workflow <path>",
|
|
2479
|
-
description: "New authorized deploy workflow file under .github/workflows/; prompted interactively when using github_actions"
|
|
2480
|
-
}
|
|
2481
|
-
],
|
|
2482
|
-
examples: [{
|
|
2483
|
-
command: "void github update my-app --executor github_actions",
|
|
2484
|
-
description: "Switch an existing connection to the GitHub Actions executor"
|
|
2485
|
-
}, {
|
|
2486
|
-
command: "void github update my-app --branch release",
|
|
2487
|
-
description: "Change the deploy branch"
|
|
2488
|
-
}]
|
|
2489
|
-
},
|
|
2490
|
-
status: {
|
|
2491
|
-
summary: "Show a project's GitHub connection settings.",
|
|
2492
|
-
usage: ["void github status [project] [options]"],
|
|
2493
|
-
options: [{
|
|
2494
|
-
command: "--project <name>",
|
|
2495
|
-
description: "Project name (alias for positional)"
|
|
2496
|
-
}],
|
|
2497
|
-
examples: [{
|
|
2498
|
-
command: "void github status",
|
|
2499
|
-
description: "Show the linked project's connection"
|
|
2500
|
-
}, {
|
|
2501
|
-
command: "void github status my-app",
|
|
2502
|
-
description: "Show a specific project connection"
|
|
2503
|
-
}]
|
|
2504
|
-
},
|
|
2505
|
-
disconnect: {
|
|
2506
|
-
summary: "Disconnect a project from its GitHub repository.",
|
|
2507
|
-
usage: ["void github disconnect [project] [options]"],
|
|
2508
|
-
options: [{
|
|
2509
|
-
command: "--project <name>",
|
|
2510
|
-
description: "Project name (alias for positional)"
|
|
2511
|
-
}, {
|
|
2512
|
-
command: "--yes",
|
|
2513
|
-
description: "Skip the confirmation prompt (required in non-interactive shells)"
|
|
2514
|
-
}],
|
|
2515
|
-
examples: [{
|
|
2516
|
-
command: "void github disconnect",
|
|
2517
|
-
description: "Disconnect the linked project's repository"
|
|
2518
|
-
}, {
|
|
2519
|
-
command: "void github disconnect my-app --yes",
|
|
2520
|
-
description: "Disconnect a specific project without confirmation"
|
|
2521
|
-
}]
|
|
2522
|
-
}
|
|
2523
|
-
}
|
|
2524
|
-
},
|
|
2525
|
-
build: {
|
|
2526
|
-
summary: "Inspect remote builds.",
|
|
2527
|
-
usage: ["void build <command>"],
|
|
2528
|
-
commands: [{
|
|
2529
|
-
command: "logs [build]",
|
|
2530
|
-
description: "Stream, tail, or download logs for a build"
|
|
2531
|
-
}],
|
|
2532
|
-
children: { logs: {
|
|
2533
|
-
summary: "Stream, tail, or download logs for a build.",
|
|
2534
|
-
usage: ["void build logs [build] [options]"],
|
|
2535
|
-
options: [
|
|
2536
|
-
{
|
|
2537
|
-
command: "--follow, -f",
|
|
2538
|
-
description: "Live-tail until the build finishes"
|
|
2539
|
-
},
|
|
2540
|
-
{
|
|
2541
|
-
command: "--output <file>, -o",
|
|
2542
|
-
description: "Write logs to a file instead of stdout"
|
|
2543
|
-
},
|
|
2544
|
-
{
|
|
2545
|
-
command: "--project <slug>, -p",
|
|
2546
|
-
description: "Target project (else linked / VOID_PROJECT)"
|
|
2547
|
-
}
|
|
2548
|
-
],
|
|
2549
|
-
examples: [
|
|
2550
|
-
{
|
|
2551
|
-
command: "void build logs",
|
|
2552
|
-
description: "Print the latest build's logs"
|
|
2553
|
-
},
|
|
2554
|
-
{
|
|
2555
|
-
command: "void build logs -f",
|
|
2556
|
-
description: "Follow the latest build until it finishes"
|
|
2557
|
-
},
|
|
2558
|
-
{
|
|
2559
|
-
command: "void build logs bld_123 -o build.log",
|
|
2560
|
-
description: "Download a build's logs to a file"
|
|
2561
|
-
}
|
|
2562
|
-
]
|
|
2563
|
-
} }
|
|
2564
|
-
},
|
|
2565
|
-
db: {
|
|
2566
|
-
summary: "Manage local and remote database state.",
|
|
2567
|
-
usage: ["void db <command>"],
|
|
2568
|
-
commands: [
|
|
2569
|
-
{
|
|
2570
|
-
command: "push",
|
|
2571
|
-
description: "Push schema to local D1 without migration files"
|
|
2572
|
-
},
|
|
2573
|
-
{
|
|
2574
|
-
command: "generate",
|
|
2575
|
-
description: "Generate SQL migrations from schema changes"
|
|
2576
|
-
},
|
|
2577
|
-
{
|
|
2578
|
-
command: "status",
|
|
2579
|
-
description: "Show migration status (local and remote)"
|
|
2580
|
-
},
|
|
2581
|
-
{
|
|
2582
|
-
command: "reset",
|
|
2583
|
-
description: "Reset local DB and re-run migrations"
|
|
2584
|
-
},
|
|
2585
|
-
{
|
|
2586
|
-
command: "seed",
|
|
2587
|
-
description: "Reset local DB, run migrations, and seed"
|
|
2588
|
-
},
|
|
2589
|
-
{
|
|
2590
|
-
command: "execute <sql>",
|
|
2591
|
-
description: "Run SQL against the database (--remote for deployed)"
|
|
2592
|
-
},
|
|
2593
|
-
{
|
|
2594
|
-
command: "migrate",
|
|
2595
|
-
description: "Apply pending migrations"
|
|
2596
|
-
},
|
|
2597
|
-
{
|
|
2598
|
-
command: "studio",
|
|
2599
|
-
description: "Open Drizzle Studio (--remote for deployed PG)"
|
|
2600
|
-
},
|
|
2601
|
-
{
|
|
2602
|
-
command: "export",
|
|
2603
|
-
description: "Export local database as SQL"
|
|
2604
|
-
},
|
|
2605
|
-
{
|
|
2606
|
-
command: "connect",
|
|
2607
|
-
description: "Connect or provision an external database"
|
|
2608
|
-
},
|
|
2609
|
-
{
|
|
2610
|
-
command: "set-url",
|
|
2611
|
-
description: "Update the external database URL"
|
|
2612
|
-
},
|
|
2613
|
-
{
|
|
2614
|
-
command: "rename-migrations",
|
|
2615
|
-
description: "Rename migrations to timestamp format"
|
|
2616
|
-
}
|
|
2617
|
-
],
|
|
2618
|
-
children: {
|
|
2619
|
-
push: basicSubcommand("Push schema to local D1 without migration files.", "void db push"),
|
|
2620
|
-
generate: basicSubcommand("Generate SQL migrations from schema changes.", "void db generate"),
|
|
2621
|
-
status: basicSubcommand("Show migration status for local and remote DBs.", "void db status"),
|
|
2622
|
-
reset: basicSubcommand("Reset local DB and re-run migrations.", "void db reset"),
|
|
2623
|
-
seed: {
|
|
2624
|
-
summary: "Reset local DB, run migrations, and seed data.",
|
|
2625
|
-
usage: ["void db seed [options]"],
|
|
2626
|
-
options: [{
|
|
2627
|
-
command: "--file <path>",
|
|
2628
|
-
description: "Seed from a specific file"
|
|
2629
|
-
}]
|
|
2630
|
-
},
|
|
2631
|
-
execute: {
|
|
2632
|
-
summary: "Run SQL against the database (local by default; use --remote for the deployed database).",
|
|
2633
|
-
usage: ["void db execute <sql>", "void db execute --file <path>"],
|
|
2634
|
-
options: [{
|
|
2635
|
-
command: "--file <path>",
|
|
2636
|
-
description: "Run SQL from a file instead"
|
|
2637
|
-
}, {
|
|
2638
|
-
command: "--remote",
|
|
2639
|
-
description: "Run against the deployed database (D1 via proxy; PostgreSQL via direct connection)"
|
|
2640
|
-
}],
|
|
2641
|
-
examples: [
|
|
2642
|
-
{
|
|
2643
|
-
command: "void db execute \"select * from users\"",
|
|
2644
|
-
description: "Run inline SQL"
|
|
2645
|
-
},
|
|
2646
|
-
{
|
|
2647
|
-
command: "void db execute --file query.sql",
|
|
2648
|
-
description: "Run SQL from a file"
|
|
2649
|
-
},
|
|
2650
|
-
{
|
|
2651
|
-
command: "void db execute --remote \"select count(*) from users\"",
|
|
2652
|
-
description: "Query the deployed database"
|
|
2653
|
-
}
|
|
2654
|
-
]
|
|
2655
|
-
},
|
|
2656
|
-
migrate: {
|
|
2657
|
-
summary: "Apply pending migrations.",
|
|
2658
|
-
usage: ["void db migrate [options]"],
|
|
2659
|
-
options: [{
|
|
2660
|
-
command: "--remote",
|
|
2661
|
-
description: "Apply to the remote database"
|
|
2662
|
-
}]
|
|
2663
|
-
},
|
|
2664
|
-
studio: {
|
|
2665
|
-
summary: "Open Drizzle Studio against the database (local by default; use --remote for the deployed PostgreSQL database; D1 remote not yet supported).",
|
|
2666
|
-
usage: ["void db studio [options]"],
|
|
2667
|
-
options: [{
|
|
2668
|
-
command: "--remote",
|
|
2669
|
-
description: "Open Studio against the deployed PostgreSQL database (D1 remote not yet supported)"
|
|
2670
|
-
}],
|
|
2671
|
-
examples: [{
|
|
2672
|
-
command: "void db studio",
|
|
2673
|
-
description: "Open Studio for the local database"
|
|
2674
|
-
}, {
|
|
2675
|
-
command: "void db studio --remote",
|
|
2676
|
-
description: "Open Studio against the deployed PostgreSQL database"
|
|
2677
|
-
}]
|
|
2678
|
-
},
|
|
2679
|
-
export: {
|
|
2680
|
-
summary: "Export local database contents as SQL.",
|
|
2681
|
-
usage: ["void db export [options]"],
|
|
2682
|
-
options: [
|
|
2683
|
-
{
|
|
2684
|
-
command: "--output <path>",
|
|
2685
|
-
description: "Export to a specific file path"
|
|
2686
|
-
},
|
|
2687
|
-
{
|
|
2688
|
-
command: "--no-data",
|
|
2689
|
-
description: "Schema only (no INSERT statements)"
|
|
2690
|
-
},
|
|
2691
|
-
{
|
|
2692
|
-
command: "--no-schema",
|
|
2693
|
-
description: "Data only (no CREATE TABLE)"
|
|
2694
|
-
},
|
|
2695
|
-
{
|
|
2696
|
-
command: "--table <name>",
|
|
2697
|
-
description: "Export a single table"
|
|
2698
|
-
}
|
|
2699
|
-
]
|
|
2700
|
-
},
|
|
2701
|
-
connect: {
|
|
2702
|
-
summary: "Connect or provision an external PostgreSQL/MySQL database.",
|
|
2703
|
-
usage: ["void db connect [connection-string]", "void db connect --provider <name-or-module> [options]"],
|
|
2704
|
-
options: [
|
|
2705
|
-
{
|
|
2706
|
-
command: "--provider <name-or-module>",
|
|
2707
|
-
description: "Provision with an adapter"
|
|
2708
|
-
},
|
|
2709
|
-
{
|
|
2710
|
-
command: "--name <name>",
|
|
2711
|
-
description: "Provider project/database name"
|
|
2712
|
-
},
|
|
2713
|
-
{
|
|
2714
|
-
command: "--region <region>",
|
|
2715
|
-
description: "Provider region identifier"
|
|
2716
|
-
},
|
|
2717
|
-
{
|
|
2718
|
-
command: "--local-only",
|
|
2719
|
-
description: "Do not sync a linked Void project"
|
|
2720
|
-
}
|
|
2721
|
-
],
|
|
2722
|
-
examples: [{
|
|
2723
|
-
command: "void db connect \"postgresql://user:pass@host/db\"",
|
|
2724
|
-
description: "Connect an existing database"
|
|
2725
|
-
}, {
|
|
2726
|
-
command: "void db connect --provider neon --name my-app",
|
|
2727
|
-
description: "Provision a Neon database using NEON_API_KEY"
|
|
2728
|
-
}]
|
|
2729
|
-
},
|
|
2730
|
-
"set-url": basicSubcommand("Update the external database connection string for deployment.", "void db set-url"),
|
|
2731
|
-
"rename-migrations": basicSubcommand("Rename migrations to timestamp-based format.", "void db rename-migrations")
|
|
2732
|
-
}
|
|
2733
|
-
},
|
|
2734
|
-
env: {
|
|
2735
|
-
summary: "Validate env.ts and generate environment types.",
|
|
2736
|
-
usage: ["void env <command>"],
|
|
2737
|
-
commands: [{
|
|
2738
|
-
command: "check",
|
|
2739
|
-
description: "Validate local .env or remote secret names"
|
|
2740
|
-
}, {
|
|
2741
|
-
command: "types",
|
|
2742
|
-
description: "Regenerate .void/env.d.ts from env.ts"
|
|
2743
|
-
}],
|
|
2744
|
-
children: {
|
|
2745
|
-
check: {
|
|
2746
|
-
summary: "Validate local .env or required remote secret names.",
|
|
2747
|
-
usage: ["void env check [options]"],
|
|
2748
|
-
options: [{
|
|
2749
|
-
command: "--remote",
|
|
2750
|
-
description: "Check required server keys as remote secrets"
|
|
2751
|
-
}]
|
|
2752
|
-
},
|
|
2753
|
-
types: basicSubcommand("Regenerate .void/env.d.ts from env.ts.", "void env types")
|
|
2754
|
-
}
|
|
2755
|
-
},
|
|
2756
|
-
gen: {
|
|
2757
|
-
summary: "Scaffold routes, models, background jobs, and framework entries.",
|
|
2758
|
-
usage: ["void gen <command>"],
|
|
2759
|
-
commands: [
|
|
2760
|
-
{
|
|
2761
|
-
command: "model <name> [cols...]",
|
|
2762
|
-
description: "Generate migration, CRUD routes, and DB types"
|
|
2763
|
-
},
|
|
2764
|
-
{
|
|
2765
|
-
command: "migration <name>",
|
|
2766
|
-
description: "Generate an empty migration file"
|
|
2767
|
-
},
|
|
2768
|
-
{
|
|
2769
|
-
command: "route <path>",
|
|
2770
|
-
description: "Generate a route with handler exports"
|
|
2771
|
-
},
|
|
2772
|
-
{
|
|
2773
|
-
command: "middleware <name>",
|
|
2774
|
-
description: "Generate a numbered middleware file"
|
|
2775
|
-
},
|
|
2776
|
-
{
|
|
2777
|
-
command: "ssr",
|
|
2778
|
-
description: "Generate SSR entry, client, and App component"
|
|
2779
|
-
},
|
|
2780
|
-
{
|
|
2781
|
-
command: "cron <name>",
|
|
2782
|
-
description: "Generate a cron job file"
|
|
2783
|
-
},
|
|
2784
|
-
{
|
|
2785
|
-
command: "queue <name>",
|
|
2786
|
-
description: "Generate a queue consumer file"
|
|
2787
|
-
}
|
|
2788
|
-
],
|
|
2789
|
-
children: {
|
|
2790
|
-
model: {
|
|
2791
|
-
summary: "Generate a migration, CRUD routes, and database types.",
|
|
2792
|
-
usage: ["void gen model <name> [columns...]"],
|
|
2793
|
-
examples: [{
|
|
2794
|
-
command: "void gen model post title:string body:text",
|
|
2795
|
-
description: "Create a model"
|
|
2796
|
-
}]
|
|
2797
|
-
},
|
|
2798
|
-
migration: basicSubcommand("Generate an empty migration file.", "void gen migration <name>"),
|
|
2799
|
-
route: {
|
|
2800
|
-
summary: "Generate a route with handler exports.",
|
|
2801
|
-
usage: ["void gen route <path> [options]"],
|
|
2802
|
-
options: [{
|
|
2803
|
-
command: "--methods <list>",
|
|
2804
|
-
description: "Comma-separated methods (default: get)"
|
|
2805
|
-
}],
|
|
2806
|
-
examples: [{
|
|
2807
|
-
command: "void gen route api/posts --methods get,post",
|
|
2808
|
-
description: "Create a route"
|
|
2809
|
-
}]
|
|
2810
|
-
},
|
|
2811
|
-
middleware: basicSubcommand("Generate a numbered middleware file.", "void gen middleware <name>"),
|
|
2812
|
-
ssr: {
|
|
2813
|
-
summary: "Generate SSR entry, client, and App component.",
|
|
2814
|
-
usage: ["void gen ssr [options]"],
|
|
2815
|
-
options: [
|
|
2816
|
-
{
|
|
2817
|
-
command: "--react",
|
|
2818
|
-
description: "Use React"
|
|
2819
|
-
},
|
|
2820
|
-
{
|
|
2821
|
-
command: "--vue",
|
|
2822
|
-
description: "Use Vue"
|
|
2823
|
-
},
|
|
2824
|
-
{
|
|
2825
|
-
command: "--svelte",
|
|
2826
|
-
description: "Use Svelte"
|
|
2827
|
-
},
|
|
2828
|
-
{
|
|
2829
|
-
command: "--solid",
|
|
2830
|
-
description: "Use Solid"
|
|
2831
|
-
}
|
|
2832
|
-
]
|
|
2833
|
-
},
|
|
2834
|
-
cron: basicSubcommand("Generate a cron job file.", "void gen cron <name>"),
|
|
2835
|
-
queue: basicSubcommand("Generate a queue consumer file.", "void gen queue <name>")
|
|
2836
|
-
}
|
|
2837
|
-
},
|
|
2838
|
-
prepare: {
|
|
2839
|
-
summary: "Generate .void artifacts without starting Vite.",
|
|
2840
|
-
usage: ["void prepare"],
|
|
2841
|
-
examples: [{
|
|
2842
|
-
command: "void prepare",
|
|
2843
|
-
description: "Refresh generated project types"
|
|
2844
|
-
}]
|
|
2845
|
-
}
|
|
2846
|
-
};
|
|
2847
|
-
function basicSubcommand(summary, usage, example) {
|
|
2848
|
-
return {
|
|
2849
|
-
summary,
|
|
2850
|
-
usage: [usage],
|
|
2851
|
-
examples: example ? [{
|
|
2852
|
-
command: example,
|
|
2853
|
-
description: summary
|
|
2854
|
-
}] : void 0
|
|
2855
|
-
};
|
|
2856
|
-
}
|
|
2857
|
-
function withProjectOption(summary, usage) {
|
|
2858
|
-
return {
|
|
2859
|
-
summary,
|
|
2860
|
-
usage: [usage],
|
|
2861
|
-
options: [{
|
|
2862
|
-
command: "--project <name>",
|
|
2863
|
-
description: "Project name override"
|
|
2864
|
-
}]
|
|
2865
|
-
};
|
|
2866
|
-
}
|
|
2867
|
-
function lifecycleHelp(command, summary) {
|
|
2868
|
-
return {
|
|
2869
|
-
summary,
|
|
2870
|
-
usage: [`void platform ${command} [id] [--plan]${command === "disable" ? "" : " [--runtime <path>]"} [--yes]`],
|
|
2871
|
-
options: [
|
|
2872
|
-
{
|
|
2873
|
-
command: "--plan",
|
|
2874
|
-
description: "Print the exact plan without making changes"
|
|
2875
|
-
},
|
|
2876
|
-
...command === "disable" ? [] : [{
|
|
2877
|
-
command: "--runtime <path>",
|
|
2878
|
-
description: "Deploy an integrity-checked runtime directory instead of the package"
|
|
2879
|
-
}],
|
|
2880
|
-
{
|
|
2881
|
-
command: "--yes",
|
|
2882
|
-
description: "Acknowledge non-interactive Cloudflare changes"
|
|
2883
|
-
}
|
|
2884
|
-
]
|
|
2885
|
-
};
|
|
2886
|
-
}
|
|
2887
|
-
function printGlobalHelp() {
|
|
2888
|
-
printVoidHeader();
|
|
2889
|
-
note([
|
|
2890
|
-
globalCommandLine(["init"], "void init"),
|
|
2891
|
-
...globalOptionLines(["init"]),
|
|
2892
|
-
"",
|
|
2893
|
-
globalCommandLine(["connect"], "void connect [url]"),
|
|
2894
|
-
...globalOptionLines(["connect"]),
|
|
2895
|
-
"",
|
|
2896
|
-
globalCommandLine(["deploy"], "void deploy"),
|
|
2897
|
-
...globalOptionLines(["deploy"]),
|
|
2898
|
-
"",
|
|
2899
|
-
...globalCommandGroup("auth"),
|
|
2900
|
-
"",
|
|
2901
|
-
...globalCommandGroup("platform"),
|
|
2902
|
-
"",
|
|
2903
|
-
...globalCommandGroup("project"),
|
|
2904
|
-
"",
|
|
2905
|
-
categoryTitle("secrets"),
|
|
2906
|
-
...globalCommandLines("secret"),
|
|
2907
|
-
"",
|
|
2908
|
-
...globalCommandGroup("domain"),
|
|
2909
|
-
"",
|
|
2910
|
-
...globalCommandGroup("email"),
|
|
2911
|
-
"",
|
|
2912
|
-
...globalCommandGroup("github"),
|
|
2913
|
-
"",
|
|
2914
|
-
...globalCommandGroup("build"),
|
|
2915
|
-
"",
|
|
2916
|
-
categoryTitle("database"),
|
|
2917
|
-
...globalCommandLines("db", {
|
|
2918
|
-
execute: "execute <sql>",
|
|
2919
|
-
export: "export [--output <path>]",
|
|
2920
|
-
seed: "seed [--file <path>]"
|
|
2921
|
-
}),
|
|
2922
|
-
...globalOptionLines(["db", "execute"]),
|
|
2923
|
-
...globalOptionLines(["db", "export"]),
|
|
2924
|
-
"",
|
|
2925
|
-
...globalCommandGroup("env"),
|
|
2926
|
-
...globalOptionLines(["env", "check"]),
|
|
2927
|
-
"",
|
|
2928
|
-
categoryTitle("codegen"),
|
|
2929
|
-
globalCommandLine(["prepare"], "void prepare"),
|
|
2930
|
-
...globalCommandLines("gen", { route: "route <path> [--methods]" }),
|
|
2931
|
-
"",
|
|
2932
|
-
categoryTitle("agent"),
|
|
2933
|
-
helpLine("void init --agents", requiredOption(["init"], "--agents").description),
|
|
2934
|
-
"",
|
|
2935
|
-
categoryTitle("help"),
|
|
2936
|
-
helpLine("void help <command>", "Show command-specific help"),
|
|
2937
|
-
helpLine("void <command> --help", "Show command-specific help")
|
|
2938
|
-
].join("\n"), sectionTitle("Commands"));
|
|
2939
|
-
note([helpLine("VOID_TOKEN", "Auth token (or use `void auth login`)"), helpLine("VOID_PROJECT", "Deploy target project name override")].join("\n"), sectionTitle("Environment"));
|
|
2940
|
-
outro("https://void.cloud");
|
|
2941
|
-
}
|
|
2942
|
-
function printVoidHeader() {
|
|
2943
|
-
const version = JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf-8")).version;
|
|
2944
|
-
const art = asciiArts[Math.floor(Math.random() * asciiArts.length)];
|
|
2945
|
-
console.log(import_picocolors.default.blue(`${art} v${version}\n`));
|
|
2946
|
-
}
|
|
2947
|
-
function getHelpPath(args) {
|
|
2948
|
-
if (args.length === 0) return null;
|
|
2949
|
-
const command = args[0];
|
|
2950
|
-
if (command === "help") return args.slice(1);
|
|
2951
|
-
if (command === "--help" || command === "-h") return [];
|
|
2952
|
-
if (args[1] === "help") return [command, ...args.slice(2)];
|
|
2953
|
-
const helpIndex = args.findIndex((arg) => arg === "--help" || arg === "-h");
|
|
2954
|
-
if (helpIndex === -1) return null;
|
|
2955
|
-
return getKnownHelpPrefix(args.slice(0, helpIndex));
|
|
2956
|
-
}
|
|
2957
|
-
function printHelpPage(path) {
|
|
2958
|
-
const page = findHelpPage(path);
|
|
2959
|
-
if (!page) throw new Error(`Unknown help topic: ${formatHelpPath(path)}`);
|
|
2960
|
-
const lines = [
|
|
2961
|
-
page.summary,
|
|
2962
|
-
"",
|
|
2963
|
-
categoryTitle("Usage"),
|
|
2964
|
-
...page.usage.map((usage) => ` ${usage}`)
|
|
2965
|
-
];
|
|
2966
|
-
appendHelpSection(lines, "Commands", page.commands);
|
|
2967
|
-
appendHelpSection(lines, "Options", page.options);
|
|
2968
|
-
appendHelpSection(lines, "Examples", page.examples);
|
|
2969
|
-
if (page.commands) lines.push("", `Run \`void help ${path.join(" ")} <command>\` for command-specific help.`);
|
|
2970
|
-
note(lines.join("\n"), sectionTitle(`void ${path.join(" ")}`));
|
|
2971
|
-
}
|
|
2972
|
-
function appendHelpSection(lines, title, entries) {
|
|
2973
|
-
if (!entries || entries.length === 0) return;
|
|
2974
|
-
lines.push("", categoryTitle(title));
|
|
2975
|
-
for (const entry of entries) lines.push(helpLine(entry.command, entry.description));
|
|
2976
|
-
}
|
|
2977
|
-
function globalCommandGroup(group) {
|
|
2978
|
-
return [categoryTitle(group), ...globalCommandLines(group)];
|
|
2979
|
-
}
|
|
2980
|
-
function globalCommandLines(group, commandOverrides) {
|
|
2981
|
-
return (requiredPage([group]).commands ?? []).map((command) => helpLine(`void ${group} ${commandOverrides?.[command.command.split(" ")[0]] ?? command.command}`, command.description));
|
|
2982
|
-
}
|
|
2983
|
-
function globalCommandLine(path, command) {
|
|
2984
|
-
return helpLine(command, formatGlobalDescription(requiredPage(path).summary));
|
|
2985
|
-
}
|
|
2986
|
-
function globalOptionLines(path) {
|
|
2987
|
-
return (requiredPage(path).options ?? []).map((option) => helpLine(` ${option.command}`, option.description));
|
|
2988
|
-
}
|
|
2989
|
-
function requiredOption(path, command) {
|
|
2990
|
-
const option = requiredPage(path).options?.find((entry) => entry.command === command);
|
|
2991
|
-
if (!option) throw new Error(`Missing help option: ${formatHelpPath(path)} ${command}`);
|
|
2992
|
-
return option;
|
|
2993
|
-
}
|
|
2994
|
-
function requiredPage(path) {
|
|
2995
|
-
const page = findHelpPage(path);
|
|
2996
|
-
if (!page) throw new Error(`Missing help page: ${formatHelpPath(path)}`);
|
|
2997
|
-
return page;
|
|
2998
|
-
}
|
|
2999
|
-
function formatGlobalDescription(summary) {
|
|
3000
|
-
return summary.replace(/\.$/, "");
|
|
3001
|
-
}
|
|
3002
|
-
function findHelpPage(path) {
|
|
3003
|
-
let tree = HELP_TREE;
|
|
3004
|
-
let page = null;
|
|
3005
|
-
for (const part of path) {
|
|
3006
|
-
const node = tree?.[part];
|
|
3007
|
-
if (!node) return null;
|
|
3008
|
-
page = node;
|
|
3009
|
-
tree = node.children;
|
|
3010
|
-
}
|
|
3011
|
-
return page;
|
|
3012
|
-
}
|
|
3013
|
-
function getKnownHelpPrefix(args) {
|
|
3014
|
-
let tree = HELP_TREE;
|
|
3015
|
-
const path = [];
|
|
3016
|
-
for (const arg of args) {
|
|
3017
|
-
if (arg.startsWith("-")) break;
|
|
3018
|
-
const node = tree?.[arg];
|
|
3019
|
-
if (!node) {
|
|
3020
|
-
if (path.length === 0) return [arg];
|
|
3021
|
-
if (tree) return [...path, arg];
|
|
3022
|
-
break;
|
|
3023
|
-
}
|
|
3024
|
-
path.push(arg);
|
|
3025
|
-
tree = node.children;
|
|
3026
|
-
}
|
|
3027
|
-
return path;
|
|
3028
|
-
}
|
|
3029
|
-
function formatHelpPath(path) {
|
|
3030
|
-
return path.length === 0 ? "help" : path.join(" ");
|
|
3031
1220
|
}
|
|
3032
1221
|
//#endregion
|
|
3033
1222
|
//#region src/cli/platform-args.ts
|
|
3034
1223
|
const platformSubcommands = [
|
|
1224
|
+
{
|
|
1225
|
+
name: "config",
|
|
1226
|
+
hint: "Configure authentication",
|
|
1227
|
+
description: "Configure login methods, company protection, or provider recovery"
|
|
1228
|
+
},
|
|
3035
1229
|
...operatorGroups.map((name) => ({
|
|
3036
1230
|
name,
|
|
3037
|
-
hint: "Operator commands",
|
|
1231
|
+
hint: name === "email" ? "Domains, policy, limits, outcomes, and recovery" : "Operator commands",
|
|
3038
1232
|
description: `Administer platform ${name}`
|
|
3039
1233
|
})),
|
|
3040
1234
|
{
|
|
@@ -3150,6 +1344,7 @@ function parsePlatformArgs(args) {
|
|
|
3150
1344
|
"--timeout"
|
|
3151
1345
|
].includes(args[0] ?? "")) return parseOperatorArgs(args);
|
|
3152
1346
|
const [subcommand, ...rest] = args;
|
|
1347
|
+
if (subcommand === "config") return parsePlatformConfigArgs(rest);
|
|
3153
1348
|
if (subcommand === "domain") {
|
|
3154
1349
|
if (rest.length === 0) return {
|
|
3155
1350
|
subcommand,
|
|
@@ -3270,6 +1465,7 @@ function parsePlatformArgs(args) {
|
|
|
3270
1465
|
let yes = false;
|
|
3271
1466
|
const valueFlags = /* @__PURE__ */ new Set([
|
|
3272
1467
|
"--account",
|
|
1468
|
+
"--auth-config",
|
|
3273
1469
|
"--application-domain",
|
|
3274
1470
|
"--control-plane-domain",
|
|
3275
1471
|
"--display-name",
|
|
@@ -3295,6 +1491,7 @@ function parsePlatformArgs(args) {
|
|
|
3295
1491
|
return {
|
|
3296
1492
|
subcommand,
|
|
3297
1493
|
...workersDev ? { workersDev: true } : {},
|
|
1494
|
+
...values.has("--auth-config") ? { authConfig: values.get("--auth-config") } : {},
|
|
3298
1495
|
account: values.get("--account") ?? "",
|
|
3299
1496
|
applicationDomain: values.get("--application-domain") ?? "",
|
|
3300
1497
|
controlPlaneDomain: values.get("--control-plane-domain") ?? "",
|
|
@@ -3308,7 +1505,7 @@ function parsePlatformArgs(args) {
|
|
|
3308
1505
|
zone: values.get("--zone") ?? ""
|
|
3309
1506
|
};
|
|
3310
1507
|
}
|
|
3311
|
-
throw new Error("platform: Usage: void platform <auth|user|project|deployment|build|signup|invitation|system|worker|list|use|status|discover|install|domain|upgrade|rollback|repair|disable|enable|uninstall>.");
|
|
1508
|
+
throw new Error("platform: Usage: void platform <config|auth|user|project|deployment|build|signup|invitation|email|system|worker|list|use|status|discover|install|domain|upgrade|rollback|repair|disable|enable|uninstall>.");
|
|
3312
1509
|
}
|
|
3313
1510
|
//#endregion
|
|
3314
1511
|
//#region src/cli/prepare-args.ts
|
|
@@ -3333,6 +1530,11 @@ const LOG_LEVELS = /* @__PURE__ */ new Set([
|
|
|
3333
1530
|
"all"
|
|
3334
1531
|
]);
|
|
3335
1532
|
const STATUS_FILTER = /^([1-5]xx|[1-5]\d{2}|all)$/;
|
|
1533
|
+
const TEAM_ROLES = /* @__PURE__ */ new Set([
|
|
1534
|
+
"reader",
|
|
1535
|
+
"collaborator",
|
|
1536
|
+
"admin"
|
|
1537
|
+
]);
|
|
3336
1538
|
const projectSubcommands = [
|
|
3337
1539
|
{
|
|
3338
1540
|
name: "status",
|
|
@@ -3348,6 +1550,16 @@ const projectSubcommands = [
|
|
|
3348
1550
|
name: "list",
|
|
3349
1551
|
description: "List your projects"
|
|
3350
1552
|
},
|
|
1553
|
+
{
|
|
1554
|
+
name: "token",
|
|
1555
|
+
arg: "<create|list|renew|revoke>",
|
|
1556
|
+
description: "Manage project-scoped CI deploy credentials"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: "team",
|
|
1560
|
+
hint: "list | invite | invitations | role | remove | revoke | leave | pending | accept | decline",
|
|
1561
|
+
description: "Manage project members and invitations"
|
|
1562
|
+
},
|
|
3351
1563
|
{
|
|
3352
1564
|
name: "logs",
|
|
3353
1565
|
description: "Show runtime logs from the deployed project"
|
|
@@ -3400,6 +1612,46 @@ function parseProjectArgs(args) {
|
|
|
3400
1612
|
if (rest.length > 0) throw new Error(`project: Unexpected argument '${rest[0]}'.`);
|
|
3401
1613
|
return { subcommand };
|
|
3402
1614
|
}
|
|
1615
|
+
if (subcommand === "token") {
|
|
1616
|
+
const action = rest.shift();
|
|
1617
|
+
if (!action || ![
|
|
1618
|
+
"create",
|
|
1619
|
+
"list",
|
|
1620
|
+
"renew",
|
|
1621
|
+
"revoke"
|
|
1622
|
+
].includes(action)) throw new Error("project: Usage: void project token <create|list|renew|revoke>.");
|
|
1623
|
+
let credentialId = "";
|
|
1624
|
+
let projectSlug = "";
|
|
1625
|
+
let name = "";
|
|
1626
|
+
let expiresInDays;
|
|
1627
|
+
let json = false;
|
|
1628
|
+
for (let index = 0; index < rest.length; index++) {
|
|
1629
|
+
const value = rest[index];
|
|
1630
|
+
if (value === "--project" && rest[index + 1]) projectSlug = rest[++index];
|
|
1631
|
+
else if (value === "--name" && rest[index + 1]) name = rest[++index];
|
|
1632
|
+
else if (value === "--expires-in" && rest[index + 1]) {
|
|
1633
|
+
const parsed = Number(rest[++index]);
|
|
1634
|
+
if (!Number.isInteger(parsed) || parsed < 1 || parsed > 90) throw new Error("project: --expires-in must be an integer from 1 to 90 days.");
|
|
1635
|
+
expiresInDays = parsed;
|
|
1636
|
+
} else if (value === "--json") json = true;
|
|
1637
|
+
else if (value.startsWith("-")) throw new Error(`project: Unknown flag '${value}'.`);
|
|
1638
|
+
else if ((action === "renew" || action === "revoke") && !credentialId) credentialId = value;
|
|
1639
|
+
else throw new Error(`project: Unexpected argument '${value}'.`);
|
|
1640
|
+
}
|
|
1641
|
+
if ((action === "renew" || action === "revoke") && !credentialId) throw new Error(`project: ${action} requires a credential ID.`);
|
|
1642
|
+
if (action !== "create" && name) throw new Error("project: --name is only valid with token create.");
|
|
1643
|
+
if (action !== "create" && action !== "renew" && expiresInDays !== void 0) throw new Error("project: --expires-in is only valid with token create or token renew.");
|
|
1644
|
+
return {
|
|
1645
|
+
subcommand,
|
|
1646
|
+
action,
|
|
1647
|
+
credentialId,
|
|
1648
|
+
projectSlug,
|
|
1649
|
+
name,
|
|
1650
|
+
expiresInDays,
|
|
1651
|
+
json
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
if (subcommand === "team") return parseTeamArgs(rest);
|
|
3403
1655
|
if (subcommand === "logs") {
|
|
3404
1656
|
let filter = "";
|
|
3405
1657
|
let range = "1h";
|
|
@@ -3476,7 +1728,105 @@ function parseProjectArgs(args) {
|
|
|
3476
1728
|
projectSlug
|
|
3477
1729
|
};
|
|
3478
1730
|
}
|
|
3479
|
-
throw new Error("project: Usage: void project <status|link|list|logs|requests|rollback|cancel|delete|purge-cache>.");
|
|
1731
|
+
throw new Error("project: Usage: void project <status|link|list|team|token|logs|requests|rollback|cancel|delete|purge-cache>.");
|
|
1732
|
+
}
|
|
1733
|
+
function parseTeamArgs(rest) {
|
|
1734
|
+
const [action, ...args] = rest;
|
|
1735
|
+
const usage = "project: Usage: void project team <list|invite|invitations|role|remove|revoke|leave|pending|accept|decline>.";
|
|
1736
|
+
if (!action) return {
|
|
1737
|
+
subcommand: "team",
|
|
1738
|
+
action: ""
|
|
1739
|
+
};
|
|
1740
|
+
const positionals = [];
|
|
1741
|
+
let projectSlug = "";
|
|
1742
|
+
let role = "";
|
|
1743
|
+
for (let index = 0; index < args.length; index++) {
|
|
1744
|
+
const arg = args[index];
|
|
1745
|
+
if (arg === "--project" || arg === "--role") {
|
|
1746
|
+
const value = args[++index];
|
|
1747
|
+
if (!value || value.startsWith("-")) throw new Error(`project: ${arg} requires a value.`);
|
|
1748
|
+
if (arg === "--project") {
|
|
1749
|
+
if (projectSlug) throw new Error("project: Duplicate flag '--project'.");
|
|
1750
|
+
projectSlug = value;
|
|
1751
|
+
} else {
|
|
1752
|
+
if (role) throw new Error("project: Duplicate flag '--role'.");
|
|
1753
|
+
role = value;
|
|
1754
|
+
}
|
|
1755
|
+
} else if (arg.startsWith("-")) throw new Error(`project: Unknown flag '${arg}'.`);
|
|
1756
|
+
else positionals.push(arg);
|
|
1757
|
+
}
|
|
1758
|
+
if (role && !TEAM_ROLES.has(role)) throw new Error(`project: Invalid role '${role}'. Use one of reader|collaborator|admin.`);
|
|
1759
|
+
if ([
|
|
1760
|
+
"pending",
|
|
1761
|
+
"accept",
|
|
1762
|
+
"decline"
|
|
1763
|
+
].includes(action) && projectSlug) throw new Error(`project: --project is not used with team ${action}.`);
|
|
1764
|
+
if (action === "list" || action === "invitations" || action === "leave") {
|
|
1765
|
+
if (positionals.length || role) throw new Error(`project: Usage: void project team ${action} [--project <slug>].`);
|
|
1766
|
+
return {
|
|
1767
|
+
subcommand: "team",
|
|
1768
|
+
action,
|
|
1769
|
+
projectSlug
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
if (action === "invite") {
|
|
1773
|
+
if (positionals.length !== 1 || !role) throw new Error("project: Usage: void project team invite <registered-email> --role <reader|collaborator|admin> [--project <slug>].");
|
|
1774
|
+
const email = positionals[0];
|
|
1775
|
+
if (email.length > 320 || !/^[^\s@]+@[^\s@]+$/.test(email)) throw new Error("project: Invitee must be a registered email address.");
|
|
1776
|
+
return {
|
|
1777
|
+
subcommand: "team",
|
|
1778
|
+
action,
|
|
1779
|
+
email,
|
|
1780
|
+
role,
|
|
1781
|
+
projectSlug
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
if (action === "role") {
|
|
1785
|
+
if (positionals.length !== 2 || role) throw new Error("project: Usage: void project team role <user-id> <reader|collaborator|admin> [--project <slug>].");
|
|
1786
|
+
const nextRole = positionals[1];
|
|
1787
|
+
if (!TEAM_ROLES.has(nextRole)) throw new Error(`project: Invalid role '${nextRole}'. Use one of reader|collaborator|admin.`);
|
|
1788
|
+
return {
|
|
1789
|
+
subcommand: "team",
|
|
1790
|
+
action,
|
|
1791
|
+
userId: positionals[0],
|
|
1792
|
+
role: nextRole,
|
|
1793
|
+
projectSlug
|
|
1794
|
+
};
|
|
1795
|
+
}
|
|
1796
|
+
if (action === "remove") {
|
|
1797
|
+
if (positionals.length !== 1 || role) throw new Error("project: Usage: void project team remove <user-id> [--project <slug>].");
|
|
1798
|
+
return {
|
|
1799
|
+
subcommand: "team",
|
|
1800
|
+
action,
|
|
1801
|
+
userId: positionals[0],
|
|
1802
|
+
projectSlug
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1805
|
+
if (action === "revoke") {
|
|
1806
|
+
if (positionals.length !== 1 || role) throw new Error("project: Usage: void project team revoke <invitation-id> [--project <slug>].");
|
|
1807
|
+
return {
|
|
1808
|
+
subcommand: "team",
|
|
1809
|
+
action,
|
|
1810
|
+
invitationId: positionals[0],
|
|
1811
|
+
projectSlug
|
|
1812
|
+
};
|
|
1813
|
+
}
|
|
1814
|
+
if (action === "pending") {
|
|
1815
|
+
if (positionals.length || role) throw new Error("project: Usage: void project team pending.");
|
|
1816
|
+
return {
|
|
1817
|
+
subcommand: "team",
|
|
1818
|
+
action
|
|
1819
|
+
};
|
|
1820
|
+
}
|
|
1821
|
+
if (action === "accept" || action === "decline") {
|
|
1822
|
+
if (positionals.length !== 1 || role) throw new Error(`project: Usage: void project team ${action} <invitation-id>.`);
|
|
1823
|
+
return {
|
|
1824
|
+
subcommand: "team",
|
|
1825
|
+
action,
|
|
1826
|
+
invitationId: positionals[0]
|
|
1827
|
+
};
|
|
1828
|
+
}
|
|
1829
|
+
throw new Error(usage);
|
|
3480
1830
|
}
|
|
3481
1831
|
//#endregion
|
|
3482
1832
|
//#region src/cli/secret-args.ts
|
|
@@ -3580,7 +1930,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
3580
1930
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
3581
1931
|
try {
|
|
3582
1932
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
3583
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1933
|
+
const { promptSubcommand } = await import("../subcommand-prompt-Bmyn5Rlc.mjs");
|
|
3584
1934
|
const result = await promptSubcommand(command, subcommands);
|
|
3585
1935
|
if (!result) process.exit(0);
|
|
3586
1936
|
await run(root, parse(buildArgs(result, args.slice(1))));
|
|
@@ -3619,7 +1969,7 @@ if (helpPath) {
|
|
|
3619
1969
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
3620
1970
|
process.exit(1);
|
|
3621
1971
|
}
|
|
3622
|
-
import("../deploy-
|
|
1972
|
+
import("../deploy-DTaWUS1S.mjs").then((n) => n.n).then(({ runDeploy }) => {
|
|
3623
1973
|
runDeploy(root, {
|
|
3624
1974
|
projectSlug: deployArgs.projectSlug,
|
|
3625
1975
|
dir: deployArgs.dir,
|
|
@@ -3637,24 +1987,24 @@ if (helpPath) {
|
|
|
3637
1987
|
});
|
|
3638
1988
|
} else if (command === "connect") (async () => {
|
|
3639
1989
|
const parsed = parseConnectArgs(args.slice(1));
|
|
3640
|
-
const { runConnectCommand } = await import("../connect-
|
|
1990
|
+
const { runConnectCommand } = await import("../connect-Bfk31O_8.mjs");
|
|
3641
1991
|
await runConnectCommand(process.cwd(), parsed);
|
|
3642
1992
|
})().catch((err) => {
|
|
3643
1993
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
3644
1994
|
process.exit(1);
|
|
3645
1995
|
});
|
|
3646
|
-
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-
|
|
3647
|
-
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
3648
|
-
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
3649
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
3650
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
3651
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
3652
|
-
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
3653
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
3654
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
3655
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
3656
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
3657
|
-
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1996
|
+
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-cmd-gniL2fNt.mjs").then(({ runAuthCommand }) => runAuthCommand(root, parsed)));
|
|
1997
|
+
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-BFhieCdV.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed)));
|
|
1998
|
+
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-4RPGN3KB.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed)));
|
|
1999
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DmZK9Hxf.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
2000
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-Bzzi2e9E.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
2001
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-1RhhOVrC.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
2002
|
+
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-C-lGh51B.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed)));
|
|
2003
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-BkRoptAt.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
2004
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-DJHsPE7Z.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
2005
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-B_wPnVTK.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
2006
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-PW7ZnWTp.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
2007
|
+
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-sI18tX_O.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
3658
2008
|
else if (command === "prepare") {
|
|
3659
2009
|
const root = process.cwd();
|
|
3660
2010
|
let prepareArgs;
|
|
@@ -3664,7 +2014,7 @@ else if (command === "prepare") {
|
|
|
3664
2014
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
3665
2015
|
process.exit(1);
|
|
3666
2016
|
}
|
|
3667
|
-
import("../prepare-
|
|
2017
|
+
import("../prepare-blNRQvQl.mjs").then(({ runPrepareCommand }) => {
|
|
3668
2018
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
3669
2019
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
3670
2020
|
process.exit(1);
|
|
@@ -3672,7 +2022,7 @@ else if (command === "prepare") {
|
|
|
3672
2022
|
});
|
|
3673
2023
|
} else if (command === "init") {
|
|
3674
2024
|
const root = process.cwd();
|
|
3675
|
-
import("../init-
|
|
2025
|
+
import("../init-BWZ7q5Z4.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
3676
2026
|
let initArgs;
|
|
3677
2027
|
try {
|
|
3678
2028
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -3709,11 +2059,11 @@ else if (command === "prepare") {
|
|
|
3709
2059
|
{
|
|
3710
2060
|
name: "auth",
|
|
3711
2061
|
hint: "login | logout | whoami | token",
|
|
3712
|
-
description: "Login, logout, and token management"
|
|
2062
|
+
description: "Login, account linking, logout, and token management"
|
|
3713
2063
|
},
|
|
3714
2064
|
{
|
|
3715
2065
|
name: "platform",
|
|
3716
|
-
hint: "auth | user | project | deployment | signup | system | install",
|
|
2066
|
+
hint: "auth | user | project | deployment | signup | email | system | install",
|
|
3717
2067
|
description: "Install platforms and administer users, projects, access, and operations"
|
|
3718
2068
|
},
|
|
3719
2069
|
{
|
|
@@ -3723,8 +2073,8 @@ else if (command === "prepare") {
|
|
|
3723
2073
|
},
|
|
3724
2074
|
{
|
|
3725
2075
|
name: "project",
|
|
3726
|
-
hint: "status | link | list | logs | requests | rollback | cancel | delete | purge-cache",
|
|
3727
|
-
description: "Manage projects and
|
|
2076
|
+
hint: "status | link | list | team | token | logs | requests | rollback | cancel | delete | purge-cache",
|
|
2077
|
+
description: "Manage projects, teams, deployments, and scoped CI credentials"
|
|
3728
2078
|
},
|
|
3729
2079
|
{
|
|
3730
2080
|
name: "secret",
|
|
@@ -3777,41 +2127,41 @@ else if (command === "prepare") {
|
|
|
3777
2127
|
];
|
|
3778
2128
|
(async () => {
|
|
3779
2129
|
printVoidHeader();
|
|
3780
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
2130
|
+
const { promptSubcommand } = await import("../subcommand-prompt-Bmyn5Rlc.mjs");
|
|
3781
2131
|
const result = await promptSubcommand("", topLevelCommands);
|
|
3782
2132
|
if (!result) process.exit(0);
|
|
3783
2133
|
const cmd = result.subcommand;
|
|
3784
2134
|
const root = process.cwd();
|
|
3785
2135
|
switch (cmd) {
|
|
3786
2136
|
case "connect": {
|
|
3787
|
-
const { runConnectCommand } = await import("../connect-
|
|
2137
|
+
const { runConnectCommand } = await import("../connect-Bfk31O_8.mjs");
|
|
3788
2138
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
3789
2139
|
return;
|
|
3790
2140
|
}
|
|
3791
2141
|
case "init": {
|
|
3792
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
2142
|
+
const { runInitCommand, parseInitArgs } = await import("../init-BWZ7q5Z4.mjs");
|
|
3793
2143
|
await runInitCommand(root, parseInitArgs([]));
|
|
3794
2144
|
return;
|
|
3795
2145
|
}
|
|
3796
2146
|
case "deploy": {
|
|
3797
|
-
const { runDeploy } = await import("../deploy-
|
|
2147
|
+
const { runDeploy } = await import("../deploy-DTaWUS1S.mjs").then((n) => n.n);
|
|
3798
2148
|
await runDeploy(root);
|
|
3799
2149
|
return;
|
|
3800
2150
|
}
|
|
3801
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-
|
|
3802
|
-
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-
|
|
3803
|
-
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-
|
|
3804
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
3805
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
3806
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
3807
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-
|
|
3808
|
-
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-
|
|
3809
|
-
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-
|
|
3810
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
3811
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
3812
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
2151
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-cmd-gniL2fNt.mjs").then(({ runAuthCommand }) => runAuthCommand(r, p)));
|
|
2152
|
+
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-BFhieCdV.mjs").then(({ runPlatformCommand }) => runPlatformCommand(r, p)));
|
|
2153
|
+
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-4RPGN3KB.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(r, p)));
|
|
2154
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DmZK9Hxf.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
2155
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-Bzzi2e9E.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
2156
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-1RhhOVrC.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
2157
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-PW7ZnWTp.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
2158
|
+
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-sI18tX_O.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
2159
|
+
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-C-lGh51B.mjs").then(({ runEmailCommand }) => runEmailCommand(r, p)));
|
|
2160
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-BkRoptAt.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
2161
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-DJHsPE7Z.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
2162
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-B_wPnVTK.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
3813
2163
|
case "prepare": {
|
|
3814
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
2164
|
+
const { runPrepareCommand } = await import("../prepare-blNRQvQl.mjs");
|
|
3815
2165
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
3816
2166
|
return;
|
|
3817
2167
|
}
|
|
@@ -3825,4 +2175,4 @@ else if (command === "prepare") {
|
|
|
3825
2175
|
});
|
|
3826
2176
|
} else printGlobalHelp();
|
|
3827
2177
|
//#endregion
|
|
3828
|
-
export {
|
|
2178
|
+
export {};
|