@voltro/cli 0.50.1 → 0.52.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 (170) hide show
  1. package/CHANGELOG.md +231 -0
  2. package/dist/{agentsMd-D6yD7IQv.js → agentsMd-0l980yhL.js} +4 -1
  3. package/dist/agentsMd-SDDSkyl4.js +2 -0
  4. package/dist/apiBuild-BYBpL7Pz.js +2 -0
  5. package/dist/{apiBuild-D3s7lx57.js → apiBuild-CSFI8QGq.js} +3 -3
  6. package/dist/appGraph-CFmFKHb2.js +2 -0
  7. package/dist/appGraph-yRuKjOba.js +111 -0
  8. package/dist/bin.js +1 -1
  9. package/dist/build-CPgcMQug.js +793 -0
  10. package/dist/checkCommand-2SbqzukH.js +2 -0
  11. package/dist/{checkCommand-DsKIjL6k.js → checkCommand-COmqc2cB.js} +107 -60
  12. package/dist/{cloudCmd-F4YJeqM3.js → cloudCmd-QUXh-b5w.js} +1 -1
  13. package/dist/codegen-CctkDO-1.js +2 -0
  14. package/dist/{codegen-CrMXs4hb.js → codegen-VF479Cnb.js} +1 -1
  15. package/dist/{codegenCommand-C0S27nbB.js → codegenCommand-DCdG2JN-.js} +12 -12
  16. package/dist/{codemodRunner-DwY8Rjbl.js → codemodRunner-r7J9lIa7.js} +771 -636
  17. package/dist/{commands-Brp4DI8u.js → commands-Cc_nV8WI.js} +37 -36
  18. package/dist/{dashboardCommand-bbLfc9FW.js → dashboardCommand-C-gKvwqh.js} +3 -3
  19. package/dist/{dataCommand-k9mXTXin.js → dataCommand-BgpBHnlB.js} +299 -253
  20. package/dist/dbCommand-DNb6yeOG.js +2 -0
  21. package/dist/{dbCommand-Bf7Cy0mn.js → dbCommand-sHedr-NJ.js} +3 -3
  22. package/dist/dev--A3nsxA3.js +3 -0
  23. package/dist/{dev-C0cbqysu.js → dev-CRHoCEiy.js} +2258 -2219
  24. package/dist/doctorCommand-CqoWA2p5.js +2 -0
  25. package/dist/{doctorCommand-DyViaaCP.js → doctorCommand-DtfJ3FA6.js} +314 -234
  26. package/dist/{dormancyCommand-DMZPA_HW.js → dormancyCommand-Drn7o0No.js} +1 -1
  27. package/dist/{embeddingsCommand-CMxRPkg6.js → embeddingsCommand-Z-jO1fWN.js} +1 -1
  28. package/dist/{envCommand-CDLr-yD4.js → envCommand-D4gCrrTZ.js} +15 -15
  29. package/dist/{evolveCommand-Ct4NesL3.js → evolveCommand-CMROeKeA.js} +2 -2
  30. package/dist/fileConventions-DOqD3lPS.js +34 -0
  31. package/dist/{fileTaxonomy-CJfgOllU.js → fileTaxonomy-DvDUV9wq.js} +1 -1
  32. package/dist/frameworkTableAssembly-C6ETawPR.js +2 -0
  33. package/dist/{frameworkTableAssembly-BwJVEKLr.js → frameworkTableAssembly-w-XnLa3q.js} +1 -1
  34. package/dist/{generateCommand-BDdOxhnv.js → generateCommand-DTNPGjxo.js} +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/{infoCommand-orsKJKUy.js → infoCommand-DXM868o_.js} +1 -1
  37. package/dist/inspectMetrics-CGF94puw.js +143 -0
  38. package/dist/{metaCommands-CfRLra0s.js → metaCommands-C6RFmF1r.js} +2 -2
  39. package/dist/{migrate-D3MK9BpK.js → migrate-D0F-eTlK.js} +2 -2
  40. package/dist/{pageConvention-cEiRxdab.js → pageConvention-CzUiSbtU.js} +1 -1
  41. package/dist/{privacyCommand-XejDMvmu.js → privacyCommand-DGdopOI6.js} +1 -1
  42. package/dist/{projectScaffold-mIX_DpSe.js → projectScaffold-B4dmTlwT.js} +1 -1
  43. package/dist/{projectScaffold-BIl97_E6.js → projectScaffold-EzlErR4E.js} +1 -1
  44. package/dist/{renderModeScan-D7J1B7Kw.js → renderModeScan-CcH2X1_D.js} +25 -10
  45. package/dist/{renderProfile-1OWWAAtx.js → renderProfile-Ck32Fzxr.js} +2 -2
  46. package/dist/{runtimeTrace-Bo8jWsNe.js → runtimeTrace-BPQyCmC5.js} +1 -1
  47. package/dist/{sdkgen-OZhiT2vz.js → sdkgen-Se88ifTd.js} +1 -1
  48. package/dist/serveCommand-DLc-BznW.js +2 -0
  49. package/dist/{serveCommand-YbD5VgfV.js → serveCommand-DkP3OT0W.js} +885 -868
  50. package/dist/serveEntry.js +1 -1
  51. package/dist/start-DfL3fOiN.js +3 -0
  52. package/dist/start-jw89Xbqy.js +1339 -0
  53. package/dist/startEntry.js +1 -1
  54. package/dist/{staticCommand-Dr2M6tpU.js → staticCommand-BwNEDlSU.js} +1 -1
  55. package/dist/{test-rXFq4S76.js → test-f3amja6a.js} +1 -1
  56. package/dist/updateCommand-5gFVfK5q.js +2 -0
  57. package/dist/{updateCommand-BgH6vTtq.js → updateCommand-BMk2e4ky.js} +1 -1
  58. package/dist/{webDev-BbdkzMbd.js → webDev-BgWL9gKV.js} +1233 -853
  59. package/dist/webDev-CZbTsDcH.js +2 -0
  60. package/dist/{webhooksCommand-DjE6u0r4.js → webhooksCommand-CoIO3jbj.js} +1 -1
  61. package/package.json +48 -17
  62. package/templates/AGENTS.core.md +26 -5
  63. package/templates/AGENTS.md +30 -9
  64. package/templates/agent-docs/_index.md +4 -4
  65. package/templates/agent-docs/_manifest.json +11 -11
  66. package/templates/agent-docs/cli.md +125 -14
  67. package/templates/agent-docs/data.md +210 -7
  68. package/templates/agent-docs/database/schema.md +1 -1
  69. package/templates/agent-docs/database/seedsdialects.md +1 -1
  70. package/templates/agent-docs/deployment.md +22 -3
  71. package/templates/agent-docs/internationalization.md +131 -13
  72. package/templates/agent-docs/introduction.md +46 -0
  73. package/templates/agent-docs/local-first-mobile.md +34 -7
  74. package/templates/agent-docs/plugins/ai-flows.md +1 -1
  75. package/templates/agent-docs/plugins/audit.md +5 -5
  76. package/templates/agent-docs/plugins/cdc-out.md +2 -2
  77. package/templates/agent-docs/plugins/{versioning.md → row-history.md} +22 -22
  78. package/templates/agent-docs/plugins/storage.md +2 -2
  79. package/templates/agent-docs/plugins.md +29 -7
  80. package/templates/agent-docs/reference.md +39 -2
  81. package/templates/agent-docs/routing.md +341 -47
  82. package/templates/agent-docs/schema-driven-ui.md +78 -2
  83. package/templates/agent-docs/security.md +125 -8
  84. package/templates/agent-docs/templates/apibackends.md +14 -14
  85. package/templates/agent-docs/templates/overview.md +1 -1
  86. package/templates/agent-docs/whats-new.md +100 -29
  87. package/templates/apps/api-ai/package.json +6 -7
  88. package/templates/apps/api-ai/tests/summarize.test.ts +1 -1
  89. package/templates/apps/api-auth/package.json +8 -8
  90. package/templates/apps/api-backend/package.json +7 -7
  91. package/templates/apps/api-backend-deactivation/package.json +7 -7
  92. package/templates/apps/api-backend-mail/package.json +8 -8
  93. package/templates/apps/api-backend-mariadb/package.json +9 -9
  94. package/templates/apps/api-backend-sqlite/package.json +8 -8
  95. package/templates/apps/api-backend-storage/package.json +8 -8
  96. package/templates/apps/api-cms/package.json +9 -10
  97. package/templates/apps/api-collab/package.json +8 -8
  98. package/templates/apps/api-data-advanced/package.json +8 -8
  99. package/templates/apps/api-durable/package.json +8 -8
  100. package/templates/apps/api-feature-flags/package.json +9 -9
  101. package/templates/apps/api-governance/package.json +8 -8
  102. package/templates/apps/api-kv/package.json +8 -8
  103. package/templates/apps/api-moderation/package.json +8 -8
  104. package/templates/apps/api-observability/package.json +8 -8
  105. package/templates/apps/api-ratelimit/package.json +8 -8
  106. package/templates/apps/api-rbac/package.json +8 -8
  107. package/templates/apps/api-rest/package.json +7 -7
  108. package/templates/apps/{api-versioning → api-row-history}/README.md +3 -3
  109. package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.server.ts +1 -1
  110. package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.server.ts +1 -1
  111. package/templates/apps/{api-versioning → api-row-history}/app.config.ts +3 -3
  112. package/templates/apps/{api-versioning → api-row-history}/database/schema.ts +1 -1
  113. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.server.ts +1 -1
  114. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.ts +1 -1
  115. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.ts +1 -1
  116. package/templates/apps/{api-versioning → api-row-history}/package.json +8 -8
  117. package/templates/apps/api-row-history/template.json +6 -0
  118. package/templates/apps/{api-versioning → api-row-history}/tests/documents.create.test.ts +1 -1
  119. package/templates/apps/api-saas/app.config.ts +1 -0
  120. package/templates/apps/api-saas/package.json +10 -11
  121. package/templates/apps/api-saas-starter/package.json +10 -10
  122. package/templates/apps/api-search/package.json +8 -8
  123. package/templates/apps/api-status/package.json +8 -8
  124. package/templates/apps/api-webhooks/package.json +9 -9
  125. package/templates/apps/changelog/package.json +6 -6
  126. package/templates/apps/edge-functions/package.json +2 -2
  127. package/templates/apps/frontend-admin/package.json +8 -8
  128. package/templates/apps/frontend-app/package.json +9 -9
  129. package/templates/apps/frontend-auth/package.json +8 -8
  130. package/templates/apps/frontend-blank/package.json +7 -7
  131. package/templates/apps/frontend-cms/package.json +9 -9
  132. package/templates/apps/frontend-collab/package.json +10 -10
  133. package/templates/apps/frontend-collab/src/pages/page.test.tsx +10 -9
  134. package/templates/apps/frontend-collab/src/pages/page.tsx +42 -65
  135. package/templates/apps/frontend-contact/package.json +7 -7
  136. package/templates/apps/frontend-dashboard/package.json +7 -7
  137. package/templates/apps/frontend-docs/package.json +6 -7
  138. package/templates/apps/frontend-i18n/package.json +6 -6
  139. package/templates/apps/frontend-landing/package.json +6 -7
  140. package/templates/apps/frontend-portal/package.json +8 -8
  141. package/templates/apps/frontend-saas/package.json +8 -8
  142. package/templates/apps/frontend-spa/package.json +7 -7
  143. package/templates/apps/frontend-ssr/package.json +7 -7
  144. package/templates/apps/frontend-ssr-api/package.json +8 -8
  145. package/templates/apps/frontend-static-blog/package.json +6 -6
  146. package/templates/apps/frontend-status/package.json +8 -8
  147. package/templates/apps/mobile-app/package.json +4 -4
  148. package/dist/agentsMd-Bu_XQgVf.js +0 -2
  149. package/dist/apiBuild-BZ-plaQN.js +0 -2
  150. package/dist/appGraph-CM9wvUmD.js +0 -2
  151. package/dist/appGraph-Cv2W_wO5.js +0 -111
  152. package/dist/build-CFmqF39c.js +0 -721
  153. package/dist/checkCommand-DomvYDi1.js +0 -2
  154. package/dist/codegen-DiMn2KkZ.js +0 -2
  155. package/dist/dbCommand-Bnl7MSGC.js +0 -2
  156. package/dist/dev-Dz9GqA6P.js +0 -3
  157. package/dist/doctorCommand-BlciWUJb.js +0 -2
  158. package/dist/fileConventions-Cof68_BL.js +0 -33
  159. package/dist/frameworkTableAssembly-CVDB2hCq.js +0 -2
  160. package/dist/inspectMetrics-CfdKLh6t.js +0 -72
  161. package/dist/serveCommand-Bbgg7Paq.js +0 -2
  162. package/dist/start-7b_bL8Uc.js +0 -3
  163. package/dist/start-B1nH9ahf.js +0 -1150
  164. package/dist/updateCommand-BweY17z-.js +0 -2
  165. package/dist/webDev-BcRFTsMA.js +0 -2
  166. package/templates/apps/api-versioning/template.json +0 -6
  167. /package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.ts +0 -0
  168. /package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.ts +0 -0
  169. /package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.server.ts +0 -0
  170. /package/templates/apps/{api-versioning → api-row-history}/tsconfig.json +0 -0
@@ -1,14 +1,14 @@
1
- import { E as e, N as t, O as n, T as r, d as i, f as a, h as o, i as s, l as c, r as l, u } from "./fileConventions-Cof68_BL.js";
2
- import { t as d } from "./pageConvention-cEiRxdab.js";
1
+ import { E as e, O as t, P as n, T as r, d as i, f as a, h as o, i as s, l as c, r as l, u } from "./fileConventions-DOqD3lPS.js";
2
+ import { t as d } from "./pageConvention-CzUiSbtU.js";
3
3
  import { r as f } from "./tsconfigPaths-BWXBWgcl.js";
4
- import { a as p, i as m, t as h } from "./fileTaxonomy-CJfgOllU.js";
4
+ import { a as p, i as m, t as h } from "./fileTaxonomy-DvDUV9wq.js";
5
5
  import { basename as g, dirname as _, join as v, relative as ee } from "node:path";
6
- import { existsSync as y, readFileSync as b, statSync as te } from "node:fs";
7
- import { execFileSync as ne } from "node:child_process";
8
- import { Node as x, Project as re, QuoteKind as ie, SyntaxKind as S } from "ts-morph";
9
- import { globSync as ae } from "tinyglobby";
6
+ import { existsSync as y, readFileSync as te, statSync as ne } from "node:fs";
7
+ import { execFileSync as re } from "node:child_process";
8
+ import { Node as b, Project as ie, QuoteKind as ae, SyntaxKind as x } from "ts-morph";
9
+ import { globSync as oe } from "tinyglobby";
10
10
  //#region src/codemodHelpers.ts
