void 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/{account-cmd-DcR1ywt8.mjs → account-cmd-CDry3B5V.mjs} +4 -4
  2. package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DC2yPvzY.mjs} +1 -1
  3. package/dist/{application-routing-B7QEjqSR.mjs → application-routing-C9khgLiS.mjs} +1 -1
  4. package/dist/{auth-CdgZ9uag.mjs → auth-B60QDbjg.mjs} +1 -1
  5. package/dist/{auth-7wuZ5ob8.mjs → auth-D52yG7hl.mjs} +3 -3
  6. package/dist/{auth-link-Z6E5DYvM.mjs → auth-link-DjeOptYi.mjs} +4 -4
  7. package/dist/{auth-router-BdM4avI8.mjs → auth-router-BRxIuqDi.mjs} +5 -5
  8. package/dist/{build-cmd-CEE7D-hM.mjs → build-cmd-Ce3C8huo.mjs} +4 -4
  9. package/dist/{cache-TcZnBLtH.mjs → cache-CS8Yxr5a.mjs} +4 -4
  10. package/dist/{cancel-deploy-CYoZmcmR.mjs → cancel-deploy-mZsD88Xa.mjs} +3 -3
  11. package/dist/{cf-access-AHKBzmuu.mjs → cf-access-YTlqvAsk.mjs} +1 -1
  12. package/dist/cli/cli.mjs +40 -40
  13. package/dist/cli/cloudflare-operation-process.mjs +1 -1
  14. package/dist/cli/env-schema-probe.d.mts +1 -1
  15. package/dist/client-BxVixJBI.mjs +2 -0
  16. package/dist/{client-RsPo8wsP.mjs → client-mC-dFGDD.mjs} +5 -5
  17. package/dist/{cloudflare-operations-CjaV4lZi.mjs → cloudflare-operations-DYa3coIk.mjs} +1 -1
  18. package/dist/{cloudflare-operations-BhbK6yTq.mjs → cloudflare-operations-DoQrVHAt.mjs} +1 -1
  19. package/dist/{connect-DCvUmPXY.mjs → connect-H6EvP62X.mjs} +6 -6
  20. package/dist/{create-project-eAPgYq35.mjs → create-project-B2kk9Q0o.mjs} +4 -4
  21. package/dist/{create-project-C734I-Mu.mjs → create-project-Dbb4uiN-.mjs} +1 -1
  22. package/dist/{db-C07GEdKF.mjs → db-DpCKZto0.mjs} +21 -21
  23. package/dist/{delete-pKMVsrpJ.mjs → delete-CxlSvsvW.mjs} +6 -6
  24. package/dist/{deploy-DfsAe-T0.mjs → deploy-CeEbnv4b.mjs} +38 -24
  25. package/dist/{deploy-BDu1vhSH.mjs → deploy-qmiLE1G1.mjs} +1 -1
  26. package/dist/{domain-D3uA9ize.mjs → domain-B_9VgOm6.mjs} +6 -6
  27. package/dist/{email-z3o2cwjH.mjs → email-BokHgjKj.mjs} +6 -6
  28. package/dist/{env-3Q8-_2IH.mjs → env-BdTc-K2L.mjs} +6 -5
  29. package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
  30. package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-Nm3hkZbT.mjs} +8 -1
  31. package/dist/{gen-NjwoG9FK.mjs → gen-BhDlTpwW.mjs} +1 -1
  32. package/dist/gen-qCBwH3fZ.mjs +2 -0
  33. package/dist/{github-cmd-DquUq-b1.mjs → github-cmd-hhkTzlGS.mjs} +4 -4
  34. package/dist/{handler-CZ4nAylQ.d.mts → handler-BeK3weD4.d.mts} +1 -1
  35. package/dist/{help-DRZXC4fj.mjs → help-Bv44e2tm.mjs} +13 -9
  36. package/dist/help-Dw5f9Xrg.mjs +2 -0
  37. package/dist/index.d.mts +1 -1
  38. package/dist/index.mjs +30 -17
  39. package/dist/{info-BmA3_IFZ.mjs → info-DhtTKh65.mjs} +1 -1
  40. package/dist/{init-DT7yuuyl.mjs → init-BMf4T03q.mjs} +10 -9
  41. package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
  42. package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
  43. package/dist/{link-CXOlqh2F.mjs → link-BqYsSS_I.mjs} +5 -5
  44. package/dist/{list-eEWVJEPn.mjs → list-_kBToO-l.mjs} +7 -6
  45. package/dist/{live-Chw1eIMv.d.mts → live-iAuEH1hd.d.mts} +1 -1
  46. package/dist/{local-d1-Df4XpwhW.mjs → local-d1-fGxYrVD6.mjs} +1 -1
  47. package/dist/login-D7meQg_3.mjs +2 -0
  48. package/dist/{login-pWQHYVu2.mjs → login-DFuo-RWO.mjs} +4 -4
  49. package/dist/{logs-DnxVX7TR.mjs → logs-DYgnh6dH.mjs} +5 -5
  50. package/dist/{node-BkyRWRx8.mjs → node-C6Q6e1Es.mjs} +1 -1
  51. package/dist/{operator-args-CAVcmwUt.mjs → operator-args-DdY54Bgb.mjs} +1 -1
  52. package/dist/{operator-auth-CkmTE3rt.mjs → operator-auth-2dsGlTT5.mjs} +4 -8
  53. package/dist/{operator-client-LmwjxT6q.mjs → operator-client-BFqpp6z0.mjs} +3 -3
  54. package/dist/{operator-cmd-d-IEKgNk.mjs → operator-cmd-CUGHXrQf.mjs} +27 -9
  55. package/dist/operator-cmd-DRPvhpjM.mjs +2 -0
  56. package/dist/{output-BBsUwdyT.mjs → output-BvdaehtE.mjs} +26 -2
  57. package/dist/pages/client.d.mts +1 -1
  58. package/dist/pages/index.mjs +1 -1
  59. package/dist/pages/islands-plugin.mjs +1 -1
  60. package/dist/pages/protocol.d.mts +2 -2
  61. package/dist/{plan-NPpwZ_kc.mjs → plan-CJGEeTEI.mjs} +2 -2
  62. package/dist/plan-COtUvdMA.mjs +2 -0
  63. package/dist/{platform-args-Bzf8JPc2.mjs → platform-args-DSV2p4nY.mjs} +4 -2
  64. package/dist/platform-args-Dcy_5b_Y.mjs +2 -0
  65. package/dist/{platform-auth-config-0V0lA3pF.mjs → platform-auth-config-Bosx7U1h.mjs} +18 -17
  66. package/dist/{platform-auth-protection-DFeJ-JkK.mjs → platform-auth-protection-DcbL_LW_.mjs} +6 -6
  67. package/dist/{platform-auth-recovery-ICy4muq6.mjs → platform-auth-recovery-WfTZ8K6o.mjs} +5 -5
  68. package/dist/{platform-cmd-D7vSWMvV.mjs → platform-cmd-DbKtQb_4.mjs} +45 -20
  69. package/dist/{platform-cmd-BPySFOew.mjs → platform-cmd-dyFUof0t.mjs} +1 -1
  70. package/dist/{platform-discovery-DDDUvnqp.mjs → platform-discovery-BC0HCKYt.mjs} +18 -4
  71. package/dist/{platform-domain-CUdY064e.mjs → platform-domain-Bsq43AJp.mjs} +5 -4
  72. package/dist/{platform-lifecycle-BaUdTRPU.mjs → platform-lifecycle--5gWmDoI.mjs} +1 -1
  73. package/dist/{platform-lifecycle-Dm09JNkn.mjs → platform-lifecycle-Cfi0o6xM.mjs} +863 -35
  74. package/dist/{platform-management-Bp6aoH2C.mjs → platform-management-Bbwf6-Dq.mjs} +1 -1
  75. package/dist/{platform-management-BSEc_ZeG.mjs → platform-management-BrF9STZp.mjs} +173 -30
  76. package/dist/{platform-plans-config-B0pOVQyW.mjs → platform-plans-config-DU-8nC2Y.mjs} +2 -2
  77. package/dist/{platform-recovery-WOZ95Uze.mjs → platform-recovery-DQAqAQYu.mjs} +3 -3
  78. package/dist/{platform-registry-KfNEF84O.mjs → platform-registry-P387v42A.mjs} +17 -10
  79. package/dist/prepare-BBknoZI1.mjs +2 -0
  80. package/dist/{prepare-39EvOhI6.mjs → prepare-BMrRWLwP.mjs} +3 -2
  81. package/dist/{prepare-DnaKBi--.mjs → prepare-WoUubFKL.mjs} +1 -1
  82. package/dist/{project-IOjBU8R6.mjs → project-BiaPQ7ur.mjs} +1 -1
  83. package/dist/{project-BkbfDs0V.mjs → project-DQstYTxO.mjs} +1 -1
  84. package/dist/{project-cmd-Bs5A392E.mjs → project-cmd-BbH2LptN.mjs} +18 -18
  85. package/dist/{project-team-ohAWWaew.mjs → project-team-Yiww3-go.mjs} +5 -5
  86. package/dist/{project-token-CP01Jna6.mjs → project-token-BrtT2NkY.mjs} +4 -4
  87. package/dist/{project-zero-trust-BzkVgx35.mjs → project-zero-trust-nYJ2V2nc.mjs} +5 -5
  88. package/dist/{protocol-CjF_iI9X.d.mts → protocol-BX8t2jiw.d.mts} +1 -1
  89. package/dist/{provision-BEv0k-qz.mjs → provision-DMTPG8Rh.mjs} +1 -1
  90. package/dist/{provision-Btj1jppf.mjs → provision-VeqAC77A.mjs} +13 -1
  91. package/dist/{requests-B3PBuGlX.mjs → requests-TIz_jtSu.mjs} +4 -4
  92. package/dist/{rollback-DDub9GsO.mjs → rollback-dBqICPzj.mjs} +5 -5
  93. package/dist/{runner-Ol0TNjk6.mjs → runner--2KF6Kua.mjs} +1 -1
  94. package/dist/{runner-CXA9Fh8h.mjs → runner-voIltZrY.mjs} +1 -1
  95. package/dist/runtime/ai.d.mts +10 -11
  96. package/dist/runtime/ai.mjs +13 -18
  97. package/dist/runtime/client-react.mjs +1 -1
  98. package/dist/runtime/client-solid.mjs +1 -1
  99. package/dist/runtime/client-svelte.mjs +1 -1
  100. package/dist/runtime/client-vue.mjs +1 -1
  101. package/dist/runtime/client.mjs +1 -1
  102. package/dist/runtime/env-public.d.mts +1 -1
  103. package/dist/runtime/fetch-stream.mjs +1 -1
  104. package/dist/runtime/handler.d.mts +1 -1
  105. package/dist/runtime/limits.d.mts +2 -2
  106. package/dist/runtime/limits.mjs +2 -2
  107. package/dist/runtime/live-client.d.mts +1 -1
  108. package/dist/runtime/live.d.mts +1 -1
  109. package/dist/runtime/migration-handler.mjs +33 -7
  110. package/dist/runtime/routing.d.mts +1 -1
  111. package/dist/runtime/sandbox.d.mts +1 -1
  112. package/dist/runtime/sandbox.mjs +12 -22
  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/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
  117. package/dist/{scan-C7okrLyM.mjs → scan-C8dA7iM4.mjs} +10 -6
  118. package/dist/{secret-3c72lY1U.mjs → secret-AKnNXNP5.mjs} +6 -6
  119. package/dist/{subcommand-prompt-Dhom39bd.mjs → subcommand-prompt-B6WS9Aoz.mjs} +1 -1
  120. package/dist/validate-pna7R3Pv.mjs +2 -0
  121. package/dist/{validate-ctOrgiS3.mjs → validate-ymhap6M_.mjs} +1 -1
  122. package/dist/{ws-CL1w7GXU.d.mts → ws-C79j4aED.d.mts} +1 -1
  123. package/package.json +7 -7
  124. package/skills/void/SKILL.md +5 -2
  125. package/skills/void/docs/guide/ai.md +65 -62
  126. package/skills/void/docs/guide/app-types.md +1 -1
  127. package/skills/void/docs/guide/database.md +15 -0
  128. package/skills/void/docs/guide/live.md +2 -0
  129. package/skills/void/docs/guide/pages-routing/actions-and-forms.md +1 -1
  130. package/skills/void/docs/guide/platform/installation/credentials.md +2 -2
  131. package/skills/void/docs/guide/platform/installation/first-deployment.md +5 -1
  132. package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
  133. package/skills/void/docs/guide/platform/installation/setup.md +1 -1
  134. package/skills/void/docs/guide/platform/installation/uninstall.md +44 -11
  135. package/skills/void/docs/guide/sandboxes.md +39 -20
  136. package/skills/void/docs/reference/api/resources.md +11 -14
  137. package/skills/void/docs/reference/api.md +35 -34
  138. package/skills/void/docs/reference/cli/auth.md +3 -1
  139. package/skills/void/docs/reference/cli/platform-config.md +2 -2
  140. package/skills/void/docs/reference/cli/platform-installation.md +14 -12
  141. package/skills/void/docs/reference/cli/platform.md +4 -2
  142. package/skills/void/docs/reference/cli.md +1 -1
  143. package/skills/void/docs/reference/resource-inference.md +1 -0
  144. package/dist/client-B4Me-9HE.mjs +0 -2
  145. package/dist/gen-ById9r2j.mjs +0 -2
  146. package/dist/help-DPGBwomV.mjs +0 -2
  147. package/dist/login-C98-sw79.mjs +0 -2
  148. package/dist/plan-D1Q5rf-r.mjs +0 -2
  149. package/dist/platform-args-Cq6EjQro.mjs +0 -2
  150. package/dist/prepare-CnjcTV2s.mjs +0 -2
  151. package/dist/validate-Dq_L3s0S.mjs +0 -2
