@voltro/cli 0.54.0 → 0.55.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.
- package/CHANGELOG.md +142 -2
- package/dist/{apiBuild-DTWp0S_q.js → apiBuild-CMvLJM_K.js} +2 -2
- package/dist/apiBuild-Cl0IDx8c.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/{build-D4ygSbnV.js → build-S0QOzqPT.js} +10 -10
- package/dist/{checkCommand-L7DTlpIF.js → checkCommand-DNkY5kwF.js} +1 -1
- package/dist/{checkCommand-Dg1G7Gwd.js → checkCommand-fbj9GDjN.js} +5 -5
- package/dist/codegen-CN6vMM4J.js +2 -0
- package/dist/{codegen-DSLM8Su9.js → codegen-SIepQtUl.js} +74 -63
- package/dist/{codegenCommand-CG_Vx4lc.js → codegenCommand-3TDJezom.js} +10 -9
- package/dist/{codemodRunner-Cd4xkC6u.js → codemodRunner-C2zxZUIw.js} +55 -0
- package/dist/{commands-6Kzi92Np.js → commands-BBYJ7Q3B.js} +24 -24
- package/dist/{dashboardCommand-Cq1PWvI1.js → dashboardCommand-D2kmyCLL.js} +3 -3
- package/dist/{dataCommand-DYzW8vkv.js → dataCommand-BEPPQiTl.js} +266 -194
- package/dist/dbCommand-BTyBGhIA.js +2 -0
- package/dist/{dbCommand-B4NWZtGL.js → dbCommand-DZTmOFT4.js} +1 -1
- package/dist/{dev-CmuvUKRq.js → dev-Ca_A_S9v.js} +2182 -2157
- package/dist/{dev-cKUiZZsB.js → dev-DfVZaoys.js} +1 -1
- package/dist/{doctorCommand-DCiFVMtZ.js → doctorCommand-CGZJK_4o.js} +15 -15
- package/dist/doctorCommand-djmqEcDC.js +2 -0
- package/dist/{dormancyCommand-w1TrmgYP.js → dormancyCommand-DY2rYpTa.js} +1 -1
- package/dist/{embeddingsCommand-CMgPyRTr.js → embeddingsCommand-BoCqZsgp.js} +1 -1
- package/dist/{envCommand-Cyynmcfa.js → envCommand-Bxy2fOjc.js} +2 -2
- package/dist/{evolveCommand-BwvQ8dVH.js → evolveCommand-BsbZ-XDg.js} +2 -2
- package/dist/frameworkTableAssembly-Df2Ymp2f.js +2 -0
- package/dist/{frameworkTableAssembly-D7LJuALW.js → frameworkTableAssembly-Do-cf6RJ.js} +92 -98
- package/dist/index.js +1 -1
- package/dist/{infoCommand-DlYlUPqs.js → infoCommand-EmM3jPKD.js} +1 -1
- package/dist/{inspect-Bd8-9wsi.js → inspect-DCqILJ1G.js} +4 -0
- package/dist/inspect-DGJwpOAb.js +2 -0
- package/dist/interruptedReplace-CwnkBb2X.js +41 -0
- package/dist/interruptedReplace-qzmFI020.js +2 -0
- package/dist/manifestBuild-CJ2zvPvT.js +2 -0
- package/dist/{manifestBuild-Cqgsx2bM.js → manifestBuild-DjX5MoXy.js} +1 -1
- package/dist/{migrate-BK_Bbx-_.js → migrate-CGFZS-1a.js} +2 -2
- package/dist/{probeCommand-_C0YU207.js → probeCommand-Bs3iVBSL.js} +1 -1
- package/dist/{runtimeTrace-CGWx1Q6l.js → runtimeTrace-C1BTpHGQ.js} +1 -1
- package/dist/{sdkgen-CDGHQUFj.js → sdkgen-CXMwLg9n.js} +1 -1
- package/dist/{serveCommand-Bje09q1v.js → serveCommand-C7IrCD58.js} +840 -838
- package/dist/serveCommand-Cjt5S9hD.js +2 -0
- package/dist/serveEntry.js +1 -1
- package/dist/{start-B0bnJgxI.js → start-DH7cat4-.js} +1 -1
- package/dist/{start-Clz-1BHB.js → start-EOV7s1NZ.js} +486 -476
- package/dist/startEntry.js +1 -1
- package/dist/{test-D_kW4KMj.js → test-DO27-x2P.js} +1 -1
- package/dist/{updateCommand-CRJlAOaM.js → updateCommand-C_jN1w18.js} +1 -1
- package/dist/updateCommand-nnFjDbl4.js +2 -0
- package/dist/{webDev-DlvZO30c.js → webDev-1XpVnYkW.js} +1 -1
- package/dist/{webDev-DSI9SOhs.js → webDev-B7vNj4Bq.js} +502 -494
- package/dist/{webhooksCommand-BvzXNHji.js → webhooksCommand-B1LVcyO3.js} +1 -1
- package/package.json +31 -19
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/authentication.md +49 -6
- package/templates/agent-docs/cli.md +94 -11
- package/templates/agent-docs/data.md +64 -13
- package/templates/agent-docs/plugins.md +46 -8
- package/templates/agent-docs/reference.md +5 -3
- package/templates/agent-docs/routing.md +18 -0
- package/templates/agent-docs/schema-driven-ui.md +125 -0
- package/templates/agent-docs/whats-new.md +76 -133
- package/templates/apps/api-ai/package.json +6 -6
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-sqlite/package.json +8 -8
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-cms/package.json +9 -9
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/api-row-history/package.json +8 -8
- package/templates/apps/api-saas/package.json +11 -11
- package/templates/apps/api-saas-starter/package.json +10 -10
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-status/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +7 -7
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-app/package.json +9 -9
- package/templates/apps/frontend-auth/package.json +8 -8
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-cms/package.json +9 -9
- package/templates/apps/frontend-collab/package.json +10 -10
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-docs/package.json +8 -8
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +7 -7
- package/templates/apps/frontend-portal/package.json +8 -8
- package/templates/apps/frontend-saas/package.json +8 -8
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-static-blog/package.json +8 -8
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +4 -4
- package/dist/apiBuild-CeUN55uk.js +0 -2
- package/dist/codegen-DjgxEOnD.js +0 -2
- package/dist/dbCommand-CSFWs9ev.js +0 -2
- package/dist/doctorCommand-J3qu4E0Y.js +0 -2
- package/dist/frameworkTableAssembly-IPD1pUnZ.js +0 -2
- package/dist/inspect-CuoDInfZ.js +0 -2
- package/dist/interruptedReplace-C3O3M1MM.js +0 -28
- package/dist/interruptedReplace-CvmiAM9K.js +0 -2
- package/dist/manifestBuild-C4-J1-m_.js +0 -2
- package/dist/serveCommand-BiPe8BJm.js +0 -2
- package/dist/updateCommand-CIoVDKnj.js +0 -2
|
@@ -3,20 +3,20 @@ import { n as t } from "./loadEnv-D9nEOClM.js";
|
|
|
3
3
|
import { t as n } from "./bootRefusal-pgvDxlrU.js";
|
|
4
4
|
import { r } from "./appPort-B_HpJ_ck.js";
|
|
5
5
|
import { M as i, _ as a, c as o, g as s, v as c, y as l } from "./fileConventions-l-RIXbx8.js";
|
|
6
|
-
import { A as u, D as d, a as f, h as p, j as m, k as h } from "./inspect-
|
|
6
|
+
import { A as u, D as d, a as f, h as p, j as m, k as h } from "./inspect-DCqILJ1G.js";
|
|
7
7
|
import { n as g, t as _ } from "./workspaceDeps-RKEkX92S.js";
|
|
8
8
|
import { n as v } from "./agentsMd-BaLC10Na.js";
|
|
9
|
-
import { c as
|
|
10
|
-
import { a as
|
|
11
|
-
import { d as
|
|
12
|
-
import { t as
|
|
13
|
-
import { i as
|
|
14
|
-
import { n as
|
|
15
|
-
import { basename as
|
|
16
|
-
import { existsSync as
|
|
17
|
-
import { fileURLToPath as
|
|
18
|
-
import { addSink as
|
|
19
|
-
import { Metric as
|
|
9
|
+
import { c as ee, f as te, p as y, t as b } from "./renderModeScan-43yQ2opo.js";
|
|
10
|
+
import { a as x, c as S, d as C, f as w, i as T, l as E, o as ne, p as D, r as O, s as re, t as k } from "./imagePipeline-CBZmjT4i.js";
|
|
11
|
+
import { d as A, n as j } from "./fontPipeline-Tsh8kZfA.js";
|
|
12
|
+
import { t as ie } from "./pageConvention-CMpfDN6r.js";
|
|
13
|
+
import { i as ae, n as oe, r as se, t as ce } from "./runtimeRegistry-DMeKfTHP.js";
|
|
14
|
+
import { n as le } from "./logFileSink-B4uP8pvf.js";
|
|
15
|
+
import { basename as ue, dirname as M, extname as de, join as N, relative as P, resolve as F, sep as I } from "node:path";
|
|
16
|
+
import { existsSync as L, mkdirSync as R, promises as z, readFileSync as B, readdirSync as fe, statSync as pe, unwatchFile as V, watchFile as me, writeFileSync as he } from "node:fs";
|
|
17
|
+
import { fileURLToPath as H, pathToFileURL as U } from "node:url";
|
|
18
|
+
import { addSink as ge, createLogger as W, printReadyBlock as _e } from "@voltro/logger";
|
|
19
|
+
import { Metric as G, MetricBoundaries as ve } from "effect";
|
|
20
20
|
import { createRequire as ye } from "node:module";
|
|
21
21
|
import { classifyRequestOrigin as be, currentTraceContext as xe, resolveOriginGuardConfig as Se, resolveSecret as Ce } from "@voltro/runtime";
|
|
22
22
|
import { homedir as we } from "node:os";
|
|
@@ -49,7 +49,7 @@ ${n.length > 0 ? n : " // (no variables declared)"}
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
`;
|
|
52
|
-
await q(
|
|
52
|
+
await q(N(e, "env.generated.d.ts"), r, "utf8");
|
|
53
53
|
}, lt = async (e, t) => {
|
|
54
54
|
let n = st(t, (e) => e === "public"), r = `${at}
|
|
55
55
|
import '@voltro/env/public'
|
|
@@ -59,8 +59,8 @@ declare module '@voltro/env/public' {
|
|
|
59
59
|
${n.length > 0 ? n : " // (no public variables declared)"}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
`, i =
|
|
63
|
-
await K(i, { recursive: !0 }), await q(
|
|
62
|
+
`, i = N(e, "src");
|
|
63
|
+
await K(i, { recursive: !0 }), await q(N(i, "voltro-env.d.ts"), r, "utf8");
|
|
64
64
|
}, ut = async (e, t) => {
|
|
65
65
|
let n = `${at}
|
|
66
66
|
import { __installPublicEnv } from '@voltro/env/public'
|
|
@@ -70,7 +70,7 @@ export const publicEnvValues = ${JSON.stringify(t, null, 2)} as const
|
|
|
70
70
|
// Set the browser/SSR-shared global the \`publicEnv\` accessor reads.
|
|
71
71
|
__installPublicEnv(publicEnvValues)
|
|
72
72
|
`;
|
|
73
|
-
await K(e, { recursive: !0 }), await q(
|
|
73
|
+
await K(e, { recursive: !0 }), await q(N(e, "env.public.ts"), n, "utf8");
|
|
74
74
|
}, dt = async (e) => {
|
|
75
75
|
let t = Ae(e.rawEnv) ? e.rawEnv : void 0, n = await Ne({
|
|
76
76
|
contract: t,
|
|
@@ -130,7 +130,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
130
130
|
});
|
|
131
131
|
}, ht = 500, gt = (e, t, n = {}) => {
|
|
132
132
|
if (e.length === 0) return () => {};
|
|
133
|
-
let r = (e) => n.root ?
|
|
133
|
+
let r = (e) => n.root ? P(n.root, e) : e, i = !1, a = (e) => {
|
|
134
134
|
i || (i = !0, t.warn(`.env changed (${r(e)}) — hard-restarting: process.env is read once at boot, a reload would keep stale values`, { file: r(e) }), Promise.resolve().then(() => n.onBeforeRestart?.()).catch((e) => t.warn(".env restart: onBeforeRestart failed (continuing)", {}, e)).finally(() => {
|
|
135
135
|
let e = ze(process.execPath, [...process.execArgv, ...process.argv.slice(1)], {
|
|
136
136
|
stdio: "inherit",
|
|
@@ -146,14 +146,14 @@ __installPublicEnv(publicEnvValues)
|
|
|
146
146
|
});
|
|
147
147
|
}));
|
|
148
148
|
};
|
|
149
|
-
for (let t of e)
|
|
149
|
+
for (let t of e) me(t, { interval: ht }, (e, n) => {
|
|
150
150
|
e.mtimeMs !== n.mtimeMs && a(t);
|
|
151
151
|
});
|
|
152
152
|
return t.info("watching .env files for changes", {
|
|
153
153
|
files: e.map(r),
|
|
154
154
|
intervalMs: ht
|
|
155
155
|
}), () => {
|
|
156
|
-
for (let t of e)
|
|
156
|
+
for (let t of e) V(t);
|
|
157
157
|
};
|
|
158
158
|
}, _t = [{
|
|
159
159
|
host: "127.0.0.1",
|
|
@@ -199,9 +199,9 @@ __installPublicEnv(publicEnvValues)
|
|
|
199
199
|
}, St = (e) => e === "effect" || e.startsWith("@effect/") || e.startsWith("@voltro/") || e === "react" || e === "react-dom", Ct = /(^|\/)(\.bin|\.cache|\.pnpm-store|dist|build)(\/|$)/, wt = (e) => {
|
|
200
200
|
let t = [], n = e;
|
|
201
201
|
for (let e = 0; e < 12; e++) {
|
|
202
|
-
let e =
|
|
203
|
-
|
|
204
|
-
let r =
|
|
202
|
+
let e = N(n, "node_modules");
|
|
203
|
+
L(e) && t.push(e);
|
|
204
|
+
let r = M(n);
|
|
205
205
|
if (r === n) break;
|
|
206
206
|
n = r;
|
|
207
207
|
}
|
|
@@ -212,7 +212,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
212
212
|
for (let e of ["pnpm-workspace.yaml", "pnpm-workspace.yml"]) {
|
|
213
213
|
let r;
|
|
214
214
|
try {
|
|
215
|
-
r =
|
|
215
|
+
r = B(N(n, e), "utf8");
|
|
216
216
|
} catch {
|
|
217
217
|
continue;
|
|
218
218
|
}
|
|
@@ -223,23 +223,23 @@ __installPublicEnv(publicEnvValues)
|
|
|
223
223
|
if (i === "" || i.includes("*")) continue;
|
|
224
224
|
let a;
|
|
225
225
|
try {
|
|
226
|
-
a =
|
|
226
|
+
a = fe(N(n, i), { withFileTypes: !0 });
|
|
227
227
|
} catch {
|
|
228
228
|
continue;
|
|
229
229
|
}
|
|
230
|
-
for (let e of a) e.isDirectory() && t.add(
|
|
230
|
+
for (let e of a) e.isDirectory() && t.add(N(n, i, e.name));
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
for (let e of ["packages", "apps"]) {
|
|
234
234
|
let r;
|
|
235
235
|
try {
|
|
236
|
-
r =
|
|
236
|
+
r = fe(N(n, e), { withFileTypes: !0 });
|
|
237
237
|
} catch {
|
|
238
238
|
continue;
|
|
239
239
|
}
|
|
240
|
-
for (let i of r) i.isDirectory() && t.add(
|
|
240
|
+
for (let i of r) i.isDirectory() && t.add(N(n, e, i.name));
|
|
241
241
|
}
|
|
242
|
-
let e =
|
|
242
|
+
let e = M(n);
|
|
243
243
|
if (e === n) break;
|
|
244
244
|
n = e;
|
|
245
245
|
}
|
|
@@ -247,14 +247,14 @@ __installPublicEnv(publicEnvValues)
|
|
|
247
247
|
}, Et = (e) => {
|
|
248
248
|
let t = [];
|
|
249
249
|
for (let n of Tt(e)) {
|
|
250
|
-
let e =
|
|
250
|
+
let e = N(n, "node_modules", "@voltro"), r;
|
|
251
251
|
try {
|
|
252
|
-
r =
|
|
252
|
+
r = fe(e);
|
|
253
253
|
} catch {
|
|
254
254
|
continue;
|
|
255
255
|
}
|
|
256
256
|
for (let n of r) {
|
|
257
|
-
let r =
|
|
257
|
+
let r = N(e, n), i = Dt(r);
|
|
258
258
|
i !== void 0 && t.push({
|
|
259
259
|
pkg: `@voltro/${n}`,
|
|
260
260
|
version: i,
|
|
@@ -265,7 +265,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
265
265
|
return t;
|
|
266
266
|
}, Dt = (e) => {
|
|
267
267
|
try {
|
|
268
|
-
let t = JSON.parse(
|
|
268
|
+
let t = JSON.parse(B(N(e, "package.json"), "utf8"));
|
|
269
269
|
return typeof t.version == "string" ? t.version : void 0;
|
|
270
270
|
} catch {
|
|
271
271
|
return;
|
|
@@ -273,28 +273,28 @@ __installPublicEnv(publicEnvValues)
|
|
|
273
273
|
}, Ot = (e) => {
|
|
274
274
|
let t = [], n;
|
|
275
275
|
try {
|
|
276
|
-
n =
|
|
276
|
+
n = fe(e);
|
|
277
277
|
} catch {
|
|
278
278
|
return t;
|
|
279
279
|
}
|
|
280
280
|
for (let r of n) {
|
|
281
281
|
if (r.startsWith(".") || Ct.test(r)) continue;
|
|
282
|
-
let n =
|
|
282
|
+
let n = N(e, r);
|
|
283
283
|
if (r.startsWith("@")) {
|
|
284
284
|
let e;
|
|
285
285
|
try {
|
|
286
|
-
e =
|
|
286
|
+
e = fe(n);
|
|
287
287
|
} catch {
|
|
288
288
|
continue;
|
|
289
289
|
}
|
|
290
290
|
for (let i of e) t.push({
|
|
291
291
|
pkg: `${r}/${i}`,
|
|
292
|
-
dir:
|
|
292
|
+
dir: N(n, i)
|
|
293
293
|
});
|
|
294
294
|
continue;
|
|
295
295
|
}
|
|
296
296
|
try {
|
|
297
|
-
if (!
|
|
297
|
+
if (!pe(n).isDirectory()) continue;
|
|
298
298
|
} catch {
|
|
299
299
|
continue;
|
|
300
300
|
}
|
|
@@ -319,7 +319,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
319
319
|
for (let [n, i] of t) i.size < 2 || r.push({
|
|
320
320
|
pkg: n,
|
|
321
321
|
versions: [...i.keys()].sort(),
|
|
322
|
-
paths: [...i.values()].map((t) =>
|
|
322
|
+
paths: [...i.values()].map((t) => P(e, t)).sort()
|
|
323
323
|
});
|
|
324
324
|
return r.sort((e, t) => e.pkg.localeCompare(t.pkg));
|
|
325
325
|
}, At = (e) => {
|
|
@@ -384,7 +384,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
384
384
|
behind: n.behind.map((e) => `${e.pkg}@${e.version}`),
|
|
385
385
|
fix: "the framework ships in lockstep; bump the listed packages and reinstall"
|
|
386
386
|
});
|
|
387
|
-
}, Pt =
|
|
387
|
+
}, Pt = W({ scope: "vite" }), Ft = /\x1b\[[0-9;]*m/g, It = /^\s*\[?vite\]?\s*(\([a-z-]+\)\s*)?/, Lt = (e) => e.replace(Ft, "").replace(It, "").trim(), Rt = /proxy error/i, zt = [
|
|
388
388
|
"ECONNREFUSED",
|
|
389
389
|
"ECONNRESET",
|
|
390
390
|
"ECONNABORTED",
|
|
@@ -427,9 +427,9 @@ __installPublicEnv(publicEnvValues)
|
|
|
427
427
|
return n;
|
|
428
428
|
}, Ut = (e) => e.replace(/\\"|"(?:[^"\\]|\\.)*"|(\/\/[^\n]*|\/\*[\s\S]*?\*\/)/g, (e, t) => t ? "" : e), Wt = (e) => {
|
|
429
429
|
try {
|
|
430
|
-
let t =
|
|
431
|
-
if (!
|
|
432
|
-
let n = JSON.parse(Ut(
|
|
430
|
+
let t = N(e, "tsconfig.json");
|
|
431
|
+
if (!L(t)) return [];
|
|
432
|
+
let n = JSON.parse(Ut(B(t, "utf8"))).compilerOptions ?? {}, r = n.paths ?? {}, i = n.baseUrl ?? ".", a = F(e, i), o = [];
|
|
433
433
|
for (let [e, t] of Object.entries(r)) {
|
|
434
434
|
let n = t[0];
|
|
435
435
|
if (!n) continue;
|
|
@@ -439,11 +439,11 @@ __installPublicEnv(publicEnvValues)
|
|
|
439
439
|
let t = e.slice(0, -2).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
440
440
|
o.push({
|
|
441
441
|
find: RegExp(`^${t}/(.*)$`),
|
|
442
|
-
replacement: `${
|
|
442
|
+
replacement: `${N(a, n.slice(0, -2))}/$1`
|
|
443
443
|
});
|
|
444
444
|
} else o.push({
|
|
445
445
|
find: e,
|
|
446
|
-
replacement:
|
|
446
|
+
replacement: N(a, n)
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
}
|
|
@@ -602,8 +602,8 @@ __installPublicEnv(publicEnvValues)
|
|
|
602
602
|
formError: t?.message ?? t?._tag ?? "The server rejected this submission. Please try again."
|
|
603
603
|
}), !0;
|
|
604
604
|
}
|
|
605
|
-
let
|
|
606
|
-
return r.statusCode = 303, r.setHeader("location",
|
|
605
|
+
let ee = f ?? nn(o) ?? "/";
|
|
606
|
+
return r.statusCode = 303, r.setHeader("location", ee), r.end(), !0;
|
|
607
607
|
};
|
|
608
608
|
}, sn = /^\s*(?:import|export)\s[^;'"]*?['"]([^'"]+)['"]/gm, cn = [
|
|
609
609
|
"",
|
|
@@ -618,28 +618,28 @@ __installPublicEnv(publicEnvValues)
|
|
|
618
618
|
for (let n of e.matchAll(sn)) t.push(n[1]);
|
|
619
619
|
return t;
|
|
620
620
|
}, hn = async (e, t) => {
|
|
621
|
-
let n =
|
|
621
|
+
let n = F(M(e), t);
|
|
622
622
|
for (let e of cn) {
|
|
623
623
|
let t = n + e;
|
|
624
624
|
try {
|
|
625
|
-
if ((await
|
|
625
|
+
if ((await z.stat(t)).isFile()) return t;
|
|
626
626
|
} catch {}
|
|
627
627
|
}
|
|
628
628
|
}, gn = async (e, t) => {
|
|
629
|
-
let n =
|
|
629
|
+
let n = N(e, "src", "pages", t), r = /* @__PURE__ */ new Set(), i = [], a = !1, o = [], s = async (t, n) => {
|
|
630
630
|
let c = `${t}\u0000${n ? "i" : "p"}`;
|
|
631
631
|
if (r.has(c)) return;
|
|
632
632
|
r.add(c);
|
|
633
633
|
let l;
|
|
634
634
|
try {
|
|
635
|
-
l = await
|
|
635
|
+
l = await z.readFile(t, "utf8");
|
|
636
636
|
} catch {
|
|
637
637
|
return;
|
|
638
638
|
}
|
|
639
639
|
for (let r of mn(l)) {
|
|
640
640
|
if (n) {
|
|
641
641
|
if (pn(r)) {
|
|
642
|
-
o.push([
|
|
642
|
+
o.push([P(e, t).split(I).join("/"), r]);
|
|
643
643
|
continue;
|
|
644
644
|
}
|
|
645
645
|
if (dn.some((e) => fn(r, e))) {
|
|
@@ -652,13 +652,13 @@ __installPublicEnv(publicEnvValues)
|
|
|
652
652
|
if (c === void 0) continue;
|
|
653
653
|
let l = n || ln(c);
|
|
654
654
|
if (!n && ln(c)) {
|
|
655
|
-
let t =
|
|
655
|
+
let t = P(e, c).split(I).join("/");
|
|
656
656
|
i.includes(t) || i.push(t);
|
|
657
657
|
}
|
|
658
658
|
await s(c, l);
|
|
659
659
|
}
|
|
660
660
|
};
|
|
661
|
-
return await s(n, ln(n)), ln(n) && i.unshift(
|
|
661
|
+
return await s(n, ln(n)), ln(n) && i.unshift(P(e, n).split(I).join("/")), {
|
|
662
662
|
islandFiles: i,
|
|
663
663
|
usesClient: a,
|
|
664
664
|
violations: o
|
|
@@ -687,9 +687,9 @@ __installPublicEnv(publicEnvValues)
|
|
|
687
687
|
super(`interactive: 'islands' page '${e}' has island code importing the framework barrel:\n${n}\n\nAn island hydrates in its own provider-less root — router hooks, <Link> and useT() throw there, and the '@voltro/web' barrel additionally pulls the Effect runtime into the slim islands entry (the bytes this mode exists to shed).\n\nFix: import island()/hydration APIs from '@voltro/web/islands' (the react-only subpath), move router/i18n-dependent UI out of the island, and keep island files to react + relative browser-safe imports. '@voltro/client' IS allowed — a useSubscription island gets the client boot automatically.`), this.name = "IslandsEntryViolation";
|
|
688
688
|
}
|
|
689
689
|
}, Cn = async (e) => {
|
|
690
|
-
let t =
|
|
690
|
+
let t = N(e.webRoot, ".framework", "island-shells"), n = [];
|
|
691
691
|
if (e.pages.length === 0) return n;
|
|
692
|
-
await
|
|
692
|
+
await z.mkdir(t, { recursive: !0 });
|
|
693
693
|
for (let r of e.pages) {
|
|
694
694
|
let i = await gn(e.webRoot, r.file);
|
|
695
695
|
if (i.violations.length > 0) throw new Sn(r.pattern, i.violations);
|
|
@@ -729,7 +729,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
729
729
|
"</html>",
|
|
730
730
|
""
|
|
731
731
|
].join("\n");
|
|
732
|
-
await
|
|
732
|
+
await z.writeFile(N(t, `${a}.tsx`), l), await z.writeFile(N(t, `${a}.html`), u), n.push({
|
|
733
733
|
pattern: r.pattern,
|
|
734
734
|
name: a,
|
|
735
735
|
htmlFile: s,
|
|
@@ -738,13 +738,13 @@ __installPublicEnv(publicEnvValues)
|
|
|
738
738
|
});
|
|
739
739
|
}
|
|
740
740
|
return n;
|
|
741
|
-
}, wn =
|
|
741
|
+
}, wn = W({ scope: "voltro:images" }), Tn = /[?&]image(?:&|$)/, En = /\.(png|jpe?g|webp|avif)(\?|$)/i, Dn = {
|
|
742
742
|
avif: "image/avif",
|
|
743
743
|
webp: "image/webp",
|
|
744
744
|
jpeg: "image/jpeg",
|
|
745
745
|
png: "image/png"
|
|
746
746
|
}, On = (e) => J("sha256").update(e).digest("hex").slice(0, 12), kn = (e) => `export default ${JSON.stringify(e)}\n`, An = (e) => {
|
|
747
|
-
let t = e.config ??
|
|
747
|
+
let t = e.config ?? k, n = x(e.root), r = /* @__PURE__ */ new Map(), i = "/", a = !1;
|
|
748
748
|
return {
|
|
749
749
|
name: "voltro:image-assets",
|
|
750
750
|
enforce: "pre",
|
|
@@ -753,9 +753,9 @@ __installPublicEnv(publicEnvValues)
|
|
|
753
753
|
},
|
|
754
754
|
async load(o) {
|
|
755
755
|
if (!Tn.test(o) || !En.test(o)) return null;
|
|
756
|
-
let s = o.split("?")[0], c = s, l = await
|
|
757
|
-
if (l === null && s.startsWith("/") && (c =
|
|
758
|
-
|
|
756
|
+
let s = o.split("?")[0], c = s, l = await E(c);
|
|
757
|
+
if (l === null && s.startsWith("/") && (c = N(e.root, s.slice(1)), l = await E(c)), l === null && this.error(`?image import points at a file that does not exist or is unreadable: ${s}`), await S() === null) {
|
|
758
|
+
w(wn);
|
|
759
759
|
let t;
|
|
760
760
|
if (a || e.urlMode === "build-urls") {
|
|
761
761
|
let e = `assets/${On(c)}${c.slice(c.lastIndexOf("."))}`;
|
|
@@ -775,7 +775,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
775
775
|
});
|
|
776
776
|
}
|
|
777
777
|
if (a || e.urlMode === "build-urls") {
|
|
778
|
-
let e = await
|
|
778
|
+
let e = await T({
|
|
779
779
|
sourceBytes: l,
|
|
780
780
|
cacheDir: n,
|
|
781
781
|
config: t
|
|
@@ -803,11 +803,11 @@ __installPublicEnv(publicEnvValues)
|
|
|
803
803
|
}))
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
let u = await
|
|
806
|
+
let u = await re(l);
|
|
807
807
|
u === null && this.error(`?image import is not a raster image sharp can read: ${c}`);
|
|
808
|
-
let d = J("sha256").update(l).digest("hex").slice(0, 16), f = await
|
|
808
|
+
let d = J("sha256").update(l).digest("hex").slice(0, 16), f = await O(l, d, n), p = On(c);
|
|
809
809
|
r.set(p, c);
|
|
810
|
-
let m =
|
|
810
|
+
let m = D(u.width), h = u.format === "png" ? "png" : "jpeg", g = (e, t) => `/_voltro/image/${p}?w=${e}&f=${t}`, _ = (e) => m.map((t) => `${g(t, e)} ${t}w`).join(", ");
|
|
811
811
|
return kn({
|
|
812
812
|
src: g(m[m.length - 1], h),
|
|
813
813
|
width: u.width,
|
|
@@ -833,12 +833,12 @@ __installPublicEnv(publicEnvValues)
|
|
|
833
833
|
i.statusCode = 400, i.end("bad transform params");
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
|
-
let u = await
|
|
836
|
+
let u = await E(s);
|
|
837
837
|
if (u === null) {
|
|
838
838
|
i.statusCode = 404, i.end("source asset gone");
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
|
-
let d = J("sha256").update(u).digest("hex").slice(0, 16), f = await
|
|
841
|
+
let d = J("sha256").update(u).digest("hex").slice(0, 16), f = await C({
|
|
842
842
|
sourceBytes: u,
|
|
843
843
|
sourceHash: d,
|
|
844
844
|
width: c,
|
|
@@ -847,7 +847,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
847
847
|
cacheDir: n
|
|
848
848
|
});
|
|
849
849
|
if (f === null) {
|
|
850
|
-
|
|
850
|
+
w(wn), i.statusCode = 200, i.setHeader("content-type", Dn[l] ?? "application/octet-stream"), i.end(Buffer.from(u));
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
853
|
i.statusCode = 200, i.setHeader("content-type", Dn[l]), i.setHeader("cache-control", "max-age=31536000, immutable"), i.end(Buffer.from(f));
|
|
@@ -857,11 +857,11 @@ __installPublicEnv(publicEnvValues)
|
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
859
|
};
|
|
860
|
-
}, jn =
|
|
860
|
+
}, jn = W({ scope: "voltro:fonts" }), Mn = /* @__PURE__ */ new Map(), Nn = async (e, t) => {
|
|
861
861
|
if (t === void 0 || t.length === 0) return null;
|
|
862
862
|
let n = Mn.get(e);
|
|
863
|
-
return n === void 0 && (n =
|
|
864
|
-
for (let t of e.warnings)
|
|
863
|
+
return n === void 0 && (n = j(t, async (t) => new Uint8Array(await Fe(N(e, t)))).then((e) => {
|
|
864
|
+
for (let t of e.warnings) A(t, jn);
|
|
865
865
|
return e;
|
|
866
866
|
}), Mn.set(e, n)), n;
|
|
867
867
|
}, Pn = {
|
|
@@ -884,33 +884,33 @@ __installPublicEnv(publicEnvValues)
|
|
|
884
884
|
})().catch(() => i());
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
|
-
}), In =
|
|
887
|
+
}), In = W({ scope: "voltro:content" }), Ln = (e) => {
|
|
888
888
|
et(e);
|
|
889
889
|
}, Rn = (e, t) => `/assets/content-media/${e}${t}`, zn = "assets/content-media", Bn = (e) => {
|
|
890
890
|
let t = /* @__PURE__ */ new Map(), n = [];
|
|
891
891
|
return $e(({ src: r, entryFile: i }) => {
|
|
892
|
-
let [a = "", o = ""] = Wn(r), s =
|
|
892
|
+
let [a = "", o = ""] = Wn(r), s = F(M(i), decodeURIComponent(a)), c = t.get(s);
|
|
893
893
|
if (c !== void 0) return c + o;
|
|
894
|
-
if (!
|
|
895
|
-
let e =
|
|
894
|
+
if (!L(s)) {
|
|
895
|
+
let e = P(process.cwd(), s);
|
|
896
896
|
return n.includes(e) || n.push(e), r;
|
|
897
897
|
}
|
|
898
|
-
let l =
|
|
899
|
-
return
|
|
898
|
+
let l = B(s), u = J("sha256").update(l).digest("hex").slice(0, 16), d = de(s).toLowerCase(), f = Rn(u, d), p = N(e, zn, `${u}${d}`);
|
|
899
|
+
return R(M(p), { recursive: !0 }), he(p, l), t.set(s, f), f + o;
|
|
900
900
|
}), { missing: n };
|
|
901
901
|
}, Vn = () => {
|
|
902
902
|
$e(({ src: e, entryFile: t }) => {
|
|
903
|
-
let [n = "", r = ""] = Wn(e), i =
|
|
904
|
-
if (!
|
|
905
|
-
let a =
|
|
906
|
-
return Hn.set(o, i), Rn(o,
|
|
903
|
+
let [n = "", r = ""] = Wn(e), i = F(M(t), decodeURIComponent(n));
|
|
904
|
+
if (!L(i)) return e;
|
|
905
|
+
let a = B(i), o = J("sha256").update(a).digest("hex").slice(0, 16);
|
|
906
|
+
return Hn.set(o, i), Rn(o, de(i).toLowerCase()) + r;
|
|
907
907
|
});
|
|
908
908
|
}, Hn = /* @__PURE__ */ new Map(), Un = (e) => {
|
|
909
909
|
let t = /^\/assets\/content-media\/([0-9a-f]{16})(\.[a-z0-9]+)$/i.exec(e);
|
|
910
910
|
if (t === null) return null;
|
|
911
911
|
let n = Hn.get(t[1].toLowerCase());
|
|
912
|
-
return n === void 0 || !
|
|
913
|
-
bytes:
|
|
912
|
+
return n === void 0 || !L(n) ? null : {
|
|
913
|
+
bytes: B(n),
|
|
914
914
|
contentType: Kn(t[2])
|
|
915
915
|
};
|
|
916
916
|
}, Wn = (e) => {
|
|
@@ -938,8 +938,8 @@ __installPublicEnv(publicEnvValues)
|
|
|
938
938
|
if (t.length !== 0) {
|
|
939
939
|
if (n === void 0 || n === "") throw Error("config.feeds needs seo.siteUrl — RSS links must be absolute. Set seo: { siteUrl } in app.config.ts.");
|
|
940
940
|
for (let r of t) {
|
|
941
|
-
let t = await qn(r, n), i =
|
|
942
|
-
await K(
|
|
941
|
+
let t = await qn(r, n), i = N(e, r.path.replace(/^\/+/, ""));
|
|
942
|
+
await K(M(i), { recursive: !0 }), await q(i, t), In.info(`feed: ${r.path} (${r.collection})`);
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
945
|
}, Yn = async (e, t) => {
|
|
@@ -956,14 +956,14 @@ __installPublicEnv(publicEnvValues)
|
|
|
956
956
|
for (let t of Qe()) {
|
|
957
957
|
let r = t.i18n?.locales ?? [void 0];
|
|
958
958
|
for (let i of r) {
|
|
959
|
-
let r = await Yn(t.name, i), a =
|
|
960
|
-
await K(
|
|
959
|
+
let r = await Yn(t.name, i), a = N(e, Je(t.name, i));
|
|
960
|
+
await K(M(a), { recursive: !0 }), await q(a, r), n += 1;
|
|
961
961
|
let o = JSON.parse(r);
|
|
962
962
|
for (let { slug: r } of o) {
|
|
963
963
|
let a = await Xn(t.name, r, i);
|
|
964
964
|
if (a === null) continue;
|
|
965
|
-
let o =
|
|
966
|
-
await K(
|
|
965
|
+
let o = N(e, Je(t.name, i, r));
|
|
966
|
+
await K(M(o), { recursive: !0 }), await q(o, a), n += 1;
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
}
|
|
@@ -1002,7 +1002,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1002
1002
|
}
|
|
1003
1003
|
for (let t of r) {
|
|
1004
1004
|
if (t.name.startsWith(".") || t.name === "node_modules") continue;
|
|
1005
|
-
let r =
|
|
1005
|
+
let r = N(e, t.name);
|
|
1006
1006
|
t.isDirectory() ? n.push(...await $n(r)) : /\.collection\.tsx?$/.test(t.name) && n.push(r);
|
|
1007
1007
|
}
|
|
1008
1008
|
return n;
|
|
@@ -1018,14 +1018,14 @@ __installPublicEnv(publicEnvValues)
|
|
|
1018
1018
|
t.setHeader("content-type", r.contentType), t.end(r.bytes);
|
|
1019
1019
|
});
|
|
1020
1020
|
let i = null, a = () => (i ??= (async () => {
|
|
1021
|
-
for (let t of await $n(
|
|
1021
|
+
for (let t of await $n(N(e, "src"))) try {
|
|
1022
1022
|
await r.ssrLoadModule(t);
|
|
1023
1023
|
} catch (e) {
|
|
1024
1024
|
In.warn("failed to load collection module", { file: t }, e);
|
|
1025
1025
|
}
|
|
1026
1026
|
})(), i);
|
|
1027
|
-
r.watcher.add(
|
|
1028
|
-
typeof n == "string" && n.startsWith(
|
|
1027
|
+
r.watcher.add(N(e, "content")), r.watcher.on("all", (t, n) => {
|
|
1028
|
+
typeof n == "string" && n.startsWith(N(e, "content")) && (Ze(), r.ws.send({ type: "full-reload" }));
|
|
1029
1029
|
});
|
|
1030
1030
|
for (let e of t) r.middlewares.use(e.path, (t, r) => {
|
|
1031
1031
|
(async () => {
|
|
@@ -1069,7 +1069,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1069
1069
|
if (t === void 0 || t.length === 0) throw Error("ogImage needs a declared font: satori cannot render text without a font buffer, and there is no bundled default (that would ship a license artifact most projects replace). Declare one in app.config.ts — fonts: [{ family: 'Inter', src: [{ path: 'src/fonts/Inter.woff2' }] }] — see the Fonts docs.");
|
|
1070
1070
|
let n = [];
|
|
1071
1071
|
for (let r of t) for (let t of r.src) {
|
|
1072
|
-
let i = await Fe(
|
|
1072
|
+
let i = await Fe(N(e, t.path)), a = typeof t.weight == "number" ? t.weight : void 0;
|
|
1073
1073
|
n.push({
|
|
1074
1074
|
name: r.family,
|
|
1075
1075
|
data: i.buffer.slice(i.byteOffset, i.byteOffset + i.byteLength),
|
|
@@ -1189,11 +1189,11 @@ __installPublicEnv(publicEnvValues)
|
|
|
1189
1189
|
});
|
|
1190
1190
|
return t;
|
|
1191
1191
|
}, pr = (e) => e.replace(/-([a-z0-9])/g, (e, t) => t.toUpperCase()), mr = async (e) => {
|
|
1192
|
-
let t =
|
|
1192
|
+
let t = F(e);
|
|
1193
1193
|
for (let e = 0; e < 4; e++) {
|
|
1194
|
-
let e =
|
|
1195
|
-
if (
|
|
1196
|
-
let n = await
|
|
1194
|
+
let e = N(t, "project.json");
|
|
1195
|
+
if (L(e)) try {
|
|
1196
|
+
let n = await z.readFile(e, "utf8");
|
|
1197
1197
|
return {
|
|
1198
1198
|
projectDir: t,
|
|
1199
1199
|
manifest: JSON.parse(n)
|
|
@@ -1201,7 +1201,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1201
1201
|
} catch {
|
|
1202
1202
|
return null;
|
|
1203
1203
|
}
|
|
1204
|
-
let n =
|
|
1204
|
+
let n = M(t);
|
|
1205
1205
|
if (n === t) break;
|
|
1206
1206
|
t = n;
|
|
1207
1207
|
}
|
|
@@ -1209,11 +1209,11 @@ __installPublicEnv(publicEnvValues)
|
|
|
1209
1209
|
}, hr = async (e) => {
|
|
1210
1210
|
let t = await mr(e);
|
|
1211
1211
|
if (!t) return [];
|
|
1212
|
-
let { projectDir: n, manifest: r } = t, i =
|
|
1212
|
+
let { projectDir: n, manifest: r } = t, i = ue(e), a = r.apps ?? {}, o = [];
|
|
1213
1213
|
for (let [e, t] of Object.entries(a)) {
|
|
1214
1214
|
if (e === i || t.kind !== "web" || typeof t.port != "number") continue;
|
|
1215
|
-
let r =
|
|
1216
|
-
if (!
|
|
1215
|
+
let r = N(n, t.path ?? e), a = N(r, "src", "pages");
|
|
1216
|
+
if (!L(a)) continue;
|
|
1217
1217
|
let s;
|
|
1218
1218
|
try {
|
|
1219
1219
|
let { pages: e } = await Mo(a);
|
|
@@ -1254,7 +1254,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1254
1254
|
let t = await Promise.all(e.pages.map(async (t) => {
|
|
1255
1255
|
let n;
|
|
1256
1256
|
try {
|
|
1257
|
-
let r = await
|
|
1257
|
+
let r = await z.readFile(N(e.appRoot, "src", "pages", t.file), "utf8");
|
|
1258
1258
|
/^export const searchParams\b/m.test(r) && (n = {
|
|
1259
1259
|
alias: `SP_${t.ident}`,
|
|
1260
1260
|
specifier: `../src/pages/${t.file.replace(/\.tsx?$/, "")}`
|
|
@@ -1281,16 +1281,16 @@ __installPublicEnv(publicEnvValues)
|
|
|
1281
1281
|
"",
|
|
1282
1282
|
"type EmptyParams = Record<string, never>",
|
|
1283
1283
|
""
|
|
1284
|
-
].join("\n"), a = e.mode ?? "dev", o = `${i}\n${`export const routes = ${yr(t)} as const\n`}\n${n.length === 0 ? "export const siblingApps = {} as Record<string, never>\n" : `export const siblingApps = {\n${n.map((e) => br(e, a)).join("\n")}\n} as const\n`}`, s =
|
|
1285
|
-
await
|
|
1284
|
+
].join("\n"), a = e.mode ?? "dev", o = `${i}\n${`export const routes = ${yr(t)} as const\n`}\n${n.length === 0 ? "export const siblingApps = {} as Record<string, never>\n" : `export const siblingApps = {\n${n.map((e) => br(e, a)).join("\n")}\n} as const\n`}`, s = N(e.appRoot, ".framework", "routes.generated.ts");
|
|
1285
|
+
await z.mkdir(M(s), { recursive: !0 });
|
|
1286
1286
|
let c = null;
|
|
1287
1287
|
try {
|
|
1288
|
-
c = await
|
|
1288
|
+
c = await z.readFile(s, "utf8");
|
|
1289
1289
|
} catch {}
|
|
1290
1290
|
return c === o ? {
|
|
1291
1291
|
path: s,
|
|
1292
1292
|
wrote: !1
|
|
1293
|
-
} : (await
|
|
1293
|
+
} : (await z.writeFile(s, o, "utf8"), {
|
|
1294
1294
|
path: s,
|
|
1295
1295
|
wrote: !0
|
|
1296
1296
|
});
|
|
@@ -1459,7 +1459,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1459
1459
|
}
|
|
1460
1460
|
};
|
|
1461
1461
|
console.log = i("log"), console.info = i("info"), console.warn = i("warn"), console.error = i("error"), console.debug = i("debug");
|
|
1462
|
-
let a =
|
|
1462
|
+
let a = ge((t) => {
|
|
1463
1463
|
if (!r) {
|
|
1464
1464
|
r = !0;
|
|
1465
1465
|
try {
|
|
@@ -1497,7 +1497,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1497
1497
|
case "debug": return "debug";
|
|
1498
1498
|
default: return "info";
|
|
1499
1499
|
}
|
|
1500
|
-
}, ei =
|
|
1500
|
+
}, ei = W({ scope: "client" }), ti = (e, t) => {
|
|
1501
1501
|
let n;
|
|
1502
1502
|
try {
|
|
1503
1503
|
n = JSON.parse(e);
|
|
@@ -1668,7 +1668,7 @@ __installPublicEnv(publicEnvValues)
|
|
|
1668
1668
|
let e = {
|
|
1669
1669
|
warn: console.warn.bind(console),
|
|
1670
1670
|
error: console.error.bind(console)
|
|
1671
|
-
}, t =
|
|
1671
|
+
}, t = W({ scope: "babel" }), n = !1, r = (r) => (...i) => {
|
|
1672
1672
|
if (!n) {
|
|
1673
1673
|
for (let e of mi) if (e.match(i[0])) {
|
|
1674
1674
|
n = !0;
|
|
@@ -1820,18 +1820,18 @@ import {
|
|
|
1820
1820
|
map: null
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
-
}), Di =
|
|
1823
|
+
}), Di = W({ scope: "voltro:dashboard" }), Oi = ye(import.meta.url), ki = 5179, Ai = (e) => {
|
|
1824
1824
|
let t = process.env.VOLTRO_DASHBOARD_PATH;
|
|
1825
|
-
if (t &&
|
|
1825
|
+
if (t && L(N(F(t), "app.config.ts"))) return F(t);
|
|
1826
1826
|
try {
|
|
1827
|
-
let e =
|
|
1828
|
-
if (
|
|
1827
|
+
let e = M(Oi.resolve("@voltro/dashboard/package.json"));
|
|
1828
|
+
if (L(N(e, "app.config.ts"))) return e;
|
|
1829
1829
|
} catch {}
|
|
1830
|
-
let n =
|
|
1830
|
+
let n = N("voltro-devtools", "apps", "dashboard"), r = F(e);
|
|
1831
1831
|
for (let e = 0; e < 10; e++) {
|
|
1832
|
-
let e =
|
|
1833
|
-
if (
|
|
1834
|
-
let t =
|
|
1832
|
+
let e = N(r, n);
|
|
1833
|
+
if (L(N(e, "app.config.ts"))) return e;
|
|
1834
|
+
let t = M(r);
|
|
1835
1835
|
if (t === r) break;
|
|
1836
1836
|
r = t;
|
|
1837
1837
|
}
|
|
@@ -1844,21 +1844,21 @@ import {
|
|
|
1844
1844
|
a || (a = !0, i.destroy(), r(e));
|
|
1845
1845
|
};
|
|
1846
1846
|
i.once("connect", () => o(!0)), i.once("error", () => o(!1)), setTimeout(() => o(!1), n);
|
|
1847
|
-
}), Ni = () => !!(process.env.VOLTRO_DASHBOARD === "off" || process.argv.includes("--disable-dashboard")), Pi = () => process.env[ji] === "1", Fi = () => process.stdout.isTTY === !0, Ii =
|
|
1847
|
+
}), Ni = () => !!(process.env.VOLTRO_DASHBOARD === "off" || process.argv.includes("--disable-dashboard")), Pi = () => process.env[ji] === "1", Fi = () => process.stdout.isTTY === !0, Ii = N(we(), ".voltro", "dashboard-launch.lock"), Li = 1e4, Ri = async () => {
|
|
1848
1848
|
try {
|
|
1849
|
-
await
|
|
1850
|
-
let e = await
|
|
1849
|
+
await z.mkdir(M(Ii), { recursive: !0 });
|
|
1850
|
+
let e = await z.open(Ii, "wx");
|
|
1851
1851
|
return await e.write(`${process.pid}\n${Date.now()}\n`), await e.close(), !0;
|
|
1852
1852
|
} catch {
|
|
1853
1853
|
try {
|
|
1854
|
-
let e = await
|
|
1855
|
-
if (Date.now() - e.mtimeMs > Li) return await
|
|
1854
|
+
let e = await z.stat(Ii);
|
|
1855
|
+
if (Date.now() - e.mtimeMs > Li) return await z.unlink(Ii).catch(() => void 0), Ri();
|
|
1856
1856
|
} catch {}
|
|
1857
1857
|
return !1;
|
|
1858
1858
|
}
|
|
1859
1859
|
}, zi = async () => {
|
|
1860
1860
|
try {
|
|
1861
|
-
await
|
|
1861
|
+
await z.unlink(Ii);
|
|
1862
1862
|
} catch {}
|
|
1863
1863
|
}, Bi = async (e) => {
|
|
1864
1864
|
let t = e.port ?? 5179;
|
|
@@ -1889,9 +1889,9 @@ import {
|
|
|
1889
1889
|
let n = e.voltroBin;
|
|
1890
1890
|
if (!n) {
|
|
1891
1891
|
let e = process.argv[1];
|
|
1892
|
-
n = e && e.endsWith("/src/bin.ts") ?
|
|
1892
|
+
n = e && e.endsWith("/src/bin.ts") ? N(M(e), "..", "bin", "voltro.mjs") : e ?? "voltro";
|
|
1893
1893
|
}
|
|
1894
|
-
let r =
|
|
1894
|
+
let r = N(e.dashboardAppPath, ".framework", "dist", "index.html"), i = L(r), a = i ? "start" : "dev", o = ze(process.execPath, [
|
|
1895
1895
|
n,
|
|
1896
1896
|
a,
|
|
1897
1897
|
e.dashboardAppPath
|
|
@@ -2168,15 +2168,15 @@ import {
|
|
|
2168
2168
|
let t = [], n = async (e) => {
|
|
2169
2169
|
let r;
|
|
2170
2170
|
try {
|
|
2171
|
-
r = await
|
|
2171
|
+
r = await z.readdir(e, { withFileTypes: !0 });
|
|
2172
2172
|
} catch {
|
|
2173
2173
|
return;
|
|
2174
2174
|
}
|
|
2175
2175
|
for (let i of r) if (!(i.name.startsWith(".") && i.isDirectory())) {
|
|
2176
2176
|
if (i.isDirectory()) {
|
|
2177
2177
|
if (ya.has(i.name)) continue;
|
|
2178
|
-
await n(
|
|
2179
|
-
} else va(i.name) && t.push(
|
|
2178
|
+
await n(N(e, i.name));
|
|
2179
|
+
} else va(i.name) && t.push(N(e, i.name));
|
|
2180
2180
|
}
|
|
2181
2181
|
};
|
|
2182
2182
|
return await n(e), t.sort();
|
|
@@ -2185,12 +2185,12 @@ import {
|
|
|
2185
2185
|
for (let n of await ba(e)) {
|
|
2186
2186
|
t.update(n.slice(e.length)), t.update("\0");
|
|
2187
2187
|
try {
|
|
2188
|
-
t.update(await
|
|
2188
|
+
t.update(await z.readFile(n));
|
|
2189
2189
|
} catch {}
|
|
2190
2190
|
t.update("\0");
|
|
2191
2191
|
}
|
|
2192
2192
|
try {
|
|
2193
|
-
t.update(await
|
|
2193
|
+
t.update(await z.readFile(N(e, "rpcGroup.generated.ts")));
|
|
2194
2194
|
} catch {}
|
|
2195
2195
|
return t.digest("hex");
|
|
2196
2196
|
}, Sa = async (e) => {
|
|
@@ -2265,11 +2265,11 @@ import {
|
|
|
2265
2265
|
}, Pa = (e) => Object.entries(e).map(([e, t]) => `${e}=${encodeURIComponent(t)}`).join("; "), Fa = /(^|[-_.])(auth[-_.]?token|session|access[-_.]?token)([-_.]|$)|^sb-.*-auth-token$/i, Ia = (e) => e.httpOnly === void 0 && Fa.test(e.name), La = (e) => {
|
|
2266
2266
|
let t = [`${e.name}=${encodeURIComponent(e.value)}`];
|
|
2267
2267
|
return t.push(`Path=${e.path ?? "/"}`), e.maxAge !== void 0 && t.push(`Max-Age=${Math.trunc(e.maxAge)}`), e.httpOnly !== !1 && t.push("HttpOnly"), e.secure === !0 && t.push("Secure"), t.push(`SameSite=${e.sameSite ?? "lax"}`), t.join("; ");
|
|
2268
|
-
}, Ra = (e) => e.length === 0 ? {} : { "set-cookie": e.map(La) }, za = async (e, t = (e) => import(
|
|
2268
|
+
}, Ra = (e) => e.length === 0 ? {} : { "set-cookie": e.map(La) }, za = async (e, t = (e) => import(U(e).href)) => {
|
|
2269
2269
|
for (let r of wa) {
|
|
2270
2270
|
let i;
|
|
2271
2271
|
try {
|
|
2272
|
-
i = await t(
|
|
2272
|
+
i = await t(N(e, r));
|
|
2273
2273
|
} catch (e) {
|
|
2274
2274
|
let t = e?.code;
|
|
2275
2275
|
if (t === "ERR_MODULE_NOT_FOUND" || t === "MODULE_NOT_FOUND") continue;
|
|
@@ -2352,10 +2352,10 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2352
2352
|
start: .001,
|
|
2353
2353
|
factor: 2,
|
|
2354
2354
|
count: 16
|
|
2355
|
-
}), qa =
|
|
2355
|
+
}), qa = G.counter("voltro_ppr_shell_serves_total", { description: "ppr responses whose cached shell was written, by page." }), Ja = G.counter("voltro_ppr_hole_passes_total", { description: "ppr per-request hole passes started, by page." }), Ya = G.counter("voltro_ppr_hole_settles_total", { description: "Deferred ppr holes settled and appended to a response, by page." }), Xa = G.counter("voltro_ppr_hole_errors_total", { description: "ppr hole passes that failed as a whole (every hole stays on its fallback), by page." }), Za = G.histogram("voltro_ppr_hole_pass_seconds", Ka, "ppr hole-pass duration in seconds (loader re-run to last hole settled), by page."), Qa = [], $a = /* @__PURE__ */ new Map(), eo = (e) => {
|
|
2356
2356
|
let t = $a.get(e);
|
|
2357
2357
|
if (t !== void 0) return t;
|
|
2358
|
-
let n = (t) =>
|
|
2358
|
+
let n = (t) => G.tagged(t, "page", e), r = {
|
|
2359
2359
|
shellServes: n(qa),
|
|
2360
2360
|
holePasses: n(Ja),
|
|
2361
2361
|
holeSettles: n(Ya),
|
|
@@ -2404,9 +2404,9 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2404
2404
|
}
|
|
2405
2405
|
}, mo = (e, t) => {
|
|
2406
2406
|
if (e.deferredSegmentIds !== void 0) throw Error(`[voltro] ppr page '${t}': a LAYOUT loader in its chain uses defer(). ppr appends holes for the PAGE loader only — move the deferred field into the page loader, or return the value directly from the layout.`);
|
|
2407
|
-
}, Q =
|
|
2407
|
+
}, Q = W({ scope: "voltro:dev:web" }), ho = W({ scope: "vite" }), go = await (async () => {
|
|
2408
2408
|
try {
|
|
2409
|
-
let e =
|
|
2409
|
+
let e = N(M(H(import.meta.url)), "..", "package.json"), t = await z.readFile(e, "utf8");
|
|
2410
2410
|
return JSON.parse(t).version ?? "0.0.0";
|
|
2411
2411
|
} catch {
|
|
2412
2412
|
return "0.0.0";
|
|
@@ -2421,10 +2421,10 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2421
2421
|
return n;
|
|
2422
2422
|
}, vo = async () => {
|
|
2423
2423
|
try {
|
|
2424
|
-
let e =
|
|
2425
|
-
if (
|
|
2426
|
-
let n =
|
|
2427
|
-
return
|
|
2424
|
+
let e = M(H(import.meta.url)), t = F(e, "..", "..", "devtools");
|
|
2425
|
+
if (L(N(t, "package.json"))) return t;
|
|
2426
|
+
let n = F(e, "..", "..", "..", "devtools");
|
|
2427
|
+
return L(N(n, "package.json")) ? n : null;
|
|
2428
2428
|
} catch {
|
|
2429
2429
|
return null;
|
|
2430
2430
|
}
|
|
@@ -2444,15 +2444,15 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2444
2444
|
"// browser rpc spans flow to Sentry, sharing the server transactions' trace.",
|
|
2445
2445
|
`await initSentryBrowser(${JSON.stringify(e.sentry)})`
|
|
2446
2446
|
] : [], Co = (e) => e.env ? ["import './env.public'"] : [], wo = (e) => {
|
|
2447
|
-
let t = [], n =
|
|
2447
|
+
let t = [], n = F(e);
|
|
2448
2448
|
for (;;) {
|
|
2449
|
-
|
|
2450
|
-
let e =
|
|
2449
|
+
L(N(n, "pnpm-workspace.yaml")) && t.push(n);
|
|
2450
|
+
let e = M(n);
|
|
2451
2451
|
if (e === n) break;
|
|
2452
2452
|
n = e;
|
|
2453
2453
|
}
|
|
2454
2454
|
return t;
|
|
2455
|
-
}, To =
|
|
2455
|
+
}, To = ie, Eo = (e) => {
|
|
2456
2456
|
if (/\/node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(?:react|react-dom|scheduler)\//.test(e)) return "react";
|
|
2457
2457
|
}, Do = /export\s+(?:async\s+)?(?:const|function|let|var)\s+loader\b/, Oo = (e) => e.startsWith("(") && e.endsWith(")"), ko = (e) => e.filter((e) => !Oo(e)), Ao = (e) => {
|
|
2458
2458
|
let t = e.replace(s, "").split("/").filter(Boolean).filter((e) => !Oo(e));
|
|
@@ -2461,7 +2461,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2461
2461
|
let t = [], n = [], r = async (e, i) => {
|
|
2462
2462
|
let o = [];
|
|
2463
2463
|
try {
|
|
2464
|
-
o = await
|
|
2464
|
+
o = await z.readdir(e, { withFileTypes: !0 });
|
|
2465
2465
|
} catch {
|
|
2466
2466
|
return;
|
|
2467
2467
|
}
|
|
@@ -2469,7 +2469,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2469
2469
|
if (l.some((e) => a.has(e))) {
|
|
2470
2470
|
let t = u.has("layout.tsx"), r = !1;
|
|
2471
2471
|
if (t) try {
|
|
2472
|
-
let t = await
|
|
2472
|
+
let t = await z.readFile(N(e, "layout.tsx"), "utf8");
|
|
2473
2473
|
r = Do.test(t);
|
|
2474
2474
|
} catch {}
|
|
2475
2475
|
n.push({
|
|
@@ -2494,7 +2494,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2494
2494
|
dirChain: i
|
|
2495
2495
|
});
|
|
2496
2496
|
}
|
|
2497
|
-
for (let t of c) await r(
|
|
2497
|
+
for (let t of c) await r(N(e, t), [...i, t]);
|
|
2498
2498
|
};
|
|
2499
2499
|
await r(e, []), t.sort((e, t) => e.file < t.file ? -1 : 1);
|
|
2500
2500
|
let i = /* @__PURE__ */ new Set();
|
|
@@ -2669,7 +2669,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2669
2669
|
return null;
|
|
2670
2670
|
}, Bo = _, Vo = async (e) => {
|
|
2671
2671
|
try {
|
|
2672
|
-
let t = await import(
|
|
2672
|
+
let t = await import(U(N(e, "app.config.ts")).href), n = t.default?.port, i = r({
|
|
2673
2673
|
kind: "api",
|
|
2674
2674
|
configPort: typeof n == "number" ? n : void 0,
|
|
2675
2675
|
env: {}
|
|
@@ -2815,7 +2815,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2815
2815
|
}, Qo = async (e, t, n, r = {}) => {
|
|
2816
2816
|
let i = t.title ?? t.name ?? "app";
|
|
2817
2817
|
Ln(e);
|
|
2818
|
-
let a = await Nn(e, t.fonts), o = a === null ? [] : [...a.preloads.map((e) => ` <link rel="preload" as="font" type="font/${e.endsWith(".woff2") ? "woff2" : e.endsWith(".woff") ? "woff" : e.endsWith(".otf") ? "otf" : "ttf"}" href="${e}" crossorigin />`), ` <style data-voltro-fonts>${a.css}</style>`], s = t.theme === "dark" ? " class=\"dark\"" : t.theme === "light" ? " class=\"light\"" : "", c =
|
|
2818
|
+
let a = await Nn(e, t.fonts), o = a === null ? [] : [...a.preloads.map((e) => ` <link rel="preload" as="font" type="font/${e.endsWith(".woff2") ? "woff2" : e.endsWith(".woff") ? "woff" : e.endsWith(".otf") ? "otf" : "ttf"}" href="${e}" crossorigin />`), ` <style data-voltro-fonts>${a.css}</style>`], s = t.theme === "dark" ? " class=\"dark\"" : t.theme === "light" ? " class=\"light\"" : "", c = L(N(e, "node_modules", "@voltro", "devtools", "package.json")) || await vo() !== null, l = t.theme === "system" ? [
|
|
2819
2819
|
" <script>",
|
|
2820
2820
|
" (function () {",
|
|
2821
2821
|
" var root = document.documentElement",
|
|
@@ -2867,10 +2867,10 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2867
2867
|
" </body>",
|
|
2868
2868
|
"</html>",
|
|
2869
2869
|
""
|
|
2870
|
-
].join("\n"), f =
|
|
2871
|
-
await
|
|
2870
|
+
].join("\n"), f = N(e, "src", "pages"), { pages: p, dirs: m, orphanedSpecials: h } = await Mo(f);
|
|
2871
|
+
await b(f, p);
|
|
2872
2872
|
for (let e of h) Q.warn(`src/pages/${e.dir || "."}/ contains ${e.files.join(", ")} but no page.tsx at or below it — ${e.files.length > 1 ? "those files are" : "that file is"} inert. A layout/error/loading/not-found file only applies to routes in its own directory tree; if this is an ordinary component, rename it so it does not read as a route boundary.`);
|
|
2873
|
-
let { imports: g, entryLines: _ } = Zo(n, "../app.config"), v,
|
|
2873
|
+
let { imports: g, entryLines: _ } = Zo(n, "../app.config"), v, ee, te;
|
|
2874
2874
|
if (p.length > 0) {
|
|
2875
2875
|
let n = p.map((e) => ` ${JSON.stringify(e.pattern)}: () => import('../src/pages/${e.file}'),`), r = [];
|
|
2876
2876
|
for (let e of m) {
|
|
@@ -2919,18 +2919,18 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
2919
2919
|
kind: "page",
|
|
2920
2920
|
slotKey: e.pattern
|
|
2921
2921
|
});
|
|
2922
|
-
let h = o.map((e) => ` ${JSON.stringify(e.relPath)},`),
|
|
2922
|
+
let h = o.map((e) => ` ${JSON.stringify(e.relPath)},`), y = o.map((e, t) => {
|
|
2923
2923
|
let n = JSON.stringify(e.slotKey);
|
|
2924
2924
|
return e.kind === "page" ? ` if (newMods[${t}] && refs.pages[${n}] !== undefined) { refs.pages[${n}] = newMods[${t}]; changed = true }` : ` if (newMods[${t}]?.default) { refs.${e.kind === "layout" ? "layouts" : e.kind === "error" ? "errors" : e.kind === "pending" ? "pendings" : "notFounds"}[${n}] = newMods[${t}].default;${e.kind === "layout" ? ` refs.layoutLoaders[${n}] = newMods[${t}].loader;` : ""} changed = true }`;
|
|
2925
|
-
}),
|
|
2926
|
-
if (
|
|
2927
|
-
let
|
|
2925
|
+
}), b = t.locales ?? [], x = b.length > 0 && b.every((t) => L(N(e, "src", "locales", `${t}.ts`)) || L(N(e, "src", "locales", `${t}.tsx`))), S = x, C = t.defaultLocale ?? b[0] ?? "en", w = t.router?.viewTransitions === !0 ? " viewTransitions" : "";
|
|
2926
|
+
if (b.length > 0 && !x && Q.info(`i18n: locales [${b.join(", ")}] declared with no src/locales/<code>.ts — using them for <html lang> and the resolved locale only. Add the catalogs to get <I18nProvider> wired, or keep your own i18n stack.`), b.length > 0 && !b.includes(C)) throw Error(`[voltro dev] app.config.ts: defaultLocale '${C}' must be one of locales [${b.join(", ")}]`);
|
|
2927
|
+
let T = S ? [
|
|
2928
2928
|
"import { I18nProvider } from '@voltro/i18n'",
|
|
2929
2929
|
"import { resolveLocale } from '@voltro/i18n/server'",
|
|
2930
2930
|
"import { useServerRequest } from '@voltro/web'",
|
|
2931
|
-
...
|
|
2931
|
+
...b.map((e) => `import i18nCatalog_${e} from '../src/locales/${e}'`)
|
|
2932
2932
|
] : [];
|
|
2933
|
-
|
|
2933
|
+
ee = [
|
|
2934
2934
|
"// GENERATED BY `voltro dev` — do not edit; will be overwritten on next boot.",
|
|
2935
2935
|
"// Routes + per-page chain + not-found scopes assembled from src/pages/.",
|
|
2936
2936
|
"//",
|
|
@@ -3045,7 +3045,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3045
3045
|
" ],",
|
|
3046
3046
|
" (newMods: Array<Record<string, unknown> | undefined>) => {",
|
|
3047
3047
|
" let changed = false",
|
|
3048
|
-
...
|
|
3048
|
+
...y,
|
|
3049
3049
|
" if (changed) bump()",
|
|
3050
3050
|
" },",
|
|
3051
3051
|
" )",
|
|
@@ -3062,16 +3062,16 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3062
3062
|
"",
|
|
3063
3063
|
"import { useMemo, useSyncExternalStore } from 'react'",
|
|
3064
3064
|
"import { Router } from '@voltro/web'",
|
|
3065
|
-
...
|
|
3065
|
+
...T,
|
|
3066
3066
|
"import { subscribe, getVersion, buildRoutes, buildNotFounds } from './routeTable'",
|
|
3067
3067
|
"",
|
|
3068
|
-
...
|
|
3069
|
-
`// i18n auto-wiring (config.locales = [${
|
|
3068
|
+
...S ? [
|
|
3069
|
+
`// i18n auto-wiring (config.locales = [${b.map((e) => JSON.stringify(e)).join(", ")}]).`,
|
|
3070
3070
|
"const I18N_CATALOGS: Record<string, import('@voltro/i18n').MessageCatalog> = {",
|
|
3071
|
-
...
|
|
3071
|
+
...b.map((e) => ` ${JSON.stringify(e)}: i18nCatalog_${e},`),
|
|
3072
3072
|
"}",
|
|
3073
|
-
`const I18N_SUPPORTED: ReadonlyArray<string> = [${
|
|
3074
|
-
`const I18N_DEFAULT = ${JSON.stringify(
|
|
3073
|
+
`const I18N_SUPPORTED: ReadonlyArray<string> = [${b.map((e) => JSON.stringify(e)).join(", ")}]`,
|
|
3074
|
+
`const I18N_DEFAULT = ${JSON.stringify(C)}`,
|
|
3075
3075
|
"",
|
|
3076
3076
|
"// The zone + clock the SERVER decided for this document, read back off",
|
|
3077
3077
|
"// <html>. Same contract as <html lang> below and for the same reason:",
|
|
@@ -3145,7 +3145,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3145
3145
|
" const v = useSyncExternalStore(subscribe, getVersion, getVersion)",
|
|
3146
3146
|
" const routes = useMemo(() => buildRoutes(), [v])",
|
|
3147
3147
|
" const notFounds = useMemo(() => buildNotFounds(), [v])",
|
|
3148
|
-
...
|
|
3148
|
+
...S ? [
|
|
3149
3149
|
" const ssr = useServerRequest()",
|
|
3150
3150
|
" const locale = pickI18nLocale(ssr)",
|
|
3151
3151
|
" const messages = I18N_CATALOGS[locale] ?? I18N_CATALOGS[I18N_DEFAULT]!",
|
|
@@ -3160,13 +3160,13 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3160
3160
|
" defaultLocale={I18N_DEFAULT}",
|
|
3161
3161
|
" {...published}",
|
|
3162
3162
|
" >",
|
|
3163
|
-
` <Router routes={routes} notFounds={notFounds}${
|
|
3163
|
+
` <Router routes={routes} notFounds={notFounds}${w} />`,
|
|
3164
3164
|
" </I18nProvider>",
|
|
3165
3165
|
" )"
|
|
3166
|
-
] : [` return <Router routes={routes} notFounds={notFounds}${
|
|
3166
|
+
] : [` return <Router routes={routes} notFounds={notFounds}${w} />`],
|
|
3167
3167
|
"}",
|
|
3168
3168
|
""
|
|
3169
|
-
].join("\n"),
|
|
3169
|
+
].join("\n"), te = [
|
|
3170
3170
|
"// GENERATED BY `voltro dev` — do not edit; will be overwritten on next boot.",
|
|
3171
3171
|
"// Entry: imports the generated App component and calls mount() with the",
|
|
3172
3172
|
"// resolved apis map. Side-effect only — no local component definitions —",
|
|
@@ -3201,7 +3201,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3201
3201
|
"",
|
|
3202
3202
|
Io
|
|
3203
3203
|
].join("\n");
|
|
3204
|
-
} else v = "",
|
|
3204
|
+
} else v = "", ee = "", te = [
|
|
3205
3205
|
"// GENERATED BY `voltro dev` — do not edit; will be overwritten on next boot.",
|
|
3206
3206
|
"// The user's root component lives at ../src/App.tsx; this file imports it",
|
|
3207
3207
|
"// and calls mount(). Side-effect only, no component definitions, so the",
|
|
@@ -3224,26 +3224,26 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3224
3224
|
"",
|
|
3225
3225
|
Io
|
|
3226
3226
|
].join("\n");
|
|
3227
|
-
let
|
|
3228
|
-
await
|
|
3229
|
-
let
|
|
3227
|
+
let y = N(e, ".framework");
|
|
3228
|
+
await z.mkdir(y, { recursive: !0 }), t.env ? await ut(y, r) : await z.rm(N(y, "env.public.ts"), { force: !0 }), await z.writeFile(N(y, "index.html"), d, "utf8"), await z.writeFile(N(y, "main.tsx"), te, "utf8"), v ? (await z.writeFile(N(y, "app.tsx"), v, "utf8"), await z.writeFile(N(y, "routeTable.ts"), ee, "utf8")) : (await z.rm(N(y, "app.tsx"), { force: !0 }), await z.rm(N(y, "routeTable.ts"), { force: !0 }));
|
|
3229
|
+
let x = N(e, ".gitignore"), S = "";
|
|
3230
3230
|
try {
|
|
3231
|
-
|
|
3231
|
+
S = await z.readFile(x, "utf8");
|
|
3232
3232
|
} catch {}
|
|
3233
|
-
let
|
|
3234
|
-
if (
|
|
3235
|
-
let e =
|
|
3233
|
+
let C = ["/.framework/"], w = new Set(S.split("\n").map((e) => e.trim())), T = C.filter((e) => !w.has(e));
|
|
3234
|
+
if (T.length > 0) {
|
|
3235
|
+
let e = S === "" || S.endsWith("\n") ? "" : "\n";
|
|
3236
3236
|
try {
|
|
3237
|
-
await
|
|
3237
|
+
await z.appendFile(x, `${e}${T.join("\n")}\n`, "utf8");
|
|
3238
3238
|
} catch (e) {
|
|
3239
|
-
Q.warn(`could not add ${
|
|
3239
|
+
Q.warn(`could not add ${T.join(", ")} to ${x} — add it by hand so the generated directory stays out of git. The build is unaffected.`, { reason: e?.message ?? String(e) });
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
3242
|
}, $o = async (e, t) => {
|
|
3243
3243
|
try {
|
|
3244
|
-
let n =
|
|
3245
|
-
if (!
|
|
3246
|
-
let i = await
|
|
3244
|
+
let n = M(e), r = N(n, "project.json");
|
|
3245
|
+
if (!L(r)) return;
|
|
3246
|
+
let i = await z.readFile(r, "utf8"), a = JSON.parse(i).apps ?? {}, o = e.split("/").filter(Boolean).pop() ?? "", s = [];
|
|
3247
3247
|
for (let [e, n] of Object.entries(a)) e !== o && n.port === t && s.push(e);
|
|
3248
3248
|
if (s.length === 0) return;
|
|
3249
3249
|
Q.warn("sibling app(s) claim the same port — only one boots", {
|
|
@@ -3252,10 +3252,10 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3252
3252
|
projectJson: r
|
|
3253
3253
|
});
|
|
3254
3254
|
} catch {}
|
|
3255
|
-
}, es = (e) =>
|
|
3256
|
-
let n = es(e), r = t.preferSource !== !0 &&
|
|
3255
|
+
}, es = (e) => N(e, ".framework", "dist", "server", "appConfig.js"), ts = async (e, t = {}) => {
|
|
3256
|
+
let n = es(e), r = t.preferSource !== !0 && L(n) ? n : N(e, "app.config.ts");
|
|
3257
3257
|
try {
|
|
3258
|
-
let e = (await import(
|
|
3258
|
+
let e = (await import(U(r).href)).default;
|
|
3259
3259
|
return typeof e == "object" && e && "type" in e && e.type === "web" ? e : null;
|
|
3260
3260
|
} catch {
|
|
3261
3261
|
return null;
|
|
@@ -3310,43 +3310,43 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3310
3310
|
dashboardPin: process.env[ji] === "1"
|
|
3311
3311
|
});
|
|
3312
3312
|
for (let e of c.warnings) Q.warn(e);
|
|
3313
|
-
let l = c.port, _ = n.name ?? "unnamed",
|
|
3314
|
-
await
|
|
3315
|
-
id:
|
|
3313
|
+
let l = c.port, _ = n.name ?? "unnamed", b = ce("web", _, l), x = le(_);
|
|
3314
|
+
await ae({
|
|
3315
|
+
id: b,
|
|
3316
3316
|
name: _,
|
|
3317
3317
|
kind: "web",
|
|
3318
3318
|
url: `http://localhost:${l}`,
|
|
3319
3319
|
pid: process.pid,
|
|
3320
3320
|
status: "booting",
|
|
3321
|
-
logFile:
|
|
3321
|
+
logFile: x.path
|
|
3322
3322
|
}).catch(() => {}), await $o(e, l);
|
|
3323
|
-
let { pages:
|
|
3323
|
+
let { pages: S, dirs: C } = await Mo(N(e, "src", "pages")), w = null, T = n.fonts !== void 0 && n.fonts.length > 0 ? dr({
|
|
3324
3324
|
root: e,
|
|
3325
3325
|
fonts: n.fonts,
|
|
3326
|
-
cache:
|
|
3326
|
+
cache: te(),
|
|
3327
3327
|
secret: lr().secret,
|
|
3328
|
-
isOgSsrRoute: (e) =>
|
|
3328
|
+
isOgSsrRoute: (e) => E.ssrRoutes.some((t) => t.pattern === e),
|
|
3329
3329
|
getPageModule: async (e) => {
|
|
3330
|
-
let t =
|
|
3331
|
-
if (t === void 0 ||
|
|
3332
|
-
let n = await
|
|
3330
|
+
let t = E.ssrRoutes.find((t) => t.pattern === e);
|
|
3331
|
+
if (t === void 0 || w === null) return null;
|
|
3332
|
+
let n = await w(t.file), r = ee(n, t.file);
|
|
3333
3333
|
return r === "ssr" || r === "isr" ? n : null;
|
|
3334
3334
|
}
|
|
3335
|
-
}) : null,
|
|
3336
|
-
dirs:
|
|
3337
|
-
ssrRoutes: Ro(
|
|
3338
|
-
},
|
|
3335
|
+
}) : null, E = {
|
|
3336
|
+
dirs: C,
|
|
3337
|
+
ssrRoutes: Ro(S)
|
|
3338
|
+
}, D = C.map((e) => ({
|
|
3339
3339
|
dir: e.dir,
|
|
3340
3340
|
hasLayout: e.hasLayout,
|
|
3341
3341
|
hasError: e.hasError,
|
|
3342
3342
|
hasPending: e.hasPending,
|
|
3343
3343
|
hasNotFound: e.hasNotFound
|
|
3344
|
-
})),
|
|
3344
|
+
})), O = await xr({
|
|
3345
3345
|
appRoot: e,
|
|
3346
|
-
pages:
|
|
3346
|
+
pages: S
|
|
3347
3347
|
});
|
|
3348
|
-
|
|
3349
|
-
let
|
|
3348
|
+
O.wrote && Q.debug("routes codegen wrote", { path: P(e, O.path) });
|
|
3349
|
+
let re = await it("vite", () => import("vite")), k = (await import("@vitejs/plugin-react")).default, A = (await import("@tailwindcss/vite")).default, j = N(e, ".framework"), ie = N(e, "src"), M = /* @__PURE__ */ new Set([
|
|
3350
3350
|
".framework",
|
|
3351
3351
|
"node_modules",
|
|
3352
3352
|
"dist",
|
|
@@ -3354,63 +3354,63 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3354
3354
|
".vite",
|
|
3355
3355
|
".turbo",
|
|
3356
3356
|
".cache"
|
|
3357
|
-
]),
|
|
3357
|
+
]), de = {
|
|
3358
3358
|
name: "framework:watch-app-sources",
|
|
3359
3359
|
async configureServer(t) {
|
|
3360
3360
|
try {
|
|
3361
|
-
let n = (await
|
|
3362
|
-
for (let r of n) t.watcher.add(
|
|
3363
|
-
n.length === 0 && t.watcher.add(
|
|
3361
|
+
let n = (await z.readdir(e, { withFileTypes: !0 })).filter((e) => e.isDirectory() && !M.has(e.name));
|
|
3362
|
+
for (let r of n) t.watcher.add(N(e, r.name));
|
|
3363
|
+
n.length === 0 && t.watcher.add(ie);
|
|
3364
3364
|
} catch {
|
|
3365
|
-
t.watcher.add(
|
|
3365
|
+
t.watcher.add(ie);
|
|
3366
3366
|
}
|
|
3367
3367
|
for (let n of await g(e)) t.watcher.add(n.dir);
|
|
3368
3368
|
}
|
|
3369
|
-
},
|
|
3369
|
+
}, I = N(e, "src", "pages"), R = (e) => e.endsWith(".tsx") && (e === I || e.startsWith(I + "/")), B = (e) => e === I || e.startsWith(I + "/"), fe = async (t) => {
|
|
3370
3370
|
try {
|
|
3371
3371
|
let r = Date.now();
|
|
3372
3372
|
await Qo(e, n, a, s);
|
|
3373
|
-
let { pages: i, dirs: o } = await Mo(
|
|
3373
|
+
let { pages: i, dirs: o } = await Mo(I);
|
|
3374
3374
|
await xr({
|
|
3375
3375
|
appRoot: e,
|
|
3376
3376
|
pages: i
|
|
3377
|
-
}),
|
|
3377
|
+
}), E.dirs = o, E.ssrRoutes = Ro(i), Q.info("page tree regenerated", {
|
|
3378
3378
|
reason: t,
|
|
3379
3379
|
ms: Date.now() - r,
|
|
3380
|
-
routes:
|
|
3380
|
+
routes: E.ssrRoutes.length
|
|
3381
3381
|
});
|
|
3382
|
-
for (let e of ja(Y,
|
|
3382
|
+
for (let e of ja(Y, E.ssrRoutes.map((e) => e.pattern))) Q.error(`middleware.ts: ${e.message}`);
|
|
3383
3383
|
} catch (e) {
|
|
3384
3384
|
Q.error("page tree regen failed", { reason: t }, e);
|
|
3385
3385
|
}
|
|
3386
|
-
},
|
|
3386
|
+
}, pe = {
|
|
3387
3387
|
name: "framework:regenerate-on-page-tree-change",
|
|
3388
3388
|
configureServer(t) {
|
|
3389
3389
|
let n = null, r = [], i = (e) => {
|
|
3390
3390
|
r.push(e), n && clearTimeout(n), n = setTimeout(() => {
|
|
3391
3391
|
n = null;
|
|
3392
3392
|
let e = r.length === 1 ? r[0] : `${r.length} events (${r[0]}, …)`;
|
|
3393
|
-
r.length = 0,
|
|
3393
|
+
r.length = 0, fe(e);
|
|
3394
3394
|
}, 50);
|
|
3395
3395
|
};
|
|
3396
3396
|
t.watcher.on("add", (t) => {
|
|
3397
|
-
|
|
3397
|
+
R(t) && i(`add ${P(e, t)}`);
|
|
3398
3398
|
}), t.watcher.on("unlink", (t) => {
|
|
3399
|
-
|
|
3399
|
+
R(t) && i(`unlink ${P(e, t)}`);
|
|
3400
3400
|
}), t.watcher.on("addDir", (t) => {
|
|
3401
|
-
|
|
3401
|
+
B(t) && i(`addDir ${P(e, t)}`);
|
|
3402
3402
|
}), t.watcher.on("unlinkDir", (t) => {
|
|
3403
|
-
|
|
3403
|
+
B(t) && i(`unlinkDir ${P(e, t)}`);
|
|
3404
3404
|
});
|
|
3405
3405
|
}
|
|
3406
|
-
},
|
|
3406
|
+
}, V = N(e, "app.config.ts"), me = (e) => {
|
|
3407
3407
|
if (!Ae(e.env)) return "";
|
|
3408
3408
|
let t = Object.entries(e.env.vars).map(([e, t]) => `${e}:${t.access}`).sort();
|
|
3409
3409
|
return `${String(e.env.publicPrefix)}|${t.join(",")}`;
|
|
3410
|
-
},
|
|
3410
|
+
}, he = (e, t) => {
|
|
3411
3411
|
let n = [];
|
|
3412
|
-
return e.port !== t.port && n.push(`port ${e.port ?? "(default)"} → ${t.port ?? "(default)"}`), JSON.stringify(e.proxies) !== JSON.stringify(t.proxies) && n.push("proxies"), JSON.stringify(e.allowedHosts) !== JSON.stringify(t.allowedHosts) && n.push("allowedHosts"), JSON.stringify(e.apis) !== JSON.stringify(t.apis) && n.push("apis"),
|
|
3413
|
-
},
|
|
3412
|
+
return e.port !== t.port && n.push(`port ${e.port ?? "(default)"} → ${t.port ?? "(default)"}`), JSON.stringify(e.proxies) !== JSON.stringify(t.proxies) && n.push("proxies"), JSON.stringify(e.allowedHosts) !== JSON.stringify(t.allowedHosts) && n.push("allowedHosts"), JSON.stringify(e.apis) !== JSON.stringify(t.apis) && n.push("apis"), me(e) !== me(t) && n.push("env"), n;
|
|
3413
|
+
}, H = n, U = F(V), ge = () => {
|
|
3414
3414
|
let e = ze(process.execPath, [...process.execArgv, ...process.argv.slice(1)], {
|
|
3415
3415
|
stdio: "inherit",
|
|
3416
3416
|
env: process.env,
|
|
@@ -3423,24 +3423,24 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3423
3423
|
}), e.on("error", (e) => {
|
|
3424
3424
|
Q.error("restart spawn failed", {}, e), process.exit(1);
|
|
3425
3425
|
});
|
|
3426
|
-
},
|
|
3426
|
+
}, W = {
|
|
3427
3427
|
name: "framework:watch-app-config",
|
|
3428
3428
|
async configureServer(n) {
|
|
3429
|
-
n.watcher.add(
|
|
3430
|
-
let r = wa.map((t) =>
|
|
3429
|
+
n.watcher.add(V), Q.info("watching app.config.ts for changes", { path: P(e, V) });
|
|
3430
|
+
let r = wa.map((t) => N(e, t)), i = new Set(r.map((e) => F(e)));
|
|
3431
3431
|
for (let e of r) n.watcher.add(e);
|
|
3432
3432
|
n.watcher.on("all", (t, r) => {
|
|
3433
|
-
i.has(
|
|
3434
|
-
|
|
3433
|
+
i.has(F(r)) && (Q.warn("middleware.ts changed — restarting (it is loaded once per boot)", { path: P(e, r) }), n.close().catch(() => void 0).then(() => {
|
|
3434
|
+
ge();
|
|
3435
3435
|
}));
|
|
3436
3436
|
});
|
|
3437
3437
|
let a = async () => {
|
|
3438
3438
|
try {
|
|
3439
3439
|
try {
|
|
3440
|
-
let e = n.moduleGraph.getModuleById(
|
|
3440
|
+
let e = n.moduleGraph.getModuleById(V);
|
|
3441
3441
|
e && n.moduleGraph.invalidateModule(e);
|
|
3442
3442
|
} catch {}
|
|
3443
|
-
let e = (await n.ssrLoadModule(
|
|
3443
|
+
let e = (await n.ssrLoadModule(V, { fixStacktrace: !0 })).default;
|
|
3444
3444
|
return typeof e == "object" && e && "type" in e && e.type === "web" ? e : (Q.warn("app.config.ts re-load returned wrong shape", { hasDefault: e !== void 0 }), null);
|
|
3445
3445
|
} catch (e) {
|
|
3446
3446
|
return Q.warn("app.config.ts re-load failed — ignoring this change", {}, e), null;
|
|
@@ -3459,22 +3459,22 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3459
3459
|
theme: t.theme,
|
|
3460
3460
|
port: t.port,
|
|
3461
3461
|
name: t.name
|
|
3462
|
-
}), JSON.stringify(t) === JSON.stringify(
|
|
3462
|
+
}), JSON.stringify(t) === JSON.stringify(H)) {
|
|
3463
3463
|
Q.info("app.config.ts onConfigChange: parsed config unchanged — skipping (no-op edit?)");
|
|
3464
3464
|
return;
|
|
3465
3465
|
}
|
|
3466
|
-
let r =
|
|
3466
|
+
let r = he(H, t);
|
|
3467
3467
|
if (r.length > 0) {
|
|
3468
3468
|
Q.warn("app.config.ts changed — hard restart required", { fields: r });
|
|
3469
3469
|
try {
|
|
3470
3470
|
await n.close();
|
|
3471
3471
|
} catch {}
|
|
3472
|
-
|
|
3472
|
+
ge();
|
|
3473
3473
|
return;
|
|
3474
3474
|
}
|
|
3475
3475
|
try {
|
|
3476
3476
|
let r = Date.now();
|
|
3477
|
-
await Qo(e, t, await Go(e, t)),
|
|
3477
|
+
await Qo(e, t, await Go(e, t)), H = t, n.ws && n.ws.send({
|
|
3478
3478
|
type: "full-reload",
|
|
3479
3479
|
path: "*"
|
|
3480
3480
|
}), Q.info("app.config.ts soft-regen", {
|
|
@@ -3484,7 +3484,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3484
3484
|
} catch (e) {
|
|
3485
3485
|
Q.error("app.config.ts soft-regen failed", {}, e);
|
|
3486
3486
|
}
|
|
3487
|
-
}, l = (e) =>
|
|
3487
|
+
}, l = (e) => ue(e) === "app.config.ts" ? e === V || F(e) === U : !1;
|
|
3488
3488
|
n.watcher.on("change", (e) => {
|
|
3489
3489
|
l(e) && (Q.info("app.config.ts change event (chokidar)", { file: e }), s());
|
|
3490
3490
|
}), n.watcher.on("add", (e) => {
|
|
@@ -3492,7 +3492,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3492
3492
|
});
|
|
3493
3493
|
try {
|
|
3494
3494
|
let { watchFile: e } = await import("node:fs");
|
|
3495
|
-
e(
|
|
3495
|
+
e(V, { interval: 500 }, (e, t) => {
|
|
3496
3496
|
e.mtimeMs !== t.mtimeMs && (Q.info("app.config.ts change event (poll)", { mtime: e.mtimeMs }), s());
|
|
3497
3497
|
}), Q.info("app.config.ts polling watcher attached", { intervalMs: 500 });
|
|
3498
3498
|
} catch (e) {
|
|
@@ -3503,10 +3503,10 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3503
3503
|
onBeforeRestart: () => n.close()
|
|
3504
3504
|
});
|
|
3505
3505
|
}
|
|
3506
|
-
},
|
|
3506
|
+
}, G = /\/apps\/[^/]+\/.*\.(route|mutation|workflow|schema)\.tsx?$/, ve = 0, ye = {
|
|
3507
3507
|
name: "framework:suppress-api-hmr",
|
|
3508
3508
|
handleHotUpdate(e) {
|
|
3509
|
-
if (ve += 1,
|
|
3509
|
+
if (ve += 1, G.test(e.file)) return [];
|
|
3510
3510
|
}
|
|
3511
3511
|
}, be = {
|
|
3512
3512
|
name: "framework:reoptimize-on-rpcgroup-change",
|
|
@@ -3517,7 +3517,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3517
3517
|
if (i) {
|
|
3518
3518
|
n.push(i);
|
|
3519
3519
|
try {
|
|
3520
|
-
t.watcher.add(
|
|
3520
|
+
t.watcher.add(N(i, "rpcGroup.generated.ts"));
|
|
3521
3521
|
} catch {}
|
|
3522
3522
|
for (let e of await ba(i)) try {
|
|
3523
3523
|
t.watcher.add(e);
|
|
@@ -3531,7 +3531,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3531
3531
|
if (e !== void 0 && e !== r) {
|
|
3532
3532
|
r = e, o = !0, Q.info("the api surface changed — re-bundling the api client + reloading (descriptor edits propagate automatically; no manual restart needed)");
|
|
3533
3533
|
try {
|
|
3534
|
-
await
|
|
3534
|
+
await z.rm(N(j, ".vite", "deps"), {
|
|
3535
3535
|
recursive: !0,
|
|
3536
3536
|
force: !0
|
|
3537
3537
|
}), await t.restart(!0);
|
|
@@ -3540,7 +3540,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3540
3540
|
}
|
|
3541
3541
|
}
|
|
3542
3542
|
}, c = (e) => {
|
|
3543
|
-
let t =
|
|
3543
|
+
let t = F(e);
|
|
3544
3544
|
!va(t) && !t.endsWith("rpcGroup.generated.ts") || (i && clearTimeout(i), i = setTimeout(() => {
|
|
3545
3545
|
s();
|
|
3546
3546
|
}, 120));
|
|
@@ -3594,17 +3594,17 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3594
3594
|
let r = null, a = async () => {
|
|
3595
3595
|
if (r !== null) return r;
|
|
3596
3596
|
let n = [];
|
|
3597
|
-
for (let r of
|
|
3598
|
-
let i = await t.ssrLoadModule(
|
|
3597
|
+
for (let r of S) try {
|
|
3598
|
+
let i = await t.ssrLoadModule(N(e, "src", "pages", r.file));
|
|
3599
3599
|
n.push({
|
|
3600
3600
|
pattern: r.pattern,
|
|
3601
3601
|
file: r.file,
|
|
3602
3602
|
dirChain: r.dirChain,
|
|
3603
|
-
renderMode:
|
|
3603
|
+
renderMode: ee(i, N("src", "pages", r.file)),
|
|
3604
3604
|
interactive: i.interactive ?? "full",
|
|
3605
3605
|
tenantAware: i.tenantAware === !0,
|
|
3606
|
-
revalidateMs:
|
|
3607
|
-
staleWhileRevalidateMs:
|
|
3606
|
+
revalidateMs: y(i.revalidate),
|
|
3607
|
+
staleWhileRevalidateMs: y(i.staleWhileRevalidate) ?? 0,
|
|
3608
3608
|
cacheInvalidatesOn: Array.isArray(i.cacheInvalidatesOn) ? i.cacheInvalidatesOn : [],
|
|
3609
3609
|
hasLoader: typeof i.loader == "function",
|
|
3610
3610
|
hasMeta: i.meta != null,
|
|
@@ -3632,7 +3632,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3632
3632
|
}), t.middlewares.use((t, n, r) => {
|
|
3633
3633
|
if (t.method !== "GET" && t.method !== "HEAD") return r();
|
|
3634
3634
|
let { pathname: i } = Ji(t.url ?? "/");
|
|
3635
|
-
if (i !== "/robots.txt" ||
|
|
3635
|
+
if (i !== "/robots.txt" || L(N(e, "public", "robots.txt"))) return r();
|
|
3636
3636
|
n.statusCode = 200, n.setHeader("Content-Type", "text/plain; charset=utf-8"), n.end(Dr({ indexable: !1 }));
|
|
3637
3637
|
}), n.name === "voltroDashboard" && t.middlewares.use(async (e, t, n) => {
|
|
3638
3638
|
let r = e.url ?? "", i = r.split("?")[0];
|
|
@@ -3805,7 +3805,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3805
3805
|
})
|
|
3806
3806
|
},
|
|
3807
3807
|
routes: await a(),
|
|
3808
|
-
dirs:
|
|
3808
|
+
dirs: D,
|
|
3809
3809
|
cache: () => ({
|
|
3810
3810
|
backend: "memory",
|
|
3811
3811
|
size: 0,
|
|
@@ -3828,7 +3828,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3828
3828
|
e.middlewares.use(async (e, t, n) => {
|
|
3829
3829
|
if (!(e.url ?? "").startsWith("/api/dashboard/registry")) return n();
|
|
3830
3830
|
try {
|
|
3831
|
-
let e = await
|
|
3831
|
+
let e = await oe();
|
|
3832
3832
|
t.statusCode = 200, t.setHeader("content-type", "application/json; charset=utf-8"), t.end(JSON.stringify(e));
|
|
3833
3833
|
} catch (e) {
|
|
3834
3834
|
t.statusCode = 500, t.setHeader("content-type", "text/plain"), t.end(`registry read error: ${e.message}`);
|
|
@@ -3862,7 +3862,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3862
3862
|
})
|
|
3863
3863
|
});
|
|
3864
3864
|
Q.debug(`ssr cold-compile concurrency ${De}`, { concurrency: De });
|
|
3865
|
-
let ke = null, je = async () => (ke === null && (ke = await
|
|
3865
|
+
let ke = null, je = async () => (ke === null && (ke = await z.readFile(N(e, ".framework", "index.html"), "utf8")), ke), Me = {
|
|
3866
3866
|
name: "framework:ssr",
|
|
3867
3867
|
configureServer(t) {
|
|
3868
3868
|
let r = (e) => Oe.load(e, async () => await t.ssrLoadModule(e)), i, o = !1, s = () => {
|
|
@@ -3870,8 +3870,8 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3870
3870
|
let t = n.locales ?? [], a = n.defaultLocale ?? t[0] ?? "en";
|
|
3871
3871
|
return t.length === 0 ? (i = Promise.resolve(() => void 0), i) : (i = (async () => {
|
|
3872
3872
|
let [{ makeSsgWrap: i }, { makeSsrI18nResolver: s }] = await Promise.all([r("@voltro/i18n"), r("@voltro/i18n/server")]), c = {};
|
|
3873
|
-
for (let n of t) if (
|
|
3874
|
-
let t = (await r(
|
|
3873
|
+
for (let n of t) if (L(N(e, "src", "locales", `${n}.ts`))) try {
|
|
3874
|
+
let t = (await r(N(e, "src", "locales", `${n}.ts`))).default;
|
|
3875
3875
|
t !== void 0 && (c[n] = i(n, t, a));
|
|
3876
3876
|
} catch (e) {
|
|
3877
3877
|
Q.warn("locale catalog failed to load for SSR", { locale: n }, e);
|
|
@@ -3901,7 +3901,15 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3901
3901
|
defaultTimeZone: n.defaultTimeZone ?? null
|
|
3902
3902
|
});
|
|
3903
3903
|
})(), i);
|
|
3904
|
-
}, c =
|
|
3904
|
+
}, c, l = () => (c ??= (async () => {
|
|
3905
|
+
try {
|
|
3906
|
+
let e = a[0];
|
|
3907
|
+
if (e === void 0) return;
|
|
3908
|
+
let t = (await r(`${e.pkg}/rpcGroup`)).appDescriptors;
|
|
3909
|
+
if (t === void 0) return;
|
|
3910
|
+
(await r("@voltro/web/ssr")).registerSsrApiDescriptors?.(e.name, t);
|
|
3911
|
+
} catch {}
|
|
3912
|
+
})(), c), u = on({
|
|
3905
3913
|
apiName: a[0]?.name,
|
|
3906
3914
|
apiOrigin: Yo(a[0], { allowDevProxy: !0 }),
|
|
3907
3915
|
loadDescriptors: async () => {
|
|
@@ -3920,16 +3928,16 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3920
3928
|
});
|
|
3921
3929
|
t.middlewares.use((e, t, n) => {
|
|
3922
3930
|
if (!(e.url ?? "/").split("?")[0].startsWith(Ue)) return n();
|
|
3923
|
-
|
|
3931
|
+
u(e, t, (t, r) => {
|
|
3924
3932
|
e.url = t, e.method = "GET", e.__voltroFormFlash = r, n();
|
|
3925
3933
|
}).then((e) => {
|
|
3926
3934
|
e || n();
|
|
3927
3935
|
});
|
|
3928
|
-
}),
|
|
3936
|
+
}), w = async (n) => await t.ssrLoadModule(N(e, "src", "pages", n)), t.middlewares.use(async (e, t, n) => {
|
|
3929
3937
|
let r = e.url ?? "/";
|
|
3930
|
-
if (!r.startsWith("/_voltro/og") ||
|
|
3938
|
+
if (!r.startsWith("/_voltro/og") || T === null) return n();
|
|
3931
3939
|
try {
|
|
3932
|
-
let e = await
|
|
3940
|
+
let e = await T.handle(new URL(r, "http://localhost"));
|
|
3933
3941
|
if (e === null) return n();
|
|
3934
3942
|
t.statusCode = e.status;
|
|
3935
3943
|
for (let [n, r] of Object.entries(e.headers)) t.setHeader(n, r);
|
|
@@ -3937,36 +3945,36 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3937
3945
|
} catch (e) {
|
|
3938
3946
|
t.statusCode = 500, t.setHeader("content-type", "text/plain"), t.end(`og render error: ${e.message}`);
|
|
3939
3947
|
}
|
|
3940
|
-
}), t.middlewares.use(async (i, c,
|
|
3941
|
-
if (i.method !== "GET" && i.method !== "HEAD") return
|
|
3942
|
-
let
|
|
3943
|
-
|
|
3944
|
-
let { pathname:
|
|
3945
|
-
if (
|
|
3946
|
-
let
|
|
3948
|
+
}), t.middlewares.use(async (i, c, u) => {
|
|
3949
|
+
if (i.method !== "GET" && i.method !== "HEAD") return u();
|
|
3950
|
+
let d = i.url ?? "/";
|
|
3951
|
+
d.indexOf("?");
|
|
3952
|
+
let { pathname: f, search: p } = Ji(d), m = i.__voltroFormFlash;
|
|
3953
|
+
if (f.startsWith("/@") || f.startsWith("/node_modules/") || f.startsWith("/.framework/") || f.startsWith("/_voltro/") || f === "/main.tsx" || f === "/index.html" || f === "/sw.js" || f === "/favicon.ico" || f === "/robots.txt") return u();
|
|
3954
|
+
let h = async () => {
|
|
3947
3955
|
if (Y.length === 0) return;
|
|
3948
3956
|
let e = Aa(Y, {
|
|
3949
3957
|
route: void 0,
|
|
3950
|
-
pathname:
|
|
3958
|
+
pathname: f
|
|
3951
3959
|
});
|
|
3952
3960
|
if (e === void 0) return;
|
|
3953
3961
|
let t = {};
|
|
3954
3962
|
for (let [e, n] of Object.entries(i.headers ?? {})) typeof n == "string" ? t[e] = n : Array.isArray(n) && (t[e] = n.join(", "));
|
|
3955
3963
|
let n = await Ba(e, {
|
|
3956
|
-
pathname:
|
|
3957
|
-
search:
|
|
3964
|
+
pathname: f,
|
|
3965
|
+
search: p,
|
|
3958
3966
|
headers: t,
|
|
3959
3967
|
cookies: Na(t.cookie),
|
|
3960
3968
|
route: void 0
|
|
3961
3969
|
});
|
|
3962
3970
|
for (let e of n.setCookies) c.appendHeader("set-cookie", La(e));
|
|
3963
3971
|
};
|
|
3964
|
-
if (/\.[a-z0-9]+$/i.test(
|
|
3965
|
-
let
|
|
3966
|
-
if (!
|
|
3967
|
-
let e = _o(
|
|
3968
|
-
if (e === void 0) return await
|
|
3969
|
-
|
|
3972
|
+
if (/\.[a-z0-9]+$/i.test(f)) return await h(), u();
|
|
3973
|
+
let g = zo(f, E.ssrRoutes), _ = !1;
|
|
3974
|
+
if (!g) {
|
|
3975
|
+
let e = _o(E.dirs, f);
|
|
3976
|
+
if (e === void 0) return await h(), u();
|
|
3977
|
+
_ = !0, g = {
|
|
3970
3978
|
route: {
|
|
3971
3979
|
pattern: "<not-found>",
|
|
3972
3980
|
file: e.dir === "" ? "not-found.tsx" : `${e.dir}/not-found.tsx`,
|
|
@@ -3978,15 +3986,15 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3978
3986
|
params: {}
|
|
3979
3987
|
};
|
|
3980
3988
|
}
|
|
3981
|
-
let
|
|
3982
|
-
|
|
3983
|
-
pattern:
|
|
3984
|
-
pathname:
|
|
3989
|
+
let v = !Te.has(g.route.pattern), te = Date.now();
|
|
3990
|
+
v && Q.info(`ssr compiling ${g.route.pattern}`, {
|
|
3991
|
+
pattern: g.route.pattern,
|
|
3992
|
+
pathname: f
|
|
3985
3993
|
});
|
|
3986
|
-
let
|
|
3994
|
+
let y = {}, b = async (e, t) => {
|
|
3987
3995
|
let n = Date.now(), r = await t();
|
|
3988
|
-
return
|
|
3989
|
-
},
|
|
3996
|
+
return y[e] = (y[e] ?? 0) + (Date.now() - n), r;
|
|
3997
|
+
}, x = async (e, n, r) => {
|
|
3990
3998
|
let i = await t.moduleGraph.getModuleById(e);
|
|
3991
3999
|
if (!(!i || n.has(e))) {
|
|
3992
4000
|
if (n.add(e), i.id && /\.(css|sass|scss|less|stylus|pcss|postcss)(\?|$)/.test(i.id)) {
|
|
@@ -3994,284 +4002,284 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
3994
4002
|
r.includes(e) || r.push(e);
|
|
3995
4003
|
return;
|
|
3996
4004
|
}
|
|
3997
|
-
for (let e of i.importedModules ?? []) e.id && await
|
|
4005
|
+
for (let e of i.importedModules ?? []) e.id && await x(e.id, n, r);
|
|
3998
4006
|
}
|
|
3999
|
-
},
|
|
4007
|
+
}, S = !1;
|
|
4000
4008
|
try {
|
|
4001
|
-
let
|
|
4002
|
-
if (
|
|
4003
|
-
let
|
|
4004
|
-
for (let [e, t] of Object.entries(i.headers ?? {})) typeof t == "string" ?
|
|
4005
|
-
let
|
|
4006
|
-
route:
|
|
4007
|
-
pathname:
|
|
4009
|
+
let C = await b("loadPage", async () => await r(N(e, "src", "pages", g.route.file))), w = _ ? "ssr" : ee(C, N("src", "pages", g.route.file)), ne = No(E.dirs, g.route.dirChain), D = w === "spa" && ne.some((e) => e.hasLayout), O = C.interactive ?? "full";
|
|
4010
|
+
if (w !== "ssr" && w !== "isr" && !D && O !== "islands") return await h(), u();
|
|
4011
|
+
let re = {};
|
|
4012
|
+
for (let [e, t] of Object.entries(i.headers ?? {})) typeof t == "string" ? re[e] = t : Array.isArray(t) && (re[e] = t.join(", "));
|
|
4013
|
+
let k = await Ba(Aa(Y, {
|
|
4014
|
+
route: g.route.pattern,
|
|
4015
|
+
pathname: f
|
|
4008
4016
|
}), {
|
|
4009
|
-
pathname:
|
|
4010
|
-
search:
|
|
4011
|
-
headers:
|
|
4012
|
-
cookies: Na(
|
|
4013
|
-
route:
|
|
4017
|
+
pathname: f,
|
|
4018
|
+
search: p,
|
|
4019
|
+
headers: re,
|
|
4020
|
+
cookies: Na(re.cookie),
|
|
4021
|
+
route: g.route.pattern
|
|
4014
4022
|
}, Re);
|
|
4015
|
-
for (let e of
|
|
4016
|
-
for (let [e, t] of Object.entries(
|
|
4017
|
-
if (
|
|
4018
|
-
let
|
|
4023
|
+
for (let e of k.setCookies) c.appendHeader("set-cookie", La(e));
|
|
4024
|
+
for (let [e, t] of Object.entries(k.responseHeaders)) c.setHeader(e, t);
|
|
4025
|
+
if (w === "isr" && k.cspNonce !== void 0) throw Error(`page '${g.route.pattern}' is renderMode 'isr' while middleware.ts mints a cspNonce — an isr render is CACHED and a cached nonce is a lie the browser enforces. Use renderMode 'ssr' for nonce'd pages, or a hash-based CSP for isr.`);
|
|
4026
|
+
let A = w === "isr" ? Wa(k.headers) : k.headers, j = w === "isr" && C.ppr === !0, ie = j ? uo(A, g.route.pattern) : A, ae = Xo(Yo(a[0], { allowDevProxy: !0 }), A.cookie, {
|
|
4019
4027
|
apiName: a[0]?.name,
|
|
4020
|
-
headers:
|
|
4021
|
-
}),
|
|
4022
|
-
c.once("close",
|
|
4023
|
-
let
|
|
4028
|
+
headers: A
|
|
4029
|
+
}), oe = new AbortController(), se = () => oe.abort();
|
|
4030
|
+
c.once("close", se);
|
|
4031
|
+
let ce = null, le = [], ue = {};
|
|
4024
4032
|
try {
|
|
4025
|
-
(await r("@voltro/web/ssr")).beginStoreSeeds(), {chain:
|
|
4026
|
-
entries:
|
|
4027
|
-
loadLayout: (t) => r(
|
|
4028
|
-
loadError: (t) => r(
|
|
4029
|
-
loadPending: (t) => r(
|
|
4033
|
+
(await r("@voltro/web/ssr")).beginStoreSeeds(), await l(), {chain: le, segmentLoaderData: ue} = await b("loadChain", () => Po({
|
|
4034
|
+
entries: ne,
|
|
4035
|
+
loadLayout: (t) => r(N(e, "src", "pages", t.dir, "layout.tsx")),
|
|
4036
|
+
loadError: (t) => r(N(e, "src", "pages", t.dir, "error.tsx")),
|
|
4037
|
+
loadPending: (t) => r(N(e, "src", "pages", t.dir, "loading.tsx")),
|
|
4030
4038
|
ctx: {
|
|
4031
|
-
params:
|
|
4032
|
-
pathname:
|
|
4033
|
-
search:
|
|
4034
|
-
signal:
|
|
4035
|
-
headers:
|
|
4036
|
-
query:
|
|
4039
|
+
params: g.params,
|
|
4040
|
+
pathname: f,
|
|
4041
|
+
search: p,
|
|
4042
|
+
signal: oe.signal,
|
|
4043
|
+
headers: ie,
|
|
4044
|
+
query: ae,
|
|
4037
4045
|
isServer: !0
|
|
4038
4046
|
}
|
|
4039
4047
|
}));
|
|
4040
|
-
let t =
|
|
4041
|
-
typeof t == "function" && !
|
|
4042
|
-
params:
|
|
4043
|
-
pathname:
|
|
4044
|
-
search:
|
|
4045
|
-
signal:
|
|
4046
|
-
headers:
|
|
4047
|
-
query:
|
|
4048
|
+
let t = C.loader;
|
|
4049
|
+
typeof t == "function" && !D && (ce = await b("loader", () => t({
|
|
4050
|
+
params: g.params,
|
|
4051
|
+
pathname: f,
|
|
4052
|
+
search: p,
|
|
4053
|
+
signal: oe.signal,
|
|
4054
|
+
headers: ie,
|
|
4055
|
+
query: ae,
|
|
4048
4056
|
isServer: !0
|
|
4049
4057
|
})));
|
|
4050
4058
|
} finally {
|
|
4051
|
-
c.off("close",
|
|
4059
|
+
c.off("close", se);
|
|
4052
4060
|
}
|
|
4053
|
-
let
|
|
4054
|
-
|
|
4055
|
-
pageMod:
|
|
4056
|
-
params:
|
|
4057
|
-
query:
|
|
4061
|
+
let M = await b("loadSsrHelpers", async () => await r("@voltro/web/ssr"));
|
|
4062
|
+
D || await _a({
|
|
4063
|
+
pageMod: C,
|
|
4064
|
+
params: g.params,
|
|
4065
|
+
query: ae,
|
|
4058
4066
|
apiName: a[0]?.name,
|
|
4059
|
-
seed:
|
|
4060
|
-
seedFailure:
|
|
4067
|
+
seed: M.seedPreloadedSubscription,
|
|
4068
|
+
seedFailure: M.seedPreloadedSubscriptionFailure,
|
|
4061
4069
|
onError: ({ tag: e, apiName: t }, n) => Q.warn("preload seed failed", {
|
|
4062
4070
|
tag: e,
|
|
4063
4071
|
apiName: t,
|
|
4064
|
-
pathname:
|
|
4072
|
+
pathname: f
|
|
4065
4073
|
}, n)
|
|
4066
4074
|
});
|
|
4067
|
-
let
|
|
4068
|
-
pattern:
|
|
4069
|
-
Component:
|
|
4070
|
-
meta:
|
|
4071
|
-
loader:
|
|
4072
|
-
ErrorBoundary:
|
|
4073
|
-
Pending:
|
|
4074
|
-
renderMode:
|
|
4075
|
-
chain:
|
|
4076
|
-
},
|
|
4077
|
-
cookies:
|
|
4078
|
-
headers:
|
|
4079
|
-
url:
|
|
4080
|
-
...
|
|
4081
|
-
},
|
|
4082
|
-
|
|
4083
|
-
let
|
|
4084
|
-
outerWrap:
|
|
4085
|
-
locale:
|
|
4086
|
-
} : {},
|
|
4087
|
-
helpers:
|
|
4088
|
-
page: `src/pages/${
|
|
4089
|
-
interactive:
|
|
4075
|
+
let de = {
|
|
4076
|
+
pattern: g.route.pattern,
|
|
4077
|
+
Component: C.default,
|
|
4078
|
+
meta: C.meta,
|
|
4079
|
+
loader: C.loader,
|
|
4080
|
+
ErrorBoundary: C.ErrorBoundary,
|
|
4081
|
+
Pending: C.Pending,
|
|
4082
|
+
renderMode: w,
|
|
4083
|
+
chain: le
|
|
4084
|
+
}, P = {
|
|
4085
|
+
cookies: j ? fo(Ga(k.cookies), g.route.pattern) : w === "isr" ? Ga(k.cookies) : k.cookies,
|
|
4086
|
+
headers: ie,
|
|
4087
|
+
url: d,
|
|
4088
|
+
...m === void 0 ? {} : { formFlash: m }
|
|
4089
|
+
}, F = (await s())(A.cookie, A["accept-language"]);
|
|
4090
|
+
S = F !== void 0 && o;
|
|
4091
|
+
let I = F ? {
|
|
4092
|
+
outerWrap: F.outerWrap,
|
|
4093
|
+
locale: F.locale
|
|
4094
|
+
} : {}, L = D ? Gi({
|
|
4095
|
+
helpers: M,
|
|
4096
|
+
page: `src/pages/${g.route.file}`,
|
|
4097
|
+
interactive: O,
|
|
4090
4098
|
delivery: "stream",
|
|
4091
4099
|
renderInput: {
|
|
4092
|
-
descriptor:
|
|
4093
|
-
params:
|
|
4094
|
-
pathname:
|
|
4095
|
-
search:
|
|
4096
|
-
segmentLoaderData:
|
|
4097
|
-
requestContext:
|
|
4098
|
-
...
|
|
4100
|
+
descriptor: de,
|
|
4101
|
+
params: g.params,
|
|
4102
|
+
pathname: f,
|
|
4103
|
+
search: p,
|
|
4104
|
+
segmentLoaderData: ue,
|
|
4105
|
+
requestContext: P,
|
|
4106
|
+
...I
|
|
4099
4107
|
}
|
|
4100
|
-
}) : null,
|
|
4101
|
-
helpers:
|
|
4102
|
-
page: `src/pages/${
|
|
4103
|
-
pathname:
|
|
4104
|
-
renderMode:
|
|
4105
|
-
interactive:
|
|
4106
|
-
loaderData:
|
|
4107
|
-
segmentLoaderData:
|
|
4108
|
-
pageLoaderRan: typeof
|
|
4109
|
-
...
|
|
4108
|
+
}) : null, R = D ? null : Wi({
|
|
4109
|
+
helpers: M,
|
|
4110
|
+
page: `src/pages/${g.route.file}`,
|
|
4111
|
+
pathname: f,
|
|
4112
|
+
renderMode: w,
|
|
4113
|
+
interactive: O,
|
|
4114
|
+
loaderData: ce,
|
|
4115
|
+
segmentLoaderData: ue,
|
|
4116
|
+
pageLoaderRan: typeof C.loader == "function",
|
|
4117
|
+
...j ? { ppr: !0 } : {}
|
|
4110
4118
|
});
|
|
4111
|
-
|
|
4112
|
-
let
|
|
4113
|
-
await
|
|
4119
|
+
j && R !== null && mo(R.stateInput, g.route.pattern);
|
|
4120
|
+
let B = [];
|
|
4121
|
+
await b("collectCss", async () => {
|
|
4114
4122
|
let t = /* @__PURE__ */ new Set(), n = [
|
|
4115
|
-
|
|
4116
|
-
...
|
|
4117
|
-
...t.hasLayout ? [
|
|
4118
|
-
...t.hasError ? [
|
|
4119
|
-
...t.hasPending ? [
|
|
4123
|
+
N(e, "src", "pages", g.route.file),
|
|
4124
|
+
...ne.flatMap((t) => [
|
|
4125
|
+
...t.hasLayout ? [N(e, "src", "pages", t.dir, "layout.tsx")] : [],
|
|
4126
|
+
...t.hasError ? [N(e, "src", "pages", t.dir, "error.tsx")] : [],
|
|
4127
|
+
...t.hasPending ? [N(e, "src", "pages", t.dir, "loading.tsx")] : []
|
|
4120
4128
|
]),
|
|
4121
|
-
|
|
4129
|
+
N(e, ".framework", "main.tsx")
|
|
4122
4130
|
];
|
|
4123
|
-
for (let e of n) await
|
|
4131
|
+
for (let e of n) await x(e, t, B);
|
|
4124
4132
|
});
|
|
4125
|
-
let
|
|
4133
|
+
let fe = (O === "islands" ? await b("islandsEntry", async () => {
|
|
4126
4134
|
let t = Zo(a, "../../app.config"), n = (await Cn({
|
|
4127
4135
|
webRoot: e,
|
|
4128
4136
|
pages: [{
|
|
4129
|
-
pattern:
|
|
4130
|
-
file:
|
|
4137
|
+
pattern: g.route.pattern,
|
|
4138
|
+
file: g.route.file
|
|
4131
4139
|
}],
|
|
4132
4140
|
headSnippets: vn(await je()),
|
|
4133
4141
|
apiImports: t.imports,
|
|
4134
4142
|
apiEntriesLiteral: `[\n${t.providerEntryLines.join("\n")}\n ]`
|
|
4135
4143
|
}))[0];
|
|
4136
|
-
return n === void 0 ? void 0 : await
|
|
4137
|
-
}) : void 0) ?? await
|
|
4138
|
-
lang:
|
|
4139
|
-
...
|
|
4140
|
-
renderedAt:
|
|
4144
|
+
return n === void 0 ? void 0 : await z.readFile(N(e, ".framework", n.htmlFile), "utf8");
|
|
4145
|
+
}) : void 0) ?? await b("readShell", je), pe = await b("transformShell", () => t.transformIndexHtml(d, fe)), V = B.map((e) => `<link rel="stylesheet" href="${e}?direct" />`).join("\n "), me = F?.locale ?? P.cookies["voltro:locale"] ?? n.defaultLocale ?? (n.locales ?? [])[0] ?? "en", he = Date.now(), H = {
|
|
4146
|
+
lang: me,
|
|
4147
|
+
...F?.timeZone === void 0 ? {} : { timeZone: F.timeZone },
|
|
4148
|
+
renderedAt: he
|
|
4141
4149
|
};
|
|
4142
|
-
if (
|
|
4150
|
+
if (L) {
|
|
4143
4151
|
let e = (e) => qi({
|
|
4144
|
-
helpers:
|
|
4145
|
-
prepared:
|
|
4152
|
+
helpers: M,
|
|
4153
|
+
prepared: L,
|
|
4146
4154
|
meta: e,
|
|
4147
|
-
interactive:
|
|
4148
|
-
extra: [
|
|
4155
|
+
interactive: O,
|
|
4156
|
+
extra: [V]
|
|
4149
4157
|
});
|
|
4150
|
-
if (
|
|
4158
|
+
if (L.hasDeferred) ma({
|
|
4151
4159
|
res: c,
|
|
4152
4160
|
shell: ca({
|
|
4153
|
-
shell:
|
|
4161
|
+
shell: pe,
|
|
4154
4162
|
inlineModuleScriptsAsync: !0
|
|
4155
4163
|
}),
|
|
4156
|
-
documentAttrs:
|
|
4164
|
+
documentAttrs: H,
|
|
4157
4165
|
headers: {
|
|
4158
4166
|
"content-type": "text/html; charset=utf-8",
|
|
4159
4167
|
"x-voltro-rendered-by": "spa-shell-dev"
|
|
4160
4168
|
},
|
|
4161
4169
|
headInjection: e,
|
|
4162
|
-
...
|
|
4163
|
-
render: (e) =>
|
|
4164
|
-
...
|
|
4170
|
+
...k.cspNonce === void 0 ? {} : { nonce: k.cspNonce },
|
|
4171
|
+
render: (e) => M.renderPageToStream({
|
|
4172
|
+
...L.renderInput,
|
|
4165
4173
|
...e,
|
|
4166
|
-
...
|
|
4174
|
+
...k.cspNonce === void 0 ? {} : { nonce: k.cspNonce }
|
|
4167
4175
|
}),
|
|
4168
4176
|
onShellError: (e) => {
|
|
4169
|
-
Ee(c, "spa-shell-dev",
|
|
4177
|
+
Ee(c, "spa-shell-dev", f, g.route.pattern, e, S);
|
|
4170
4178
|
}
|
|
4171
4179
|
});
|
|
4172
4180
|
else {
|
|
4173
4181
|
let t = Ki({
|
|
4174
|
-
helpers:
|
|
4175
|
-
prepared:
|
|
4176
|
-
}), n = fa(
|
|
4177
|
-
c.statusCode = 200, c.setHeader("content-type", "text/html; charset=utf-8"), c.setHeader("x-voltro-rendered-by", "spa-shell-dev"), c.end(
|
|
4182
|
+
helpers: M,
|
|
4183
|
+
prepared: L
|
|
4184
|
+
}), n = fa(pe.replace("<div id=\"root\"></div>", `<div id="root">${t.body}</div>`).replace("</head>", ` ${e(t.meta)}\n </head>`), H);
|
|
4185
|
+
c.statusCode = 200, c.setHeader("content-type", "text/html; charset=utf-8"), c.setHeader("x-voltro-rendered-by", "spa-shell-dev"), c.end(k.cspNonce === void 0 ? n : ua(n, k.cspNonce));
|
|
4178
4186
|
}
|
|
4179
|
-
} else if (
|
|
4187
|
+
} else if (R) {
|
|
4180
4188
|
let e = (e) => {
|
|
4181
|
-
if (
|
|
4182
|
-
let t = i.headers["x-tenant"], n =
|
|
4183
|
-
pattern:
|
|
4184
|
-
params:
|
|
4189
|
+
if (T === null || w !== "ssr" && w !== "isr" || typeof C.ogImage != "function" || e.includes("og:image")) return "";
|
|
4190
|
+
let t = i.headers["x-tenant"], n = T.signOgUrl({
|
|
4191
|
+
pattern: g.route.pattern,
|
|
4192
|
+
params: g.params,
|
|
4185
4193
|
...typeof t == "string" ? { tenant: t } : {}
|
|
4186
4194
|
});
|
|
4187
4195
|
return `<meta property="og:image" content="${n}" /><meta name="twitter:image" content="${n}" /><meta name="twitter:card" content="summary_large_image" />`;
|
|
4188
4196
|
}, t = (t) => [
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
`<meta name="voltro-interactive" content="${
|
|
4192
|
-
...
|
|
4193
|
-
|
|
4197
|
+
V,
|
|
4198
|
+
M.renderMetaToHtml(t) + e(M.renderMetaToHtml(t)),
|
|
4199
|
+
`<meta name="voltro-interactive" content="${O}" />`,
|
|
4200
|
+
...R.hasDeferred ? [M.renderDeferredRegistryScript()] : [],
|
|
4201
|
+
M.renderRouterStateScript(R.stateInput)
|
|
4194
4202
|
].filter((e) => e.length > 0).join("\n "), n = {
|
|
4195
|
-
descriptor:
|
|
4196
|
-
params:
|
|
4197
|
-
pathname:
|
|
4198
|
-
search:
|
|
4199
|
-
loaderData:
|
|
4200
|
-
segmentLoaderData:
|
|
4201
|
-
requestContext:
|
|
4202
|
-
...
|
|
4203
|
+
descriptor: de,
|
|
4204
|
+
params: g.params,
|
|
4205
|
+
pathname: f,
|
|
4206
|
+
search: p,
|
|
4207
|
+
loaderData: R.loaderData,
|
|
4208
|
+
segmentLoaderData: R.segmentLoaderData,
|
|
4209
|
+
requestContext: P,
|
|
4210
|
+
...I
|
|
4203
4211
|
};
|
|
4204
|
-
if (
|
|
4212
|
+
if (w === "ssr" && O === "full" && m === void 0) ma({
|
|
4205
4213
|
res: c,
|
|
4206
4214
|
shell: ca({
|
|
4207
|
-
shell:
|
|
4215
|
+
shell: pe,
|
|
4208
4216
|
inlineModuleScriptsAsync: !0
|
|
4209
4217
|
}),
|
|
4210
|
-
documentAttrs:
|
|
4218
|
+
documentAttrs: H,
|
|
4211
4219
|
headers: {
|
|
4212
4220
|
"content-type": "text/html; charset=utf-8",
|
|
4213
4221
|
"x-voltro-rendered-by": "ssr-dev"
|
|
4214
4222
|
},
|
|
4215
4223
|
headInjection: t,
|
|
4216
|
-
...
|
|
4217
|
-
render: (e) =>
|
|
4224
|
+
...k.cspNonce === void 0 ? {} : { nonce: k.cspNonce },
|
|
4225
|
+
render: (e) => M.renderPageToStream({
|
|
4218
4226
|
...n,
|
|
4219
4227
|
...e,
|
|
4220
|
-
...
|
|
4228
|
+
...k.cspNonce === void 0 ? {} : { nonce: k.cspNonce }
|
|
4221
4229
|
}),
|
|
4222
4230
|
onShellError: (e) => {
|
|
4223
|
-
Ee(c, "ssr-dev",
|
|
4231
|
+
Ee(c, "ssr-dev", f, g.route.pattern, e, S);
|
|
4224
4232
|
}
|
|
4225
4233
|
});
|
|
4226
4234
|
else {
|
|
4227
|
-
let { html: e, meta: r } =
|
|
4228
|
-
c.statusCode =
|
|
4229
|
-
let o =
|
|
4230
|
-
if (
|
|
4231
|
-
c.setHeader("x-voltro-ppr", "shell+holes"), to(
|
|
4232
|
-
let e = Xo(Yo(a[0], { allowDevProxy: !0 }),
|
|
4235
|
+
let { html: e, meta: r } = M.renderPageToHtml(n), i = fa(pe.replace("<div id=\"root\"></div>", `<div id="root">${e}</div>`).replace("</head>", ` ${t(r)}\n </head>`), H);
|
|
4236
|
+
c.statusCode = m === void 0 ? _ ? 404 : 200 : 422, c.setHeader("content-type", "text/html; charset=utf-8"), c.setHeader("x-voltro-rendered-by", _ ? "ssr-not-found" : "ssr-dev"), m !== void 0 && c.setHeader("cache-control", "no-store");
|
|
4237
|
+
let o = m === void 0 ? i : Zt(i, m);
|
|
4238
|
+
if (j && m === void 0 && typeof C.loader == "function") {
|
|
4239
|
+
c.setHeader("x-voltro-ppr", "shell+holes"), to(g.route.pattern), c.write(o);
|
|
4240
|
+
let e = Xo(Yo(a[0], { allowDevProxy: !0 }), k.headers.cookie, {
|
|
4233
4241
|
apiName: a[0]?.name,
|
|
4234
|
-
headers:
|
|
4242
|
+
headers: k.headers
|
|
4235
4243
|
}), t = new AbortController();
|
|
4236
4244
|
await po({
|
|
4237
|
-
loader:
|
|
4245
|
+
loader: C.loader,
|
|
4238
4246
|
ctx: {
|
|
4239
|
-
params:
|
|
4240
|
-
pathname:
|
|
4241
|
-
search:
|
|
4247
|
+
params: g.params,
|
|
4248
|
+
pathname: f,
|
|
4249
|
+
search: p,
|
|
4242
4250
|
signal: t.signal,
|
|
4243
|
-
headers:
|
|
4251
|
+
headers: k.headers,
|
|
4244
4252
|
query: e,
|
|
4245
4253
|
isServer: !0
|
|
4246
4254
|
},
|
|
4247
4255
|
res: c,
|
|
4248
|
-
helpers:
|
|
4249
|
-
page:
|
|
4256
|
+
helpers: M,
|
|
4257
|
+
page: g.route.pattern,
|
|
4250
4258
|
log: Q
|
|
4251
4259
|
});
|
|
4252
|
-
} else c.end(
|
|
4260
|
+
} else c.end(k.cspNonce === void 0 ? o : ua(o, k.cspNonce));
|
|
4253
4261
|
}
|
|
4254
4262
|
}
|
|
4255
|
-
|
|
4256
|
-
let
|
|
4257
|
-
|
|
4258
|
-
pattern:
|
|
4259
|
-
pathname:
|
|
4260
|
-
elapsedMs:
|
|
4263
|
+
y.render = Date.now() - he;
|
|
4264
|
+
let U = Date.now() - te;
|
|
4265
|
+
v ? (Te.add(g.route.pattern), Q.info(`ssr compiled ${g.route.pattern} in ${U}ms`, {
|
|
4266
|
+
pattern: g.route.pattern,
|
|
4267
|
+
pathname: f,
|
|
4268
|
+
elapsedMs: U,
|
|
4261
4269
|
cold: !0,
|
|
4262
|
-
phases:
|
|
4263
|
-
})) :
|
|
4264
|
-
pattern:
|
|
4265
|
-
pathname:
|
|
4266
|
-
elapsedMs:
|
|
4270
|
+
phases: y
|
|
4271
|
+
})) : U > 200 && Q.info(`ssr rendered ${f} in ${U}ms`, {
|
|
4272
|
+
pattern: g.route.pattern,
|
|
4273
|
+
pathname: f,
|
|
4274
|
+
elapsedMs: U,
|
|
4267
4275
|
cold: !1,
|
|
4268
|
-
phases:
|
|
4276
|
+
phases: y
|
|
4269
4277
|
});
|
|
4270
4278
|
} catch (e) {
|
|
4271
4279
|
if (Hi(e)) {
|
|
4272
4280
|
Q.error("ssr-dev render refused", {
|
|
4273
|
-
pathname:
|
|
4274
|
-
pattern:
|
|
4281
|
+
pathname: f,
|
|
4282
|
+
pattern: g.route.pattern
|
|
4275
4283
|
}, e), c.statusCode = 500, c.setHeader("content-type", "text/plain; charset=utf-8"), c.end(e.message);
|
|
4276
4284
|
return;
|
|
4277
4285
|
}
|
|
@@ -4282,11 +4290,11 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4282
4290
|
c.end(t.body);
|
|
4283
4291
|
return;
|
|
4284
4292
|
}
|
|
4285
|
-
Ee(c, "ssr-dev",
|
|
4293
|
+
Ee(c, "ssr-dev", f, g.route.pattern, e, S);
|
|
4286
4294
|
}
|
|
4287
4295
|
});
|
|
4288
4296
|
}
|
|
4289
|
-
}, Ne = Date.now(), Pe =
|
|
4297
|
+
}, Ne = Date.now(), Pe = re.version ?? "?", K = await vo(), Fe = N(e, "node_modules", "@voltro", "ui-shadcn"), q = L(N(Fe, "package.json")) ? Fe : null, J = [], Ie = await (async () => {
|
|
4290
4298
|
let t = [];
|
|
4291
4299
|
for (let n of a) {
|
|
4292
4300
|
let r = await Bo(e, n.pkg);
|
|
@@ -4294,13 +4302,13 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4294
4302
|
}
|
|
4295
4303
|
let n = await Sa(t);
|
|
4296
4304
|
if (n === void 0) return !1;
|
|
4297
|
-
let r =
|
|
4305
|
+
let r = N(j, ".voltro-rpcgroup-optimize"), i = "";
|
|
4298
4306
|
try {
|
|
4299
|
-
i = (await
|
|
4307
|
+
i = (await z.readFile(r, "utf8")).trim();
|
|
4300
4308
|
} catch {}
|
|
4301
4309
|
if (i === n) return !1;
|
|
4302
4310
|
try {
|
|
4303
|
-
await
|
|
4311
|
+
await z.writeFile(r, n);
|
|
4304
4312
|
} catch {}
|
|
4305
4313
|
return !0;
|
|
4306
4314
|
})(), Le = /* @__PURE__ */ new Set(), Re = (e) => {
|
|
@@ -4309,14 +4317,14 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4309
4317
|
hint: "If your IdP client reads this from `document.cookie` (Supabase's `createBrowserClient` does), pass `httpOnly: false`. Otherwise the SSR render succeeds and the user is signed out at the first client-side call. Set `httpOnly: true` explicitly to silence this."
|
|
4310
4318
|
}));
|
|
4311
4319
|
}, Y = await za(e);
|
|
4312
|
-
Y.length > 0 && Q.info(`middleware.ts loaded — ${Y.length} middleware(s): ` + Y.map((e) => e.exportName).join(", ")), Ma(Y,
|
|
4320
|
+
Y.length > 0 && Q.info(`middleware.ts loaded — ${Y.length} middleware(s): ` + Y.map((e) => e.exportName).join(", ")), Ma(Y, E.ssrRoutes.map((e) => e.pattern)), Ie && Q.info("rpcGroup changed since last boot — forcing a dep re-optimize so the browser loads the current api client");
|
|
4313
4321
|
try {
|
|
4314
4322
|
await xt(l, "voltro dev (web)");
|
|
4315
4323
|
} catch (e) {
|
|
4316
4324
|
Q.error(String(e.message ?? e)), process.exit(1);
|
|
4317
4325
|
}
|
|
4318
|
-
await (await
|
|
4319
|
-
root:
|
|
4326
|
+
await (await re.createServer({
|
|
4327
|
+
root: j,
|
|
4320
4328
|
envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
|
|
4321
4329
|
ssr: { noExternal: ["react-intl", "@voltro/i18n"] },
|
|
4322
4330
|
resolve: {
|
|
@@ -4329,27 +4337,27 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4329
4337
|
alias: [
|
|
4330
4338
|
...K ? [{
|
|
4331
4339
|
find: "@voltro/devtools/styles.css",
|
|
4332
|
-
replacement:
|
|
4340
|
+
replacement: N(K, "src/styles.css")
|
|
4333
4341
|
}, {
|
|
4334
4342
|
find: "@voltro/devtools",
|
|
4335
|
-
replacement:
|
|
4343
|
+
replacement: N(K, "src/index.ts")
|
|
4336
4344
|
}] : [],
|
|
4337
4345
|
...q ? [
|
|
4338
4346
|
{
|
|
4339
4347
|
find: "@voltro/ui-shadcn/tokens.css",
|
|
4340
|
-
replacement:
|
|
4348
|
+
replacement: N(q, "src/tokens.css")
|
|
4341
4349
|
},
|
|
4342
4350
|
{
|
|
4343
4351
|
find: "@voltro/ui-shadcn/cn",
|
|
4344
|
-
replacement:
|
|
4352
|
+
replacement: N(q, "src/cn.ts")
|
|
4345
4353
|
},
|
|
4346
4354
|
{
|
|
4347
4355
|
find: "@voltro/ui-shadcn/brand",
|
|
4348
|
-
replacement:
|
|
4356
|
+
replacement: N(q, "src/brand/voltroLogo.tsx")
|
|
4349
4357
|
},
|
|
4350
4358
|
{
|
|
4351
4359
|
find: "@voltro/ui-shadcn",
|
|
4352
|
-
replacement:
|
|
4360
|
+
replacement: N(q, "src/index.ts")
|
|
4353
4361
|
}
|
|
4354
4362
|
] : [],
|
|
4355
4363
|
...Wt(e)
|
|
@@ -4361,18 +4369,18 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4361
4369
|
},
|
|
4362
4370
|
customLogger: Ht(),
|
|
4363
4371
|
plugins: [
|
|
4364
|
-
Ei(
|
|
4372
|
+
Ei(N(e, "src", "pages")),
|
|
4365
4373
|
An({
|
|
4366
4374
|
root: e,
|
|
4367
|
-
config:
|
|
4375
|
+
config: ne(n.images)
|
|
4368
4376
|
}),
|
|
4369
4377
|
Fn(e, n.fonts),
|
|
4370
4378
|
er(e, n.feeds ?? [], n.seo?.siteUrl),
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
le,
|
|
4379
|
+
k(),
|
|
4380
|
+
A(),
|
|
4374
4381
|
de,
|
|
4375
|
-
|
|
4382
|
+
pe,
|
|
4383
|
+
W,
|
|
4376
4384
|
ye,
|
|
4377
4385
|
be,
|
|
4378
4386
|
Ce,
|
|
@@ -4388,8 +4396,8 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4388
4396
|
fs: { allow: [e, ...wo(e)] }
|
|
4389
4397
|
},
|
|
4390
4398
|
appType: "spa",
|
|
4391
|
-
cacheDir:
|
|
4392
|
-
publicDir:
|
|
4399
|
+
cacheDir: N(j, ".vite"),
|
|
4400
|
+
publicDir: N(e, "public")
|
|
4393
4401
|
})).listen(), ho.info(`v${Pe} ready in ${Date.now() - Ne}ms`, {
|
|
4394
4402
|
version: Pe,
|
|
4395
4403
|
bootMs: Date.now() - Ne
|
|
@@ -4402,14 +4410,14 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4402
4410
|
target: e.proxyTarget
|
|
4403
4411
|
}), Q.info(`proxy /_voltro/api/${e.name} → ${e.proxyTarget.replace(/^ws/, "http")}/_voltro/inspect`, { api: e.name }));
|
|
4404
4412
|
try {
|
|
4405
|
-
await
|
|
4406
|
-
id:
|
|
4413
|
+
await ae({
|
|
4414
|
+
id: b,
|
|
4407
4415
|
name: _,
|
|
4408
4416
|
kind: "web",
|
|
4409
4417
|
url: `http://localhost:${l}`,
|
|
4410
4418
|
pid: process.pid,
|
|
4411
4419
|
status: "live",
|
|
4412
|
-
logFile:
|
|
4420
|
+
logFile: x.path
|
|
4413
4421
|
});
|
|
4414
4422
|
let t = Ai(e);
|
|
4415
4423
|
if (t) {
|
|
@@ -4417,24 +4425,24 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4417
4425
|
e.status === "launched" ? Q.info(`dashboard launched at http://localhost:${e.port}`, { port: e.port }) : e.status === "already-running" && Q.debug(`dashboard already running on :${e.port}`, { port: e.port });
|
|
4418
4426
|
}
|
|
4419
4427
|
setInterval(() => {
|
|
4420
|
-
|
|
4421
|
-
id:
|
|
4428
|
+
ae({
|
|
4429
|
+
id: b,
|
|
4422
4430
|
name: _,
|
|
4423
4431
|
kind: "web",
|
|
4424
4432
|
url: `http://localhost:${l}`,
|
|
4425
4433
|
pid: process.pid,
|
|
4426
4434
|
status: "live",
|
|
4427
|
-
logFile:
|
|
4435
|
+
logFile: x.path
|
|
4428
4436
|
}).catch(() => {});
|
|
4429
4437
|
}, 1e4).unref();
|
|
4430
4438
|
let n = () => {
|
|
4431
|
-
|
|
4439
|
+
se(b), x.dispose();
|
|
4432
4440
|
};
|
|
4433
4441
|
process.on("SIGINT", n), process.on("SIGTERM", n);
|
|
4434
4442
|
} catch (e) {
|
|
4435
4443
|
Q.warn("runtime-registry write failed", {}, e);
|
|
4436
4444
|
}
|
|
4437
|
-
return
|
|
4445
|
+
return _e({
|
|
4438
4446
|
app: n.name ?? "unnamed",
|
|
4439
4447
|
kind: "web",
|
|
4440
4448
|
url: `http://localhost:${l}`,
|
|
@@ -4456,7 +4464,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4456
4464
|
});
|
|
4457
4465
|
await Qo(t, n, o);
|
|
4458
4466
|
{
|
|
4459
|
-
let { pages: e } = await Mo(
|
|
4467
|
+
let { pages: e } = await Mo(N(t, "src", "pages"));
|
|
4460
4468
|
await xr({
|
|
4461
4469
|
appRoot: t,
|
|
4462
4470
|
pages: e
|
|
@@ -4466,7 +4474,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4466
4474
|
kind: "web",
|
|
4467
4475
|
configPort: n.port,
|
|
4468
4476
|
env: process.env
|
|
4469
|
-
}).port, c = await it("vite", () => import("vite")), l = (await import("@vitejs/plugin-react")).default, u =
|
|
4477
|
+
}).port, c = await it("vite", () => import("vite")), l = (await import("@vitejs/plugin-react")).default, u = N(t, ".framework");
|
|
4470
4478
|
Q.info("running production build"), await c.build({
|
|
4471
4479
|
root: u,
|
|
4472
4480
|
envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
|
|
@@ -4482,7 +4490,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4482
4490
|
outDir: "dist",
|
|
4483
4491
|
rollupOptions: { output: { manualChunks: Eo } }
|
|
4484
4492
|
},
|
|
4485
|
-
publicDir:
|
|
4493
|
+
publicDir: N(t, "public")
|
|
4486
4494
|
});
|
|
4487
4495
|
let d = (await c.preview({
|
|
4488
4496
|
root: u,
|
|
@@ -4493,7 +4501,7 @@ The wrapper is what carries \`match\`, and what lets \`voltro doctor\` report wh
|
|
|
4493
4501
|
label: "Local",
|
|
4494
4502
|
url: e
|
|
4495
4503
|
})) ?? [];
|
|
4496
|
-
return
|
|
4504
|
+
return _e({
|
|
4497
4505
|
app: n.name ?? "unnamed",
|
|
4498
4506
|
kind: "preview",
|
|
4499
4507
|
url: f,
|