@voltro/cli 0.50.0 → 0.51.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 (111) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/dist/{apiBuild-CFYXo06U.js → apiBuild-CPDHXF72.js} +2 -2
  3. package/dist/apiBuild-GDKuGOMV.js +2 -0
  4. package/dist/appGraph-CFmFKHb2.js +2 -0
  5. package/dist/appGraph-yRuKjOba.js +111 -0
  6. package/dist/bin.js +1 -1
  7. package/dist/{build-CnSH-zru.js → build-DETLZAFt.js} +271 -240
  8. package/dist/{checkCommand-OL41BMIb.js → checkCommand-CWcnDArJ.js} +1 -1
  9. package/dist/{checkCommand-Do3SQbLx.js → checkCommand-DNuPiWMc.js} +56 -46
  10. package/dist/{codegenCommand-BJzaRz6q.js → codegenCommand-BNBHcNNj.js} +2 -2
  11. package/dist/{codemodRunner-De3k0pRd.js → codemodRunner-BDVixlSw.js} +278 -136
  12. package/dist/{commands-By23Ljny.js → commands-B1OiS9bX.js} +24 -23
  13. package/dist/{dashboardCommand-DN1rAABE.js → dashboardCommand-C-vvPY1B.js} +5 -5
  14. package/dist/{dataCommand-B93TUBIx.js → dataCommand-C1GxXW5q.js} +458 -384
  15. package/dist/dbCommand-C27HIsGE.js +2 -0
  16. package/dist/{dbCommand-Bf7Cy0mn.js → dbCommand-If4Y1xQ-.js} +1 -1
  17. package/dist/{dev-BWwE0QjK.js → dev-CK522MV5.js} +1 -1
  18. package/dist/{dev-1yu42ubu.js → dev-kdAg9Q7l.js} +1246 -1246
  19. package/dist/doctorCommand-BK4l18eG.js +2 -0
  20. package/dist/{doctorCommand-y-EbP8st.js → doctorCommand-nKmeW78u.js} +42 -26
  21. package/dist/{doctorSourceRelations-Dd48LPvO.js → doctorSourceRelations-c5mlN5HI.js} +66 -34
  22. package/dist/{dormancyCommand-Dc7KRNCG.js → dormancyCommand-CY3wa_SW.js} +1 -1
  23. package/dist/{embeddingsCommand-kPs132bB.js → embeddingsCommand-BDLIgje_.js} +1 -1
  24. package/dist/{envCommand-E12zSt51.js → envCommand-C6V_xVlT.js} +13 -13
  25. package/dist/{evolveCommand-B3nagPVc.js → evolveCommand-D3c4DSfN.js} +2 -2
  26. package/dist/{generateCommand-CcyvH2ve.js → generateCommand-DTNPGjxo.js} +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/{infoCommand-Cq0Yz98u.js → infoCommand-BnRFEF1o.js} +1 -1
  29. package/dist/{inspect-B7U7Cl_Z.js → inspect-CtL_xTbu.js} +1 -0
  30. package/dist/inspect-CuGDYES0.js +2 -0
  31. package/dist/manifestBuild-CPjhvM62.js +2 -0
  32. package/dist/{manifestBuild-BK42hu0k.js → manifestBuild-CuU1VrSm.js} +2 -2
  33. package/dist/{migrate-D3MK9BpK.js → migrate-DehuBakM.js} +1 -1
  34. package/dist/{runtimeTrace-BpLUcrfy.js → runtimeTrace-ZsBU7Tkx.js} +1 -1
  35. package/dist/{sdkgen-dl4-WKF6.js → sdkgen-O4XqWOjM.js} +1 -1
  36. package/dist/serveCommand-BRnPCxVd.js +2 -0
  37. package/dist/{serveCommand-8CTzQCY0.js → serveCommand-DdiYNBBu.js} +4 -4
  38. package/dist/serveEntry.js +1 -1
  39. package/dist/{start-7HcSIKEp.js → start-BLNmWkLa.js} +331 -327
  40. package/dist/{start-DvlYDyAr.js → start-Dzicuyw8.js} +1 -1
  41. package/dist/startEntry.js +1 -1
  42. package/dist/{updateCommand-i8JbrLAA.js → updateCommand-Bs322Q78.js} +1 -1
  43. package/dist/updateCommand-eXB35SEv.js +2 -0
  44. package/dist/{webDev-B4IEMB0n.js → webDev-B-ubQEMX.js} +283 -224
  45. package/dist/webDev-DposiF3j.js +2 -0
  46. package/dist/{webhooksCommand-B0bdyuQ4.js → webhooksCommand-FLYY9IXh.js} +1 -1
  47. package/package.json +41 -17
  48. package/templates/AGENTS.core.md +15 -5
  49. package/templates/AGENTS.md +16 -6
  50. package/templates/agent-docs/_index.md +1 -1
  51. package/templates/agent-docs/cli.md +92 -3
  52. package/templates/agent-docs/data.md +36 -0
  53. package/templates/agent-docs/internationalization.md +131 -13
  54. package/templates/agent-docs/whats-new.md +73 -27
  55. package/templates/apps/api-ai/package.json +7 -7
  56. package/templates/apps/api-auth/package.json +8 -8
  57. package/templates/apps/api-backend/package.json +7 -7
  58. package/templates/apps/api-backend-deactivation/package.json +7 -7
  59. package/templates/apps/api-backend-mail/package.json +8 -8
  60. package/templates/apps/api-backend-mariadb/package.json +9 -9
  61. package/templates/apps/api-backend-sqlite/package.json +8 -8
  62. package/templates/apps/api-backend-storage/package.json +8 -8
  63. package/templates/apps/api-cms/package.json +10 -10
  64. package/templates/apps/api-collab/package.json +8 -8
  65. package/templates/apps/api-data-advanced/package.json +8 -8
  66. package/templates/apps/api-durable/package.json +8 -8
  67. package/templates/apps/api-feature-flags/package.json +9 -9
  68. package/templates/apps/api-governance/package.json +8 -8
  69. package/templates/apps/api-kv/package.json +8 -8
  70. package/templates/apps/api-moderation/package.json +8 -8
  71. package/templates/apps/api-observability/package.json +8 -8
  72. package/templates/apps/api-ratelimit/package.json +8 -8
  73. package/templates/apps/api-rbac/package.json +8 -8
  74. package/templates/apps/api-rest/package.json +7 -7
  75. package/templates/apps/api-saas/package.json +11 -11
  76. package/templates/apps/api-saas-starter/package.json +10 -10
  77. package/templates/apps/api-search/package.json +8 -8
  78. package/templates/apps/api-status/package.json +8 -8
  79. package/templates/apps/api-versioning/package.json +8 -8
  80. package/templates/apps/api-webhooks/package.json +9 -9
  81. package/templates/apps/changelog/package.json +6 -6
  82. package/templates/apps/edge-functions/package.json +2 -2
  83. package/templates/apps/frontend-admin/package.json +8 -8
  84. package/templates/apps/frontend-app/package.json +9 -9
  85. package/templates/apps/frontend-auth/package.json +8 -8
  86. package/templates/apps/frontend-blank/package.json +7 -7
  87. package/templates/apps/frontend-cms/package.json +9 -9
  88. package/templates/apps/frontend-collab/package.json +10 -10
  89. package/templates/apps/frontend-contact/package.json +7 -7
  90. package/templates/apps/frontend-dashboard/package.json +7 -7
  91. package/templates/apps/frontend-docs/package.json +7 -7
  92. package/templates/apps/frontend-i18n/package.json +6 -6
  93. package/templates/apps/frontend-landing/package.json +7 -7
  94. package/templates/apps/frontend-portal/package.json +8 -8
  95. package/templates/apps/frontend-saas/package.json +8 -8
  96. package/templates/apps/frontend-spa/package.json +7 -7
  97. package/templates/apps/frontend-ssr/package.json +7 -7
  98. package/templates/apps/frontend-ssr-api/package.json +8 -8
  99. package/templates/apps/frontend-static-blog/package.json +6 -6
  100. package/templates/apps/frontend-status/package.json +8 -8
  101. package/templates/apps/mobile-app/package.json +4 -4
  102. package/dist/apiBuild-BWo8KI6n.js +0 -2
  103. package/dist/appGraph-KGDPTuTy.js +0 -110
  104. package/dist/appGraph-zuMGKVYX.js +0 -2
  105. package/dist/dbCommand-Bnl7MSGC.js +0 -2
  106. package/dist/doctorCommand-BmovAwb7.js +0 -2
  107. package/dist/inspect-DUze25t0.js +0 -2
  108. package/dist/manifestBuild-j0n109tt.js +0 -2
  109. package/dist/serveCommand-C_WI4TTG.js +0 -2
  110. package/dist/updateCommand-D91-TZ7E.js +0 -2
  111. package/dist/webDev-B79ji8M5.js +0 -2
