void 0.21.0 → 0.21.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 +3 -2
- package/dist/{auth-cmd-MkBG2u1f.mjs → account-cmd-D8OC-U7y.mjs} +8 -8
- package/dist/{auth-link-Devmv96E.mjs → auth-link-BYFeMJAp.mjs} +3 -3
- package/dist/auth-router-OHZNmrb_.mjs +74 -0
- package/dist/{build-cmd-DsBGwtfs.mjs → build-cmd-Bft7EY51.mjs} +2 -2
- package/dist/{cache-BMw8eMyF.mjs → cache-CKV1Gz2w.mjs} +2 -2
- package/dist/{cancel-deploy-B3_s9NIN.mjs → cancel-deploy-BAKmkX4f.mjs} +2 -2
- package/dist/cli/cf-compat.mjs +13 -3
- package/dist/cli/cli.mjs +112 -60
- package/dist/{connect-BvC9kolB.mjs → connect-DLx1pRYk.mjs} +3 -3
- package/dist/{create-project-C9lQhRzj.mjs → create-project-BZBl_gQ0.mjs} +1 -1
- package/dist/{create-project-CI-17RVJ.mjs → create-project-JV9-6ICF.mjs} +1 -1
- package/dist/{db-R7IQgOv5.mjs → db-B98_UV4H.mjs} +8 -8
- package/dist/{delete-CghI_NXn.mjs → delete-BEEyqlwd.mjs} +2 -2
- package/dist/{deploy-H968Lo4T.mjs → deploy-Bsymb0_c.mjs} +85 -48
- package/dist/{deploy-CYPymbtG.mjs → deploy-CsjbRNyv.mjs} +1 -1
- package/dist/{domain-CITt8lC-.mjs → domain-Av2AkLQP.mjs} +2 -2
- package/dist/{email-_8VmyX7V.mjs → email-CUqa6TtH.mjs} +3 -3
- package/dist/{env-DV4r3nHz.mjs → env-D4RIGEzz.mjs} +2 -2
- package/dist/gen-B87rlalt.mjs +2 -0
- package/dist/{gen-CFOEEc-t.mjs → gen-pg-Ojg8Y.mjs} +1 -1
- package/dist/{github-cmd-jYjha2LO.mjs → github-cmd-BEK4VprE.mjs} +4 -4
- package/dist/{help-C46mnlUS.mjs → help-iQOt7WHk.mjs} +40 -9
- package/dist/help-r_vrpH_d.mjs +2 -0
- package/dist/index.mjs +5 -5
- package/dist/{init-CSXmvxKu.mjs → init-D5niUPAz.mjs} +5 -5
- package/dist/{link-DxMOALXk.mjs → link-3lGrfXzd.mjs} +3 -3
- package/dist/{list-0wQs0oYg.mjs → list-CVjGr_C6.mjs} +2 -2
- package/dist/{login-CKk5NX4d.mjs → login-BgQJzxAl.mjs} +3 -3
- package/dist/login-Bz0zEPoy.mjs +2 -0
- package/dist/{logs-hxWBSoej.mjs → logs-DbzD-QDf.mjs} +2 -2
- package/dist/{migrate-DcW8F2W8.mjs → migrate-BV8qHiCb.mjs} +1 -1
- package/dist/migrate-BXY3B3m7.mjs +2 -0
- package/dist/{operator-cmd-BEUYhaHB.mjs → operator-cmd-CR6Lxzt0.mjs} +3 -3
- package/dist/{output-urU86XeT.mjs → output-CCH48AMM.mjs} +4 -4
- package/dist/{platform-auth-config-Df6yVw-e.mjs → platform-auth-config-De7BqRJm.mjs} +2 -2
- package/dist/{platform-auth-protection-Jb0yftay.mjs → platform-auth-protection-Dcat-6zu.mjs} +2 -2
- package/dist/{platform-auth-recovery-DmRyIfW0.mjs → platform-auth-recovery-C9gsM640.mjs} +2 -2
- package/dist/{platform-cmd-C9Vt7m-d.mjs → platform-cmd-Cl9Uhzru.mjs} +1 -1
- package/dist/{platform-cmd-DRxCOTwy.mjs → platform-cmd-CudokNIg.mjs} +4 -4
- package/dist/{platform-domain-IjiXgrXJ.mjs → platform-domain-Ckpd2kXw.mjs} +2 -2
- package/dist/{platform-lifecycle-BquAaU-5.mjs → platform-lifecycle-DVzM2T4j.mjs} +8 -8
- package/dist/{platform-lifecycle-CuJIZNvA.mjs → platform-lifecycle-DlpiGcjr.mjs} +1 -1
- package/dist/{platform-management-Cgyed0WY.mjs → platform-management-44Bxd3YC.mjs} +1 -1
- package/dist/{platform-management-CCQKGsq4.mjs → platform-management-ibuS1as0.mjs} +2 -2
- package/dist/{platform-recovery-DS8ih1SW.mjs → platform-recovery-D_KmvdSk.mjs} +2 -2
- package/dist/{prepare-CaUxODOU.mjs → prepare-_T-Haxrr.mjs} +1 -1
- package/dist/{project-cmd-2lN--YAX.mjs → project-cmd-BuF9doku.mjs} +14 -14
- package/dist/{project-team-Dapn9HZn.mjs → project-team-B1Tia8vd.mjs} +3 -3
- package/dist/{project-token-C90v9SJK.mjs → project-token-Bwxjf4y6.mjs} +1 -1
- package/dist/{requests-CzX46I0i.mjs → requests-CphRF98D.mjs} +2 -2
- package/dist/{rollback-BEeyc73H.mjs → rollback-BYHJV2yD.mjs} +2 -2
- package/dist/{secret-wnTel5Yw.mjs → secret-Rt9c4Ttw.mjs} +2 -2
- package/dist/{subcommand-prompt-Gj3VzLIh.mjs → subcommand-prompt-BuGYkAkC.mjs} +1 -1
- package/package.json +7 -7
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +1 -1
- package/skills/void/SKILL.md +4 -2
- package/skills/void/docs/guide/deployment.md +6 -13
- package/skills/void/docs/guide/email.md +53 -59
- package/skills/void/docs/guide/index.md +15 -41
- package/skills/void/docs/guide/platform/administration/access.md +1 -1
- package/skills/void/docs/guide/project-collaboration.md +1 -1
- package/skills/void/docs/guide/quickstart.md +11 -78
- package/skills/void/docs/index.md +17 -17
- package/skills/void/docs/integrations/cloudflare.md +16 -23
- package/skills/void/docs/reference/cli.md +38 -17
- package/skills/void/docs/reference/config.md +7 -7
- package/dist/gen-BBiIZw6g.mjs +0 -2
- package/dist/help-CS_nAsWu.mjs +0 -2
- package/dist/login-Ch9cgWRF.mjs +0 -2
- package/dist/migrate-CLty4mZR.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, l as relative, r as extname, t as basename, u as resolve } from "./dist-4WkAWhWx.mjs";
|
|
2
|
-
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-
|
|
2
|
+
import { a as dim, c as import_picocolors, r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
|
|
4
4
|
import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
5
5
|
import { c as getToken, o as getProxyUrl } from "./auth-B9_D6ygs.mjs";
|
|
@@ -13,7 +13,7 @@ import { a as loadLocalEnv } from "./env-DX_v-Q-v.mjs";
|
|
|
13
13
|
import { E as confirm, O as intro, P as outro, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
14
14
|
import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-qNhV00PD.mjs";
|
|
15
15
|
import { n as PlatformClient, t as PlatformApiError } from "./client-PdAJ-F0t.mjs";
|
|
16
|
-
import { n as formatTimestamp } from "./gen-
|
|
16
|
+
import { n as formatTimestamp } from "./gen-pg-Ojg8Y.mjs";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import { existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -622,7 +622,7 @@ async function runExecute(root, command, file, dialect, remote) {
|
|
|
622
622
|
}
|
|
623
623
|
const token = getToken(root);
|
|
624
624
|
if (!token) {
|
|
625
|
-
log.error("Not logged in. Run `void
|
|
625
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
626
626
|
process.exit(1);
|
|
627
627
|
}
|
|
628
628
|
const projectConfig = readProjectConfig(root);
|
|
@@ -826,7 +826,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
826
826
|
log.error(getErrorMessage(error));
|
|
827
827
|
process.exit(1);
|
|
828
828
|
}
|
|
829
|
-
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-
|
|
829
|
+
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-CsjbRNyv.mjs");
|
|
830
830
|
const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations);
|
|
831
831
|
if (!applySet.ok) {
|
|
832
832
|
log.error(applySet.reason);
|
|
@@ -846,7 +846,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
846
846
|
}
|
|
847
847
|
const token = getToken(root);
|
|
848
848
|
if (!token) {
|
|
849
|
-
log.error("Not logged in. Run `void
|
|
849
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
850
850
|
process.exit(1);
|
|
851
851
|
}
|
|
852
852
|
const config = readProjectConfig(root);
|
|
@@ -978,7 +978,7 @@ async function runStudio(root, dialect, remote) {
|
|
|
978
978
|
} else {
|
|
979
979
|
const token = getToken(root);
|
|
980
980
|
if (!token) {
|
|
981
|
-
log.error("Not logged in. Run `void
|
|
981
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
982
982
|
process.exit(1);
|
|
983
983
|
}
|
|
984
984
|
const projectConfig = readProjectConfig(root);
|
|
@@ -1109,7 +1109,7 @@ async function runRenameMigrations(root, dialect) {
|
|
|
1109
1109
|
const config = readProjectConfig(root);
|
|
1110
1110
|
let remoteRenamed = false;
|
|
1111
1111
|
if (config && !token) {
|
|
1112
|
-
log.error("Project is linked but you are not logged in.\nRun `void
|
|
1112
|
+
log.error("Project is linked but you are not logged in.\nRun `void account login` first so remote migration records can be updated.");
|
|
1113
1113
|
process.exit(1);
|
|
1114
1114
|
}
|
|
1115
1115
|
if (token && config) try {
|
|
@@ -1448,7 +1448,7 @@ async function runSetUrl(root) {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
const token = getToken(root);
|
|
1450
1450
|
if (!token) {
|
|
1451
|
-
log.error("No auth token found. Run `void
|
|
1451
|
+
log.error("No auth token found. Run `void account login` first.");
|
|
1452
1452
|
process.exit(1);
|
|
1453
1453
|
}
|
|
1454
1454
|
const projectConfig = readProjectConfig(root);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as createSpinner, r as cliTitle } from "./output-
|
|
1
|
+
import { i as createSpinner, r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B9_D6ygs.mjs";
|
|
3
3
|
import { c as removeProjectConfig, o as readProjectConfig } from "./project-CWNIPoXc.mjs";
|
|
4
4
|
import { B as text, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
@@ -10,7 +10,7 @@ async function runDeleteCommand(root, slug, options) {
|
|
|
10
10
|
intro(cliTitle("delete"));
|
|
11
11
|
const token = getToken(root);
|
|
12
12
|
if (!token) {
|
|
13
|
-
log.error("Not logged in. Run `void
|
|
13
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
const client = new PlatformClient(token, { root });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __toESM, t as __commonJSMin } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
2
|
import { a as join, l as relative, n as dirname, o as normalize, r as extname, t as basename, u as resolve } from "./dist-4WkAWhWx.mjs";
|
|
3
|
-
import { c as import_picocolors$1, d as require_picocolors, i as createSpinner, r as cliTitle } from "./output-
|
|
3
|
+
import { c as import_picocolors$1, d as require_picocolors, i as createSpinner, r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
4
4
|
import { i as resolveProjectPaths, n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-CKQ-Q5JS.mjs";
|
|
5
5
|
import { t as findVoidAuthConfig } from "./config-uP7ZDtVZ.mjs";
|
|
6
6
|
import { i as trustedCloudflareWorkerAccessHeaders, r as scopedAccessCredentials, t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
|
|
@@ -36,20 +36,20 @@ import { i as isExpiredTokenError, n as PlatformClient, o as parsePlatformErrorB
|
|
|
36
36
|
import { a as resolveProjectCommand, i as hasBackendFiles, n as detectPreset, o as resolveWranglerArgv, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-Dowh9tTt.mjs";
|
|
37
37
|
import { o as ensureCloudflareAuthentication, r as cloudflareAuthNeedsTerminal, t as CloudflareAuthenticationError } from "./cloudflare-auth-BCmTc1X_.mjs";
|
|
38
38
|
import { n as writeVoidProjectConfig } from "./config-write-y3CBI_ux.mjs";
|
|
39
|
-
import { r as discoverFrameworkWranglerFiles, t as migrateLegacyVoidConfig } from "./migrate-
|
|
39
|
+
import { r as discoverFrameworkWranglerFiles, t as migrateLegacyVoidConfig } from "./migrate-BV8qHiCb.mjs";
|
|
40
40
|
import { a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher } from "./cloudflare-operations-CPEdHYhM.mjs";
|
|
41
41
|
import { t as formatCloudflareUserMessage } from "./cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
42
|
-
import { a as promptProjectSetupAction, i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
42
|
+
import { a as promptProjectSetupAction, i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-BZBl_gQ0.mjs";
|
|
43
43
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xvis70DG.mjs";
|
|
44
44
|
import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
|
|
45
|
-
import { t as promptForLoginToken } from "./login-
|
|
45
|
+
import { t as promptForLoginToken } from "./login-BgQJzxAl.mjs";
|
|
46
46
|
import { createRequire } from "node:module";
|
|
47
47
|
import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
48
48
|
import { fileURLToPath } from "node:url";
|
|
49
49
|
import { createDeployArtifact, createDeployUploadPayload } from "@void/deploy-core";
|
|
50
50
|
import { createHash, randomBytes } from "node:crypto";
|
|
51
51
|
import { homedir, tmpdir } from "node:os";
|
|
52
|
-
import { execFile, execSync, spawnSync } from "node:child_process";
|
|
52
|
+
import { execFile, execSync, spawn, spawnSync } from "node:child_process";
|
|
53
53
|
import { applyEdits, modify, parse } from "jsonc-parser";
|
|
54
54
|
import { isDeepStrictEqual } from "node:util";
|
|
55
55
|
import { build } from "vite";
|
|
@@ -1948,7 +1948,7 @@ function createCfResourceVerifier(options) {
|
|
|
1948
1948
|
if (!name) return failed(`Cloudflare ${resource.kind} binding ${bindingName} has no name.`);
|
|
1949
1949
|
const jurisdiction = value.type === "r2" ? value.jurisdiction : void 0;
|
|
1950
1950
|
if (jurisdiction !== void 0 && !safePositional(jurisdiction)) return failed(`Cloudflare R2 binding ${bindingName} has an invalid jurisdiction.`);
|
|
1951
|
-
const result = options.runCf([
|
|
1951
|
+
const result = await options.runCf([
|
|
1952
1952
|
...resource.command,
|
|
1953
1953
|
name,
|
|
1954
1954
|
...jurisdiction ? ["--cf-r2-jurisdiction", jurisdiction] : []
|
|
@@ -1969,34 +1969,55 @@ function createCfResourceVerifier(options) {
|
|
|
1969
1969
|
/** Run the pinned package-local cf binary with Void's existing Cloudflare session. */
|
|
1970
1970
|
function createCfCommand(options) {
|
|
1971
1971
|
const cf = join(dirname(fileURLToPath(import.meta.resolve("cf/package.json"))), "bin", "cf");
|
|
1972
|
-
return (args, run) => {
|
|
1972
|
+
return async (args, run) => {
|
|
1973
1973
|
if (!options.verifyUploader()) return failed("The Cloudflare uploader changed during deployment.");
|
|
1974
1974
|
const env = {
|
|
1975
1975
|
...options.env(options.accountId, options.apiBaseUrl),
|
|
1976
|
-
CF_DELEGATION: "1"
|
|
1976
|
+
CF_DELEGATION: "1",
|
|
1977
|
+
CF_QUIET: "1",
|
|
1978
|
+
CF_NO_OSC_PROGRESS: "1",
|
|
1979
|
+
CF_SEND_TELEMETRY: "false"
|
|
1977
1980
|
};
|
|
1978
1981
|
if (env.HTTP_PROXY || env.HTTPS_PROXY || env.http_proxy || env.https_proxy) env.NODE_USE_ENV_PROXY = "1";
|
|
1979
1982
|
if (options.token) env.CLOUDFLARE_API_TOKEN = options.token;
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1983
|
+
return await new Promise((resolve) => {
|
|
1984
|
+
const child = spawn(process.execPath, [cf, ...args], {
|
|
1985
|
+
cwd: run.cwd,
|
|
1986
|
+
env,
|
|
1987
|
+
shell: false,
|
|
1988
|
+
windowsHide: true,
|
|
1989
|
+
stdio: [
|
|
1990
|
+
"ignore",
|
|
1991
|
+
"pipe",
|
|
1992
|
+
"pipe"
|
|
1993
|
+
]
|
|
1994
|
+
});
|
|
1995
|
+
const stdout = [];
|
|
1996
|
+
const stderr = [];
|
|
1997
|
+
let bytes = 0;
|
|
1998
|
+
let error = null;
|
|
1999
|
+
const collect = (chunks, chunk) => {
|
|
2000
|
+
bytes += chunk.length;
|
|
2001
|
+
if (bytes > 268435456) {
|
|
2002
|
+
error = "Cloudflare command output exceeded 256 MiB.";
|
|
2003
|
+
child.kill();
|
|
2004
|
+
} else chunks.push(chunk);
|
|
2005
|
+
};
|
|
2006
|
+
child.stdout.on("data", (chunk) => collect(stdout, chunk));
|
|
2007
|
+
child.stderr.on("data", (chunk) => collect(stderr, chunk));
|
|
2008
|
+
child.on("error", (cause) => {
|
|
2009
|
+
error = cause.message;
|
|
2010
|
+
});
|
|
2011
|
+
child.on("close", (status, signal) => {
|
|
2012
|
+
resolve({
|
|
2013
|
+
status: typeof status === "number" ? status : 1,
|
|
2014
|
+
stdout: Buffer.concat(stdout).toString("utf8"),
|
|
2015
|
+
stderr: Buffer.concat(stderr).toString("utf8").replace(/\[(\d{4,})\]/g, "[code: $1]"),
|
|
2016
|
+
signal,
|
|
2017
|
+
error
|
|
2018
|
+
});
|
|
2019
|
+
});
|
|
1992
2020
|
});
|
|
1993
|
-
return {
|
|
1994
|
-
status: typeof result.status === "number" ? result.status : 1,
|
|
1995
|
-
stdout: result.stdout ?? "",
|
|
1996
|
-
stderr: (result.stderr ?? "").replace(/\[(\d{4,})\]/g, "[code: $1]"),
|
|
1997
|
-
signal: result.signal ?? null,
|
|
1998
|
-
error: result.error?.message ?? null
|
|
1999
|
-
};
|
|
2000
2021
|
};
|
|
2001
2022
|
}
|
|
2002
2023
|
/**
|
|
@@ -2005,7 +2026,7 @@ function createCfCommand(options) {
|
|
|
2005
2026
|
*/
|
|
2006
2027
|
function createCfVersionRunner(options) {
|
|
2007
2028
|
const { output, workerName, runCf } = options;
|
|
2008
|
-
const run = (args, capture, cwd = output.directory) => runCf(args, {
|
|
2029
|
+
const run = async (args, capture, cwd = output.directory) => await runCf(args, {
|
|
2009
2030
|
cwd,
|
|
2010
2031
|
capture
|
|
2011
2032
|
});
|
|
@@ -2018,7 +2039,7 @@ function createCfVersionRunner(options) {
|
|
|
2018
2039
|
};
|
|
2019
2040
|
return async (args, command) => {
|
|
2020
2041
|
if (args[0] === "deployments" && args[1] === "status") {
|
|
2021
|
-
const result = run([
|
|
2042
|
+
const result = await run([
|
|
2022
2043
|
"workers",
|
|
2023
2044
|
"deployments",
|
|
2024
2045
|
"list",
|
|
@@ -2037,8 +2058,8 @@ function createCfVersionRunner(options) {
|
|
|
2037
2058
|
}
|
|
2038
2059
|
if (args[0] === "versions" && args[1] === "list") {
|
|
2039
2060
|
const pageSize = 10;
|
|
2040
|
-
const readPage = (page) => {
|
|
2041
|
-
const result = run([
|
|
2061
|
+
const readPage = async (page) => {
|
|
2062
|
+
const result = await run([
|
|
2042
2063
|
"workers",
|
|
2043
2064
|
"versions",
|
|
2044
2065
|
"list",
|
|
@@ -2055,12 +2076,12 @@ function createCfVersionRunner(options) {
|
|
|
2055
2076
|
versions: Array.isArray(body) && body.length <= pageSize && body.every((item) => record(item) && typeof item.id === "string" && Number.isSafeInteger(item.number)) && new Set(body.map((item) => item.number)).size === body.length ? body : null
|
|
2056
2077
|
};
|
|
2057
2078
|
};
|
|
2058
|
-
const first = readPage(1);
|
|
2079
|
+
const first = await readPage(1);
|
|
2059
2080
|
if (first.result.status !== 0) return first.result;
|
|
2060
2081
|
if (!first.versions) return failed("The Cloudflare Worker version list was not readable.");
|
|
2061
2082
|
const versions = [...first.versions];
|
|
2062
2083
|
if (versions.length === pageSize) {
|
|
2063
|
-
const second = readPage(2);
|
|
2084
|
+
const second = await readPage(2);
|
|
2064
2085
|
if (second.result.status !== 0 || !second.versions) return failed("The Cloudflare Worker version history was not readable.");
|
|
2065
2086
|
if (second.versions.length > 0) {
|
|
2066
2087
|
const firstNumbers = versions.map((item) => item.number);
|
|
@@ -2069,7 +2090,7 @@ function createCfVersionRunner(options) {
|
|
|
2069
2090
|
versions.push(...second.versions);
|
|
2070
2091
|
let last = Math.max(...secondNumbers);
|
|
2071
2092
|
for (let page = 3; page <= 1e3 && second.versions.length === pageSize; page++) {
|
|
2072
|
-
const next = readPage(page);
|
|
2093
|
+
const next = await readPage(page);
|
|
2073
2094
|
if (next.result.status !== 0 || !next.versions) return failed("The Cloudflare Worker version history was not readable.");
|
|
2074
2095
|
if (next.versions.length === 0) break;
|
|
2075
2096
|
const numbers = next.versions.map((item) => item.number);
|
|
@@ -2088,7 +2109,7 @@ function createCfVersionRunner(options) {
|
|
|
2088
2109
|
};
|
|
2089
2110
|
}
|
|
2090
2111
|
if (args[0] === "versions" && args[1] === "view" && args[2]) {
|
|
2091
|
-
const result = run([
|
|
2112
|
+
const result = await run([
|
|
2092
2113
|
"workers",
|
|
2093
2114
|
"versions",
|
|
2094
2115
|
"get",
|
|
@@ -2201,7 +2222,7 @@ function createCfVersionRunner(options) {
|
|
|
2201
2222
|
await readBuildOutput(directory);
|
|
2202
2223
|
const verified = await verifyResources(directory);
|
|
2203
2224
|
if (verified.status !== 0 || verified.signal || verified.error) return verified;
|
|
2204
|
-
return run([
|
|
2225
|
+
return await run([
|
|
2205
2226
|
"workers",
|
|
2206
2227
|
"triggers",
|
|
2207
2228
|
"deploy",
|
|
@@ -2217,13 +2238,13 @@ function createCfVersionRunner(options) {
|
|
|
2217
2238
|
if (args[0] === "queues" && args[1] === "consumer" && args[2] === "remove") {
|
|
2218
2239
|
const queueName = args[3];
|
|
2219
2240
|
if (!queueName || args[4] !== workerName) return failed("The Cloudflare Queue consumer target changed.");
|
|
2220
|
-
const queues = run(["queues", "list"], true);
|
|
2241
|
+
const queues = await run(["queues", "list"], true);
|
|
2221
2242
|
if (queues.status !== 0) return queues;
|
|
2222
2243
|
const allQueues = parseJson(queues.stdout);
|
|
2223
2244
|
if (!Array.isArray(allQueues)) return failed("The Cloudflare Queue list was not readable.");
|
|
2224
2245
|
const queue = allQueues.find((item) => record(item) && item.queue_name === queueName);
|
|
2225
2246
|
if (!record(queue) || typeof queue.queue_id !== "string") return failed(`Cloudflare Queue ${queueName} was not found.`);
|
|
2226
|
-
const consumers = run([
|
|
2247
|
+
const consumers = await run([
|
|
2227
2248
|
"queues",
|
|
2228
2249
|
"consumers",
|
|
2229
2250
|
"list",
|
|
@@ -6112,8 +6133,9 @@ async function checkWranglerMigrationApplySet(configPath, config, binding, migra
|
|
|
6112
6133
|
* child env (via {@link deployChildEnv} — reused provisioner scrub/pin: CF Access +
|
|
6113
6134
|
* every transport selector incl. `CLOUDFLARE_ENV` + the deploy config-override vars
|
|
6114
6135
|
* scrubbed, one account + API base pinned), so `whoami`/`migrate`/`deploy` can never
|
|
6115
|
-
* consult a different ambient account or endpoint.
|
|
6116
|
-
* `opts.env` layers one more pin
|
|
6136
|
+
* consult a different ambient account or endpoint. Noninteractive output is captured so Void
|
|
6137
|
+
* controls the terminal; browser login still inherits stdio. `opts.env` layers one more pin
|
|
6138
|
+
* over the child env for a single spawn (`auth token` gets
|
|
6117
6139
|
* `WRANGLER_WRITE_LOGS=false`, see {@link runWranglerAuthToken}).
|
|
6118
6140
|
*/
|
|
6119
6141
|
function createDeployWranglerRunner(root, accountId, apiBaseUrl) {
|
|
@@ -6125,14 +6147,14 @@ function createDeployWranglerRunner(root, accountId, apiBaseUrl) {
|
|
|
6125
6147
|
if (opts.env) Object.assign(childEnv, opts.env);
|
|
6126
6148
|
const result = spawnSync(command, [...prefix, ...args], {
|
|
6127
6149
|
cwd: root,
|
|
6128
|
-
stdio: interactiveLogin ? "inherit" : opts.input === void 0 ?
|
|
6150
|
+
stdio: interactiveLogin ? "inherit" : opts.input === void 0 ? [
|
|
6129
6151
|
"ignore",
|
|
6130
6152
|
"pipe",
|
|
6131
6153
|
"pipe"
|
|
6132
|
-
] :
|
|
6154
|
+
] : [
|
|
6155
|
+
"pipe",
|
|
6133
6156
|
"pipe",
|
|
6134
|
-
|
|
6135
|
-
opts.capture ? "pipe" : "inherit"
|
|
6157
|
+
"pipe"
|
|
6136
6158
|
],
|
|
6137
6159
|
input: opts.input,
|
|
6138
6160
|
encoding: "utf-8",
|
|
@@ -6860,6 +6882,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
|
|
|
6860
6882
|
log.error(`deploy: build failed — ${getErrorMessage(err)}`);
|
|
6861
6883
|
return exit(getExitCode(err));
|
|
6862
6884
|
}
|
|
6885
|
+
log.step("Preparing deployment...");
|
|
6863
6886
|
if (detectedFramework && frameworkPreset) try {
|
|
6864
6887
|
await (deps.prepareFrameworkArtifact ?? prepareCloudflareFrameworkArtifact)(root, configPath, accountId, workerName, voidConfig, detectedFramework, frameworkPreset, schemaFacts.requiredKeys, needsAI ? { binding: aiBindingName } : void 0);
|
|
6865
6888
|
} catch (error) {
|
|
@@ -7106,6 +7129,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
|
|
|
7106
7129
|
}
|
|
7107
7130
|
}
|
|
7108
7131
|
if (d1MigrateToken) {
|
|
7132
|
+
log.step("Applying D1 migrations...");
|
|
7109
7133
|
if (!assertUploaderStillPinned()) return exit(1);
|
|
7110
7134
|
const migrate = await Promise.resolve(runWrangler([
|
|
7111
7135
|
"d1",
|
|
@@ -7207,7 +7231,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
|
|
|
7207
7231
|
verifyCompatibilityRunner: assertUploaderStillPinned
|
|
7208
7232
|
})
|
|
7209
7233
|
}) : runWrangler;
|
|
7210
|
-
const execution = await (deps.activateVersion ?? activateCloudflareVersion
|
|
7234
|
+
const execution = await activateCloudflareVersionWithProgress(deps.activateVersion ?? activateCloudflareVersion, {
|
|
7211
7235
|
runWrangler: activationRunner,
|
|
7212
7236
|
verifyUploader: cfOutput ? cfUploaderIsPinned : assertUploaderStillPinned,
|
|
7213
7237
|
workerName,
|
|
@@ -7291,6 +7315,18 @@ async function reportCloudflareActivationFailure(cliLog, message) {
|
|
|
7291
7315
|
await cliLog.close().catch(() => {});
|
|
7292
7316
|
log.error(`${message}${cliLog.path ? `\n\nDetailed log: ${cliLog.path}` : ""}`);
|
|
7293
7317
|
}
|
|
7318
|
+
async function activateCloudflareVersionWithProgress(activate, options) {
|
|
7319
|
+
const progress = createSpinner();
|
|
7320
|
+
progress.start("Checking the current Worker deployment...");
|
|
7321
|
+
try {
|
|
7322
|
+
return await activate({
|
|
7323
|
+
...options,
|
|
7324
|
+
onProgress: (message) => progress.message(message)
|
|
7325
|
+
});
|
|
7326
|
+
} finally {
|
|
7327
|
+
progress.stop();
|
|
7328
|
+
}
|
|
7329
|
+
}
|
|
7294
7330
|
function formatCloudflareActivationError(result) {
|
|
7295
7331
|
const status = result.status === void 0 ? "" : ` (exit ${String(result.status)})`;
|
|
7296
7332
|
const cloudflareCode = result.cloudflareErrorCode === void 0 ? "" : ` Cloudflare error code: ${String(result.cloudflareErrorCode)}.`;
|
|
@@ -7565,6 +7601,7 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
7565
7601
|
return exit(getExitCode(error));
|
|
7566
7602
|
}
|
|
7567
7603
|
}
|
|
7604
|
+
log.step("Preparing deployment...");
|
|
7568
7605
|
if (!existsSync(preset.outputDir)) {
|
|
7569
7606
|
log.error(`deploy: Output directory '${preset.outputDir}' not found. Run the build first.`);
|
|
7570
7607
|
return exit(1);
|
|
@@ -7649,7 +7686,7 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
7649
7686
|
verifyCompatibilityRunner: uploaderIsPinned
|
|
7650
7687
|
})
|
|
7651
7688
|
}) : runWrangler;
|
|
7652
|
-
const execution = await (deps.activateVersion ?? activateCloudflareVersion
|
|
7689
|
+
const execution = await activateCloudflareVersionWithProgress(deps.activateVersion ?? activateCloudflareVersion, {
|
|
7653
7690
|
runWrangler: activationRunner,
|
|
7654
7691
|
verifyUploader: cfOutput ? cfUploaderIsPinned : uploaderIsPinned,
|
|
7655
7692
|
configPath: staticConfigPath,
|
|
@@ -7818,7 +7855,7 @@ async function runManagedDeploy(root, options, cliLog) {
|
|
|
7818
7855
|
}
|
|
7819
7856
|
token ??= getToken(root);
|
|
7820
7857
|
if (!token) {
|
|
7821
|
-
log.error("No auth token found. Run `void
|
|
7858
|
+
log.error("No auth token found. Run `void account login` first.");
|
|
7822
7859
|
process.exit(1);
|
|
7823
7860
|
}
|
|
7824
7861
|
const client = new PlatformClient(token, {
|
|
@@ -7905,7 +7942,7 @@ async function runManagedDeploy(root, options, cliLog) {
|
|
|
7905
7942
|
} catch (error) {
|
|
7906
7943
|
if (isExpiredTokenError(error)) {
|
|
7907
7944
|
if (getTokenSource() === "ci") throw new Error("`VOID_TOKEN` is invalid or expired. Generate a new token and try again.");
|
|
7908
|
-
if (!process.stdin.isTTY || reauthenticated) throw new Error("Auth token expired. Run `void
|
|
7945
|
+
if (!process.stdin.isTTY || reauthenticated) throw new Error("Auth token expired. Run `void account login` and try again.");
|
|
7909
7946
|
log.warn("Auth token expired. Re-authenticating...");
|
|
7910
7947
|
await promptForLoginToken(root);
|
|
7911
7948
|
log.success("Re-authenticated. Retrying deploy...");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as parseRootWranglerConfig, f as checkWranglerMigrationApplySet, q as runDeploy } from "./deploy-
|
|
1
|
+
import { A as parseRootWranglerConfig, f as checkWranglerMigrationApplySet, q as runDeploy } from "./deploy-Bsymb0_c.mjs";
|
|
2
2
|
export { checkWranglerMigrationApplySet, parseRootWranglerConfig, runDeploy };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { c as import_picocolors } from "./output-CCH48AMM.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B9_D6ygs.mjs";
|
|
3
3
|
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-CWNIPoXc.mjs";
|
|
4
4
|
import { N as note, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
@@ -10,7 +10,7 @@ async function runDomainCommand(root, args) {
|
|
|
10
10
|
if (platform === "none") throw new Error("domain: Deployment is disabled. Run `void init` to choose a platform.");
|
|
11
11
|
const token = getToken(root);
|
|
12
12
|
if (!token) {
|
|
13
|
-
log.error("Not logged in. Run `void
|
|
13
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
const client = new PlatformClient(token, { root });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-4WkAWhWx.mjs";
|
|
2
|
-
import { c as import_picocolors, i as createSpinner } from "./output-
|
|
3
|
-
import { I as resolveDeployTransport, O as isWranglerNonInteractiveOrCI, Y as runWranglerAuthToken, _ as deriveWorkerName, _t as preflightEmail, gt as findEmailConfigConflicts, h as createDeployWranglerRunner, ht as createNodeEmailDns, k as loadProvisionModule, mt as applyEmailSetup, v as discoverRootWranglerConfig, vt as renderAddressMap, yt as renderEmailChecklist } from "./deploy-
|
|
2
|
+
import { c as import_picocolors, i as createSpinner } from "./output-CCH48AMM.mjs";
|
|
3
|
+
import { I as resolveDeployTransport, O as isWranglerNonInteractiveOrCI, Y as runWranglerAuthToken, _ as deriveWorkerName, _t as preflightEmail, gt as findEmailConfigConflicts, h as createDeployWranglerRunner, ht as createNodeEmailDns, k as loadProvisionModule, mt as applyEmailSetup, v as discoverRootWranglerConfig, vt as renderAddressMap, yt as renderEmailChecklist } from "./deploy-Bsymb0_c.mjs";
|
|
4
4
|
import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
|
|
5
5
|
import { c as getToken, d as openBrowser } from "./auth-B9_D6ygs.mjs";
|
|
6
6
|
import { o as readProjectConfig } from "./project-CWNIPoXc.mjs";
|
|
@@ -26,7 +26,7 @@ async function runEmailCommand(root, args) {
|
|
|
26
26
|
}
|
|
27
27
|
const token = getToken(root);
|
|
28
28
|
if (!token) {
|
|
29
|
-
log.error("Not logged in. Run `void
|
|
29
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
30
30
|
process.exit(1);
|
|
31
31
|
}
|
|
32
32
|
const client = new PlatformClient(token, { root });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join } from "./dist-4WkAWhWx.mjs";
|
|
2
|
-
import { r as cliTitle } from "./output-
|
|
2
|
+
import { r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
3
3
|
import { c as getToken } from "./auth-B9_D6ygs.mjs";
|
|
4
4
|
import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-CWNIPoXc.mjs";
|
|
5
5
|
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-CWDtqHgw.mjs";
|
|
@@ -31,7 +31,7 @@ async function runCheck(root, useRemoteSecrets) {
|
|
|
31
31
|
} else {
|
|
32
32
|
const token = getToken(root);
|
|
33
33
|
if (!token) {
|
|
34
|
-
log.error("--remote requires authentication. Run `void
|
|
34
|
+
log.error("--remote requires authentication. Run `void account login` first.");
|
|
35
35
|
process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
const config = readProjectConfig(root);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, l as relative, n as dirname } from "./dist-4WkAWhWx.mjs";
|
|
2
|
-
import { r as cliTitle } from "./output-
|
|
2
|
+
import { r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
3
3
|
import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
|
|
4
4
|
import { m as readConfig, u as getDatabaseDialect } from "./config-Dxr6cTXn.mjs";
|
|
5
5
|
import { n as ensureProjectTsconfig } from "./project-tsconfig-CwfqUnVp.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as import_picocolors } from "./output-
|
|
1
|
+
import { c as import_picocolors } from "./output-CCH48AMM.mjs";
|
|
2
2
|
import { c as getToken, d as openBrowser, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback } from "./auth-B9_D6ygs.mjs";
|
|
3
3
|
import { o as readProjectConfig } from "./project-CWNIPoXc.mjs";
|
|
4
4
|
import { B as text, E as confirm, I as select, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
|
|
@@ -102,7 +102,7 @@ function formatConnection(connection) {
|
|
|
102
102
|
async function runGithubCommand(root, args) {
|
|
103
103
|
const token = getToken(root);
|
|
104
104
|
if (!token) {
|
|
105
|
-
log.error("Not logged in. Run `void
|
|
105
|
+
log.error("Not logged in. Run `void account login` first.");
|
|
106
106
|
process.exit(1);
|
|
107
107
|
}
|
|
108
108
|
const client = new PlatformClient(token, { root });
|
|
@@ -122,7 +122,7 @@ async function runGithubCommand(root, args) {
|
|
|
122
122
|
*
|
|
123
123
|
* If the account has no linked GitHub identity, the server returns a 403 with
|
|
124
124
|
* the stable code `github_identity_required` (Task 3). Rather than telling the
|
|
125
|
-
* user to `void
|
|
125
|
+
* user to `void account login` (which risks forking into a second account), we run
|
|
126
126
|
* the link flow inline and retry the install URL exactly once.
|
|
127
127
|
*
|
|
128
128
|
* `linkIdentity` is injectable so tests can supply a fake linker instead of
|
|
@@ -155,7 +155,7 @@ async function runInstall(root, client, linkIdentity = runGithubLink) {
|
|
|
155
155
|
/**
|
|
156
156
|
* Link the current Void account (the logged-in CLI token holder) to a GitHub
|
|
157
157
|
* identity. Drives the platform's 3-endpoint link flow with a localhost +
|
|
158
|
-
* PKCE handshake, mirroring `void
|
|
158
|
+
* PKCE handshake, mirroring `void account login`.
|
|
159
159
|
*
|
|
160
160
|
* Exported so Task 5 can call it (e.g. when `github install` returns 403 for a
|
|
161
161
|
* GitHub-less account, prompt to link and retry). The success path is
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join } from "./dist-4WkAWhWx.mjs";
|
|
2
|
-
import { c as import_picocolors, l as sectionTitle, s as helpLine, t as categoryTitle } from "./output-
|
|
2
|
+
import { c as import_picocolors, l as sectionTitle, s as helpLine, t as categoryTitle } from "./output-CCH48AMM.mjs";
|
|
3
3
|
import { N as note, P as outro } from "./dist-Dn6nn2IU.mjs";
|
|
4
4
|
import { n as getPackageDir } from "./agents-gni4eqBu.mjs";
|
|
5
5
|
import { t as OPERATOR_MAX_TIMEOUT_MS } from "./operator-client-A0iex2yi.mjs";
|
|
@@ -772,8 +772,35 @@ const HELP_TREE = {
|
|
|
772
772
|
]
|
|
773
773
|
},
|
|
774
774
|
auth: {
|
|
775
|
-
summary: "
|
|
776
|
-
usage: ["void auth <
|
|
775
|
+
summary: "Authenticate with this project’s saved Cloudflare or Void destination. Without one, choose interactively or pass --platform.",
|
|
776
|
+
usage: ["void auth <login|status|logout> [--platform cloudflare|void]"],
|
|
777
|
+
commands: [
|
|
778
|
+
{
|
|
779
|
+
command: "login",
|
|
780
|
+
description: "Sign in to the selected destination"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
command: "status",
|
|
784
|
+
description: "Show the selected destination’s identity"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
command: "logout",
|
|
788
|
+
description: "Sign out of the selected destination"
|
|
789
|
+
}
|
|
790
|
+
],
|
|
791
|
+
options: [{
|
|
792
|
+
command: "--platform <cloudflare|void>",
|
|
793
|
+
description: "Choose the destination explicitly"
|
|
794
|
+
}],
|
|
795
|
+
children: {
|
|
796
|
+
login: basicSubcommand("Sign in to the selected destination.", "void auth login [--platform cloudflare|void]"),
|
|
797
|
+
status: basicSubcommand("Show the selected destination’s identity.", "void auth status [--platform cloudflare|void]"),
|
|
798
|
+
logout: basicSubcommand("Sign out of the selected destination.", "void auth logout [--platform cloudflare|void]")
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
account: {
|
|
802
|
+
summary: "Manage your Void platform account.",
|
|
803
|
+
usage: ["void account <command>"],
|
|
777
804
|
commands: [
|
|
778
805
|
{
|
|
779
806
|
command: "login",
|
|
@@ -797,11 +824,11 @@ const HELP_TREE = {
|
|
|
797
824
|
}
|
|
798
825
|
],
|
|
799
826
|
children: {
|
|
800
|
-
login: basicSubcommand("Log in with an enabled platform login method.", "void
|
|
801
|
-
link: basicSubcommand("Sign in again, then verify and link another login method to your existing account.", "void
|
|
802
|
-
logout: basicSubcommand("Log out and remove credentials.", "void
|
|
803
|
-
whoami: basicSubcommand("Show the logged-in username.", "void
|
|
804
|
-
token: basicSubcommand("Copy auth token to clipboard.", "void
|
|
827
|
+
login: basicSubcommand("Log in with an enabled platform login method.", "void account login"),
|
|
828
|
+
link: basicSubcommand("Sign in again, then verify and link another login method to your existing account.", "void account link [connection-id]"),
|
|
829
|
+
logout: basicSubcommand("Log out and remove credentials.", "void account logout"),
|
|
830
|
+
whoami: basicSubcommand("Show the logged-in username.", "void account whoami"),
|
|
831
|
+
token: basicSubcommand("Copy auth token to clipboard.", "void account token")
|
|
805
832
|
}
|
|
806
833
|
},
|
|
807
834
|
cloudflare: {
|
|
@@ -2086,6 +2113,10 @@ function printGlobalHelp() {
|
|
|
2086
2113
|
"",
|
|
2087
2114
|
...globalCommandGroup("auth"),
|
|
2088
2115
|
"",
|
|
2116
|
+
...globalCommandGroup("account"),
|
|
2117
|
+
"",
|
|
2118
|
+
...globalCommandGroup("cloudflare"),
|
|
2119
|
+
"",
|
|
2089
2120
|
...globalCommandGroup("platform"),
|
|
2090
2121
|
"",
|
|
2091
2122
|
...globalCommandGroup("project"),
|
|
@@ -2124,7 +2155,7 @@ function printGlobalHelp() {
|
|
|
2124
2155
|
helpLine("void help <command>", "Show command-specific help"),
|
|
2125
2156
|
helpLine("void <command> --help", "Show command-specific help")
|
|
2126
2157
|
].join("\n"), sectionTitle("Commands"));
|
|
2127
|
-
note([helpLine("VOID_TOKEN", "Auth token (or use `void
|
|
2158
|
+
note([helpLine("VOID_TOKEN", "Auth token (or use `void account login`)"), helpLine("VOID_PROJECT", "Deploy target project name override")].join("\n"), sectionTitle("Environment"));
|
|
2128
2159
|
outro("https://void.cloud");
|
|
2129
2160
|
}
|
|
2130
2161
|
function printVoidHeader() {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
2
|
import { a as join, l as relative, n as dirname, u as resolve } from "./dist-4WkAWhWx.mjs";
|
|
3
|
-
import { d as require_picocolors } from "./output-
|
|
4
|
-
import { B as resolveDistDir, Ct as resolveAssetRoutingPolicy, W as resolveWorkerDirName, at as generateQueueResolverSource, bt as hasApiRoutes, dt as hasRevalidate, ft as scanDurableObjectModules, lt as collectPages, ot as prerenderPages, pt as SEND_EMAIL_BINDING, st as prerenderPagesNode, ut as collectRevalidate, xt as hasDocumentRoutes } from "./deploy-
|
|
3
|
+
import { d as require_picocolors } from "./output-CCH48AMM.mjs";
|
|
4
|
+
import { B as resolveDistDir, Ct as resolveAssetRoutingPolicy, W as resolveWorkerDirName, at as generateQueueResolverSource, bt as hasApiRoutes, dt as hasRevalidate, ft as scanDurableObjectModules, lt as collectPages, ot as prerenderPages, pt as SEND_EMAIL_BINDING, st as prerenderPagesNode, ut as collectRevalidate, xt as hasDocumentRoutes } from "./deploy-Bsymb0_c.mjs";
|
|
5
5
|
import { i as resolveProjectPaths, n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-CKQ-Q5JS.mjs";
|
|
6
6
|
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-uP7ZDtVZ.mjs";
|
|
7
7
|
import { r as scopedAccessCredentials } from "./cf-access-DRsQRe6k.mjs";
|
|
@@ -5611,7 +5611,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
|
|
|
5611
5611
|
let slug;
|
|
5612
5612
|
if (result === "__create__") {
|
|
5613
5613
|
const { validateProjectSlug } = await import("./project-slug-DofjTFd-.mjs");
|
|
5614
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
5614
|
+
const { createProjectWithSlugRetry } = await import("./create-project-JV9-6ICF.mjs");
|
|
5615
5615
|
let created;
|
|
5616
5616
|
try {
|
|
5617
5617
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -6196,7 +6196,7 @@ function voidPlugin(options) {
|
|
|
6196
6196
|
});
|
|
6197
6197
|
} else if (credentials.status === "no-token") afterReady(() => {
|
|
6198
6198
|
console.log();
|
|
6199
|
-
voidWarn("Remote mode requires authentication. Run `void
|
|
6199
|
+
voidWarn("Remote mode requires authentication. Run `void account login`, then restart.");
|
|
6200
6200
|
voidWarn("Falling back to local bindings.");
|
|
6201
6201
|
});
|
|
6202
6202
|
else afterReady(() => {
|
|
@@ -6209,7 +6209,7 @@ function voidPlugin(options) {
|
|
|
6209
6209
|
const credentials = readVoidDevCredentials(root);
|
|
6210
6210
|
if (credentials.status === "no-token") afterReady(() => {
|
|
6211
6211
|
console.log();
|
|
6212
|
-
voidWarn("AI requires authentication. Run `void
|
|
6212
|
+
voidWarn("AI requires authentication. Run `void account login`, then restart the dev server.");
|
|
6213
6213
|
});
|
|
6214
6214
|
else if (credentials.status === "no-project") {
|
|
6215
6215
|
if (process.stdin.isTTY) afterReady(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, l as relative, n as dirname, t as basename, u as resolve } from "./dist-4WkAWhWx.mjs";
|
|
2
|
-
import { r as cliTitle } from "./output-
|
|
2
|
+
import { r as cliTitle } from "./output-CCH48AMM.mjs";
|
|
3
3
|
import { n as readProjectPaths, o as TYPED_CONFIG_FILE } from "./project-paths-CKQ-Q5JS.mjs";
|
|
4
4
|
import { c as getToken, u as isStagingMode } from "./auth-B9_D6ygs.mjs";
|
|
5
5
|
import { d as writeProjectConfig, i as readDeploymentPlatform, l as writeDeploymentPlatform, o as readProjectConfig, t as attachSelectedPlatform } from "./project-CWNIPoXc.mjs";
|
|
@@ -15,10 +15,10 @@ import { n as getPackageDir, t as detectAgents } from "./agents-gni4eqBu.mjs";
|
|
|
15
15
|
import { n as PlatformClient } from "./client-PdAJ-F0t.mjs";
|
|
16
16
|
import { r as formatProjectCommand } from "./preset-Dowh9tTt.mjs";
|
|
17
17
|
import { n as writeVoidProjectConfig, t as canRewriteVoidProjectConfig } from "./config-write-y3CBI_ux.mjs";
|
|
18
|
-
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-
|
|
19
|
-
import { i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-
|
|
20
|
-
import { t as promptForLoginToken } from "./login-
|
|
21
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-
|
|
18
|
+
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-BV8qHiCb.mjs";
|
|
19
|
+
import { i as promptProjectSelection, r as promptAndCreateProject } from "./create-project-BZBl_gQ0.mjs";
|
|
20
|
+
import { t as promptForLoginToken } from "./login-BgQJzxAl.mjs";
|
|
21
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-CudokNIg.mjs";
|
|
22
22
|
import { t as connectCloudflare } from "./cloudflare-connect-DloREDlc.mjs";
|
|
23
23
|
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-CVEc3gE7.mjs";
|
|
24
24
|
import { createRequire } from "node:module";
|