@@ -1,8 +1,8 @@
1
- import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
2
- import { c as getToken } from "./auth-7wuZ5ob8.mjs";
1
+ import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
2
+ import { c as getToken } from "./auth-D52yG7hl.mjs";
3
3
  import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
4
- import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
5
- import { d as tablePrefix, i as dim } from "./output-BBsUwdyT.mjs";
4
+ import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
5
+ import { f as tablePrefix, i as dim } from "./output-BvdaehtE.mjs";
6
6
  import { r as resolveProjectBySlug } from "./resolve-project-BG5ORGID.mjs";
7
7
  //#region src/cli/project-token.ts
8
8
  async function resolveTarget(root, args) {
@@ -1,8 +1,8 @@
1
- import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
2
- import { c as getToken } from "./auth-7wuZ5ob8.mjs";
3
- import { B as note, H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
4
- import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
5
- import { l as sanitizeTerminalText } from "./output-BBsUwdyT.mjs";
1
+ import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
2
+ import { c as getToken } from "./auth-D52yG7hl.mjs";
3
+ import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
4
+ import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
5
+ import { l as note, u as sanitizeTerminalText } from "./output-BvdaehtE.mjs";
6
6
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.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-Do8P4puT.mjs";
2
- import { n as CloudBindings, r as CloudContext } from "./handler-CZ4nAylQ.mjs";
2
+ import { n as CloudBindings, r as CloudContext } from "./handler-BeK3weD4.mjs";
3
3
  import { a as PageRenderMode, t as DevCssAsset } from "./types-BAp5AEBU.mjs";
4
4
  //#region src/pages/protocol.d.ts
5
5
  /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
@@ -1,3 +1,3 @@
1
1
  import { r as scanWranglerDotenvKeys } from "./dotenv-VQxupEUv.mjs";
2
- import { _ as resolvePinnedApiBaseUrl, a as checkCloudflareProvisionDrift, c as enableD1ReadReplicationViaApi, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionEnv, h as provisionCloudflareResources, i as assertValidResourceName, l as isAlreadyGoneKillError, m as normalizeRunWranglerResult, n as acquireProvisionLock, o as createDefaultRunWrangler, p as isRealKvId, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, t as WranglerQuarantineError, u as isQuarantineError, v as resolveProperLockfileKey } from "./provision-Btj1jppf.mjs";
2
+ import { _ as resolvePinnedApiBaseUrl, a as checkCloudflareProvisionDrift, c as enableD1ReadReplicationViaApi, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionEnv, h as provisionCloudflareResources, i as assertValidResourceName, l as isAlreadyGoneKillError, m as normalizeRunWranglerResult, n as acquireProvisionLock, o as createDefaultRunWrangler, p as isRealKvId, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, t as WranglerQuarantineError, u as isQuarantineError, v as resolveProperLockfileKey } from "./provision-VeqAC77A.mjs";
3
3
  export { WranglerQuarantineError, acquireProvisionLock, assertNoTransportRedirectInProjectDotenv, assertValidResourceName, checkCloudflareProvisionDrift, createDefaultRunWrangler, deleteEnvVarCaseAware, enableD1ReadReplicationViaApi, isAlreadyGoneKillError, isQuarantineError, isQueueConfirmedAbsent, isRealD1Id, isRealKvId, normalizeRunWranglerResult, provisionCloudflareResources, provisionEnv, resolvePinnedApiBaseUrl, resolveProperLockfileKey, scanWranglerDotenvKeys };
@@ -332,6 +332,17 @@ function provisionEnv(ctx) {
332
332
  scrub("CLOUDFLARE_ACCOUNT_ID");
333
333
  env.CLOUDFLARE_ACCOUNT_ID = ctx.accountId;
334
334
  }
335
+ if (ctx?.apiToken) {
336
+ for (const name of [
337
+ "CLOUDFLARE_API_TOKEN",
338
+ "CF_API_TOKEN",
339
+ "CLOUDFLARE_API_KEY",
340
+ "CF_API_KEY",
341
+ "CLOUDFLARE_EMAIL",
342
+ "CF_EMAIL"
343
+ ]) scrub(name);
344
+ env.CLOUDFLARE_API_TOKEN = ctx.apiToken;
345
+ }
335
346
  return env;
336
347
  }
337
348
  /**
@@ -636,7 +647,8 @@ function createDefaultRunWrangler(root, options) {
636
647
  env: {
637
648
  ...provisionEnv({
638
649
  accountId: opts.accountId,
639
- apiBaseUrl: opts.apiBaseUrl
650
+ apiBaseUrl: opts.apiBaseUrl,
651
+ apiToken: opts.apiToken
640
652
  }),
641
653
  ...opts.suppressLogs ? { WRANGLER_WRITE_LOGS: "false" } : {}
642
654
  },
@@ -1,8 +1,8 @@
1
- import { r as readProjectConfig } from "./project-BkbfDs0V.mjs";
2
- import { c as getToken } from "./auth-7wuZ5ob8.mjs";
1
+ import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
2
+ import { c as getToken } from "./auth-D52yG7hl.mjs";
3
3
  import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
4
- import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
5
- import { c as import_picocolors, i as dim } from "./output-BBsUwdyT.mjs";
4
+ import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
5
+ import { c as import_picocolors, i as dim } from "./output-BvdaehtE.mjs";
6
6
  //#region src/cli/requests.ts
7
7
  async function runRequestsCommand(root, range, status) {
8
8
  console.log();
@@ -1,8 +1,8 @@
1
- import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-BkbfDs0V.mjs";
2
- import { c as getToken } from "./auth-7wuZ5ob8.mjs";
1
+ import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
2
+ import { c as getToken } from "./auth-D52yG7hl.mjs";
3
3
  import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
4
- import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
5
- import { a as ensureUtc, c as import_picocolors, i as dim, o as formatCount, r as createSpinner } from "./output-BBsUwdyT.mjs";
4
+ import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
5
+ import { a as ensureUtc, c as import_picocolors, i as dim, o as formatCount, r as createSpinner } from "./output-BvdaehtE.mjs";
6
6
  //#region src/cli/rollback.ts
7
7
  async function runRollbackCommand(root, deployId) {
8
8
  console.log();
@@ -82,7 +82,7 @@ async function runRollbackCommand(root, deployId) {
82
82
  outro(dim("Traffic is now serving the rolled-back deployment."));
83
83
  }
84
84
  async function runCloudflareRollback(root, deployId) {
85
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BhbK6yTq.mjs");
85
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DoQrVHAt.mjs");
86
86
  const context = resolveCloudflareOperationContext(root);
87
87
  const status = await readCloudflareWorkerStatus(context);
88
88
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -1,7 +1,7 @@
1
1
  import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
2
2
  import { t as collectMigrations } from "./collect-DiTn9yr6.mjs";
3
3
  import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-DXfiT1jV.mjs";
4
- import { r as classifyMigration } from "./plan-NPpwZ_kc.mjs";
4
+ import { r as classifyMigration } from "./plan-CJGEeTEI.mjs";
5
5
  import { existsSync, mkdirSync } from "node:fs";
6
6
  import { createHash, createHmac } from "node:crypto";
7
7
  //#region src/migrations/runner.ts
@@ -1,2 +1,2 @@
1
- import { i as openSqliteDatabase, n as getAppliedMigrations, o as runMigrations, r as getMiniflareDatabasePath, t as getApplicationTables } from "./runner-Ol0TNjk6.mjs";
1
+ import { i as openSqliteDatabase, n as getAppliedMigrations, o as runMigrations, r as getMiniflareDatabasePath, t as getApplicationTables } from "./runner--2KF6Kua.mjs";
2
2
  export { getApplicationTables, getAppliedMigrations, getMiniflareDatabasePath, openSqliteDatabase, runMigrations };
@@ -1,4 +1,3 @@
1
- import { n as LimitOperation } from "../limits-Bq5LG8Id.mjs";
2
1
  //#region src/runtime/ai-types.d.ts
3
2
  type AiProviderName = "openai" | "anthropic" | "google-ai-studio" | "groq" | "mistral" | "grok" | "deepseek" | "openrouter" | "perplexity" | "cohere" | "cerebras" | "huggingface" | "replicate" | "baseten" | "cartesia" | "deepgram" | "elevenlabs" | "fal" | "ideogram" | "parallel";
4
3
  type AiProvider = AiProviderName | (string & {});
@@ -26,25 +25,25 @@ type AiProviderFetchInit = {
26
25
  * in a `Response` with SSE headers — ready to return from a route handler.
27
26
  */
28
27
  export type VoidAi = {
29
- models(...args: Parameters<Ai["models"]>): LimitOperation<Awaited<ReturnType<Ai["models"]>>>;
30
- toMarkdown(files: Array<Parameters<Ai["toMarkdown"]>[0]>, options?: Parameters<Ai["toMarkdown"]>[1]): LimitOperation<Array<Awaited<ReturnType<Ai["toMarkdown"]>>>>;
31
- toMarkdown(...args: Parameters<Ai["toMarkdown"]>): LimitOperation<Awaited<ReturnType<Ai["toMarkdown"]>>>;
28
+ models(...args: Parameters<Ai["models"]>): Promise<Awaited<ReturnType<Ai["models"]>>>;
29
+ toMarkdown(files: Array<Parameters<Ai["toMarkdown"]>[0]>, options?: Parameters<Ai["toMarkdown"]>[1]): Promise<Array<Awaited<ReturnType<Ai["toMarkdown"]>>>>;
30
+ toMarkdown(...args: Parameters<Ai["toMarkdown"]>): Promise<Awaited<ReturnType<Ai["toMarkdown"]>>>;
32
31
  /** Workers AI inference (existing) */
33
- run<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): LimitOperation<AiModels[Name]["postProcessedOutputs"]>;
32
+ run<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): Promise<AiModels[Name]["postProcessedOutputs"]>;
34
33
  /** Cloudflare AI Gateway model inference. Accepts Cloudflare model IDs unchanged. */