@@ -1,21 +1,21 @@
1
- import { gn as e } from "./dev-1yu42ubu.js";
2
- import { $ as t, A as n, F as r, I as i, L as a, Q as o, a as s, b as c, d as l, et as u, f as d, ht as f, k as p, rt as m, s as h, v as g, vt as _, y as v } from "./webDev-B4IEMB0n.js";
3
- import { t as y } from "./cliRuntime-Dh7UDinH.js";
4
- import { a as b } from "./renderModeScan-D7J1B7Kw.js";
5
- import { i as x, o as S, s as C } from "./apiBuild-CFYXo06U.js";
6
- import { n as w } from "./renderProfile-1OWWAAtx.js";
7
- import { dirname as T, join as E, resolve as D } from "node:path";
8
- import { existsSync as O, promises as k } from "node:fs";
1
+ import { gn as e } from "./dev-kdAg9Q7l.js";
2
+ import { $ as t, A as n, I as r, L as i, R as a, a as o, b as s, d as c, et as l, f as u, gt as d, it as f, j as p, k as m, s as h, tt as g, v as _, y as v, yt as y } from "./webDev-B-ubQEMX.js";
3
+ import { t as b } from "./cliRuntime-Dh7UDinH.js";
4
+ import { a as x } from "./renderModeScan-D7J1B7Kw.js";
5
+ import { i as S, o as C, s as w } from "./apiBuild-CPDHXF72.js";
6
+ import { n as T } from "./renderProfile-1OWWAAtx.js";
7
+ import { dirname as E, join as D, resolve as O } from "node:path";
8
+ import { existsSync as k, promises as A } from "node:fs";
9
9
  import "node:url";
10
- import { createLogger as A } from "@voltro/logger";
11
- import { Effect as j } from "effect";
12
- import { createRequire as M } from "node:module";
10
+ import { createLogger as j } from "@voltro/logger";
11
+ import { Effect as M } from "effect";
12
+ import { createRequire as N } from "node:module";
13
13
  //#region src/webStartBundle.ts
