void 0.7.12 → 0.8.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 (142) hide show
  1. package/AGENT_PROMPT.md +1 -1
  2. package/README.md +2 -2
  3. package/dist/{agents-DqkFfc2c.mjs → agents-Dkgafwfr.mjs} +1 -1
  4. package/dist/{auth-cmd-bS88H4Lb.mjs → auth-cmd-B1-7r6ng.mjs} +3 -3
  5. package/dist/{better-auth-shared-D2JaoCs4.mjs → better-auth-shared-CbAF6sOM.mjs} +1 -1
  6. package/dist/{better-auth-shared-HXlHRw02.d.mts → better-auth-shared-Fzyk5yS1.d.mts} +2 -7
  7. package/dist/{cache-DUDCNty6.mjs → cache-CGYC-2LW.mjs} +5 -5
  8. package/dist/{cancel-deploy-DOuSbPwX.mjs → cancel-deploy-B4j31z7d.mjs} +4 -4
  9. package/dist/canonical-json-CEyQaVDa.mjs +13 -0
  10. package/dist/cli/cli.mjs +44 -31
  11. package/dist/{client-C_DYiXeu.mjs → client-C-nH6yz3.mjs} +5 -5
  12. package/dist/{collect-HqAuilH6.mjs → collect-9rO3JFNM.mjs} +1 -1
  13. package/dist/{config-DyUSwbeX.mjs → config--wXmVOoe.mjs} +10 -8
  14. package/dist/{config-CeRQg3Lz.mjs → config-BVEC0lti.mjs} +11 -2
  15. package/dist/{config-CvHtTM0q.mjs → config-hhMYPVRT.mjs} +3 -12
  16. package/dist/{create-project-hvFe6rbI.mjs → create-project-BGnQMy5N.mjs} +44 -18
  17. package/dist/{db-YEYSTfGw.mjs → db-CT5Xg6ds.mjs} +42 -37
  18. package/dist/{delete-XyM_VD9o.mjs → delete-eMGTHHB9.mjs} +5 -5
  19. package/dist/{deploy-CPAEgVQm.mjs → deploy-7EA_lKq9.mjs} +169 -99
  20. package/dist/{discover-CKGQpis8.mjs → discover-C8N1I4tK.mjs} +9 -6
  21. package/dist/{domain-Dvj7u8tr.mjs → domain-UfLrp2vc.mjs} +64 -22
  22. package/dist/{drizzle-Cx7cVwrE.mjs → drizzle-DmaANP4-.mjs} +1 -1
  23. package/dist/{env-Bjl0rzuf.mjs → env-Cvdbbm_N.mjs} +7 -7
  24. package/dist/{env-helpers-Dw95CU8e.d.mts → env-helpers-Bt9yYg5I.d.mts} +1 -1
  25. package/dist/{env-types-BSQghXbx.mjs → env-types-D6qI1ThV.mjs} +8 -19
  26. package/dist/{env-validation-Buy5pe3u.mjs → env-validation-DBJsxZLz.mjs} +4 -4
  27. package/dist/{gen-DU8NIdrH.mjs → gen-Cn2hZ8RR.mjs} +37 -31
  28. package/dist/{handler-DJTuxB10.d.mts → handler-BPhL8AmU.d.mts} +3 -3
  29. package/dist/{headers-CuVHn6Kl.mjs → headers-wAPJigtE.mjs} +3 -3
  30. package/dist/index.d.mts +3 -3
  31. package/dist/index.mjs +273 -104
  32. package/dist/{init-iIiQWzyB.mjs → init-DL6syXuF.mjs} +124 -38
  33. package/dist/{link-DdXqlUiJ.mjs → link-C5x1E-XZ.mjs} +5 -5
  34. package/dist/{list-9Bxa5Odn.mjs → list-ezL7hqDV.mjs} +5 -5
  35. package/dist/{login-C_MfDjhu.mjs → login-CkLr-AaI.mjs} +3 -3
  36. package/dist/{logs-DjqCpEER.mjs → logs-MnGILmLz.mjs} +4 -4
  37. package/dist/{mcp-vA0880_K.mjs → mcp-B84MmVAW.mjs} +3 -3
  38. package/dist/{node-gxRQXIRT.mjs → node-fpywdcbN.mjs} +6 -6
  39. package/dist/{output-D3g5otMC.mjs → output-DeiS4oEX.mjs} +1 -1
  40. package/dist/pages/client.d.mts +1 -1
  41. package/dist/pages/head-client.d.mts +1 -1
  42. package/dist/pages/head.d.mts +1 -1
  43. package/dist/pages/index.d.mts +28 -3
  44. package/dist/pages/index.mjs +6 -5
  45. package/dist/pages/islands-plugin.d.mts +1 -1
  46. package/dist/pages/islands-plugin.mjs +15 -14
  47. package/dist/pages/protocol.d.mts +2 -2
  48. package/dist/pages/protocol.mjs +1 -1
  49. package/dist/{pathe.M-eThtNZ-D-kmWkCS.mjs → pathe.M-eThtNZ-BrPhGF_K.mjs} +1 -1
  50. package/dist/plan-aD3wRDqF.mjs +271 -0
  51. package/dist/{plugin-inference-BexV6LL3.mjs → plugin-inference-Ba1uGdIy.mjs} +26 -20
  52. package/dist/{prepare-BEkH89oX.mjs → prepare-BrAISonG.mjs} +29 -19
  53. package/dist/{preset-CYQh93UF.mjs → preset-BRsCi8ZB.mjs} +10 -8
  54. package/dist/{project-DhB4A8_g.mjs → project-CH9pdo16.mjs} +1 -1
  55. package/dist/{project-cmd-CeXO06hG.mjs → project-cmd-JQUzv3qF.mjs} +10 -10
  56. package/dist/project-paths-CCMrHYQm.mjs +100 -0
  57. package/dist/{project-slug-KRvHQEQI.mjs → project-slug-De4UjtD9.mjs} +0 -1
  58. package/dist/{project-tsconfig-Bfy55qvs.mjs → project-tsconfig-HAGjfY6w.mjs} +10 -5
  59. package/dist/{protocol-D7r_deVZ.d.mts → protocol-mcSsdMij.d.mts} +3 -3
  60. package/dist/providers--_pvxpNN.d.mts +7 -0
  61. package/dist/{resolve-project-DdjLQ2tB.mjs → resolve-project-CNpUbUHd.mjs} +1 -1
  62. package/dist/{rollback-C8OSMxmq.mjs → rollback-CoAAvC18.mjs} +4 -4
  63. package/dist/{route-types-qVL-v-CB.mjs → route-types-jxRfWuCb.mjs} +1 -1
  64. package/dist/{runner-C0d3lJo1.mjs → runner-BkGBfr4e.mjs} +4 -2
  65. package/dist/{runner-pg-Bd_172vF.mjs → runner-pg-BXP0JpHW.mjs} +1 -1
  66. package/dist/runtime/ai.mjs +2 -2
  67. package/dist/runtime/auth.d.mts +1 -1
  68. package/dist/runtime/better-auth-pg.d.mts +1 -1
  69. package/dist/runtime/better-auth-pg.mjs +2 -2
  70. package/dist/runtime/better-auth.d.mts +1 -1
  71. package/dist/runtime/better-auth.mjs +2 -2
  72. package/dist/runtime/client.d.mts +2 -2
  73. package/dist/runtime/client.mjs +1 -1
  74. package/dist/runtime/env-helpers.d.mts +1 -1
  75. package/dist/runtime/env-public-client.d.mts +1 -1
  76. package/dist/runtime/env-public.d.mts +2 -2
  77. package/dist/runtime/env-public.mjs +1 -1
  78. package/dist/runtime/env.mjs +1 -1
  79. package/dist/runtime/fetch-stream.d.mts +1 -1
  80. package/dist/runtime/fetch-stream.mjs +1 -1
  81. package/dist/runtime/fetch.d.mts +1 -1
  82. package/dist/runtime/fetch.mjs +1 -1
  83. package/dist/runtime/handler.d.mts +1 -1
  84. package/dist/runtime/handler.mjs +1 -1
  85. package/dist/runtime/isr.mjs +1 -1
  86. package/dist/runtime/live.d.mts +2 -2
  87. package/dist/runtime/live.mjs +1 -1
  88. package/dist/runtime/migration-handler.d.mts +33 -1
  89. package/dist/runtime/migration-handler.mjs +398 -23
  90. package/dist/runtime/remote/index.mjs +1 -1
  91. package/dist/runtime/sandbox.d.mts +73 -3
  92. package/dist/runtime/sandbox.mjs +239 -3
  93. package/dist/runtime/validator.d.mts +1 -1
  94. package/dist/runtime/ws-server.d.mts +2 -2
  95. package/dist/runtime/ws.d.mts +3 -3
  96. package/dist/{scan-CKpylFj9.mjs → scan-2YmJkYAf.mjs} +4 -3
  97. package/dist/{scan-CkK1Hzpa.mjs → scan-DzzHqtiT.mjs} +82 -43
  98. package/dist/{secret-NDvlqAN2.mjs → secret-mz8t_CML.mjs} +5 -5
  99. package/dist/{skills-SAG0WyVn.mjs → skills-B_ynF4lA.mjs} +3 -3
  100. package/dist/{subcommand-prompt-q9T06dpg.mjs → subcommand-prompt-CPuV7tPW.mjs} +2 -2
  101. package/dist/sveltekit.mjs +1 -1
  102. package/dist/{validate-DW3ViKTA.mjs → validate-CNWm-PsL.mjs} +49 -9
  103. package/dist/{yarn-pnp-6LD6_3Ej.mjs → yarn-pnp-QgEYVC3V.mjs} +1 -1
  104. package/getting-started-prompt.txt +2 -2
  105. package/package.json +3 -2
  106. package/schema.json +5 -0
  107. package/skills/void/SKILL.md +1 -1
  108. package/skills/void/docs/guide/ai.md +1 -1
  109. package/skills/void/docs/guide/app-types.md +1 -1
  110. package/skills/void/docs/guide/database/postgresql.md +1 -1
  111. package/skills/void/docs/guide/edge/headers.md +1 -1
  112. package/skills/void/docs/guide/edge/static-assets.md +34 -0
  113. package/skills/void/docs/guide/pages-routing/overview.md +1 -1
  114. package/skills/void/docs/guide/quickstart.md +2 -2
  115. package/skills/void/docs/guide/sandboxes.md +3 -2
  116. package/skills/void/docs/guide/ssr.md +25 -2
  117. package/skills/void/docs/integrations/cloudflare.md +5 -3
  118. package/skills/void/docs/integrations/frameworks/overview.md +1 -1
  119. package/skills/void/docs/integrations/nodejs-bun-deno.md +10 -9
  120. package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +1 -1
  121. package/skills/void/docs/node_modules/void/README.md +2 -2
  122. package/skills/void/docs/node_modules/void/skills/void/SKILL.md +1 -1
  123. package/skills/void/docs/reference/api.md +204 -13
  124. package/skills/void/docs/reference/cli.md +55 -7
  125. package/skills/void/docs/reference/config.md +27 -4
  126. package/skills/void/docs/reference/resource-inference.md +1 -1
  127. /package/dist/{auth-DmuALf16.d.mts → auth-SfRBhXan.d.mts} +0 -0
  128. /package/dist/{auth-migrations-BwLPwRgH.mjs → auth-migrations-BqJoGqGQ.mjs} +0 -0
  129. /package/dist/{cf-access-BW8K93Fm.mjs → cf-access-DKDsgwOU.mjs} +0 -0
  130. /package/dist/{defer-2ARBu8Et.mjs → defer-DkoEwda-.mjs} +0 -0
  131. /package/dist/{dist-q8b2Mjgb.mjs → dist-DR9sIMbM.mjs} +0 -0
  132. /package/dist/{dist-D2L3_KTK.mjs → dist-abzUneor.mjs} +0 -0
  133. /package/dist/{dotenv-HQNhRalS.mjs → dotenv-Bkoqyq9r.mjs} +0 -0
  134. /package/dist/{env-raw-DtfQ9E31.mjs → env-raw-zk5JQKZe.mjs} +0 -0
  135. /package/dist/{fetch-error-DZ868Xq4.d.mts → fetch-error-BbixZ9vW.d.mts} +0 -0
  136. /package/dist/{fetch-error-CEr0ACTl.mjs → fetch-error-rXermVU3.mjs} +0 -0
  137. /package/dist/{head-C7QW7UY1.d.mts → head-CZs8dMxG.d.mts} +0 -0
  138. /package/dist/{log-7ChR5Fbc.mjs → log-CWWZV4V1.mjs} +0 -0
  139. /package/dist/{magic-string.es-DS_lmuBe.mjs → magic-string.es-C1Fb0uxq.mjs} +0 -0
  140. /package/dist/{providers-BlFNPYen.mjs → providers-uC0PJg1c.mjs} +0 -0
  141. /package/dist/{standard-schema-D2qvCEYV.d.mts → standard-schema-WhHcCaqJ.d.mts} +0 -0
  142. /package/dist/{types-DG_Ynnyd.d.mts → types-C8wsi1hv.d.mts} +0 -0
