void 0.23.0 → 0.24.0
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/AGENTS_TEMPLATE.md +1 -1
- package/dist/{account-cmd-C84Ee8cO.mjs → account-cmd-vJhh5lrb.mjs} +5 -5
- package/dist/{auth-CSkdO2Bb.mjs → auth-CQkSDS50.mjs} +22 -49
- package/dist/auth-DX3JURcX.mjs +2 -0
- package/dist/{auth-link-CioEg6uY.mjs → auth-link-D75t9wO2.mjs} +5 -5
- package/dist/{auth-router-BsR981d4.mjs → auth-router-ClfhL1J7.mjs} +7 -7
- package/dist/{build-cmd-LzvNJORH.mjs → build-cmd-zMi1iFnS.mjs} +6 -6
- package/dist/{cache-C4MvnrMH.mjs → cache-ZtQmyxVV.mjs} +5 -5
- package/dist/{cancel-deploy-abUxpP2n.mjs → cancel-deploy-Box0kkEV.mjs} +5 -5
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-BGe5sWXF.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/cli/cli.mjs +47 -44
- package/dist/cli/cloudflare-operation-process.mjs +14 -5
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-B9UBI03V.mjs +2 -0
- package/dist/{client-RV8NVeB8.mjs → client-DKAsFA4X.mjs} +33 -15
- package/dist/{cloudflare-cmd-BcrVyTmJ.mjs → cloudflare-cmd-CmY8dGkd.mjs} +1 -1
- package/dist/{cloudflare-connect-B8uPZ4nx.mjs → cloudflare-connect-IiR3ZieC.mjs} +1 -1
- package/dist/{cloudflare-operations-AiWashgg.mjs → cloudflare-operations-BCdXSsmo.mjs} +1 -1
- package/dist/{cloudflare-operations-fxHb-byx.mjs → cloudflare-operations-DzH-A966.mjs} +1 -1
- package/dist/{connect-Bd4kJd9U.mjs → connect-B-usTnlF.mjs} +9 -9
- package/dist/{create-project-bMf6ffLZ.mjs → create-project-CYOOAYcn.mjs} +12 -12
- package/dist/{create-project-Boczwj5r.mjs → create-project-FWbf5Olo.mjs} +1 -1
- package/dist/{db-8uG64XLl.mjs → db-Ck2eZ2iB.mjs} +15 -15
- package/dist/{delete-NvbiyeJf.mjs → delete-sK56qtzZ.mjs} +5 -5
- package/dist/{deploy-DzAIwqNU.mjs → deploy-gCVaiJbS.mjs} +86 -44
- package/dist/{deploy-bjXdFCtn.mjs → deploy-irP5q0-x.mjs} +1 -1
- package/dist/{domain-y5Tvydvo.mjs → domain-DFfQE8jg.mjs} +6 -6
- package/dist/{email-B3umsW75.mjs → email-CdnhUHvJ.mjs} +7 -7
- package/dist/{env-BS6qYHDb.mjs → env-DmGdHi5i.mjs} +8 -8
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-BPn7vk-V.mjs → env-validation-C_8tPdhs.mjs} +2 -2
- package/dist/{env-validation-DbTg7-ar.mjs → env-validation-zZOCcQVZ.mjs} +1 -1
- package/dist/{gen-B580--vC.mjs → gen-CshAkukR.mjs} +2 -2
- package/dist/gen-DvQTWzDU.mjs +2 -0
- package/dist/{github-cmd-v45BdfKX.mjs → github-cmd-DftuEvIt.mjs} +13 -13
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/{help-daGKjXGk.mjs → help-Dotbf6iz.mjs} +8 -4
- package/dist/help-mabuIV98.mjs +2 -0
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.mjs +16 -20
- package/dist/{init-Bvy7zrBo.mjs → init-BTQEZZGJ.mjs} +25 -22
- package/dist/{link-CDqqCjFl.mjs → link-B46sYH0K.mjs} +6 -6
- package/dist/{list-CZj0dzKY.mjs → list-BnPrIsU_.mjs} +6 -6
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/{login-UZKFM_u7.mjs → login-BuiMyUrx.mjs} +8 -8
- package/dist/login-DIy9Sb-U.mjs +2 -0
- package/dist/{logs-CUZ6t9t3.mjs → logs-CZG9d-ic.mjs} +10 -11
- package/dist/migrate-BCiJ8w0f.mjs +2 -0
- package/dist/{migrate-DHul7PRV.mjs → migrate-q4_njtaW.mjs} +2 -2
- package/dist/{operator-args-CLgKGlwU.mjs → operator-args-B3BTmSoi.mjs} +12 -5
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-7erYc6Lt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-CpHjTd0t.mjs} +3 -3
- package/dist/{operator-cmd-DBA6dl0m.mjs → operator-cmd-DGqPJUD3.mjs} +6 -6
- package/dist/{output-Dm_A4Tbv.mjs → output-CbM85T4k.mjs} +18 -10
- package/dist/pages/index.mjs +1 -1
- package/dist/{platform-args-BJdRtlLq.mjs → platform-args-3k8X9-H_.mjs} +11 -3
- package/dist/platform-args-DdnM6WIf.mjs +2 -0
- package/dist/{platform-auth-config-B56E9YP1.mjs → platform-auth-config-DDrxUy4m.mjs} +6 -6
- package/dist/{platform-auth-protection-BDWO_aER.mjs → platform-auth-protection-BLadnnct.mjs} +8 -8
- package/dist/{platform-auth-recovery-1gg4CSRe.mjs → platform-auth-recovery-CmCzX2Fl.mjs} +6 -6
- package/dist/{platform-cmd-DMcQStSc.mjs → platform-cmd-DMDEc9uS.mjs} +10 -10
- package/dist/{platform-cmd-Bt-1w6pY.mjs → platform-cmd-pMTRhvYs.mjs} +1 -1
- package/dist/{platform-domain-BNkcz0OB.mjs → platform-domain-Di6EYrQl.mjs} +5 -5
- package/dist/{platform-lifecycle-9OyBALhH.mjs → platform-lifecycle-BBoNzojY.mjs} +1264 -407
- package/dist/{platform-lifecycle-BE6C_jxh.mjs → platform-lifecycle-BFdSi9Qt.mjs} +1 -1
- package/dist/{platform-management-CjwLVQwN.mjs → platform-management-CWOQOWXm.mjs} +5 -5
- package/dist/{platform-management-CnyTdcWX.mjs → platform-management-DG47jys8.mjs} +1 -1
- package/dist/{platform-plans-config-BNGKGr4P.mjs → platform-plans-config-Vl9BP3H4.mjs} +3 -3
- package/dist/{platform-recovery-D6KSpuFm.mjs → platform-recovery-BJnQJEtQ.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-DkPPXfp_.mjs} +2 -2
- package/dist/{prepare-B5Mkic5u.mjs → prepare-CBLT3CHH.mjs} +3 -3
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-DOsL0CC9.mjs → prepare-DnaKBi--.mjs} +1 -1
- package/dist/{project-C0Fqu05O.mjs → project-DKG5Ra8p.mjs} +15 -82
- package/dist/project-DsblYifa.mjs +2 -0
- package/dist/{project-cmd-CNzrqvBv.mjs → project-cmd-DxnXstAq.mjs} +19 -19
- package/dist/{project-team-DQOWPfQT.mjs → project-team-BmHcaALJ.mjs} +5 -5
- package/dist/{project-token-CTDYU0Cc.mjs → project-token-GionZlBI.mjs} +5 -5
- package/dist/{project-zero-trust-BNAkW-_0.mjs → project-zero-trust-JLCjVQA7.mjs} +5 -5
- package/dist/prompts-2TGE6oXx.mjs +2 -0
- package/dist/prompts-BNUoTiaf.mjs +2044 -0
- package/dist/{provision-C4ORE7G7.mjs → provision-CVku1JFU.mjs} +1 -1
- package/dist/{provision-CJFgTZY8.mjs → provision-CaoxO_U7.mjs} +1 -1
- package/dist/{requests-MhxYnau8.mjs → requests-BOjIVAeF.mjs} +5 -5
- package/dist/{rollback-CJ6iSDoU.mjs → rollback-CwR3pLj3.mjs} +6 -6
- package/dist/runtime/ai.mjs +3 -5
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +1 -1
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/{secret-Dli5fP0B.mjs → secret-ByWJWBUG.mjs} +7 -7
- package/dist/{skills-D1II1Juz.mjs → skills-C1PlclPt.mjs} +1 -1
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-klFCfcor.mjs} +40 -32
- package/package.json +8 -9
- package/skills/void/SKILL.md +6 -1
- package/skills/void/docs/guide/deployment.md +22 -0
- package/skills/void/docs/guide/edge/headers.md +1 -1
- package/skills/void/docs/guide/email/domains.md +5 -1
- package/skills/void/docs/guide/email/sending.md +1 -1
- package/skills/void/docs/guide/platform/administration/zero-trust.md +27 -9
- package/skills/void/docs/guide/platform/installation/ci.md +1 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +10 -3
- package/skills/void/docs/guide/platform/installation/domains.md +8 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -2
- package/skills/void/docs/guide/platform/installation/maintenance.md +12 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +8 -7
- package/skills/void/docs/guide/platform/installation/setup.md +80 -10
- package/skills/void/docs/guide/remote-dev.md +1 -1
- package/skills/void/docs/reference/cli/auth.md +4 -3
- package/skills/void/docs/reference/cli/database.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +20 -0
- package/skills/void/docs/reference/cli/platform-installation.md +42 -27
- package/skills/void/docs/reference/cli/platform-zero-trust.md +14 -0
- package/skills/void/docs/reference/config.md +1 -1
- package/dist/auth-CCjt0hcq.mjs +0 -2
- package/dist/client-Cu7jWiF1.mjs +0 -2
- package/dist/dist-BuDuKZJv.mjs +0 -2
- package/dist/dist-CTBk70IR.mjs +0 -1310
- package/dist/gen-BVaUUumi.mjs +0 -2
- package/dist/help-DofyZuY7.mjs +0 -2
- package/dist/log-ChfPKsVd.mjs +0 -26
- package/dist/login-DYt_An22.mjs +0 -2
- package/dist/migrate-8_2u55MD.mjs +0 -2
- package/dist/platform-args-D3RXyR6h.mjs +0 -2
- package/dist/prepare-cgvDMtSb.mjs +0 -2
- package/dist/project-BuUwfj6f.mjs +0 -2
package/AGENTS_TEMPLATE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Void
|
|
2
2
|
|
|
3
3
|
- This project uses [Void](https://void.cloud), a full-stack Vite framework for Cloudflare Workers with file-based API routing, server-rendered pages, and typed backend services.
|
|
4
|
-
- Deploy to your Cloudflare account with `void deploy --platform cloudflare`, or connect to
|
|
4
|
+
- Deploy to your Cloudflare account with `void deploy --platform cloudflare`, or explicitly connect to your team’s Void platform with `void connect <url>` before deploying with `void deploy --platform void`. `void deploy` uses the saved destination.
|
|
5
5
|
- Use Void's CLI and typed APIs for development and infrastructure. Void infers Cloudflare bindings from your imports; use Void commands to manage them.
|
|
6
6
|
- Before working with Void, read the relevant Markdown docs in `node_modules/void/skills/void/docs/`. Start with `guide/quickstart.md` for setup and `reference/cli.md` for commands; consult the other guides and references for any Void feature.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as getToken,
|
|
2
|
-
import {
|
|
3
|
-
import { n as PlatformClient } from "./client-
|
|
4
|
-
import { n as runLoginCommand } from "./login-
|
|
1
|
+
import { c as getToken, f as removeToken } from "./auth-CQkSDS50.mjs";
|
|
2
|
+
import { L as log } from "./prompts-BNUoTiaf.mjs";
|
|
3
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
4
|
+
import { n as runLoginCommand } from "./login-BuiMyUrx.mjs";
|
|
5
5
|
import { execSync } from "node:child_process";
|
|
6
6
|
//#region src/cli/account-cmd.ts
|
|
7
7
|
async function runAccountCommand(root, args) {
|
|
8
8
|
switch (args.subcommand) {
|
|
9
9
|
case "login": return runLoginCommand(root);
|
|
10
|
-
case "link": return import("./auth-link-
|
|
10
|
+
case "link": return import("./auth-link-D75t9wO2.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
11
11
|
case "logout":
|
|
12
12
|
if (removeToken(root)) log.success("Logged out.");
|
|
13
13
|
else log.info("Not logged in.");
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { t as cfAccessHeaders } from "./cf-access-
|
|
3
|
-
import {
|
|
4
|
-
import { t as ensureCloudflaredToken } from "./cf-access-
|
|
5
|
-
import {
|
|
2
|
+
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
3
|
+
import { C as writeKeyringPassword, S as readKeyringPassword, c as platformCredentialAccount, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl, x as deleteKeyringPassword } from "./platform-registry-DkPPXfp_.mjs";
|
|
4
|
+
import { t as ensureCloudflaredToken } from "./cf-access-BGe5sWXF.mjs";
|
|
5
|
+
import { i as readProjectPlatformUrl, r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { createHash, randomBytes } from "node:crypto";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
-
//#region src/shared/proxy.ts
|
|
10
|
-
const DEFAULT_PROXY_URL = "https://proxy.void.cloud";
|
|
11
|
-
const STAGING_PROXY_URL = "https://proxy.staging.void.cloud";
|
|
12
|
-
//#endregion
|
|
13
9
|
//#region src/cli/auth.ts
|
|
14
10
|
const CONFIG_DIR = join(homedir(), ".void");
|
|
15
11
|
const CONFIG_PATH = join(CONFIG_DIR, "config.json");
|
|
@@ -50,19 +46,22 @@ function readOriginScopedToken(apiUrl, config) {
|
|
|
50
46
|
}
|
|
51
47
|
return fileToken;
|
|
52
48
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
49
|
+
function connectedPlatform(apiUrl) {
|
|
50
|
+
if (!apiUrl) throw new Error("platform: No Void platform connected. Run `void connect <url>` first.");
|
|
51
|
+
const origin = normalizePlatformApiUrl(apiUrl);
|
|
52
|
+
const connection = listPlatformConnections().find((entry) => entry.apiUrl === origin);
|
|
53
|
+
if (!connection) throw new Error(`platform: No connection to ${origin}. Run \`void connect ${origin}\` first.`);
|
|
54
|
+
return connection;
|
|
55
55
|
}
|
|
56
56
|
function getSiteDomain(root = process.cwd()) {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return domain;
|
|
57
|
+
const connection = connectedPlatform(getApiUrl(root));
|
|
58
|
+
if (!connection.applicationDomain) throw new Error(`platform: Missing application domain. Run \`void connect ${connection.apiUrl}\` to refresh the connection.`);
|
|
59
|
+
return connection.applicationDomain;
|
|
61
60
|
}
|
|
62
61
|
/**
|
|
63
62
|
* Read the deploy token.
|
|
64
63
|
* Priority: origin-bound VOID_TOKEN > system keychain > migrated config.
|
|
65
|
-
*
|
|
64
|
+
* Environment tokens must name their recipient with VOID_API_URL.
|
|
66
65
|
*/
|
|
67
66
|
function getToken(root = process.cwd()) {
|
|
68
67
|
const envToken = process.env.VOID_TOKEN;
|
|
@@ -79,7 +78,7 @@ function getToken(root = process.cwd()) {
|
|
|
79
78
|
/** Account actions follow the selected connection, independently of application metadata. */
|
|
80
79
|
function getAccountCredential() {
|
|
81
80
|
const config = readConfig();
|
|
82
|
-
const apiUrl =
|
|
81
|
+
const apiUrl = connectedPlatform(process.env.VOID_API_URL || getActivePlatformConnection()?.apiUrl).apiUrl;
|
|
83
82
|
return {
|
|
84
83
|
apiUrl,
|
|
85
84
|
token: readTokenForOrigin(apiUrl, config)
|
|
@@ -88,7 +87,8 @@ function getAccountCredential() {
|
|
|
88
87
|
function readTokenForOrigin(apiUrl, config) {
|
|
89
88
|
const envToken = process.env.VOID_TOKEN;
|
|
90
89
|
if (envToken) {
|
|
91
|
-
if (
|
|
90
|
+
if (!process.env.VOID_API_URL) throw new Error("auth: Set VOID_API_URL alongside VOID_TOKEN to identify the connected platform that issued it.");
|
|
91
|
+
if (apiUrl !== normalizePlatformApiUrl(process.env.VOID_API_URL)) throw new Error(`auth: VOID_TOKEN is not bound to ${apiUrl}. Set VOID_API_URL to this platform's URL with its matching token, or unset VOID_TOKEN to use the saved login.`);
|
|
92
92
|
return envToken;
|
|
93
93
|
}
|
|
94
94
|
return readOriginScopedToken(apiUrl, config);
|
|
@@ -126,8 +126,6 @@ function removeToken(root = process.cwd()) {
|
|
|
126
126
|
} catch {}
|
|
127
127
|
return removed;
|
|
128
128
|
}
|
|
129
|
-
const DEFAULT_API_URL = VOID_CLOUD_PLATFORM.apiUrl;
|
|
130
|
-
const STAGING_API_URL = VOID_CLOUD_STAGING_PLATFORM.apiUrl;
|
|
131
129
|
function base64Url(buffer) {
|
|
132
130
|
return buffer.toString("base64").replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
133
131
|
}
|
|
@@ -163,40 +161,15 @@ async function exchangeLoginCode(apiUrl, code, state, codeVerifier) {
|
|
|
163
161
|
if (!body || typeof body !== "object" || !("token" in body) || typeof body.token !== "string" || body.token.length === 0) throw new Error("auth: Login code exchange did not return a token.");
|
|
164
162
|
return body.token;
|
|
165
163
|
}
|
|
166
|
-
/**
|
|
167
|
-
* Read the API URL from environment or config file.
|
|
168
|
-
* Priority: VOID_API_URL env var > ~/.void/config.json > default
|
|
169
|
-
*/
|
|
164
|
+
/** Environment and project selections must refer to a verified local connection. */
|
|
170
165
|
function getApiUrl(root = process.cwd()) {
|
|
171
|
-
if (process.env.VOID_API_URL) return normalizePlatformApiUrl(process.env.VOID_API_URL);
|
|
172
|
-
if (isStagingMode(root)) return STAGING_API_URL;
|
|
173
166
|
const projectApiUrl = readProjectPlatformUrl(root);
|
|
174
|
-
if (projectApiUrl)
|
|
175
|
-
|
|
176
|
-
if (listPlatformConnections().some((connection) => connection.apiUrl === projectApiUrl)) return projectApiUrl;
|
|
177
|
-
throw new Error(`platform: Project metadata selected unverified platform ${projectApiUrl}. Connect to it explicitly with \`void connect ${projectApiUrl}\` before forwarding credentials.`);
|
|
178
|
-
}
|
|
179
|
-
const config = readConfig();
|
|
180
|
-
const legacySelection = readLegacyHostedPlatformSelection();
|
|
181
|
-
let apiUrl = (isLegacyVoidCloudProject(root) ? DEFAULT_API_URL : void 0) ?? getActivePlatformConnection()?.apiUrl ?? config.api ?? legacySelection?.apiUrl;
|
|
182
|
-
apiUrl ??= process.env.VOID_TOKEN ? DEFAULT_API_URL : void 0;
|
|
183
|
-
if (!apiUrl) {
|
|
184
|
-
apiUrl = keyringGet("token") ? DEFAULT_API_URL : keyringGet("stagingToken") ? STAGING_API_URL : void 0;
|
|
185
|
-
if (apiUrl) try {
|
|
186
|
-
writeConfig({
|
|
187
|
-
...config,
|
|
188
|
-
api: apiUrl
|
|
189
|
-
});
|
|
190
|
-
} catch {}
|
|
191
|
-
}
|
|
192
|
-
if (!apiUrl) throw new Error("platform: No Void platform selected. Run `void connect <url>` or `void platform install` first.");
|
|
193
|
-
return normalizePlatformApiUrl(apiUrl);
|
|
167
|
+
if (readProjectConfig(root) && !projectApiUrl) throw new Error("platform: This project link has no platform URL. Run `void connect <url>`, then `void project link` to choose its destination.");
|
|
168
|
+
return connectedPlatform(process.env.VOID_API_URL || projectApiUrl || getActivePlatformConnection()?.apiUrl).apiUrl;
|
|
194
169
|
}
|
|
195
170
|
function getProxyUrl(root = process.cwd()) {
|
|
171
|
+
const apiUrl = getApiUrl(root);
|
|
196
172
|
if (process.env.VOID_PROXY_URL) return normalizePlatformApiUrl(process.env.VOID_PROXY_URL);
|
|
197
|
-
const apiUrl = normalizePlatformApiUrl(getApiUrl(root));
|
|
198
|
-
if (apiUrl === STAGING_API_URL) return STAGING_PROXY_URL;
|
|
199
|
-
if (apiUrl === DEFAULT_API_URL) return DEFAULT_PROXY_URL;
|
|
200
173
|
const proxyUrl = listPlatformConnections().find((connection) => connection.apiUrl === apiUrl)?.proxyUrl;
|
|
201
174
|
if (proxyUrl === null || proxyUrl === void 0) throw new Error(`platform: No verified proxy is registered for ${apiUrl}. Reconnect with \`void connect ${apiUrl}\` or set VOID_PROXY_URL explicitly.`);
|
|
202
175
|
return proxyUrl;
|
|
@@ -369,4 +342,4 @@ async function runPlatformLogin(origin, provider = "github", onUrl) {
|
|
|
369
342
|
});
|
|
370
343
|
}
|
|
371
344
|
//#endregion
|
|
372
|
-
export {
|
|
345
|
+
export { getApiUrl as a, getToken as c, readPlatformToken as d, removeToken as f, saveToken as g, savePlatformToken as h, getAccountCredential as i, getTokenSource as l, runPlatformLogin as m, createCodeChallenge as n, getProxyUrl as o, runLogin as p, createCodeVerifier as r, getSiteDomain as s, awaitBrowserCallback as t, openBrowser as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as getApiUrl, c as getToken,
|
|
2
|
-
import {
|
|
3
|
-
import { n as PlatformClient } from "./client-
|
|
4
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
5
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
1
|
+
import { a as getApiUrl, c as getToken, h as savePlatformToken, m as runPlatformLogin, u as openBrowser } from "./auth-CQkSDS50.mjs";
|
|
2
|
+
import { L as log } from "./prompts-BNUoTiaf.mjs";
|
|
3
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
4
|
+
import { r as selectPlatformLoginMethod } from "./login-BuiMyUrx.mjs";
|
|
5
|
+
import { t as discoverPlatform } from "./platform-cmd-DMDEc9uS.mjs";
|
|
6
6
|
import { execFile } from "node:child_process";
|
|
7
7
|
//#region src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as listPlatformConnections } from "./platform-registry-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { o as listPlatformConnections } from "./platform-registry-DkPPXfp_.mjs";
|
|
2
|
+
import { n as readDeploymentPlatform } from "./project-DKG5Ra8p.mjs";
|
|
3
|
+
import { K as select, tt as isCancel } from "./prompts-BNUoTiaf.mjs";
|
|
4
4
|
//#region src/cli/auth-router.ts
|
|
5
5
|
async function chooseDestination(root, args, interactive) {
|
|
6
6
|
const saved = readDeploymentPlatform(root);
|
|
@@ -37,7 +37,7 @@ async function chooseDestination(root, args, interactive) {
|
|
|
37
37
|
}
|
|
38
38
|
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
39
39
|
if (args.subcommand === "link") {
|
|
40
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
40
|
+
const { runAccountCommand } = await import("./account-cmd-vJhh5lrb.mjs");
|
|
41
41
|
await runAccountCommand(root, {
|
|
42
42
|
subcommand: "link",
|
|
43
43
|
...args.connectionId ? { connectionId: args.connectionId } : {}
|
|
@@ -45,17 +45,17 @@ async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isT
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
if (args.subcommand === "token") {
|
|
48
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
48
|
+
const { runAccountCommand } = await import("./account-cmd-vJhh5lrb.mjs");
|
|
49
49
|
await runAccountCommand(root, { subcommand: "token" });
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
const destination = await chooseDestination(root, args, interactive);
|
|
53
53
|
if (destination.platform === "cloudflare") {
|
|
54
|
-
const { runCloudflareCommand } = await import("./cloudflare-cmd-
|
|
54
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-CmY8dGkd.mjs");
|
|
55
55
|
await runCloudflareCommand(root, { subcommand: args.subcommand === "whoami" || args.subcommand === "status" ? "status" : args.subcommand });
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
58
|
+
const { runAccountCommand } = await import("./account-cmd-vJhh5lrb.mjs");
|
|
59
59
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
60
60
|
if (!destination.apiUrl) {
|
|
61
61
|
await runAccountCommand(root, { subcommand });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient, t as PlatformApiError } from "./client-
|
|
5
|
-
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient, t as PlatformApiError } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
//#region src/cli/build-cmd.ts
|
|
@@ -128,7 +128,7 @@ async function runBuildLogsCommand(root, args) {
|
|
|
128
128
|
await sleep(POLL_MS);
|
|
129
129
|
}
|
|
130
130
|
if (first.external) {
|
|
131
|
-
log.message(`This build ran on GitHub Actions. View logs:\n${import_picocolors.default.
|
|
131
|
+
log.message(`This build ran on GitHub Actions. View logs:\n${import_picocolors.default.blue(first.external)}`);
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
if (args.output) writeFileSync(args.output, "");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { a as dim, i as createSpinner, r as cliTitle } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { H as outro, L as log, N as intro } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { a as dim, i as createSpinner, r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/cache.ts
|
|
8
8
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as PlatformClient } from "./client-
|
|
5
|
-
import { r as cliTitle } from "./output-
|
|
1
|
+
import { r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CQkSDS50.mjs";
|
|
3
|
+
import { A as confirm, H as outro, L as log, N as intro, tt as isCancel } from "./prompts-BNUoTiaf.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-DKAsFA4X.mjs";
|
|
5
|
+
import { r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
6
6
|
//#region src/cli/cancel-deploy.ts
|
|
7
7
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
8
8
|
"pending",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
2
|
+
import { C as writeKeyringPassword, S as readKeyringPassword, c as platformCredentialAccount, s as normalizePlatformApiUrl } from "./platform-registry-DkPPXfp_.mjs";
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
//#region src/cli/cf-access.ts
|
|
5
5
|
const ACCESS_KEYRING_SERVICE = "dev.void.cli.access";
|
|
@@ -106,53 +106,9 @@ function ensurePlatformAccessToken(apiUrl, challenged = false, required = false,
|
|
|
106
106
|
keyringTokens.set(origin, token);
|
|
107
107
|
writeKeyringPassword(ACCESS_KEYRING_SERVICE, account, token);
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* If the CLI is about to talk to a Cloudflare-Access-gated staging host,
|
|
112
|
-
* probe the locally-installed `cloudflared` binary for a cached user JWT
|
|
113
|
-
* and export it as `CF_ACCESS_TOKEN`. On interactive shells with no cached
|
|
114
|
-
* token, open a browser login flow to populate the cache, then re-read it.
|
|
115
|
-
*
|
|
116
|
-
* Cached per-host so that an early non-gated call (e.g. prod) does not
|
|
117
|
-
* permanently disable the probe for a later gated call (e.g. staging) in
|
|
118
|
-
* the same process. Noop when:
|
|
119
|
-
* - a service-token pair is already set (CI path)
|
|
120
|
-
* - `CF_ACCESS_TOKEN` is already set (manual override or prior probe)
|
|
121
|
-
* - the target host is not gated
|
|
122
|
-
* - `cloudflared` is not installed
|
|
123
|
-
*/
|
|
109
|
+
/** Restore only credentials scoped to this explicitly selected platform origin. */
|
|
124
110
|
function ensureCloudflaredToken(apiUrl) {
|
|
125
|
-
|
|
126
|
-
ensurePlatformAccessToken(apiUrl);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (process.env.CF_ACCESS_CLIENT_ID && process.env.CF_ACCESS_CLIENT_SECRET) return;
|
|
130
|
-
if (process.env.CF_ACCESS_TOKEN) return;
|
|
131
|
-
if (!isVoidAccessGatedUrl(apiUrl)) return;
|
|
132
|
-
const host = new URL(apiUrl).hostname;
|
|
133
|
-
if (probedHosts.has(host)) return;
|
|
134
|
-
probedHosts.add(host);
|
|
135
|
-
let token = runCloudflared([
|
|
136
|
-
"access",
|
|
137
|
-
"token",
|
|
138
|
-
`-app=${apiUrl}`
|
|
139
|
-
]);
|
|
140
|
-
if (!token && process.stdin.isTTY && process.stdout.isTTY) {
|
|
141
|
-
runCloudflared([
|
|
142
|
-
"access",
|
|
143
|
-
"login",
|
|
144
|
-
apiUrl
|
|
145
|
-
], {
|
|
146
|
-
inherit: true,
|
|
147
|
-
timeoutMs: 12e4
|
|
148
|
-
});
|
|
149
|
-
token = runCloudflared([
|
|
150
|
-
"access",
|
|
151
|
-
"token",
|
|
152
|
-
`-app=${apiUrl}`
|
|
153
|
-
]);
|
|
154
|
-
}
|
|
155
|
-
if (token) process.env.CF_ACCESS_TOKEN = token;
|
|
111
|
+
ensurePlatformAccessToken(apiUrl);
|
|
156
112
|
}
|
|
157
113
|
function runCloudflared(args, opts) {
|
|
158
114
|
try {
|
|
@@ -7,14 +7,6 @@
|
|
|
7
7
|
* 2. User JWT (`CF_ACCESS_TOKEN`) — dev path, typically populated via `cloudflared access token`
|
|
8
8
|
* 3. No headers — prod, or unprotected hostnames
|
|
9
9
|
*/
|
|
10
|
-
function isVoidAccessGatedUrl(targetUrl) {
|
|
11
|
-
try {
|
|
12
|
-
const url = new URL(targetUrl);
|
|
13
|
-
return url.protocol === "https:" && (url.hostname.endsWith(".staging.void.cloud") || url.hostname.endsWith(".staging.void.app"));
|
|
14
|
-
} catch {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
10
|
function accessHeaders(env) {
|
|
19
11
|
const id = env.CF_ACCESS_CLIENT_ID;
|
|
20
12
|
const secret = env.CF_ACCESS_CLIENT_SECRET;
|
|
@@ -26,7 +18,7 @@ function accessHeaders(env) {
|
|
|
26
18
|
if (typeof token === "string" && token.length > 0) return { "cf-access-token": token };
|
|
27
19
|
return {};
|
|
28
20
|
}
|
|
29
|
-
/** Attach
|
|
21
|
+
/** Attach Access credentials only to their explicitly scoped origin. */
|
|
30
22
|
function cfAccessHeaders(env, targetUrl) {
|
|
31
23
|
let origin;
|
|
32
24
|
try {
|
|
@@ -52,7 +44,7 @@ function cfAccessHeaders(env, targetUrl) {
|
|
|
52
44
|
} catch {
|
|
53
45
|
return {};
|
|
54
46
|
}
|
|
55
|
-
return
|
|
47
|
+
return {};
|
|
56
48
|
}
|
|
57
49
|
/**
|
|
58
50
|
* Capture credentials for a Cloudflare Worker readiness request whose target
|
|
@@ -72,4 +64,4 @@ function scopedAccessCredentials(env, targetUrl) {
|
|
|
72
64
|
} : { CF_ACCESS_TOKEN: headers["cf-access-token"] } });
|
|
73
65
|
}
|
|
74
66
|
//#endregion
|
|
75
|
-
export {
|
|
67
|
+
export { scopedAccessCredentials as n, trustedCloudflareWorkerAccessHeaders as r, cfAccessHeaders as t };
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as join } from "../dist-BVqXeR_h.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { L as log } from "../prompts-BNUoTiaf.mjs";
|
|
4
4
|
import { n as getPackageDir } from "../agents-B_pX_HmQ.mjs";
|
|
5
5
|
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { r as
|
|
8
|
-
import {
|
|
6
|
+
import { c as import_picocolors } from "../output-CbM85T4k.mjs";
|
|
7
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-Dotbf6iz.mjs";
|
|
8
|
+
import { r as OperatorClientError } from "../operator-client-CpHjTd0t.mjs";
|
|
9
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-3k8X9-H_.mjs";
|
|
9
10
|
import { readFileSync } from "node:fs";
|
|
10
11
|
import { parseArgs } from "node:util";
|
|
11
12
|
//#region src/cli/account-args.ts
|
|
@@ -1612,7 +1613,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1612
1613
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1613
1614
|
try {
|
|
1614
1615
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1615
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1616
|
+
const { promptSubcommand } = await import("../subcommand-prompt-klFCfcor.mjs");
|
|
1616
1617
|
if (command === "platform" && !sub) log.info("A Void platform lets a team deploy Void apps to a shared Cloudflare account.\nThis command sets up and manages platforms. Join with `void connect <url>`.\nDocs: https://void.cloud/guide/self-hosted-platform");
|
|
1617
1618
|
const result = await promptSubcommand(command, subcommands);
|
|
1618
1619
|
if (!result) process.exit(0);
|
|
@@ -1627,8 +1628,10 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1627
1628
|
process.exit(1);
|
|
1628
1629
|
}
|
|
1629
1630
|
const message = formatCloudflareUserMessage(err instanceof Error ? err.message : String(err));
|
|
1630
|
-
if (command === "platform")
|
|
1631
|
-
|
|
1631
|
+
if (command === "platform") {
|
|
1632
|
+
const platformMessage = message.replace(/^platform:/, import_picocolors.default.bold(import_picocolors.default.red("platform:")));
|
|
1633
|
+
console.error(err instanceof OperatorClientError && err.details !== void 0 ? `${platformMessage}\nPartial result:\n${JSON.stringify(err.details, null, 2)}` : platformMessage);
|
|
1634
|
+
} else log.error(message);
|
|
1632
1635
|
process.exit(1);
|
|
1633
1636
|
}
|
|
1634
1637
|
}
|
|
@@ -1652,7 +1655,7 @@ if (helpPath) {
|
|
|
1652
1655
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1653
1656
|
process.exit(1);
|
|
1654
1657
|
}
|
|
1655
|
-
import("../deploy-
|
|
1658
|
+
import("../deploy-irP5q0-x.mjs").then(({ runDeploy }) => {
|
|
1656
1659
|
runDeploy(root, {
|
|
1657
1660
|
projectSlug: deployArgs.projectSlug,
|
|
1658
1661
|
dir: deployArgs.dir,
|
|
@@ -1670,25 +1673,25 @@ if (helpPath) {
|
|
|
1670
1673
|
});
|
|
1671
1674
|
} else if (command === "connect") (async () => {
|
|
1672
1675
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1673
|
-
const { runConnectCommand } = await import("../connect-
|
|
1676
|
+
const { runConnectCommand } = await import("../connect-B-usTnlF.mjs");
|
|
1674
1677
|
await runConnectCommand(process.cwd(), parsed);
|
|
1675
1678
|
})().catch((err) => {
|
|
1676
1679
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1677
1680
|
process.exit(1);
|
|
1678
1681
|
});
|
|
1679
|
-
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-
|
|
1680
|
-
else if (command === "account") runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-
|
|
1681
|
-
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1682
|
-
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
1683
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1684
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1685
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1686
|
-
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
1687
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1688
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1689
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1690
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1691
|
-
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1682
|
+
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-ClfhL1J7.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed)));
|
|
1683
|
+
else if (command === "account") runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-vJhh5lrb.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed)));
|
|
1684
|
+
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-pMTRhvYs.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed)));
|
|
1685
|
+
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-CmY8dGkd.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed)));
|
|
1686
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DxnXstAq.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1687
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-ByWJWBUG.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1688
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-DFfQE8jg.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1689
|
+
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-CdnhUHvJ.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed)));
|
|
1690
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-Ck2eZ2iB.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1691
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-DmGdHi5i.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1692
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-DvQTWzDU.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1693
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-DftuEvIt.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
1694
|
+
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-zMi1iFnS.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
1692
1695
|
else if (command === "info") import("../info-B97bTX9N.mjs").then(async ({ runInfoCommand }) => {
|
|
1693
1696
|
try {
|
|
1694
1697
|
await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
|
|
@@ -1711,7 +1714,7 @@ else if (command === "prepare") {
|
|
|
1711
1714
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1712
1715
|
process.exit(1);
|
|
1713
1716
|
}
|
|
1714
|
-
import("../prepare-
|
|
1717
|
+
import("../prepare-CBLT3CHH.mjs").then(({ runPrepareCommand }) => {
|
|
1715
1718
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1716
1719
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1717
1720
|
process.exit(1);
|
|
@@ -1719,7 +1722,7 @@ else if (command === "prepare") {
|
|
|
1719
1722
|
});
|
|
1720
1723
|
} else if (command === "init") {
|
|
1721
1724
|
const root = process.cwd();
|
|
1722
|
-
import("../init-
|
|
1725
|
+
import("../init-BTQEZZGJ.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1723
1726
|
let initArgs;
|
|
1724
1727
|
try {
|
|
1725
1728
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1737,7 +1740,7 @@ else if (command === "prepare") {
|
|
|
1737
1740
|
log.error("migrate: This command takes no arguments.");
|
|
1738
1741
|
process.exit(1);
|
|
1739
1742
|
}
|
|
1740
|
-
import("../migrate-
|
|
1743
|
+
import("../migrate-BCiJ8w0f.mjs").then(({ runMigrateCommand }) => {
|
|
1741
1744
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1742
1745
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1743
1746
|
process.exit(1);
|
|
@@ -1849,52 +1852,52 @@ else if (command === "prepare") {
|
|
|
1849
1852
|
];
|
|
1850
1853
|
(async () => {
|
|
1851
1854
|
printVoidHeader();
|
|
1852
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1855
|
+
const { promptSubcommand } = await import("../subcommand-prompt-klFCfcor.mjs");
|
|
1853
1856
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1854
1857
|
if (!result) process.exit(0);
|
|
1855
1858
|
const cmd = result.subcommand;
|
|
1856
1859
|
const root = process.cwd();
|
|
1857
1860
|
switch (cmd) {
|
|
1858
1861
|
case "connect": {
|
|
1859
|
-
const { runConnectCommand } = await import("../connect-
|
|
1862
|
+
const { runConnectCommand } = await import("../connect-B-usTnlF.mjs");
|
|
1860
1863
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1861
1864
|
return;
|
|
1862
1865
|
}
|
|
1863
1866
|
case "init": {
|
|
1864
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1867
|
+
const { runInitCommand, parseInitArgs } = await import("../init-BTQEZZGJ.mjs");
|
|
1865
1868
|
await runInitCommand(root, parseInitArgs([]));
|
|
1866
1869
|
return;
|
|
1867
1870
|
}
|
|
1868
1871
|
case "migrate": {
|
|
1869
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1872
|
+
const { runMigrateCommand } = await import("../migrate-BCiJ8w0f.mjs");
|
|
1870
1873
|
await runMigrateCommand(root);
|
|
1871
1874
|
return;
|
|
1872
1875
|
}
|
|
1873
1876
|
case "deploy": {
|
|
1874
|
-
const { runDeploy } = await import("../deploy-
|
|
1877
|
+
const { runDeploy } = await import("../deploy-irP5q0-x.mjs");
|
|
1875
1878
|
await runDeploy(root);
|
|
1876
1879
|
return;
|
|
1877
1880
|
}
|
|
1878
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-router-
|
|
1879
|
-
case "account": return runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (r, p) => import("../account-cmd-
|
|
1880
|
-
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-
|
|
1881
|
-
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-
|
|
1882
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
1883
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
1884
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
1885
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-
|
|
1886
|
-
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-
|
|
1887
|
-
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-
|
|
1888
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
1889
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
1890
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
1881
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-router-ClfhL1J7.mjs").then(({ runAuthRouter }) => runAuthRouter(r, p)));
|
|
1882
|
+
case "account": return runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (r, p) => import("../account-cmd-vJhh5lrb.mjs").then(({ runAccountCommand }) => runAccountCommand(r, p)));
|
|
1883
|
+
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-pMTRhvYs.mjs").then(({ runPlatformCommand }) => runPlatformCommand(r, p)));
|
|
1884
|
+
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-CmY8dGkd.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(r, p)));
|
|
1885
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DxnXstAq.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1886
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-ByWJWBUG.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1887
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-DFfQE8jg.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1888
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-DftuEvIt.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
1889
|
+
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-zMi1iFnS.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
1890
|
+
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-CdnhUHvJ.mjs").then(({ runEmailCommand }) => runEmailCommand(r, p)));
|
|
1891
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-Ck2eZ2iB.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1892
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-DmGdHi5i.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1893
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-DvQTWzDU.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1891
1894
|
case "info": {
|
|
1892
1895
|
const { runInfoCommand } = await import("../info-B97bTX9N.mjs");
|
|
1893
1896
|
await runInfoCommand(root, parseInfoArgs([]));
|
|
1894
1897
|
return;
|
|
1895
1898
|
}
|
|
1896
1899
|
case "prepare": {
|
|
1897
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1900
|
+
const { runPrepareCommand } = await import("../prepare-CBLT3CHH.mjs");
|
|
1898
1901
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1899
1902
|
return;
|
|
1900
1903
|
}
|