js-code-detector 0.0.56 → 0.0.57
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/cjs/index.d.ts +3 -2
- package/dist/cjs/services/DetectService.d.ts +2 -1
- package/dist/cjs/services/DetectService.js +3 -2
- package/dist/cjs/services/projectServiceClass/UmiProjectService.js +1 -1
- package/dist/cjs/services/projectServiceClass/ViteProjectService.js +1 -1
- package/dist/cjs/services/projectServiceClass/VueProjectService.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function gitDiffDetect(): Promise<{
|
|
|
20
20
|
effectsDownstream: string[];
|
|
21
21
|
}[];
|
|
22
22
|
}[];
|
|
23
|
-
type: "
|
|
23
|
+
type: "delete" | "modify" | "add";
|
|
24
24
|
filesDependsOnMe: string[];
|
|
25
25
|
undefinedIdentifiers: string[];
|
|
26
26
|
filePath: string;
|
|
@@ -30,5 +30,6 @@ export { isRepoTypeSupported } from "./util/shared/getRepoSupportFlag";
|
|
|
30
30
|
export declare function runDiffDetect(compareUrl?: string, token?: string): Promise<{
|
|
31
31
|
error: Error | null;
|
|
32
32
|
repoType: string;
|
|
33
|
-
effectedImportUsage: [string, string][]
|
|
33
|
+
effectedImportUsage: [string, string][];
|
|
34
|
+
relatedExportUsage: import("src/util/ast_util/helper/findRelateUsageOfExport").RelateUsageOfExport[];
|
|
34
35
|
}>;
|
|
@@ -32,6 +32,7 @@ export declare class DetectService {
|
|
|
32
32
|
formatResult(): {
|
|
33
33
|
error: Error | null;
|
|
34
34
|
repoType: string;
|
|
35
|
-
effectedImportUsage: [string, string][]
|
|
35
|
+
effectedImportUsage: [string, string][];
|
|
36
|
+
relatedExportUsage: import("src/util/ast_util/helper/findRelateUsageOfExport").RelateUsageOfExport[];
|
|
36
37
|
};
|
|
37
38
|
}
|
|
@@ -192,11 +192,12 @@ var DetectService = class {
|
|
|
192
192
|
formatResult() {
|
|
193
193
|
var _a;
|
|
194
194
|
const repoType = this.gitInfo.repoType;
|
|
195
|
-
const { effectedImportUsage, error } = ((_a = this.projectService) == null ? void 0 : _a.outputResult) || { effectedImportUsage: [], error: null };
|
|
195
|
+
const { effectedImportUsage, error, relatedExportUsage } = ((_a = this.projectService) == null ? void 0 : _a.outputResult) || { relatedExportUsage: [], effectedImportUsage: [], error: null };
|
|
196
196
|
return {
|
|
197
197
|
error,
|
|
198
198
|
repoType,
|
|
199
|
-
effectedImportUsage
|
|
199
|
+
effectedImportUsage,
|
|
200
|
+
relatedExportUsage
|
|
200
201
|
};
|
|
201
202
|
}
|
|
202
203
|
};
|
|
@@ -103,7 +103,7 @@ var UmiProjectService = class {
|
|
|
103
103
|
const token = this.detectService.gitInfo.token;
|
|
104
104
|
if (!token) {
|
|
105
105
|
const pwd = (0, import_path.join)(this.detectService.directoryInfo.tmpWorkDir, "..");
|
|
106
|
-
(0, import_fs.writeFileSync)((0, import_path.join)(pwd, "effectedImportUsage.json"), JSON.stringify({ tree: madgeResult == null ? void 0 : madgeResult.tree, projectFileList, possibleEffectedFiles, gitDiffDetailFiles: gitDiffDetail.map((e) => e.filePath), validGitDiffDetail,
|
|
106
|
+
(0, import_fs.writeFileSync)((0, import_path.join)(pwd, "effectedImportUsage.json"), JSON.stringify({ tree: madgeResult == null ? void 0 : madgeResult.tree, projectFileList, possibleEffectedFiles, gitDiffDetailFiles: gitDiffDetail.map((e) => e.filePath), validGitDiffDetail, ...this.outputResult }, null, 2));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
};
|
|
@@ -140,7 +140,7 @@ var ViteProjectService = class {
|
|
|
140
140
|
const token = this.detectService.gitInfo.token;
|
|
141
141
|
if (!token) {
|
|
142
142
|
const pwd = (0, import_path.join)(this.detectService.directoryInfo.tmpWorkDir, "..");
|
|
143
|
-
(0, import_fs.writeFileSync)((0, import_path.join)(pwd, "effectedImportUsage.json"), JSON.stringify({ tree: madgeResult == null ? void 0 : madgeResult.tree, projectFileList, possibleEffectedFiles, gitDiffDetailFiles: gitDiffDetail.map((e) => e.filePath), validGitDiffDetail,
|
|
143
|
+
(0, import_fs.writeFileSync)((0, import_path.join)(pwd, "effectedImportUsage.json"), JSON.stringify({ tree: madgeResult == null ? void 0 : madgeResult.tree, projectFileList, possibleEffectedFiles, gitDiffDetailFiles: gitDiffDetail.map((e) => e.filePath), validGitDiffDetail, ...this.outputResult, ...mapRef }, null, 2));
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
};
|
|
@@ -215,7 +215,7 @@ var VueProjectService = class {
|
|
|
215
215
|
const token = this.detectService.gitInfo.token;
|
|
216
216
|
if (!token) {
|
|
217
217
|
const pwd = (0, import_path.join)(this.detectService.directoryInfo.tmpWorkDir, "..");
|
|
218
|
-
(0, import_fs.writeFileSync)((0, import_path.join)(pwd, "effectedImportUsage.json"), JSON.stringify({ webpackConfig: this.createSimpleWebpackConfig(), tree: madgeResult == null ? void 0 : madgeResult.tree, projectFileList, possibleEffectedFiles, gitDiffDetailFiles: gitDiffDetail.map((e) => e.filePath), validGitDiffDetail,
|
|
218
|
+
(0, import_fs.writeFileSync)((0, import_path.join)(pwd, "effectedImportUsage.json"), JSON.stringify({ webpackConfig: this.createSimpleWebpackConfig(), tree: madgeResult == null ? void 0 : madgeResult.tree, projectFileList, possibleEffectedFiles, gitDiffDetailFiles: gitDiffDetail.map((e) => e.filePath), validGitDiffDetail, ...this.outputResult, ...mapRef }, null, 2));
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
};
|