@voltro/cli 0.52.0 → 0.54.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 (244) hide show
  1. package/CHANGELOG.md +424 -0
  2. package/THIRD-PARTY-NOTICES.md +8311 -3318
  3. package/dist/{agentsMd-0l980yhL.js → agentsMd-BaLC10Na.js} +110 -82
  4. package/dist/agentsMd-DCY1RSs8.js +2 -0
  5. package/dist/apiBuild-CeUN55uk.js +2 -0
  6. package/dist/{apiBuild-CSFI8QGq.js → apiBuild-DTWp0S_q.js} +11 -5
  7. package/dist/bin.js +1 -1
  8. package/dist/build-D4ygSbnV.js +843 -0
  9. package/dist/{checkCommand-COmqc2cB.js → checkCommand-Dg1G7Gwd.js} +6 -6
  10. package/dist/{checkCommand-2SbqzukH.js → checkCommand-L7DTlpIF.js} +1 -1
  11. package/dist/{cloudCmd-QUXh-b5w.js → cloudCmd-DzKcSYuy.js} +1 -1
  12. package/dist/{codegen-VF479Cnb.js → codegen-DSLM8Su9.js} +1 -1
  13. package/dist/codegen-DjgxEOnD.js +2 -0
  14. package/dist/codegenCommand-CG_Vx4lc.js +41 -0
  15. package/dist/{codemodRunner-r7J9lIa7.js → codemodRunner-Cd4xkC6u.js} +109 -11
  16. package/dist/{commands-Cc_nV8WI.js → commands-6Kzi92Np.js} +96 -73
  17. package/dist/{dashboardCommand-C-gKvwqh.js → dashboardCommand-Cq1PWvI1.js} +5 -5
  18. package/dist/{dataCommand-BgpBHnlB.js → dataCommand-DYzW8vkv.js} +3 -3
  19. package/dist/{dbCommand-sHedr-NJ.js → dbCommand-B4NWZtGL.js} +278 -237
  20. package/dist/dbCommand-CSFWs9ev.js +2 -0
  21. package/dist/{dev-CRHoCEiy.js → dev-CmuvUKRq.js} +2903 -2306
  22. package/dist/{dev--A3nsxA3.js → dev-cKUiZZsB.js} +1 -1
  23. package/dist/{doctorCommand-DtfJ3FA6.js → doctorCommand-DCiFVMtZ.js} +101 -69
  24. package/dist/doctorCommand-J3qu4E0Y.js +2 -0
  25. package/dist/{dormancyCommand-Drn7o0No.js → dormancyCommand-w1TrmgYP.js} +1 -1
  26. package/dist/{embeddingsCommand-Z-jO1fWN.js → embeddingsCommand-CMgPyRTr.js} +1 -1
  27. package/dist/{envCommand-D4gCrrTZ.js → envCommand-Cyynmcfa.js} +8 -8
  28. package/dist/{evolveCommand-CMROeKeA.js → evolveCommand-BwvQ8dVH.js} +2 -2
  29. package/dist/fileConventions-l-RIXbx8.js +36 -0
  30. package/dist/{fileTaxonomy-DvDUV9wq.js → fileTaxonomy-CbyMQYx_.js} +42 -42
  31. package/dist/fontPipeline-LxIHa1vo.js +2 -0
  32. package/dist/fontPipeline-Tsh8kZfA.js +152 -0
  33. package/dist/{frameworkTableAssembly-w-XnLa3q.js → frameworkTableAssembly-D7LJuALW.js} +5 -5
  34. package/dist/frameworkTableAssembly-IPD1pUnZ.js +2 -0
  35. package/dist/imagePipeline-B_GVJgm6.js +2 -0
  36. package/dist/imagePipeline-CBZmjT4i.js +127 -0
  37. package/dist/index.js +2 -2
  38. package/dist/{infoCommand-DXM868o_.js → infoCommand-DlYlUPqs.js} +1 -1
  39. package/dist/{inspect-CtL_xTbu.js → inspect-Bd8-9wsi.js} +1 -1
  40. package/dist/inspect-CuoDInfZ.js +2 -0
  41. package/dist/{inspectGateHint-BjnFubmH.js → inspectGateHint-4LxkNtrz.js} +1 -1
  42. package/dist/manifestBuild-C4-J1-m_.js +2 -0
  43. package/dist/{manifestBuild-CuU1VrSm.js → manifestBuild-Cqgsx2bM.js} +1 -1
  44. package/dist/{metaCommands-C6RFmF1r.js → metaCommands-x7RCi2AF.js} +9 -3
  45. package/dist/{migrate-D0F-eTlK.js → migrate-BK_Bbx-_.js} +2 -2
  46. package/dist/mobileCommand-D9O6iq3D.js +428 -0
  47. package/dist/mobileCommand-DAum7tsG.js +2 -0
  48. package/dist/{pageConvention-CzUiSbtU.js → pageConvention-CMpfDN6r.js} +1 -1
  49. package/dist/{privacyCommand-DGdopOI6.js → privacyCommand-BCa2OoZG.js} +1 -1
  50. package/dist/{probeCommand-C9gazU0H.js → probeCommand-_C0YU207.js} +83 -24
  51. package/dist/{projectScaffold-EzlErR4E.js → projectScaffold-CJfP-xbT.js} +1 -1
  52. package/dist/{projectScaffold-B4dmTlwT.js → projectScaffold-CSN0OzBV.js} +2 -2
  53. package/dist/renderModeScan-43yQ2opo.js +147 -0
  54. package/dist/{renderProfile-Ck32Fzxr.js → renderProfile-DvrhVJHa.js} +2 -2
  55. package/dist/{runtimeTrace-BPQyCmC5.js → runtimeTrace-CGWx1Q6l.js} +1 -1
  56. package/dist/{sdkgen-Se88ifTd.js → sdkgen-CDGHQUFj.js} +1 -1
  57. package/dist/serveCommand-BiPe8BJm.js +2 -0
  58. package/dist/{serveCommand-DkP3OT0W.js → serveCommand-Bje09q1v.js} +889 -825
  59. package/dist/serveEntry.js +1 -1
  60. package/dist/start-B0bnJgxI.js +3 -0
  61. package/dist/{start-jw89Xbqy.js → start-Clz-1BHB.js} +633 -455
  62. package/dist/startEntry.js +1 -1
  63. package/dist/{staticCommand-BwNEDlSU.js → staticCommand-ey0kYmOT.js} +1 -1
  64. package/dist/{subcommandNames-DpYs3DXr.js → subcommandNames-CDzfEtKV.js} +3 -3
  65. package/dist/{templates-BR-fb4SP.js → templates-BTWZkJJT.js} +41 -9
  66. package/dist/{test-f3amja6a.js → test-D_kW4KMj.js} +1 -1
  67. package/dist/updateCommand-CIoVDKnj.js +2 -0
  68. package/dist/{updateCommand-BMk2e4ky.js → updateCommand-CRJlAOaM.js} +139 -115
  69. package/dist/{webDev-BgWL9gKV.js → webDev-DSI9SOhs.js} +1598 -1028
  70. package/dist/webDev-DlvZO30c.js +2 -0
  71. package/dist/{webhooksCommand-CoIO3jbj.js → webhooksCommand-BvzXNHji.js} +1 -1
  72. package/dist/workspaceDeps-RKEkX92S.js +45 -0
  73. package/package.json +60 -19
  74. package/templates/AGENTS.core.md +2 -0
  75. package/templates/AGENTS.md +8 -4
  76. package/templates/agent-docs/_index.md +6 -4
  77. package/templates/agent-docs/_manifest.json +21 -5
  78. package/templates/agent-docs/ai.md +6 -6
  79. package/templates/agent-docs/authentication.md +73 -1
  80. package/templates/agent-docs/cli.md +6 -3
  81. package/templates/agent-docs/configuration.md +17 -0
  82. package/templates/agent-docs/data.md +522 -29
  83. package/templates/agent-docs/database/advancedqueries.md +8 -8
  84. package/templates/agent-docs/database/columntypes.md +2 -2
  85. package/templates/agent-docs/database/migrations.md +1 -1
  86. package/templates/agent-docs/database/querying.md +1 -1
  87. package/templates/agent-docs/database/schema.md +1 -1
  88. package/templates/agent-docs/database/seedsdialects.md +65 -3
  89. package/templates/agent-docs/database/transactions.md +3 -3
  90. package/templates/agent-docs/deployment.md +8 -0
  91. package/templates/agent-docs/internationalization.md +4 -2
  92. package/templates/agent-docs/introduction.md +32 -1
  93. package/templates/agent-docs/local-first-mobile.md +226 -30
  94. package/templates/agent-docs/observability.md +5 -1
  95. package/templates/agent-docs/plugins/atlassian.md +2 -2
  96. package/templates/agent-docs/plugins/audit.md +2 -2
  97. package/templates/agent-docs/plugins/auth.md +1 -1
  98. package/templates/agent-docs/plugins/billing.md +1 -1
  99. package/templates/agent-docs/plugins/cdc-out.md +8 -3
  100. package/templates/agent-docs/plugins/comments.md +164 -0
  101. package/templates/agent-docs/plugins/notifications.md +47 -4
  102. package/templates/agent-docs/plugins/presence.md +45 -3
  103. package/templates/agent-docs/plugins/prometheus.md +3 -1
  104. package/templates/agent-docs/plugins/queue.md +172 -0
  105. package/templates/agent-docs/plugins.md +17 -13
  106. package/templates/agent-docs/reference.md +35 -4
  107. package/templates/agent-docs/routing.md +585 -7
  108. package/templates/agent-docs/scheduling.md +1 -1
  109. package/templates/agent-docs/schema-driven-ui.md +226 -4
  110. package/templates/agent-docs/security.md +3 -3
  111. package/templates/agent-docs/templates/appshells.md +36 -4
  112. package/templates/agent-docs/whats-new.md +134 -66
  113. package/templates/apps/api-ai/package.json +6 -6
  114. package/templates/apps/api-auth/package.json +8 -8
  115. package/templates/apps/api-backend/package.json +7 -7
  116. package/templates/apps/api-backend-deactivation/package.json +7 -7
  117. package/templates/apps/api-backend-mail/package.json +8 -8
  118. package/templates/apps/api-backend-mariadb/package.json +9 -9
  119. package/templates/apps/api-backend-sqlite/package.json +8 -8
  120. package/templates/apps/api-backend-storage/package.json +8 -8
  121. package/templates/apps/api-cms/package.json +9 -9
  122. package/templates/apps/api-collab/README.md +3 -3
  123. package/templates/apps/api-collab/app.config.ts +1 -1
  124. package/templates/apps/api-collab/database/schema.ts +12 -8
  125. package/templates/apps/api-collab/mutations/documents.create.mutation.server.ts +1 -1
  126. package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +1 -1
  127. package/templates/apps/api-collab/mutations/documents.setBody.mutation.ts +1 -1
  128. package/templates/apps/api-collab/package.json +8 -8
  129. package/templates/apps/api-collab/template.json +1 -1
  130. package/templates/apps/api-collab/tests/documents.setBody.test.ts +10 -2
  131. package/templates/apps/api-data-advanced/package.json +8 -8
  132. package/templates/apps/api-durable/package.json +8 -8
  133. package/templates/apps/api-feature-flags/package.json +9 -9
  134. package/templates/apps/api-governance/package.json +8 -8
  135. package/templates/apps/api-kv/package.json +8 -8
  136. package/templates/apps/api-moderation/package.json +8 -8
  137. package/templates/apps/api-observability/package.json +8 -8
  138. package/templates/apps/api-ratelimit/package.json +8 -8
  139. package/templates/apps/api-rbac/package.json +8 -8
  140. package/templates/apps/api-rest/package.json +7 -7
  141. package/templates/apps/api-row-history/package.json +8 -8
  142. package/templates/apps/api-saas/package.json +11 -10
  143. package/templates/apps/api-saas-starter/package.json +10 -10
  144. package/templates/apps/api-search/package.json +8 -8
  145. package/templates/apps/api-status/package.json +8 -8
  146. package/templates/apps/api-webhooks/package.json +9 -9
  147. package/templates/apps/changelog/app.config.ts +26 -2
  148. package/templates/apps/changelog/content/releases/{0.1.0.mdx → v0-1-0.mdx} +0 -1
  149. package/templates/apps/changelog/content/releases/{0.2.0.mdx → v0-2-0.mdx} +0 -1
  150. package/templates/apps/changelog/package.json +9 -8
  151. package/templates/apps/changelog/src/collections/releases.collection.ts +48 -0
  152. package/templates/apps/changelog/src/globals.d.ts +1 -1
  153. package/templates/apps/changelog/src/locales/de.ts +1 -1
  154. package/templates/apps/changelog/src/locales/en.ts +1 -1
  155. package/templates/apps/changelog/src/pages/[locale]/[slug]/page.tsx +7 -4
  156. package/templates/apps/changelog/src/pages/[locale]/mirrors.test.tsx +13 -41
  157. package/templates/apps/changelog/src/pages/[slug]/page.test.tsx +26 -51
  158. package/templates/apps/changelog/src/pages/[slug]/page.tsx +21 -19
  159. package/templates/apps/changelog/src/pages/page.test.tsx +14 -37
  160. package/templates/apps/changelog/src/pages/page.tsx +18 -12
  161. package/templates/apps/edge-functions/package.json +2 -2
  162. package/templates/apps/frontend-admin/package.json +8 -8
  163. package/templates/apps/frontend-app/package.json +9 -9
  164. package/templates/apps/frontend-auth/package.json +8 -8
  165. package/templates/apps/frontend-blank/package.json +7 -7
  166. package/templates/apps/frontend-cms/package.json +9 -9
  167. package/templates/apps/frontend-collab/README.md +43 -24
  168. package/templates/apps/frontend-collab/app.config.ts +3 -3
  169. package/templates/apps/frontend-collab/package.json +14 -10
  170. package/templates/apps/frontend-collab/src/locales/de.ts +1 -2
  171. package/templates/apps/frontend-collab/src/locales/en.ts +1 -2
  172. package/templates/apps/frontend-collab/src/pages/page.test.tsx +72 -76
  173. package/templates/apps/frontend-collab/src/pages/page.tsx +45 -22
  174. package/templates/apps/frontend-collab/template.json +2 -2
  175. package/templates/apps/frontend-contact/package.json +7 -7
  176. package/templates/apps/frontend-dashboard/package.json +7 -7
  177. package/templates/apps/frontend-docs/content/docs/de/guides/first-page.md +4 -0
  178. package/templates/apps/frontend-docs/content/docs/de/intro/getting-started.md +4 -0
  179. package/templates/apps/frontend-docs/content/docs/en/guides/first-page.md +4 -0
  180. package/templates/apps/frontend-docs/content/docs/en/intro/getting-started.md +4 -0
  181. package/templates/apps/frontend-docs/package.json +9 -6
  182. package/templates/apps/frontend-docs/src/collections/docs.collection.ts +21 -0
  183. package/templates/apps/frontend-docs/src/locales/de.ts +0 -5
  184. package/templates/apps/frontend-docs/src/locales/en.ts +0 -5
  185. package/templates/apps/frontend-docs/src/pages/[locale]/docs/[...slug]/page.tsx +17 -9
  186. package/templates/apps/frontend-docs/src/pages/[locale]/mirrors.test.tsx +10 -5
  187. package/templates/apps/frontend-docs/src/pages/[locale]/page.tsx +8 -0
  188. package/templates/apps/frontend-docs/src/pages/docs/[...slug]/page.test.tsx +53 -15
  189. package/templates/apps/frontend-docs/src/pages/docs/[...slug]/page.tsx +27 -33
  190. package/templates/apps/frontend-docs/src/pages/page.test.tsx +17 -3
  191. package/templates/apps/frontend-docs/src/pages/page.tsx +16 -12
  192. package/templates/apps/frontend-i18n/package.json +6 -6
  193. package/templates/apps/frontend-landing/README.md +48 -0
  194. package/templates/apps/frontend-landing/app.config.ts +28 -0
  195. package/templates/apps/frontend-landing/package.json +7 -6
  196. package/templates/apps/frontend-landing/src/assets/hero.jpg +0 -0
  197. package/templates/apps/frontend-landing/src/fonts/Geist-Variable.woff2 +0 -0
  198. package/templates/apps/frontend-landing/src/fonts/LICENSE-Geist.txt +92 -0
  199. package/templates/apps/frontend-landing/src/globals.css +15 -0
  200. package/templates/apps/frontend-landing/src/globals.d.ts +17 -0
  201. package/templates/apps/frontend-landing/src/locales/de.ts +3 -2
  202. package/templates/apps/frontend-landing/src/locales/en.ts +5 -2
  203. package/templates/apps/frontend-landing/src/pages/page.test.tsx +79 -0
  204. package/templates/apps/frontend-landing/src/pages/page.tsx +26 -3
  205. package/templates/apps/frontend-landing/template.json +2 -2
  206. package/templates/apps/frontend-portal/package.json +8 -8
  207. package/templates/apps/frontend-saas/package.json +8 -8
  208. package/templates/apps/frontend-spa/package.json +7 -7
  209. package/templates/apps/frontend-ssr/package.json +7 -7
  210. package/templates/apps/frontend-ssr-api/package.json +8 -8
  211. package/templates/apps/frontend-static-blog/content/posts/cms-to-ssg.md +12 -0
  212. package/templates/apps/frontend-static-blog/content/posts/hello-static.md +12 -0
  213. package/templates/apps/frontend-static-blog/content/posts/islands-not-hydration.md +14 -0
  214. package/templates/apps/frontend-static-blog/package.json +9 -6
  215. package/templates/apps/frontend-static-blog/src/collections/posts.collection.ts +27 -0
  216. package/templates/apps/frontend-static-blog/src/pages/[locale]/blog/[slug]/page.tsx +7 -4
  217. package/templates/apps/frontend-static-blog/src/pages/[locale]/mirrors.test.tsx +7 -1
  218. package/templates/apps/frontend-static-blog/src/pages/blog/[slug]/page.test.tsx +19 -9
  219. package/templates/apps/frontend-static-blog/src/pages/blog/[slug]/page.tsx +19 -21
  220. package/templates/apps/frontend-static-blog/src/pages/page.test.tsx +18 -5
  221. package/templates/apps/frontend-static-blog/src/pages/page.tsx +21 -14
  222. package/templates/apps/frontend-status/package.json +8 -8
  223. package/templates/apps/mobile-app/package.json +12 -11
  224. package/templates/apps/mobile-app/src/lib/deeplinks.ts +29 -17
  225. package/templates/apps/mobile-app/tests/deeplinks.test.ts +16 -0
  226. package/dist/agentsMd-SDDSkyl4.js +0 -2
  227. package/dist/apiBuild-BYBpL7Pz.js +0 -2
  228. package/dist/build-CPgcMQug.js +0 -793
  229. package/dist/codegen-CctkDO-1.js +0 -2
  230. package/dist/codegenCommand-DCdG2JN-.js +0 -137
  231. package/dist/dbCommand-DNb6yeOG.js +0 -2
  232. package/dist/doctorCommand-CqoWA2p5.js +0 -2
  233. package/dist/fileConventions-DOqD3lPS.js +0 -34
  234. package/dist/frameworkTableAssembly-C6ETawPR.js +0 -2
  235. package/dist/inspect-CuGDYES0.js +0 -2
  236. package/dist/manifestBuild-CPjhvM62.js +0 -2
  237. package/dist/renderModeScan-CcH2X1_D.js +0 -120
  238. package/dist/serveCommand-DLc-BznW.js +0 -2
  239. package/dist/start-DfL3fOiN.js +0 -3
  240. package/dist/updateCommand-5gFVfK5q.js +0 -2
  241. package/dist/webDev-CZbTsDcH.js +0 -2
  242. package/templates/apps/changelog/scripts/generate-rss.mjs +0 -38
  243. package/templates/apps/changelog/src/lib/releases.ts +0 -21
  244. package/templates/apps/frontend-static-blog/src/content/posts.ts +0 -64
