circle-ir 4.16.1 → 4.18.1
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/dist/analysis/advisories.d.ts +186 -0
- package/dist/analysis/advisories.d.ts.map +1 -0
- package/dist/analysis/advisories.js +391 -0
- package/dist/analysis/advisories.js.map +1 -0
- package/dist/analysis/comment-lines.d.ts +14 -0
- package/dist/analysis/comment-lines.d.ts.map +1 -0
- package/dist/analysis/comment-lines.js +34 -0
- package/dist/analysis/comment-lines.js.map +1 -0
- package/dist/analysis/config-loader.d.ts.map +1 -1
- package/dist/analysis/config-loader.js +59 -5
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/analysis/constant-caller-gate.d.ts +2 -2
- package/dist/analysis/constant-caller-gate.d.ts.map +1 -1
- package/dist/analysis/constant-caller-gate.js +205 -29
- package/dist/analysis/constant-caller-gate.js.map +1 -1
- package/dist/analysis/constant-propagation/index.d.ts +2 -0
- package/dist/analysis/constant-propagation/index.d.ts.map +1 -1
- package/dist/analysis/constant-propagation/index.js +10 -0
- package/dist/analysis/constant-propagation/index.js.map +1 -1
- package/dist/analysis/constant-propagation/propagator.d.ts +15 -0
- package/dist/analysis/constant-propagation/propagator.d.ts.map +1 -1
- package/dist/analysis/constant-propagation/propagator.js +224 -20
- package/dist/analysis/constant-propagation/propagator.js.map +1 -1
- package/dist/analysis/constant-propagation/types.d.ts +2 -0
- package/dist/analysis/constant-propagation/types.d.ts.map +1 -1
- package/dist/analysis/constant-propagation.d.ts +1 -1
- package/dist/analysis/constant-propagation.d.ts.map +1 -1
- package/dist/analysis/constant-propagation.js +1 -1
- package/dist/analysis/constant-propagation.js.map +1 -1
- package/dist/analysis/entry-point-detection.d.ts.map +1 -1
- package/dist/analysis/entry-point-detection.js +72 -0
- package/dist/analysis/entry-point-detection.js.map +1 -1
- package/dist/analysis/interprocedural.d.ts.map +1 -1
- package/dist/analysis/interprocedural.js +75 -8
- package/dist/analysis/interprocedural.js.map +1 -1
- package/dist/analysis/maven-declared.d.ts +72 -0
- package/dist/analysis/maven-declared.d.ts.map +1 -0
- package/dist/analysis/maven-declared.js +216 -0
- package/dist/analysis/maven-declared.js.map +1 -0
- package/dist/analysis/maven-version.d.ts +28 -0
- package/dist/analysis/maven-version.d.ts.map +1 -0
- package/dist/analysis/maven-version.js +172 -0
- package/dist/analysis/maven-version.js.map +1 -0
- package/dist/analysis/passes/constant-propagation-pass.d.ts.map +1 -1
- package/dist/analysis/passes/constant-propagation-pass.js +29 -1
- package/dist/analysis/passes/constant-propagation-pass.js.map +1 -1
- package/dist/analysis/passes/cross-file-pass.d.ts.map +1 -1
- package/dist/analysis/passes/cross-file-pass.js +84 -2
- package/dist/analysis/passes/cross-file-pass.js.map +1 -1
- package/dist/analysis/passes/csharp-sanitizer-credit.d.ts +7 -0
- package/dist/analysis/passes/csharp-sanitizer-credit.d.ts.map +1 -1
- package/dist/analysis/passes/csharp-sanitizer-credit.js +44 -1
- package/dist/analysis/passes/csharp-sanitizer-credit.js.map +1 -1
- package/dist/analysis/passes/insecure-cookie-pass.d.ts +2 -0
- package/dist/analysis/passes/insecure-cookie-pass.d.ts.map +1 -1
- package/dist/analysis/passes/insecure-cookie-pass.js +25 -3
- package/dist/analysis/passes/insecure-cookie-pass.js.map +1 -1
- package/dist/analysis/passes/interprocedural-pass.d.ts +11 -14
- package/dist/analysis/passes/interprocedural-pass.d.ts.map +1 -1
- package/dist/analysis/passes/interprocedural-pass.js +562 -0
- package/dist/analysis/passes/interprocedural-pass.js.map +1 -1
- package/dist/analysis/passes/language-sources-pass.d.ts +18 -1
- package/dist/analysis/passes/language-sources-pass.d.ts.map +1 -1
- package/dist/analysis/passes/language-sources-pass.js +1079 -14
- package/dist/analysis/passes/language-sources-pass.js.map +1 -1
- package/dist/analysis/passes/param-source-flow-gate-pass.d.ts.map +1 -1
- package/dist/analysis/passes/param-source-flow-gate-pass.js +82 -3
- package/dist/analysis/passes/param-source-flow-gate-pass.js.map +1 -1
- package/dist/analysis/passes/sink-filter-pass.d.ts +44 -2
- package/dist/analysis/passes/sink-filter-pass.d.ts.map +1 -1
- package/dist/analysis/passes/sink-filter-pass.js +690 -12
- package/dist/analysis/passes/sink-filter-pass.js.map +1 -1
- package/dist/analysis/passes/taint-propagation-pass.d.ts.map +1 -1
- package/dist/analysis/passes/taint-propagation-pass.js +298 -19
- package/dist/analysis/passes/taint-propagation-pass.js.map +1 -1
- package/dist/analysis/passes/tls-verify-disabled-pass.d.ts +18 -0
- package/dist/analysis/passes/tls-verify-disabled-pass.d.ts.map +1 -1
- package/dist/analysis/passes/tls-verify-disabled-pass.js +161 -0
- package/dist/analysis/passes/tls-verify-disabled-pass.js.map +1 -1
- package/dist/analysis/passes/weak-random-pass.d.ts +6 -0
- package/dist/analysis/passes/weak-random-pass.d.ts.map +1 -1
- package/dist/analysis/passes/weak-random-pass.js +29 -0
- package/dist/analysis/passes/weak-random-pass.js.map +1 -1
- package/dist/analysis/promote-cross-file-flows.d.ts +17 -0
- package/dist/analysis/promote-cross-file-flows.d.ts.map +1 -0
- package/dist/analysis/promote-cross-file-flows.js +32 -0
- package/dist/analysis/promote-cross-file-flows.js.map +1 -0
- package/dist/analysis/rust-literal-guard.d.ts.map +1 -1
- package/dist/analysis/rust-literal-guard.js +100 -1
- package/dist/analysis/rust-literal-guard.js.map +1 -1
- package/dist/analysis/sbom.d.ts +100 -0
- package/dist/analysis/sbom.d.ts.map +1 -1
- package/dist/analysis/sbom.js +514 -3
- package/dist/analysis/sbom.js.map +1 -1
- package/dist/analysis/semver-version.d.ts +30 -0
- package/dist/analysis/semver-version.d.ts.map +1 -0
- package/dist/analysis/semver-version.js +76 -0
- package/dist/analysis/semver-version.js.map +1 -0
- package/dist/analysis/taint-matcher.d.ts +5 -0
- package/dist/analysis/taint-matcher.d.ts.map +1 -1
- package/dist/analysis/taint-matcher.js +226 -4
- package/dist/analysis/taint-matcher.js.map +1 -1
- package/dist/analyzer.d.ts +57 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +69 -6
- package/dist/analyzer.js.map +1 -1
- package/dist/browser/circle-ir.js +3360 -314
- package/dist/core/circle-ir-core.cjs +783 -220
- package/dist/core/circle-ir-core.js +783 -220
- package/dist/core/extractors/dfg.js +205 -2
- package/dist/core/extractors/dfg.js.map +1 -1
- package/dist/core/extractors/ts-declaration-detail.d.ts +39 -0
- package/dist/core/extractors/ts-declaration-detail.d.ts.map +1 -0
- package/dist/core/extractors/ts-declaration-detail.js +266 -0
- package/dist/core/extractors/ts-declaration-detail.js.map +1 -0
- package/dist/core/extractors/types.js +53 -9
- package/dist/core/extractors/types.js.map +1 -1
- package/dist/graph/analysis-pass.d.ts +4 -1
- package/dist/graph/analysis-pass.d.ts.map +1 -1
- package/dist/graph/analysis-pass.js +4 -1
- package/dist/graph/analysis-pass.js.map +1 -1
- package/dist/graph-facts/dead-code.d.ts +62 -0
- package/dist/graph-facts/dead-code.d.ts.map +1 -0
- package/dist/graph-facts/dead-code.js +90 -0
- package/dist/graph-facts/dead-code.js.map +1 -0
- package/dist/graph-facts/dependency-calls.d.ts +86 -0
- package/dist/graph-facts/dependency-calls.d.ts.map +1 -0
- package/dist/graph-facts/dependency-calls.js +93 -0
- package/dist/graph-facts/dependency-calls.js.map +1 -0
- package/dist/graph-facts/index.d.ts +10 -0
- package/dist/graph-facts/index.d.ts.map +1 -0
- package/dist/graph-facts/index.js +10 -0
- package/dist/graph-facts/index.js.map +1 -0
- package/dist/graph-facts/maven-packages.d.ts +42 -0
- package/dist/graph-facts/maven-packages.d.ts.map +1 -0
- package/dist/graph-facts/maven-packages.js +133 -0
- package/dist/graph-facts/maven-packages.js.map +1 -0
- package/dist/graph-facts/reach.d.ts +203 -0
- package/dist/graph-facts/reach.d.ts.map +1 -0
- package/dist/graph-facts/reach.js +219 -0
- package/dist/graph-facts/reach.js.map +1 -0
- package/dist/graph-facts/removal-reach.d.ts +73 -0
- package/dist/graph-facts/removal-reach.d.ts.map +1 -0
- package/dist/graph-facts/removal-reach.js +64 -0
- package/dist/graph-facts/removal-reach.js.map +1 -0
- package/dist/index.d.ts +21 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/navigation/go-graph.d.ts +68 -0
- package/dist/navigation/go-graph.d.ts.map +1 -0
- package/dist/navigation/go-graph.js +753 -0
- package/dist/navigation/go-graph.js.map +1 -0
- package/dist/navigation/index.d.ts +7 -1
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +6 -0
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/java-entry-tables.d.ts +43 -0
- package/dist/navigation/java-entry-tables.d.ts.map +1 -0
- package/dist/navigation/java-entry-tables.js +56 -0
- package/dist/navigation/java-entry-tables.js.map +1 -0
- package/dist/navigation/java-graph.d.ts +64 -0
- package/dist/navigation/java-graph.d.ts.map +1 -0
- package/dist/navigation/java-graph.js +466 -0
- package/dist/navigation/java-graph.js.map +1 -0
- package/dist/navigation/navigation-index.d.ts +91 -2
- package/dist/navigation/navigation-index.d.ts.map +1 -1
- package/dist/navigation/navigation-index.js +372 -45
- package/dist/navigation/navigation-index.js.map +1 -1
- package/dist/navigation/python-graph.d.ts +73 -0
- package/dist/navigation/python-graph.d.ts.map +1 -0
- package/dist/navigation/python-graph.js +867 -0
- package/dist/navigation/python-graph.js.map +1 -0
- package/dist/navigation/ts-call-edges.d.ts +193 -0
- package/dist/navigation/ts-call-edges.d.ts.map +1 -0
- package/dist/navigation/ts-call-edges.js +2089 -0
- package/dist/navigation/ts-call-edges.js.map +1 -0
- package/dist/navigation/ts-entry-tables.d.ts +88 -0
- package/dist/navigation/ts-entry-tables.d.ts.map +1 -0
- package/dist/navigation/ts-entry-tables.js +50 -0
- package/dist/navigation/ts-entry-tables.js.map +1 -0
- package/dist/path-set/branches.d.ts +52 -0
- package/dist/path-set/branches.d.ts.map +1 -0
- package/dist/path-set/branches.js +124 -0
- package/dist/path-set/branches.js.map +1 -0
- package/dist/path-set/finding-diff.d.ts +63 -0
- package/dist/path-set/finding-diff.d.ts.map +1 -0
- package/dist/path-set/finding-diff.js +150 -0
- package/dist/path-set/finding-diff.js.map +1 -0
- package/dist/path-set/index.d.ts +18 -0
- package/dist/path-set/index.d.ts.map +1 -0
- package/dist/path-set/index.js +12 -0
- package/dist/path-set/index.js.map +1 -0
- package/dist/path-set/line-diff.d.ts +19 -0
- package/dist/path-set/line-diff.d.ts.map +1 -0
- package/dist/path-set/line-diff.js +98 -0
- package/dist/path-set/line-diff.js.map +1 -0
- package/dist/path-set/path-set.d.ts +88 -0
- package/dist/path-set/path-set.d.ts.map +1 -0
- package/dist/path-set/path-set.js +716 -0
- package/dist/path-set/path-set.js.map +1 -0
- package/dist/path-set/templates.d.ts +42 -0
- package/dist/path-set/templates.d.ts.map +1 -0
- package/dist/path-set/templates.js +119 -0
- package/dist/path-set/templates.js.map +1 -0
- package/dist/path-set/types.d.ts +195 -0
- package/dist/path-set/types.d.ts.map +1 -0
- package/dist/path-set/types.js +8 -0
- package/dist/path-set/types.js.map +1 -0
- package/dist/remedy-class/index.d.ts +12 -0
- package/dist/remedy-class/index.d.ts.map +1 -0
- package/dist/remedy-class/index.js +9 -0
- package/dist/remedy-class/index.js.map +1 -0
- package/dist/remedy-class/match.d.ts +165 -0
- package/dist/remedy-class/match.d.ts.map +1 -0
- package/dist/remedy-class/match.js +705 -0
- package/dist/remedy-class/match.js.map +1 -0
- package/dist/remedy-class/output-context.d.ts +25 -0
- package/dist/remedy-class/output-context.d.ts.map +1 -0
- package/dist/remedy-class/output-context.js +150 -0
- package/dist/remedy-class/output-context.js.map +1 -0
- package/dist/remedy-class/sha256.d.ts +18 -0
- package/dist/remedy-class/sha256.d.ts.map +1 -0
- package/dist/remedy-class/sha256.js +89 -0
- package/dist/remedy-class/sha256.js.map +1 -0
- package/dist/remedy-class/table.d.ts +130 -0
- package/dist/remedy-class/table.d.ts.map +1 -0
- package/dist/remedy-class/table.js +457 -0
- package/dist/remedy-class/table.js.map +1 -0
- package/dist/resolution/cross-file.d.ts +18 -0
- package/dist/resolution/cross-file.d.ts.map +1 -1
- package/dist/resolution/cross-file.js +194 -5
- package/dist/resolution/cross-file.js.map +1 -1
- package/dist/stable-ids/builder.d.ts +20 -0
- package/dist/stable-ids/builder.d.ts.map +1 -0
- package/dist/stable-ids/builder.js +65 -0
- package/dist/stable-ids/builder.js.map +1 -0
- package/dist/stable-ids/diff.d.ts +18 -0
- package/dist/stable-ids/diff.d.ts.map +1 -0
- package/dist/stable-ids/diff.js +37 -0
- package/dist/stable-ids/diff.js.map +1 -0
- package/dist/stable-ids/go.d.ts +28 -0
- package/dist/stable-ids/go.d.ts.map +1 -0
- package/dist/stable-ids/go.js +160 -0
- package/dist/stable-ids/go.js.map +1 -0
- package/dist/stable-ids/hash.d.ts +22 -0
- package/dist/stable-ids/hash.d.ts.map +1 -0
- package/dist/stable-ids/hash.js +167 -0
- package/dist/stable-ids/hash.js.map +1 -0
- package/dist/stable-ids/index.d.ts +30 -0
- package/dist/stable-ids/index.d.ts.map +1 -0
- package/dist/stable-ids/index.js +59 -0
- package/dist/stable-ids/index.js.map +1 -0
- package/dist/stable-ids/java.d.ts +28 -0
- package/dist/stable-ids/java.d.ts.map +1 -0
- package/dist/stable-ids/java.js +224 -0
- package/dist/stable-ids/java.js.map +1 -0
- package/dist/stable-ids/moves.d.ts +87 -0
- package/dist/stable-ids/moves.d.ts.map +1 -0
- package/dist/stable-ids/moves.js +222 -0
- package/dist/stable-ids/moves.js.map +1 -0
- package/dist/stable-ids/nodes.d.ts +32 -0
- package/dist/stable-ids/nodes.d.ts.map +1 -0
- package/dist/stable-ids/nodes.js +92 -0
- package/dist/stable-ids/nodes.js.map +1 -0
- package/dist/stable-ids/normalize.d.ts +35 -0
- package/dist/stable-ids/normalize.d.ts.map +1 -0
- package/dist/stable-ids/normalize.js +174 -0
- package/dist/stable-ids/normalize.js.map +1 -0
- package/dist/stable-ids/parse-errors.d.ts +24 -0
- package/dist/stable-ids/parse-errors.d.ts.map +1 -0
- package/dist/stable-ids/parse-errors.js +46 -0
- package/dist/stable-ids/parse-errors.js.map +1 -0
- package/dist/stable-ids/python.d.ts +27 -0
- package/dist/stable-ids/python.d.ts.map +1 -0
- package/dist/stable-ids/python.js +212 -0
- package/dist/stable-ids/python.js.map +1 -0
- package/dist/stable-ids/ts-parse-errors.d.ts +27 -0
- package/dist/stable-ids/ts-parse-errors.d.ts.map +1 -0
- package/dist/stable-ids/ts-parse-errors.js +75 -0
- package/dist/stable-ids/ts-parse-errors.js.map +1 -0
- package/dist/stable-ids/types.d.ts +106 -0
- package/dist/stable-ids/types.d.ts.map +1 -0
- package/dist/stable-ids/types.js +16 -0
- package/dist/stable-ids/types.js.map +1 -0
- package/dist/stable-ids/typescript.d.ts +30 -0
- package/dist/stable-ids/typescript.d.ts.map +1 -0
- package/dist/stable-ids/typescript.js +362 -0
- package/dist/stable-ids/typescript.js.map +1 -0
- package/dist/types/config.d.ts +9 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.d.ts +53 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calls into one dependency and the tests that reach them
|
|
3
|
+
* (`dependency-calls@0.1`): for a dependency bump, every call site in the
|
|
4
|
+
* subject that lands on the library, and which test entry points reach the
|
|
5
|
+
* method that makes it.
|
|
6
|
+
*
|
|
7
|
+
* - **Calls**: `external` unresolved sites whose receiver type (the
|
|
8
|
+
* constructed type, or a static import's owner) is in one of the
|
|
9
|
+
* library's packages. The caller gives the packages, or a Maven
|
|
10
|
+
* `groupId:artifactId` (with the resolved jar's bytes, or a fallback
|
|
11
|
+
* table row): an artifact's packages are not readable from the subject's
|
|
12
|
+
* sources (`maven-packages.ts`).
|
|
13
|
+
* - **Tests**: each `test` entry is walked on its own over the reach core's
|
|
14
|
+
* graph. A test reaches a call **strongly** when its path to the calling
|
|
15
|
+
* method uses only strong edges, **weakly** otherwise.
|
|
16
|
+
* - **covered**: every call is reached strongly by at least one test, and no
|
|
17
|
+
* file is partial.
|
|
18
|
+
* - **unattributed**: `external` sites with no receiver type, or a bare
|
|
19
|
+
* simple name no import qualifies (other than `java.lang`). They could be
|
|
20
|
+
* calls into the library; a merge rule that relies on there being no other
|
|
21
|
+
* calls reads this count too.
|
|
22
|
+
*
|
|
23
|
+
* Experimental and opt-in; Java only for now (`java-graph@0.1` carries the
|
|
24
|
+
* receiver types).
|
|
25
|
+
*/
|
|
26
|
+
import type { UnresolvedCall } from '../navigation/ts-call-edges.js';
|
|
27
|
+
import { type MavenPackageSource } from './maven-packages.js';
|
|
28
|
+
import { type PartialFile, type ReachInput, type ReachSite } from './reach.js';
|
|
29
|
+
export declare const DEPENDENCY_CALLS_SCHEME: 'dependency-calls@0.1';
|
|
30
|
+
export type DependencyCallsOptions = {
|
|
31
|
+
/** The library's packages, e.g. `com.fasterxml.jackson`; a package covers its subpackages. */
|
|
32
|
+
packages: readonly string[];
|
|
33
|
+
} | {
|
|
34
|
+
/** Maven `groupId:artifactId` (a version, if given, is ignored). */
|
|
35
|
+
artifact: string;
|
|
36
|
+
/** The resolved jar's bytes; without it the fallback table decides. Throws `UnknownArtifact` if neither does. */
|
|
37
|
+
jar?: Uint8Array;
|
|
38
|
+
};
|
|
39
|
+
export interface DependencyCallTest {
|
|
40
|
+
/** The test entry's declaration id. */
|
|
41
|
+
id: string;
|
|
42
|
+
file: string;
|
|
43
|
+
line: number;
|
|
44
|
+
class: 'strong' | 'weak';
|
|
45
|
+
}
|
|
46
|
+
export interface DependencyCall {
|
|
47
|
+
/** The calling declaration's id. */
|
|
48
|
+
from: string;
|
|
49
|
+
site: ReachSite;
|
|
50
|
+
methodName: string;
|
|
51
|
+
/** The library type the call lands on. */
|
|
52
|
+
receiver: string;
|
|
53
|
+
/** Tests reaching `from`, strong first, then by file and line. */
|
|
54
|
+
tests: DependencyCallTest[];
|
|
55
|
+
}
|
|
56
|
+
export interface DependencyUnattributedSite {
|
|
57
|
+
from: string;
|
|
58
|
+
site: ReachSite;
|
|
59
|
+
methodName: string;
|
|
60
|
+
/** The unqualified receiver type, when the graph has one. */
|
|
61
|
+
receiver?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface DependencyCallsResult {
|
|
64
|
+
scheme: typeof DEPENDENCY_CALLS_SCHEME;
|
|
65
|
+
ids: 'ids@0.1';
|
|
66
|
+
/** `groupId:artifactId` when the options named one. */
|
|
67
|
+
artifact?: string;
|
|
68
|
+
packages: string[];
|
|
69
|
+
/** Where `packages` came from: the caller, the jar or the fallback table. */
|
|
70
|
+
packageSource: 'given' | MavenPackageSource;
|
|
71
|
+
calls: DependencyCall[];
|
|
72
|
+
/** Calls with no strong test path. */
|
|
73
|
+
uncovered: number;
|
|
74
|
+
/** Every call reached strongly by a test, and no partial file. */
|
|
75
|
+
covered: boolean;
|
|
76
|
+
/** `external` sites the library cannot be ruled in or out for: no receiver type, or an unqualified one. */
|
|
77
|
+
unattributed: number;
|
|
78
|
+
/** Those sites, by file, line and column (`unattributed` is their count). */
|
|
79
|
+
unattributedSites: DependencyUnattributedSite[];
|
|
80
|
+
partial: string[];
|
|
81
|
+
partialFiles: PartialFile[];
|
|
82
|
+
}
|
|
83
|
+
export declare function dependencyCalls(input: Omit<ReachInput, 'unresolved'> & {
|
|
84
|
+
unresolved: readonly UnresolvedCall[];
|
|
85
|
+
}, options: DependencyCallsOptions): DependencyCallsResult;
|
|
86
|
+
//# sourceMappingURL=dependency-calls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-calls.d.ts","sourceRoot":"","sources":["../../src/graph-facts/dependency-calls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAiB,KAAK,kBAAkB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,EAAE,CAAC;IACxB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,2GAA2G;IAC3G,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,iBAAiB,EAAE,0BAA0B,EAAE,CAAC;IAChD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAYD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG;IAAE,UAAU,EAAE,SAAS,cAAc,EAAE,CAAA;CAAE,EACjF,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CAyDvB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calls into one dependency and the tests that reach them
|
|
3
|
+
* (`dependency-calls@0.1`): for a dependency bump, every call site in the
|
|
4
|
+
* subject that lands on the library, and which test entry points reach the
|
|
5
|
+
* method that makes it.
|
|
6
|
+
*
|
|
7
|
+
* - **Calls**: `external` unresolved sites whose receiver type (the
|
|
8
|
+
* constructed type, or a static import's owner) is in one of the
|
|
9
|
+
* library's packages. The caller gives the packages, or a Maven
|
|
10
|
+
* `groupId:artifactId` (with the resolved jar's bytes, or a fallback
|
|
11
|
+
* table row): an artifact's packages are not readable from the subject's
|
|
12
|
+
* sources (`maven-packages.ts`).
|
|
13
|
+
* - **Tests**: each `test` entry is walked on its own over the reach core's
|
|
14
|
+
* graph. A test reaches a call **strongly** when its path to the calling
|
|
15
|
+
* method uses only strong edges, **weakly** otherwise.
|
|
16
|
+
* - **covered**: every call is reached strongly by at least one test, and no
|
|
17
|
+
* file is partial.
|
|
18
|
+
* - **unattributed**: `external` sites with no receiver type, or a bare
|
|
19
|
+
* simple name no import qualifies (other than `java.lang`). They could be
|
|
20
|
+
* calls into the library; a merge rule that relies on there being no other
|
|
21
|
+
* calls reads this count too.
|
|
22
|
+
*
|
|
23
|
+
* Experimental and opt-in; Java only for now (`java-graph@0.1` carries the
|
|
24
|
+
* receiver types).
|
|
25
|
+
*/
|
|
26
|
+
import { mavenPackages } from './maven-packages.js';
|
|
27
|
+
import { ReachGraph, partialFileDetails, walkFrom } from './reach.js';
|
|
28
|
+
export const DEPENDENCY_CALLS_SCHEME = 'dependency-calls@0.1';
|
|
29
|
+
/** `java.lang` types, which need no import. */
|
|
30
|
+
const JAVA_LANG = new Set([
|
|
31
|
+
'Object', 'String', 'StringBuilder', 'StringBuffer', 'Math', 'System', 'Thread', 'Class', 'Runtime', 'Character',
|
|
32
|
+
'Integer', 'Long', 'Short', 'Byte', 'Double', 'Float', 'Boolean', 'Number', 'Enum', 'Iterable', 'CharSequence',
|
|
33
|
+
'Throwable', 'Exception', 'RuntimeException', 'Error', 'ProcessBuilder', 'ThreadLocal', 'ClassLoader', 'Record',
|
|
34
|
+
]);
|
|
35
|
+
const inPackages = (fqn, packages) => packages.some(p => fqn === p || fqn.startsWith(`${p}.`));
|
|
36
|
+
export function dependencyCalls(input, options) {
|
|
37
|
+
const resolved = 'artifact' in options ? mavenPackages(options.artifact, { jar: options.jar }) : null;
|
|
38
|
+
const given = 'artifact' in options ? [] : options.packages;
|
|
39
|
+
const packages = [...new Set(resolved ? resolved.packages : given)].sort();
|
|
40
|
+
const external = input.unresolved.filter(u => u.reason === 'external');
|
|
41
|
+
const hits = external.filter(u => u.receiver !== undefined && inPackages(u.receiver, packages));
|
|
42
|
+
const unattributedSites = external
|
|
43
|
+
.filter(u => u.receiver === undefined || (!u.receiver.includes('.') && !JAVA_LANG.has(u.receiver)))
|
|
44
|
+
.map(u => ({
|
|
45
|
+
from: u.from,
|
|
46
|
+
site: { file: u.site.file, line: u.site.line, col: u.site.col },
|
|
47
|
+
methodName: u.methodName,
|
|
48
|
+
...(u.receiver !== undefined ? { receiver: u.receiver } : {}),
|
|
49
|
+
}))
|
|
50
|
+
.sort((a, b) => (a.site.file < b.site.file ? -1 : a.site.file > b.site.file ? 1 : a.site.line - b.site.line || a.site.col - b.site.col));
|
|
51
|
+
const g = new ReachGraph(input);
|
|
52
|
+
const tests = input.entries
|
|
53
|
+
.filter(e => e.kind === 'test')
|
|
54
|
+
.sort((a, b) => (a.file < b.file ? -1 : a.file > b.file ? 1 : a.line - b.line || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)));
|
|
55
|
+
const callers = new Set(hits.map(h => h.from));
|
|
56
|
+
const reachedBy = new Map();
|
|
57
|
+
for (const t of tests) {
|
|
58
|
+
const visits = walkFrom(g, [{ id: t.id, weak: t.certainty === 'inferred' }]);
|
|
59
|
+
for (const from of callers) {
|
|
60
|
+
const cls = visits.has(`0${from}`) ? 'strong' : visits.has(`1${from}`) ? 'weak' : null;
|
|
61
|
+
if (!cls)
|
|
62
|
+
continue;
|
|
63
|
+
const list = reachedBy.get(from) ?? [];
|
|
64
|
+
list.push({ id: t.id, file: t.file, line: t.line, class: cls });
|
|
65
|
+
reachedBy.set(from, list);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const calls = hits
|
|
69
|
+
.map(h => ({
|
|
70
|
+
from: h.from,
|
|
71
|
+
site: { file: h.site.file, line: h.site.line, col: h.site.col },
|
|
72
|
+
methodName: h.methodName,
|
|
73
|
+
receiver: h.receiver,
|
|
74
|
+
tests: [...(reachedBy.get(h.from) ?? [])].sort((a, b) => (a.class === b.class ? 0 : a.class === 'strong' ? -1 : 1)),
|
|
75
|
+
}))
|
|
76
|
+
.sort((a, b) => (a.site.file < b.site.file ? -1 : a.site.file > b.site.file ? 1 : a.site.line - b.site.line || a.site.col - b.site.col));
|
|
77
|
+
const uncovered = calls.filter(c => !c.tests.some(t => t.class === 'strong')).length;
|
|
78
|
+
return {
|
|
79
|
+
scheme: DEPENDENCY_CALLS_SCHEME,
|
|
80
|
+
ids: 'ids@0.1',
|
|
81
|
+
...(resolved ? { artifact: resolved.artifact } : {}),
|
|
82
|
+
packages,
|
|
83
|
+
packageSource: resolved ? resolved.source : 'given',
|
|
84
|
+
calls,
|
|
85
|
+
uncovered,
|
|
86
|
+
covered: uncovered === 0 && input.partial.length === 0,
|
|
87
|
+
unattributed: unattributedSites.length,
|
|
88
|
+
unattributedSites,
|
|
89
|
+
partial: [...input.partial],
|
|
90
|
+
partialFiles: partialFileDetails(input.partial, input.files),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=dependency-calls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-calls.js","sourceRoot":"","sources":["../../src/graph-facts/dependency-calls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,aAAa,EAA2B,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAqD,MAAM,YAAY,CAAC;AAEzH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAA+B,CAAC;AA8DvE,+CAA+C;AAC/C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW;IAChH,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc;IAC9G,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ;CAChH,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,QAA2B,EAAW,EAAE,CACvE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,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,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACrF,OAAO;QACL,MAAM,EAAE,uBAAuB;QAC/B,GAAG,EAAE,SAAS;QACd,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,QAAQ;QACR,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;QACnD,KAAK;QACL,SAAS;QACT,OAAO,EAAE,SAAS,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;QACtD,YAAY,EAAE,iBAAiB,CAAC,MAAM;QACtC,iBAAiB;QACjB,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;QAC3B,YAAY,EAAE,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC;KAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph facts over stable ids: the reach core and the answers built on it.
|
|
3
|
+
* Experimental and opt-in; `analyze()` does not call them.
|
|
4
|
+
*/
|
|
5
|
+
export { REACH_SCHEME, ALL_ENTRY_KINDS, ReachGraph, reach, walkFrom, reachedIds, couldReach, COMPUTED_LOAD, type ReachInput, type ReachSite, type ReachOptions, type ReachResult, type ReachFact, type ReachPath, type PathStep, type EdgeRelation, type CouldReachSite, type PartialFile, partialFileDetails, } from './reach.js';
|
|
6
|
+
export { DEAD_CODE_SCHEME, deadCode, type DeadCodeVerdict, type MayBeLiveReason, type DeadCodeFact, type DeadCodeOptions, type DeadCodeResult, } from './dead-code.js';
|
|
7
|
+
export { REMOVAL_REACH_SCHEME, removalReach, entryIndexDigest, type RemovedDeclaration, type MoveCandidateRef, type RemovalReachOptions, type RemovalReachResult, } from './removal-reach.js';
|
|
8
|
+
export { DEPENDENCY_CALLS_SCHEME, dependencyCalls, type DependencyCallsOptions, type DependencyCall, type DependencyCallTest, type DependencyCallsResult, type DependencyUnattributedSite, } from './dependency-calls.js';
|
|
9
|
+
export { MAVEN_PACKAGE_FALLBACK, UnknownArtifact, jarPackages, mavenArtifact, mavenPackages, zipEntryNames, type MavenPackages, type MavenPackageSource, } from './maven-packages.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graph-facts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,YAAY,EACZ,eAAe,EACf,UAAU,EACV,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph facts over stable ids: the reach core and the answers built on it.
|
|
3
|
+
* Experimental and opt-in; `analyze()` does not call them.
|
|
4
|
+
*/
|
|
5
|
+
export { REACH_SCHEME, ALL_ENTRY_KINDS, ReachGraph, reach, walkFrom, reachedIds, couldReach, COMPUTED_LOAD, partialFileDetails, } from './reach.js';
|
|
6
|
+
export { DEAD_CODE_SCHEME, deadCode, } from './dead-code.js';
|
|
7
|
+
export { REMOVAL_REACH_SCHEME, removalReach, entryIndexDigest, } from './removal-reach.js';
|
|
8
|
+
export { DEPENDENCY_CALLS_SCHEME, dependencyCalls, } from './dependency-calls.js';
|
|
9
|
+
export { MAVEN_PACKAGE_FALLBACK, UnknownArtifact, jarPackages, mavenArtifact, mavenPackages, zipEntryNames, } from './maven-packages.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graph-facts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,YAAY,EACZ,eAAe,EACf,UAAU,EACV,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EAWb,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,GAMT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,GAKjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,eAAe,GAMhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,GAGd,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maven coordinates → Java packages, for `dependencyCalls` (E02).
|
|
3
|
+
*
|
|
4
|
+
* - **From the jar**: the package directories of the resolved artifact's
|
|
5
|
+
* `.class` entries, read from the zip's central directory only (no entry
|
|
6
|
+
* is inflated). Multi-release classes (`META-INF/versions/<n>/…`) count
|
|
7
|
+
* under their own package; other `META-INF/` entries, `module-info` and
|
|
8
|
+
* classes in the default package do not.
|
|
9
|
+
* - **From the table**: a small fallback for the demo dependencies, used
|
|
10
|
+
* only when no jar is given.
|
|
11
|
+
*
|
|
12
|
+
* Pure: the caller reads the jar's bytes (the library reads no files).
|
|
13
|
+
*/
|
|
14
|
+
export type MavenPackageSource = 'jar' | 'table';
|
|
15
|
+
export interface MavenPackages {
|
|
16
|
+
/** `groupId:artifactId`, as given without a version. */
|
|
17
|
+
artifact: string;
|
|
18
|
+
/** Sorted, distinct package names. */
|
|
19
|
+
packages: string[];
|
|
20
|
+
source: MavenPackageSource;
|
|
21
|
+
}
|
|
22
|
+
/** The artifact has no jar and no fallback row, or its jar holds no classes. */
|
|
23
|
+
export declare class UnknownArtifact extends Error {
|
|
24
|
+
readonly artifact: string;
|
|
25
|
+
constructor(artifact: string, reason: string);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Package prefixes for the demo dependencies, `groupId:artifactId` → the
|
|
29
|
+
* packages the artifact defines (a package covers its subpackages).
|
|
30
|
+
*/
|
|
31
|
+
export declare const MAVEN_PACKAGE_FALLBACK: Readonly<Record<string, readonly string[]>>;
|
|
32
|
+
/** `groupId:artifactId[:…]` → `groupId:artifactId`; throws on anything else. */
|
|
33
|
+
export declare function mavenArtifact(coordinate: string): string;
|
|
34
|
+
/** The packages for `coordinate`: from `jar` when given, else the fallback table. */
|
|
35
|
+
export declare function mavenPackages(coordinate: string, options?: {
|
|
36
|
+
jar?: Uint8Array;
|
|
37
|
+
}): MavenPackages;
|
|
38
|
+
/** The package names of a jar's `.class` entries, sorted and distinct. */
|
|
39
|
+
export declare function jarPackages(jar: Uint8Array): string[];
|
|
40
|
+
/** Entry names from the zip's central directory; throws when it is not a zip. */
|
|
41
|
+
export declare function zipEntryNames(zip: Uint8Array): string[];
|
|
42
|
+
//# sourceMappingURL=maven-packages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maven-packages.d.ts","sourceRoot":"","sources":["../../src/graph-facts/maven-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,gFAAgF;AAChF,qBAAa,eAAgB,SAAQ,KAAK;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAArC,YAAqB,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAGpD;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAU9E,CAAC;AAEF,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,UAAU,CAAA;CAAO,GAAG,aAAa,CAUnG;AASD,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,EAAE,CAOrD;AAcD,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,EAAE,CA2BvD"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maven coordinates → Java packages, for `dependencyCalls` (E02).
|
|
3
|
+
*
|
|
4
|
+
* - **From the jar**: the package directories of the resolved artifact's
|
|
5
|
+
* `.class` entries, read from the zip's central directory only (no entry
|
|
6
|
+
* is inflated). Multi-release classes (`META-INF/versions/<n>/…`) count
|
|
7
|
+
* under their own package; other `META-INF/` entries, `module-info` and
|
|
8
|
+
* classes in the default package do not.
|
|
9
|
+
* - **From the table**: a small fallback for the demo dependencies, used
|
|
10
|
+
* only when no jar is given.
|
|
11
|
+
*
|
|
12
|
+
* Pure: the caller reads the jar's bytes (the library reads no files).
|
|
13
|
+
*/
|
|
14
|
+
/** The artifact has no jar and no fallback row, or its jar holds no classes. */
|
|
15
|
+
export class UnknownArtifact extends Error {
|
|
16
|
+
artifact;
|
|
17
|
+
constructor(artifact, reason) {
|
|
18
|
+
super(`${artifact}: ${reason}`);
|
|
19
|
+
this.artifact = artifact;
|
|
20
|
+
this.name = 'UnknownArtifact';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Package prefixes for the demo dependencies, `groupId:artifactId` → the
|
|
25
|
+
* packages the artifact defines (a package covers its subpackages).
|
|
26
|
+
*/
|
|
27
|
+
export const MAVEN_PACKAGE_FALLBACK = {
|
|
28
|
+
'org.apache.logging.log4j:log4j-core': ['org.apache.logging.log4j.core'],
|
|
29
|
+
'com.fasterxml.jackson.core:jackson-databind': ['com.fasterxml.jackson.databind'],
|
|
30
|
+
'com.fasterxml.jackson.core:jackson-core': ['com.fasterxml.jackson.core'],
|
|
31
|
+
'org.yaml:snakeyaml': ['org.yaml.snakeyaml'],
|
|
32
|
+
'org.apache.commons:commons-text': ['org.apache.commons.text'],
|
|
33
|
+
'org.codehaus.plexus:plexus-utils': ['org.codehaus.plexus.util'],
|
|
34
|
+
'com.thoughtworks.xstream:xstream': ['com.thoughtworks.xstream'],
|
|
35
|
+
'commons-collections:commons-collections': ['org.apache.commons.collections'],
|
|
36
|
+
'org.apache.commons:commons-collections4': ['org.apache.commons.collections4'],
|
|
37
|
+
};
|
|
38
|
+
/** `groupId:artifactId[:…]` → `groupId:artifactId`; throws on anything else. */
|
|
39
|
+
export function mavenArtifact(coordinate) {
|
|
40
|
+
const parts = coordinate.trim().split(':');
|
|
41
|
+
if (parts.length < 2 || !parts[0] || !parts[1]) {
|
|
42
|
+
throw new UnknownArtifact(coordinate, 'expected groupId:artifactId');
|
|
43
|
+
}
|
|
44
|
+
return `${parts[0]}:${parts[1]}`;
|
|
45
|
+
}
|
|
46
|
+
/** The packages for `coordinate`: from `jar` when given, else the fallback table. */
|
|
47
|
+
export function mavenPackages(coordinate, options = {}) {
|
|
48
|
+
const artifact = mavenArtifact(coordinate);
|
|
49
|
+
if (options.jar) {
|
|
50
|
+
const packages = jarPackages(options.jar);
|
|
51
|
+
if (packages.length === 0)
|
|
52
|
+
throw new UnknownArtifact(artifact, 'the jar holds no classes in a named package');
|
|
53
|
+
return { artifact, packages, source: 'jar' };
|
|
54
|
+
}
|
|
55
|
+
const row = MAVEN_PACKAGE_FALLBACK[artifact];
|
|
56
|
+
if (!row)
|
|
57
|
+
throw new UnknownArtifact(artifact, 'no jar given and no fallback row');
|
|
58
|
+
return { artifact, packages: [...row].sort(), source: 'table' };
|
|
59
|
+
}
|
|
60
|
+
// ─── Zip central directory ───────────────────────────────────────────────────
|
|
61
|
+
const EOCD = 0x06054b50;
|
|
62
|
+
const ZIP64_LOCATOR = 0x07064b50;
|
|
63
|
+
const ZIP64_EOCD = 0x06064b50;
|
|
64
|
+
const CENTRAL = 0x02014b50;
|
|
65
|
+
/** The package names of a jar's `.class` entries, sorted and distinct. */
|
|
66
|
+
export function jarPackages(jar) {
|
|
67
|
+
const out = new Set();
|
|
68
|
+
for (const name of zipEntryNames(jar)) {
|
|
69
|
+
const pkg = classPackage(name);
|
|
70
|
+
if (pkg)
|
|
71
|
+
out.add(pkg);
|
|
72
|
+
}
|
|
73
|
+
return [...out].sort();
|
|
74
|
+
}
|
|
75
|
+
function classPackage(entry) {
|
|
76
|
+
let name = entry;
|
|
77
|
+
const mr = /^META-INF\/versions\/\d+\//.exec(name);
|
|
78
|
+
if (mr)
|
|
79
|
+
name = name.slice(mr[0].length);
|
|
80
|
+
else if (name.startsWith('META-INF/'))
|
|
81
|
+
return null;
|
|
82
|
+
if (!name.endsWith('.class'))
|
|
83
|
+
return null;
|
|
84
|
+
const slash = name.lastIndexOf('/');
|
|
85
|
+
if (slash <= 0)
|
|
86
|
+
return null;
|
|
87
|
+
if (name.slice(slash + 1) === 'module-info.class')
|
|
88
|
+
return null;
|
|
89
|
+
return name.slice(0, slash).replace(/\//g, '.');
|
|
90
|
+
}
|
|
91
|
+
/** Entry names from the zip's central directory; throws when it is not a zip. */
|
|
92
|
+
export function zipEntryNames(zip) {
|
|
93
|
+
const view = new DataView(zip.buffer, zip.byteOffset, zip.byteLength);
|
|
94
|
+
const eocd = findEocd(view);
|
|
95
|
+
if (eocd < 0)
|
|
96
|
+
throw new Error('not a zip: no end of central directory record');
|
|
97
|
+
let count = view.getUint16(eocd + 10, true);
|
|
98
|
+
let offset = view.getUint32(eocd + 16, true);
|
|
99
|
+
if (count === 0xffff || offset === 0xffffffff) {
|
|
100
|
+
const loc = eocd - 20;
|
|
101
|
+
if (loc < 0 || view.getUint32(loc, true) !== ZIP64_LOCATOR)
|
|
102
|
+
throw new Error('zip64 locator missing');
|
|
103
|
+
const z64 = Number(view.getBigUint64(loc + 8, true));
|
|
104
|
+
if (z64 + 56 > zip.byteLength || view.getUint32(z64, true) !== ZIP64_EOCD)
|
|
105
|
+
throw new Error('zip64 record missing');
|
|
106
|
+
count = Number(view.getBigUint64(z64 + 32, true));
|
|
107
|
+
offset = Number(view.getBigUint64(z64 + 48, true));
|
|
108
|
+
}
|
|
109
|
+
const decoder = new TextDecoder();
|
|
110
|
+
const names = [];
|
|
111
|
+
let p = offset;
|
|
112
|
+
for (let i = 0; i < count; i++) {
|
|
113
|
+
if (p + 46 > zip.byteLength || view.getUint32(p, true) !== CENTRAL)
|
|
114
|
+
throw new Error('corrupt central directory');
|
|
115
|
+
const nameLen = view.getUint16(p + 28, true);
|
|
116
|
+
const extraLen = view.getUint16(p + 30, true);
|
|
117
|
+
const commentLen = view.getUint16(p + 32, true);
|
|
118
|
+
if (p + 46 + nameLen > zip.byteLength)
|
|
119
|
+
throw new Error('corrupt central directory');
|
|
120
|
+
names.push(decoder.decode(zip.subarray(p + 46, p + 46 + nameLen)));
|
|
121
|
+
p += 46 + nameLen + extraLen + commentLen;
|
|
122
|
+
}
|
|
123
|
+
return names;
|
|
124
|
+
}
|
|
125
|
+
function findEocd(view) {
|
|
126
|
+
const min = Math.max(0, view.byteLength - 22 - 0xffff);
|
|
127
|
+
for (let p = view.byteLength - 22; p >= min; p--) {
|
|
128
|
+
if (view.getUint32(p, true) === EOCD)
|
|
129
|
+
return p;
|
|
130
|
+
}
|
|
131
|
+
return -1;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=maven-packages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maven-packages.js","sourceRoot":"","sources":["../../src/graph-facts/maven-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,gFAAgF;AAChF,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACnB,QAAQ;IAA7B,YAAqB,QAAgB,EAAE,MAAc;QACnD,KAAK,CAAC,GAAG,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;wBADb,QAAQ;QAE3B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgD;IACjF,qCAAqC,EAAE,CAAC,+BA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AG,OAAO,CAAC,CAAC,CAAC,CAAC;QACnE,CAAC,IAAI,EAAE,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,IAAc;IAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;IACvD,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,IAAI;YAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reach core (`reach@0.1`): from a set of entry points to every
|
|
3
|
+
* declaration, one path per class and the unresolved sites that could add
|
|
4
|
+
* more.
|
|
5
|
+
*
|
|
6
|
+
* - **strong** path: from a `declared` or `conventional` entry over strong
|
|
7
|
+
* edges only — `exact` and `polymorphic` calls, and the structural edges
|
|
8
|
+
* that hold whenever their source runs (`contains`: a body creates its
|
|
9
|
+
* nested functions, a module its top-level values, a class its fields and
|
|
10
|
+
* constructor; `loads`: running a declaration loads its module; `import`:
|
|
11
|
+
* loading a module loads what it imports; `field`: a body that runs uses
|
|
12
|
+
* the fields it reads or writes through `this`; `loads` also covers a
|
|
13
|
+
* body that loads a module with `import()` or `require()`).
|
|
14
|
+
* - **weak** path: any other path — through an `inferred` call, a
|
|
15
|
+
* `reference` (a function or class passed, stored, returned or rendered:
|
|
16
|
+
* it may run, nothing proves it does) or an `inferred` entry.
|
|
17
|
+
* - **unresolved**: call sites in reached bodies that the call graph could
|
|
18
|
+
* not bind and that could bind to the declaration — same method name, or a
|
|
19
|
+
* computed callee — plus registrations whose handler was not resolved.
|
|
20
|
+
* A module is reached this way only by a module load with a computed
|
|
21
|
+
* specifier (`import(name)`, methodName `<module>`).
|
|
22
|
+
*
|
|
23
|
+
* Each path is the shortest of its class (breadth-first, deterministic:
|
|
24
|
+
* adjacency in id order). `partial[]` lists files that did not parse; their
|
|
25
|
+
* call sites are missing, so any answer that relies on absence is not final.
|
|
26
|
+
*/
|
|
27
|
+
import type { ParseErrorSite, StableDecl, StableIdFile } from '../stable-ids/types.js';
|
|
28
|
+
import type { Tier, UnresolvedReason } from '../navigation/types.js';
|
|
29
|
+
import type { EntryCertainty, EntryKind } from '../navigation/ts-entry-tables.js';
|
|
30
|
+
export declare const REACH_SCHEME: 'reach@0.1';
|
|
31
|
+
export interface ReachSite {
|
|
32
|
+
file: string;
|
|
33
|
+
line: number;
|
|
34
|
+
col: number;
|
|
35
|
+
}
|
|
36
|
+
/** The facts the reach core reads. `TsCallGraph` satisfies it. */
|
|
37
|
+
export interface ReachInput {
|
|
38
|
+
files: readonly StableIdFile[];
|
|
39
|
+
edges: readonly {
|
|
40
|
+
from: string;
|
|
41
|
+
to: string;
|
|
42
|
+
tier: Tier;
|
|
43
|
+
site: ReachSite;
|
|
44
|
+
methodName: string;
|
|
45
|
+
}[];
|
|
46
|
+
references?: readonly {
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
site: ReachSite;
|
|
50
|
+
}[];
|
|
51
|
+
/** Strong: a body that runs uses the field (`this.x`). */
|
|
52
|
+
fieldUses?: readonly {
|
|
53
|
+
from: string;
|
|
54
|
+
to: string;
|
|
55
|
+
site: ReachSite;
|
|
56
|
+
}[];
|
|
57
|
+
imports?: readonly {
|
|
58
|
+
from: string;
|
|
59
|
+
to: string;
|
|
60
|
+
}[];
|
|
61
|
+
/**
|
|
62
|
+
* Extra strong `loads` edges: running `from` initializes `to` (Java: a
|
|
63
|
+
* member initializes its class; TypeScript: a body loads a module with
|
|
64
|
+
* `import()` / `require()`).
|
|
65
|
+
*/
|
|
66
|
+
loads?: readonly {
|
|
67
|
+
from: string;
|
|
68
|
+
to: string;
|
|
69
|
+
site?: ReachSite;
|
|
70
|
+
}[];
|
|
71
|
+
unresolved: readonly {
|
|
72
|
+
from: string;
|
|
73
|
+
methodName: string;
|
|
74
|
+
site: ReachSite;
|
|
75
|
+
reason: UnresolvedReason;
|
|
76
|
+
}[];
|
|
77
|
+
entries: readonly {
|
|
78
|
+
id: string;
|
|
79
|
+
kind: EntryKind;
|
|
80
|
+
certainty: EntryCertainty;
|
|
81
|
+
method?: string;
|
|
82
|
+
path?: string;
|
|
83
|
+
file: string;
|
|
84
|
+
line: number;
|
|
85
|
+
}[];
|
|
86
|
+
unresolvedRegistrations?: readonly {
|
|
87
|
+
site: ReachSite;
|
|
88
|
+
reason: string;
|
|
89
|
+
evidence: string;
|
|
90
|
+
}[];
|
|
91
|
+
partial: readonly string[];
|
|
92
|
+
}
|
|
93
|
+
export type EdgeRelation = 'call' | 'reference' | 'field' | 'contains' | 'loads' | 'import';
|
|
94
|
+
export interface PathStep {
|
|
95
|
+
/** The declaration this step arrives at. */
|
|
96
|
+
decl: string;
|
|
97
|
+
/** How it was reached from the previous step; `entry` for the first. */
|
|
98
|
+
via: 'entry' | EdgeRelation;
|
|
99
|
+
/** Calls: the edge's tier. */
|
|
100
|
+
tier?: Tier;
|
|
101
|
+
site?: ReachSite;
|
|
102
|
+
}
|
|
103
|
+
export interface ReachPath {
|
|
104
|
+
class: 'strong' | 'weak';
|
|
105
|
+
entry: {
|
|
106
|
+
id: string;
|
|
107
|
+
kind: EntryKind;
|
|
108
|
+
certainty: EntryCertainty;
|
|
109
|
+
method?: string;
|
|
110
|
+
path?: string;
|
|
111
|
+
};
|
|
112
|
+
steps: PathStep[];
|
|
113
|
+
}
|
|
114
|
+
export interface CouldReachSite {
|
|
115
|
+
kind: 'call' | 'registration';
|
|
116
|
+
from?: string;
|
|
117
|
+
methodName?: string;
|
|
118
|
+
reason: string;
|
|
119
|
+
site: ReachSite;
|
|
120
|
+
}
|
|
121
|
+
export interface ReachFact {
|
|
122
|
+
id: string;
|
|
123
|
+
qualified_name: string;
|
|
124
|
+
kind: StableDecl['kind'];
|
|
125
|
+
file: string;
|
|
126
|
+
strong: ReachPath | null;
|
|
127
|
+
weak: ReachPath | null;
|
|
128
|
+
/** Up to `maxUnresolved` sites, in site order. */
|
|
129
|
+
unresolved: CouldReachSite[];
|
|
130
|
+
unresolvedCount: number;
|
|
131
|
+
}
|
|
132
|
+
export interface ReachOptions {
|
|
133
|
+
/** Entry kinds used as roots. Default: every kind except `test`. */
|
|
134
|
+
rootKinds?: readonly EntryKind[];
|
|
135
|
+
/** Declaration ids to answer for. Default: every declaration. */
|
|
136
|
+
targets?: readonly string[];
|
|
137
|
+
/** Most unresolved sites listed per declaration. Default 5. */
|
|
138
|
+
maxUnresolved?: number;
|
|
139
|
+
}
|
|
140
|
+
export interface ReachResult {
|
|
141
|
+
scheme: typeof REACH_SCHEME;
|
|
142
|
+
ids: 'ids@0.1';
|
|
143
|
+
rootKinds: EntryKind[];
|
|
144
|
+
partial: string[];
|
|
145
|
+
/** One row per `partial` file: where its first blocking parse error is. */
|
|
146
|
+
partialFiles: PartialFile[];
|
|
147
|
+
facts: ReachFact[];
|
|
148
|
+
}
|
|
149
|
+
/** A file in `partial[]` and the first error that made it partial. */
|
|
150
|
+
export interface PartialFile extends Partial<ParseErrorSite> {
|
|
151
|
+
file: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* `partial` paths with their first blocking parse error, read from the
|
|
155
|
+
* files' `parseError`, sorted by path. A path with no error recorded (an
|
|
156
|
+
* older `StableIdFile`) keeps only `file`.
|
|
157
|
+
*/
|
|
158
|
+
export declare function partialFileDetails(partial: readonly string[], files: readonly StableIdFile[]): PartialFile[];
|
|
159
|
+
export declare const ALL_ENTRY_KINDS: readonly EntryKind[];
|
|
160
|
+
interface Edge {
|
|
161
|
+
to: string;
|
|
162
|
+
relation: EdgeRelation;
|
|
163
|
+
strong: boolean;
|
|
164
|
+
tier?: Tier;
|
|
165
|
+
site?: ReachSite;
|
|
166
|
+
}
|
|
167
|
+
/** The adjacency the walk uses: call graph edges plus the structural ones. */
|
|
168
|
+
export declare class ReachGraph {
|
|
169
|
+
readonly input: ReachInput;
|
|
170
|
+
readonly decls: Map<string, {
|
|
171
|
+
decl: StableDecl;
|
|
172
|
+
file: string;
|
|
173
|
+
}>;
|
|
174
|
+
private readonly out;
|
|
175
|
+
constructor(input: ReachInput);
|
|
176
|
+
edgesFrom(id: string): readonly Edge[];
|
|
177
|
+
}
|
|
178
|
+
interface Visit {
|
|
179
|
+
prev: string | null;
|
|
180
|
+
edge: Edge | null;
|
|
181
|
+
root: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Breadth-first over (declaration, weak-so-far) states from the given roots.
|
|
185
|
+
* A state's first visit is its shortest path.
|
|
186
|
+
*/
|
|
187
|
+
export declare function walkFrom(g: ReachGraph, roots: readonly {
|
|
188
|
+
id: string;
|
|
189
|
+
weak: boolean;
|
|
190
|
+
}[]): Map<string, Visit>;
|
|
191
|
+
/** Declarations reached in any class from `visits`. */
|
|
192
|
+
export declare function reachedIds(visits: Map<string, Visit>): Set<string>;
|
|
193
|
+
/** `methodName` of an unresolved site that loads a module by a computed specifier. */
|
|
194
|
+
export declare const COMPUTED_LOAD = "<module>";
|
|
195
|
+
/**
|
|
196
|
+
* Unresolved sites in reached bodies that could bind to `d`: a non-external
|
|
197
|
+
* site with `d`'s name, a computed callee, or an unresolved registration.
|
|
198
|
+
* For a module: a module load with a computed specifier.
|
|
199
|
+
*/
|
|
200
|
+
export declare function couldReach(input: ReachInput, reached: ReadonlySet<string>, d: StableDecl): CouldReachSite[];
|
|
201
|
+
export declare function reach(input: ReachInput, options?: ReachOptions): ReachResult;
|
|
202
|
+
export {};
|
|
203
|
+
//# sourceMappingURL=reach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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