@@ -1,4 +1,4 @@
1
- import { a as isVoidSocialAuthProvider } from "./providers-BlFNPYen.mjs";
1
+ import { a as isVoidSocialAuthProvider } from "./providers-uC0PJg1c.mjs";
2
2
  import { getAuthTables, getSchema } from "better-auth/db";
3
3
  //#region src/auth/drizzle.ts
4
4
  const DEFAULT_TABLE_ORDER = Number.MAX_SAFE_INTEGER;
@@ -1,10 +1,10 @@
1
- import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { n as cliTitle } from "./output-D3g5otMC.mjs";
3
- import { c as getToken, n as PlatformClient } from "./client-C_DYiXeu.mjs";
4
- import { c as R, g as ge, u as Se, y as ye } from "./dist-D2L3_KTK.mjs";
5
- import { r as readProjectConfig } from "./project-DhB4A8_g.mjs";
6
- import { n as generateEnvTypes, t as findEnvFile } from "./env-types-BSQghXbx.mjs";
7
- import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-Buy5pe3u.mjs";
1
+ import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
+ import { n as cliTitle } from "./output-DeiS4oEX.mjs";
3
+ import { c as getToken, n as PlatformClient } from "./client-C-nH6yz3.mjs";
4
+ import { c as R, g as ge, u as Se, y as ye } from "./dist-abzUneor.mjs";
5
+ import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
6
+ import { r as generateEnvTypes, t as findEnvFile } from "./env-types-D6qI1ThV.mjs";
7
+ import { a as loadUserEnvFile, i as validateProdEnv, n as formatEnvReport, t as fetchRemoteSecretNames } from "./env-validation-DBJsxZLz.mjs";
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
9
9
  //#region src/cli/env-example.ts
