void 1.12.0 → 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.
Files changed (123) hide show
  1. package/dist/{account-cmd-D_0qJ9fx.mjs → account-cmd-CdJQba_Q.mjs} +4 -4
  2. package/dist/{application-analysis-Cx2S63z5.mjs → application-analysis-DVeN8yoi.mjs} +1 -1
  3. package/dist/{application-routing-BAXpnawu.mjs → application-routing-KKw4Y84h.mjs} +1 -1
  4. package/dist/{auth-Boz0lrb3.mjs → auth-A7cZ8aXA.mjs} +1 -1
  5. package/dist/{auth-DlLDymuc.mjs → auth-CqwJwItO.mjs} +1 -1
  6. package/dist/{auth-link-C97r9p2N.mjs → auth-link-D9MWA_dj.mjs} +4 -4
  7. package/dist/{auth-router-BmzEgzYx.mjs → auth-router-FskgTU3B.mjs} +1 -1
  8. package/dist/{build-cmd-BaFsyZrz.mjs → build-cmd-B7OJ0U5R.mjs} +2 -2
  9. package/dist/build-id-4IV4hC1-.mjs +13 -0
  10. package/dist/{cache-xO711ATQ.mjs → cache-wSpi3aeM.mjs} +2 -2
  11. package/dist/{cancel-deploy-Di11ynsr.mjs → cancel-deploy-DMWzkAlb.mjs} +2 -2
  12. package/dist/{cf-access-FaIm95jA.mjs → cf-access-DHklo7Rg.mjs} +33 -19
  13. package/dist/{cf-build-output-Ca201_n1.mjs → cf-build-output-Cso7Vh-t.mjs} +4 -2
  14. package/dist/cf-build-output-Wpk_e5CI.mjs +1 -0
  15. package/dist/cli/cli.mjs +1 -1
  16. package/dist/cli/cloudflare-operation-process.mjs +1 -1
  17. package/dist/cli/db-execute-process.d.mts +2 -0
  18. package/dist/cli/db-execute-process.mjs +57 -0
  19. package/dist/{cli-main-DlW6lB8s.mjs → cli-main-DaLrQfPS.mjs} +37 -344
  20. package/dist/{client-ImIe7Mjq.mjs → client-DE2m2ldh.mjs} +4 -4
  21. package/dist/{client-DkYzDEC0.mjs → client-eLZwqkPH.mjs} +1 -1
  22. package/dist/{cloudflare-operations-BF0PSErW.mjs → cloudflare-operations-BIRQkYwL.mjs} +14 -8
  23. package/dist/cloudflare-operations-ByjFGats.mjs +1 -0
  24. package/dist/{connect-DDRQGfFE.mjs → connect-WG4TcR_d.mjs} +4 -4
  25. package/dist/{create-project-CY7sP8sI.mjs → create-project-8FdN6D2i.mjs} +2 -2
  26. package/dist/{create-project-Dro3K-az.mjs → create-project-CbuDH5Hv.mjs} +1 -1
  27. package/dist/{db-DmlaWVBu.mjs → db-BSuWV1PI.mjs} +1348 -69
  28. package/dist/db-args-BvMwAber.mjs +1 -0
  29. package/dist/db-args-CiQVg8SJ.mjs +321 -0
  30. package/dist/{delete-Uuq9ch6o.mjs → delete-WtLEfap2.mjs} +2 -2
  31. package/dist/{deploy-B9E7_rHC.mjs → deploy-DtJeunLF.mjs} +14 -14
  32. package/dist/{deploy-BB3rsZbP.mjs → deploy-GT4CW5fs.mjs} +1 -1
  33. package/dist/{deploy-managed-static-IKZyuc1W.mjs → deploy-managed-static-BWBsxOww.mjs} +5 -5
  34. package/dist/{deploy-security-notice-C3LalelR.mjs → deploy-security-notice-IRGy6Edf.mjs} +2 -2
  35. package/dist/deploy.mjs +4 -4
  36. package/dist/{domain-B_xY1yZ5.mjs → domain-mweyYXSw.mjs} +3 -3
  37. package/dist/{email-BIC15L7a.mjs → email-DoDqRH6i.mjs} +5 -5
  38. package/dist/{email-cloudflare-C447nOqq.mjs → email-cloudflare-DeYH3Ke7.mjs} +2 -2
  39. package/dist/{env-DJPZYHT5.mjs → env-DaAoYR2-.mjs} +3 -3
  40. package/dist/{gen-DiTZlDx8.mjs → gen-aOtHhZLD.mjs} +1 -1
  41. package/dist/gen-vhBDHs3q.mjs +1 -0
  42. package/dist/{github-cmd-DPmby8x-.mjs → github-cmd-BR19Ffdz.mjs} +2 -2
  43. package/dist/{help-9wfMyXHb.mjs → help-DvClCzqL.mjs} +9 -1
  44. package/dist/help-fKPzcTJv.mjs +1 -0
  45. package/dist/index.mjs +16 -206
  46. package/dist/{info-BWEWaOBo.mjs → info-P6MBiVJi.mjs} +2 -2
  47. package/dist/{init-BuTPVLPO.mjs → init-B2VZ2Hut.mjs} +63 -18
  48. package/dist/installed-packages-tfmYd-cC.mjs +198 -0
  49. package/dist/{link-BiesPyT4.mjs → link-Dyz9IGcM.mjs} +3 -3
  50. package/dist/{list-CkonftPQ.mjs → list-VGYBMjmx.mjs} +4 -4
  51. package/dist/login-BbSQTZ6d.mjs +1 -0
  52. package/dist/{login-BSOSah1j.mjs → login-jUBgfvzk.mjs} +3 -3
  53. package/dist/{logs-HOBUnroa.mjs → logs-kS1wuR4b.mjs} +3 -3
  54. package/dist/module-references-DWQmO6TW.mjs +27 -0
  55. package/dist/{mysql-sql-CB52k8tQ.mjs → mysql-lock-D8xtnI-D.mjs} +1 -118
  56. package/dist/mysql-sql-BIE7bc4Z.mjs +124 -0
  57. package/dist/{operator-ai-logging-ZDqqhnIq.mjs → operator-ai-logging-DD0n6zc2.mjs} +3 -3
  58. package/dist/{operator-args-DCkWbgT-.mjs → operator-args-nvetCWuz.mjs} +1 -1
  59. package/dist/{operator-auth-BjoPLgja.mjs → operator-auth-DMvn-y9X.mjs} +1 -1
  60. package/dist/{operator-client-DzebIntv.mjs → operator-client-dFNnXfyB.mjs} +4 -3
  61. package/dist/operator-cmd-jnjzuJKX.mjs +1 -0
  62. package/dist/{operator-cmd-AZoeI9Pl.mjs → operator-cmd-wML5HNfS.mjs} +13 -9
  63. package/dist/{operator-security-Bo26FP01.mjs → operator-security-D5MToU0p.mjs} +1 -1
  64. package/dist/pages/client.mjs +77 -9
  65. package/dist/pages/index.d.mts +6 -0
  66. package/dist/pages/index.mjs +276 -6
  67. package/dist/pages/protocol.mjs +1 -1
  68. package/dist/platform-args-CMwMoiLp.mjs +1 -0
  69. package/dist/{platform-args-lwCyQ6Xy.mjs → platform-args-CvZSuhYS.mjs} +1 -1
  70. package/dist/{platform-auth-config-DLRMPw1G.mjs → platform-auth-config-Bv3oQ2gE.mjs} +7 -7
  71. package/dist/{platform-auth-protection-HSmLmD3d.mjs → platform-auth-protection-OqzfhXwx.mjs} +5 -5
  72. package/dist/{platform-auth-recovery-BXPhTlKa.mjs → platform-auth-recovery-rmIYjXST.mjs} +4 -4
  73. package/dist/{platform-cmd-CqRjxFEU.mjs → platform-cmd-B3rO4RhU.mjs} +1 -1
  74. package/dist/{platform-cmd-DJ-fOYhL.mjs → platform-cmd-D_4z2Ijv.mjs} +6 -6
  75. package/dist/{platform-domain-CRsRJOws.mjs → platform-domain-CUq9odbd.mjs} +2 -2
  76. package/dist/{platform-lifecycle-bx_kpqo7.mjs → platform-lifecycle-DOSYo0UI.mjs} +1 -1
  77. package/dist/{platform-lifecycle-fau3VKv6.mjs → platform-lifecycle-DuoVruij.mjs} +138 -43
  78. package/dist/{platform-management-BRGhD-oF.mjs → platform-management-D_gt3qLb.mjs} +1 -1
  79. package/dist/{platform-management-CnKBdDx5.mjs → platform-management-MmO9IubR.mjs} +4 -4
  80. package/dist/{platform-plans-config-2C3_5EDs.mjs → platform-plans-config-DiydtNKY.mjs} +3 -3
  81. package/dist/{platform-recovery-poxgOOAY.mjs → platform-recovery-P_FVslfd.mjs} +2 -2
  82. package/dist/{platform-setup-DYylapHD.mjs → platform-setup-Lph9i-rh.mjs} +1 -1
  83. package/dist/{plugin-inference-7O11_E4H.mjs → plugin-inference-COlq96WJ.mjs} +2 -27
  84. package/dist/prepare-DcwigRUS.mjs +1 -0
  85. package/dist/{prepare-DWjn1Lzd.mjs → prepare-WvijE289.mjs} +1 -1
  86. package/dist/{prepare-BbvlKreR.mjs → prepare-co1o1FFd.mjs} +1 -1
  87. package/dist/{project-cmd-DyUEFi2b.mjs → project-cmd-BWJTplpc.mjs} +18 -18
  88. package/dist/{project-security-DZEQgnsS.mjs → project-security-BV1xfj1K.mjs} +1 -1
  89. package/dist/{project-security--tYGFPGo.mjs → project-security-CY_aahvW.mjs} +2 -2
  90. package/dist/{project-team-BszTHgzC.mjs → project-team-BlIFXlmT.mjs} +2 -2
  91. package/dist/{project-token-DBDy4NdV.mjs → project-token-CMsB7I1-.mjs} +2 -2
  92. package/dist/{project-zero-trust-D9sUouij.mjs → project-zero-trust-BI6pdpx4.mjs} +2 -2
  93. package/dist/{protocol-CE3wP-H1.mjs → protocol-4rEnumif.mjs} +10 -3
  94. package/dist/{redirect-DD825Stf.mjs → redirect-Dyvuil0Q.mjs} +5 -2
  95. package/dist/{requests-CBokjiOi.mjs → requests-CfmJxNYg.mjs} +2 -2
  96. package/dist/{rollback-CEeHNFUn.mjs → rollback-DL5HuAsM.mjs} +3 -3
  97. package/dist/{runner-mysql-3XDKrn-g.mjs → runner-mysql-D549vGGm.mjs} +2 -1
  98. package/dist/{runner-mysql-r688x6Y9.mjs → runner-mysql-DOjbj-N1.mjs} +1 -1
  99. package/dist/runtime/db/migrations/mysql-handler.mjs +2 -1
  100. package/dist/runtime/routing/index.mjs +2 -2
  101. package/dist/{secret-Deqo3n_N.mjs → secret-C-WBaUSS.mjs} +3 -3
  102. package/docs/guide/jobs.md +1 -1
  103. package/docs/guide/pages-routing/actions-and-forms.md +36 -15
  104. package/docs/guide/pages-routing/errors.md +3 -1
  105. package/docs/guide/pages-routing/overview.md +20 -0
  106. package/docs/guide/platform/administration/zero-trust.md +1 -1
  107. package/docs/guide/platform/installation/maintenance.md +5 -3
  108. package/docs/guide/queues.md +1 -1
  109. package/docs/integrations/frameworks/sveltekit.md +1 -1
  110. package/docs/reference/api/pages.md +4 -0
  111. package/docs/reference/cli/database.md +42 -6
  112. package/docs/reference/cli/platform-security.md +1 -1
  113. package/docs/reference/cli/platform-zero-trust.md +4 -3
  114. package/docs/reference/cli/setup.md +4 -0
  115. package/package.json +7 -7
  116. package/dist/cf-build-output-Dy7N0hQN.mjs +0 -1
  117. package/dist/cloudflare-operations-dpRD-2Px.mjs +0 -1
  118. package/dist/gen-CQDiPi8m.mjs +0 -1
  119. package/dist/help-Dy3w4rPq.mjs +0 -1
  120. package/dist/login-DWCZeCX9.mjs +0 -1
  121. package/dist/operator-cmd-DEnHFmJF.mjs +0 -1
  122. package/dist/platform-args-DNbNZ_RR.mjs +0 -1
  123. package/dist/prepare-BmG2E6TI.mjs +0 -1
