@nahisaho/musubix-core 1.0.0 → 1.0.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.
- package/dist/cli/commands/codegen.d.ts +125 -0
- package/dist/cli/commands/codegen.d.ts.map +1 -0
- package/dist/cli/commands/codegen.js +684 -0
- package/dist/cli/commands/codegen.js.map +1 -0
- package/dist/cli/commands/design.d.ts +158 -0
- package/dist/cli/commands/design.d.ts.map +1 -0
- package/dist/cli/commands/design.js +562 -0
- package/dist/cli/commands/design.js.map +1 -0
- package/dist/cli/commands/explain.d.ts +116 -0
- package/dist/cli/commands/explain.d.ts.map +1 -0
- package/dist/cli/commands/explain.js +419 -0
- package/dist/cli/commands/explain.js.map +1 -0
- package/dist/cli/commands/index.d.ts +13 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -7
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/requirements.d.ts +103 -0
- package/dist/cli/commands/requirements.d.ts.map +1 -0
- package/dist/cli/commands/requirements.js +403 -0
- package/dist/cli/commands/requirements.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +99 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +363 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/test.d.ts +113 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +532 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/commands/trace.d.ts +132 -0
- package/dist/cli/commands/trace.d.ts.map +1 -0
- package/dist/cli/commands/trace.js +553 -0
- package/dist/cli/commands/trace.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codegen Command
|
|
3
|
+
*
|
|
4
|
+
* CLI commands for code generation and analysis
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module cli/commands/codegen
|
|
8
|
+
*
|
|
9
|
+
* @see REQ-CLI-003 - Codegen CLI
|
|
10
|
+
* @see REQ-CG-001 - Code Generation
|
|
11
|
+
* @see REQ-CG-002 - Static Analysis
|
|
12
|
+
* @see DES-MUSUBIX-001 Section 16-C.3 - codegenコマンド設計
|
|
13
|
+
* @see TSK-071〜073 - Codegen CLI実装
|
|
14
|
+
*/
|
|
15
|
+
import type { Command } from 'commander';
|
|
16
|
+
/**
|
|
17
|
+
* Codegen command options
|
|
18
|
+
*/
|
|
19
|
+
export interface CodegenOptions {
|
|
20
|
+
output?: string;
|
|
21
|
+
language?: 'typescript' | 'javascript' | 'python';
|
|
22
|
+
template?: string;
|
|
23
|
+
verbose?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Generated code
|
|
27
|
+
*/
|
|
28
|
+
export interface GeneratedCode {
|
|
29
|
+
filename: string;
|
|
30
|
+
language: string;
|
|
31
|
+
content: string;
|
|
32
|
+
metadata: {
|
|
33
|
+
requirements: string[];
|
|
34
|
+
designElements: string[];
|
|
35
|
+
patterns: string[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generation result
|
|
40
|
+
*/
|
|
41
|
+
export interface GenerationResult {
|
|
42
|
+
success: boolean;
|
|
43
|
+
files: GeneratedCode[];
|
|
44
|
+
summary: {
|
|
45
|
+
totalFiles: number;
|
|
46
|
+
totalLines: number;
|
|
47
|
+
languages: string[];
|
|
48
|
+
};
|
|
49
|
+
message: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Analysis issue
|
|
53
|
+
*/
|
|
54
|
+
export interface AnalysisIssue {
|
|
55
|
+
file: string;
|
|
56
|
+
line?: number;
|
|
57
|
+
column?: number;
|
|
58
|
+
severity: 'error' | 'warning' | 'info';
|
|
59
|
+
rule: string;
|
|
60
|
+
message: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Analysis result
|
|
64
|
+
*/
|
|
65
|
+
export interface AnalysisResult {
|
|
66
|
+
success: boolean;
|
|
67
|
+
issues: AnalysisIssue[];
|
|
68
|
+
metrics: {
|
|
69
|
+
files: number;
|
|
70
|
+
lines: number;
|
|
71
|
+
complexity: number;
|
|
72
|
+
maintainabilityIndex: number;
|
|
73
|
+
};
|
|
74
|
+
summary: {
|
|
75
|
+
errors: number;
|
|
76
|
+
warnings: number;
|
|
77
|
+
info: number;
|
|
78
|
+
};
|
|
79
|
+
message: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Security vulnerability
|
|
83
|
+
*/
|
|
84
|
+
export interface SecurityVulnerability {
|
|
85
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
86
|
+
type: string;
|
|
87
|
+
file: string;
|
|
88
|
+
line?: number;
|
|
89
|
+
description: string;
|
|
90
|
+
recommendation: string;
|
|
91
|
+
cwe?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Security result
|
|
95
|
+
*/
|
|
96
|
+
export interface SecurityResult {
|
|
97
|
+
success: boolean;
|
|
98
|
+
vulnerabilities: SecurityVulnerability[];
|
|
99
|
+
summary: {
|
|
100
|
+
critical: number;
|
|
101
|
+
high: number;
|
|
102
|
+
medium: number;
|
|
103
|
+
low: number;
|
|
104
|
+
};
|
|
105
|
+
score: number;
|
|
106
|
+
message: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Register codegen command
|
|
110
|
+
*/
|
|
111
|
+
export declare function registerCodegenCommand(program: Command): void;
|
|
112
|
+
/**
|
|
113
|
+
* Generate code from design
|
|
114
|
+
*/
|
|
115
|
+
declare function generateCodeFromDesign(content: string, options: CodegenOptions): GeneratedCode[];
|
|
116
|
+
/**
|
|
117
|
+
* Analyze file
|
|
118
|
+
*/
|
|
119
|
+
declare function analyzeFile(file: string, lines: string[], issues: AnalysisIssue[]): void;
|
|
120
|
+
/**
|
|
121
|
+
* Scan file for security issues
|
|
122
|
+
*/
|
|
123
|
+
declare function scanFile(file: string, content: string, vulnerabilities: SecurityVulnerability[]): void;
|
|
124
|
+
export { generateCodeFromDesign, analyzeFile, scanFile, };
|
|
125
|
+
//# sourceMappingURL=codegen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,QAAQ,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB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