void 0.21.2 → 0.21.4

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 (184) hide show
  1. package/dist/{account-cmd-D8OC-U7y.mjs → account-cmd-DGt9cpRe.mjs} +4 -4
  2. package/dist/{agents-gni4eqBu.mjs → agents-B_pX_HmQ.mjs} +1 -1
  3. package/dist/ast-CPGPjb0V.mjs +18 -0
  4. package/dist/{auth-CAw7zHqj.mjs → auth-CZuiVsFh.mjs} +1 -1
  5. package/dist/{auth-B9_D6ygs.mjs → auth-DLNN0D3Z.mjs} +4 -4
  6. package/dist/{auth-link-BYFeMJAp.mjs → auth-link-Cl9vOuf7.mjs} +4 -4
  7. package/dist/{auth-router-OHZNmrb_.mjs → auth-router-D4ZcMUSf.mjs} +6 -6
  8. package/dist/{better-auth-shared-BoVwA5Vm.d.mts → better-auth-shared-BVkjZ3vM.d.mts} +1 -0
  9. package/dist/{better-auth-shared-syGYYmnY.mjs → better-auth-shared-rsBGBvWJ.mjs} +3 -6
  10. package/dist/{build-cmd-Bft7EY51.mjs → build-cmd-Dpt0jd-x.mjs} +4 -4
  11. package/dist/{cache-CKV1Gz2w.mjs → cache-7_UeZdTk.mjs} +4 -4
  12. package/dist/{cancel-deploy-BAKmkX4f.mjs → cancel-deploy-D23R1RXT.mjs} +3 -3
  13. package/dist/{cf-access-rAZxzMkL.mjs → cf-access-P0iZnu0q.mjs} +1 -1
  14. package/dist/{cf-build-output-CTdlo6Rt.mjs → cf-build-output-CGT03qCD.mjs} +2 -2
  15. package/dist/cli/cf-compat.mjs +2 -2
  16. package/dist/cli/cli.mjs +47 -43
  17. package/dist/cli/env-schema-probe.mjs +3 -3
  18. package/dist/client-4cDVv7BO.mjs +2 -0
  19. package/dist/{client-PdAJ-F0t.mjs → client-QTl6ko_D.mjs} +28 -5
  20. package/dist/{cloudflare-auth-BCmTc1X_.mjs → cloudflare-auth-B9jPCkV2.mjs} +1 -1
  21. package/dist/{cloudflare-cmd-D6PrKn7o.mjs → cloudflare-cmd-BjNxR1XF.mjs} +3 -3
  22. package/dist/{cloudflare-connect-DloREDlc.mjs → cloudflare-connect-CCUozPOe.mjs} +3 -3
  23. package/dist/{cloudflare-operations-BHNJVDbN.mjs → cloudflare-operations-BipGMJ5O.mjs} +1 -1
  24. package/dist/{cloudflare-operations-CPEdHYhM.mjs → cloudflare-operations-sMZXpk_S.mjs} +4 -4
  25. package/dist/collect-DLyFDiKW.mjs +2 -0
  26. package/dist/{collect-DXHNWHcT.mjs → collect-DiTn9yr6.mjs} +1 -1
  27. package/dist/config-0acf1oys.mjs +2 -0
  28. package/dist/{config-DywxBLQC.d.mts → config-CF69HgXc.d.mts} +7 -0
  29. package/dist/{config-Dxr6cTXn.mjs → config-CafTW6Cz.mjs} +12 -1
  30. package/dist/{config-BSe70f4T.mjs → config-D8MOgiQV.mjs} +3 -3
  31. package/dist/config-DPByhVck.mjs +32 -0
  32. package/dist/config-entry.d.mts +1 -1
  33. package/dist/{config--T87TD8T.mjs → config-s7Xj7tPb.mjs} +1 -1
  34. package/dist/{config-write-y3CBI_ux.mjs → config-write-BSduPMY8.mjs} +3 -3
  35. package/dist/{connect-DLx1pRYk.mjs → connect-4Ph5Y0QE.mjs} +7 -7
  36. package/dist/{create-project-JV9-6ICF.mjs → create-project-BniEV0OW.mjs} +1 -1
  37. package/dist/{create-project-BZBl_gQ0.mjs → create-project-DBfFSZKY.mjs} +4 -4
  38. package/dist/{db-B98_UV4H.mjs → db-CTXIWD42.mjs} +123 -55
  39. package/dist/{delete-BEEyqlwd.mjs → delete-D6dZ9B6B.mjs} +4 -4
  40. package/dist/deploy-BVwow28d.mjs +2 -0
  41. package/dist/{deploy-Bsymb0_c.mjs → deploy-F1exK5F4.mjs} +567 -263
  42. package/dist/discover-AMCBXivQ.mjs +2 -0
  43. package/dist/{discover-C4O6YxVS.mjs → discover-BcPPiF1o.mjs} +2 -2
  44. package/dist/{dist-4WkAWhWx.mjs → dist-BVqXeR_h.mjs} +9 -1
  45. package/dist/dist-_UUlL6bg.mjs +2 -0
  46. package/dist/{domain-Av2AkLQP.mjs → domain-Dmhvb2oU.mjs} +4 -4
  47. package/dist/{email-C5kaZXzJ.mjs → email--tEtMoj_.mjs} +1 -1
  48. package/dist/{email-CUqa6TtH.mjs → email-BxHabktK.mjs} +9 -9
  49. package/dist/{entry-DdRFGK0y.mjs → entry-CF5wvH4w.mjs} +4 -21
  50. package/dist/{env-D4RIGEzz.mjs → env-Csi-tMbT.mjs} +7 -7
  51. package/dist/{env-Yz4HcvHs.mjs → env-D5liuQYR.mjs} +5 -2
  52. package/dist/{env-DX_v-Q-v.mjs → env-_v349JBd.mjs} +1 -1
  53. package/dist/{env-types-CWDtqHgw.mjs → env-types-C2_bIk_b.mjs} +2 -2
  54. package/dist/{env-validation-BsFEXps5.mjs → env-validation-BB4GkLxn.mjs} +4 -4
  55. package/dist/{env-validation-DIDGM7h4.mjs → env-validation-BXge7uyK.mjs} +1 -1
  56. package/dist/{gen-pg-Ojg8Y.mjs → gen-Dz3X1Qab.mjs} +8 -8
  57. package/dist/gen-Vnv2f65C.mjs +2 -0
  58. package/dist/{generate-C0VY6RVf.mjs → generate-GDbL7sUr.mjs} +2 -2
  59. package/dist/{github-cmd-BEK4VprE.mjs → github-cmd-BED3_9JD.mjs} +4 -4
  60. package/dist/{headers-B_HBMgi0.mjs → headers-BOg_velo.mjs} +2 -2
  61. package/dist/{help-iQOt7WHk.mjs → help-DC7gdz7L.mjs} +7 -3
  62. package/dist/help-DQMfeKMz.mjs +2 -0
  63. package/dist/index.mjs +132 -158
  64. package/dist/{init-D5niUPAz.mjs → init-CRGDXzVC.mjs} +105 -289
  65. package/dist/{link-3lGrfXzd.mjs → link-CsHOinF7.mjs} +5 -5
  66. package/dist/{list-CVjGr_C6.mjs → list-CDb-4bZ1.mjs} +5 -5
  67. package/dist/{local-d1-DzykTWY8.mjs → local-d1-CC8sKFGu.mjs} +3 -3
  68. package/dist/{login-BgQJzxAl.mjs → login-BQyISZuW.mjs} +3 -3
  69. package/dist/login-r2gL8l7B.mjs +2 -0
  70. package/dist/{logs-DbzD-QDf.mjs → logs-BdfiOezj.mjs} +4 -4
  71. package/dist/{migrate-BV8qHiCb.mjs → migrate-B8KuoYsO.mjs} +69 -44
  72. package/dist/migrate-TsHGBnDA.mjs +2 -0
  73. package/dist/{node-Cupyf7-s.mjs → node-BM43oz4G.mjs} +5 -5
  74. package/dist/{operator-auth-BkVgJqv-.mjs → operator-auth-8KnOVXVd.mjs} +2 -2
  75. package/dist/{operator-client-A0iex2yi.mjs → operator-client-DUwumHpQ.mjs} +2 -2
  76. package/dist/{operator-cmd-CR6Lxzt0.mjs → operator-cmd-Co-PeaeD.mjs} +6 -6
  77. package/dist/{package-json-iCbMg5XF.mjs → package-json-DXfiT1jV.mjs} +1 -1
  78. package/dist/pages/index.d.mts +1 -1
  79. package/dist/pages/index.mjs +11 -6
  80. package/dist/pages/islands-plugin.d.mts +271 -1
  81. package/dist/pages/islands-plugin.mjs +95 -18
  82. package/dist/parse-filename-DioPHiR9.mjs +77 -0
  83. package/dist/{platform-auth-config-De7BqRJm.mjs → platform-auth-config-TSw8edHw.mjs} +5 -5
  84. package/dist/{platform-auth-protection-Dcat-6zu.mjs → platform-auth-protection-Ba1XqGhn.mjs} +6 -6
  85. package/dist/{platform-auth-recovery-C9gsM640.mjs → platform-auth-recovery-BkT3EsF2.mjs} +5 -5
  86. package/dist/{platform-cmd-Cl9Uhzru.mjs → platform-cmd-C8OqhqPt.mjs} +1 -1
  87. package/dist/{platform-cmd-CudokNIg.mjs → platform-cmd-CRSKfu8k.mjs} +5 -5
  88. package/dist/{platform-domain-Ckpd2kXw.mjs → platform-domain-j9YCXRm6.mjs} +3 -3
  89. package/dist/{platform-lifecycle-DVzM2T4j.mjs → platform-lifecycle-78H0XQUA.mjs} +277 -229
  90. package/dist/{platform-lifecycle-DlpiGcjr.mjs → platform-lifecycle-DDc9zCeJ.mjs} +1 -1
  91. package/dist/{platform-management-ibuS1as0.mjs → platform-management-6w8-DUjC.mjs} +2 -2
  92. package/dist/{platform-management-44Bxd3YC.mjs → platform-management-DzKNsMlt.mjs} +1 -1
  93. package/dist/{platform-recovery-D_KmvdSk.mjs → platform-recovery-Do8VOyDE.mjs} +3 -3
  94. package/dist/{platform-registry-BJbgZLS1.mjs → platform-registry-QBa4DK32.mjs} +1 -1
  95. package/dist/{plugin-inference-DsvtJLll.mjs → plugin-inference-BMfKRSqE.mjs} +188 -85
  96. package/dist/prepare-BZXkjdNe.mjs +2 -0
  97. package/dist/{prepare-pcWcxSCh.mjs → prepare-C3kt3Rst.mjs} +11 -11
  98. package/dist/{prepare-_T-Haxrr.mjs → prepare-DyZ-Yok5.mjs} +1 -1
  99. package/dist/{prerender-render-Cf_WDE9W.mjs → prerender-render-D9qbLs2f.mjs} +1 -1
  100. package/dist/prerender-render.mjs +1 -1
  101. package/dist/{preset-Dowh9tTt.mjs → preset-UHj9ARyP.mjs} +4 -4
  102. package/dist/{project-BEBFDFLz.mjs → project-BuUwfj6f.mjs} +1 -1
  103. package/dist/{project-CWNIPoXc.mjs → project-C0Fqu05O.mjs} +2 -2
  104. package/dist/{project-cmd-BuF9doku.mjs → project-cmd-B44I8J_W.mjs} +15 -15
  105. package/dist/{project-paths-CKQ-Q5JS.mjs → project-paths-GgcMozYz.mjs} +1 -1
  106. package/dist/{project-team-B1Tia8vd.mjs → project-team-BkbYIsXN.mjs} +4 -4
  107. package/dist/{project-token-Bwxjf4y6.mjs → project-token-C8xEEQnB.mjs} +4 -4
  108. package/dist/{project-tsconfig-CwfqUnVp.mjs → project-tsconfig-B8GeM0RM.mjs} +2 -2
  109. package/dist/{provision-Cck2m3jJ.mjs → provision-BhreDAOS.mjs} +141 -78
  110. package/dist/provision-DNtrtaVD.mjs +3 -0
  111. package/dist/{requests-CphRF98D.mjs → requests-DFyhBMaf.mjs} +3 -3
  112. package/dist/{resolve-project-Xvis70DG.mjs → resolve-project-BG5ORGID.mjs} +1 -1
  113. package/dist/resolve-project-DtbidV4y.mjs +2 -0
  114. package/dist/{rollback-BYHJV2yD.mjs → rollback-DHHxXZiS.mjs} +4 -4
  115. package/dist/{route-types-Id82-veQ.mjs → route-types-Clm4WD0B.mjs} +39 -16
  116. package/dist/{runner-CQs_cDSG.mjs → runner-B8wXwWlo.mjs} +1 -1
  117. package/dist/{runner-mysql-1o47achK.mjs → runner-mysql-CEG5JozK.mjs} +1 -1
  118. package/dist/{runner-mysql-BhwMk2Bm.mjs → runner-mysql-DmWchSWJ.mjs} +1 -1
  119. package/dist/{runner-BGVsGgkb.mjs → runner-p-dMs2UN.mjs} +3 -3
  120. package/dist/{runner-pg-D7z01mQS.mjs → runner-pg-Bh4AgZdj.mjs} +1 -1
  121. package/dist/{runner-pg-CJ_JeGF6.mjs → runner-pg-D4OPlil-.mjs} +1 -1
  122. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  123. package/dist/runtime/better-auth-mysql.mjs +1 -1
  124. package/dist/runtime/better-auth-pg.d.mts +1 -1
  125. package/dist/runtime/better-auth-pg.mjs +1 -1
  126. package/dist/runtime/better-auth.d.mts +1 -1
  127. package/dist/runtime/better-auth.mjs +2 -2
  128. package/dist/runtime/db.mjs +8 -5
  129. package/dist/runtime/durable.mjs +1 -1
  130. package/dist/runtime/email/testing.mjs +1 -1
  131. package/dist/runtime/env-public.mjs +1 -1
  132. package/dist/runtime/env.d.mts +1 -1
  133. package/dist/runtime/env.mjs +1 -1
  134. package/dist/runtime/kv.mjs +1 -1
  135. package/dist/runtime/live-server.mjs +38 -23
  136. package/dist/runtime/queues.mjs +1 -1
  137. package/dist/runtime/sandbox.mjs +1 -1
  138. package/dist/runtime/storage.mjs +1 -1
  139. package/dist/runtime/ws-server.d.mts +1 -1
  140. package/dist/runtime/ws-server.mjs +1 -1
  141. package/dist/{scan-DJbooZm2.mjs → scan-4tfN-PSn.mjs} +113 -99
  142. package/dist/{scan-DdDvRCU1.mjs → scan-ClYmX3sa.mjs} +35 -137
  143. package/dist/{secret-Rt9c4Ttw.mjs → secret-DN9sSNiV.mjs} +6 -6
  144. package/dist/{skills-B-690E7h.mjs → skills-O6FUaizK.mjs} +2 -2
  145. package/dist/sveltekit.mjs +1 -1
  146. package/dist/{validate-qNhV00PD.mjs → validate-CIUwFpjB.mjs} +2 -2
  147. package/dist/validate-EKmJWxmy.mjs +2 -0
  148. package/dist/{wrangler-D01qs6VB.mjs → wrangler-BymcxrRa.mjs} +3 -3
  149. package/dist/{yarn-pnp-CVEc3gE7.mjs → yarn-pnp-BV4AzNul.mjs} +1 -1
  150. package/package.json +7 -7
  151. package/schema.json +18 -0
  152. package/skills/void/docs/guide/app-types.md +1 -1
  153. package/skills/void/docs/guide/auth.md +2 -2
  154. package/skills/void/docs/guide/database/d1.md +6 -0
  155. package/skills/void/docs/guide/durable-state.md +1 -1
  156. package/skills/void/docs/guide/edge/rewrites.md +2 -3
  157. package/skills/void/docs/guide/env-migration.md +1 -1
  158. package/skills/void/docs/guide/pages-routing/markdown.md +1 -1
  159. package/skills/void/docs/guide/platform/development/local.md +1 -1
  160. package/skills/void/docs/guide/platform/installation/prerequisites.md +2 -2
  161. package/skills/void/docs/guide/platform/installation/setup.md +1 -1
  162. package/skills/void/docs/guide/server-routing.md +2 -3
  163. package/skills/void/docs/guide/ssr.md +4 -10
  164. package/skills/void/docs/guide/websockets.md +1 -1
  165. package/skills/void/docs/integrations/cloudflare.md +3 -0
  166. package/skills/void/docs/reference/api.md +1 -1
  167. package/skills/void/docs/reference/cli.md +10 -3
  168. package/skills/void/docs/reference/config.md +11 -0
  169. package/skills/void/docs/reference/resource-inference.md +1 -1
  170. package/dist/client-DAAivdid.mjs +0 -2
  171. package/dist/collect-DAUItMDS.mjs +0 -2
  172. package/dist/config-DDIFxQYx.mjs +0 -2
  173. package/dist/config-uP7ZDtVZ.mjs +0 -21
  174. package/dist/deploy-CsjbRNyv.mjs +0 -2
  175. package/dist/discover-BBzDZe_o.mjs +0 -2
  176. package/dist/dist-D7-nEOXi.mjs +0 -2
  177. package/dist/gen-B87rlalt.mjs +0 -2
  178. package/dist/help-r_vrpH_d.mjs +0 -2
  179. package/dist/login-Bz0zEPoy.mjs +0 -2
  180. package/dist/migrate-BXY3B3m7.mjs +0 -2
  181. package/dist/prepare-D4CkM3_v.mjs +0 -2
  182. package/dist/provision-CNgEBkVA.mjs +0 -3
  183. package/dist/resolve-project-BTotl8Nn.mjs +0 -2
  184. package/dist/validate-DqJ33oHj.mjs +0 -2