@@ -1,10 +1,10 @@
1
1
  import { A as confirm, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { u as openBrowser } from "./auth-DlLDymuc.mjs";
3
- import { a as resolveOperatorOrigin } from "./operator-auth-BjoPLgja.mjs";
2
+ import { u as openBrowser } from "./auth-CqwJwItO.mjs";
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-fau3VKv6.mjs";
7
- import { f as verifyPlatformInstallationOwnership, u as selectAuthoritativePlatformManifest } from "./platform-management-CnKBdDx5.mjs";
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-DJ-fOYhL.mjs";
1
+ export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-D_4z2Ijv.mjs";
@@ -1,6 +1,6 @@
1
1
  import { K as select, L as log, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
3
- import { r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-FaIm95jA.mjs";
3
+ import { r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
4
4
  import { f as formatUrl, h as import_picocolors, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
5
  import { n as readPlatformDiscoveryResponse, t as PlatformDisabledError } from "./platform-discovery-CLxtixHJ.mjs";
6
6
  import { b as selectPlatformConnection, c as normalizePlatformApiUrl, i as getActivePlatformConnection, l as platformConnectionSlug, o as listInstallationManifests, s as listPlatformConnections, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
@@ -96,19 +96,19 @@ async function runPlatformCommand(_root, args) {
96
96
  }]
97
97
  });
98
98
  if (isCancel(group)) return;
99
- const { parsePlatformArgs } = await import("./platform-args-DNbNZ_RR.mjs");
99
+ const { parsePlatformArgs } = await import("./platform-args-CMwMoiLp.mjs");
100
100
  return runPlatformCommand(_root, parsePlatformArgs(["config", group]));
101
101
  }
102
- const { runPlatformPlansConfig } = await import("./platform-plans-config-2C3_5EDs.mjs");
102
+ const { runPlatformPlansConfig } = await import("./platform-plans-config-DiydtNKY.mjs");
103
103
  await runPlatformPlansConfig(args);
104
104
  return;
105
105
  }
106
- const { runPlatformAuthConfig } = await import("./platform-auth-config-DLRMPw1G.mjs");
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-DEnHFmJF.mjs");
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-bx_kpqo7.mjs");
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-fau3VKv6.mjs";
5
- import { f as verifyPlatformInstallationOwnership, o as resolveInstalledPlatformManifest, u as selectAuthoritativePlatformManifest } from "./platform-management-CnKBdDx5.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-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-fau3VKv6.mjs";
1
+ export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-DuoVruij.mjs";
@@ -4,14 +4,14 @@ import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
4
4
  import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, i as cliCommandName, p as getErrorMessage, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
5
  import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
6
6
  import { _ as resolvePinnedApiBaseUrl, o as createDefaultRunWrangler } from "./provision-Bh44omGA.mjs";
7
- import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-DYylapHD.mjs";
7
+ import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-Lph9i-rh.mjs";
8
8
  import { o as runCloudflareAuthCommand } from "./cloudflare-auth-eWfhdZCk.mjs";
9
9
  import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-60r4Z2Zf.mjs";
10
10
  import { S as writePendingInstallationSecrets, a as latestPlatformWorkerCutoverGeneration, c as normalizePlatformApiUrl, d as platformRegistryDirectory, f as platformWorkerSecretUpdateIntentState, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, n as assertPlatformInstallationSlugAvailable, o as listInstallationManifests, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DHH6fivm.mjs";
11
11
  import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
12
- import { t as ensurePlatformAccessToken } from "./cf-access-FaIm95jA.mjs";
12
+ import { t as ensurePlatformAccessToken } from "./cf-access-DHklo7Rg.mjs";
13
13
  import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
14
- import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-lwCyQ6Xy.mjs";
14
+ import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-CvZSuhYS.mjs";
15
15
  import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
16
16
  import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
17
17
  import { fileURLToPath } from "node:url";
@@ -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
- function workerCutoverUpdatesSecrets(manifest, generation) {
4433
- return manifest.steps.some((step) => step.key === `worker-secret-updates:${generation}:pending`);
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 retainUpdatedCredentials = workerCutoverUpdatesSecrets(manifest, interruptedCutover.generation);
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 (retainUpdatedCredentials) {
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 after the credential update; refusing to overwrite it.`);
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, retainUpdatedCredentials ? "committed" : "restored", now());
4764
- manifest = recordWorkerTrafficState(manifest, interruptedCutover.generation, !retainUpdatedCredentials && previousPublicEndpoints && interruptedCutover.unsafeTraffic.size === 0, now());
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 && uploadedVersionId ? uploadedVersionId : null;
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
- await writeManifest(recordWorkerCutoverStage(readManifest(), generation, key, previousVersionId, stagedVersionId, action.name, previousTriggers, now()));
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-HSmLmD3d.mjs");
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),
@@ -7190,6 +7205,9 @@ function securityScannerNames(installationId) {
7190
7205
  worker: `void-security-scanner-${suffix}`,
7191
7206
  application: `void-security-scanner-${suffix}`,
7192
7207
  gate: `void-security-scanner-gate-${suffix}`,
7208
+ copyNamespace: `void-security-copies-${suffix}`,
7209
+ copySandbox: `void-security-copy-sandbox-${suffix}`,
7210
+ copyPrefix: `void-sec-copy-${suffix}-`,
7193
7211
  engines: {
7194
7212
  "engine-a": engine("engine-a"),
7195
7213
  "engine-c": engine("engine-c")
@@ -7278,10 +7296,52 @@ async function deleteScannerImages(client, registryFetch, account, repositories,
7278
7296
  }
7279
7297
  return removed;
7280
7298
  }
7299
+ const COPY_PAGE = 100;
7300
+ /**
7301
+ * The copy namespace (Cloudflare deletes any copy still in it), the stores a failed scan
7302
+ * left (the API's hourly sweep stops with the platform; a copy bucket may hold what the
7303
+ * scanned app wrote, and only an empty bucket can be deleted), then the copy sandbox, the
7304
+ * namespace's outbound Worker. Run after the controller, the only Worker that binds them.
7305
+ * The sandbox carries the ownership marker; the rest is named per installation, like the images.
7306
+ */
7307
+ async function deleteRuntimeCopies(client, accountId, names, marker, controllerExists, kept) {
7308
+ const base = `/accounts/${encodeURIComponent(accountId)}`;
7309
+ const read = (path) => optional(() => client.request(path), !controllerExists);
7310
+ const sandboxPath = `${base}/workers/scripts/${names.copySandbox}`;
7311
+ const sandbox = await read(`${sandboxPath}/settings`);
7312
+ if (sandbox && plainText(sandbox.bindings) !== marker) {
7313
+ kept.push(`security copy sandbox ${names.copySandbox}`);
7314
+ return false;
7315
+ }
7316
+ const mine = (name) => typeof name === "string" && name.startsWith(names.copyPrefix);
7317
+ const pages = async (path, take) => {
7318
+ const found = [];
7319
+ for (let page = 1; page <= 50; page++) {
7320
+ const rows = await read(`${path}per_page=${COPY_PAGE}&page=${page}`) ?? [];
7321
+ found.push(...rows.flatMap((row) => take(row) ?? []));
7322
+ if (rows.length < COPY_PAGE) break;
7323
+ }
7324
+ return found;
7325
+ };
7326
+ const namespacePath = `${base}/workers/dispatch/namespaces/${names.copyNamespace}`;
7327
+ const namespace = await read(namespacePath);
7328
+ const prefix = encodeURIComponent(names.copyPrefix);
7329
+ const buckets = ((await read(`${base}/r2/buckets?name_contains=${prefix}&per_page=1000`))?.buckets ?? []).flatMap((bucket) => mine(bucket.name) ? [bucket.name] : []);
7330
+ const stores = [
7331
+ ...await pages(`${base}/d1/database?name=${prefix}&`, (row) => mine(row.name) && typeof row.uuid === "string" ? `d1/database/${row.uuid}` : void 0),
7332
+ ...await pages(`${base}/storage/kv/namespaces?`, (row) => mine(row.title) && typeof row.id === "string" ? `storage/kv/namespaces/${row.id}` : void 0),
7333
+ ...buckets.map((bucket) => `r2/buckets/${bucket}`)
7334
+ ];
7335
+ if (namespace !== void 0) await deleteIfPresent(client, namespacePath);
7336
+ for (const bucket of buckets) await client.emptyR2Bucket(accountId, bucket);
7337
+ for (const store of stores) await deleteIfPresent(client, `${base}/${store}`);
7338
+ if (sandbox) await deleteIfPresent(client, sandboxPath);
7339
+ return namespace !== void 0 || stores.length > 0 || sandbox !== void 0;
7340
+ }
7281
7341
  /**
7282
7342
  * Uninstall: the gate first (nothing can call in), then the container applications, the
7283
- * controller Worker and the engine images. Each must carry this installation's ownership
7284
- * marker; one that is not ours is left alone and reported.
7343
+ * controller Worker, the runtime copies and the engine images. A Worker or application must
7344
+ * carry this installation's ownership marker; one that is not ours is left alone and reported.
7285
7345
  */
7286
7346
  async function deletePlatformSecurityScanner(client, manifest, registryFetch = (input, init) => fetch(input, init)) {
7287
7347
  if (!manifest.deployment.capabilities.securityAudits) return {
@@ -7322,6 +7382,7 @@ async function deletePlatformSecurityScanner(client, manifest, registryFetch = (
7322
7382
  const repositories = ENGINES.map((engine) => names.engines[engine.slug].repository);
7323
7383
  if (!settings) {
7324
7384
  for (const application of found) kept.push(`security scanner container application ${application.name}`);
7385
+ if (await deleteRuntimeCopies(client, manifest.account.id, names, marker, false, kept)) deleted.push("runtime copies");
7325
7386
  if (await deleteScannerImages(client, registryFetch, manifest.account.id, repositories, false)) deleted.push("scanner images");
7326
7387
  return {
7327
7388
  deleted,
@@ -7347,6 +7408,7 @@ async function deletePlatformSecurityScanner(client, manifest, registryFetch = (
7347
7408
  if (removedApplication) deleted.push("container application");
7348
7409
  await deleteIfPresent(client, workerPath);
7349
7410
  deleted.push("controller");
7411
+ if (await deleteRuntimeCopies(client, manifest.account.id, names, marker, true, kept)) deleted.push("runtime copies");
7350
7412
  if (await deleteScannerImages(client, registryFetch, manifest.account.id, repositories, true)) deleted.push("scanner images");
7351
7413
  return {
7352
7414
  deleted,
@@ -7410,6 +7472,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7410
7472
  assertPlatformStorageSupported(plan.deployment, runtime);
7411
7473
  const hasEmailGatewayArtifact = runtime.artifacts.emailGateway !== void 0;
7412
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.");
7413
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.");
7414
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.");
7415
7478
  const workerKeys = hasEmailGatewayArtifact ? [
@@ -7459,6 +7522,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7459
7522
  const shouldBootstrapSharedEmail = !preserveDisabled && plan.deployment.capabilities.email && runtime.emailProtocolVersion === 1 && !!plan.deployment.emailSharedZoneId;
7460
7523
  const previousPublicEndpoints = stablePublicEndpointState(existing);
7461
7524
  const authenticationProtocolTransition = hadPriorWorkers && existing?.deployment.authentication.configurable !== true && runtime.authenticationProtocolVersion === 1;
7525
+ let restoredPublicEndpoints = previousPublicEndpoints;
7462
7526
  let workerTrafficGuarded = false;
7463
7527
  let manifest;
7464
7528
  if (!existing) {
@@ -7620,7 +7684,9 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7620
7684
  const createsWorker = state.plan.actions.some((action) => action.kind === "worker" && action.action === "create" && (hasEmailGatewayArtifact || action.key !== "email-gateway-worker"));
7621
7685
  const recoveringCreatedWorker = interruptedCutover !== null && [...interruptedCutover.staged.values()].some((snapshot) => snapshot.previousVersionId === null);
7622
7686
  const requiresSandboxDrain = !preserveDisabled && targetSandboxDrainProtocol >= 1 && sandboxDrainState === "pending";
7623
- const requiresTrafficGuard = !previousPublicEndpoints || hadPriorWorkers && !!state.workerSecretUpdateIntent || !!interruptedCutover && workerCutoverUpdatesSecrets(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");
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");
7624
7690
  const configInput = {
7625
7691
  authenticationDatabaseUncached: true,
7626
7692
  proxyHealthBinding: true,
@@ -7651,8 +7717,15 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7651
7717
  publicEndpoints: !preserveDisabled,
7652
7718
  trafficState: preserveDisabled ? "staging" : "enabled"
7653
7719
  });
7720
+ const schedulerConfigs = provisionScheduler ? createPlatformWorkerConfigs({
7721
+ ...configInput,
7722
+ privatePreviews: runtime.privatePreviews === 1,
7723
+ publicEndpoints: !preserveDisabled,
7724
+ trafficState: "staging",
7725
+ deferSecurityScanSchedulerBinding: true
7726
+ }) : null;
7654
7727
  const outsideChangeConfigs = workerKeys.flatMap((key) => {
7655
- const config = enabledConfigs[key];
7728
+ const config = key === "api" && schedulerConfigs ? schedulerConfigs.api : enabledConfigs[key];
7656
7729
  return dependencies.replaceOutsideChanges?.includes(String(config.name)) ? [config] : [];
7657
7730
  });
7658
7731
  if (outsideChangeConfigs.length > 0) await dependencies.uploadOutsideChanges?.(outsideChangeConfigs);
@@ -7708,29 +7781,12 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7708
7781
  state.manifest = next;
7709
7782
  }
7710
7783
  }));
7711
- state.workerCutoverGeneration = nextWorkerCutoverGeneration(state.manifest);
7712
- if (state.workerSecretUpdateIntent) {
7713
- state.workerSecretUpdateIntent = {
7714
- ...state.workerSecretUpdateIntent,
7715
- generation: null
7716
- };
7717
- writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
7718
- state.manifest = recordWorkerSecretUpdateState(state.manifest, state.workerCutoverGeneration, "pending", state.workerSecretUpdateIntent.id, now());
7719
- writeInstallationManifest(state.manifest);
7720
- await writeRemoteInstallationCheckpoint(dependencies.client, state.plan, state.manifest);
7721
- state.workerSecretUpdateIntent = {
7722
- ...state.workerSecretUpdateIntent,
7723
- generation: state.workerCutoverGeneration
7724
- };
7725
- writePendingInstallationSecrets(state.manifest, secretCheckpoint(state.secrets, state.workerSecretUpdateIntent));
7726
- }
7727
- await uploadInstallationWorkers({
7784
+ const uploadOptions = {
7728
7785
  state,
7729
7786
  dependencies,
7730
7787
  requiresStagedCommit,
7731
7788
  recoveringUnsafeTraffic,
7732
7789
  workerActions,
7733
- workerKeys,
7734
7790
  workerDeploymentSecrets,
7735
7791
  zoneId,
7736
7792
  now,
@@ -7744,6 +7800,45 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7744
7800
  ids,
7745
7801
  runParallelPinnedPlatformWrangler,
7746
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
7747
7842
  });
7748
7843
  await publishInstallationAiLogging({
7749
7844
  client: dependencies.client,
@@ -7956,7 +8051,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
7956
8051
  dependencies,
7957
8052
  workerTrafficGuarded,
7958
8053
  authenticationProtocolTransition,
7959
- previousPublicEndpoints,
8054
+ previousPublicEndpoints: restoredPublicEndpoints,
7960
8055
  operationStarted,
7961
8056
  now,
7962
8057
  writeRemoteInstallationCheckpoint
@@ -8345,13 +8440,13 @@ function needsReviewUpload(change) {
8345
8440
  * The earlier version of each Worker that the installer makes active again
8346
8441
  * before it deploys. A run that stopped during a Worker cutover left Void's
8347
8442
  * version active, and the next run first restores the earlier one. Like the
8348
- * installer, retain rotated credentials or a configurable sign-in transition
8443
+ * installer, retain a class migration, rotated credentials, or a configurable sign-in transition
8349
8444
  * that already requires sign-in. Every Worker that this check reads exists,
8350
8445
  * so the installation had Workers before.
8351
8446
  */
8352
8447
  async function restoredPlatformWorkerVersions(installation, runtime) {
8353
8448
  const cutover = interruptedWorkerCutover(installation.manifest);
8354
- if (!cutover || workerCutoverUpdatesSecrets(installation.manifest, cutover.generation) || installation.manifest.deployment.authentication.configurable !== true && runtime.manifest.authenticationProtocolVersion === 1 && (await installation.readAuthenticationState?.())?.sessionsRequired === true) return /* @__PURE__ */ new Map();
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();
8355
8450
  return new Map([...cutover.staged.values()].flatMap((snapshot) => snapshot.previousVersionId === null ? [] : [[snapshot.workerName, snapshot.previousVersionId]]));
8356
8451
  }
8357
8452
  /** Find the existing platform Workers that a run uploads and that were changed outside Void. */
@@ -8622,7 +8717,7 @@ const assertNewNameAvailable = (slug) => {
8622
8717
  };
8623
8718
  async function runPlatformLifecycleCommand(commandArgs) {
8624
8719
  if (commandArgs.subcommand === "domain") {
8625
- const { runPlatformDomainCommand } = await import("./platform-domain-CRsRJOws.mjs");
8720
+ const { runPlatformDomainCommand } = await import("./platform-domain-CUq9odbd.mjs");
8626
8721
  await runPlatformDomainCommand(commandArgs);
8627
8722
  return;
8628
8723
  }
@@ -8631,7 +8726,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8631
8726
  const credential = await resolvePlatformCloudflareCredential();
8632
8727
  const client = new PlatformCloudflareClient(credential.token, { credential: platformOperatorCredentialLabel(credential) });
8633
8728
  const accountId = await selectAccount(await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client)), commandArgs.account);
8634
- const { recoverPlatformInstallations } = await import("./platform-recovery-poxgOOAY.mjs");
8729
+ const { recoverPlatformInstallations } = await import("./platform-recovery-P_FVslfd.mjs");
8635
8730
  const recovered = await withPlatformProgress("Discovering platform installations", () => recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector));
8636
8731
  if (recovered.length === 0) {
8637
8732
  log.info(`No recoverable Void platform installations were found in ${accountId}.`);
@@ -8642,7 +8737,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8642
8737
  return;
8643
8738
  }
8644
8739
  if (commandArgs.subcommand !== "install") {
8645
- const { runInstalledPlatformCommand } = await import("./platform-management-BRGhD-oF.mjs");
8740
+ const { runInstalledPlatformCommand } = await import("./platform-management-D_gt3qLb.mjs");
8646
8741
  await runInstalledPlatformCommand(commandArgs);
8647
8742
  return;
8648
8743
  }
@@ -8811,7 +8906,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8811
8906
  progress?.stop("Read the saved installation.");
8812
8907
  progress = void 0;
8813
8908
  if (authoritative) {
8814
- const { selectAuthoritativePlatformManifest } = await import("./platform-management-BRGhD-oF.mjs");
8909
+ const { selectAuthoritativePlatformManifest } = await import("./platform-management-D_gt3qLb.mjs");
8815
8910
  const selected = selectAuthoritativePlatformManifest(existing, authoritative);
8816
8911
  authoritativeProvisionIntents = true;
8817
8912
  if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
@@ -9304,7 +9399,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
9304
9399
  })).actions.filter((action) => action.kind === "worker"),
9305
9400
  revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
9306
9401
  verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
9307
- const { verifyPlatformInstallationOwnership } = await import("./platform-management-BRGhD-oF.mjs");
9402
+ const { verifyPlatformInstallationOwnership } = await import("./platform-management-D_gt3qLb.mjs");
9308
9403
  const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
9309
9404
  const previous = manifest.resources.find((resource) => resource.key === action.key);
9310
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-CnKBdDx5.mjs";
1
+ export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-MmO9IubR.mjs";
@@ -1,11 +1,11 @@
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
- import { t as ensurePlatformAccessToken } from "./cf-access-FaIm95jA.mjs";
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-fau3VKv6.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-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";
8
- import { r as assertPlatformStorageSupported } from "./platform-args-lwCyQ6Xy.mjs";
8
+ import { r as assertPlatformStorageSupported } from "./platform-args-CvZSuhYS.mjs";
9
9
  import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
10
10
  import { createHash, createHmac } from "node:crypto";
11
11
  import { setTimeout } from "node:timers/promises";
@@ -1235,7 +1235,7 @@ async function uninstallPlatform(client, initialManifest, args, dependencies = {
1235
1235
  if (purgeResources) await withPlatformProgress("Checking platform projects", () => assertNoPlatformProjects(dependencies.readProjects));
1236
1236
  if (args.plan || interactive && !args.yes) note([
1237
1237
  ...zeroTrust ? zeroTrust.turnOff.length ? ["Turn off project Zero Trust; no platform user exists yet. Delete its Access applications:", formatZeroTrustApplications(zeroTrust.turnOff)] : ["Turn off project Zero Trust; no platform user exists yet."] : [],
1238
- ...securityAudits ? ["Delete the security scanner Worker, its container applications, and the scanner images it copied."] : [],
1238
+ ...securityAudits ? ["Delete the security scanner Worker, its container applications, its scan copies, and the scanner images it copied."] : [],
1239
1239
  purgeResources ? purgeResourcesPlanText(manifest) : [
1240
1240
  "Disable platform traffic.",
1241
1241
  retainData ? "Keep Workers and data." : "Delete eligible data; keep Workers, R2, and AI Gateway.",
@@ -1,7 +1,7 @@
1
1
  import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { a as utcTime } from "./operator-ai-logging-ZDqqhnIq.mjs";
3
- import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-BjoPLgja.mjs";
4
- import { n as OperatorClient, r as OperatorClientError } from "./operator-client-DzebIntv.mjs";
2
+ import { a as utcTime } from "./operator-ai-logging-DD0n6zc2.mjs";
3
+ import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-DMvn-y9X.mjs";
4
+ import { n as OperatorClient, r as OperatorClientError } from "./operator-client-dFNnXfyB.mjs";
5
5
  import { y as printSuccess } from "./output-BZLnu0z8.mjs";
6
6
  import { stripVTControlCharacters } from "node:util";
7
7
  import { readFile } from "node:fs/promises";
@@ -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-fau3VKv6.mjs";
3
- import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-CnKBdDx5.mjs";
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
@@ -1,5 +1,5 @@
1
1
  import { L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { u as openBrowser } from "./auth-DlLDymuc.mjs";
2
+ import { u as openBrowser } from "./auth-CqwJwItO.mjs";
3
3
  import { h as import_picocolors, u as formatLink } from "./output-BZLnu0z8.mjs";
4
4
  // src/cli/platform-plan-writes.ts
5
5
  function planCreatesZone(plan) {
@@ -2,6 +2,7 @@ import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
2
2
  import { S as globSync, _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, y as parseWebSocketFilename } from "./scan-Ct_SEzH4.mjs";
3
3
  import { a as unwrapStaticExpression, c as walk, i as staticLiteral, s as bindingResolver } from "./static-exports-s7P86Ngp.mjs";
4
4
  import { a as isMemberExpression, i as isLiteral, n as isCallExpression, o as isObjectExpression, r as isIdentifier, t as asAstProgram } from "./ast-BkPQu7A0.mjs";
5
+ import { t as staticModuleReferences } from "./module-references-DWQmO6TW.mjs";
5
6
  import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
6
7
  import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
7
8
  import { r as getSsrServerEntryPath } from "./entry-Bwb9ev8K.mjs";
@@ -175,32 +176,6 @@ function readResourceDefinition(filename, source, helpers) {
175
176
  ...name === void 0 ? {} : { name }
176
177
  };
177
178
  }
178
- // src/shared/module-references.ts
179
- /** Runtime imports and re-exports, in source order, including empty export lists. */
180
- function staticModuleReferences(parsed, code) {
181
- const { staticImports, staticExports } = parsed.module;
182
- if (!(/\bexport\s*(?:\/|\{\s*(?:\}|\/))/.test(code) || staticImports.some((item) => item.entries.length === 0 && code.slice(item.start, item.moduleRequest.start).trim() !== "import"))) return [...staticImports.filter((item) => item.entries.length === 0 || item.entries.some((entry) => !entry.isType)).map((item) => ({
183
- source: item.moduleRequest.value,
184
- start: item.start,
185
- end: item.end
186
- })), ...staticExports.flatMap((item) => {
187
- const entry = item.entries.find((entry) => !entry.isType && entry.moduleRequest);
188
- return entry?.moduleRequest ? [{
189
- source: entry.moduleRequest.value,
190
- start: item.start,
191
- end: item.end
192
- }] : [];
193
- })].sort((a, b) => a.start - b.start);
194
- return parsed.program.body.flatMap((statement) => {
195
- if (statement.type !== "ImportDeclaration" && statement.type !== "ExportNamedDeclaration" && statement.type !== "ExportAllDeclaration") return [];
196
- if (!statement.source || "importKind" in statement && statement.importKind === "type" || "exportKind" in statement && statement.exportKind === "type" || "specifiers" in statement && statement.specifiers.length > 0 && statement.specifiers.every((specifier) => "importKind" in specifier && specifier.importKind === "type" || "exportKind" in specifier && specifier.exportKind === "type")) return [];
197
- return [{
198
- source: statement.source.value,
199
- start: statement.start,
200
- end: statement.end
201
- }];
202
- });
203
- }
204
179
  // src/inference/client-auth.ts
205
180
  const CLIENT_MODULES = /* @__PURE__ */ new Set([
206
181
  "void/client",
@@ -657,4 +632,4 @@ function inferProjectBindings(root, options, scanDirs) {
657
632
  }
658
633
  return applyBindingOverrides(mergeBindings(allBindings), options?.bindings);
659
634
  }
660
- export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c, readResourceDefinition as d, listConventionFiles as f, needsApplicationDatabase as h, inferProjectBindings as i, inferBindingsFromSource as l, applyBindingOverrides as m, FRAMEWORK_SCAN_DIRS as n, inferWebSocketResourceName as o, listRouteFiles as p, detectFramework as r, isWebSocketPatternFile as s, DEFAULT_SCAN_DIRS as t, staticModuleReferences as u };
635
+ export { deriveWebSocketClassNameFromName as a, scanWebSocketRoutesSync as c, listConventionFiles as d, listRouteFiles as f, inferProjectBindings as i, inferBindingsFromSource as l, needsApplicationDatabase as m, FRAMEWORK_SCAN_DIRS as n, inferWebSocketResourceName as o, applyBindingOverrides as p, detectFramework as r, isWebSocketPatternFile as s, DEFAULT_SCAN_DIRS as t, readResourceDefinition as u };
@@ -0,0 +1 @@
1
+ export { t as prepareProject } from "./prepare-co1o1FFd.mjs";
@@ -1,5 +1,5 @@
1
1
  import { L as log } from "./dist-Cr_xGE_K.mjs";
2
- import { t as prepareProject } from "./prepare-BbvlKreR.mjs";
2
+ import { t as prepareProject } from "./prepare-co1o1FFd.mjs";
3
3
  import { g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
4
4
  // src/cli/prepare.ts
5
5
  async function runPrepareCommand(root) {
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { t as analyzeApplication } from "./application-routing-BAXpnawu.mjs";
2
+ import { t as analyzeApplication } from "./application-routing-KKw4Y84h.mjs";
3
3
  import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-BFX5ZB1J.mjs";
4
4
  import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-BJDMPrj7.mjs";
5
5
  import { c as getDatabaseCasing, p as readConfig } from "./config-Dv5jri1-.mjs";