35
- run(model: string, inputs: unknown, options?: AiOptions): LimitOperation<unknown>;
34
+ run(model: string, inputs: unknown, options?: AiOptions): Promise<unknown>;
36
35
  /** Image generation. Returns the proxy response so callers can return or parse it. */
37
- image<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): LimitOperation<Response>;
36
+ image<Name extends keyof AiModels>(model: Name, inputs: AiModels[Name]["inputs"], options?: AiOptions): Promise<Response>;
38
37
  /** Cloudflare AI Gateway model inference returned as a Response. */
39
- image(model: string, inputs: unknown, options?: AiOptions): LimitOperation<Response>;
38
+ image(model: string, inputs: unknown, options?: AiOptions): Promise<Response>;
40
39
  /** Provider-native AI Gateway requests using a project secret for the provider API key. */
41
40
  provider(provider: AiProvider, options?: AiProviderOptions): {
42
- fetch(path: string, init?: AiProviderFetchInit): LimitOperation<Response>;
41
+ fetch(path: string, init?: AiProviderFetchInit): Promise<Response>;
43
42
  };
44
43
  /** Stream Workers AI response as SSE */
45
- stream<Name extends keyof AiModels>(model: Name, inputs: Omit<AiModels[Name]["inputs"], "stream">, options?: AiOptions): LimitOperation<Response>;
44
+ stream<Name extends keyof AiModels>(model: Name, inputs: Omit<AiModels[Name]["inputs"], "stream">, options?: AiOptions): Promise<Response>;
46
45
  /** Stream any Cloudflare AI Gateway model response as SSE */