@@ -1,2 +0,0 @@
1
- import { t as e } from "./codegen-VF479Cnb.js";
2
- export { e as checkRpcGroupFreshness };
@@ -1,137 +0,0 @@
1
- import { Cn as e, Sn as t, V as n, l as r, u as i } from "./dev-CRHoCEiy.js";
2
- import { Ct as a } from "./webDev-BgWL9gKV.js";
3
- import { n as o } from "./frameworkTableAssembly-w-XnLa3q.js";
4
- import { i as s, r as c } from "./codegen-VF479Cnb.js";
5
- import { basename as l, join as u, relative as d, resolve as f } from "node:path";
6
- import { promises as p } from "node:fs";
7
- import { pathToFileURL as m } from "node:url";
8
- //#region src/mobileCodegen.ts
9
- var h = "voltro.mobile.ts", g = u(".framework", "mobileApis.generated.ts"), _ = (e) => e.replace(/[^a-zA-Z0-9]/g, "_"), v = async (e) => {
10
- let t = u(e, h);
11
- try {
12
- await p.stat(t);
13
- } catch {
14
- return { present: !1 };
15
- }
16
- try {
17
- let e = (await import(`${m(t).href}?t=${Date.now()}`)).default;
18
- return e === void 0 || typeof e != "object" || e.apis === void 0 ? {
19
- present: !0,
20
- error: /* @__PURE__ */ Error(`${h} has no default export with an \`apis\` map`)
21
- } : {
22
- present: !0,
23
- binding: e
24
- };
25
- } catch (e) {
26
- return {
27
- present: !0,
28
- error: e instanceof Error ? e : Error(String(e))
29
- };
30
- }
31
- }, y = (e, t) => {
32
- let n = t.filter(([, e]) => e.package !== void 0).map(([e, t]) => {
33
- let n = `${_(e)}Group`, r = `${_(e)}Descriptors`;
34
- return `import { ${n === "appGroup" ? "appGroup" : `appGroup as ${n}`}, ${r === "appDescriptors" ? "appDescriptors" : `appDescriptors as ${r}`} } from '${t.package}/rpcGroup'`;
35
- }), r = t.map(([e, t]) => t.package === void 0 ? ` // ${JSON.stringify(e)}: declared with \`url\` only — no local rpc surface to import.\n // Add \`package: '<the api package>'\` to ${h} to get typed hooks for it.` : ` { ${[
36
- `name: ${JSON.stringify(e)}`,
37
- `group: ${_(e)}Group`,
38
- `descriptors: ${_(e)}Descriptors`,
39
- `wsUrl: wsUrl(${JSON.stringify(e)})`
40
- ].join(", ")} },`), i = t.filter(([, e]) => e.url !== void 0).map(([e, t]) => ` ${JSON.stringify(e)}: ${JSON.stringify(t.url)},`);
41
- return [
42
- "// GENERATED BY `voltro codegen` — do not edit; regenerate with `voltro codegen`.",
43
- "//",
44
- `// The api bindings declared in ${h}. Only the BINDING is`,
45
- "// generated: the procedure types ride the imports below, so a schema change",
46
- "// in an api needs no regeneration here.",
47
- "",
48
- ...n,
49
- "import type { MobileApiBinding } from '@voltro/react-native'",
50
- "",
51
- "/** Every api this app talks to, bound to a runtime-resolved ws URL.",
52
- " *",
53
- " * The URL is a parameter because it differs per environment and `localhost`",
54
- " * on a device is the DEVICE — see `resolveDevWsUrl` in @voltro/react-native. */",
55
- "export const mobileApis = (",
56
- " wsUrl: (apiName: string) => string,",
57
- "): ReadonlyArray<MobileApiBinding> => [",
58
- ...r,
59
- "]",
60
- "",
61
- "/** Api names in declaration order — the keys the hooks bind to. */",
62
- `export const MOBILE_API_NAMES = [${t.map(([e]) => JSON.stringify(e)).join(", ")}] as const`,
63
- ...i.length > 0 ? [
64
- "",
65
- `/** URLs declared in ${h} for apis this app does not build. */`,
66
- "export const MOBILE_API_URLS: Readonly<Record<string, string>> = {",
67
- ...i,
68
- "}"
69
- ] : [],
70
- ""
71
- ].join("\n");
72
- }, b = async (e) => {
73
- let t = f(e), n = await v(t);
74
- if (!n.present) return { kind: "not-a-mobile-app" };
75
- if ("error" in n) return {
76
- kind: "refused",
77
- reason: `${h} could not be loaded — ${n.error.message}`
78
- };
79
- let r = Object.entries(n.binding.apis);
80
- if (r.length === 0) return {
81
- kind: "refused",
82
- reason: `${h} declares no apis`
83
- };
84
- for (let [e, t] of r) if (t.package === void 0 && t.url === void 0) return {
85
- kind: "refused",
86
- reason: `api ${JSON.stringify(e)} declares neither \`package\` nor \`url\``
87
- };
88
- for (let [e, n] of r) if (n.package !== void 0 && await a(t, n.package) === null) return {
89
- kind: "refused",
90
- reason: `api ${JSON.stringify(e)}: ${n.package} is not a workspace dependency of this app. Add it to the app's package.json (\`"${n.package}": "workspace:*"\`) and install.`
91
- };
92
- let i = u(t, g), o = y(t, r);
93
- await p.mkdir(u(t, ".framework"), { recursive: !0 });
94
- let s = null;
95
- try {
96
- s = await p.readFile(i, "utf8");
97
- } catch {}
98
- return s !== o && await p.writeFile(i, o, "utf8"), {
99
- kind: "wrote",
100
- file: i,
101
- apis: r.map(([e]) => e)
102
- };
103
- }, x = (e, t) => t.kind === "wrote" ? `voltro codegen: wrote ${d(e, t.file)} (apis ${t.apis.join(", ")})` : t.kind === "refused" ? `voltro codegen: ${t.reason} — refusing to write.` : `voltro codegen: no ${h} here — not a mobile app.`, S = async (t) => {
104
- let { config: i, present: a, error: o } = await r(t);
105
- if (a && i === null) return {
106
- kind: "refused",
107
- reason: "app.config.ts exists but could not be loaded" + (o === void 0 ? "" : ` — ${o instanceof Error ? o.message : String(o)}`)
108
- };
109
- let s = i?.plugins ?? [], { pluginContributions: u, pluginErrorImports: d, pluginRpcImports: f } = await n(s, i?.name ?? l(t), t), p = await c({
110
- root: t,
111
- ...u.length > 0 ? { pluginContributions: u } : {},
112
- ...d.length > 0 ? { pluginErrorImports: d } : {},
113
- ...f.length > 0 ? { pluginRpcImports: f } : {},
114
- ...i?.name === void 0 ? {} : { apiName: i.name }
115
- });
116
- if (!p) return { kind: "nothing-to-write" };
117
- let m = await C(t, i), h = await e(p, m);
118
- return {
119
- kind: "wrote",
120
- file: p,
121
- plugins: s.length,
122
- errorSchemas: d.length,
123
- routes: f.length,
124
- tables: m.size,
125
- dts: h
126
- };
127
- }, C = async (e, n) => {
128
- let r = await s(e), { tables: a } = await i(r), c = await o({ root: e });
129
- return t(a, c, n?.analytics?.tables ?? []);
130
- }, w = async (e) => {
131
- let t = f(e.find((e) => !e.startsWith("-")) ?? process.cwd()), n = await b(t);
132
- if (n.kind !== "not-a-mobile-app") return console.log(x(t, n)), n.kind === "wrote" ? 0 : 1;
133
- let r = await S(t);
134
- return r.kind === "refused" ? (console.error(`voltro codegen: ${r.reason} — refusing to write.`), console.error(" The generated file would omit every plugin's error union and client routes, and would typecheck, so the omission would only surface as a missing error tag at runtime."), 1) : r.kind === "nothing-to-write" ? (console.log("voltro codegen: no rpc primitives found — nothing to write."), 0) : (console.log(`voltro codegen: wrote ${d(t, r.file)} (plugins ${r.plugins}, error schemas ${r.errorSchemas}, plugin routes ${r.routes})`), console.log(r.dts.action === "removed" ? ` removed ${d(t, r.dts.path)} — no tables declared, so \`source:\` is \`string\` again` : r.dts.action === "skipped" ? " no tables declared — `source:` stays `string`" : ` ${r.dts.action} ${d(t, r.dts.path)} (${r.tables} table name(s) typed for \`source:\`)`), r.plugins > 0 && r.errorSchemas === 0 && console.log(" note: no plugin contributed a cross-cutting error schema, so the wire error union carries only each procedure's own `error:`. Expected if none of your plugins declare `errorSchemas` — but `guards:` needs @voltro/plugin-rbac for its ScopeError to decode typed."), 0);
135
- };
136
- //#endregion
137
- export { S as regenerateRpcGroup, w as runCodegenCommand };
@@ -1,2 +0,0 @@
1
- import { s as e } from "./dbCommand-sHedr-NJ.js";
2
- export { e as runDbCommand };
@@ -1,2 +0,0 @@
1
- import { b as e, y as t } from "./doctorCommand-DtfJ3FA6.js";
2
- export { t as runDoctorCommand, e as runServePreflight };
@@ -1,34 +0,0 @@
1
- //#region src/fileConventions.ts
2
- var e = /\.(query|mutation|action|stream)\.ts$/, t = /\.(query|mutation|action|stream)\.server\.ts$/, n = /\.event\.ts$/, r = /\.ws\.ts$/, i = /\.workflow\.tsx$/, a = /\.workflow\.server\.tsx$/, o = /\.workflow\.tsx?$/, s = /\.trigger\.tsx?$/, c = /\.cron\.tsx?$/, l = /\.webhook\.tsx?$/, u = /\.outbox\.tsx?$/, d = /\.subscribe\.tsx?$/, f = /\.reaction\.tsx?$/, p = /\.aggregate\.tsx?$/, m = /\.expectation\.ts$/, h = /\.budget\.ts$/, g = /\.experiment\.ts$/, _ = /\.startup\.tsx?$/, v = /\.seed\.ts$/, y = /\.relations\.ts$/, b = /\.entity\.ts$|\.schema\.ts$|^schema\.ts$/, x = (e) => o.test(e) && !i.test(e) && !a.test(e), S = /(?:^|\/)page\.tsx$/, C = /\.island\.tsx?$/, w = /\.component\.tsx$/, T = /\.component\.ui\.tsx$/, E = /\.hook\.tsx?$/, D = /\.internal\.tsx?$/, O = /\.types\.tsx?$/, k = /\.fixture\.tsx?$/, A = /\.tracking\.tsx?$/, j = /\.store\.tsx?$/, M = /\.client\.tsx?$/, N = /\.(test|spec)\.tsx?$/, P = [
3
- e,
4
- t,
5
- o,
6
- a,
7
- s,
8
- c,
9
- l,
10
- u,
11
- d,
12
- f,
13
- p,
14
- _,
15
- m,
16
- h,
17
- g,
18
- v,
19
- y,
20
- b,
21
- /\.route\.tsx?$/,
22
- n,
23
- r,
24
- j,
25
- M,
26
- /\.(agent|tool|email|connection|serverless|server|config|generated)\.tsx?$/
27
- ], F = (e) => P.some((t) => t.test(e)), I = /* @__PURE__ */ new Set([
28
- "layout.tsx",
29
- "error.tsx",
30
- "loading.tsx",
31
- "not-found.tsx"
32
- ]);
33
- //#endregion
34
- export { i as A, j as C, s as D, A as E, x as F, a as M, r as N, O, F as P, _ as S, N as T, t as _, c as a, b, g as c, D as d, C as f, e as g, I as h, T as i, o as j, l as k, k as l, S as m, h as n, n as o, u as p, w as r, m as s, p as t, E as u, f as v, d as w, v as x, y };
@@ -1,2 +0,0 @@
1
- import { c as e, n as t } from "./frameworkTableAssembly-w-XnLa3q.js";
2
- export { t as assembleFrameworkTables, e as loadAppSchemaInputs };
@@ -1,2 +0,0 @@
1
- import { r as e } from "./inspect-CtL_xTbu.js";
2
- export { e as buildCapabilityManifest };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./manifestBuild-CuU1VrSm.js";
2
- export { e as buildRpcEntry };
@@ -1,120 +0,0 @@
1
- import { join as e } from "node:path";
2
- import { readFile as t } from "node:fs/promises";
3
- //#region src/isrCache.ts
4
- var n = () => {
5
- let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = (e) => {
6
- t.set(e, (t.get(e) ?? 0) + 1);
7
- };
8
- return {
9
- get(t) {
10
- return e.get(t);
11
- },
12
- set(n, r, i) {
13
- return i?.ifGeneration !== void 0 && (t.get(n) ?? 0) !== i.ifGeneration ? !1 : (e.set(n, r), !0);
14
- },
15
- generation(e) {
16
- return t.get(e) ?? 0;
17
- },
18
- invalidate(t) {
19
- e.delete(t), n(t);
20
- },
21
- invalidateBy(t) {
22
- let r = 0;
23
- for (let i of e.keys()) t(i) && (e.delete(i), n(i), r++);
24
- return r;
25
- },
26
- clear() {
27
- for (let t of e.keys()) n(t);
28
- e.clear();
29
- },
30
- size() {
31
- return e.size;
32
- },
33
- snapshot() {
34
- return Array.from(e.entries());
35
- }
36
- };
37
- }, r = (e) => {
38
- if (typeof e == "number" && Number.isFinite(e) && e > 0) return e * 1e3;
39
- if (typeof e != "string") return null;
40
- let t = /^\s*(\d+)\s*(s|seconds?|m|minutes?|h|hours?|d|days?)\s*$/i.exec(e);
41
- if (!t) return null;
42
- let n = parseInt(t[1], 10);
43
- if (!Number.isFinite(n) || n <= 0) return null;
44
- let r = t[2].toLowerCase();
45
- return r === "s" || r.startsWith("second") ? n * 1e3 : r === "m" || r.startsWith("minute") ? n * 6e4 : r === "h" || r.startsWith("hour") ? n * 36e5 : r === "d" || r.startsWith("day") ? n * 864e5 : null;
46
- }, i = (e, t = {}) => {
47
- let n = [e];
48
- return t.tenant !== void 0 && t.tenant !== "" && n.push(`tenant=${t.tenant}`), t.locale !== void 0 && t.locale !== "" && n.push(`lang=${t.locale}`), n.join("|");
49
- }, a = (e, t) => e.expiresAt > t, o = (e, t) => e.expiresAt <= t && e.servableUntil > t, s = [
50
- "static",
51
- "spa",
52
- "ssr",
53
- "isr"
54
- ], c = (e) => typeof e == "string" && s.includes(e), l = s.map((e) => `'${e}'`).join(" | "), u = (e, t) => `[voltro] ${e}: unknown renderMode '${t}'.\n Valid values: ${l}.${t === "client" || t === "csr" || t === "browser" ? "\n A page that renders only in the browser is 'spa': it is skipped by the prerender and mounts on the client. If its route has a layout, that layout still renders server-side as an SSR shell." : t === "server" || t === "dynamic" ? "\n A page rendered per request is 'ssr'." : t === "ssg" || t === "prerender" ? "\n A page rendered once at build time is 'static' (the default)." : ""}`, d = class extends Error {
55
- page;
56
- value;
57
- name = "InvalidRenderModeError";
58
- constructor(e, t) {
59
- super(u(e, t)), this.page = e, this.value = t;
60
- }
61
- }, f = (e, t = "<page>") => {
62
- if (e.renderMode !== void 0 && e.renderMode !== null) {
63
- if (!c(e.renderMode)) throw new d(t, String(e.renderMode));
64
- return e.renderMode;
65
- }
66
- return e.dynamic === "force-dynamic" ? "ssr" : (e.dynamic, "static");
67
- }, p = (e, t = "<page>") => ({
68
- renderMode: f(e, t),
69
- tenantAware: e.tenantAware === !0,
70
- revalidateMs: r(e.revalidate),
71
- staleWhileRevalidateMs: r(e.staleWhileRevalidate) ?? 0,
72
- cacheInvalidatesOn: Array.isArray(e.cacheInvalidatesOn) ? e.cacheInvalidatesOn : [],
73
- interactive: e.interactive ?? "full",
74
- hasLoader: typeof e.loader == "function",
75
- hasMeta: e.meta != null,
76
- hasGetStaticPaths: typeof e.getStaticPaths == "function"
77
- }), m = /export\s+const\s+renderMode\s*(?::[^=]+)?=\s*['"]([^'"]*)['"]/, h = (e) => m.exec(e)?.[1] ?? null, g = /export\s*\{([^}]*)\}\s*from\s*['"]([^'"]+)['"]/g, _ = (e) => {
78
- g.lastIndex = 0;
79
- let t;
80
- for (; (t = g.exec(e)) !== null;) {
81
- let e = t[2];
82
- if (e.startsWith(".")) for (let n of t[1].split(",")) {
83
- let t = n.lastIndexOf(" as ");
84
- if ((t === -1 ? n : n.slice(t + 4)).trim() === "renderMode") return e;
85
- }
86
- }
87
- return null;
88
- }, v = /export\s*\{([^}]*)\}/g, y = (e) => {
89
- if (/export\s+default\b/.test(e)) return !0;
90
- v.lastIndex = 0;
91
- let t;
92
- for (; (t = v.exec(e)) !== null;) for (let e of t[1].split(",")) {
93
- let t = e.lastIndexOf(" as ");
94
- if ((t === -1 ? e : e.slice(t + 4)).trim() === "default") return !0;
95
- }
96
- return !1;
97
- }, b = (e) => {
98
- if (/^export const searchParams\b/m.test(e)) return !0;
99
- v.lastIndex = 0;
100
- let t;
101
- for (; (t = v.exec(e)) !== null;) for (let e of t[1].split(",")) {
102
- let t = e.lastIndexOf(" as ");
103
- if ((t === -1 ? e : e.slice(t + 4)).trim() === "searchParams") return !0;
104
- }
105
- return !1;
106
- }, x = async (n, r) => {
107
- let i = (await Promise.all(r.map(async (r) => {
108
- let i;
109
- try {
110
- i = await t(e(n, r.file), "utf8");
111
- } catch {
112
- return null;
113
- }
114
- let a = h(i);
115
- return a !== null && !c(a) ? u(e("src", "pages", r.file), a) : a === "isr" && b(i) ? `${e("src", "pages", r.file)} declares BOTH renderMode 'isr' and a \`searchParams\` schema.\n\n The isr cache is keyed by path (plus tenant+locale) — the query string is not part of\n the key, so the first request's variant would be cached and served for every other\n query. A page whose render varies by search params cannot be isr-cached safely.\n\n Fix: use \`renderMode: 'ssr'\` (per-request render, params fully honoured), or remove\n the \`searchParams\` export and read the query client-side only.` : y(i) ? null : `${e("src", "pages", r.file)} is a route (a \`page.tsx\` under src/pages/) but exports no default.\n\n A page's default export IS its component — the router has nothing to render without it,\n and the failure would otherwise surface only in \`voltro build\`'s prerender as\n "SSR received a descriptor with no Component", long after the file was written.\n\n Fix: \`export default function Page() { … }\`, or re-export another page's component\n (\`export { default } from '../page'\`). If this file is NOT a route, rename it —\n only the reserved names route, and anything else under src/pages/ is ordinary code\n that may live beside the page that uses it.`;
116
- }))).filter((e) => e !== null);
117
- if (i.length !== 0) throw Error(i.join("\n\n"));
118
- };
119
- //#endregion
120
- export { p as a, f as c, o as d, n as f, s as i, i as l, h as n, c as o, r as p, _ as r, u as s, x as t, a as u };
@@ -1,2 +0,0 @@
1
- import { n as e } from "./serveCommand-DkP3OT0W.js";
2
- export { e as runServeDispatch };
@@ -1,3 +0,0 @@
1
- import "./renderModeScan-CcH2X1_D.js";
2
- import { t as e } from "./start-jw89Xbqy.js";
3
- export { e as runStartCommand };
@@ -1,2 +0,0 @@
1
- import { f as e, p as t } from "./updateCommand-BMk2e4ky.js";
2
- export { e as runApplyCodemods, t as runUpdateCommand };
@@ -1,2 +0,0 @@
1
- import { b as e, v as t } from "./webDev-BgWL9gKV.js";
2
- export { t as tryRunWebServe, e as walkPagesTree };
@@ -1,38 +0,0 @@
1
- // Generate public/rss.xml from content/releases/*.mdx using the SAME
2
- // @voltro/changelog primitives the pages use (`loadReleases` +
3
- // `renderReleaseRss`). Runs BEFORE `voltro build` so Vite copies the file
4
- // into the build output (publicDir = <app>/public) and `voltro start`
5
- // serves it as application/xml.
6
- //
7
- // Why a separate Node script and not a page route: the web SSG renders
8
- // HTML pages only — a feed is a non-HTML artifact, so it's emitted as a
9
- // static file rather than an `rss.xml.tsx` route. Run via `tsx` so the
10
- // import resolves whether @voltro/changelog points at its TS source
11
- // (in-workspace dev) or its built dist (a normal install).
12
- import { readdirSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs'
13
- import { dirname, join } from 'node:path'
14
- import { fileURLToPath } from 'node:url'
15
- import { loadReleases, renderReleaseRss } from '@voltro/changelog'
16
-
17
- const appRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
18
- const releasesDir = join(appRoot, 'content', 'releases')
19
-
20
- // Read each .mdx file into the { path: contents } map loadReleases expects.
21
- const sources = {}
22
- for (const file of readdirSync(releasesDir)) {
23
- if (file.endsWith('.mdx')) sources[file] = readFileSync(join(releasesDir, file), 'utf8')
24
- }
25
-
26
- const releases = loadReleases(sources)
27
- // The base URL each release links under (<siteUrl>/<slug>). Set SITE_URL in
28
- // your deploy env; localhost is the dev default.
29
- const siteUrl = process.env.SITE_URL ?? 'http://localhost:{{port}}'
30
- const xml = renderReleaseRss(releases, siteUrl, {
31
- title: '{{capProjectName}} Changelog',
32
- description: 'Product updates and release notes.',
33
- })
34
-
35
- const publicDir = join(appRoot, 'public')
36
- mkdirSync(publicDir, { recursive: true })
37
- writeFileSync(join(publicDir, 'rss.xml'), xml)
38
- console.log(`rss.xml — ${releases.length} release(s) → public/rss.xml`)
@@ -1,21 +0,0 @@
1
- // The single source of releases for every page. The MDX files under
2
- // content/releases/ are read at build time via Vite's raw glob (works in
3
- // dev, SSR, and the static build). `import: 'default'` yields each file's
4
- // contents as a string — exactly the shape `loadReleases()` expects. The
5
- // loader parses the frontmatter, renders the markdown body, sorts newest-
6
- // first, and skips any file missing `version` / `releasedAt`.
7
- import { loadReleases, type Release } from '@voltro/changelog'
8
-
9
- const sources = import.meta.glob('../../content/releases/*.mdx', {
10
- query: '?raw',
11
- import: 'default',
12
- eager: true,
13
- }) as Record<string, string>
14
-
15
- /** All releases, newest first. */
16
- export const releases: ReadonlyArray<Release> = loadReleases(sources)
17
-
18
- export const releaseBySlug = (slug: string): Release | undefined =>
19
- releases.find((r) => r.slug === slug)
20
-
21
- export type { Release }
@@ -1,64 +0,0 @@
1
- // The content source for the blog.
2
- //
3
- // This is a plain in-repo array — the simplest stand-in for a CMS. In a
4
- // real app, swap the body of `getStaticPaths` + the page loader to read
5
- // from your CMS / database / filesystem instead. NOTHING else changes:
6
- // the build still pre-renders one HTML file per entry.
7
- //
8
- // Because this module is imported by both the index page (the list) and
9
- // the [slug] page (the detail) AND by `getStaticPaths`, it is the single
10
- // source of truth for "which posts exist".
11
-
12
- export interface Post {
13
- /** URL segment — `/blog/<slug>`. Must be unique + DNS-safe. */
14
- readonly slug: string
15
- readonly title: string
16
- /** ISO date, shown + used for ordering. */
17
- readonly date: string
18
- /** One-line summary — feeds the list + the `<meta name="description">`. */
19
- readonly excerpt: string
20
- readonly readingMinutes: number
21
- /** Body paragraphs, separated by a blank line. */
22
- readonly body: string
23
- }
24
-
25
- export const posts: ReadonlyArray<Post> = [
26
- {
27
- slug: 'hello-static',
28
- title: 'Why this blog ships zero JavaScript',
29
- date: '2025-01-15',
30
- excerpt: 'Every page is pre-rendered at build time, so the browser downloads HTML and nothing else.',
31
- readingMinutes: 3,
32
- body: `This page was rendered ONCE, when you ran \`voltro build\`. The result is a flat \`dist/blog/hello-static/index.html\` that any CDN can serve in single-digit milliseconds.
33
-
34
- There is no server rendering per request, no React hydration on the list page, no rpc client on the wire. The list page even declares \`interactive = 'none'\`, which strips every \`<script>\` the framework would otherwise emit.
35
-
36
- When you DO need a sprinkle of interactivity — a reading-progress bar, a copy button, a comment box — you reach for an island instead of hydrating the whole tree. Read the next post for how that works.`,
37
- },
38
- {
39
- slug: 'islands-not-hydration',
40
- title: 'Islands: hydrate the 5% that moves',
41
- date: '2025-01-22',
42
- excerpt: 'A static page with one interactive widget should ship one widget of JavaScript — not the whole page.',
43
- readingMinutes: 4,
44
- body: `Look at the top of this page: a thin progress bar tracks how far you have scrolled. That bar is an ISLAND — a single component the framework hydrates inside otherwise-static HTML.
45
-
46
- This page declares \`interactive = 'islands'\`, so the framework renders the article once and only attaches React to the \`island()\`-wrapped component. The surrounding HTML has zero React lifecycle running.
47
-
48
- Each island picks WHEN it wakes up via a hydrate strategy: \`load\` (immediately), \`idle\`, \`visible\` (on scroll-into-view), or \`interaction\` (on first click). The progress bar uses \`load\` because it must track scrolling from the very first frame.
49
-
50
- The lesson: don't default to \`islands\` because it sounds fast. Use it when most of the page is static and only a few widgets move. A dashboard where everything is interactive wants \`full\` hydration instead.`,
51
- },
52
- {
53
- slug: 'cms-to-ssg',
54
- title: 'From CMS to static pages with getStaticPaths',
55
- date: '2025-02-03',
56
- excerpt: 'Enumerate your content once; the build emits one pre-rendered page per entry.',
57
- readingMinutes: 3,
58
- body: `A dynamic route like \`src/pages/blog/[slug].tsx\` matches infinitely many URLs. To pre-render it statically, the build needs to know WHICH slugs exist — that is what \`getStaticPaths\` answers.
59
-
60
- In this template, \`getStaticPaths\` maps over the \`posts\` array in \`src/content/posts.ts\`. Point it at a CMS API, a database query, or a folder of markdown files instead, and the build will pre-render exactly those pages — the Next.js "static generation from a content source" pattern, with no extra config.
61
-
62
- URLs you do not enumerate simply are not built. If a page ALSO sets \`renderMode = 'ssr' | 'isr'\`, \`voltro start\` renders the un-enumerated ones on demand; a pure \`'static'\` page 404s for unknown slugs, which is exactly what you want for a fixed content set.`,
63
- },
64
- ]