@voltro/cli 0.42.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/dist/apiBuild-B7NgSMhX.js +2 -0
  3. package/dist/{apiBuild-B_iH24qf.js → apiBuild-DF0f69Gf.js} +2 -2
  4. package/dist/bin.js +1 -1
  5. package/dist/{build-DUdi6F_Q.js → build-LC_IJaHL.js} +7 -7
  6. package/dist/{checkCommand-B2RWrpWi.js → checkCommand-DBpTSK8d.js} +1 -1
  7. package/dist/{checkCommand-DWL2_PPR.js → checkCommand-DDxwJCja.js} +2 -2
  8. package/dist/{codegenCommand-DkjoJ30Q.js → codegenCommand-LjxfK4Am.js} +2 -2
  9. package/dist/{codemodRunner-sFuWDETH.js → codemodRunner-Cnnz4-I7.js} +19 -4
  10. package/dist/{commands-DoTClnSk.js → commands-CbQcuWsE.js} +20 -20
  11. package/dist/{dashboardCommand-Bro7Jwts.js → dashboardCommand-CAHjCe_9.js} +3 -3
  12. package/dist/{dataCommand-Rj57y1vg.js → dataCommand-CrqvbVOv.js} +143 -133
  13. package/dist/{dev-D4l_YOzI.js → dev-B2rZfqxw.js} +2 -2
  14. package/dist/{dev-DuqBJC7g.js → dev-D0E5x2Ue.js} +1 -1
  15. package/dist/doctorCommand-CdsctSwg.js +2 -0
  16. package/dist/{doctorCommand-TmZTAepc.js → doctorCommand-Ct_3BHgd.js} +226 -216
  17. package/dist/{dormancyCommand-CUKhRmGG.js → dormancyCommand-D1DKnYce.js} +1 -1
  18. package/dist/{embeddingsCommand-Db-iQM3l.js → embeddingsCommand-1sZRBKlM.js} +1 -1
  19. package/dist/{envCommand-DQ_URZq9.js → envCommand-7qjlQgLD.js} +2 -2
  20. package/dist/{evolveCommand-CghRPrGO.js → evolveCommand-D5opB48I.js} +2 -2
  21. package/dist/index.js +1 -1
  22. package/dist/{infoCommand-BCs_ZFnl.js → infoCommand-Bs_8RU22.js} +1 -1
  23. package/dist/{runtimeTrace-jFKvOPBz.js → runtimeTrace-Wmi7V-wN.js} +1 -1
  24. package/dist/{sdkgen-COQqHB9V.js → sdkgen-DbTFGCjg.js} +1 -1
  25. package/dist/{serveCommand-C512kzZA.js → serveCommand-C8xzYCwa.js} +4 -4
  26. package/dist/serveCommand-CGNTXafv.js +2 -0
  27. package/dist/serveEntry.js +1 -1
  28. package/dist/{start-fifc0xpW.js → start-BAlGcjF5.js} +1 -1
  29. package/dist/{start-BjcuFME_.js → start-Ds3xyn8R.js} +1 -1
  30. package/dist/startEntry.js +1 -1
  31. package/dist/startup.d.ts +1 -1
  32. package/dist/updateCommand-BvkKlV7D.js +2 -0
  33. package/dist/{updateCommand-HZQVBU3T.js → updateCommand-CrI9B4d7.js} +1 -1
  34. package/dist/{webDev-Dk8lFUzf.js → webDev-101csg6Q.js} +2 -2
  35. package/dist/webDev-BLKBO34K.js +2 -0
  36. package/dist/{webhooksCommand-D7ZpH7w0.js → webhooksCommand-BXUP5YjW.js} +1 -1
  37. package/package.json +23 -17
  38. package/templates/AGENTS.md +1 -1
  39. package/templates/agent-docs/_index.md +1 -1
  40. package/templates/agent-docs/authentication.md +1 -1
  41. package/templates/agent-docs/cli.md +2 -2
  42. package/templates/agent-docs/data.md +14 -12
  43. package/templates/agent-docs/database/migrations.md +1 -1
  44. package/templates/agent-docs/internationalization.md +2 -2
  45. package/templates/agent-docs/observability.md +1 -1
  46. package/templates/agent-docs/plugins/openapi.md +1 -1
  47. package/templates/agent-docs/plugins/versioning.md +1 -1
  48. package/templates/agent-docs/plugins/webhooks.md +1 -1
  49. package/templates/agent-docs/plugins.md +1 -1
  50. package/templates/agent-docs/routing.md +1 -1
  51. package/templates/agent-docs/scheduling.md +1 -1
  52. package/templates/agent-docs/security.md +2 -2
  53. package/templates/agent-docs/templates/apibackends.md +1 -1
  54. package/templates/agent-docs/whats-new.md +49 -55
  55. package/templates/apps/api-ai/package.json +7 -7
  56. package/templates/apps/api-auth/package.json +8 -8
  57. package/templates/apps/api-backend/package.json +7 -7
  58. package/templates/apps/api-backend-deactivation/package.json +7 -7
  59. package/templates/apps/api-backend-mail/package.json +8 -8
  60. package/templates/apps/api-backend-mariadb/package.json +9 -9
  61. package/templates/apps/api-backend-sqlite/package.json +8 -8
  62. package/templates/apps/api-backend-storage/package.json +8 -8
  63. package/templates/apps/api-cms/package.json +10 -10
  64. package/templates/apps/api-collab/package.json +8 -8
  65. package/templates/apps/api-data-advanced/package.json +8 -8
  66. package/templates/apps/api-durable/package.json +8 -8
  67. package/templates/apps/api-feature-flags/package.json +9 -9
  68. package/templates/apps/api-governance/package.json +8 -8
  69. package/templates/apps/api-kv/package.json +8 -8
  70. package/templates/apps/api-moderation/package.json +8 -8
  71. package/templates/apps/api-observability/package.json +8 -8
  72. package/templates/apps/api-ratelimit/package.json +8 -8
  73. package/templates/apps/api-rbac/package.json +8 -8
  74. package/templates/apps/api-rest/package.json +7 -7
  75. package/templates/apps/api-saas/package.json +11 -11
  76. package/templates/apps/api-saas-starter/package.json +10 -10
  77. package/templates/apps/api-search/package.json +8 -8
  78. package/templates/apps/api-status/package.json +8 -8
  79. package/templates/apps/api-versioning/package.json +8 -8
  80. package/templates/apps/api-webhooks/package.json +9 -9
  81. package/templates/apps/changelog/package.json +6 -6
  82. package/templates/apps/edge-functions/package.json +2 -2
  83. package/templates/apps/frontend-admin/package.json +8 -8
  84. package/templates/apps/frontend-app/package.json +9 -9
  85. package/templates/apps/frontend-auth/package.json +8 -8
  86. package/templates/apps/frontend-blank/package.json +7 -7
  87. package/templates/apps/frontend-cms/package.json +9 -9
  88. package/templates/apps/frontend-collab/package.json +10 -10
  89. package/templates/apps/frontend-contact/package.json +7 -7
  90. package/templates/apps/frontend-dashboard/package.json +7 -7
  91. package/templates/apps/frontend-docs/package.json +7 -7
  92. package/templates/apps/frontend-i18n/package.json +6 -6
  93. package/templates/apps/frontend-landing/package.json +7 -7
  94. package/templates/apps/frontend-portal/package.json +8 -8
  95. package/templates/apps/frontend-saas/package.json +8 -8
  96. package/templates/apps/frontend-spa/package.json +7 -7
  97. package/templates/apps/frontend-ssr/package.json +7 -7
  98. package/templates/apps/frontend-ssr-api/package.json +8 -8
  99. package/templates/apps/frontend-static-blog/package.json +6 -6
  100. package/templates/apps/frontend-status/package.json +8 -8
  101. package/templates/apps/mobile-app/package.json +4 -4
  102. package/dist/apiBuild-RM5W5YXk.js +0 -2
  103. package/dist/doctorCommand-Bw3V4L1j.js +0 -2
  104. package/dist/serveCommand-gj7MsqXY.js +0 -2
  105. package/dist/updateCommand-B2alql9k.js +0 -2
  106. package/dist/webDev-D6QeXw3P.js +0 -2
