@aiready/core 0.5.5 → 0.5.6
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -76,6 +76,7 @@ interface Report {
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
declare const DEFAULT_EXCLUDE: string[];
|
|
79
80
|
declare function scanFiles(options: ScanOptions): Promise<string[]>;
|
|
80
81
|
declare function readFileContent(filePath: string): Promise<string>;
|
|
81
82
|
declare function getFileExtension(filePath: string): string;
|
|
@@ -144,4 +145,4 @@ declare function handleCLIError(error: unknown, commandName: string): never;
|
|
|
144
145
|
*/
|
|
145
146
|
declare function getElapsedTime(startTime: number): string;
|
|
146
147
|
|
|
147
|
-
export { type AIReadyConfig, type ASTNode, type AnalysisResult, type CLIOptions, type Issue, type IssueType, type Location, type Metrics, type Report, type ScanOptions, estimateTokens, extractFunctions, extractImports, getElapsedTime, getFileExtension, handleCLIError, handleJSONOutput, isSourceFile, loadConfig, loadMergedConfig, mergeConfigWithDefaults, parseCode, readFileContent, resolveOutputPath, scanFiles };
|
|
148
|
+
export { type AIReadyConfig, type ASTNode, type AnalysisResult, type CLIOptions, DEFAULT_EXCLUDE, type Issue, type IssueType, type Location, type Metrics, type Report, type ScanOptions, estimateTokens, extractFunctions, extractImports, getElapsedTime, getFileExtension, handleCLIError, handleJSONOutput, isSourceFile, loadConfig, loadMergedConfig, mergeConfigWithDefaults, parseCode, readFileContent, resolveOutputPath, scanFiles };
|
package/dist/index.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ interface Report {
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
declare const DEFAULT_EXCLUDE: string[];
|
|
79
80
|
declare function scanFiles(options: ScanOptions): Promise<string[]>;
|
|
80
81
|
declare function readFileContent(filePath: string): Promise<string>;
|
|
81
82
|
declare function getFileExtension(filePath: string): string;
|
|
@@ -144,4 +145,4 @@ declare function handleCLIError(error: unknown, commandName: string): never;
|
|
|
144
145
|
*/
|
|
145
146
|
declare function getElapsedTime(startTime: number): string;
|
|
146
147
|
|
|
147
|
-
export { type AIReadyConfig, type ASTNode, type AnalysisResult, type CLIOptions, type Issue, type IssueType, type Location, type Metrics, type Report, type ScanOptions, estimateTokens, extractFunctions, extractImports, getElapsedTime, getFileExtension, handleCLIError, handleJSONOutput, isSourceFile, loadConfig, loadMergedConfig, mergeConfigWithDefaults, parseCode, readFileContent, resolveOutputPath, scanFiles };
|
|
148
|
+
export { type AIReadyConfig, type ASTNode, type AnalysisResult, type CLIOptions, DEFAULT_EXCLUDE, type Issue, type IssueType, type Location, type Metrics, type Report, type ScanOptions, estimateTokens, extractFunctions, extractImports, getElapsedTime, getFileExtension, handleCLIError, handleJSONOutput, isSourceFile, loadConfig, loadMergedConfig, mergeConfigWithDefaults, parseCode, readFileContent, resolveOutputPath, scanFiles };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
DEFAULT_EXCLUDE: () => DEFAULT_EXCLUDE,
|
|
23
24
|
estimateTokens: () => estimateTokens,
|
|
24
25
|
extractFunctions: () => extractFunctions,
|
|
25
26
|
extractImports: () => extractImports,
|
|
@@ -85,11 +86,12 @@ async function scanFiles(options) {
|
|
|
85
86
|
const {
|
|
86
87
|
rootDir,
|
|
87
88
|
include = ["**/*.{ts,tsx,js,jsx,py,java}"],
|
|
88
|
-
exclude
|
|
89
|
+
exclude
|
|
89
90
|
} = options;
|
|
91
|
+
const finalExclude = exclude ? [.../* @__PURE__ */ new Set([...DEFAULT_EXCLUDE, ...exclude])] : DEFAULT_EXCLUDE;
|
|
90
92
|
const files = await (0, import_glob.glob)(include, {
|
|
91
93
|
cwd: rootDir,
|
|
92
|
-
ignore:
|
|
94
|
+
ignore: finalExclude,
|
|
93
95
|
absolute: true
|
|
94
96
|
});
|
|
95
97
|
return files;
|
|
@@ -235,6 +237,7 @@ function getElapsedTime(startTime) {
|
|
|
235
237
|
}
|
|
236
238
|
// Annotate the CommonJS export names for ESM import in node:
|
|
237
239
|
0 && (module.exports = {
|
|
240
|
+
DEFAULT_EXCLUDE,
|
|
238
241
|
estimateTokens,
|
|
239
242
|
extractFunctions,
|
|
240
243
|
extractImports,
|
package/dist/index.mjs
CHANGED
|
@@ -52,11 +52,12 @@ async function scanFiles(options) {
|
|
|
52
52
|
const {
|
|
53
53
|
rootDir,
|
|
54
54
|
include = ["**/*.{ts,tsx,js,jsx,py,java}"],
|
|
55
|
-
exclude
|
|
55
|
+
exclude
|
|
56
56
|
} = options;
|
|
57
|
+
const finalExclude = exclude ? [.../* @__PURE__ */ new Set([...DEFAULT_EXCLUDE, ...exclude])] : DEFAULT_EXCLUDE;
|
|
57
58
|
const files = await glob(include, {
|
|
58
59
|
cwd: rootDir,
|
|
59
|
-
ignore:
|
|
60
|
+
ignore: finalExclude,
|
|
60
61
|
absolute: true
|
|
61
62
|
});
|
|
62
63
|
return files;
|
|
@@ -201,6 +202,7 @@ function getElapsedTime(startTime) {
|
|
|
201
202
|
return ((Date.now() - startTime) / 1e3).toFixed(2);
|
|
202
203
|
}
|
|
203
204
|
export {
|
|
205
|
+
DEFAULT_EXCLUDE,
|
|
204
206
|
estimateTokens,
|
|
205
207
|
extractFunctions,
|
|
206
208
|
extractImports,
|