@jini-ai/devops 0.7.2 → 0.7.3-next.2
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 +2 -2
- package/README.md +8 -4
- package/dist/agent-jobs/jobs.d.ts +1 -1
- package/dist/agent-jobs/jobs.js +4 -3
- package/dist/agent-jobs/node.d.ts +2 -2
- package/dist/agent-jobs/node.js +2 -2
- package/dist/backup/plan-store.node.d.ts +73 -0
- package/dist/backup/plan-store.node.js +60 -0
- package/dist/backup/push-jobs.d.ts +88 -0
- package/dist/backup/push-jobs.js +95 -0
- package/dist/backup/upload.node.d.ts +71 -0
- package/dist/backup/upload.node.js +122 -0
- package/dist/checks/coverage/diff.d.ts +2 -2
- package/dist/checks/coverage/diff.js +2 -2
- package/dist/checks/coverage/disk.d.ts +5 -5
- package/dist/checks/coverage/disk.js +5 -5
- package/dist/checks/coverage/floors.d.ts +2 -2
- package/dist/checks/coverage/floors.js +2 -2
- package/dist/checks/coverage/integrity.d.ts +10 -5
- package/dist/checks/coverage/integrity.js +12 -5
- package/dist/checks/coverage/lcov.d.ts +8 -8
- package/dist/checks/coverage/lcov.js +8 -8
- package/dist/checks/env-access.d.ts +37 -0
- package/dist/checks/env-access.js +57 -0
- package/dist/checks/hardwiring-node.d.ts +6 -3
- package/dist/checks/hardwiring-node.js +7 -6
- package/dist/checks/hardwiring.d.ts +32 -8
- package/dist/checks/hardwiring.js +395 -338
- package/dist/checks/node.d.ts +2 -2
- package/dist/checks/node.js +2 -2
- package/dist/checks/published-types/index.d.ts +10 -4
- package/dist/checks/published-types/index.js +30 -9
- package/dist/core/redirect-guard.d.ts +2 -2
- package/dist/core/redirect-guard.js +2 -2
- package/dist/deploy/adapters/undici.d.ts +8 -0
- package/dist/deploy/adapters/undici.js +6 -0
- package/dist/deploy/config-injection.d.ts +43 -0
- package/dist/deploy/config-injection.js +60 -0
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +1 -0
- package/dist/deploy/naming.d.ts +2 -2
- package/dist/deploy/naming.js +2 -2
- package/dist/deploy/node.d.ts +17 -6
- package/dist/deploy/node.js +8 -9
- package/dist/deploy/ops-runner.d.ts +8 -6
- package/dist/deploy/ops-runner.js +7 -6
- package/dist/deploy/ops-tool-contracts.d.ts +2 -1
- package/dist/deploy/ops-tools.js +1 -1
- package/dist/deploy/reachability.d.ts +1 -1
- package/dist/deploy/reachability.js +1 -1
- package/dist/deploy/react/PublishRunResult.d.ts +24 -0
- package/dist/deploy/react/PublishRunResult.js +25 -0
- package/dist/deploy/react/index.d.ts +3 -0
- package/dist/deploy/react/index.js +2 -0
- package/dist/deploy/tool.d.ts +1 -1
- package/dist/deploy/tool.js +1 -1
- package/dist/dns/delegation.d.ts +2 -2
- package/dist/dns/delegation.js +5 -5
- package/dist/dns/node/resolver.js +30 -29
- package/dist/dns/verify.d.ts +1 -2
- package/dist/dns/verify.js +3 -3
- package/dist/local-dev/free-port.d.ts +25 -0
- package/dist/local-dev/free-port.js +44 -0
- package/dist/local-dev/index.d.ts +4 -3
- package/dist/local-dev/index.js +4 -3
- package/dist/local-dev/node-runtime.d.ts +2 -2
- package/dist/local-dev/node-runtime.js +1 -1
- package/dist/packaging/electron/archive.d.ts +5 -5
- package/dist/packaging/electron/archive.js +5 -5
- package/dist/packaging/electron/asar-adapter.d.ts +1 -1
- package/dist/packaging/electron/asar-adapter.js +1 -1
- package/dist/packaging/electron/entry.d.ts +4 -0
- package/dist/packaging/electron/entry.js +4 -0
- package/dist/packaging/electron/imports.d.ts +2 -2
- package/dist/packaging/electron/imports.js +2 -2
- package/dist/packaging/electron/isolation.d.ts +36 -0
- package/dist/packaging/electron/isolation.js +64 -0
- package/dist/packaging/electron/node.d.ts +2 -2
- package/dist/packaging/electron/node.js +2 -2
- package/dist/packaging/electron/payload-scan.d.ts +17 -0
- package/dist/packaging/electron/payload-scan.js +20 -0
- package/dist/packaging/electron/policies.d.ts +6 -6
- package/dist/packaging/electron/policies.js +6 -6
- package/dist/packaging/electron/stability.d.ts +1 -1
- package/dist/packaging/electron/stability.js +1 -1
- package/dist/packaging/electron/staging.d.ts +11 -11
- package/dist/packaging/electron/staging.js +11 -11
- package/dist/packaging/electron/tree-fingerprint.d.ts +31 -0
- package/dist/packaging/electron/tree-fingerprint.js +59 -0
- package/dist/packaging/electron/typescript.d.ts +8 -2
- package/dist/packaging/electron/typescript.js +108 -99
- package/dist/packaging/electron/update-manifest-merge.d.ts +53 -0
- package/dist/packaging/electron/update-manifest-merge.js +82 -0
- package/dist/source-control/commit.d.ts +19 -3
- package/dist/source-control/commit.js +99 -16
- package/dist/source-control/contracts.d.ts +20 -1
- package/dist/source-control/kit.d.ts +1 -1
- package/dist/source-control/kit.js +1 -1
- package/dist/source-control/registry.d.ts +2 -2
- package/dist/source-control/registry.js +2 -2
- package/dist/static-export/css-urls.d.ts +3 -1
- package/dist/static-export/css-urls.js +1 -1
- package/dist/static-export/fetch-adapter.d.ts +1 -1
- package/dist/static-export/fetch-adapter.js +1 -1
- package/dist/static-export/html-url-locations.js +1 -1
- package/dist/static-export/transforms.d.ts +4 -4
- package/dist/static-export/transforms.js +6 -6
- package/package.json +49 -15
|
@@ -22,360 +22,417 @@ const VENDOR_SCOPES = /^@(?:aws-sdk|azure|google-cloud|ai-sdk|tavily|composio|e2
|
|
|
22
22
|
function packageName(specifier) {
|
|
23
23
|
return specifier.split('/').slice(0, specifier.startsWith('@') ? 2 : 1).join('/');
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return kept(node.moduleReference.expression, node.isTypeOnly, includeTypeOnly);
|
|
25
|
+
function parse({ c, file, source }) {
|
|
26
|
+
const tree = c.createSourceFile(file, source, c.ScriptTarget.Latest, true, scriptKind({ c, file }));
|
|
27
|
+
const failure = syntaxError({ tree, file });
|
|
28
|
+
if (failure)
|
|
29
|
+
throw failure;
|
|
30
|
+
return tree;
|
|
31
|
+
}
|
|
32
|
+
function scriptKind({ c, file }) {
|
|
33
|
+
if (/\.[jt]sx$/.test(file))
|
|
34
|
+
return c.ScriptKind.TSX;
|
|
35
|
+
return /\.[cm]?js$/.test(file) ? c.ScriptKind.JS : c.ScriptKind.TS;
|
|
36
|
+
}
|
|
37
|
+
function member({ c, node, name }) {
|
|
38
|
+
if (c.isPropertyAccessExpression(node))
|
|
39
|
+
return node.name.text === name;
|
|
40
|
+
return c.isElementAccessExpression(node) && c.isStringLiteralLike(node.argumentExpression) && node.argumentExpression.text === name;
|
|
41
|
+
}
|
|
42
|
+
function env(c, node) {
|
|
43
|
+
return member({ c, node, name: 'env' }) && 'expression' in node && c.isIdentifier(node.expression) &&
|
|
44
|
+
node.expression.text === 'process';
|
|
45
|
+
}
|
|
46
|
+
function envKey(c, node) {
|
|
47
|
+
if (c.isPropertyAccessExpression(node) && env(c, node.expression))
|
|
48
|
+
return node.name.text;
|
|
49
|
+
if (c.isElementAccessExpression(node) && env(c, node.expression) && c.isStringLiteralLike(node.argumentExpression))
|
|
50
|
+
return node.argumentExpression.text;
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
function erasedImport(node) {
|
|
54
|
+
// `import { type X }` can emit `import {}` under verbatimModuleSyntax: still a load.
|
|
55
|
+
return node.importClause?.isTypeOnly === true;
|
|
56
|
+
}
|
|
57
|
+
function kept({ literal, typeOnly, includeTypeOnly }) {
|
|
58
|
+
return includeTypeOnly || !typeOnly ? literal : undefined;
|
|
59
|
+
}
|
|
60
|
+
function declarationLiteral({ c, node, includeTypeOnly }) {
|
|
61
|
+
if (c.isImportDeclaration(node))
|
|
62
|
+
return kept({ literal: node.moduleSpecifier, typeOnly: erasedImport(node), includeTypeOnly });
|
|
63
|
+
if (c.isExportDeclaration(node) && node.moduleSpecifier)
|
|
64
|
+
return kept({ literal: node.moduleSpecifier, typeOnly: node.isTypeOnly, includeTypeOnly });
|
|
65
|
+
if (c.isImportEqualsDeclaration(node) && c.isExternalModuleReference(node.moduleReference))
|
|
66
|
+
return kept({ literal: node.moduleReference.expression, typeOnly: node.isTypeOnly, includeTypeOnly });
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
function loadCallLiteral(c, node) {
|
|
70
|
+
if (!c.isCallExpression(node))
|
|
72
71
|
return undefined;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (!c.isVariableStatement(statement))
|
|
98
|
-
return [];
|
|
99
|
-
return statement.declarationList.declarations.flatMap((decl) => {
|
|
100
|
-
if (!c.isIdentifier(decl.name))
|
|
101
|
-
return [];
|
|
102
|
-
const implemented = decl.initializer && (c.isArrowFunction(decl.initializer) || c.isFunctionExpression(decl.initializer));
|
|
103
|
-
// Published .d.ts files retain arrow exports as function-type declarations, without bodies.
|
|
104
|
-
const declared = decl.type && c.isFunctionTypeNode(decl.type);
|
|
105
|
-
if (!implemented && !declared)
|
|
106
|
-
return [];
|
|
107
|
-
return [{ name: decl.name.text, node: decl }];
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function exportedFunctions({ tree }, _options = {}) {
|
|
111
|
-
const locals = new Map();
|
|
112
|
-
const found = [];
|
|
113
|
-
for (const statement of tree.statements) {
|
|
114
|
-
const exported = c.canHaveModifiers(statement) && c.getModifiers(statement)?.some((m) => m.kind === c.SyntaxKind.ExportKeyword);
|
|
115
|
-
for (const item of declaredFunctions(statement)) {
|
|
116
|
-
locals.set(item.name, item.node);
|
|
117
|
-
if (exported)
|
|
118
|
-
found.push(item);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
for (const statement of tree.statements)
|
|
122
|
-
found.push(...exportedAliases(statement, locals));
|
|
123
|
-
return found;
|
|
124
|
-
}
|
|
125
|
-
function exportedAliases(statement, locals) {
|
|
126
|
-
if (!c.isExportDeclaration(statement) || statement.moduleSpecifier || statement.isTypeOnly)
|
|
72
|
+
const load = node.expression.kind === c.SyntaxKind.ImportKeyword || (c.isIdentifier(node.expression) && node.expression.text === 'require');
|
|
73
|
+
return load ? node.arguments[0] : undefined;
|
|
74
|
+
}
|
|
75
|
+
function importLiteral({ c, node, includeTypeOnly }) {
|
|
76
|
+
return loadCallLiteral(c, node) ?? declarationLiteral({ c, node, includeTypeOnly });
|
|
77
|
+
}
|
|
78
|
+
function imports({ c, tree }, { includeTypeOnly = false } = {}) {
|
|
79
|
+
const found = [];
|
|
80
|
+
function visit(node) {
|
|
81
|
+
const literal = importLiteral({ c, node, includeTypeOnly });
|
|
82
|
+
if (literal && c.isStringLiteralLike(literal))
|
|
83
|
+
found.push({ specifier: literal.text, node });
|
|
84
|
+
c.forEachChild(node, visit);
|
|
85
|
+
}
|
|
86
|
+
visit(tree);
|
|
87
|
+
return found;
|
|
88
|
+
}
|
|
89
|
+
function declaredFunctions(c, statement) {
|
|
90
|
+
if (c.isFunctionDeclaration(statement) && statement.name)
|
|
91
|
+
return [{ name: statement.name.text, node: statement }];
|
|
92
|
+
if (!c.isVariableStatement(statement))
|
|
93
|
+
return [];
|
|
94
|
+
return statement.declarationList.declarations.flatMap((decl) => {
|
|
95
|
+
if (!c.isIdentifier(decl.name))
|
|
127
96
|
return [];
|
|
128
|
-
|
|
97
|
+
const implemented = decl.initializer && (c.isArrowFunction(decl.initializer) || c.isFunctionExpression(decl.initializer));
|
|
98
|
+
// Published .d.ts files retain arrow exports as function-type declarations, without bodies.
|
|
99
|
+
const declared = decl.type && c.isFunctionTypeNode(decl.type);
|
|
100
|
+
if (!implemented && !declared)
|
|
129
101
|
return [];
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
function urlOwner(file) {
|
|
144
|
-
return adapter(file) || /(?:^|\/)catalogs?[/.]/.test(file);
|
|
145
|
-
}
|
|
146
|
-
function vendor(specifier) {
|
|
147
|
-
// A vendor scope matches any of its packages; the named packages match themselves and their subpaths.
|
|
148
|
-
return VENDOR_PACKAGES.has(packageName(specifier)) || VENDOR_SCOPES.test(specifier) ||
|
|
149
|
-
/^(?:@[^/]+\/(?:sdk|[^/]+-sdk)|[^@/]+-sdk)(?:$|\/)/.test(specifier);
|
|
150
|
-
}
|
|
151
|
-
function moduleScope(node) {
|
|
152
|
-
for (let parent = node.parent; parent; parent = parent.parent) {
|
|
153
|
-
if (c.isFunctionLike(parent) || c.isClassLike(parent) || c.isModuleDeclaration(parent))
|
|
154
|
-
return false;
|
|
102
|
+
return [{ name: decl.name.text, node: decl }];
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function exportedFunctions({ c, tree }) {
|
|
106
|
+
const locals = new Map();
|
|
107
|
+
const found = [];
|
|
108
|
+
for (const statement of tree.statements) {
|
|
109
|
+
const exported = c.canHaveModifiers(statement) && c.getModifiers(statement)?.some((m) => m.kind === c.SyntaxKind.ExportKeyword);
|
|
110
|
+
for (const item of declaredFunctions(c, statement)) {
|
|
111
|
+
locals.set(item.name, item.node);
|
|
112
|
+
if (exported)
|
|
113
|
+
found.push(item);
|
|
155
114
|
}
|
|
156
|
-
return true;
|
|
157
115
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
116
|
+
for (const statement of tree.statements)
|
|
117
|
+
found.push(...exportedAliases({ c, statement, locals }));
|
|
118
|
+
return found;
|
|
119
|
+
}
|
|
120
|
+
function exportedAliases({ c, statement, locals }) {
|
|
121
|
+
if (!c.isExportDeclaration(statement) || statement.moduleSpecifier || statement.isTypeOnly)
|
|
122
|
+
return [];
|
|
123
|
+
if (!statement.exportClause || !c.isNamedExports(statement.exportClause))
|
|
124
|
+
return [];
|
|
125
|
+
return statement.exportClause.elements.flatMap((item) => {
|
|
126
|
+
const node = locals.get((item.propertyName ?? item.name).text);
|
|
127
|
+
return node && !item.isTypeOnly ? [{ name: item.name.text, node }] : [];
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function violation({ tree, node, rule, reason, identity }) {
|
|
131
|
+
const fingerprint = createHash('sha256').update(identity).digest('hex');
|
|
132
|
+
return { rule, file: tree.fileName, line: tree.getLineAndCharacterOfPosition(node.getStart(tree)).line + 1, reason, fingerprint };
|
|
133
|
+
}
|
|
134
|
+
// `provider-plugins/` holds provider plugin sources: each is a vendor adapter by definition.
|
|
135
|
+
function adapter(file) {
|
|
136
|
+
return /(?:^|\/)(?:adapters?|kernel|providers?|provider-plugins)[/.]/.test(file) || /\.adapter\.[^.]+$/.test(file);
|
|
137
|
+
}
|
|
138
|
+
function urlOwner(file) {
|
|
139
|
+
return adapter(file) || /(?:^|\/)catalogs?[/.]/.test(file);
|
|
140
|
+
}
|
|
141
|
+
function vendor(specifier) {
|
|
142
|
+
// A vendor scope matches any of its packages; the named packages match themselves and their subpaths.
|
|
143
|
+
return VENDOR_PACKAGES.has(packageName(specifier)) || VENDOR_SCOPES.test(specifier) ||
|
|
144
|
+
/^(?:@[^/]+\/(?:sdk|[^/]+-sdk)|[^@/]+-sdk)(?:$|\/)/.test(specifier);
|
|
145
|
+
}
|
|
146
|
+
function moduleScope(c, node) {
|
|
147
|
+
for (let parent = node.parent; parent; parent = parent.parent) {
|
|
148
|
+
if (c.isFunctionLike(parent) || c.isClassLike(parent) || c.isModuleDeclaration(parent))
|
|
149
|
+
return false;
|
|
163
150
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
/** BindingName is Identifier | ObjectBindingPattern | ArrayBindingPattern; array holes are OmittedExpressions. */
|
|
154
|
+
function binds({ c, name, id }) {
|
|
155
|
+
if (c.isIdentifier(name))
|
|
156
|
+
return name.text === id;
|
|
157
|
+
return name.elements.some((e) => c.isBindingElement(e) && binds({ c, name: e.name, id }));
|
|
158
|
+
}
|
|
159
|
+
function scopeBinds({ c, scope, id }) {
|
|
160
|
+
if (c.isFunctionLike(scope))
|
|
161
|
+
return scope.parameters.some((p) => binds({ c, name: p.name, id }));
|
|
162
|
+
if (c.isCatchClause(scope))
|
|
163
|
+
return Boolean(scope.variableDeclaration && binds({ c, name: scope.variableDeclaration.name, id }));
|
|
164
|
+
if (c.isBlock(scope) || c.isSourceFile(scope))
|
|
165
|
+
return scope.statements.some((statement) => statementBinds({ c, statement, id }));
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
/** A lexical binding of `id` (parameter, destructured name, local, import) shadows the global of that name. */
|
|
169
|
+
function hasLocalBinding({ c, node, id }) {
|
|
170
|
+
for (let scope = node.parent; scope; scope = scope.parent)
|
|
171
|
+
if (scopeBinds({ c, scope, id }))
|
|
172
|
+
return true;
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
function isGlobalThisMember({ c, value, id }) {
|
|
176
|
+
if (!value || !member({ c, node: value, name: id }) || !('expression' in value))
|
|
171
177
|
return false;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
const target = value.expression;
|
|
179
|
+
return c.isIdentifier(target) && target.text === 'globalThis';
|
|
180
|
+
}
|
|
181
|
+
function statementBinds({ c, statement, id }) {
|
|
182
|
+
// Renaming the global to a local of the same name is still a global call, not an injected port.
|
|
183
|
+
if (c.isVariableStatement(statement))
|
|
184
|
+
return statement.declarationList.declarations.some((d) => binds({ c, name: d.name, id }) && !isGlobalThisMember({ c, value: d.initializer, id }));
|
|
185
|
+
if (c.isFunctionDeclaration(statement))
|
|
186
|
+
return statement.name?.text === id;
|
|
187
|
+
if (!c.isImportDeclaration(statement) || !statement.importClause)
|
|
177
188
|
return false;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
const clause = statement.importClause;
|
|
190
|
+
if (clause.name?.text === id)
|
|
191
|
+
return true;
|
|
192
|
+
return Boolean(clause.namedBindings && c.isNamedImports(clause.namedBindings) && clause.namedBindings.elements.some((e) => e.name.text === id));
|
|
193
|
+
}
|
|
194
|
+
function isEnvDefault(c, node) {
|
|
195
|
+
let expression = node;
|
|
196
|
+
while (c.isParenthesizedExpression(expression.parent))
|
|
197
|
+
expression = expression.parent;
|
|
198
|
+
const parent = expression.parent;
|
|
199
|
+
if (c.isBinaryExpression(parent))
|
|
200
|
+
return parent.operatorToken.kind === c.SyntaxKind.QuestionQuestionToken && parent.right === expression;
|
|
201
|
+
return (c.isParameter(parent) || c.isBindingElement(parent)) && parent.initializer === expression;
|
|
202
|
+
}
|
|
203
|
+
/** Binding defaults and initializers are implementation; debt identity is only the declared names.
|
|
204
|
+
* Array holes retain their slots so moving a name changes its positional identity. */
|
|
205
|
+
function declarationIdentity(c, name) {
|
|
206
|
+
if (c.isIdentifier(name))
|
|
207
|
+
return name.text;
|
|
208
|
+
return name.elements.map(element => c.isBindingElement(element) ? declarationIdentity(c, element.name) : '').join(',');
|
|
209
|
+
}
|
|
210
|
+
function mutableModuleState({ c, node, tree }) {
|
|
211
|
+
if (!c.isVariableDeclaration(node) || !moduleScope(c, node) || !c.isVariableDeclarationList(node.parent))
|
|
212
|
+
return false;
|
|
213
|
+
// A flag test, not a boolean `&&`: the Const bit marks `const` (and `await using`) lists.
|
|
214
|
+
const constBinding = (node.parent.flags & c.NodeFlags.Const) !== 0;
|
|
215
|
+
if (!constBinding)
|
|
216
|
+
return true;
|
|
217
|
+
if (!node.initializer || !c.isNewExpression(node.initializer) || !c.isIdentifier(node.initializer.expression))
|
|
218
|
+
return false;
|
|
219
|
+
if (!['Map', 'Set'].includes(node.initializer.expression.text))
|
|
220
|
+
return false;
|
|
221
|
+
// Readonly<Map> only freezes properties; it still exposes .set/.delete.
|
|
222
|
+
return !node.type || !/^Readonly(?:Map|Set)\s*</.test(node.type.getText(tree));
|
|
223
|
+
}
|
|
224
|
+
function globalFetchCall(c, node) {
|
|
225
|
+
if (!c.isCallExpression(node))
|
|
226
|
+
return false;
|
|
227
|
+
if (c.isIdentifier(node.expression))
|
|
228
|
+
return node.expression.text === 'fetch' && !hasLocalBinding({ c, node, id: 'fetch' });
|
|
229
|
+
if (!member({ c, node: node.expression, name: 'fetch' }) || !('expression' in node.expression))
|
|
230
|
+
return false;
|
|
231
|
+
const object = node.expression.expression;
|
|
232
|
+
return c.isIdentifier(object) && object.text === 'globalThis';
|
|
233
|
+
}
|
|
234
|
+
function uncoveredDefault({ c, node, covered }) {
|
|
235
|
+
if (!c.isBinaryExpression(node) || node.operatorToken.kind !== c.SyntaxKind.QuestionQuestionToken)
|
|
236
|
+
return false;
|
|
237
|
+
const fallback = node.right;
|
|
238
|
+
const insecure = (c.isStringLiteralLike(fallback) && fallback.text.startsWith('dev-only-insecure-')) ||
|
|
239
|
+
(c.isIdentifier(fallback) && /^DEFAULT_.*PASSWORD$/.test(fallback.text));
|
|
240
|
+
if (!insecure)
|
|
241
|
+
return false;
|
|
242
|
+
const key = envKey(c, node.left);
|
|
243
|
+
return !key || !covered?.has(key);
|
|
244
|
+
}
|
|
245
|
+
function apiUrl(c, node) {
|
|
246
|
+
if (!c.isStringLiteralLike(node) && !c.isTemplateHead(node) && !c.isTemplateMiddle(node) && !c.isTemplateTail(node))
|
|
247
|
+
return false;
|
|
248
|
+
return /https:\/\/api\./i.test(node.text);
|
|
249
|
+
}
|
|
250
|
+
/** Resolution runs for every edge, even without a plugin identity: a host resolver may fail closed on unresolved code. */
|
|
251
|
+
function targetPlugin({ input, specifier }) {
|
|
252
|
+
const target = input.resolveImport?.(specifier, input.file);
|
|
253
|
+
return target ? input.pluginIdentity?.(target) : undefined;
|
|
254
|
+
}
|
|
255
|
+
function inspectImports({ input, tree, refs }) {
|
|
256
|
+
const found = [];
|
|
257
|
+
const plugin = input.pluginIdentity?.(input.file);
|
|
258
|
+
const vendorOwner = adapter(input.file);
|
|
259
|
+
for (const ref of refs) {
|
|
260
|
+
if (!vendorOwner && vendor(ref.specifier))
|
|
261
|
+
found.push(violation({
|
|
262
|
+
tree,
|
|
263
|
+
node: ref.node,
|
|
264
|
+
rule: 'HW2-vendor-adapter',
|
|
265
|
+
reason: 'Driver/vendor dependency belongs in an adapter, kernel or provider.',
|
|
266
|
+
identity: ref.specifier,
|
|
267
|
+
}));
|
|
268
|
+
const other = targetPlugin({ input, specifier: ref.specifier });
|
|
269
|
+
if (plugin && other && other !== plugin)
|
|
270
|
+
found.push(violation({
|
|
271
|
+
tree,
|
|
272
|
+
node: ref.node,
|
|
273
|
+
rule: 'HW9-plugin-import',
|
|
274
|
+
reason: `Import crosses ${plugin} → ${other}; plugins must communicate through host ports.`,
|
|
275
|
+
identity: ref.specifier,
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
278
|
+
return found;
|
|
279
|
+
}
|
|
280
|
+
/** Analyze authored source; host policies supply export ownership, refusal coverage and import resolution. */
|
|
281
|
+
function inspect({ c, input }) {
|
|
282
|
+
const tree = parse({ c, ...input });
|
|
283
|
+
const refs = imports({ c, tree }, { includeTypeOnly: true });
|
|
284
|
+
const found = inspectImports({ input, tree, refs });
|
|
285
|
+
const report = ({ node, rule, reason, identity }) => found.push(violation({ tree, node, rule, reason, identity }));
|
|
286
|
+
const jini = input.mode === 'jini';
|
|
287
|
+
const envExempt = /(?:^|\/)(?:bin|cli|testing)[/.]/.test(input.file);
|
|
288
|
+
const ownsUrls = urlOwner(input.file);
|
|
289
|
+
if (!jini && !refs.some((ref) => ref.specifier.startsWith('@jini-ai/'))) {
|
|
290
|
+
for (const item of exportedFunctions({ c, tree }))
|
|
291
|
+
if (input.jiniExports?.has(item.name))
|
|
292
|
+
report({
|
|
293
|
+
node: item.node,
|
|
294
|
+
rule: 'HW5-jini-export',
|
|
295
|
+
reason: `Export ${item.name} duplicates a Jini function without using its owner.`,
|
|
296
|
+
identity: item.name,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function visit(node) {
|
|
300
|
+
if (jini)
|
|
301
|
+
visitJini(node, { c, input, tree }, { envExempt, report });
|
|
302
|
+
if (uncoveredDefault({ c, node, covered: input.bootCoveredEnv }))
|
|
303
|
+
report({
|
|
304
|
+
node,
|
|
305
|
+
rule: 'HW6-boot-default',
|
|
306
|
+
reason: 'Unsafe development default has no matching environment check in the production refusal gate.',
|
|
307
|
+
identity: envKey(c, node.left) ?? node.left.getText(tree),
|
|
190
308
|
});
|
|
191
|
-
if (c
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
function isEnvDefault(node) {
|
|
201
|
-
let expression = node;
|
|
202
|
-
while (c.isParenthesizedExpression(expression.parent))
|
|
203
|
-
expression = expression.parent;
|
|
204
|
-
const parent = expression.parent;
|
|
205
|
-
if (c.isBinaryExpression(parent))
|
|
206
|
-
return parent.operatorToken.kind === c.SyntaxKind.QuestionQuestionToken && parent.right === expression;
|
|
207
|
-
return (c.isParameter(parent) || c.isBindingElement(parent)) && parent.initializer === expression;
|
|
208
|
-
}
|
|
209
|
-
/** Binding defaults and initializers are implementation; debt identity is only the declared names.
|
|
210
|
-
* Array holes retain their slots so moving a name changes its positional identity. */
|
|
211
|
-
function declarationIdentity(name) {
|
|
212
|
-
if (c.isIdentifier(name))
|
|
213
|
-
return name.text;
|
|
214
|
-
return name.elements.map(element => c.isBindingElement(element) ? declarationIdentity(element.name) : '').join(',');
|
|
215
|
-
}
|
|
216
|
-
function mutableModuleState(node, tree) {
|
|
217
|
-
if (!c.isVariableDeclaration(node) || !moduleScope(node) || !c.isVariableDeclarationList(node.parent))
|
|
218
|
-
return false;
|
|
219
|
-
// A flag test, not a boolean `&&`: the Const bit marks `const` (and `await using`) lists.
|
|
220
|
-
const constBinding = (node.parent.flags & c.NodeFlags.Const) !== 0;
|
|
221
|
-
if (!constBinding)
|
|
222
|
-
return true;
|
|
223
|
-
if (!node.initializer || !c.isNewExpression(node.initializer) || !c.isIdentifier(node.initializer.expression))
|
|
224
|
-
return false;
|
|
225
|
-
if (!['Map', 'Set'].includes(node.initializer.expression.text))
|
|
226
|
-
return false;
|
|
227
|
-
// Readonly<Map> only freezes properties; it still exposes .set/.delete.
|
|
228
|
-
return !node.type || !/^Readonly(?:Map|Set)\s*</.test(node.type.getText(tree));
|
|
229
|
-
}
|
|
230
|
-
function globalFetchCall(node) {
|
|
231
|
-
if (!c.isCallExpression(node))
|
|
232
|
-
return false;
|
|
233
|
-
if (c.isIdentifier(node.expression))
|
|
234
|
-
return node.expression.text === 'fetch' && !hasLocalFetch(node);
|
|
235
|
-
if (!member(node.expression, 'fetch') || !('expression' in node.expression))
|
|
236
|
-
return false;
|
|
237
|
-
const object = node.expression.expression;
|
|
238
|
-
return c.isIdentifier(object) && object.text === 'globalThis';
|
|
239
|
-
}
|
|
240
|
-
function uncoveredDefault(node, covered) {
|
|
241
|
-
if (!c.isBinaryExpression(node) || node.operatorToken.kind !== c.SyntaxKind.QuestionQuestionToken)
|
|
242
|
-
return false;
|
|
243
|
-
const fallback = node.right;
|
|
244
|
-
const insecure = (c.isStringLiteralLike(fallback) && fallback.text.startsWith('dev-only-insecure-')) ||
|
|
245
|
-
(c.isIdentifier(fallback) && /^DEFAULT_.*PASSWORD$/.test(fallback.text));
|
|
246
|
-
if (!insecure)
|
|
247
|
-
return false;
|
|
248
|
-
const key = envKey(node.left);
|
|
249
|
-
return !key || !covered?.has(key);
|
|
250
|
-
}
|
|
251
|
-
function apiUrl(node) {
|
|
252
|
-
if (!c.isStringLiteralLike(node) && !c.isTemplateHead(node) && !c.isTemplateMiddle(node) && !c.isTemplateTail(node))
|
|
253
|
-
return false;
|
|
254
|
-
return /https:\/\/api\./i.test(node.text);
|
|
255
|
-
}
|
|
256
|
-
/** Resolution runs for every edge, even without a plugin identity: a host resolver may fail closed on unresolved code. */
|
|
257
|
-
function targetPlugin(input, specifier) {
|
|
258
|
-
const target = input.resolveImport?.(specifier, input.file);
|
|
259
|
-
return target ? input.pluginIdentity?.(target) : undefined;
|
|
260
|
-
}
|
|
261
|
-
function inspectImports(input, tree, refs) {
|
|
262
|
-
const found = [];
|
|
263
|
-
const plugin = input.pluginIdentity?.(input.file);
|
|
264
|
-
const vendorOwner = adapter(input.file);
|
|
265
|
-
for (const ref of refs) {
|
|
266
|
-
if (!vendorOwner && vendor(ref.specifier))
|
|
267
|
-
found.push(violation(tree, ref.node, 'HW2-vendor-adapter', 'Driver/vendor dependency belongs in an adapter, kernel or provider.', ref.specifier));
|
|
268
|
-
const other = targetPlugin(input, ref.specifier);
|
|
269
|
-
if (plugin && other && other !== plugin)
|
|
270
|
-
found.push(violation(tree, ref.node, 'HW9-plugin-import', `Import crosses ${plugin} → ${other}; plugins must communicate through host ports.`, ref.specifier));
|
|
271
|
-
}
|
|
272
|
-
return found;
|
|
309
|
+
if (!ownsUrls && apiUrl(c, node))
|
|
310
|
+
report({
|
|
311
|
+
node,
|
|
312
|
+
rule: 'HW8-provider-url',
|
|
313
|
+
reason: 'Vendor API URL belongs in a provider, adapter or catalog.',
|
|
314
|
+
identity: node.text,
|
|
315
|
+
});
|
|
316
|
+
c.forEachChild(node, visit);
|
|
273
317
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
318
|
+
visit(tree);
|
|
319
|
+
return found;
|
|
320
|
+
}
|
|
321
|
+
function visitJini(node, { c, input, tree }, { envExempt, report }) {
|
|
322
|
+
if (!envExempt && env(c, node) && !isEnvDefault(c, node))
|
|
323
|
+
report({
|
|
324
|
+
node,
|
|
325
|
+
rule: 'HW1-env-default',
|
|
326
|
+
reason: 'process.env is allowed only as an injected environment default (?? process.env or env = process.env).',
|
|
327
|
+
identity: envKey(c, node.parent) ?? 'process.env',
|
|
328
|
+
});
|
|
329
|
+
if (mutableModuleState({ c, node, tree }))
|
|
330
|
+
report({
|
|
331
|
+
node,
|
|
332
|
+
rule: 'HW3-module-state',
|
|
333
|
+
reason: 'Module state must be instance-owned; readonly collections or explicitly reviewed path-keyed locks may be retained.',
|
|
334
|
+
identity: declarationIdentity(c, node.name),
|
|
335
|
+
});
|
|
336
|
+
if (input.server && globalFetchCall(c, node))
|
|
337
|
+
report({
|
|
338
|
+
node,
|
|
339
|
+
rule: 'HW4-injected-fetch',
|
|
340
|
+
reason: 'Call an injected fetch port; the global fetch may only supply its default.',
|
|
341
|
+
identity: node.expression.getText(tree),
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function firstJsx(c, tree) {
|
|
345
|
+
let jsx;
|
|
346
|
+
function visit(node) {
|
|
347
|
+
if (jsx)
|
|
348
|
+
return;
|
|
349
|
+
if (c.isJsxElement(node) || c.isJsxSelfClosingElement(node) || c.isJsxFragment(node))
|
|
350
|
+
jsx = node;
|
|
351
|
+
if (!jsx)
|
|
303
352
|
c.forEachChild(node, visit);
|
|
304
|
-
}
|
|
305
|
-
visit(tree);
|
|
306
|
-
return found;
|
|
307
353
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
354
|
+
visit(tree);
|
|
355
|
+
return jsx;
|
|
356
|
+
}
|
|
357
|
+
function reactSpecifier(specifier) {
|
|
358
|
+
return /^react(?:-dom)?(?:\/|$)/.test(specifier) || /(?:^|\/)node_modules\/react(?:-dom)?(?:\/|$)/.test(specifier);
|
|
359
|
+
}
|
|
360
|
+
function implicitReact({ c, tree, file, displayFile }) {
|
|
361
|
+
// Vite's automatic JSX runtime adds an import even when source imports only erased types.
|
|
362
|
+
if (file.includes('/node_modules/'))
|
|
363
|
+
return undefined;
|
|
364
|
+
const jsx = firstJsx(c, tree);
|
|
365
|
+
if (!jsx)
|
|
366
|
+
return undefined;
|
|
367
|
+
return { ...violation({ tree, node: jsx, rule: 'HW7-public-react', reason: 'Automatic JSX runtime imports React into the public-site bundle.', identity: 'jsx' }), file: displayFile(file) };
|
|
368
|
+
}
|
|
369
|
+
/** Traverse every runtime edge, including dynamic imports, barrels and CommonJS requires.
|
|
370
|
+
* O(V + E) visits with a set: cycles and diamond imports never rescan a module.
|
|
371
|
+
* Host resolver supplies browser/package-export conditions and fails on unresolved code edges.
|
|
372
|
+
*/
|
|
373
|
+
function inspectPublicGraph({ c, entries, readSource, resolveImport, displayFile }) {
|
|
374
|
+
const seen = new Set();
|
|
375
|
+
const pending = [...entries];
|
|
376
|
+
const found = [];
|
|
377
|
+
const reportedPackages = new Set();
|
|
378
|
+
function reportGraph(item) {
|
|
379
|
+
if (item.file.startsWith('node_modules/')) {
|
|
380
|
+
if (reportedPackages.has(item.file))
|
|
312
381
|
return;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
c.forEachChild(node, visit);
|
|
382
|
+
reportedPackages.add(item.file);
|
|
383
|
+
found.push({ ...item, line: 1, reason: 'Public-site dependency package loads React or React DOM.',
|
|
384
|
+
fingerprint: createHash('sha256').update(item.file).digest('hex') });
|
|
317
385
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
if (file.includes('/node_modules/'))
|
|
327
|
-
return undefined;
|
|
328
|
-
const jsx = firstJsx(tree);
|
|
329
|
-
if (!jsx)
|
|
330
|
-
return undefined;
|
|
331
|
-
return { ...violation(tree, jsx, 'HW7-public-react', 'Automatic JSX runtime imports React into the public-site bundle.', 'jsx'), file: displayFile(file) };
|
|
332
|
-
}
|
|
333
|
-
/** Traverse every runtime edge, including dynamic imports, barrels and CommonJS requires.
|
|
334
|
-
* O(V + E) visits with a set: cycles and diamond imports never rescan a module.
|
|
335
|
-
* Host resolver supplies browser/package-export conditions and fails on unresolved code edges.
|
|
336
|
-
*/
|
|
337
|
-
function inspectPublicGraph({ entries, readSource, resolveImport, displayFile }, _options = {}) {
|
|
338
|
-
const seen = new Set();
|
|
339
|
-
const pending = [...entries];
|
|
340
|
-
const found = [];
|
|
341
|
-
const reportedPackages = new Set();
|
|
342
|
-
function reportGraph(item) {
|
|
343
|
-
if (item.file.startsWith('node_modules/')) {
|
|
344
|
-
if (reportedPackages.has(item.file))
|
|
345
|
-
return;
|
|
346
|
-
reportedPackages.add(item.file);
|
|
347
|
-
found.push({ ...item, line: 1, reason: 'Public-site dependency package loads React or React DOM.',
|
|
348
|
-
fingerprint: createHash('sha256').update(item.file).digest('hex') });
|
|
349
|
-
}
|
|
350
|
-
else
|
|
351
|
-
found.push(item);
|
|
352
|
-
}
|
|
353
|
-
function scanModule(file) {
|
|
354
|
-
const tree = parse({ file, source: readSource(file) });
|
|
355
|
-
for (const ref of imports({ tree })) {
|
|
356
|
-
if (reactSpecifier(ref.specifier)) {
|
|
357
|
-
reportGraph({ ...violation(tree, ref.node, 'HW7-public-react', 'Public-site runtime graph must not load React or React DOM.', ref.specifier), file: displayFile(file) });
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
const resolved = resolveImport(ref.specifier, file);
|
|
361
|
-
if (resolved)
|
|
362
|
-
pending.push(resolved);
|
|
363
|
-
}
|
|
364
|
-
const implicit = implicitReact(tree, file, displayFile);
|
|
365
|
-
if (implicit)
|
|
366
|
-
reportGraph(implicit);
|
|
367
|
-
}
|
|
368
|
-
for (let cursor = 0; cursor < pending.length; cursor++) {
|
|
369
|
-
const file = pending[cursor];
|
|
370
|
-
if (seen.has(file))
|
|
386
|
+
else
|
|
387
|
+
found.push(item);
|
|
388
|
+
}
|
|
389
|
+
function scanModule(file) {
|
|
390
|
+
const tree = parse({ c, file, source: readSource(file) });
|
|
391
|
+
for (const ref of imports({ c, tree })) {
|
|
392
|
+
if (reactSpecifier(ref.specifier)) {
|
|
393
|
+
reportGraph({ ...violation({ tree, node: ref.node, rule: 'HW7-public-react', reason: 'Public-site runtime graph must not load React or React DOM.', identity: ref.specifier }), file: displayFile(file) });
|
|
371
394
|
continue;
|
|
372
|
-
|
|
373
|
-
|
|
395
|
+
}
|
|
396
|
+
const resolved = resolveImport(ref.specifier, file);
|
|
397
|
+
if (resolved)
|
|
398
|
+
pending.push(resolved);
|
|
374
399
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
400
|
+
const implicit = implicitReact({ c, tree, file, displayFile });
|
|
401
|
+
if (implicit)
|
|
402
|
+
reportGraph(implicit);
|
|
403
|
+
}
|
|
404
|
+
for (let cursor = 0; cursor < pending.length; cursor++) {
|
|
405
|
+
const file = pending[cursor];
|
|
406
|
+
if (seen.has(file))
|
|
407
|
+
continue;
|
|
408
|
+
seen.add(file);
|
|
409
|
+
scanModule(file);
|
|
410
|
+
}
|
|
411
|
+
return found;
|
|
412
|
+
}
|
|
413
|
+
/** Bind the installed compiler, keeping this optional parser out of the runtime dependency graph.
|
|
414
|
+
* Inspection is O(n) AST nodes, plus lexical-scope scans for bare fetch calls; no external I/O.
|
|
415
|
+
* Only the rule-identifying value is hashed for debt identity and never included in diagnostics (it may contain secrets).
|
|
416
|
+
*/
|
|
417
|
+
export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
418
|
+
return {
|
|
419
|
+
inspect: (input, _options = {}) => inspect({ c, input }),
|
|
420
|
+
inspectPublicGraph: (required, _options = {}) => inspectPublicGraph({ c, ...required }),
|
|
421
|
+
parse: (required, _options = {}) => parse({ c, ...required }),
|
|
422
|
+
imports: ({ tree, includeTypeOnly }, _options = {}) => imports({ c, tree }, includeTypeOnly === undefined ? {} : { includeTypeOnly }),
|
|
423
|
+
exportedFunctions: (required, _options = {}) => exportedFunctions({ c, ...required }),
|
|
424
|
+
envKey: ({ node }, _options = {}) => envKey(c, node),
|
|
425
|
+
hasLocalBinding: ({ node, name }, _options = {}) => hasLocalBinding({ c, node, id: name }),
|
|
426
|
+
// Shared with the env-access rules (env-access.ts), so both audits agree on what `process.env` and module scope mean.
|
|
427
|
+
isProcessEnv: ({ node }, _options = {}) => env(c, node),
|
|
428
|
+
isModuleScope: ({ node }, _options = {}) => moduleScope(c, node),
|
|
429
|
+
violation: (required, _options = {}) => violation({
|
|
430
|
+
tree: required.tree,
|
|
431
|
+
node: required.node,
|
|
432
|
+
rule: required.rule,
|
|
433
|
+
reason: required.reason,
|
|
434
|
+
identity: required.identity,
|
|
435
|
+
}),
|
|
379
436
|
};
|
|
380
437
|
}
|
|
381
438
|
/** Occurrence-based debt ratchet: adding a duplicate in an already listed file still fails.
|