@devflow-tools/plugin-nest 0.12.6 → 0.13.1

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.
@@ -0,0 +1,12 @@
1
+ import type { AnalysisResult } from './types.js';
2
+ interface DiagnoseInput {
3
+ projectRoot: string;
4
+ errorMessage: string;
5
+ stackTrace?: string;
6
+ filePath?: string;
7
+ maxFindings?: number;
8
+ outputMode?: 'summary' | 'full';
9
+ }
10
+ export declare function diagnoseBug(input: DiagnoseInput): AnalysisResult;
11
+ export {};
12
+ //# sourceMappingURL=diagnose-bug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose-bug.d.ts","sourceRoot":"","sources":["../../src/analyzers/diagnose-bug.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,UAAU,aAAa;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CA0DhE"}
@@ -0,0 +1,107 @@
1
+ import { readFileSync } from 'fs';
2
+ import { readdirSync, statSync } from 'fs';
3
+ import { basename, join, relative } from 'path';
4
+ export function diagnoseBug(input) {
5
+ const { projectRoot, errorMessage } = input;
6
+ const rootCauses = [];
7
+ const files = selectProjectFiles(projectRoot, input.filePath);
8
+ for (const file of files) {
9
+ const content = readFileSync(file, 'utf-8');
10
+ const relPath = relative(projectRoot, file);
11
+ const lines = content.split('\n');
12
+ // Check DI issues
13
+ if (/inject|provider|module|can't resolve/.test(errorMessage.toLowerCase())) {
14
+ for (let i = 0; i < lines.length; i++) {
15
+ // Check for missing @Injectable() decorator
16
+ if (/export\s+class\s+\w+Service/.test(lines[i]) && !content.includes('@Injectable()')) {
17
+ rootCauses.push({
18
+ probability: 'high',
19
+ description: 'Service 缺少 @Injectable() 装饰器',
20
+ file: relPath,
21
+ line: i + 1,
22
+ fix: '添加 @Injectable() 装饰器',
23
+ });
24
+ }
25
+ }
26
+ }
27
+ }
28
+ const allFindings = rootCauses.map(rc => ({
29
+ severity: rc.probability === 'high' ? 'critical' : 'warning',
30
+ category: 'bug-root-cause',
31
+ title: rc.description,
32
+ description: rc.evidence ?? rc.description,
33
+ file: rc.file,
34
+ line: rc.line,
35
+ suggestion: rc.fix,
36
+ }));
37
+ const maxFindings = input.maxFindings ?? 20;
38
+ const findings = input.outputMode === 'full'
39
+ ? allFindings
40
+ : allFindings.slice(0, maxFindings);
41
+ const truncated = input.outputMode !== 'full' && allFindings.length > findings.length;
42
+ return {
43
+ success: true,
44
+ summary: `分析 ${files.length} 个文件,发现 ${allFindings.length} 个可能原因`,
45
+ data: { rootCauses: truncated ? rootCauses.slice(0, findings.length) : rootCauses },
46
+ findings,
47
+ totalFindings: allFindings.length,
48
+ truncated,
49
+ _report: truncated ? { rootCauses, findings: allFindings } : undefined,
50
+ };
51
+ }
52
+ function selectProjectFiles(root, filePath) {
53
+ const files = scanProjectFiles(root);
54
+ if (!filePath)
55
+ return files;
56
+ const normalized = normalizePath(filePath, root);
57
+ const exact = files.filter((file) => normalizePath(relative(root, file), root) === normalized);
58
+ if (exact.length > 0)
59
+ return exact;
60
+ const targetDirectory = `${normalized}/`;
61
+ const targetBaseName = basename(normalized).toLowerCase();
62
+ const fallback = files
63
+ .map((file) => {
64
+ const relPath = normalizePath(relative(root, file), root);
65
+ const relPathLower = relPath.toLowerCase();
66
+ const fileBaseName = basename(relPathLower).replace(/\.[^.]+$/, '');
67
+ let score = 0;
68
+ if (relPathLower.replace(/\.[^.]+$/, '') === normalized.toLowerCase())
69
+ score += 4;
70
+ if (relPathLower.startsWith(targetDirectory.toLowerCase()))
71
+ score += 3;
72
+ if (fileBaseName === targetBaseName)
73
+ score += 2;
74
+ return { file, score };
75
+ })
76
+ .filter((item) => item.score > 0)
77
+ .sort((a, b) => b.score - a.score || a.file.localeCompare(b.file))
78
+ .map((item) => item.file);
79
+ return fallback.length > 0 ? fallback : files;
80
+ }
81
+ function scanProjectFiles(root) {
82
+ const files = [];
83
+ function walk(dir) {
84
+ try {
85
+ for (const entry of readdirSync(dir)) {
86
+ if (['node_modules', 'dist', 'build', '.git'].includes(entry))
87
+ continue;
88
+ const fullPath = join(dir, entry);
89
+ try {
90
+ const stat = statSync(fullPath);
91
+ if (stat.isDirectory())
92
+ walk(fullPath);
93
+ else if (/\.tsx?$/.test(entry))
94
+ files.push(fullPath);
95
+ }
96
+ catch { }
97
+ }
98
+ }
99
+ catch { }
100
+ }
101
+ walk(root);
102
+ return files;
103
+ }
104
+ function normalizePath(filePath, projectRoot) {
105
+ return filePath.replace(projectRoot, '').replace(/\\/g, '/').replace(/^\/+/, '').replace(/\/+$/, '');
106
+ }
107
+ //# sourceMappingURL=diagnose-bug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose-bug.js","sourceRoot":"","sources":["../../src/analyzers/diagnose-bug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAYhD,MAAM,UAAU,WAAW,CAAC,KAAoB;IAC9C,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC5C,MAAM,UAAU,GAOX,EAAE,CAAC;IAER,MAAM,KAAK,GAAG,kBAAkB,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC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,CAAC,KAAK,CAAC;AAChD,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,SAAS,IAAI,CAAC,GAAW;QACvB,IAAI,CAAC;YACH,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;gBACrC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;oBAAE,SAAS;gBACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBAClC,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBAChC,IAAI,IAAI,CAAC,WAAW,EAAE;wBAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;yBAClC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;wBAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACvD,CAAC;gBAAC,MAAM,CAAC,CAAA,CAAC;YACZ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,CAAC;IACX,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB,EAAE,WAAmB;IAC1D,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACvG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AnalysisResult } from './types.js';
2
+ export declare function generateModule(moduleName: string): AnalysisResult;
3
+ //# sourceMappingURL=new-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-module.d.ts","sourceRoot":"","sources":["../../src/analyzers/new-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAgHjE"}
@@ -0,0 +1,108 @@
1
+ export function generateModule(moduleName) {
2
+ const name = moduleName.charAt(0).toUpperCase() + moduleName.slice(1);
3
+ const nameLower = name.toLowerCase();
4
+ const moduleCode = `import { Module } from '@nestjs/common';
5
+ import { ${name}Controller } from './${nameLower}.controller';
6
+ import { ${name}Service } from './${nameLower}.service';
7
+
8
+ @Module({
9
+ controllers: [${name}Controller],
10
+ providers: [${name}Service],
11
+ exports: [${name}Service],
12
+ })
13
+ export class ${name}Module {}
14
+ `;
15
+ const controllerCode = `import { Controller, Get, Post, Body, Param } from '@nestjs/common';
16
+ import { ${name}Service } from './${nameLower}.service';
17
+
18
+ @Controller('${nameLower}')
19
+ export class ${name}Controller {
20
+ constructor(private readonly ${nameLower}Service: ${name}Service) {}
21
+
22
+ @Get()
23
+ findAll() {
24
+ return this.${nameLower}Service.findAll();
25
+ }
26
+
27
+ @Get(':id')
28
+ findOne(@Param('id') id: string) {
29
+ return this.${nameLower}Service.findOne(id);
30
+ }
31
+
32
+ @Post()
33
+ create(@Body() data: any) {
34
+ return this.${nameLower}Service.create(data);
35
+ }
36
+ }
37
+ `;
38
+ const serviceCode = `import { Injectable } from '@nestjs/common';
39
+
40
+ @Injectable()
41
+ export class ${name}Service {
42
+ findAll() {
43
+ return [];
44
+ }
45
+
46
+ findOne(id: string) {
47
+ return { id };
48
+ }
49
+
50
+ create(data: any) {
51
+ return data;
52
+ }
53
+ }
54
+ `;
55
+ const dtoCode = `export class Create${name}Dto {
56
+ name: string;
57
+ description?: string;
58
+ }
59
+
60
+ export class ${name}Dto {
61
+ id: string;
62
+ name: string;
63
+ description?: string;
64
+ }
65
+ `;
66
+ const testCode = `import { Test, TestingModule } from '@nestjs/testing';
67
+ import { ${name}Controller } from './${nameLower}.controller';
68
+ import { ${name}Service } from './${nameLower}.service';
69
+
70
+ describe('${name}Controller', () => {
71
+ let controller: ${name}Controller;
72
+
73
+ beforeEach(async () => {
74
+ const module: TestingModule = await Test.createTestingModule({
75
+ controllers: [${name}Controller],
76
+ providers: [${name}Service],
77
+ }).compile();
78
+
79
+ controller = module.get<${name}Controller>(${name}Controller);
80
+ });
81
+
82
+ it('should be defined', () => {
83
+ expect(controller).toBeDefined();
84
+ });
85
+ });
86
+ `;
87
+ return {
88
+ success: true,
89
+ summary: `生成 ${name} 模块(Controller + Service + Module + DTO + Test)`,
90
+ data: {
91
+ generatedCode: {
92
+ module: moduleCode,
93
+ controller: controllerCode,
94
+ service: serviceCode,
95
+ dto: dtoCode,
96
+ test: testCode,
97
+ },
98
+ filesToCreate: [
99
+ { path: `src/${nameLower}/${nameLower}.module.ts`, type: 'module' },
100
+ { path: `src/${nameLower}/${nameLower}.controller.ts`, type: 'controller' },
101
+ { path: `src/${nameLower}/${nameLower}.service.ts`, type: 'service' },
102
+ { path: `src/${nameLower}/dto/create-${nameLower}.dto.ts`, type: 'dto' },
103
+ { path: `src/${nameLower}/${nameLower}.controller.spec.ts`, type: 'test' },
104
+ ],
105
+ },
106
+ };
107
+ }
108
+ //# sourceMappingURL=new-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-module.js","sourceRoot":"","sources":["../../src/analyzers/new-module.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtE,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAErC,MAAM,UAAU,GAAG;WACV,IAAI,wBAAwB,SAAS;WACrC,IAAI,qBAAqB,SAAS;;;kBAG3B,IAAI;gBACN,IAAI;cACN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C;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ export interface AnalysisResult {
2
+ success: boolean;
3
+ summary: string;
4
+ findings?: Finding[];
5
+ metrics?: Record<string, number | string>;
6
+ data?: unknown;
7
+ error?: string;
8
+ totalFindings?: number;
9
+ truncated?: boolean;
10
+ reportId?: string;
11
+ _report?: unknown;
12
+ }
13
+ export interface Finding {
14
+ severity: 'critical' | 'warning' | 'info' | 'suggestion';
15
+ category: string;
16
+ title: string;
17
+ description: string;
18
+ file?: string;
19
+ line?: number;
20
+ suggestion?: string;
21
+ codeSnippet?: string;
22
+ }
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/analyzers/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/analyzers/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { DevFlowPlugin } from "@devflow-tools/sdk";
2
+ export declare const nestPlugin: DevFlowPlugin;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAaxD,eAAO,MAAM,UAAU,EAAE,aAimDxB,CAAC"}