@voltro/cli 0.51.0 → 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.
- package/CHANGELOG.md +127 -0
- package/dist/{agentsMd-D6yD7IQv.js → agentsMd-0l980yhL.js} +4 -1
- package/dist/agentsMd-SDDSkyl4.js +2 -0
- package/dist/apiBuild-BYBpL7Pz.js +2 -0
- package/dist/{apiBuild-CPDHXF72.js → apiBuild-CSFI8QGq.js} +3 -3
- package/dist/bin.js +1 -1
- package/dist/build-CPgcMQug.js +793 -0
- package/dist/checkCommand-2SbqzukH.js +2 -0
- package/dist/{checkCommand-DNuPiWMc.js → checkCommand-COmqc2cB.js} +92 -46
- package/dist/{cloudCmd-F4YJeqM3.js → cloudCmd-QUXh-b5w.js} +1 -1
- package/dist/codegen-CctkDO-1.js +2 -0
- package/dist/{codegen-CrMXs4hb.js → codegen-VF479Cnb.js} +1 -1
- package/dist/{codegenCommand-BNBHcNNj.js → codegenCommand-DCdG2JN-.js} +12 -12
- package/dist/{codemodRunner-BDVixlSw.js → codemodRunner-r7J9lIa7.js} +588 -540
- package/dist/{commands-B1OiS9bX.js → commands-Cc_nV8WI.js} +35 -35
- package/dist/{dashboardCommand-C-vvPY1B.js → dashboardCommand-C-gKvwqh.js} +5 -5
- package/dist/{dataCommand-C1GxXW5q.js → dataCommand-BgpBHnlB.js} +27 -27
- package/dist/dbCommand-DNb6yeOG.js +2 -0
- package/dist/{dbCommand-If4Y1xQ-.js → dbCommand-sHedr-NJ.js} +2 -2
- package/dist/dev--A3nsxA3.js +3 -0
- package/dist/{dev-kdAg9Q7l.js → dev-CRHoCEiy.js} +2142 -2103
- package/dist/doctorCommand-CqoWA2p5.js +2 -0
- package/dist/{doctorCommand-nKmeW78u.js → doctorCommand-DtfJ3FA6.js} +314 -234
- package/dist/{dormancyCommand-CY3wa_SW.js → dormancyCommand-Drn7o0No.js} +1 -1
- package/dist/{embeddingsCommand-BDLIgje_.js → embeddingsCommand-Z-jO1fWN.js} +1 -1
- package/dist/{envCommand-C6V_xVlT.js → envCommand-D4gCrrTZ.js} +8 -8
- package/dist/{evolveCommand-D3c4DSfN.js → evolveCommand-CMROeKeA.js} +2 -2
- package/dist/fileConventions-DOqD3lPS.js +34 -0
- package/dist/{fileTaxonomy-CJfgOllU.js → fileTaxonomy-DvDUV9wq.js} +1 -1
- package/dist/frameworkTableAssembly-C6ETawPR.js +2 -0
- package/dist/{frameworkTableAssembly-BwJVEKLr.js → frameworkTableAssembly-w-XnLa3q.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{infoCommand-BnRFEF1o.js → infoCommand-DXM868o_.js} +1 -1
- package/dist/inspectMetrics-CGF94puw.js +143 -0
- package/dist/{metaCommands-CfRLra0s.js → metaCommands-C6RFmF1r.js} +2 -2
- package/dist/{migrate-DehuBakM.js → migrate-D0F-eTlK.js} +2 -2
- package/dist/{pageConvention-cEiRxdab.js → pageConvention-CzUiSbtU.js} +1 -1
- package/dist/{privacyCommand-XejDMvmu.js → privacyCommand-DGdopOI6.js} +1 -1
- package/dist/{projectScaffold-mIX_DpSe.js → projectScaffold-B4dmTlwT.js} +1 -1
- package/dist/{projectScaffold-BIl97_E6.js → projectScaffold-EzlErR4E.js} +1 -1
- package/dist/{renderModeScan-D7J1B7Kw.js → renderModeScan-CcH2X1_D.js} +25 -10
- package/dist/{renderProfile-1OWWAAtx.js → renderProfile-Ck32Fzxr.js} +2 -2
- package/dist/{runtimeTrace-ZsBU7Tkx.js → runtimeTrace-BPQyCmC5.js} +1 -1
- package/dist/{sdkgen-O4XqWOjM.js → sdkgen-Se88ifTd.js} +1 -1
- package/dist/serveCommand-DLc-BznW.js +2 -0
- package/dist/{serveCommand-DdiYNBBu.js → serveCommand-DkP3OT0W.js} +885 -868
- package/dist/serveEntry.js +1 -1
- package/dist/start-DfL3fOiN.js +3 -0
- package/dist/start-jw89Xbqy.js +1339 -0
- package/dist/startEntry.js +1 -1
- package/dist/{staticCommand-Dr2M6tpU.js → staticCommand-BwNEDlSU.js} +1 -1
- package/dist/{test-rXFq4S76.js → test-f3amja6a.js} +1 -1
- package/dist/updateCommand-5gFVfK5q.js +2 -0
- package/dist/{updateCommand-Bs322Q78.js → updateCommand-BMk2e4ky.js} +1 -1
- package/dist/{webDev-B-ubQEMX.js → webDev-BgWL9gKV.js} +1156 -835
- package/dist/webDev-CZbTsDcH.js +2 -0
- package/dist/{webhooksCommand-FLYY9IXh.js → webhooksCommand-CoIO3jbj.js} +1 -1
- package/package.json +30 -17
- package/templates/AGENTS.core.md +11 -0
- package/templates/AGENTS.md +15 -4
- package/templates/agent-docs/_index.md +4 -4
- package/templates/agent-docs/_manifest.json +11 -11
- package/templates/agent-docs/cli.md +96 -14
- package/templates/agent-docs/data.md +210 -7
- package/templates/agent-docs/database/schema.md +1 -1
- package/templates/agent-docs/database/seedsdialects.md +1 -1
- package/templates/agent-docs/deployment.md +22 -3
- package/templates/agent-docs/introduction.md +46 -0
- package/templates/agent-docs/local-first-mobile.md +34 -7
- package/templates/agent-docs/plugins/ai-flows.md +1 -1
- package/templates/agent-docs/plugins/audit.md +5 -5
- package/templates/agent-docs/plugins/cdc-out.md +2 -2
- package/templates/agent-docs/plugins/{versioning.md → row-history.md} +22 -22
- package/templates/agent-docs/plugins/storage.md +2 -2
- package/templates/agent-docs/plugins.md +29 -7
- package/templates/agent-docs/reference.md +39 -2
- package/templates/agent-docs/routing.md +341 -47
- package/templates/agent-docs/schema-driven-ui.md +78 -2
- package/templates/agent-docs/security.md +125 -8
- package/templates/agent-docs/templates/apibackends.md +14 -14
- package/templates/agent-docs/templates/overview.md +1 -1
- package/templates/agent-docs/whats-new.md +76 -53
- package/templates/apps/api-ai/package.json +6 -7
- package/templates/apps/api-ai/tests/summarize.test.ts +1 -1
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-sqlite/package.json +8 -8
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-cms/package.json +9 -10
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/{api-versioning → api-row-history}/README.md +3 -3
- package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.server.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.server.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/app.config.ts +3 -3
- package/templates/apps/{api-versioning → api-row-history}/database/schema.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.server.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/package.json +8 -8
- package/templates/apps/api-row-history/template.json +6 -0
- package/templates/apps/{api-versioning → api-row-history}/tests/documents.create.test.ts +1 -1
- package/templates/apps/api-saas/app.config.ts +1 -0
- package/templates/apps/api-saas/package.json +10 -11
- package/templates/apps/api-saas-starter/package.json +10 -10
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-status/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +6 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-app/package.json +9 -9
- package/templates/apps/frontend-auth/package.json +8 -8
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-cms/package.json +9 -9
- package/templates/apps/frontend-collab/package.json +10 -10
- package/templates/apps/frontend-collab/src/pages/page.test.tsx +10 -9
- package/templates/apps/frontend-collab/src/pages/page.tsx +42 -65
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-docs/package.json +6 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +6 -7
- package/templates/apps/frontend-portal/package.json +8 -8
- package/templates/apps/frontend-saas/package.json +8 -8
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-static-blog/package.json +6 -6
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +4 -4
- package/dist/agentsMd-Bu_XQgVf.js +0 -2
- package/dist/apiBuild-GDKuGOMV.js +0 -2
- package/dist/build-DETLZAFt.js +0 -752
- package/dist/checkCommand-CWcnDArJ.js +0 -2
- package/dist/codegen-DiMn2KkZ.js +0 -2
- package/dist/dbCommand-C27HIsGE.js +0 -2
- package/dist/dev-CK522MV5.js +0 -3
- package/dist/doctorCommand-BK4l18eG.js +0 -2
- package/dist/fileConventions-Cof68_BL.js +0 -33
- package/dist/frameworkTableAssembly-CVDB2hCq.js +0 -2
- package/dist/inspectMetrics-CfdKLh6t.js +0 -72
- package/dist/serveCommand-BRnPCxVd.js +0 -2
- package/dist/start-BLNmWkLa.js +0 -1154
- package/dist/start-Dzicuyw8.js +0 -3
- package/dist/updateCommand-eXB35SEv.js +0 -2
- package/dist/webDev-DposiF3j.js +0 -2
- package/templates/apps/api-versioning/template.json +0 -6
- /package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.ts +0 -0
- /package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.ts +0 -0
- /package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.server.ts +0 -0
- /package/templates/apps/{api-versioning → api-row-history}/tsconfig.json +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { E as e,
|
|
2
|
-
import { t as d } from "./pageConvention-
|
|
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-
|
|
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
|
|
7
|
-
import { execFileSync as
|
|
8
|
-
import { Node as
|
|
9
|
-
import { globSync as
|
|
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
|
|
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
|
-
},
|
|
19
|
+
}, C = (e, t) => {
|
|
20
20
|
let n = e.getExpression();
|
|
21
|
-
return
|
|
22
|
-
},
|
|
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() &&
|
|
27
|
+
!t.getAliasNode() && b.isIdentifier(e) ? e.rename(r) : e.replaceWithText(r), i++;
|
|
28
28
|
}
|
|
29
29
|
return i;
|
|
30
|
-
},
|
|
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(
|
|
36
|
-
if (e.getExpression().getKind() !==
|
|
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 &&
|
|
38
|
+
i && b.isStringLiteral(i) && i.getLiteralValue() === t && (i.replaceWithText(JSON.stringify(n)), r++);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return r;
|
|
42
|
-
},
|
|
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(
|
|
46
|
-
for (let a of e) if (a.getTagNameNode().getText() === t) for (let e of a.getAttributes())
|
|
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
|
-
},
|
|
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 =
|
|
53
|
-
if (e.length !== 0) for (let t of o.getDescendantsOfKind(
|
|
54
|
-
if (!
|
|
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 || !
|
|
57
|
-
if (!
|
|
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 && (
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
78
|
-
renameImport:
|
|
79
|
-
renameModuleSpecifier:
|
|
80
|
-
renameJsxProp:
|
|
81
|
-
renameObjectKey:
|
|
82
|
-
addImport:
|
|
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 =
|
|
96
|
-
if (e.length !== 0) for (let t of s.getDescendantsOfKind(
|
|
97
|
-
if (!
|
|
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 =
|
|
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(
|
|
120
|
-
s &&
|
|
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 =
|
|
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(
|
|
130
|
+
for (let t of a.getDescendantsOfKind(x.Identifier)) {
|
|
131
131
|
if (!e.includes(t.getText())) continue;
|
|
132
|
-
let n = t.getFirstAncestorByKind(
|
|
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
|
-
},
|
|
140
|
-
if (!
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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() ===
|
|
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:
|
|
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:
|
|
216
|
+
module: E,
|
|
217
217
|
from: "RbacScopeProvider",
|
|
218
218
|
to: "PermissionProvider"
|
|
219
219
|
}) + t.renameImport(e, {
|
|
220
|
-
module:
|
|
220
|
+
module: E,
|
|
221
221
|
from: "canFromScopes",
|
|
222
222
|
to: "canCall"
|
|
223
223
|
}) + t.renameImport(e, {
|
|
224
|
-
module:
|
|
224
|
+
module: E,
|
|
225
225
|
from: "canAnyFromScopes",
|
|
226
226
|
to: "canCallAny"
|
|
227
227
|
}), a = t.renameModuleSpecifier(e, {
|
|
228
|
-
from:
|
|
229
|
-
to:
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
507
|
+
}), ke = "@voltro/plugin-atlassian", Ae = "atlassianPlugin", D = (e) => {
|
|
508
508
|
let t = [];
|
|
509
|
-
for (let n of e.getImportDeclarations()) if (n.getModuleSpecifierValue() ===
|
|
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 =
|
|
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) =>
|
|
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 =
|
|
521
|
-
if (e.length !== 0) for (let r of t.getDescendantsOfKind(
|
|
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 || !
|
|
524
|
+
if (!t || !b.isObjectLiteralExpression(t)) continue;
|
|
525
525
|
let i = t.getProperty("avatar");
|
|
526
|
-
if (!i || !
|
|
526
|
+
if (!i || !b.isPropertyAssignment(i)) continue;
|
|
527
527
|
let a = i.getInitializer();
|
|
528
|
-
!a || !
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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") ?
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
891
|
-
return
|
|
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(
|
|
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(
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
-
}),
|
|
1392
|
-
if (!
|
|
1391
|
+
}), M = (e) => {
|
|
1392
|
+
if (!b.isCallExpression(e)) return !1;
|
|
1393
1393
|
let t = e.getExpression();
|
|
1394
|
-
return
|
|
1395
|
-
},
|
|
1396
|
-
let t = 0, n = e.getDescendantsOfKind(
|
|
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() || !
|
|
1398
|
+
if (e.wasForgotten() || !M(e)) continue;
|
|
1399
1399
|
let n = e.getExpression();
|
|
1400
|
-
|
|
1400
|
+
b.isPropertyAccessExpression(n) && (e.replaceWithText(n.getExpression().getText()), t++);
|
|
1401
1401
|
}
|
|
1402
1402
|
return t;
|
|
1403
|
-
},
|
|
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) =>
|
|
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 =
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
1474
|
-
let r =
|
|
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
|
-
},
|
|
1480
|
+
}, P = (e, t) => {
|
|
1481
1481
|
let n = e.getFilePath(), r = [];
|
|
1482
|
-
for (let i of e.getProject().getSourceFiles()) for (let e of
|
|
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 =
|
|
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
|
-
},
|
|
1494
|
+
}, ut = (e) => {
|
|
1495
1495
|
let t = e.getProject().getCompilerOptions().paths;
|
|
1496
1496
|
if (t === void 0) return;
|
|
1497
|
-
let n =
|
|
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 =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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 (!
|
|
1522
|
-
let i =
|
|
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 && (
|
|
1540
|
+
r !== void 0 && (P(r, v(s, `${c}.page${t}`)), o += 1);
|
|
1541
1541
|
}
|
|
1542
|
-
|
|
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 =
|
|
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
|
-
}),
|
|
1554
|
+
}), mt = [
|
|
1555
1555
|
/\.page\.tsx$/,
|
|
1556
1556
|
a,
|
|
1557
1557
|
s,
|
|
1558
1558
|
l,
|
|
1559
1559
|
u,
|
|
1560
|
-
|
|
1560
|
+
t,
|
|
1561
1561
|
i,
|
|
1562
1562
|
c,
|
|
1563
1563
|
e,
|
|
1564
1564
|
r
|
|
1565
|
-
],
|
|
1566
|
-
let
|
|
1567
|
-
return !/\.tsx?$/.test(
|
|
1568
|
-
},
|
|
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 (
|
|
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 (!(
|
|
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 =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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 (!
|
|
1612
|
-
let o =
|
|
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 =
|
|
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 +=
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
1696
|
-
let
|
|
1697
|
-
return
|
|
1698
|
-
},
|
|
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
|
-
},
|
|
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 =
|
|
1718
|
+
let e = t.getFilePath(), i = g(e), a = xt(i);
|
|
1719
1719
|
if (a !== null) {
|
|
1720
|
-
|
|
1720
|
+
P(t, v(_(e), a)), n.push(`${i} → ${a}`);
|
|
1721
1721
|
continue;
|
|
1722
1722
|
}
|
|
1723
|
-
if (/\.types\.tsx?$/.test(i) &&
|
|
1723
|
+
if (/\.types\.tsx?$/.test(i) && St(t)) {
|
|
1724
1724
|
let n = i.replace(/\.types(\.tsx?)$/, "$1");
|
|
1725
|
-
|
|
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
|
-
}),
|
|
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) =>
|
|
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 (!
|
|
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() ===
|
|
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:
|
|
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 ${
|
|
1763
|
+
n > 0 && t(`errorTag: ${n} import(s) repointed to ${L}`);
|
|
1764
1764
|
}
|
|
1765
|
-
}),
|
|
1766
|
-
let t = _(e), n = g(e).replace(
|
|
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
|
-
},
|
|
1769
|
-
let t = _(e), n = g(e), r = /\.page\.spec\.tsx$/.test(n) ? "spec" : "test", i = n.replace(
|
|
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
|
-
},
|
|
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) =>
|
|
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 (!
|
|
1784
|
-
let n = g(t), i =
|
|
1785
|
-
if (!i && !
|
|
1786
|
-
let a = i ?
|
|
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 +=
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
2361
|
+
}), en = /* @__PURE__ */ new Set([
|
|
2362
2362
|
"description",
|
|
2363
2363
|
"version",
|
|
2364
2364
|
"globalRateLimit"
|
|
2365
|
-
]),
|
|
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) =>
|
|
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
|
|
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(
|
|
2376
|
-
let o = a.getProperties().filter((e) => e.isKind(
|
|
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 = [...
|
|
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
|
|
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
|
-
}),
|
|
2388
|
+
}), an = (e) => e.getDescendantsOfKind(x.CallExpression).filter((e) => {
|
|
2389
2389
|
let t = e.getExpression().getText();
|
|
2390
2390
|
return t === "broadcast" || t === "broadcastPlugin";
|
|
2391
|
-
}),
|
|
2391
|
+
}), on = (e) => {
|
|
2392
2392
|
let t = e.getArguments()[0];
|
|
2393
|
-
if (!(t === void 0 || !t.isKind(
|
|
2394
|
-
},
|
|
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) =>
|
|
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
|
|
2403
|
-
let o =
|
|
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(
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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() ===
|
|
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
|
-
},
|
|
2772
|
+
}, Cn = (e) => {
|
|
2773
2773
|
let t = 0;
|
|
2774
|
-
for (let n of e.getSourceFiles()) n.getFullText().includes(
|
|
2775
|
-
if (
|
|
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(
|
|
2778
|
-
e.replaceWithText(n.split(
|
|
2777
|
+
if (!n.includes(B)) return;
|
|
2778
|
+
e.replaceWithText(n.split(B).join(bn)), t++;
|
|
2779
2779
|
}
|
|
2780
2780
|
});
|
|
2781
2781
|
return t;
|
|
2782
|
-
},
|
|
2782
|
+
}, wn = (e) => {
|
|
2783
2783
|
let t = 0, n = 0;
|
|
2784
2784
|
for (let r of e.getSourceFiles()) {
|
|
2785
|
-
let e =
|
|
2785
|
+
let e = Sn(r, xn);
|
|
2786
2786
|
e.length !== 0 && r.forEachDescendant((r) => {
|
|
2787
|
-
if (!
|
|
2787
|
+
if (!b.isCallExpression(r) || !e.includes(r.getExpression().getText())) return;
|
|
2788
2788
|
let i = r.getParent();
|
|
2789
|
-
if (
|
|
2789
|
+
if (b.isPropertyAccessExpression(i) && i.getName() === "lang") {
|
|
2790
2790
|
i.getNameNode().replaceWithText("locale"), t++;
|
|
2791
2791
|
return;
|
|
2792
2792
|
}
|
|
2793
|
-
if (
|
|
2793
|
+
if (b.isVariableDeclaration(i)) {
|
|
2794
2794
|
let e = i.getNameNode();
|
|
2795
|
-
if (!
|
|
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
|
-
!
|
|
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
|
-
},
|
|
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(
|
|
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:
|
|
2819
|
+
module: z,
|
|
2820
2820
|
from: "LANG_COOKIE",
|
|
2821
2821
|
to: "LOCALE_COOKIE"
|
|
2822
|
-
}), i =
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
3278
|
+
}), Bn = /* @__PURE__ */ new Set([
|
|
3279
3279
|
"defineQuery",
|
|
3280
3280
|
"defineMutation",
|
|
3281
3281
|
"defineAction",
|
|
3282
3282
|
"defineStream"
|
|
3283
|
-
]),
|
|
3283
|
+
]), Vn = (e) => {
|
|
3284
3284
|
let t = e.getArguments()[0];
|
|
3285
|
-
if (t === void 0 || !t.isKind(
|
|
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(
|
|
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
|
-
},
|
|
3293
|
-
if (!
|
|
3294
|
-
let t =
|
|
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,
|
|
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) =>
|
|
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
|
-
}),
|
|
3346
|
+
}), Wn = [
|
|
3347
3347
|
"workosAuthorizationUrl",
|
|
3348
3348
|
"workosAuthenticateWithCode",
|
|
3349
3349
|
"workosBeginLogin"
|
|
3350
|
-
],
|
|
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") &&
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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(
|
|
3702
|
+
let t = e.getArguments()[0]?.asKind(x.ObjectLiteralExpression);
|
|
3703
3703
|
if (t === void 0) return !1;
|
|
3704
|
-
let n =
|
|
3704
|
+
let n = Zn(t, "messages");
|
|
3705
3705
|
return n !== void 0 && n.getProperty("queries") !== void 0;
|
|
3706
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
3800
|
+
}), tr = /* @__PURE__ */ new Set([
|
|
3801
3801
|
"@voltro/plugin-auth",
|
|
3802
3802
|
"@voltro/protocol/session",
|
|
3803
3803
|
"@voltro/plugin-sso-saml"
|
|
3804
|
-
]),
|
|
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 (
|
|
3808
|
-
for (let t of e.getDescendantsOfKind(
|
|
3809
|
-
for (let t of e.getDescendantsOfKind(
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
4370
|
+
}), vr = /* @__PURE__ */ new Set([
|
|
4371
4371
|
"@voltro/plugin-auth",
|
|
4372
4372
|
"@voltro/plugin-auth/schema",
|
|
4373
4373
|
"@voltro/plugin-auth/plugin"
|
|
4374
|
-
]),
|
|
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
|
-
]),
|
|
4382
|
+
]), br = (e) => {
|
|
4383
4383
|
if (!e.getFullText().includes("@voltro/plugin-auth")) return !1;
|
|
4384
|
-
for (let t of e.getImportDeclarations()) if (
|
|
4385
|
-
for (let e of t.getNamedImports()) if (
|
|
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(
|
|
4388
|
+
for (let t of e.getDescendantsOfKind(x.TypeReference)) if (t.getTypeName().getText() === "UserStore") return !0;
|
|
4389
4389
|
return !1;
|
|
4390
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
4475
|
+
}), Sr = /* @__PURE__ */ new Set([
|
|
4476
4476
|
"bindConnectionSubject",
|
|
4477
4477
|
"getConnectionSubject",
|
|
4478
4478
|
"unbindConnectionSubject",
|
|
4479
4479
|
"onBindConnectionSubject",
|
|
4480
4480
|
"connectionSubjectsSnapshot"
|
|
4481
|
-
]),
|
|
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(
|
|
4485
|
-
for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) if (
|
|
4486
|
-
for (let t of e.getDescendantsOfKind(
|
|
4487
|
-
for (let t of e.getDescendantsOfKind(
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
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(
|
|
4584
|
-
for (let t of e.getDescendantsOfKind(
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
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
|
-
]),
|
|
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(
|
|
4671
|
+
for (let t of e.getDescendantsOfKind(x.PropertyAccessExpression)) if (Dr.has(t.getName())) return !0;
|
|
4672
4672
|
return !1;
|
|
4673
|
-
},
|
|
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(
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
4941
|
+
}), Vr = (e) => {
|
|
4942
4942
|
let t = e.getArguments()[0];
|
|
4943
|
-
if (t === void 0 || !t.isKind(
|
|
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(
|
|
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
|
-
},
|
|
4950
|
+
}, Hr = (e, t) => /defineEvent\s*\(/.test(e) ? t.some((e) => {
|
|
4951
4951
|
if (e.getExpression().getText() !== "defineEvent") return !1;
|
|
4952
|
-
let t =
|
|
4952
|
+
let t = Vr(e);
|
|
4953
4953
|
return !t.has("guards") && !t.has("openAccess");
|
|
4954
|
-
}) : !1,
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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(
|
|
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(
|
|
5093
|
+
if (!t.getFullText().includes(V)) continue;
|
|
5094
5094
|
let e = !1;
|
|
5095
|
-
for (let n of t.getDescendantsOfKind(11)) n.getLiteralValue() ===
|
|
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 '${
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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: `\`${
|
|
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() ===
|
|
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() !==
|
|
5179
|
-
let r = e.getNamedImports().find((e) => e.getName() ===
|
|
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() ===
|
|
5184
|
-
name:
|
|
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:
|
|
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(`${
|
|
5193
|
+
n > 0 && t(`${U}: ${n} import(s) repointed to ${H}`);
|
|
5194
5194
|
}
|
|
5195
|
-
}),
|
|
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
|
-
}),
|
|
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) =>
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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
|
|
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
|
-
}),
|
|
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) =>
|
|
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 (!
|
|
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() ===
|
|
5460
|
+
let r = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === fi);
|
|
5461
5461
|
r === void 0 ? t.insertImportDeclaration(0, {
|
|
5462
|
-
moduleSpecifier:
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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,43 +5611,43 @@ 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
|
-
}),
|
|
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
|
-
],
|
|
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(
|
|
5622
|
-
if (
|
|
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(
|
|
5625
|
-
e.replaceWithText(n.split(
|
|
5624
|
+
if (!n.includes(G)) return;
|
|
5625
|
+
e.replaceWithText(n.split(G).join(xi)), t++;
|
|
5626
5626
|
}
|
|
5627
5627
|
});
|
|
5628
5628
|
return t;
|
|
5629
|
-
},
|
|
5629
|
+
}, Ci = w({
|
|
5630
5630
|
version: "0.49.0",
|
|
5631
5631
|
id: "0.49.0/02_import-run-symbols",
|
|
5632
5632
|
title: "`ImportRun` / `describeImportRun` / `IMPORT_RUNS_TABLE` → their `…TransferRun` names",
|
|
5633
5633
|
kind: "transform",
|
|
5634
5634
|
appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
|
|
5635
5635
|
let t = e.getFullText();
|
|
5636
|
-
return t.includes(
|
|
5636
|
+
return t.includes(G) ? !0 : bi.some((e) => t.includes(e)) ? W.some(([e]) => t.includes(e)) : !1;
|
|
5637
5637
|
}),
|
|
5638
5638
|
transform: ({ project: e, helpers: t, log: n }) => {
|
|
5639
5639
|
let r = 0;
|
|
5640
|
-
for (let n of
|
|
5640
|
+
for (let n of bi) for (let [i, a] of W) r += t.renameImport(e, {
|
|
5641
5641
|
module: n,
|
|
5642
5642
|
from: i,
|
|
5643
5643
|
to: a
|
|
5644
5644
|
});
|
|
5645
|
-
let i =
|
|
5645
|
+
let i = Si(e);
|
|
5646
5646
|
if (r + i === 0) return;
|
|
5647
5647
|
let a = [];
|
|
5648
|
-
r > 0 && a.push(`${r} import(s) renamed to their \`…TransferRun\` names`), i > 0 && a.push(`${i} hand-spelled \`${
|
|
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
5649
|
}
|
|
5650
|
-
}),
|
|
5650
|
+
}), wi = w({
|
|
5651
5651
|
version: "0.50.0",
|
|
5652
5652
|
id: "0.50.0/01_transfer-runs-endpoint",
|
|
5653
5653
|
title: "`GET /_voltro/admin/imports` → `GET /_voltro/admin/transfers`",
|
|
@@ -5671,7 +5671,7 @@ var C = (e, t, n) => {
|
|
|
5671
5671
|
"hand is anything that calls it directly — a monitoring check, an uptime probe,",
|
|
5672
5672
|
"a curl in a runbook, a dashboard datasource."
|
|
5673
5673
|
].join("\n")
|
|
5674
|
-
}),
|
|
5674
|
+
}), Ti = w({
|
|
5675
5675
|
version: "0.50.0",
|
|
5676
5676
|
id: "0.50.0/02_reissue-data-imports-rename",
|
|
5677
5677
|
title: "RE-CHECK: `voltro data imports` → `voltro data transfers` (0.49.0's note could not see your scripts)",
|
|
@@ -5703,7 +5703,7 @@ var C = (e, t, n) => {
|
|
|
5703
5703
|
"`voltro db apply` moved `_voltro_data_imports` → `_voltro_data_transfers`",
|
|
5704
5704
|
"with its rows."
|
|
5705
5705
|
].join("\n")
|
|
5706
|
-
}),
|
|
5706
|
+
}), Ei = w({
|
|
5707
5707
|
version: "0.50.0",
|
|
5708
5708
|
id: "0.50.0/03_interrupted-replace-tables-nullable",
|
|
5709
5709
|
title: "`InterruptedReplace.tables` is `number | null`",
|
|
@@ -5725,7 +5725,7 @@ var C = (e, t, n) => {
|
|
|
5725
5725
|
"not to do is coerce it, because `Number(null)` is `0` and the sentence then",
|
|
5726
5726
|
"reports a measurement that was never taken."
|
|
5727
5727
|
].join("\n")
|
|
5728
|
-
}),
|
|
5728
|
+
}), Di = w({
|
|
5729
5729
|
version: "0.51.0",
|
|
5730
5730
|
id: "0.51.0/01_computed-source-keeps-its-names",
|
|
5731
5731
|
title: "A COMPUTED `source:` can keep its typed names — do not widen the whole registry",
|
|
@@ -5779,7 +5779,7 @@ var C = (e, t, n) => {
|
|
|
5779
5779
|
"literal — a name read from a config file, or one assembled at runtime. Use it",
|
|
5780
5780
|
"when there is no key set to keep, not when recovering one takes two lines."
|
|
5781
5781
|
].join("\n")
|
|
5782
|
-
}),
|
|
5782
|
+
}), Oi = w({
|
|
5783
5783
|
version: "0.51.0",
|
|
5784
5784
|
id: "0.51.0/02_restore-refuses-without-marker",
|
|
5785
5785
|
title: "`voltro data restore` refuses when it cannot write the in-progress marker",
|
|
@@ -5787,7 +5787,7 @@ var C = (e, t, n) => {
|
|
|
5787
5787
|
reach: "beyond-source",
|
|
5788
5788
|
appliesTo: ({ text: e }) => e.find("voltro data restore").length > 0,
|
|
5789
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
|
-
}),
|
|
5790
|
+
}), ki = w({
|
|
5791
5791
|
version: "0.51.0",
|
|
5792
5792
|
id: "0.51.0/03_restore-assets-returns-counts",
|
|
5793
5793
|
title: "`restoreAssetsFromCas` returns `{ count, objects }`, not a number",
|
|
@@ -5821,23 +5821,58 @@ var C = (e, t, n) => {
|
|
|
5821
5821
|
"with `totalBytes` and `objectBytes` beside them), so a report can state all",
|
|
5822
5822
|
"three rather than implying one."
|
|
5823
5823
|
].join("\n")
|
|
5824
|
-
}),
|
|
5824
|
+
}), Ai = "@voltro/i18n", ji = "I18nProvider", Mi = (e) => {
|
|
5825
5825
|
let t = [];
|
|
5826
5826
|
for (let n of e.getImportDeclarations()) {
|
|
5827
5827
|
let e = n.getModuleSpecifierValue();
|
|
5828
|
-
if (e ===
|
|
5828
|
+
if (e === Ai || e === `${Ai}/server`) for (let e of n.getNamedImports()) e.getName() === ji && t.push(e.getAliasNode()?.getText() ?? e.getName());
|
|
5829
5829
|
}
|
|
5830
5830
|
return t;
|
|
5831
|
-
},
|
|
5832
|
-
|
|
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 = [
|
|
5833
5867
|
ge,
|
|
5834
|
-
|
|
5868
|
+
_e,
|
|
5835
5869
|
ye,
|
|
5836
5870
|
be,
|
|
5837
|
-
|
|
5838
|
-
|
|
5871
|
+
xe,
|
|
5872
|
+
we,
|
|
5839
5873
|
Ee,
|
|
5840
5874
|
De,
|
|
5875
|
+
Oe,
|
|
5841
5876
|
je,
|
|
5842
5877
|
Me,
|
|
5843
5878
|
Fe,
|
|
@@ -5858,134 +5893,147 @@ var C = (e, t, n) => {
|
|
|
5858
5893
|
et,
|
|
5859
5894
|
tt,
|
|
5860
5895
|
nt,
|
|
5861
|
-
ct,
|
|
5862
|
-
rt,
|
|
5863
5896
|
st,
|
|
5864
|
-
|
|
5897
|
+
rt,
|
|
5898
|
+
ot,
|
|
5899
|
+
pt,
|
|
5900
|
+
vt,
|
|
5865
5901
|
yt,
|
|
5866
5902
|
bt,
|
|
5867
|
-
|
|
5903
|
+
Ct,
|
|
5868
5904
|
wt,
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
an,
|
|
5884
|
-
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,
|
|
5885
5919
|
sn,
|
|
5886
5920
|
cn,
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5921
|
+
ln,
|
|
5922
|
+
dn,
|
|
5923
|
+
pn,
|
|
5924
|
+
hn,
|
|
5925
|
+
_n,
|
|
5926
|
+
yn,
|
|
5893
5927
|
Tn,
|
|
5894
5928
|
Dn,
|
|
5895
5929
|
kn,
|
|
5896
5930
|
jn,
|
|
5897
|
-
Mn,
|
|
5898
5931
|
Nn,
|
|
5899
5932
|
Pn,
|
|
5900
5933
|
Fn,
|
|
5934
|
+
In,
|
|
5901
5935
|
Ln,
|
|
5902
|
-
|
|
5936
|
+
zn,
|
|
5903
5937
|
Un,
|
|
5904
5938
|
Gn,
|
|
5905
|
-
Kn,
|
|
5906
5939
|
qn,
|
|
5907
5940
|
Jn,
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
nr,
|
|
5941
|
+
Yn,
|
|
5942
|
+
Xn,
|
|
5943
|
+
$n,
|
|
5912
5944
|
or,
|
|
5945
|
+
er,
|
|
5946
|
+
ir,
|
|
5913
5947
|
cr,
|
|
5914
|
-
lr,
|
|
5915
5948
|
ur,
|
|
5916
|
-
|
|
5949
|
+
dr,
|
|
5950
|
+
fr,
|
|
5917
5951
|
hr,
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
yr,
|
|
5952
|
+
_r,
|
|
5953
|
+
wr,
|
|
5921
5954
|
Er,
|
|
5955
|
+
xr,
|
|
5922
5956
|
kr,
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
Hr,
|
|
5957
|
+
Mr,
|
|
5958
|
+
Pr,
|
|
5959
|
+
Ir,
|
|
5927
5960
|
Br,
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5961
|
+
Gr,
|
|
5962
|
+
Ur,
|
|
5963
|
+
Yr,
|
|
5931
5964
|
Zr,
|
|
5932
|
-
|
|
5965
|
+
$r,
|
|
5966
|
+
ei,
|
|
5933
5967
|
ti,
|
|
5934
|
-
|
|
5935
|
-
ri,
|
|
5936
|
-
ai,
|
|
5968
|
+
ii,
|
|
5937
5969
|
oi,
|
|
5938
5970
|
si,
|
|
5971
|
+
li,
|
|
5939
5972
|
ui,
|
|
5940
5973
|
di,
|
|
5941
|
-
fi,
|
|
5942
|
-
pi,
|
|
5943
5974
|
mi,
|
|
5944
5975
|
hi,
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5976
|
+
gi,
|
|
5977
|
+
_i,
|
|
5978
|
+
vi,
|
|
5979
|
+
yi,
|
|
5948
5980
|
Ci,
|
|
5949
5981
|
wi,
|
|
5950
5982
|
Ti,
|
|
5951
5983
|
Ei,
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
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)",
|
|
5956
5992
|
kind: "transform",
|
|
5957
|
-
appliesTo: ({ project: e }) => e.getSourceFiles().some((e) =>
|
|
5958
|
-
transform: ({ project: e,
|
|
5959
|
-
let
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
let c = s.getProperty("timeZone");
|
|
5973
|
-
if (!c || !x.isPropertyAssignment(c)) continue;
|
|
5974
|
-
if (a.getAttribute("timeZone")) {
|
|
5975
|
-
c.remove(), n++;
|
|
5976
|
-
continue;
|
|
5977
|
-
}
|
|
5978
|
-
let l = c.getInitializer()?.getText() ?? "'UTC'";
|
|
5979
|
-
c.remove(), a.addAttribute({
|
|
5980
|
-
name: "timeZone",
|
|
5981
|
-
initializer: `{${l}}`
|
|
5982
|
-
}), s.getProperties().length === 0 && e.remove(), n++;
|
|
5983
|
-
}
|
|
5984
|
-
}
|
|
5985
|
-
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"));
|
|
5993
|
+
appliesTo: ({ project: e, text: t }) => t.find(K).length > 0 || e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === K)),
|
|
5994
|
+
transform: ({ project: e, helpers: t, log: n }) => {
|
|
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"
|
|
6003
|
+
});
|
|
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).`);
|
|
5986
6008
|
}
|
|
6009
|
+
}),
|
|
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",
|
|
6014
|
+
kind: "manual",
|
|
6015
|
+
appliesTo: ({ text: e }) => e.find("onHttpRequest").length > 0,
|
|
6016
|
+
note: [
|
|
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).",
|
|
6021
|
+
"",
|
|
6022
|
+
"Decide, per interceptor, what a failure of YOUR dependency should mean:",
|
|
6023
|
+
"",
|
|
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.",
|
|
6028
|
+
"",
|
|
6029
|
+
" try { decision = await store.consume(…) }",
|
|
6030
|
+
" catch (cause) { console.warn(\"… ALLOWED without limit\", cause); return next() }",
|
|
6031
|
+
"",
|
|
6032
|
+
" (that is what plugin-ratelimit's httpShield does now — a Redis outage",
|
|
6033
|
+
" must not become a self-inflicted API outage)."
|
|
6034
|
+
].join("\n")
|
|
5987
6035
|
})
|
|
5988
|
-
],
|
|
6036
|
+
], J = /* @__PURE__ */ new Set([
|
|
5989
6037
|
"node_modules",
|
|
5990
6038
|
".git",
|
|
5991
6039
|
"dist",
|
|
@@ -5997,42 +6045,42 @@ var C = (e, t, n) => {
|
|
|
5997
6045
|
".turbo",
|
|
5998
6046
|
".cache",
|
|
5999
6047
|
".output"
|
|
6000
|
-
]),
|
|
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) => {
|
|
6001
6049
|
let t = e.split("/").filter((e) => e.length > 0).pop();
|
|
6002
6050
|
if (t === void 0 || t === "." || t === "..") return;
|
|
6003
|
-
let n = t.replace(
|
|
6051
|
+
let n = t.replace(Li, "");
|
|
6004
6052
|
return n.length > 0 ? n : void 0;
|
|
6005
|
-
},
|
|
6053
|
+
}, Bi = (e) => {
|
|
6006
6054
|
let t = /* @__PURE__ */ new Map();
|
|
6007
6055
|
for (let n of e) {
|
|
6008
6056
|
let e;
|
|
6009
6057
|
try {
|
|
6010
|
-
e =
|
|
6058
|
+
e = te(n, "utf8");
|
|
6011
6059
|
} catch {
|
|
6012
6060
|
continue;
|
|
6013
6061
|
}
|
|
6014
|
-
|
|
6015
|
-
for (let r =
|
|
6016
|
-
let e =
|
|
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] ?? "");
|
|
6017
6065
|
if (e === void 0) continue;
|
|
6018
6066
|
let i = t.get(e);
|
|
6019
6067
|
i === void 0 ? t.set(e, /* @__PURE__ */ new Set([n])) : i.add(n);
|
|
6020
6068
|
}
|
|
6021
6069
|
}
|
|
6022
6070
|
return t;
|
|
6023
|
-
},
|
|
6071
|
+
}, Vi = (e, t) => {
|
|
6024
6072
|
let n = new Set(e);
|
|
6025
|
-
for (let r of e) for (let e of [
|
|
6073
|
+
for (let r of e) for (let e of [Ri(r), g(_(r))]) {
|
|
6026
6074
|
let r = t.get(e);
|
|
6027
6075
|
if (r !== void 0) for (let e of r) n.add(e);
|
|
6028
6076
|
}
|
|
6029
6077
|
return n;
|
|
6030
|
-
},
|
|
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) => {
|
|
6031
6079
|
let t = e.slice(e.lastIndexOf("/") + 1);
|
|
6032
|
-
return
|
|
6033
|
-
},
|
|
6080
|
+
return Hi.some((e) => e.startsWith(".") ? t.endsWith(e) : t === e);
|
|
6081
|
+
}, Ki = (e) => {
|
|
6034
6082
|
try {
|
|
6035
|
-
let t =
|
|
6083
|
+
let t = re("git", [
|
|
6036
6084
|
"ls-files",
|
|
6037
6085
|
"--cached",
|
|
6038
6086
|
"--others",
|
|
@@ -6051,23 +6099,23 @@ var C = (e, t, n) => {
|
|
|
6051
6099
|
} catch {
|
|
6052
6100
|
return;
|
|
6053
6101
|
}
|
|
6054
|
-
},
|
|
6102
|
+
}, X = (e, t = Ki) => {
|
|
6055
6103
|
let n = t(e);
|
|
6056
|
-
if (n === void 0) return
|
|
6104
|
+
if (n === void 0) return qi;
|
|
6057
6105
|
let r = /* @__PURE__ */ new Map(), i = [];
|
|
6058
6106
|
for (let t of n) {
|
|
6059
|
-
if (t.split("/").some((e) =>
|
|
6060
|
-
if (r.size >=
|
|
6107
|
+
if (t.split("/").some((e) => J.has(e)) || !Gi(t)) continue;
|
|
6108
|
+
if (r.size >= Wi) {
|
|
6061
6109
|
i.push(t);
|
|
6062
6110
|
continue;
|
|
6063
6111
|
}
|
|
6064
6112
|
let n = v(e, t);
|
|
6065
6113
|
try {
|
|
6066
|
-
if (
|
|
6114
|
+
if (ne(n).size > Ui) {
|
|
6067
6115
|
i.push(t);
|
|
6068
6116
|
continue;
|
|
6069
6117
|
}
|
|
6070
|
-
let e =
|
|
6118
|
+
let e = te(n, "utf8");
|
|
6071
6119
|
if (e.includes("\0")) {
|
|
6072
6120
|
i.push(t);
|
|
6073
6121
|
continue;
|
|
@@ -6087,47 +6135,47 @@ var C = (e, t, n) => {
|
|
|
6087
6135
|
scanned: r.size,
|
|
6088
6136
|
skipped: i
|
|
6089
6137
|
};
|
|
6090
|
-
},
|
|
6138
|
+
}, qi = {
|
|
6091
6139
|
find: () => [],
|
|
6092
6140
|
scanned: 0,
|
|
6093
6141
|
skipped: []
|
|
6094
|
-
},
|
|
6142
|
+
}, Ji = [
|
|
6095
6143
|
"**/*.ts",
|
|
6096
6144
|
"**/*.tsx",
|
|
6097
6145
|
"!**/node_modules/**",
|
|
6098
6146
|
"!**/dist/**",
|
|
6099
6147
|
"!**/.framework/**",
|
|
6100
6148
|
"!**/*.d.ts"
|
|
6101
|
-
],
|
|
6149
|
+
], Z = (e, t, n = Zi) => {
|
|
6102
6150
|
let r = /* @__PURE__ */ new Set();
|
|
6103
|
-
for (let e of t) for (let t of e.scope ??
|
|
6151
|
+
for (let e of t) for (let t of e.scope ?? Ji) r.add(t);
|
|
6104
6152
|
let i = n(e);
|
|
6105
6153
|
if (i !== void 0) {
|
|
6106
|
-
let t = [...r].filter((e) => !e.startsWith("!")).map((e) =>
|
|
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 = [];
|
|
6107
6155
|
for (let r of i) {
|
|
6108
6156
|
if (a.some((e) => r === e || r.startsWith(`${e}/`) || r.includes(`/${e}/`)) || !t.some((e) => e(r)) || n.some((e) => e(r))) continue;
|
|
6109
6157
|
let i = v(e, r);
|
|
6110
6158
|
y(i) && o.push(i);
|
|
6111
6159
|
}
|
|
6112
|
-
return
|
|
6160
|
+
return Yi(o.length, e), o;
|
|
6113
6161
|
}
|
|
6114
|
-
let a =
|
|
6162
|
+
let a = oe([...r], {
|
|
6115
6163
|
cwd: e,
|
|
6116
6164
|
absolute: !0,
|
|
6117
6165
|
expandDirectories: !1,
|
|
6118
6166
|
followSymbolicLinks: !1,
|
|
6119
|
-
ignore: [...
|
|
6167
|
+
ignore: [...Ii()]
|
|
6120
6168
|
});
|
|
6121
|
-
return
|
|
6122
|
-
},
|
|
6123
|
-
let n =
|
|
6169
|
+
return Yi(a.length, e), a;
|
|
6170
|
+
}, Yi = (e, t) => {
|
|
6171
|
+
let n = Qi();
|
|
6124
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.`);
|
|
6125
|
-
},
|
|
6173
|
+
}, Xi = (e) => {
|
|
6126
6174
|
let t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*\//g, "\0").replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*").replace(/\u0000/g, "(?:.*/)?").replace(/\\\{([^}]*)\\\}/g, (e, t) => `(?:${t.split(",").join("|")})`);
|
|
6127
6175
|
return (e) => RegExp(`^${t}$`).test(e);
|
|
6128
|
-
},
|
|
6176
|
+
}, Zi = (e) => {
|
|
6129
6177
|
try {
|
|
6130
|
-
let t =
|
|
6178
|
+
let t = re("git", [
|
|
6131
6179
|
"ls-files",
|
|
6132
6180
|
"--cached",
|
|
6133
6181
|
"--others",
|
|
@@ -6146,17 +6194,17 @@ var C = (e, t, n) => {
|
|
|
6146
6194
|
} catch {
|
|
6147
6195
|
return;
|
|
6148
6196
|
}
|
|
6149
|
-
},
|
|
6197
|
+
}, Qi = () => {
|
|
6150
6198
|
let e = Number(process.env.VOLTRO_CODEMOD_MAX_FILES);
|
|
6151
6199
|
return Number.isInteger(e) && e > 0 ? e : 2e4;
|
|
6152
|
-
},
|
|
6200
|
+
}, Q = (e, t) => {
|
|
6153
6201
|
let n = e.split(".").map(Number), r = t.split(".").map(Number);
|
|
6154
6202
|
for (let e = 0; e < 3; e++) {
|
|
6155
6203
|
let t = (n[e] ?? 0) - (r[e] ?? 0);
|
|
6156
6204
|
if (t !== 0) return t;
|
|
6157
6205
|
}
|
|
6158
6206
|
return 0;
|
|
6159
|
-
},
|
|
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) => {
|
|
6160
6208
|
let i = [], a = [], o = [];
|
|
6161
6209
|
for (let s of t) {
|
|
6162
6210
|
let t = !s.appliesTo || s.appliesTo({
|
|
@@ -6179,7 +6227,7 @@ var C = (e, t, n) => {
|
|
|
6179
6227
|
let l = new Map(e.getSourceFiles().map((e) => [e.getFilePath(), e.getFullText()]));
|
|
6180
6228
|
s.transform?.({
|
|
6181
6229
|
project: e,
|
|
6182
|
-
helpers:
|
|
6230
|
+
helpers: pe,
|
|
6183
6231
|
log: n
|
|
6184
6232
|
});
|
|
6185
6233
|
let u = new Map(e.getSourceFiles().map((e) => [e.getFilePath(), e.getFullText()])), d = /* @__PURE__ */ new Map();
|
|
@@ -6207,8 +6255,8 @@ var C = (e, t, n) => {
|
|
|
6207
6255
|
manual: a,
|
|
6208
6256
|
skipped: o
|
|
6209
6257
|
};
|
|
6210
|
-
},
|
|
6211
|
-
let t = e.log ?? (() => {}), 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 : (() => {
|
|
6212
6260
|
let t = n.filter((t) => e.only.includes(t.id)), r = e.only.filter((e) => !n.some((t) => t.id === e));
|
|
6213
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")}`);
|
|
6214
6262
|
return t;
|
|
@@ -6220,30 +6268,30 @@ var C = (e, t, n) => {
|
|
|
6220
6268
|
};
|
|
6221
6269
|
let i = f(e.root);
|
|
6222
6270
|
i !== void 0 && t(`path aliases: ${Object.keys(i.paths).join(", ")}`);
|
|
6223
|
-
let a = () => new
|
|
6271
|
+
let a = () => new ie({
|
|
6224
6272
|
skipAddingFilesFromTsConfig: !0,
|
|
6225
|
-
manipulationSettings: { quoteKind:
|
|
6273
|
+
manipulationSettings: { quoteKind: ae.Single },
|
|
6226
6274
|
...i === void 0 ? {} : { compilerOptions: {
|
|
6227
6275
|
baseUrl: i.baseUrl,
|
|
6228
6276
|
paths: i.paths
|
|
6229
6277
|
} }
|
|
6230
|
-
}), o, s =
|
|
6231
|
-
find: (t) => (p ??=
|
|
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),
|
|
6232
6280
|
get scanned() {
|
|
6233
|
-
return (p ??=
|
|
6281
|
+
return (p ??= X(e.root)).scanned;
|
|
6234
6282
|
},
|
|
6235
6283
|
get skipped() {
|
|
6236
|
-
return (p ??=
|
|
6284
|
+
return (p ??= X(e.root)).skipped;
|
|
6237
6285
|
}
|
|
6238
|
-
}, h = c.length > 0 ?
|
|
6286
|
+
}, h = c.length > 0 ? Bi(Z(e.root, [{
|
|
6239
6287
|
...c[0],
|
|
6240
|
-
scope:
|
|
6288
|
+
scope: Ji
|
|
6241
6289
|
}])) : void 0;
|
|
6242
6290
|
for (let n of r) {
|
|
6243
6291
|
if (c.includes(n)) {
|
|
6244
|
-
let r = a(), i =
|
|
6245
|
-
for (let e of
|
|
6246
|
-
let s =
|
|
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);
|
|
6247
6295
|
e.dryRun || await r.save(), l.push(...s.applied), u.push(...s.manual), d.push(...s.skipped), o = void 0;
|
|
6248
6296
|
continue;
|
|
6249
6297
|
}
|
|
@@ -6252,7 +6300,7 @@ var C = (e, t, n) => {
|
|
|
6252
6300
|
for (let t of s) y(t) && e.addSourceFileAtPath(t);
|
|
6253
6301
|
return e;
|
|
6254
6302
|
})();
|
|
6255
|
-
let r =
|
|
6303
|
+
let r = $(o, [n], t, m);
|
|
6256
6304
|
e.dryRun || await o.save(), l.push(...r.applied), u.push(...r.manual), d.push(...r.skipped);
|
|
6257
6305
|
}
|
|
6258
6306
|
return {
|
|
@@ -6262,4 +6310,4 @@ var C = (e, t, n) => {
|
|
|
6262
6310
|
};
|
|
6263
6311
|
};
|
|
6264
6312
|
//#endregion
|
|
6265
|
-
export {
|
|
6313
|
+
export { w as i, ea as n, J as r, Q as t };
|