circle-ir-ai 4.31.0 → 4.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -1
- package/README.md +3 -3
- package/dist/agents/mastra/swarm.d.ts.map +1 -1
- package/dist/agents/mastra/swarm.js +9 -3
- package/dist/agents/mastra/swarm.js.map +1 -1
- package/dist/agents/mastra/workflow.d.ts.map +1 -1
- package/dist/agents/mastra/workflow.js +4 -2
- package/dist/agents/mastra/workflow.js.map +1 -1
- package/dist/blast-radius/index.d.ts +51 -0
- package/dist/blast-radius/index.d.ts.map +1 -0
- package/dist/blast-radius/index.js +462 -0
- package/dist/blast-radius/index.js.map +1 -0
- package/dist/blast-radius/manifest.d.ts +13 -0
- package/dist/blast-radius/manifest.d.ts.map +1 -0
- package/dist/blast-radius/manifest.js +54 -0
- package/dist/blast-radius/manifest.js.map +1 -0
- package/dist/blast-radius/radius.d.ts +138 -0
- package/dist/blast-radius/radius.d.ts.map +1 -0
- package/dist/blast-radius/radius.js +278 -0
- package/dist/blast-radius/radius.js.map +1 -0
- package/dist/blast-radius/types.d.ts +99 -0
- package/dist/blast-radius/types.d.ts.map +1 -0
- package/dist/blast-radius/types.js +15 -0
- package/dist/blast-radius/types.js.map +1 -0
- package/dist/bom/assemble.d.ts +4 -0
- package/dist/bom/assemble.d.ts.map +1 -1
- package/dist/bom/assemble.js +12 -1
- package/dist/bom/assemble.js.map +1 -1
- package/dist/bom/classify.d.ts +6 -2
- package/dist/bom/classify.d.ts.map +1 -1
- package/dist/bom/classify.js +2 -1
- package/dist/bom/classify.js.map +1 -1
- package/dist/bom/index.d.ts +69 -8
- package/dist/bom/index.d.ts.map +1 -1
- package/dist/bom/index.js +222 -62
- package/dist/bom/index.js.map +1 -1
- package/dist/bom/lockfiles.d.ts +73 -0
- package/dist/bom/lockfiles.d.ts.map +1 -0
- package/dist/bom/lockfiles.js +408 -0
- package/dist/bom/lockfiles.js.map +1 -0
- package/dist/bom/osgi-libraries.d.ts +93 -0
- package/dist/bom/osgi-libraries.d.ts.map +1 -0
- package/dist/bom/osgi-libraries.js +333 -0
- package/dist/bom/osgi-libraries.js.map +1 -0
- package/dist/bom/osgi.d.ts +72 -0
- package/dist/bom/osgi.d.ts.map +1 -0
- package/dist/bom/osgi.js +295 -0
- package/dist/bom/osgi.js.map +1 -0
- package/dist/bom/types.d.ts +22 -0
- package/dist/bom/types.d.ts.map +1 -1
- package/dist/bom/unread.d.ts +56 -0
- package/dist/bom/unread.d.ts.map +1 -0
- package/dist/bom/unread.js +187 -0
- package/dist/bom/unread.js.map +1 -0
- package/dist/bom/usage.d.ts +44 -1
- package/dist/bom/usage.d.ts.map +1 -1
- package/dist/bom/usage.js +110 -33
- package/dist/bom/usage.js.map +1 -1
- package/dist/grid/index.d.ts +169 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/index.js +250 -0
- package/dist/grid/index.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/llm/ax-client.d.ts +12 -0
- package/dist/llm/ax-client.d.ts.map +1 -1
- package/dist/llm/ax-client.js +59 -7
- package/dist/llm/ax-client.js.map +1 -1
- package/dist/llm/config.d.ts.map +1 -1
- package/dist/llm/config.js +35 -12
- package/dist/llm/config.js.map +1 -1
- package/dist/llm/discovery.d.ts.map +1 -1
- package/dist/llm/discovery.js +6 -1
- package/dist/llm/discovery.js.map +1 -1
- package/dist/llm/index.d.ts +1 -0
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +2 -0
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/model-route.d.ts +139 -0
- package/dist/llm/model-route.d.ts.map +1 -0
- package/dist/llm/model-route.js +256 -0
- package/dist/llm/model-route.js.map +1 -0
- package/dist/llm/verification.d.ts.map +1 -1
- package/dist/llm/verification.js +5 -1
- package/dist/llm/verification.js.map +1 -1
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +11 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/tools/blast-radius.d.ts +14 -0
- package/dist/mcp/tools/blast-radius.d.ts.map +1 -0
- package/dist/mcp/tools/blast-radius.js +105 -0
- package/dist/mcp/tools/blast-radius.js.map +1 -0
- package/dist/mcp/tools/detect-selectors.d.ts +14 -0
- package/dist/mcp/tools/detect-selectors.d.ts.map +1 -0
- package/dist/mcp/tools/detect-selectors.js +86 -0
- package/dist/mcp/tools/detect-selectors.js.map +1 -0
- package/dist/mcp/tools/find-credential-exposure.d.ts.map +1 -1
- package/dist/mcp/tools/find-credential-exposure.js +2 -1
- package/dist/mcp/tools/find-credential-exposure.js.map +1 -1
- package/dist/mcp/tools/layer-bom.d.ts.map +1 -1
- package/dist/mcp/tools/layer-bom.js +6 -0
- package/dist/mcp/tools/layer-bom.js.map +1 -1
- package/dist/mcp/tools/layer-grid.d.ts +12 -0
- package/dist/mcp/tools/layer-grid.d.ts.map +1 -0
- package/dist/mcp/tools/layer-grid.js +56 -0
- package/dist/mcp/tools/layer-grid.js.map +1 -0
- package/dist/secret-scan/index.d.ts +1 -1
- package/dist/secret-scan/index.d.ts.map +1 -1
- package/dist/secret-scan/index.js +1 -1
- package/dist/secret-scan/index.js.map +1 -1
- package/dist/secret-scan/scanner.d.ts +31 -0
- package/dist/secret-scan/scanner.d.ts.map +1 -1
- package/dist/secret-scan/scanner.js +360 -6
- package/dist/secret-scan/scanner.js.map +1 -1
- package/dist/security-scan/scanner.d.ts.map +1 -1
- package/dist/security-scan/scanner.js +5 -1
- package/dist/security-scan/scanner.js.map +1 -1
- package/dist/selectors/canonical.d.ts +46 -0
- package/dist/selectors/canonical.d.ts.map +1 -0
- package/dist/selectors/canonical.js +106 -0
- package/dist/selectors/canonical.js.map +1 -0
- package/dist/selectors/detect.d.ts +50 -0
- package/dist/selectors/detect.d.ts.map +1 -0
- package/dist/selectors/detect.js +459 -0
- package/dist/selectors/detect.js.map +1 -0
- package/dist/selectors/exclude.d.ts +29 -0
- package/dist/selectors/exclude.d.ts.map +1 -0
- package/dist/selectors/exclude.js +63 -0
- package/dist/selectors/exclude.js.map +1 -0
- package/dist/selectors/facts.d.ts +92 -0
- package/dist/selectors/facts.d.ts.map +1 -0
- package/dist/selectors/facts.js +312 -0
- package/dist/selectors/facts.js.map +1 -0
- package/dist/selectors/index.d.ts +42 -0
- package/dist/selectors/index.d.ts.map +1 -0
- package/dist/selectors/index.js +54 -0
- package/dist/selectors/index.js.map +1 -0
- package/dist/selectors/rules.d.ts +126 -0
- package/dist/selectors/rules.d.ts.map +1 -0
- package/dist/selectors/rules.js +340 -0
- package/dist/selectors/rules.js.map +1 -0
- package/dist/selectors/taxonomy.d.ts +35 -0
- package/dist/selectors/taxonomy.d.ts.map +1 -0
- package/dist/selectors/taxonomy.js +317 -0
- package/dist/selectors/taxonomy.js.map +1 -0
- package/dist/selectors/types.d.ts +104 -0
- package/dist/selectors/types.d.ts.map +1 -0
- package/dist/selectors/types.js +16 -0
- package/dist/selectors/types.js.map +1 -0
- package/dist/specifica/generator.d.ts.map +1 -1
- package/dist/specifica/generator.js +37 -2
- package/dist/specifica/generator.js.map +1 -1
- package/dist/specifica/provenance.d.ts +29 -2
- package/dist/specifica/provenance.d.ts.map +1 -1
- package/dist/specifica/provenance.js +34 -0
- package/dist/specifica/provenance.js.map +1 -1
- package/dist/specifica/spec-generator.d.ts.map +1 -1
- package/dist/specifica/spec-generator.js +4 -1
- package/dist/specifica/spec-generator.js.map +1 -1
- package/dist/specifica/types.d.ts +1 -1
- package/dist/specifica/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blast-radius engine op — `blastRadius(codeRoot, items)` (loop plan L5,
|
|
3
|
+
* LO-3/LO-10: every upkeep item shows its blast radius).
|
|
4
|
+
*
|
|
5
|
+
* For each item, from the engine's code facts:
|
|
6
|
+
*
|
|
7
|
+
* - **touched**: the files the fix edits (its locations, and the manifest of
|
|
8
|
+
* a dependency bump) and their modules (directories);
|
|
9
|
+
* - **call_sites**: the calls, from outside the change, into the
|
|
10
|
+
* declarations it changes, from circle-ir's call graphs
|
|
11
|
+
* (`ts-call-edges`, `java-graph`, `python-graph`, `go-graph` — the same
|
|
12
|
+
* builders dead-code uses). One hop: direct callers;
|
|
13
|
+
* - **import_sites**: for a dependency bump, the files that import the
|
|
14
|
+
* package, from bom's usage index;
|
|
15
|
+
* - **reach / level / label**: counts over touched ∪ caller ∪ importer
|
|
16
|
+
* files, and the level from `BLAST_THRESHOLDS`.
|
|
17
|
+
*
|
|
18
|
+
* Deterministic and model-free. A graph is built only for the languages the
|
|
19
|
+
* items touch, once per call, and only over the files that can call into the
|
|
20
|
+
* change: the changed files, plus the files whose text names a changed
|
|
21
|
+
* declaration or a changed file (a call or an import has to name what it
|
|
22
|
+
* reaches). On a large repository that is a small slice of it.
|
|
23
|
+
*/
|
|
24
|
+
import { type CollectOptions } from '../bom/usage.js';
|
|
25
|
+
import type { BlastRadius, BlastRadiusItem, BlastRadiusResult } from './types.js';
|
|
26
|
+
export * from './types.js';
|
|
27
|
+
export { BLAST_THRESHOLDS, levelFor, labelFor, moduleOf, selectChanged, callersOf, assembleRadius, unionRadius, presentRadius, displayName } from './radius.js';
|
|
28
|
+
export type { CodeFacts, FactFile, FactDecl, FactEdge, FactUnresolved, ChangedRegion } from './radius.js';
|
|
29
|
+
export { manifestDeclares } from './manifest.js';
|
|
30
|
+
/** The walk's bounds: wide enough for a large monorepo; beyond them the answer says it is incomplete. */
|
|
31
|
+
export declare const BLAST_WALK: {
|
|
32
|
+
readonly maxFiles: 100000;
|
|
33
|
+
readonly maxDepth: 32;
|
|
34
|
+
};
|
|
35
|
+
export interface BlastRadiusOptions {
|
|
36
|
+
/** Also return the union of all items' radii under this id (a batch, loop plan §5). */
|
|
37
|
+
batchId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Build each call graph only over the files that name the change (default
|
|
40
|
+
* true). `false` builds it over every file of the language: slower, for
|
|
41
|
+
* checking that the narrowing loses nothing.
|
|
42
|
+
*/
|
|
43
|
+
prefilter?: boolean;
|
|
44
|
+
/** Bounds of the repository walk (default `BLAST_WALK`). */
|
|
45
|
+
walk?: CollectOptions;
|
|
46
|
+
}
|
|
47
|
+
/** Blast radius per item (and, with `batchId`, of the batch they make). */
|
|
48
|
+
export declare function blastRadius(codeRoot: string, items: readonly BlastRadiusItem[], opts?: BlastRadiusOptions): Promise<BlastRadiusResult & {
|
|
49
|
+
batch?: BlastRadius;
|
|
50
|
+
}>;
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blast-radius/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,OAAO,EAAgD,KAAK,cAAc,EAAwC,MAAM,iBAAiB,CAAC;AAa1I,OAAO,KAAK,EAGV,WAAW,EACX,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChK,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAcjD,yGAAyG;AACzG,eAAO,MAAM,UAAU;aAAK,QAAQ,EAAE,MAAO;aAAE,QAAQ,EAAE,EAAE;CAAW,CAAC;AA6EvE,MAAM,WAAW,kBAAkB;IACjC,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,2EAA2E;AAC3E,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,CAkOtD"}
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blast-radius engine op — `blastRadius(codeRoot, items)` (loop plan L5,
|
|
3
|
+
* LO-3/LO-10: every upkeep item shows its blast radius).
|
|
4
|
+
*
|
|
5
|
+
* For each item, from the engine's code facts:
|
|
6
|
+
*
|
|
7
|
+
* - **touched**: the files the fix edits (its locations, and the manifest of
|
|
8
|
+
* a dependency bump) and their modules (directories);
|
|
9
|
+
* - **call_sites**: the calls, from outside the change, into the
|
|
10
|
+
* declarations it changes, from circle-ir's call graphs
|
|
11
|
+
* (`ts-call-edges`, `java-graph`, `python-graph`, `go-graph` — the same
|
|
12
|
+
* builders dead-code uses). One hop: direct callers;
|
|
13
|
+
* - **import_sites**: for a dependency bump, the files that import the
|
|
14
|
+
* package, from bom's usage index;
|
|
15
|
+
* - **reach / level / label**: counts over touched ∪ caller ∪ importer
|
|
16
|
+
* files, and the level from `BLAST_THRESHOLDS`.
|
|
17
|
+
*
|
|
18
|
+
* Deterministic and model-free. A graph is built only for the languages the
|
|
19
|
+
* items touch, once per call, and only over the files that can call into the
|
|
20
|
+
* change: the changed files, plus the files whose text names a changed
|
|
21
|
+
* declaration or a changed file (a call or an import has to name what it
|
|
22
|
+
* reaches). On a large repository that is a small slice of it.
|
|
23
|
+
*/
|
|
24
|
+
import * as fs from 'fs';
|
|
25
|
+
import * as path from 'path';
|
|
26
|
+
import { buildTsCallGraph, buildJavaGraph, buildPythonGraph, buildGoGraph } from 'circle-ir';
|
|
27
|
+
import { buildUsageIndexWithStats, collectSourceFiles } from '../bom/usage.js';
|
|
28
|
+
import { assembleRadius, callersOf, emptyBasis, presentRadius, selectChanged, unionRadius, } from './radius.js';
|
|
29
|
+
import { manifestDeclares } from './manifest.js';
|
|
30
|
+
export * from './types.js';
|
|
31
|
+
export { BLAST_THRESHOLDS, levelFor, labelFor, moduleOf, selectChanged, callersOf, assembleRadius, unionRadius, presentRadius, displayName } from './radius.js';
|
|
32
|
+
export { manifestDeclares } from './manifest.js';
|
|
33
|
+
const FAMILY_OF_EXT = {
|
|
34
|
+
'.ts': 'typescript', '.mts': 'typescript', '.cts': 'typescript', '.tsx': 'typescript',
|
|
35
|
+
'.js': 'typescript', '.jsx': 'typescript', '.mjs': 'typescript', '.cjs': 'typescript',
|
|
36
|
+
'.java': 'java',
|
|
37
|
+
'.py': 'python',
|
|
38
|
+
'.go': 'go',
|
|
39
|
+
};
|
|
40
|
+
const MAX_FILE_BYTES = 512 * 1024;
|
|
41
|
+
const MAX_PARTIAL_LISTED = 20;
|
|
42
|
+
/** The walk's bounds: wide enough for a large monorepo; beyond them the answer says it is incomplete. */
|
|
43
|
+
export const BLAST_WALK = { maxFiles: 100_000, maxDepth: 32 };
|
|
44
|
+
/** The walk's language names (circle-ir's) for each graph family. */
|
|
45
|
+
const LANGUAGES_OF = {
|
|
46
|
+
typescript: ['typescript', 'tsx', 'javascript'],
|
|
47
|
+
java: ['java'],
|
|
48
|
+
python: ['python'],
|
|
49
|
+
go: ['go'],
|
|
50
|
+
};
|
|
51
|
+
function familyOf(file) {
|
|
52
|
+
return FAMILY_OF_EXT[path.extname(file).toLowerCase()];
|
|
53
|
+
}
|
|
54
|
+
function isFile(p) {
|
|
55
|
+
try {
|
|
56
|
+
return fs.statSync(p).isFile();
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** `file` as a `/`-separated path relative to `root`, or `null` when it is outside it. */
|
|
63
|
+
function toRel(root, file) {
|
|
64
|
+
const abs = path.resolve(root, file);
|
|
65
|
+
const rel = path.relative(root, abs);
|
|
66
|
+
if (rel === '' || rel.startsWith('..') || path.isAbsolute(rel))
|
|
67
|
+
return null;
|
|
68
|
+
return rel.split(path.sep).join('/');
|
|
69
|
+
}
|
|
70
|
+
function readSource(abs) {
|
|
71
|
+
try {
|
|
72
|
+
if (fs.statSync(abs).size > MAX_FILE_BYTES)
|
|
73
|
+
return null;
|
|
74
|
+
return fs.readFileSync(abs, 'utf-8');
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function buildFacts(family, sources) {
|
|
81
|
+
const g = family === 'java' ? await buildJavaGraph(sources)
|
|
82
|
+
: family === 'python' ? await buildPythonGraph(sources)
|
|
83
|
+
: family === 'go' ? await buildGoGraph(sources)
|
|
84
|
+
: await buildTsCallGraph(sources);
|
|
85
|
+
return { scheme: g.scheme, files: g.files, edges: g.edges, unresolved: g.unresolved, partial: g.partial };
|
|
86
|
+
}
|
|
87
|
+
const IDENT = /^[A-Za-z_$][\w$]*$/;
|
|
88
|
+
/** The identifiers a reference to this declaration would spell: its name and its owners' names. */
|
|
89
|
+
function namesOf(qualifiedName, name) {
|
|
90
|
+
const member = qualifiedName.includes(':') ? qualifiedName.slice(qualifiedName.indexOf(':') + 1) : '';
|
|
91
|
+
const parts = [name, ...member.split(/[./]/)].map((p) => p.replace(/@.*$/, ''));
|
|
92
|
+
return parts.filter((p) => IDENT.test(p) && p !== 'constructor');
|
|
93
|
+
}
|
|
94
|
+
/** The names an import of this file would spell: its stem, and for an index module its directory. */
|
|
95
|
+
function moduleNamesOf(rel) {
|
|
96
|
+
const stem = path.posix.basename(rel).replace(/\.[^.]+$/, '');
|
|
97
|
+
const out = [stem];
|
|
98
|
+
if (stem === 'index' || stem === '__init__' || stem === 'mod') {
|
|
99
|
+
const dir = path.posix.basename(path.posix.dirname(rel));
|
|
100
|
+
if (dir && dir !== '.')
|
|
101
|
+
out.push(dir);
|
|
102
|
+
}
|
|
103
|
+
return out.filter((n) => IDENT.test(n) || /^[\w$-]+$/.test(n));
|
|
104
|
+
}
|
|
105
|
+
const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
106
|
+
function wordsRe(words) {
|
|
107
|
+
const list = [...new Set(words)].sort();
|
|
108
|
+
if (list.length === 0)
|
|
109
|
+
return null;
|
|
110
|
+
return new RegExp(`(?<![\\w$])(?:${list.map(escapeRe).join('|')})(?![\\w$])`);
|
|
111
|
+
}
|
|
112
|
+
/** A file that passes other modules' exports through (a barrel), so its importers can reach the change without naming it. */
|
|
113
|
+
function reExports(family, rel, code) {
|
|
114
|
+
if (family === 'typescript')
|
|
115
|
+
return /\bexport\s*(?:\*|\{[^}]*\}|type\s*\{[^}]*\})\s*from\b/.test(code) || /module\.exports\s*=\s*require\(/.test(code);
|
|
116
|
+
if (family === 'python')
|
|
117
|
+
return path.posix.basename(rel) === '__init__.py';
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
/** Blast radius per item (and, with `batchId`, of the batch they make). */
|
|
121
|
+
export async function blastRadius(codeRoot, items, opts = {}) {
|
|
122
|
+
const root = path.resolve(codeRoot);
|
|
123
|
+
if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) {
|
|
124
|
+
throw new Error(`code_root is not a directory: ${codeRoot}`);
|
|
125
|
+
}
|
|
126
|
+
const prefilter = opts.prefilter !== false;
|
|
127
|
+
const bounds = { maxFiles: opts.walk?.maxFiles ?? BLAST_WALK.maxFiles, maxDepth: opts.walk?.maxDepth ?? BLAST_WALK.maxDepth };
|
|
128
|
+
// The files the items change, by language: their graphs are the ones to build.
|
|
129
|
+
const changedFiles = new Map();
|
|
130
|
+
for (const item of items) {
|
|
131
|
+
for (const loc of item.locations ?? []) {
|
|
132
|
+
const rel = toRel(root, loc.file);
|
|
133
|
+
const f = rel === null ? undefined : familyOf(rel);
|
|
134
|
+
if (!f || rel === null || !isFile(path.join(root, rel)))
|
|
135
|
+
continue;
|
|
136
|
+
const set = changedFiles.get(f) ?? new Set();
|
|
137
|
+
set.add(rel);
|
|
138
|
+
changedFiles.set(f, set);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const factsOf = new Map();
|
|
142
|
+
const fileFacts = new Map();
|
|
143
|
+
const qualifiedName = new Map();
|
|
144
|
+
const graphNotes = [];
|
|
145
|
+
const cuts = [];
|
|
146
|
+
if (changedFiles.size > 0) {
|
|
147
|
+
const { ensureAnalyzerInitialized, isAnalyzerInitialized } = await import('../utils/analyzer-init.js');
|
|
148
|
+
if (!isAnalyzerInitialized())
|
|
149
|
+
await ensureAnalyzerInitialized();
|
|
150
|
+
// Only the languages that need a graph: the bound counts only their files.
|
|
151
|
+
const languages = new Set([...changedFiles.keys()].flatMap((f) => LANGUAGES_OF[f]));
|
|
152
|
+
const walk = collectSourceFiles(root, root, { ...bounds, languages });
|
|
153
|
+
if (walk.truncated)
|
|
154
|
+
cuts.push(walk.truncated);
|
|
155
|
+
const byFamily = new Map();
|
|
156
|
+
for (const src of walk.files) {
|
|
157
|
+
const family = familyOf(src.abs);
|
|
158
|
+
if (!family || !changedFiles.has(family))
|
|
159
|
+
continue;
|
|
160
|
+
const list = byFamily.get(family) ?? [];
|
|
161
|
+
list.push(src);
|
|
162
|
+
byFamily.set(family, list);
|
|
163
|
+
}
|
|
164
|
+
for (const family of ['typescript', 'java', 'python', 'go']) {
|
|
165
|
+
const changed = changedFiles.get(family);
|
|
166
|
+
if (!changed)
|
|
167
|
+
continue;
|
|
168
|
+
try {
|
|
169
|
+
const sources = await graphSources(family, byFamily.get(family) ?? [], changed, items, root, prefilter);
|
|
170
|
+
if (sources.length === 0)
|
|
171
|
+
continue;
|
|
172
|
+
const facts = await buildFacts(family, sources);
|
|
173
|
+
factsOf.set(family, facts);
|
|
174
|
+
for (const f of facts.files) {
|
|
175
|
+
fileFacts.set(f.file, { family, file: f });
|
|
176
|
+
for (const d of f.decls)
|
|
177
|
+
qualifiedName.set(d.id, d.qualified_name);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
catch (err) {
|
|
181
|
+
graphNotes.push(`the ${family} call graph could not be built (${err.message}); its callers are not counted`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// Importers of each bumped package, counted under its manifest's directory (its workspace).
|
|
186
|
+
const scopeOf = (item) => {
|
|
187
|
+
const m = item.dependency?.manifest;
|
|
188
|
+
const rel = m === undefined ? null : toRel(root, m);
|
|
189
|
+
return rel === null || !isFile(path.join(root, rel)) ? '.' : path.posix.dirname(rel);
|
|
190
|
+
};
|
|
191
|
+
const packagesByScope = new Map();
|
|
192
|
+
for (const item of items) {
|
|
193
|
+
if (!item.dependency)
|
|
194
|
+
continue;
|
|
195
|
+
const scope = scopeOf(item);
|
|
196
|
+
const set = packagesByScope.get(scope) ?? new Set();
|
|
197
|
+
set.add(item.dependency.name);
|
|
198
|
+
packagesByScope.set(scope, set);
|
|
199
|
+
}
|
|
200
|
+
const usageByScope = new Map();
|
|
201
|
+
for (const scope of [...packagesByScope.keys()].sort()) {
|
|
202
|
+
const { index, truncated } = await buildUsageIndexWithStats(root, [...packagesByScope.get(scope)].sort(), { ...bounds, under: scope });
|
|
203
|
+
usageByScope.set(scope, index);
|
|
204
|
+
if (truncated)
|
|
205
|
+
cuts.push(truncated);
|
|
206
|
+
}
|
|
207
|
+
const cutNote = cuts.length === 0 ? null : walkCutNote(cuts);
|
|
208
|
+
// Per item, what it changes (for the batch, worked out again over the union).
|
|
209
|
+
const changedOf = [];
|
|
210
|
+
const regionsOf = [];
|
|
211
|
+
const radii = items.map((item, index) => {
|
|
212
|
+
const basis = emptyBasis();
|
|
213
|
+
basis.notes.push(...graphNotes);
|
|
214
|
+
const touched = [];
|
|
215
|
+
const changedBy = new Map();
|
|
216
|
+
const regionsBy = new Map();
|
|
217
|
+
changedOf[index] = changedBy;
|
|
218
|
+
regionsOf[index] = regionsBy;
|
|
219
|
+
// Whether the code facts back the answer: a location with no facts, or a bump with nothing read, leaves the level not known.
|
|
220
|
+
let unbacked = false;
|
|
221
|
+
for (const loc of item.locations ?? []) {
|
|
222
|
+
const rel = toRel(root, loc.file);
|
|
223
|
+
if (rel === null) {
|
|
224
|
+
basis.notes.push(`${loc.file} is outside the code root; ignored`);
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (!isFile(path.join(root, rel))) {
|
|
228
|
+
basis.notes.push(`${rel} is not a file under the code root; ignored`);
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (loc.end_line !== undefined && loc.start_line === undefined) {
|
|
232
|
+
basis.notes.push(`${rel} has end_line without start_line; ignored`);
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
touched.push(rel);
|
|
236
|
+
const ff = fileFacts.get(rel);
|
|
237
|
+
if (!ff) {
|
|
238
|
+
unbacked = true;
|
|
239
|
+
const family = familyOf(rel);
|
|
240
|
+
basis.notes.push(!family ? `${rel} is not a language the call graphs cover; counted as touched only`
|
|
241
|
+
: tooLarge(path.join(root, rel)) ? `${rel} is larger than ${MAX_FILE_BYTES / 1024} KB, so it has no code facts; counted as touched only`
|
|
242
|
+
: graphNotes.some((n) => n.startsWith(`the ${family} call graph`)) ? `${rel} has no code facts (its ${family} graph failed); counted as touched only`
|
|
243
|
+
: `${rel} has no code facts (it did not parse); counted as touched only`);
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
const ids = selectChanged(ff.file, loc);
|
|
247
|
+
if (ids.size === 0) {
|
|
248
|
+
basis.notes.push(`${rel}${loc.symbol ? ` has no declaration named ${loc.symbol}` : ' has no declaration on those lines'}; counted as touched only`);
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
const set = changedBy.get(ff.family) ?? new Set();
|
|
252
|
+
for (const id of ids)
|
|
253
|
+
set.add(id);
|
|
254
|
+
changedBy.set(ff.family, set);
|
|
255
|
+
// Lines (or the whole file) the change rewrites: calls made from them are part of the change.
|
|
256
|
+
if (!loc.symbol) {
|
|
257
|
+
const start = loc.start_line ?? 1;
|
|
258
|
+
const end = loc.start_line === undefined ? Number.POSITIVE_INFINITY : Math.max(start, loc.end_line ?? start);
|
|
259
|
+
const regions = regionsBy.get(ff.family) ?? [];
|
|
260
|
+
regions.push({ file: rel, start_line: start, end_line: end });
|
|
261
|
+
regionsBy.set(ff.family, regions);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const callSites = [];
|
|
265
|
+
for (const [family, changed] of changedBy) {
|
|
266
|
+
const facts = factsOf.get(family);
|
|
267
|
+
basis.graphs.push(facts.scheme);
|
|
268
|
+
for (const id of changed)
|
|
269
|
+
basis.declarations.push(qualifiedName.get(id) ?? id);
|
|
270
|
+
const answer = callersOf(facts, changed, qualifiedName, regionsBy.get(family) ?? []);
|
|
271
|
+
callSites.push(...answer.call_sites);
|
|
272
|
+
basis.unresolved_sites += answer.unresolved_sites;
|
|
273
|
+
const partial = [...facts.partial].sort();
|
|
274
|
+
basis.partial_files.push(...partial.slice(0, MAX_PARTIAL_LISTED));
|
|
275
|
+
if (partial.length > MAX_PARTIAL_LISTED) {
|
|
276
|
+
basis.notes.push(`${partial.length} ${family} files did not parse completely (first ${MAX_PARTIAL_LISTED} listed)`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
const importSites = [];
|
|
280
|
+
if (item.dependency) {
|
|
281
|
+
const dep = item.dependency;
|
|
282
|
+
basis.graphs.push('bom-usage');
|
|
283
|
+
basis.dependencies.push(dep.name);
|
|
284
|
+
let manifestRead = false;
|
|
285
|
+
if (dep.manifest) {
|
|
286
|
+
const rel = toRel(root, dep.manifest);
|
|
287
|
+
if (rel === null)
|
|
288
|
+
basis.notes.push(`${dep.manifest} is outside the code root; ignored`);
|
|
289
|
+
else if (!isFile(path.join(root, rel)))
|
|
290
|
+
basis.notes.push(`${rel} is not a file under the code root; ignored`);
|
|
291
|
+
else {
|
|
292
|
+
manifestRead = true;
|
|
293
|
+
touched.push(rel);
|
|
294
|
+
let text = '';
|
|
295
|
+
try {
|
|
296
|
+
text = fs.readFileSync(path.join(root, rel), 'utf-8');
|
|
297
|
+
}
|
|
298
|
+
catch { /* unreadable: no claim either way */ }
|
|
299
|
+
const declared = text ? manifestDeclares(rel, text, dep.name) : undefined;
|
|
300
|
+
if (declared === false) {
|
|
301
|
+
basis.notes.push(`${dep.name} is not declared in ${rel}; check that the item names the right manifest`);
|
|
302
|
+
}
|
|
303
|
+
else if (declared === undefined && text) {
|
|
304
|
+
basis.notes.push(`${rel} is not a dependency manifest the engine reads; whether it declares ${dep.name} was not checked`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const scope = scopeOf(item);
|
|
309
|
+
if (scope !== '.')
|
|
310
|
+
basis.notes.push(`importers counted under ${scope}/, the manifest's directory`);
|
|
311
|
+
for (const site of usageByScope.get(scope)?.[dep.name] ?? []) {
|
|
312
|
+
importSites.push({ file: site.file.split(path.sep).join('/'), line: site.line, package: dep.name });
|
|
313
|
+
}
|
|
314
|
+
if (!manifestRead && importSites.length === 0) {
|
|
315
|
+
unbacked = true;
|
|
316
|
+
basis.notes.push(`no manifest was read and no file imports ${dep.name}; what the bump reaches is not known`);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (touched.length === 0 && importSites.length === 0) {
|
|
320
|
+
unbacked = true;
|
|
321
|
+
if (!item.dependency)
|
|
322
|
+
basis.notes.push('none of the item\'s locations could be read; what it reaches is not known');
|
|
323
|
+
}
|
|
324
|
+
if (cutNote) {
|
|
325
|
+
basis.truncated = true;
|
|
326
|
+
basis.notes.push(cutNote);
|
|
327
|
+
}
|
|
328
|
+
return assembleRadius(item.id, touched, callSites, importSites, basis, !unbacked);
|
|
329
|
+
});
|
|
330
|
+
const result = { code_root: root, items: radii.map(presentRadius) };
|
|
331
|
+
if (opts.batchId !== undefined) {
|
|
332
|
+
// The batch's callers, again from the facts, over the union of the items' changes.
|
|
333
|
+
const changedAll = new Map();
|
|
334
|
+
const regionsAll = new Map();
|
|
335
|
+
items.forEach((_, i) => {
|
|
336
|
+
for (const [family, ids] of changedOf[i]) {
|
|
337
|
+
const set = changedAll.get(family) ?? new Set();
|
|
338
|
+
for (const id of ids)
|
|
339
|
+
set.add(id);
|
|
340
|
+
changedAll.set(family, set);
|
|
341
|
+
}
|
|
342
|
+
for (const [family, regions] of regionsOf[i])
|
|
343
|
+
regionsAll.set(family, [...(regionsAll.get(family) ?? []), ...regions]);
|
|
344
|
+
});
|
|
345
|
+
const callSites = [];
|
|
346
|
+
let unresolved = 0;
|
|
347
|
+
for (const [family, changed] of changedAll) {
|
|
348
|
+
const answer = callersOf(factsOf.get(family), changed, qualifiedName, regionsAll.get(family) ?? []);
|
|
349
|
+
callSites.push(...answer.call_sites);
|
|
350
|
+
unresolved += answer.unresolved_sites;
|
|
351
|
+
}
|
|
352
|
+
result.batch = presentRadius(unionRadius(opts.batchId, radii, { call_sites: callSites, unresolved_sites: unresolved }));
|
|
353
|
+
}
|
|
354
|
+
return result;
|
|
355
|
+
}
|
|
356
|
+
function tooLarge(abs) {
|
|
357
|
+
try {
|
|
358
|
+
return fs.statSync(abs).size > MAX_FILE_BYTES;
|
|
359
|
+
}
|
|
360
|
+
catch {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/** The note every radius carries when a walk was cut short. */
|
|
365
|
+
function walkCutNote(cuts) {
|
|
366
|
+
const files = cuts.find((c) => c.maxFiles !== undefined)?.maxFiles;
|
|
367
|
+
const depth = cuts.find((c) => c.maxDepth !== undefined)?.maxDepth;
|
|
368
|
+
const where = [
|
|
369
|
+
files !== undefined ? `at ${files} source files` : null,
|
|
370
|
+
depth !== undefined ? `at ${depth} directories deep` : null,
|
|
371
|
+
].filter(Boolean).join(' and ');
|
|
372
|
+
return `the repository walk stopped ${where}; callers and importers beyond it are not counted, so the level is not known`;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* The sources to build one language's graph from: the changed files, and
|
|
376
|
+
* (with `prefilter`) only those other files whose text names a changed
|
|
377
|
+
* declaration or imports a changed file, directly or through a re-exporting
|
|
378
|
+
* module. A call or an import has to spell what it reaches, so the files
|
|
379
|
+
* left out cannot call into the change.
|
|
380
|
+
*/
|
|
381
|
+
async function graphSources(family, all, changed, items, root, prefilter) {
|
|
382
|
+
const relOf = (src) => src.rel.split(path.sep).join('/');
|
|
383
|
+
const byPath = (a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
384
|
+
const changedSources = [];
|
|
385
|
+
for (const rel of [...changed].sort()) {
|
|
386
|
+
const code = readSource(path.join(root, rel));
|
|
387
|
+
if (code !== null)
|
|
388
|
+
changedSources.push({ path: rel, code });
|
|
389
|
+
}
|
|
390
|
+
if (!prefilter) {
|
|
391
|
+
const sources = [...changedSources];
|
|
392
|
+
for (const src of all) {
|
|
393
|
+
if (changed.has(relOf(src)))
|
|
394
|
+
continue;
|
|
395
|
+
const code = readSource(src.abs);
|
|
396
|
+
if (code !== null)
|
|
397
|
+
sources.push({ path: relOf(src), code });
|
|
398
|
+
}
|
|
399
|
+
return sources.sort(byPath);
|
|
400
|
+
}
|
|
401
|
+
if (changedSources.length === 0)
|
|
402
|
+
return [];
|
|
403
|
+
// The changed declarations' names, from a graph of the changed files alone.
|
|
404
|
+
const seed = await buildFacts(family, changedSources);
|
|
405
|
+
const names = new Set();
|
|
406
|
+
for (const f of seed.files) {
|
|
407
|
+
for (const item of items) {
|
|
408
|
+
for (const loc of item.locations ?? []) {
|
|
409
|
+
if (toRel(root, loc.file) !== f.file)
|
|
410
|
+
continue;
|
|
411
|
+
const ids = selectChanged(f, loc);
|
|
412
|
+
for (const d of f.decls)
|
|
413
|
+
if (ids.has(d.id))
|
|
414
|
+
for (const n of namesOf(d.qualified_name, d.name))
|
|
415
|
+
names.add(n);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (names.size === 0)
|
|
420
|
+
return changedSources;
|
|
421
|
+
const modules = new Set();
|
|
422
|
+
for (const rel of changed)
|
|
423
|
+
for (const n of moduleNamesOf(rel))
|
|
424
|
+
modules.add(n);
|
|
425
|
+
const texts = [];
|
|
426
|
+
for (const src of all) {
|
|
427
|
+
const rel = relOf(src);
|
|
428
|
+
if (changed.has(rel))
|
|
429
|
+
continue;
|
|
430
|
+
const code = readSource(src.abs);
|
|
431
|
+
if (code !== null)
|
|
432
|
+
texts.push({ path: rel, code });
|
|
433
|
+
}
|
|
434
|
+
const nameRe = wordsRe(names);
|
|
435
|
+
const picked = new Set();
|
|
436
|
+
for (const t of texts)
|
|
437
|
+
if (nameRe.test(t.code))
|
|
438
|
+
picked.add(t.path);
|
|
439
|
+
// Files that import a changed module, and (to a fixed point) the importers of modules that re-export it.
|
|
440
|
+
const expanded = new Set();
|
|
441
|
+
let frontier = modules;
|
|
442
|
+
while (frontier.size > 0) {
|
|
443
|
+
const re = wordsRe(frontier);
|
|
444
|
+
const next = new Set();
|
|
445
|
+
for (const t of texts) {
|
|
446
|
+
if (!re.test(t.code))
|
|
447
|
+
continue;
|
|
448
|
+
picked.add(t.path);
|
|
449
|
+
if (expanded.has(t.path) || !reExports(family, t.path, t.code))
|
|
450
|
+
continue;
|
|
451
|
+
expanded.add(t.path);
|
|
452
|
+
for (const n of moduleNamesOf(t.path))
|
|
453
|
+
if (!modules.has(n)) {
|
|
454
|
+
modules.add(n);
|
|
455
|
+
next.add(n);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
frontier = next;
|
|
459
|
+
}
|
|
460
|
+
return [...changedSources, ...texts.filter((t) => picked.has(t.path))].sort(byPath);
|
|
461
|
+
}
|
|
462
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|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GAAG,EAAU,CAAC;QAC/B,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACnB,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;gBAAE,SAAS;YACzE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACrB,KAAK,MAAM,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAAC,CAAC;QAC9F,CAAC;QACD,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,GAAG,cAAc,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Does a manifest declare a package? For the blast radius of a dependency
|
|
3
|
+
* bump: a bump of a package its manifest does not declare is worth a note
|
|
4
|
+
* (the item may name the wrong manifest, or the package is transitive).
|
|
5
|
+
*
|
|
6
|
+
* Reads the manifest's text only; no network, no lockfile.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Whether `text` (the manifest at `rel`) declares `name`; `undefined` when
|
|
10
|
+
* `rel` is not a dependency manifest this reads (e.g. `wrangler.toml`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function manifestDeclares(rel: string, text: string, name: string): boolean | undefined;
|
|
13
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/blast-radius/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAuC7F"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Does a manifest declare a package? For the blast radius of a dependency
|
|
3
|
+
* bump: a bump of a package its manifest does not declare is worth a note
|
|
4
|
+
* (the item may name the wrong manifest, or the package is transitive).
|
|
5
|
+
*
|
|
6
|
+
* Reads the manifest's text only; no network, no lockfile.
|
|
7
|
+
*/
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
const JSON_DEP_KEYS = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'];
|
|
10
|
+
/** PEP 503 name normalization: case-insensitive, runs of `-_.` are one `-`. */
|
|
11
|
+
const pyNorm = (s) => s.toLowerCase().replace(/[-_.]+/g, '-');
|
|
12
|
+
const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
13
|
+
/**
|
|
14
|
+
* Whether `text` (the manifest at `rel`) declares `name`; `undefined` when
|
|
15
|
+
* `rel` is not a dependency manifest this reads (e.g. `wrangler.toml`).
|
|
16
|
+
*/
|
|
17
|
+
export function manifestDeclares(rel, text, name) {
|
|
18
|
+
const base = path.posix.basename(rel).toLowerCase();
|
|
19
|
+
if (base === 'package.json') {
|
|
20
|
+
try {
|
|
21
|
+
const pkg = JSON.parse(text);
|
|
22
|
+
return JSON_DEP_KEYS.some((k) => {
|
|
23
|
+
const deps = pkg[k];
|
|
24
|
+
return typeof deps === 'object' && deps !== null && Object.prototype.hasOwnProperty.call(deps, name);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return text.includes(`"${name}"`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (base === 'pom.xml') {
|
|
32
|
+
const [groupId, artifactId] = name.includes(':') ? name.split(':') : [undefined, name];
|
|
33
|
+
const artifact = new RegExp(`<artifactId>\\s*${escapeRe(artifactId)}\\s*</artifactId>`);
|
|
34
|
+
if (!artifact.test(text))
|
|
35
|
+
return false;
|
|
36
|
+
return groupId === undefined || text.includes(groupId);
|
|
37
|
+
}
|
|
38
|
+
if (base.startsWith('requirements') && base.endsWith('.txt') || base === 'pyproject.toml' || base === 'pipfile' || base === 'setup.py' || base === 'setup.cfg') {
|
|
39
|
+
const want = pyNorm(name);
|
|
40
|
+
const tokens = text.match(/[A-Za-z0-9][A-Za-z0-9._-]*/g) ?? [];
|
|
41
|
+
return tokens.some((t) => pyNorm(t) === want);
|
|
42
|
+
}
|
|
43
|
+
if (base === 'build.gradle' || base === 'build.gradle.kts') {
|
|
44
|
+
return text.includes(name);
|
|
45
|
+
}
|
|
46
|
+
if (base === 'cargo.toml') {
|
|
47
|
+
return new RegExp(`^\\s*${escapeRe(name)}\\s*(=|\\.)`, 'm').test(text);
|
|
48
|
+
}
|
|
49
|
+
if (base === 'go.mod') {
|
|
50
|
+
return new RegExp(`(^|\\s)${escapeRe(name)}(\\s|$)`, 'm').test(text);
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/blast-radius/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;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