@@ -1,14 +1,14 @@
1
- import { a as join, n as dirname } from "./dist-4WkAWhWx.mjs";
1
+ import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
2
2
  import { r as cliTitle } from "./output-CCH48AMM.mjs";
3
- import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CKQ-Q5JS.mjs";
4
- import { g as validateConfig } from "./config-Dxr6cTXn.mjs";
5
- import { B as seedCloudflareConfig, I as VOID_LOCK_FILE, V as stashCloudflareDeployPointer } from "./wrangler-D01qs6VB.mjs";
3
+ import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-GgcMozYz.mjs";
4
+ import { g as validateConfig } from "./config-CafTW6Cz.mjs";
5
+ import { B as seedCloudflareConfig, I as VOID_LOCK_FILE, V as stashCloudflareDeployPointer } from "./wrangler-BymcxrRa.mjs";
6
6
  import { O as intro, P as outro, j as log } from "./dist-Dn6nn2IU.mjs";
7
7
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
8
+ import { parseSync } from "vite";
8
9
  import { randomUUID } from "node:crypto";
9
10
  import { parse, parseTree } from "jsonc-parser";
10
11
  import { isDeepStrictEqual } from "node:util";
11
- import { parseExpressionAt } from "acorn";
12
12
  //#region src/cli/framework-config-migrate.ts
