void 1.12.1 → 1.12.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/dist/{account-cmd-BU1Fy_Bf.mjs → account-cmd-CdJQba_Q.mjs} +2 -2
- package/dist/{auth-link-Duu2NvN5.mjs → auth-link-D9MWA_dj.mjs} +2 -2
- package/dist/{auth-router-vgtOdb9j.mjs → auth-router-FskgTU3B.mjs} +1 -1
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/db-execute-process.mjs +1 -1
- package/dist/{cli-main-BrChcpE3.mjs → cli-main-DaLrQfPS.mjs} +11 -11
- package/dist/{connect-D0V0o40j.mjs → connect-WG4TcR_d.mjs} +2 -2
- package/dist/{db-BNPIjLkK.mjs → db-BSuWV1PI.mjs} +1 -1
- package/dist/{deploy-BgSbagIP.mjs → deploy-DtJeunLF.mjs} +1 -1
- package/dist/{deploy-Do6FWqon.mjs → deploy-GT4CW5fs.mjs} +1 -1
- package/dist/{email-DcQNP40O.mjs → email-DoDqRH6i.mjs} +1 -1
- package/dist/{init-C8YpkGIP.mjs → init-B2VZ2Hut.mjs} +2 -2
- package/dist/login-BbSQTZ6d.mjs +1 -0
- package/dist/{login-CWFr-G2I.mjs → login-jUBgfvzk.mjs} +1 -1
- package/dist/operator-cmd-jnjzuJKX.mjs +1 -0
- package/dist/{operator-cmd-a7yOf2tH.mjs → operator-cmd-wML5HNfS.mjs} +2 -2
- package/dist/{platform-auth-config-CpszX-Ne.mjs → platform-auth-config-Bv3oQ2gE.mjs} +3 -3
- package/dist/{platform-auth-protection-DA6Tw8Og.mjs → platform-auth-protection-OqzfhXwx.mjs} +2 -2
- package/dist/{platform-auth-recovery-Cztrb1JC.mjs → platform-auth-recovery-rmIYjXST.mjs} +2 -2
- package/dist/{platform-cmd-u1j88ggF.mjs → platform-cmd-B3rO4RhU.mjs} +1 -1
- package/dist/{platform-cmd-m6Asj6nO.mjs → platform-cmd-D_4z2Ijv.mjs} +3 -3
- package/dist/{platform-domain-DJSznNTA.mjs → platform-domain-CUq9odbd.mjs} +2 -2
- package/dist/{platform-lifecycle-BC-9p58d.mjs → platform-lifecycle-DOSYo0UI.mjs} +1 -1
- package/dist/{platform-lifecycle-GFeXv3NC.mjs → platform-lifecycle-DuoVruij.mjs} +86 -38
- package/dist/{platform-management-BwHkz46V.mjs → platform-management-D_gt3qLb.mjs} +1 -1
- package/dist/{platform-management-DX1zINou.mjs → platform-management-MmO9IubR.mjs} +1 -1
- package/dist/{platform-recovery-CnzBbudV.mjs → platform-recovery-P_FVslfd.mjs} +2 -2
- package/docs/guide/platform/installation/maintenance.md +2 -0
- package/package.json +7 -7
- package/dist/login-DECm3e9b.mjs +0 -1
- package/dist/operator-cmd-CVfK5U0B.mjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { L as log } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { c as getToken, f as removeToken } from "./auth-CqwJwItO.mjs";
|
|
3
3
|
import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
4
|
-
import { n as runLoginCommand } from "./login-
|
|
4
|
+
import { n as runLoginCommand } from "./login-jUBgfvzk.mjs";
|
|
5
5
|
import { y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
// src/cli/account-cmd.ts
|
|
8
8
|
async function runAccountCommand(root, args) {
|
|
9
9
|
switch (args.subcommand) {
|
|
10
10
|
case "login": return runLoginCommand(root);
|
|
11
|
-
case "link": return import("./auth-link-
|
|
11
|
+
case "link": return import("./auth-link-D9MWA_dj.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
12
12
|
case "logout":
|
|
13
13
|
if (removeToken(root)) printSuccess("Logged out.");
|
|
14
14
|
else log.info("Not logged in.");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { L as log } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
3
3
|
import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
4
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
4
|
+
import { r as selectPlatformLoginMethod } from "./login-jUBgfvzk.mjs";
|
|
5
5
|
import { f as formatUrl } from "./output-BZLnu0z8.mjs";
|
|
6
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-D_4z2Ijv.mjs";
|
|
7
7
|
// src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -43,7 +43,7 @@ async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isT
|
|
|
43
43
|
await runCloudflareCommand(root, { subcommand: args.subcommand });
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
46
|
+
const { runAccountCommand } = await import("./account-cmd-CdJQba_Q.mjs");
|
|
47
47
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
48
48
|
if (!destination.apiUrl) {
|
|
49
49
|
await runAccountCommand(root, { subcommand });
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -84,5 +84,5 @@ const message = unsupportedRuntimeMessage(process.versions, process.execPath);
|
|
|
84
84
|
if (message) {
|
|
85
85
|
process.stderr.write(`${message}\n`);
|
|
86
86
|
process.exitCode = 1;
|
|
87
|
-
} else await import("../cli-main-
|
|
87
|
+
} else await import("../cli-main-DaLrQfPS.mjs");
|
|
88
88
|
export {};
|
|
@@ -48,7 +48,7 @@ if (process.argv[2] === CHILD_COMMAND) try {
|
|
|
48
48
|
process.argv.splice(1, 2);
|
|
49
49
|
const { parseDbArgs } = await import("../db-args-BvMwAber.mjs");
|
|
50
50
|
const args = parseDbArgs(process.argv.slice(3));
|
|
51
|
-
const { runDbCommand } = await import("../db-
|
|
51
|
+
const { runDbCommand } = await import("../db-BSuWV1PI.mjs");
|
|
52
52
|
await runDbCommand(process.cwd(), args, (text) => writeFileSync(RESULT_FD, text));
|
|
53
53
|
} catch (error) {
|
|
54
54
|
log.error(formatCloudflareUserMessage(error instanceof Error ? error.message : String(error)), { output: process.stderr });
|
|
@@ -1383,20 +1383,20 @@ const args = process.argv.slice(2);
|
|
|
1383
1383
|
const command = args[0];
|
|
1384
1384
|
const helpPath = getHelpPath(args);
|
|
1385
1385
|
const subcommandGroups = {
|
|
1386
|
-
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("./auth-router-
|
|
1387
|
-
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("./account-cmd-
|
|
1388
|
-
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("./platform-cmd-
|
|
1386
|
+
auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("./auth-router-FskgTU3B.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
|
|
1387
|
+
account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("./account-cmd-CdJQba_Q.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
|
|
1388
|
+
platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("./platform-cmd-B3rO4RhU.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
|
|
1389
1389
|
cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("./cloudflare-cmd-SsFlJe2B.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
|
|
1390
1390
|
project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("./project-cmd-BWJTplpc.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
|
|
1391
1391
|
secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("./secret-C-WBaUSS.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
|
|
1392
1392
|
domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("./domain-mweyYXSw.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
|
|
1393
|
-
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("./email-
|
|
1393
|
+
email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("./email-DoDqRH6i.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
|
|
1394
1394
|
db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, async (root, parsed) => {
|
|
1395
1395
|
if (parsed.action === "execute" && parsed.json) {
|
|
1396
1396
|
const { runDbExecuteProcess } = await import("./cli/db-execute-process.mjs");
|
|
1397
1397
|
await runDbExecuteProcess(root, args);
|
|
1398
1398
|
} else {
|
|
1399
|
-
const { runDbCommand } = await import("./db-
|
|
1399
|
+
const { runDbCommand } = await import("./db-BSuWV1PI.mjs");
|
|
1400
1400
|
await runDbCommand(root, parsed);
|
|
1401
1401
|
}
|
|
1402
1402
|
}),
|
|
@@ -1422,14 +1422,14 @@ if (helpPath) {
|
|
|
1422
1422
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1423
1423
|
process.exit(1);
|
|
1424
1424
|
}
|
|
1425
|
-
const { runDeploy } = await import("./deploy-
|
|
1425
|
+
const { runDeploy } = await import("./deploy-GT4CW5fs.mjs");
|
|
1426
1426
|
await runDeploy(root, deployArgs).catch((err) => {
|
|
1427
1427
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1428
1428
|
process.exit(1);
|
|
1429
1429
|
});
|
|
1430
1430
|
} else if (command === "connect") await (async () => {
|
|
1431
1431
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1432
|
-
const { runConnectCommand } = await import("./connect-
|
|
1432
|
+
const { runConnectCommand } = await import("./connect-WG4TcR_d.mjs");
|
|
1433
1433
|
await runConnectCommand(process.cwd(), parsed);
|
|
1434
1434
|
})().catch((err) => {
|
|
1435
1435
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
@@ -1464,7 +1464,7 @@ else if (command === "prepare") {
|
|
|
1464
1464
|
});
|
|
1465
1465
|
} else if (command === "init") {
|
|
1466
1466
|
const root = process.cwd();
|
|
1467
|
-
await import("./init-
|
|
1467
|
+
await import("./init-B2VZ2Hut.mjs").then(async ({ runInitCommand, parseInitArgs }) => {
|
|
1468
1468
|
let initArgs;
|
|
1469
1469
|
try {
|
|
1470
1470
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1603,12 +1603,12 @@ else if (command) {
|
|
|
1603
1603
|
if (hasOwnKey(subcommandGroups, cmd)) return subcommandGroups[cmd]();
|
|
1604
1604
|
switch (cmd) {
|
|
1605
1605
|
case "connect": {
|
|
1606
|
-
const { runConnectCommand } = await import("./connect-
|
|
1606
|
+
const { runConnectCommand } = await import("./connect-WG4TcR_d.mjs");
|
|
1607
1607
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1608
1608
|
return;
|
|
1609
1609
|
}
|
|
1610
1610
|
case "init": {
|
|
1611
|
-
const { runInitCommand, parseInitArgs } = await import("./init-
|
|
1611
|
+
const { runInitCommand, parseInitArgs } = await import("./init-B2VZ2Hut.mjs");
|
|
1612
1612
|
await runInitCommand(root, parseInitArgs([]));
|
|
1613
1613
|
return;
|
|
1614
1614
|
}
|
|
@@ -1618,7 +1618,7 @@ else if (command) {
|
|
|
1618
1618
|
return;
|
|
1619
1619
|
}
|
|
1620
1620
|
case "deploy": {
|
|
1621
|
-
const { runDeploy } = await import("./deploy-
|
|
1621
|
+
const { runDeploy } = await import("./deploy-GT4CW5fs.mjs");
|
|
1622
1622
|
await runDeploy(root);
|
|
1623
1623
|
return;
|
|
1624
1624
|
}
|
|
@@ -2,9 +2,9 @@ import { K as select, L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
|
2
2
|
import { d as readPlatformToken } from "./auth-CqwJwItO.mjs";
|
|
3
3
|
import { a as isExpiredTokenError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
4
4
|
import { t as connectCloudflare } from "./cloudflare-connect-BgpHcSg3.mjs";
|
|
5
|
-
import { t as promptForLoginToken } from "./login-
|
|
5
|
+
import { t as promptForLoginToken } from "./login-jUBgfvzk.mjs";
|
|
6
6
|
import { y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
7
|
-
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-
|
|
7
|
+
import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-D_4z2Ijv.mjs";
|
|
8
8
|
import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-DHH6fivm.mjs";
|
|
9
9
|
import { c as writeDeploymentPlatform, l as writePlatformSelection, n as readDeploymentPlatform } from "./project-dh9431bN.mjs";
|
|
10
10
|
// src/cli/connect.ts
|
|
@@ -2251,7 +2251,7 @@ async function runMigrate(root, dialect, remote) {
|
|
|
2251
2251
|
log.error(`db: D1 binding ${binding} has no "migrations_dir", so Cloudflare would apply ./migrations instead of ${dir}/. Add "migrations_dir": "./${dir}" to that D1 binding in your Cloudflare config, then run the command again.`);
|
|
2252
2252
|
process.exit(1);
|
|
2253
2253
|
}
|
|
2254
|
-
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-
|
|
2254
|
+
const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-GT4CW5fs.mjs");
|
|
2255
2255
|
const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations, paths.sourceRelative("db/migrations"));
|
|
2256
2256
|
if (!applySet.ok) {
|
|
2257
2257
|
log.error(applySet.reason);
|
|
@@ -51,7 +51,7 @@ import { t as collectGitDeployMetadata } from "./git-metadata-BEokJ6US.mjs";
|
|
|
51
51
|
import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
|
|
52
52
|
import { r as getPackageDir } from "./agents-64FnLwxP.mjs";
|
|
53
53
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
54
|
-
import { t as promptForLoginToken } from "./login-
|
|
54
|
+
import { t as promptForLoginToken } from "./login-jUBgfvzk.mjs";
|
|
55
55
|
import { s as listPlatformConnections } from "./platform-registry-DHH6fivm.mjs";
|
|
56
56
|
import { t as getRequestedProjectSlug } from "./resolve-project-8WZ3iVmr.mjs";
|
|
57
57
|
import { createRequire } from "node:module";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "./deploy-transport-BKP_oV9q.mjs";
|
|
2
|
-
export { i as checkWranglerMigrationApplySet, t as parseRootWranglerConfig, r as runDeploy } from "./deploy-
|
|
2
|
+
export { i as checkWranglerMigrationApplySet, t as parseRootWranglerConfig, r as runDeploy } from "./deploy-DtJeunLF.mjs";
|
|
@@ -5,7 +5,7 @@ import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
|
|
|
5
5
|
import { f as scanEmailHandlersSync } from "./application-analysis-DVeN8yoi.mjs";
|
|
6
6
|
import { c as getToken, u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
7
7
|
import { n as PlatformApiError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
8
|
-
import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-
|
|
8
|
+
import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-DtJeunLF.mjs";
|
|
9
9
|
import { a as emailConfigInputs, c as preflightEmail, d as renderEmailChecklist, i as createNodeEmailDns, l as probeMx, o as formatSendingOnlyPaidHint, r as applyEmailSetup, s as isAwaitingSendingOnboarding, u as renderAddressMap } from "./email-cloudflare-DeYH3Ke7.mjs";
|
|
10
10
|
import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
11
11
|
import { i as resolveCommandProjectId } from "./resolve-project-8WZ3iVmr.mjs";
|
|
@@ -16,13 +16,13 @@ import { t as connectCloudflare } from "./cloudflare-connect-BgpHcSg3.mjs";
|
|
|
16
16
|
import { c as getToken } from "./auth-CqwJwItO.mjs";
|
|
17
17
|
import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
|
|
18
18
|
import { a as promptProjectSelection, r as promptAndCreateProject } from "./create-project-8FdN6D2i.mjs";
|
|
19
|
-
import { t as promptForLoginToken } from "./login-
|
|
19
|
+
import { t as promptForLoginToken } from "./login-jUBgfvzk.mjs";
|
|
20
20
|
import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-dh9431bN.mjs";
|
|
21
21
|
import { t as parseDotenvFile } from "./dotenv-BG6RQavH.mjs";
|
|
22
22
|
import { i as migrateFrameworkAdapterPaths, t as migrateLegacyVoidConfig } from "./migrate-BNZL1hee.mjs";
|
|
23
23
|
import { _ as printDone, a as createSpinner, f as formatUrl, g as note, l as formatDuration, v as printNextStep, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
24
24
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
25
|
-
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-
|
|
25
|
+
import { i as saveDiscoveredPlatform, t as discoverPlatform } from "./platform-cmd-D_4z2Ijv.mjs";
|
|
26
26
|
import { d as findWorkspaceMemberRoot, f as findWorkspaceRoot, h as patchViteConfigWithVoidPlugin, m as stripYamlLineComment, p as parsePackageManagerField, s as formatProjectCommand } from "./cloudflare-process-60r4Z2Zf.mjs";
|
|
27
27
|
import { i as hasLocalLockfile, n as drizzleKitBin, r as findInstalledYarnPnpRuntime, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DgWbE7z5.mjs";
|
|
28
28
|
import { createRequire } from "node:module";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as selectPlatformLoginMethod } from "./login-jUBgfvzk.mjs";
|
|
@@ -32,7 +32,7 @@ async function selectPlatformLoginMethod(platform, requestedId) {
|
|
|
32
32
|
}
|
|
33
33
|
async function promptForLoginToken(root = process.cwd(), platform) {
|
|
34
34
|
const apiUrl = platform?.apiUrl ?? getApiUrl(root);
|
|
35
|
-
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-
|
|
35
|
+
const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-B3rO4RhU.mjs")).discoverPlatform(apiUrl));
|
|
36
36
|
const s = createSpinner();
|
|
37
37
|
s.start(`Opening browser for ${providerName} login...`);
|
|
38
38
|
try {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { s as runOperatorCommand } from "./operator-cmd-wML5HNfS.mjs";
|
|
@@ -191,8 +191,8 @@ async function runAuth(origin, args) {
|
|
|
191
191
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
192
192
|
if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
|
|
193
193
|
const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
|
|
194
|
-
const { discoverPlatform } = await import("./platform-cmd-
|
|
195
|
-
const { selectPlatformLoginMethod } = await import("./login-
|
|
194
|
+
const { discoverPlatform } = await import("./platform-cmd-B3rO4RhU.mjs");
|
|
195
|
+
const { selectPlatformLoginMethod } = await import("./login-BbSQTZ6d.mjs");
|
|
196
196
|
const { runPlatformLogin } = await import("./auth-A7cZ8aXA.mjs");
|
|
197
197
|
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
|
|
198
198
|
})();
|
|
@@ -2,7 +2,7 @@ import { A as confirm, K as select, U as password, X as text, z as multiselect }
|
|
|
2
2
|
import { u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
3
3
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-DMvn-y9X.mjs";
|
|
4
4
|
import { n as OperatorClient } from "./operator-client-dFNnXfyB.mjs";
|
|
5
|
-
import { i as humanLines } from "./operator-cmd-
|
|
5
|
+
import { i as humanLines } from "./operator-cmd-wML5HNfS.mjs";
|
|
6
6
|
import { f as formatUrl, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
7
7
|
import { o as platformPromptAnswer } from "./platform-setup-Lph9i-rh.mjs";
|
|
8
8
|
import { parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration } from "@void/platform";
|
|
@@ -142,11 +142,11 @@ async function configurationInput(args, existing) {
|
|
|
142
142
|
}
|
|
143
143
|
async function runPlatformAuthConfig(args) {
|
|
144
144
|
if (args.action === "recover") {
|
|
145
|
-
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-
|
|
145
|
+
const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-rmIYjXST.mjs");
|
|
146
146
|
return runPlatformAuthRecovery(args);
|
|
147
147
|
}
|
|
148
148
|
if (args.action === "protection") {
|
|
149
|
-
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-
|
|
149
|
+
const { runPlatformProtectionConfig } = await import("./platform-auth-protection-OqzfhXwx.mjs");
|
|
150
150
|
return runPlatformProtectionConfig(args);
|
|
151
151
|
}
|
|
152
152
|
const origin = resolveOperatorOrigin(args.connection);
|
package/dist/{platform-auth-protection-DA6Tw8Og.mjs → platform-auth-protection-OqzfhXwx.mjs}
RENAMED
|
@@ -4,8 +4,8 @@ import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
|
|
|
4
4
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-DMvn-y9X.mjs";
|
|
5
5
|
import { n as OperatorClient } from "./operator-client-dFNnXfyB.mjs";
|
|
6
6
|
import { y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
7
|
-
import { K as platformOperatorCredentialLabel, Q as preparePlatformAccessSetup, X as checkpointPlatformAccessResources, Z as parsePlatformAccessSetupSpec, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, v as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-
|
|
8
|
-
import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
7
|
+
import { K as platformOperatorCredentialLabel, Q as preparePlatformAccessSetup, X as checkpointPlatformAccessResources, Z as parsePlatformAccessSetupSpec, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, v as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-DuoVruij.mjs";
|
|
8
|
+
import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-MmO9IubR.mjs";
|
|
9
9
|
import { S as writePendingInstallationSecrets, c as normalizePlatformApiUrl, m as readInstallationRecoverySecrets, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-DHH6fivm.mjs";
|
|
10
10
|
import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
|
|
11
11
|
import { createHmac } from "node:crypto";
|
|
@@ -3,8 +3,8 @@ import { u as openBrowser } from "./auth-CqwJwItO.mjs";
|
|
|
3
3
|
import { a as resolveOperatorOrigin } from "./operator-auth-DMvn-y9X.mjs";
|
|
4
4
|
import { f as formatUrl, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
5
5
|
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
6
|
-
import { K as platformOperatorCredentialLabel, b as platformDatabaseClientUrl, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, y as acquirePlatformDatabaseLifecycleLockConnection } from "./platform-lifecycle-
|
|
7
|
-
import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
6
|
+
import { K as platformOperatorCredentialLabel, b as platformDatabaseClientUrl, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, y as acquirePlatformDatabaseLifecycleLockConnection } from "./platform-lifecycle-DuoVruij.mjs";
|
|
7
|
+
import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-MmO9IubR.mjs";
|
|
8
8
|
import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest } from "./platform-registry-DHH6fivm.mjs";
|
|
9
9
|
import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
|
|
10
10
|
import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-
|
|
1
|
+
export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-D_4z2Ijv.mjs";
|
|
@@ -103,12 +103,12 @@ async function runPlatformCommand(_root, args) {
|
|
|
103
103
|
await runPlatformPlansConfig(args);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const { runPlatformAuthConfig } = await import("./platform-auth-config-
|
|
106
|
+
const { runPlatformAuthConfig } = await import("./platform-auth-config-Bv3oQ2gE.mjs");
|
|
107
107
|
await runPlatformAuthConfig(args);
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (args.subcommand === "operator") {
|
|
111
|
-
const { runOperatorCommand } = await import("./operator-cmd-
|
|
111
|
+
const { runOperatorCommand } = await import("./operator-cmd-jnjzuJKX.mjs");
|
|
112
112
|
await runOperatorCommand(args);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -176,7 +176,7 @@ async function runPlatformCommand(_root, args) {
|
|
|
176
176
|
console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-
|
|
179
|
+
const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-DOSYo0UI.mjs");
|
|
180
180
|
await runPlatformLifecycleCommand(args);
|
|
181
181
|
}
|
|
182
182
|
function showSavedInstallationStatus(manifest) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as confirm, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
3
3
|
import { g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
4
|
-
import { A as recordResource, D as createPlatformHealthProbeToken, G as assertPlatformOperatorCredentialCanApplyPlan, K as platformOperatorCredentialLabel, M as recordPlatformWorkerTraffic, N as createPlatformInstallPlan, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, t as assertNoninteractivePlatformMutationAcknowledged, v as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-
|
|
5
|
-
import { f as verifyPlatformInstallationOwnership, o as resolveInstalledPlatformManifest, u as selectAuthoritativePlatformManifest } from "./platform-management-
|
|
4
|
+
import { A as recordResource, D as createPlatformHealthProbeToken, G as assertPlatformOperatorCredentialCanApplyPlan, K as platformOperatorCredentialLabel, M as recordPlatformWorkerTraffic, N as createPlatformInstallPlan, et as PlatformCloudflareClient, n as resolvePlatformInstallDatabaseUrl, q as resolvePlatformCloudflareCredential, t as assertNoninteractivePlatformMutationAcknowledged, v as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-DuoVruij.mjs";
|
|
5
|
+
import { f as verifyPlatformInstallationOwnership, o as resolveInstalledPlatformManifest, u as selectAuthoritativePlatformManifest } from "./platform-management-MmO9IubR.mjs";
|
|
6
6
|
import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
|
|
7
7
|
import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
|
|
8
8
|
// src/cli/platform-domain.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-
|
|
1
|
+
export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-DuoVruij.mjs";
|
|
@@ -789,6 +789,10 @@ var PlatformCloudflareClient = class PlatformCloudflareClient {
|
|
|
789
789
|
throw error;
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
|
+
async hasWorkerDurableObjectBinding(accountId, workerName, className) {
|
|
793
|
+
const { bindings } = await this.request(`/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(workerName)}/settings`);
|
|
794
|
+
return bindings.some((binding) => binding.type === "durable_object_namespace" && binding.class_name === className && (binding.script_name === void 0 || binding.script_name === workerName));
|
|
795
|
+
}
|
|
792
796
|
async getWorkerPlainTextBindings(accountId, workerName) {
|
|
793
797
|
const settings = await this.request(`/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(workerName)}/settings`);
|
|
794
798
|
const bindings = {};
|
|
@@ -4429,8 +4433,9 @@ function recordWorkerSecretUpdateState(manifest, generation, state, intentId, co
|
|
|
4429
4433
|
resultHash: intentId
|
|
4430
4434
|
}, completedAt);
|
|
4431
4435
|
}
|
|
4432
|
-
|
|
4433
|
-
|
|
4436
|
+
/** An older version may lack a newly provisioned class or hold a revoked credential. */
|
|
4437
|
+
function workerCutoverRollsForward(manifest, generation) {
|
|
4438
|
+
return manifest.steps.some((step) => step.key === `worker-secret-updates:${generation}:pending` || step.key === `worker-scheduler-migration:${generation}`);
|
|
4434
4439
|
}
|
|
4435
4440
|
function recordWorkerCutoverStage(manifest, generation, key, previousVersionId, stagedVersionId, workerName, previousTriggers, completedAt) {
|
|
4436
4441
|
return recordInstallationStep(manifest, {
|
|
@@ -4692,7 +4697,7 @@ async function recoverInterruptedPlatformWorkerCutover(input) {
|
|
|
4692
4697
|
const { interruptedCutover, configs, previousConfigs, plan, dependencies, ids, previousPublicEndpoints, hasEmailGatewayArtifact, runPinnedPlatformWrangler, now, writeRemoteInstallationCheckpoint, onManifestChange } = input;
|
|
4693
4698
|
let { manifest, workerActions } = input;
|
|
4694
4699
|
if (interruptedCutover) {
|
|
4695
|
-
const
|
|
4700
|
+
const rollForward = workerCutoverRollsForward(manifest, interruptedCutover.generation);
|
|
4696
4701
|
for (const key of [
|
|
4697
4702
|
"dispatch",
|
|
4698
4703
|
"tail",
|
|
@@ -4711,13 +4716,13 @@ async function recoverInterruptedPlatformWorkerCutover(input) {
|
|
|
4711
4716
|
...previousConfigs[key],
|
|
4712
4717
|
name: snapshot.workerName
|
|
4713
4718
|
}, preservedRoutes);
|
|
4714
|
-
if (
|
|
4719
|
+
if (rollForward) {
|
|
4715
4720
|
const directory = mkdtempSync(join(tmpdir(), "void-platform-resume-"));
|
|
4716
4721
|
try {
|
|
4717
4722
|
const configPath = join(directory, "wrangler.json");
|
|
4718
4723
|
writeFileSync(configPath, JSON.stringify(recoveryConfig), { mode: 384 });
|
|
4719
4724
|
const currentVersionId = await readActivePlatformWorkerVersion(configPath, plan.account.id, snapshot.workerName, runPinnedPlatformWrangler);
|
|
4720
|
-
if (currentVersionId !== snapshot.stagedVersionId && (snapshot.previousVersionId === null || currentVersionId !== snapshot.previousVersionId)) throw new Error(`Worker ${snapshot.workerName} changed concurrently
|
|
4725
|
+
if (currentVersionId !== snapshot.stagedVersionId && (snapshot.previousVersionId === null || currentVersionId !== snapshot.previousVersionId)) throw new Error(`Worker ${snapshot.workerName} changed concurrently during the retained cutover; refusing to overwrite it.`);
|
|
4721
4726
|
} finally {
|
|
4722
4727
|
rmSync(directory, {
|
|
4723
4728
|
force: true,
|
|
@@ -4760,8 +4765,8 @@ async function recoverInterruptedPlatformWorkerCutover(input) {
|
|
|
4760
4765
|
});
|
|
4761
4766
|
}
|
|
4762
4767
|
}
|
|
4763
|
-
manifest = recordWorkerCutoverResolution(manifest, interruptedCutover.generation,
|
|
4764
|
-
manifest = recordWorkerTrafficState(manifest, interruptedCutover.generation, !
|
|
4768
|
+
manifest = recordWorkerCutoverResolution(manifest, interruptedCutover.generation, rollForward ? "committed" : "restored", now());
|
|
4769
|
+
manifest = recordWorkerTrafficState(manifest, interruptedCutover.generation, !rollForward && previousPublicEndpoints && interruptedCutover.unsafeTraffic.size === 0, now());
|
|
4765
4770
|
onManifestChange(manifest);
|
|
4766
4771
|
writeInstallationManifest(manifest);
|
|
4767
4772
|
await writeRemoteInstallationCheckpoint(dependencies.client, plan, manifest);
|
|
@@ -5147,6 +5152,7 @@ async function deployPlatformWorker(config, secrets, options) {
|
|
|
5147
5152
|
if (nextTraffic.customDomains.length > 0) await options.publishCustomDomains(workerName, nextTraffic.customDomains);
|
|
5148
5153
|
if (options.managedRoutes.length > 0) await options.publishRoutes(workerName, options.managedRoutes);
|
|
5149
5154
|
await options.onTrafficPublished();
|
|
5155
|
+
if (options.provisionsDurableObject) return null;
|
|
5150
5156
|
const committedVersionId = uploadedVersionId;
|
|
5151
5157
|
const rollback = () => rollbackPlatformWorker({
|
|
5152
5158
|
accountId,
|
|
@@ -5170,7 +5176,7 @@ async function deployPlatformWorker(config, secrets, options) {
|
|
|
5170
5176
|
return rollback;
|
|
5171
5177
|
} catch (error) {
|
|
5172
5178
|
const unsafeTraffic = error instanceof PlatformWorkerCustomDomainsChangedError || error instanceof PlatformWorkerRoutesChangedError;
|
|
5173
|
-
const rollbackVersionId = activatedVersionId &&
|
|
5179
|
+
const rollbackVersionId = activatedVersionId && !options.provisionsDurableObject ? uploadedVersionId : null;
|
|
5174
5180
|
const recoveryFailures = await recoverFailedPlatformWorkerDeployment({
|
|
5175
5181
|
checkpointUnsafeTraffic: options.onUnsafeTraffic,
|
|
5176
5182
|
closeRoutingGate: options.retainNewWorker,
|
|
@@ -5341,7 +5347,14 @@ function platformWorkerDeployCallbacks(input) {
|
|
|
5341
5347
|
readCloudflare: (path) => client.request(path),
|
|
5342
5348
|
onStaged: async (previousVersionId, stagedVersionId, previousTriggers) => {
|
|
5343
5349
|
await checkpoint(async () => {
|
|
5344
|
-
|
|
5350
|
+
const completedAt = now();
|
|
5351
|
+
let next = recordWorkerCutoverStage(readManifest(), generation, key, previousVersionId, stagedVersionId, action.name, previousTriggers, completedAt);
|
|
5352
|
+
if (input.provisionsDurableObject) next = recordInstallationStep(next, {
|
|
5353
|
+
key: `worker-scheduler-migration:${generation}`,
|
|
5354
|
+
resultHash: "SecurityScanScheduler",
|
|
5355
|
+
completedAt
|
|
5356
|
+
}, completedAt);
|
|
5357
|
+
await writeManifest(next);
|
|
5345
5358
|
});
|
|
5346
5359
|
},
|
|
5347
5360
|
onTrafficPublished: async () => {
|
|
@@ -5464,6 +5477,7 @@ async function uploadInstallationWorkers(input) {
|
|
|
5464
5477
|
key,
|
|
5465
5478
|
action,
|
|
5466
5479
|
generation: workerCutoverGeneration,
|
|
5480
|
+
provisionsDurableObject: input.provisionsDurableObject,
|
|
5467
5481
|
now,
|
|
5468
5482
|
readManifest: () => state.manifest,
|
|
5469
5483
|
writeManifest,
|
|
@@ -5479,6 +5493,7 @@ async function uploadInstallationWorkers(input) {
|
|
|
5479
5493
|
managedRoutes: preserveDisabled ? [] : managedRoutes.filter((route) => route.script === action.name).map((route) => route.pattern),
|
|
5480
5494
|
preservedRoutes,
|
|
5481
5495
|
previousConfig: previousWorkerConfig,
|
|
5496
|
+
provisionsDurableObject: input.provisionsDurableObject,
|
|
5482
5497
|
previousPublicEndpoints,
|
|
5483
5498
|
...dependencies.replaceOutsideChanges?.includes(action.name) ? { replaceOutsideChanges: true } : {},
|
|
5484
5499
|
runner: parallelWorkerUploads ? runParallelPinnedPlatformWrangler : runPinnedPlatformWrangler,
|
|
@@ -5985,7 +6000,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
|
|
|
5985
6000
|
}
|
|
5986
6001
|
const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
|
|
5987
6002
|
if (existingWorkers.length) {
|
|
5988
|
-
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-
|
|
6003
|
+
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-OqzfhXwx.mjs");
|
|
5989
6004
|
await verifyProtectionWorkerOrigins({
|
|
5990
6005
|
request: input.client.request.bind(input.client),
|
|
5991
6006
|
listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
|
|
@@ -7457,6 +7472,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7457
7472
|
assertPlatformStorageSupported(plan.deployment, runtime);
|
|
7458
7473
|
const hasEmailGatewayArtifact = runtime.artifacts.emailGateway !== void 0;
|
|
7459
7474
|
if (existing?.steps.some((step) => step.key === "private-previews-initialized:v1") && runtime.privatePreviews !== 1) throw new Error("platform: This installation has private previews. Use a runtime with private preview support.");
|
|
7475
|
+
if (runtime.securityAudits !== 1 && existing?.steps.some((step) => step.key.startsWith("worker-scheduler-migration:"))) throw new Error("platform: Resume this installation with a runtime that exports SecurityScanScheduler.");
|
|
7460
7476
|
if (runtime.emailProtocolVersion !== 1 && plan.deployment.capabilities.email) throw new Error("platform: This runtime cannot serve enabled platform email without email protocol version 1.");
|
|
7461
7477
|
if (runtime.emailProtocolVersion !== 1 && existing?.resources.some((resource) => resource.key === "email-gateway-worker" && resource.state === "ready")) throw new Error("platform: This runtime cannot replace an installed email gateway Worker. Use a runtime with email protocol version 1.");
|
|
7462
7478
|
const workerKeys = hasEmailGatewayArtifact ? [
|
|
@@ -7506,6 +7522,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7506
7522
|
const shouldBootstrapSharedEmail = !preserveDisabled && plan.deployment.capabilities.email && runtime.emailProtocolVersion === 1 && !!plan.deployment.emailSharedZoneId;
|
|
7507
7523
|
const previousPublicEndpoints = stablePublicEndpointState(existing);
|
|
7508
7524
|
const authenticationProtocolTransition = hadPriorWorkers && existing?.deployment.authentication.configurable !== true && runtime.authenticationProtocolVersion === 1;
|
|
7525
|
+
let restoredPublicEndpoints = previousPublicEndpoints;
|
|
7509
7526
|
let workerTrafficGuarded = false;
|
|
7510
7527
|
let manifest;
|
|
7511
7528
|
if (!existing) {
|
|
@@ -7667,7 +7684,9 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7667
7684
|
const createsWorker = state.plan.actions.some((action) => action.kind === "worker" && action.action === "create" && (hasEmailGatewayArtifact || action.key !== "email-gateway-worker"));
|
|
7668
7685
|
const recoveringCreatedWorker = interruptedCutover !== null && [...interruptedCutover.staged.values()].some((snapshot) => snapshot.previousVersionId === null);
|
|
7669
7686
|
const requiresSandboxDrain = !preserveDisabled && targetSandboxDrainProtocol >= 1 && sandboxDrainState === "pending";
|
|
7670
|
-
const
|
|
7687
|
+
const apiAction = state.plan.actions.find((action) => action.key === "api-worker");
|
|
7688
|
+
const provisionScheduler = runtime.securityAudits === 1 && apiAction?.action === "update" && !await dependencies.client.hasWorkerDurableObjectBinding(plan.account.id, apiAction.name, "SecurityScanScheduler");
|
|
7689
|
+
const requiresTrafficGuard = provisionScheduler || !previousPublicEndpoints || hadPriorWorkers && !!state.workerSecretUpdateIntent || !!interruptedCutover && workerCutoverRollsForward(state.manifest, interruptedCutover.generation) || recoveringUnsafeTraffic || createsWorker || recoveringCreatedWorker || state.manifest.usageProtocolVersion !== targetUsageProtocolVersion || runtime.privatePreviews === 1 && !state.manifest.steps.some((step) => step.key === "private-previews-initialized:v1") || authenticationProtocolTransition || shouldBootstrapSharedEmail || requiresSandboxDrain || !!state.plan.deployment.appAccess && !state.manifest.steps.some((step) => step.key === "app-access-initialized:v1");
|
|
7671
7690
|
const configInput = {
|
|
7672
7691
|
authenticationDatabaseUncached: true,
|
|
7673
7692
|
proxyHealthBinding: true,
|
|
@@ -7698,8 +7717,15 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7698
7717
|
publicEndpoints: !preserveDisabled,
|
|
7699
7718
|
trafficState: preserveDisabled ? "staging" : "enabled"
|
|
7700
7719
|
});
|
|
7720
|
+
const schedulerConfigs = provisionScheduler ? createPlatformWorkerConfigs({
|
|
7721
|
+
...configInput,
|
|
7722
|
+
privatePreviews: runtime.privatePreviews === 1,
|
|
7723
|
+
publicEndpoints: !preserveDisabled,
|
|
7724
|
+
trafficState: "staging",
|
|
7725
|
+
deferSecurityScanSchedulerBinding: true
|
|
7726
|
+
}) : null;
|
|
7701
7727
|
const outsideChangeConfigs = workerKeys.flatMap((key) => {
|
|
7702
|
-
const config = enabledConfigs[key];
|
|
7728
|
+
const config = key === "api" && schedulerConfigs ? schedulerConfigs.api : enabledConfigs[key];
|
|
7703
7729
|
return dependencies.replaceOutsideChanges?.includes(String(config.name)) ? [config] : [];
|
|
7704
7730
|
});
|
|
7705
7731
|
if (outsideChangeConfigs.length > 0) await dependencies.uploadOutsideChanges?.(outsideChangeConfigs);
|
|
@@ -7755,29 +7781,12 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7755
7781
|
state.manifest = next;
|
|
7756
7782
|
}
|
|
7757
7783
|
}));
|
|
7758
|
-
|
|
7759
|
-
if (state.workerSecretUpdateIntent) {
|
|
7760
|
-
state.workerSecretUpdateIntent = {
|
|
7761
|
-
...state.workerSecretUpdateIntent,
|
|
7762
|
-
generation: null
|
|
7763
|
-
};
|
|
7764
|
-
writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
|
|
7765
|
-
state.manifest = recordWorkerSecretUpdateState(state.manifest, state.workerCutoverGeneration, "pending", state.workerSecretUpdateIntent.id, now());
|
|
7766
|
-
writeInstallationManifest(state.manifest);
|
|
7767
|
-
await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
|
|
7768
|
-
state.workerSecretUpdateIntent = {
|
|
7769
|
-
...state.workerSecretUpdateIntent,
|
|
7770
|
-
generation: state.workerCutoverGeneration
|
|
7771
|
-
};
|
|
7772
|
-
writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
|
|
7773
|
-
}
|
|
7774
|
-
await uploadInstallationWorkers({
|
|
7784
|
+
const uploadOptions = {
|
|
7775
7785
|
state,
|
|
7776
7786
|
dependencies,
|
|
7777
7787
|
requiresStagedCommit,
|
|
7778
7788
|
recoveringUnsafeTraffic,
|
|
7779
7789
|
workerActions,
|
|
7780
|
-
workerKeys,
|
|
7781
7790
|
workerDeploymentSecrets,
|
|
7782
7791
|
zoneId,
|
|
7783
7792
|
now,
|
|
@@ -7791,6 +7800,45 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7791
7800
|
ids,
|
|
7792
7801
|
runParallelPinnedPlatformWrangler,
|
|
7793
7802
|
runPinnedPlatformWrangler
|
|
7803
|
+
};
|
|
7804
|
+
const beginWorkerCutover = async () => {
|
|
7805
|
+
state.workerCutoverGeneration = nextWorkerCutoverGeneration(state.manifest);
|
|
7806
|
+
if (state.workerSecretUpdateIntent) {
|
|
7807
|
+
state.workerSecretUpdateIntent = {
|
|
7808
|
+
...state.workerSecretUpdateIntent,
|
|
7809
|
+
generation: null
|
|
7810
|
+
};
|
|
7811
|
+
writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
|
|
7812
|
+
state.manifest = recordWorkerSecretUpdateState(state.manifest, state.workerCutoverGeneration, "pending", state.workerSecretUpdateIntent.id, now());
|
|
7813
|
+
writeInstallationManifest(state.manifest);
|
|
7814
|
+
await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
|
|
7815
|
+
state.workerSecretUpdateIntent = {
|
|
7816
|
+
...state.workerSecretUpdateIntent,
|
|
7817
|
+
generation: state.workerCutoverGeneration
|
|
7818
|
+
};
|
|
7819
|
+
writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
|
|
7820
|
+
}
|
|
7821
|
+
};
|
|
7822
|
+
await beginWorkerCutover();
|
|
7823
|
+
if (schedulerConfigs) {
|
|
7824
|
+
const generation = state.workerCutoverGeneration;
|
|
7825
|
+
await uploadInstallationWorkers({
|
|
7826
|
+
...uploadOptions,
|
|
7827
|
+
workerKeys: ["api"],
|
|
7828
|
+
configs: schedulerConfigs,
|
|
7829
|
+
requiresStagedCommit: true,
|
|
7830
|
+
provisionsDurableObject: true
|
|
7831
|
+
});
|
|
7832
|
+
state.manifest = recordWorkerCutoverResolution(state.manifest, generation, "committed", now());
|
|
7833
|
+
state.manifest = recordWorkerTrafficState(state.manifest, generation, false, now());
|
|
7834
|
+
restoredPublicEndpoints = false;
|
|
7835
|
+
writeInstallationManifest(state.manifest);
|
|
7836
|
+
await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
|
|
7837
|
+
await beginWorkerCutover();
|
|
7838
|
+
}
|
|
7839
|
+
await uploadInstallationWorkers({
|
|
7840
|
+
...uploadOptions,
|
|
7841
|
+
workerKeys
|
|
7794
7842
|
});
|
|
7795
7843
|
await publishInstallationAiLogging({
|
|
7796
7844
|
client: dependencies.client,
|
|
@@ -8003,7 +8051,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
8003
8051
|
dependencies,
|
|
8004
8052
|
workerTrafficGuarded,
|
|
8005
8053
|
authenticationProtocolTransition,
|
|
8006
|
-
previousPublicEndpoints,
|
|
8054
|
+
previousPublicEndpoints: restoredPublicEndpoints,
|
|
8007
8055
|
operationStarted,
|
|
8008
8056
|
now,
|
|
8009
8057
|
writeRemoteInstallationCheckpoint
|
|
@@ -8392,13 +8440,13 @@ function needsReviewUpload(change) {
|
|
|
8392
8440
|
* The earlier version of each Worker that the installer makes active again
|
|
8393
8441
|
* before it deploys. A run that stopped during a Worker cutover left Void's
|
|
8394
8442
|
* version active, and the next run first restores the earlier one. Like the
|
|
8395
|
-
* installer, retain rotated credentials or a configurable sign-in transition
|
|
8443
|
+
* installer, retain a class migration, rotated credentials, or a configurable sign-in transition
|
|
8396
8444
|
* that already requires sign-in. Every Worker that this check reads exists,
|
|
8397
8445
|
* so the installation had Workers before.
|
|
8398
8446
|
*/
|
|
8399
8447
|
async function restoredPlatformWorkerVersions(installation, runtime) {
|
|
8400
8448
|
const cutover = interruptedWorkerCutover(installation.manifest);
|
|
8401
|
-
if (!cutover ||
|
|
8449
|
+
if (!cutover || workerCutoverRollsForward(installation.manifest, cutover.generation) || installation.manifest.deployment.authentication.configurable !== true && runtime.manifest.authenticationProtocolVersion === 1 && (await installation.readAuthenticationState?.())?.sessionsRequired === true) return /* @__PURE__ */ new Map();
|
|
8402
8450
|
return new Map([...cutover.staged.values()].flatMap((snapshot) => snapshot.previousVersionId === null ? [] : [[snapshot.workerName, snapshot.previousVersionId]]));
|
|
8403
8451
|
}
|
|
8404
8452
|
/** Find the existing platform Workers that a run uploads and that were changed outside Void. */
|
|
@@ -8669,7 +8717,7 @@ const assertNewNameAvailable = (slug) => {
|
|
|
8669
8717
|
};
|
|
8670
8718
|
async function runPlatformLifecycleCommand(commandArgs) {
|
|
8671
8719
|
if (commandArgs.subcommand === "domain") {
|
|
8672
|
-
const { runPlatformDomainCommand } = await import("./platform-domain-
|
|
8720
|
+
const { runPlatformDomainCommand } = await import("./platform-domain-CUq9odbd.mjs");
|
|
8673
8721
|
await runPlatformDomainCommand(commandArgs);
|
|
8674
8722
|
return;
|
|
8675
8723
|
}
|
|
@@ -8678,7 +8726,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8678
8726
|
const credential = await resolvePlatformCloudflareCredential();
|
|
8679
8727
|
const client = new PlatformCloudflareClient(credential.token, { credential: platformOperatorCredentialLabel(credential) });
|
|
8680
8728
|
const accountId = await selectAccount(await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client)), commandArgs.account);
|
|
8681
|
-
const { recoverPlatformInstallations } = await import("./platform-recovery-
|
|
8729
|
+
const { recoverPlatformInstallations } = await import("./platform-recovery-P_FVslfd.mjs");
|
|
8682
8730
|
const recovered = await withPlatformProgress("Discovering platform installations", () => recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector));
|
|
8683
8731
|
if (recovered.length === 0) {
|
|
8684
8732
|
log.info(`No recoverable Void platform installations were found in ${accountId}.`);
|
|
@@ -8689,7 +8737,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8689
8737
|
return;
|
|
8690
8738
|
}
|
|
8691
8739
|
if (commandArgs.subcommand !== "install") {
|
|
8692
|
-
const { runInstalledPlatformCommand } = await import("./platform-management-
|
|
8740
|
+
const { runInstalledPlatformCommand } = await import("./platform-management-D_gt3qLb.mjs");
|
|
8693
8741
|
await runInstalledPlatformCommand(commandArgs);
|
|
8694
8742
|
return;
|
|
8695
8743
|
}
|
|
@@ -8858,7 +8906,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8858
8906
|
progress?.stop("Read the saved installation.");
|
|
8859
8907
|
progress = void 0;
|
|
8860
8908
|
if (authoritative) {
|
|
8861
|
-
const { selectAuthoritativePlatformManifest } = await import("./platform-management-
|
|
8909
|
+
const { selectAuthoritativePlatformManifest } = await import("./platform-management-D_gt3qLb.mjs");
|
|
8862
8910
|
const selected = selectAuthoritativePlatformManifest(existing, authoritative);
|
|
8863
8911
|
authoritativeProvisionIntents = true;
|
|
8864
8912
|
if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
|
|
@@ -9351,7 +9399,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
9351
9399
|
})).actions.filter((action) => action.kind === "worker"),
|
|
9352
9400
|
revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
|
|
9353
9401
|
verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
|
|
9354
|
-
const { verifyPlatformInstallationOwnership } = await import("./platform-management-
|
|
9402
|
+
const { verifyPlatformInstallationOwnership } = await import("./platform-management-D_gt3qLb.mjs");
|
|
9355
9403
|
const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
|
|
9356
9404
|
const previous = manifest.resources.find((resource) => resource.key === action.key);
|
|
9357
9405
|
return action.action === "create" && previous && previous.name !== action.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-MmO9IubR.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
2
2
|
import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
|
|
3
3
|
import { f as formatUrl, g as note, h as import_picocolors, y as printSuccess } from "./output-BZLnu0z8.mjs";
|
|
4
|
-
import { $ as PlatformCloudflareApiError, B as r2BucketConfigHash, C as assertProjectZeroTrustAllowsUninstall, D as createPlatformHealthProbeToken, E as loadPlatformRuntime, F as formatPlatformInstallPlan, G as assertPlatformOperatorCredentialCanApplyPlan, H as revalidatePlatformInstallAction, I as hasProvisionIntentStep, J as verifyPlatformCloudflareCredential, K as platformOperatorCredentialLabel, L as legacyResourceConfigHash, N as createPlatformInstallPlan, O as createPlatformInstallationSecrets, P as dnsRecordConfigHash, R as matchesRecordedR2Fingerprint, S as readPlatformProjectZeroTrustState, T as readPlatformDatabase, U as platformDatabaseNameFromOwnerUrl, V as resourceMarkerProblem, W as turnOffInstalledProjectZeroTrust, Y as activatePlatformAccessCredentials, _ as deletePlatformSecurityScanner, a as createPlatformProgress, at as verifyPlatformRuntimeTokenEmailPermissions, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as PlatformCloudflareClient, f as readLoginReplacementFile, g as assertPlatformSecurityAuditsSupported, h as installPlatform, it as hyperdriveOriginMatches, j as platformTrafficAttachmentWorker, k as resolveBootstrapGitHubId, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as hyperdriveOriginConfigHash, o as withPlatformProgress, ot as verifyPlatformRuntimeTokenPermissions, p as replacePendingInstallationAuthentication, q as resolvePlatformCloudflareCredential, rt as hyperdriveOriginFromConnectionString, s as findPlatformWorkerOutsideChanges, st as PLATFORM_WORKERS_PERMISSION, t as assertNoninteractivePlatformMutationAcknowledged, tt as PlatformRuntimeTokenEmailPermissionError, u as uploadPlatformWorkerOutsideChanges, v as acquirePlatformDatabaseLifecycleLock, w as formatZeroTrustApplications, x as readPlatformProjectSlugs, z as platformAdoptionIntentHash } from "./platform-lifecycle-
|
|
4
|
+
import { $ as PlatformCloudflareApiError, B as r2BucketConfigHash, C as assertProjectZeroTrustAllowsUninstall, D as createPlatformHealthProbeToken, E as loadPlatformRuntime, F as formatPlatformInstallPlan, G as assertPlatformOperatorCredentialCanApplyPlan, H as revalidatePlatformInstallAction, I as hasProvisionIntentStep, J as verifyPlatformCloudflareCredential, K as platformOperatorCredentialLabel, L as legacyResourceConfigHash, N as createPlatformInstallPlan, O as createPlatformInstallationSecrets, P as dnsRecordConfigHash, R as matchesRecordedR2Fingerprint, S as readPlatformProjectZeroTrustState, T as readPlatformDatabase, U as platformDatabaseNameFromOwnerUrl, V as resourceMarkerProblem, W as turnOffInstalledProjectZeroTrust, Y as activatePlatformAccessCredentials, _ as deletePlatformSecurityScanner, a as createPlatformProgress, at as verifyPlatformRuntimeTokenEmailPermissions, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as PlatformCloudflareClient, f as readLoginReplacementFile, g as assertPlatformSecurityAuditsSupported, h as installPlatform, it as hyperdriveOriginMatches, j as platformTrafficAttachmentWorker, k as resolveBootstrapGitHubId, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as hyperdriveOriginConfigHash, o as withPlatformProgress, ot as verifyPlatformRuntimeTokenPermissions, p as replacePendingInstallationAuthentication, q as resolvePlatformCloudflareCredential, rt as hyperdriveOriginFromConnectionString, s as findPlatformWorkerOutsideChanges, st as PLATFORM_WORKERS_PERMISSION, t as assertNoninteractivePlatformMutationAcknowledged, tt as PlatformRuntimeTokenEmailPermissionError, u as uploadPlatformWorkerOutsideChanges, v as acquirePlatformDatabaseLifecycleLock, w as formatZeroTrustApplications, x as readPlatformProjectSlugs, z as platformAdoptionIntentHash } from "./platform-lifecycle-DuoVruij.mjs";
|
|
5
5
|
import { a as r2ErrorCode, i as isR2CredentialRejection, n as R2_CREDENTIALS_DOCS_URL, r as R2_MALFORMED_CREDENTIAL_ERROR_CODES } from "./direct-r2-upload-DFXLWfXV.mjs";
|
|
6
6
|
import { S as writePendingInstallationSecrets, _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-DHH6fivm.mjs";
|
|
7
7
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
2
|
-
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-
|
|
3
|
-
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
2
|
+
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-DuoVruij.mjs";
|
|
3
|
+
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-MmO9IubR.mjs";
|
|
4
4
|
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
// src/cli/platform-recovery.ts
|
|
@@ -126,6 +126,8 @@ Some upgrades pause application traffic until the new version passes health chec
|
|
|
126
126
|
2. Fix the reported problem.
|
|
127
127
|
3. Run the printed resume command with the same runtime. Traffic resumes when it succeeds.
|
|
128
128
|
|
|
129
|
+
If the upgrade adds the security scan scheduler, Void pauses traffic while it provisions the new Durable Object class. Once Cloudflare creates the class, resume the upgrade with the same runtime if it stops. Cloudflare can no longer activate an older API Worker that lacks the class.
|
|
130
|
+
|
|
129
131
|
::: details Migration safety, credential rotation, and rollback
|
|
130
132
|
|
|
131
133
|
To update the runtime Cloudflare token, GitHub OAuth credentials when GitHub login is enabled, or R2 credentials,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "void",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Full-stack framework and deployment CLI for Cloudflare Workers, powered by Vite.",
|
|
5
5
|
"homepage": "https://void.cloud",
|
|
6
6
|
"bugs": {
|
|
@@ -357,11 +357,11 @@
|
|
|
357
357
|
"@cloudflare/workers-types": "^5.20261125.1",
|
|
358
358
|
"@cloudflare/workers-utils": "^0.57.0",
|
|
359
359
|
"@napi-rs/keyring": "^2.1.2",
|
|
360
|
-
"@void/deploy-cloudflare": "1.12.
|
|
361
|
-
"@void/deploy-core": "1.12.
|
|
362
|
-
"@void/edge": "1.12.
|
|
363
|
-
"@void/isr": "1.12.
|
|
364
|
-
"@void/platform": "1.12.
|
|
360
|
+
"@void/deploy-cloudflare": "1.12.2",
|
|
361
|
+
"@void/deploy-core": "1.12.2",
|
|
362
|
+
"@void/edge": "1.12.2",
|
|
363
|
+
"@void/isr": "1.12.2",
|
|
364
|
+
"@void/platform": "1.12.2",
|
|
365
365
|
"better-auth": "^1.7.27",
|
|
366
366
|
"better-sqlite3": "^13.2.0",
|
|
367
367
|
"blake3-jit": "^1.1.1",
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
"zod": "^4.6.7"
|
|
419
419
|
},
|
|
420
420
|
"peerDependencies": {
|
|
421
|
-
"@void/md": "1.12.
|
|
421
|
+
"@void/md": "1.12.2",
|
|
422
422
|
"arktype": ">=2.0.0",
|
|
423
423
|
"valibot": ">=1.0.0-beta.7",
|
|
424
424
|
"vite": "^8.0.0",
|
package/dist/login-DECm3e9b.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { r as selectPlatformLoginMethod } from "./login-CWFr-G2I.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { s as runOperatorCommand } from "./operator-cmd-a7yOf2tH.mjs";
|