14
- var N = A({ scope: "voltro:build" }), P = async (e) => {
15
- let t = await _("esbuild", () => import("esbuild")), n = E(e, ".framework"), r = E(n, "dist-web", "startBundle");
16
- await k.mkdir(n, { recursive: !0 });
17
- let i = Date.now(), a = E(e, "tsconfig.json"), o = /* @__PURE__ */ new Set(), s = E(n, "startEntry.ts");
18
- await k.writeFile(s, [
14
+ var P = j({ scope: "voltro:build" }), F = async (e) => {
15
+ let t = await y("esbuild", () => import("esbuild")), n = D(e, ".framework"), r = D(n, "dist-web", "startBundle");
16
+ await A.mkdir(n, { recursive: !0 });
17
+ let i = Date.now(), a = D(e, "tsconfig.json"), o = /* @__PURE__ */ new Set(), s = D(n, "startEntry.ts");
18
+ await A.writeFile(s, [
19
19
  "// GENERATED BY `voltro build` — do not edit; overwritten on next build.",
20
20
  "import { runStartCommand as __run, loadDotEnv } from '@voltro/cli/startEntry'",
21
21
  "import { pathToFileURL, fileURLToPath } from 'node:url'",
@@ -47,35 +47,35 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
47
47
  outdir: r,
48
48
  splitting: !0,
49
49
  write: !0,
50
- plugins: [S([], e, o)],
50
+ plugins: [C([], e, o)],
51
51
  banner: { js: "import { createRequire as __voltroRequire } from 'node:module'; const require = __voltroRequire(import.meta.url);" },
52
52
  jsx: "automatic",
53
53
  jsxImportSource: "react",
54
54
  logLevel: "silent",
55
55
  absWorkingDir: e,
56
- alias: x("startEntry"),
57
- ...O(a) ? { tsconfig: a } : {}
56
+ alias: S("startEntry"),
57
+ ...k(a) ? { tsconfig: a } : {}
58
58
  });
59
- let c = await C(r, i);
60
- return N.info("web build: start bundle written", {
61
- out: E(".framework", "dist-web", "startBundle", "startEntry.js"),
59
+ let c = await w(r, i);
60
+ return P.info("web build: start bundle written", {
61
+ out: D(".framework", "dist-web", "startBundle", "startEntry.js"),
62
62
  ...o.size > 0 ? { externalizedOptionalPeers: [...o].join(", ") } : {},
63
63
  ...c > 0 ? { prunedStaleChunks: c } : {}
64
- }), E(r, "startEntry.js");
65
- }, F = A({ scope: "voltro:build" }), I = (e, t) => ({
64
+ }), D(r, "startEntry.js");
65
+ }, I = j({ scope: "voltro:build" }), L = (e, t) => ({
66
66
  name: "voltro:ssr-optional-peer-external",
67
67
  enforce: "pre",
68
68
  resolveId(n, r) {
69
69
  if (n.startsWith(".") || n.startsWith("/") || n.startsWith("\0") || n.startsWith("node:") || n === "effect" || n.startsWith("@effect/") || n.startsWith("@voltro/")) return null;
70
- for (let t of [r ? T(r) : void 0, e]) if (t !== void 0) try {
71
- return M(E(t, "_.js")).resolve(n), null;
70
+ for (let t of [r ? E(r) : void 0, e]) if (t !== void 0) try {
71
+ return N(D(t, "_.js")).resolve(n), null;
72
72
  } catch {}
73
73
  return t.add(n), {
74
74
  id: n,
75
75
  external: !0
76
76
  };
77
77
  }
78
- }), L = (e) => /\[/.test(e), R = (e, t) => {
78
+ }), R = (e) => /\[/.test(e), z = (e, t) => {
79
79
  let n = e.split("/").filter(Boolean), r = [];
80
80
  for (let i of n) if (i.startsWith("[[...") && i.endsWith("]]")) {
81
81
  let e = t[i.slice(5, -2)];
@@ -91,48 +91,48 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
91
91
  r.push(a);
92
92
  } else r.push(i);
93
93
  return r.length === 0 ? "/" : "/" + r.join("/");
94
- }, z = (e, t) => {
95
- if (t === "/" || t === "") return E(e, "index.html");
94
+ }, B = (e, t) => {
95
+ if (t === "/" || t === "") return D(e, "index.html");
96
96
  let n = t.replace(/^\//, "").split("/");
97
- return E(e, ...n, "index.html");
98
- }, B = (e) => e.replace(/<script\b(?=[^>]*\btype="module")(?:(?!<\/script>).)*<\/script>/gi, "").replace(/<script\b(?=[^>]*\bsrc=)(?:(?!<\/script>).)*<\/script>/gi, "").replace(/<link\b[^>]*\brel="modulepreload"[^>]*>/gi, ""), V = (e, t) => {
97
+ return D(e, ...n, "index.html");
98
+ }, V = (e) => e.replace(/<script\b(?=[^>]*\btype="module")(?:(?!<\/script>).)*<\/script>/gi, "").replace(/<script\b(?=[^>]*\bsrc=)(?:(?!<\/script>).)*<\/script>/gi, "").replace(/<link\b[^>]*\brel="modulepreload"[^>]*>/gi, ""), H = (e, t) => {
99
99
  let r = e.replace("<div id=\"root\"></div>", `<div id="root">${t.body}</div>`), i = [
100
100
  t.metaHtml,
101
101
  `<meta name="voltro-interactive" content="${t.interactive}" />`,
102
102
  t.stateScript
103
103
  ].filter((e) => e.length > 0).join("\n ");
104
- return r = n(r, i), t.interactive === "none" && (r = B(r)), r;
105
- }, H = async (e) => {
106
- let { page: t, chainEntries: o, pageMod: c, helpers: l } = e, u = o.filter((e) => e.hasLayout);
107
- if (u.length === 0) return F.debug("skip page", {
104
+ return r = n(p(r, i), t.documentAttrs), t.interactive === "none" && (r = V(r)), r;
105
+ }, U = async (e) => {
106
+ let { page: t, chainEntries: n, pageMod: s, helpers: c } = e, l = n.filter((e) => e.hasLayout);
107
+ if (l.length === 0) return I.debug("skip page", {
108
108
  pattern: t.pattern,
109
109
  reason: "renderMode=spa with no layout — nothing to shell"
110
110
  }), null;
111
- if (L(t.pattern)) return F.debug("skip page", {
111
+ if (R(t.pattern)) return I.debug("skip page", {
112
112
  pattern: t.pattern,
113
113
  reason: "renderMode=spa with a dynamic pattern"
114
114
  }), null;
115
- let d = await Promise.all(u.map(e.loadLayout)), f = u.filter((e, t) => typeof d[t]?.loader == "function").map((e) => e.dir || "/");
116
- if (f.length > 0) return F.info(`spa shell for ${t.pattern} left to on-demand rendering — its layout chain has a loader (${f.join(", ")}), whose output may be per-request`, {
115
+ let u = await Promise.all(l.map(e.loadLayout)), d = l.filter((e, t) => typeof u[t]?.loader == "function").map((e) => e.dir || "/");
116
+ if (d.length > 0) return I.info(`spa shell for ${t.pattern} left to on-demand rendering — its layout chain has a loader (${d.join(", ")}), whose output may be per-request`, {
117
117
  pattern: t.pattern,
118
- layouts: f
118
+ layouts: d
119
119
  }), null;
120
- let { chain: p, segmentLoaderData: m } = await s({
121
- entries: o,
120
+ let { chain: f, segmentLoaderData: m } = await o({
121
+ entries: n,
122
122
  loadLayout: e.loadLayout,
123
123
  loadError: e.loadError,
124
124
  loadPending: e.loadPending,
125
125
  ctx: e.ctx
126
126
  }), h = {
127
127
  pattern: t.pattern,
128
- Component: c.default,
129
- meta: c.meta,
130
- ErrorBoundary: c.ErrorBoundary,
131
- Pending: c.Pending,
128
+ Component: s.default,
129
+ meta: s.meta,
130
+ ErrorBoundary: s.ErrorBoundary,
131
+ Pending: s.Pending,
132
132
  renderMode: "spa",
133
- chain: p
134
- }, g = c.interactive ?? "full", _ = r({
135
- helpers: l,
133
+ chain: f
134
+ }, g = s.interactive ?? "full", _ = r({
135
+ helpers: c,
136
136
  page: t.pattern,
137
137
  interactive: g,
138
138
  delivery: "artefact",
@@ -145,44 +145,44 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
145
145
  ...e.locale ? { locale: e.locale } : {}
146
146
  }
147
147
  }), v = i({
148
- helpers: l,
148
+ helpers: c,
149
149
  prepared: _
150
150
  }), y = a({
151
- helpers: l,
151
+ helpers: c,
152
152
  prepared: _,
153
153
  meta: v.meta,
154
154
  interactive: g
155
- }), b = n(e.shellTemplate.replace("<div id=\"root\"></div>", `<div id="root">${v.body}</div>`), y), x = z(e.distDir, t.pattern);
156
- return await k.mkdir(T(x), { recursive: !0 }), await k.writeFile(x, b, "utf8"), F.debug("prerendered spa layout shell", { pattern: t.pattern }), {
155
+ }), b = p(e.shellTemplate.replace("<div id=\"root\"></div>", `<div id="root">${v.body}</div>`), y), x = B(e.distDir, t.pattern);
156
+ return await A.mkdir(E(x), { recursive: !0 }), await A.writeFile(x, b, "utf8"), I.debug("prerendered spa layout shell", { pattern: t.pattern }), {
157
157
  pattern: t.pattern,
158
158
  outPath: x
159
159
  };
160
- }, U = async (e) => {
161
- let { root: t, distDir: n, pages: r, dirs: i, vite: a } = e, o = E(n, "index.html"), c = await k.readFile(o, "utf8"), l = E(n, "_voltro", "shell.html");
162
- await k.mkdir(T(l), { recursive: !0 }), await k.writeFile(l, c, "utf8");
163
- let u = E(t, "node_modules", "@voltro", "ui-shadcn"), d = O(E(u, "package.json")) ? u : null, f = [...d ? [
160
+ }, W = async (e) => {
161
+ let { root: t, distDir: n, pages: r, dirs: i, vite: a } = e, s = D(n, "index.html"), c = await A.readFile(s, "utf8"), l = D(n, "_voltro", "shell.html");
162
+ await A.mkdir(E(l), { recursive: !0 }), await A.writeFile(l, c, "utf8");
163
+ let u = D(t, "node_modules", "@voltro", "ui-shadcn"), d = k(D(u, "package.json")) ? u : null, p = [...d ? [
164
164
  {
165
165
  find: "@voltro/ui-shadcn/tokens.css",
166
- replacement: E(d, "src/tokens.css")
166
+ replacement: D(d, "src/tokens.css")
167
167
  },
168
168
  {
169
169
  find: "@voltro/ui-shadcn/cn",
170
- replacement: E(d, "src/cn.ts")
170
+ replacement: D(d, "src/cn.ts")
171
171
  },
172
172
  {
173
173
  find: "@voltro/ui-shadcn/brand",
174
- replacement: E(d, "src/brand/voltroLogo.tsx")
174
+ replacement: D(d, "src/brand/voltroLogo.tsx")
175
175
  },
176
176
  {
177
177
  find: "@voltro/ui-shadcn",
178
- replacement: E(d, "src/index.ts")
178
+ replacement: D(d, "src/index.ts")
179
179
  }
180
- ] : [], ...m(t)], g = await a.createServer({
181
- root: E(t, ".framework"),
180
+ ] : [], ...f(t)], g = await a.createServer({
181
+ root: D(t, ".framework"),
182
182
  envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
183
183
  plugins: [(await import("@vitejs/plugin-react")).default(), (await import("@tailwindcss/vite")).default()],
184
184
  resolve: {
185
- alias: f,
185
+ alias: p,
186
186
  dedupe: [
187
187
  "react",
188
188
  "react-dom",
@@ -198,20 +198,27 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
198
198
  },
199
199
  appType: "custom",
200
200
  logLevel: "warn"
201
- }), _ = await g.ssrLoadModule("@voltro/web/ssr"), { renderPageToHtml: v, renderMetaToHtml: y, renderRouterStateScript: x, isDeferredLoaderResult: S, assertDeferralSupported: C, beginStoreSeeds: w, seedPreloadedSubscription: D, seedPreloadedSubscriptionFailure: A } = _, j = /* @__PURE__ */ new Map();
201
+ }), _ = await g.ssrLoadModule("@voltro/web/ssr"), { renderPageToHtml: v, renderMetaToHtml: y, renderRouterStateScript: b, isDeferredLoaderResult: S, assertDeferralSupported: C, beginStoreSeeds: w, seedPreloadedSubscription: T, seedPreloadedSubscriptionFailure: O } = _, j, M = /* @__PURE__ */ new Map();
202
202
  if (e.locales && e.locales.length > 0 && e.defaultLocale) try {
203
- let n = (await g.ssrLoadModule("@voltro/i18n")).makeSsgWrap;
204
- if (typeof n != "function") throw Error("@voltro/i18n is installed but missing the `makeSsgWrap` export — upgrade @voltro/i18n to a version that ships SSG support.");
205
- for (let r of e.locales) try {
206
- let i = await g.ssrLoadModule(E(t, "src", "locales", `${r}.ts`)), a = i.default ?? i;
207
- j.set(r, n(r, a, e.defaultLocale));
203
+ let n = await g.ssrLoadModule("@voltro/i18n");
204
+ try {
205
+ j = (await g.ssrLoadModule("@voltro/i18n/server")).resolveTimeZone?.({
206
+ configured: e.timeZone ?? null,
207
+ defaultTimeZone: e.defaultTimeZone ?? null
208
+ });
209
+ } catch {}
210
+ let r = n.makeSsgWrap;
211
+ if (typeof r != "function") throw Error("@voltro/i18n is installed but missing the `makeSsgWrap` export — upgrade @voltro/i18n to a version that ships SSG support.");
212
+ for (let n of e.locales) try {
213
+ let i = await g.ssrLoadModule(D(t, "src", "locales", `${n}.ts`)), a = i.default ?? i;
214
+ M.set(n, r(n, a, e.defaultLocale));
208
215
  } catch (e) {
209
- F.warn(`i18n catalog missing for locale '${r}' — pages rendered at /${r}/* will crash. Add src/locales/${r}.ts.`, {}, e);
216
+ I.warn(`i18n catalog missing for locale '${n}' — pages rendered at /${n}/* will crash. Add src/locales/${n}.ts.`, {}, e);
210
217
  }
211
218
  } catch (e) {
212
- F.warn("i18n wrapper unavailable for SSG — pages that call useT() will fail. Check that @voltro/i18n is installed.", {}, e);
219
+ I.warn("i18n wrapper unavailable for SSG — pages that call useT() will fail. Check that @voltro/i18n is installed.", {}, e);
213
220
  }
214
- let M = [], N = {}, P = (e) => e.dir === "" ? E(t, "src", "pages") : E(t, "src", "pages", e.dir), I = async (e) => await g.ssrLoadModule(E(P(e), "layout.tsx")), B = async (e) => await g.ssrLoadModule(E(P(e), "error.tsx")), U = async (e) => await g.ssrLoadModule(E(P(e), "loading.tsx")), W = (e, t) => ({
221
+ let N = [], P = {}, F = (e) => e.dir === "" ? D(t, "src", "pages") : D(t, "src", "pages", e.dir), L = async (e) => await g.ssrLoadModule(D(F(e), "layout.tsx")), V = async (e) => await g.ssrLoadModule(D(F(e), "error.tsx")), W = async (e) => await g.ssrLoadModule(D(F(e), "loading.tsx")), G = (e, t) => ({
215
222
  params: e.params,
216
223
  pathname: e.pathname,
217
224
  search: "",
@@ -221,62 +228,62 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
221
228
  isServer: !0
222
229
  });
223
230
  for (let a of r) {
224
- let r = `${E(t, "src", "pages", a.file)}`, o = await g.ssrLoadModule(r), l = b(o, E("src", "pages", a.file));
225
- N[a.pattern] = l;
231
+ let r = `${D(t, "src", "pages", a.file)}`, s = await g.ssrLoadModule(r), l = x(s, D("src", "pages", a.file));
232
+ P[a.pattern] = l;
226
233
  let u = l.renderMode, d = h(i, a.dirChain);
227
234
  if (u === "spa") {
228
- let t = await H({
235
+ let t = await U({
229
236
  page: a,
230
237
  chainEntries: d,
231
- pageMod: o,
238
+ pageMod: s,
232
239
  shellTemplate: c,
233
240
  distDir: n,
234
241
  helpers: _,
235
- loadLayout: I,
236
- loadError: B,
237
- loadPending: U,
238
- ctx: W({
242
+ loadLayout: L,
243
+ loadError: V,
244
+ loadPending: W,
245
+ ctx: G({
239
246
  params: {},
240
247
  pathname: a.pattern
241
248
  }, new AbortController().signal),
242
- outerWrap: j.get(e.defaultLocale ?? ""),
249
+ outerWrap: M.get(e.defaultLocale ?? ""),
243
250
  locale: e.defaultLocale
244
251
  });
245
- t && M.push(t);
252
+ t && N.push(t);
246
253
  continue;
247
254
  }
248
255
  if (u !== "static") {
249
- F.debug("skip page", {
256
+ I.debug("skip page", {
250
257
  pattern: a.pattern,
251
258
  reason: `renderMode=${u}`
252
259
  });
253
260
  continue;
254
261
  }
255
262
  let f;
256
- if (L(a.pattern)) {
257
- if (typeof o.getStaticPaths != "function") {
258
- F.debug("skip page", {
263
+ if (R(a.pattern)) {
264
+ if (typeof s.getStaticPaths != "function") {
265
+ I.debug("skip page", {
259
266
  pattern: a.pattern,
260
267
  reason: "no getStaticPaths export"
261
268
  });
262
269
  continue;
263
270
  }
264
271
  try {
265
- let e = await o.getStaticPaths();
272
+ let e = await s.getStaticPaths();
266
273
  if (!Array.isArray(e)) {
267
- F.warn("skip page — getStaticPaths did not return an array", { pattern: a.pattern });
274
+ I.warn("skip page — getStaticPaths did not return an array", { pattern: a.pattern });
268
275
  continue;
269
276
  }
270
277
  f = e.map((e) => ({
271
278
  params: e.params,
272
- pathname: R(a.pattern, e.params)
279
+ pathname: z(a.pattern, e.params)
273
280
  }));
274
281
  } catch (e) {
275
- F.warn("skip page — getStaticPaths threw", { pattern: a.pattern }, e);
282
+ I.warn("skip page — getStaticPaths threw", { pattern: a.pattern }, e);
276
283
  continue;
277
284
  }
278
285
  if (f.length === 0) {
279
- F.debug("skip page", {
286
+ I.debug("skip page", {
280
287
  pattern: a.pattern,
281
288
  reason: "getStaticPaths returned []"
282
289
  });
@@ -286,47 +293,47 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
286
293
  params: {},
287
294
  pathname: a.pattern
288
295
  }];
289
- let m = o.interactive ?? "full";
296
+ let p = s.interactive ?? "full";
290
297
  for (let t of f) {
291
298
  w();
292
299
  let r, i, l = new AbortController();
293
300
  try {
294
- ({chain: r, segmentLoaderData: i} = await s({
301
+ ({chain: r, segmentLoaderData: i} = await o({
295
302
  entries: d,
296
- loadLayout: I,
297
- loadError: B,
298
- loadPending: U,
299
- ctx: W(t, l.signal)
303
+ loadLayout: L,
304
+ loadError: V,
305
+ loadPending: W,
306
+ ctx: G(t, l.signal)
300
307
  }));
301
308
  } catch (e) {
302
309
  let n = e?._voltroControl;
303
310
  if (e instanceof Error && n === "redirect") throw Error(`Static page "${t.pathname}" threw RedirectError from a LAYOUT loader at build time. Static pages can't redirect per-request — switch it to renderMode 'ssr'.`);
304
311
  if (e instanceof Error && n === "not-found") {
305
- F.warn("layout loader threw NotFoundError at build time — skipping artifact", { pathname: t.pathname });
312
+ I.warn("layout loader threw NotFoundError at build time — skipping artifact", { pathname: t.pathname });
306
313
  continue;
307
314
  }
308
- F.warn("layout loader threw, falling back to no layout data", { pathname: t.pathname }, e), {chain: r, segmentLoaderData: i} = await s({
315
+ I.warn("layout loader threw, falling back to no layout data", { pathname: t.pathname }, e), {chain: r, segmentLoaderData: i} = await o({
309
316
  entries: d,
310
- loadLayout: async (e) => ({ default: (await I(e)).default }),
311
- loadError: B,
312
- loadPending: U,
313
- ctx: W(t, l.signal)
317
+ loadLayout: async (e) => ({ default: (await L(e)).default }),
318
+ loadError: V,
319
+ loadPending: W,
320
+ ctx: G(t, l.signal)
314
321
  });
315
322
  }
316
323
  let f = {
317
324
  pattern: a.pattern,
318
- Component: o.default,
319
- meta: o.meta,
320
- loader: o.loader,
321
- ErrorBoundary: o.ErrorBoundary,
322
- Pending: o.Pending,
325
+ Component: s.default,
326
+ meta: s.meta,
327
+ loader: s.loader,
328
+ ErrorBoundary: s.ErrorBoundary,
329
+ Pending: s.Pending,
323
330
  renderMode: u,
324
331
  chain: r
325
332
  }, h = null;
326
- if (typeof o.loader == "function") {
333
+ if (typeof s.loader == "function") {
327
334
  let e = new AbortController();
328
335
  try {
329
- h = await o.loader({
336
+ h = await s.loader({
330
337
  params: t.params,
331
338
  pathname: t.pathname,
332
339
  search: "",
@@ -338,91 +345,105 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
338
345
  } catch (e) {
339
346
  if (e instanceof Error && e._voltroControl === "redirect") throw Error(`Static page "${t.pathname}" threw RedirectError at build time. Static pages can't redirect per-request — switch it to renderMode 'ssr'.`);
340
347
  if (e instanceof Error && e._voltroControl === "not-found") {
341
- F.warn("loader threw NotFoundError at build time — skipping artifact", { pathname: t.pathname });
348
+ I.warn("loader threw NotFoundError at build time — skipping artifact", { pathname: t.pathname });
342
349
  continue;
343
350
  }
344
- F.warn("loader threw, falling back to null", { pathname: t.pathname }, e);
351
+ I.warn("loader threw, falling back to null", { pathname: t.pathname }, e);
345
352
  }
346
353
  }
347
354
  S(h) && C({
348
355
  page: t.pathname,
349
356
  renderMode: u,
350
- interactive: m
357
+ interactive: p
351
358
  });
352
359
  for (let e of Object.values(i)) S(e) && C({
353
360
  page: t.pathname,
354
361
  renderMode: u,
355
- interactive: m
362
+ interactive: p
356
363
  });
357
- await p({
358
- pageMod: o,
364
+ await m({
365
+ pageMod: s,
359
366
  params: t.params,
360
367
  query: void 0,
361
368
  apiName: void 0,
362
- seed: D,
363
- seedFailure: A
369
+ seed: T,
370
+ seedFailure: O
364
371
  });
365
- let g = t.params.locale ?? e.defaultLocale ?? "en", _ = j.get(g) ?? j.get(e.defaultLocale ?? ""), { html: b, meta: E } = v({
372
+ let g = t.params.locale ?? e.defaultLocale ?? "en", _ = M.get(g) ?? M.get(e.defaultLocale ?? ""), x = Date.now(), D = _ ? (e) => _(e, {
373
+ timeZone: j,
374
+ renderedAt: x
375
+ }) : void 0, { html: k, meta: P } = v({
366
376
  descriptor: f,
367
377
  params: t.params,
368
378
  pathname: t.pathname,
369
379
  loaderData: h,
370
380
  segmentLoaderData: i,
371
- ..._ ? { outerWrap: _ } : {},
381
+ ...D ? { outerWrap: D } : {},
372
382
  locale: g
373
- }), O = V(c, {
374
- body: b,
375
- metaHtml: y(E),
376
- stateScript: x({
383
+ }), F = H(c, {
384
+ body: k,
385
+ metaHtml: y(P),
386
+ stateScript: b({
377
387
  path: t.pathname,
378
388
  loaderData: h,
379
389
  segmentLoaderData: i,
380
- pageLoaderRan: typeof o.loader == "function"
390
+ pageLoaderRan: typeof s.loader == "function"
381
391
  }),
382
- interactive: m
383
- }), N = z(n, t.pathname);
384
- await k.mkdir(T(N), { recursive: !0 }), await k.writeFile(N, O, "utf8"), M.push({
392
+ interactive: p,
393
+ documentAttrs: {
394
+ lang: g,
395
+ ...j === void 0 ? {} : { timeZone: j },
396
+ renderedAt: x
397
+ }
398
+ }), R = B(n, t.pathname);
399
+ await A.mkdir(E(R), { recursive: !0 }), await A.writeFile(R, F, "utf8"), N.push({
385
400
  pattern: t.pathname,
386
- outPath: N,
387
- ...E?.noIndex ? { noIndex: !0 } : {}
401
+ outPath: R,
402
+ ...P?.noIndex ? { noIndex: !0 } : {}
388
403
  });
389
404
  }
390
405
  }
391
406
  return await g.close(), {
392
- rendered: M,
393
- pageMeta: N
407
+ rendered: N,
408
+ pageMeta: P
394
409
  };
395
- }, W = async (e, t, n, r, i, a) => {
396
- let o = E(e, ".framework"), s = [];
397
- for (let e of t) s.push(` ${JSON.stringify(e.pattern)}: () => import('../src/pages/${e.file}'),`);
398
- let c = [], l = [], u = [];
410
+ }, G = async (e, t, n, r, i, a, o) => {
411
+ let s = D(e, ".framework"), c = [];
412
+ for (let e of t) c.push(` ${JSON.stringify(e.pattern)}: () => import('../src/pages/${e.file}'),`);
413
+ let l = [], u = [], d = [];
399
414
  for (let e of n) {
400
415
  let t = e.dir === "" ? "../src/pages" : `../src/pages/${e.dir}`, n = e.dir === "" ? "/" : e.dir;
401
- e.hasLayout && c.push(` ${JSON.stringify(n)}: () => import('${t}/layout.tsx'),`), e.hasError && l.push(` ${JSON.stringify(n)}: () => import('${t}/error.tsx'),`), e.hasPending && u.push(` ${JSON.stringify(n)}: () => import('${t}/loading.tsx'),`);
416
+ e.hasLayout && l.push(` ${JSON.stringify(n)}: () => import('${t}/layout.tsx'),`), e.hasError && u.push(` ${JSON.stringify(n)}: () => import('${t}/error.tsx'),`), e.hasPending && d.push(` ${JSON.stringify(n)}: () => import('${t}/loading.tsx'),`);
402
417
  }
403
- let d = [], f = [];
418
+ let f = [], p = [];
404
419
  if (r && r.length > 0 && i) for (let t of r) {
405
- if (!O(E(e, "src", "locales", `${t}.ts`))) continue;
420
+ if (!k(D(e, "src", "locales", `${t}.ts`))) continue;
406
421
  let n = `__i18nCat_${t.replace(/[^a-zA-Z0-9]/g, "_")}`;
407
- d.push(`import ${n} from '../src/locales/${t}'`), f.push(` ${JSON.stringify(t)}: makeSsgWrap(${JSON.stringify(t)}, ${n} as unknown as Record<string, string>, ${JSON.stringify(i)}),`);
422
+ f.push(`import ${n} from '../src/locales/${t}'`), p.push(` ${JSON.stringify(t)}: makeSsgWrap(${JSON.stringify(t)}, ${n} as unknown as Record<string, string>, ${JSON.stringify(i)}),`);
408
423
  }
409
- let p = f.length > 0, m = !p && r !== void 0 && r.length > 0 && i !== void 0, h = p ? [
424
+ let m = p.length > 0, h = !m && r !== void 0 && r.length > 0 && i !== void 0, g = m ? [
410
425
  "import { makeSsgWrap } from '@voltro/i18n'",
411
426
  "import { makeSsrI18nResolver } from '@voltro/i18n/server'",
412
- ...d
413
- ] : m ? ["import { resolveLocale } from '@voltro/i18n/server'"] : [], g = p ? [
427
+ ...f
428
+ ] : h ? ["import { resolveLocale, resolveTimeZone } from '@voltro/i18n/server'"] : [], _ = m ? [
414
429
  "",
415
430
  `const __I18N_SUPPORTED = ${JSON.stringify(r)} as ReadonlyArray<string>`,
416
431
  `const __I18N_DEFAULT = ${JSON.stringify(i)}`,
417
- "const __i18nWraps: Record<string, (children: unknown) => unknown> = {",
418
- ...f,
432
+ "const __i18nWraps: Record<string, (children: unknown, request?: { timeZone?: string | undefined; renderedAt?: number | undefined }) => unknown> = {",
433
+ ...p,
419
434
  "}",
420
435
  "// Cookie voltro:locale > Accept-Language > default → the matching wrapper.",
421
436
  "// The SAME resolver `voltro dev` calls (webDev.ts) — this used to be a",
422
437
  "// hand-written copy here and NOTHING at all in dev, which is why a",
423
438
  "// localized page rendered under `voltro start` and threw under `voltro dev`.",
424
- "const __resolveI18n = makeSsrI18nResolver({ wraps: __i18nWraps, supported: __I18N_SUPPORTED, defaultLocale: __I18N_DEFAULT })"
425
- ] : m ? [
439
+ "const __resolveI18n = makeSsrI18nResolver({",
440
+ " wraps: __i18nWraps,",
441
+ " supported: __I18N_SUPPORTED,",
442
+ " defaultLocale: __I18N_DEFAULT,",
443
+ ` timeZone: ${JSON.stringify(o?.timeZone ?? null)},`,
444
+ ` defaultTimeZone: ${JSON.stringify(o?.defaultTimeZone ?? null)},`,
445
+ "})"
446
+ ] : h ? [
426
447
  "",
427
448
  `const __I18N_SUPPORTED = ${JSON.stringify(r)} as ReadonlyArray<string>`,
428
449
  `const __I18N_DEFAULT = ${JSON.stringify(i)}`,
@@ -437,67 +458,72 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
437
458
  " supported: __I18N_SUPPORTED,",
438
459
  " defaultLocale: __I18N_DEFAULT,",
439
460
  " }),",
461
+ " timeZone: resolveTimeZone({",
462
+ " cookieHeader: cookieHeader ?? null,",
463
+ ` configured: ${JSON.stringify(o?.timeZone ?? null)},`,
464
+ ` defaultTimeZone: ${JSON.stringify(o?.defaultTimeZone ?? null)},`,
465
+ " }),",
440
466
  " outerWrap: (children: unknown) => children,",
441
467
  "})"
442
- ] : [], _ = "renderPageToHtml, renderPageToStream, renderMetaToHtml, renderRouterStateScript, renderDeferredRegistryScript, prepareDeferredLoaderData, assertDeferralSupported, parseCookieHeader, withStoreSeeds, beginStoreSeeds", v = p || m ? `export const helpers = { ${_}, i18n: { resolve: __resolveI18n } }` : `export const helpers = { ${_} }`, y = [
468
+ ] : [], v = "renderPageToHtml, renderPageToStream, renderMetaToHtml, renderRouterStateScript, renderDeferredRegistryScript, prepareDeferredLoaderData, assertDeferralSupported, parseCookieHeader, withStoreSeeds, beginStoreSeeds", y = m || h ? `export const helpers = { ${v}, i18n: { resolve: __resolveI18n } }` : `export const helpers = { ${v} }`, b = [
443
469
  "// GENERATED BY `voltro build` — do not edit; will be overwritten on next build.",
444
470
  "// Entry for the pre-built SSR bundle. Imported by `voltro start`'s",
445
471
  "// production runtime; bypasses Vite middleware-mode SSR loading.",
446
472
  "",
447
473
  "import { renderPageToHtml, renderPageToStream, renderMetaToHtml, renderRouterStateScript, renderDeferredRegistryScript, prepareDeferredLoaderData, assertDeferralSupported, parseCookieHeader, withStoreSeeds, beginStoreSeeds } from '@voltro/web/ssr'",
448
- ...h,
474
+ ...g,
449
475
  "",
450
476
  "// Lazy page loaders — a page's module (and content) loads only when its",
451
477
  "// route is rendered, so importing this entry never pulls every page into memory.",
452
478
  "export const pages: Record<string, () => Promise<unknown>> = {",
453
- ...s,
479
+ ...c,
454
480
  "}",
455
481
  "// Build-time per-route metadata — `voltro start` reads this instead of",
456
482
  "// importing every page module at boot just to inspect its render mode.",
457
483
  `export const pageMeta: Record<string, unknown> = ${JSON.stringify(a ?? {}, null, 2)}`,
458
484
  "export const layouts: Record<string, () => Promise<unknown>> = {",
459
- ...c,
485
+ ...l,
460
486
  "}",
461
487
  "export const errors: Record<string, () => Promise<unknown>> = {",
462
- ...l,
488
+ ...u,
463
489
  "}",
464
490
  "export const pendings: Record<string, () => Promise<unknown>> = {",
465
- ...u,
491
+ ...d,
466
492
  "}",
467
- ...g,
493
+ ..._,
468
494
  "",
469
- v,
495
+ y,
470
496
  ""
471
- ].join("\n"), b = E(o, "ssrEntry.ts");
472
- return await k.writeFile(b, y, "utf8"), b;
473
- }, G = async (e) => {
497
+ ].join("\n"), x = D(s, "ssrEntry.ts");
498
+ return await A.writeFile(x, b, "utf8"), x;
499
+ }, K = async (e) => {
474
500
  let { checkRpcGroupFreshness: t } = await import("./codegen-DiMn2KkZ.js"), n = await t(e);
475
501
  if (n.kind === "fresh") return;
476
- n.kind === "stale" && F.info("rpcGroup.generated.ts is stale — regenerating", {
502
+ n.kind === "stale" && I.info("rpcGroup.generated.ts is stale — regenerating", {
477
503
  file: n.file,
478
504
  reason: n.reason
479
505
  });
480
- let { regenerateRpcGroup: r } = await import("./codegenCommand-BJzaRz6q.js"), i = await r(e);
506
+ let { regenerateRpcGroup: r } = await import("./codegenCommand-BNBHcNNj.js"), i = await r(e);
481
507
  if (i.kind === "refused") {
482
- F.warn("could not regenerate the rpc group — building against what is on disk", { reason: i.reason });
508
+ I.warn("could not regenerate the rpc group — building against what is on disk", { reason: i.reason });
483
509
  return;
484
510
  }
485
- i.kind === "wrote" && n.kind === "stale" && F.info("rpc group regenerated", {
511
+ i.kind === "wrote" && n.kind === "stale" && I.info("rpc group regenerated", {
486
512
  plugins: i.plugins,
487
513
  routes: i.routes
488
514
  });
489
- }, K = async (e) => {
490
- let n = await l(e);
515
+ }, q = async (e) => {
516
+ let n = await c(e);
491
517
  if (!n) {
492
- let { loadApiConfig: t } = await import("./dev-BWwE0QjK.js"), n = await t(e);
518
+ let { loadApiConfig: t } = await import("./dev-CK522MV5.js"), n = await t(e);
493
519
  if (n) {
494
- F.info("building api app", { app: n.name ?? "(unnamed)" }), await G(e);
495
- let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-BWo8KI6n.js");
520
+ I.info("building api app", { app: n.name ?? "(unnamed)" }), await K(e);
521
+ let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-GDKuGOMV.js");
496
522
  await t(e);
497
523
  try {
498
524
  await r(e);
499
525
  } catch (e) {
500
- return F.fatal("serve bundle build FAILED — refusing to ship a bundle-less image. Fix the error above (production serves from the bundle, never tsx).", {}, e), {
526
+ return I.fatal("serve bundle build FAILED — refusing to ship a bundle-less image. Fix the error above (production serves from the bundle, never tsx).", {}, e), {
501
527
  ran: !0,
502
528
  exitCode: 1
503
529
  };
@@ -512,45 +538,45 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
512
538
  exitCode: 0
513
539
  };
514
540
  }
515
- F.info("building web app", { app: n.name ?? "(unnamed)" });
516
- let { resolved: r } = await f({
541
+ I.info("building web app", { app: n.name ?? "(unnamed)" });
542
+ let { resolved: r } = await d({
517
543
  rawEnv: n.env,
518
544
  appType: "web",
519
545
  root: e,
520
- log: F,
546
+ log: I,
521
547
  generateTypes: !0
522
- }), i = await d(e, n);
523
- await c(e, n, i, r.publicValues);
524
- let { pages: a } = await v(E(e, "src", "pages"));
525
- await u({
548
+ }), i = await u(e, n);
549
+ await s(e, n, i, r.publicValues);
550
+ let { pages: a } = await v(D(e, "src", "pages"));
551
+ await g({
526
552
  appRoot: e,
527
553
  pages: a,
528
554
  mode: "prod"
529
555
  });
530
- let s = E(e, ".framework"), p = E(s, "dist"), h = E(e, "node_modules", "@voltro", "ui-shadcn"), y = O(E(h, "package.json")) ? h : null, b = [...y ? [
556
+ let o = D(e, ".framework"), p = D(o, "dist"), m = D(e, "node_modules", "@voltro", "ui-shadcn"), h = k(D(m, "package.json")) ? m : null, b = [...h ? [
531
557
  {
532
558
  find: "@voltro/ui-shadcn/tokens.css",
533
- replacement: E(y, "src/tokens.css")
559
+ replacement: D(h, "src/tokens.css")
534
560
  },
535
561
  {
536
562
  find: "@voltro/ui-shadcn/cn",
537
- replacement: E(y, "src/cn.ts")
563
+ replacement: D(h, "src/cn.ts")
538
564
  },
539
565
  {
540
566
  find: "@voltro/ui-shadcn/brand",
541
- replacement: E(y, "src/brand/voltroLogo.tsx")
567
+ replacement: D(h, "src/brand/voltroLogo.tsx")
542
568
  },
543
569
  {
544
570
  find: "@voltro/ui-shadcn",
545
- replacement: E(y, "src/index.ts")
571
+ replacement: D(h, "src/index.ts")
546
572
  }
547
- ] : [], ...m(e)];
548
- F.info("running vite build");
549
- let x = await _("vite", () => import("vite")), C = (await import("@vitejs/plugin-react")).default, T = (await import("@tailwindcss/vite")).default;
573
+ ] : [], ...f(e)];
574
+ I.info("running vite build");
575
+ let x = await y("vite", () => import("vite")), S = (await import("@vitejs/plugin-react")).default, w = (await import("@tailwindcss/vite")).default;
550
576
  await x.build({
551
- root: s,
577
+ root: o,
552
578
  envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
553
- plugins: [C(), T()],
579
+ plugins: [S(), w()],
554
580
  resolve: {
555
581
  alias: b,
556
582
  dedupe: [
@@ -560,41 +586,46 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
560
586
  "@voltro/i18n"
561
587
  ]
562
588
  },
563
- publicDir: E(e, "public"),
589
+ publicDir: D(e, "public"),
564
590
  build: {
565
591
  outDir: "dist",
566
592
  emptyOutDir: !0,
567
- rollupOptions: { output: { manualChunks: g } }
593
+ rollupOptions: { output: { manualChunks: _ } }
568
594
  },
569
595
  logLevel: "warn"
570
596
  });
571
- let D = E(e, "src", "pages"), { pages: A, dirs: j } = await v(D);
572
- if (A.length === 0) return F.info("no pages found — client-only bundle written", {
573
- pagesDir: D,
597
+ let E = D(e, "src", "pages"), { pages: O, dirs: j } = await v(E);
598
+ if (O.length === 0) return I.info("no pages found — client-only bundle written", {
599
+ pagesDir: E,
574
600
  distDir: p
575
601
  }), {
576
602
  ran: !0,
577
603
  exitCode: 0
578
604
  };
579
- let { rendered: M, pageMeta: N } = await U({
605
+ let { rendered: M, pageMeta: N } = await W({
580
606
  root: e,
581
607
  distDir: p,
582
- pages: A,
608
+ pages: O,
583
609
  dirs: j,
584
610
  vite: x,
585
611
  ...n.locales ? { locales: n.locales } : {},
586
- ...n.defaultLocale ? { defaultLocale: n.defaultLocale } : {}
612
+ ...n.defaultLocale ? { defaultLocale: n.defaultLocale } : {},
613
+ ...n.timeZone ? { timeZone: n.timeZone } : {},
614
+ ...n.defaultTimeZone ? { defaultTimeZone: n.defaultTimeZone } : {}
587
615
  });
588
- F.info("generating .framework/ssrEntry.ts"), await W(e, A, j, n.locales, n.defaultLocale, N), F.info("vite build --ssr → dist/server/");
589
- let L = /* @__PURE__ */ new Set();
616
+ I.info("generating .framework/ssrEntry.ts"), await G(e, O, j, n.locales, n.defaultLocale, N, {
617
+ ...n.timeZone ? { timeZone: n.timeZone } : {},
618
+ ...n.defaultTimeZone ? { defaultTimeZone: n.defaultTimeZone } : {}
619
+ }), I.info("vite build --ssr → dist/server/");
620
+ let P = /* @__PURE__ */ new Set();
590
621
  try {
591
622
  await x.build({
592
- root: s,
623
+ root: o,
593
624
  envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
594
625
  plugins: [
595
- C(),
596
- T(),
597
- I(e, L)
626
+ S(),
627
+ w(),
628
+ L(e, P)
598
629
  ],
599
630
  resolve: {
600
631
  alias: b,
@@ -613,109 +644,109 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
613
644
  rollupOptions: { output: { format: "esm" } }
614
645
  },
615
646
  logLevel: "warn"
616
- }), F.info("SSR bundle ready", {
647
+ }), I.info("SSR bundle ready", {
617
648
  path: "dist/server/ssrEntry.js",
618
- ...L.size > 0 ? { externalizedOptionalPeers: [...L].join(", ") } : {}
649
+ ...P.size > 0 ? { externalizedOptionalPeers: [...P].join(", ") } : {}
619
650
  });
620
651
  } catch (e) {
621
- return F.fatal("SSR bundle build FAILED — refusing to ship a bundle-less image. Fix the error above (production renders from the SSR bundle, never by compiling on demand).", {}, e), {
652
+ return I.fatal("SSR bundle build FAILED — refusing to ship a bundle-less image. Fix the error above (production renders from the SSR bundle, never by compiling on demand).", {}, e), {
622
653
  ran: !0,
623
654
  exitCode: 1
624
655
  };
625
656
  }
626
- let R = E(e, "app.config.ts");
627
- if (O(R)) {
628
- F.info("precompiling app.config.ts → dist/server/appConfig.js");
657
+ let R = D(e, "app.config.ts");
658
+ if (k(R)) {
659
+ I.info("precompiling app.config.ts → dist/server/appConfig.js");
629
660
  try {
630
- await (await _("esbuild", () => import("esbuild"))).build({
661
+ await (await y("esbuild", () => import("esbuild"))).build({
631
662
  entryPoints: [R],
632
- outfile: E(p, "server", "appConfig.js"),
663
+ outfile: D(p, "server", "appConfig.js"),
633
664
  bundle: !0,
634
665
  format: "esm",
635
666
  platform: "node",
636
667
  target: "node22",
637
- plugins: [S([], e, /* @__PURE__ */ new Set())],
668
+ plugins: [C([], e, /* @__PURE__ */ new Set())],
638
669
  banner: { js: "import { createRequire as __voltroRequire } from 'node:module'; const require = __voltroRequire(import.meta.url);" },
639
670
  jsx: "automatic",
640
671
  jsxImportSource: "react",
641
672
  absWorkingDir: e,
642
673
  logLevel: "silent",
643
- ...O(E(e, "tsconfig.json")) ? { tsconfig: E(e, "tsconfig.json") } : {}
674
+ ...k(D(e, "tsconfig.json")) ? { tsconfig: D(e, "tsconfig.json") } : {}
644
675
  });
645
676
  } catch (e) {
646
- return F.fatal("app.config precompile FAILED — production `voltro start` would need the tsx loader to read it.", {}, e), {
677
+ return I.fatal("app.config precompile FAILED — production `voltro start` would need the tsx loader to read it.", {}, e), {
647
678
  ran: !0,
648
679
  exitCode: 1
649
680
  };
650
681
  }
651
682
  }
652
683
  try {
653
- await P(e);
684
+ await F(e);
654
685
  } catch (e) {
655
- F.warn("start bundle build failed — `voltro start` will use the slower per-module boot", {}, e);
686
+ I.warn("start bundle build failed — `voltro start` will use the slower per-module boot", {}, e);
656
687
  }
657
- F.info(`pre-rendered ${M.length} static route(s)`, {
688
+ I.info(`pre-rendered ${M.length} static route(s)`, {
658
689
  count: M.length,
659
690
  routes: M.map((e) => e.pattern)
660
691
  });
661
692
  try {
662
693
  let e = process.env.VOLTRO_SEO_NOINDEX !== "1", r = n.seo?.siteUrl, i = n.locales ?? [], a = n.defaultLocale ?? i[0];
663
- if (r && !O(E(p, "sitemap.xml"))) {
664
- let n = new Set(i.filter((e) => e !== a)), o = M.filter((e) => !e.noIndex).map((e) => e.pattern).filter((e) => {
665
- let t = e.split("/").filter(Boolean)[0];
666
- return t === void 0 || !n.has(t);
667
- }).filter((e) => !e.includes("[")).map((e) => ({ path: e })), s = t({
694
+ if (r && !k(D(p, "sitemap.xml"))) {
695
+ let t = new Set(i.filter((e) => e !== a)), n = M.filter((e) => !e.noIndex).map((e) => e.pattern).filter((e) => {
696
+ let n = e.split("/").filter(Boolean)[0];
697
+ return n === void 0 || !t.has(n);
698
+ }).filter((e) => !e.includes("[")).map((e) => ({ path: e })), o = l({
668
699
  siteUrl: r,
669
- entries: o,
700
+ entries: n,
670
701
  ...i.length > 1 ? { locales: i } : {},
671
702
  ...a ? { defaultLocale: a } : {}
672
703
  });
673
- await k.writeFile(E(p, "sitemap.xml"), s, "utf8"), F.info("wrote dist/sitemap.xml", {
674
- urls: o.length,
704
+ await A.writeFile(D(p, "sitemap.xml"), o, "utf8"), I.info("wrote dist/sitemap.xml", {
705
+ urls: n.length,
675
706
  indexable: e
676
707
  });
677
708
  }
678
- if (!O(E(p, "robots.txt"))) {
679
- let t = o({
709
+ if (!k(D(p, "robots.txt"))) {
710
+ let i = t({
680
711
  indexable: e,
681
712
  ...e && r ? { sitemapUrl: `${r.replace(/\/$/, "")}/sitemap.xml` } : {},
682
713
  ...n.seo?.disallow ? { disallow: n.seo.disallow } : {}
683
714
  });
684
- await k.writeFile(E(p, "robots.txt"), t, "utf8"), F.info("wrote dist/robots.txt", { indexable: e });
715
+ await A.writeFile(D(p, "robots.txt"), i, "utf8"), I.info("wrote dist/robots.txt", { indexable: e });
685
716
  }
686
717
  } catch (e) {
687
- F.warn("SEO artefact generation failed (non-fatal)", {}, e);
718
+ I.warn("SEO artefact generation failed (non-fatal)", {}, e);
688
719
  }
689
720
  try {
690
- let t = await w(e);
691
- await k.writeFile(E(p, ".voltro-build.json"), JSON.stringify({
721
+ let t = await T(e);
722
+ await A.writeFile(D(p, ".voltro-build.json"), JSON.stringify({
692
723
  version: 1,
693
724
  profile: t
694
- }, null, 2), "utf8"), F.info("wrote deploy profile manifest", {
725
+ }, null, 2), "utf8"), I.info("wrote deploy profile manifest", {
695
726
  staticSafe: t.staticSafe,
696
727
  ssr: t.counts.ssr,
697
728
  isr: t.counts.isr
698
729
  });
699
730
  } catch (e) {
700
- F.warn("could not write .voltro-build.json deploy manifest", {}, e);
731
+ I.warn("could not write .voltro-build.json deploy manifest", {}, e);
701
732
  }
702
- return F.info("build complete", { distDir: p }), {
733
+ return I.info("build complete", { distDir: p }), {
703
734
  ran: !0,
704
735
  exitCode: 0
705
736
  };
706
- }, q = (e) => j.gen(function* () {
707
- let t = yield* j.tryPromise({
708
- try: () => K(D(e)),
737
+ }, J = (e) => M.gen(function* () {
738
+ let t = yield* M.tryPromise({
739
+ try: () => q(O(e)),
709
740
  catch: (e) => e
710
- }).pipe(j.orDie);
711
- return t.ran ? t.exitCode : (yield* j.logError("no web app found at this path", { hint: "looked for app.config.ts with `type: 'web'`" }), 1);
712
- }), J = async (t) => {
741
+ }).pipe(M.orDie);
742
+ return t.ran ? t.exitCode : (yield* M.logError("no web app found at this path", { hint: "looked for app.config.ts with `type: 'web'`" }), 1);
743
+ }), Y = async (t) => {
713
744
  if (t.includes("--target")) {
714
- let { runSdkBuildCommand: e } = await import("./sdkgen-dl4-WKF6.js");
745
+ let { runSdkBuildCommand: e } = await import("./sdkgen-O4XqWOjM.js");
715
746
  return e(t);
716
747
  }
717
- let n = t.find((e) => !e.startsWith("-")) ?? process.cwd(), r = await y(q(n), { scope: "voltro:build" }), i = e(n);
718
- return i.warning !== void 0 && F.warn(i.warning), r;
748
+ let n = t.find((e) => !e.startsWith("-")) ?? process.cwd(), r = await b(J(n), { scope: "voltro:build" }), i = e(n);
749
+ return i.warning !== void 0 && I.warn(i.warning), r;
719
750
  };
720
751
  //#endregion
721
- export { J as runBuildCommand };
752
+ export { Y as runBuildCommand };