47
- stream(model: string, inputs: Record<string, unknown>, options?: AiOptions): LimitOperation<Response>;
46
+ stream(model: string, inputs: Record<string, unknown>, options?: AiOptions): Promise<Response>;
48
47
  };
49
48
  export declare const ai: VoidAi;
50
49
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { t as cfAccessHeaders } from "../cf-access-TWNzXltp.mjs";
2
2
  import { a as getRawRuntimeEnv } from "../env-raw-Cx8ElDdj.mjs";
3
- import { a as readUsageLimit, i as limitOperation, r as limitFromResponse, t as UsageLimit } from "../limits-Cjuk2VPm.mjs";
3
+ import { r as limitFromResponse, t as UsageLimit } from "../limits-D0vD1M9A.mjs";
4
4
  //#region src/runtime/ai-types.ts
5
5
  /** Maps provider prefix to expected env var name for the API key */
6
6
  const PROVIDER_KEY_MAP = {
@@ -491,19 +491,20 @@ function backend() {
491
491
  return _backend ??= resolveBackend();
492
492
  }
493
493
  /** Normalize provider 429 responses and binding quota failures before they reach callers. */
494
- function aiOperation(execute, rawStream = false) {
495
- return limitOperation(async () => {
496
- const value = await execute();
494
+ async function aiOperation(execute, rawStream = false) {
495
+ let value;
496
+ try {
497
+ value = await execute();
497
498
  if (value instanceof Response) {
498
499
  const limit = await limitFromResponse(value, "ai");
499
500
  if (limit) throw limit;
500
501
  }
501
- return value;
502
- }, classifyAiLimit, (value, limited) => {
503
- if (value instanceof Response && value.body && value.headers.get("content-type")?.includes("text/event-stream")) return new Response(streamResponse(value.body, limited).body, value);
504
- if (rawStream && value instanceof ReadableStream) return streamResponse(value, limited).body;
505
- return value;
506
- });
502
+ } catch (error) {
503
+ throw classifyAiLimit(error) ?? error;
504
+ }
505
+ if (value instanceof Response && value.body && value.headers.get("content-type")?.includes("text/event-stream")) return new Response(streamResponse(value.body).body, value);
506
+ if (rawStream && value instanceof ReadableStream) return streamResponse(value).body;
507
+ return value;
507
508
  }
508
509
  function classifyAiLimit(error) {
509
510
  if (error instanceof UsageLimit) return error;
@@ -515,7 +516,7 @@ function classifyAiLimit(error) {
515
516
  }) : null;
516
517
  }
517
518
  /** Streaming failures after headers are sent end with an explicit terminal SSE event. */
518
- function streamResponse(body, limited) {
519
+ function streamResponse(body) {
519
520
  const reader = body.getReader();
520
521
  return new Response(new ReadableStream({
521
522
  async pull(controller) {
@@ -526,13 +527,7 @@ function streamResponse(body, limited) {
526
527
  } catch (error) {
527
528
  const limit = classifyAiLimit(error);
528
529
  let data = { message: "Generation was interrupted. Please try again." };
529
- if (limit) {
530
- data = await limit.response().json();
531
- try {
532
- const fallback = await limited(limit);
533
- if (fallback instanceof Response) data = readUsageLimit(await fallback.json().catch(() => null)) ?? data;
534
- } catch {}
535
- }
530
+ if (limit) data = await limit.response().json();
536
531
  controller.enqueue(new TextEncoder().encode(`event: ${limit ? "void:limit" : "void:error"}\ndata: ${JSON.stringify(data)}\n\n`));
537
532
  controller.close();
538
533
  }
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
2
  import { t as fetch } from "../fetch-BIZJh7vR.mjs";
3
- import { t as fetchStream } from "../fetch-stream-IvCYKyQL.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-Nm3hkZbT.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 { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
2
  import { t as fetch } from "../fetch-BIZJh7vR.mjs";
3
- import { t as fetchStream } from "../fetch-stream-IvCYKyQL.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-Nm3hkZbT.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 { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
2
  import { t as fetch } from "../fetch-BIZJh7vR.mjs";
3
- import { t as fetchStream } from "../fetch-stream-IvCYKyQL.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-Nm3hkZbT.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 { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
2
  import { t as fetch } from "../fetch-BIZJh7vR.mjs";
3
- import { t as fetchStream } from "../fetch-stream-IvCYKyQL.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-Nm3hkZbT.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 { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
2
  import { t as fetch } from "../fetch-BIZJh7vR.mjs";
3
- import { t as fetchStream } from "../fetch-stream-IvCYKyQL.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-Nm3hkZbT.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 };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
2
  import { a as number, c as url, i as json, n as boolean, o as oneOf, r as email, s as string, t as EnvSchema } from "../env-helpers-CyKtOBpj.mjs";
3
- import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-BX_r8HR6.mjs";
3
+ import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-DR7ZM6d-.mjs";
4
4
  export { type EnvSchema, EnvValidationError, EnvValidationReport, ValidatedEnv, _getRegisteredSchema, _getSchemaDefaults, _hasRegisteredSchema, _validateEnvOnce, boolean, defineEnv, email, env, json, number, oneOf, string, url, validateAllEnv };
@@ -1,3 +1,3 @@
1
1
  import { t as FetchError } from "../fetch-error-Dj3crt0e.mjs";
2
- import { t as fetchStream } from "../fetch-stream-IvCYKyQL.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-Nm3hkZbT.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -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-CZ4nAylQ.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-BeK3weD4.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,2 +1,2 @@
1
- import { a as asUsageLimit, c as readUsageLimit, i as UsageLimitData, n as LimitOperation, o as limitFromResponse, r as UsageLimit, s as limitOperation, t as LimitHandlers } from "../limits-Bq5LG8Id.mjs";
2
- export { LimitHandlers, LimitOperation, UsageLimit, type UsageLimitData, asUsageLimit, limitFromResponse, limitOperation, readUsageLimit };
1
+ import { a as readUsageLimit, i as limitFromResponse, n as UsageLimitData, r as asUsageLimit, t as UsageLimit } from "../limits-CFsDKQvU.mjs";
2
+ export { UsageLimit, type UsageLimitData, asUsageLimit, limitFromResponse, readUsageLimit };
@@ -1,2 +1,2 @@
1
- import { a as readUsageLimit, i as limitOperation, n as asUsageLimit, r as limitFromResponse, t as UsageLimit } from "../limits-Cjuk2VPm.mjs";
2
- export { UsageLimit, asUsageLimit, limitFromResponse, limitOperation, readUsageLimit };
1
+ import { i as readUsageLimit, n as asUsageLimit, r as limitFromResponse, t as UsageLimit } from "../limits-D0vD1M9A.mjs";
2
+ export { UsageLimit, asUsageLimit, limitFromResponse, readUsageLimit };
@@ -1,4 +1,4 @@
1
- import { t as LiveClientEvent } from "../live-Chw1eIMv.mjs";
1
+ import { t as LiveClientEvent } from "../live-iAuEH1hd.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, 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 defineLiveStream } from "../live-Chw1eIMv.mjs";
2
+ import { _ as __getLiveBindingName, a as LiveControlErrorCode, 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 defineLiveStream } from "../live-iAuEH1hd.mjs";
3
3
  export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, defineLiveStream };
@@ -1,4 +1,4 @@
1
- import { canonicalJson } from "@void/deploy-core";
1
+ import { canonicalJson, splitSqlStatements } from "@void/deploy-core";
2
2
  //#region src/runtime/migration-handler.ts
3
3
  const SUPPORTED_CLASSIFIER_VERSION = 1;
4
4
  function createMigrationHandler(env, migrations, _dialect, runAuthMigrations, planBundle) {
@@ -139,12 +139,13 @@ async function runD1AppMigrations(db, migrations, planBundle, attempt) {
139
139
  const migrationResults = [];
140
140
  const confirmedApplied = [];
141
141
  const confirmedSkipped = [];
142
- const warnings = verified.plans.flatMap((plan) => plan.warnings ?? []);
142
+ let warnings = verified.plans.flatMap((plan) => plan.warnings ?? []);
143
143
  let stability = "stable";
144
144
  try {
145
145
  await createTrackingTable(db);
146
146
  await upgradeTrackingTable(db, fenced ? attempt.attemptId : void 0);
147
147
  const applied = await readAppliedSet(db);
148
+ warnings = verified.plans.flatMap((plan, index) => applied.has(migrations[index].name) ? [] : plan.warnings ?? []);
148
149
  for (let index = 0; index < migrations.length; index++) {
149
150
  const migration = migrations[index];
150
151
  const plan = verified.plans[index];
@@ -274,8 +275,26 @@ async function executeMigrationPlan(db, migration, plan, fencedAttemptId) {
274
275
  ]);
275
276
  return;
276
277
  }
278
+ await runUnsplitMigration(db, migration, appliedAt, fencedAttemptId);
279
+ }
280
+ /**
281
+ * D1 `exec()` treats each line as its own statement, so multi-line statements
282
+ * fail there. Run each top-level statement through one batch instead, and keep
283
+ * `exec()` only for SQL the splitter cannot divide safely (trigger bodies).
284
+ */
285
+ async function runUnsplitMigration(db, migration, appliedAt, fencedAttemptId) {
286
+ const record = db.prepare("INSERT OR IGNORE INTO _void_migrations (name, applied_at) VALUES (?, ?)").bind(migration.name, appliedAt);
287
+ const statements = splitSqlStatements(migration.sql);
288
+ if (statements) {
289
+ await db.batch([
290
+ ...ownershipFence(db, fencedAttemptId),
291
+ ...statements.map((statement) => db.prepare(statement)),
292
+ record
293
+ ]);
294
+ return;
295
+ }
277
296
  await db.exec(migration.sql);
278
- await db.prepare("INSERT OR IGNORE INTO _void_migrations (name, applied_at) VALUES (?, ?)").bind(migration.name, appliedAt).run();
297
+ await record.run();
279
298
  }
280
299
  /** Fail the whole D1 batch if recovery has revoked this executor's ownership. */
281
300
  function ownershipFence(db, attemptId) {
@@ -393,10 +412,14 @@ async function runD1LegacyMigrations(db, migrations) {
393
412
  try {
394
413
  const statements = splitMigrationSql(migration.sql);
395
414
  if (statements.length === 1) {
396
- if (isSingleSqlStatement(statements[0])) await db.prepare(statements[0]).run();
397
- else await db.exec(migration.sql);
398
- } else for (const statement of statements) await db.prepare(statement).run();
399
- await db.prepare("INSERT OR IGNORE INTO _void_migrations (name, applied_at) VALUES (?, ?)").bind(migration.name, (/* @__PURE__ */ new Date()).toISOString()).run();
415
+ if (isSingleSqlStatement(statements[0])) {
416
+ await db.prepare(statements[0]).run();
417
+ await recordLegacyMigration(db, migration.name);
418
+ } else await runUnsplitMigration(db, migration, (/* @__PURE__ */ new Date()).toISOString());
419
+ } else {
420
+ for (const statement of statements) await db.prepare(statement).run();
421
+ await recordLegacyMigration(db, migration.name);
422
+ }
400
423
  migrationResults.push({
401
424
  name: migration.name,
402
425
  applied: true,
@@ -421,6 +444,9 @@ async function runD1LegacyMigrations(db, migrations) {
421
444
  migrations: migrationResults
422
445
  };
423
446
  }
447
+ async function recordLegacyMigration(db, name) {
448
+ await db.prepare("INSERT OR IGNORE INTO _void_migrations (name, applied_at) VALUES (?, ?)").bind(name, (/* @__PURE__ */ new Date()).toISOString()).run();
449
+ }
424
450
  function splitMigrationSql(sql) {
425
451
  const lines = sql.split(/\r?\n/);
426
452
  if (!lines.some((line) => isStatementBreakpointLine(line) || hasInlineStatementBreakpoint(line))) return [sql];
@@ -1,5 +1,5 @@
1
1
  import { t as DevCssAsset } from "../types-BAp5AEBU.mjs";
2
- import { a as handlePageMutation, i as handlePageGet } from "../protocol-CjF_iI9X.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet } from "../protocol-BX8t2jiw.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,5 +1,5 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
2
  import { i as SandboxExecOptions, s as SandboxOptions } from "../sandbox-container-Bo0eiFKz.mjs";
3
- import { a as SandboxFiles, c as SandboxUnavailableError, d as __setSandboxBindingName, f as getSandbox, i as SandboxClient, l as VoidPlatformSandbox, n as DEFAULT_SANDBOX_ID, o as SandboxLimitError, p as sandbox, r as SANDBOX_SERVICE_BINDING, s as SandboxProcess, t as DEFAULT_SANDBOX_BINDING, u as VoidSandboxOptions } from "../sandbox-XZAqzFlG.mjs";
3
+ import { a as SandboxFiles, c as SandboxUnavailableError, d as __setSandboxBindingName, f as getSandbox, i as SandboxClient, l as VoidPlatformSandbox, n as DEFAULT_SANDBOX_ID, o as SandboxLimitError, p as sandbox, r as SANDBOX_SERVICE_BINDING, s as SandboxProcess, t as DEFAULT_SANDBOX_BINDING, u as VoidSandboxOptions } from "../sandbox-C5LFoJMf.mjs";
4
4
  export * from "@cloudflare/sandbox";
5
5
  export { DEFAULT_SANDBOX_BINDING, DEFAULT_SANDBOX_ID, SANDBOX_SERVICE_BINDING, SandboxClient, type SandboxExecOptions, SandboxFiles, SandboxLimitError, type SandboxOptions, SandboxProcess, SandboxUnavailableError, VoidPlatformSandbox, VoidSandboxOptions, __setSandboxBindingName, getSandbox, sandbox };
@@ -1,6 +1,6 @@
1
1
  import { a as getRawRuntimeEnv } from "../env-raw-Cx8ElDdj.mjs";
2
+ import { t as UsageLimit } from "../limits-D0vD1M9A.mjs";
2
3
  import { a as requireRuntimeBinding } from "../env-D5liuQYR.mjs";
3
- import { i as limitOperation, t as UsageLimit } from "../limits-Cjuk2VPm.mjs";
4
4
  import { n as SandboxContainer, r as validateSandboxOptions } from "../sandbox-container-C6ItmVuN.mjs";
5
5
  export * from "@cloudflare/sandbox";
6
6
  //#region src/runtime/sandbox.ts
@@ -95,7 +95,7 @@ function client(capability) {
95
95
  if (typeof method !== "string" || method === "then") return;
96
96
  return (...args) => {
97
97
  const index = method === "writeFile" || method === "rename" ? 3 : 2;
98
- return limitOperation(() => callWithOptions("files", [method, ...args], index));
98
+ return callWithOptions("files", [method, ...args], index);
99
99
  };
100
100
  } });
101
101
  const execute = async (argv, options) => {
@@ -109,26 +109,21 @@ function client(capability) {
109
109
  stdout: wire.stdout,
110
110
  stderr: wire.stderr,
111
111
  get exitCode() {
112
- return exitCode ??= limitOperation(async () => {
112
+ return exitCode ??= (async () => {
113
113
  try {
114
114
  return await wire.capability.invoke("exitCode", []);
115
115
  } catch (error) {
116
116
  rethrowSandboxError(error);
117
117
  }
118
- });
118
+ })();
119
119
  },
120
120
  output() {
121
- return output ??= limitOperation(async () => {
121
+ return output ??= (async () => {
122
122
  try {
123
123
  return await Promise.all([
124
124
  wire.stdout ? new Response(wire.stdout).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
125
125
  wire.stderr ? new Response(wire.stderr).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
126
- process.exitCode.match({
127
- ok: (code) => code,
128
- limited: (limit) => {
129
- throw limit;
130
- }
131
- })
126
+ process.exitCode
132
127
  ]).then(([stdout, stderr, exitCode]) => ({
133
128
  stdout,
134
129
  stderr,
@@ -137,7 +132,7 @@ function client(capability) {
137
132
  } catch (error) {
138
133
  rethrowSandboxError(error);
139
134
  }
140
- });
135
+ })();
141
136
  },
142
137
  kill: async (signal) => {
143
138
  await wire.capability.invoke("kill", [signal]);
@@ -150,16 +145,11 @@ function client(capability) {
150
145
  };
151
146
  return {
152
147
  files,
153
- exec: (argv, options) => limitOperation(() => execute(argv, options)),
154
- run: (argv, options) => limitOperation(async () => {
155
- return (await execute(argv, options)).output().match({
156
- ok: (result) => result,
157
- limited: (limit) => {
158
- throw limit;
159
- }
160
- });
161
- }),
162
- fetch: (port, request) => limitOperation(async () => await call("fetch", [port, request])),
148
+ exec: execute,
149
+ run: async (argv, options) => {
150
+ return (await execute(argv, options)).output();
151
+ },
152
+ fetch: async (port, request) => await call("fetch", [port, request]),
163
153
  running: async () => await call("running", []),
164
154
  destroy: async () => {
165
155
  await call("destroy", []);
@@ -1,2 +1,2 @@
1
- import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-CZ4nAylQ.mjs";
1
+ import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-BeK3weD4.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1,6 +1,6 @@
1
1
  import { n as AuthState } from "../auth-DkcFflXV.mjs";
2
2
  import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-BVkjZ3vM.mjs";
3
- import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-CL1w7GXU.mjs";
3
+ import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-C79j4aED.mjs";
4
4
  //#region src/runtime/ws-server.d.ts
5
5
  export type WebSocketRouteMeta = {
6
6
  name?: string;
@@ -1,2 +1,2 @@
1
- import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-CL1w7GXU.mjs";
1
+ import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-C79j4aED.mjs";
2
2
  export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
@@ -1,4 +1,4 @@
1
- import { n as LimitOperation, r as UsageLimit } from "./limits-Bq5LG8Id.mjs";
1
+ import { t as UsageLimit } from "./limits-CFsDKQvU.mjs";
2
2
  import { i as SandboxExecOptions, r as SandboxContainer, s as SandboxOptions } from "./sandbox-container-Bo0eiFKz.mjs";
3
3
  import { Files } from "@cloudflare/sandbox";
4
4
  //#region src/runtime/sandbox.d.ts
@@ -15,17 +15,17 @@ type SandboxProcess = {
15
15
  stdin: WritableStream | null;
16
16
  stdout: ReadableStream | null;
17
17
  stderr: ReadableStream | null;
18
- readonly exitCode: LimitOperation<number>;
19
- output(): LimitOperation<ExecOutput>;
18
+ readonly exitCode: Promise<number>;
19
+ output(): Promise<ExecOutput>;
20
20
  kill(signal?: number): Promise<void>;
21
21
  resize(cols: number, rows: number): Promise<void>;
22
22
  };
23
- type SandboxFiles = { [K in keyof Files]: Files[K] extends ((...args: infer A) => Promise<infer R>) ? (...args: A) => LimitOperation<R> : never; };
23
+ type SandboxFiles = { [K in keyof Files]: Files[K] extends ((...args: infer A) => Promise<infer R>) ? (...args: A) => Promise<R> : never; };
24
24
  type SandboxClient = {
25
- exec(argv: Array<string>, options?: SandboxExecOptions): LimitOperation<SandboxProcess>;
26
- run(argv: Array<string>, options?: SandboxExecOptions): LimitOperation<ExecOutput>;
25
+ exec(argv: Array<string>, options?: SandboxExecOptions): Promise<SandboxProcess>;
26
+ run(argv: Array<string>, options?: SandboxExecOptions): Promise<ExecOutput>;
27
27
  files: SandboxFiles;
28
- fetch(port: number, request: Request): LimitOperation<Response>;
28
+ fetch(port: number, request: Request): Promise<Response>;
29
29
  running(): Promise<boolean>;
30
30
  destroy(): Promise<void>;
31
31
  };
@@ -312,11 +312,15 @@ async function scanPages(root, options) {
312
312
  namedLayouts
313
313
  };
314
314
  }
315
+ const LEADING_SCRIPT_RE = /^<script\b[^>]*>[\s\S]*?<\/script>\s*\n?/;
316
+ /** Return the raw YAML frontmatter of markdown source, after any leading <script> block. */
317
+ function markdownFrontmatter(source) {
318
+ return source.replace(LEADING_SCRIPT_RE, "").match(/^---\r?\n([\s\S]*?)\r?\n---/)?.[1];
319
+ }
315
320
  /** Extract title and description from YAML frontmatter in markdown source. */
316
321
  function extractFrontmatterMeta(source) {
317
- const match = source.match(/^---\r?\n([\s\S]*?)\r?\n---/);
318
- if (!match) return;
319
- const yaml = match[1];
322
+ const yaml = markdownFrontmatter(source);
323
+ if (yaml === void 0) return;
320
324
  const title = yaml.match(/^title:\s*(.+)$/m)?.[1]?.trim().replace(/^["']|["']$/g, "");
321
325
  const description = yaml.match(/^description:\s*(.+)$/m)?.[1]?.trim().replace(/^["']|["']$/g, "");
322
326
  if (!title && !description) return;
@@ -327,9 +331,9 @@ function extractFrontmatterMeta(source) {
327
331
  }
328
332
  /** Extract layout field from YAML frontmatter in markdown source. */
329
333
  function extractFrontmatterLayout(source) {
330
- const match = source.match(/^---\r?\n([\s\S]*?)\r?\n---/);
331
- if (!match) return;
332
- const value = match[1].match(/^layout:\s*(.+)$/m)?.[1]?.trim().replace(/^["']|["']$/g, "");
334
+ const yaml = markdownFrontmatter(source);
335
+ if (yaml === void 0) return;
336
+ const value = yaml.match(/^layout:\s*(.+)$/m)?.[1]?.trim().replace(/^["']|["']$/g, "");
333
337
  if (!value) return;
334
338
  if (value === "false") return false;
335
339
  return value;
@@ -1,9 +1,9 @@
1
- import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-BkbfDs0V.mjs";
2
- import { c as getToken } from "./auth-7wuZ5ob8.mjs";
1
+ import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DQstYTxO.mjs";
2
+ import { c as getToken } from "./auth-D52yG7hl.mjs";
3
3
  import { _ as validateSecretValues } from "./env-validation-vBSQ8gw5.mjs";
4
- import { A as confirm, B as note, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
5
- import { r as PlatformClient } from "./client-RsPo8wsP.mjs";
6
- import { o as formatCount } from "./output-BBsUwdyT.mjs";
4
+ import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
5
+ import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
6
+ import { l as note, o as formatCount } from "./output-BvdaehtE.mjs";
7
7
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
8
8
  import { readFileSync } from "node:fs";
9
9
  //#region src/cli/secret.ts
@@ -77,7 +77,7 @@ async function runSecretCommand(root, args) {
77
77
  }
78
78
  async function runCloudflareSecretCommand(root, args) {
79
79
  if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
80
- const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-BhbK6yTq.mjs");
80
+ const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-DoQrVHAt.mjs");
81
81
  const context = resolveCloudflareOperationContext(root);
82
82
  if (args.action === "list") {
83
83
  const secrets = await listCloudflareSecrets(context);