@ankhorage/dependency-graph 0.6.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/CHANGELOG.md +12 -0
- package/dist/dependencyGraph.d.ts +2 -1
- package/dist/dependencyGraph.d.ts.map +1 -1
- package/dist/dependencyGraph.js +1 -0
- package/dist/dependencyGraph.js.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/cpp/analyzeCppProjectAsync.d.ts.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/cpp/analyzeCppProjectAsync.js +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/cpp/analyzeCppProjectAsync.js.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/delphi/analyzeDelphiProjectAsync.js +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/delphi/analyzeDelphiProjectAsync.js.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/java/analyzeJavaProjectAsync.js +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/java/analyzeJavaProjectAsync.js.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/kotlin/analyzeKotlinProjectAsync.js +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/kotlin/analyzeKotlinProjectAsync.js.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/python/analyzePythonProjectAsync.js +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/python/analyzePythonProjectAsync.js.map +1 -1
- package/dist/features/dependency-analysis/adapters/outbound/typescript/analyzeTypeScriptProjectAsync.js +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/typescript/analyzeTypeScriptProjectAsync.js.map +1 -1
- package/dist/features/dependency-analysis/application/assertDependencyGraphProjectIds.d.ts +5 -0
- package/dist/features/dependency-analysis/application/assertDependencyGraphProjectIds.d.ts.map +1 -0
- package/dist/features/dependency-analysis/application/assertDependencyGraphProjectIds.js +14 -0
- package/dist/features/dependency-analysis/application/assertDependencyGraphProjectIds.js.map +1 -0
- package/dist/features/dependency-analysis/application/createDependencyGraphAsync.d.ts +1 -1
- package/dist/features/dependency-analysis/application/createDependencyGraphAsync.d.ts.map +1 -1
- package/dist/features/dependency-analysis/application/createDependencyGraphAsync.js +14 -113
- package/dist/features/dependency-analysis/application/createDependencyGraphAsync.js.map +1 -1
- package/dist/features/dependency-analysis/application/createDependencyGraphFromInspectionsAsync.d.ts +6 -0
- package/dist/features/dependency-analysis/application/createDependencyGraphFromInspectionsAsync.d.ts.map +1 -0
- package/dist/features/dependency-analysis/application/createDependencyGraphFromInspectionsAsync.js +104 -0
- package/dist/features/dependency-analysis/application/createDependencyGraphFromInspectionsAsync.js.map +1 -0
- package/dist/features/dependency-analysis/utils/collectInspectedSourceFiles.d.ts +4 -0
- package/dist/features/dependency-analysis/utils/collectInspectedSourceFiles.d.ts.map +1 -0
- package/dist/features/dependency-analysis/utils/collectInspectedSourceFiles.js +36 -0
- package/dist/features/dependency-analysis/utils/collectInspectedSourceFiles.js.map +1 -0
- package/dist/types/dependencyGraph.d.ts +9 -0
- package/dist/types/dependencyGraph.d.ts.map +1 -1
- package/dist/types/dependencyGraph.js.map +1 -1
- package/package.json +2 -2
- package/dist/features/dependency-analysis/adapters/outbound/cpp/collectCppFilesAsync.d.ts +0 -3
- package/dist/features/dependency-analysis/adapters/outbound/cpp/collectCppFilesAsync.d.ts.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/cpp/collectCppFilesAsync.js +0 -43
- package/dist/features/dependency-analysis/adapters/outbound/cpp/collectCppFilesAsync.js.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/delphi/collectDelphiFilesAsync.d.ts +0 -3
- package/dist/features/dependency-analysis/adapters/outbound/delphi/collectDelphiFilesAsync.d.ts.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/delphi/collectDelphiFilesAsync.js +0 -43
- package/dist/features/dependency-analysis/adapters/outbound/delphi/collectDelphiFilesAsync.js.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.d.ts +0 -3
- package/dist/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.d.ts.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.js +0 -41
- package/dist/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.js.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.d.ts +0 -3
- package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.d.ts.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.js +0 -41
- package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.js.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.d.ts +0 -3
- package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.d.ts.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.js +0 -50
- package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.js.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.d.ts +0 -3
- package/dist/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.d.ts.map +0 -1
- package/dist/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.js +0 -52
- package/dist/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.js.map +0 -1
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { opendir } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
/*** Collect deterministic Java source files without following symlinks or nested package roots. */
|
|
4
|
-
export async function collectJavaFilesAsync(rootPath, sourceRoots, excludedRoots, signal) {
|
|
5
|
-
const files = await Promise.all(sourceRoots.map((sourceRoot) => visitDirectoryAsync(sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot), new Set(excludedRoots), signal)));
|
|
6
|
-
return [...new Set(files.flat())].sort();
|
|
7
|
-
}
|
|
8
|
-
const excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'target']);
|
|
9
|
-
/*** Recursively collect Java files from one source root. */
|
|
10
|
-
async function visitDirectoryAsync(directory, excludedRoots, signal) {
|
|
11
|
-
signal?.throwIfAborted();
|
|
12
|
-
try {
|
|
13
|
-
const handle = await opendir(directory);
|
|
14
|
-
const files = [];
|
|
15
|
-
for await (const entry of handle) {
|
|
16
|
-
signal?.throwIfAborted();
|
|
17
|
-
const target = path.join(directory, entry.name);
|
|
18
|
-
if (entry.isSymbolicLink())
|
|
19
|
-
continue;
|
|
20
|
-
if (entry.isDirectory()) {
|
|
21
|
-
if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target))
|
|
22
|
-
continue;
|
|
23
|
-
files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));
|
|
24
|
-
}
|
|
25
|
-
else if (entry.isFile() && entry.name.endsWith('.java')) {
|
|
26
|
-
files.push(target);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return files;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
if (isMissingPathError(error))
|
|
33
|
-
return [];
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/*** Treat absent optional detector source roots as empty instead of analysis failures. */
|
|
38
|
-
function isMissingPathError(error) {
|
|
39
|
-
return error instanceof Error && 'code' in error && error.code === 'ENOENT';
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=collectJavaFilesAsync.js.map
|
package/dist/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectJavaFilesAsync.js","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE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B,IAAI,sBAAsB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC;oBAAE,SAAS;gBAClF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;YAC5E,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1D,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,kBAAkB,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACzC,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,0FAA0F;AAC1F,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC9E,CAAC","sourcesContent":["import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Java source files without following symlinks or nested package roots. */\nexport async function collectJavaFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'target']);\n\n/*** Recursively collect Java files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && entry.name.endsWith('.java')) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n"]}
|
package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*** Collect deterministic Kotlin source files without following symlinks or nested package roots. */
|
|
2
|
-
export declare function collectKotlinFilesAsync(rootPath: string, sourceRoots: readonly string[], excludedRoots: readonly string[], signal: AbortSignal | undefined): Promise<readonly string[]>;
|
|
3
|
-
//# sourceMappingURL=collectKotlinFilesAsync.d.ts.map
|
package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectKotlinFilesAsync.d.ts","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.ts"],"names":[],"mappings":"AAGA,qGAAqG;AACrG,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAW5B"}
|
package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { opendir } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
/*** Collect deterministic Kotlin source files without following symlinks or nested package roots. */
|
|
4
|
-
export async function collectKotlinFilesAsync(rootPath, sourceRoots, excludedRoots, signal) {
|
|
5
|
-
const files = await Promise.all(sourceRoots.map((sourceRoot) => visitDirectoryAsync(sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot), new Set(excludedRoots), signal)));
|
|
6
|
-
return [...new Set(files.flat())].sort();
|
|
7
|
-
}
|
|
8
|
-
const excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'target']);
|
|
9
|
-
/*** Recursively collect Kotlin files from one source root. */
|
|
10
|
-
async function visitDirectoryAsync(directory, excludedRoots, signal) {
|
|
11
|
-
signal?.throwIfAborted();
|
|
12
|
-
try {
|
|
13
|
-
const handle = await opendir(directory);
|
|
14
|
-
const files = [];
|
|
15
|
-
for await (const entry of handle) {
|
|
16
|
-
signal?.throwIfAborted();
|
|
17
|
-
const target = path.join(directory, entry.name);
|
|
18
|
-
if (entry.isSymbolicLink())
|
|
19
|
-
continue;
|
|
20
|
-
if (entry.isDirectory()) {
|
|
21
|
-
if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target))
|
|
22
|
-
continue;
|
|
23
|
-
files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));
|
|
24
|
-
}
|
|
25
|
-
else if (entry.isFile() && (entry.name.endsWith('.kt') || entry.name.endsWith('.kts'))) {
|
|
26
|
-
files.push(target);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return files;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
if (isMissingPathError(error))
|
|
33
|
-
return [];
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/*** Treat absent optional detector source roots as empty instead of analysis failures. */
|
|
38
|
-
function isMissingPathError(error) {
|
|
39
|
-
return error instanceof Error && 'code' in error && error.code === 'ENOENT';
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=collectKotlinFilesAsync.js.map
|
package/dist/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectKotlinFilesAsync.js","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,qGAAqG;AACrG,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAAgB,EAChB,WAA8B,EAC9B,aAAgC,EAChC,MAA+B;IAE/B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAC7B,mBAAmB,CACjB,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,EAClE,IAAI,GAAG,CAAC,aAAa,CAAC,EACtB,MAAM,CACP,CACF,CACF,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExF,8DAA8D;AAC9D,KAAK,UAAU,mBAAmB,CAChC,SAAiB,EACjB,aAAkC,EAClC,MAA+B;IAE/B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,IA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'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Kotlin source files without following symlinks or nested package roots. */\nexport async function collectKotlinFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'target']);\n\n/*** Recursively collect Kotlin files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && (entry.name.endsWith('.kt') || entry.name.endsWith('.kts'))) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n"]}
|
package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*** Collect deterministic Python source files without following symlinks or nested package roots. */
|
|
2
|
-
export declare function collectPythonFilesAsync(rootPath: string, sourceRoots: readonly string[], excludedRoots: readonly string[], signal: AbortSignal | undefined): Promise<readonly string[]>;
|
|
3
|
-
//# sourceMappingURL=collectPythonFilesAsync.d.ts.map
|
package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectPythonFilesAsync.d.ts","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.ts"],"names":[],"mappings":"AAGA,qGAAqG;AACrG,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAW5B"}
|
package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { opendir } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
/*** Collect deterministic Python source files without following symlinks or nested package roots. */
|
|
4
|
-
export async function collectPythonFilesAsync(rootPath, sourceRoots, excludedRoots, signal) {
|
|
5
|
-
const files = await Promise.all(sourceRoots.map((sourceRoot) => visitDirectoryAsync(sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot), new Set(excludedRoots), signal)));
|
|
6
|
-
return [...new Set(files.flat())].sort();
|
|
7
|
-
}
|
|
8
|
-
const excludedDirectoryNames = new Set([
|
|
9
|
-
'.git',
|
|
10
|
-
'.mypy_cache',
|
|
11
|
-
'.pytest_cache',
|
|
12
|
-
'.venv',
|
|
13
|
-
'__pycache__',
|
|
14
|
-
'build',
|
|
15
|
-
'dist',
|
|
16
|
-
'venv',
|
|
17
|
-
]);
|
|
18
|
-
/*** Recursively collect Python files from one source root. */
|
|
19
|
-
async function visitDirectoryAsync(directory, excludedRoots, signal) {
|
|
20
|
-
signal?.throwIfAborted();
|
|
21
|
-
try {
|
|
22
|
-
const handle = await opendir(directory);
|
|
23
|
-
const files = [];
|
|
24
|
-
for await (const entry of handle) {
|
|
25
|
-
signal?.throwIfAborted();
|
|
26
|
-
const target = path.join(directory, entry.name);
|
|
27
|
-
if (entry.isSymbolicLink())
|
|
28
|
-
continue;
|
|
29
|
-
if (entry.isDirectory()) {
|
|
30
|
-
if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target))
|
|
31
|
-
continue;
|
|
32
|
-
files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));
|
|
33
|
-
}
|
|
34
|
-
else if (entry.isFile() && (entry.name.endsWith('.py') || entry.name.endsWith('.pyi'))) {
|
|
35
|
-
files.push(target);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return files;
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
if (isMissingPathError(error))
|
|
42
|
-
return [];
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/*** Treat absent optional detector source roots as empty instead of analysis failures. */
|
|
47
|
-
function isMissingPathError(error) {
|
|
48
|
-
return error instanceof Error && 'code' in error && error.code === 'ENOENT';
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=collectPythonFilesAsync.js.map
|
package/dist/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectPythonFilesAsync.js","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,qGAAqG;AACrG,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAAgB,EAChB,WAA8B,EAC9B,aAAgC,EAChC,MAA+B;IAE/B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,WAAW,CAAC,GAAG,CAAC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AAC,CAAC;YAC5E,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;gBACzF,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,kBAAkB,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACzC,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,0FAA0F;AAC1F,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC9E,CAAC","sourcesContent":["import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Python source files without following symlinks or nested package roots. */\nexport async function collectPythonFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set([\n '.git',\n '.mypy_cache',\n '.pytest_cache',\n '.venv',\n '__pycache__',\n 'build',\n 'dist',\n 'venv',\n]);\n\n/*** Recursively collect Python files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && (entry.name.endsWith('.py') || entry.name.endsWith('.pyi'))) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*** Collect deterministic TypeScript source files without following symlinks or nested package roots. */
|
|
2
|
-
export declare function collectTypeScriptFilesAsync(rootPath: string, sourceRoots: readonly string[], excludedRoots: readonly string[], signal: AbortSignal | undefined): Promise<readonly string[]>;
|
|
3
|
-
//# sourceMappingURL=collectTypeScriptFilesAsync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectTypeScriptFilesAsync.d.ts","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.ts"],"names":[],"mappings":"AAGA,yGAAyG;AACzG,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAW5B"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { opendir } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
/*** Collect deterministic TypeScript source files without following symlinks or nested package roots. */
|
|
4
|
-
export async function collectTypeScriptFilesAsync(rootPath, sourceRoots, excludedRoots, signal) {
|
|
5
|
-
const files = await Promise.all(sourceRoots.map((sourceRoot) => visitDirectoryAsync(sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot), new Set(excludedRoots), signal)));
|
|
6
|
-
return [...new Set(files.flat())].sort();
|
|
7
|
-
}
|
|
8
|
-
const excludedDirectoryNames = new Set([
|
|
9
|
-
'.git',
|
|
10
|
-
'.next',
|
|
11
|
-
'build',
|
|
12
|
-
'coverage',
|
|
13
|
-
'dist',
|
|
14
|
-
'node_modules',
|
|
15
|
-
]);
|
|
16
|
-
/*** Recursively collect TypeScript files from one source root. */
|
|
17
|
-
async function visitDirectoryAsync(directory, excludedRoots, signal) {
|
|
18
|
-
signal?.throwIfAborted();
|
|
19
|
-
try {
|
|
20
|
-
const handle = await opendir(directory);
|
|
21
|
-
const files = [];
|
|
22
|
-
for await (const entry of handle) {
|
|
23
|
-
signal?.throwIfAborted();
|
|
24
|
-
const target = path.join(directory, entry.name);
|
|
25
|
-
if (entry.isSymbolicLink())
|
|
26
|
-
continue;
|
|
27
|
-
if (entry.isDirectory()) {
|
|
28
|
-
if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target))
|
|
29
|
-
continue;
|
|
30
|
-
files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));
|
|
31
|
-
}
|
|
32
|
-
else if (entry.isFile() && isTypeScriptFile(entry.name)) {
|
|
33
|
-
files.push(target);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return files;
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
if (isMissingPathError(error))
|
|
40
|
-
return [];
|
|
41
|
-
throw error;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/*** Identify TypeScript source suffixes supported by the first analyzer. */
|
|
45
|
-
function isTypeScriptFile(file) {
|
|
46
|
-
return ['.ts', '.tsx', '.mts', '.cts'].some((extension) => file.endsWith(extension));
|
|
47
|
-
}
|
|
48
|
-
/*** Treat absent optional detector source roots as empty instead of analysis failures. */
|
|
49
|
-
function isMissingPathError(error) {
|
|
50
|
-
return error instanceof Error && 'code' in error && error.code === 'ENOENT';
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=collectTypeScriptFilesAsync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collectTypeScriptFilesAsync.js","sourceRoot":"","sources":["../../../../../../src/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,yGAAyG;AACzG,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,QAAgB,EAChB,WAA8B,EAC9B,aAAgC,EAChC,MAA+B;IAE/B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAC7B,mBAAmB,CACjB,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,EAClE,IAAI,GAAG,CAAC,aAAa,CAAC,EACtB,MAAM,CACP,CACF,CACF,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,MAAM;IACN,cAAc;CACf,CAAC,CAAC;AAEH,kEAAkE;AAClE,KAAK,UAAU,mBAAmB,CAChC,SAAiB,EACjB,aAAkC,EAClC,MAA+B;IAE/B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;QACxC,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,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC9E,CAAC","sourcesContent":["import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic TypeScript source files without following symlinks or nested package roots. */\nexport async function collectTypeScriptFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set([\n '.git',\n '.next',\n 'build',\n 'coverage',\n 'dist',\n 'node_modules',\n]);\n\n/*** Recursively collect TypeScript files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && isTypeScriptFile(entry.name)) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Identify TypeScript source suffixes supported by the first analyzer. */\nfunction isTypeScriptFile(file: string): boolean {\n return ['.ts', '.tsx', '.mts', '.cts'].some((extension) => file.endsWith(extension));\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n"]}
|