11
- var C = (e, t, n) => {
11
+ var S = (e, t, n) => {
12
12
  let r = [];
13
13
  for (let i of e.getImportDeclarations()) if (i.getModuleSpecifierValue() === t) for (let e of i.getNamedImports()) {
14
14
  if (e.getName() !== n) continue;
@@ -16,70 +16,70 @@ var C = (e, t, n) => {
16
16
  r.push(t ? t.getText() : e.getName());
17
17
  }
18
18
  return r;
19
- }, w = (e, t) => {
19
+ }, C = (e, t) => {
20
20
  let n = e.getExpression();
21
- return x.isIdentifier(n) && t.includes(n.getText());
22
- }, oe = (e, { module: t, from: n, to: r }) => {
21
+ return b.isIdentifier(n) && t.includes(n.getText());
22
+ }, se = (e, { module: t, from: n, to: r }) => {
23
23
  let i = 0;
24
24
  for (let a of e.getSourceFiles()) for (let e of a.getImportDeclarations()) if (e.getModuleSpecifierValue() === t) for (let t of e.getNamedImports()) {
25
25
  if (t.getName() !== n) continue;
26
26
  let e = t.getNameNode();
27
- !t.getAliasNode() && x.isIdentifier(e) ? e.rename(r) : e.replaceWithText(r), i++;
27
+ !t.getAliasNode() && b.isIdentifier(e) ? e.rename(r) : e.replaceWithText(r), i++;
28
28
  }
29
29
  return i;
30
- }, se = (e, { from: t, to: n }) => {
30
+ }, ce = (e, { from: t, to: n }) => {
31
31
  let r = 0;
32
32
  for (let i of e.getSourceFiles()) {
33
33
  for (let e of i.getImportDeclarations()) e.getModuleSpecifierValue() === t && (e.setModuleSpecifier(n), r++);
34
34
  for (let e of i.getExportDeclarations()) e.getModuleSpecifierValue() === t && (e.setModuleSpecifier(n), r++);
35
- for (let e of i.getDescendantsOfKind(S.CallExpression)) {
36
- if (e.getExpression().getKind() !== S.ImportKeyword) continue;
35
+ for (let e of i.getDescendantsOfKind(x.CallExpression)) {
36
+ if (e.getExpression().getKind() !== x.ImportKeyword) continue;
37
37
  let i = e.getArguments()[0];
38
- i && x.isStringLiteral(i) && i.getLiteralValue() === t && (i.replaceWithText(JSON.stringify(n)), r++);
38
+ i && b.isStringLiteral(i) && i.getLiteralValue() === t && (i.replaceWithText(JSON.stringify(n)), r++);
39
39
  }
40
40
  }
41
41
  return r;
42
- }, ce = (e, { component: t, from: n, to: r }) => {
42
+ }, le = (e, { component: t, from: n, to: r }) => {
43
43
  let i = 0;
44
44
  for (let a of e.getSourceFiles()) {
45
- let e = [...a.getDescendantsOfKind(S.JsxOpeningElement), ...a.getDescendantsOfKind(S.JsxSelfClosingElement)];
46
- for (let a of e) if (a.getTagNameNode().getText() === t) for (let e of a.getAttributes()) x.isJsxAttribute(e) && e.getNameNode().getText() === n && (e.getNameNode().replaceWithText(r), i++);
45
+ let e = [...a.getDescendantsOfKind(x.JsxOpeningElement), ...a.getDescendantsOfKind(x.JsxSelfClosingElement)];
46
+ for (let a of e) if (a.getTagNameNode().getText() === t) for (let e of a.getAttributes()) b.isJsxAttribute(e) && e.getNameNode().getText() === n && (e.getNameNode().replaceWithText(r), i++);
47
47
  }
48
48
  return i;
49
- }, le = (e, { inCallTo: t, module: n, from: r, to: i }) => {
49
+ }, ue = (e, { inCallTo: t, module: n, from: r, to: i }) => {
50
50
  let a = 0;
51
51
  for (let o of e.getSourceFiles()) {
52
- let e = C(o, n, t);
53
- if (e.length !== 0) for (let t of o.getDescendantsOfKind(S.CallExpression).reverse()) {
54
- if (!w(t, e)) continue;
52
+ let e = S(o, n, t);
53
+ if (e.length !== 0) for (let t of o.getDescendantsOfKind(x.CallExpression).reverse()) {
54
+ if (!C(t, e)) continue;
55
55
  let n = t.getArguments()[0];
56
- if (!(!n || !x.isObjectLiteralExpression(n))) for (let e of n.getProperties()) {
57
- if (!x.isPropertyAssignment(e) && !x.isShorthandPropertyAssignment(e)) continue;
56
+ if (!(!n || !b.isObjectLiteralExpression(n))) for (let e of n.getProperties()) {
57
+ if (!b.isPropertyAssignment(e) && !b.isShorthandPropertyAssignment(e)) continue;
58
58
  let t = e.getNameNode();
59
- t.getText() === r && (x.isShorthandPropertyAssignment(e) ? e.replaceWithText(`${i}: ${r}`) : t.replaceWithText(i), a++);
59
+ t.getText() === r && (b.isShorthandPropertyAssignment(e) ? e.replaceWithText(`${i}: ${r}`) : t.replaceWithText(i), a++);
60
60
  }
61
61
  }
62
62
  }
63
63
  return a;
64
- }, ue = (e, { module: t, name: n }) => {
64
+ }, de = (e, { module: t, name: n }) => {
65
65
  let r = 0;
66
66
  for (let i of e.getSourceFiles()) {
67
67
  let e = i.getImportDeclaration((e) => e.getModuleSpecifierValue() === t);
68
68
  e && (e.getNamedImports().some((e) => e.getName() === n) || (e.addNamedImport(n), r++));
69
69
  }
70
70
  return r;
71
- }, de = (e, t, n) => {
71
+ }, fe = (e, t, n) => {
72
72
  let r = e.getImportDeclaration((e) => e.getModuleSpecifierValue() === t);
73
73
  r ? r.getNamedImports().some((e) => e.getName() === n) || r.addNamedImport(n) : e.addImportDeclaration({
74
74
  moduleSpecifier: t,
75
75
  namedImports: [n]
76
76
  });
77
- }, fe = {
78
- renameImport: oe,
79
- renameModuleSpecifier: se,
80
- renameJsxProp: ce,
81
- renameObjectKey: le,
82
- addImport: ue,
77
+ }, pe = {
78
+ renameImport: se,
79
+ renameModuleSpecifier: ce,
80
+ renameJsxProp: le,
81
+ renameObjectKey: ue,
82
+ addImport: de,
83
83
  removeImport: (e, { module: t, name: n }) => {
84
84
  let r = 0;
85
85
  for (let i of e.getSourceFiles()) for (let e of i.getImportDeclarations()) {
@@ -92,9 +92,9 @@ var C = (e, t, n) => {
92
92
  changeCallArgs: (e, { module: t, callee: n, reorder: r, drop: i, toObject: a }) => {
93
93
  let o = 0;
94
94
  for (let s of e.getSourceFiles()) {
95
- let e = C(s, t, n);
96
- if (e.length !== 0) for (let t of s.getDescendantsOfKind(S.CallExpression).reverse()) {
97
- if (!w(t, e)) continue;
95
+ let e = S(s, t, n);
96
+ if (e.length !== 0) for (let t of s.getDescendantsOfKind(x.CallExpression).reverse()) {
97
+ if (!C(t, e)) continue;
98
98
  let n = t.getArguments().map((e) => e.getText());
99
99
  if (r && (n = r.map((e) => n[e]).filter((e) => e !== void 0)), i) {
100
100
  let e = new Set(i);
@@ -113,31 +113,31 @@ var C = (e, t, n) => {
113
113
  wrapCall: (e, { module: t, callee: n, wrapper: r, wrapperModule: i }) => {
114
114
  let a = 0;
115
115
  for (let o of e.getSourceFiles()) {
116
- let e = C(o, t, n);
116
+ let e = S(o, t, n);
117
117
  if (e.length === 0) continue;
118
118
  let s = !1;
119
- for (let t of o.getDescendantsOfKind(S.CallExpression).reverse()) w(t, e) && (t.replaceWithText(`${r}(${t.getText()})`), s = !0, a++);
120
- s && de(o, i, r);
119
+ for (let t of o.getDescendantsOfKind(x.CallExpression).reverse()) C(t, e) && (t.replaceWithText(`${r}(${t.getText()})`), s = !0, a++);
120
+ s && fe(o, i, r);
121
121
  }
122
122
  return a;
123
123
  },
124
124
  annotate: (e, { module: t, symbol: n, comment: r }) => {
125
125
  let i = 0;
126
126
  for (let a of e.getSourceFiles()) {
127
- let e = C(a, t, n);
127
+ let e = S(a, t, n);
128
128
  if (e.length === 0) continue;
129
129
  let o = /* @__PURE__ */ new Map();
130
- for (let t of a.getDescendantsOfKind(S.Identifier)) {
130
+ for (let t of a.getDescendantsOfKind(x.Identifier)) {
131
131
  if (!e.includes(t.getText())) continue;
132
- let n = t.getFirstAncestorByKind(S.ExpressionStatement) ?? t.getFirstAncestorByKind(S.VariableStatement) ?? t.getFirstAncestorByKind(S.ReturnStatement);
132
+ let n = t.getFirstAncestorByKind(x.ExpressionStatement) ?? t.getFirstAncestorByKind(x.VariableStatement) ?? t.getFirstAncestorByKind(x.ReturnStatement);
133
133
  n && o.set(n.getStart(), n);
134
134
  }
135
135
  for (let e of [...o.values()].sort((e, t) => t.getStart() - e.getStart())) e.replaceWithText(`// TODO(voltro-migration): ${r}\n${e.getText()}`), i++;
136
136
  }
137
137
  return i;
138
138
  }
139
- }, pe = /^\d+\.\d+\.\d+$/, T = (e) => {
140
- if (!pe.test(e.version)) throw Error(`codemod "${e.id}": version must be x.y.z (got "${e.version}")`);
139
+ }, me = /^\d+\.\d+\.\d+$/, w = (e) => {
140
+ if (!me.test(e.version)) throw Error(`codemod "${e.id}": version must be x.y.z (got "${e.version}")`);
141
141
  if (!e.id.startsWith(`${e.version}/`)) throw Error(`codemod "${e.id}": id must start with "${e.version}/" (the version it migrates to)`);
142
142
  if (e.kind === "transform" && typeof e.transform != "function") throw Error(`codemod "${e.id}": kind:'transform' requires a transform() function`);
143
143
  if (e.kind === "manual" && (e.note === void 0 || e.note.trim() === "")) throw Error(`codemod "${e.id}": kind:'manual' requires a non-empty note`);
@@ -148,14 +148,14 @@ var C = (e, t, n) => {
148
148
  __codemod: !0,
149
149
  seq: n
150
150
  };
151
- }, E = (e) => RegExp(`\\b${e}\\s*(?:<[^()]*>)?\\s*\\(`), me = (e, t) => {
151
+ }, T = (e) => RegExp(`\\b${e}\\s*(?:<[^()]*>)?\\s*\\(`), he = (e, t) => {
152
152
  let n = e.version.split(".").map(Number), r = t.version.split(".").map(Number);
153
153
  for (let e = 0; e < 3; e++) {
154
154
  let t = (n[e] ?? 0) - (r[e] ?? 0);
155
155
  if (t !== 0) return t;
156
156
  }
157
157
  return e.seq === t.seq ? e.id < t.id ? -1 : +(e.id > t.id) : e.seq - t.seq;
158
- }, he = T({
158
+ }, ge = w({
159
159
  version: "0.3.0",
160
160
  id: "0.3.0/01_prod-serve-requires-build",
161
161
  title: "Production `voltro serve` requires a precompiled bundle (build before serve)",
@@ -175,7 +175,7 @@ var C = (e, t, n) => {
175
175
  "",
176
176
  "`voltro dev` and a non-production local `voltro serve` are unchanged (still tsx)."
177
177
  ].join("\n")
178
- }), ge = T({
178
+ }), _e = w({
179
179
  version: "0.4.0",
180
180
  id: "0.4.0/01_rbac-forbidden-to-scopeerror",
181
181
  title: "@voltro/plugin-rbac: `Forbidden` → protocol `ScopeError` (one denial tag)",
@@ -201,36 +201,36 @@ var C = (e, t, n) => {
201
201
  let a = r + i;
202
202
  a > 0 && n(`rbac Forbidden → ScopeError: rewrote ${a} import site(s). Check any \`new Forbidden({ reason })\` (→ \`new ScopeError({ message })\`) and \`catchTag('Forbidden')\` / \`_tag === 'Forbidden'\` (→ 'ScopeError') by hand.`);
203
203
  }
204
- }), D = "@voltro/plugin-rbac/web", _e = "@voltro/client", ve = T({
204
+ }), E = "@voltro/plugin-rbac/web", ve = "@voltro/client", ye = w({
205
205
  version: "0.4.0",
206
206
  id: "0.4.0/02_rbac-web-to-client-permissions",
207
207
  title: "@voltro/plugin-rbac/web removed — the UI gate lives in @voltro/client",
208
208
  kind: "transform",
209
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === D)),
209
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === E)),
210
210
  transform: ({ project: e, helpers: t, log: n }) => {
211
211
  let r = t.annotate(e, {
212
- module: D,
212
+ module: E,
213
213
  symbol: "RbacScopeContext",
214
214
  comment: "voltro 0.4.0: RbacScopeContext is gone. Read scopes with `usePermissions()` from '@voltro/client' — it returns { scopes }, not the bare array."
215
215
  }), i = t.renameImport(e, {
216
- module: D,
216
+ module: E,
217
217
  from: "RbacScopeProvider",
218
218
  to: "PermissionProvider"
219
219
  }) + t.renameImport(e, {
220
- module: D,
220
+ module: E,
221
221
  from: "canFromScopes",
222
222
  to: "canCall"
223
223
  }) + t.renameImport(e, {
224
- module: D,
224
+ module: E,
225
225
  from: "canAnyFromScopes",
226
226
  to: "canCallAny"
227
227
  }), a = t.renameModuleSpecifier(e, {
228
- from: D,
229
- to: _e
228
+ from: E,
229
+ to: ve
230
230
  });
231
231
  a > 0 && n(`@voltro/plugin-rbac/web → @voltro/client: repointed ${a} import(s)` + (i > 0 ? `, renamed ${i} symbol(s)` : "") + ". Mount <PermissionProvider scopes={…}> where <RbacScopeProvider> was — same prop, and it now feeds useCan across the whole app." + (r > 0 ? ` ${r} RbacScopeContext site(s) were annotated: switch them to usePermissions().` : ""));
232
232
  }
233
- }), ye = T({
233
+ }), be = w({
234
234
  version: "0.5.0",
235
235
  id: "0.5.0/01_one-terminal-exactly-one",
236
236
  title: ".one() now fails on MORE than one row; NoRowFound is a declarable typed error",
@@ -263,7 +263,7 @@ var C = (e, t, n) => {
263
263
  " new OptimisticLockError({ table: 'notes', expected: 3 })",
264
264
  " • `instanceof` and `err._tag === 'NoRowFound'` checks are unaffected."
265
265
  ].join("\n")
266
- }), be = T({
266
+ }), xe = w({
267
267
  version: "0.5.0",
268
268
  id: "0.5.0/02_typed-store-rows",
269
269
  title: "store.query() now returns the row type — casts on row fields may stop compiling",
@@ -302,14 +302,14 @@ var C = (e, t, n) => {
302
302
  "A hand-built descriptor still resolves to `Row`, so untyped call sites are",
303
303
  "unaffected."
304
304
  ].join("\n")
305
- }), xe = /VOLTRO_DEV_SESSION_SECRET|voltro-dev-session-secret/, Se = /VOLTRO_SESSION_SECRET\s*(?:\?\?|\|\|)\s*['"`]/, Ce = T({
305
+ }), Se = /VOLTRO_DEV_SESSION_SECRET|voltro-dev-session-secret/, Ce = /VOLTRO_SESSION_SECRET\s*(?:\?\?|\|\|)\s*['"`]/, we = w({
306
306
  version: "0.6.0",
307
307
  id: "0.6.0/01_no-dev-session-secret",
308
308
  title: "The built-in dev session secret is removed; VOLTRO_SESSION_SECRET is required",
309
309
  kind: "manual",
310
310
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
311
311
  let t = e.getFullText();
312
- return xe.test(t) || Se.test(t);
312
+ return Se.test(t) || Ce.test(t);
313
313
  }),
314
314
  note: [
315
315
  "The framework no longer has a built-in fallback session secret.",
@@ -353,14 +353,14 @@ var C = (e, t, n) => {
353
353
  " voltro secret generate session",
354
354
  " `voltro dev` minting one for you locally does NOT cover your deployment."
355
355
  ].join("\n")
356
- }), we = /computeProration|roundHalfAwayFromZero|ProrationInput|ProrationResult|DunningState|DunningCycleResult|DunningSchedule|DEFAULT_DUNNING_SCHEDULE|validateDunningSchedule|retryTimeFor|openDunning|recoverDunning|advanceDunning|runDunningCycle|recordPaymentFailure|recordPaymentSuccess|dunningSchedule|DunningStore|memoryDunningStore|dataStoreDunningStore/, Te = T({
356
+ }), Te = /computeProration|roundHalfAwayFromZero|ProrationInput|ProrationResult|DunningState|DunningCycleResult|DunningSchedule|DEFAULT_DUNNING_SCHEDULE|validateDunningSchedule|retryTimeFor|openDunning|recoverDunning|advanceDunning|runDunningCycle|recordPaymentFailure|recordPaymentSuccess|dunningSchedule|DunningStore|memoryDunningStore|dataStoreDunningStore/, Ee = w({
357
357
  version: "0.6.0",
358
358
  id: "0.6.0/03_billing-on-stripe-sdk",
359
359
  title: "Billing moved onto the Stripe SDK; proration + dunning are now Stripe’s",
360
360
  kind: "manual",
361
361
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
362
362
  let t = e.getFullText();
363
- return we.test(t) || /@voltro\/plugin-billing/.test(t);
363
+ return Te.test(t) || /@voltro\/plugin-billing/.test(t);
364
364
  }),
365
365
  note: [
366
366
  "`@voltro/plugin-billing` now talks to Stripe through the official SDK, and two",
@@ -416,7 +416,7 @@ var C = (e, t, n) => {
416
416
  " Set a `priceId` on every paid plan. A subscription created in the Stripe",
417
417
  " Dashboard is now recognised via its price id, which requires the mapping."
418
418
  ].join("\n")
419
- }), Ee = T({
419
+ }), De = w({
420
420
  version: "0.6.0",
421
421
  id: "0.6.0/02_subscription-state-union",
422
422
  title: "SubscriptionState is a discriminated union — `loading` now narrows `data`",
@@ -463,7 +463,7 @@ var C = (e, t, n) => {
463
463
  "`error` set. If you branch only on `loading`, check `error` too, or that",
464
464
  "case renders a skeleton forever."
465
465
  ].join("\n")
466
- }), De = T({
466
+ }), Oe = w({
467
467
  version: "0.6.0",
468
468
  id: "0.6.0/04_relation-key-validation",
469
469
  title: "relation key options are validated at boot; `one` now fails on more than one match",
@@ -504,28 +504,28 @@ var C = (e, t, n) => {
504
504
  "read it now rather than waiting: `sourceKey` is almost always what a",
505
505
  "\"parent\" relation means."
506
506
  ].join("\n")
507
- }), Oe = "@voltro/plugin-atlassian", ke = "atlassianPlugin", Ae = (e) => {
507
+ }), ke = "@voltro/plugin-atlassian", Ae = "atlassianPlugin", D = (e) => {
508
508
  let t = [];
509
- for (let n of e.getImportDeclarations()) if (n.getModuleSpecifierValue() === Oe) for (let e of n.getNamedImports()) e.getName() === ke && t.push(e.getAliasNode()?.getText() ?? e.getName());
509
+ for (let n of e.getImportDeclarations()) if (n.getModuleSpecifierValue() === ke) for (let e of n.getNamedImports()) e.getName() === Ae && t.push(e.getAliasNode()?.getText() ?? e.getName());
510
510
  return t;
511
- }, je = T({
511
+ }, je = w({
512
512
  version: "0.6.0",
513
513
  id: "0.6.0/05_atlassian-avatar-mode",
514
514
  title: "atlassianPlugin's `avatar` config requires an explicit `mode: 'service' | 'perUser'`",
515
515
  kind: "transform",
516
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ae(e).length > 0),
516
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => D(e).length > 0),
517
517
  transform: ({ project: e, log: t }) => {
518
518
  let n = 0;
519
519
  for (let t of e.getSourceFiles()) {
520
- let e = Ae(t);
521
- if (e.length !== 0) for (let r of t.getDescendantsOfKind(S.CallExpression)) {
520
+ let e = D(t);
521
+ if (e.length !== 0) for (let r of t.getDescendantsOfKind(x.CallExpression)) {
522
522
  if (!e.includes(r.getExpression().getText())) continue;
523
523
  let t = r.getArguments()[0];
524
- if (!t || !x.isObjectLiteralExpression(t)) continue;
524
+ if (!t || !b.isObjectLiteralExpression(t)) continue;
525
525
  let i = t.getProperty("avatar");
526
- if (!i || !x.isPropertyAssignment(i)) continue;
526
+ if (!i || !b.isPropertyAssignment(i)) continue;
527
527
  let a = i.getInitializer();
528
- !a || !x.isObjectLiteralExpression(a) || a.getProperty("mode") || (a.insertPropertyAssignment(0, {
528
+ !a || !b.isObjectLiteralExpression(a) || a.getProperty("mode") || (a.insertPropertyAssignment(0, {
529
529
  name: "mode",
530
530
  initializer: "'service'"
531
531
  }), n++);
@@ -533,7 +533,7 @@ var C = (e, t, n) => {
533
533
  }
534
534
  n > 0 && (t(`atlassian avatar: added mode:'service' to ${n} config${n === 1 ? "" : "s"}`), t(" → to use the viewing user's own PAT instead, switch to mode:'perUser' and add resolveSubject"));
535
535
  }
536
- }), Me = T({
536
+ }), Me = w({
537
537
  version: "0.6.0",
538
538
  id: "0.6.0/06_ui-strings-connect-account",
539
539
  title: "UiStrings gained a required `connectAccount` section",
@@ -577,7 +577,7 @@ var C = (e, t, n) => {
577
577
  "Alternatively, switch the annotation to `PartialUiStrings` if the object",
578
578
  "was only ever an override bag."
579
579
  ].join("\n")
580
- }), Ne = E("setRowFilter"), Pe = /\bresolveRowFilterScope\b/, Fe = T({
580
+ }), Ne = T("setRowFilter"), Pe = /\bresolveRowFilterScope\b/, Fe = w({
581
581
  version: "0.7.0",
582
582
  id: "0.7.0/01_row-filter-load-failure",
583
583
  title: "A row filter that fails to load now errors instead of returning zero rows",
@@ -655,14 +655,14 @@ var C = (e, t, n) => {
655
655
  " \"every row you could see was just deleted\". Make sure your subscription",
656
656
  " error handling surfaces this rather than swallowing it."
657
657
  ].join("\n")
658
- }), Ie = T({
658
+ }), Ie = w({
659
659
  version: "0.7.0",
660
660
  id: "0.7.0/02_testing-invoke-effect-handlers",
661
661
  title: "@voltro/testing: invoke() runs Effect handlers; executor types widened",
662
662
  kind: "manual",
663
663
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
664
664
  let t = e.getFullText();
665
- return t.includes("@voltro/testing") ? E("invoke").test(t) || /\bProcedureExecutor\b/.test(t) : !1;
665
+ return t.includes("@voltro/testing") ? T("invoke").test(t) || /\bProcedureExecutor\b/.test(t) : !1;
666
666
  }),
667
667
  note: [
668
668
  "`invoke(descriptor, executor, input, ctx)` now DETECTS an Effect-returning",
@@ -710,7 +710,7 @@ var C = (e, t, n) => {
710
710
  "transaction, the deadlock replay, `afterCommit` and the plugin interceptor",
711
711
  "chain wrap an Effect handler exactly as they wrap an async one."
712
712
  ].join("\n")
713
- }), Le = /\bpasswordHash\b/, Re = /\b(UserStore|UserRecord|memoryUserStore|postgresUserStore)\b/, ze = T({
713
+ }), Le = /\bpasswordHash\b/, Re = /\b(UserStore|UserRecord|memoryUserStore|postgresUserStore)\b/, ze = w({
714
714
  version: "0.8.0",
715
715
  id: "0.8.0/01_optional-password-hash",
716
716
  title: "`UserRecord.passwordHash` is optional — password-less identities are now first-class",
@@ -788,7 +788,7 @@ var C = (e, t, n) => {
788
788
  " to match and make sure your read path maps a NULL column to `null`/",
789
789
  " `undefined` rather than to `''`-by-coercion."
790
790
  ].join("\n")
791
- }), Be = T({
791
+ }), Be = w({
792
792
  version: "0.8.0",
793
793
  id: "0.8.0/02_ssr-streams-and-loaderdata",
794
794
  title: "`ssr` pages stream; `useLoaderData<T>()` returns `LoaderData<T>`",
@@ -840,7 +840,7 @@ var C = (e, t, n) => {
840
840
  "docs. `defer()` requires `renderMode: 'ssr'` and `interactive: 'full'`;",
841
841
  "every other combination is a hard error naming the page."
842
842
  ].join("\n")
843
- }), Ve = /renderMode\s*[=:]\s*['"](spa|client)['"]/, He = /(^|[/\\])pages[/\\].*[/\\]?layout\.tsx$/, Ue = T({
843
+ }), Ve = /renderMode\s*[=:]\s*['"](spa|client)['"]/, He = /(^|[/\\])pages[/\\].*[/\\]?layout\.tsx$/, Ue = w({
844
844
  version: "0.9.0",
845
845
  id: "0.9.0/01_ssr-layout-shell-for-spa",
846
846
  title: "A `renderMode:'spa'` page under a layout now server-renders that layout",
@@ -887,22 +887,22 @@ var C = (e, t, n) => {
887
887
  ].join("\n")
888
888
  }), O = "client", k = "spa", A = (e) => {
889
889
  if (!e) return null;
890
- let t = x.isAsExpression(e) ? e.getExpression() : e;
891
- return x.isStringLiteral(t) ? t : null;
890
+ let t = b.isAsExpression(e) ? e.getExpression() : e;
891
+ return b.isStringLiteral(t) ? t : null;
892
892
  }, j = (e) => {
893
893
  let t = [];
894
- for (let n of e.getDescendantsOfKind(S.VariableDeclaration)) {
894
+ for (let n of e.getDescendantsOfKind(x.VariableDeclaration)) {
895
895
  if (n.getName() !== "renderMode") continue;
896
896
  let e = A(n.getInitializer());
897
897
  e && t.push(e);
898
898
  }
899
- for (let n of e.getDescendantsOfKind(S.PropertyAssignment)) {
899
+ for (let n of e.getDescendantsOfKind(x.PropertyAssignment)) {
900
900
  if (n.getName() !== "renderMode") continue;
901
901
  let e = A(n.getInitializer());
902
902
  e && t.push(e);
903
903
  }
904
904
  return t;
905
- }, We = T({
905
+ }, We = w({
906
906
  version: "0.10.0",
907
907
  id: "0.10.0/01_render-mode-client-to-spa",
908
908
  title: "renderMode is a closed set — `'client'` becomes `'spa'`",
@@ -913,7 +913,7 @@ var C = (e, t, n) => {
913
913
  for (let t of e.getSourceFiles()) for (let e of j(t)) e.getLiteralValue() === O && (e.setLiteralValue(k), n++, r.add(t.getFilePath()));
914
914
  n > 0 && (t(`renderMode: rewrote ${n} \`'${O}'\` → \`'${k}'\` in ${r.size} file${r.size === 1 ? "" : "s"}`), t(" → 'spa' is the mode those pages already behaved as: no prerender, client-rendered"), t(" → new in 0.9.0: if such a page sits under a layout, that layout now server-renders (see the note above)"));
915
915
  }
916
- }), Ge = T({
916
+ }), Ge = w({
917
917
  version: "0.10.0",
918
918
  id: "0.10.0/02_router-state-carries-its-path",
919
919
  title: "`renderRouterStateScript` now requires the `path` it rendered",
@@ -950,7 +950,7 @@ var C = (e, t, n) => {
950
950
  "Trailing slashes, a trailing `/index.html`, and percent-encoding are normalised",
951
951
  "before the comparison, so the usual static-host shapes still hydrate."
952
952
  ].join("\n")
953
- }), Ke = T({
953
+ }), Ke = w({
954
954
  version: "0.10.0",
955
955
  id: "0.10.0/03_workflow-caller-context-resolved",
956
956
  title: "workflow `buildContext` receives a RESOLVED caller context",
@@ -996,7 +996,7 @@ var C = (e, t, n) => {
996
996
  "it receives the resolved context too, so `callerContext?.subject ?? …` there",
997
997
  "becomes `callerContext.subject`."
998
998
  ].join("\n")
999
- }), qe = T({
999
+ }), qe = w({
1000
1000
  version: "0.10.0",
1001
1001
  id: "0.10.0/04_seed-run-status-skipped",
1002
1002
  title: "seed run status gained `skipped`",
@@ -1037,7 +1037,7 @@ var C = (e, t, n) => {
1037
1037
  "`Schema.Literal`, a zod enum, a DB check constraint), widen it there too — an",
1038
1038
  "unlisted third state is a DECODE failure, not a rendering oddity."
1039
1039
  ].join("\n")
1040
- }), Je = T({
1040
+ }), Je = w({
1041
1041
  version: "0.10.0",
1042
1042
  id: "0.10.0/05_subscription-idle-state",
1043
1043
  title: "`useSubscription` gained an idle state for `skip`",
@@ -1089,7 +1089,7 @@ var C = (e, t, n) => {
1089
1089
  "time's data), hold it in your own state — the subscription no longer claims to",
1090
1090
  "have data it was told to stop fetching."
1091
1091
  ].join("\n")
1092
- }), Ye = T({
1092
+ }), Ye = w({
1093
1093
  version: "0.11.0",
1094
1094
  id: "0.11.0/01_step-options-type-params",
1095
1095
  title: "`StepOptions` takes the context type first",
@@ -1117,7 +1117,7 @@ var C = (e, t, n) => {
1117
1117
  "If the step reads nothing from earlier steps, `StepOptions<Record<never, never>,",
1118
1118
  "Result>` is the honest spelling."
1119
1119
  ].join("\n")
1120
- }), Xe = T({
1120
+ }), Xe = w({
1121
1121
  version: "0.12.0",
1122
1122
  id: "0.12.0/01_outbound-http-ssrf-guard",
1123
1123
  title: "Outbound HttpClient blocks internal targets by default (add `http.allowHosts` if you call one)",
@@ -1157,7 +1157,7 @@ var C = (e, t, n) => {
1157
1157
  "private address (DNS rebinding) still passes. Pair with network-layer egress",
1158
1158
  "control if that is in your threat model."
1159
1159
  ].join("\n")
1160
- }), Ze = T({
1160
+ }), Ze = w({
1161
1161
  version: "0.12.0",
1162
1162
  id: "0.12.0/02_api-key-revoke-tenant-scope",
1163
1163
  title: "apiKeyService.revoke/rotate now require the caller's tenantId",
@@ -1186,7 +1186,7 @@ var C = (e, t, n) => {
1186
1186
  "The framework's own `/v1/api-keys/revoke` route already passes the caller's",
1187
1187
  "tenant — no change needed if you only use the shipped routes."
1188
1188
  ].join("\n")
1189
- }), Qe = T({
1189
+ }), Qe = w({
1190
1190
  version: "0.12.0",
1191
1191
  id: "0.12.0/03_api-key-on-behalf-of",
1192
1192
  title: "API keys: createdBy is provenance, onBehalfOf is ownership",
@@ -1220,7 +1220,7 @@ var C = (e, t, n) => {
1220
1220
  "specific one against what the body asks for. Grant them in your role map. A key",
1221
1221
  "can never carry scopes its issuer does not hold."
1222
1222
  ].join("\n")
1223
- }), $e = T({
1223
+ }), $e = w({
1224
1224
  version: "0.12.0",
1225
1225
  id: "0.12.0/04_inspect-fail-closed",
1226
1226
  title: "The inspect surface requires VOLTRO_INSPECT_TOKEN (previously open when unset)",
@@ -1249,7 +1249,7 @@ var C = (e, t, n) => {
1249
1249
  "",
1250
1250
  "To turn the surface off entirely instead, set `VOLTRO_INSPECT=off`."
1251
1251
  ].join("\n")
1252
- }), et = T({
1252
+ }), et = w({
1253
1253
  version: "0.13.0",
1254
1254
  id: "0.13.0/01_bearer-gates-fail-closed",
1255
1255
  title: "checkBearer is fail-closed; scimPlugin refuses an empty token",
@@ -1286,7 +1286,7 @@ var C = (e, t, n) => {
1286
1286
  " • `@voltro/plugin-prometheus` already passes `{ openWhenUnset: true }` — its",
1287
1287
  " `PROMETHEUS_TOKEN` is documented as optional. Nothing to do there."
1288
1288
  ].join("\n")
1289
- }), tt = T({
1289
+ }), tt = w({
1290
1290
  version: "0.13.0",
1291
1291
  id: "0.13.0/02_storage-grants-owner-only",
1292
1292
  title: "storage.share / revoke / listGrants require ownership",
@@ -1317,7 +1317,7 @@ var C = (e, t, n) => {
1317
1317
  " returning the grant or null. `storage.revoke` is handed a grant id, so it has",
1318
1318
  " to resolve the object before it can check the owner."
1319
1319
  ].join("\n")
1320
- }), nt = T({
1320
+ }), nt = w({
1321
1321
  version: "0.13.0",
1322
1322
  id: "0.13.0/03_apply-plan-convergence-proof",
1323
1323
  title: "applyPlan requires a `replan` convergence proof",
@@ -1350,7 +1350,7 @@ var C = (e, t, n) => {
1350
1350
  " • `AppliedMigration` gained `appliedOps` (operations actually EXECUTED, from",
1351
1351
  " the per-op results). If you construct that value in a test fixture, add it."
1352
1352
  ].join("\n")
1353
- }), rt = T({
1353
+ }), rt = w({
1354
1354
  version: "0.14.0",
1355
1355
  id: "0.14.0/01_resolve-scopes-store",
1356
1356
  title: "auth.resolveScopes receives the app DataStore",
@@ -1388,19 +1388,19 @@ var C = (e, t, n) => {
1388
1388
  " deliberately does not, because only you know how fast a role change must",
1389
1389
  " take effect."
1390
1390
  ].join("\n")
1391
- }), it = (e) => {
1392
- if (!x.isCallExpression(e)) return !1;
1391
+ }), M = (e) => {
1392
+ if (!b.isCallExpression(e)) return !1;
1393
1393
  let t = e.getExpression();
1394
- return x.isPropertyAccessExpression(t) && t.getName() === "reactive" && e.getArguments().length === 0;
1395
- }, at = (e) => e.getDescendantsOfKind(S.CallExpression).some(it), ot = (e) => {
1396
- let t = 0, n = e.getDescendantsOfKind(S.CallExpression);
1394
+ return b.isPropertyAccessExpression(t) && t.getName() === "reactive" && e.getArguments().length === 0;
1395
+ }, it = (e) => e.getDescendantsOfKind(x.CallExpression).some(M), at = (e) => {
1396
+ let t = 0, n = e.getDescendantsOfKind(x.CallExpression);
1397
1397
  for (let e of n) {
1398
- if (e.wasForgotten() || !it(e)) continue;
1398
+ if (e.wasForgotten() || !M(e)) continue;
1399
1399
  let n = e.getExpression();
1400
- x.isPropertyAccessExpression(n) && (e.replaceWithText(n.getExpression().getText()), t++);
1400
+ b.isPropertyAccessExpression(n) && (e.replaceWithText(n.getExpression().getText()), t++);
1401
1401
  }
1402
1402
  return t;
1403
- }, st = T({
1403
+ }, ot = w({
1404
1404
  version: "0.14.0",
1405
1405
  id: "0.14.0/02_reactive-by-default",
1406
1406
  title: "Reactivity is the default; .reactive() is removed",
@@ -1418,16 +1418,16 @@ var C = (e, t, n) => {
1418
1418
  "real saving: REPLICA IDENTITY FULL widens every UPDATE/DELETE in the WAL.",
1419
1419
  "`voltro dev` warns if you opt out a table a query still reads."
1420
1420
  ].join("\n"),
1421
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => at(e)),
1421
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => it(e)),
1422
1422
  transform: ({ project: e, log: t }) => {
1423
1423
  let n = 0, r = 0;
1424
1424
  for (let t of e.getSourceFiles()) {
1425
- let e = ot(t);
1425
+ let e = at(t);
1426
1426
  e !== 0 && (n += e, r++);
1427
1427
  }
1428
1428
  return n > 0 && t(`removed ${n} .reactive() call(s) across ${r} file(s) — reactivity is the default`), n > 0;
1429
1429
  }
1430
- }), ct = T({
1430
+ }), st = w({
1431
1431
  version: "0.14.0",
1432
1432
  id: "0.14.0/07_dev-remote-file-migrations",
1433
1433
  title: "voltro dev refuses unattended file migrations against a remote database",
@@ -1470,19 +1470,19 @@ var C = (e, t, n) => {
1470
1470
  "Unchanged: `voltro db files`, `voltro db apply` and `voltro serve`. This gates the",
1471
1471
  "AUTOMATIC boot path only; an explicit command is already an explicit decision."
1472
1472
  ].join("\n")
1473
- }), lt = (e) => [...e.getImportDeclarations(), ...e.getExportDeclarations()], M = (e) => g(e).replace(/\.tsx?$/, ""), ut = (e, t, n) => {
1474
- let r = M(t), i = M(n);
1473
+ }), ct = (e) => [...e.getImportDeclarations(), ...e.getExportDeclarations()], N = (e) => g(e).replace(/\.tsx?$/, ""), lt = (e, t, n) => {
1474
+ let r = N(t), i = N(n);
1475
1475
  if (r === i) return;
1476
1476
  let a = /\.tsx?$/.exec(e)?.[0] ?? "", o = a === "" ? e : e.slice(0, -a.length);
1477
1477
  if (!o.endsWith(`/${r}`) && o !== r) return;
1478
1478
  let s = a === "" ? "" : /\.tsx$/.test(n) ? ".tsx" : ".ts";
1479
1479
  return `${o.slice(0, o.length - r.length)}${i}${s}`;
1480
- }, N = (e, t) => {
1480
+ }, P = (e, t) => {
1481
1481
  let n = e.getFilePath(), r = [];
1482
- for (let i of e.getProject().getSourceFiles()) for (let e of lt(i)) {
1482
+ for (let i of e.getProject().getSourceFiles()) for (let e of ct(i)) {
1483
1483
  let i = e.getModuleSpecifierValue();
1484
1484
  if (i === void 0 || i.startsWith(".") || e.getModuleSpecifierSourceFile()?.getFilePath() !== n) continue;
1485
- let a = ut(i, n, t);
1485
+ let a = lt(i, n, t);
1486
1486
  a !== void 0 && r.push({
1487
1487
  decl: e,
1488
1488
  spec: a
@@ -1491,19 +1491,19 @@ var C = (e, t, n) => {
1491
1491
  e.move(t);
1492
1492
  for (let e of r) e.decl.setModuleSpecifier(e.spec);
1493
1493
  return r.length;
1494
- }, dt = (e) => {
1494
+ }, ut = (e) => {
1495
1495
  let t = e.getProject().getCompilerOptions().paths;
1496
1496
  if (t === void 0) return;
1497
- let n = M(e.getFilePath()), r = e.getFilePath().slice(0, e.getFilePath().lastIndexOf("/"));
1497
+ let n = N(e.getFilePath()), r = e.getFilePath().slice(0, e.getFilePath().lastIndexOf("/"));
1498
1498
  for (let [e, i] of Object.entries(t)) if (!e.endsWith("*")) for (let t of i ?? []) {
1499
1499
  if (!/\.tsx?$/.test(t)) continue;
1500
- let i = M(t), a = t.slice(0, t.lastIndexOf("/"));
1500
+ let i = N(t), a = t.slice(0, t.lastIndexOf("/"));
1501
1501
  if (i === n && r.endsWith(a.replace(/^\.\//, ""))) return e;
1502
1502
  }
1503
- }, ft = /\.page\.tsx$/, P = (e) => {
1503
+ }, dt = /\.page\.tsx$/, F = (e) => {
1504
1504
  let t = e.includes("\\src\\pages\\") ? "\\src\\pages\\" : "/src/pages/", n = e.indexOf(t);
1505
1505
  return n === -1 ? null : e.slice(0, n);
1506
- }, pt = (e) => e.endsWith(".tsx") && !o.has(e) && !d(e) && !/\.island\.tsx$/.test(e) && !ft.test(e), mt = T({
1506
+ }, ft = (e) => e.endsWith(".tsx") && !o.has(e) && !d(e) && !/\.island\.tsx$/.test(e) && !dt.test(e), pt = w({
1507
1507
  version: "0.14.0",
1508
1508
  id: "0.14.0/03_pages-suffix",
1509
1509
  title: "Pages are declared with a .page.tsx suffix",
@@ -1518,8 +1518,8 @@ var C = (e, t, n) => {
1518
1518
  transform: ({ project: e, log: t }) => {
1519
1519
  let n = /* @__PURE__ */ new Map(), r = e.getSourceFiles().filter((t) => {
1520
1520
  let r = t.getFilePath();
1521
- if (!pt(g(r))) return !1;
1522
- let i = P(r);
1521
+ if (!ft(g(r))) return !1;
1522
+ let i = F(r);
1523
1523
  if (i === null) return !1;
1524
1524
  let a = n.get(i);
1525
1525
  return a === void 0 && (a = e.getSourceFile(v(i, "app.config.ts")) !== void 0 || e.getSourceFile(v(i, "app.config.tsx")) !== void 0, n.set(i, a)), a;
@@ -1537,12 +1537,12 @@ var C = (e, t, n) => {
1537
1537
  let n = t.getFilePath(), r = g(n), s = _(n), c = r.slice(0, -4);
1538
1538
  for (let t of [".test.tsx", ".spec.tsx"]) {
1539
1539
  let n = v(s, `${c}${t}`), r = e.getSourceFile(n);
1540
- r !== void 0 && (N(r, v(s, `${c}.page${t}`)), o += 1);
1540
+ r !== void 0 && (P(r, v(s, `${c}.page${t}`)), o += 1);
1541
1541
  }
1542
- N(t, v(s, `${c}.page.tsx`));
1542
+ P(t, v(s, `${c}.page.tsx`));
1543
1543
  let l = i.get(n);
1544
1544
  if (l !== void 0 && l.length > 0 && !l.every((e) => d(g(e)))) {
1545
- let e = P(n) ?? _(n), t = [...new Set(l)].map((t) => ee(e, t));
1545
+ let e = F(n) ?? _(n), t = [...new Set(l)].map((t) => ee(e, t));
1546
1546
  a.push(`${ee(e, n)} ← imported by ${t.join(", ")}`);
1547
1547
  }
1548
1548
  }
@@ -1551,35 +1551,35 @@ var C = (e, t, n) => {
1551
1551
  for (let e of a) t(` ${e}`);
1552
1552
  }
1553
1553
  }
1554
- }), ht = [
1554
+ }), mt = [
1555
1555
  /\.page\.tsx$/,
1556
1556
  a,
1557
1557
  s,
1558
1558
  l,
1559
1559
  u,
1560
- n,
1560
+ t,
1561
1561
  i,
1562
1562
  c,
1563
1563
  e,
1564
1564
  r
1565
- ], gt = (e) => {
1566
- let n = g(e);
1567
- return !/\.tsx?$/.test(n) || o.has(n) || t(n) || n === "index.ts" || n === "index.tsx" || n === "app.config.ts" ? !1 : !ht.some((e) => e.test(n));
1568
- }, _t = (e) => {
1565
+ ], ht = (e) => {
1566
+ let t = g(e);
1567
+ return !/\.tsx?$/.test(t) || o.has(t) || n(t) || t === "index.ts" || t === "index.tsx" || t === "app.config.ts" ? !1 : !mt.some((e) => e.test(t));
1568
+ }, gt = (e) => {
1569
1569
  let t = [], n = [], r = [], i = [];
1570
1570
  for (let [a, o] of e.getExportedDeclarations()) {
1571
1571
  let e = o[0];
1572
1572
  if (e === void 0) continue;
1573
- if (x.isInterfaceDeclaration(e) || x.isTypeAliasDeclaration(e)) {
1573
+ if (b.isInterfaceDeclaration(e) || b.isTypeAliasDeclaration(e)) {
1574
1574
  i.push(a);
1575
1575
  continue;
1576
1576
  }
1577
1577
  if (a === "default") {
1578
- if (!(x.isFunctionDeclaration(e) || x.isClassDeclaration(e) || x.isArrowFunction(e) || x.isFunctionExpression(e))) {
1578
+ if (!(b.isFunctionDeclaration(e) || b.isClassDeclaration(e) || b.isArrowFunction(e) || b.isFunctionExpression(e))) {
1579
1579
  r.push("default");
1580
1580
  continue;
1581
1581
  }
1582
- let n = x.isFunctionDeclaration(e) || x.isClassDeclaration(e) ? e.getName() : void 0;
1582
+ let n = b.isFunctionDeclaration(e) || b.isClassDeclaration(e) ? e.getName() : void 0;
1583
1583
  t.push(n ?? "Default");
1584
1584
  continue;
1585
1585
  }
@@ -1592,10 +1592,10 @@ var C = (e, t, n) => {
1592
1592
  others: r,
1593
1593
  types: i
1594
1594
  };
1595
- }, vt = (e, t) => {
1595
+ }, _t = (e, t) => {
1596
1596
  let { components: n, hooks: r, others: i, types: a } = e;
1597
1597
  return n.length + r.length + i.length === 0 ? a.length > 0 ? ".types" : null : t && h(n) && r.length === 0 && i.length === 0 ? ".component.tsx" : n.length === 0 && r.length === 1 && i.length === 0 ? ".hook" : null;
1598
- }, yt = T({
1598
+ }, vt = w({
1599
1599
  version: "0.14.0",
1600
1600
  id: "0.14.0/04_file-taxonomy",
1601
1601
  title: "Web files declare their contract (*.component.tsx / *.hook.ts / *.types.ts)",
@@ -1608,19 +1608,19 @@ var C = (e, t, n) => {
1608
1608
  if (s.length > 0) for (let e of s) t(` exempt (not ours): ${e.dir} — ${e.source}`);
1609
1609
  for (let t of e.getSourceFiles()) {
1610
1610
  let e = t.getFilePath();
1611
- if (!gt(e) || p(e, s)) continue;
1612
- let o = dt(t);
1611
+ if (!ht(e) || p(e, s)) continue;
1612
+ let o = ut(t);
1613
1613
  if (o !== void 0) {
1614
1614
  a.push(`${g(e)} (tsconfig paths: "${o}")`);
1615
1615
  continue;
1616
1616
  }
1617
- let c = e.endsWith(".tsx"), l = _t(t), u = vt(l, c);
1617
+ let c = e.endsWith(".tsx"), l = gt(t), u = _t(l, c);
1618
1618
  if (u === null) {
1619
1619
  l.components.length > 0 && l.hooks.length > 0 && r.push(`${g(e)} (component ${l.components.join("/")} + hook ${l.hooks.join("/")})`);
1620
1620
  continue;
1621
1621
  }
1622
1622
  let d = g(e).replace(/\.tsx?$/, ""), f = u === ".component.tsx" ? ".component.tsx" : `${u}${c ? ".tsx" : ".ts"}`;
1623
- i += N(t, v(_(e), `${d}${f}`)), n.push(`${d}${f}`);
1623
+ i += P(t, v(_(e), `${d}${f}`)), n.push(`${d}${f}`);
1624
1624
  }
1625
1625
  if (n.length > 0 && (t(`declared ${n.length} file(s): component / hook / types`), i > 0 && t(` rewrote ${i} aliased import specifier(s) (@/… and friends)`)), a.length > 0) {
1626
1626
  t(""), t(`left alone — a tsconfig \`paths\` entry names ${a.length} of these files directly:`);
@@ -1633,7 +1633,7 @@ var C = (e, t, n) => {
1633
1633
  r.length > 20 && t(` (+${r.length - 20} more)`);
1634
1634
  }
1635
1635
  }
1636
- }), bt = T({
1636
+ }), yt = w({
1637
1637
  version: "0.14.0",
1638
1638
  id: "0.14.0/05_typed-tracking",
1639
1639
  title: "Tracking catalogues are typed against the component props",
@@ -1670,7 +1670,7 @@ var C = (e, t, n) => {
1670
1670
  "Read each one before changing it: a cast that no longer compiles is sometimes",
1671
1671
  "a real type disagreement the old signature was hiding."
1672
1672
  ].join("\n")
1673
- }), xt = T({
1673
+ }), bt = w({
1674
1674
  version: "0.14.0",
1675
1675
  id: "0.14.0/06_voltro-test-skips-e2e",
1676
1676
  title: "`voltro test` leaves `e2e/` to `voltro e2e`",
@@ -1692,13 +1692,13 @@ var C = (e, t, n) => {
1692
1692
  " code it tests, or",
1693
1693
  " • pass your own `--exclude`, which overrides the framework default outright."
1694
1694
  ].join("\n")
1695
- }), St = (e) => {
1696
- let n = e.replace(/\.component(\.ui)?(\.tsx?)$/, "$2");
1697
- return n === e ? null : t(n) ? n : null;
1698
- }, Ct = (e) => {
1695
+ }), xt = (e) => {
1696
+ let t = e.replace(/\.component(\.ui)?(\.tsx?)$/, "$2");
1697
+ return t === e ? null : n(t) ? t : null;
1698
+ }, St = (e) => {
1699
1699
  for (let [, t] of e.getExportedDeclarations()) if (t[0] !== void 0) return !1;
1700
1700
  return e.getExportDeclarations().length === 0 && e.getExportAssignments().length === 0;
1701
- }, wt = T({
1701
+ }, Ct = w({
1702
1702
  version: "0.15.0",
1703
1703
  id: "0.15.0/01_undo-mistaken-taxonomy-renames",
1704
1704
  title: "Undo the two file renames 0.14.0 got wrong (framework primitives, side-effect modules)",
@@ -1715,14 +1715,14 @@ var C = (e, t, n) => {
1715
1715
  transform: ({ project: e, log: t }) => {
1716
1716
  let n = [], r = [];
1717
1717
  for (let t of e.getSourceFiles()) {
1718
- let e = t.getFilePath(), i = g(e), a = St(i);
1718
+ let e = t.getFilePath(), i = g(e), a = xt(i);
1719
1719
  if (a !== null) {
1720
- N(t, v(_(e), a)), n.push(`${i} → ${a}`);
1720
+ P(t, v(_(e), a)), n.push(`${i} → ${a}`);
1721
1721
  continue;
1722
1722
  }
1723
- if (/\.types\.tsx?$/.test(i) && Ct(t)) {
1723
+ if (/\.types\.tsx?$/.test(i) && St(t)) {
1724
1724
  let n = i.replace(/\.types(\.tsx?)$/, "$1");
1725
- N(t, v(_(e), n)), r.push(`${i} → ${n}`);
1725
+ P(t, v(_(e), n)), r.push(`${i} → ${n}`);
1726
1726
  }
1727
1727
  }
1728
1728
  if (n.length > 0) {
@@ -1736,54 +1736,54 @@ var C = (e, t, n) => {
1736
1736
  }
1737
1737
  n.length === 0 && r.length === 0 && t("nothing to undo — 0.14.0 renamed neither a framework file nor a side-effect module here.");
1738
1738
  }
1739
- }), F = ["@voltro/client", "@voltro/web"], I = "@voltro/protocol", Tt = T({
1739
+ }), I = ["@voltro/client", "@voltro/web"], L = "@voltro/protocol", wt = w({
1740
1740
  version: "0.15.0",
1741
1741
  id: "0.15.0/02_error-tag-in-protocol",
1742
1742
  title: "`errorTag` is imported from @voltro/protocol",
1743
1743
  kind: "transform",
1744
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => F.includes(e.getModuleSpecifierValue()) && e.getNamedImports().some((e) => e.getName() === "errorTag"))),
1744
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => I.includes(e.getModuleSpecifierValue()) && e.getNamedImports().some((e) => e.getName() === "errorTag"))),
1745
1745
  transform: ({ project: e, log: t }) => {
1746
1746
  let n = 0;
1747
1747
  for (let t of e.getSourceFiles()) for (let e of t.getImportDeclarations()) {
1748
- if (!F.includes(e.getModuleSpecifierValue())) continue;
1748
+ if (!I.includes(e.getModuleSpecifierValue())) continue;
1749
1749
  let r = e.getNamedImports().find((e) => e.getName() === "errorTag");
1750
1750
  if (r === void 0) continue;
1751
1751
  let i = r.getAliasNode()?.getText(), a = e.isTypeOnly() || r.isTypeOnly();
1752
1752
  r.remove();
1753
- let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === I && e.isTypeOnly() === a), s = {
1753
+ let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === L && e.isTypeOnly() === a), s = {
1754
1754
  name: "errorTag",
1755
1755
  ...i === void 0 ? {} : { alias: i }
1756
1756
  };
1757
1757
  o === void 0 ? t.addImportDeclaration({
1758
- moduleSpecifier: I,
1758
+ moduleSpecifier: L,
1759
1759
  isTypeOnly: a,
1760
1760
  namedImports: [s]
1761
1761
  }) : o.addNamedImport(s), e.getNamedImports().length === 0 && e.getDefaultImport() === void 0 && e.getNamespaceImport() === void 0 && e.remove(), n += 1;
1762
1762
  }
1763
- n > 0 && t(`errorTag: ${n} import(s) repointed to ${I}`);
1763
+ n > 0 && t(`errorTag: ${n} import(s) repointed to ${L}`);
1764
1764
  }
1765
- }), L = /\.page\.tsx$/, Et = /\.page\.(test|spec)\.tsx$/, Dt = (e) => /(^|\/)src\/pages\//.test(e), Ot = (e) => {
1766
- let t = _(e), n = g(e).replace(L, "");
1765
+ }), R = /\.page\.tsx$/, Tt = /\.page\.(test|spec)\.tsx$/, Et = (e) => /(^|\/)src\/pages\//.test(e), Dt = (e) => {
1766
+ let t = _(e), n = g(e).replace(R, "");
1767
1767
  return n === "index" ? v(t, "page.tsx") : v(t, n, "page.tsx");
1768
- }, kt = (e) => {
1769
- let t = _(e), n = g(e), r = /\.page\.spec\.tsx$/.test(n) ? "spec" : "test", i = n.replace(Et, "");
1768
+ }, Ot = (e) => {
1769
+ let t = _(e), n = g(e), r = /\.page\.spec\.tsx$/.test(n) ? "spec" : "test", i = n.replace(Tt, "");
1770
1770
  return i === "index" ? v(t, `page.${r}.tsx`) : v(t, i, `page.${r}.tsx`);
1771
- }, At = T({
1771
+ }, kt = w({
1772
1772
  version: "0.17.0",
1773
1773
  id: "0.17.0/01_pages-are-directories",
1774
1774
  title: "A directory is a route segment; its route is page.tsx",
1775
1775
  kind: "transform",
1776
1776
  scope: ["**/src/pages/**/*.ts", "**/src/pages/**/*.tsx"],
1777
1777
  needsImporters: !0,
1778
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Dt(e.getFilePath()) && L.test(g(e.getFilePath()))),
1778
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Et(e.getFilePath()) && R.test(g(e.getFilePath()))),
1779
1779
  transform: ({ project: e, log: t }) => {
1780
1780
  let n = e.getSourceFiles(), r = [];
1781
1781
  for (let e of n) {
1782
1782
  let t = String(e.getFilePath());
1783
- if (!Dt(t)) continue;
1784
- let n = g(t), i = Et.test(n);
1785
- if (!i && !L.test(n)) continue;
1786
- let a = i ? kt(t) : Ot(t);
1783
+ if (!Et(t)) continue;
1784
+ let n = g(t), i = Tt.test(n);
1785
+ if (!i && !R.test(n)) continue;
1786
+ let a = i ? Ot(t) : Dt(t);
1787
1787
  a !== t && r.push({
1788
1788
  sf: e,
1789
1789
  from: t,
@@ -1802,7 +1802,7 @@ var C = (e, t, n) => {
1802
1802
  }
1803
1803
  }
1804
1804
  let l = [], u = 0;
1805
- for (let e of r) s.has(e.from) || (u += N(e.sf, e.to), e.isTest || l.push(o(e.to)));
1805
+ for (let e of r) s.has(e.from) || (u += P(e.sf, e.to), e.isTest || l.push(o(e.to)));
1806
1806
  if (l.length > 0 && (t(`moved ${l.length} route(s) into their own directory`), u > 0 && t(` rewrote ${u} aliased import specifier(s)`)), c.length > 0) {
1807
1807
  t(""), t(`LEFT ALONE — ${c.length} case(s) where two files claim one route:`);
1808
1808
  for (let e of c) t(` ${e}`);
@@ -1810,12 +1810,12 @@ var C = (e, t, n) => {
1810
1810
  }
1811
1811
  l.length === 0 && c.length === 0 && t("every route already lives in its own directory — nothing to move.");
1812
1812
  }
1813
- }), jt = /,\s*(['"])like\1\s*,/, Mt = T({
1813
+ }), At = /,\s*(['"])like\1\s*,/, jt = w({
1814
1814
  version: "0.18.0",
1815
1815
  id: "0.18.0/01_where-like-removed",
1816
1816
  title: "the `'like'` where-operator is removed — pick `contains` or `startsWith`",
1817
1817
  kind: "manual",
1818
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => jt.test(e.getFullText())),
1818
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => At.test(e.getFullText())),
1819
1819
  note: [
1820
1820
  "The `'like'` operator is removed from the ergonomic `.where(col, op, value)` form.",
1821
1821
  "",
@@ -1853,12 +1853,12 @@ var C = (e, t, n) => {
1853
1853
  "in a raw query (`ctx.store.raw`); the DSL has no arbitrary-pattern operator, and",
1854
1854
  "adding one that cannot use an index is not on the roadmap."
1855
1855
  ].join("\n")
1856
- }), Nt = /\.serverOnly\s*\(\s*\)/, Pt = T({
1856
+ }), Mt = /\.serverOnly\s*\(\s*\)/, Nt = w({
1857
1857
  version: "0.19.0",
1858
1858
  id: "0.19.0/01_server-only-gates-the-boot",
1859
1859
  title: "`.serverOnly()` now FAILS the boot under `voltro serve` — it used to only warn",
1860
1860
  kind: "manual",
1861
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Nt.test(e.getFullText())),
1861
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Mt.test(e.getFullText())),
1862
1862
  note: [
1863
1863
  "`.serverOnly()` now GATES. Before 0.19.0 it emitted one `log.warn` and let the",
1864
1864
  "boot continue — in every command, including `voltro serve`.",
@@ -1905,12 +1905,12 @@ var C = (e, t, n) => {
1905
1905
  "hatch is that people delete the marker instead — and a check whose only way out",
1906
1906
  "is to disable it gets disabled."
1907
1907
  ].join("\n")
1908
- }), Ft = /\bauditPlugin\s*\(/, It = T({
1908
+ }), Pt = /\bauditPlugin\s*\(/, Ft = w({
1909
1909
  version: "0.19.0",
1910
1910
  id: "0.19.0/02_audit-redact-input-default",
1911
1911
  title: "`auditPlugin` now redacts mutation input by default (`redactInput: 'all'`)",
1912
1912
  kind: "manual",
1913
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ft.test(e.getFullText())),
1913
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Pt.test(e.getFullText())),
1914
1914
  note: [
1915
1915
  "`auditPlugin`'s `redactInput` now defaults to `'all'`. Audit rows written from",
1916
1916
  "now on carry `input: { __redacted: 'all' }` — which still proves a payload",
@@ -1946,12 +1946,12 @@ var C = (e, t, n) => {
1946
1946
  "those markers live on TABLE COLUMNS, and this is a mutation's INPUT.",
1947
1947
  "`changePassword({ oldPassword, newPassword })` has no column to consult."
1948
1948
  ].join("\n")
1949
- }), Lt = E("registerWriteRecorder"), Rt = T({
1949
+ }), It = T("registerWriteRecorder"), Lt = w({
1950
1950
  version: "0.20.0",
1951
1951
  id: "0.20.0/01_write-recorder-port",
1952
1952
  title: "`WriteRecorder` takes a port (`{ append, maxOf }`) instead of a bare `append`",
1953
1953
  kind: "manual",
1954
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Lt.test(e.getFullText())),
1954
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => It.test(e.getFullText())),
1955
1955
  note: [
1956
1956
  "If you wrote your own in-transaction write recorder, its first parameter is",
1957
1957
  "now an object rather than a function:",
@@ -1990,12 +1990,12 @@ var C = (e, t, n) => {
1990
1990
  "nested transaction, and a throw from either operation still rolls the",
1991
1991
  "caller's write back. That is the guarantee the timing exists for."
1992
1992
  ].join("\n")
1993
- }), zt = /\.maxLength\s*\(/, Bt = T({
1993
+ }), Rt = /\.maxLength\s*\(/, zt = w({
1994
1994
  version: "0.21.0",
1995
1995
  id: "0.21.0/01_maxlength-now-migrates",
1996
1996
  title: "`text().maxLength(n)` now migrates EXISTING columns — plan before you apply",
1997
1997
  kind: "manual",
1998
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => zt.test(e.getFullText())),
1998
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Rt.test(e.getFullText())),
1999
1999
  note: [
2000
2000
  "Your source does not change. `text().maxLength(n)` compiles exactly as before",
2001
2001
  "and every bound you already declared stays as written.",
@@ -2037,12 +2037,12 @@ var C = (e, t, n) => {
2037
2037
  "framework guarantees, and an upgrade-time ALTER that fails on your data is a",
2038
2038
  "worse outcome than the index-size concern it would fix."
2039
2039
  ].join("\n")
2040
- }), Vt = /\bMigrationOperation\b|\bPlannedOperation\b|\bInspectMigrationOperationKind\b|\bOperationKind\b/, Ht = T({
2040
+ }), Bt = /\bMigrationOperation\b|\bPlannedOperation\b|\bInspectMigrationOperationKind\b|\bOperationKind\b/, Vt = w({
2041
2041
  version: "0.22.0",
2042
2042
  id: "0.22.0/01_rename-index-op",
2043
2043
  title: "`MigrationOperation` gained a `rename-index` kind",
2044
2044
  kind: "manual",
2045
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Vt.test(e.getFullText())),
2045
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Bt.test(e.getFullText())),
2046
2046
  note: [
2047
2047
  "The migration planner can now emit a `rename-index` operation:",
2048
2048
  "",
@@ -2074,12 +2074,12 @@ var C = (e, t, n) => {
2074
2074
  "match where two same-shaped indexes were renamed at once. Those still plan",
2075
2075
  "as drop + create, exactly as before."
2076
2076
  ].join("\n")
2077
- }), Ut = /@voltro\/plugin-(notifications|scim|ai-flows)/, Wt = T({
2077
+ }), Ht = /@voltro\/plugin-(notifications|scim|ai-flows)/, Ut = w({
2078
2078
  version: "0.22.0",
2079
2079
  id: "0.22.0/02_plugin-tables-voltro-prefixed",
2080
2080
  title: "plugin-owned tables are `_voltro_`-prefixed (the rows move themselves)",
2081
2081
  kind: "manual",
2082
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ut.test(e.getFullText())),
2082
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ht.test(e.getFullText())),
2083
2083
  note: [
2084
2084
  "Ten tables owned by @voltro/plugin-notifications, @voltro/plugin-scim and",
2085
2085
  "@voltro/plugin-ai-flows moved out of your table namespace and into the",
@@ -2129,12 +2129,12 @@ var C = (e, t, n) => {
2129
2129
  "gained a `rename-table` kind. An exhaustive `switch` needs an arm; don't add",
2130
2130
  "a `default:`, which would silence this and every future kind."
2131
2131
  ].join("\n")
2132
- }), Gt = /QueryCacheScope|QueryCacheConfig|scope\s*:\s*['"](?:subject|global)['"]/, Kt = T({
2132
+ }), Wt = /QueryCacheScope|QueryCacheConfig|scope\s*:\s*['"](?:subject|global)['"]/, Gt = w({
2133
2133
  version: "0.22.0",
2134
2134
  id: "0.22.0/03_cache-scope-gained-tenant",
2135
2135
  title: "`cache.scope` gained 'tenant' — an exhaustive switch over it needs a branch",
2136
2136
  kind: "manual",
2137
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Gt.test(e.getFullText())),
2137
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Wt.test(e.getFullText())),
2138
2138
  note: [
2139
2139
  "`cache: { scope }` now accepts a third value, `'tenant'`: one cache entry per",
2140
2140
  "org, none shared across orgs.",
@@ -2163,12 +2163,12 @@ var C = (e, t, n) => {
2163
2163
  "Rubric: does the resolved predicate depend on the caller? On the PERSON →",
2164
2164
  "`subject`; on their ORG only → `tenant`; on neither → `global`."
2165
2165
  ].join("\n")
2166
- }), qt = /envTokenAuthResolver|InspectAuthResolver|authResolver/, Jt = T({
2166
+ }), Kt = /envTokenAuthResolver|InspectAuthResolver|authResolver/, qt = w({
2167
2167
  version: "0.22.0",
2168
2168
  id: "0.22.0/04_inspect-write-credential",
2169
2169
  title: "Mutating `/_voltro/inspect/*` endpoints need VOLTRO_INSPECT_WRITE_TOKEN",
2170
2170
  kind: "manual",
2171
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => qt.test(e.getFullText())),
2171
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Kt.test(e.getFullText())),
2172
2172
  note: [
2173
2173
  "A POST / PATCH / PUT / DELETE to `/_voltro/inspect/*` now needs a SECOND",
2174
2174
  "credential: `VOLTRO_INSPECT_WRITE_TOKEN`, sent as the `x-voltro-inspect-write`",
@@ -2206,12 +2206,12 @@ var C = (e, t, n) => {
2206
2206
  "IMPLEMENTING a resolver is unaffected — `(headers) => …` still satisfies the",
2207
2207
  "type. Only callers are obliged."
2208
2208
  ].join("\n")
2209
- }), Yt = /versioningPlugin\s*\(/, Xt = T({
2209
+ }), Jt = /versioningPlugin\s*\(/, Yt = w({
2210
2210
  version: "0.23.0",
2211
2211
  id: "0.23.0/01_versioning-is-opt-out",
2212
2212
  title: "versioningPlugin: `tables: string[]` → opt-out by default, `include` / `exclude` by value",
2213
2213
  kind: "manual",
2214
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Yt.test(e.getFullText())),
2214
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Jt.test(e.getFullText())),
2215
2215
  note: [
2216
2216
  "`versioningPlugin({ tables: [...] })` no longer compiles. Row history is now",
2217
2217
  "ON by default for every table your app declares.",
@@ -2251,12 +2251,12 @@ var C = (e, t, n) => {
2251
2251
  "surprises you, `exclude` is the knob, and the retention sweep",
2252
2252
  "(`VOLTRO_ROW_HISTORY_TTL_HOURS`) still bounds age."
2253
2253
  ].join("\n")
2254
- }), Zt = /@voltro\/ai|\.agent\.tsx|agent_(threads|messages)/, Qt = T({
2254
+ }), Xt = /@voltro\/ai|\.agent\.tsx|agent_(threads|messages)/, Zt = w({
2255
2255
  version: "0.24.0",
2256
2256
  id: "0.24.0/01_agent-tables-voltro-prefixed",
2257
2257
  title: "the two agent tables are `_voltro_`-prefixed (the rows move themselves)",
2258
2258
  kind: "manual",
2259
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Zt.test(e.getFullText())),
2259
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Xt.test(e.getFullText())),
2260
2260
  note: [
2261
2261
  "The two tables owned by @voltro/ai moved out of your table namespace and",
2262
2262
  "into the framework's:",
@@ -2309,12 +2309,12 @@ var C = (e, t, n) => {
2309
2309
  "declared by something. You get a fresh empty `_voltro_…` table alongside it,",
2310
2310
  "which is the collision this ends."
2311
2311
  ].join("\n")
2312
- }), $t = /\.events\s*\.\s*emit\s*\(/, en = T({
2312
+ }), Qt = /\.events\s*\.\s*emit\s*\(/, $t = w({
2313
2313
  version: "0.25.0",
2314
2314
  id: "0.25.0/01_events-emit-to-publish",
2315
2315
  title: "`ctx.events.emit(name, data)` → `ctx.events.publish(descriptor, key, payload)`",
2316
2316
  kind: "manual",
2317
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => $t.test(e.getFullText())),
2317
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Qt.test(e.getFullText())),
2318
2318
  note: [
2319
2319
  "`ctx.events.emit('name', data)` is gone. Declare the event and publish it:",
2320
2320
  "",
@@ -2358,53 +2358,53 @@ var C = (e, t, n) => {
2358
2358
  "",
2359
2359
  "Docs: https://docs.voltro.dev/docs/data/events"
2360
2360
  ].join("\n")
2361
- }), tn = /* @__PURE__ */ new Set([
2361
+ }), en = /* @__PURE__ */ new Set([
2362
2362
  "description",
2363
2363
  "version",
2364
2364
  "globalRateLimit"
2365
- ]), nn = ["defaultRetry", "defaultSigning"], rn = (e) => e.getDescendantsOfKind(S.CallExpression).filter((e) => e.getExpression().getText() === "defineOutgoingEvent"), an = T({
2365
+ ]), tn = ["defaultRetry", "defaultSigning"], nn = (e) => e.getDescendantsOfKind(x.CallExpression).filter((e) => e.getExpression().getText() === "defineOutgoingEvent"), rn = w({
2366
2366
  version: "0.25.0",
2367
2367
  id: "0.25.0/02_outgoing-event-to-define-event",
2368
2368
  title: "`defineOutgoingEvent` → `defineEvent({ …, webhook: { … } })`",
2369
2369
  kind: "transform",
2370
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => rn(e).length > 0),
2370
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => nn(e).length > 0),
2371
2371
  transform: ({ project: e, log: t }) => {
2372
2372
  let n = 0, r = /* @__PURE__ */ new Set(), i = [];
2373
- for (let t of e.getSourceFiles()) for (let e of rn(t)) {
2373
+ for (let t of e.getSourceFiles()) for (let e of nn(t)) {
2374
2374
  let a = e.getArguments()[0];
2375
- if (a === void 0 || !a.isKind(S.ObjectLiteralExpression)) continue;
2376
- let o = a.getProperties().filter((e) => e.isKind(S.PropertyAssignment)), s = (e) => o.find((t) => t.asKindOrThrow(S.PropertyAssignment).getName() === e)?.asKindOrThrow(S.PropertyAssignment).getInitializer()?.getText(), c = s("id"), l = s("payload");
2375
+ if (a === void 0 || !a.isKind(x.ObjectLiteralExpression)) continue;
2376
+ let o = a.getProperties().filter((e) => e.isKind(x.PropertyAssignment)), s = (e) => o.find((t) => t.asKindOrThrow(x.PropertyAssignment).getName() === e)?.asKindOrThrow(x.PropertyAssignment).getInitializer()?.getText(), c = s("id"), l = s("payload");
2377
2377
  if (c === void 0 || l === void 0) continue;
2378
- let u = [...tn].map((e) => {
2378
+ let u = [...en].map((e) => {
2379
2379
  let t = s(e);
2380
2380
  if (t !== void 0) return `${e === "globalRateLimit" ? "rateLimit" : e}: ${t}`;
2381
2381
  }).filter((e) => e !== void 0);
2382
- for (let e of nn) s(e) !== void 0 && i.push(`${t.getBaseName()}: ${e}`);
2382
+ for (let e of tn) s(e) !== void 0 && i.push(`${t.getBaseName()}: ${e}`);
2383
2383
  let d = u.length > 0 ? `, webhook: { ${u.join(", ")} }` : ", webhook: {}";
2384
2384
  e.replaceWithText(`defineEvent({ name: ${c}, key: Schema.Struct({}), payload: ${l}${d} })`), n++, r.add(t.getFilePath());
2385
2385
  }
2386
2386
  n !== 0 && (t(`webhooks: rewrote ${n} \`defineOutgoingEvent\` → \`defineEvent\` in ${r.size} file${r.size === 1 ? "" : "s"}`), t(" → `key: Schema.Struct({})` is CORRECT, not a placeholder: a webhook event goes to"), t(" subscribed targets, not to a routing key. Give it a key only if you also want"), t(" connected clients to subscribe per-something with `useEvent`."), t(" → import `defineEvent` from `@voltro/protocol` and `Schema` from `effect`;"), t(" the file is now a declaration, so `*.event.ts` is its home."), t(" → `ctx.webhooks.emit(descriptor, payload)` still works, and"), t(" `ctx.events.publish(descriptor, key, payload)` now reaches the HTTP targets too."), i.length > 0 && (t(` → NOT carried across (${i.length}): ${[...new Set(i)].join(", ")}`), t(" The plugin's retry/signing shapes are richer than the declared event can hold,"), t(" so they are left in place as a compile error rather than dropped silently."), t(" Configure them at subscribe time, where the full shape is typed.")));
2387
2387
  }
2388
- }), R = (e) => e.getDescendantsOfKind(S.CallExpression).filter((e) => {
2388
+ }), an = (e) => e.getDescendantsOfKind(x.CallExpression).filter((e) => {
2389
2389
  let t = e.getExpression().getText();
2390
2390
  return t === "broadcast" || t === "broadcastPlugin";
2391
- }), z = (e) => {
2391
+ }), on = (e) => {
2392
2392
  let t = e.getArguments()[0];
2393
- if (!(t === void 0 || !t.isKind(S.ObjectLiteralExpression))) return t.getProperties().filter((e) => e.isKind(S.PropertyAssignment)).map((e) => e.asKindOrThrow(S.PropertyAssignment)).find((e) => e.getName() === "channel");
2394
- }, on = T({
2393
+ if (!(t === void 0 || !t.isKind(x.ObjectLiteralExpression))) return t.getProperties().filter((e) => e.isKind(x.PropertyAssignment)).map((e) => e.asKindOrThrow(x.PropertyAssignment)).find((e) => e.getName() === "channel");
2394
+ }, sn = w({
2395
2395
  version: "0.25.0",
2396
2396
  id: "0.25.0/03_broadcast-channel-to-namespace",
2397
2397
  title: "`broadcast({ channel })` → `broadcast({ namespace })`",
2398
2398
  kind: "transform",
2399
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => R(e).some((e) => z(e) !== void 0)),
2399
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => an(e).some((e) => on(e) !== void 0)),
2400
2400
  transform: ({ project: e, log: t }) => {
2401
2401
  let n = 0, r = [], i = [], a = /* @__PURE__ */ new Set();
2402
- for (let t of e.getSourceFiles()) for (let e of R(t)) {
2403
- let o = z(e);
2402
+ for (let t of e.getSourceFiles()) for (let e of an(t)) {
2403
+ let o = on(e);
2404
2404
  if (o === void 0) continue;
2405
2405
  let s = o.getInitializer();
2406
2406
  if (s === void 0) continue;
2407
- let c = s.getText(), l = s.isKind(S.StringLiteral) ? s.getLiteralValue() : void 0;
2407
+ let c = s.getText(), l = s.isKind(x.StringLiteral) ? s.getLiteralValue() : void 0;
2408
2408
  if (l !== void 0 && l.endsWith(":changes")) {
2409
2409
  let e = l.slice(0, -8);
2410
2410
  o.replaceWithText(`namespace: '${e}'`), r.push(`${t.getBaseName()}: '${l}' → '${e}'`);
@@ -2417,7 +2417,7 @@ var C = (e, t, n) => {
2417
2417
  for (let e of i) t(` ! ${e} — carried verbatim; CHECK IT: the value is now a PREFIX the framework`), t(" appends ':changes' / ':events:<name>' / ':members' / ':presence' to.");
2418
2418
  }
2419
2419
  }
2420
- }), sn = T({
2420
+ }), cn = w({
2421
2421
  version: "0.26.0",
2422
2422
  id: "0.26.0/01_event-webhook-retry-removed",
2423
2423
  title: "`defineEvent({ webhook: { retry } })` is gone — it never did anything",
@@ -2451,7 +2451,7 @@ var C = (e, t, n) => {
2451
2451
  "If you were relying on the declared value to take effect, note that it never",
2452
2452
  "did — your deliveries have been using the target default all along."
2453
2453
  ].join("\n")
2454
- }), cn = T({
2454
+ }), ln = w({
2455
2455
  version: "0.26.0",
2456
2456
  id: "0.26.0/02_step-retry-enforced",
2457
2457
  title: "workflow step `retry:` is now ENFORCED (was metadata) — drop any redundant manual retry",
@@ -2504,12 +2504,12 @@ var C = (e, t, n) => {
2504
2504
  "(retry transient, fail permanent), `maxElapsed: '5 minutes'` (a total time budget,",
2505
2505
  "not just a count), `jitter` (on by default), and `respectRetryAfter` (honor a 429)."
2506
2506
  ].join("\n")
2507
- }), ln = /\bmakeSubjectId\b/, un = T({
2507
+ }), un = /\bmakeSubjectId\b/, dn = w({
2508
2508
  version: "0.28.0",
2509
2509
  id: "0.28.0/01_notifications-resolve-subject-id-async",
2510
2510
  title: "`makeSubjectId` returns a Promise; `resolveSubjectId` may be async",
2511
2511
  kind: "manual",
2512
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ln.test(e.getFullText())),
2512
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => un.test(e.getFullText())),
2513
2513
  note: [
2514
2514
  "`makeSubjectId` from @voltro/plugin-notifications now returns a Promise.",
2515
2515
  "",
@@ -2541,12 +2541,12 @@ var C = (e, t, n) => {
2541
2541
  " reconnect. Memoise inside your own resolver if that trade suits your app —",
2542
2542
  " you know your invalidation and we do not."
2543
2543
  ].join("\n")
2544
- }), dn = /\bPluginRefChange\b|\bisSoftDelete\s*\(|\bapplyPluginRefRules\s*\(/, fn = T({
2544
+ }), fn = /\bPluginRefChange\b|\bisSoftDelete\s*\(|\bapplyPluginRefRules\s*\(/, pn = w({
2545
2545
  version: "0.28.0",
2546
2546
  id: "0.28.0/02_plugin-ref-change-event",
2547
2547
  title: "`PluginRefChange` is removed — the change channel's `ChangeEvent` is the one shape",
2548
2548
  kind: "manual",
2549
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => dn.test(e.getFullText())),
2549
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => fn.test(e.getFullText())),
2550
2550
  note: [
2551
2551
  "`PluginRefChange` no longer exists. `isSoftDelete` and `applyPluginRefRules`",
2552
2552
  "take `ChangeEvent` from @voltro/database — the type the change channel actually",
@@ -2588,12 +2588,12 @@ var C = (e, t, n) => {
2588
2588
  " not know that writes a delete, and the test passes against a stream the",
2589
2589
  " framework never emits. That is the defect this change removes."
2590
2590
  ].join("\n")
2591
- }), pn = /credentialsResolver\s*:/, mn = T({
2591
+ }), mn = /credentialsResolver\s*:/, hn = w({
2592
2592
  version: "0.28.0",
2593
2593
  id: "0.28.0/03_atlassian-credentials-context",
2594
2594
  title: "`credentialsResolver` receives `{ subject, store }` instead of a bare Subject",
2595
2595
  kind: "manual",
2596
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => pn.test(e.getFullText())),
2596
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => mn.test(e.getFullText())),
2597
2597
  note: [
2598
2598
  "@voltro/plugin-atlassian: `credentialsResolver` now takes a context object.",
2599
2599
  "",
@@ -2663,12 +2663,12 @@ var C = (e, t, n) => {
2663
2663
  "",
2664
2664
  "and rotate anything you find — a redacted future does not un-leak a past row."
2665
2665
  ].join("\n")
2666
- }), hn = /auditPlugin\s*\(/, gn = T({
2666
+ }), gn = /auditPlugin\s*\(/, _n = w({
2667
2667
  version: "0.28.0",
2668
2668
  id: "0.28.0/04_audit-redacts-subject-metadata",
2669
2669
  title: "`auditPlugin` redacts `subject.metadata` by default",
2670
2670
  kind: "manual",
2671
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => hn.test(e.getFullText())),
2671
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => gn.test(e.getFullText())),
2672
2672
  note: [
2673
2673
  "`auditPlugin` now redacts `subject.metadata` before the sink sees the event.",
2674
2674
  "",
@@ -2724,12 +2724,12 @@ var C = (e, t, n) => {
2724
2724
  " keeps the token in the framework vault, and the resolver's new `store`",
2725
2725
  " handle covers an app with its own token table."
2726
2726
  ].join("\n")
2727
- }), _n = E("useLoaderData"), vn = T({
2727
+ }), vn = T("useLoaderData"), yn = w({
2728
2728
  version: "0.29.0",
2729
2729
  id: "0.29.0/01_loader-data-absence",
2730
2730
  title: "`useLoaderData()` throws at a level that declares no `loader`",
2731
2731
  kind: "manual",
2732
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => _n.test(e.getFullText())),
2732
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => vn.test(e.getFullText())),
2733
2733
  note: [
2734
2734
  "`useLoaderData()` used to return `undefined` at a level with no `loader`,",
2735
2735
  "which then died at `Cannot destructure property 'x' of undefined` — a",
@@ -2765,38 +2765,38 @@ var C = (e, t, n) => {
2765
2765
  "that legitimately resolves to `undefined` does not throw — only a missing",
2766
2766
  "`loader` does."
2767
2767
  ].join("\n")
2768
- }), B = "@voltro/ui-shadcn", V = "voltro:lang", yn = "voltro:locale", H = "parsePreferenceCookies", bn = (e, t) => {
2768
+ }), z = "@voltro/ui-shadcn", B = "voltro:lang", bn = "voltro:locale", xn = "parsePreferenceCookies", Sn = (e, t) => {
2769
2769
  let n = [];
2770
- for (let r of e.getImportDeclarations()) if (r.getModuleSpecifierValue() === B) for (let e of r.getNamedImports()) e.getName() === t && n.push(e.getAliasNode()?.getText() ?? e.getName());
2770
+ for (let r of e.getImportDeclarations()) if (r.getModuleSpecifierValue() === z) for (let e of r.getNamedImports()) e.getName() === t && n.push(e.getAliasNode()?.getText() ?? e.getName());
2771
2771
  return n;
2772
- }, xn = (e) => {
2772
+ }, Cn = (e) => {
2773
2773
  let t = 0;
2774
- for (let n of e.getSourceFiles()) n.getFullText().includes(V) && n.forEachDescendant((e) => {
2775
- if (x.isStringLiteral(e) || x.isNoSubstitutionTemplateLiteral(e) || x.isTemplateHead(e) || x.isTemplateMiddle(e) || x.isTemplateTail(e) || x.isRegularExpressionLiteral(e)) {
2774
+ for (let n of e.getSourceFiles()) n.getFullText().includes(B) && n.forEachDescendant((e) => {
2775
+ if (b.isStringLiteral(e) || b.isNoSubstitutionTemplateLiteral(e) || b.isTemplateHead(e) || b.isTemplateMiddle(e) || b.isTemplateTail(e) || b.isRegularExpressionLiteral(e)) {
2776
2776
  let n = e.getText();
2777
- if (!n.includes(V)) return;
2778
- e.replaceWithText(n.split(V).join(yn)), t++;
2777
+ if (!n.includes(B)) return;
2778
+ e.replaceWithText(n.split(B).join(bn)), t++;
2779
2779
  }
2780
2780
  });
2781
2781
  return t;
2782
- }, Sn = (e) => {
2782
+ }, wn = (e) => {
2783
2783
  let t = 0, n = 0;
2784
2784
  for (let r of e.getSourceFiles()) {
2785
- let e = bn(r, H);
2785
+ let e = Sn(r, xn);
2786
2786
  e.length !== 0 && r.forEachDescendant((r) => {
2787
- if (!x.isCallExpression(r) || !e.includes(r.getExpression().getText())) return;
2787
+ if (!b.isCallExpression(r) || !e.includes(r.getExpression().getText())) return;
2788
2788
  let i = r.getParent();
2789
- if (x.isPropertyAccessExpression(i) && i.getName() === "lang") {
2789
+ if (b.isPropertyAccessExpression(i) && i.getName() === "lang") {
2790
2790
  i.getNameNode().replaceWithText("locale"), t++;
2791
2791
  return;
2792
2792
  }
2793
- if (x.isVariableDeclaration(i)) {
2793
+ if (b.isVariableDeclaration(i)) {
2794
2794
  let e = i.getNameNode();
2795
- if (!x.isObjectBindingPattern(e)) return;
2795
+ if (!b.isObjectBindingPattern(e)) return;
2796
2796
  for (let t of e.getElements()) {
2797
2797
  if (t.getPropertyNameNode() !== void 0) continue;
2798
2798
  let e = t.getNameNode();
2799
- !x.isIdentifier(e) || e.getText() !== "lang" || (t.replaceWithText(`locale: ${t.getText()}`), n++);
2799
+ !b.isIdentifier(e) || e.getText() !== "lang" || (t.replaceWithText(`locale: ${t.getText()}`), n++);
2800
2800
  }
2801
2801
  }
2802
2802
  });
@@ -2805,29 +2805,29 @@ var C = (e, t, n) => {
2805
2805
  access: t,
2806
2806
  destructured: n
2807
2807
  };
2808
- }, Cn = T({
2808
+ }, Tn = w({
2809
2809
  version: "0.30.0",
2810
2810
  id: "0.30.0/01_locale-cookie-rename",
2811
2811
  title: "the language-preference cookie is `voltro:locale` (was `voltro:lang`)",
2812
2812
  kind: "transform",
2813
2813
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
2814
2814
  let t = e.getFullText();
2815
- return t.includes(V) || t.includes(B) && (t.includes("LANG_COOKIE") || t.includes(H));
2815
+ return t.includes(B) || t.includes(z) && (t.includes("LANG_COOKIE") || t.includes(xn));
2816
2816
  }),
2817
2817
  transform: ({ project: e, helpers: t, log: n }) => {
2818
2818
  let r = t.renameImport(e, {
2819
- module: B,
2819
+ module: z,
2820
2820
  from: "LANG_COOKIE",
2821
2821
  to: "LOCALE_COOKIE"
2822
- }), i = xn(e), { access: a, destructured: o } = Sn(e), s = [];
2822
+ }), i = Cn(e), { access: a, destructured: o } = wn(e), s = [];
2823
2823
  r > 0 && s.push(`LANG_COOKIE → LOCALE_COOKIE (${r} import(s))`), i > 0 && s.push(`'voltro:lang' → 'voltro:locale' (${i} literal(s))`), a + o > 0 && s.push(`parsePreferenceCookies().lang → .locale (${a + o} site(s))`), s.length !== 0 && n(`locale cookie rename: ${s.join("; ")}. Your SOURCE is migrated. Your USERS' cookies are not — the old \`voltro:lang\` cookie in an already-visited browser is no longer read, so each user falls back to Accept-Language / defaultLocale once and re-picks their language. Nothing errors. If that reset is unacceptable, copy the old value forward at your own boot — the codemod file has the three-line bridge.` + (o > 0 ? ` ${o} destructure(s) were rewritten as \`{ locale: lang }\` to keep the local name safe from a scope collision — rename the binding yourself if you want the vocabulary to match.` : ""));
2824
2824
  }
2825
- }), wn = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, Tn = T({
2825
+ }), En = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, Dn = w({
2826
2826
  version: "0.30.0",
2827
2827
  id: "0.30.0/02_audit-purge-query-recheck",
2828
2828
  title: "re-run the credential-purge query — the 0.28.0 spelling under-reported on MySQL/MariaDB",
2829
2829
  kind: "manual",
2830
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => wn.test(e.getFullText())),
2830
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => En.test(e.getFullText())),
2831
2831
  note: [
2832
2832
  "IF YOU ALREADY RAN THE 0.28.0 PURGE CHECK ON MySQL OR MariaDB, RUN IT AGAIN.",
2833
2833
  "The query that note shipped under-reported, and it under-reported by",
@@ -2874,14 +2874,14 @@ var C = (e, t, n) => {
2874
2874
  " `connectionCredentials(...)` keeps it in the framework vault",
2875
2875
  " (see `0.28.0/03_atlassian-credentials-context`)."
2876
2876
  ].join("\n")
2877
- }), En = /\.webhooks\s*\.\s*emit\s*\(|useWebhooks\s*\(/, Dn = T({
2877
+ }), On = /\.webhooks\s*\.\s*emit\s*\(|useWebhooks\s*\(/, kn = w({
2878
2878
  version: "0.30.0",
2879
2879
  id: "0.30.0/03_webhook-emit-durable-deferral",
2880
2880
  title: "a deferred `webhooks.emit` rides the transactional outbox; `{ immediate: true }` opts out",
2881
2881
  kind: "manual",
2882
2882
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
2883
2883
  let t = e.getFullText();
2884
- return En.test(t) || E("emit").test(t);
2884
+ return On.test(t) || T("emit").test(t);
2885
2885
  }),
2886
2886
  note: [
2887
2887
  "A `ctx.webhooks.emit(...)` inside a MUTATION now enqueues a transactional",
@@ -2931,14 +2931,14 @@ var C = (e, t, n) => {
2931
2931
  "created by the declarative differ on the next `voltro dev` boot or",
2932
2932
  "`voltro db apply` — there is nothing to run by hand."
2933
2933
  ].join("\n")
2934
- }), On = /\.executionId\b|workflows\s*\.\s*start\s*\(|workflows\s*\.\s*child\s*\(/, kn = T({
2934
+ }), An = /\.executionId\b|workflows\s*\.\s*start\s*\(|workflows\s*\.\s*child\s*\(/, jn = w({
2935
2935
  version: "0.30.0",
2936
2936
  id: "0.30.0/04_workflow-run-handle-nullable-execution",
2937
2937
  title: "`WorkflowRunHandle.executionId` is `string | null`; `status` gains queued/dropped/skipped",
2938
2938
  kind: "manual",
2939
2939
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
2940
2940
  let t = e.getFullText();
2941
- return On.test(t) || E("start").test(t);
2941
+ return An.test(t) || T("start").test(t);
2942
2942
  }),
2943
2943
  note: [
2944
2944
  "A workflow start no longer always becomes a run. With declarative flow",
@@ -3003,12 +3003,12 @@ var C = (e, t, n) => {
3003
3003
  " and `singleton: { mode: 'skip' }` throws `WorkflowSingletonHeldError`",
3004
3004
  " carrying the incumbent's execution id, so you can wait on THAT run."
3005
3005
  ].join("\n")
3006
- }), An = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, jn = T({
3006
+ }), Mn = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, Nn = w({
3007
3007
  version: "0.31.0",
3008
3008
  id: "0.31.0/01_rerun-credential-scan",
3009
3009
  title: "re-run `voltro db scan-credentials` — on 0.30.0–0.30.2 it skipped the column credentials land in",
3010
3010
  kind: "manual",
3011
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => An.test(e.getFullText())),
3011
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Mn.test(e.getFullText())),
3012
3012
  note: [
3013
3013
  "IF YOU RAN `voltro db scan-credentials` ON 0.30.0, 0.30.1 OR 0.30.2, RUN IT",
3014
3014
  "AGAIN. Its answer did not cover the column a leaked credential is most",
@@ -3042,7 +3042,7 @@ var C = (e, t, n) => {
3042
3042
  "credential on the Subject — `connectionCredentials(...)` keeps it in the",
3043
3043
  "framework vault."
3044
3044
  ].join("\n")
3045
- }), Mn = T({
3045
+ }), Pn = w({
3046
3046
  version: "0.32.0",
3047
3047
  id: "0.32.0/01_audit-redacts-outcome",
3048
3048
  title: "`auditPlugin` now redacts `outcome` by default — opt out if your trail reads it",
@@ -3083,7 +3083,7 @@ var C = (e, t, n) => {
3083
3083
  "purge the rows AND rotate the credentials — assume anything written to a",
3084
3084
  "log table has been read."
3085
3085
  ].join("\n")
3086
- }), Nn = T({
3086
+ }), Fn = w({
3087
3087
  version: "0.33.0",
3088
3088
  id: "0.33.0/01_opentelemetry-optional-peer",
3089
3089
  title: "`@effect/opentelemetry` is now an optional peer — install it if you use tracing",
@@ -3115,7 +3115,7 @@ var C = (e, t, n) => {
3115
3115
  "never wrote down. It is a startup failure, not a silent loss of traces —",
3116
3116
  "losing telemetry quietly would be the worse outcome."
3117
3117
  ].join("\n")
3118
- }), Pn = T({
3118
+ }), In = w({
3119
3119
  version: "0.33.0",
3120
3120
  id: "0.33.0/02_coordinated-handle-gained-wake",
3121
3121
  title: "`CoordinatedScheduleHandle` gained `wake()`, `currentIntervalMs()` and `isArmed()` — update hand-written test doubles",
@@ -3165,7 +3165,7 @@ var C = (e, t, n) => {
3165
3165
  "Reporting nothing is the conservative default on purpose — a task that",
3166
3166
  "cannot tell whether it was idle must not be slowed down on a guess."
3167
3167
  ].join("\n")
3168
- }), Fn = T({
3168
+ }), Ln = w({
3169
3169
  version: "0.34.0",
3170
3170
  id: "0.34.0/01_serve-does-mount-inspect",
3171
3171
  title: "Correction: `voltro serve` DOES mount an inspect surface (the 0.12.0 note said it mounts none)",
@@ -3206,12 +3206,12 @@ var C = (e, t, n) => {
3206
3206
  "place, everyone already past 0.12.0 — which is everyone the wrong sentence",
3207
3207
  "could have misled — would never have seen it."
3208
3208
  ].join("\n")
3209
- }), In = (e) => /\.with\(\s*[\w.]*tenant\(/.test(e) || /\.serverOnly\(\s*\)/.test(e), Ln = T({
3209
+ }), Rn = (e) => /\.with\(\s*[\w.]*tenant\(/.test(e) || /\.serverOnly\(\s*\)/.test(e), zn = w({
3210
3210
  version: "0.34.0",
3211
3211
  id: "0.34.0/02_keyed-writes-are-tenant-scoped",
3212
3212
  title: "Keyed-by-pk writes are tenant-enforced, and `crud` refuses `.serverOnly()` input",
3213
3213
  kind: "manual",
3214
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => In(e.getFullText())),
3214
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Rn(e.getFullText())),
3215
3215
  note: [
3216
3216
  "TWO WRITE-SIDE REFUSALS ARE NEW. Neither changes a type, so `tsc` will not",
3217
3217
  "point at the call sites — these are runtime behaviour changes.",
@@ -3275,30 +3275,30 @@ var C = (e, t, n) => {
3275
3275
  " an attack look like a no-op and leaves an honest caller debugging a",
3276
3276
  " value that quietly did not land."
3277
3277
  ].join("\n")
3278
- }), Rn = /* @__PURE__ */ new Set([
3278
+ }), Bn = /* @__PURE__ */ new Set([
3279
3279
  "defineQuery",
3280
3280
  "defineMutation",
3281
3281
  "defineAction",
3282
3282
  "defineStream"
3283
- ]), zn = (e) => {
3283
+ ]), Vn = (e) => {
3284
3284
  let t = e.getArguments()[0];
3285
- if (t === void 0 || !t.isKind(S.ObjectLiteralExpression)) return /* @__PURE__ */ new Set();
3285
+ if (t === void 0 || !t.isKind(x.ObjectLiteralExpression)) return /* @__PURE__ */ new Set();
3286
3286
  let n = /* @__PURE__ */ new Set();
3287
3287
  for (let e of t.getProperties()) {
3288
- let t = (e.asKind(S.PropertyAssignment) ?? e.asKind(S.ShorthandPropertyAssignment))?.getName?.();
3288
+ let t = (e.asKind(x.PropertyAssignment) ?? e.asKind(x.ShorthandPropertyAssignment))?.getName?.();
3289
3289
  t !== void 0 && n.add(t);
3290
3290
  }
3291
3291
  return n;
3292
- }, Bn = (e, t) => /define(Query|Mutation|Action|Stream)\s*\(/.test(e) ? t.some((e) => {
3293
- if (!Rn.has(e.getExpression().getText())) return !1;
3294
- let t = zn(e);
3292
+ }, Hn = (e, t) => /define(Query|Mutation|Action|Stream)\s*\(/.test(e) ? t.some((e) => {
3293
+ if (!Bn.has(e.getExpression().getText())) return !1;
3294
+ let t = Vn(e);
3295
3295
  return !t.has("internal") && !t.has("guards") && !t.has("openAccess");
3296
- }) : !1, Vn = T({
3296
+ }) : !1, Un = w({
3297
3297
  version: "0.34.0",
3298
3298
  id: "0.34.0/03_procedure-access-decision",
3299
3299
  title: "Every wire-exposed procedure declares an access decision (`guards:` or `openAccess:`)",
3300
3300
  kind: "manual",
3301
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Bn(e.getFullText(), e.getDescendantsOfKind(S.CallExpression))),
3301
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Hn(e.getFullText(), e.getDescendantsOfKind(x.CallExpression))),
3302
3302
  note: [
3303
3303
  "YOUR APP WILL NOT BOOT UNTIL EVERY WIRE-EXPOSED PROCEDURE DECIDES WHO MAY",
3304
3304
  "CALL IT. This is the single largest behaviour change in this release, and it",
@@ -3343,18 +3343,18 @@ var C = (e, t, n) => {
3343
3343
  "procedures your PLUGINS declare — the gate reads your app's own discovered",
3344
3344
  "files only, so adopting this does not turn into a plugin bug report."
3345
3345
  ].join("\n")
3346
- }), Hn = [
3346
+ }), Wn = [
3347
3347
  "workosAuthorizationUrl",
3348
3348
  "workosAuthenticateWithCode",
3349
3349
  "workosBeginLogin"
3350
- ], Un = T({
3350
+ ], Gn = w({
3351
3351
  version: "0.34.0",
3352
3352
  id: "0.34.0/04_workos-oauth-state-pkce",
3353
3353
  title: "WorkOS hosted login: `workosAuthorizationUrl` → `workosBeginLogin`, with mandatory `state` + PKCE",
3354
3354
  kind: "manual",
3355
3355
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
3356
3356
  let t = e.getFullText();
3357
- return t.includes("@voltro/plugin-auth-workos") && Hn.some((e) => t.includes(e));
3357
+ return t.includes("@voltro/plugin-auth-workos") && Wn.some((e) => t.includes(e));
3358
3358
  }),
3359
3359
  note: [
3360
3360
  "YOUR WORKOS HOSTED-LOGIN FLOW HAD NO CSRF PROTECTION BY DEFAULT, AND NO PKCE.",
@@ -3412,12 +3412,12 @@ var C = (e, t, n) => {
3412
3412
  "are accepted on the existing endpoints; your registered redirect URI is",
3413
3413
  "unchanged."
3414
3414
  ].join("\n")
3415
- }), Wn = /mirrorTables|_?voltro_mirror_/, Gn = T({
3415
+ }), Kn = /mirrorTables|_?voltro_mirror_/, qn = w({
3416
3416
  version: "0.34.0",
3417
3417
  id: "0.34.0/05_analytics-mirror-versioned-writes",
3418
3418
  title: "Analytics CDC-mirror: version-ordered writes, tombstoned deletes, retry + repair",
3419
3419
  kind: "manual",
3420
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Wn.test(e.getFullText())),
3420
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Kn.test(e.getFullText())),
3421
3421
  note: [
3422
3422
  "The analytics CDC-mirror (`mirrorTables`) now orders every write and",
3423
3423
  "retries the ones that fail. Three things to do.",
@@ -3472,7 +3472,7 @@ var C = (e, t, n) => {
3472
3472
  " VOLTRO_ANALYTICS_MIRROR_REPAIR_INTERVAL_MS (60000, 0 disables)",
3473
3473
  " VOLTRO_ANALYTICS_MIRROR_REPAIR_QUEUE_LIMIT (10000)"
3474
3474
  ].join("\n")
3475
- }), Kn = T({
3475
+ }), Jn = w({
3476
3476
  version: "0.34.0",
3477
3477
  id: "0.34.0/06_origin-guard-and-trusted-proxies",
3478
3478
  title: "Cross-site protection, trusted proxies and security headers are ON by default on the api listener",
@@ -3596,7 +3596,7 @@ var C = (e, t, n) => {
3596
3596
  " a `Transfer-Encoding: chunked` body skipped it and was buffered without",
3597
3597
  " bound. No action needed; VOLTRO_MAX_RPC_BODY_BYTES still tunes it."
3598
3598
  ].join("\n")
3599
- }), qn = T({
3599
+ }), Yn = w({
3600
3600
  version: "0.34.0",
3601
3601
  id: "0.34.0/07_incoming-webhook-declares-verification",
3602
3602
  title: "An incoming webhook with no signature scheme now refuses to boot",
@@ -3645,7 +3645,7 @@ var C = (e, t, n) => {
3645
3645
  "value — the sender holds the other half of it, so a generated one would",
3646
3646
  "authenticate nobody."
3647
3647
  ].join("\n")
3648
- }), Jn = T({
3648
+ }), Xn = w({
3649
3649
  version: "0.34.0",
3650
3650
  id: "0.34.0/08_init-initialises-the-workspace",
3651
3651
  title: "`voltro init` initialises the workspace root; scaffolding is `create-project` only",
@@ -3697,20 +3697,20 @@ var C = (e, t, n) => {
3697
3697
  "all 18 of its scripts — including the `pnpm db:up` the CLI then printed as a",
3698
3698
  "next step. Run `voltro init` in the root first."
3699
3699
  ].join("\n")
3700
- }), Yn = (e, t) => (e.getProperty(t)?.asKind(S.PropertyAssignment))?.getInitializer()?.asKind(S.ObjectLiteralExpression), Xn = (e) => {
3700
+ }), Zn = (e, t) => (e.getProperty(t)?.asKind(x.PropertyAssignment))?.getInitializer()?.asKind(x.ObjectLiteralExpression), Qn = (e) => {
3701
3701
  if (e.getExpression().getText() !== "workflow") return !1;
3702
- let t = e.getArguments()[0]?.asKind(S.ObjectLiteralExpression);
3702
+ let t = e.getArguments()[0]?.asKind(x.ObjectLiteralExpression);
3703
3703
  if (t === void 0) return !1;
3704
- let n = Yn(t, "messages");
3704
+ let n = Zn(t, "messages");
3705
3705
  return n !== void 0 && n.getProperty("queries") !== void 0;
3706
- }, Zn = T({
3706
+ }, $n = w({
3707
3707
  version: "0.34.0",
3708
3708
  id: "0.34.0/09_workflow-messages-queries-removed",
3709
3709
  title: "`workflow({ messages: { queries } })` is removed — it never had a send path",
3710
3710
  kind: "manual",
3711
3711
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
3712
3712
  let t = e.getFullText();
3713
- return !t.includes("queries") || !/workflow\s*\(/.test(t) ? !1 : e.getDescendantsOfKind(S.CallExpression).some(Xn);
3713
+ return !t.includes("queries") || !/workflow\s*\(/.test(t) ? !1 : e.getDescendantsOfKind(x.CallExpression).some(Qn);
3714
3714
  }),
3715
3715
  note: [
3716
3716
  "YOU DECLARED `messages: { queries: { … } }` ON A WORKFLOW. That channel is",
@@ -3753,7 +3753,7 @@ var C = (e, t, n) => {
3753
3753
  "in-flight runs finish on the old path after a deploy. See the Versioning",
3754
3754
  "page in the docs."
3755
3755
  ].join("\n")
3756
- }), Qn = T({
3756
+ }), er = w({
3757
3757
  version: "0.34.0",
3758
3758
  id: "0.34.0/11_ai-flows-per-step-human-signal",
3759
3759
  title: "`HUMAN_RESPONSE_SIGNAL` removed — a human step's signal name is now per-step",
@@ -3797,23 +3797,23 @@ var C = (e, t, n) => {
3797
3797
  "per flow (`humanTimeoutMs`), per app (`aiFlowsPlugin({ humanReviewTimeoutMs })`)",
3798
3798
  "or per deploy (`VOLTRO_AI_FLOW_HUMAN_REVIEW_TIMEOUT_HOURS`). `0` = wait forever."
3799
3799
  ].join("\n")
3800
- }), $n = /* @__PURE__ */ new Set([
3800
+ }), tr = /* @__PURE__ */ new Set([
3801
3801
  "@voltro/plugin-auth",
3802
3802
  "@voltro/protocol/session",
3803
3803
  "@voltro/plugin-sso-saml"
3804
- ]), er = /* @__PURE__ */ new Set(["issueSession", "signSession"]), tr = (e) => {
3804
+ ]), nr = /* @__PURE__ */ new Set(["issueSession", "signSession"]), rr = (e) => {
3805
3805
  let t = e.getFullText();
3806
3806
  if (!/issueSession|signSession|resolveScopes|@voltro\/(plugin-auth|protocol\/session|plugin-sso-saml)/.test(t)) return !1;
3807
- for (let t of e.getImportDeclarations()) if ($n.has(t.getModuleSpecifierValue())) return !0;
3808
- for (let t of e.getDescendantsOfKind(S.CallExpression)) if (er.has(t.getExpression().getText())) return !0;
3809
- for (let t of e.getDescendantsOfKind(S.PropertyAssignment)) if (t.getName() === "resolveScopes") return !0;
3807
+ for (let t of e.getImportDeclarations()) if (tr.has(t.getModuleSpecifierValue())) return !0;
3808
+ for (let t of e.getDescendantsOfKind(x.CallExpression)) if (nr.has(t.getExpression().getText())) return !0;
3809
+ for (let t of e.getDescendantsOfKind(x.PropertyAssignment)) if (t.getName() === "resolveScopes") return !0;
3810
3810
  return !1;
3811
- }, nr = T({
3811
+ }, ir = w({
3812
3812
  version: "0.34.0",
3813
3813
  id: "0.34.0/12_session-cookie-carries-identity",
3814
3814
  title: "The session cookie carries identity only — authority resolves per request",
3815
3815
  kind: "manual",
3816
- appliesTo: ({ project: e }) => e.getSourceFiles().some(tr),
3816
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(rr),
3817
3817
  note: [
3818
3818
  "YOUR USERS WILL SIGN IN ONCE MORE, AND A SESSION COOKIE CAN NO LONGER",
3819
3819
  "CARRY PERMISSIONS.",
@@ -3904,12 +3904,12 @@ var C = (e, t, n) => {
3904
3904
  "not have: an authoritative resolver now overrides a token's own scope",
3905
3905
  "claim, which union-only could never do."
3906
3906
  ].join("\n")
3907
- }), rr = /\bMockEmail\b|\.email\.(sent|lastTo|clear)\b|\bSentEmail\b/, ir = T({
3907
+ }), ar = /\bMockEmail\b|\.email\.(sent|lastTo|clear)\b|\bSentEmail\b/, or = w({
3908
3908
  version: "0.34.0",
3909
3909
  id: "0.34.0/10_testing-mail-is-a-service",
3910
3910
  title: "`ctx.email` / `MockEmail` removed — assert mail through the mail plugin",
3911
3911
  kind: "manual",
3912
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => rr.test(e.getFullText())),
3912
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ar.test(e.getFullText())),
3913
3913
  note: [
3914
3914
  "`@voltro/testing` no longer ships `MockEmail`, and `makeTestContext()` no",
3915
3915
  "longer returns `ctx.email`. Your tests that touch it will not compile.",
@@ -3978,12 +3978,12 @@ var C = (e, t, n) => {
3978
3978
  " • `makeTestContext({ layers })` — your app's own `app.config.ts`",
3979
3979
  " `layers:` now resolve for an Effect-mode handler under test."
3980
3980
  ].join("\n")
3981
- }), ar = /from\s+['"]@voltro\/plugin-billing(?:\/[\w-]+)?['"]/, or = T({
3981
+ }), sr = /from\s+['"]@voltro\/plugin-billing(?:\/[\w-]+)?['"]/, cr = w({
3982
3982
  version: "0.34.0",
3983
3983
  id: "0.34.0/13_billing-provider-dunning",
3984
3984
  title: "Billing dunning — `BillingProvider.fetchSubscription` is required, and `plan()` now honours a grace period",
3985
3985
  kind: "manual",
3986
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ar.test(e.getFullText())),
3986
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => sr.test(e.getFullText())),
3987
3987
  note: [
3988
3988
  "BILLING GAINED A DUNNING SEQUENCE. TWO THINGS CHANGED UNDER YOU.",
3989
3989
  "",
@@ -4059,12 +4059,12 @@ var C = (e, t, n) => {
4059
4059
  "`pastDueSince` / `statusEventAt` columns ride the declarative differ — they",
4060
4060
  "are applied by `voltro db apply` and by a `voltro dev` boot, on every dialect."
4061
4061
  ].join("\n")
4062
- }), sr = /from\s+['"]@voltro\/plugin-search(?:\/[\w-]+)?['"]/, cr = T({
4062
+ }), lr = /from\s+['"]@voltro\/plugin-search(?:\/[\w-]+)?['"]/, ur = w({
4063
4063
  version: "0.34.0",
4064
4064
  id: "0.34.0/14_search-memory-backend-refuses-production",
4065
4065
  title: "`plugin-search` on the in-memory backend now refuses to boot in production",
4066
4066
  kind: "manual",
4067
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => sr.test(e.getFullText())),
4067
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => lr.test(e.getFullText())),
4068
4068
  note: [
4069
4069
  "THE ZERO-CONFIG SEARCH BACKEND NO LONGER BOOTS IN PRODUCTION.",
4070
4070
  "",
@@ -4133,7 +4133,7 @@ var C = (e, t, n) => {
4133
4133
  "(`ts_headline` / `snippet()` / …) that `SearchQuery` promises. Degrading",
4134
4134
  "those silently would replace one lie with another."
4135
4135
  ].join("\n")
4136
- }), lr = T({
4136
+ }), dr = w({
4137
4137
  version: "0.34.0",
4138
4138
  id: "0.34.0/15_mysql-mssql-tls-honoured",
4139
4139
  title: "mysql/mariadb and mssql connections honour ?ssl= / ?sslmode= — or refuse to boot",
@@ -4205,7 +4205,7 @@ var C = (e, t, n) => {
4205
4205
  "spins in-tick and starves the event loop. Set it only if you know nothing in",
4206
4206
  "your process does that, and set it well above their peak concurrency."
4207
4207
  ].join("\n")
4208
- }), ur = T({
4208
+ }), fr = w({
4209
4209
  version: "0.34.0",
4210
4210
  id: "0.34.0/16_declare-node-env-for-migration-commands",
4211
4211
  title: "`voltro db apply` / `voltro migrate` now treat an unset NODE_ENV as production",
@@ -4269,12 +4269,12 @@ var C = (e, t, n) => {
4269
4269
  "process environment if you want a non-production `voltro serve` without a",
4270
4270
  "built bundle. Everything downstream of the launcher does honour `.env`."
4271
4271
  ].join("\n")
4272
- }), dr = /\/(?:src\/)?pages\//, fr = /\bcacheInvalidatesOn\b/, pr = T({
4272
+ }), pr = /\/(?:src\/)?pages\//, mr = /\bcacheInvalidatesOn\b/, hr = w({
4273
4273
  version: "0.34.0",
4274
4274
  id: "0.34.0/17_isr-postgres-refuses-without-a-database",
4275
4275
  title: "The postgres ISR cache + CDC invalidator read DB_URL, and no longer fall back silently",
4276
4276
  kind: "manual",
4277
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => fr.test(e.getFullText()) || dr.test(e.getFilePath())),
4277
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => mr.test(e.getFullText()) || pr.test(e.getFilePath())),
4278
4278
  note: [
4279
4279
  "YOUR WEB PROCESS MAY HAVE BEEN USING THE MEMORY ISR CACHE ALL ALONG.",
4280
4280
  "",
@@ -4319,12 +4319,12 @@ var C = (e, t, n) => {
4319
4319
  " until their `revalidate` window expires. Give the web process a `DB_URL`",
4320
4320
  " or remove the declaration."
4321
4321
  ].join("\n")
4322
- }), mr = /\.migration\.ts$/, hr = T({
4322
+ }), gr = /\.migration\.ts$/, _r = w({
4323
4323
  version: "0.34.0",
4324
4324
  id: "0.34.0/18_serve-refuses-pending-file-migrations",
4325
4325
  title: "`voltro serve` refuses to boot with pending file-based migrations",
4326
4326
  kind: "manual",
4327
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => mr.test(e.getFilePath())),
4327
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => gr.test(e.getFilePath())),
4328
4328
  note: [
4329
4329
  "YOUR DEPLOY MUST RUN `migrations/*.migration.ts` BEFORE `voltro serve`.",
4330
4330
  "",
@@ -4367,11 +4367,11 @@ var C = (e, t, n) => {
4367
4367
  "fingerprint check — it is the one switch for \"no boot-time schema checks\",",
4368
4368
  "and it now covers both."
4369
4369
  ].join("\n")
4370
- }), gr = /* @__PURE__ */ new Set([
4370
+ }), vr = /* @__PURE__ */ new Set([
4371
4371
  "@voltro/plugin-auth",
4372
4372
  "@voltro/plugin-auth/schema",
4373
4373
  "@voltro/plugin-auth/plugin"
4374
- ]), _r = /* @__PURE__ */ new Set([
4374
+ ]), yr = /* @__PURE__ */ new Set([
4375
4375
  "UserStore",
4376
4376
  "authTables",
4377
4377
  "SendEmail",
@@ -4379,20 +4379,20 @@ var C = (e, t, n) => {
4379
4379
  "memoryUserStore",
4380
4380
  "postgresUserStore",
4381
4381
  "authRoutesPlugin"
4382
- ]), vr = (e) => {
4382
+ ]), br = (e) => {
4383
4383
  if (!e.getFullText().includes("@voltro/plugin-auth")) return !1;
4384
- for (let t of e.getImportDeclarations()) if (gr.has(t.getModuleSpecifierValue())) {
4385
- for (let e of t.getNamedImports()) if (_r.has(e.getName())) return !0;
4384
+ for (let t of e.getImportDeclarations()) if (vr.has(t.getModuleSpecifierValue())) {
4385
+ for (let e of t.getNamedImports()) if (yr.has(e.getName())) return !0;
4386
4386
  if (t.getNamespaceImport() !== void 0) return !0;
4387
4387
  }
4388
- for (let t of e.getDescendantsOfKind(S.TypeReference)) if (t.getTypeName().getText() === "UserStore") return !0;
4388
+ for (let t of e.getDescendantsOfKind(x.TypeReference)) if (t.getTypeName().getText() === "UserStore") return !0;
4389
4389
  return !1;
4390
- }, yr = T({
4390
+ }, xr = w({
4391
4391
  version: "0.34.0",
4392
4392
  id: "0.34.0/20_user-store-auth-feature-methods",
4393
4393
  title: "UserStore gained the email-verification, invitation and impersonation methods",
4394
4394
  kind: "manual",
4395
- appliesTo: ({ project: e }) => e.getSourceFiles().some(vr),
4395
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(br),
4396
4396
  note: [
4397
4397
  "IF YOU USE memoryUserStore OR postgresUserStore, THERE IS NOTHING TO DO.",
4398
4398
  "Both already implement everything below. Read on only if you wrote your",
@@ -4472,26 +4472,26 @@ var C = (e, t, n) => {
4472
4472
  " is the difference between \"new signups must confirm\" and \"everyone is",
4473
4473
  " locked out until they check their mail\"."
4474
4474
  ].join("\n")
4475
- }), U = /* @__PURE__ */ new Set([
4475
+ }), Sr = /* @__PURE__ */ new Set([
4476
4476
  "bindConnectionSubject",
4477
4477
  "getConnectionSubject",
4478
4478
  "unbindConnectionSubject",
4479
4479
  "onBindConnectionSubject",
4480
4480
  "connectionSubjectsSnapshot"
4481
- ]), br = (e) => {
4481
+ ]), Cr = (e) => {
4482
4482
  let t = e.getFullText();
4483
4483
  if (!/ConnectionSubject|connectionSubjectsSnapshot|rebind/.test(t)) return !1;
4484
- for (let t of e.getDescendantsOfKind(S.CallExpression)) if (U.has(t.getExpression().getText())) return !0;
4485
- for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) if (U.has(e.getName())) return !0;
4486
- for (let t of e.getDescendantsOfKind(S.PropertyAssignment)) if (t.getName() === "rebind") return !0;
4487
- for (let t of e.getDescendantsOfKind(S.ShorthandPropertyAssignment)) if (t.getName() === "rebind") return !0;
4484
+ for (let t of e.getDescendantsOfKind(x.CallExpression)) if (Sr.has(t.getExpression().getText())) return !0;
4485
+ for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) if (Sr.has(e.getName())) return !0;
4486
+ for (let t of e.getDescendantsOfKind(x.PropertyAssignment)) if (t.getName() === "rebind") return !0;
4487
+ for (let t of e.getDescendantsOfKind(x.ShorthandPropertyAssignment)) if (t.getName() === "rebind") return !0;
4488
4488
  return !1;
4489
- }, xr = T({
4489
+ }, wr = w({
4490
4490
  version: "0.34.0",
4491
4491
  id: "0.34.0/19_connection-override-carries-a-credential",
4492
4492
  title: "Soft re-auth presents a credential — it no longer hands the server a Subject",
4493
4493
  kind: "manual",
4494
- appliesTo: ({ project: e }) => e.getSourceFiles().some(br),
4494
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(Cr),
4495
4495
  note: [
4496
4496
  "A LIVE CONNECTION CAN NO LONGER BE HANDED A SUBJECT. IT PRESENTS A",
4497
4497
  "CREDENTIAL, AND THE SERVER RESOLVES IT LIKE ANY OTHER REQUEST.",
@@ -4576,19 +4576,19 @@ var C = (e, t, n) => {
4576
4576
  "it behaves identically under `voltro dev` and `voltro serve`, because both",
4577
4577
  "now build the middleware from one function (`makeAuthMiddlewareLayers`)."
4578
4578
  ].join("\n")
4579
- }), Sr = (e) => {
4579
+ }), Tr = (e) => {
4580
4580
  if (/\.workflow(\.server)?\.tsx?$/.test(e.getBaseName())) return !0;
4581
4581
  let t = e.getFullText();
4582
4582
  if (!/resolveScopes|defineWorkflow|ctx\.workflows/.test(t)) return !1;
4583
- for (let t of e.getDescendantsOfKind(S.PropertyAssignment)) if (t.getName() === "resolveScopes") return !0;
4584
- for (let t of e.getDescendantsOfKind(S.CallExpression)) if (t.getExpression().getText() === "defineWorkflow") return !0;
4583
+ for (let t of e.getDescendantsOfKind(x.PropertyAssignment)) if (t.getName() === "resolveScopes") return !0;
4584
+ for (let t of e.getDescendantsOfKind(x.CallExpression)) if (t.getExpression().getText() === "defineWorkflow") return !0;
4585
4585
  return !1;
4586
- }, Cr = T({
4586
+ }, Er = w({
4587
4587
  version: "0.34.0",
4588
4588
  id: "0.34.0/20_workflow-authority-resolves-at-resume",
4589
4589
  title: "A resumed workflow re-resolves its caller's authority instead of restoring it",
4590
4590
  kind: "manual",
4591
- appliesTo: ({ project: e }) => e.getSourceFiles().some(Sr),
4591
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(Tr),
4592
4592
  note: [
4593
4593
  "A WORKFLOW NO LONGER CARRIES ITS CALLER'S PERMISSIONS FORWARD. IT CARRIES",
4594
4594
  "THEIR IDENTITY, AND ASKS YOUR APP WHAT THEY MAY DO WHEN IT RUNS.",
@@ -4653,7 +4653,7 @@ var C = (e, t, n) => {
4653
4653
  " contain scopes and are stripped on READ — a resumed run cannot re-assert",
4654
4654
  " authority the old build persisted."
4655
4655
  ].join("\n")
4656
- }), wr = /* @__PURE__ */ new Set([
4656
+ }), Dr = /* @__PURE__ */ new Set([
4657
4657
  "listTag",
4658
4658
  "createTag",
4659
4659
  "updateTag",
@@ -4661,21 +4661,21 @@ var C = (e, t, n) => {
4661
4661
  "createScope",
4662
4662
  "writeScope",
4663
4663
  "deleteScope"
4664
- ]), Tr = (e) => {
4664
+ ]), Or = (e) => {
4665
4665
  let t = e.getFullText();
4666
4666
  if (!/EntityAdminSpec|deriveEntityAdmins|Tag\b|Scope\b/.test(t)) return !1;
4667
4667
  for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) {
4668
4668
  let t = e.getName();
4669
4669
  if (t === "EntityAdminSpec" || t === "deriveEntityAdmins") return !0;
4670
4670
  }
4671
- for (let t of e.getDescendantsOfKind(S.PropertyAccessExpression)) if (wr.has(t.getName())) return !0;
4671
+ for (let t of e.getDescendantsOfKind(x.PropertyAccessExpression)) if (Dr.has(t.getName())) return !0;
4672
4672
  return !1;
4673
- }, Er = T({
4673
+ }, kr = w({
4674
4674
  version: "0.34.0",
4675
4675
  id: "0.34.0/21_admin-gates-on-declared-access",
4676
4676
  title: "The derived admin gates on the api's DECLARED access — the invented `<table>:create` scopes are gone",
4677
4677
  kind: "manual",
4678
- appliesTo: ({ project: e }) => e.getSourceFiles().some(Tr),
4678
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(Or),
4679
4679
  note: [
4680
4680
  "YOUR ADMIN WAS GATING ON SCOPE STRINGS NOTHING PRODUCED.",
4681
4681
  "",
@@ -4765,14 +4765,14 @@ var C = (e, t, n) => {
4765
4765
  "from \"undeclared\", so an intentionally public action rendered as forbidden",
4766
4766
  "to everybody."
4767
4767
  ].join("\n")
4768
- }), Dr = /\b(useMutation|useAction|useWorkflow|useWorkflowSignal|useWorkflowUpdate|useUpload)\b/, Or = /FiberFailure|Cause\.squash|squashWith/, kr = T({
4768
+ }), Ar = /\b(useMutation|useAction|useWorkflow|useWorkflowSignal|useWorkflowUpdate|useUpload)\b/, jr = /FiberFailure|Cause\.squash|squashWith/, Mr = w({
4769
4769
  version: "0.34.0",
4770
4770
  id: "0.34.0/22_write-rejections-carry-the-typed-error",
4771
4771
  title: "A rejected mutate/run/signal/upload carries the typed error, not a FiberFailure",
4772
4772
  kind: "manual",
4773
4773
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
4774
4774
  let t = e.getFullText();
4775
- return Dr.test(t) || Or.test(t);
4775
+ return Ar.test(t) || jr.test(t);
4776
4776
  }),
4777
4777
  note: [
4778
4778
  "WHAT CHANGED. A write hook that rejects now rejects with the typed error",
@@ -4825,12 +4825,12 @@ var C = (e, t, n) => {
4825
4825
  "contract, reject from a real rpc client, or assert on the value your",
4826
4826
  "component branches on rather than on the literal the test wrote."
4827
4827
  ].join("\n")
4828
- }), Ar = /@voltro\/plugin-sso-saml|samlSsoPlugin/, jr = T({
4828
+ }), Nr = /@voltro\/plugin-sso-saml|samlSsoPlugin/, Pr = w({
4829
4829
  version: "0.34.0",
4830
4830
  id: "0.34.0/23_saml-signature-and-replay-defaults",
4831
4831
  title: "SAML: response-signature requirement relaxed + surfaced; replay protection ON by default",
4832
4832
  kind: "manual",
4833
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ar.test(e.getFullText())),
4833
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Nr.test(e.getFullText())),
4834
4834
  note: [
4835
4835
  "Two defaults in `samlSsoPlugin` moved. Read both — they interact.",
4836
4836
  "",
@@ -4921,58 +4921,58 @@ var C = (e, t, n) => {
4921
4921
  "request, and the envelope is unauthenticated. If you must run unsolicited,",
4922
4922
  "set `wantAuthnResponseSigned: true`."
4923
4923
  ].join("\n")
4924
- }), Mr = /\b(signPayload|verifySignature)\s*\(/, Nr = T({
4924
+ }), Fr = /\b(signPayload|verifySignature)\s*\(/, Ir = w({
4925
4925
  version: "0.34.0",
4926
4926
  id: "0.34.0/24_webhook-signing-renders-headers",
4927
4927
  title: "Webhook signing: `signPayload`/`verifySignature` → `signRequest`/`verifyRequest`",
4928
4928
  kind: "manual",
4929
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Mr.test(e.getFullText())),
4929
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Fr.test(e.getFullText())),
4930
4930
  note: "A webhook signature scheme now renders a header MAP rather than one header,\nand verifies against the request's whole header map.\n\n - signPayload(scheme, rawBody, secret)\n → signRequest(scheme, { rawBody, secret, messageId })\n returns { headers } instead of { headerName, headerValue }\n\n - verifySignature(scheme, rawBody, secret, headerValue)\n → verifyRequest(scheme, { rawBody, secret, headers })\n\nRewrite each call site:\n\n // before\n const { headerName, headerValue } = signPayload(scheme, body, secret)\n await fetch(url, { headers: { [headerName]: headerValue }, body })\n\n // after\n const { headers } = signRequest(scheme, { rawBody: body, secret, messageId: deliveryId })\n await fetch(url, { headers, body })\n\nWHY `messageId` IS REQUIRED, AND WHY THIS IS NOT AUTOMATED:\n\n Standard Webhooks signs over `<messageId>.<timestamp>.<body>` and sends the\n id as `webhook-id` — which is also the value the spec tells consumers to\n use as their IDEMPOTENCY KEY. Pass the id that identifies the message to\n THAT receiver, stable across retries (the framework passes its delivery\n id). A fresh `randomUUID()` per attempt compiles and reads fine, and\n quietly makes every retry look like a new message to the receiver.\n\nTHE DEFAULT OUTGOING SCHEME CHANGED:\n\n `defaultOutgoingSignature()` now returns Standard Webhooks v1.0.0 —\n `webhook-id` / `webhook-timestamp` / `webhook-signature: v1,<base64>` — so\n a NEW subscription signs to an interoperable spec every conformant\n consumer library already verifies. Existing target rows are untouched:\n each stores the scheme it was created with.\n\n Its key serialization differs too: `whsec_` + base64 of 24..64 random\n bytes, HMAC-ing the DECODED bytes. `subscribe()` mints the right shape\n automatically; passing your own hex secret for a standard-webhooks target\n is REFUSED at subscribe rather than producing signatures no consumer\n accepts.\n\n To keep the previous house format on a new subscription, pass it\n explicitly: `webhooks.subscribe({ …, signing: genericHmacSignature() })`\n — the same shape as before, under a name that says it is a choice.\n\nALSO IN THIS RELEASE, no code change needed:\n\n - a 3xx response is a failure and redirects are no longer FOLLOWED (they\n were, by fetch's default — which also walked past the SSRF guard);\n - a `410 Gone` disables the target immediately, whatever the\n consecutive-failure threshold says;\n - each attempt has a 30s wire timeout (`VOLTRO_WEBHOOK_TIMEOUT_MS`, or\n `timeoutMs`). There was none, so a receiver that accepted the connection\n and never answered held the delivery workflow open indefinitely.\n\nAnd `slackSignature()` is now a REAL verifier. It shipped as a stub that\nreturned false unconditionally, workable only through a header-packing\nconvention in the route mounter. A scheme now receives the whole header map\nand reads `x-slack-request-timestamp` itself."
4931
- }), Pr = /from\s+['"]@voltro\/plugin-presence(?:\/[a-z]+)?['"]/, Fr = /\b(lastSeen|presenceTable|memoryPresenceStore|isOnline|filterOnline|staleKeys|PresenceStore|PresenceEntry|PresenceTracker)\b/, Ir = /_voltro_presence/, Lr = T({
4931
+ }), Lr = /from\s+['"]@voltro\/plugin-presence(?:\/[a-z]+)?['"]/, Rr = /\b(lastSeen|presenceTable|memoryPresenceStore|isOnline|filterOnline|staleKeys|PresenceStore|PresenceEntry|PresenceTracker)\b/, zr = /_voltro_presence/, Br = w({
4932
4932
  version: "0.34.0",
4933
4933
  id: "0.34.0/25_presence-has-no-table",
4934
4934
  title: "Presence: `_voltro_presence` is gone, and so is `lastSeen` on the roster",
4935
4935
  kind: "manual",
4936
4936
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
4937
4937
  let t = e.getFullText();
4938
- return Ir.test(t) || Pr.test(t) && Fr.test(t);
4938
+ return zr.test(t) || Lr.test(t) && Rr.test(t);
4939
4939
  }),
4940
4940
  note: "@voltro/plugin-presence no longer declares a table. Four things moved.\n\n1. A roster member is now { key, meta } — there is NO `lastSeen`.\n\n It was the OWNING replica's clock, so on more than one replica \"active 3\n minutes ago\" rendered from it was wrong by the skew between two pods, with\n nothing to say so. It was also the only field a plain heartbeat changed,\n which is what made the roster push on every beat instead of on every change.\n\n // before\n members.map((m) => `${m.key} — ${ago(m.lastSeen)}`)\n // after: put anything time-shaped you need into meta\n usePresence(channel, { meta: { joinedAt: Date.now() } })\n members.map((m) => `${m.key} — ${ago(m.meta?.joinedAt)}`)\n\n2. `PresenceTracker.track()` and `.untrack()` return { delta, changed }.\n\n // before\n bus.announce(tracker.track({ channel, tenantId, key }))\n // after — announce ALWAYS (a peer's sweep needs the liveness signal),\n // push only on a change\n const write = tracker.track({ channel, tenantId, key })\n bus.announce(write.delta)\n if (write.changed) publishReactivity(store, presenceRoster)\n\n Do not blind-append `.delta` and move on: dropping `changed` restores the\n per-heartbeat push this release removed, and nothing will report it.\n\n `attachPresenceBus` also takes an optional `onRosterChanged` now — call it\n if you drive the bus yourself, or a peer's join and a peer's death will\n update your tracker and push nobody.\n\n3. These exports are DELETED, with no replacement:\n\n presenceTable, PresenceStore, PresenceEntry,\n memoryPresenceStore, isOnline, filterOnline, staleKeys\n\n They were the table era's read model — an abstraction over rows plus the\n staleness filter a row needed because it outlived the client that wrote it.\n Presence has neither. Reading the roster is `presence.list` / `usePresence`;\n the staleness sweep is the plugin's own and needs nothing from you.\n\n4. If your `source:` names '_voltro_presence' as a string, point it at the\n channel object instead:\n\n import { presenceRoster } from '@voltro/plugin-presence'\n defineQuery({ name: 'room.summary', source: presenceRoster, ... })\n\n And to push it yourself:\n\n import { publishReactivity } from '@voltro/protocol'\n publishReactivity(ctx.store, presenceRoster)\n\nTHE TABLE IS NOT DROPPED FOR YOU. The declarative differ never plans a drop for\na framework table no app declares — deliberately, so a live `_voltro_*` table is\nnever destroyed by an app that simply does not know about it. So an existing\n`_voltro_presence` stays, empty, until you remove it:\n\n DROP TABLE IF EXISTS _voltro_presence;\n\nIt holds no data anyone can use: nothing has written a row to it since presence\nmoved into memory."
4941
- }), Rr = (e) => {
4941
+ }), Vr = (e) => {
4942
4942
  let t = e.getArguments()[0];
4943
- if (t === void 0 || !t.isKind(S.ObjectLiteralExpression)) return /* @__PURE__ */ new Set();
4943
+ if (t === void 0 || !t.isKind(x.ObjectLiteralExpression)) return /* @__PURE__ */ new Set();
4944
4944
  let n = /* @__PURE__ */ new Set();
4945
4945
  for (let e of t.getProperties()) {
4946
- let t = (e.asKind(S.PropertyAssignment) ?? e.asKind(S.ShorthandPropertyAssignment))?.getName?.();
4946
+ let t = (e.asKind(x.PropertyAssignment) ?? e.asKind(x.ShorthandPropertyAssignment))?.getName?.();
4947
4947
  t !== void 0 && n.add(t);
4948
4948
  }
4949
4949
  return n;
4950
- }, zr = (e, t) => /defineEvent\s*\(/.test(e) ? t.some((e) => {
4950
+ }, Hr = (e, t) => /defineEvent\s*\(/.test(e) ? t.some((e) => {
4951
4951
  if (e.getExpression().getText() !== "defineEvent") return !1;
4952
- let t = Rr(e);
4952
+ let t = Vr(e);
4953
4953
  return !t.has("guards") && !t.has("openAccess");
4954
- }) : !1, Br = T({
4954
+ }) : !1, Ur = w({
4955
4955
  version: "0.35.0",
4956
4956
  id: "0.35.0/01_event-access-decision",
4957
4957
  title: "Every declared event decides who may listen (`guards:` or `openAccess:`)",
4958
4958
  kind: "manual",
4959
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => zr(e.getFullText(), e.getDescendantsOfKind(S.CallExpression))),
4959
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Hr(e.getFullText(), e.getDescendantsOfKind(x.CallExpression))),
4960
4960
  note: (/* @__PURE__ */ "YOUR APP WILL NOT BOOT UNTIL EVERY DECLARED EVENT DECIDES WHO MAY LISTEN.(This closes the sibling of 0.34.0's procedure gate: `defineEvent`'s `guards:`(was optional and enforcement skipped an empty list, so an event with no(decision was silently subscribable by ANY authenticated session that could(open the socket.((WHAT TO DO, IN THIS ORDER:((1) LIST THEM. `voltro doctor` prints every undecided event with its tag and( file — the same set, from the same function, that the boot refuses on.( `voltro doctor --json` carries it as `accessDecisions.undecided` for CI.((2) DECIDE EACH ONE. There are exactly two answers and they are not the same( claim:(( guards: [{ scope: 'display:read' }] a subscriber must hold a scope( openAccess: 'public scoreboard' anyone may listen — and why(( `openAccess` takes a REASON, not a boolean. It is what a reviewer reads( later, and it is what makes \"we decided this is open\" distinguishable( from \"nobody looked\".((3) DO NOT RUBBER-STAMP. Reaching for a scope every caller already holds( satisfies the gate, reads as protection, and enforces nothing. If the( event is open, say `openAccess`. If it should not be open, this gate just( found a real hole — an event often carries exactly the data its table( guards behind a scoped query.((IF YOU NEED TO SHIP FIRST. The same field that covers procedures covers(events, in `app.config.ts`:(( export default { security: { defaultDeny: false } }((That restores the old default-allow for the WHOLE app, in one place a(reviewer can see. There is no env var for it, on purpose. `voltro doctor`(keeps listing the undecided events while it is off, marked advisory.((NOT AFFECTED: apps already running `security: { defaultDeny: false }`, and(events your PLUGINS declare — the gate reads your app's own discovered(`*.event.ts` files only.".split("(")).join("\n")
4961
- }), Vr = /\brouteHttp\s*\(/, Hr = T({
4961
+ }), Wr = /\brouteHttp\s*\(/, Gr = w({
4962
4962
  version: "0.34.0",
4963
4963
  id: "0.34.0/26_route-http-is-async",
4964
4964
  title: "`routeHttp` returns a Promise",
4965
4965
  kind: "manual",
4966
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Vr.test(e.getFullText())),
4966
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Wr.test(e.getFullText())),
4967
4967
  note: "`routeHttp` (@voltro/mcp) is async now:\n\n routeHttp(options): HttpOutcome // before\n routeHttp(options): Promise<HttpOutcome> // after\n\nAwait it, and make the enclosing function async if it is not already:\n\n // before\n const outcome = routeHttp({ method, url, body, tools })\n if (outcome.kind === 'json') respond(outcome)\n\n // after\n const outcome = await routeHttp({ method, url, body, tools })\n if (outcome.kind === 'json') respond(outcome)\n\nWhy it moved: `tools/list` now folds in the app's agent tools and `tools/call`\nexecutes one, so two of the methods reach the app. The rest still resolve without\ntouching anything, and the function is still pure in the sense that matters — it\nbinds no socket, and a test supplies a `live` double.\n\nIf you use the shipped `serveHttp` transport there is nothing to do; it already\nawaits."
4968
- }), Ur = /@voltro\/plugin-(billing|governance|storage)/, Wr = /* @__PURE__ */ RegExp("\\b(billing\\.(startCheckout|portalUrl|previewChange|changePlan|changeSeats|invoices|reportUsage)|governance\\.(export|erase)|storage\\.(mintUploadUrl|ingestUrl|listRefs))\\b"), Gr = /\bdefinePluginRoute\s*\(|\broutes\s*:\s*\[/, Kr = T({
4968
+ }), Kr = /@voltro\/plugin-(billing|governance|storage)/, qr = /* @__PURE__ */ RegExp("\\b(billing\\.(startCheckout|portalUrl|previewChange|changePlan|changeSeats|invoices|reportUsage)|governance\\.(export|erase)|storage\\.(mintUploadUrl|ingestUrl|listRefs))\\b"), Jr = /\bdefinePluginRoute\s*\(|\broutes\s*:\s*\[/, Yr = w({
4969
4969
  version: "0.35.0",
4970
4970
  id: "0.35.0/02_plugin-procedures-carry-access-decisions",
4971
4971
  title: "First-party plugin procedures carry access decisions; twelve now require a scope",
4972
4972
  kind: "manual",
4973
4973
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
4974
4974
  let t = e.getFullText();
4975
- return Ur.test(t) || Wr.test(t) || Gr.test(t) && /VoltroPlugin|definePlugin/.test(t);
4975
+ return Kr.test(t) || qr.test(t) || Jr.test(t) && /VoltroPlugin|definePlugin/.test(t);
4976
4976
  }),
4977
4977
  note: [
4978
4978
  "Every first-party plugin rpc route now declares an access decision, and the",
@@ -5037,12 +5037,12 @@ var C = (e, t, n) => {
5037
5037
  "`openAccess` with the reason each is safe (self-scoped rows, signed",
5038
5038
  "subject-bound tickets, per-object grants), and behave exactly as before."
5039
5039
  ].join("\n")
5040
- }), qr = /AnalyticsMirrorImpl/, Jr = T({
5040
+ }), Xr = /AnalyticsMirrorImpl/, Zr = w({
5041
5041
  version: "0.35.0",
5042
5042
  id: "0.35.0/03_analytics-mirror-max-version",
5043
5043
  title: "Custom analytics mirror sinks answer `maxVersion` (fleet-scope seed read)",
5044
5044
  kind: "manual",
5045
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => qr.test(e.getFullText())),
5045
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Xr.test(e.getFullText())),
5046
5046
  note: [
5047
5047
  "The analytics CDC-mirror now derives its version from the CHANGE under",
5048
5048
  "`changeScope: 'fleet'` (postgres CDC, mysql binlog): warehouse baseline +",
@@ -5067,44 +5067,44 @@ var C = (e, t, n) => {
5067
5067
  "",
5068
5068
  "The read is issued at most once per key per process, off the commit path."
5069
5069
  ].join("\n")
5070
- }), Yr = (e) => /RunStepStatus/.test(e) || /['"]succeeded['"]/.test(e) && /['"]waiting['"]/.test(e) && /RunStep|runStep|flow/i.test(e), Xr = T({
5070
+ }), Qr = (e) => /RunStepStatus/.test(e) || /['"]succeeded['"]/.test(e) && /['"]waiting['"]/.test(e) && /RunStep|runStep|flow/i.test(e), $r = w({
5071
5071
  version: "0.35.0",
5072
5072
  id: "0.35.0/04_flow-run-step-skipped",
5073
5073
  title: "A flow run step can now be 'skipped' — handle it where you render a run timeline",
5074
5074
  kind: "manual",
5075
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Yr(e.getFullText())),
5075
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Qr(e.getFullText())),
5076
5076
  note: (/* @__PURE__ */ "A FLOW RUN STEP CAN NOW BE 'skipped'.((`when:` on a flow step gates it on a prior value, and a step whose condition(is false is SKIPPED rather than run. That is a sixth member of(`RunStepStatus`, so an exhaustive switch over it no longer compiles, and a(lookup keyed by status now has a hole.((WHAT TO DO:((1) FIND IT. Anywhere you render or branch on a run step status — a timeline( component, a status badge map, a progress calculation.((2) DECIDE WHAT A SKIPPED STEP LOOKS LIKE. It is NOT a failure and NOT a( success: it did not run, on purpose, and it produced no output. The( step carries `skipReason` — the rendered condition, e.g.( `{{mode}} equals \"full\"` — so the timeline can say WHY.((3) DO NOT DEFAULT IT TO INVISIBLE. Dropping the row compiles and reads fine( in review, and it reproduces exactly the problem `skipReason` exists to( prevent: a step that vanished is indistinguishable from a step nobody( declared, which is the first thing a user reports as a bug.((A PROGRESS COUNT probably needs a second look too: `succeeded / total` now(under-reports a completed run that skipped a step. Counting(`succeeded + skipped` against the total is usually what was meant.((If your app does not render a flow timeline, there is nothing to do — this(note fires on any file that names the status type or its literals.".split("(")).join("\n")
5077
- }), Zr = T({
5077
+ }), ei = w({
5078
5078
  version: "0.35.0",
5079
5079
  id: "0.35.0/05_declared-schema-drops-runtime-flags",
5080
5080
  title: "The declared schema no longer reads `CDC` / `VOLTRO_UNDO` / `VOLTRO_TRACING_PERSIST`",
5081
5081
  kind: "manual",
5082
5082
  appliesTo: () => !0,
5083
5083
  note: (/* @__PURE__ */ "The set of framework tables your app DECLARES is hashed into the schema(fingerprint. A pre-deploy `voltro db apply` records that hash; every serving(container recomputes it and refuses to boot if it differs. Until this release(three RUNTIME flags fed into that set:(( CDC=0 removed `_voltro_cdc_offsets`( VOLTRO_UNDO=on added `_voltro_undo_log`( VOLTRO_TRACING_PERSIST=all added `_voltro_traces`((All three read as pure runtime knobs, so they tend to live on the PODS and(not on the pre-upgrade migrate Job — which is a green migrate followed by(every pod in CrashLoopBackOff. This was reported against a Helm deployment(where `CDC: \"0\"` was in all three overlays' pod blocks and none of their(jobs; it had been latent for months and would have fired on the next deploy.((WHAT YOU MUST DO — only if you set one of these to turn a table ON in(production:(( * `VOLTRO_UNDO=on` in production → add to app.config.ts:( export default { schema: { undo: true }, … }( * `VOLTRO_TRACING_PERSIST` keeping trace history in production → add:( export default { schema: { traces: true }, … }(( Without the declaration, `voltro serve` now REFUSES to boot and names the( field. That refusal is the point: before, the same configuration either( wrote to a table nobody created or produced a fingerprint the migrate job( could not reproduce.(( Turning capture OFF still needs no declaration and never will — a declared( table nobody writes to is harmless. Only turning it ON is a schema claim.((WHAT HAPPENS WITHOUT ANY ACTION:(( * On mariadb or mssql you will see ONE additive `create-table` in your next( plan: `_voltro_cdc_offsets` is now declared by the DIALECT rather than by( `CDC`, so it exists whether or not that process drives CDC. It is an( offsets table — a handful of rows — and the alternative was leaving a( runtime flag able to split your fleet.( * On postgres/sqlite nothing changes: those dialects have no offsets table.((AND ONE THING WORTH DOING ANYWAY: if you are upgrading a deployment that has(a separate migrate job, diff that job's `env:` against your pods' once. The(framework can now guarantee its OWN tables do not depend on a runtime flag;(it cannot make the same guarantee for a plugin's `extendSchema.tables`, which(is app code and may read anything. A `prod-mismatch` refusal now prints which(tables this process decided and from which input, so the comparison is quick.".split("(")).join("\n")
5084
- }), W = "session_expired", Qr = T({
5084
+ }), V = "session_expired", ti = w({
5085
5085
  version: "0.35.1",
5086
5086
  id: "0.35.1/01_unauthorized-replaces-session-expired",
5087
5087
  title: "A 401 is `code: 'unauthorized'`; the vault's own failure is `'credential_unusable'`",
5088
5088
  kind: "transform",
5089
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getFullText().includes(W)),
5089
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getFullText().includes(V)),
5090
5090
  transform: ({ project: e, log: t }) => {
5091
5091
  let n = [];
5092
5092
  for (let t of e.getSourceFiles()) {
5093
- if (!t.getFullText().includes(W)) continue;
5093
+ if (!t.getFullText().includes(V)) continue;
5094
5094
  let e = !1;
5095
- for (let n of t.getDescendantsOfKind(11)) n.getLiteralValue() === W && (n.setLiteralValue("unauthorized"), e = !0);
5095
+ for (let n of t.getDescendantsOfKind(11)) n.getLiteralValue() === V && (n.setLiteralValue("unauthorized"), e = !0);
5096
5096
  e && n.push(t.getFilePath());
5097
5097
  }
5098
- n.length !== 0 && t(`rewrote '${W}' to 'unauthorized' in ${n.length} file(s).\n A 401 now means only "the credential was refused" — expired, revoked, wrong\n scope and MALFORMED all produce that status, and the old name asserted the\n first one. If a rewritten branch was meant to catch a credential your\n CONNECTION VAULT could not produce (no grant, revoked grant, failed refresh),\n change it to 'credential_unusable' — that is the code the vault raises, and it\n is the one where re-auth is genuinely the right action.\n A health check that logs the user out on this code should read 'unauthorized'\n as "ask again", not as "the session is gone".\n` + n.map((e) => ` ${e}`).join("\n"));
5098
+ n.length !== 0 && t(`rewrote '${V}' to 'unauthorized' in ${n.length} file(s).\n A 401 now means only "the credential was refused" — expired, revoked, wrong\n scope and MALFORMED all produce that status, and the old name asserted the\n first one. If a rewritten branch was meant to catch a credential your\n CONNECTION VAULT could not produce (no grant, revoked grant, failed refresh),\n change it to 'credential_unusable' — that is the code the vault raises, and it\n is the one where re-auth is genuinely the right action.\n A health check that logs the user out on this code should read 'unauthorized'\n as "ask again", not as "the session is gone".\n` + n.map((e) => ` ${e}`).join("\n"));
5099
5099
  }
5100
- }), $r = /\(\s*\{[^}]*\.\.\./, ei = /\bquery\??\.?\(\s*['"`]/, ti = T({
5100
+ }), ni = /\(\s*\{[^}]*\.\.\./, ri = /\bquery\??\.?\(\s*['"`]/, ii = w({
5101
5101
  version: "0.37.0",
5102
5102
  id: "0.37.0/01_procedure-input-rejects-undeclared-fields",
5103
5103
  title: "a procedure input rejects a field it does not declare (it used to drop it)",
5104
5104
  kind: "manual",
5105
5105
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5106
5106
  let t = e.getFullText();
5107
- return $r.test(t) || ei.test(t) || E("query").test(t);
5107
+ return ni.test(t) || ri.test(t) || T("query").test(t);
5108
5108
  }),
5109
5109
  note: [
5110
5110
  "A procedure call whose input carries a field the schema does not declare",
@@ -5166,33 +5166,33 @@ var C = (e, t, n) => {
5166
5166
  "two, the only safe direction is to refuse — and a warning would have to be",
5167
5167
  "read by someone, in a log, after the wrong rows were already served."
5168
5168
  ].join("\n")
5169
- }), G = "@voltro/plugin-auth", K = "@voltro/protocol", q = "IMPERSONATION_METADATA_KEY", ni = T({
5169
+ }), ai = "@voltro/plugin-auth", H = "@voltro/protocol", U = "IMPERSONATION_METADATA_KEY", oi = w({
5170
5170
  version: "0.38.0",
5171
5171
  id: "0.38.0/01_impersonation-key-in-protocol",
5172
- title: `\`${q}\` is imported from @voltro/protocol`,
5172
+ title: `\`${U}\` is imported from @voltro/protocol`,
5173
5173
  kind: "transform",
5174
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === G && e.getNamedImports().some((e) => e.getName() === q))),
5174
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === ai && e.getNamedImports().some((e) => e.getName() === U))),
5175
5175
  transform: ({ project: e, log: t }) => {
5176
5176
  let n = 0;
5177
5177
  for (let t of e.getSourceFiles()) for (let e of t.getImportDeclarations()) {
5178
- if (e.getModuleSpecifierValue() !== G) continue;
5179
- let r = e.getNamedImports().find((e) => e.getName() === q);
5178
+ if (e.getModuleSpecifierValue() !== ai) continue;
5179
+ let r = e.getNamedImports().find((e) => e.getName() === U);
5180
5180
  if (r === void 0) continue;
5181
5181
  let i = r.getAliasNode()?.getText(), a = e.isTypeOnly() || r.isTypeOnly();
5182
5182
  r.remove();
5183
- let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === K && e.isTypeOnly() === a), s = {
5184
- name: q,
5183
+ let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === H && e.isTypeOnly() === a), s = {
5184
+ name: U,
5185
5185
  ...i === void 0 ? {} : { alias: i }
5186
5186
  };
5187
5187
  o === void 0 ? t.addImportDeclaration({
5188
- moduleSpecifier: K,
5188
+ moduleSpecifier: H,
5189
5189
  isTypeOnly: a,
5190
5190
  namedImports: [s]
5191
5191
  }) : o.addNamedImport(s), e.getNamedImports().length === 0 && e.getDefaultImport() === void 0 && e.getNamespaceImport() === void 0 && e.remove(), n += 1;
5192
5192
  }
5193
- n > 0 && t(`${q}: ${n} import(s) repointed to ${K}`);
5193
+ n > 0 && t(`${U}: ${n} import(s) repointed to ${H}`);
5194
5194
  }
5195
- }), ri = T({
5195
+ }), si = w({
5196
5196
  version: "0.38.0",
5197
5197
  id: "0.38.0/02_startup-failure-refuses-boot",
5198
5198
  title: "a `*.startup.ts` that fails refuses the boot (it used to warn and continue)",
@@ -5277,12 +5277,12 @@ var C = (e, t, n) => {
5277
5277
  "long work after, so a failure in the long half cannot hide a missing",
5278
5278
  "registration."
5279
5279
  ].join("\n")
5280
- }), ii = /\bStruct\(\s*\{\s*\}\s*\)/, ai = T({
5280
+ }), ci = /\bStruct\(\s*\{\s*\}\s*\)/, li = w({
5281
5281
  version: "0.39.0",
5282
5282
  id: "0.39.0/01_empty-input-schema-rejects-every-field",
5283
5283
  title: "a procedure declaring `Schema.Struct({})` used to accept every field and now accepts none",
5284
5284
  kind: "manual",
5285
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ii.test(e.getFullText())),
5285
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ci.test(e.getFullText())),
5286
5286
  note: [
5287
5287
  "CHECK YOUR `Schema.Struct({})` PROCEDURES FIRST. They have been accepting",
5288
5288
  "every field anyone sent them, and they now accept none — the one jump in",
@@ -5336,14 +5336,14 @@ var C = (e, t, n) => {
5336
5336
  "A procedure that genuinely takes no input keeps `Schema.Struct({})` and is",
5337
5337
  "correct as it stands — callers must send `{}` or nothing."
5338
5338
  ].join("\n")
5339
- }), oi = T({
5339
+ }), ui = w({
5340
5340
  version: "0.40.0",
5341
5341
  id: "0.40.0/01_cold-start-failure-is-its-own-state",
5342
5342
  title: "a failed cold start is `failed: true`, not `loading: true`",
5343
5343
  kind: "manual",
5344
5344
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5345
5345
  let t = e.getFullText();
5346
- return E("useSubscription").test(t) || E("usePreloadedSubscription").test(t) || /\buseWorkflow\w*\(/.test(t);
5346
+ return T("useSubscription").test(t) || T("usePreloadedSubscription").test(t) || /\buseWorkflow\w*\(/.test(t);
5347
5347
  }),
5348
5348
  note: [
5349
5349
  "A subscription whose COLD START failed no longer reports `loading: true`.",
@@ -5401,14 +5401,14 @@ var C = (e, t, n) => {
5401
5401
  " reconnect discards the error and re-subscribes, so the entry returns to",
5402
5402
  " pending on its own."
5403
5403
  ].join("\n")
5404
- }), si = T({
5404
+ }), di = w({
5405
5405
  version: "0.40.0",
5406
5406
  id: "0.40.0/02_rejected-credential-widens-guard-results",
5407
5407
  title: "a rejected credential answers `Unauthenticated`, widening three guard results",
5408
5408
  kind: "manual",
5409
5409
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5410
5410
  let t = e.getFullText();
5411
- return E("checkGuards").test(t) || E("checkGuardsEffect").test(t) || E("bindEvent").test(t);
5411
+ return T("checkGuards").test(t) || T("checkGuardsEffect").test(t) || T("bindEvent").test(t);
5412
5412
  }),
5413
5413
  note: [
5414
5414
  "A guard refusing a caller whose CREDENTIAL was rejected now answers",
@@ -5437,16 +5437,16 @@ var C = (e, t, n) => {
5437
5437
  "`openAccess` procedures are untouched: the stamp only travels, and only a",
5438
5438
  "guard that actually refuses ever spends it."
5439
5439
  ].join("\n")
5440
- }), ci = "@voltro/web/middleware", li = /(^|[\\/])middleware\.tsx?$/, ui = T({
5440
+ }), fi = "@voltro/web/middleware", pi = /(^|[\\/])middleware\.tsx?$/, mi = w({
5441
5441
  version: "0.41.0",
5442
5442
  id: "0.41.0/01_middleware-defines-where-it-runs",
5443
5443
  title: "`middleware.ts` exports `defineMiddleware(...)` and can say where it runs",
5444
5444
  kind: "transform",
5445
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => li.test(e.getFilePath()) ? e.getExportAssignment((e) => !e.isExportEquals()) !== void 0 || e.getFunctions().some((e) => e.isDefaultExport()) : !1),
5445
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => pi.test(e.getFilePath()) ? e.getExportAssignment((e) => !e.isExportEquals()) !== void 0 || e.getFunctions().some((e) => e.isDefaultExport()) : !1),
5446
5446
  transform: ({ project: e, log: t }) => {
5447
5447
  let n = 0;
5448
5448
  for (let t of e.getSourceFiles()) {
5449
- if (!li.test(t.getFilePath()) || t.getFullText().includes("defineMiddleware")) continue;
5449
+ if (!pi.test(t.getFilePath()) || t.getFullText().includes("defineMiddleware")) continue;
5450
5450
  let e = t.getExportAssignment((e) => !e.isExportEquals());
5451
5451
  if (e !== void 0) {
5452
5452
  let t = e.getExpression().getText();
@@ -5457,9 +5457,9 @@ var C = (e, t, n) => {
5457
5457
  let r = e.getText().replace(/^\s*export\s+default\s+/, "");
5458
5458
  e.replaceWithText(`export default defineMiddleware({ run: ${r} })`), n += 1;
5459
5459
  }
5460
- let r = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === ci);
5460
+ let r = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === fi);
5461
5461
  r === void 0 ? t.insertImportDeclaration(0, {
5462
- moduleSpecifier: ci,
5462
+ moduleSpecifier: fi,
5463
5463
  namedImports: [{ name: "defineMiddleware" }]
5464
5464
  }) : r.getNamedImports().some((e) => e.getName() === "defineMiddleware") || r.addNamedImport({ name: "defineMiddleware" });
5465
5465
  }
@@ -5496,7 +5496,7 @@ var C = (e, t, n) => {
5496
5496
  "Non-page requests (assets, unknown paths) are NOT matched unless you ask with",
5497
5497
  "`assets: true`. There is no render there, so only `setCookies` takes effect."
5498
5498
  ].join("\n")
5499
- }), di = T({
5499
+ }), hi = w({
5500
5500
  version: "0.43.0",
5501
5501
  id: "0.43.0/01_dangling-reference-to-rows-refused",
5502
5502
  title: "`DanglingReferenceError` → `RowsRefusedError` (named for the outcome, not a guessed cause)",
@@ -5510,7 +5510,7 @@ var C = (e, t, n) => {
5510
5510
  });
5511
5511
  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;
5512
5512
  }
5513
- }), fi = T({
5513
+ }), gi = w({
5514
5514
  version: "0.44.0",
5515
5515
  id: "0.44.0/01_import-outcome",
5516
5516
  title: "`runImport` returns an ImportOutcome — read `.manifest` for the bundle",
@@ -5531,7 +5531,7 @@ var C = (e, t, n) => {
5531
5531
  "emptied of its old rows and holding part of the new ones. If you relied on per-table resume for a replace,",
5532
5532
  "that is the non-atomic path."
5533
5533
  ].join("\n")
5534
- }), pi = T({
5534
+ }), _i = w({
5535
5535
  version: "0.45.0",
5536
5536
  id: "0.45.0/01_typed-source-table-name",
5537
5537
  title: "`source:` is typechecked against the app’s tables, from the next `voltro dev`",
@@ -5571,14 +5571,14 @@ var C = (e, t, n) => {
5571
5571
  "To opt out entirely, delete `voltro-tables.generated.d.ts` and exclude it",
5572
5572
  "from your tsconfig; `source:` widens back to `string`."
5573
5573
  ].join("\n")
5574
- }), mi = T({
5574
+ }), vi = w({
5575
5575
  version: "0.46.0",
5576
5576
  id: "0.46.0/01_typed-aggregate-source",
5577
5577
  title: "an aggregate’s `incremental.source` is typechecked against the app’s tables",
5578
5578
  kind: "manual",
5579
5579
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => /\bincremental\s*:/.test(e.getFullText())),
5580
5580
  note: (/* @__PURE__ */ "An aggregate that opts into incremental maintenance names the table whose(CDC deltas drive it:(( incremental: { source: 'tasks', op: 'count' }((That name is now checked against your app’s tables, the same way a query’s(`source:` has been since 0.45.0.((WHY IT MATTERS MORE HERE((A name matching no table does not error. The runner subscribes to something(nothing writes, no delta ever arrives, and the aggregate quietly stops(tracking its input — while every read of it still succeeds and still returns(a number. There is no failing request to notice.((WHEN IT STARTS APPLYING((At your next `voltro dev` or `voltro codegen`, not at this upgrade — those(write `voltro-tables.generated.d.ts`, and that file is what narrows the type.(Until it exists the field is `string`, exactly as it is today.((WHAT TO DO((Boot once and read what `tsc` flags. A flagged name is either misspelled or(renamed away — a real defect, and that aggregate has not been maintaining —(or it is computed at runtime, in which case annotate it `string`.((The boot also warns now: an aggregate whose CDC source resolves to no table(is named in the same stale-`source:` warning queries and streams appear in.".split("(")).join("\n")
5581
- }), hi = T({
5581
+ }), yi = w({
5582
5582
  version: "0.49.0",
5583
5583
  id: "0.49.0/01_data-imports-to-transfers",
5584
5584
  title: "`voltro data imports` → `voltro data transfers`",
@@ -5611,31 +5611,268 @@ var C = (e, t, n) => {
5611
5611
  "marker, so `voltro db apply` (or a `voltro dev` boot) moves it with its rows on",
5612
5612
  "every dialect. If you query it directly, the new name is the one to use."
5613
5613
  ].join("\n")
5614
- }), gi = ["@voltro/database", "voltro/database"], _i = [
5614
+ }), bi = ["@voltro/database", "voltro/database"], W = [
5615
5615
  ["ImportRun", "DataTransferRun"],
5616
5616
  ["describeImportRun", "describeTransferRun"],
5617
5617
  ["IMPORT_RUNS_TABLE", "DATA_TRANSFERS_TABLE"],
5618
5618
  ["_voltroImportRunsTable", "_voltroDataTransfersTable"]
5619
- ], J = "_voltro_data_imports", vi = "_voltro_data_transfers", yi = (e) => {
5619
+ ], G = "_voltro_data_imports", xi = "_voltro_data_transfers", Si = (e) => {
5620
5620
  let t = 0;
5621
- for (let n of e.getSourceFiles()) n.getFullText().includes(J) && n.forEachDescendant((e) => {
5622
- if (x.isStringLiteral(e) || x.isNoSubstitutionTemplateLiteral(e) || x.isTemplateHead(e) || x.isTemplateMiddle(e) || x.isTemplateTail(e) || x.isRegularExpressionLiteral(e)) {
5621
+ for (let n of e.getSourceFiles()) n.getFullText().includes(G) && n.forEachDescendant((e) => {
5622
+ if (b.isStringLiteral(e) || b.isNoSubstitutionTemplateLiteral(e) || b.isTemplateHead(e) || b.isTemplateMiddle(e) || b.isTemplateTail(e) || b.isRegularExpressionLiteral(e)) {
5623
5623
  let n = e.getText();
5624
- if (!n.includes(J)) return;
5625
- e.replaceWithText(n.split(J).join(vi)), t++;
5624
+ if (!n.includes(G)) return;
5625
+ e.replaceWithText(n.split(G).join(xi)), t++;
5626
5626
  }
5627
5627
  });
5628
5628
  return t;
5629
- }, bi = [
5630
- he,
5629
+ }, Ci = w({
5630
+ version: "0.49.0",
5631
+ id: "0.49.0/02_import-run-symbols",
5632
+ title: "`ImportRun` / `describeImportRun` / `IMPORT_RUNS_TABLE` → their `…TransferRun` names",
5633
+ kind: "transform",
5634
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5635
+ let t = e.getFullText();
5636
+ return t.includes(G) ? !0 : bi.some((e) => t.includes(e)) ? W.some(([e]) => t.includes(e)) : !1;
5637
+ }),
5638
+ transform: ({ project: e, helpers: t, log: n }) => {
5639
+ let r = 0;
5640
+ for (let n of bi) for (let [i, a] of W) r += t.renameImport(e, {
5641
+ module: n,
5642
+ from: i,
5643
+ to: a
5644
+ });
5645
+ let i = Si(e);
5646
+ if (r + i === 0) return;
5647
+ let a = [];
5648
+ r > 0 && a.push(`${r} import(s) renamed to their \`…TransferRun\` names`), i > 0 && a.push(`${i} hand-spelled \`${G}\` → \`${xi}\``), n(`data-transfer run history: ${a.join("; ")}. An export writes to this record now, so the old names described half of what the table holds. The table itself carries a rename marker — \`voltro db apply\` (or a \`voltro dev\` boot) moves it with its rows on every dialect, so no data is lost and nothing is required of you there.`);
5649
+ }
5650
+ }), wi = w({
5651
+ version: "0.50.0",
5652
+ id: "0.50.0/01_transfer-runs-endpoint",
5653
+ title: "`GET /_voltro/admin/imports` → `GET /_voltro/admin/transfers`",
5654
+ kind: "manual",
5655
+ reach: "beyond-source",
5656
+ appliesTo: ({ text: e }) => e.find("/_voltro/admin/imports").length > 0,
5657
+ note: [
5658
+ "The read-only endpoint that reports data-transfer runs has moved:",
5659
+ "",
5660
+ " GET /_voltro/admin/imports → GET /_voltro/admin/transfers",
5661
+ "",
5662
+ "Same secret, same query parameters, same response shape. Only the path changed.",
5663
+ "",
5664
+ "It answers for four directions now — import, export, native backup, native",
5665
+ "restore — and it named one of them. The subcommand and the table were renamed",
5666
+ "for that reason in 0.49.0; this path was left behind, which is worse than not",
5667
+ "renaming any of them: a reader who followed the rename tries the matching path,",
5668
+ "gets a 404, and concludes the instance is too old.",
5669
+ "",
5670
+ "`voltro data transfers --target api` uses the new path for you. What needs your",
5671
+ "hand is anything that calls it directly — a monitoring check, an uptime probe,",
5672
+ "a curl in a runbook, a dashboard datasource."
5673
+ ].join("\n")
5674
+ }), Ti = w({
5675
+ version: "0.50.0",
5676
+ id: "0.50.0/02_reissue-data-imports-rename",
5677
+ title: "RE-CHECK: `voltro data imports` → `voltro data transfers` (0.49.0's note could not see your scripts)",
5678
+ kind: "manual",
5679
+ reach: "beyond-source",
5680
+ note: [
5681
+ "This is a re-check of a rename that shipped in 0.49.0, not a new change.",
5682
+ "",
5683
+ " voltro data imports → voltro data transfers",
5684
+ "",
5685
+ "The 0.49.0 note that announced it only searched `.ts` / `.tsx` files — while",
5686
+ "the command it is about lives in shell scripts, CI job definitions, Makefiles",
5687
+ "and runbooks. So a project whose only occurrence was in, say, `.gitlab-ci.yml`",
5688
+ "was told there was nothing to apply.",
5689
+ "",
5690
+ "A codemod runs once, on the jump that crosses its version, so that note cannot",
5691
+ "be corrected for anyone already past 0.49.0. Hence this one. Search your",
5692
+ "pipelines, deploy jobs and runbooks for `voltro data imports` now:",
5693
+ "",
5694
+ " grep -rn \"voltro data imports\" .",
5695
+ "",
5696
+ "The search `voltro update` runs is wider from 0.50.0 on (every text file git",
5697
+ "tracks, not just source), but it still only reaches THIS repository — a step",
5698
+ "defined in a CI runner's own UI, a CronJob spec in another repo, or a wiki",
5699
+ "page is out of its reach by construction.",
5700
+ "",
5701
+ "Nothing else is required: the four renamed `@voltro/database` exports were",
5702
+ "rewritten for you in 0.49.0, and the table carries a rename marker, so",
5703
+ "`voltro db apply` moved `_voltro_data_imports` → `_voltro_data_transfers`",
5704
+ "with its rows."
5705
+ ].join("\n")
5706
+ }), Ei = w({
5707
+ version: "0.50.0",
5708
+ id: "0.50.0/03_interrupted-replace-tables-nullable",
5709
+ title: "`InterruptedReplace.tables` is `number | null`",
5710
+ kind: "manual",
5711
+ appliesTo: ({ text: e }) => e.find("InterruptedReplace").length > 0,
5712
+ note: [
5713
+ "`InterruptedReplace.tables` is now `number | null`:",
5714
+ "",
5715
+ " readonly tables: number → readonly tables: number | null",
5716
+ "",
5717
+ "If you read it, `tsc` will point at the site. `null` means a native `voltro",
5718
+ "data restore` wrote the marker: it replaces the whole database from an",
5719
+ "artefact, so a table count is neither known up front nor meaningful after.",
5720
+ "Read `kind` (a new field, `'replace'` | `'restore'`) when you need to tell",
5721
+ "the two apart.",
5722
+ "",
5723
+ "The framework's own refusal text handles it by saying \"this database\" instead",
5724
+ "of a count. If you render your own, that is the shape to copy — the one thing",
5725
+ "not to do is coerce it, because `Number(null)` is `0` and the sentence then",
5726
+ "reports a measurement that was never taken."
5727
+ ].join("\n")
5728
+ }), Di = w({
5729
+ version: "0.51.0",
5730
+ id: "0.51.0/01_computed-source-keeps-its-names",
5731
+ title: "A COMPUTED `source:` can keep its typed names — do not widen the whole registry",
5732
+ kind: "manual",
5733
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5734
+ let t = e.getFullText();
5735
+ return /\bsource\s*:/.test(t) || t.includes("ReactivitySourceValue");
5736
+ }),
5737
+ note: [
5738
+ "A follow-up to the 0.45.0 note about `source:` being typed against your",
5739
+ "tables. Nothing changed in this release — this covers a case that note did",
5740
+ "not, and it can only be sent once, so it is sent to everyone.",
5741
+ "",
5742
+ "THE CASE",
5743
+ "",
5744
+ "A GENERIC reader — the table is chosen by the caller out of a registry, or",
5745
+ "arrives in `input` — is computed, and yet every name it can produce is known:",
5746
+ "",
5747
+ " source: Object.keys(JUNCTION_REGISTRY), // string[] — not assignable",
5748
+ "",
5749
+ "The 0.45.0 note offers two remedies and neither fits. There is no misspelled",
5750
+ "name to fix. And widening — `ReactivitySourceValue`, or `as TableName[]` —",
5751
+ "compiles at once while removing that entire registry from the check. It is",
5752
+ "the easiest thing to reach for and it opts out wholesale, silently.",
5753
+ "",
5754
+ "WHAT TO DO INSTEAD",
5755
+ "",
5756
+ "Keep the literal’s keys instead of recovering them afterwards:",
5757
+ "",
5758
+ " const REGISTRY = { … } as const satisfies Readonly<Record<string, JunctionMeta>>",
5759
+ "",
5760
+ " // consumers that index with a plain string still get the wide type",
5761
+ " export const JUNCTION_REGISTRY: Readonly<Record<string, JunctionMeta>> = REGISTRY",
5762
+ "",
5763
+ " // … and the source list keeps its literal names",
5764
+ " export const JUNCTION_TABLE_NAMES = Object.keys(REGISTRY) as ReadonlyArray<keyof typeof REGISTRY>",
5765
+ "",
5766
+ "THE PART THAT IS EASY TO GET WRONG",
5767
+ "",
5768
+ "An ANNOTATION widens the keys back, even when the literal carries",
5769
+ "`as const`. A registry written as",
5770
+ "",
5771
+ " export const R: Readonly<Record<string, Meta>> = { … } as const",
5772
+ "",
5773
+ "has `keyof typeof R === string`, and nothing about it looks wrong: the",
5774
+ "annotation is checked against the literal and then replaces its type.",
5775
+ "`satisfies` checks WITHOUT replacing. That is the whole difference, and it",
5776
+ "is why the two-line split above exists rather than one declaration.",
5777
+ "",
5778
+ "`ReactivitySourceValue` stays correct for a source that genuinely is not a",
5779
+ "literal — a name read from a config file, or one assembled at runtime. Use it",
5780
+ "when there is no key set to keep, not when recovering one takes two lines."
5781
+ ].join("\n")
5782
+ }), Oi = w({
5783
+ version: "0.51.0",
5784
+ id: "0.51.0/02_restore-refuses-without-marker",
5785
+ title: "`voltro data restore` refuses when it cannot write the in-progress marker",
5786
+ kind: "manual",
5787
+ reach: "beyond-source",
5788
+ appliesTo: ({ text: e }) => e.find("voltro data restore").length > 0,
5789
+ note: (/* @__PURE__ */ "`voltro data restore` now REFUSES when it cannot write the in-progress(marker, instead of restoring without one. A run that used to exit 0 can now(exit 1.((WHY((The marker is one row written before the first destructive statement, so a(restore that dies half-way refuses the next boot instead of serving a(half-loaded database. When it could not be written, the restore proceeded —(and then reported \"the next boot will REFUSE, by design\" over a database(with no marker at all. The next boot did not refuse.((WHICH RUNS CHANGE(( • the bookkeeping store will not open — wrong credentials, an unreachable( database, a missing env var, a server configuration the driver refuses;( • there is no `app.config.ts` from the working directory.((The second one surprises people: `restore` reads its TARGET from the(environment, so it looks like it needs no project. It does not, for the dump.(It needs one for the marker.((WHAT TO DO((Check every place you invoke it — cron entries, CI jobs, Makefiles, runbooks:(( grep -rn \"voltro data restore\" .((For each one, decide which it is. If the connection or the working directory(is wrong, fix that — the refusal names the reason on its own line. If the run(genuinely means to restore without the guard, say so:(( voltro data restore <dir> --no-marker((It warns every time and names why the marker was unavailable. Do not add it(everywhere as a migration step: it turns the refusal back off, which is the(behaviour this change removed.".split("(")).join("\n")
5790
+ }), ki = w({
5791
+ version: "0.51.0",
5792
+ id: "0.51.0/03_restore-assets-returns-counts",
5793
+ title: "`restoreAssetsFromCas` returns `{ count, objects }`, not a number",
5794
+ kind: "manual",
5795
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getFullText().includes("restoreAssetsFromCas")),
5796
+ note: [
5797
+ "`restoreAssetsFromCas` (from `@voltro/data-transfer`) no longer returns a",
5798
+ "number:",
5799
+ "",
5800
+ " Effect<number, …> → Effect<{ count: number; objects: number }, …>",
5801
+ "",
5802
+ "WHY",
5803
+ "",
5804
+ "The number was a count of KEYS and was reported as \"blobs restored\". Several",
5805
+ "references legitimately name one key, and the content-addressed store keeps",
5806
+ "one body per distinct hash — so a run said \"57 blob(s) restored\" while 16",
5807
+ "objects appeared. Checking a restore against what is on disk found a gap that",
5808
+ "was not one.",
5809
+ "",
5810
+ "WHAT TO DO",
5811
+ "",
5812
+ "`tsc` points at every call site. Pick the number that answers your question:",
5813
+ "",
5814
+ " • `count` — distinct KEYS written to the destination. This is what the",
5815
+ " old return value was, so it is the migration that changes nothing.",
5816
+ " • `objects` — distinct sha256 BODIES read out of `assets/`. Below `count`",
5817
+ " when two keys hold identical content. Use it when you are comparing",
5818
+ " against files on a disk or a bucket listing.",
5819
+ "",
5820
+ "The same split is in the backup stamp (`references` / `count` / `objects`,",
5821
+ "with `totalBytes` and `objectBytes` beside them), so a report can state all",
5822
+ "three rather than implying one."
5823
+ ].join("\n")
5824
+ }), Ai = "@voltro/i18n", ji = "I18nProvider", Mi = (e) => {
5825
+ let t = [];
5826
+ for (let n of e.getImportDeclarations()) {
5827
+ let e = n.getModuleSpecifierValue();
5828
+ if (e === Ai || e === `${Ai}/server`) for (let e of n.getNamedImports()) e.getName() === ji && t.push(e.getAliasNode()?.getText() ?? e.getName());
5829
+ }
5830
+ return t;
5831
+ }, Ni = (e, t) => [...e.getDescendantsOfKind(x.JsxOpeningElement), ...e.getDescendantsOfKind(x.JsxSelfClosingElement)].filter((e) => t.includes(e.getTagNameNode().getText())), Pi = w({
5832
+ version: "0.51.0",
5833
+ id: "0.51.0/04_i18n-timezone-prop",
5834
+ title: "`<I18nProvider>`: `timeZone` is its own prop, not an `intlConfig` member",
5835
+ kind: "transform",
5836
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Mi(e).length > 0),
5837
+ transform: ({ project: e, log: t }) => {
5838
+ let n = 0, r = 0;
5839
+ for (let i of e.getSourceFiles()) {
5840
+ let e = Mi(i);
5841
+ if (e.length !== 0) for (let a of Ni(i, e)) {
5842
+ let e = a.getAttribute("intlConfig");
5843
+ if (!e || !b.isJsxAttribute(e)) continue;
5844
+ let o = e.getInitializer();
5845
+ if (!o || !b.isJsxExpression(o)) continue;
5846
+ let s = o.getExpression();
5847
+ if (!s || !b.isObjectLiteralExpression(s)) {
5848
+ r++, t(` ? ${i.getBaseName()}:${a.getStartLineNumber()} — intlConfig is not an object literal; check it by hand for a \`timeZone\``);
5849
+ continue;
5850
+ }
5851
+ let c = s.getProperty("timeZone");
5852
+ if (!c || !b.isPropertyAssignment(c)) continue;
5853
+ if (a.getAttribute("timeZone")) {
5854
+ c.remove(), n++;
5855
+ continue;
5856
+ }
5857
+ let l = c.getInitializer()?.getText() ?? "'UTC'";
5858
+ c.remove(), a.addAttribute({
5859
+ name: "timeZone",
5860
+ initializer: `{${l}}`
5861
+ }), s.getProperties().length === 0 && e.remove(), n++;
5862
+ }
5863
+ }
5864
+ n > 0 && (t(`I18nProvider: moved ${n} \`timeZone\` out of \`intlConfig\` onto its own prop`), t(" → it now reaches useFormatDate/useRelativeTime too, not only react-intl")), r > 0 && t(`I18nProvider: ${r} \`intlConfig\` value(s) could not be read — listed above`), n === 0 && r === 0 && (t("I18nProvider: no `intlConfig.timeZone` found — nothing to move"), t(" → if this app renders dates under SSR, set `timeZone` in the web app.config.ts"));
5865
+ }
5866
+ }), K = "@voltro/plugin-versioning", q = "@voltro/plugin-row-history", Fi = [
5631
5867
  ge,
5632
- ve,
5868
+ _e,
5633
5869
  ye,
5634
5870
  be,
5635
- Ce,
5636
- Te,
5871
+ xe,
5872
+ we,
5637
5873
  Ee,
5638
5874
  De,
5875
+ Oe,
5639
5876
  je,
5640
5877
  Me,
5641
5878
  Fe,
@@ -5656,249 +5893,147 @@ var C = (e, t, n) => {
5656
5893
  et,
5657
5894
  tt,
5658
5895
  nt,
5659
- ct,
5660
- rt,
5661
5896
  st,
5662
- mt,
5897
+ rt,
5898
+ ot,
5899
+ pt,
5900
+ vt,
5663
5901
  yt,
5664
5902
  bt,
5665
- xt,
5903
+ Ct,
5666
5904
  wt,
5667
- Tt,
5668
- At,
5669
- Mt,
5670
- Pt,
5671
- It,
5672
- Rt,
5673
- Bt,
5674
- Ht,
5675
- Wt,
5676
- Kt,
5677
- Jt,
5678
- Xt,
5679
- Qt,
5680
- en,
5681
- an,
5682
- on,
5905
+ kt,
5906
+ jt,
5907
+ Nt,
5908
+ Ft,
5909
+ Lt,
5910
+ zt,
5911
+ Vt,
5912
+ Ut,
5913
+ Gt,
5914
+ qt,
5915
+ Yt,
5916
+ Zt,
5917
+ $t,
5918
+ rn,
5683
5919
  sn,
5684
5920
  cn,
5685
- un,
5686
- fn,
5687
- mn,
5688
- gn,
5689
- vn,
5690
- Cn,
5921
+ ln,
5922
+ dn,
5923
+ pn,
5924
+ hn,
5925
+ _n,
5926
+ yn,
5691
5927
  Tn,
5692
5928
  Dn,
5693
5929
  kn,
5694
5930
  jn,
5695
- Mn,
5696
5931
  Nn,
5697
5932
  Pn,
5698
5933
  Fn,
5934
+ In,
5699
5935
  Ln,
5700
- Vn,
5936
+ zn,
5701
5937
  Un,
5702
5938
  Gn,
5703
- Kn,
5704
5939
  qn,
5705
5940
  Jn,
5706
- Zn,
5707
- ir,
5708
- Qn,
5709
- nr,
5941
+ Yn,
5942
+ Xn,
5943
+ $n,
5710
5944
  or,
5945
+ er,
5946
+ ir,
5711
5947
  cr,
5712
- lr,
5713
5948
  ur,
5714
- pr,
5949
+ dr,
5950
+ fr,
5715
5951
  hr,
5716
- xr,
5717
- Cr,
5718
- yr,
5952
+ _r,
5953
+ wr,
5719
5954
  Er,
5955
+ xr,
5720
5956
  kr,
5721
- jr,
5722
- Nr,
5723
- Lr,
5724
- Hr,
5957
+ Mr,
5958
+ Pr,
5959
+ Ir,
5725
5960
  Br,
5726
- Kr,
5727
- Jr,
5728
- Xr,
5961
+ Gr,
5962
+ Ur,
5963
+ Yr,
5729
5964
  Zr,
5730
- Qr,
5965
+ $r,
5966
+ ei,
5731
5967
  ti,
5732
- ni,
5733
- ri,
5734
- ai,
5968
+ ii,
5735
5969
  oi,
5736
5970
  si,
5971
+ li,
5737
5972
  ui,
5738
5973
  di,
5739
- fi,
5740
- pi,
5741
5974
  mi,
5742
5975
  hi,
5743
- T({
5744
- version: "0.49.0",
5745
- id: "0.49.0/02_import-run-symbols",
5746
- title: "`ImportRun` / `describeImportRun` / `IMPORT_RUNS_TABLE` → their `…TransferRun` names",
5976
+ gi,
5977
+ _i,
5978
+ vi,
5979
+ yi,
5980
+ Ci,
5981
+ wi,
5982
+ Ti,
5983
+ Ei,
5984
+ Di,
5985
+ Oi,
5986
+ ki,
5987
+ Pi,
5988
+ w({
5989
+ version: "0.52.0",
5990
+ id: "0.52.0/01_plugin-versioning-to-row-history",
5991
+ title: "@voltro/plugin-versioning → @voltro/plugin-row-history (the name now says what it does)",
5747
5992
  kind: "transform",
5748
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5749
- let t = e.getFullText();
5750
- return t.includes(J) ? !0 : gi.some((e) => t.includes(e)) ? _i.some(([e]) => t.includes(e)) : !1;
5751
- }),
5993
+ appliesTo: ({ project: e, text: t }) => t.find(K).length > 0 || e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === K)),
5752
5994
  transform: ({ project: e, helpers: t, log: n }) => {
5753
- let r = 0;
5754
- for (let n of gi) for (let [i, a] of _i) r += t.renameImport(e, {
5755
- module: n,
5756
- from: i,
5757
- to: a
5995
+ let r = t.renameImport(e, {
5996
+ module: K,
5997
+ from: "versioningPlugin",
5998
+ to: "rowHistoryPlugin"
5999
+ }) + t.renameImport(e, {
6000
+ module: K,
6001
+ from: "VersioningPluginOptions",
6002
+ to: "RowHistoryPluginOptions"
5758
6003
  });
5759
- let i = yi(e);
5760
- if (r + i === 0) return;
5761
- let a = [];
5762
- r > 0 && a.push(`${r} import(s) renamed to their \`…TransferRun\` names`), i > 0 && a.push(`${i} hand-spelled \`${J}\` \`${vi}\``), n(`data-transfer run history: ${a.join("; ")}. An export writes to this record now, so the old names described half of what the table holds. The table itself carries a rename marker \`voltro db apply\` (or a \`voltro dev\` boot) moves it with its rows on every dialect, so no data is lost and nothing is required of you there.`);
6004
+ n(`${K} ${q}: repointed ${t.renameModuleSpecifier(e, {
6005
+ from: K,
6006
+ to: q
6007
+ })} import(s)` + (r > 0 ? `, renamed ${r} versioningPlugin call site(s) to rowHistoryPlugin` : "") + `. Replace the dependency in package.json ("${K}""${q}") and reinstall the table (_voltro_row_history) and VOLTRO_ROW_HISTORY_TTL_HOURS already carry the new name, so nothing else changes. If you passed an explicit alias: to the plugin it is kept as-is; only the DEFAULT alias moved from 'versioning' to 'row-history' (inspect endpoint paths + boot log lines).`);
5763
6008
  }
5764
6009
  }),
5765
- T({
5766
- version: "0.50.0",
5767
- id: "0.50.0/01_transfer-runs-endpoint",
5768
- title: "`GET /_voltro/admin/imports` `GET /_voltro/admin/transfers`",
6010
+ w({
6011
+ version: "0.52.0",
6012
+ id: "0.52.0/02_http-interceptor-fail-closed",
6013
+ title: "A throwing `onHttpRequest` interceptor now refuses the request (500) instead of being ignored",
5769
6014
  kind: "manual",
5770
- reach: "beyond-source",
5771
- appliesTo: ({ text: e }) => e.find("/_voltro/admin/imports").length > 0,
6015
+ appliesTo: ({ text: e }) => e.find("onHttpRequest").length > 0,
5772
6016
  note: [
5773
- "The read-only endpoint that reports data-transfer runs has moved:",
5774
- "",
5775
- " GET /_voltro/admin/imports → GET /_voltro/admin/transfers",
5776
- "",
5777
- "Same secret, same query parameters, same response shape. Only the path changed.",
5778
- "",
5779
- "It answers for four directions now — import, export, native backup, native",
5780
- "restore — and it named one of them. The subcommand and the table were renamed",
5781
- "for that reason in 0.49.0; this path was left behind, which is worse than not",
5782
- "renaming any of them: a reader who followed the rename tries the matching path,",
5783
- "gets a 404, and concludes the instance is too old.",
5784
- "",
5785
- "`voltro data transfers --target api` uses the new path for you. What needs your",
5786
- "hand is anything that calls it directly — a monitoring check, an uptime probe,",
5787
- "a curl in a runbook, a dashboard datasource."
5788
- ].join("\n")
5789
- }),
5790
- T({
5791
- version: "0.50.0",
5792
- id: "0.50.0/02_reissue-data-imports-rename",
5793
- title: "RE-CHECK: `voltro data imports` → `voltro data transfers` (0.49.0's note could not see your scripts)",
5794
- kind: "manual",
5795
- reach: "beyond-source",
5796
- note: [
5797
- "This is a re-check of a rename that shipped in 0.49.0, not a new change.",
5798
- "",
5799
- " voltro data imports → voltro data transfers",
5800
- "",
5801
- "The 0.49.0 note that announced it only searched `.ts` / `.tsx` files — while",
5802
- "the command it is about lives in shell scripts, CI job definitions, Makefiles",
5803
- "and runbooks. So a project whose only occurrence was in, say, `.gitlab-ci.yml`",
5804
- "was told there was nothing to apply.",
5805
- "",
5806
- "A codemod runs once, on the jump that crosses its version, so that note cannot",
5807
- "be corrected for anyone already past 0.49.0. Hence this one. Search your",
5808
- "pipelines, deploy jobs and runbooks for `voltro data imports` now:",
5809
- "",
5810
- " grep -rn \"voltro data imports\" .",
5811
- "",
5812
- "The search `voltro update` runs is wider from 0.50.0 on (every text file git",
5813
- "tracks, not just source), but it still only reaches THIS repository — a step",
5814
- "defined in a CI runner's own UI, a CronJob spec in another repo, or a wiki",
5815
- "page is out of its reach by construction.",
5816
- "",
5817
- "Nothing else is required: the four renamed `@voltro/database` exports were",
5818
- "rewritten for you in 0.49.0, and the table carries a rename marker, so",
5819
- "`voltro db apply` moved `_voltro_data_imports` → `_voltro_data_transfers`",
5820
- "with its rows."
5821
- ].join("\n")
5822
- }),
5823
- T({
5824
- version: "0.50.0",
5825
- id: "0.50.0/03_interrupted-replace-tables-nullable",
5826
- title: "`InterruptedReplace.tables` is `number | null`",
5827
- kind: "manual",
5828
- appliesTo: ({ text: e }) => e.find("InterruptedReplace").length > 0,
5829
- note: [
5830
- "`InterruptedReplace.tables` is now `number | null`:",
5831
- "",
5832
- " readonly tables: number → readonly tables: number | null",
5833
- "",
5834
- "If you read it, `tsc` will point at the site. `null` means a native `voltro",
5835
- "data restore` wrote the marker: it replaces the whole database from an",
5836
- "artefact, so a table count is neither known up front nor meaningful after.",
5837
- "Read `kind` (a new field, `'replace'` | `'restore'`) when you need to tell",
5838
- "the two apart.",
5839
- "",
5840
- "The framework's own refusal text handles it by saying \"this database\" instead",
5841
- "of a count. If you render your own, that is the shape to copy — the one thing",
5842
- "not to do is coerce it, because `Number(null)` is `0` and the sentence then",
5843
- "reports a measurement that was never taken."
5844
- ].join("\n")
5845
- }),
5846
- T({
5847
- version: "0.51.0",
5848
- id: "0.51.0/01_computed-source-keeps-its-names",
5849
- title: "A COMPUTED `source:` can keep its typed names — do not widen the whole registry",
5850
- kind: "manual",
5851
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5852
- let t = e.getFullText();
5853
- return /\bsource\s*:/.test(t) || t.includes("ReactivitySourceValue");
5854
- }),
5855
- note: [
5856
- "A follow-up to the 0.45.0 note about `source:` being typed against your",
5857
- "tables. Nothing changed in this release — this covers a case that note did",
5858
- "not, and it can only be sent once, so it is sent to everyone.",
5859
- "",
5860
- "THE CASE",
5861
- "",
5862
- "A GENERIC reader — the table is chosen by the caller out of a registry, or",
5863
- "arrives in `input` — is computed, and yet every name it can produce is known:",
5864
- "",
5865
- " source: Object.keys(JUNCTION_REGISTRY), // string[] — not assignable",
5866
- "",
5867
- "The 0.45.0 note offers two remedies and neither fits. There is no misspelled",
5868
- "name to fix. And widening — `ReactivitySourceValue`, or `as TableName[]` —",
5869
- "compiles at once while removing that entire registry from the check. It is",
5870
- "the easiest thing to reach for and it opts out wholesale, silently.",
5871
- "",
5872
- "WHAT TO DO INSTEAD",
5873
- "",
5874
- "Keep the literal’s keys instead of recovering them afterwards:",
5875
- "",
5876
- " const REGISTRY = { … } as const satisfies Readonly<Record<string, JunctionMeta>>",
5877
- "",
5878
- " // consumers that index with a plain string still get the wide type",
5879
- " export const JUNCTION_REGISTRY: Readonly<Record<string, JunctionMeta>> = REGISTRY",
5880
- "",
5881
- " // … and the source list keeps its literal names",
5882
- " export const JUNCTION_TABLE_NAMES = Object.keys(REGISTRY) as ReadonlyArray<keyof typeof REGISTRY>",
5883
- "",
5884
- "THE PART THAT IS EASY TO GET WRONG",
6017
+ "The HTTP interceptor chain is fail-closed now: if your `onHttpRequest`",
6018
+ "implementation throws, the request is REFUSED with 500 (previously the",
6019
+ "throw was swallowed and the request continued — a crashed security gate",
6020
+ "silently stopped guarding).",
5885
6021
  "",
5886
- "An ANNOTATION widens the keys back, even when the literal carries",
5887
- "`as const`. A registry written as",
6022
+ "Decide, per interceptor, what a failure of YOUR dependency should mean:",
5888
6023
  "",
5889
- " export const R: Readonly<Record<string, Meta>> = { } as const",
6024
+ " · a security gate (auth fence, tenant guard): let the throw propagate ",
6025
+ " fail-closed is exactly what you want;",
6026
+ " · protection with a dependency (a rate-limit store, a lookup cache):",
6027
+ " catch INSIDE the interceptor and degrade loudly, e.g.",
5890
6028
  "",
5891
- "has `keyof typeof R === string`, and nothing about it looks wrong: the",
5892
- "annotation is checked against the literal and then replaces its type.",
5893
- "`satisfies` checks WITHOUT replacing. That is the whole difference, and it",
5894
- "is why the two-line split above exists rather than one declaration.",
6029
+ " try { decision = await store.consume(…) }",
6030
+ " catch (cause) { console.warn(\"… ALLOWED without limit\", cause); return next() }",
5895
6031
  "",
5896
- "`ReactivitySourceValue` stays correct for a source that genuinely is not a",
5897
- "literal a name read from a config file, or one assembled at runtime. Use it",
5898
- "when there is no key set to keep, not when recovering one takes two lines."
6032
+ " (that is what plugin-ratelimit's httpShield does now a Redis outage",
6033
+ " must not become a self-inflicted API outage)."
5899
6034
  ].join("\n")
5900
6035
  })
5901
- ], Y = /* @__PURE__ */ new Set([
6036
+ ], J = /* @__PURE__ */ new Set([
5902
6037
  "node_modules",
5903
6038
  ".git",
5904
6039
  "dist",
@@ -5910,42 +6045,42 @@ var C = (e, t, n) => {
5910
6045
  ".turbo",
5911
6046
  ".cache",
5912
6047
  ".output"
5913
- ]), xi = () => [...[...Y].map((e) => `**/${e}/**`), "**/.voltro-*/**"], X = /(?:from|import)\s*\(?\s*['"]([^'"]+)['"]|require\s*\(\s*['"]([^'"]+)['"]\s*\)/g, Si = /\.(?:tsx?|jsx?|mjs|cjs)$/, Ci = (e) => g(e).replace(Si, ""), wi = (e) => {
6048
+ ]), Ii = () => [...[...J].map((e) => `**/${e}/**`), "**/.voltro-*/**"], Y = /(?:from|import)\s*\(?\s*['"]([^'"]+)['"]|require\s*\(\s*['"]([^'"]+)['"]\s*\)/g, Li = /\.(?:tsx?|jsx?|mjs|cjs)$/, Ri = (e) => g(e).replace(Li, ""), zi = (e) => {
5914
6049
  let t = e.split("/").filter((e) => e.length > 0).pop();
5915
6050
  if (t === void 0 || t === "." || t === "..") return;
5916
- let n = t.replace(Si, "");
6051
+ let n = t.replace(Li, "");
5917
6052
  return n.length > 0 ? n : void 0;
5918
- }, Ti = (e) => {
6053
+ }, Bi = (e) => {
5919
6054
  let t = /* @__PURE__ */ new Map();
5920
6055
  for (let n of e) {
5921
6056
  let e;
5922
6057
  try {
5923
- e = b(n, "utf8");
6058
+ e = te(n, "utf8");
5924
6059
  } catch {
5925
6060
  continue;
5926
6061
  }
5927
- X.lastIndex = 0;
5928
- for (let r = X.exec(e); r !== null; r = X.exec(e)) {
5929
- let e = wi(r[1] ?? r[2] ?? "");
6062
+ Y.lastIndex = 0;
6063
+ for (let r = Y.exec(e); r !== null; r = Y.exec(e)) {
6064
+ let e = zi(r[1] ?? r[2] ?? "");
5930
6065
  if (e === void 0) continue;
5931
6066
  let i = t.get(e);
5932
6067
  i === void 0 ? t.set(e, /* @__PURE__ */ new Set([n])) : i.add(n);
5933
6068
  }
5934
6069
  }
5935
6070
  return t;
5936
- }, Ei = (e, t) => {
6071
+ }, Vi = (e, t) => {
5937
6072
  let n = new Set(e);
5938
- for (let r of e) for (let e of [Ci(r), g(_(r))]) {
6073
+ for (let r of e) for (let e of [Ri(r), g(_(r))]) {
5939
6074
  let r = t.get(e);
5940
6075
  if (r !== void 0) for (let e of r) n.add(e);
5941
6076
  }
5942
6077
  return n;
5943
- }, Di = /* @__PURE__ */ ".ts,.tsx,.mts,.cts,.js,.jsx,.mjs,.cjs,.yml,.yaml,.toml,.json,.jsonc,.ini,.cfg,.conf,.sh,.bash,.zsh,.fish,.ps1,.bat,.cmd,.md,.mdx,.rst,.txt,.adoc,Makefile,makefile,GNUmakefile,Justfile,justfile,Dockerfile,Containerfile,Procfile,Jenkinsfile,Rakefile,Taskfile".split(","), Oi = 2097152, ki = 4e4, Ai = (e) => {
6078
+ }, Hi = /* @__PURE__ */ ".ts,.tsx,.mts,.cts,.js,.jsx,.mjs,.cjs,.yml,.yaml,.toml,.json,.jsonc,.ini,.cfg,.conf,.sh,.bash,.zsh,.fish,.ps1,.bat,.cmd,.md,.mdx,.rst,.txt,.adoc,Makefile,makefile,GNUmakefile,Justfile,justfile,Dockerfile,Containerfile,Procfile,Jenkinsfile,Rakefile,Taskfile".split(","), Ui = 2097152, Wi = 4e4, Gi = (e) => {
5944
6079
  let t = e.slice(e.lastIndexOf("/") + 1);
5945
- return Di.some((e) => e.startsWith(".") ? t.endsWith(e) : t === e);
5946
- }, ji = (e) => {
6080
+ return Hi.some((e) => e.startsWith(".") ? t.endsWith(e) : t === e);
6081
+ }, Ki = (e) => {
5947
6082
  try {
5948
- let t = ne("git", [
6083
+ let t = re("git", [
5949
6084
  "ls-files",
5950
6085
  "--cached",
5951
6086
  "--others",
@@ -5964,23 +6099,23 @@ var C = (e, t, n) => {
5964
6099
  } catch {
5965
6100
  return;
5966
6101
  }
5967
- }, Z = (e, t = ji) => {
6102
+ }, X = (e, t = Ki) => {
5968
6103
  let n = t(e);
5969
- if (n === void 0) return Mi;
6104
+ if (n === void 0) return qi;
5970
6105
  let r = /* @__PURE__ */ new Map(), i = [];
5971
6106
  for (let t of n) {
5972
- if (t.split("/").some((e) => Y.has(e)) || !Ai(t)) continue;
5973
- if (r.size >= ki) {
6107
+ if (t.split("/").some((e) => J.has(e)) || !Gi(t)) continue;
6108
+ if (r.size >= Wi) {
5974
6109
  i.push(t);
5975
6110
  continue;
5976
6111
  }
5977
6112
  let n = v(e, t);
5978
6113
  try {
5979
- if (te(n).size > Oi) {
6114
+ if (ne(n).size > Ui) {
5980
6115
  i.push(t);
5981
6116
  continue;
5982
6117
  }
5983
- let e = b(n, "utf8");
6118
+ let e = te(n, "utf8");
5984
6119
  if (e.includes("\0")) {
5985
6120
  i.push(t);
5986
6121
  continue;
@@ -6000,47 +6135,47 @@ var C = (e, t, n) => {
6000
6135
  scanned: r.size,
6001
6136
  skipped: i
6002
6137
  };
6003
- }, Mi = {
6138
+ }, qi = {
6004
6139
  find: () => [],
6005
6140
  scanned: 0,
6006
6141
  skipped: []
6007
- }, Ni = [
6142
+ }, Ji = [
6008
6143
  "**/*.ts",
6009
6144
  "**/*.tsx",
6010
6145
  "!**/node_modules/**",
6011
6146
  "!**/dist/**",
6012
6147
  "!**/.framework/**",
6013
6148
  "!**/*.d.ts"
6014
- ], Q = (e, t, n = Ii) => {
6149
+ ], Z = (e, t, n = Zi) => {
6015
6150
  let r = /* @__PURE__ */ new Set();
6016
- for (let e of t) for (let t of e.scope ?? Ni) r.add(t);
6151
+ for (let e of t) for (let t of e.scope ?? Ji) r.add(t);
6017
6152
  let i = n(e);
6018
6153
  if (i !== void 0) {
6019
- let t = [...r].filter((e) => !e.startsWith("!")).map((e) => Fi(e)), n = [...r].filter((e) => e.startsWith("!")).map((e) => Fi(e.slice(1))), a = [...Y], o = [];
6154
+ let t = [...r].filter((e) => !e.startsWith("!")).map((e) => Xi(e)), n = [...r].filter((e) => e.startsWith("!")).map((e) => Xi(e.slice(1))), a = [...J], o = [];
6020
6155
  for (let r of i) {
6021
6156
  if (a.some((e) => r === e || r.startsWith(`${e}/`) || r.includes(`/${e}/`)) || !t.some((e) => e(r)) || n.some((e) => e(r))) continue;
6022
6157
  let i = v(e, r);
6023
6158
  y(i) && o.push(i);
6024
6159
  }
6025
- return Pi(o.length, e), o;
6160
+ return Yi(o.length, e), o;
6026
6161
  }
6027
- let a = ae([...r], {
6162
+ let a = oe([...r], {
6028
6163
  cwd: e,
6029
6164
  absolute: !0,
6030
6165
  expandDirectories: !1,
6031
6166
  followSymbolicLinks: !1,
6032
- ignore: [...xi()]
6167
+ ignore: [...Ii()]
6033
6168
  });
6034
- return Pi(a.length, e), a;
6035
- }, Pi = (e, t) => {
6036
- let n = Li();
6169
+ return Yi(a.length, e), a;
6170
+ }, Yi = (e, t) => {
6171
+ let n = Qi();
6037
6172
  if (!(e <= n)) throw Error(`voltro update: the codemod scan matched ${e} files under ${t}, past the ${n} ceiling.\n Every matched file is parsed into one ts-morph project, so the heap needed grows with\n this number — past the ceiling it runs out of memory, and V8 aborts without naming a\n limit, which is why this stops here instead. Three ways out, in order:\n • put non-source directories in .gitignore (inside a git repo the scan then never\n sees them at all — a build cache, a data dump, a virtualenv),\n • run \`voltro update\` from the app directory rather than the workspace root, or\n • take one codemod at a time: \`voltro update --dry-run\` lists the ids, then\n \`voltro update --codemods-only --only <id>\` runs a single one.\n If every one of those files really is source this pass must rewrite, raise the ceiling\n with VOLTRO_CODEMOD_MAX_FILES and give node room: NODE_OPTIONS=--max-old-space-size=8192.`);
6038
- }, Fi = (e) => {
6173
+ }, Xi = (e) => {
6039
6174
  let t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*\//g, "\0").replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*").replace(/\u0000/g, "(?:.*/)?").replace(/\\\{([^}]*)\\\}/g, (e, t) => `(?:${t.split(",").join("|")})`);
6040
6175
  return (e) => RegExp(`^${t}$`).test(e);
6041
- }, Ii = (e) => {
6176
+ }, Zi = (e) => {
6042
6177
  try {
6043
- let t = ne("git", [
6178
+ let t = re("git", [
6044
6179
  "ls-files",
6045
6180
  "--cached",
6046
6181
  "--others",
@@ -6059,17 +6194,17 @@ var C = (e, t, n) => {
6059
6194
  } catch {
6060
6195
  return;
6061
6196
  }
6062
- }, Li = () => {
6197
+ }, Qi = () => {
6063
6198
  let e = Number(process.env.VOLTRO_CODEMOD_MAX_FILES);
6064
6199
  return Number.isInteger(e) && e > 0 ? e : 2e4;
6065
- }, $ = (e, t) => {
6200
+ }, Q = (e, t) => {
6066
6201
  let n = e.split(".").map(Number), r = t.split(".").map(Number);
6067
6202
  for (let e = 0; e < 3; e++) {
6068
6203
  let t = (n[e] ?? 0) - (r[e] ?? 0);
6069
6204
  if (t !== 0) return t;
6070
6205
  }
6071
6206
  return 0;
6072
- }, Ri = (e, t, n = bi) => n.filter((n) => $(e, n.version) < 0 && $(n.version, t) <= 0).slice().sort(me), zi = (e, t, n = () => {}, r = Mi) => {
6207
+ }, $i = (e, t, n = Fi) => n.filter((n) => Q(e, n.version) < 0 && Q(n.version, t) <= 0).slice().sort(he), $ = (e, t, n = () => {}, r = qi) => {
6073
6208
  let i = [], a = [], o = [];
6074
6209
  for (let s of t) {
6075
6210
  let t = !s.appliesTo || s.appliesTo({
@@ -6092,7 +6227,7 @@ var C = (e, t, n) => {
6092
6227
  let l = new Map(e.getSourceFiles().map((e) => [e.getFilePath(), e.getFullText()]));
6093
6228
  s.transform?.({
6094
6229
  project: e,
6095
- helpers: fe,
6230
+ helpers: pe,
6096
6231
  log: n
6097
6232
  });
6098
6233
  let u = new Map(e.getSourceFiles().map((e) => [e.getFilePath(), e.getFullText()])), d = /* @__PURE__ */ new Map();
@@ -6120,8 +6255,8 @@ var C = (e, t, n) => {
6120
6255
  manual: a,
6121
6256
  skipped: o
6122
6257
  };
6123
- }, Bi = async (e) => {
6124
- let t = e.log ?? (() => {}), n = Ri(e.from, e.to, e.codemods ?? bi), r = e.only === void 0 || e.only.length === 0 ? n : (() => {
6258
+ }, ea = async (e) => {
6259
+ let t = e.log ?? (() => {}), n = $i(e.from, e.to, e.codemods ?? Fi), r = e.only === void 0 || e.only.length === 0 ? n : (() => {
6125
6260
  let t = n.filter((t) => e.only.includes(t.id)), r = e.only.filter((e) => !n.some((t) => t.id === e));
6126
6261
  if (r.length > 0) throw Error(`voltro update --only: no codemod in ${e.from} → ${e.to} has id ${r.map((e) => `"${e}"`).join(", ")}.\n Available for this jump:\n${n.map((e) => ` ${e.id}`).join("\n")}`);
6127
6262
  return t;
@@ -6133,30 +6268,30 @@ var C = (e, t, n) => {
6133
6268
  };
6134
6269
  let i = f(e.root);
6135
6270
  i !== void 0 && t(`path aliases: ${Object.keys(i.paths).join(", ")}`);
6136
- let a = () => new re({
6271
+ let a = () => new ie({
6137
6272
  skipAddingFilesFromTsConfig: !0,
6138
- manipulationSettings: { quoteKind: ie.Single },
6273
+ manipulationSettings: { quoteKind: ae.Single },
6139
6274
  ...i === void 0 ? {} : { compilerOptions: {
6140
6275
  baseUrl: i.baseUrl,
6141
6276
  paths: i.paths
6142
6277
  } }
6143
- }), o, s = Q(e.root, r), c = r.filter((e) => e.needsImporters === !0 && e.scope !== void 0), l = [], u = [], d = [], p, m = {
6144
- find: (t) => (p ??= Z(e.root)).find(t),
6278
+ }), o, s = Z(e.root, r), c = r.filter((e) => e.needsImporters === !0 && e.scope !== void 0), l = [], u = [], d = [], p, m = {
6279
+ find: (t) => (p ??= X(e.root)).find(t),
6145
6280
  get scanned() {
6146
- return (p ??= Z(e.root)).scanned;
6281
+ return (p ??= X(e.root)).scanned;
6147
6282
  },
6148
6283
  get skipped() {
6149
- return (p ??= Z(e.root)).skipped;
6284
+ return (p ??= X(e.root)).skipped;
6150
6285
  }
6151
- }, h = c.length > 0 ? Ti(Q(e.root, [{
6286
+ }, h = c.length > 0 ? Bi(Z(e.root, [{
6152
6287
  ...c[0],
6153
- scope: Ni
6288
+ scope: Ji
6154
6289
  }])) : void 0;
6155
6290
  for (let n of r) {
6156
6291
  if (c.includes(n)) {
6157
- let r = a(), i = Q(e.root, [n]);
6158
- for (let e of Ei(i, h)) y(e) && r.addSourceFileAtPath(e);
6159
- let s = zi(r, [n], t, m);
6292
+ let r = a(), i = Z(e.root, [n]);
6293
+ for (let e of Vi(i, h)) y(e) && r.addSourceFileAtPath(e);
6294
+ let s = $(r, [n], t, m);
6160
6295
  e.dryRun || await r.save(), l.push(...s.applied), u.push(...s.manual), d.push(...s.skipped), o = void 0;
6161
6296
  continue;
6162
6297
  }
@@ -6165,7 +6300,7 @@ var C = (e, t, n) => {
6165
6300
  for (let t of s) y(t) && e.addSourceFileAtPath(t);
6166
6301
  return e;
6167
6302
  })();
6168
- let r = zi(o, [n], t, m);
6303
+ let r = $(o, [n], t, m);
6169
6304
  e.dryRun || await o.save(), l.push(...r.applied), u.push(...r.manual), d.push(...r.skipped);
6170
6305
  }
6171
6306
  return {
@@ -6175,4 +6310,4 @@ var C = (e, t, n) => {
6175
6310
  };
6176
6311
  };
6177
6312
  //#endregion
6178
- export { T as i, Bi as n, Y as r, $ as t };
6313
+ export { w as i, ea as n, J as r, Q as t };