void 1.2.1 → 1.4.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 (200) hide show
  1. package/dist/{account-cmd-CdUll_35.mjs → account-cmd-HP8bixYo.mjs} +3 -3
  2. package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DDOQwiXk.mjs} +18 -12
  3. package/dist/{application-routing-DAhNP4u3.mjs → application-routing-4719u_kf.mjs} +3 -1
  4. package/dist/auth-g2TQbDLD.d.mts +70 -0
  5. package/dist/{auth-link-C87vGXM-.mjs → auth-link-CedYpDCy.mjs} +3 -3
  6. package/dist/{auth-router-6I81r-ix.mjs → auth-router-vafo7x8w.mjs} +11 -6
  7. package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
  8. package/dist/{better-auth-shared-DVk2DkTW.d.mts → better-auth-shared-BHB8kiTE.d.mts} +1 -1
  9. package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-9vUAQ1_V.mjs} +1 -1
  10. package/dist/{cache-oHzrnY3z.mjs → cache-jvwLNb0h.mjs} +1 -1
  11. package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-Dw0UmWKO.mjs} +1 -1
  12. package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-XpNR9zoh.mjs} +122 -5
  13. package/dist/cf-build-output-bd8Uwv1P.mjs +1 -0
  14. package/dist/{cf-worker-settings-BECvvTVd.mjs → cf-worker-settings-Dg27RzyT.mjs} +11 -5
  15. package/dist/cli/cli.mjs +41 -32
  16. package/dist/cli/cloudflare-operation-process.mjs +35 -8
  17. package/dist/cli/env-schema-probe.mjs +2 -2
  18. package/dist/{client-BEkdj1kx.mjs → client-B3LnB_bE.mjs} +8 -1
  19. package/dist/client-BZb9j66F.mjs +1 -0
  20. package/dist/{cloudflare-auth-Byo_0_N9.mjs → cloudflare-auth-DyD_kVFr.mjs} +1 -1
  21. package/dist/{cloudflare-cmd-DMzCv12s.mjs → cloudflare-cmd-D-b_u3T4.mjs} +2 -2
  22. package/dist/{cloudflare-config-DchHxPTo.mjs → cloudflare-config-CH1AylZT.mjs} +14 -3
  23. package/dist/{cloudflare-connect-CCRTVg-I.mjs → cloudflare-connect-zTJh8UnN.mjs} +2 -2
  24. package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-Bc-7fN44.mjs} +4 -4
  25. package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-BtulCNOg.mjs} +1 -1
  26. package/dist/{config-BU6hMu1W.mjs → config-BV2ASlpn.mjs} +1 -1
  27. package/dist/{config-DQfHOKh9.d.mts → config-CAdZVTLN.d.mts} +4 -1
  28. package/dist/config-D-6q7EBH.mjs +87 -0
  29. package/dist/{config-DHgSEWT7.mjs → config-OFOAimzt.mjs} +5 -3
  30. package/dist/config-entry.d.mts +1 -1
  31. package/dist/{config-BIaXIkkv.mjs → config-tqMM6DwY.mjs} +1 -1
  32. package/dist/{connect-k7R2rPVA.mjs → connect-BOM6zvFX.mjs} +4 -4
  33. package/dist/{create-project-DV71ol5d.mjs → create-project-Bxd02EHN.mjs} +1 -1
  34. package/dist/{create-project-DTuy-l0z.mjs → create-project-C2K0DN2O.mjs} +1 -1
  35. package/dist/{db-DVOkLH5X.mjs → db-Cdvr3zwG.mjs} +18 -18
  36. package/dist/{db-types-NGxPwnlt.mjs → db-types-0eCiqYb1.mjs} +1 -1
  37. package/dist/{delete-BbP5eopu.mjs → delete-lETE6Tpt.mjs} +1 -1
  38. package/dist/deploy-CX94CmKa.mjs +2 -0
  39. package/dist/{deploy-7H32EnUs.mjs → deploy-CdM-LAxX.mjs} +473 -148
  40. package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-DjeBFG2c.mjs} +43 -20
  41. package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-DIq_gFTP.mjs} +14 -13
  42. package/dist/deploy.d.mts +2 -0
  43. package/dist/deploy.mjs +8 -5
  44. package/dist/{dispatch-DoUnxTNo.mjs → dispatch-CLa2LThw.mjs} +76 -7
  45. package/dist/{domain-CA2wBgra.mjs → domain-DyhNtdYf.mjs} +2 -2
  46. package/dist/{email-DXpCc77w.mjs → email-DM2wDcBN.mjs} +59 -10
  47. package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-PMbAev9Q.mjs} +124 -10
  48. package/dist/{env-DgOQ9_8S.mjs → env-78hbN-oI.mjs} +3 -3
  49. package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
  50. package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-B3VobvXm.mjs} +2 -1
  51. package/dist/{env-validation-BmsdCZEk.mjs → env-validation-BUfFZ6bt.mjs} +1 -1
  52. package/dist/error-pages-CLIJ7aYq.mjs +37 -0
  53. package/dist/gen-BhWBT4iu.mjs +1 -0
  54. package/dist/{gen-BfmcIi2g.mjs → gen-CFmsUsW1.mjs} +3 -3
  55. package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-De-_IWbM.mjs} +1 -1
  56. package/dist/{handler-BbkSPzGF.d.mts → handler-BHktmuTL.d.mts} +4 -2
  57. package/dist/{headers-D522zd0A.mjs → headers--vaK_chu.mjs} +1 -1
  58. package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
  59. package/dist/help-qOZr3wng.mjs +1 -0
  60. package/dist/index.d.mts +3 -5
  61. package/dist/index.mjs +370 -140
  62. package/dist/{info-7VDlhtyy.mjs → info-Yg0-V5Rs.mjs} +4 -4
  63. package/dist/{init-DxYyOs4-.mjs → init-CDiJQycf.mjs} +241 -206
  64. package/dist/{link-Ddmod1dZ.mjs → link-Dllip08S.mjs} +2 -2
  65. package/dist/{list-MogaugiO.mjs → list-BYRP6am0.mjs} +2 -2
  66. package/dist/{live-Bt8Y_0bg.d.mts → live-BllfDuzA.d.mts} +2 -2
  67. package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CAwAs9GH.mjs} +1 -1
  68. package/dist/login-BAPmYnb7.mjs +1 -0
  69. package/dist/{login-Cttnagmm.mjs → login-PcFy5mlC.mjs} +2 -2
  70. package/dist/{logs-CAszUWZI.mjs → logs-DmJTBhed.mjs} +2 -2
  71. package/dist/{migrate-DyT2jJ8y.mjs → migrate-B8S2xTcb.mjs} +5 -66
  72. package/dist/migrate-BIYTPQE6.mjs +1 -0
  73. package/dist/nitro.mjs +4 -4
  74. package/dist/{node-WB7c2N4L.mjs → node-CDOPrGSl.mjs} +5 -5
  75. package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
  76. package/dist/operator-cmd-CjazwOyb.mjs +1 -0
  77. package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DmkmS2wL.mjs} +4 -3
  78. package/dist/pages/client.d.mts +32 -4
  79. package/dist/pages/client.mjs +186 -29
  80. package/dist/pages/index.d.mts +34 -2
  81. package/dist/pages/index.mjs +96 -55
  82. package/dist/pages/islands-plugin.d.mts +1 -1
  83. package/dist/pages/islands-plugin.mjs +9 -3
  84. package/dist/pages/protocol.d.mts +2 -2
  85. package/dist/platform-args-BC8_hsDj.mjs +1 -0
  86. package/dist/{platform-args-DVbVClZl.mjs → platform-args-BMD2gjc_.mjs} +1 -1
  87. package/dist/{platform-auth-config-C-pm5Qzx.mjs → platform-auth-config-CImnfohz.mjs} +3 -3
  88. package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-BogLhtHi.mjs} +2 -2
  89. package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-B-mEaWEi.mjs} +2 -2
  90. package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-CV8NxIIn.mjs} +1 -1
  91. package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-DZK2ixMl.mjs} +4 -4
  92. package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-CRvelPGE.mjs} +2 -2
  93. package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-CPYY7E9B.mjs} +103 -41
  94. package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-DwXq7kZt.mjs} +1 -1
  95. package/dist/{platform-management--vDwSn35.mjs → platform-management-BOnGbMSM.mjs} +1 -1
  96. package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-lXdgGgAM.mjs} +1 -1
  97. package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-noaALXnE.mjs} +2 -2
  98. package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
  99. package/dist/{prepare-BcAE5Sdj.mjs → prepare-BuOS18AM.mjs} +1 -1
  100. package/dist/{prepare-DA-17DhO.mjs → prepare-D604Yiyr.mjs} +12 -8
  101. package/dist/prepare-DU-tOpS5.mjs +1 -0
  102. package/dist/{prerender-render-Cijv7UFo.mjs → prerender-render-CaShbHJ3.mjs} +13 -1
  103. package/dist/prerender-render.d.mts +1 -0
  104. package/dist/prerender-render.mjs +1 -1
  105. package/dist/{project-cmd-DA4K5faU.mjs → project-cmd-DBYqAIbe.mjs} +15 -15
  106. package/dist/{project-team-CQBNveX3.mjs → project-team-BjCLgTRC.mjs} +1 -1
  107. package/dist/{project-token-CCalFyQf.mjs → project-token-BB6PwaA9.mjs} +1 -1
  108. package/dist/{project-tsconfig-Itv1f4WC.mjs → project-tsconfig-CVvk6Z_e.mjs} +24 -2
  109. package/dist/{project-zero-trust-DPnkiEuT.mjs → project-zero-trust-CWDh1P_t.mjs} +1 -1
  110. package/dist/{protocol-BBDpJz3G.d.mts → protocol-D5XDySYu.d.mts} +2 -2
  111. package/dist/{provision-BFLCrnUp.mjs → provision-DfxLCg-d.mjs} +1 -1
  112. package/dist/{provision-DtROpNNI.mjs → provision-DztLJ97X.mjs} +24 -8
  113. package/dist/{requests-BpH0kImL.mjs → requests-D_pbzDyz.mjs} +1 -1
  114. package/dist/{rollback-CXS1tAa-.mjs → rollback-CjfIYsJx.mjs} +2 -2
  115. package/dist/{route-types-BZi26DVS.mjs → route-types-DvEGmPif.mjs} +109 -30
  116. package/dist/routes-stub.d.mts +22 -13
  117. package/dist/runtime/auth.d.mts +2 -2
  118. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  119. package/dist/runtime/better-auth-mysql.mjs +1 -1
  120. package/dist/runtime/better-auth-pg.d.mts +1 -1
  121. package/dist/runtime/better-auth-pg.mjs +1 -1
  122. package/dist/runtime/better-auth.d.mts +1 -1
  123. package/dist/runtime/better-auth.mjs +1 -1
  124. package/dist/runtime/client-react.d.mts +1 -1
  125. package/dist/runtime/client-solid.d.mts +1 -1
  126. package/dist/runtime/client-svelte.d.mts +1 -1
  127. package/dist/runtime/client-vue.d.mts +1 -1
  128. package/dist/runtime/client.d.mts +1 -1
  129. package/dist/runtime/handler.d.mts +1 -1
  130. package/dist/runtime/live-client.d.mts +1 -1
  131. package/dist/runtime/live.d.mts +1 -1
  132. package/dist/runtime/log.mjs +19 -1
  133. package/dist/runtime/routing.d.mts +5 -4
  134. package/dist/runtime/routing.mjs +14 -73
  135. package/dist/runtime/validator.d.mts +1 -1
  136. package/dist/runtime/ws-server.d.mts +3 -3
  137. package/dist/runtime/ws.d.mts +1 -1
  138. package/dist/runtime/ws.mjs +4 -2
  139. package/dist/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
  140. package/dist/{secret-BbXHfLAt.mjs → secret-3X0PxmuX.mjs} +9 -12
  141. package/dist/static-asset-marker-Btf-6oCD.mjs +32 -0
  142. package/dist/{types-7AIz0OZu.d.mts → types-w72dljaA.d.mts} +6 -1
  143. package/dist/{version-metadata-tS39iW09.mjs → version-metadata-D2vfMQzv.mjs} +2 -1
  144. package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
  145. package/dist/{wrangler-F96NnLyb.mjs → wrangler-I-scB_1t.mjs} +82 -13
  146. package/dist/wrangler-UnwdISay.mjs +1 -0
  147. package/dist/{wrapper-D3sZyh2C.mjs → wrapper-BBl1rC32.mjs} +8 -12
  148. package/dist/{ws-BH-im_tX.d.mts → ws-B3ClMVDh.d.mts} +3 -2
  149. package/docs/guide/auth.md +4 -2
  150. package/docs/guide/edge/redirects.md +22 -0
  151. package/docs/guide/edge/static-assets.md +10 -0
  152. package/docs/guide/email/domains.md +1 -1
  153. package/docs/guide/email/receiving.md +2 -0
  154. package/docs/guide/email/sending.md +1 -1
  155. package/docs/guide/pages-routing/actions-and-forms.md +43 -13
  156. package/docs/guide/pages-routing/markdown.md +2 -0
  157. package/docs/guide/pages-routing/overview.md +33 -2
  158. package/docs/guide/platform/administration/email.md +18 -0
  159. package/docs/guide/platform/installation/maintenance.md +3 -1
  160. package/docs/guide/platform/installation/prerequisites.md +9 -4
  161. package/docs/guide/platform/installation/uninstall.md +2 -0
  162. package/docs/guide/queues.md +13 -1
  163. package/docs/guide/server-routing.md +40 -2
  164. package/docs/guide/ssg.md +8 -0
  165. package/docs/guide/type-safety.md +7 -7
  166. package/docs/guide/websockets.md +4 -2
  167. package/docs/integrations/cloudflare.md +16 -7
  168. package/docs/reference/api/auth.md +6 -2
  169. package/docs/reference/api/deploy.md +9 -5
  170. package/docs/reference/api/pages.md +6 -4
  171. package/docs/reference/cli/deploy.md +10 -9
  172. package/docs/reference/cli/email.md +13 -0
  173. package/docs/reference/cli/platform-email.md +2 -2
  174. package/docs/reference/cli.md +1 -0
  175. package/docs/reference/config.md +11 -1
  176. package/docs/reference/structure.md +3 -1
  177. package/package.json +9 -7
  178. package/schema.json +4 -0
  179. package/skills/void/SKILL.md +1 -1
  180. package/templates/assets/icons.svg +49 -0
  181. package/templates/assets/react.svg +1 -0
  182. package/templates/assets/solid.svg +1 -0
  183. package/templates/assets/stack.svg +35 -0
  184. package/templates/assets/svelte.svg +1 -0
  185. package/templates/assets/void.svg +5 -0
  186. package/templates/assets/vue.svg +1 -0
  187. package/dist/auth-DkcFflXV.d.mts +0 -42
  188. package/dist/cf-build-output-BJHuSsVN.mjs +0 -1
  189. package/dist/client-BiRDZTSd.mjs +0 -1
  190. package/dist/config-CyUJzi3q.mjs +0 -32
  191. package/dist/deploy-CE0Ev0Ob.mjs +0 -2
  192. package/dist/gen-NrOlWZaG.mjs +0 -1
  193. package/dist/help-BeAFFE5C.mjs +0 -1
  194. package/dist/login-DgDwlKc_.mjs +0 -1
  195. package/dist/migrate-n49ZeS1X.mjs +0 -1
  196. package/dist/operator-cmd-d2MvJOrl.mjs +0 -1
  197. package/dist/parse-filename-DioPHiR9.mjs +0 -77
  198. package/dist/platform-args-kQrgxScY.mjs +0 -1
  199. package/dist/prepare-C4I0f--h.mjs +0 -1
  200. package/dist/wrangler-BLb3_luP.mjs +0 -1
