@voltro/cli 0.37.0 → 0.38.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 +92 -0
- package/dist/{apiBuild-DGsShRuF.js → apiBuild-CvacV4zA.js} +2 -2
- package/dist/apiBuild-ttSDDOGp.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/bootRefusal-pgvDxlrU.js +7 -0
- package/dist/{build-CiFA-E19.js → build-_LoTC1s0.js} +30 -30
- package/dist/{checkCommand-CLPTzYqM.js → checkCommand-Pjk5sBl2.js} +2 -2
- package/dist/{checkCommand-CIPYyNyc.js → checkCommand-wibtQx-N.js} +1 -1
- package/dist/{codegenCommand-BxS3sCeJ.js → codegenCommand-C60m_LCp.js} +1 -1
- package/dist/{codemodRunner-cyqu5oxr.js → codemodRunner-CXgQ-ecJ.js} +314 -201
- package/dist/{commands-BwG9A9Vv.js → commands-DaZVi9wi.js} +20 -20
- package/dist/{dashboardCommand-C7U146xQ.js → dashboardCommand-Dxy_kmoW.js} +3 -3
- package/dist/{dataCommand-BOwd8_aJ.js → dataCommand-D6-Ha2lf.js} +1 -1
- package/dist/{dev-BV6XNYKf.js → dev-CAOoXOkc.js} +1 -1
- package/dist/{dev-bwDgSObH.js → dev-E7Eo5GHc.js} +261 -260
- package/dist/doctorCommand-Cjl8Yii8.js +2 -0
- package/dist/{doctorCommand-BXyrtN2l.js → doctorCommand-gmDyALFL.js} +10 -10
- package/dist/{dormancyCommand-BDdRRLsa.js → dormancyCommand-CE6wG8lj.js} +1 -1
- package/dist/{embeddingsCommand-CjWGcAE6.js → embeddingsCommand-C3uAuf6N.js} +1 -1
- package/dist/{envCommand-B_TeG297.js → envCommand-DzuWh8ya.js} +19 -19
- package/dist/{evolveCommand-D6N-WfA4.js → evolveCommand-DPLqcYb2.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{infoCommand-BHKTprrx.js → infoCommand-CmczGj_l.js} +1 -1
- package/dist/{runtimeTrace-WYV7qYvz.js → runtimeTrace-6jfznSzr.js} +1 -1
- package/dist/{sdkgen-TM5sSdf7.js → sdkgen-CEJZZQUA.js} +1 -1
- package/dist/serveCommand-DNRF2nDI.js +2 -0
- package/dist/{serveCommand-CyZsXL1l.js → serveCommand-DnY4VS3D.js} +541 -540
- package/dist/serveEntry.js +1 -1
- package/dist/{start-BgN62boB.js → start-CidwCcjl.js} +1 -1
- package/dist/{start-T4VesWiM.js → start-RCh6qKFe.js} +24 -24
- package/dist/startEntry.js +1 -1
- package/dist/startup.d.ts +40 -1
- package/dist/startup.js +2 -2
- package/dist/startupRunner-CEqQq7ax.js +108 -0
- package/dist/updateCommand-B0J_T9Vs.js +2 -0
- package/dist/{updateCommand-9GHHsmDf.js → updateCommand-CmksX7m_.js} +1 -1
- package/dist/{webDev-Dybxew86.js → webDev-BKdD7c_a.js} +689 -691
- package/dist/webDev-CcJfdSjl2.js +2 -0
- package/dist/{webhooksCommand-CHWSPk5z.js → webhooksCommand-BHeaF1ZJ.js} +1 -1
- package/package.json +29 -17
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/plugins/audit.md +4 -0
- package/templates/agent-docs/plugins/auth.md +4 -6
- package/templates/agent-docs/reference.md +3 -2
- package/templates/agent-docs/whats-new.md +49 -47
- package/templates/apps/api-ai/package.json +7 -7
- 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 +10 -10
- package/templates/apps/api-cms/tests/content.write.test.ts +16 -2
- package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +11 -5
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-collab/tests/documents.setBody.test.ts +8 -2
- 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-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-versioning/mutations/documents.update.mutation.server.ts +7 -5
- package/templates/apps/api-versioning/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +6 -6
- 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 +7 -7
- 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 +6 -6
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +3 -3
- package/templates/patches/@effect__cluster@0.60.0.patch +51 -3
- package/dist/apiBuild-D0f6hYbH.js +0 -2
- package/dist/doctorCommand-C4L61G_L.js +0 -2
- package/dist/serveCommand-qumm7jdF.js +0 -2
- package/dist/startupRunner-DPGFchOa.js +0 -71
- package/dist/updateCommand-BN0tkl9-.js +0 -2
- package/dist/webDev-BcykISYQ2.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -39,6 +39,98 @@ _Changes staged for the next release accumulate here (rolled up from
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## [0.38.0] — 2026-08-14
|
|
43
|
+
|
|
44
|
+
### ⚠ BREAKING
|
|
45
|
+
|
|
46
|
+
- **@voltro/plugin-audit, @voltro/protocol, @voltro/plugin-auth** — An audit row now says when an action was taken through an IMPERSONATED session, on the default settings, and no redactor can take that away.
|
|
47
|
+
|
|
48
|
+
`AuditEvent` gained `impersonation`, and the datastore sink a nullable json column of the same name. The mark is lifted out of `subject.metadata` BEFORE the redaction chain runs, so `redactSubject` — including a custom function that erases the subject wholesale — never gets a say.
|
|
49
|
+
|
|
50
|
+
**The defect it closes.** `@voltro/plugin-auth` mints the mark into `subject.metadata`, and `auditPlugin`'s default `redactSubject: 'metadata'` replaces that whole bag. That default is right: the bag is where a per-user provider credential lands, and an audit table is the last place a live PAT should be. The consequence was that on defaults an impersonated action was recorded indistinguishably from the user's own — the one distinction an audit trail exists to make. The documented mitigation (`redactSubject: impersonationAuditRedactor()`) worked and was opt-in, and an audit property that depends on somebody wiring it is not a property.
|
|
51
|
+
|
|
52
|
+
The alternative fix — a keep-these-keys option on `redactSubject` — was rejected for the same reason: it leaves the default wrong, and "who really did this" is not the app's metadata to configure away. It is a property of the event, so it is now a field of the event.
|
|
53
|
+
|
|
54
|
+
**BREAKING: `IMPERSONATION_METADATA_KEY` moved from `@voltro/plugin-auth` to `@voltro/protocol`.** It names the one reserved key in `Subject.metadata`, and `Subject` is protocol's type. Two packages need it — plugin-auth writes the mark, plugin-audit reads it — and a plugin must not depend on another plugin, so spelling the string in both would have made it a second definition no guard is watching. Everything else stays: plugin-auth still exports `impersonationOf`, `isImpersonated`, `ImpersonationMark` and `impersonationAuditRedactor`. The codemod repoints the import, preserving an alias and the type-only form.
|
|
55
|
+
|
|
56
|
+
The redactor keeps working and is no longer load-bearing. Set `redactSubject: 'none'` or a custom function for your own reasons; the impersonation mark is recorded either way.
|
|
57
|
+
|
|
58
|
+
No migration is needed for the new column — a `_voltro_*` change rides the declarative differ on `voltro db apply` and on a `voltro dev` boot, on every dialect.
|
|
59
|
+
- **@voltro/cli** — A `*.startup.ts` that fails now refuses the boot. It used to warn and let the server come up.
|
|
60
|
+
|
|
61
|
+
Measured, on a real `voltro dev` against postgres, while building the row-filter integration test in this same release. A startup reached for `ctx.store.select(...)` — a builder that lives on the request-scoped `MutationStore`, not on the `DataStore` a startup receives — and threw on its first line. The boot printed:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
warn startup: function rejected
|
|
65
|
+
info startup: registered <- next line, same file
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
and then served every request with no row filter registered. Two lines contradicting each other, the second asserting exactly the thing that had just failed, and an app that looked healthy while its access control was absent.
|
|
69
|
+
|
|
70
|
+
**The rule this overturns was right when it was written.** The header of `startupRunner.ts` read "Errors are logged but never fatal — a failing startup MUST NOT block the rest of the app", and for the startups it was written for — an SSE bridge, a sync loop, a metric aggregator — that is the correct call. It stopped being right when a startup became the documented seam for REGISTRATION: `setRowFilter` is installed from one.
|
|
71
|
+
|
|
72
|
+
The runner cannot tell a registration from a background loop, and the two failures are not symmetric. "The app refuses to boot" is fixed in seconds and is visible to everyone; "the app serves without its access control" is visible to nobody. So the default is the recoverable one, and an app that genuinely wants best-effort writes the `try`/`catch` inside its own startup — one line, at the site where somebody decided the failure was acceptable, where a reviewer can see it. Deliberately not a flag: a flag moves that decision away from the startup it applies to and makes it one setting for all of them.
|
|
73
|
+
|
|
74
|
+
**Two sibling silences went with it**, because fixing only the rejection would have left two more ways to reach the identical state — the per-seam shape this repo keeps paying for. A startup file that cannot be imported, and one with no default-exported function, used to warn and skip. Both refuse now. The second matters more than it sounds: the convention is a DEFAULT-exported function, a named export is discovered and never runs, and that is indistinguishable from a startup that ran and did nothing.
|
|
75
|
+
|
|
76
|
+
**And the 2-second race is gone, which is the half that made the rest reliable.** The old code did not wait for a startup to settle — it raced it against 2000 ms and let the boot win. A startup slower than that was reported as fine, so a rejection arriving afterwards had nothing left to refuse. The runner now waits for the startup to SETTLE, so every failure is catchable however slow it is.
|
|
77
|
+
|
|
78
|
+
That race existed to protect one shape: a startup that never returns because it holds a fiber until shutdown. Counted before changing it, that shape appears in ZERO of the four startups this framework ships — `warm.startup.tsx` (twice), `searchBackfill.startup.tsx` and the memory fixture's all return. So the race protected the shape we discourage and penalised the shape we teach, and the penalised one includes `searchBackfill`, our own example, which awaits a full-table query plus an index backfill and is the likeliest thing in the box to exceed two seconds. Slow AND failing put a consumer back in exactly the silent state this release removes.
|
|
79
|
+
|
|
80
|
+
**So a startup that never returns now refuses the boot too**, after `VOLTRO_STARTUP_TIMEOUT_MS` (60s default), with a message naming the file and showing the `onShutdown` shape to use instead. That makes a previously-documented capability illegal — "a fiber that resolves only on shutdown" — and it is the deliberate half of this change rather than a side effect. A startup that is merely SLOW is unaffected: it is waited for and registers when it finishes.
|
|
81
|
+
|
|
82
|
+
`startup: registered` is written only when the function actually returned. The old code printed it for a failed startup and for one still running.
|
|
83
|
+
|
|
84
|
+
Verified against a real process in every direction, not only in units: the reintroduced defect exits 1 and never listens; a never-returning startup exits 1 and never listens; a slow-but-successful one still registers; and the healthy fixture boots and serves all eight row-filter assertions. `startupRunner.test.ts` is new — there were no tests on this runner at all, which is part of why the contradiction survived.
|
|
85
|
+
|
|
86
|
+
**`voltro update` carries you across this** — codemod `0.38.0/02_startup-failure-refuses-boot`.
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- **@voltro/cli** — A table declared through `databaseHandle({ … })` but not exported as a top-level table is now DISCOVERED — so its mixins apply.
|
|
91
|
+
|
|
92
|
+
Discovery kept whatever `isTable()` accepted out of a schema module's `Object.values`, which only ever sees tables the file exports DIRECTLY. A schema that builds its tables programmatically exports the builder's result:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
export const blogEntities = contentTypeToEntities(blogPost) // { draft, published }
|
|
96
|
+
export const database = databaseHandle({ …, blogPostDrafts: blogEntities.draft })
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`isTable({ draft, published })` is false, so those tables never entered the schema registry — while `databaseHandle` had registered them for by-name lookup perfectly well.
|
|
100
|
+
|
|
101
|
+
**Two registries with different populations, read by different things.** `getTable()` found the table, so insert validation knew `tenantId` was NOT NULL. The schema registry is what drives the mixins, so nothing stamped it. Measured against a real `voltro dev` boot of the scaffolded `api-cms` template, over real RPC:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
TableValidationFailed: { "table": "blogPost_drafts", "summary":
|
|
105
|
+
"missing required column 'tenantId' — NOT NULL with no default and not auto-stamped" }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Every `content.saveDraft` in that template, since it shipped. Its own unit test could not see it, because the test builds its schema registry by hand — the one step the running app does not perform.
|
|
109
|
+
|
|
110
|
+
**The write failing was the lucky half.** Reads do not announce themselves: `makeQueryFinalizer` AND-merges `tenantId` from this same registry, so a table missing from it is a table nobody scopes. The visible symptom was a broken mutation; the invisible one was tenant isolation quietly not applied to those tables.
|
|
111
|
+
|
|
112
|
+
The fix takes the by-name registry's DELTA across each schema module's import, so a handle-declared table is attributed to the file that declared it — rather than reading the whole global registry, which by then also holds framework tables that this set deliberately excludes. It lives in `loadDiscovered`, which `voltro dev` and `voltro serve` both call, so the two cannot disagree about it.
|
|
113
|
+
|
|
114
|
+
No app change is needed; the idiomatic `databaseHandle` declaration now works as its documentation always said.
|
|
115
|
+
- **@voltro/database, @voltro/cli** — A migration that fails because `DB_SCHEMA` names a schema that does not exist now says so.
|
|
116
|
+
|
|
117
|
+
Postgres answers `3F000 no schema has been selected to create in`, and the only thing that puts a non-default schema on the connection's `search_path` here is `DB_SCHEMA`. The error mentions neither the variable nor the schema, so the FIRST `CREATE TABLE` of the boot fails with a message about SQL and the reader goes looking at the DDL — for a typo in an environment variable.
|
|
118
|
+
|
|
119
|
+
Found while building the row-filter integration test below: the boot aborted, the log named `_voltro_migrations` and a postgres routine, and nothing in it pointed at the one line of configuration that caused it. Same shape as a 403 that says nothing about `VOLTRO_INSPECT_TOKEN`, fixed in the same release.
|
|
120
|
+
|
|
121
|
+
The remedy also states what the framework will NOT do: Voltro creates tables, never the schema itself. That is a namespace decision, and inventing one from a typo puts a migration somewhere nobody is looking.
|
|
122
|
+
|
|
123
|
+
`remedyFor` is deliberately a one-entry map and the test asserts the empty case as well as the full one. A remedy is worth printing only where the mapping from driver code to cause is exact; a list of maybes is how a reader learns to skip the section.
|
|
124
|
+
|
|
125
|
+
**Alongside it: the row filter is now driven under `voltro dev` against a real postgres.** Both defects that reached consumers lived between layers that were each individually covered — a module-local `let` that split per instance, then a query producer that built its context from an unscoped request — and three consumer documents carried "we have not run this against a real database" as an honest caveat. `rowFilterDevPostgres.integration.test.ts` boots the fixture twice: handlers with no predicate of their own, a filter registered from a `*.startup.tsx`, and a NEGATIVE CONTROL run with the registration skipped that asserts the same queries return BOTH owners. Without the control, "the caller saw one owner" is equally consistent with a database that only ever held one.
|
|
126
|
+
- **@voltro/cli** — A shard that cannot be released no longer spins a fiber at full speed. Upstream `@effect/cluster` releases shards through `Effect.eventually` — retry until success, zero delay, logged at DEBUG — so a shard whose storage was unreachable retried as fast as the event loop allowed, in the one place nobody watches.
|
|
127
|
+
|
|
128
|
+
Our patch replaces it with `Effect.retry(Schedule.exponential(100) ∪ Schedule.spaced(5000))`. `union` takes the MINIMUM of the two delays, so the 5s spacing caps the backoff instead of compounding with it, and both schedules recur forever — attempts stay unbounded, which is what the original intended. The persistence was always correct; only the missing delay was the defect.
|
|
129
|
+
|
|
130
|
+
This entry exists because the change would otherwise have shipped undocumented. The patch lives in `packages/cli/templates/patches/`, and the changelog gate requires an entry for `packages/*/src` — so nothing would have demanded one, even though the file is installed into every user project that runs cluster. A rule that cannot see a path is not the same as a path with nothing on it.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
42
134
|
## [0.37.0] — 2026-08-13
|
|
43
135
|
|
|
44
136
|
### ⚠ BREAKING
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as e } from "./dev-
|
|
2
|
-
import {
|
|
1
|
+
import { f as e } from "./dev-E7Eo5GHc.js";
|
|
2
|
+
import { lt as t } from "./webDev-BKdD7c_a.js";
|
|
3
3
|
import { t as n } from "./dialectDriver-CgXnDfec.js";
|
|
4
4
|
import { dirname as r, isAbsolute as i, join as a, relative as o, resolve as s } from "node:path";
|
|
5
5
|
import { existsSync as c, promises as l } from "node:fs";
|
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as e } from "./commands-
|
|
2
|
+
import { r as e } from "./commands-DaZVi9wi.js";
|
|
3
3
|
import { a as t } from "./nodeEnvironment-cGFAj1J8.js";
|
|
4
4
|
import { t as n } from "./loadEnv-D9nEOClM.js";
|
|
5
5
|
import { n as r } from "./cliError-BmdYnghb.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { pn as e } from "./dev-
|
|
2
|
-
import { D as t, G as n, K as r, O as i, S as a, W as o, Y as s, a as c, b as l, d as u, f as d, k as f,
|
|
1
|
+
import { pn as e } from "./dev-E7Eo5GHc.js";
|
|
2
|
+
import { D as t, G as n, K as r, O as i, S as a, W as o, Y as s, a as c, b as l, d as u, f as d, k as f, lt as p, ot as m, s as h, v as g, x as _, y as v } from "./webDev-BKdD7c_a.js";
|
|
3
3
|
import { t as y } from "./cliRuntime-Dh7UDinH.js";
|
|
4
4
|
import { a as b } from "./renderModeScan-D7J1B7Kw.js";
|
|
5
|
-
import { i as x, o as S, s as C } from "./apiBuild-
|
|
5
|
+
import { i as x, o as S, s as C } from "./apiBuild-CvacV4zA.js";
|
|
6
6
|
import { n as w } from "./renderProfile-1OWWAAtx.js";
|
|
7
7
|
import { dirname as T, join as E, resolve as D } from "node:path";
|
|
8
8
|
import { existsSync as O, promises as k } from "node:fs";
|
|
@@ -12,7 +12,7 @@ import { Effect as j } from "effect";
|
|
|
12
12
|
import { createRequire as M } from "node:module";
|
|
13
13
|
//#region src/webStartBundle.ts
|
|
14
14
|
var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
15
|
-
let t = await
|
|
15
|
+
let t = await p("esbuild", () => import("esbuild")), n = E(e, ".framework"), r = E(n, "dist-web", "startBundle");
|
|
16
16
|
await k.mkdir(n, { recursive: !0 });
|
|
17
17
|
let i = Date.now(), a = E(e, "tsconfig.json"), o = /* @__PURE__ */ new Set(), s = E(n, "startEntry.ts");
|
|
18
18
|
await k.writeFile(s, [
|
|
@@ -156,7 +156,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
156
156
|
}, U = async (e) => {
|
|
157
157
|
let { root: t, distDir: n, pages: r, dirs: i, vite: a } = e, o = E(n, "index.html"), l = await k.readFile(o, "utf8"), u = E(n, "_voltro", "shell.html");
|
|
158
158
|
await k.mkdir(T(u), { recursive: !0 }), await k.writeFile(u, l, "utf8");
|
|
159
|
-
let d = E(t, "node_modules", "@voltro", "ui-shadcn"), f = O(E(d, "package.json")) ? d : null,
|
|
159
|
+
let d = E(t, "node_modules", "@voltro", "ui-shadcn"), f = O(E(d, "package.json")) ? d : null, p = [...f ? [
|
|
160
160
|
{
|
|
161
161
|
find: "@voltro/ui-shadcn/tokens.css",
|
|
162
162
|
replacement: E(f, "src/tokens.css")
|
|
@@ -173,12 +173,12 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
173
173
|
find: "@voltro/ui-shadcn",
|
|
174
174
|
replacement: E(f, "src/index.ts")
|
|
175
175
|
}
|
|
176
|
-
] : [], ...s(t)],
|
|
176
|
+
] : [], ...s(t)], m = await a.createServer({
|
|
177
177
|
root: E(t, ".framework"),
|
|
178
178
|
envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
|
|
179
179
|
plugins: [(await import("@vitejs/plugin-react")).default(), (await import("@tailwindcss/vite")).default()],
|
|
180
180
|
resolve: {
|
|
181
|
-
alias:
|
|
181
|
+
alias: p,
|
|
182
182
|
dedupe: [
|
|
183
183
|
"react",
|
|
184
184
|
"react-dom",
|
|
@@ -194,12 +194,12 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
194
194
|
},
|
|
195
195
|
appType: "custom",
|
|
196
196
|
logLevel: "warn"
|
|
197
|
-
}), g = await
|
|
197
|
+
}), g = await m.ssrLoadModule("@voltro/web/ssr"), { renderPageToHtml: v, renderMetaToHtml: y, renderRouterStateScript: x, isDeferredLoaderResult: S, assertDeferralSupported: C, beginStoreSeeds: w, seedPreloadedSubscription: D } = g, A = /* @__PURE__ */ new Map();
|
|
198
198
|
if (e.locales && e.locales.length > 0 && e.defaultLocale) try {
|
|
199
|
-
let n = (await
|
|
199
|
+
let n = (await m.ssrLoadModule("@voltro/i18n")).makeSsgWrap;
|
|
200
200
|
if (typeof n != "function") throw Error("@voltro/i18n is installed but missing the `makeSsgWrap` export — upgrade @voltro/i18n to a version that ships SSG support.");
|
|
201
201
|
for (let r of e.locales) try {
|
|
202
|
-
let i = await
|
|
202
|
+
let i = await m.ssrLoadModule(E(t, "src", "locales", `${r}.ts`)), a = i.default ?? i;
|
|
203
203
|
A.set(r, n(r, a, e.defaultLocale));
|
|
204
204
|
} catch (e) {
|
|
205
205
|
F.warn(`i18n catalog missing for locale '${r}' — pages rendered at /${r}/* will crash. Add src/locales/${r}.ts.`, {}, e);
|
|
@@ -207,7 +207,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
207
207
|
} catch (e) {
|
|
208
208
|
F.warn("i18n wrapper unavailable for SSG — pages that call useT() will fail. Check that @voltro/i18n is installed.", {}, e);
|
|
209
209
|
}
|
|
210
|
-
let j = [], M = {}, N = (e) => e.dir === "" ? E(t, "src", "pages") : E(t, "src", "pages", e.dir), P = async (e) => await
|
|
210
|
+
let j = [], M = {}, N = (e) => e.dir === "" ? E(t, "src", "pages") : E(t, "src", "pages", e.dir), P = async (e) => await m.ssrLoadModule(E(N(e), "layout.tsx")), I = async (e) => await m.ssrLoadModule(E(N(e), "error.tsx")), B = async (e) => await m.ssrLoadModule(E(N(e), "loading.tsx")), U = (e, t) => ({
|
|
211
211
|
params: e.params,
|
|
212
212
|
pathname: e.pathname,
|
|
213
213
|
search: "",
|
|
@@ -216,9 +216,9 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
216
216
|
query: void 0
|
|
217
217
|
});
|
|
218
218
|
for (let a of r) {
|
|
219
|
-
let r = `${E(t, "src", "pages", a.file)}`, o = await
|
|
219
|
+
let r = `${E(t, "src", "pages", a.file)}`, o = await m.ssrLoadModule(r), s = b(o, E("src", "pages", a.file));
|
|
220
220
|
M[a.pattern] = s;
|
|
221
|
-
let u = s.renderMode, d =
|
|
221
|
+
let u = s.renderMode, d = h(i, a.dirChain);
|
|
222
222
|
if (u === "spa") {
|
|
223
223
|
let t = await H({
|
|
224
224
|
page: a,
|
|
@@ -281,7 +281,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
281
281
|
params: {},
|
|
282
282
|
pathname: a.pattern
|
|
283
283
|
}];
|
|
284
|
-
let
|
|
284
|
+
let p = o.interactive ?? "full";
|
|
285
285
|
for (let t of f) {
|
|
286
286
|
w();
|
|
287
287
|
let r, i, s = new AbortController();
|
|
@@ -317,11 +317,11 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
317
317
|
Pending: o.Pending,
|
|
318
318
|
renderMode: u,
|
|
319
319
|
chain: r
|
|
320
|
-
},
|
|
320
|
+
}, m = null;
|
|
321
321
|
if (typeof o.loader == "function") {
|
|
322
322
|
let e = new AbortController();
|
|
323
323
|
try {
|
|
324
|
-
|
|
324
|
+
m = await o.loader({
|
|
325
325
|
params: t.params,
|
|
326
326
|
pathname: t.pathname,
|
|
327
327
|
signal: e.signal
|
|
@@ -335,15 +335,15 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
335
335
|
F.warn("loader threw, falling back to null", { pathname: t.pathname }, e);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
S(
|
|
338
|
+
S(m) && C({
|
|
339
339
|
page: t.pathname,
|
|
340
340
|
renderMode: u,
|
|
341
|
-
interactive:
|
|
341
|
+
interactive: p
|
|
342
342
|
});
|
|
343
343
|
for (let e of Object.values(i)) S(e) && C({
|
|
344
344
|
page: t.pathname,
|
|
345
345
|
renderMode: u,
|
|
346
|
-
interactive:
|
|
346
|
+
interactive: p
|
|
347
347
|
});
|
|
348
348
|
await _({
|
|
349
349
|
pageMod: o,
|
|
@@ -356,7 +356,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
356
356
|
descriptor: f,
|
|
357
357
|
params: t.params,
|
|
358
358
|
pathname: t.pathname,
|
|
359
|
-
loaderData:
|
|
359
|
+
loaderData: m,
|
|
360
360
|
segmentLoaderData: i,
|
|
361
361
|
...g ? { outerWrap: g } : {},
|
|
362
362
|
locale: h
|
|
@@ -365,11 +365,11 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
365
365
|
metaHtml: y(E),
|
|
366
366
|
stateScript: x({
|
|
367
367
|
path: t.pathname,
|
|
368
|
-
loaderData:
|
|
368
|
+
loaderData: m,
|
|
369
369
|
segmentLoaderData: i,
|
|
370
370
|
pageLoaderRan: typeof o.loader == "function"
|
|
371
371
|
}),
|
|
372
|
-
interactive:
|
|
372
|
+
interactive: p
|
|
373
373
|
}), M = z(n, t.pathname);
|
|
374
374
|
await k.mkdir(T(M), { recursive: !0 }), await k.writeFile(M, O, "utf8"), j.push({
|
|
375
375
|
pattern: t.pathname,
|
|
@@ -378,7 +378,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
return await
|
|
381
|
+
return await m.close(), {
|
|
382
382
|
rendered: j,
|
|
383
383
|
pageMeta: M
|
|
384
384
|
};
|
|
@@ -467,7 +467,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
467
467
|
file: n.file,
|
|
468
468
|
reason: n.reason
|
|
469
469
|
});
|
|
470
|
-
let { regenerateRpcGroup: r } = await import("./codegenCommand-
|
|
470
|
+
let { regenerateRpcGroup: r } = await import("./codegenCommand-C60m_LCp.js"), i = await r(e);
|
|
471
471
|
if (i.kind === "refused") {
|
|
472
472
|
F.warn("could not regenerate the rpc group — building against what is on disk", { reason: i.reason });
|
|
473
473
|
return;
|
|
@@ -479,10 +479,10 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
479
479
|
}, K = async (e) => {
|
|
480
480
|
let t = await u(e);
|
|
481
481
|
if (!t) {
|
|
482
|
-
let { loadApiConfig: t } = await import("./dev-
|
|
482
|
+
let { loadApiConfig: t } = await import("./dev-CAOoXOkc.js"), n = await t(e);
|
|
483
483
|
if (n) {
|
|
484
484
|
F.info("building api app", { app: n.name ?? "(unnamed)" }), await G(e);
|
|
485
|
-
let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-
|
|
485
|
+
let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-ttSDDOGp.js");
|
|
486
486
|
await t(e);
|
|
487
487
|
try {
|
|
488
488
|
await r(e);
|
|
@@ -517,7 +517,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
517
517
|
pages: a,
|
|
518
518
|
mode: "prod"
|
|
519
519
|
});
|
|
520
|
-
let c = E(e, ".framework"), f = E(c, "dist"),
|
|
520
|
+
let c = E(e, ".framework"), f = E(c, "dist"), h = E(e, "node_modules", "@voltro", "ui-shadcn"), _ = O(E(h, "package.json")) ? h : null, y = [..._ ? [
|
|
521
521
|
{
|
|
522
522
|
find: "@voltro/ui-shadcn/tokens.css",
|
|
523
523
|
replacement: E(_, "src/tokens.css")
|
|
@@ -536,7 +536,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
536
536
|
}
|
|
537
537
|
] : [], ...s(e)];
|
|
538
538
|
F.info("running vite build");
|
|
539
|
-
let b = await
|
|
539
|
+
let b = await p("vite", () => import("vite")), x = (await import("@vitejs/plugin-react")).default, C = (await import("@tailwindcss/vite")).default;
|
|
540
540
|
await b.build({
|
|
541
541
|
root: c,
|
|
542
542
|
envPrefix: "__VOLTRO_VITE_ENV_DISABLED__",
|
|
@@ -617,7 +617,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
617
617
|
if (O(L)) {
|
|
618
618
|
F.info("precompiling app.config.ts → dist/server/appConfig.js");
|
|
619
619
|
try {
|
|
620
|
-
await (await
|
|
620
|
+
await (await p("esbuild", () => import("esbuild"))).build({
|
|
621
621
|
entryPoints: [L],
|
|
622
622
|
outfile: E(f, "server", "appConfig.js"),
|
|
623
623
|
bundle: !0,
|
|
@@ -701,7 +701,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
701
701
|
return t.ran ? t.exitCode : (yield* j.logError("no web app found at this path", { hint: "looked for app.config.ts with `type: 'web'`" }), 1);
|
|
702
702
|
}), J = async (t) => {
|
|
703
703
|
if (t.includes("--target")) {
|
|
704
|
-
let { runSdkBuildCommand: e } = await import("./sdkgen-
|
|
704
|
+
let { runSdkBuildCommand: e } = await import("./sdkgen-CEJZZQUA.js");
|
|
705
705
|
return e(t);
|
|
706
706
|
}
|
|
707
707
|
let n = t.find((e) => !e.startsWith("-")) ?? process.cwd(), r = await y(q(n), { scope: "voltro:build" }), i = e(n);
|
|
@@ -4,7 +4,7 @@ import { r } from "./appGraph-KGDPTuTy.js";
|
|
|
4
4
|
import { n as i } from "./cliOutput-D1tSBoRM.js";
|
|
5
5
|
import { n as a, o, r as s, t as c } from "./inspectFetch-EMuhTG_9.js";
|
|
6
6
|
import { r as l } from "./fileTaxonomy-CJfgOllU.js";
|
|
7
|
-
import { x as u } from "./doctorCommand-
|
|
7
|
+
import { x as u } from "./doctorCommand-gmDyALFL.js";
|
|
8
8
|
import { resolve as d } from "node:path";
|
|
9
9
|
import { readdirSync as f, statSync as p } from "node:fs";
|
|
10
10
|
//#region src/observedDiff.ts
|
|
@@ -141,7 +141,7 @@ var m = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : e, h = /* @__PUR
|
|
|
141
141
|
let t = e.severity === "error" ? "✗ error" : "⚠ warn", n = e.file ? ` (${e.file})` : "";
|
|
142
142
|
return `${t} ${e.rule} ${e.node}${n}\n ${e.breaks.join("; ")}\n fix: ${e.fix}`;
|
|
143
143
|
}).join("\n"), C = async (e) => {
|
|
144
|
-
let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-
|
|
144
|
+
let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-CAOoXOkc.js"), { buildRpcEntry: i } = await import("./manifestBuild-COkJoyAr.js"), { buildCapabilityManifest: a } = await import("./inspect-P4pxoMaV.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = (t, n, r) => i(t, n, o(e, r)), l = [
|
|
145
145
|
...s.queries.map((e) => c(e.descriptor, "query", e.file)),
|
|
146
146
|
...s.mutations.map((e) => c(e.descriptor, "mutation", e.file)),
|
|
147
147
|
...s.actions.map((e) => c(e.descriptor, "action", e.file)),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./checkCommand-
|
|
1
|
+
import { n as e, r as t, t as n } from "./checkCommand-Pjk5sBl2.js";
|
|
2
2
|
export { n as offlineManifest, e as runCheckCommand, t as toInput };
|