void 0.22.0 → 0.23.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 (276) hide show
  1. package/README.md +5 -1
  2. package/dist/{account-cmd-CjyxcGkM.mjs → account-cmd-C84Ee8cO.mjs} +4 -4
  3. package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
  4. package/dist/application-routing-B7QEjqSR.mjs +27 -0
  5. package/dist/{auth-CZuiVsFh.mjs → auth-CCjt0hcq.mjs} +1 -1
  6. package/dist/{auth-DLNN0D3Z.mjs → auth-CSkdO2Bb.mjs} +4 -47
  7. package/dist/{auth-link-BLO4ptzo.mjs → auth-link-CioEg6uY.mjs} +4 -4
  8. package/dist/{auth-router-ZUg9MF_U.mjs → auth-router-BsR981d4.mjs} +4 -4
  9. package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
  10. package/dist/{build-cmd-BxR5FROK.mjs → build-cmd-LzvNJORH.mjs} +17 -5
  11. package/dist/{cache-D0sWhgKI.mjs → cache-C4MvnrMH.mjs} +2 -2
  12. package/dist/{cancel-deploy-D4NUqFbi.mjs → cancel-deploy-abUxpP2n.mjs} +2 -2
  13. package/dist/{cf-build-output-BJ6yGEIS.mjs → cf-build-output-BPqOT964.mjs} +2 -1
  14. package/dist/cf-build-output-_0HNWysu.mjs +2 -0
  15. package/dist/cli/cli.mjs +80 -455
  16. package/dist/cli/{cf-compat.mjs → cloudflare-operation-process.mjs} +442 -421
  17. package/dist/cli/env-schema-probe.d.mts +2 -1
  18. package/dist/cli/env-schema-probe.mjs +3 -3
  19. package/dist/client-Cu7jWiF1.mjs +2 -0
  20. package/dist/{client-BTZ3XkrB.mjs → client-RV8NVeB8.mjs} +140 -21
  21. package/dist/{cloudflare-auth-DQkqoMYa.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -38
  22. package/dist/{cloudflare-cmd-BKlfGHAy.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +5 -5
  23. package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
  24. package/dist/{cloudflare-connect-Ctmrw579.mjs → cloudflare-connect-B8uPZ4nx.mjs} +3 -3
  25. package/dist/{cloudflare-operations-BT6OWFBk.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
  26. package/dist/{cloudflare-operations-B9tzgjmf.mjs → cloudflare-operations-fxHb-byx.mjs} +116 -172
  27. package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
  28. package/dist/{config-VavjpDnp.d.mts → config-BMHb8RCj.d.mts} +1 -0
  29. package/dist/config-C_XRIPx2.mjs +89 -0
  30. package/dist/config-entry.d.mts +1 -1
  31. package/dist/{connect-Dg-WkW-C.mjs → connect-Bd4kJd9U.mjs} +5 -5
  32. package/dist/{create-project-DdoqwFLF.mjs → create-project-Boczwj5r.mjs} +1 -1
  33. package/dist/{create-project-l9J7pbtm.mjs → create-project-bMf6ffLZ.mjs} +2 -2
  34. package/dist/{db-gp2sCXyN.mjs → db-8uG64XLl.mjs} +21 -21
  35. package/dist/{delete-TTedbH6B.mjs → delete-NvbiyeJf.mjs} +2 -2
  36. package/dist/{deploy-CH-o2CaZ.mjs → deploy-DzAIwqNU.mjs} +908 -582
  37. package/dist/{deploy-B19L2Bra.mjs → deploy-bjXdFCtn.mjs} +1 -1
  38. package/dist/{domain-JRF59P_r.mjs → domain-y5Tvydvo.mjs} +3 -3
  39. package/dist/{email-Bo6G9LOZ.mjs → email-B3umsW75.mjs} +13 -28
  40. package/dist/{env-BYOrWQnv.mjs → env-BS6qYHDb.mjs} +4 -4
  41. package/dist/{env-public-BxU_0yTL.d.mts → env-public-BX_r8HR6.d.mts} +1 -1
  42. package/dist/{env-validation-BB4GkLxn.mjs → env-validation-BPn7vk-V.mjs} +18 -71
  43. package/dist/{env-validation-BXge7uyK.mjs → env-validation-DbTg7-ar.mjs} +1 -1
  44. package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
  45. package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
  46. package/dist/{gen-sCtlCOdA.mjs → gen-B580--vC.mjs} +2 -2
  47. package/dist/gen-BVaUUumi.mjs +2 -0
  48. package/dist/{github-cmd-0-7PexDq.mjs → github-cmd-v45BdfKX.mjs} +2 -2
  49. package/dist/{handler-HEcZsaij.d.mts → handler-CZ4nAylQ.d.mts} +1 -1
  50. package/dist/help-DofyZuY7.mjs +2 -0
  51. package/dist/{help-GKtwl07I.mjs → help-daGKjXGk.mjs} +229 -747
  52. package/dist/index.d.mts +1 -1
  53. package/dist/index.mjs +288 -1502
  54. package/dist/info-B97bTX9N.mjs +113 -0
  55. package/dist/{init-FZx3Elvz.mjs → init-Bvy7zrBo.mjs} +46 -15
  56. package/dist/limits-Bq5LG8Id.d.mts +27 -0
  57. package/dist/limits-Cjuk2VPm.mjs +68 -0
  58. package/dist/{link-BrQfb_CU.mjs → link-CDqqCjFl.mjs} +3 -3
  59. package/dist/{list-D44jmIAM.mjs → list-CZj0dzKY.mjs} +3 -3
  60. package/dist/{live-CKJlvlNp.d.mts → live-Chw1eIMv.d.mts} +1 -1
  61. package/dist/{local-d1-Bg9OzEEO.mjs → local-d1-2CMnpuW_.mjs} +2 -2
  62. package/dist/login-DYt_An22.mjs +2 -0
  63. package/dist/{login-CAsAsQ-_.mjs → login-UZKFM_u7.mjs} +3 -3
  64. package/dist/{logs-BjKvFnVM.mjs → logs-CUZ6t9t3.mjs} +3 -3
  65. package/dist/migrate-8_2u55MD.mjs +2 -0
  66. package/dist/{migrate-BPITvDJN.mjs → migrate-DHul7PRV.mjs} +2 -1
  67. package/dist/{node-Dt7z256D.mjs → node-BkyRWRx8.mjs} +1 -1
  68. package/dist/operator-args-CLgKGlwU.mjs +690 -0
  69. package/dist/{operator-cmd-BK5CCiT9.mjs → operator-cmd-DBA6dl0m.mjs} +68 -22
  70. package/dist/pages/client.d.mts +34 -2
  71. package/dist/pages/client.mjs +59 -3
  72. package/dist/pages/index.d.mts +1 -1
  73. package/dist/pages/index.mjs +1 -1
  74. package/dist/pages/islands-plugin.mjs +1 -1
  75. package/dist/pages/protocol.d.mts +2 -2
  76. package/dist/pages/protocol.mjs +2 -308
  77. package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
  78. package/dist/plan-D1Q5rf-r.mjs +2 -0
  79. package/dist/plan-NPpwZ_kc.mjs +58 -0
  80. package/dist/platform-args-BJdRtlLq.mjs +506 -0
  81. package/dist/platform-args-D3RXyR6h.mjs +2 -0
  82. package/dist/{platform-auth-config-BlN8xTdD.mjs → platform-auth-config-B56E9YP1.mjs} +3 -3
  83. package/dist/{platform-auth-protection-7d5aV2Jg.mjs → platform-auth-protection-BDWO_aER.mjs} +2 -2
  84. package/dist/{platform-auth-recovery-Dxij8ZbR.mjs → platform-auth-recovery-1gg4CSRe.mjs} +3 -3
  85. package/dist/{platform-cmd-E0FuL212.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
  86. package/dist/{platform-cmd-B3hwKrFK.mjs → platform-cmd-DMcQStSc.mjs} +24 -3
  87. package/dist/{platform-domain-D6Xcy9ZX.mjs → platform-domain-BNkcz0OB.mjs} +2 -2
  88. package/dist/{platform-lifecycle-k0E0xoxx.mjs → platform-lifecycle-9OyBALhH.mjs} +327 -215
  89. package/dist/{platform-lifecycle-DMh_qrry.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
  90. package/dist/{platform-management-Brz_BDiT.mjs → platform-management-CjwLVQwN.mjs} +6 -3
  91. package/dist/{platform-management-DOtss0BN.mjs → platform-management-CnyTdcWX.mjs} +1 -1
  92. package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
  93. package/dist/{platform-recovery-BvtcXON5.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
  94. package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
  95. package/dist/{prepare-C-6YZyyg.mjs → prepare-B5Mkic5u.mjs} +1 -1
  96. package/dist/{prepare-CRhJbVrG.mjs → prepare-DOsL0CC9.mjs} +4 -20
  97. package/dist/prepare-cgvDMtSb.mjs +2 -0
  98. package/dist/{project-cmd-BZLCqOqw.mjs → project-cmd-CNzrqvBv.mjs} +16 -16
  99. package/dist/{project-team-BvgM0WoX.mjs → project-team-DQOWPfQT.mjs} +2 -2
  100. package/dist/{project-token-l5DqK6Az.mjs → project-token-CTDYU0Cc.mjs} +2 -2
  101. package/dist/{project-zero-trust-v6Mvpp8y.mjs → project-zero-trust-BNAkW-_0.mjs} +2 -2
  102. package/dist/{protocol-BBa6cstI.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
  103. package/dist/protocol-U7bfjHmA.mjs +331 -0
  104. package/dist/{provision-Fr9pRqce.mjs → provision-C4ORE7G7.mjs} +1 -1
  105. package/dist/{provision-C4IGqkBf.mjs → provision-CJFgTZY8.mjs} +89 -198
  106. package/dist/{requests-DN-BbNiM.mjs → requests-MhxYnau8.mjs} +2 -2
  107. package/dist/resource-name-C7LVpcRm.mjs +11 -0
  108. package/dist/{rollback-D7rzSaZM.mjs → rollback-CJ6iSDoU.mjs} +3 -3
  109. package/dist/route-url-CG7U-cRN.mjs +15 -0
  110. package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
  111. package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
  112. package/dist/runtime/ai.d.mts +12 -8
  113. package/dist/runtime/ai.mjs +84 -17
  114. package/dist/runtime/better-auth-mysql.mjs +1 -1
  115. package/dist/runtime/better-auth-pg.mjs +1 -1
  116. package/dist/runtime/better-auth.mjs +1 -1
  117. package/dist/runtime/client-react.mjs +2 -2
  118. package/dist/runtime/client-solid.mjs +2 -2
  119. package/dist/runtime/client-svelte.mjs +2 -2
  120. package/dist/runtime/client-vue.mjs +2 -2
  121. package/dist/runtime/client.mjs +2 -2
  122. package/dist/runtime/durable.d.mts +3 -1
  123. package/dist/runtime/durable.mjs +4 -1
  124. package/dist/runtime/email/testing.mjs +1 -1
  125. package/dist/runtime/env-public.d.mts +1 -1
  126. package/dist/runtime/fetch-stream.mjs +1 -1
  127. package/dist/runtime/fetch.mjs +1 -1
  128. package/dist/runtime/handler.d.mts +1 -1
  129. package/dist/runtime/kv.mjs +0 -1
  130. package/dist/runtime/limits.d.mts +2 -0
  131. package/dist/runtime/limits.mjs +2 -0
  132. package/dist/runtime/live-client.d.mts +1 -1
  133. package/dist/runtime/live-server.mjs +25 -16
  134. package/dist/runtime/live.d.mts +1 -1
  135. package/dist/runtime/migration-handler.mjs +62 -42
  136. package/dist/runtime/route-url.d.mts +4 -0
  137. package/dist/runtime/route-url.mjs +2 -0
  138. package/dist/runtime/routing.d.mts +180 -0
  139. package/dist/runtime/routing.mjs +1082 -0
  140. package/dist/runtime/sandbox-container.d.mts +1 -1
  141. package/dist/runtime/sandbox-container.mjs +1 -1
  142. package/dist/runtime/sandbox.d.mts +3 -3
  143. package/dist/runtime/sandbox.mjs +75 -45
  144. package/dist/runtime/sse.mjs +1 -1
  145. package/dist/runtime/validator.d.mts +1 -1
  146. package/dist/runtime/ws-server.d.mts +4 -2
  147. package/dist/runtime/ws-server.mjs +27 -2
  148. package/dist/runtime/ws.d.mts +2 -2
  149. package/dist/runtime/ws.mjs +8 -6
  150. package/dist/{sandbox-qpNBT8a3.d.mts → sandbox-XZAqzFlG.d.mts} +11 -8
  151. package/dist/{sandbox-container-DdNEBfCc.d.mts → sandbox-container-Bo0eiFKz.d.mts} +2 -1
  152. package/dist/{sandbox-container-4fdqLnyb.mjs → sandbox-container-C6ItmVuN.mjs} +4 -2
  153. package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
  154. package/dist/{secret-BOtOl_cb.mjs → secret-Dli5fP0B.mjs} +4 -4
  155. package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
  156. package/dist/validate-Dq_L3s0S.mjs +2 -0
  157. package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
  158. package/dist/{wrangler-DQF1vKyf.mjs → wrangler-7K-bW_DL.mjs} +8 -239
  159. package/dist/{ws-BoY7vQML.d.mts → ws-CL1w7GXU.d.mts} +13 -2
  160. package/package.json +15 -8
  161. package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
  162. package/skills/void/SKILL.md +50 -135
  163. package/skills/void/docs/guide/ai.md +94 -84
  164. package/skills/void/docs/guide/app-types.md +3 -32
  165. package/skills/void/docs/guide/auth.md +12 -116
  166. package/skills/void/docs/guide/database/d1.md +9 -54
  167. package/skills/void/docs/guide/database/mysql.md +1 -1
  168. package/skills/void/docs/guide/database/postgresql.md +5 -26
  169. package/skills/void/docs/guide/database.md +23 -75
  170. package/skills/void/docs/guide/deployment.md +27 -113
  171. package/skills/void/docs/guide/durable-state.md +43 -18
  172. package/skills/void/docs/guide/edge/headers.md +3 -47
  173. package/skills/void/docs/guide/edge/prerendering.md +5 -20
  174. package/skills/void/docs/guide/edge/redirects.md +11 -64
  175. package/skills/void/docs/guide/edge/revalidation.md +5 -18
  176. package/skills/void/docs/guide/edge/rewrites.md +56 -284
  177. package/skills/void/docs/guide/edge/static-assets.md +22 -72
  178. package/skills/void/docs/guide/email/domains.md +112 -0
  179. package/skills/void/docs/guide/email/receiving.md +139 -0
  180. package/skills/void/docs/guide/email/sending.md +231 -0
  181. package/skills/void/docs/guide/email.md +13 -619
  182. package/skills/void/docs/guide/env-migration.md +11 -11
  183. package/skills/void/docs/guide/env-vars.md +9 -29
  184. package/skills/void/docs/guide/index.md +0 -15
  185. package/skills/void/docs/guide/jobs.md +3 -18
  186. package/skills/void/docs/guide/kv.md +5 -11
  187. package/skills/void/docs/guide/live.md +5 -56
  188. package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
  189. package/skills/void/docs/guide/pages-routing/head.md +10 -10
  190. package/skills/void/docs/guide/pages-routing/islands.md +6 -36
  191. package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
  192. package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
  193. package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
  194. package/skills/void/docs/guide/pages-routing/overview.md +7 -17
  195. package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
  196. package/skills/void/docs/guide/platform/administration/access.md +1 -4
  197. package/skills/void/docs/guide/platform/administration/email.md +35 -8
  198. package/skills/void/docs/guide/platform/administration/operations.md +26 -4
  199. package/skills/void/docs/guide/platform/administration/plans.md +126 -0
  200. package/skills/void/docs/guide/platform/administration/projects.md +5 -2
  201. package/skills/void/docs/guide/platform/administration/zero-trust.md +23 -152
  202. package/skills/void/docs/guide/platform/development/runtime.md +3 -13
  203. package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
  204. package/skills/void/docs/guide/platform/installation/credentials.md +6 -4
  205. package/skills/void/docs/guide/platform/installation/domains.md +30 -2
  206. package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -0
  207. package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
  208. package/skills/void/docs/guide/platform/installation/prerequisites.md +20 -15
  209. package/skills/void/docs/guide/platform/installation/setup.md +9 -5
  210. package/skills/void/docs/guide/platform-administration.md +1 -0
  211. package/skills/void/docs/guide/queues.md +7 -9
  212. package/skills/void/docs/guide/quickstart.md +38 -37
  213. package/skills/void/docs/guide/remote-dev.md +4 -9
  214. package/skills/void/docs/guide/sandboxes.md +29 -21
  215. package/skills/void/docs/guide/server-routing.md +9 -72
  216. package/skills/void/docs/guide/sse.md +4 -18
  217. package/skills/void/docs/guide/ssg.md +3 -15
  218. package/skills/void/docs/guide/ssr.md +14 -62
  219. package/skills/void/docs/guide/storage.md +9 -4
  220. package/skills/void/docs/guide/type-safety.md +3 -14
  221. package/skills/void/docs/guide/typed-fetch.md +3 -7
  222. package/skills/void/docs/guide/websockets.md +68 -40
  223. package/skills/void/docs/integrations/agents.md +3 -3
  224. package/skills/void/docs/integrations/cloudflare.md +85 -316
  225. package/skills/void/docs/integrations/frameworks/analog.md +5 -64
  226. package/skills/void/docs/integrations/frameworks/astro.md +4 -73
  227. package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
  228. package/skills/void/docs/integrations/frameworks/overview.md +11 -54
  229. package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
  230. package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
  231. package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
  232. package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
  233. package/skills/void/docs/reference/api/auth.md +156 -0
  234. package/skills/void/docs/reference/api/client.md +87 -0
  235. package/skills/void/docs/reference/api/database.md +95 -0
  236. package/skills/void/docs/reference/api/durable.md +46 -0
  237. package/skills/void/docs/reference/api/env.md +50 -0
  238. package/skills/void/docs/reference/api/handlers.md +254 -0
  239. package/skills/void/docs/reference/api/pages.md +241 -0
  240. package/skills/void/docs/reference/api/plugin.md +39 -0
  241. package/skills/void/docs/reference/api/resources.md +109 -0
  242. package/skills/void/docs/reference/api/rewrites.md +76 -0
  243. package/skills/void/docs/reference/api/types.md +92 -0
  244. package/skills/void/docs/reference/api.md +56 -1218
  245. package/skills/void/docs/reference/cli/auth.md +88 -0
  246. package/skills/void/docs/reference/cli/database.md +128 -0
  247. package/skills/void/docs/reference/cli/deploy.md +85 -0
  248. package/skills/void/docs/reference/cli/domains.md +41 -0
  249. package/skills/void/docs/reference/cli/email.md +129 -0
  250. package/skills/void/docs/reference/cli/generate.md +116 -0
  251. package/skills/void/docs/reference/cli/github.md +189 -0
  252. package/skills/void/docs/reference/cli/platform-config.md +92 -0
  253. package/skills/void/docs/reference/cli/platform-email.md +81 -0
  254. package/skills/void/docs/reference/cli/platform-installation.md +127 -0
  255. package/skills/void/docs/reference/cli/platform-operations.md +90 -0
  256. package/skills/void/docs/reference/cli/platform-users.md +89 -0
  257. package/skills/void/docs/reference/cli/platform-zero-trust.md +45 -0
  258. package/skills/void/docs/reference/cli/platform.md +70 -0
  259. package/skills/void/docs/reference/cli/project.md +214 -0
  260. package/skills/void/docs/reference/cli/secrets.md +76 -0
  261. package/skills/void/docs/reference/cli/setup.md +70 -0
  262. package/skills/void/docs/reference/cli.md +32 -1682
  263. package/skills/void/docs/reference/config.md +12 -18
  264. package/skills/void/docs/reference/resource-inference.md +3 -58
  265. package/skills/void/docs/reference/structure.md +14 -41
  266. package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
  267. package/dist/client-Czz8o5jP.mjs +0 -2
  268. package/dist/gen-CNJ62MM7.mjs +0 -2
  269. package/dist/help-CmZzxUba.mjs +0 -2
  270. package/dist/login-CGcRKEoi.mjs +0 -2
  271. package/dist/migrate-CYfbKkXh.mjs +0 -2
  272. package/dist/plan-BEZ8VJW0.mjs +0 -256
  273. package/dist/plan-DpuOr14e.mjs +0 -2
  274. package/dist/prepare-Bm3iq-u4.mjs +0 -2
  275. package/dist/validate-EKmJWxmy.mjs +0 -2
  276. /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { a as SandboxInstance, c as SandboxProcessWire, i as SandboxExecOptions, l as validateSandboxOptions, n as SandboxCapability, o as SandboxNativeContainer, r as SandboxContainer, s as SandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-DdNEBfCc.mjs";
2
+ import { a as SandboxInstance, c as SandboxProcessWire, i as SandboxExecOptions, l as validateSandboxOptions, n as SandboxCapability, o as SandboxNativeContainer, r as SandboxContainer, s as SandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-Bo0eiFKz.mjs";
3
3
  export { DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS, SandboxCapability, SandboxContainer, SandboxExecOptions, SandboxInstance, SandboxNativeContainer, SandboxOptions, SandboxProcessWire, validateSandboxOptions };
@@ -1,2 +1,2 @@
1
- import { n as SandboxContainer, r as validateSandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-4fdqLnyb.mjs";
1
+ import { n as SandboxContainer, r as validateSandboxOptions, t as DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS } from "../sandbox-container-C6ItmVuN.mjs";
2
2
  export { DEFAULT_SANDBOX_INACTIVITY_TIMEOUT_MS, SandboxContainer, validateSandboxOptions };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { i as SandboxExecOptions, s as SandboxOptions } from "../sandbox-container-DdNEBfCc.mjs";
3
- import { a as SandboxLimitError, c as VoidPlatformSandbox, d as getSandbox, f as sandbox, i as SandboxClient, l as VoidSandboxOptions, n as DEFAULT_SANDBOX_ID, o as SandboxProcess, r as SANDBOX_SERVICE_BINDING, s as SandboxUnavailableError, t as DEFAULT_SANDBOX_BINDING, u as __setSandboxBindingName } from "../sandbox-qpNBT8a3.mjs";
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";
4
4
  export * from "@cloudflare/sandbox";
5
- export { DEFAULT_SANDBOX_BINDING, DEFAULT_SANDBOX_ID, SANDBOX_SERVICE_BINDING, SandboxClient, type SandboxExecOptions, SandboxLimitError, type SandboxOptions, SandboxProcess, SandboxUnavailableError, VoidPlatformSandbox, VoidSandboxOptions, __setSandboxBindingName, getSandbox, sandbox };
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,17 +1,20 @@
1
1
  import { a as getRawRuntimeEnv } from "../env-raw-Cx8ElDdj.mjs";
2
2
  import { a as requireRuntimeBinding } from "../env-D5liuQYR.mjs";
3
- import { n as SandboxContainer, r as validateSandboxOptions } from "../sandbox-container-4fdqLnyb.mjs";
3
+ import { i as limitOperation, t as UsageLimit } from "../limits-Cjuk2VPm.mjs";
4
+ import { n as SandboxContainer, r as validateSandboxOptions } from "../sandbox-container-C6ItmVuN.mjs";
4
5
  export * from "@cloudflare/sandbox";
5
6
  //#region src/runtime/sandbox.ts
6
7
  const DEFAULT_SANDBOX_ID = "default";
7
8
  const DEFAULT_SANDBOX_BINDING = "SANDBOX";
8
9
  const SANDBOX_SERVICE_BINDING = "__VOID_SANDBOX";
9
- var SandboxLimitError = class extends Error {
10
+ var SandboxLimitError = class extends UsageLimit {
10
11
  name = "SandboxLimitError";
11
- reason;
12
12
  constructor(reason, message) {
13
- super(message ?? `Sandbox limit reached: ${reason}`);
14
- this.reason = reason;
13
+ super({
14
+ resource: "sandbox",
15
+ reason,
16
+ message: message ?? `Sandbox limit reached: ${reason}`
17
+ });
15
18
  }
16
19
  };
17
20
  var SandboxUnavailableError = class extends Error {
@@ -88,48 +91,75 @@ function client(capability) {
88
91
  throw error;
89
92
  }
90
93
  };
94
+ const files = new Proxy(Object.create(null), { get(_target, method) {
95
+ if (typeof method !== "string" || method === "then") return;
96
+ return (...args) => {
97
+ const index = method === "writeFile" || method === "rename" ? 3 : 2;
98
+ return limitOperation(() => callWithOptions("files", [method, ...args], index));
99
+ };
100
+ } });
101
+ const execute = async (argv, options) => {
102
+ const wire = await callWithOptions("exec", [argv, options], 1);
103
+ let exitCode;
104
+ let output;
105
+ const process = {
106
+ pid: wire.pid,
107
+ isPty: wire.isPty,
108
+ stdin: wire.stdin,
109
+ stdout: wire.stdout,
110
+ stderr: wire.stderr,
111
+ get exitCode() {
112
+ return exitCode ??= limitOperation(async () => {
113
+ try {
114
+ return await wire.capability.invoke("exitCode", []);
115
+ } catch (error) {
116
+ rethrowSandboxError(error);
117
+ }
118
+ });
119
+ },
120
+ output() {
121
+ return output ??= limitOperation(async () => {
122
+ try {
123
+ return await Promise.all([
124
+ wire.stdout ? new Response(wire.stdout).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
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
+ })
132
+ ]).then(([stdout, stderr, exitCode]) => ({
133
+ stdout,
134
+ stderr,
135
+ exitCode
136
+ }));
137
+ } catch (error) {
138
+ rethrowSandboxError(error);
139
+ }
140
+ });
141
+ },
142
+ kill: async (signal) => {
143
+ await wire.capability.invoke("kill", [signal]);
144
+ },
145
+ resize: async (cols, rows) => {
146
+ await wire.capability.invoke("resize", [cols, rows]);
147
+ }
148
+ };
149
+ return process;
150
+ };
91
151
  return {
92
- files: new Proxy(Object.create(null), { get(_target, method) {
93
- if (typeof method !== "string" || method === "then") return;
94
- return (...args) => {
95
- const index = method === "writeFile" || method === "rename" ? 3 : 2;
96
- return callWithOptions("files", [method, ...args], index);
97
- };
98
- } }),
99
- async exec(argv, options) {
100
- const wire = await callWithOptions("exec", [argv, options], 1);
101
- let exitCode;
102
- let output;
103
- const process = {
104
- pid: wire.pid,
105
- isPty: wire.isPty,
106
- stdin: wire.stdin,
107
- stdout: wire.stdout,
108
- stderr: wire.stderr,
109
- get exitCode() {
110
- return exitCode ??= wire.capability.invoke("exitCode", []);
111
- },
112
- output() {
113
- return output ??= Promise.all([
114
- wire.stdout ? new Response(wire.stdout).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
115
- wire.stderr ? new Response(wire.stderr).arrayBuffer() : /* @__PURE__ */ new ArrayBuffer(0),
116
- process.exitCode
117
- ]).then(([stdout, stderr, exitCode]) => ({
118
- stdout,
119
- stderr,
120
- exitCode
121
- }));
122
- },
123
- kill: async (signal) => {
124
- await wire.capability.invoke("kill", [signal]);
125
- },
126
- resize: async (cols, rows) => {
127
- await wire.capability.invoke("resize", [cols, rows]);
152
+ 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;
128
159
  }
129
- };
130
- return process;
131
- },
132
- fetch: async (port, request) => await call("fetch", [port, request]),
160
+ });
161
+ }),
162
+ fetch: (port, request) => limitOperation(async () => await call("fetch", [port, request])),
133
163
  running: async () => await call("running", []),
134
164
  destroy: async () => {
135
165
  await call("destroy", []);
@@ -1,2 +1,2 @@
1
- import { a as getLastEventId, i as formatSseText, n as eventStream, r as formatSse, t as SseStreamClosedError } from "../sse-BaC1jXko.mjs";
1
+ import { a as getLastEventId, i as formatSseText, n as eventStream, r as formatSse, t as SseStreamClosedError } from "../sse-CQNaDFFV.mjs";
2
2
  export { SseStreamClosedError, eventStream, formatSse, formatSseText, getLastEventId };
@@ -1,2 +1,2 @@
1
- import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-HEcZsaij.mjs";
1
+ import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-CZ4nAylQ.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1,8 +1,10 @@
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 { t as AnyWebSocketDefinition } from "../ws-BoY7vQML.mjs";
3
+ import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-CL1w7GXU.mjs";
4
4
  //#region src/runtime/ws-server.d.ts
5
5
  export type WebSocketRouteMeta = {
6
+ name?: string;
7
+ key?: WebSocketInstanceKey;
6
8
  pattern: string;
7
9
  params: Array<string>;
8
10
  className: string;
@@ -17,7 +19,7 @@ export type WebSocketDurableObjectClass = {
17
19
  new (state: DurableObjectState, env: Record<string, unknown>): WebSocketDurableObjectInstance;
18
20
  };
19
21
  type ResolveVoidAuthState = (request: Request, env: VoidAuthEnv, runtime: VoidAuthRuntimeOptions) => Promise<AuthState | null>;
20
- export declare function buildWebSocketInstanceId(route: Pick<WebSocketRouteMeta, "params">, params: Record<string, string>): string;
22
+ export declare function buildWebSocketInstanceId(route: Pick<WebSocketRouteMeta, "params" | "key">, params: Record<string, string>): string;
21
23
  export declare function createWebSocketDurableObject(definition: AnyWebSocketDefinition, route: WebSocketRouteMeta, authRuntime?: VoidAuthRuntimeOptions, resolveAuthState?: ResolveVoidAuthState): WebSocketDurableObjectClass;
22
24
  /** Keep a removed WebSocket Durable Object class deployable without deleting its storage. */
23
25
  export declare function createWebSocketTombstoneDurableObject(className: string): WebSocketDurableObjectClass;
@@ -48,7 +48,14 @@ function getRouteMatch(request, route) {
48
48
  return match.matched ? match.params : null;
49
49
  }
50
50
  function buildWebSocketInstanceId(route, params) {
51
+ if (route.key) {
52
+ const key = route.key({ params });
53
+ if (typeof key !== "string") throw new Error("ws: key must return a string synchronously.");
54
+ return key;
55
+ }
51
56
  if (route.params.length === 0) return "default";
57
+ const entries = route.params.map((name) => [name, params[name] ?? ""]);
58
+ if (entries.length > 1 && entries.some(([, value]) => value.includes("&"))) return `v2:${JSON.stringify(entries)}`;
52
59
  return route.params.map((name) => `${name}=${params[name] ?? ""}`).join("&");
53
60
  }
54
61
  async function validateSchema(schema, value) {
@@ -92,6 +99,16 @@ function getStoredConnection(webSocket) {
92
99
  authState: null
93
100
  };
94
101
  }
102
+ function completeWebSocketClose(webSocket, code, reason) {
103
+ if (webSocket.readyState === 3) return;
104
+ if ([
105
+ 1004,
106
+ 1005,
107
+ 1006,
108
+ 1015
109
+ ].includes(code)) webSocket.close();
110
+ else webSocket.close(code, reason);
111
+ }
95
112
  function setStoredConnection(webSocket, data) {
96
113
  webSocket.serializeAttachment?.(data);
97
114
  }
@@ -164,6 +181,11 @@ function assertDefinition(definition) {
164
181
  }
165
182
  function createWebSocketDurableObject(definition, route, authRuntime, resolveAuthState) {
166
183
  assertDefinition(definition);
184
+ if (definition.name !== route.name) throw new Error("ws: name must be statically discoverable in the route definition. Run void info to inspect this route.");
185
+ const instanceRoute = {
186
+ ...route,
187
+ key: definition.key
188
+ };
167
189
  class VoidWebSocketDurableObject {
168
190
  state;
169
191
  env;
@@ -176,7 +198,7 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
176
198
  }
177
199
  async handleFetch(request) {
178
200
  const params = getRouteMatch(request, route) ?? {};
179
- const roomId = buildWebSocketInstanceId(route, params);
201
+ const roomId = buildWebSocketInstanceId(instanceRoute, params);
180
202
  const authState = authRuntime && resolveAuthState ? await resolveAuthState(request, this.env, authRuntime) : null;
181
203
  const user = authState?.user ?? null;
182
204
  if (request.headers.get("upgrade")?.toLowerCase() === "websocket") {
@@ -261,6 +283,7 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
261
283
  return withRuntimeEnv(this.env, () => this.handleWebSocketClose(webSocket, code, reason, wasClean));
262
284
  }
263
285
  async handleWebSocketClose(webSocket, code, reason, wasClean) {
286
+ completeWebSocketClose(webSocket, code, reason);
264
287
  const stored = getStoredConnection(webSocket);
265
288
  const request = new Request(`https://void.local${route.pattern}`);
266
289
  if (definition.__kind === "room") {
@@ -297,7 +320,9 @@ function createWebSocketTombstoneDurableObject(className) {
297
320
  async webSocketMessage(webSocket) {
298
321
  webSocket.close(1012, "WebSocket route removed");
299
322
  }
300
- async webSocketClose() {}
323
+ async webSocketClose(webSocket, code, reason) {
324
+ completeWebSocketClose(webSocket, code, reason);
325
+ }
301
326
  };
302
327
  }
303
328
  function getStub(env, route, params) {
@@ -1,2 +1,2 @@
1
- import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as connect, i as RoomController, l as VoidSocketCloseEvent, m as defineWebSocket, n as ConnectCommonOptions, o as SocketContext, p as defineRoom, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-BoY7vQML.mjs";
2
- export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, connect, defineRoom, defineWebSocket };
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";
2
+ export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
@@ -1,16 +1,23 @@
1
+ import { t as isResourceName } from "../resource-name-C7LVpcRm.mjs";
2
+ import { t as interpolateRouteParams } from "../route-url-CG7U-cRN.mjs";
1
3
  //#region src/runtime/ws.ts
2
4
  function defineRoom(definition) {
5
+ assertResourceName(definition.name);
3
6
  return {
4
7
  ...definition,
5
8
  __kind: "room"
6
9
  };
7
10
  }
8
11
  function defineWebSocket(definition) {
12
+ assertResourceName(definition.name);
9
13
  return {
10
14
  ...definition,
11
15
  __kind: "socket"
12
16
  };
13
17
  }
18
+ function assertResourceName(name) {
19
+ if (name !== void 0 && !isResourceName(name)) throw new Error("ws: name must contain a word starting with a letter.");
20
+ }
14
21
  var VoidSocket = class {
15
22
  url;
16
23
  options;
@@ -89,14 +96,9 @@ function resolveBaseUrl(baseURL) {
89
96
  if (!location) throw new Error("ws: connect() requires a browser-like runtime or an explicit \"baseURL\".");
90
97
  return new URL(location.href);
91
98
  }
92
- function interpolateParams(path, params) {
93
- let resolved = path;
94
- if (params) for (const [key, value] of Object.entries(params)) resolved = resolved.replace(`:${key}`, encodeURIComponent(value));
95
- return resolved;
96
- }
97
99
  function connect(path, options = {}) {
98
100
  const base = resolveBaseUrl(options.baseURL);
99
- const resolvedPath = interpolateParams(path, options.params);
101
+ const resolvedPath = interpolateRouteParams(path, options.params);
100
102
  const url = new URL(resolvedPath, base);
101
103
  url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
102
104
  return new VoidSocket(url.toString(), options);
@@ -1,4 +1,5 @@
1
- import { i as SandboxExecOptions, r as SandboxContainer, s as SandboxOptions } from "./sandbox-container-DdNEBfCc.mjs";
1
+ import { n as LimitOperation, r as UsageLimit } from "./limits-Bq5LG8Id.mjs";
2
+ import { i as SandboxExecOptions, r as SandboxContainer, s as SandboxOptions } from "./sandbox-container-Bo0eiFKz.mjs";
2
3
  import { Files } from "@cloudflare/sandbox";
3
4
  //#region src/runtime/sandbox.d.ts
4
5
  declare const DEFAULT_SANDBOX_ID = "default";
@@ -14,19 +15,21 @@ type SandboxProcess = {
14
15
  stdin: WritableStream | null;
15
16
  stdout: ReadableStream | null;
16
17
  stderr: ReadableStream | null;
17
- readonly exitCode: Promise<number>;
18
- output(): Promise<ExecOutput>;
18
+ readonly exitCode: LimitOperation<number>;
19
+ output(): LimitOperation<ExecOutput>;
19
20
  kill(signal?: number): Promise<void>;
20
21
  resize(cols: number, rows: number): Promise<void>;
21
22
  };
23
+ type SandboxFiles = { [K in keyof Files]: Files[K] extends ((...args: infer A) => Promise<infer R>) ? (...args: A) => LimitOperation<R> : never; };
22
24
  type SandboxClient = {
23
- exec(argv: Array<string>, options?: SandboxExecOptions): Promise<SandboxProcess>;
24
- files: Files;
25
- fetch(port: number, request: Request): Promise<Response>;
25
+ exec(argv: Array<string>, options?: SandboxExecOptions): LimitOperation<SandboxProcess>;
26
+ run(argv: Array<string>, options?: SandboxExecOptions): LimitOperation<ExecOutput>;
27
+ files: SandboxFiles;
28
+ fetch(port: number, request: Request): LimitOperation<Response>;
26
29
  running(): Promise<boolean>;
27
30
  destroy(): Promise<void>;
28
31
  };
29
- declare class SandboxLimitError extends Error {
32
+ declare class SandboxLimitError extends UsageLimit {
30
33
  override readonly name = "SandboxLimitError";
31
34
  readonly reason: "concurrency" | "runtime_budget";
32
35
  constructor(reason: "concurrency" | "runtime_budget", message?: string);
@@ -46,4 +49,4 @@ declare const sandbox: {
46
49
  get: typeof getSandbox;
47
50
  };
48
51
  //#endregion
49
- export { SandboxLimitError as a, VoidPlatformSandbox as c, getSandbox as d, sandbox as f, SandboxClient as i, VoidSandboxOptions as l, DEFAULT_SANDBOX_ID as n, SandboxProcess as o, SANDBOX_SERVICE_BINDING as r, SandboxUnavailableError as s, DEFAULT_SANDBOX_BINDING as t, __setSandboxBindingName as u };
52
+ export { SandboxFiles as a, SandboxUnavailableError as c, __setSandboxBindingName as d, getSandbox as f, SandboxClient as i, VoidPlatformSandbox as l, DEFAULT_SANDBOX_ID as n, SandboxLimitError as o, sandbox as p, SANDBOX_SERVICE_BINDING as r, SandboxProcess as s, DEFAULT_SANDBOX_BINDING as t, VoidSandboxOptions as u };
@@ -53,7 +53,8 @@ declare class SandboxContainer<Env = unknown> extends DurableObject<Env> {
53
53
  protected afterStart(): Promise<void>;
54
54
  protected beforeUse(): Promise<void>;
55
55
  protected stopped(): Promise<void>;
56
- protected waitForProcessExit(exitCode: Promise<number>): Promise<number>;
56
+ protected processContext(_exitCode: Promise<number>): unknown;
57
+ protected waitForProcessExit(exitCode: Promise<number>, _context?: unknown): Promise<number>;
57
58
  /** Native abort listeners must be detached as soon as a process exits. */
58
59
  protected execProcess(argv: Array<string>, options?: SandboxExecOptions): Promise<ExecProcess & {
59
60
  isPty?: boolean;
@@ -109,7 +109,8 @@ var SandboxContainer = class extends DurableObject {
109
109
  async afterStart() {}
110
110
  async beforeUse() {}
111
111
  async stopped() {}
112
- async waitForProcessExit(exitCode) {
112
+ processContext(_exitCode) {}
113
+ async waitForProcessExit(exitCode, _context) {
113
114
  return exitCode;
114
115
  }
115
116
  /** Native abort listeners must be detached as soon as a process exits. */
@@ -253,8 +254,9 @@ var SandboxContainer = class extends DurableObject {
253
254
  ...options
254
255
  });
255
256
  process.exitCode.then(finish, finish);
257
+ const processContext = this.processContext(process.exitCode);
256
258
  return {
257
- capability: new ProcessCapability(process, () => this.waitForProcessExit(process.exitCode)),
259
+ capability: new ProcessCapability(process, () => this.waitForProcessExit(process.exitCode, processContext)),
258
260
  pid: process.pid,
259
261
  isPty: process.isPty ?? false,
260
262
  stdin: process.stdin ?? null,
@@ -2,41 +2,9 @@ import { a as join, n as dirname, r as extname, t as basename } from "./dist-BVq
2
2
  import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
3
3
  import { t as glob } from "./dist-Bn8Kodjp.mjs";
4
4
  import { n as isIdentifier, r as isLiteral } from "./ast-CPGPjb0V.mjs";
5
- import { n as parseRouteFilename } from "./parse-filename-DioPHiR9.mjs";
5
+ import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilename } from "./parse-filename-CUbj-1MP.mjs";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  import { parseSync } from "vite";
8
- //#region src/shared/static-exports.ts
9
- /** Read the initializer of directly exported constants without evaluating user code. */
10
- function staticExportInitializers(filename, source, names) {
11
- const result = /* @__PURE__ */ new Map();
12
- const program = parseSync(filename, source).program;
13
- for (const statement of program.body ?? []) {
14
- if (statement.type !== "ExportNamedDeclaration") continue;
15
- const declaration = statement.declaration;
16
- if (declaration?.type !== "VariableDeclaration" || declaration.kind !== "const") continue;
17
- for (const variable of declaration.declarations ?? []) if (isIdentifier(variable.id) && names.has(variable.id.name) && variable.init) result.set(variable.id.name, variable.init);
18
- }
19
- return result;
20
- }
21
- function unwrapStaticExpression(node) {
22
- while (node && [
23
- "ParenthesizedExpression",
24
- "TSAsExpression",
25
- "TSSatisfiesExpression",
26
- "TSTypeAssertion"
27
- ].includes(node.type)) node = node.expression;
28
- return node;
29
- }
30
- function staticLiteral(node) {
31
- node = unwrapStaticExpression(node);
32
- if (node?.type === "Literal") return node.value;
33
- if (node?.type === "TemplateLiteral") {
34
- const expressions = node.expressions;
35
- const quasis = node.quasis;
36
- if (expressions?.length === 0 && quasis?.length === 1) return quasis[0]?.value?.cooked;
37
- }
38
- }
39
- //#endregion
40
8
  //#region src/pages/layout-resolution.ts
41
9
  function isNamedLayout(layout) {
42
10
  return "name" in layout;
@@ -131,7 +99,8 @@ function componentLayout(source, filename) {
131
99
  const scripts = filename.endsWith(".vue") || filename.endsWith(".svelte") ? [...source.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/gi)].map((match) => match[1]) : [source];
132
100
  for (const script of scripts) {
133
101
  if (!script.includes("layout")) continue;
134
- const value = staticLiteral(staticExportInitializers(filename.replace(/\.(vue|svelte)$/, ".ts"), script, /* @__PURE__ */ new Set(["layout"])).get("layout"));
102
+ const initializer = staticExportInitializers(filename.replace(/\.(vue|svelte)$/, ".ts"), script, /* @__PURE__ */ new Set(["layout"])).get("layout");
103
+ const value = staticLiteral(initializer);
135
104
  if (typeof value === "string" || value === false) return value;
136
105
  }
137
106
  }
@@ -366,4 +335,4 @@ function extractFrontmatterLayout(source) {
366
335
  return value;
367
336
  }
368
337
  //#endregion
369
- export { resolveNamedLayout as a, unwrapStaticExpression as c, resolveLayoutIds as i, resolveEffectiveLayoutChain as n, staticExportInitializers as o, resolveLayoutChain as r, staticLiteral as s, scanPages as t };
338
+ export { resolveNamedLayout as a, resolveLayoutIds as i, resolveEffectiveLayoutChain as n, resolveLayoutChain as r, scanPages as t };
@@ -1,8 +1,8 @@
1
- import { c as getToken } from "./auth-DLNN0D3Z.mjs";
1
+ import { c as getToken } from "./auth-CSkdO2Bb.mjs";
2
2
  import { i as readDeploymentPlatform, o as readProjectConfig } from "./project-C0Fqu05O.mjs";
3
- import { _ as validateSecretValues } from "./env-validation-BB4GkLxn.mjs";
3
+ import { _ as validateSecretValues } from "./env-validation-BPn7vk-V.mjs";
4
4
  import { E as confirm, F as password, N as note, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-CTBk70IR.mjs";
5
- import { n as PlatformClient } from "./client-BTZ3XkrB.mjs";
5
+ import { n as PlatformClient } from "./client-RV8NVeB8.mjs";
6
6
  import { r as cliTitle } from "./output-Dm_A4Tbv.mjs";
7
7
  import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
8
8
  import { readFileSync } from "node:fs";
@@ -78,7 +78,7 @@ async function runSecretCommand(root, args) {
78
78
  }
79
79
  async function runCloudflareSecretCommand(root, args) {
80
80
  if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
81
- const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-BT6OWFBk.mjs");
81
+ const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-AiWashgg.mjs");
82
82
  const context = resolveCloudflareOperationContext(root);
83
83
  if (args.action === "list") {
84
84
  const secrets = await listCloudflareSecrets(context);
@@ -55,6 +55,7 @@ function eventStream(start, options = {}) {
55
55
  const markClosed = () => {
56
56
  if (closedOnce) return;
57
57
  closedOnce = true;
58
+ options.signal?.removeEventListener("abort", abort);
58
59
  if (!signalController.signal.aborted) signalController.abort();
59
60
  if (keepAliveTimer != null) {
60
61
  clearInterval(keepAliveTimer);
@@ -68,10 +69,12 @@ function eventStream(start, options = {}) {
68
69
  await writer.close().catch(() => {});
69
70
  }
70
71
  async function fail(error) {
71
- if (closedOnce) return;
72
72
  markClosed();
73
73
  await writer.abort(error).catch(() => {});
74
74
  }
75
+ function abort() {
76
+ fail(options.signal?.reason ?? new SseStreamClosedError());
77
+ }
75
78
  async function write(text) {
76
79
  if (closedOnce) throw new SseStreamClosedError();
77
80
  try {
@@ -95,11 +98,11 @@ function eventStream(start, options = {}) {
95
98
  writer.closed.catch(() => {
96
99
  close();
97
100
  });
98
- if (options.signal?.aborted) close();
99
- else options.signal?.addEventListener("abort", () => void close(), { once: true });
100
101
  if (keepAlive) keepAliveTimer = setInterval(() => {
101
102
  stream.comment(keepAlive.comment).catch(() => close());
102
103
  }, keepAlive.intervalMs);
104
+ if (options.signal?.aborted) abort();
105
+ else options.signal?.addEventListener("abort", abort, { once: true });
103
106
  queueMicrotask(() => {
104
107
  (async () => {
105
108
  try {
@@ -0,0 +1,2 @@
1
+ import { i as validateMigrations } from "./validate-ctOrgiS3.mjs";
2
+ export { validateMigrations };
@@ -1,7 +1,8 @@
1
1
  import { a as join } from "./dist-BVqXeR_h.mjs";
2
2
  import { n as readJournal, r as stripSqlExt } from "./collect-DiTn9yr6.mjs";
3
- import { t as DESTRUCTIVE_PRAGMA, u as tokenizeSql } from "./plan-BEZ8VJW0.mjs";
3
+ import { t as DESTRUCTIVE_PRAGMA } from "./plan-NPpwZ_kc.mjs";
4
4
  import { existsSync, readdirSync } from "node:fs";
5
+ import { tokenizeSql } from "@void/deploy-core";
5
6
  //#region src/migrations/validate.ts
6
7
  /**
7
8
  * Destructive SQL patterns that are rejected unless the migration