@starci/eslint-canon-be 3.8.20 → 3.9.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 +16 -0
- package/package.json +1 -1
- package/runtime/bundle.json +192 -0
- package/runtime/engine/by-code-unit.mjs +6 -6
- package/runtime/engine/model-config.mjs +98 -76
- package/runtime/engine/orca-config.mjs +22 -17
- package/runtime/engine/release-config.mjs +22 -18
- package/runtime/engine/removed-vocabulary.mjs +21 -20
- package/runtime/engine/resources-config.mjs +42 -35
- package/runtime/engine/runtime-root.mjs +11 -13
- package/runtime/engine/secrets.mjs +170 -102
- package/runtime/engine/sonar-config.mjs +16 -13
- package/runtime/engine/temp-root.mjs +3 -9
- package/runtime/knowledge/hfs/canon-pins.yaml +10 -10
- package/runtime/knowledge/hfs/rules.yaml +6 -6
- package/runtime/knowledge/hfs/slots.yaml +2 -2
- package/runtime/knowledge/sonar-gate.yaml +1 -1
- package/runtime/packages/hfs/templates/app/package-scripts/package.json +1 -1
- package/runtime/scripts/api/git/cat-file.mjs +0 -1
- package/runtime/scripts/api/git/config-get.mjs +1 -2
- package/runtime/scripts/api/git/diff.mjs +0 -1
- package/runtime/scripts/api/git/lib.mjs +32 -32
- package/runtime/scripts/api/git/ls-files.mjs +0 -1
- package/runtime/scripts/api/git/ls-tree.mjs +0 -1
- package/runtime/scripts/api/git/merge-base.mjs +2 -3
- package/runtime/scripts/api/git/remote.mjs +0 -1
- package/runtime/scripts/api/git/rev-parse-query.mjs +0 -1
- package/runtime/scripts/api/git/show.mjs +0 -1
- package/runtime/scripts/hfs/allows.mjs +37 -38
- package/runtime/scripts/hfs/architecture/ast-walks.mjs +180 -163
- package/runtime/scripts/hfs/architecture/automatic-gates.mjs +80 -73
- package/runtime/scripts/hfs/architecture/backend-app-files.mjs +88 -77
- package/runtime/scripts/hfs/architecture/backend.mjs +378 -357
- package/runtime/scripts/hfs/architecture/background-unowned.mjs +201 -187
- package/runtime/scripts/hfs/architecture/canon-clones.mjs +260 -209
- package/runtime/scripts/hfs/architecture/canon-jsx-clones.mjs +149 -116
- package/runtime/scripts/hfs/architecture/client-reaches-server.mjs +72 -68
- package/runtime/scripts/hfs/architecture/clones.mjs +212 -217
- package/runtime/scripts/hfs/architecture/config-unread.mjs +7 -9
- package/runtime/scripts/hfs/architecture/config.mjs +302 -268
- package/runtime/scripts/hfs/architecture/connection-map.mjs +258 -225
- package/runtime/scripts/hfs/architecture/constructor-deps.mjs +80 -71
- package/runtime/scripts/hfs/architecture/context-coupling.mjs +82 -77
- package/runtime/scripts/hfs/architecture/context-map.mjs +267 -234
- package/runtime/scripts/hfs/architecture/context-owner.mjs +73 -61
- package/runtime/scripts/hfs/architecture/context-platform-tables.mjs +47 -43
- package/runtime/scripts/hfs/architecture/context-transaction.mjs +54 -52
- package/runtime/scripts/hfs/architecture/contract-fixture-guard.mjs +113 -104
- package/runtime/scripts/hfs/architecture/contracts-readonly.mjs +288 -270
- package/runtime/scripts/hfs/architecture/contracts.mjs +408 -393
- package/runtime/scripts/hfs/architecture/cross-app-duplicate.mjs +50 -51
- package/runtime/scripts/hfs/architecture/dead-exports-bindings.mjs +143 -119
- package/runtime/scripts/hfs/architecture/dead-exports.mjs +286 -228
- package/runtime/scripts/hfs/architecture/default-deny.mjs +129 -110
- package/runtime/scripts/hfs/architecture/doc-language.mjs +24 -19
- package/runtime/scripts/hfs/architecture/entity-registry.mjs +20 -22
- package/runtime/scripts/hfs/architecture/entrypoint.mjs +47 -45
- package/runtime/scripts/hfs/architecture/error-codes.mjs +37 -35
- package/runtime/scripts/hfs/architecture/error-masked.mjs +55 -59
- package/runtime/scripts/hfs/architecture/fe-slot-allows.mjs +24 -23
- package/runtime/scripts/hfs/architecture/feature-shape.mjs +40 -38
- package/runtime/scripts/hfs/architecture/framework-pinned.mjs +21 -21
- package/runtime/scripts/hfs/architecture/frontend-block-render.mjs +106 -98
- package/runtime/scripts/hfs/architecture/frontend-grammar.mjs +153 -150
- package/runtime/scripts/hfs/architecture/frontend-routing.mjs +161 -149
- package/runtime/scripts/hfs/architecture/frontend-world-render.mjs +343 -305
- package/runtime/scripts/hfs/architecture/frontend-world.mjs +340 -294
- package/runtime/scripts/hfs/architecture/frontend.mjs +174 -184
- package/runtime/scripts/hfs/architecture/function-spec-providers.mjs +124 -106
- package/runtime/scripts/hfs/architecture/hfs-graph.mjs +52 -48
- package/runtime/scripts/hfs/architecture/hooks-are-hooks.mjs +81 -71
- package/runtime/scripts/hfs/architecture/i18n-keys.mjs +155 -141
- package/runtime/scripts/hfs/architecture/identity.mjs +141 -125
- package/runtime/scripts/hfs/architecture/index.mjs +272 -272
- package/runtime/scripts/hfs/architecture/injection-token-exported.mjs +45 -43
- package/runtime/scripts/hfs/architecture/jwt-ast.mjs +195 -176
- package/runtime/scripts/hfs/architecture/machine-ast.mjs +163 -155
- package/runtime/scripts/hfs/architecture/managed-scripts.mjs +19 -20
- package/runtime/scripts/hfs/architecture/module-per-transport.mjs +177 -172
- package/runtime/scripts/hfs/architecture/next-data-contract.mjs +100 -78
- package/runtime/scripts/hfs/architecture/next-data-inference.mjs +170 -154
- package/runtime/scripts/hfs/architecture/next-data-key.mjs +311 -275
- package/runtime/scripts/hfs/architecture/next-data-symbols.mjs +17 -17
- package/runtime/scripts/hfs/architecture/next-data.mjs +351 -334
- package/runtime/scripts/hfs/architecture/operation-contract-roots.mjs +39 -37
- package/runtime/scripts/hfs/architecture/owners.mjs +97 -98
- package/runtime/scripts/hfs/architecture/package-shape.mjs +56 -55
- package/runtime/scripts/hfs/architecture/presentation.mjs +138 -130
- package/runtime/scripts/hfs/architecture/reachability.mjs +258 -241
- package/runtime/scripts/hfs/architecture/register-once.mjs +152 -139
- package/runtime/scripts/hfs/architecture/registration.mjs +301 -267
- package/runtime/scripts/hfs/architecture/required-files.mjs +172 -167
- package/runtime/scripts/hfs/architecture/route-files-thin.mjs +85 -77
- package/runtime/scripts/hfs/architecture/schema-owner.mjs +206 -181
- package/runtime/scripts/hfs/architecture/server-action.mjs +48 -48
- package/runtime/scripts/hfs/architecture/side-boundary.mjs +2 -5
- package/runtime/scripts/hfs/architecture/source-names-shape.mjs +261 -259
- package/runtime/scripts/hfs/architecture/source-names.mjs +304 -278
- package/runtime/scripts/hfs/architecture/sql-keys.mjs +277 -194
- package/runtime/scripts/hfs/architecture/sql-owner.mjs +236 -194
- package/runtime/scripts/hfs/architecture/sql-returning.mjs +46 -45
- package/runtime/scripts/hfs/architecture/sql-token-forms.mjs +86 -74
- package/runtime/scripts/hfs/architecture/sql-tokens.mjs +456 -341
- package/runtime/scripts/hfs/architecture/staged-consumers.mjs +35 -30
- package/runtime/scripts/hfs/architecture/surface.mjs +64 -74
- package/runtime/scripts/hfs/architecture/symbols.mjs +209 -216
- package/runtime/scripts/hfs/architecture/test-world-files.mjs +165 -155
- package/runtime/scripts/hfs/architecture/tiers.mjs +161 -154
- package/runtime/scripts/hfs/architecture/transport-owner.mjs +155 -149
- package/runtime/scripts/hfs/architecture/type-context.mjs +255 -250
- package/runtime/scripts/hfs/architecture/typescript.mjs +358 -318
- package/runtime/scripts/hfs/architecture/unit-spec-providers.mjs +110 -92
- package/runtime/scripts/hfs/declaration-shape.mjs +140 -103
- package/runtime/scripts/hfs/declaration-slots.mjs +64 -61
- package/runtime/scripts/hfs/edition-slots.mjs +43 -40
- package/runtime/scripts/hfs/linear-text.mjs +20 -20
- package/runtime/scripts/hfs/param-names.mjs +6 -11
- package/runtime/scripts/hfs/path-findings.mjs +120 -100
- package/runtime/scripts/hfs/repo-identity.mjs +55 -42
- package/runtime/scripts/hfs/rule-catalog.mjs +353 -257
- package/runtime/scripts/hfs/rule-params-shape.mjs +60 -47
- package/runtime/scripts/hfs/rules/database-migrations.mjs +428 -388
- package/runtime/scripts/hfs/rules/fe-no-tests.mjs +37 -36
- package/runtime/scripts/hfs/rules/read.mjs +19 -15
- package/runtime/scripts/hfs/rules/secrets.mjs +1 -1
- package/runtime/scripts/hfs/rules/spec-placement.mjs +12 -13
- package/runtime/scripts/hfs/slot-app-view.mjs +69 -74
- package/runtime/scripts/hfs/slot-classify.mjs +42 -38
- package/runtime/scripts/hfs/slot-errors.mjs +8 -7
- package/runtime/scripts/hfs/slot-imports.mjs +70 -63
- package/runtime/scripts/hfs/slot-manifest-shape.mjs +74 -52
- package/runtime/scripts/hfs/slot-match.mjs +122 -111
- package/runtime/scripts/hfs/slot-path.mjs +0 -2
- package/runtime/scripts/hfs/slot-required.mjs +65 -59
- package/runtime/scripts/hfs/slot-semantic-problems.mjs +138 -112
- package/runtime/scripts/hfs/slot-side-problems.mjs +23 -19
- package/runtime/scripts/hfs/slots.mjs +175 -152
- package/runtime/scripts/hfs/test-world-slot.mjs +0 -1
- package/runtime/scripts/hfs/trailing-slashes.mjs +4 -4
- package/runtime/scripts/hfs/typescript-programs.mjs +66 -69
- package/runtime/scripts/hfs/view.mjs +38 -40
- package/runtime/scripts/lib/dockerfile.mjs +131 -114
- package/runtime/scripts/lib/env.mjs +3 -6
- package/runtime/scripts/lib/event-contract.mjs +73 -78
- package/runtime/scripts/lib/git.mjs +15 -16
- package/runtime/scripts/lib/glob.mjs +23 -14
- package/runtime/scripts/lib/grammar-lint.mjs +33 -37
- package/runtime/scripts/lib/i18n.mjs +32 -35
- package/runtime/scripts/lib/in-order.mjs +57 -38
- package/runtime/scripts/lib/json-clone.mjs +45 -36
- package/runtime/scripts/lib/json.mjs +26 -14
- package/runtime/scripts/lib/language.mjs +133 -129
- package/runtime/scripts/lib/list.mjs +9 -14
- package/runtime/scripts/lib/mutation-fence.mjs +10 -5
- package/runtime/scripts/lib/path-key.mjs +53 -38
- package/runtime/scripts/lib/read-text.mjs +30 -17
- package/runtime/scripts/lib/regex.mjs +1 -2
- package/runtime/scripts/lib/same-text.mjs +0 -1
- package/runtime/scripts/lib/sops-envelope.mjs +148 -120
- package/runtime/scripts/lib/stack-services.mjs +128 -129
- package/runtime/scripts/lib/ts-analysis.mjs +28 -26
- package/runtime/scripts/lib/ts-ast.mjs +36 -42
- package/runtime/scripts/lib/walk.mjs +33 -27
- package/runtime/scripts/lib/yaml-cached.mjs +4 -4
|
@@ -1,338 +1,374 @@
|
|
|
1
|
+
/** An element access whose argument is a string literal: `a['b']`. */
|
|
2
|
+
const isStringKeyedAccess = (ts, node) => ts.isElementAccessExpression(node) && ts.isStringLiteralLike(node.argumentExpression);
|
|
1
3
|
function accessPath(deps, ts, checker, node) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
node = deps.unwrapExpression(ts, node);
|
|
5
|
+
if (ts.isIdentifier(node))
|
|
6
|
+
return { symbol: deps.normalizedSymbol(ts, checker, node), parts: [node.text] };
|
|
7
|
+
if (ts.isPropertyAccessExpression(node)) {
|
|
8
|
+
const base = accessPath(deps, ts, checker, node.expression);
|
|
9
|
+
return base ? { symbol: base.symbol, parts: [...base.parts, node.name.text] } : null;
|
|
10
|
+
}
|
|
11
|
+
if (ts.isElementAccessExpression(node) && ts.isStringLiteralLike(node.argumentExpression)) {
|
|
12
|
+
const base = accessPath(deps, ts, checker, node.expression);
|
|
13
|
+
return base ? { symbol: base.symbol, parts: [...base.parts, node.argumentExpression.text] } : null;
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
13
16
|
}
|
|
14
|
-
|
|
15
17
|
function expandedIdentifierPath(deps, ts, checker, node, seen, depth) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const symbol = deps.normalizedSymbol(ts, checker, node);
|
|
19
|
+
if (!symbol || seen.has(symbol))
|
|
20
|
+
return symbol ? { symbol, parts: [node.text] } : null;
|
|
21
|
+
const initializer = deps.constInitializer(ts, symbol);
|
|
22
|
+
return initializer ? expandedAccessPath(deps, ts, checker, initializer, new Set(seen).add(symbol), depth + 1)
|
|
23
|
+
?? { symbol, parts: [node.text] } : { symbol, parts: [node.text] };
|
|
21
24
|
}
|
|
22
|
-
|
|
23
25
|
function expandedMemberPath(deps, ts, checker, node, seen, depth) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const base = expandedAccessPath(deps, ts, checker, node.expression, seen, depth + 1);
|
|
27
|
+
if (!base)
|
|
28
|
+
return null;
|
|
29
|
+
const part = ts.isPropertyAccessExpression(node) ? node.name.text : node.argumentExpression.text;
|
|
30
|
+
return { symbol: base.symbol, parts: [...base.parts, part] };
|
|
28
31
|
}
|
|
29
|
-
|
|
30
32
|
function expandedAccessPath(deps, ts, checker, node, seen = new Set(), depth = 0) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
if (!node || depth > 10)
|
|
34
|
+
return null;
|
|
35
|
+
node = deps.unwrapExpression(ts, node);
|
|
36
|
+
if (ts.isIdentifier(node))
|
|
37
|
+
return expandedIdentifierPath(deps, ts, checker, node, seen, depth);
|
|
38
|
+
if (ts.isPropertyAccessExpression(node))
|
|
39
|
+
return expandedMemberPath(deps, ts, checker, node, seen, depth);
|
|
40
|
+
if (isStringKeyedAccess(ts, node))
|
|
41
|
+
return expandedMemberPath(deps, ts, checker, node, seen, depth);
|
|
42
|
+
return null;
|
|
37
43
|
}
|
|
38
|
-
|
|
39
44
|
function matchesIdentityAccess(deps, ts, checker, node, identity) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
const matches = (access) => access !== null && access.symbol === identity.symbol && access.parts.length >= identity.parts.length
|
|
46
|
+
&& identity.parts.every((part, index) => access.parts[index] === part);
|
|
47
|
+
return matches(accessPath(deps, ts, checker, node)) || matches(expandedAccessPath(deps, ts, checker, node));
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
const expressionReferences = (deps, ts, checker, expression, identity) =>
|
|
46
|
-
deps.anyDescendant(ts, expression, node => matchesIdentityAccess(deps, ts, checker, node, identity));
|
|
47
|
-
|
|
49
|
+
const expressionReferences = (deps, ts, checker, expression, identity) => deps.anyDescendant(ts, expression, (node) => matchesIdentityAccess(deps, ts, checker, node, identity));
|
|
48
50
|
function propertyKey(ts, name) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
if (ts.isIdentifier(name) || ts.isStringLiteralLike(name) || ts.isNumericLiteral(name))
|
|
52
|
+
return name.text;
|
|
53
|
+
return null;
|
|
51
54
|
}
|
|
52
|
-
|
|
53
55
|
function effectiveObjectValues(ts, expression) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
const selected = new Map();
|
|
57
|
+
for (let index = expression.properties.length - 1; index >= 0; index -= 1) {
|
|
58
|
+
const property = expression.properties[index];
|
|
59
|
+
if (property === undefined)
|
|
60
|
+
continue;
|
|
61
|
+
if (ts.isSpreadAssignment(property) || ts.isMethodDeclaration(property) || ts.isGetAccessorDeclaration(property)
|
|
62
|
+
|| ts.isSetAccessorDeclaration(property))
|
|
63
|
+
return null;
|
|
64
|
+
const key = propertyKey(ts, property.name);
|
|
65
|
+
if (key === null)
|
|
66
|
+
return null;
|
|
67
|
+
if (!selected.has(key))
|
|
68
|
+
selected.set(key, ts.isShorthandPropertyAssignment(property) ? property.name : property.initializer);
|
|
69
|
+
}
|
|
70
|
+
return [...selected.entries()].sort(([left], [right]) => left.localeCompare(right));
|
|
64
71
|
}
|
|
65
|
-
|
|
66
72
|
function combineContributions(values) {
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
const states = new Set(values);
|
|
74
|
+
return states.has('yes') && 'yes' || states.has('unproven') && 'unproven' || 'no';
|
|
69
75
|
}
|
|
70
|
-
|
|
71
76
|
function identityArrayContribution(deps, ts, checker, expression, identity, seen, depth) {
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
if (expression.elements.some(element => ts.isSpreadElement(element)))
|
|
78
|
+
return 'unproven';
|
|
79
|
+
return combineContributions(expression.elements.map(element => identityContribution(deps, ts, checker, element, identity, seen, depth + 1)));
|
|
74
80
|
}
|
|
75
|
-
|
|
76
81
|
function identityObjectContribution(deps, ts, checker, expression, identity, seen, depth) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
const values = effectiveObjectValues(ts, expression);
|
|
83
|
+
if (!values || values.length !== expression.properties.length)
|
|
84
|
+
return 'unproven';
|
|
85
|
+
return combineContributions(values.map(([, value]) => identityContribution(deps, ts, checker, value, identity, seen, depth + 1)));
|
|
80
86
|
}
|
|
81
|
-
|
|
82
87
|
function identityBinaryContribution(deps, ts, checker, expression, identity, seen, depth) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
if (expression.operatorToken.kind === ts.SyntaxKind.CommaToken)
|
|
89
|
+
return identityContribution(deps, ts, checker, expression.right, identity, seen, depth + 1);
|
|
90
|
+
if (expression.operatorToken.kind !== ts.SyntaxKind.QuestionQuestionToken)
|
|
91
|
+
return expressionReferences(deps, ts, checker, expression, identity) ? 'unproven' : 'no';
|
|
92
|
+
const left = identityContribution(deps, ts, checker, expression.left, identity, seen, depth + 1);
|
|
93
|
+
const right = identityContribution(deps, ts, checker, expression.right, identity, seen, depth + 1);
|
|
94
|
+
return (left === 'yes' || right === 'yes') && 'yes' || (left === 'unproven' || right === 'unproven') && 'unproven' || 'no';
|
|
88
95
|
}
|
|
89
|
-
|
|
90
96
|
function identityIdentifierContribution(deps, ts, checker, expression, identity, seen, depth) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
const symbol = deps.normalizedSymbol(ts, checker, expression);
|
|
98
|
+
if (!symbol || seen.has(symbol))
|
|
99
|
+
return 'no';
|
|
100
|
+
const initializer = deps.constInitializer(ts, symbol);
|
|
101
|
+
return initializer ? identityContribution(deps, ts, checker, initializer, identity, new Set(seen).add(symbol), depth + 1) : 'no';
|
|
95
102
|
}
|
|
96
|
-
|
|
97
103
|
function identityConditionalContribution(deps, ts, checker, expression, identity, seen, depth) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
const whenTrue = identityContribution(deps, ts, checker, expression.whenTrue, identity, seen, depth + 1);
|
|
105
|
+
const whenFalse = identityContribution(deps, ts, checker, expression.whenFalse, identity, seen, depth + 1);
|
|
106
|
+
if (whenTrue === 'yes' && whenFalse === 'yes')
|
|
107
|
+
return 'yes';
|
|
108
|
+
if (whenTrue === 'unproven' || whenFalse === 'unproven')
|
|
109
|
+
return 'unproven';
|
|
110
|
+
return 'no';
|
|
103
111
|
}
|
|
104
|
-
|
|
105
112
|
function identityContribution(deps, ts, checker, expression, identity, seen = new Set(), depth = 0) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
if (!expression || depth > 12)
|
|
114
|
+
return 'unproven';
|
|
115
|
+
expression = deps.unwrapExpression(ts, expression);
|
|
116
|
+
if (matchesIdentityAccess(deps, ts, checker, expression, identity))
|
|
117
|
+
return 'yes';
|
|
118
|
+
if (ts.isIdentifier(expression))
|
|
119
|
+
return identityIdentifierContribution(deps, ts, checker, expression, identity, seen, depth);
|
|
120
|
+
if (ts.isConditionalExpression(expression))
|
|
121
|
+
return identityConditionalContribution(deps, ts, checker, expression, identity, seen, depth);
|
|
122
|
+
if (ts.isBinaryExpression(expression))
|
|
123
|
+
return identityBinaryContribution(deps, ts, checker, expression, identity, seen, depth);
|
|
124
|
+
if (ts.isPrefixUnaryExpression(expression))
|
|
125
|
+
return expressionReferences(deps, ts, checker, expression, identity) ? 'unproven' : 'no';
|
|
126
|
+
if (ts.isTemplateExpression(expression))
|
|
127
|
+
return combineContributions(expression.templateSpans
|
|
128
|
+
.map(span => identityContribution(deps, ts, checker, span.expression, identity, seen, depth + 1)));
|
|
129
|
+
if (ts.isArrayLiteralExpression(expression))
|
|
130
|
+
return identityArrayContribution(deps, ts, checker, expression, identity, seen, depth);
|
|
131
|
+
if (ts.isObjectLiteralExpression(expression))
|
|
132
|
+
return identityObjectContribution(deps, ts, checker, expression, identity, seen, depth);
|
|
133
|
+
return ts.isCallExpression(expression) || ts.isNewExpression(expression) || ts.isAwaitExpression(expression) ? 'unproven' : 'no';
|
|
118
134
|
}
|
|
119
|
-
|
|
120
135
|
function returnedExpression(ts, fn) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
if (ts.isArrowFunction(fn) && !ts.isBlock(fn.body))
|
|
137
|
+
return fn.body;
|
|
138
|
+
if (!fn.body || !ts.isBlock(fn.body))
|
|
139
|
+
return null;
|
|
140
|
+
const returns = [];
|
|
141
|
+
const visit = (node) => {
|
|
142
|
+
if (node !== fn.body && (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node) || ts.isMethodDeclaration(node)))
|
|
143
|
+
return;
|
|
144
|
+
if (ts.isReturnStatement(node) && node.expression)
|
|
145
|
+
returns.push(node.expression);
|
|
146
|
+
else
|
|
147
|
+
ts.forEachChild(node, visit);
|
|
148
|
+
};
|
|
149
|
+
visit(fn.body);
|
|
150
|
+
return returns.length === 1 ? returns[0] ?? null : null;
|
|
131
151
|
}
|
|
132
|
-
|
|
133
152
|
function rootKeyExpression(deps, ts, checker, expression, identities, seen = new Set(), depth = 0) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
if (!expression || depth > 10)
|
|
154
|
+
return null;
|
|
155
|
+
expression = deps.unwrapExpression(ts, expression);
|
|
156
|
+
if (ts.isArrowFunction(expression) || ts.isFunctionExpression(expression)) {
|
|
157
|
+
const returned = returnedExpression(ts, expression);
|
|
158
|
+
return returned ? rootKeyExpression(deps, ts, checker, returned, identities, seen, depth + 1) : null;
|
|
159
|
+
}
|
|
160
|
+
if (ts.isIdentifier(expression) && !identities.some(identity => identity.symbol === deps.normalizedSymbol(ts, checker, expression))) {
|
|
161
|
+
const symbol = deps.normalizedSymbol(ts, checker, expression);
|
|
162
|
+
const initializer = symbol && !seen.has(symbol) ? deps.constInitializer(ts, symbol) : null;
|
|
163
|
+
if (initializer && symbol)
|
|
164
|
+
return rootKeyExpression(deps, ts, checker, initializer, identities, new Set(seen).add(symbol), depth + 1);
|
|
165
|
+
}
|
|
166
|
+
return expression;
|
|
146
167
|
}
|
|
147
|
-
|
|
148
168
|
function staticObjectKey(deps, ts, checker, expression, identities, seen, depth) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
169
|
+
const values = effectiveObjectValues(ts, expression);
|
|
170
|
+
return values !== null && values.length === expression.properties.length
|
|
171
|
+
&& values.every(([, value]) => staticKeyExpression(deps, ts, checker, value, identities, seen, depth + 1));
|
|
152
172
|
}
|
|
153
|
-
|
|
154
173
|
function staticCompositeKey(deps, ts, checker, expression, identities, seen, depth) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
174
|
+
if (ts.isTemplateExpression(expression))
|
|
175
|
+
return expression.templateSpans.every(span => staticKeyExpression(deps, ts, checker, span.expression, identities, seen, depth + 1));
|
|
176
|
+
if (ts.isArrayLiteralExpression(expression))
|
|
177
|
+
return expression.elements.every(element => !ts.isSpreadElement(element)
|
|
178
|
+
&& staticKeyExpression(deps, ts, checker, element, identities, seen, depth + 1));
|
|
179
|
+
if (ts.isObjectLiteralExpression(expression))
|
|
180
|
+
return staticObjectKey(deps, ts, checker, expression, identities, seen, depth);
|
|
181
|
+
if (ts.isConditionalExpression(expression))
|
|
182
|
+
return staticKeyExpression(deps, ts, checker, expression.condition, identities, seen, depth + 1)
|
|
183
|
+
&& staticKeyExpression(deps, ts, checker, expression.whenTrue, identities, seen, depth + 1)
|
|
184
|
+
&& staticKeyExpression(deps, ts, checker, expression.whenFalse, identities, seen, depth + 1);
|
|
185
|
+
if (ts.isBinaryExpression(expression))
|
|
186
|
+
return staticKeyExpression(deps, ts, checker, expression.left, identities, seen, depth + 1)
|
|
187
|
+
&& staticKeyExpression(deps, ts, checker, expression.right, identities, seen, depth + 1);
|
|
188
|
+
if (ts.isPrefixUnaryExpression(expression))
|
|
189
|
+
return staticKeyExpression(deps, ts, checker, expression.operand, identities, seen, depth + 1);
|
|
190
|
+
return null;
|
|
166
191
|
}
|
|
167
|
-
|
|
168
192
|
function staticIdentifierKey(deps, ts, checker, expression, identities, seen, depth) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
193
|
+
if (expression.text === 'undefined' || identities.some(identity => identity.symbol === deps.normalizedSymbol(ts, checker, expression)))
|
|
194
|
+
return true;
|
|
195
|
+
const symbol = deps.normalizedSymbol(ts, checker, expression);
|
|
196
|
+
if (!symbol || seen.has(symbol))
|
|
197
|
+
return false;
|
|
198
|
+
const initializer = deps.constInitializer(ts, symbol);
|
|
199
|
+
if (!initializer)
|
|
200
|
+
return false;
|
|
201
|
+
return staticKeyExpression(deps, ts, checker, initializer, identities, new Set(seen).add(symbol), depth + 1);
|
|
175
202
|
}
|
|
176
|
-
|
|
177
203
|
function staticKeyExpression(deps, ts, checker, expression, identities, seen = new Set(), depth = 0) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
204
|
+
if (!expression || depth > 12)
|
|
205
|
+
return false;
|
|
206
|
+
expression = deps.unwrapExpression(ts, expression);
|
|
207
|
+
if (expression.kind === ts.SyntaxKind.NullKeyword || expression.kind === ts.SyntaxKind.TrueKeyword
|
|
208
|
+
|| expression.kind === ts.SyntaxKind.FalseKeyword || ts.isStringLiteralLike(expression)
|
|
209
|
+
|| ts.isNumericLiteral(expression) || ts.isBigIntLiteral(expression) || ts.isNoSubstitutionTemplateLiteral(expression))
|
|
210
|
+
return true;
|
|
211
|
+
const composite = staticCompositeKey(deps, ts, checker, expression, identities, seen, depth);
|
|
212
|
+
if (composite !== null)
|
|
213
|
+
return composite;
|
|
214
|
+
if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
|
|
215
|
+
return identities.some(identity => expressionReferences(deps, ts, checker, expression, identity));
|
|
216
|
+
}
|
|
217
|
+
if (ts.isIdentifier(expression))
|
|
218
|
+
return staticIdentifierKey(deps, ts, checker, expression, identities, seen, depth);
|
|
219
|
+
return false;
|
|
190
220
|
}
|
|
191
|
-
|
|
192
221
|
function keyLeaves(deps, ts, checker, expression, identities, decisions = [], depth = 0) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
222
|
+
if (depth > 12)
|
|
223
|
+
return null;
|
|
224
|
+
expression = rootKeyExpression(deps, ts, checker, expression, identities);
|
|
225
|
+
if (!expression)
|
|
226
|
+
return null;
|
|
227
|
+
if (ts.isConditionalExpression(expression)) {
|
|
228
|
+
if (!staticKeyExpression(deps, ts, checker, expression.condition, identities))
|
|
229
|
+
return null;
|
|
230
|
+
const whenTrue = keyLeaves(deps, ts, checker, expression.whenTrue, identities, [...decisions, { condition: expression.condition, branch: true }], depth + 1);
|
|
231
|
+
const whenFalse = keyLeaves(deps, ts, checker, expression.whenFalse, identities, [...decisions, { condition: expression.condition, branch: false }], depth + 1);
|
|
232
|
+
return whenTrue && whenFalse ? [...whenTrue, ...whenFalse] : null;
|
|
233
|
+
}
|
|
234
|
+
if (expression.kind === ts.SyntaxKind.NullKeyword)
|
|
235
|
+
return [{ kind: 'null', expression, decisions }];
|
|
236
|
+
return staticKeyExpression(deps, ts, checker, expression, identities) ? [{ kind: 'active', expression, decisions }] : null;
|
|
204
237
|
}
|
|
205
|
-
|
|
206
238
|
function nullish(deps, ts, checker, expression) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
239
|
+
expression = deps.unwrapExpression(ts, expression);
|
|
240
|
+
if (expression.kind === ts.SyntaxKind.NullKeyword)
|
|
241
|
+
return true;
|
|
242
|
+
if (!ts.isIdentifier(expression) || expression.text !== 'undefined')
|
|
243
|
+
return false;
|
|
244
|
+
const symbol = checker.getSymbolAtLocation(expression);
|
|
245
|
+
return !symbol || (symbol.getDeclarations?.() ?? []).every(declaration => declaration.getSourceFile().isDeclarationFile);
|
|
212
246
|
}
|
|
213
|
-
|
|
214
247
|
function logicalBranchMeansAvailable(deps, ts, checker, condition, identity, branch) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
248
|
+
const operator = condition.operatorToken.kind;
|
|
249
|
+
if (operator !== ts.SyntaxKind.AmpersandAmpersandToken && operator !== ts.SyntaxKind.BarBarToken)
|
|
250
|
+
return null;
|
|
251
|
+
// `a && b` is true only when both sides are true; `a || b` is false only when both sides are false.
|
|
252
|
+
const decisive = operator === ts.SyntaxKind.AmpersandAmpersandToken ? branch : !branch;
|
|
253
|
+
return decisive && [condition.left, condition.right]
|
|
254
|
+
.some(side => branchMeansAvailable(deps, ts, checker, side, identity, branch));
|
|
221
255
|
}
|
|
222
|
-
|
|
223
256
|
function equalityBranchMeansAvailable(deps, ts, checker, condition, identity, branch) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
257
|
+
const operator = condition.operatorToken.kind;
|
|
258
|
+
const leftIdentity = expressionReferences(deps, ts, checker, condition.left, identity) && nullish(deps, ts, checker, condition.right);
|
|
259
|
+
const rightIdentity = expressionReferences(deps, ts, checker, condition.right, identity) && nullish(deps, ts, checker, condition.left);
|
|
260
|
+
if (!leftIdentity && !rightIdentity)
|
|
261
|
+
return false;
|
|
262
|
+
if ([ts.SyntaxKind.ExclamationEqualsToken, ts.SyntaxKind.ExclamationEqualsEqualsToken].includes(operator))
|
|
263
|
+
return branch;
|
|
264
|
+
if ([ts.SyntaxKind.EqualsEqualsToken, ts.SyntaxKind.EqualsEqualsEqualsToken].includes(operator))
|
|
265
|
+
return !branch;
|
|
266
|
+
return false;
|
|
231
267
|
}
|
|
232
|
-
|
|
233
268
|
function branchMeansAvailable(deps, ts, checker, condition, identity, branch) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
269
|
+
condition = deps.unwrapExpression(ts, condition);
|
|
270
|
+
if (expressionReferences(deps, ts, checker, condition, identity) && (ts.isIdentifier(condition)
|
|
271
|
+
|| ts.isPropertyAccessExpression(condition) || ts.isElementAccessExpression(condition)))
|
|
272
|
+
return branch;
|
|
273
|
+
if (ts.isPrefixUnaryExpression(condition) && condition.operator === ts.SyntaxKind.ExclamationToken) {
|
|
274
|
+
return branchMeansAvailable(deps, ts, checker, condition.operand, identity, !branch);
|
|
275
|
+
}
|
|
276
|
+
if (!ts.isBinaryExpression(condition))
|
|
277
|
+
return false;
|
|
278
|
+
const logicalResult = logicalBranchMeansAvailable(deps, ts, checker, condition, identity, branch);
|
|
279
|
+
if (logicalResult !== null)
|
|
280
|
+
return logicalResult;
|
|
281
|
+
return equalityBranchMeansAvailable(deps, ts, checker, condition, identity, branch);
|
|
244
282
|
}
|
|
245
|
-
|
|
246
283
|
function nonNullFalsy(deps, ts, expression) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
284
|
+
expression = deps.unwrapExpression(ts, expression);
|
|
285
|
+
return expression.kind === ts.SyntaxKind.FalseKeyword || ts.isStringLiteralLike(expression) && expression.text === ''
|
|
286
|
+
|| ts.isNumericLiteral(expression) && Number(expression.text) === 0
|
|
287
|
+
|| ts.isIdentifier(expression) && expression.text === 'undefined';
|
|
251
288
|
}
|
|
252
|
-
|
|
253
289
|
function containerSymbolsFromKey(deps, ts, checker, expression, found = new Set(), seen = new Set(), depth = 0) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
290
|
+
if (!expression || depth > 12)
|
|
291
|
+
return found;
|
|
292
|
+
expression = deps.unwrapExpression(ts, expression);
|
|
293
|
+
if (ts.isIdentifier(expression)) {
|
|
294
|
+
const symbol = deps.normalizedSymbol(ts, checker, expression);
|
|
295
|
+
if (!symbol || seen.has(symbol))
|
|
296
|
+
return found;
|
|
297
|
+
const initializer = deps.constInitializer(ts, symbol);
|
|
298
|
+
if (!initializer)
|
|
299
|
+
return found;
|
|
300
|
+
const value = deps.unwrapExpression(ts, initializer);
|
|
301
|
+
if (ts.isArrayLiteralExpression(value) || ts.isObjectLiteralExpression(value))
|
|
302
|
+
found.add(symbol);
|
|
303
|
+
containerSymbolsFromKey(deps, ts, checker, initializer, found, new Set(seen).add(symbol), depth + 1);
|
|
304
|
+
return found;
|
|
305
|
+
}
|
|
306
|
+
ts.forEachChild(expression, child => { containerSymbolsFromKey(deps, ts, checker, child, found, seen, depth + 1); });
|
|
264
307
|
return found;
|
|
265
|
-
}
|
|
266
|
-
ts.forEachChild(expression, child => { containerSymbolsFromKey(deps, ts, checker, child, found, seen, depth + 1); });
|
|
267
|
-
return found;
|
|
268
308
|
}
|
|
269
|
-
|
|
270
309
|
function keyContainerRisks(deps, ts, checker, key, owner) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
310
|
+
const symbols = containerSymbolsFromKey(deps, ts, checker, key);
|
|
311
|
+
if (!symbols.size || !owner?.body)
|
|
312
|
+
return [];
|
|
313
|
+
const declarationNames = new Set([...symbols].flatMap(symbol => (symbol.getDeclarations?.() ?? [])
|
|
314
|
+
.filter(ts.isVariableDeclaration).map(declaration => declaration.name)));
|
|
315
|
+
const risks = [];
|
|
316
|
+
const visit = (node) => {
|
|
317
|
+
const symbol = ts.isIdentifier(node) ? deps.normalizedSymbol(ts, checker, node) : null;
|
|
318
|
+
if (ts.isIdentifier(node) && symbol && symbols.has(symbol) && !declarationNames.has(node)
|
|
319
|
+
&& !(node.pos >= key.pos && node.end <= key.end))
|
|
320
|
+
risks.push(node);
|
|
321
|
+
ts.forEachChild(node, visit);
|
|
322
|
+
};
|
|
323
|
+
visit(owner.body);
|
|
324
|
+
return risks;
|
|
283
325
|
}
|
|
284
|
-
|
|
285
326
|
function inspectIdentityKey(deps, scope, entry, call, identity, active) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
if (!gated) violations.push(deps.violation(config, call, deps.SWR_KEY_RULE_ID,
|
|
307
|
-
`${entry.id} must produce an explicit null key when ${identity.id} (${identity.binding}) is unavailable.`,
|
|
308
|
-
{ lifecycle: entry.id, identity: identity.id }));
|
|
309
|
-
}
|
|
327
|
+
const { config, context, violations, reasons } = scope;
|
|
328
|
+
if (!active.length) {
|
|
329
|
+
violations.push(deps.violation(config, call, entry.kind === 'mutation' && identity.resource ? deps.SWR_MUTATION_RULE_ID : deps.SWR_KEY_RULE_ID, `${entry.id} has no active key path carrying declared identity ${identity.id} (${identity.binding}).`, { lifecycle: entry.id, identity: identity.id }));
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
const contributions = new Set(active.map(leaf => identityContribution(deps, context.ts, call.checker, leaf.expression, identity)));
|
|
333
|
+
if (contributions.has('unproven')) {
|
|
334
|
+
reasons.push(`${entry.path}#${entry.export} key value contribution for identity ${identity.id} (${identity.binding}) cannot be proved on every active path`);
|
|
335
|
+
}
|
|
336
|
+
else if (contributions.has('no')) {
|
|
337
|
+
const ruleId = entry.kind === 'mutation' && identity.resource ? deps.SWR_MUTATION_RULE_ID : deps.SWR_KEY_RULE_ID;
|
|
338
|
+
violations.push(deps.violation(config, call, ruleId, `${entry.id} key must include declared ${identity.resource ? 'resource ' : ''}identity ${identity.id} (${identity.binding}) on every active key path.`, { lifecycle: entry.id, identity: identity.id }));
|
|
339
|
+
}
|
|
340
|
+
if (identity.gatesRequest) {
|
|
341
|
+
const gated = active.every(leaf => leaf.decisions.some(decision => {
|
|
342
|
+
return branchMeansAvailable(deps, context.ts, call.checker, decision.condition, identity, decision.branch);
|
|
343
|
+
}));
|
|
344
|
+
if (!gated)
|
|
345
|
+
violations.push(deps.violation(config, call, deps.SWR_KEY_RULE_ID, `${entry.id} must produce an explicit null key when ${identity.id} (${identity.binding}) is unavailable.`, { lifecycle: entry.id, identity: identity.id }));
|
|
346
|
+
}
|
|
310
347
|
}
|
|
311
|
-
|
|
312
348
|
function inspectKey(deps, scope, entry, call, identities) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
349
|
+
const { config, context, violations, reasons } = scope;
|
|
350
|
+
const key = call.node.arguments[0];
|
|
351
|
+
if (!key) {
|
|
352
|
+
reasons.push(`${entry.path}#${entry.export} has an SWR call without a key`);
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
const containerRisks = keyContainerRisks(deps, context.ts, call.checker, key, call.owner);
|
|
356
|
+
if (containerRisks.length) {
|
|
357
|
+
const locations = containerRisks.map(node => deps.sourceLocation(call.source, node).line).filter((line, index, all) => all.indexOf(line) === index);
|
|
358
|
+
reasons.push(`${entry.path}#${entry.export} key container is referenced outside its declaration and selected SWR key` + (locations.length ? ` (line${'s'.repeat(Number(locations.length !== 1))} ${locations.join(', ')})` : ''));
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
const leaves = keyLeaves(deps, context.ts, call.checker, key, identities);
|
|
362
|
+
if (!leaves) {
|
|
363
|
+
reasons.push(`${entry.path}#${entry.export} uses a dynamic SWR key whose identity cannot be proved`);
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
const active = leaves.filter(leaf => leaf.kind === 'active');
|
|
367
|
+
if (active.some(leaf => nonNullFalsy(deps, context.ts, leaf.expression)))
|
|
368
|
+
violations.push(deps.violation(config, call, deps.SWR_KEY_RULE_ID, `${entry.id} uses explicit null, rather than another falsy value, for a disabled SWR key.`, { lifecycle: entry.id }));
|
|
369
|
+
for (const identity of identities)
|
|
370
|
+
inspectIdentityKey(deps, scope, entry, call, identity, active);
|
|
334
371
|
}
|
|
335
|
-
|
|
336
372
|
export function createNextDataKeyInspector(deps) {
|
|
337
|
-
|
|
373
|
+
return (config, context, entry, call, identities, violations, reasons) => inspectKey(deps, { config, context, violations, reasons }, entry, call, identities);
|
|
338
374
|
}
|