13
13
  const GENERATED_PATH = "./.void-wrangler.jsonc";
14
14
  const CONFIG_FILES = [
@@ -29,6 +29,34 @@ const CONFIG_FILES = [
29
29
  "nuxt.config.js",
30
30
  "nuxt.config.mts"
31
31
  ];
32
+ function parseSource(source, file) {
33
+ return parseSync(file, source).program;
34
+ }
35
+ function asNode(value) {
36
+ return value !== null && typeof value === "object" && typeof value.type === "string" ? value : void 0;
37
+ }
38
+ function walk(root) {
39
+ const result = [];
40
+ const pending = [root];
41
+ while (pending.length > 0) {
42
+ const node = pending.pop();
43
+ result.push(node);
44
+ for (const value of Object.values(node)) if (Array.isArray(value)) {
45
+ for (const child of value) if (child && typeof child === "object" && typeof child.type === "string") pending.push(child);
46
+ } else if (value && typeof value === "object" && typeof value.type === "string") pending.push(value);
47
+ }
48
+ return result;
49
+ }
50
+ function adapterImport(program, packageName, file) {
51
+ const imports = (program.body ?? []).filter((node) => node.type === "ImportDeclaration" && node.source?.value === packageName);
52
+ if (imports.length === 0) {
53
+ if (walk(program).some((node) => node.type === "CallExpression" && (node.callee?.name === "require" || node.callee?.type === "Import") && node.arguments?.[0]?.value === packageName)) throw new Error(`migrate: Update ${file} to pass ${GENERATED_PATH} to its Cloudflare adapter before removing the root Wrangler config.`);
54
+ return;
55
+ }
56
+ const defaultImport = imports[0]?.specifiers?.find((specifier) => specifier.type === "ImportDefaultSpecifier");
57
+ if (imports.length !== 1 || imports[0]?.specifiers?.length !== 1 || !defaultImport?.local?.name) throw new Error(`migrate: Update ${file} to pass ${GENERATED_PATH} to its Cloudflare adapter before removing the root Wrangler config.`);
58
+ return defaultImport.local.name;
59
+ }
32
60
  /** Find an adapter's explicit root Wrangler JSON file, including custom build filenames. */
33
61
  function discoverFrameworkWranglerFiles(root) {
34
62
  const names = /* @__PURE__ */ new Set();
@@ -37,9 +65,15 @@ function discoverFrameworkWranglerFiles(root) {
37
65
  if (!existsSync(path)) continue;
38
66
  const source = readFileSync(path, "utf8");
39
67
  if (!source.includes("@sveltejs/adapter-cloudflare") && !source.includes("@astrojs/cloudflare") && !source.includes("nitro-cloudflare-dev")) continue;
40
- for (const match of source.matchAll(/\b(?:configPath|config)\s*:\s*(['"])(?:\.\/)?(wrangler[A-Za-z0-9._-]*\.jsonc?)\1/g)) {
41
- const name = match[2];
42
- if (existsSync(join(root, name))) names.add(name);
68
+ const program = parseSource(source, file);
69
+ const hasAdapter = walk(program).some((node) => node.type === "ImportDeclaration" && (node.source?.value === "@sveltejs/adapter-cloudflare" || node.source?.value === "@astrojs/cloudflare"));
70
+ const hasNitro = walk(program).some((node) => node.type === "Literal" && node.value === "nitro-cloudflare-dev");
71
+ if (!hasAdapter && !hasNitro) continue;
72
+ for (const node of walk(program)) {
73
+ const value = asNode(node.value);
74
+ if (node.type !== "Property" || node.key?.name !== "configPath" && node.key?.name !== "config" || typeof value?.value !== "string") continue;
75
+ const name = value.value.replace(/^\.\//, "");
76
+ if (/^wrangler[A-Za-z0-9._-]*\.jsonc?$/.test(name) && existsSync(join(root, name))) names.add(name);
43
77
  }
44
78
  }
45
79
  return [...names];
@@ -66,17 +100,7 @@ function setPath(object, key, file, edits, legacyName) {
66
100
  else throw new Error(`migrate: Update ${file} to pass ${GENERATED_PATH} to its Cloudflare adapter before removing the root Wrangler config.`);
67
101
  }
68
102
  function patchAdapterCall(source, identifier, file, kind, legacyName) {
69
- const candidates = [...source.matchAll(new RegExp(`\\b${identifier}\\s*\\(`, "g"))];
70
- const calls = [];
71
- for (const candidate of candidates) try {
72
- const parsed = parseExpressionAt(source, candidate.index, {
73
- ecmaVersion: "latest",
74
- sourceType: "module"
75
- });
76
- const first = parsed.expressions?.[0];
77
- const node = parsed.type === "SequenceExpression" && source.slice(0, candidate.index).trimEnd().endsWith(":") && first?.type === "CallExpression" && /^\s*,/.test(source.slice(first.end)) ? first : parsed;
78
- if (node.type === "CallExpression" && node.callee?.name === identifier) calls.push(node);
79
- } catch {}
103
+ const calls = walk(parseSource(source, file)).filter((node) => node.type === "CallExpression" && node.callee?.name === identifier);
80
104
  if (calls.length !== 1) throw new Error(`migrate: Update ${file} to pass ${GENERATED_PATH} to its Cloudflare adapter before removing the root Wrangler config.`);
81
105
  const call = calls[0];
82
106
  const args = call.arguments ?? [];
@@ -109,31 +133,32 @@ function planFrameworkConfigMigration(root, legacyName) {
109
133
  if (!existsSync(path)) continue;
110
134
  const original = readFileSync(path, "utf8");
111
135
  let updated = original;
112
- const svelteImport = /import\s+(\w+)\s+from\s+['"]@sveltejs\/adapter-cloudflare['"]/.exec(original);
113
- if (svelteImport) {
114
- const identifier = svelteImport[1];
115
- updated = patchAdapterCall(updated, identifier, file, "svelte", legacyName);
116
- } else if (/(?:from\s*['"]|require\(\s*['"]|import\(\s*['"])@sveltejs\/adapter-cloudflare['"]/.test(original)) throw new Error(`migrate: Update ${file} to pass ${GENERATED_PATH} to its Cloudflare adapter before removing the root Wrangler config.`);
117
- const astroImport = /import\s+(\w+)\s+from\s+['"]@astrojs\/cloudflare['"]/.exec(original);
118
- if (astroImport) {
119
- const identifier = astroImport[1];
120
- updated = patchAdapterCall(updated, identifier, file, "astro", legacyName);
121
- } else if (/(?:from\s*['"]|require\(\s*['"]|import\(\s*['"])@astrojs\/cloudflare['"]/.test(original)) throw new Error(`migrate: Update ${file} to pass ${GENERATED_PATH} to its Cloudflare adapter before removing the root Wrangler config.`);
122
- if (original.includes("nitro-cloudflare-dev") && !original.includes("cloudflareDev:")) {
123
- const preset = /preset:\s*['"]cloudflare-module['"]\s*,/g;
124
- if ([...updated.matchAll(preset)].length !== 1) throw new Error(`migrate: Set nitro.cloudflareDev.configPath to ${GENERATED_PATH} in ${file} before removing the root Wrangler config.`);
125
- updated = updated.replace(preset, (match) => `${match}\n cloudflareDev: { configPath: '${GENERATED_PATH}' },`);
126
- } else if (original.includes("nitro-cloudflare-dev") && original.includes("cloudflareDev:") && !original.includes(`configPath: '${GENERATED_PATH}'`) && !original.includes(`configPath: "${GENERATED_PATH}"`)) {
127
- const rootPath = /configPath:\s*(['"])(?:\.\/)?([^'"]+)\1/g;
128
- const names = /* @__PURE__ */ new Set([
129
- "wrangler.jsonc",
130
- "wrangler.json",
131
- legacyName
132
- ]);
133
- const matches = [...updated.matchAll(rootPath)].filter((match) => names.has(match[2]));
134
- if (matches.length !== 1) throw new Error(`migrate: Set nitro.cloudflareDev.configPath to ${GENERATED_PATH} in ${file} before removing the root Wrangler config.`);
135
- const match = matches[0];
136
- updated = updated.slice(0, match.index) + `configPath: '${GENERATED_PATH}'` + updated.slice(match.index + match[0].length);
136
+ if (!original.includes("@sveltejs/adapter-cloudflare") && !original.includes("@astrojs/cloudflare") && !original.includes("nitro-cloudflare-dev")) continue;
137
+ const program = parseSource(original, file);
138
+ const svelteIdentifier = adapterImport(program, "@sveltejs/adapter-cloudflare", file);
139
+ if (svelteIdentifier) updated = patchAdapterCall(updated, svelteIdentifier, file, "svelte", legacyName);
140
+ const astroIdentifier = adapterImport(program, "@astrojs/cloudflare", file);
141
+ if (astroIdentifier) updated = patchAdapterCall(updated, astroIdentifier, file, "astro", legacyName);
142
+ const nitroConfigurations = walk(parseSource(updated, file)).filter((node) => {
143
+ const nitro = asNode(node.value);
144
+ if (node.type !== "Property" || node.key?.name !== "nitro" || nitro?.type !== "ObjectExpression") return false;
145
+ const modules = property(nitro, "modules");
146
+ return modules?.type === "ArrayExpression" && modules.elements?.some((entry) => entry?.value === "nitro-cloudflare-dev");
147
+ });
148
+ if (nitroConfigurations.length > 0) {
149
+ if (nitroConfigurations.length !== 1) throw new Error(`migrate: Set nitro.cloudflareDev.configPath to ${GENERATED_PATH} in ${file} before removing the root Wrangler config.`);
150
+ const nitro = asNode(nitroConfigurations[0].value);
151
+ if (property(nitro, "preset")?.value !== "cloudflare-module") throw new Error(`migrate: Set nitro.cloudflareDev.configPath to ${GENERATED_PATH} in ${file} before removing the root Wrangler config.`);
152
+ const dev = property(nitro, "cloudflareDev");
153
+ const edits = [];
154
+ if (!dev) edits.push({
155
+ start: nitro.start + 1,
156
+ end: nitro.start + 1,
157
+ text: `cloudflareDev: { configPath: '${GENERATED_PATH}' }, `
158
+ });
159
+ else if (dev.type === "ObjectExpression") setPath(dev, "configPath", file, edits, legacyName);
160
+ else throw new Error(`migrate: Set nitro.cloudflareDev.configPath to ${GENERATED_PATH} in ${file} before removing the root Wrangler config.`);
161
+ updated = edits.sort((a, b) => b.start - a.start).reduce((result, edit) => result.slice(0, edit.start) + edit.text + result.slice(edit.end), updated);
137
162
  }
138
163
  if (updated !== original) patches.push({
139
164
  file,
@@ -0,0 +1,2 @@
1
+ import { n as runMigrateCommand } from "./migrate-B8KuoYsO.mjs";
2
+ export { runMigrateCommand };
@@ -1,8 +1,8 @@
1
- import { a as join } from "./dist-4WkAWhWx.mjs";
2
- import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-uP7ZDtVZ.mjs";
3
- import { m as readConfig } from "./config-Dxr6cTXn.mjs";
4
- import { r as getMiniflareDatabasePath } from "./runner-BGVsGgkb.mjs";
5
- import { a as loadLocalEnv } from "./env-DX_v-Q-v.mjs";
1
+ import { a as join } from "./dist-BVqXeR_h.mjs";
2
+ import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-DPByhVck.mjs";
3
+ import { m as readConfig } from "./config-CafTW6Cz.mjs";
4
+ import { r as getMiniflareDatabasePath } from "./runner-p-dMs2UN.mjs";
5
+ import { a as loadLocalEnv } from "./env-_v349JBd.mjs";
6
6
  import { r as resolveVoidAuthMigrationSchema } from "./drizzle-Beb2Am5S.mjs";
7
7
  import { n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-9vif1uj8.mjs";
8
8
  //#region src/auth/node.ts
@@ -1,5 +1,5 @@
1
- import { S as writeKeyringPassword, b as deleteKeyringPassword, c as platformCredentialAccount, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl, x as readKeyringPassword } from "./platform-registry-BJbgZLS1.mjs";
2
- import { n as OperatorClient, r as OperatorClientError } from "./operator-client-A0iex2yi.mjs";
1
+ import { S as writeKeyringPassword, b as deleteKeyringPassword, c as platformCredentialAccount, o as listPlatformConnections, r as getActivePlatformConnection, s as normalizePlatformApiUrl, x as readKeyringPassword } from "./platform-registry-QBa4DK32.mjs";
2
+ import { n as OperatorClient, r as OperatorClientError } from "./operator-client-DUwumHpQ.mjs";
3
3
  /** Operator authority never comes from repository-controlled metadata. */
4
4
  function resolveOperatorOrigin(connection = "") {
5
5
  if (connection) {
@@ -1,6 +1,6 @@
1
1
  import { t as cfAccessHeaders } from "./cf-access-DRsQRe6k.mjs";
2
- import { s as normalizePlatformApiUrl } from "./platform-registry-BJbgZLS1.mjs";
3
- import { t as ensureCloudflaredToken } from "./cf-access-rAZxzMkL.mjs";
2
+ import { s as normalizePlatformApiUrl } from "./platform-registry-QBa4DK32.mjs";
3
+ import { t as ensureCloudflaredToken } from "./cf-access-P0iZnu0q.mjs";
4
4
  const OPERATOR_MAX_TIMEOUT_MS = 36e5;
5
5
  var OperatorClientError = class extends Error {
6
6
  code;
@@ -1,5 +1,5 @@
1
- import { n as OperatorClient, r as OperatorClientError } from "./operator-client-A0iex2yi.mjs";
2
- import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-BkVgJqv-.mjs";
1
+ import { n as OperatorClient, r as OperatorClientError } from "./operator-client-DUwumHpQ.mjs";
2
+ import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-8KnOVXVd.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { createInterface } from "node:readline/promises";
5
5
  import { setTimeout } from "node:timers/promises";
@@ -137,9 +137,9 @@ async function runAuth(origin, args) {
137
137
  if (args.action === "login" || args.action === "token" && args.tokenStdin) {
138
138
  if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
139
139
  const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
140
- const { discoverPlatform } = await import("./platform-cmd-Cl9Uhzru.mjs");
141
- const { selectPlatformLoginMethod } = await import("./login-Bz0zEPoy.mjs");
142
- const { runPlatformLogin } = await import("./auth-CAw7zHqj.mjs");
140
+ const { discoverPlatform } = await import("./platform-cmd-C8OqhqPt.mjs");
141
+ const { selectPlatformLoginMethod } = await import("./login-r2gL8l7B.mjs");
142
+ const { runPlatformLogin } = await import("./auth-CZuiVsFh.mjs");
143
143
  return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.providerExplicit ? args.provider : void 0)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
144
144
  })();
145
145
  const session = await exchangeOperatorSession(origin, apiToken);
@@ -279,7 +279,7 @@ async function followOperatorLogs(client, args, signal, pollIntervalMs = 2e3) {
279
279
  }
280
280
  async function runOperatorCommand(args) {
281
281
  if (!args.action) {
282
- const { printHelpPage } = await import("./help-r_vrpH_d.mjs");
282
+ const { printHelpPage } = await import("./help-DQMfeKMz.mjs");
283
283
  printHelpPage(["platform", args.group]);
284
284
  return;
285
285
  }
@@ -1,4 +1,4 @@
1
- import { a as join, n as dirname } from "./dist-4WkAWhWx.mjs";
1
+ import { a as join, n as dirname } from "./dist-BVqXeR_h.mjs";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  //#region src/shared/package-json.ts
4
4
  const DEFAULT_DEPENDENCY_FIELDS = ["dependencies", "devDependencies"];
@@ -1,5 +1,5 @@
1
1
  import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-Do8P4puT.mjs";
2
- import "../config-DywxBLQC.mjs";
2
+ import "../config-CF69HgXc.mjs";
3
3
  import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-BAp5AEBU.mjs";
4
4
  import { t as serializePageData } from "../serialize-CfSwWfF2.mjs";
5
5
  //#region src/project-paths.d.ts
@@ -1,8 +1,8 @@
1
- import { a as join } from "../dist-4WkAWhWx.mjs";
2
- import { r as resolvePagesDir } from "../project-paths-CKQ-Q5JS.mjs";
3
- import { m as readConfig } from "../config-Dxr6cTXn.mjs";
4
- import { i as parseRedirectsFile } from "../headers-B_HBMgi0.mjs";
5
- import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-DJbooZm2.mjs";
1
+ import { a as join } from "../dist-BVqXeR_h.mjs";
2
+ import { r as resolvePagesDir } from "../project-paths-GgcMozYz.mjs";
3
+ import { m as readConfig } from "../config-CafTW6Cz.mjs";
4
+ import { i as parseRedirectsFile } from "../headers-BOg_velo.mjs";
5
+ import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-4tfN-PSn.mjs";
6
6
  import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D_QRR5Yd.mjs";
7
7
  import { t as serializePageData } from "../serialize-BPvnNQuA.mjs";
8
8
  //#region src/pages/manifest.ts
@@ -53,7 +53,12 @@ function generateComponentManifest(scan, pagesDir) {
53
53
  return lines.join("\n");
54
54
  }
55
55
  function patternToRegex(pattern) {
56
- return `/^${pattern.replace(/:[^/{}]+\{\.\+\}/g, "(.+)").replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/, "(.*)").replace(/:[^/]+/g, "([^/]+)").replace(/\//g, "\\/")}$/`;
56
+ return `/^${pattern.split("/").map((segment) => {
57
+ if (segment === "*") return "(.*)";
58
+ if (/^:[^/{}]+\{\.\+\}$/.test(segment)) return "(.+)";
59
+ if (/^:[^/]+$/.test(segment)) return "([^/]+)";
60
+ return segment.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
61
+ }).join("/").replace(/\//g, "\\/")}$/`;
57
62
  }
58
63
  //#endregion
59
64
  //#region src/pages/static-data.ts
@@ -1,5 +1,274 @@
1
1
  import { o as PageScanResult } from "../types-BAp5AEBU.mjs";
2
2
  import { ResolvedConfig, ViteDevServer } from "vite";
3
+ //#region ../../node_modules/.pnpm/magic-string@1.3.1/node_modules/magic-string/dist/index.d.mts
4
+ //#region src/SourceMap.d.ts
5
+ interface SourceMapOptions {
6
+ /**
7
+ * Whether the mapping should be high-resolution:
8
+ * - `false` (default) - lo-res mappings. Only one mapping per line, plus any locations added
9
+ * with `s.addSourcemapLocation()`. Quicker to generate and less bulky, but devtools may only
10
+ * be able to identify the correct line, not the exact column.
11
+ * - `true` - hi-res mappings. Every single character gets a mapping, so devtools can always
12
+ * pinpoint the exact location of function calls and so on.
13
+ * - `"boundary"` - semi-hi-res mappings, segmented per word boundary instead of per character.
14
+ * Suitable for string semantics that are separated by words.
15
+ * - `"experimental-range"` - hi-res mappings that use range mappings
16
+ * (https://github.com/tc39/ecma426/blob/main/proposals/range-mappings.md), a source map
17
+ * extension that can map all positions in a range with fewer mappings than mapping every
18
+ * character individually. This requires support for range mappings in the source map
19
+ * consumer, and the feature is experimental.
20
+ *
21
+ * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
22
+ */
23
+ hires?: boolean | "boundary" | "experimental-range";
24
+ /**
25
+ * The filename where you plan to write the sourcemap.
26
+ */
27
+ file?: string;
28
+ /**
29
+ * The filename of the file containing the original source.
30
+ */
31
+ source?: string;
32
+ /**
33
+ * Whether to include the original content in the map's sourcesContent array.
34
+ */
35
+ includeContent?: boolean;
36
+ }
37
+ type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
38
+ type SourceMapRangeMappings = number[][];
39
+ interface DecodedSourceMap {
40
+ file?: string;
41
+ sources: string[];
42
+ sourcesContent?: Array<string | null>;
43
+ names: string[];
44
+ mappings: SourceMapSegment[][];
45
+ x_google_ignoreList?: number[];
46
+ debugId?: string;
47
+ rangeMappings?: SourceMapRangeMappings;
48
+ }
49
+ declare class SourceMap {
50
+ version: number;
51
+ file: string | undefined;
52
+ sources: string[];
53
+ sourcesContent: Array<string | null> | undefined;
54
+ names: string[];
55
+ mappings: string;
56
+ x_google_ignoreList: number[] | undefined;
57
+ debugId: string | undefined;
58
+ rangeMappings: string | undefined;
59
+ constructor(properties: DecodedSourceMap);
60
+ /**
61
+ * Returns the equivalent of `JSON.stringify(map)`
62
+ */
63
+ toString(): string;
64
+ /**
65
+ * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
66
+ * `generateMap(options?: SourceMapOptions): SourceMap;`
67
+ */
68
+ toUrl(): string;
69
+ }
70
+ //#endregion
71
+ //#region src/MagicString.d.ts
72
+ type ExclusionRange = [number, number];
73
+ interface MagicStringOptions {
74
+ filename?: string;
75
+ ignoreList?: boolean;
76
+ indentExclusionRanges?: ExclusionRange | ExclusionRange[];
77
+ offset?: number;
78
+ }
79
+ interface IndentOptions {
80
+ exclude?: ExclusionRange | ExclusionRange[];
81
+ indentStart?: boolean;
82
+ }
83
+ interface OverwriteOptions {
84
+ storeName?: boolean;
85
+ contentOnly?: boolean;
86
+ }
87
+ interface UpdateOptions {
88
+ storeName?: boolean;
89
+ overwrite?: boolean;
90
+ }
91
+ type ReplacementFunction = (substring: string, ...args: any[]) => string;
92
+ declare class MagicString {
93
+ original: string;
94
+ indentExclusionRanges: MagicStringOptions["indentExclusionRanges"];
95
+ offset: number;
96
+ constructor(string: string, options?: MagicStringOptions);
97
+ /**
98
+ * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
99
+ */
100
+ addSourcemapLocation(char: number): void;
101
+ /**
102
+ * Appends the specified content to the end of the string.
103
+ */
104
+ append(content: string): this;
105
+ /**
106
+ * Appends the specified content at the index in the original string.
107
+ * If a range *ending* with index is subsequently moved, the insert will be moved with it.
108
+ * See also `s.prependLeft(...)`.
109
+ */
110
+ appendLeft(index: number, content: string): this;
111
+ /**
112
+ * Appends the specified content at the index in the original string.
113
+ * If a range *starting* with index is subsequently moved, the insert will be moved with it.
114
+ * See also `s.prependRight(...)`.
115
+ */
116
+ appendRight(index: number, content: string): this;
117
+ /**
118
+ * Does what you'd expect.
119
+ */
120
+ clone(): this;
121
+ /**
122
+ * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
123
+ * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
124
+ */
125
+ generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
126
+ /**
127
+ * Generates a version 3 sourcemap.
128
+ */
129
+ generateMap(options?: SourceMapOptions): SourceMap;
130
+ getIndentString(): string;
131
+ /**
132
+ * Prefixes each line of the string with prefix.
133
+ * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
134
+ */
135
+ indent(options?: IndentOptions): this;
136
+ /**
137
+ * Prefixes each line of the string with prefix.
138
+ * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
139
+ *
140
+ * The options argument can have an exclude property, which is an array of [start, end] character ranges.
141
+ * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
142
+ */
143
+ indent(indentStr?: string, options?: IndentOptions): this;
144
+ /**
145
+ * Moves the characters from `start` and `end` to `index`.
146
+ */
147
+ move(start: number, end: number, index: number): this;
148
+ /**
149
+ * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
150
+ * that range. The same restrictions as `s.remove()` apply.
151
+ *
152
+ * The fourth argument is optional. It can have a storeName property - if true, the original name will be stored
153
+ * for later inclusion in a sourcemap's names array - and a contentOnly property which determines whether only
154
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
155
+ *
156
+ * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
157
+ */
158
+ overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): this;
159
+ /**
160
+ * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
161
+ *
162
+ * The fourth argument is optional. It can have a storeName property - if true, the original name will be stored
163
+ * for later inclusion in a sourcemap's names array - and an overwrite property which determines whether only
164
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
165
+ */
166
+ update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this;
167
+ /**
168
+ * Prepends the string with the specified content.
169
+ */
170
+ prepend(content: string): this;
171
+ /**
172
+ * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
173
+ */
174
+ prependLeft(index: number, content: string): this;
175
+ /**
176
+ * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
177
+ */
178
+ prependRight(index: number, content: string): this;
179
+ /**
180
+ * Removes the characters from `start` to `end` (of the original string, **not** the generated string).
181
+ * Removing the same content twice, or making removals that partially overlap, will cause an error.
182
+ */
183
+ remove(start: number, end: number): this;
184
+ /**
185
+ * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
186
+ */
187
+ reset(start: number, end: number): this;
188
+ lastChar(): string;
189
+ lastLine(): string;
190
+ /**
191
+ * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
192
+ * Throws error if the indices are for characters that were already removed.
193
+ */
194
+ slice(start?: number, end?: number): string;
195
+ /**
196
+ * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
197
+ */
198
+ snip(start: number, end: number): this;
199
+ /**
200
+ * Returns the generated string.
201
+ */
202
+ toString(): string;
203
+ /**
204
+ * Returns true if the resulting source is empty (disregarding white space).
205
+ */
206
+ isEmpty(): boolean;
207
+ length(): number;
208
+ /**
209
+ * Removes empty lines from the start and end.
210
+ */
211
+ trimLines(): this;
212
+ /**
213
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
214
+ */
215
+ trim(charType?: string): this;
216
+ /**
217
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
218
+ */
219
+ trimEnd(charType?: string): this;
220
+ /**
221
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
222
+ */
223
+ trimStart(charType?: string): this;
224
+ /**
225
+ * Indicates if the string has been changed.
226
+ */
227
+ hasChanged(): boolean;
228
+ /**
229
+ * String replacement with RegExp or string.
230
+ */
231
+ replace(searchValue: string | RegExp, replacement: string | ReplacementFunction): this;
232
+ /**
233
+ * Same as `s.replace`, but replace all matched strings instead of just one.
234
+ */
235
+ replaceAll(searchValue: string | RegExp, replacement: string | ReplacementFunction): this;
236
+ }
237
+ //#endregion
238
+ //#region src/pages/island-imports.d.ts
239
+ type IslandImportSource = {
240
+ start: number;
241
+ end: number;
242
+ importName: string;
243
+ specifierRaw: string;
244
+ specifier: string;
245
+ hydrate: string;
246
+ };
247
+ type IslandSourceEdit = {
248
+ start: number;
249
+ end: number;
250
+ text: string;
251
+ };
252
+ type StaticCssImport = {
253
+ statement: string;
254
+ specifier: string;
255
+ };
256
+ /** Collect stylesheet imports from authored modules without treating dynamic imports or text as dependencies. */
257
+ export declare function findStaticCssImports(code: string, filename: string): Array<StaticCssImport>;
258
+ export declare function editIslandSource(code: string, edits: ReadonlyArray<IslandSourceEdit>, options?: {
259
+ prepend?: string;
260
+ append?: string;
261
+ insert?: ReadonlyArray<{
262
+ offset: number;
263
+ text: string;
264
+ }>;
265
+ }): {
266
+ code: string;
267
+ map: ReturnType<MagicString["generateMap"]>;
268
+ };
269
+ /** Read island import attributes from JS/TS, or script blocks inside an SFC. */
270
+ export declare function findIslandImports(code: string, filename: string): Array<IslandImportSource>;
271
+ //#endregion
3
272
  //#region src/pages/islands-plugin.d.ts
4
273
  export declare const ISLANDS_RENDERER_ID = "virtual:void-islands-renderer";
5
274
  export declare const ISLANDS_CLIENT_ENTRY_ID = "virtual:void-islands-client";
@@ -36,4 +305,5 @@ export declare function computePagesNeedingClientJS(pageScan: PageScanResult, pa
36
305
  export declare function watchPagesForRescan(server: ViteDevServer, pagesDir: string, root: string, onRescan: (pageScan: PageScanResult) => void): {
37
306
  flush: () => Promise<void>;
38
307
  };
39
- //#endregion
308
+ //#endregion
309
+ export type { IslandSourceEdit };