void 1.1.11 → 1.1.12

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 (152) hide show
  1. package/dist/{account-cmd-R35a4Oa8.mjs → account-cmd-Cj6sCMTk.mjs} +4 -4
  2. package/dist/{auth-link-VHmiKZmP.mjs → auth-link-Dj7lAC_K.mjs} +4 -4
  3. package/dist/{auth-router-O_Wrs5kg.mjs → auth-router-CNsMOFCa.mjs} +2 -2
  4. package/dist/{build-cmd-CMZiMn46.mjs → build-cmd-ByhegwRC.mjs} +2 -2
  5. package/dist/{cache-TZ5Ab3d7.mjs → cache-CEFb5ban.mjs} +2 -2
  6. package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-CaARY26n.mjs} +2 -2
  7. package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-ChEKWan2.mjs} +71 -7
  8. package/dist/cf-build-output-Dcmxa-Zm.mjs +1 -0
  9. package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-b8OqDoo9.mjs} +5 -16
  10. package/dist/cf-user-agent-BkEHPDLA.mjs +16 -0
  11. package/dist/cli/cli.mjs +135 -31
  12. package/dist/cli/cloudflare-operation-process.mjs +46 -9
  13. package/dist/{client-GuSO3v_x.mjs → client-BdzxubTS.mjs} +57 -12
  14. package/dist/client-DAnfyMe9.mjs +1 -0
  15. package/dist/{cloudflare-cmd-ZSErUl6Y.mjs → cloudflare-cmd-D_2-Q-_i.mjs} +1 -1
  16. package/dist/{cloudflare-operations-Cm8lVx7W.mjs → cloudflare-operations-BFLCpUCV.mjs} +1 -1
  17. package/dist/{cloudflare-operations-DH3GedbV.mjs → cloudflare-operations-D5PLrOqD.mjs} +14 -4
  18. package/dist/{connect-yQuLbuiJ.mjs → connect-C4_m2moF.mjs} +4 -4
  19. package/dist/{create-project-CGOo_OL_.mjs → create-project-CvuYDD-l.mjs} +1 -1
  20. package/dist/{create-project-DEEWJX_M.mjs → create-project-D8jQTwVQ.mjs} +2 -2
  21. package/dist/{db-COI-yTJE.mjs → db-BsiOAa0A.mjs} +58 -8
  22. package/dist/{delete-PgN6L_9N.mjs → delete-CAma7nFi.mjs} +2 -2
  23. package/dist/{deploy-DsW-PrRQ.mjs → deploy-D1gIPiAq.mjs} +118 -36
  24. package/dist/deploy-Dc0XsCQj.mjs +2 -0
  25. package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-B9KVxY3X.mjs} +64 -18
  26. package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-B3mtEi_q.mjs} +1 -1
  27. package/dist/deploy.d.mts +22 -1
  28. package/dist/deploy.mjs +45 -4
  29. package/dist/{domain-DKlNI0SR.mjs → domain-BAdwm-QS.mjs} +3 -3
  30. package/dist/{email-C0s3OvJk.mjs → email-MwjA7kaL.mjs} +4 -4
  31. package/dist/{env-BX2JFsgF.mjs → env-B163-G1s.mjs} +3 -3
  32. package/dist/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
  33. package/dist/fetch-CtESUYWd.mjs +26 -0
  34. package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
  35. package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
  36. package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
  37. package/dist/{gen-Bj6ZkOcI.mjs → gen-CYN3wiov.mjs} +1 -1
  38. package/dist/gen-Cf-RBVg4.mjs +1 -0
  39. package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-C8QsnJQs.mjs} +2 -2
  40. package/dist/{handler-_PqY82xe.d.mts → handler-D5K_yP6T.d.mts} +1 -1
  41. package/dist/{help-D49SL_lN.mjs → help-B2sFwn9b.mjs} +44 -3
  42. package/dist/help-w-xlx_kq.mjs +1 -0
  43. package/dist/index.d.mts +1 -1
  44. package/dist/index.mjs +38 -71
  45. package/dist/{init-DyTEY04s.mjs → init-DGFQMnbk.mjs} +6 -6
  46. package/dist/{link-CgOVn9EC.mjs → link-CwrfpjIM.mjs} +3 -3
  47. package/dist/{list-CUfD9RSb.mjs → list-hKoW5z-b.mjs} +3 -3
  48. package/dist/{live-DJONVlQK.d.mts → live-JheIDZKc.d.mts} +1 -1
  49. package/dist/login-08mBwZfI.mjs +1 -0
  50. package/dist/{login-BJvGW5Eu.mjs → login-f2eu2TQh.mjs} +3 -3
  51. package/dist/{logs-DeizBI4j.mjs → logs-CEWqD-_B.mjs} +3 -3
  52. package/dist/{migrate-8rk56vV8.mjs → migrate-DYfdWBXt.mjs} +1 -1
  53. package/dist/migrate-Di-4EuoE.mjs +1 -0
  54. package/dist/nitro.mjs +1 -1
  55. package/dist/operator-cmd-Bv20yLu2.mjs +1 -0
  56. package/dist/{operator-cmd-CA5QQyvE.mjs → operator-cmd-DCr_QGMH.mjs} +4 -4
  57. package/dist/{output-Ba6ZbrzY.mjs → output-CKguMgr7.mjs} +13 -1
  58. package/dist/pages/client.d.mts +2 -2
  59. package/dist/pages/client.mjs +18 -5
  60. package/dist/pages/index.d.mts +1 -1
  61. package/dist/pages/index.mjs +1 -1
  62. package/dist/pages/islands-plugin.d.mts +43 -5
  63. package/dist/pages/islands-plugin.mjs +98 -27
  64. package/dist/pages/protocol.d.mts +2 -2
  65. package/dist/pages/protocol.mjs +1 -1
  66. package/dist/pages/serialize.d.mts +2 -2
  67. package/dist/pages/serialize.mjs +1 -1
  68. package/dist/{platform-auth-config-CZaY812e.mjs → platform-auth-config-qGvEuns3.mjs} +5 -5
  69. package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-CyLcD6ot.mjs} +3 -3
  70. package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-B2LKI8V2.mjs} +3 -3
  71. package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-B2ec5eFg.mjs} +1 -1
  72. package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-CX7phm7V.mjs} +5 -5
  73. package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-DDNK2y-4.mjs} +3 -3
  74. package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-3CR98Tg2.mjs} +386 -36
  75. package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-CWc5gr6c.mjs} +1 -1
  76. package/dist/{platform-management-BvgbusqL.mjs → platform-management-DAE6g2QU.mjs} +1 -1
  77. package/dist/{platform-management-CnXhgxTM.mjs → platform-management-o3LCCeE4.mjs} +40 -2
  78. package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CBMZxCep.mjs} +1 -1
  79. package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-Dmsg7lWA.mjs} +2 -2
  80. package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-hFbnWAVQ.mjs} +1 -1
  81. package/dist/{prepare-2XD6kh77.mjs → prepare-HKo7Rh5V.mjs} +1 -1
  82. package/dist/{project-cmd-CpLYflCH.mjs → project-cmd-8ylYGx-O.mjs} +17 -17
  83. package/dist/{project-team-CTSY7W7Q.mjs → project-team-Bvpl78we.mjs} +2 -2
  84. package/dist/{project-token-Cybtlfbl.mjs → project-token-QWHoJH2t.mjs} +2 -2
  85. package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-8tJ-RFvu.mjs} +2 -2
  86. package/dist/{protocol-B8sI8dRD.d.mts → protocol-Ssc_LhHj.d.mts} +1 -1
  87. package/dist/{protocol-RNP0u7UY.mjs → protocol-bAUUkx70.mjs} +1 -1
  88. package/dist/{provision-UcYjpTRh.mjs → provision-BgXFDv0d.mjs} +1 -1
  89. package/dist/{provision-BuifYvLc.mjs → provision-DZKYCEJg.mjs} +3 -2
  90. package/dist/{requests-Ryiazz9i.mjs → requests-Vk5Zyhcy.mjs} +2 -2
  91. package/dist/{rollback-Or0EV3rP.mjs → rollback-CH4yMQys.mjs} +9 -8
  92. package/dist/runtime/client-react.d.mts +2 -2
  93. package/dist/runtime/client-react.mjs +3 -3
  94. package/dist/runtime/client-solid.d.mts +2 -2
  95. package/dist/runtime/client-solid.mjs +3 -3
  96. package/dist/runtime/client-svelte.d.mts +2 -2
  97. package/dist/runtime/client-svelte.mjs +3 -3
  98. package/dist/runtime/client-vue.d.mts +2 -2
  99. package/dist/runtime/client-vue.mjs +3 -3
  100. package/dist/runtime/client.d.mts +2 -2
  101. package/dist/runtime/client.mjs +3 -3
  102. package/dist/runtime/fetch-server.d.mts +8 -0
  103. package/dist/runtime/fetch-server.mjs +30 -0
  104. package/dist/runtime/fetch-stream.d.mts +2 -2
  105. package/dist/runtime/fetch-stream.mjs +2 -2
  106. package/dist/runtime/fetch.d.mts +2 -2
  107. package/dist/runtime/fetch.mjs +3 -3
  108. package/dist/runtime/handler.d.mts +1 -1
  109. package/dist/runtime/live-client.d.mts +1 -1
  110. package/dist/runtime/live.d.mts +1 -1
  111. package/dist/runtime/routing.d.mts +1 -1
  112. package/dist/runtime/routing.mjs +1 -1
  113. package/dist/runtime/validator.d.mts +1 -1
  114. package/dist/runtime/ws-server.d.mts +1 -1
  115. package/dist/runtime/ws.d.mts +1 -1
  116. package/dist/{secret-CClHaFxm.mjs → secret-wr6Sn4Xa.mjs} +3 -3
  117. package/dist/serialize-DtR8Vwa_.d.mts +18 -0
  118. package/dist/serialize-YHvlcG3Q.mjs +31 -0
  119. package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-CNZc4XUd.mjs} +1 -1
  120. package/dist/{wrapper-BOigE1xJ.mjs → wrapper-DGsYwNi6.mjs} +2 -0
  121. package/dist/{ws-CsBNxv86.d.mts → ws-nnFnAyQb.d.mts} +1 -1
  122. package/docs/guide/deployment.md +2 -0
  123. package/docs/guide/edge/headers.md +1 -1
  124. package/docs/guide/email/receiving.md +1 -1
  125. package/docs/guide/email/sending.md +3 -3
  126. package/docs/guide/pages-routing/markdown.md +3 -1
  127. package/docs/guide/platform/administration/email.md +7 -1
  128. package/docs/guide/platform/installation/ci.md +2 -0
  129. package/docs/guide/platform/installation/credentials.md +23 -5
  130. package/docs/guide/platform/installation/maintenance.md +32 -2
  131. package/docs/guide/platform/installation/setup.md +1 -1
  132. package/docs/guide/typed-fetch.md +1 -1
  133. package/docs/integrations/cloudflare.md +1 -1
  134. package/docs/integrations/frameworks/tanstack-start.md +25 -0
  135. package/docs/reference/api/deploy.md +35 -3
  136. package/docs/reference/cli/database.md +15 -0
  137. package/docs/reference/cli/platform-installation.md +2 -0
  138. package/docs/reference/cli/project.md +4 -2
  139. package/docs/reference/cli.md +1 -0
  140. package/docs/reference/config.md +1 -1
  141. package/package.json +8 -7
  142. package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
  143. package/dist/client-DrdeJgHR.mjs +0 -1
  144. package/dist/deploy-CxNgEYr4.mjs +0 -2
  145. package/dist/fetch-sAcwjzLO.mjs +0 -18
  146. package/dist/gen-DsCukhuw.mjs +0 -1
  147. package/dist/help-DOFygYi4.mjs +0 -1
  148. package/dist/login-alAlxw4S.mjs +0 -1
  149. package/dist/migrate-D2odrAmh.mjs +0 -1
  150. package/dist/operator-cmd-D7toMPJ9.mjs +0 -1
  151. package/dist/serialize-BtQyaYoC.mjs +0 -20
  152. package/dist/serialize-CfSwWfF2.d.mts +0 -10
