@nielspeter/eess-ts 0.5.1 → 0.7.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/README.md +2 -2
- package/dist/builders/class-rule-builder.d.ts +6 -10
- package/dist/builders/class-rule-builder.d.ts.map +1 -1
- package/dist/builders/class-rule-builder.js +33 -4
- package/dist/builders/class-rule-builder.js.map +1 -1
- package/dist/builders/function-rule-builder.d.ts +29 -7
- package/dist/builders/function-rule-builder.d.ts.map +1 -1
- package/dist/builders/function-rule-builder.js +34 -8
- package/dist/builders/function-rule-builder.js.map +1 -1
- package/dist/conditions/body-analysis-function.d.ts.map +1 -1
- package/dist/conditions/body-analysis-function.js +19 -1
- package/dist/conditions/body-analysis-function.js.map +1 -1
- package/dist/conditions/body-analysis-module.d.ts.map +1 -1
- package/dist/conditions/body-analysis-module.js +37 -4
- package/dist/conditions/body-analysis-module.js.map +1 -1
- package/dist/conditions/body-analysis.d.ts +5 -2
- package/dist/conditions/body-analysis.d.ts.map +1 -1
- package/dist/conditions/body-analysis.js +9 -6
- package/dist/conditions/body-analysis.js.map +1 -1
- package/dist/conditions/call.d.ts +8 -5
- package/dist/conditions/call.d.ts.map +1 -1
- package/dist/conditions/call.js +46 -20
- package/dist/conditions/call.js.map +1 -1
- package/dist/conditions/catch-analysis.d.ts +7 -1
- package/dist/conditions/catch-analysis.d.ts.map +1 -1
- package/dist/conditions/catch-analysis.js +26 -27
- package/dist/conditions/catch-analysis.js.map +1 -1
- package/dist/conditions/class.d.ts +5 -3
- package/dist/conditions/class.d.ts.map +1 -1
- package/dist/conditions/class.js +9 -6
- package/dist/conditions/class.js.map +1 -1
- package/dist/conditions/function.d.ts +4 -4
- package/dist/conditions/function.js +4 -4
- package/dist/core/execute-rule.js +1 -1
- package/dist/core/object-literal-functions.d.ts +4 -1
- package/dist/core/object-literal-functions.d.ts.map +1 -1
- package/dist/core/object-literal-functions.js +27 -5
- package/dist/core/object-literal-functions.js.map +1 -1
- package/dist/core/through-wrappers.d.ts +24 -0
- package/dist/core/through-wrappers.d.ts.map +1 -0
- package/dist/core/through-wrappers.js +36 -0
- package/dist/core/through-wrappers.js.map +1 -0
- package/dist/core/vacuity-diagnosis.d.ts.map +1 -1
- package/dist/core/vacuity-diagnosis.js +11 -3
- package/dist/core/vacuity-diagnosis.js.map +1 -1
- package/dist/graphql/resolver-rule-builder.d.ts.map +1 -1
- package/dist/graphql/resolver-rule-builder.js +16 -2
- package/dist/graphql/resolver-rule-builder.js.map +1 -1
- package/dist/helpers/body-traversal.d.ts +74 -20
- package/dist/helpers/body-traversal.d.ts.map +1 -1
- package/dist/helpers/body-traversal.js +273 -48
- package/dist/helpers/body-traversal.js.map +1 -1
- package/dist/helpers/callback-extractor.d.ts +6 -1
- package/dist/helpers/callback-extractor.d.ts.map +1 -1
- package/dist/helpers/callback-extractor.js +45 -10
- package/dist/helpers/callback-extractor.js.map +1 -1
- package/dist/helpers/global-binding.d.ts +11 -0
- package/dist/helpers/global-binding.d.ts.map +1 -0
- package/dist/helpers/global-binding.js +232 -0
- package/dist/helpers/global-binding.js.map +1 -0
- package/dist/helpers/heritage.d.ts +25 -0
- package/dist/helpers/heritage.d.ts.map +1 -0
- package/dist/helpers/heritage.js +41 -0
- package/dist/helpers/heritage.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/models/arch-function.d.ts +44 -14
- package/dist/models/arch-function.d.ts.map +1 -1
- package/dist/models/arch-function.js +226 -43
- package/dist/models/arch-function.js.map +1 -1
- package/dist/predicates/class.d.ts +9 -9
- package/dist/predicates/class.d.ts.map +1 -1
- package/dist/predicates/class.js +14 -13
- package/dist/predicates/class.js.map +1 -1
- package/dist/predicates/function.d.ts +16 -4
- package/dist/predicates/function.d.ts.map +1 -1
- package/dist/predicates/function.js +56 -3
- package/dist/predicates/function.js.map +1 -1
- package/dist/predicates/type.d.ts +2 -1
- package/dist/predicates/type.d.ts.map +1 -1
- package/dist/predicates/type.js +6 -2
- package/dist/predicates/type.js.map +1 -1
- package/dist/presets/agent-guardrails.js +5 -5
- package/dist/presets/agent-guardrails.js.map +1 -1
- package/dist/presets/recommended.d.ts +14 -6
- package/dist/presets/recommended.d.ts.map +1 -1
- package/dist/presets/recommended.js +30 -11
- package/dist/presets/recommended.js.map +1 -1
- package/dist/rules/code-quality.d.ts +12 -1
- package/dist/rules/code-quality.d.ts.map +1 -1
- package/dist/rules/code-quality.js +106 -12
- package/dist/rules/code-quality.js.map +1 -1
- package/dist/rules/errors.d.ts +4 -2
- package/dist/rules/errors.d.ts.map +1 -1
- package/dist/rules/errors.js +44 -23
- package/dist/rules/errors.js.map +1 -1
- package/dist/rules/hygiene.d.ts +3 -1
- package/dist/rules/hygiene.d.ts.map +1 -1
- package/dist/rules/hygiene.js +3 -1
- package/dist/rules/hygiene.js.map +1 -1
- package/dist/rules/metrics.d.ts +6 -4
- package/dist/rules/metrics.d.ts.map +1 -1
- package/dist/rules/metrics.js +40 -20
- package/dist/rules/metrics.js.map +1 -1
- package/dist/rules/security.d.ts +19 -5
- package/dist/rules/security.d.ts.map +1 -1
- package/dist/rules/security.js +198 -19
- package/dist/rules/security.js.map +1 -1
- package/dist/rules/typescript.d.ts +2 -2
- package/dist/rules/typescript.js +2 -2
- package/dist/smells/duplicate-bodies.js +2 -2
- package/dist/smells/duplicate-bodies.js.map +1 -1
- package/dist/smells/sibling-files.js +2 -2
- package/dist/smells/sibling-files.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Node } from 'ts-morph';
|
|
2
|
+
/**
|
|
3
|
+
* The value a node holds at run time, read through the wrappers that leave it unchanged —
|
|
4
|
+
* parentheses, `as`, `<T>`, `satisfies` and `!`.
|
|
5
|
+
*
|
|
6
|
+
* **One list, every reader.** It began in `models/arch-function.ts` for a variable's initializer
|
|
7
|
+
* (bugs 0306, 0315). Bug 0324 gave the callback extractor a second copy of the decision, and the
|
|
8
|
+
* enforcement review of that fix measured what two copies cost: `use({ handler: (() => x) })` was
|
|
9
|
+
* read by neither the callback conditions nor `functions({ includeObjectLiteralFunctions: true })`,
|
|
10
|
+
* because the extractor unwrapped the ARGUMENT while the object-literal traversal tested the raw
|
|
11
|
+
* property value. The unwrapping and the object-literal walk are both in `core/`, so the list lives
|
|
12
|
+
* here, below both, and `models/` and `helpers/` import it rather than restating it.
|
|
13
|
+
*
|
|
14
|
+
* This module imports nothing but ts-morph, as its neighbour `object-literal-functions.ts` does, so
|
|
15
|
+
* `models → core` and `helpers → core` both stay permitted directions.
|
|
16
|
+
*/
|
|
17
|
+
export declare function throughWrappers(node: Node | undefined): Node | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a node IS one of those wrappers — the same question, derived from the same list rather
|
|
20
|
+
* than restating it. A reader that must know whether a value was reached THROUGH a wrapper, to keep
|
|
21
|
+
* a newly reachable finding numbered after the ones read before it, asks this.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isValueWrapper(node: Node): boolean;
|
|
24
|
+
//# sourceMappingURL=through-wrappers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"through-wrappers.d.ts","sourceRoot":"","sources":["../../src/core/through-wrappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAYxE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAElD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Node } from 'ts-morph';
|
|
2
|
+
/**
|
|
3
|
+
* The value a node holds at run time, read through the wrappers that leave it unchanged —
|
|
4
|
+
* parentheses, `as`, `<T>`, `satisfies` and `!`.
|
|
5
|
+
*
|
|
6
|
+
* **One list, every reader.** It began in `models/arch-function.ts` for a variable's initializer
|
|
7
|
+
* (bugs 0306, 0315). Bug 0324 gave the callback extractor a second copy of the decision, and the
|
|
8
|
+
* enforcement review of that fix measured what two copies cost: `use({ handler: (() => x) })` was
|
|
9
|
+
* read by neither the callback conditions nor `functions({ includeObjectLiteralFunctions: true })`,
|
|
10
|
+
* because the extractor unwrapped the ARGUMENT while the object-literal traversal tested the raw
|
|
11
|
+
* property value. The unwrapping and the object-literal walk are both in `core/`, so the list lives
|
|
12
|
+
* here, below both, and `models/` and `helpers/` import it rather than restating it.
|
|
13
|
+
*
|
|
14
|
+
* This module imports nothing but ts-morph, as its neighbour `object-literal-functions.ts` does, so
|
|
15
|
+
* `models → core` and `helpers → core` both stay permitted directions.
|
|
16
|
+
*/
|
|
17
|
+
export function throughWrappers(node) {
|
|
18
|
+
let current = node;
|
|
19
|
+
while (Node.isParenthesizedExpression(current) ||
|
|
20
|
+
Node.isAsExpression(current) ||
|
|
21
|
+
Node.isTypeAssertion(current) ||
|
|
22
|
+
Node.isSatisfiesExpression(current) ||
|
|
23
|
+
Node.isNonNullExpression(current)) {
|
|
24
|
+
current = current.getExpression();
|
|
25
|
+
}
|
|
26
|
+
return current;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether a node IS one of those wrappers — the same question, derived from the same list rather
|
|
30
|
+
* than restating it. A reader that must know whether a value was reached THROUGH a wrapper, to keep
|
|
31
|
+
* a newly reachable finding numbered after the ones read before it, asks this.
|
|
32
|
+
*/
|
|
33
|
+
export function isValueWrapper(node) {
|
|
34
|
+
return throughWrappers(node) !== node;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=through-wrappers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"through-wrappers.js","sourceRoot":"","sources":["../../src/core/through-wrappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU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,CAAA;IACnC,UAAU,IAAI,WAAW,GAAG,SAAS,CAAA;IACrC,KAAK,IAAI,SAAS,QAAQ,EAAE,CAAA;IAC5B,kBAAkB,IAAI,OAAO,CAAA;IAC7B,aAAa,IAAI,OAAO,CAAA;IACxB,kBAAkB,IAAI,MAAM,CAAA;IAC5B,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,CAAA;CACvE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,EAAE,CAmCtE;AA6FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,aAAa,EAAE,EAC3B,QAAQ,EAAE,MAAM,GACf,aAAa,EAAE,GAAG,SAAS,CA4B7B;AAmCD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CA2C7F;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG;IACtD,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzB,SAAS,EAAE,aAAa,EAAE,CAAA;CAC3B,CAsCA;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAgC7D;AAED,kEAAkE;AAClE,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,WAAW,GAAG,SAAS,GAC/B,aAAa,CA4Bf"}
|
|
@@ -272,9 +272,17 @@ export function expiredDeclarationViolation(facts, examined) {
|
|
|
272
272
|
const name = described.id || described.rule || facts.ruleClass.name;
|
|
273
273
|
const declaration = facts.emptyDeclarationAdvice();
|
|
274
274
|
const message = `${declaration} asserted this rule examines nothing, and it examined ${String(examined)} ${singularise(facts.examinedUnitNoun(), examined)}.`;
|
|
275
|
-
const suggestion =
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
const suggestion =
|
|
276
|
+
// No CAUSE is asserted here on purpose. This said "the thing you were waiting for has appeared",
|
|
277
|
+
// which names one reason among several and is wrong for the others: the rule may examine
|
|
278
|
+
// something now because the code changed, because the selection widened, or because an upgrade
|
|
279
|
+
// changed what the rule READS — measured on bug 0333's upgrade, where a floor rule moved from
|
|
280
|
+
// function subjects to module subjects and this line sent the reader hunting their own diff for
|
|
281
|
+
// code they had not written. ADR-009 rule 2: a wrong attribution sends you in circles.
|
|
282
|
+
`Remove ${declaration} and let the rule enforce itself — it has something to check now, whether ` +
|
|
283
|
+
`because the code changed, because the selection widened, or because an upgrade changed what ` +
|
|
284
|
+
`this rule reads. If instead the selection is wider than you meant, narrow it and keep the ` +
|
|
285
|
+
`declaration. ` +
|
|
278
286
|
`The rule's own violations are reported as separate findings under the same rule id. ` +
|
|
279
287
|
UNSUPPRESSABLE;
|
|
280
288
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vacuity-diagnosis.js","sourceRoot":"","sources":["../../src/core/vacuity-diagnosis.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE7E;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,IAAY,EAAE,CAAS;IAC1C,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,I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gD;IAChD,IAAI,OAAO,KAAK,SAAS,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QACpD,OAAO,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC9C,CAAC;IACD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,EAAE,CAAA;IACtC,MAAM,IAAI,GAAG,SAAS,CAAC,EAAE,IAAI,SAAS,CAAC,IAAI,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAA;IACnE,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,kBAAkB,EAAE,IAAI,cAAc,IAAI,eAAe,EAAE,CAAA;IACnF,OAAO;QACL,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,SAAS,CAAC,EAAE;QACpB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,MAAM;QACf,iDAAiD;QACjD,UAAU,EAAE,MAAM;QAClB,aAAa,EAAE,IAAI;KACpB,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver-rule-builder.d.ts","sourceRoot":"","sources":["../../src/graphql/resolver-rule-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAO9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"resolver-rule-builder.d.ts","sourceRoot":"","sources":["../../src/graph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AAC,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,GAAG,IAAI;IAQnE;;;;;;;OAOG;cACgB,gBAAgB,IAAI,MAAM;cAI1B,kBAAkB,IAAI,MAAM;cAI5B,iBAAiB,IAAI,MAAM;cAI3B,WAAW,IAAI,YAAY,EAAE;CAoBjD"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { stampGlobs } from '@nielspeter/eess/internal';
|
|
2
2
|
import { globAnyOf } from '@nielspeter/eess';
|
|
3
|
-
import { collectFunctions } from '../models/arch-function.js';
|
|
3
|
+
import { collectFunctions, functionKindOf } from '../models/arch-function.js';
|
|
4
4
|
import { functionContain, functionNotContain, functionUseInsteadOf, } from '../conditions/body-analysis-function.js';
|
|
5
5
|
import { GraphqlRuleBuilder } from './graphql-rule-builder.js';
|
|
6
|
+
/**
|
|
7
|
+
* The kinds of collected function `resolvers()` does not treat as a resolver. A getter written as a field
|
|
8
|
+
* resolver, `@Field() get fullName()`, is therefore not read.
|
|
9
|
+
*/
|
|
10
|
+
const NOT_RESOLVERS = new Set([
|
|
11
|
+
'constructor',
|
|
12
|
+
'getter',
|
|
13
|
+
'setter',
|
|
14
|
+
]);
|
|
6
15
|
/**
|
|
7
16
|
* Predicate: filter to resolver functions for fields returning types matching the pattern.
|
|
8
17
|
*
|
|
@@ -148,7 +157,12 @@ export class ResolverRuleBuilder extends GraphqlRuleBuilder {
|
|
|
148
157
|
// sit beside the resolvers and none of the resolvers themselves — measured
|
|
149
158
|
// on a real schema as 60 subjects, 0 of them resolvers. Every rule written
|
|
150
159
|
// against it then passes on the wrong subjects (ADR-008).
|
|
151
|
-
|
|
160
|
+
//
|
|
161
|
+
// A constructor or an accessor is not treated as a resolver, so a getter field resolver is not read.
|
|
162
|
+
// Since bug 0315 the collection returns a class's constructor and accessors beside its methods, and a
|
|
163
|
+
// class-based resolver's injected constructor would otherwise fail every `contain(...)` rule written
|
|
164
|
+
// against the resolvers.
|
|
165
|
+
return this.sourceFiles.flatMap((sf) => collectFunctions(sf, { includeObjectLiteralFunctions: true }).filter((fn) => !NOT_RESOLVERS.has(functionKindOf(fn))));
|
|
152
166
|
}
|
|
153
167
|
}
|
|
154
168
|
//# sourceMappingURL=resolver-rule-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver-rule-builder.js","sourceRoot":"","sources":["../../src/graphql/resolver-rule-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"resolver-rule-builder.js","sourceRoot":"","sources":["../../src/graphql/resolver-rule-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAqB,MAAM,4BAA4B,CAAA;AAChG,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;GAGG;AACH,MAAM,aAAa,GAA8B,IAAI,GAAG,CAAe;IACrE,aAAa;IACb,QAAQ;IACR,QAAQ;CACT,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAwB;IAC5D,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC3E,OAAO;QACL,WAAW,EAAE,2BAA2B,IAAI,EAAE;QAC9C,IAAI,CAAC,EAAgB;YACnB,MAAM,UAAU,GAAG,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F,CAAA;IACH,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Node, type ClassDeclaration, type SourceFile } from 'ts-morph';
|
|
1
|
+
import { type Node, type ClassDeclaration, type SourceFile, type ParameterDeclaration } from 'ts-morph';
|
|
2
2
|
import type { ExpressionMatcher } from './matchers.js';
|
|
3
3
|
import type { ArchFunction } from '../models/arch-function.js';
|
|
4
4
|
/**
|
|
@@ -46,20 +46,84 @@ interface Match {
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function reportedLine(node: Node, triviaPos: number | undefined): number;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* How much of a class a body search reads (bug 0307).
|
|
50
50
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
51
|
+
* - `'member-code'` — the code the class's members run: method, constructor and accessor bodies,
|
|
52
|
+
* parameter defaults — each default and computed key inside a destructured parameter included
|
|
53
|
+
* (bug 0309) — property initializers and static blocks.
|
|
54
|
+
* - `'all-code'` — that, and the code the class runs outside its members when it is defined: every
|
|
55
|
+
* decorator expression (on the class, its members, accessors and parameters), computed member
|
|
56
|
+
* names and the `extends` expression.
|
|
57
|
+
*
|
|
58
|
+
* A search for what a class must NOT contain reads all of it: there, reading more fails closed. A
|
|
59
|
+
* search for what it MUST contain reads member code only: there, reading less fails closed, and a decorator, a
|
|
60
|
+
* computed name or the `extends` expression is wiring that must not satisfy a rule like
|
|
61
|
+
* `classMustCall` — a DI token passed to a decorator included. The line is drawn by position: a
|
|
62
|
+
* call in member code still satisfies it, a DI lookup in a field initializer included.
|
|
63
|
+
*
|
|
64
|
+
* A computed key inside a destructured parameter is member code, unlike a computed member name: the
|
|
65
|
+
* key runs at each call, as a default does, and the member name runs once, when the class is
|
|
66
|
+
* defined. So a call in the key satisfies a must-contain rule, and a call in the member name does not.
|
|
67
|
+
*
|
|
68
|
+
* A rule that forbids something may still read member code only, when the other positions hold
|
|
69
|
+
* nothing it should report: `noMagicNumbers` does, because a number in a decorator argument such as
|
|
70
|
+
* `@Max(150)` is named by the decorator that takes it (bug 0306).
|
|
54
71
|
*/
|
|
55
|
-
|
|
72
|
+
type ClassBodyReach = 'member-code' | 'all-code';
|
|
56
73
|
/**
|
|
57
|
-
* Search
|
|
74
|
+
* Search the code a class runs (bugs 0300, 0307), as far as `reach` says.
|
|
75
|
+
*
|
|
76
|
+
* In four passes, for baselines. A match's identity is numbered within its enclosing declaration
|
|
77
|
+
* (`match-identity.ts`), and a declaration is known by its name, so a getter and its setter, or a
|
|
78
|
+
* static and an instance member of one name, share one. What the walk read before bug 0300 comes
|
|
79
|
+
* first for every member, then what 0300 added, then what 0307 added, then what 0309 added, so a
|
|
80
|
+
* finding a baseline accepted keeps its ordinal and a new one is numbered after it however the
|
|
81
|
+
* members interleave:
|
|
82
|
+
*
|
|
83
|
+
* 1. every method, constructor and accessor body;
|
|
84
|
+
* 2. every parameter default, property initializer (which covers an arrow-function property) and
|
|
85
|
+
* static block;
|
|
86
|
+
* 3. for `'all-code'`: every parameter, member and property decorator, computed member name, class
|
|
87
|
+
* decorator and the `extends` expression;
|
|
88
|
+
* 4. under either reach, the code every destructured parameter runs at each call, at any depth
|
|
89
|
+
* (`bindingPatternMatches`).
|
|
58
90
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
91
|
+
* Overload signatures have no body, defaults or decorators, so walking every constructor is the
|
|
92
|
+
* same as walking the implementation. An overload's parameter LIST does hold comments, which that
|
|
93
|
+
* rationale does not cover — but ts-morph's `getClasses().getMethods()` yields only the
|
|
94
|
+
* implementation (measured), so neither this search nor the function search reads them, and the
|
|
95
|
+
* two agree. Named in bug 0329 rather than closed here. `implements` is type-only and docstrings are not code, so
|
|
96
|
+
* neither is read, and a `comment()` rule reads code, not documentation.
|
|
61
97
|
*/
|
|
62
|
-
export declare function searchClassBody(cls: ClassDeclaration, matcher: ExpressionMatcher): MatchResult;
|
|
98
|
+
export declare function searchClassBody(cls: ClassDeclaration, matcher: ExpressionMatcher, reach: ClassBodyReach): MatchResult;
|
|
99
|
+
/**
|
|
100
|
+
* The code a function's parameters run (bug 0314): for each parameter, its default, then the code of
|
|
101
|
+
* its destructured binding, if it has one. A default runs whenever its argument is omitted — like a
|
|
102
|
+
* class member's parameter default, it is read as the function's code. A parameter without a default
|
|
103
|
+
* or a pattern runs nothing.
|
|
104
|
+
*/
|
|
105
|
+
export declare function codeOfParameters(parameters: readonly ParameterDeclaration[]): Node[];
|
|
106
|
+
/**
|
|
107
|
+
* Matches in what a call condition searches — an argument, or a callback's body — including the
|
|
108
|
+
* node itself unless it is a block (bug 0323).
|
|
109
|
+
*
|
|
110
|
+
* An argument can BE the match — `use(legacy(1))` — and so can a concise callback's body, which is
|
|
111
|
+
* the expression itself: `use(() => legacy(1))`. With
|
|
112
|
+
* `findMatchesInNode` alone neither was tested, under `call()` as under `expression()`. A block is
|
|
113
|
+
* searched below its root, as `searchFunctionBody` searches a function's own: tested itself, a
|
|
114
|
+
* block would match a broad pattern against the whole body.
|
|
115
|
+
*/
|
|
116
|
+
export declare function findMatchesInCode(node: Node, matcher: ExpressionMatcher): Match[];
|
|
117
|
+
/**
|
|
118
|
+
* `findMatchesInCode` over several roots, numbered so a baseline keeps its identities (bug 0323):
|
|
119
|
+
* every match below a root first, in order, then the roots that are matches themselves.
|
|
120
|
+
*
|
|
121
|
+
* 0.5.1 never tested a root, so each root match is new. Numbered in place, one would take the
|
|
122
|
+
* ordinal of a match a baseline already accepted, and the new finding would be the one hidden —
|
|
123
|
+
* as `searchClassBody` numbers the code bug 0300 made it read after the code it read before. A
|
|
124
|
+
* trivia match was found on a root before too, so it keeps its place.
|
|
125
|
+
*/
|
|
126
|
+
export declare function findMatchesInEach(roots: readonly Node[], matcher: ExpressionMatcher): Match[];
|
|
63
127
|
/**
|
|
64
128
|
* Search a function body for matches.
|
|
65
129
|
*
|
|
@@ -68,16 +132,6 @@ export declare function searchClassBody(cls: ClassDeclaration, matcher: Expressi
|
|
|
68
132
|
* still works — it walks the expression subtree.
|
|
69
133
|
*/
|
|
70
134
|
export declare function searchFunctionBody(fn: ArchFunction, matcher: ExpressionMatcher): MatchResult;
|
|
71
|
-
/**
|
|
72
|
-
* Extract the body from a function-like argument node.
|
|
73
|
-
*
|
|
74
|
-
* Handles:
|
|
75
|
-
* - ArrowFunction: () => { ... } or () => expr
|
|
76
|
-
* - FunctionExpression: function() { ... }
|
|
77
|
-
*
|
|
78
|
-
* Returns undefined if the node is not a function-like expression.
|
|
79
|
-
*/
|
|
80
|
-
export declare function getFunctionBody(node: Node): Node | undefined;
|
|
81
135
|
export declare function searchModuleBody(sourceFile: SourceFile, matcher: ExpressionMatcher, options?: ModuleBodyOptions): MatchResult;
|
|
82
136
|
export {};
|
|
83
137
|
//# sourceMappingURL=body-traversal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-traversal.d.ts","sourceRoot":"","sources":["../../src/helpers/body-traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"body-traversal.d.ts","sourceRoot":"","sources":["../../src/helpers/body-traversal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,gBAAgB,EAErB,KAAK,UAAU,EACf,KAAK,oBAAoB,EAO1B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAG9D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,UAAU,WAAW;IACnB,2CAA2C;IAC3C,KAAK,EAAE,OAAO,CAAA;IACd,qEAAqE;IACrE,aAAa,EAAE,IAAI,EAAE,CAAA;IACrB;;;;;;;OAOG;IACH,eAAe,EAAE,CAAC,MA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