@voltro/cli 0.47.0 → 0.48.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 +80 -0
- package/dist/apiBuild-DOnvi2zm.js +2 -0
- package/dist/{apiBuild-FpHCWiv6.js → apiBuild-Dz8TJSxp.js} +1 -1
- package/dist/bin.js +1 -1
- package/dist/{build-zVygXxGB.js → build-DLme2ppa.js} +6 -6
- package/dist/{checkCommand-B2Fw73lu.js → checkCommand-BUBqPBlI.js} +1 -1
- package/dist/{checkCommand-D0dAKciE.js → checkCommand-Dals7g-I.js} +3 -3
- package/dist/{codegenCommand-BTtsnRus.js → codegenCommand-L6vacVRW.js} +3 -2
- package/dist/{commands-BrFKxnYW.js → commands-CAxFLqG4.js} +17 -17
- package/dist/{dashboardCommand-D9SjDc8E.js → dashboardCommand-CJC8Kg-s.js} +1 -1
- package/dist/{dataCommand-Dl11q14e.js → dataCommand-hIaq2iKY.js} +266 -189
- package/dist/dbCommand-D1Q33ktl.js +2 -0
- package/dist/{dbCommand-jbrmzwW_.js → dbCommand-ZGNItjoJ.js} +4 -4
- package/dist/declaredSchemaGates-BlcwObhb.js +25 -0
- package/dist/{dev-CaIfZnw5.js → dev-cGGsLNn6.js} +1 -1
- package/dist/{dev-RjB7eE_B.js → dev-lvnVq5RD.js} +31 -30
- package/dist/{doctorCommand-D7X29cw6.js → doctorCommand-BK0qu7eD.js} +32 -14
- package/dist/doctorCommand-CWgUPye-.js +2 -0
- package/dist/doctorDecidedSchema-BlbWgCD_.js +23 -0
- package/dist/{dormancyCommand-BGOP27fz.js → dormancyCommand-CyIk-zq4.js} +1 -1
- package/dist/{embeddingsCommand-D72E22bw.js → embeddingsCommand-D7TLklps.js} +1 -1
- package/dist/{envCommand-BHSxz6wC.js → envCommand-BHxKkGXq.js} +1 -1
- package/dist/{evolveCommand-C2ofGGlz.js → evolveCommand-CQh6dw21.js} +1 -1
- package/dist/{frameworkTableAssembly-BvZ0Lil_.js → frameworkTableAssembly-BNod_DKN.js} +97 -120
- package/dist/frameworkTableAssembly-Rft-DPUg.js +2 -0
- package/dist/index.js +1 -1
- package/dist/{migrate-odCPGHPq.js → migrate-CL5Ed01M.js} +4 -4
- package/dist/{runtimeTrace-C_OKr0jY.js → runtimeTrace-C0SlIoQY.js} +1 -1
- package/dist/{sdkgen-D9trW7sl.js → sdkgen-BXm7zx7F.js} +1 -1
- package/dist/{serveCommand-BU0wfV6V.js → serveCommand-CV3YO9L3.js} +469 -365
- package/dist/serveCommand-ZP_Cb-yz.js +2 -0
- package/dist/serveEntry.js +1 -1
- package/dist/{webhooksCommand-BqcWcbuW.js → webhooksCommand-QlAk_tED.js} +1 -1
- package/package.json +17 -17
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/cli.md +58 -3
- package/templates/agent-docs/database/migrations.md +19 -5
- package/templates/agent-docs/whats-new.md +63 -13
- 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-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-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/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 +4 -4
- package/dist/apiBuild-BsooZpw2.js +0 -2
- package/dist/dbCommand-BUD4Fd8v.js +0 -2
- package/dist/doctorCommand-5zv6PN-G.js +0 -2
- package/dist/frameworkTableAssembly-DDKtwsy2.js +0 -2
- package/dist/serveCommand-Bwrn_9Fn.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -39,6 +39,86 @@ _Changes staged for the next release accumulate here (rolled up from
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## [0.48.0] — 2026-08-22
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- **@voltro/cli, @voltro/data-transfer** — An import over `--target api` can be asked what it will do, and watched while it does it.
|
|
47
|
+
|
|
48
|
+
The transport's two correct properties combined into one blind spot: the run happens INSIDE the instance, so every line it produces goes to a pod log; and it is deliberately decoupled from the caller, so killing the client does not stop it (which is what keeps a dead client from leaving a half-emptied target). Someone reaching for `--target api` cannot reach the database directly and usually cannot read that log either, so "watch for the staging line" was advice they could not follow.
|
|
49
|
+
|
|
50
|
+
**A preflight, before a byte is uploaded.** A `replace` over the api now asks the instance whether it will stage, and prints the answer — including the reason when it will not. It answers from `decideStaging`, the same function the run itself calls, so the two cannot drift; a second copy of that decision would answer confidently and diverge on the next change. With `--bundle-key`, where the client never holds the bundle, it sends the key and the instance reads the table list out of the archive's own manifest — the caller about to have an instance empty its own database is the last one who should be told to check a log they cannot read.
|
|
51
|
+
|
|
52
|
+
**`voltro data imports`** (and `GET /_voltro/admin/imports`, behind the same data-transfer secret) reads the history and the run in flight. `_voltro_data_imports` was write-only; it is now opened before the first table, **advanced every couple of seconds as tables land**, and closed with the outcome — so polling it is the progress feed. Not a streamed response on the upload connection: a chunked body has to survive every proxy in between, and a buffering reverse proxy turns a progress feed into exactly the silence it was meant to replace.
|
|
53
|
+
|
|
54
|
+
**And a `replace` that does not stage now says why.** The staging set was an early `return []` three conditions deep, and the empty array met a `length > 0` further down and read as "do not stage". A bundle table the target does not have — the ordinary case for a development source against a production target — turned the non-destructive path off in silence. Every reason routes through one message now; the cycle case additionally used to be gated on `atomic`, so the mode where an interrupted run leaves the worst outcome was also the one that said the least.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- **@voltro/cli** — The declared framework schema no longer depends on `NODE_ENV`.
|
|
59
|
+
|
|
60
|
+
`_voltro_traces` and `_voltro_undo_log` defaulted to on outside production. That was allowed with an explicit justification — one decider makes every command in a deployment agree — and the justification was about the schema FINGERPRINT, which only ever compares processes inside ONE deployment.
|
|
61
|
+
|
|
62
|
+
The declared set has a second reader that spans two, and it was never considered: `voltro data`. A bundle exported from a development database carries the tables that database has, and a staged (non-destructive) `replace` needs every bundle table to exist in the target. So one source tree produced a bundle a production target could not stage, and the run fell back to truncating it — with nothing red anywhere, on the one path where that difference is the entire point.
|
|
63
|
+
|
|
64
|
+
Both tables are declared in **every environment** now. The trade is the one `_voltro_cdc_offsets` already makes: an unused declared table costs one empty table and buys agreement. `VOLTRO_UNDO` / `VOLTRO_TRACING_PERSIST` still decide what a process WRITES; they never decided the schema and still do not. Set `schema: { traces: false, undo: false }` in `app.config.ts` to keep one out — in every environment, or the divergence is back by hand.
|
|
65
|
+
|
|
66
|
+
**Upgrade:** a production app that never declared them gains two empty tables. `voltro db apply` (or a `voltro dev` boot) plans and applies them like any other framework table, on every dialect. Run it before the pods roll, as with any schema change — a migrate job and a fleet that disagree is exactly what this removes.
|
|
67
|
+
|
|
68
|
+
`voltro doctor` now prints the three decided tables and what decided each, on a HEALTHY run. That text existed and was reachable only from the `prod-mismatch` refusal — a message that appears exclusively after a fleet is down is an explanation, not a warning.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **@voltro/cli, @voltro/data-transfer** — `voltro data export --exclude a,b` made the bundle BIGGER, and made it unusable for a `replace`.
|
|
73
|
+
|
|
74
|
+
It expanded into `{ kind: 'tables', tables: <everything else> }`, on the reasoning that a manifest should record what was exported rather than claim "everything". Right goal, wrong mechanism, and it cost two things at once. `all` is the only scope that filters out the tables which describe a deployment, so excluding two names silently added nine others back — the migration ledger among them, whose foreign row takes an environment down at the next boot. And `replace` refuses a named scope, so the honest way to leave a table out was also the way to make the bundle unusable for the mode it was being prepared for.
|
|
75
|
+
|
|
76
|
+
The exclusion is a FIELD of the `all` scope now: the filter still runs, the manifest still says "everything except these" (a different and truer claim than "these"), and `replace` accepts it while naming the tables it will therefore not touch. `--exclude` also works over `--target api` now — it no longer expands against a table list only the instance has, so the instance resolves it where that list already is.
|
|
77
|
+
|
|
78
|
+
Every framework table is classified as portable or environment-local, with the reason, and a new one fails the build until somebody decides. That guard existed and did not help: it was satisfied by a second, hand-kept list inside its own test, and the two disagreed about `_voltro_traces` and `_voltro_undo_log` — nothing was unclassified, something was classified twice, once wrongly. There is one list now, read by both guards. Traces, undo, the outbox and its attempts, idempotency keys, storage grants, spend and usage accounting, delivery attempts and schedule-firing history joined the environment-local side: a row from elsewhere would make the target act, or claim history it did not live.
|
|
79
|
+
- **@voltro/sql-turso** — Opening a second pooled turso connection could fail instantly with `database is locked` — from inside the constructor, before a single query ran.
|
|
80
|
+
|
|
81
|
+
`makeConnection` set its pragmas in the order `journal_mode` → `foreign_keys` → `busy_timeout`. The engine defaults `busy_timeout` to **0**, so a statement that meets a held lock fails on the spot instead of waiting — and `journal_mode= experimental_mvcc` needs the file exclusively. Since `makeConnection` runs once per POOLED connection (default 4), opening connection two while connection one held the file hit that exclusive pragma with no lock-wait configured yet:
|
|
82
|
+
|
|
83
|
+
SqlError: Failed to enable Turso MVCC (journal_mode=experimental_mvcc): database is locked
|
|
84
|
+
|
|
85
|
+
`busy_timeout` is set FIRST now. Nothing else changed — same value, same pragmas, same connection.
|
|
86
|
+
|
|
87
|
+
**Why it hid for so long.** The file already carried a long, correct note about `busy_timeout` being mandatory with a pool, and a separate fix had closed the DDL half (`retryFilter` + bounded retries in `applySchema`). Both are about the same lock class, so the constructor read as covered — but a setting cannot protect the two pragmas that run before it.
|
|
88
|
+
|
|
89
|
+
It surfaces as an unrelated flaky test, because the failure lands wherever the second connection happens to be opened: a `CREATE TABLE` in one run, an MVCC pragma in the next. It cost three release gates — twice locally, once on a CI runner — and was twice diagnosed as machine contention and closed. It is contention-DEPENDENT, which is not the same as being the machine's fault.
|
|
90
|
+
|
|
91
|
+
Verified: 8 serial runs and 6 concurrent suites at load 12 — 0 failures, 0 occurrences of the message. The failure was intermittent before, so this is evidence rather than proof; the mechanism, however, is not in doubt.
|
|
92
|
+
- **@voltro/runtime, @voltro/data-transfer, @voltro/cli** — The `source:` recorder broke every WRITE on the in-memory store, and actions are recorded now.
|
|
93
|
+
|
|
94
|
+
The recording wrapper is a `Proxy`, and it handed methods back unbound — so `this` was the PROXY, and a class with `#private` fields answers that with `TypeError: Receiver must be an instance of class InMemoryDataStore`. Under `voltro dev` on the memory store, where the recorder is installed by default, that is every write in the app.
|
|
95
|
+
|
|
96
|
+
Every test passed throughout, and the reason is worth more than the fix: `query` is the one method the wrapper invokes with an explicit receiver, so everything that only READ through it worked. The wrapper's whole purpose is reading, so nothing in its own suite ever wrote. It was found by a test about something else entirely — asking what `crud.create` reads — which needed a write to answer.
|
|
97
|
+
|
|
98
|
+
**Actions are recorded too now**, and an action's `source:` means something different from a query's. A query's is a reactive trigger set; an action's declares what it TOUCHES, and the field's own documentation records what an undeclared read costs: `voltro check` reported a table five action paths read and wrote as an orphan, and advised removing it. That is not a quiet subscription, it is advice to delete a live table.
|
|
99
|
+
|
|
100
|
+
**Measured rather than reasoned about:** `crud.create`, `crud.update` and `crud.remove` issue NO read at all, so a read recorder has nothing to say about them — but `crud.getById` does read, and with `include:` it eager-loads, so it is covered like `crud.list`.
|
|
101
|
+
|
|
102
|
+
**And a kill test for the one moment nobody had reproduced.** The existing test kills mid-LOAD, which staging turned into the harmless part; the destructive second went untested precisely because it became short. The new case kills as the swap begins and asserts the property rather than the race: the target is one state or the other, never a mix, and never empty. Two defects in the harness came out of writing it — a worker that died SILENTLY (its failure now goes into the marker the parent already reads, instead of looking like a slow start), and an `exit` listener attached only after the SIGKILL, which hung to the full timeout whenever the child finished first.
|
|
103
|
+
|
|
104
|
+
**And the import trace was never written on the path most likely to be used.** A deployment ran a successful `voltro data import` against a database that HAD the table, and got no row and no message at all. The write was gated on this PROCESS's table registry, and `voltro data`'s own boot builds a store and introspects the live schema — it never registers the framework set, so the gate was `undefined` exactly there. The authority for "does the target have this table" is the target's SCHEMA, which that boot already introspects; the table is also registered before the write, because a CLI run has not done it and the write needs the column metadata.
|
|
105
|
+
|
|
106
|
+
The sharper half is the silence, and it was self-inflicted: the skip was written three lines under a comment about how an absent table cannot be detected by the write failing. The message now lives in `voltro data import`, which is the layer that INTROSPECTED — a first attempt put it in the importer, where a `targetSnapshot` may legitimately be narrow rather than complete, so it fired at callers whose snapshot simply did not mention a framework table.
|
|
107
|
+
|
|
108
|
+
### Internal (no consumer-facing effect)
|
|
109
|
+
|
|
110
|
+
- **@voltro/data-transfer** — `SAVEPOINT_BATCH_SIZE` carries its documentation again.
|
|
111
|
+
|
|
112
|
+
A new `TRACE_ADVANCE_MS` was declared BETWEEN the constant's doc block and the constant, so TypeScript attached the block to whatever now followed it and the exported symbol was left bare — the api golden recorded it as `// @public (undocumented)` and the published report shipped it that way.
|
|
113
|
+
|
|
114
|
+
Third time this exact shape has appeared (`sourceKeys`, `recordsTable`, now this one), always the same mechanism: an insertion above a documented declaration silently re-homes the comment. Nothing warns, because both the code and the doc block are individually valid — only the golden's `(undocumented)` marker notices, and it reads as noise unless someone diffs it against the last TAG.
|
|
115
|
+
|
|
116
|
+
Documentation only; no behaviour, no signature change.
|
|
117
|
+
|
|
118
|
+
**`apiSurface: compatible`, and the reason is the whole point of the change.** The golden line that moved is `// @public (undocumented)` → `// @public`: an api-extractor MARKER describing whether a doc comment is present. No type, no signature, no name. `SAVEPOINT_BATCH_SIZE` is still `= 200`, still exported, still the same literal type — nothing that compiled can stop compiling.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
42
122
|
## [0.47.0] — 2026-08-22
|
|
43
123
|
|
|
44
124
|
### Changed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as e } from "./dev-
|
|
1
|
+
import { f as e } from "./dev-lvnVq5RD.js";
|
|
2
2
|
import { vt as t } from "./webDev-B4IEMB0n.js";
|
|
3
3
|
import { t as n } from "./dialectDriver-czCHYpeH.js";
|
|
4
4
|
import { dirname as r, isAbsolute as i, join as a, relative as o, resolve as s } from "node:path";
|
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-CAxFLqG4.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 { gn as e } from "./dev-
|
|
1
|
+
import { gn as e } from "./dev-lvnVq5RD.js";
|
|
2
2
|
import { $ as t, A as n, F as r, I as i, L as a, Q as o, a as s, b as c, d as l, et as u, f as d, ht as f, k as p, rt as m, s as h, v as g, vt as _, y as v } from "./webDev-B4IEMB0n.js";
|
|
3
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-Dz8TJSxp.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";
|
|
@@ -477,7 +477,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
477
477
|
file: n.file,
|
|
478
478
|
reason: n.reason
|
|
479
479
|
});
|
|
480
|
-
let { regenerateRpcGroup: r } = await import("./codegenCommand-
|
|
480
|
+
let { regenerateRpcGroup: r } = await import("./codegenCommand-L6vacVRW.js"), i = await r(e);
|
|
481
481
|
if (i.kind === "refused") {
|
|
482
482
|
F.warn("could not regenerate the rpc group — building against what is on disk", { reason: i.reason });
|
|
483
483
|
return;
|
|
@@ -489,10 +489,10 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
489
489
|
}, K = async (e) => {
|
|
490
490
|
let n = await l(e);
|
|
491
491
|
if (!n) {
|
|
492
|
-
let { loadApiConfig: t } = await import("./dev-
|
|
492
|
+
let { loadApiConfig: t } = await import("./dev-cGGsLNn6.js"), n = await t(e);
|
|
493
493
|
if (n) {
|
|
494
494
|
F.info("building api app", { app: n.name ?? "(unnamed)" }), await G(e);
|
|
495
|
-
let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-
|
|
495
|
+
let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-DOnvi2zm.js");
|
|
496
496
|
await t(e);
|
|
497
497
|
try {
|
|
498
498
|
await r(e);
|
|
@@ -711,7 +711,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
|
|
|
711
711
|
return t.ran ? t.exitCode : (yield* j.logError("no web app found at this path", { hint: "looked for app.config.ts with `type: 'web'`" }), 1);
|
|
712
712
|
}), J = async (t) => {
|
|
713
713
|
if (t.includes("--target")) {
|
|
714
|
-
let { runSdkBuildCommand: e } = await import("./sdkgen-
|
|
714
|
+
let { runSdkBuildCommand: e } = await import("./sdkgen-BXm7zx7F.js");
|
|
715
715
|
return e(t);
|
|
716
716
|
}
|
|
717
717
|
let n = t.find((e) => !e.startsWith("-")) ?? process.cwd(), r = await y(q(n), { scope: "voltro:build" }), i = e(n);
|
|
@@ -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-Dals7g-I.js";
|
|
2
2
|
export { n as offlineManifest, e as runCheckCommand, t as toInput };
|
|
@@ -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 { S as u } from "./doctorCommand-
|
|
7
|
+
import { S as u } from "./doctorCommand-BK0qu7eD.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,12 +141,12 @@ 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-cGGsLNn6.js"), { buildRpcEntry: i } = await import("./manifestBuild-j0n109tt.js"), { buildCapabilityManifest: a } = await import("./inspect-DUze25t0.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)),
|
|
148
148
|
...s.streams.map((e) => c(e.descriptor, "stream", e.file))
|
|
149
|
-
], { assembleFrameworkTables: u } = await import("./frameworkTableAssembly-
|
|
149
|
+
], { assembleFrameworkTables: u } = await import("./frameworkTableAssembly-Rft-DPUg.js"), d = await u({ root: e }).catch((e) => (console.warn(`\n⚠ plugin tables could not be collected — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`), [])), f = new Set(s.tables.map((e) => e.tableName)), p = [...[...f].map((e) => ({ name: e })), ...d.map((e) => e.tableName).filter((e) => !f.has(e)).map((e) => ({
|
|
150
150
|
name: e,
|
|
151
151
|
framework: !0
|
|
152
152
|
}))], m = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { B as e, Sn as t, l as n, u as r, xn as i } from "./dev-
|
|
1
|
+
import { B as e, Sn as t, l as n, u as r, xn as i } from "./dev-lvnVq5RD.js";
|
|
2
2
|
import { dt as a } from "./webDev-B4IEMB0n.js";
|
|
3
|
-
import { r as o
|
|
3
|
+
import { r as o } from "./frameworkTableAssembly-BNod_DKN.js";
|
|
4
|
+
import { n as s } from "./declaredSchemaGates-BlcwObhb.js";
|
|
4
5
|
import { i as c, r as l } from "./codegen-CrMXs4hb.js";
|
|
5
6
|
import { basename as u, join as d, relative as f, resolve as p } from "node:path";
|
|
6
7
|
import { promises as m } from "node:fs";
|
|
@@ -91,7 +91,7 @@ var c = () => {
|
|
|
91
91
|
name: "dev",
|
|
92
92
|
summary: "Start the local development server (auto-discovers routes / mutations).",
|
|
93
93
|
status: "wired",
|
|
94
|
-
run: (e) => import("./dev-
|
|
94
|
+
run: (e) => import("./dev-cGGsLNn6.js").then((t) => t.runDev(e)),
|
|
95
95
|
help: {
|
|
96
96
|
usage: "[app]",
|
|
97
97
|
examples: [["voltro dev", "boot the app in the current directory"], ["voltro dev apps/acme/api", "boot a specific app"]],
|
|
@@ -109,7 +109,7 @@ var c = () => {
|
|
|
109
109
|
name: "dashboard",
|
|
110
110
|
summary: "Serve the DevTools dashboard standalone (from @voltro/dashboard). Targets via VOLTRO_DASHBOARD_APPS; --port to override.",
|
|
111
111
|
status: "wired",
|
|
112
|
-
run: (e) => import("./dashboardCommand-
|
|
112
|
+
run: (e) => import("./dashboardCommand-CJC8Kg-s.js").then((t) => t.runDashboardCommand(e)),
|
|
113
113
|
help: {
|
|
114
114
|
usage: "[--port <n>]",
|
|
115
115
|
flags: [["--port <n>", "port to serve the dashboard on"]],
|
|
@@ -121,7 +121,7 @@ var c = () => {
|
|
|
121
121
|
name: "check",
|
|
122
122
|
summary: "Verify the app graph (blast-radius checks) against a running api; LLM-shaped --json diagnostics. Flags: --json, --process <p>, --diff removeTable:<name>.",
|
|
123
123
|
status: "wired",
|
|
124
|
-
run: (e) => import("./checkCommand-
|
|
124
|
+
run: (e) => import("./checkCommand-BUBqPBlI.js").then((t) => t.runCheckCommand(e)),
|
|
125
125
|
help: {
|
|
126
126
|
usage: "[--json] [--offline] [--process <name>] [--diff removeTable:<name>]",
|
|
127
127
|
flags: [
|
|
@@ -155,7 +155,7 @@ var c = () => {
|
|
|
155
155
|
name: "webhooks",
|
|
156
156
|
summary: "Outbound-webhook artefacts. `consumer` generates the ZERO-DEPENDENCY Standard-Webhooks verification package a subscriber installs, from this app's own declared events; `events` lists the events a subscriber can register for. Usage: voltro webhooks <consumer|events> [path] [--out <dir>] [--name <pkg>] [--json].",
|
|
157
157
|
status: "wired",
|
|
158
|
-
run: (e) => import("./webhooksCommand-
|
|
158
|
+
run: (e) => import("./webhooksCommand-QlAk_tED.js").then((t) => t.runWebhooksCommand(e)),
|
|
159
159
|
help: {
|
|
160
160
|
usage: "<consumer|events> [path] [--out <dir>] [--name <pkg>] [--json]",
|
|
161
161
|
flags: [
|
|
@@ -171,7 +171,7 @@ var c = () => {
|
|
|
171
171
|
name: "evolve",
|
|
172
172
|
summary: "Schema-evolution copilot: propose an observed-graph-driven codemod + a branch-verified backfill for a schema change (rename/retype/split/drop a column, rename a table). Dry-run by default; --write applies. Usage: voltro evolve rename-column <table>.<col> --to <newName> [--write] [--json].",
|
|
173
173
|
status: "wired",
|
|
174
|
-
run: (e) => import("./evolveCommand-
|
|
174
|
+
run: (e) => import("./evolveCommand-CQh6dw21.js").then((t) => t.runEvolveCommand(e)),
|
|
175
175
|
help: {
|
|
176
176
|
usage: "<rename-column|rename-table|retype-column|split-column|drop-column> <target> [--to <new>] [--write]",
|
|
177
177
|
flags: [
|
|
@@ -188,7 +188,7 @@ var c = () => {
|
|
|
188
188
|
name: "codegen",
|
|
189
189
|
summary: "Emit rpcGroup.generated.ts from discovered route / mutation descriptors.",
|
|
190
190
|
status: "wired",
|
|
191
|
-
run: (e) => import("./codegenCommand-
|
|
191
|
+
run: (e) => import("./codegenCommand-L6vacVRW.js").then((t) => t.runCodegenCommand(e)),
|
|
192
192
|
help: {
|
|
193
193
|
usage: "[app]",
|
|
194
194
|
examples: [["voltro codegen", "regenerate rpcGroup.generated.ts for the app in the cwd"]],
|
|
@@ -199,7 +199,7 @@ var c = () => {
|
|
|
199
199
|
name: "migrate",
|
|
200
200
|
summary: "Apply the declared schema to the database (alias of `db apply` — diffs declared vs live and emits the ALTERs). `--create-only` for the bootstrap-only CREATE TABLE IF NOT EXISTS path.",
|
|
201
201
|
status: "wired",
|
|
202
|
-
run: (e) => import("./migrate-
|
|
202
|
+
run: (e) => import("./migrate-CL5Ed01M.js").then((t) => t.runMigrateCommand(e)),
|
|
203
203
|
help: {
|
|
204
204
|
usage: "[app] [--create-only]",
|
|
205
205
|
flags: [["--create-only", "only CREATE TABLE IF NOT EXISTS — never ALTER (bootstrap)"]],
|
|
@@ -280,7 +280,7 @@ var c = () => {
|
|
|
280
280
|
name: "env",
|
|
281
281
|
summary: "Inspect/sync the typed-env manifest. Subcommands: check (default), sync (.env.example), types (env.generated.d.ts for CI tsc), turbo.",
|
|
282
282
|
status: "wired",
|
|
283
|
-
run: (e) => import("./envCommand-
|
|
283
|
+
run: (e) => import("./envCommand-BHxKkGXq.js").then((t) => t.runEnvCommand(e)),
|
|
284
284
|
help: {
|
|
285
285
|
usage: "[check|sync|types|turbo] [--force]",
|
|
286
286
|
flags: [["--force", "overwrite the generated file instead of refusing on a conflict"]],
|
|
@@ -309,12 +309,12 @@ var c = () => {
|
|
|
309
309
|
run: async (e) => {
|
|
310
310
|
let t = e.find((e) => !e.startsWith("-")) ?? process.cwd();
|
|
311
311
|
if (e.includes("--preflight")) {
|
|
312
|
-
let { runServePreflight: e } = await import("./doctorCommand-
|
|
312
|
+
let { runServePreflight: e } = await import("./doctorCommand-CWgUPye-.js");
|
|
313
313
|
return e(a(t), !0);
|
|
314
314
|
}
|
|
315
315
|
let { tryRunWebServe: n } = await import("./webDev-B79ji8M5.js"), r = await n(a(t));
|
|
316
316
|
if (!r.ran) {
|
|
317
|
-
let { runServeDispatch: t } = await import("./serveCommand-
|
|
317
|
+
let { runServeDispatch: t } = await import("./serveCommand-ZP_Cb-yz.js");
|
|
318
318
|
return t(e);
|
|
319
319
|
}
|
|
320
320
|
return r.exitCode;
|
|
@@ -342,13 +342,13 @@ var c = () => {
|
|
|
342
342
|
handlesHelp: !0,
|
|
343
343
|
summary: "Preflight an app for production: the precompiled serve bundle, hand-rolled primitives (naming the shipped one), @voltro/* version skew, executors with no access check, `.serverOnly()` leaks, and junction-FK gaps.",
|
|
344
344
|
status: "wired",
|
|
345
|
-
run: (e) => import("./doctorCommand-
|
|
345
|
+
run: (e) => import("./doctorCommand-CWgUPye-.js").then((t) => t.runDoctorCommand(e))
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
name: "build",
|
|
349
349
|
summary: "Production build for a web app (vite build + per-page SSG pre-render).",
|
|
350
350
|
status: "wired",
|
|
351
|
-
run: (e) => import("./build-
|
|
351
|
+
run: (e) => import("./build-DLme2ppa.js").then((t) => t.runBuildCommand(e)),
|
|
352
352
|
help: {
|
|
353
353
|
usage: "[app] [--target <t>]",
|
|
354
354
|
flags: [["--target <t>", "build target"]],
|
|
@@ -364,7 +364,7 @@ var c = () => {
|
|
|
364
364
|
name: "prune-runtime",
|
|
365
365
|
summary: "Trim a deployed web tree’s node_modules to the reachable runtime set (standalone image slimming).",
|
|
366
366
|
status: "wired",
|
|
367
|
-
run: (e) => import("./runtimeTrace-
|
|
367
|
+
run: (e) => import("./runtimeTrace-C0SlIoQY.js").then((t) => t.runPruneRuntimeCommand(e)),
|
|
368
368
|
hidden: !0
|
|
369
369
|
},
|
|
370
370
|
{
|
|
@@ -382,7 +382,7 @@ var c = () => {
|
|
|
382
382
|
name: "dormancy",
|
|
383
383
|
summary: "Single-node scale-to-zero: front the API with a wake-orchestrator that stops the app when idle and brings it back on a request or a due wakeup (cron/workflow). Needs a SQL store. Flags: --port, --app-port, --idle-grace-ms, --tick-ms.",
|
|
384
384
|
status: "wired",
|
|
385
|
-
run: (e) => import("./dormancyCommand-
|
|
385
|
+
run: (e) => import("./dormancyCommand-CyIk-zq4.js").then((t) => t.runDormancyCommand(e)),
|
|
386
386
|
help: {
|
|
387
387
|
usage: "[app] [--port <n>] [--app-port <n>] [--idle-grace-ms <n>] [--tick-ms <n>]",
|
|
388
388
|
flags: [
|
|
@@ -453,7 +453,7 @@ var c = () => {
|
|
|
453
453
|
name: "db",
|
|
454
454
|
summary: "Database subcommands. Declarative flow: plan, apply, branch, plans, drift [--accept], squash, restore-snapshot. File migrations: generate [name], migrate, rollback, status, files, rollback-file. Data + housekeeping: seed, gc-snapshots, adopt. Credentials at rest: scan-credentials (find plaintext), encrypt-column (migrate a populated column onto .encrypted()).",
|
|
455
455
|
status: "wired",
|
|
456
|
-
run: (e) => import("./dbCommand-
|
|
456
|
+
run: (e) => import("./dbCommand-D1Q33ktl.js").then((t) => t.runDbCommand(e)),
|
|
457
457
|
help: {
|
|
458
458
|
usage: t(n),
|
|
459
459
|
examples: [
|
|
@@ -469,7 +469,7 @@ var c = () => {
|
|
|
469
469
|
name: "data",
|
|
470
470
|
summary: "Export/import + backup/restore of app data. Logical (rows + optional assets): export <dir> [--tenant <id>|--tables a,b] [--assets] [--compression zstd|gzip|none] [--consistency live|snapshot]; import <dir> [--assets] [--no-verify]. Native (rows ONLY — no blobs): backup <dir> / restore <dir> (pg_dump/mariadb-dump/…). Resumable; typed-NDJSON; content-addressed assets on the logical path.",
|
|
471
471
|
status: "wired",
|
|
472
|
-
run: (e) => import("./dataCommand-
|
|
472
|
+
run: (e) => import("./dataCommand-hIaq2iKY.js").then((t) => t.runDataCommand(e)),
|
|
473
473
|
help: {
|
|
474
474
|
usage: "<export|import|backup|restore> <dir> [options]",
|
|
475
475
|
flags: [
|
|
@@ -537,7 +537,7 @@ var c = () => {
|
|
|
537
537
|
name: "embeddings",
|
|
538
538
|
summary: "Embeddings tooling. Subcommand: backfill <table> --text <field> --vector <field> [--model <m>] [--model-field <f>] [--batch <n>] [--dry-run] — (re)embed rows the vectorEmbedding() mixin missed.",
|
|
539
539
|
status: "wired",
|
|
540
|
-
run: (e) => import("./embeddingsCommand-
|
|
540
|
+
run: (e) => import("./embeddingsCommand-D7TLklps.js").then((t) => t.runEmbeddingsCommand(e)),
|
|
541
541
|
help: {
|
|
542
542
|
usage: "backfill <table> --text <field> --vector <field> [--model <m>] [--batch <n>] [--dry-run]",
|
|
543
543
|
flags: [
|