10
10
  /**
@@ -1,4 +1,4 @@
1
- import { t as StandardSchemaV1 } from "./standard-schema-D2qvCEYV.mjs";
1
+ import { t as StandardSchemaV1 } from "./standard-schema-WhHcCaqJ.mjs";
2
2
 
3
3
  //#region src/shared/env-mask.d.ts
4
4
  /** Per-key override set by `.secret()` / `.public()` on built-in helpers. */
@@ -1,28 +1,17 @@
1
- import { a as join, o as relative } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { i as voidWarn } from "./log-7ChR5Fbc.mjs";
1
+ import { s as relative } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
3
+ import { i as voidWarn } from "./log-CWWZV4V1.mjs";
3
4
  import { existsSync } from "node:fs";
4
5
  //#region src/codegen/env-types.ts
5
- /** Possible source locations for the user env schema, in priority order.
6
- * Root-level files win over `src/`-nested ones. */
7
- const ENV_FILE_CANDIDATES = [
8
- "env.ts",
9
- "env.mts",
10
- "env.js",
11
- "env.mjs",
12
- "src/env.ts",
13
- "src/env.mts",
14
- "src/env.js",
15
- "src/env.mjs"
16
- ];
17
6
  /** Roots already warned about duplicate env.ts files — dedupes noisy repeat calls. */