@@ -1 +1 @@
1
- export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-D0TdyXbN.mjs";
1
+ export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-3CR98Tg2.mjs";
@@ -1 +1 @@
1
- export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-CnXhgxTM.mjs";
1
+ export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-o3LCCeE4.mjs";
@@ -1,8 +1,8 @@
1
1
  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-B9mWX9LO.mjs";
2
2
  import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
3
3
  import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
- import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
5
- import { A as matchesRecordedR2Fingerprint, B as activatePlatformAccessCredentials, C as platformTrafficAttachmentWorker, D as formatPlatformInstallPlan, E as dnsRecordConfigHash, F as platformDatabaseNameFromOwnerUrl, G as PlatformCloudflareClient, I as turnOffInstalledProjectZeroTrust, J as hyperdriveOriginMatches, K as hyperdriveOriginConfigHash, L as assertPlatformOperatorCredentialCanApplyPlan, M as r2BucketConfigHash, N as resourceMarkerProblem, O as hasProvisionIntentStep, P as revalidatePlatformInstallAction, R as resolvePlatformCloudflareCredential, T as createPlatformInstallPlan, W as PlatformCloudflareApiError, Y as verifyPlatformRuntimeTokenPermissions, _ as readPlatformDatabase, a as authenticationSetupRequestHash, b as createPlatformInstallationSecrets, c as REMOTE_INSTALLATION_MANIFEST_KEY, g as formatZeroTrustApplications, h as assertProjectZeroTrustAllowsUninstall, j as platformAdoptionIntentHash, k as legacyResourceConfigHash, l as installPlatform, m as readPlatformProjectZeroTrustState, n as resolvePlatformInstallDatabaseUrl, o as readLoginReplacementFile, p as readPlatformProjectSlugs, q as hyperdriveOriginFromConnectionString, s as replacePendingInstallationAuthentication, t as assertNoninteractivePlatformMutationAcknowledged, u as acquirePlatformDatabaseLifecycleLock, v as loadPlatformRuntime, x as resolveBootstrapGitHubId, y as createPlatformHealthProbeToken, z as verifyPlatformCloudflareCredential } from "./platform-lifecycle-D0TdyXbN.mjs";
4
+ import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-CKguMgr7.mjs";
5
+ import { $ as hyperdriveOriginMatches, A as dnsRecordConfigHash, B as turnOffInstalledProjectZeroTrust, C as createPlatformHealthProbeToken, D as platformTrafficAttachmentWorker, F as platformAdoptionIntentHash, H as resolvePlatformCloudflareCredential, I as r2BucketConfigHash, J as PlatformCloudflareApiError, L as resourceMarkerProblem, M as hasProvisionIntentStep, N as legacyResourceConfigHash, P as matchesRecordedR2Fingerprint, Q as hyperdriveOriginFromConnectionString, R as revalidatePlatformInstallAction, S as loadPlatformRuntime, T as resolveBootstrapGitHubId, U as verifyPlatformCloudflareCredential, V as assertPlatformOperatorCredentialCanApplyPlan, W as activatePlatformAccessCredentials, X as PlatformRuntimeTokenEmailPermissionError, Y as PlatformCloudflareClient, Z as hyperdriveOriginConfigHash, _ as readPlatformProjectSlugs, a as findPlatformWorkerOutsideChanges, b as formatZeroTrustApplications, c as uploadPlatformWorkerOutsideChanges, d as replacePendingInstallationAuthentication, et as verifyPlatformRuntimeTokenEmailPermissions, f as REMOTE_INSTALLATION_MANIFEST_KEY, j as formatPlatformInstallPlan, k as createPlatformInstallPlan, l as authenticationSetupRequestHash, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, o as formatPlatformWorkerOutsideChanges, p as installPlatform, s as reviewPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as verifyPlatformRuntimeTokenPermissions, u as readLoginReplacementFile, v as readPlatformProjectZeroTrustState, w as createPlatformInstallationSecrets, x as readPlatformDatabase, y as assertProjectZeroTrustAllowsUninstall, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-3CR98Tg2.mjs";
6
6
  import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
7
7
  import { setTimeout } from "node:timers/promises";
8
8
  //#region src/cli/platform-teardown.ts
@@ -738,6 +738,8 @@ async function runInstalledPlatformCommand(args) {
738
738
  log.info(manifest.desiredState === "disabled" && args.subcommand !== "enable" ? "Application traffic will stay paused because this installation is disabled." : "Application traffic may pause briefly during a safe cutover.");
739
739
  if (args.plan) {
740
740
  if (loginFile !== void 0) log.info(`Login settings will be replaced from ${loginFile}; a new setup code is printed at the end.`);
741
+ const outsideChanges = await findPlatformWorkerOutsideChanges(client, plan, runtime, { manifest });
742
+ if (outsideChanges.length > 0) log.warn(`${formatPlatformWorkerOutsideChanges(outsideChanges)}\nThis command replaces their configuration with the Void configuration. Run it in a terminal to review them first.`);
741
743
  outro("No Cloudflare or local installation state was changed.");
742
744
  return;
743
745
  }
@@ -789,14 +791,41 @@ async function runInstalledPlatformCommand(args) {
789
791
  ...replacedLogin
790
792
  });
791
793
  const runtimeTokenToPreflight = resolvePlatformRuntimeTokenToPreflight(plan, secrets);
794
+ const emailZoneId = installation.desiredState !== "disabled" && plan.deployment.capabilities.email ? plan.deployment.emailSharedZoneId : void 0;
792
795
  if (runtimeTokenToPreflight) await verifyPlatformRuntimeTokenPermissions(new PlatformCloudflareClient(runtimeTokenToPreflight), {
793
796
  accountId: manifest.account.id,
794
797
  applicationDomain: deployment.application.baseDomain,
795
798
  customDomains: plan.deployment.capabilities.customDomains,
799
+ ...emailZoneId ? { emailZoneId } : {},
796
800
  zoneId: plan.zone?.id ?? null
797
801
  });
802
+ else if (emailZoneId && secrets.cloudflareApiToken) try {
803
+ await verifyPlatformRuntimeTokenEmailPermissions(new PlatformCloudflareClient(secrets.cloudflareApiToken), {
804
+ accountId: manifest.account.id,
805
+ savedToken: true,
806
+ zoneId: emailZoneId
807
+ });
808
+ } catch (error) {
809
+ if (!(error instanceof PlatformRuntimeTokenEmailPermissionError) || !error.tokenNotValid) throw error;
810
+ log.warn("The runtime API token saved on this machine is not valid (HTTP 401). Void cannot check the platform email permissions before it changes the platform, and it continues without this check. To do the check, set VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN to the runtime token of the platform.");
811
+ }
798
812
  markPhase("runtime token");
799
813
  if (!databaseLock?.readAuthenticationState) throw new Error("platform: The database lifecycle lock cannot read authoritative authentication settings.");
814
+ const outsideChanges = await reviewPlatformWorkerOutsideChanges({
815
+ client,
816
+ plan,
817
+ runtime,
818
+ installation: {
819
+ manifest: installation,
820
+ readAuthenticationState: databaseLock.readAuthenticationState
821
+ },
822
+ interactive: process.stdin.isTTY === true && process.stdout.isTTY === true && !args.yes,
823
+ command: platformLifecycleResumeCommand({
824
+ ...args,
825
+ yes: false
826
+ }, manifest.id)
827
+ });
828
+ markPhase("outside changes");
800
829
  progress = createSpinner({ onCancel: () => {
801
830
  if (!process.emit("SIGINT")) process.exit(130);
802
831
  } });
@@ -825,6 +854,15 @@ async function runInstalledPlatformCommand(args) {
825
854
  }),