package/CHANGELOG.md CHANGED
@@ -39,6 +39,97 @@ _Changes staged for the next release accumulate here (rolled up from
39
39
 
40
40
  ---
41
41
 
42
+ ## [0.43.0] — 2026-08-18
43
+
44
+ ### ⚠ BREAKING
45
+
46
+ - **@voltro/data-transfer, @voltro/cli** — `DanglingReferenceError` is now `RowsRefusedError`, and it separates the rows that failed from the rows that failed because those rows did.
47
+
48
+ **The name.** The import raised it for EVERY row still refused after deferred-FK resolution, whatever the reason — a NOT NULL violation, a duplicate key, a value the database computes for itself. The tag named ONE possible cause and put it where a reader looks first, so any other refusal arrived mislabelled. The new name states the outcome; each row's `reason` states the cause, which is where a cause can honestly be claimed.
49
+
50
+ **The split.** A row is `derived` when one of its reference columns holds the primary key of another row that also failed in this run: it could not have landed whatever it contained, so its reason describes the parent's problem. The relation is transitive, decided from the DATA (the failed ids against the reference-typed values), so no schema knowledge is needed. `primaryCount` is the number an operator acts on, `rows` lists primary failures FIRST so the cap never spends its budget on consequences, and the CLI leads with both numbers:
51
+
52
+ ```
53
+ import refused 300 row(s), of which 1 are the actual failures — the rest could
54
+ not land because a row they reference did not.
55
+ teams t1 foreign key teams_ibfk_1: the referenced row does not exist [1452]
56
+ … and 299 row(s) behind them. Fix the 1 above and re-run; they resolve with
57
+ their parents.
58
+ ```
59
+
60
+ In an FK-dense bundle one refused parent takes its whole subtree with it, so the length of a flat list says how connected the data is, not how many problems there are — and the single row that explains all of them sits somewhere in the middle of it.
61
+
62
+ The codemod rewrites the import and every use of the symbol. It does NOT rewrite a tag STRING (`Effect.catchTag('DanglingReferenceError', …)`, `err._tag === '…'`) — change those to `'RowsRefusedError'` — and the payload gained `primaryCount` plus a `derived` flag per row.
63
+
64
+ ### Fixed
65
+
66
+ - **@voltro/cli** — `voltro doctor`'s `subject-write-no-guard` rule reads the DESCRIPTOR before it reports. It looked only at the executor, and the access decision is not declared there.
67
+
68
+ Every form of access decision the framework has — `internal: true`, `guards: [...]`, `openAccess:` — is declared on the DESCRIPTOR. So an app that declares them properly got a finding for each one, and on a codebase whose procedures are mostly `internal: true` the rule fires on essentially all of them and is wrong essentially every time.
69
+
70
+ That is worse than a rule that finds nothing: it is the longest line in the report and it reads like a security finding, so it teaches the reader to skim the place a real finding would have appeared.
71
+
72
+ The premise was structurally impossible for most of them, and the framework says so itself: `security.defaultDeny` refuses at boot any wire-exposed procedure declaring neither `guards:` nor `openAccess:`. So "an anonymous caller reaches the write" can only be true of an `openAccess` procedure. That is what the rule looks for now — plus the handler check it always honoured, plus an ownership comparison against `subject.id`, which is the refusal the rule says is missing. Where no descriptor can be read, it says nothing: the claim is about a declaration, and a finding whose evidence was never opened is the failure mode this fixes.
73
+
74
+ The `use:` line changed with it. It recommended `.guard(requireScope('…'))`; the shipped guide teaches declarative `guards:` and calls a hand-written per-executor scope check the thing `guards:` exists to delete. A rule may not recommend the shape the guide argues against.
75
+ - **@voltro/database, @voltro/data-transfer** — A `voltro data` transfer no longer carries GENERATED column values, and no longer loses every row that has one.
76
+
77
+ The export wrote the computed values into the bundle and the import sent them back in the `INSERT` column list. MariaDB refuses that for any value except NULL (`1906: The value specified for generated column 'x' in table 't' has been ignored`); postgres refuses a non-DEFAULT value outright. So the transfer failed per ROW, not per table, and only for the rows whose generated value was non-NULL.
78
+
79
+ That selectivity is the dangerous part. `.uniqueActive()` lowers to exactly such a column on mysql/mariadb — a STORED generated column holding the key while the row is live and NULL once it is soft-deleted — so the refused rows are the LIVE ones and the accepted ones are the tombstones. A table can come out looking like "a few rows failed" or empty, depending only on how many of its rows are deleted, and any table with a foreign key into it fails behind it.
80
+
81
+ Both ends are fixed from one source of truth: **introspection now reports generated columns on every dialect** (`generatedAs`, from `information_schema.generation_expression` on mysql/mariadb, `is_generated` on postgres, `PRAGMA table_xinfo`'s hidden flag on sqlite, `sys.computed_columns` on mssql). It was declared-side only before — invisible to the planner, which does not compare it, and load-bearing for anything that writes rows back.
82
+
83
+ The exporter omits those columns, values and all. The importer strips them from every incoming row using the TARGET's snapshot, because a bundle already written still carries them and a file on disk is data, read where it is.
84
+
85
+ **`voltro serve`'s admin export/import needed a second fix, and without it this one reached only the direct transport.** The running instance hands those handlers `declaredSnapshot(tables)` — no dialect — and `.uniqueActive()` lowers to a generated column only when the snapshot knows the engine. So over `--target api` the snapshot described a schema with no generated columns while the database had several, and the export wrote their values back into the bundle exactly as before. It passes the dialect now (the variable was already on the next line).
86
+
87
+ `generatedAs` is also kept OUT of the schema fingerprint. Introspection can read the fact back but not a comparable value — the engine returns its own normalisation of the expression, never the declared spelling — so hashing it would make declared and live disagree permanently: a schema nobody touched reporting a changed declaration on every boot, and a transfer target that matches its bundle exactly refused as drifted.
88
+
89
+ Covered by a live mariadb→mariadb and mysql→mysql round trip over a `.uniqueActive()` table with live and soft-deleted rows, asserting the target recomputed the value rather than that the row merely arrived.
90
+ - **@voltro/sql-mysql** — On mysql/mariadb, a write REJECTED by the database through `insertIgnore` was reported as a conflict when the caller was not inside a transaction — and never reached the caller as a typed `ConstraintViolation` at all.
91
+
92
+ Two causes, both measured against live MySQL 8.4 and MariaDB 11.
93
+
94
+ **The connection.** `INSERT IGNORE` demotes every error to a warning, so the store reads `SHOW WARNINGS` to tell a rejection from a conflict. That describes the last statement on a CONNECTION, and outside a transaction every statement acquires its own from the pool — so the read was unattributable and came back empty. The rejected write then surfaced as "the insert was skipped as a conflict, but no existing row matches conflictColumns […] the constraint that fired is unknown", whose enumeration lists only conflict causes. A rejection described as a conflict is the exact sentence this path was fixed once already for producing; it survived on the path that had no transaction to read on. The store now pins one connection for the whole decision — the same pinning `insertRecoverAutoId` does for `LAST_INSERT_ID()`.
95
+
96
+ **The classification.** The store swallowed the driver's error and raised a prose one of its own, so `classifyConstraintViolation` had nothing to read: this was the one write path where the typed error could not fire, while every other one produced it. The warning IS the driver's payload — `INSERT IGNORE` only changed how it was delivered — so it is handed on in the shape the driver would have thrown. A rejection now arrives as the same `ConstraintViolation { kind: 'foreignKey', … }` a plain `insert` produces. Nothing new crosses the wire: the classifier extracts the constraint NAME as a delimited group, never the sentence.
97
+
98
+ This is the default `voltro data import` path (`--mode append`, `--on-conflict skip`, without `--atomic`), so a row rejected by a foreign key was reported to the operator as a conflict with an unknown cause.
99
+
100
+ `constraintViolation.integration.test.ts` now asserts the `insertIgnore` seam per dialect against live postgres 17, MySQL 8.4, MariaDB 11 and SQL Server 2022. It was the missing assertion behind a claim derived from the wiring — the classification does sit on all ten write paths, which is not the same as a classifiable error arriving on all ten.
101
+ - **@voltro/protocol, @voltro/runtime** — The framework's store errors — `ConstraintViolation`, `TenantScopeViolation`, `TenantRowNotFound`, `ServerOnlyColumnWrite`, `TableValidationFailed`, `StoreOperationFailed` — are exported from `@voltro/protocol` and can therefore be declared in a descriptor's `error:` union. They could not be.
102
+
103
+ They lived in `@voltro/runtime`, which reaches `node:child_process`, `node:http` and `node:crypto`. A descriptor is loaded VALUE-LEVEL by the web client (the `RpcClient` needs every procedure's Schema), so a descriptor importing from there is refused at boot by the browser-safety guard — correctly. The typed half of these errors was therefore unreachable: the docs told you to declare them, and the boot said no.
104
+
105
+ What that leaves is the untyped half only. The error still arrives as an `InternalError` carrying a readable sentence, so telling `foreignKey` ("the row you picked is gone") from `foreignKeyInUse` ("this row is still referenced") — two different messages for the user — means parsing that sentence. Over a set of generated delete mutations that is a string comparison per procedure, which is the thing the typed error exists to delete.
106
+
107
+ `@voltro/runtime` re-exports all six, so server code is unchanged. The classes have no server dependency of any kind — the file imports `Schema` from `effect` and nothing else, and `browserSafetyGuard.test.ts` now pins a descriptor that declares one, so moving them back reads as a boot failure rather than as a passing rename.
108
+ - **@voltro/database, @voltro/sql-mysql** — A blocked `alter-column-type` told every dialect to write a postgres cast.
109
+
110
+ The refusal is correct — a bare type change may not be value-preserving, so it is refused until acknowledged. Its `fix:` line was not:
111
+
112
+ ```
113
+ acknowledge it on the column: `.narrowedFrom('json', { using: 'meta::text' })`
114
+ ```
115
+
116
+ `USING <expr>` is postgres syntax and a postgres capability. The mysql arm of the applier emits `MODIFY COLUMN`, the mssql arm `ALTER COLUMN`, and sqlite rebuilds the table — none of them can carry a cast expression and none of them reads `using`. So an operator on any other engine was handed a line to paste into their schema containing syntax their database has never seen, inside an argument that is discarded. A refusal is read as an instruction, and the more carefully it is read the more thoroughly a wrong one is followed.
117
+
118
+ The fix line is dialect-aware now: postgres keeps the `using` half, everything else gets `.narrowedFrom('<type>')` plus the fact that the engine converts in place — because a refusal that offers no expressible fix reads as "the framework cannot do this at all".
119
+
120
+ Covered on live MySQL and MariaDB by both halves at once: what the refusal SAYS, and that following it applies AND converges with the row intact. A message test alone would keep passing over a broken apply; a convergence test alone is what let the wrong message survive this long.
121
+
122
+ Also on the same path: `upsert` with a PARTIAL row (one omitting a NOT NULL column that has no default) failed on MariaDB and succeeded on MySQL. The native `INSERT … ON DUPLICATE KEY UPDATE` validates its insert half even when only the update half runs, so the row was rejected although the target existed and only needed patching. A partial row takes the lookup path on both engines now; the single-statement form still covers the complete-row case, which is what a data transfer and every generated CRUD write send.
123
+ - **@voltro/sql-mysql** — On MariaDB, `upsert` could write a DIFFERENT row than the one it was given and report success.
124
+
125
+ `INSERT … ON DUPLICATE KEY UPDATE` fires on ANY unique key, not on the one named in `conflictColumns`. So an incoming row whose (say) `email` already belonged to a different primary key updated THAT row instead — and since `id` is excluded from the SET list, the row the caller handed over was never written. Measured on a live server: the call returned a row, the target kept the old id, the new row was absent, and the existing row had silently taken the incoming values. A bulk transfer on top of that prints `import complete` over missing data, which is the worst failure shape available: there is nothing to investigate.
126
+
127
+ The two engines of the family disagreed here, which is part of why it survived. The non-RETURNING path (MySQL) looks the row up by `conflictColumns` first, does not find it, and lets the INSERT fail with a duplicate-key error. Loud was always right.
128
+
129
+ Both refuse now, with a message naming both ids and the fact that the collision was on a constraint other than the one named. The check runs inside a transaction — a short one of the store's own when the caller is not already in one — so the wrong row is rolled back rather than reported after the fact: detecting this afterwards still leaves someone else's row overwritten.
130
+
131
+ ---
132
+
42
133
  ## [0.42.0] — 2026-08-17
43
134
 
44
135
  ### ⚠ BREAKING
@@ -0,0 +1,2 @@
1
+ import { c as e, l as t } from "./apiBuild-DF0f69Gf.js";
2
+ export { e as runApiBuild, t as runServeBundleBuild };
@@ -1,5 +1,5 @@
1
- import { f as e } from "./dev-D4l_YOzI.js";
2
- import { vt as t } from "./webDev-Dk8lFUzf.js";
1
+ import { f as e } from "./dev-B2rZfqxw.js";
2
+ import { vt as t } from "./webDev-101csg6Q.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";
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-DoTClnSk.js";
2
+ import { r as e } from "./commands-CbQcuWsE.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 { hn as e } from "./dev-D4l_YOzI.js";
2
- import { $ as t, A as n, F as r, I as i, L as a, Q as o, a as s, b as c, d as l, et as u, f as d, ht as f, k as p, rt as m, s as h, v as g, vt as _, y as v } from "./webDev-Dk8lFUzf.js";
1
+ import { hn as e } from "./dev-B2rZfqxw.js";
2
+ import { $ as t, A as n, F as r, I as i, L as a, Q as o, a as s, b as c, d as l, et as u, f as d, ht as f, k as p, rt as m, s as h, v as g, vt as _, y as v } from "./webDev-101csg6Q.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-B_iH24qf.js";
5
+ import { i as x, o as S, s as C } from "./apiBuild-DF0f69Gf.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-DkjoJ30Q.js"), i = await r(e);
480
+ let { regenerateRpcGroup: r } = await import("./codegenCommand-LjxfK4Am.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-DuqBJC7g.js"), n = await t(e);
492
+ let { loadApiConfig: t } = await import("./dev-D0E5x2Ue.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-RM5W5YXk.js");
495
+ let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-B7NgSMhX.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-COQqHB9V.js");
714
+ let { runSdkBuildCommand: e } = await import("./sdkgen-DbTFGCjg.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-DWL2_PPR.js";
1
+ import { n as e, r as t, t as n } from "./checkCommand-DDxwJCja.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 { x as u } from "./doctorCommand-TmZTAepc.js";
7
+ import { x as u } from "./doctorCommand-Ct_3BHgd.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-DuqBJC7g.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 = [
144
+ let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-D0E5x2Ue.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)),
@@ -1,5 +1,5 @@
1
- import { l as e, z as t } from "./dev-D4l_YOzI.js";
2
- import { dt as n } from "./webDev-Dk8lFUzf.js";
1
+ import { l as e, z as t } from "./dev-B2rZfqxw.js";
2
+ import { dt as n } from "./webDev-101csg6Q.js";
3
3
  import { r } from "./codegen-CbpGCWLG.js";
4
4
  import { basename as i, join as a, relative as o, resolve as s } from "node:path";
5
5
  import { promises as c } from "node:fs";
@@ -1976,7 +1976,7 @@ var b = (e, t, n) => {
1976
1976
  "every row, with a design note arguing that ordering could come from",
1977
1977
  "`changedAt`. It could not: `changedAt` is millisecond-resolution, so two",
1978
1978
  "writes to one row inside one transaction tie routinely — and `rowAsOf` /",
1979
- "`diffVersions` read the NUMBER, not the timestamp. A consumer found it in a",
1979
+ "`diffVersions` read the NUMBER, not the timestamp. A deployment found it in a",
1980
1980
  "day. If your recorder has a per-key sequence, read it with `maxOf`:",
1981
1981
  "",
1982
1982
  " const prior = await maxOf('my_trail', 'seq', { ref: rowId })",
@@ -2296,7 +2296,7 @@ var b = (e, t, n) => {
2296
2296
  "a query's `source:` declaration. A `source` is a STRING matched BY NAME",
2297
2297
  "against change events, so one naming a table that no longer exists matches",
2298
2298
  "nothing — the query returns its first result and never updates again. No",
2299
- "error, no type error, nothing in the log. A consumer met exactly this: their",
2299
+ "error, no type error, nothing in the log. A deployment met exactly this: their",
2300
2300
  "live agent typewriter stopped updating and the reply only arrived on reload.",
2301
2301
  "",
2302
2302
  "The boot now reports an unresolvable `source` by name, with the table it",
@@ -5110,7 +5110,7 @@ var b = (e, t, n) => {
5110
5110
  "now fails with a ParseError naming the field. Before this release the",
5111
5111
  "field was DISCARDED and the call ran with what was left.",
5112
5112
  "",
5113
- "The measurement that caused it — a consumer's root layout:",
5113
+ "The measurement that caused it — a deployment's root layout:",
5114
5114
  "",
5115
5115
  " query?.('userSettings.list', { employeeId })",
5116
5116
  "",
@@ -5421,7 +5421,7 @@ var b = (e, t, n) => {
5421
5421
  "",
5422
5422
  "A user whose tab outlived their IdP token was told they lacked a scope.",
5423
5423
  "True — an anonymous caller holds none — and it sends whoever reads it into",
5424
- "the permissions system while the problem is an expired session. A consumer",
5424
+ "the permissions system while the problem is an expired session. A deployment",
5425
5425
  "spent a round there; the subject was their own administrator, and the same",
5426
5426
  "call with a fresh token worked.",
5427
5427
  "",
@@ -5603,6 +5603,21 @@ var b = (e, t, n) => {
5603
5603
  "Non-page requests (assets, unknown paths) are NOT matched unless you ask with",
5604
5604
  "`assets: true`. There is no render there, so only `setCookies` takes effect."
5605
5605
  ].join("\n")
5606
+ }),
5607
+ S({
5608
+ version: "0.43.0",
5609
+ id: "0.43.0/01_dangling-reference-to-rows-refused",
5610
+ title: "`DanglingReferenceError` → `RowsRefusedError` (named for the outcome, not a guessed cause)",
5611
+ kind: "transform",
5612
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue().startsWith("@voltro/data-transfer") && e.getNamedImports().some((e) => e.getName() === "DanglingReferenceError"))),
5613
+ transform: ({ project: e, helpers: t, log: n }) => {
5614
+ let r = t.renameImport(e, {
5615
+ module: "@voltro/data-transfer",
5616
+ from: "DanglingReferenceError",
5617
+ to: "RowsRefusedError"
5618
+ });
5619
+ return r > 0 && n(`renamed ${r} import(s) of DanglingReferenceError → RowsRefusedError. A tag STRING (Effect.catchTag('DanglingReferenceError', …) or err._tag === '…') is NOT rewritten — change it to 'RowsRefusedError'. The payload also gained primaryCount, and each row a boolean derived.`), r;
5620
+ }
5606
5621
  })
5607
5622
  ], Y = /* @__PURE__ */ new Set([
5608
5623
  "node_modules",
@@ -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-DuqBJC7g.js").then((t) => t.runDev(e)),
94
+ run: (e) => import("./dev-D0E5x2Ue.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-Bro7Jwts.js").then((t) => t.runDashboardCommand(e)),
112
+ run: (e) => import("./dashboardCommand-CAHjCe_9.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-B2RWrpWi.js").then((t) => t.runCheckCommand(e)),
124
+ run: (e) => import("./checkCommand-DBpTSK8d.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-D7ZpH7w0.js").then((t) => t.runWebhooksCommand(e)),
158
+ run: (e) => import("./webhooksCommand-BXUP5YjW.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-CghRPrGO.js").then((t) => t.runEvolveCommand(e)),
174
+ run: (e) => import("./evolveCommand-D5opB48I.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-DkjoJ30Q.js").then((t) => t.runCodegenCommand(e)),
191
+ run: (e) => import("./codegenCommand-LjxfK4Am.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"]],
@@ -259,7 +259,7 @@ var c = () => {
259
259
  name: "info",
260
260
  summary: "Report versions (CLI, node, every installed @voltro/* — flags lockstep skew), package manager, and dialect. --json for CI. Exits 1 on version skew.",
261
261
  status: "wired",
262
- run: (e) => import("./infoCommand-BCs_ZFnl.js").then((t) => t.runInfoCommand(e)),
262
+ run: (e) => import("./infoCommand-Bs_8RU22.js").then((t) => t.runInfoCommand(e)),
263
263
  help: {
264
264
  usage: "[--json]",
265
265
  flags: [["--json", "machine-readable report"]],
@@ -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-DQ_URZq9.js").then((t) => t.runEnvCommand(e)),
283
+ run: (e) => import("./envCommand-7qjlQgLD.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-Bw3V4L1j.js");
312
+ let { runServePreflight: e } = await import("./doctorCommand-CdsctSwg.js");
313
313
  return e(a(t), !0);
314
314
  }
315
- let { tryRunWebServe: n } = await import("./webDev-D6QeXw3P.js"), r = await n(a(t));
315
+ let { tryRunWebServe: n } = await import("./webDev-BLKBO34K.js"), r = await n(a(t));
316
316
  if (!r.ran) {
317
- let { runServeDispatch: t } = await import("./serveCommand-gj7MsqXY.js");
317
+ let { runServeDispatch: t } = await import("./serveCommand-CGNTXafv.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-Bw3V4L1j.js").then((t) => t.runDoctorCommand(e))
345
+ run: (e) => import("./doctorCommand-CdsctSwg.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-DUdi6F_Q.js").then((t) => t.runBuildCommand(e)),
351
+ run: (e) => import("./build-LC_IJaHL.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-jFKvOPBz.js").then((t) => t.runPruneRuntimeCommand(e)),
367
+ run: (e) => import("./runtimeTrace-Wmi7V-wN.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-CUKhRmGG.js").then((t) => t.runDormancyCommand(e)),
385
+ run: (e) => import("./dormancyCommand-D1DKnYce.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: [
@@ -399,7 +399,7 @@ var c = () => {
399
399
  name: "start",
400
400
  summary: "Production runtime: serves dist + SSR-on-demand for ssr/isr pages.",
401
401
  status: "wired",
402
- run: (e) => import("./start-fifc0xpW.js").then((t) => t.runStartCommand(e)),
402
+ run: (e) => import("./start-BAlGcjF5.js").then((t) => t.runStartCommand(e)),
403
403
  help: {
404
404
  usage: "[app]",
405
405
  examples: [["voltro start", "serve a built web app (dist + SSR-on-demand)"]],
@@ -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-Rj57y1vg.js").then((t) => t.runDataCommand(e)),
472
+ run: (e) => import("./dataCommand-CrqvbVOv.js").then((t) => t.runDataCommand(e)),
473
473
  help: {
474
474
  usage: "<export|import|backup|restore> <dir> [options]",
475
475
  flags: [
@@ -524,20 +524,20 @@ var c = () => {
524
524
  handlesHelp: !0,
525
525
  summary: "Upgrade the app to the latest framework: bump every @voltro/* dependency (across ALL workspace members, install once at the workspace root), then run the codemods shipped with the target version. Flags: --to <version>, --from <version>, --codemods-only, --dry-run, --force, --exact, --help. After: run `voltro db apply`.",
526
526
  status: "wired",
527
- run: (e) => import("./updateCommand-B2alql9k.js").then((t) => t.runUpdateCommand(e))
527
+ run: (e) => import("./updateCommand-BvkKlV7D.js").then((t) => t.runUpdateCommand(e))
528
528
  },
529
529
  {
530
530
  name: "_apply-codemods",
531
531
  summary: "Internal: apply shipped codemods for a framework version jump (re-exec target of `voltro update`).",
532
532
  status: "wired",
533
533
  hidden: !0,
534
- run: (e) => import("./updateCommand-B2alql9k.js").then((t) => t.runApplyCodemods(e))
534
+ run: (e) => import("./updateCommand-BvkKlV7D.js").then((t) => t.runApplyCodemods(e))
535
535
  },
536
536
  {
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-Db-iQM3l.js").then((t) => t.runEmbeddingsCommand(e)),
540
+ run: (e) => import("./embeddingsCommand-1sZRBKlM.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: [
@@ -1,6 +1,6 @@
1
- import { d as e } from "./dev-D4l_YOzI.js";
2
- import { H as t, z as n } from "./webDev-Dk8lFUzf.js";
3
- import { t as r } from "./start-BjcuFME_.js";
1
+ import { d as e } from "./dev-B2rZfqxw.js";
2
+ import { H as t, z as n } from "./webDev-101csg6Q.js";
3
+ import { t as r } from "./start-Ds3xyn8R.js";
4
4
  import { join as i } from "node:path";
5
5
  import { existsSync as a } from "node:fs";
6
6
  import { createLogger as o } from "@voltro/logger";