@@ -0,0 +1,5 @@
1
+ <svg width="270" height="58" viewBox="0 0 270 58" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <style>@media (prefers-color-scheme: dark) { path, circle { fill: #fff; } }</style>
3
+ <circle cx="262" cy="48.96" r="8" fill="black"/>
4
+ <path d="M20.72 0.959999L35.52 41.28L50.08 0.959999H70L47.92 56.96H22.32L0.24 0.959999H20.72ZM106.542 57.92C82.9419 57.92 70.6219 48 70.6219 28.96C70.6219 9.92 82.9419 1.90735e-06 106.542 1.90735e-06C130.142 1.90735e-06 142.542 9.92 142.542 28.96C142.542 48 130.142 57.92 106.542 57.92ZM106.542 44.08C117.662 44.08 122.862 39.36 122.862 28.96C122.862 18.48 117.662 13.76 106.542 13.76C95.4219 13.76 90.2219 18.48 90.2219 28.96C90.2219 39.36 95.4219 44.08 106.542 44.08ZM152.265 56.96V0.959999H171.465V56.96H152.265ZM184.687 56.96V0.959999H219.887C239.327 0.959999 250.447 9.84 250.447 28.96C250.447 48.16 239.247 56.96 219.807 56.96H184.687ZM230.767 28.96C230.767 18.48 226.287 14.56 217.167 14.56H203.887V43.36H217.167C226.287 43.36 230.767 39.44 230.767 28.96Z" fill="black"/>
5
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -1,42 +0,0 @@
1
- import { AsyncLocalStorage } from "node:async_hooks";
2
- import { BetterAuthOptions, Session, User } from "better-auth";
3
- import { Context, Env } from "hono";
4
- //#region src/runtime/auth.d.ts
5
- type AuthUser = User;
6
- type AuthSession = Session;
7
- type AuthState = {
8
- session: AuthSession;
9
- user: AuthUser;
10
- };
11
- type VoidAuthConfigContext = {
12
- defaults: BetterAuthOptions;
13
- env: Record<string, unknown>;
14
- dialect: "sqlite" | "postgresql" | "mysql";
15
- request: Request;
16
- };
17
- type VoidAuthConfig = BetterAuthOptions | ((ctx: VoidAuthConfigContext) => BetterAuthOptions);
18
- /**
19
- * Shared AsyncLocalStorage that holds the authenticated Better Auth state for the
20
- * current request.
21
- *
22
- * Stored on `globalThis` under a `Symbol.for` key so duplicate module loads
23
- * (e.g. once by void's bundled runtime and once by Vite's SSR module runner
24
- * when user code imports from `void/auth`) share a single ALS instance. Without
25
- * this, the middleware writes to one instance and `getUser()` reads another,
26
- * always returning null.
27
- */
28
- type AuthContextStore = {
29
- user: AuthUser | null;
30
- state: AuthState | null;
31
- };
32
- declare const authContext: AsyncLocalStorage<AuthContextStore>;
33
- declare function defineAuth<T extends VoidAuthConfig>(config: T): T;
34
- declare function getUser(): AuthUser | null;
35
- declare function getSession(): AuthState | null;
36
- declare function requireAuth<E extends Env & {
37
- Variables: {
38
- user: AuthUser | null;
39
- };
40
- }>(c: Context<E>): AuthUser;
41
- //#endregion
42
- export { VoidAuthConfigContext as a, getSession as c, VoidAuthConfig as i, getUser as l, AuthState as n, authContext as o, AuthUser as r, defineAuth as s, AuthSession as t, requireAuth as u };
@@ -1 +0,0 @@
1
- export { t as prepareCfBuildOutput } from "./cf-build-output-BhVxldCw.mjs";
@@ -1 +0,0 @@
1
- export { r as PlatformClient } from "./client-BEkdj1kx.mjs";
@@ -1,32 +0,0 @@
1
- import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
2
- import { existsSync, readFileSync } from "node:fs";
3
- import { pathToFileURL } from "node:url";
4
- import { parseSync } from "vite";
5
- //#region src/auth/config.ts
6
- function isVoidAuthConfigSource(code, filename) {
7
- if (!code.includes("void/auth")) return false;
8
- let program;
9
- try {
10
- program = parseSync(filename, code).program;
11
- } catch {
12
- return false;
13
- }
14
- return (program.body ?? []).some((node) => {
15
- if (node.type !== "ImportDeclaration" && node.type !== "ExportNamedDeclaration" && node.type !== "ExportAllDeclaration") return false;
16
- return node.source?.value === "void/auth";
17
- });
18
- }
19
- function findVoidAuthConfig(root, paths = readProjectPaths(root)) {
20
- for (const absPath of paths.authConfigCandidates) {
21
- if (!existsSync(absPath)) continue;
22
- if (isVoidAuthConfigSource(readFileSync(absPath, "utf-8"), absPath)) return absPath;
23
- }
24
- return null;
25
- }
26
- async function loadVoidAuthConfig(configPath) {
27
- if (!configPath) return;
28
- const mod = await import(pathToFileURL(configPath).href);
29
- return mod.default ?? mod.auth ?? mod.config;
30
- }
31
- //#endregion
32
- export { loadVoidAuthConfig as n, findVoidAuthConfig as t };
@@ -1,2 +0,0 @@
1
- import "./deploy-transport-BzGEj0Ge.mjs";
2
- export { i as checkWranglerMigrationApplySet, t as parseRootWranglerConfig, r as runDeploy } from "./deploy-7H32EnUs.mjs";
@@ -1 +0,0 @@
1
- export { r as runGenCommand } from "./gen-BfmcIi2g.mjs";
@@ -1 +0,0 @@
1
- export { r as printHelpPage } from "./help-CxSlPpzJ.mjs";
@@ -1 +0,0 @@
1
- export { r as selectPlatformLoginMethod } from "./login-Cttnagmm.mjs";
@@ -1 +0,0 @@
1
- export { n as runMigrateCommand } from "./migrate-DyT2jJ8y.mjs";
@@ -1 +0,0 @@
1
- export { a as runOperatorCommand } from "./operator-cmd-skshjMGl.mjs";
@@ -1,77 +0,0 @@
1
- //#region src/router/parse-filename.ts
2
- const EXTENSIONS = [
3
- ".ts",
4
- ".mts",
5
- ".js",
6
- ".mjs"
7
- ];
8
- const ENV_SUFFIXES = ["dev", "prod"];
9
- function parsePath(relativePath, isWebSocketRoute) {
10
- const filePath = relativePath;
11
- let path = relativePath.replace(/\\/g, "/");
12
- for (const ext of EXTENSIONS) if (path.endsWith(ext)) {
13
- path = path.slice(0, -ext.length);
14
- break;
15
- }
16
- if (isWebSocketRoute && path.endsWith(".ws")) path = path.slice(0, -3);
17
- const segments = path.split("/");
18
- let filename = segments.pop();
19
- let env = null;
20
- for (const suffix of ENV_SUFFIXES) if (filename.endsWith(`.${suffix}`)) {
21
- env = suffix;
22
- filename = filename.slice(0, -(suffix.length + 1));
23
- break;
24
- }
25
- segments.push(filename);
26
- if (segments[segments.length - 1] === "index") segments.pop();
27
- const filtered = segments.filter((s) => !s.startsWith("(") || !s.endsWith(")"));
28
- const params = [];
29
- let catchAll = false;
30
- return {
31
- pattern: "/" + filtered.map((segment) => {
32
- if (segment.startsWith("[...") && segment.endsWith("]")) {
33
- const paramName = segment.slice(4, -1);
34
- catchAll = true;
35
- if (paramName) {
36
- params.push(paramName);
37
- return `:${paramName}{.+}`;
38
- }
39
- return "*";
40
- }
41
- if (segment.startsWith("[") && segment.endsWith("]")) {
42
- const paramName = segment.slice(1, -1);
43
- params.push(paramName);
44
- return `:${paramName}`;
45
- }
46
- return segment;
47
- }).join("/"),
48
- methods: [],
49
- params,
50
- catchAll,
51
- env,
52
- filePath
53
- };
54
- }
55
- /**
56
- * Parse a route filename (relative to routes/) into a RouteDefinition.
57
- *
58
- * Rules (applied in order):
59
- * 1. Strip file extension (.ts, .js, .mts, .mjs)
60
- * 2. Check for env suffix (.dev, .prod) → strip and record
61
- * 3. Strip trailing "index" segment
62
- * 4. Remove route group directories: (groupname)
63
- * 5. Convert [param] → :param, [...param] → :param{.+}, [...] → *
64
- * 6. Prefix with /
65
- */
66
- function parseRouteFilename(relativePath) {
67
- return parsePath(relativePath, false);
68
- }
69
- /** Parse a `.ws.*` route filename into a regular route definition. */
70
- function parseWebSocketFilename(relativePath) {
71
- return parsePath(relativePath, true);
72
- }
73
- function isRouteEnabledForEnvironment(route, environment) {
74
- return environment === void 0 || route.env === null || route.env === environment;
75
- }
76
- //#endregion
77
- export { parseRouteFilename as n, parseWebSocketFilename as r, isRouteEnabledForEnvironment as t };
@@ -1 +0,0 @@
1
- export { t as parsePlatformArgs } from "./platform-args-DVbVClZl.mjs";
@@ -1 +0,0 @@
1
- export { t as prepareProject } from "./prepare-DA-17DhO.mjs";
@@ -1 +0,0 @@
1
- export { b as readRootWranglerConfig } from "./wrangler-F96NnLyb.mjs";