826
855
  client,
827
856
  operatorApiToken: operatorCredential.token,
857
+ ...outsideChanges.length > 0 ? {
858
+ replaceOutsideChanges: outsideChanges.map((change) => change.name),
859
+ uploadOutsideChanges: (configs) => uploadPlatformWorkerOutsideChanges(configs, {
860
+ changes: outsideChanges,
861
+ client,
862
+ operatorApiToken: operatorCredential.token,
863
+ progress
864
+ })
865
+ } : {},
828
866
  databaseRollbackSource: rollbackSourceRuntime ?? void 0,
829
867
  onProgress: (message) => {
830
868
  markPhase(message);
@@ -1,5 +1,5 @@
1
1
  import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
2
- import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
2
+ import { m as printSuccess } from "./output-CKguMgr7.mjs";
3
3
  import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
4
4
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
5
5
  import { stripVTControlCharacters } from "node:util";
@@ -1,7 +1,7 @@
1
1
  import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
3
- import { T as createPlatformInstallPlan, c as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-D0TdyXbN.mjs";
4
- import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-CnXhgxTM.mjs";
3
+ import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-3CR98Tg2.mjs";
4
+ import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-o3LCCeE4.mjs";
5
5
  import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
6
6
  //#region src/cli/platform-recovery.ts
7
7
  async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
@@ -1,6 +1,6 @@
1
1
  import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
3
- import { f as import_picocolors, s as formatLink } from "./output-Ba6ZbrzY.mjs";
3
+ import { f as import_picocolors, s as formatLink } from "./output-CKguMgr7.mjs";
4
4
  //#region src/cli/platform-setup.ts
5
5
  /** Return a prompt answer, or stop the platform command when the prompt was cancelled. */
6
6
  function platformPromptAnswer(value) {
@@ -1,5 +1,5 @@
1
1
  import { L as log } from "./dist-BVdsO7Py.mjs";
2
- import { m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
2
+ import { m as printSuccess, p as note } from "./output-CKguMgr7.mjs";
3
3
  import { t as prepareProject } from "./prepare-DepAGBcV.mjs";
4
4
  //#region src/cli/prepare.ts
5
5
  async function runPrepareCommand(root) {
@@ -1,8 +1,8 @@
1
1
  import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken, s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
4
+ import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  //#region src/cli/projects.ts
7
7
  async function runProjectsCommand(root) {
8
8
  console.log();
@@ -38,77 +38,77 @@ async function runProjectsCommand(root) {
38
38
  async function runProjectCommand(root, args) {
39
39
  const cloudflare = readDeploymentPlatform(root) === "cloudflare";
40
40
  if (args.subcommand === "status") {
41
- const { runListCommand } = await import("./list-CUfD9RSb.mjs");
41
+ const { runListCommand } = await import("./list-hKoW5z-b.mjs");
42
42
  return runListCommand(root, args.name || void 0);
43
43
  }
44
44
  if (args.subcommand === "link") {
45
45
  if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
46
- const { runLink } = await import("./link-CgOVn9EC.mjs");
46
+ const { runLink } = await import("./link-CwrfpjIM.mjs");
47
47
  return runLink(root, args.name || void 0);
48
48
  }
49
49
  if (args.subcommand === "list") {
50
50
  if (cloudflare) {
51
- const { runListCommand } = await import("./list-CUfD9RSb.mjs");
51
+ const { runListCommand } = await import("./list-hKoW5z-b.mjs");
52
52
  return runListCommand(root);
53
53
  }
54
54
  return runProjectsCommand(root);
55
55
  }
56
56
  if (args.subcommand === "token") {
57
57
  if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
58
- const { runProjectTokenCommand } = await import("./project-token-Cybtlfbl.mjs");
58
+ const { runProjectTokenCommand } = await import("./project-token-QWHoJH2t.mjs");
59
59
  return runProjectTokenCommand(root, args);
60
60
  }
61
61
  if (args.subcommand === "team") {
62
62
  if (args.action === "") {
63
- const { printHelpPage } = await import("./help-DOFygYi4.mjs");
63
+ const { printHelpPage } = await import("./help-w-xlx_kq.mjs");
64
64
  printHelpPage(["project", "team"]);
65
65
  return;
66
66
  }
67
67
  const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
68
68
  if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
69
- const { runProjectTeamCommand } = await import("./project-team-CTSY7W7Q.mjs");
69
+ const { runProjectTeamCommand } = await import("./project-team-Bvpl78we.mjs");
70
70
  return runProjectTeamCommand(root, args);
71
71
  }
72
72
  if (args.subcommand === "zero-trust") {
73
73
  if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
74
74
  if (args.action === "") {
75
- const { printHelpPage } = await import("./help-DOFygYi4.mjs");
75
+ const { printHelpPage } = await import("./help-w-xlx_kq.mjs");
76
76
  printHelpPage(["project", "zero-trust"]);
77
77
  return;
78
78
  }
79
79
  const action = args.action;
80
- const { runProjectZeroTrustCommand } = await import("./project-zero-trust-DKOtqyvu.mjs");
80
+ const { runProjectZeroTrustCommand } = await import("./project-zero-trust-8tJ-RFvu.mjs");
81
81
  return runProjectZeroTrustCommand(root, {
82
82
  ...args,
83
83
  action
84
84
  });
85
85
  }
86
86
  if (args.subcommand === "logs") {
87
- const { runLogsCommand } = await import("./logs-DeizBI4j.mjs");
87
+ const { runLogsCommand } = await import("./logs-CEWqD-_B.mjs");
88
88
  return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
89
89
  }
90
90
  if (args.subcommand === "requests") {
91
91
  if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
92
- const { runRequestsCommand } = await import("./requests-Ryiazz9i.mjs");
92
+ const { runRequestsCommand } = await import("./requests-Vk5Zyhcy.mjs");
93
93
  return runRequestsCommand(root, args.range, args.status || void 0);
94
94
  }
95
95
  if (args.subcommand === "rollback") {
96
- const { runRollbackCommand } = await import("./rollback-Or0EV3rP.mjs");
97
- return runRollbackCommand(root, args.deployId || void 0);
96
+ const { runRollbackCommand } = await import("./rollback-CH4yMQys.mjs");
97
+ return runRollbackCommand(root, args.deployId || void 0, args.platform);
98
98
  }
99
99
  if (args.subcommand === "cancel") {
100
100
  if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
101
- const { runCancelDeployCommand } = await import("./cancel-deploy-DXoR6oC3.mjs");
101
+ const { runCancelDeployCommand } = await import("./cancel-deploy-CaARY26n.mjs");
102
102
  return runCancelDeployCommand(root, args.deployId || void 0);
103
103
  }
104
104
  if (args.subcommand === "delete") {
105
105
  if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
106
- const { runDeleteCommand } = await import("./delete-PgN6L_9N.mjs");
106
+ const { runDeleteCommand } = await import("./delete-CAma7nFi.mjs");
107
107
  return runDeleteCommand(root, args.name || void 0, { force: args.force });
108
108
  }
109
109
  if (args.subcommand === "purge-cache") {
110
110
  if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
111
- const { runPurgeCacheCommand } = await import("./cache-TZ5Ab3d7.mjs");
111
+ const { runPurgeCacheCommand } = await import("./cache-CEFb5ban.mjs");
112
112
  return runPurgeCacheCommand(root, args.projectSlug || void 0);
113
113
  }
114
114
  }
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken, i as getAccountCredential } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-Ba6ZbrzY.mjs";
5
- import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-GuSO3v_x.mjs";
4
+ import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-CKguMgr7.mjs";
5
+ import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BdzxubTS.mjs";
6
6
  import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
7
7
  //#region src/cli/project-team.ts
8
8
  function clean(value) {
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
4
+ import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  import { r as requireProjectBySlug } from "./resolve-project-WpwkCB_c.mjs";
7
7
  //#region src/cli/project-token.ts
8
8
  async function resolveTarget(root, args) {
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
4
+ import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
7
7
  //#region src/cli/project-zero-trust.ts
8
8
  async function resolveTarget(root, args) {
@@ -1,5 +1,5 @@
1
1
  import { n as HeadDescriptor, t as HeadConfig } from "./head-C8K_iGe6.mjs";
2
- import { n as CloudBindings, r as CloudContext } from "./handler-_PqY82xe.mjs";
2
+ import { n as CloudBindings, r as CloudContext } from "./handler-D5K_yP6T.mjs";
3
3
  import { a as PageRenderMode, t as DevCssAsset } from "./types-7AIz0OZu.mjs";
4
4
  //#region src/pages/protocol.d.ts
5
5
  /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
@@ -1,7 +1,7 @@
1
1
  import { n as isConvertedResponse } from "./response-Tn7rU0MV.mjs";
2
2
  import { i as separateDeferred, n as DEFERRED, t as ValidationError } from "./validation-error-Dg9Recn1.mjs";
3
3
  import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "./head-D2VF4ApL.mjs";
4
- import { n as escapeScriptJson, t as serializePageData } from "./serialize-BtQyaYoC.mjs";
4
+ import { i as escapeScriptJson, r as serializePageData } from "./serialize-YHvlcG3Q.mjs";
5
5
  //#region src/pages/protocol.ts
6
6
  const POWERED_BY = { "X-Powered-By": "Void" };
7
7
  const RENDER_ERROR_ASSET_TAGS_KEY = "__voidPageAssetTags";
@@ -1 +1 @@
1
- export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-BuifYvLc.mjs";
1
+ export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-DZKYCEJg.mjs";
@@ -455,6 +455,7 @@ function createDefaultRunWrangler(root, options) {
455
455
  const teardownDeadlineMs = options?.signalTeardownDeadlineMs ?? confirmGraceMs + SIGNAL_TEARDOWN_DEADLINE_MARGIN_MS;
456
456
  return (args, opts) => new Promise((resolvePromise, rejectPromise) => {
457
457
  const parallelWorkerUpload = options?.parallelWorkerUpload === true && args.type === "versions.upload";
458
+ const interactive = (args.type === "versions.upload" || args.type === "worker.deploy") && args.interactive === true;
458
459
  if (activeTeardown !== void 0) {
459
460
  rejectPromise(/* @__PURE__ */ new Error(`provision: refusing to spawn a Cloudflare operation process — a fatal ${activeTeardown.signal} is being handled and this process is terminating; no new Cloudflare operation may start.`));
460
461
  return;
@@ -474,7 +475,7 @@ function createDefaultRunWrangler(root, options) {
474
475
  }),
475
476
  ...opts.suppressLogs ? { WRANGLER_WRITE_LOGS: "false" } : {}
476
477
  },
477
- stdio: [
478
+ stdio: interactive ? "inherit" : [
478
479
  opts.input === void 0 ? "ignore" : "pipe",
479
480
  "pipe",
480
481
  "pipe"
@@ -556,7 +557,7 @@ function createDefaultRunWrangler(root, options) {
556
557
  settled = true;
557
558
  clearTimeout(commandTimer);
558
559
  deregisterSelf();
559
- resolvePromise(decodeCloudflareOperationResult(result));
560
+ resolvePromise(interactive ? result : decodeCloudflareOperationResult(result));
560
561
  };
561
562
  const quarantine = (detail) => {
562
563
  if (settled) return;
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { f as import_picocolors, i as dim } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
4
+ import { f as import_picocolors, i as dim } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  //#region src/cli/requests.ts
7
7
  async function runRequestsCommand(root, range, status) {
8
8
  console.log();
@@ -1,13 +1,13 @@
1
1
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
- import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
4
+ import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  //#region src/cli/rollback.ts
7
- async function runRollbackCommand(root, deployId) {
7
+ async function runRollbackCommand(root, deployId, explicitPlatform) {
8
8
  console.log();
9
9
  const platform = readDeploymentPlatform(root);
10
- if (platform === "cloudflare") return runCloudflareRollback(root, deployId);
10
+ if (explicitPlatform === "cloudflare" || platform === "cloudflare") return runCloudflareRollback(root, deployId, platform !== "cloudflare");
11
11
  if (platform === "none") throw new Error("rollback: Deployment is disabled. Run `void init` to choose a platform.");
12
12
  const token = getToken(root);
13
13
  if (!token) {
@@ -73,8 +73,8 @@ async function runRollbackCommand(root, deployId) {
73
73
  process.exit(1);
74
74
  }
75
75
  }
76
- async function runCloudflareRollback(root, deployId) {
77
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-Cm8lVx7W.mjs");
76
+ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
77
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BFLCpUCV.mjs");
78
78
  const context = resolveCloudflareOperationContext(root);
79
79
  const status = await readCloudflareWorkerStatus(context);
80
80
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -116,7 +116,7 @@ async function runCloudflareRollback(root, deployId) {
116
116
  await confirmRollbackOrExit();
117
117
  } else {
118
118
  const targetSet = new Set(target.metadata.migrations);
119
- await confirmUnrevertedMigrations(current.metadata.migrations.filter((migration) => !targetSet.has(migration)), "version");
119
+ await confirmUnrevertedMigrations(current.metadata.migrations.filter((migration) => !targetSet.has(migration)), "version", restorePlatformFlag);
120
120
  }
121
121
  const spinner = createSpinner();
122
122
  spinner.start("Rolling back...");
@@ -139,11 +139,12 @@ async function confirmRollbackOrExit() {
139
139
  }
140
140
  }
141
141
  /** List migrations the rollback will not revert and ask before continuing. */
142
- async function confirmUnrevertedMigrations(migrationDiff, noun) {
142
+ async function confirmUnrevertedMigrations(migrationDiff, noun, restorePlatformFlag = false) {
143
143
  if (migrationDiff.length === 0) return;
144
144
  log.warn(`The current database has ${formatCount(migrationDiff.length, "migration")} applied after this ${noun}:`);
145
145
  for (const migration of migrationDiff) log.message(` ${dim("•")} ${migration}`);
146
146
  log.message(dim("Rolling back will NOT revert these migrations. The older code will run against the current schema."));
147
+ if (noun === "version") log.message(dim(`For D1, \`void db restore${restorePlatformFlag ? " --platform cloudflare" : ""} --bookmark <bookmark>\` undoes them with the restore point deploy printed before migrating. Restore points expire after 7 days on Workers Free and 30 days on Paid; undo older migrations with a new migration.`));
147
148
  await confirmRollbackOrExit();
148
149
  }
149
150
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-react-7GFffu8R.mjs";
3
- import { a as fetch, o as FetchError } from "../fetch-DHLOuPyk.mjs";
4
- import { t as fetchStream } from "../fetch-stream-CNxOrBdP.mjs";
3
+ import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
+ import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetch } from "../fetch-sAcwjzLO.mjs";
3
- import { t as fetchStream } from "../fetch-stream-PGgz4uGz.mjs";
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { n as fetch } from "../fetch-CtESUYWd.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-react-CMLwT2xI.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-solid-DyTFL4cq.mjs";
3
- import { a as fetch, o as FetchError } from "../fetch-DHLOuPyk.mjs";
4
- import { t as fetchStream } from "../fetch-stream-CNxOrBdP.mjs";
3
+ import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
+ import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetch } from "../fetch-sAcwjzLO.mjs";
3
- import { t as fetchStream } from "../fetch-stream-PGgz4uGz.mjs";
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { n as fetch } from "../fetch-CtESUYWd.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-solid-UoreJWZG.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-svelte-zetW0KIH.mjs";
3
- import { a as fetch, o as FetchError } from "../fetch-DHLOuPyk.mjs";
4
- import { t as fetchStream } from "../fetch-stream-CNxOrBdP.mjs";
3
+ import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
+ import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetch } from "../fetch-sAcwjzLO.mjs";
3
- import { t as fetchStream } from "../fetch-stream-PGgz4uGz.mjs";
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { n as fetch } from "../fetch-CtESUYWd.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-svelte-Cv_WvrRk.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-vue-bChShbQP.mjs";
3
- import { a as fetch, o as FetchError } from "../fetch-DHLOuPyk.mjs";
4
- import { t as fetchStream } from "../fetch-stream-CNxOrBdP.mjs";
3
+ import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
+ import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetch } from "../fetch-sAcwjzLO.mjs";
3
- import { t as fetchStream } from "../fetch-stream-PGgz4uGz.mjs";
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { n as fetch } from "../fetch-CtESUYWd.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-vue-CFk7Xbv3.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-Bawdj38n.mjs";
3
- import { a as fetch, o as FetchError } from "../fetch-DHLOuPyk.mjs";
4
- import { t as fetchStream } from "../fetch-stream-CNxOrBdP.mjs";
3
+ import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
+ import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetch } from "../fetch-sAcwjzLO.mjs";
3
- import { t as fetchStream } from "../fetch-stream-PGgz4uGz.mjs";
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { n as fetch } from "../fetch-CtESUYWd.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-BWBT8HLp.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -0,0 +1,8 @@
1
+ import { a as UntypedFetchOptions, c as FetchError } from "../fetch-CUX0tB78.mjs";
2
+ //#region src/runtime/fetch-server.d.ts
3
+ /** Keep local calls in the app while using the browser client's request and error handling. */
4
+ export declare function createServerFetch<Context extends {
5
+ request?: Request;
6
+ }>(dispatch: (request: Request, context: Context | undefined) => Response | Promise<Response>, getContext: () => Context | undefined, fallbackOrigin: string): (path: string, options?: UntypedFetchOptions) => Promise<unknown>;
7
+ //#endregion
8
+ export { FetchError };
@@ -0,0 +1,30 @@
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { t as createRouteFetch } from "../fetch-CtESUYWd.mjs";
3
+ //#region src/runtime/fetch-server.ts
4
+ /** Keep local calls in the app while using the browser client's request and error handling. */
5
+ function createServerFetch(dispatch, getContext, fallbackOrigin) {
6
+ return createRouteFetch(async (input, init) => {
7
+ const store = getContext();
8
+ const origin = store?.request ? new URL(store.request.url).origin : fallbackOrigin;
9
+ const request = new Request(new URL(String(input), origin), init);
10
+ if (new URL(request.url).origin !== origin) return globalThis.fetch(request);
11
+ for (const name of ["cookie", "authorization"]) if (!request.headers.has(name)) {
12
+ const value = store?.request?.headers.get(name);
13
+ if (value) request.headers.set(name, value);
14
+ }
15
+ const signal = request.signal;
16
+ signal.throwIfAborted();
17
+ let abort;
18
+ try {
19
+ return await new Promise((resolve, reject) => {
20
+ abort = () => reject(signal.reason);
21
+ signal.addEventListener("abort", abort, { once: true });
22
+ Promise.resolve(dispatch(request, store)).then(resolve, reject);
23
+ });
24
+ } finally {
25
+ signal.removeEventListener("abort", abort);
26
+ }
27
+ });
28
+ }
29
+ //#endregion
30
+ export { FetchError, createServerFetch };
@@ -1,3 +1,3 @@
1
- import { o as FetchError } from "../fetch-DHLOuPyk.mjs";
2
- import { t as fetchStream } from "../fetch-stream-CNxOrBdP.mjs";
1
+ import { c as FetchError } from "../fetch-CUX0tB78.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -1,3 +1,3 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetchStream } from "../fetch-stream-PGgz4uGz.mjs";
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -1,2 +1,2 @@
1
- import { a as fetch, i as QueryOption, n as MethodsOf, o as FetchError, r as ParamsOption, t as BodyOption } from "../fetch-DHLOuPyk.mjs";
2
- export { BodyOption, FetchError, MethodsOf, ParamsOption, QueryOption, fetch };
1
+ import { a as UntypedFetchOptions, c as FetchError, i as QueryOption, n as MethodsOf, o as createRouteFetch, r as ParamsOption, s as fetch, t as BodyOption } from "../fetch-CUX0tB78.mjs";
2
+ export { BodyOption, FetchError, MethodsOf, ParamsOption, QueryOption, UntypedFetchOptions, createRouteFetch, fetch };
@@ -1,3 +1,3 @@
1
- import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetch } from "../fetch-sAcwjzLO.mjs";
3
- export { FetchError, fetch };
1
+ import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
2
+ import { n as fetch, t as createRouteFetch } from "../fetch-CtESUYWd.mjs";
3
+ export { FetchError, createRouteFetch, fetch };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-_PqY82xe.mjs";
2
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-D5K_yP6T.mjs";
3
3
  export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,4 +1,4 @@
1
- import { t as LiveClientEvent } from "../live-DJONVlQK.mjs";
1
+ import { t as LiveClientEvent } from "../live-JheIDZKc.mjs";
2
2
  //#region src/runtime/live-client.d.ts
3
3
  export type LiveSubscribeOptions<Data = unknown> = {
4
4
  id: string;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-DJONVlQK.mjs";
2
+ import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-JheIDZKc.mjs";
3
3
  export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
@@ -1,5 +1,5 @@
1
1
  import { t as DevCssAsset } from "../types-7AIz0OZu.mjs";
2
- import { a as handlePageMutation, i as handlePageGet } from "../protocol-B8sI8dRD.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet } from "../protocol-Ssc_LhHj.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { Context, ExecutionContext, Hono, MiddlewareHandler } from "hono";
5
5
  //#region src/runtime/routing-errors.d.ts
@@ -1,6 +1,6 @@
1
1
  import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-VkrKIbxE.mjs";
2
2
  import { t as convertReturnValue } from "../response-Tn7rU0MV.mjs";
3
- import { n as handlePageGet, r as handlePageMutation } from "../protocol-RNP0u7UY.mjs";
3
+ import { n as handlePageGet, r as handlePageMutation } from "../protocol-bAUUkx70.mjs";
4
4
  import { t as VoidAssetRewriteError } from "../handler-BZ1t7-Rv.mjs";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, substituteParams } from "@void/edge";