18
7
  const warnedRoots = /* @__PURE__ */ new Set();
19
8
  /** Find the user's env schema file, if any. Warns once per root when multiple candidates exist. */
20
9
  function findEnvFile(root) {
10
+ return findEnvFileForPaths(root, readProjectPaths(root));
11
+ }
12
+ function findEnvFileForPaths(root, paths) {
21
13
  const matches = [];
22
- for (const candidate of ENV_FILE_CANDIDATES) {
23
- const abs = join(root, candidate);
24
- if (existsSync(abs)) matches.push(abs);
25
- }
14
+ for (const absPath of paths.envFileCandidates) if (existsSync(absPath)) matches.push(absPath);
26
15
  if (matches.length > 1 && !warnedRoots.has(root)) {
27
16
  warnedRoots.add(root);
28
17
  const rel = matches.map((m) => relative(root, m));
@@ -61,4 +50,4 @@ function generateEnvTypes(envFileAbs, outDir) {
61
50
  return { dts: lines.join("\n") };
62
51
  }
63
52
  //#endregion
64
- export { generateEnvTypes as n, findEnvFile as t };
53
+ export { findEnvFileForPaths as n, generateEnvTypes as r, findEnvFile as t };
@@ -1,7 +1,7 @@
1
- import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { i as voidWarn } from "./log-7ChR5Fbc.mjs";
3
- import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-HQNhRalS.mjs";
4
- import { t as findEnvFile } from "./env-types-BSQghXbx.mjs";
1
+ import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
+ import { i as voidWarn } from "./log-CWWZV4V1.mjs";
3
+ import { n as mergeAndExpand, r as parseDotenvFile } from "./dotenv-Bkoqyq9r.mjs";
4
+ import { t as findEnvFile } from "./env-types-D6qI1ThV.mjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
  //#region src/host/load-user-env.ts
7
7
  /**
@@ -1,12 +1,13 @@
1
- import { a as join, n as dirname, o as relative } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { n as cliTitle } from "./output-D3g5otMC.mjs";
3
- import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-D2L3_KTK.mjs";
4
- import { c as getDatabaseDialect, f as readConfig } from "./config-CeRQg3Lz.mjs";
5
- import { n as ensureProjectTsconfig } from "./project-tsconfig-Bfy55qvs.mjs";
6
- import { n as writeDrizzleConfig } from "./config-DyUSwbeX.mjs";
7
- import { r as readJournal, t as collectMigrations } from "./collect-HqAuilH6.mjs";
8
- import { n as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-DW3ViKTA.mjs";
9
- import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-6LD6_3Ej.mjs";
1
+ import { a as join, n as dirname, s as relative } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
+ import { n as cliTitle } from "./output-DeiS4oEX.mjs";
3
+ import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
4
+ import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-abzUneor.mjs";
5
+ import { c as getDatabaseDialect, f as readConfig } from "./config-BVEC0lti.mjs";
6
+ import { n as ensureProjectTsconfig } from "./project-tsconfig-HAGjfY6w.mjs";
7
+ import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
8
+ import { r as readJournal, t as collectMigrations } from "./collect-9rO3JFNM.mjs";
9
+ import { n as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-CNWm-PsL.mjs";
10
+ import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-QgEYVC3V.mjs";
10
11
  import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
11
12
  import { fileURLToPath } from "node:url";
12
13
  import { spawnSync } from "node:child_process";
@@ -348,8 +349,9 @@ export const GET = defineHandler.withValidator({
348
349
  async function runModel(root, name, columns) {
349
350
  const validator = await resolveValidator(root);
350
351
  const dialect = getDatabaseDialect(readConfig(root));
351
- const schemaDir = join(root, "db", "schema");
352
- const barrelPath = join(root, "db", "schema.ts");
352
+ const paths = readProjectPaths(root);
353
+ const schemaDir = paths.schemaDir;
354
+ const barrelPath = paths.schemaFile;
353
355
  const modelPath = join(schemaDir, `${name}.ts`);
354
356
  let content;
355
357
  if (dialect === "postgresql") {
@@ -395,15 +397,15 @@ async function runModel(root, name, columns) {
395
397
  const existing = readFileSync(barrelPath, "utf-8");
396
398
  if (!existing.includes(exportLine)) writeFileSync(barrelPath, existing.trimEnd() + "\n" + exportLine + "\n");
397
399
  } else writeFileSync(barrelPath, exportLine + "\n");
398
- ensureProjectTsconfig(root, void 0, true, true);
400
+ ensureProjectTsconfig(root, void 0, true, true, { paths });
399
401
  R.success(`Created ${relative(root, modelPath)}`);
400
402
  R.success(`Updated ${relative(root, barrelPath)}`);
401
- writeIfNotExists(join(root, "routes", "api", name, "index.ts"), generateIndexRoute(name, columns, validator));
402
- writeIfNotExists(join(root, "routes", "api", name, "[id].ts"), generateIdRoute(name, validator));
403
+ writeIfNotExists(join(paths.routesDir, "api", name, "index.ts"), generateIndexRoute(name, columns, validator));
404
+ writeIfNotExists(join(paths.routesDir, "api", name, "[id].ts"), generateIdRoute(name, validator));
403
405
  ye("Model scaffolding complete. Run `void db push` to apply.");
404
406
  }
405
407
  function runMigration(root, name) {
406
- const migrationsDir = join(root, "db", "migrations");
408
+ const migrationsDir = readProjectPaths(root).migrationsDir;
407
409
  mkdirSync(migrationsDir, { recursive: true });
408
410
  const currentMigrations = collectMigrations(migrationsDir);
409
411
  try {
@@ -498,7 +500,7 @@ function runMigration(root, name) {
498
500
  ye("Migration created.");
499
501
  }
500
502
  function runRoute(root, routePath, methods) {
501
- writeIfNotExists(join(root, "routes", routePath + ".ts"), `import { defineHandler } from "void";
503
+ writeIfNotExists(join(readProjectPaths(root).routesDir, routePath + ".ts"), `import { defineHandler } from "void";
502
504
 
503
505
  ${methods.map((m) => {
504
506
  const upper = m.toUpperCase();
@@ -510,7 +512,7 @@ ${methods.map((m) => {
510
512
  ye("Route created.");
511
513
  }
512
514
  function runMiddleware(root, name) {
513
- const middlewareDir = join(root, "middleware");
515
+ const middlewareDir = readProjectPaths(root).middlewareDir;
514
516
  mkdirSync(middlewareDir, { recursive: true });
515
517
  writeIfNotExists(join(middlewareDir, `${getNextMiddlewareNumber(middlewareDir)}.${name}.ts`), `import { defineMiddleware } from "void";
516
518
 
@@ -522,7 +524,7 @@ export default defineMiddleware(async (c, next) => {
522
524
  ye("Middleware created.");
523
525
  }
524
526
  function runCron(root, name) {
525
- writeIfNotExists(join(root, "crons", name + ".ts"), `import { defineScheduled } from "void";
527
+ writeIfNotExists(join(readProjectPaths(root).cronsDir, name + ".ts"), `import { defineScheduled } from "void";
526
528
 
527
529
  export const cron = "* * * * *";
528
530
 
@@ -533,7 +535,7 @@ export default defineScheduled(async (controller, env) => {
533
535
  ye("Cron job created.");
534
536
  }
535
537
  function runQueue(root, name) {
536
- writeIfNotExists(join(root, "queues", name + ".ts"), `import { defineQueue } from "void";
538
+ writeIfNotExists(join(readProjectPaths(root).queuesDir, name + ".ts"), `import { defineQueue } from "void";
537
539
 
538
540
  type Message = {};
539
541
 
@@ -575,7 +577,8 @@ function detectFramework(root) {
575
577
  process.exit(1);
576
578
  }
577
579
  function writeReactSsr(root) {
578
- writeIfNotExists(join(root, "src/main.ssr.tsx"), `import { renderToString } from "react-dom/server";
580
+ const ssrDir = readProjectPaths(root).ssrDir;
581
+ writeIfNotExists(join(ssrDir, "main.ssr.tsx"), `import { renderToString } from "react-dom/server";
579
582
  import { defineRender } from "void";
580
583
  import App from "./App";
581
584
 
@@ -600,12 +603,12 @@ export default defineRender(async (c, assetTags) => {
600
603
  });
601
604
  });
602
605
  `);
603
- writeIfNotExists(join(root, "src/main.client.tsx"), `import { hydrateRoot } from "react-dom/client";
606
+ writeIfNotExists(join(ssrDir, "main.client.tsx"), `import { hydrateRoot } from "react-dom/client";
604
607
  import App from "./App";
605
608
 
606
609
  hydrateRoot(document.getElementById("root")!, <App />);
607
610
  `);
608
- writeIfNotExists(join(root, "src/App.tsx"), `import { useState } from "react";
611
+ writeIfNotExists(join(ssrDir, "App.tsx"), `import { useState } from "react";
609
612
 
610
613
  export default function App() {
611
614
  const [count, setCount] = useState(0);
@@ -622,7 +625,8 @@ export default function App() {
622
625
  `);
623
626
  }
624
627
  function writeVueSsr(root) {
625
- writeIfNotExists(join(root, "src/main.ssr.ts"), `import { createSSRApp } from "vue";
628
+ const ssrDir = readProjectPaths(root).ssrDir;
629
+ writeIfNotExists(join(ssrDir, "main.ssr.ts"), `import { createSSRApp } from "vue";
626
630
  import { renderToString } from "vue/server-renderer";
627
631
  import { defineRender } from "void";
628
632
  import App from "./App.vue";
@@ -649,13 +653,13 @@ export default defineRender(async (c, assetTags) => {
649
653
  });
650
654
  });
651
655
  `);
652
- writeIfNotExists(join(root, "src/main.client.ts"), `import { createSSRApp } from "vue";
656
+ writeIfNotExists(join(ssrDir, "main.client.ts"), `import { createSSRApp } from "vue";
653
657
  import App from "./App.vue";
654
658
 
655
659
  const app = createSSRApp(App);
656
660
  app.mount("#app");
657
661
  `);
658
- writeIfNotExists(join(root, "src/App.vue"), `<script setup lang="ts">
662
+ writeIfNotExists(join(ssrDir, "App.vue"), `<script setup lang="ts">
659
663
  import { ref } from "vue";
660
664
 
661
665
  const count = ref(0);
@@ -670,7 +674,8 @@ const count = ref(0);
670
674
  `);
671
675
  }
672
676
  function writeSvelteSsr(root) {
673
- writeIfNotExists(join(root, "src/main.ssr.ts"), `import { render } from "svelte/server";
677
+ const ssrDir = readProjectPaths(root).ssrDir;
678
+ writeIfNotExists(join(ssrDir, "main.ssr.ts"), `import { render } from "svelte/server";
674
679
  import { defineRender } from "void";
675
680
  import App from "./App.svelte";
676
681
 
@@ -695,12 +700,12 @@ export default defineRender(async (c, assetTags) => {
695
700
  });
696
701
  });
697
702
  `);
698
- writeIfNotExists(join(root, "src/main.client.ts"), `import { hydrate } from "svelte";
703
+ writeIfNotExists(join(ssrDir, "main.client.ts"), `import { hydrate } from "svelte";
699
704
  import App from "./App.svelte";
700
705
 
701
706
  hydrate(App, { target: document.getElementById("app")! });
702
707
  `);
703
- writeIfNotExists(join(root, "src/App.svelte"), `<script>
708
+ writeIfNotExists(join(ssrDir, "App.svelte"), `<script>
704
709
  let count = $state(0);
705
710
  <\/script>
706
711
 
@@ -711,7 +716,8 @@ hydrate(App, { target: document.getElementById("app")! });
711
716
  `);
712
717
  }
713
718
  function writeSolidSsr(root) {
714
- writeIfNotExists(join(root, "src/main.ssr.tsx"), `import { renderToString } from "solid-js/web";
719
+ const ssrDir = readProjectPaths(root).ssrDir;
720
+ writeIfNotExists(join(ssrDir, "main.ssr.tsx"), `import { renderToString } from "solid-js/web";
715
721
  import { defineRender } from "void";
716
722
  import App from "./App";
717
723
 
@@ -736,12 +742,12 @@ export default defineRender(async (c, assetTags) => {
736
742
  });
737
743
  });
738
744
  `);
739
- writeIfNotExists(join(root, "src/main.client.tsx"), `import { hydrate } from "solid-js/web";
745
+ writeIfNotExists(join(ssrDir, "main.client.tsx"), `import { hydrate } from "solid-js/web";
740
746
  import App from "./App";
741
747
 
742
748
  hydrate(() => <App />, document.getElementById("app")!);
743
749
  `);
744
- writeIfNotExists(join(root, "src/App.tsx"), `import { createSignal } from "solid-js";
750
+ writeIfNotExists(join(ssrDir, "App.tsx"), `import { createSignal } from "solid-js";
745
751
 
746
752
  export default function App() {
747
753
  const [count, setCount] = createSignal(0);
@@ -1,6 +1,6 @@
1
- import { n as HeadDescriptor } from "./head-C7QW7UY1.mjs";
2
- import { r as AuthUser, t as AuthSession } from "./auth-DmuALf16.mjs";
3
- import { t as StandardSchemaV1 } from "./standard-schema-D2qvCEYV.mjs";
1
+ import { n as HeadDescriptor } from "./head-CZs8dMxG.mjs";
2
+ import { r as AuthUser, t as AuthSession } from "./auth-SfRBhXan.mjs";
3
+ import { t as StandardSchemaV1 } from "./standard-schema-WhHcCaqJ.mjs";
4
4
  import * as _$_cloudflare_sandbox0 from "@cloudflare/sandbox";
5
5
  import { Context, Env, MiddlewareHandler } from "hono";
6
6
  import { RewriteDestination } from "void/routes";
@@ -1,6 +1,6 @@
1
- import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
- import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-CeRQg3Lz.mjs";
3
- import { i as voidWarn } from "./log-7ChR5Fbc.mjs";
1
+ import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
+ import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-BVEC0lti.mjs";
3
+ import { i as voidWarn } from "./log-CWWZV4V1.mjs";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  //#region src/cli/headers.ts
6
6
  /**
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { n as HeadDescriptor } from "./head-C7QW7UY1.mjs";
2
- import { r as AuthUser } from "./auth-DmuALf16.mjs";
3
- import { C as HandlerInput, _ as defineScheduled, a as QueueBatch, b as InferProps, c as RenderAssetTags, d as VoidAssetRewriteError, f as defineHandler, g as defineRender, h as defineQueue, i as CloudEnv, l as TypedHandler, m as defineMiddleware, n as CloudContext, o as QueueMessage, p as defineHead, r as CloudContextVariables, s as QueueRetryOptions, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer, y as DeferredState } from "./handler-DJTuxB10.mjs";
1
+ import { n as HeadDescriptor } from "./head-CZs8dMxG.mjs";
2
+ import { r as AuthUser } from "./auth-SfRBhXan.mjs";
3
+ import { C as HandlerInput, _ as defineScheduled, a as QueueBatch, b as InferProps, c as RenderAssetTags, d as VoidAssetRewriteError, f as defineHandler, g as defineRender, h as defineQueue, i as CloudEnv, l as TypedHandler, m as defineMiddleware, n as CloudContext, o as QueueMessage, p as defineHead, r as CloudContextVariables, s as QueueRetryOptions, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer, y as DeferredState } from "./handler-BPhL8AmU.mjs";
4
4
  import { QueueMap } from "./runtime/queues.mjs";
5
5
  import { PluginConfig } from "@cloudflare/vite-plugin";
6
6
  import { Plugin } from "vite";