@aiready/core 0.9.4 → 0.9.5
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/__tests__/parser-factory.test.d.ts +5 -0
- package/dist/__tests__/parser-factory.test.d.ts.map +1 -0
- package/dist/__tests__/parser-factory.test.js +58 -0
- package/dist/__tests__/parser-factory.test.js.map +1 -0
- package/dist/__tests__/python-parser.test.d.ts +5 -0
- package/dist/__tests__/python-parser.test.d.ts.map +1 -0
- package/dist/__tests__/python-parser.test.js +192 -0
- package/dist/__tests__/python-parser.test.js.map +1 -0
- package/dist/__tests__/scoring.test.d.ts +2 -0
- package/dist/__tests__/scoring.test.d.ts.map +1 -0
- package/dist/__tests__/scoring.test.js +180 -0
- package/dist/__tests__/scoring.test.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/parser-factory.d.ts +69 -0
- package/dist/parsers/parser-factory.d.ts.map +1 -0
- package/dist/parsers/parser-factory.js +114 -0
- package/dist/parsers/parser-factory.js.map +1 -0
- package/dist/parsers/python-parser.d.ts +42 -0
- package/dist/parsers/python-parser.d.ts.map +1 -0
- package/dist/parsers/python-parser.js +241 -0
- package/dist/parsers/python-parser.js.map +1 -0
- package/dist/parsers/typescript-parser.d.ts +17 -0
- package/dist/parsers/typescript-parser.d.ts.map +1 -0
- package/dist/parsers/typescript-parser.js +216 -0
- package/dist/parsers/typescript-parser.js.map +1 -0
- package/dist/scoring.d.ts +110 -0
- package/dist/scoring.d.ts.map +1 -0
- package/dist/scoring.js +195 -0
- package/dist/scoring.js.map +1 -0
- package/dist/types/language.d.ts +161 -0
- package/dist/types/language.d.ts.map +1 -0
- package/dist/types/language.js +45 -0
- package/dist/types/language.js.map +1 -0
- package/dist/types.d.ts +104 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/ast-parser.d.ts +50 -0
- package/dist/utils/ast-parser.d.ts.map +1 -0
- package/dist/utils/ast-parser.js +216 -0
- package/dist/utils/ast-parser.js.map +1 -0
- package/dist/utils/cli-helpers.d.ts +37 -0
- package/dist/utils/cli-helpers.d.ts.map +1 -0
- package/dist/utils/cli-helpers.js +76 -0
- package/dist/utils/cli-helpers.js.map +1 -0
- package/dist/utils/config.d.ts +4 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +82 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/file-scanner.d.ts +16 -0
- package/dist/utils/file-scanner.d.ts.map +1 -0
- package/dist/utils/file-scanner.js +100 -0
- package/dist/utils/file-scanner.js.map +1 -0
- package/dist/utils/metrics.d.ts +6 -0
- package/dist/utils/metrics.d.ts.map +1 -0
- package/dist/utils/metrics.js +8 -0
- package/dist/utils/metrics.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ExportWithImports {
|
|
2
|
+
name: string;
|
|
3
|
+
type: 'function' | 'class' | 'const' | 'type' | 'interface' | 'default';
|
|
4
|
+
imports: string[];
|
|
5
|
+
dependencies: string[];
|
|
6
|
+
typeReferences: string[];
|
|
7
|
+
loc?: {
|
|
8
|
+
start: {
|
|
9
|
+
line: number;
|
|
10
|
+
column: number;
|
|
11
|
+
};
|
|
12
|
+
end: {
|
|
13
|
+
line: number;
|
|
14
|
+
column: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface FileImport {
|
|
19
|
+
source: string;
|
|
20
|
+
specifiers: string[];
|
|
21
|
+
isTypeOnly: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse TypeScript/JavaScript file and extract exports with their import dependencies
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseFileExports(code: string, filePath: string): {
|
|
27
|
+
exports: ExportWithImports[];
|
|
28
|
+
imports: FileImport[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Calculate import-based similarity between two exports (Jaccard index)
|
|
32
|
+
*/
|
|
33
|
+
export declare function calculateImportSimilarity(export1: ExportWithImports, export2: ExportWithImports): number;
|
|
34
|
+
export interface ASTNode {
|
|
35
|
+
type: string;
|
|
36
|
+
loc?: {
|
|
37
|
+
start: {
|
|
38
|
+
line: number;
|
|
39
|
+
column: number;
|
|
40
|
+
};
|
|
41
|
+
end: {
|
|
42
|
+
line: number;
|
|
43
|
+
column: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export declare function parseCode(code: string, language: string): ASTNode | null;
|
|
48
|
+
export declare function extractFunctions(ast: ASTNode): ASTNode[];
|
|
49
|
+
export declare function extractImports(ast: ASTNode): string[];
|
|
50
|
+
//# sourceMappingURL=ast-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-parser.d.ts","sourceRoot":"","sources":["../../src/utils/ast-parser.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IACxE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QACxC,GAAG,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;KACvC,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG;IAChE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB,CAiBA;AA0ID;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,iBAAiB,GACzB,MAAM,CAYR;AAsDD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QACxC,GAAG,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;KACvC,CAAC;CACH;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAGxE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,EAAE,CAGxD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAGrD"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { parse } from '@typescript-eslint/typescript-estree';
|
|
2
|
+
/**
|
|
3
|
+
* Parse TypeScript/JavaScript file and extract exports with their import dependencies
|
|
4
|
+
*/
|
|
5
|
+
export function parseFileExports(code, filePath) {
|
|
6
|
+
try {
|
|
7
|
+
const ast = parse(code, {
|
|
8
|
+
loc: true,
|
|
9
|
+
range: true,
|
|
10
|
+
jsx: filePath.endsWith('.tsx') || filePath.endsWith('.jsx'),
|
|
11
|
+
filePath,
|
|
12
|
+
});
|
|
13
|
+
const imports = extractFileImports(ast);
|
|
14
|
+
const exports = extractExportsWithDependencies(ast, imports);
|
|
15
|
+
return { exports, imports };
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
// Fallback to empty if parsing fails
|
|
19
|
+
return { exports: [], imports: [] };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Extract all imports from the file
|
|
24
|
+
*/
|
|
25
|
+
function extractFileImports(ast) {
|
|
26
|
+
const imports = [];
|
|
27
|
+
for (const node of ast.body) {
|
|
28
|
+
if (node.type === 'ImportDeclaration') {
|
|
29
|
+
const source = node.source.value;
|
|
30
|
+
const specifiers = [];
|
|
31
|
+
const isTypeOnly = node.importKind === 'type';
|
|
32
|
+
for (const spec of node.specifiers) {
|
|
33
|
+
if (spec.type === 'ImportSpecifier') {
|
|
34
|
+
const imported = spec.imported;
|
|
35
|
+
const importName = imported.type === 'Identifier' ? imported.name : imported.value;
|
|
36
|
+
specifiers.push(importName);
|
|
37
|
+
}
|
|
38
|
+
else if (spec.type === 'ImportDefaultSpecifier') {
|
|
39
|
+
specifiers.push('default');
|
|
40
|
+
}
|
|
41
|
+
else if (spec.type === 'ImportNamespaceSpecifier') {
|
|
42
|
+
specifiers.push('*');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
imports.push({ source, specifiers, isTypeOnly });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return imports;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Extract exports and their import dependencies
|
|
52
|
+
*/
|
|
53
|
+
function extractExportsWithDependencies(ast, fileImports) {
|
|
54
|
+
const exports = [];
|
|
55
|
+
const importedNames = new Set(fileImports.flatMap(imp => imp.specifiers));
|
|
56
|
+
for (const node of ast.body) {
|
|
57
|
+
if (node.type === 'ExportNamedDeclaration') {
|
|
58
|
+
if (node.declaration) {
|
|
59
|
+
const exportNodes = extractFromDeclaration(node.declaration);
|
|
60
|
+
for (const exp of exportNodes) {
|
|
61
|
+
const usedImports = findUsedImports(node.declaration, importedNames);
|
|
62
|
+
const typeReferences = extractTypeReferences(node.declaration);
|
|
63
|
+
exports.push({
|
|
64
|
+
...exp,
|
|
65
|
+
imports: usedImports,
|
|
66
|
+
dependencies: [],
|
|
67
|
+
typeReferences,
|
|
68
|
+
loc: node.loc,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else if (node.type === 'ExportDefaultDeclaration') {
|
|
74
|
+
const usedImports = findUsedImports(node.declaration, importedNames);
|
|
75
|
+
const typeReferences = extractTypeReferences(node.declaration);
|
|
76
|
+
exports.push({
|
|
77
|
+
name: 'default',
|
|
78
|
+
type: 'default',
|
|
79
|
+
imports: usedImports,
|
|
80
|
+
dependencies: [],
|
|
81
|
+
typeReferences,
|
|
82
|
+
loc: node.loc,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return exports;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Extract export information from a declaration
|
|
90
|
+
*/
|
|
91
|
+
function extractFromDeclaration(declaration) {
|
|
92
|
+
const results = [];
|
|
93
|
+
if (declaration.type === 'FunctionDeclaration' && 'id' in declaration && declaration.id) {
|
|
94
|
+
results.push({ name: declaration.id.name, type: 'function' });
|
|
95
|
+
}
|
|
96
|
+
else if (declaration.type === 'ClassDeclaration' && 'id' in declaration && declaration.id) {
|
|
97
|
+
results.push({ name: declaration.id.name, type: 'class' });
|
|
98
|
+
}
|
|
99
|
+
else if (declaration.type === 'VariableDeclaration') {
|
|
100
|
+
for (const declarator of declaration.declarations) {
|
|
101
|
+
if (declarator.id.type === 'Identifier') {
|
|
102
|
+
results.push({ name: declarator.id.name, type: 'const' });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else if (declaration.type === 'TSTypeAliasDeclaration') {
|
|
107
|
+
results.push({ name: declaration.id.name, type: 'type' });
|
|
108
|
+
}
|
|
109
|
+
else if (declaration.type === 'TSInterfaceDeclaration') {
|
|
110
|
+
results.push({ name: declaration.id.name, type: 'interface' });
|
|
111
|
+
}
|
|
112
|
+
return results;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Find which imports are used within a node
|
|
116
|
+
*/
|
|
117
|
+
function findUsedImports(node, importedNames) {
|
|
118
|
+
const usedImports = new Set();
|
|
119
|
+
function visit(n) {
|
|
120
|
+
if (n.type === 'Identifier' && importedNames.has(n.name)) {
|
|
121
|
+
usedImports.add(n.name);
|
|
122
|
+
}
|
|
123
|
+
// Recursively visit child nodes
|
|
124
|
+
for (const key in n) {
|
|
125
|
+
const value = n[key];
|
|
126
|
+
if (value && typeof value === 'object') {
|
|
127
|
+
if (Array.isArray(value)) {
|
|
128
|
+
value.forEach(child => {
|
|
129
|
+
if (child && typeof child === 'object' && 'type' in child) {
|
|
130
|
+
visit(child);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
else if ('type' in value) {
|
|
135
|
+
visit(value);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
visit(node);
|
|
141
|
+
return Array.from(usedImports);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Calculate import-based similarity between two exports (Jaccard index)
|
|
145
|
+
*/
|
|
146
|
+
export function calculateImportSimilarity(export1, export2) {
|
|
147
|
+
if (export1.imports.length === 0 && export2.imports.length === 0) {
|
|
148
|
+
return 1; // Both have no imports = perfectly similar
|
|
149
|
+
}
|
|
150
|
+
const set1 = new Set(export1.imports);
|
|
151
|
+
const set2 = new Set(export2.imports);
|
|
152
|
+
const intersection = new Set([...set1].filter(x => set2.has(x)));
|
|
153
|
+
const union = new Set([...set1, ...set2]);
|
|
154
|
+
return intersection.size / union.size;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Extract TypeScript type references from a node
|
|
158
|
+
* Collects all type identifiers used in type annotations
|
|
159
|
+
*/
|
|
160
|
+
function extractTypeReferences(node) {
|
|
161
|
+
const types = new Set();
|
|
162
|
+
function visit(n) {
|
|
163
|
+
if (!n || typeof n !== 'object')
|
|
164
|
+
return;
|
|
165
|
+
// Type references
|
|
166
|
+
if (n.type === 'TSTypeReference' && n.typeName) {
|
|
167
|
+
if (n.typeName.type === 'Identifier') {
|
|
168
|
+
types.add(n.typeName.name);
|
|
169
|
+
}
|
|
170
|
+
else if (n.typeName.type === 'TSQualifiedName') {
|
|
171
|
+
// Handle qualified names like A.B.C
|
|
172
|
+
let current = n.typeName;
|
|
173
|
+
while (current.type === 'TSQualifiedName') {
|
|
174
|
+
if (current.right?.type === 'Identifier') {
|
|
175
|
+
types.add(current.right.name);
|
|
176
|
+
}
|
|
177
|
+
current = current.left;
|
|
178
|
+
}
|
|
179
|
+
if (current.type === 'Identifier') {
|
|
180
|
+
types.add(current.name);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// Interface references
|
|
185
|
+
if (n.type === 'TSInterfaceHeritage' && n.expression) {
|
|
186
|
+
if (n.expression.type === 'Identifier') {
|
|
187
|
+
types.add(n.expression.name);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// Recursively visit children
|
|
191
|
+
for (const key of Object.keys(n)) {
|
|
192
|
+
const value = n[key];
|
|
193
|
+
if (Array.isArray(value)) {
|
|
194
|
+
value.forEach(visit);
|
|
195
|
+
}
|
|
196
|
+
else if (value && typeof value === 'object') {
|
|
197
|
+
visit(value);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
visit(node);
|
|
202
|
+
return Array.from(types);
|
|
203
|
+
}
|
|
204
|
+
export function parseCode(code, language) {
|
|
205
|
+
// Deprecated: Use parseFileExports instead
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
export function extractFunctions(ast) {
|
|
209
|
+
// Deprecated
|
|
210
|
+
return [];
|
|
211
|
+
}
|
|
212
|
+
export function extractImports(ast) {
|
|
213
|
+
// Deprecated
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
//# sourceMapping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,CAAC,UAAU,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBACvC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QAED,6BAA6B;QAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACjC,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACrB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;iBAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAWD,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,QAAgB;IACtD,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,aAAa;IACb,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,aAAa;IACb,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common CLI configuration interface
|
|
3
|
+
*/
|
|
4
|
+
export interface CLIOptions {
|
|
5
|
+
rootDir: string;
|
|
6
|
+
include?: string[];
|
|
7
|
+
exclude?: string[];
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolve output file path, defaulting to .aiready directory
|
|
12
|
+
* Creates parent directories if they don't exist.
|
|
13
|
+
* @param userPath - User-provided output path (optional)
|
|
14
|
+
* @param defaultFilename - Default filename to use
|
|
15
|
+
* @param workingDir - Working directory (default: process.cwd())
|
|
16
|
+
* @returns Resolved absolute path
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveOutputPath(userPath: string | undefined, defaultFilename: string, workingDir?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Load and merge configuration with CLI options
|
|
21
|
+
*/
|
|
22
|
+
export declare function loadMergedConfig<T extends Record<string, any>>(directory: string, defaults: T, cliOptions: Partial<T>): Promise<T & {
|
|
23
|
+
rootDir: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Handle JSON output for CLI commands
|
|
27
|
+
*/
|
|
28
|
+
export declare function handleJSONOutput(data: any, outputFile?: string, successMessage?: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Common error handler for CLI commands
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleCLIError(error: unknown, commandName: string): never;
|
|
33
|
+
/**
|
|
34
|
+
* Calculate elapsed time and format for display
|
|
35
|
+
*/
|
|
36
|
+
export declare function getElapsedTime(startTime: number): string;
|
|
37
|
+
//# sourceMappingURL=cli-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/cli-helpers.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,eAAe,EAAE,MAAM,EACvB,UAAU,GAAE,MAAsB,GACjC,MAAM,CAmBR;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClE,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAelC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,GAAG,EACT,UAAU,CAAC,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAYN;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,KAAK,CAGzE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
2
|
+
import { join, dirname } from 'path';
|
|
3
|
+
import { loadConfig, mergeConfigWithDefaults } from '../index';
|
|
4
|
+
/**
|
|
5
|
+
* Resolve output file path, defaulting to .aiready directory
|
|
6
|
+
* Creates parent directories if they don't exist.
|
|
7
|
+
* @param userPath - User-provided output path (optional)
|
|
8
|
+
* @param defaultFilename - Default filename to use
|
|
9
|
+
* @param workingDir - Working directory (default: process.cwd())
|
|
10
|
+
* @returns Resolved absolute path
|
|
11
|
+
*/
|
|
12
|
+
export function resolveOutputPath(userPath, defaultFilename, workingDir = process.cwd()) {
|
|
13
|
+
let outputPath;
|
|
14
|
+
if (userPath) {
|
|
15
|
+
// User provided a path, use it as-is
|
|
16
|
+
outputPath = userPath;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
// Default to .aiready directory
|
|
20
|
+
const aireadyDir = join(workingDir, '.aiready');
|
|
21
|
+
outputPath = join(aireadyDir, defaultFilename);
|
|
22
|
+
}
|
|
23
|
+
// Ensure parent directory exists (works for both default and custom paths)
|
|
24
|
+
const parentDir = dirname(outputPath);
|
|
25
|
+
if (!existsSync(parentDir)) {
|
|
26
|
+
mkdirSync(parentDir, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
return outputPath;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Load and merge configuration with CLI options
|
|
32
|
+
*/
|
|
33
|
+
export async function loadMergedConfig(directory, defaults, cliOptions) {
|
|
34
|
+
// Load config file if it exists
|
|
35
|
+
const config = await loadConfig(directory);
|
|
36
|
+
// Merge config with defaults
|
|
37
|
+
const mergedConfig = mergeConfigWithDefaults(config, defaults);
|
|
38
|
+
// Override with CLI options (CLI takes precedence)
|
|
39
|
+
const result = {
|
|
40
|
+
...mergedConfig,
|
|
41
|
+
...cliOptions,
|
|
42
|
+
rootDir: directory,
|
|
43
|
+
};
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Handle JSON output for CLI commands
|
|
48
|
+
*/
|
|
49
|
+
export function handleJSONOutput(data, outputFile, successMessage) {
|
|
50
|
+
if (outputFile) {
|
|
51
|
+
// Ensure directory exists
|
|
52
|
+
const dir = dirname(outputFile);
|
|
53
|
+
if (!existsSync(dir)) {
|
|
54
|
+
mkdirSync(dir, { recursive: true });
|
|
55
|
+
}
|
|
56
|
+
writeFileSync(outputFile, JSON.stringify(data, null, 2));
|
|
57
|
+
console.log(successMessage || `✅ Results saved to ${outputFile}`);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
console.log(JSON.stringify(data, null, 2));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Common error handler for CLI commands
|
|
65
|
+
*/
|
|
66
|
+
export function handleCLIError(error, commandName) {
|
|
67
|
+
console.error(`❌ ${commandName} failed:`, error);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Calculate elapsed time and format for display
|
|
72
|
+
*/
|
|
73
|
+
export function getElapsedTime(startTime) {
|
|
74
|
+
return ((Date.now() - startTime) / 1000).toFixed(2);
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=cli-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-helpers.js","sourceRoot":"","sources":["../../src/utils/cli-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAY/D;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAA4B,EAC5B,eAAuB,EACvB,aAAqB,OAAO,CAAC,GAAG,EAAE;IAElC,IAAI,UAAkB,CAAC;IAEvB,IAAI,QAAQ,EAAE,CAAC;QACb,qCAAqC;QACrC,UAAU,GAAG,QAAQ,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,gCAAgC;QAChC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAChD,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IACjD,CAAC;IAED,2EAA2E;IAC3E,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,SAAiB,EACjB,QAAW,EACX,UAAsB;IAEtB,gCAAgC;IAChC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;IAE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ACtD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AIReadyConfig } from '../types';
|
|
2
|
+
export declare function loadConfig(rootDir: string): Promise<AIReadyConfig | null>;
|
|
3
|
+
export declare function mergeConfigWithDefaults(userConfig: AIReadyConfig | null, defaults: any): any;
|
|
4
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAW9C,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA4C/E;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,aAAa,GAAG,IAAI,EAChC,QAAQ,EAAE,GAAG,GACZ,GAAG,CA+BL"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'fs';
|
|
2
|
+
import { join, resolve, dirname } from 'path';
|
|
3
|
+
import { pathToFileURL } from 'url';
|
|
4
|
+
const CONFIG_FILES = [
|
|
5
|
+
'aiready.json',
|
|
6
|
+
'aiready.config.json',
|
|
7
|
+
'.aiready.json',
|
|
8
|
+
'.aireadyrc.json',
|
|
9
|
+
'aiready.config.js',
|
|
10
|
+
'.aireadyrc.js'
|
|
11
|
+
];
|
|
12
|
+
export async function loadConfig(rootDir) {
|
|
13
|
+
// Search upwards from the provided directory to find the nearest config
|
|
14
|
+
let currentDir = resolve(rootDir);
|
|
15
|
+
while (true) {
|
|
16
|
+
for (const configFile of CONFIG_FILES) {
|
|
17
|
+
const configPath = join(currentDir, configFile);
|
|
18
|
+
if (existsSync(configPath)) {
|
|
19
|
+
try {
|
|
20
|
+
let config;
|
|
21
|
+
if (configFile.endsWith('.js')) {
|
|
22
|
+
// For JS files, use dynamic ES import
|
|
23
|
+
const fileUrl = pathToFileURL(configPath).href;
|
|
24
|
+
const module = await import(`${fileUrl}?t=${Date.now()}`);
|
|
25
|
+
config = module.default || module;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
// For JSON files, parse them
|
|
29
|
+
const content = readFileSync(configPath, 'utf-8');
|
|
30
|
+
config = JSON.parse(content);
|
|
31
|
+
}
|
|
32
|
+
// Basic validation
|
|
33
|
+
if (typeof config !== 'object' || config === null) {
|
|
34
|
+
throw new Error('Config must be an object');
|
|
35
|
+
}
|
|
36
|
+
return config;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
40
|
+
throw new Error(`Failed to load config from ${configPath}: ${errorMessage}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const parent = dirname(currentDir);
|
|
45
|
+
if (parent === currentDir) {
|
|
46
|
+
break; // Reached filesystem root
|
|
47
|
+
}
|
|
48
|
+
currentDir = parent;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
export function mergeConfigWithDefaults(userConfig, defaults) {
|
|
53
|
+
if (!userConfig)
|
|
54
|
+
return defaults;
|
|
55
|
+
const result = { ...defaults };
|
|
56
|
+
// Merge scan options
|
|
57
|
+
if (userConfig.scan) {
|
|
58
|
+
if (userConfig.scan.include)
|
|
59
|
+
result.include = userConfig.scan.include;
|
|
60
|
+
if (userConfig.scan.exclude)
|
|
61
|
+
result.exclude = userConfig.scan.exclude;
|
|
62
|
+
}
|
|
63
|
+
// Merge tool-specific options
|
|
64
|
+
if (userConfig.tools) {
|
|
65
|
+
for (const [toolName, toolConfig] of Object.entries(userConfig.tools)) {
|
|
66
|
+
if (typeof toolConfig === 'object' && toolConfig !== null) {
|
|
67
|
+
// For pattern-detect and context-analyzer tools, merge options directly into result
|
|
68
|
+
if (toolName === 'pattern-detect' || toolName === 'context-analyzer') {
|
|
69
|
+
Object.assign(result, toolConfig);
|
|
70
|
+
}
|
|
71
|
+
// Add other tool configs under their names for future use
|
|
72
|
+
result[toolName] = { ...result[toolName], ...toolConfig };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Merge output preferences
|
|
77
|
+
if (userConfig.output) {
|
|
78
|
+
result.output = { ...result.output, ...userConfig.output };
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAGpC,MAAM,YAAY,GAAG;IACnB,cAAc;IACd,qBAAqB;IACrB,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;CAChB,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAe;IAC9C,wEAAwE;IACxE,IAAI,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,IAAI,EAAE,CAAC;QACZ,KAAK,MAAM,UAAU,IAAI,YAAY,EAAE,CAAC;YACtC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YAEhD,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC3B,IAAI,CAAC;oBACH,IAAI,MAAqB,CAAC;oBAE1B,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC/B,sCAAsC;wBACtC,MAAM,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;wBAC/C,MAAM,MAAM,GAAG,MAAM,MAAM,CA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O;YAAE,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;QACtE,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO;YAAE,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;IACxE,CAAC;IAED,8BAA8B;IAC9B,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,KAAK,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACtE,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBAC1D,oFAAoF;gBACpF,IAAI,QAAQ,KAAK,gBAAgB,IAAI,QAAQ,KAAK,kBAAkB,EAAE,CAAC;oBACrE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;gBACpC,CAAC;gBACD,0DAA0D;gBAC1D,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC;YAC5D,CAAC;QACH,CAAC;IACH,CAAC;IAED,2BAA2B;IAC3B,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;QACtB,MAAM,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;IAC7D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScanOptions } from '../types';
|
|
2
|
+
export declare const DEFAULT_EXCLUDE: string[];
|
|
3
|
+
/**
|
|
4
|
+
* Scan files in a directory using glob patterns
|
|
5
|
+
*
|
|
6
|
+
* Note: This scanner supports multiple languages (.ts, .tsx, .js, .jsx, .py, .java, etc.)
|
|
7
|
+
* Individual tools can filter to their supported languages if needed.
|
|
8
|
+
*
|
|
9
|
+
* @param options - Scan configuration
|
|
10
|
+
* @returns Array of absolute file paths matching the patterns
|
|
11
|
+
*/
|
|
12
|
+
export declare function scanFiles(options: ScanOptions): Promise<string[]>;
|
|
13
|
+
export declare function readFileContent(filePath: string): Promise<string>;
|
|
14
|
+
export declare function getFileExtension(filePath: string): string;
|
|
15
|
+
export declare function isSourceFile(filePath: string): boolean;
|
|
16
|
+
//# sourceMappingURL=file-scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-scanner.d.ts","sourceRoot":"","sources":["../../src/utils/file-scanner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,eAAe,UAkD3B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCvE;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGtD"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { glob } from 'glob';
|
|
2
|
+
import { readFile } from 'fs/promises';
|
|
3
|
+
import { existsSync } from 'fs';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
export const DEFAULT_EXCLUDE = [
|
|
6
|
+
// Dependencies
|
|
7
|
+
'**/node_modules/**',
|
|
8
|
+
// Build outputs
|
|
9
|
+
'**/dist/**',
|
|
10
|
+
'**/build/**',
|
|
11
|
+
'**/out/**',
|
|
12
|
+
'**/output/**',
|
|
13
|
+
'**/target/**',
|
|
14
|
+
'**/bin/**',
|
|
15
|
+
'**/obj/**',
|
|
16
|
+
'**/cdk.out/**',
|
|
17
|
+
// Framework-specific build dirs
|
|
18
|
+
'**/.next/**',
|
|
19
|
+
'**/.nuxt/**',
|
|
20
|
+
'**/.vuepress/**',
|
|
21
|
+
'**/.cache/**',
|
|
22
|
+
'**/.turbo/**',
|
|
23
|
+
// Test files and coverage
|
|
24
|
+
'**/*.test.*',
|
|
25
|
+
'**/*.spec.*',
|
|
26
|
+
'**/__tests__/**',
|
|
27
|
+
'**/test/**',
|
|
28
|
+
'**/tests/**',
|
|
29
|
+
'**/coverage/**',
|
|
30
|
+
'**/.nyc_output/**',
|
|
31
|
+
'**/.jest/**',
|
|
32
|
+
// Version control and IDE
|
|
33
|
+
'**/.git/**',
|
|
34
|
+
'**/.svn/**',
|
|
35
|
+
'**/.hg/**',
|
|
36
|
+
'**/.vscode/**',
|
|
37
|
+
'**/.idea/**',
|
|
38
|
+
'**/*.swp',
|
|
39
|
+
'**/*.swo',
|
|
40
|
+
// Build artifacts and minified files
|
|
41
|
+
'**/*.min.js',
|
|
42
|
+
'**/*.min.css',
|
|
43
|
+
'**/*.bundle.js',
|
|
44
|
+
'**/*.tsbuildinfo',
|
|
45
|
+
// Logs and temporary files
|
|
46
|
+
'**/logs/**',
|
|
47
|
+
'**/*.log',
|
|
48
|
+
'**/.DS_Store',
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* Scan files in a directory using glob patterns
|
|
52
|
+
*
|
|
53
|
+
* Note: This scanner supports multiple languages (.ts, .tsx, .js, .jsx, .py, .java, etc.)
|
|
54
|
+
* Individual tools can filter to their supported languages if needed.
|
|
55
|
+
*
|
|
56
|
+
* @param options - Scan configuration
|
|
57
|
+
* @returns Array of absolute file paths matching the patterns
|
|
58
|
+
*/
|
|
59
|
+
export async function scanFiles(options) {
|
|
60
|
+
const { rootDir, include = ['**/*.{ts,tsx,js,jsx,py,java,go,rs,cs}'], // Multi-language support
|
|
61
|
+
exclude, } = options;
|
|
62
|
+
// Always merge user excludes with defaults to ensure critical paths like
|
|
63
|
+
// cdk.out, node_modules, build dirs are excluded
|
|
64
|
+
// Load .aireadyignore from repository root if present and merge
|
|
65
|
+
const ignoreFilePath = join(rootDir || '.', '.aireadyignore');
|
|
66
|
+
let ignoreFromFile = [];
|
|
67
|
+
if (existsSync(ignoreFilePath)) {
|
|
68
|
+
try {
|
|
69
|
+
const txt = await readFile(ignoreFilePath, 'utf-8');
|
|
70
|
+
ignoreFromFile = txt
|
|
71
|
+
.split(/\r?\n/)
|
|
72
|
+
.map(s => s.trim())
|
|
73
|
+
.filter(Boolean)
|
|
74
|
+
.filter(l => !l.startsWith('#'))
|
|
75
|
+
.filter(l => !l.startsWith('!')); // ignore negations for now
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
// noop - fall back to defaults if file can't be read
|
|
79
|
+
ignoreFromFile = [];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const finalExclude = [...new Set([...(exclude || []), ...ignoreFromFile, ...DEFAULT_EXCLUDE])];
|
|
83
|
+
const files = await glob(include, {
|
|
84
|
+
cwd: rootDir,
|
|
85
|
+
ignore: finalExclude,
|
|
86
|
+
absolute: true,
|
|
87
|
+
});
|
|
88
|
+
return files;
|
|
89
|
+
}
|
|
90
|
+
export async function readFileContent(filePath) {
|
|
91
|
+
return readFile(filePath, 'utf-8');
|
|
92
|
+
}
|
|
93
|
+
export function getFileExtension(filePath) {
|
|
94
|
+
return filePath.split('.').pop() || '';
|
|
95
|
+
}
|
|
96
|
+
export function isSourceFile(filePath) {
|
|
97
|
+
const ext = getFileExtension(filePath);
|
|
98
|
+
return ['ts', 'tsx', 'js', 'jsx', 'py', 'java', 'go', 'rs'].includes(ext);
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=file-scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-scanner.js","sourceRoot":"","sources":["../../src/utils/file-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;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