codingbuddy 0.2.5 → 0.2.7
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/src/cli/cli.types.d.ts +2 -0
- package/dist/src/cli/init/config.writer.d.ts +2 -1
- package/dist/src/cli/init/config.writer.js +11 -1
- package/dist/src/cli/init/config.writer.js.map +1 -1
- package/dist/src/cli/init/init.command.js +92 -36
- package/dist/src/cli/init/init.command.js.map +1 -1
- package/dist/src/cli/init/templates/frameworks/default.template.d.ts +2 -0
- package/dist/src/cli/init/templates/frameworks/default.template.js +75 -0
- package/dist/src/cli/init/templates/frameworks/default.template.js.map +1 -0
- package/dist/src/cli/init/templates/frameworks/express.template.d.ts +2 -0
- package/dist/src/cli/init/templates/frameworks/express.template.js +58 -0
- package/dist/src/cli/init/templates/frameworks/express.template.js.map +1 -0
- package/dist/src/cli/init/templates/frameworks/index.d.ts +9 -0
- package/dist/src/cli/init/templates/frameworks/index.js +24 -0
- package/dist/src/cli/init/templates/frameworks/index.js.map +1 -0
- package/dist/src/cli/init/templates/frameworks/nestjs.template.d.ts +2 -0
- package/dist/src/cli/init/templates/frameworks/nestjs.template.js +62 -0
- package/dist/src/cli/init/templates/frameworks/nestjs.template.js.map +1 -0
- package/dist/src/cli/init/templates/frameworks/nextjs.template.d.ts +2 -0
- package/dist/src/cli/init/templates/frameworks/nextjs.template.js +68 -0
- package/dist/src/cli/init/templates/frameworks/nextjs.template.js.map +1 -0
- package/dist/src/cli/init/templates/frameworks/node.template.d.ts +2 -0
- package/dist/src/cli/init/templates/frameworks/node.template.js +55 -0
- package/dist/src/cli/init/templates/frameworks/node.template.js.map +1 -0
- package/dist/src/cli/init/templates/frameworks/react.template.d.ts +2 -0
- package/dist/src/cli/init/templates/frameworks/react.template.js +61 -0
- package/dist/src/cli/init/templates/frameworks/react.template.js.map +1 -0
- package/dist/src/cli/init/templates/index.d.ts +4 -0
- package/dist/src/cli/init/templates/index.js +13 -0
- package/dist/src/cli/init/templates/index.js.map +1 -0
- package/dist/src/cli/init/templates/template.renderer.d.ts +3 -0
- package/dist/src/cli/init/templates/template.renderer.js +162 -0
- package/dist/src/cli/init/templates/template.renderer.js.map +1 -0
- package/dist/src/cli/init/templates/template.selector.d.ts +5 -0
- package/dist/src/cli/init/templates/template.selector.js +60 -0
- package/dist/src/cli/init/templates/template.selector.js.map +1 -0
- package/dist/src/cli/init/templates/template.types.d.ts +33 -0
- package/dist/src/cli/init/templates/template.types.js +3 -0
- package/dist/src/cli/init/templates/template.types.js.map +1 -0
- package/dist/src/config/config-diff.service.d.ts +23 -0
- package/dist/src/config/config-diff.service.js +166 -0
- package/dist/src/config/config-diff.service.js.map +1 -0
- package/dist/src/config/config.module.js +3 -2
- package/dist/src/config/config.module.js.map +1 -1
- package/dist/src/config/index.d.ts +2 -0
- package/dist/src/config/index.js +3 -1
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/mcp/mcp.module.js +7 -1
- package/dist/src/mcp/mcp.module.js.map +1 -1
- package/dist/src/mcp/mcp.service.d.ts +6 -1
- package/dist/src/mcp/mcp.service.js +37 -2
- package/dist/src/mcp/mcp.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reactTemplate = void 0;
|
|
4
|
+
exports.reactTemplate = {
|
|
5
|
+
metadata: {
|
|
6
|
+
id: 'react',
|
|
7
|
+
name: 'React',
|
|
8
|
+
description: 'React frontend application (Vite, CRA, etc.)',
|
|
9
|
+
matchPatterns: ['react', 'react-dom'],
|
|
10
|
+
},
|
|
11
|
+
config: {
|
|
12
|
+
language: 'ko',
|
|
13
|
+
techStack: {
|
|
14
|
+
languages: ['TypeScript'],
|
|
15
|
+
frontend: ['React'],
|
|
16
|
+
},
|
|
17
|
+
architecture: {
|
|
18
|
+
pattern: 'feature-based',
|
|
19
|
+
componentStyle: 'grouped',
|
|
20
|
+
},
|
|
21
|
+
conventions: {
|
|
22
|
+
naming: {
|
|
23
|
+
files: 'kebab-case',
|
|
24
|
+
components: 'PascalCase',
|
|
25
|
+
functions: 'camelCase',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
testStrategy: {
|
|
29
|
+
approach: 'tdd',
|
|
30
|
+
coverage: 90,
|
|
31
|
+
mockingStrategy: 'minimal',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
comments: {
|
|
35
|
+
header: `// ============================================================
|
|
36
|
+
// CodingBuddy Configuration
|
|
37
|
+
// React Project Configuration File
|
|
38
|
+
//
|
|
39
|
+
// This file is used by AI coding assistants to understand project context.
|
|
40
|
+
// Modify the values to match your project.
|
|
41
|
+
// ============================================================`,
|
|
42
|
+
language: `// 🌍 Language Setting
|
|
43
|
+
// Specify the language for AI responses. ('ko', 'en', 'ja', etc.)`,
|
|
44
|
+
projectInfo: `// 📦 Project Information`,
|
|
45
|
+
techStack: `// 🛠️ Tech Stack
|
|
46
|
+
// Auto-detected values. Add state management, styling libraries, etc.
|
|
47
|
+
// Example: frontend: ['React', 'Redux', 'Tailwind CSS']`,
|
|
48
|
+
architecture: `// 🏗️ Architecture
|
|
49
|
+
// pattern: 'feature-based' | 'atomic' | 'layered'
|
|
50
|
+
// componentStyle: 'flat' | 'grouped' | 'feature-based'`,
|
|
51
|
+
conventions: `// 📝 Coding Conventions`,
|
|
52
|
+
testStrategy: `// 🧪 Test Strategy
|
|
53
|
+
// Recommended to use with React Testing Library.`,
|
|
54
|
+
footer: `// ============================================================
|
|
55
|
+
// 💡 TIP: Sync with MCP
|
|
56
|
+
//
|
|
57
|
+
// codingbuddy MCP analyzes your project and suggests config updates.
|
|
58
|
+
// ============================================================`,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=react.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.template.js","sourceRoot":"","sources":["../../../../../../src/cli/init/templates/frameworks/react.template.ts"],"names":[],"mappings":";;;AAMa,QAAA,aAAa,GAAmB;IAC3C,QAAQ,EAAE;QACR,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,8CAA8C;QAC3D,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;KACtC;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE;YACT,SAAS,EAAE,CAAC,YAAY,CAAC;YACzB,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,eAAe;YACxB,cAAc,EAAE,SAAS;SAC1B;QACD,WAAW,EAAE;YACX,MAAM,EAAE;gBACN,KAAK,EAAE,YAAY;gBACnB,UAAU,EAAE,YAAY;gBACxB,SAAS,EAAE,WAAW;aACvB;SACF;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,eAAe,EAAE,SAAS;SAC3B;KACF;IACD,QAAQ,EAAE;QACR,MAAM,EAAE;;;;;;gEAMoD;QAC5D,QAAQ,EAAE;qEACuD;QACjE,WAAW,EAAE,2BAA2B;QACxC,SAAS,EAAE;;2DAE4C;QACvD,YAAY,EAAE;;0DAEwC;QACtD,WAAW,EAAE,0BAA0B;QACvC,YAAY,EAAE;oDACkC;QAChD,MAAM,EAAE;;;;kEAIsD;KAC/D;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { FrameworkType, TemplateMetadata, ConfigTemplate, ConfigComments, TemplateSelectionResult, TemplateRenderOptions, } from './template.types';
|
|
2
|
+
export { selectTemplate, getTemplateById, getAllTemplates, } from './template.selector';
|
|
3
|
+
export { renderConfigAsJs, renderConfigAsJson } from './template.renderer';
|
|
4
|
+
export { TEMPLATES } from './frameworks';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEMPLATES = exports.renderConfigAsJson = exports.renderConfigAsJs = exports.getAllTemplates = exports.getTemplateById = exports.selectTemplate = void 0;
|
|
4
|
+
var template_selector_1 = require("./template.selector");
|
|
5
|
+
Object.defineProperty(exports, "selectTemplate", { enumerable: true, get: function () { return template_selector_1.selectTemplate; } });
|
|
6
|
+
Object.defineProperty(exports, "getTemplateById", { enumerable: true, get: function () { return template_selector_1.getTemplateById; } });
|
|
7
|
+
Object.defineProperty(exports, "getAllTemplates", { enumerable: true, get: function () { return template_selector_1.getAllTemplates; } });
|
|
8
|
+
var template_renderer_1 = require("./template.renderer");
|
|
9
|
+
Object.defineProperty(exports, "renderConfigAsJs", { enumerable: true, get: function () { return template_renderer_1.renderConfigAsJs; } });
|
|
10
|
+
Object.defineProperty(exports, "renderConfigAsJson", { enumerable: true, get: function () { return template_renderer_1.renderConfigAsJson; } });
|
|
11
|
+
var frameworks_1 = require("./frameworks");
|
|
12
|
+
Object.defineProperty(exports, "TEMPLATES", { enumerable: true, get: function () { return frameworks_1.TEMPLATES; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cli/init/templates/index.ts"],"names":[],"mappings":";;;AAiBA,yDAI6B;AAH3B,mHAAA,cAAc,OAAA;AACd,oHAAA,eAAe,OAAA;AACf,oHAAA,eAAe,OAAA;AAIjB,yDAA2E;AAAlE,qHAAA,gBAAgB,OAAA;AAAE,uHAAA,kBAAkB,OAAA;AAG7C,2CAAyC;AAAhC,uGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ConfigTemplate, TemplateRenderOptions } from './template.types';
|
|
2
|
+
export declare function renderConfigAsJs(template: ConfigTemplate, options?: TemplateRenderOptions): string;
|
|
3
|
+
export declare function renderConfigAsJson(template: ConfigTemplate, options?: TemplateRenderOptions): string;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderConfigAsJs = renderConfigAsJs;
|
|
4
|
+
exports.renderConfigAsJson = renderConfigAsJson;
|
|
5
|
+
function renderConfigAsJs(template, options = {}) {
|
|
6
|
+
const config = applyOverrides(template.config, options);
|
|
7
|
+
const comments = template.comments;
|
|
8
|
+
const lines = [];
|
|
9
|
+
if (comments.header) {
|
|
10
|
+
lines.push(comments.header);
|
|
11
|
+
lines.push('');
|
|
12
|
+
}
|
|
13
|
+
lines.push('module.exports = {');
|
|
14
|
+
if (comments.language) {
|
|
15
|
+
lines.push(` ${comments.language}`);
|
|
16
|
+
}
|
|
17
|
+
lines.push(` language: '${config.language || 'ko'}',`);
|
|
18
|
+
lines.push('');
|
|
19
|
+
if (comments.projectInfo) {
|
|
20
|
+
lines.push(` ${comments.projectInfo}`);
|
|
21
|
+
}
|
|
22
|
+
if (config.projectName) {
|
|
23
|
+
lines.push(` projectName: '${config.projectName}',`);
|
|
24
|
+
}
|
|
25
|
+
if (config.description) {
|
|
26
|
+
lines.push(` description: '${config.description}',`);
|
|
27
|
+
}
|
|
28
|
+
lines.push('');
|
|
29
|
+
if (config.techStack && Object.keys(config.techStack).length > 0) {
|
|
30
|
+
if (comments.techStack) {
|
|
31
|
+
lines.push(` ${comments.techStack}`);
|
|
32
|
+
}
|
|
33
|
+
lines.push(' techStack: {');
|
|
34
|
+
lines.push(...renderTechStack(config.techStack));
|
|
35
|
+
lines.push(' },');
|
|
36
|
+
lines.push('');
|
|
37
|
+
}
|
|
38
|
+
if (config.architecture && Object.keys(config.architecture).length > 0) {
|
|
39
|
+
if (comments.architecture) {
|
|
40
|
+
lines.push(` ${comments.architecture}`);
|
|
41
|
+
}
|
|
42
|
+
lines.push(' architecture: {');
|
|
43
|
+
lines.push(...renderArchitecture(config.architecture));
|
|
44
|
+
lines.push(' },');
|
|
45
|
+
lines.push('');
|
|
46
|
+
}
|
|
47
|
+
if (config.conventions && Object.keys(config.conventions).length > 0) {
|
|
48
|
+
if (comments.conventions) {
|
|
49
|
+
lines.push(` ${comments.conventions}`);
|
|
50
|
+
}
|
|
51
|
+
lines.push(' conventions: {');
|
|
52
|
+
lines.push(...renderConventions(config.conventions));
|
|
53
|
+
lines.push(' },');
|
|
54
|
+
lines.push('');
|
|
55
|
+
}
|
|
56
|
+
if (config.testStrategy && Object.keys(config.testStrategy).length > 0) {
|
|
57
|
+
if (comments.testStrategy) {
|
|
58
|
+
lines.push(` ${comments.testStrategy}`);
|
|
59
|
+
}
|
|
60
|
+
lines.push(' testStrategy: {');
|
|
61
|
+
lines.push(...renderTestStrategy(config.testStrategy));
|
|
62
|
+
lines.push(' },');
|
|
63
|
+
}
|
|
64
|
+
lines.push('};');
|
|
65
|
+
if (comments.footer) {
|
|
66
|
+
lines.push('');
|
|
67
|
+
lines.push(comments.footer);
|
|
68
|
+
}
|
|
69
|
+
return lines.join('\n');
|
|
70
|
+
}
|
|
71
|
+
function renderConfigAsJson(template, options = {}) {
|
|
72
|
+
const config = applyOverrides(template.config, options);
|
|
73
|
+
return JSON.stringify(config, null, 2);
|
|
74
|
+
}
|
|
75
|
+
function applyOverrides(config, options) {
|
|
76
|
+
return {
|
|
77
|
+
...config,
|
|
78
|
+
...(options.language && { language: options.language }),
|
|
79
|
+
...(options.projectName && { projectName: options.projectName }),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function renderTechStack(techStack) {
|
|
83
|
+
const lines = [];
|
|
84
|
+
if (techStack?.languages?.length) {
|
|
85
|
+
lines.push(` languages: [${formatStringArray(techStack.languages)}],`);
|
|
86
|
+
}
|
|
87
|
+
if (techStack?.frontend?.length) {
|
|
88
|
+
lines.push(` frontend: [${formatStringArray(techStack.frontend)}],`);
|
|
89
|
+
}
|
|
90
|
+
if (techStack?.backend?.length) {
|
|
91
|
+
lines.push(` backend: [${formatStringArray(techStack.backend)}],`);
|
|
92
|
+
}
|
|
93
|
+
if (techStack?.database?.length) {
|
|
94
|
+
lines.push(` database: [${formatStringArray(techStack.database)}],`);
|
|
95
|
+
}
|
|
96
|
+
if (techStack?.infrastructure?.length) {
|
|
97
|
+
lines.push(` infrastructure: [${formatStringArray(techStack.infrastructure)}],`);
|
|
98
|
+
}
|
|
99
|
+
if (techStack?.tools?.length) {
|
|
100
|
+
lines.push(` tools: [${formatStringArray(techStack.tools)}],`);
|
|
101
|
+
}
|
|
102
|
+
return lines;
|
|
103
|
+
}
|
|
104
|
+
function renderArchitecture(arch) {
|
|
105
|
+
const lines = [];
|
|
106
|
+
if (arch?.pattern) {
|
|
107
|
+
lines.push(` pattern: '${arch.pattern}',`);
|
|
108
|
+
}
|
|
109
|
+
if (arch?.componentStyle) {
|
|
110
|
+
lines.push(` componentStyle: '${arch.componentStyle}',`);
|
|
111
|
+
}
|
|
112
|
+
if (arch?.structure?.length) {
|
|
113
|
+
lines.push(` structure: [${formatStringArray(arch.structure)}],`);
|
|
114
|
+
}
|
|
115
|
+
return lines;
|
|
116
|
+
}
|
|
117
|
+
function renderConventions(conv) {
|
|
118
|
+
const lines = [];
|
|
119
|
+
if (conv?.naming) {
|
|
120
|
+
lines.push(' naming: {');
|
|
121
|
+
if (conv.naming.files) {
|
|
122
|
+
lines.push(` files: '${conv.naming.files}',`);
|
|
123
|
+
}
|
|
124
|
+
if (conv.naming.components) {
|
|
125
|
+
lines.push(` components: '${conv.naming.components}',`);
|
|
126
|
+
}
|
|
127
|
+
if (conv.naming.functions) {
|
|
128
|
+
lines.push(` functions: '${conv.naming.functions}',`);
|
|
129
|
+
}
|
|
130
|
+
if (conv.naming.variables) {
|
|
131
|
+
lines.push(` variables: '${conv.naming.variables}',`);
|
|
132
|
+
}
|
|
133
|
+
lines.push(' },');
|
|
134
|
+
}
|
|
135
|
+
if (conv?.quotes) {
|
|
136
|
+
lines.push(` quotes: '${conv.quotes}',`);
|
|
137
|
+
}
|
|
138
|
+
if (conv?.semicolons !== undefined) {
|
|
139
|
+
lines.push(` semicolons: ${conv.semicolons},`);
|
|
140
|
+
}
|
|
141
|
+
return lines;
|
|
142
|
+
}
|
|
143
|
+
function renderTestStrategy(test) {
|
|
144
|
+
const lines = [];
|
|
145
|
+
if (test?.approach) {
|
|
146
|
+
lines.push(` approach: '${test.approach}',`);
|
|
147
|
+
}
|
|
148
|
+
if (test?.coverage !== undefined) {
|
|
149
|
+
lines.push(` coverage: ${test.coverage},`);
|
|
150
|
+
}
|
|
151
|
+
if (test?.mockingStrategy) {
|
|
152
|
+
lines.push(` mockingStrategy: '${test.mockingStrategy}',`);
|
|
153
|
+
}
|
|
154
|
+
if (test?.frameworks?.length) {
|
|
155
|
+
lines.push(` frameworks: [${formatStringArray(test.frameworks)}],`);
|
|
156
|
+
}
|
|
157
|
+
return lines;
|
|
158
|
+
}
|
|
159
|
+
function formatStringArray(arr) {
|
|
160
|
+
return arr.map(s => `'${s}'`).join(', ');
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=template.renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.renderer.js","sourceRoot":"","sources":["../../../../../src/cli/init/templates/template.renderer.ts"],"names":[],"mappings":";;AAYA,4CAwFC;AAKD,gDAMC;AAnGD,SAAgB,gBAAgB,CAC9B,QAAwB,EACxB,UAAiC,EAAE;IAEnC,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAEnC,MAAM,KAAK,GAAa,EAAE,CAAC;IAG3B,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,o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ACf,CAAC;AAKD,SAAS,kBAAkB,CAAC,IAAuC;IACjE,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,IAAI,EAAE,QAAQ,EAAE,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,IAAI,EAAE,QAAQ,KAAK,SAAS,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,IAAI,EAAE,eAAe,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,yBAAyB,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,oBAAoB,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,SAAS,iBAAiB,CAAC,GAAa;IACtC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProjectAnalysis } from '../../../analyzer';
|
|
2
|
+
import type { FrameworkType, ConfigTemplate, TemplateSelectionResult } from './template.types';
|
|
3
|
+
export declare function selectTemplate(analysis: ProjectAnalysis): TemplateSelectionResult;
|
|
4
|
+
export declare function getTemplateById(id: FrameworkType): ConfigTemplate | undefined;
|
|
5
|
+
export declare function getAllTemplates(): ConfigTemplate[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.selectTemplate = selectTemplate;
|
|
4
|
+
exports.getTemplateById = getTemplateById;
|
|
5
|
+
exports.getAllTemplates = getAllTemplates;
|
|
6
|
+
const frameworks_1 = require("./frameworks");
|
|
7
|
+
const FRAMEWORK_PRIORITY = {
|
|
8
|
+
next: { template: 'nextjs', priority: 100 },
|
|
9
|
+
nuxt: { template: 'default', priority: 100 },
|
|
10
|
+
'@nestjs/core': { template: 'nestjs', priority: 90 },
|
|
11
|
+
nestjs: { template: 'nestjs', priority: 90 },
|
|
12
|
+
express: { template: 'express', priority: 80 },
|
|
13
|
+
fastify: { template: 'express', priority: 80 },
|
|
14
|
+
koa: { template: 'express', priority: 80 },
|
|
15
|
+
react: { template: 'react', priority: 70 },
|
|
16
|
+
vue: { template: 'default', priority: 70 },
|
|
17
|
+
svelte: { template: 'default', priority: 70 },
|
|
18
|
+
angular: { template: 'default', priority: 70 },
|
|
19
|
+
};
|
|
20
|
+
function selectTemplate(analysis) {
|
|
21
|
+
const detectedFrameworks = [];
|
|
22
|
+
let selectedTemplate = 'default';
|
|
23
|
+
let highestPriority = -1;
|
|
24
|
+
let reason = 'No specific framework detected, using default template';
|
|
25
|
+
if (analysis.packageInfo?.detectedFrameworks) {
|
|
26
|
+
for (const framework of analysis.packageInfo.detectedFrameworks) {
|
|
27
|
+
const frameworkKey = framework.name.toLowerCase();
|
|
28
|
+
detectedFrameworks.push(framework.name);
|
|
29
|
+
const mapping = FRAMEWORK_PRIORITY[frameworkKey];
|
|
30
|
+
if (mapping && mapping.priority > highestPriority) {
|
|
31
|
+
highestPriority = mapping.priority;
|
|
32
|
+
selectedTemplate = mapping.template;
|
|
33
|
+
reason = `Detected ${framework.name} (${framework.category})`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (selectedTemplate === 'default' && analysis.detectedPatterns.length > 0) {
|
|
38
|
+
const patterns = analysis.detectedPatterns.map(p => p.toLowerCase());
|
|
39
|
+
if (patterns.some(p => p.includes('node'))) {
|
|
40
|
+
selectedTemplate = 'node';
|
|
41
|
+
reason = 'Detected Node.js project pattern';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const template = getTemplateById(selectedTemplate);
|
|
45
|
+
if (!template) {
|
|
46
|
+
throw new Error(`Template not found: ${selectedTemplate}`);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
template,
|
|
50
|
+
reason,
|
|
51
|
+
detectedFrameworks,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function getTemplateById(id) {
|
|
55
|
+
return frameworks_1.TEMPLATES.find(t => t.metadata.id === id);
|
|
56
|
+
}
|
|
57
|
+
function getAllTemplates() {
|
|
58
|
+
return [...frameworks_1.TEMPLATES];
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=template.selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.selector.js","sourceRoot":"","sources":["../../../../../src/cli/init/templates/template.selector.ts"],"names":[],"mappings":";;AA6CA,wCA4CC;AAKD,0CAEC;AAKD,0CAEC;AA3FD,6CAAyC;AAQzC,MAAM,kBAAkB,GAGpB;IAEF,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE;IAC3C,IAAI,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE;IAG5C,cAAc,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpD,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5C,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9C,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9C,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IAG1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AC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAErE,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;YAC3C,gBAAgB,GAAG,MAAM,CAAC;YAC1B,MAAM,GAAG,kCAAkC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAEnD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,gBAAgB,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO;QACL,QAAQ;QACR,MAAM;QACN,kBAAkB;KACnB,CAAC;AACJ,CAAC;AAKD,SAAgB,eAAe,CAAC,EAAiB;IAC/C,OAAO,sBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,CAAC;AAKD,SAAgB,eAAe;IAC7B,OAAO,CAAC,GAAG,sBAAS,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CodingBuddyConfig } from '../../../config';
|
|
2
|
+
export type FrameworkType = 'nextjs' | 'react' | 'nestjs' | 'express' | 'node' | 'default';
|
|
3
|
+
export interface TemplateMetadata {
|
|
4
|
+
id: FrameworkType;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
matchPatterns: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface ConfigTemplate {
|
|
10
|
+
metadata: TemplateMetadata;
|
|
11
|
+
config: CodingBuddyConfig;
|
|
12
|
+
comments: ConfigComments;
|
|
13
|
+
}
|
|
14
|
+
export interface ConfigComments {
|
|
15
|
+
header: string;
|
|
16
|
+
language?: string;
|
|
17
|
+
projectInfo?: string;
|
|
18
|
+
techStack?: string;
|
|
19
|
+
architecture?: string;
|
|
20
|
+
conventions?: string;
|
|
21
|
+
testStrategy?: string;
|
|
22
|
+
footer?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TemplateSelectionResult {
|
|
25
|
+
template: ConfigTemplate;
|
|
26
|
+
reason: string;
|
|
27
|
+
detectedFrameworks: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface TemplateRenderOptions {
|
|
30
|
+
language?: string;
|
|
31
|
+
projectName?: string;
|
|
32
|
+
includeComments?: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.types.js","sourceRoot":"","sources":["../../../../../src/cli/init/templates/template.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ProjectAnalysis } from '../analyzer';
|
|
2
|
+
import type { CodingBuddyConfig } from './config.schema';
|
|
3
|
+
export type SuggestionPriority = 'high' | 'medium' | 'low';
|
|
4
|
+
export interface ConfigUpdateSuggestion {
|
|
5
|
+
field: string;
|
|
6
|
+
reason: string;
|
|
7
|
+
currentValue: unknown;
|
|
8
|
+
suggestedValue: unknown;
|
|
9
|
+
priority: SuggestionPriority;
|
|
10
|
+
}
|
|
11
|
+
export interface ConfigDiffResult {
|
|
12
|
+
isUpToDate: boolean;
|
|
13
|
+
suggestions: ConfigUpdateSuggestion[];
|
|
14
|
+
}
|
|
15
|
+
export declare class ConfigDiffService {
|
|
16
|
+
compareConfig(analysis: ProjectAnalysis, config: CodingBuddyConfig): ConfigDiffResult;
|
|
17
|
+
private checkProjectName;
|
|
18
|
+
private checkTechStack;
|
|
19
|
+
private checkLanguages;
|
|
20
|
+
private checkTestFrameworks;
|
|
21
|
+
private getFrameworksByCategory;
|
|
22
|
+
formatSuggestionsAsText(result: ConfigDiffResult): string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ConfigDiffService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let ConfigDiffService = class ConfigDiffService {
|
|
12
|
+
compareConfig(analysis, config) {
|
|
13
|
+
const suggestions = [];
|
|
14
|
+
const projectNameSuggestion = this.checkProjectName(analysis, config);
|
|
15
|
+
if (projectNameSuggestion) {
|
|
16
|
+
suggestions.push(projectNameSuggestion);
|
|
17
|
+
}
|
|
18
|
+
const techStackSuggestions = this.checkTechStack(analysis, config);
|
|
19
|
+
suggestions.push(...techStackSuggestions);
|
|
20
|
+
const languageSuggestions = this.checkLanguages(analysis, config);
|
|
21
|
+
suggestions.push(...languageSuggestions);
|
|
22
|
+
const testSuggestions = this.checkTestFrameworks(analysis, config);
|
|
23
|
+
suggestions.push(...testSuggestions);
|
|
24
|
+
return {
|
|
25
|
+
isUpToDate: suggestions.length === 0,
|
|
26
|
+
suggestions,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
checkProjectName(analysis, config) {
|
|
30
|
+
const analysisName = analysis.packageInfo?.name;
|
|
31
|
+
const configName = config.projectName;
|
|
32
|
+
if (analysisName && configName && analysisName !== configName) {
|
|
33
|
+
return {
|
|
34
|
+
field: 'projectName',
|
|
35
|
+
reason: 'Project name in package.json differs from config',
|
|
36
|
+
currentValue: configName,
|
|
37
|
+
suggestedValue: analysisName,
|
|
38
|
+
priority: 'medium',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (analysisName && !configName) {
|
|
42
|
+
return {
|
|
43
|
+
field: 'projectName',
|
|
44
|
+
reason: 'Project name detected from package.json',
|
|
45
|
+
currentValue: undefined,
|
|
46
|
+
suggestedValue: analysisName,
|
|
47
|
+
priority: 'low',
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
checkTechStack(analysis, config) {
|
|
53
|
+
const suggestions = [];
|
|
54
|
+
const detectedFrameworks = analysis.packageInfo?.detectedFrameworks ?? [];
|
|
55
|
+
const frontendFrameworks = this.getFrameworksByCategory(detectedFrameworks, ['frontend', 'fullstack']);
|
|
56
|
+
const backendFrameworks = this.getFrameworksByCategory(detectedFrameworks, [
|
|
57
|
+
'backend',
|
|
58
|
+
'fullstack',
|
|
59
|
+
]);
|
|
60
|
+
const databaseFrameworks = this.getFrameworksByCategory(detectedFrameworks, ['database']);
|
|
61
|
+
const currentFrontend = config.techStack?.frontend ?? [];
|
|
62
|
+
const missingFrontend = frontendFrameworks.filter(f => !currentFrontend.includes(f));
|
|
63
|
+
if (missingFrontend.length > 0) {
|
|
64
|
+
suggestions.push({
|
|
65
|
+
field: 'techStack.frontend',
|
|
66
|
+
reason: 'Detected new frontend framework(s)',
|
|
67
|
+
currentValue: currentFrontend,
|
|
68
|
+
suggestedValue: [...currentFrontend, ...missingFrontend],
|
|
69
|
+
priority: 'high',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
const currentBackend = config.techStack?.backend ?? [];
|
|
73
|
+
const missingBackend = backendFrameworks.filter(f => !currentBackend.includes(f));
|
|
74
|
+
if (missingBackend.length > 0) {
|
|
75
|
+
suggestions.push({
|
|
76
|
+
field: 'techStack.backend',
|
|
77
|
+
reason: 'Detected new backend framework(s)',
|
|
78
|
+
currentValue: currentBackend,
|
|
79
|
+
suggestedValue: [...currentBackend, ...missingBackend],
|
|
80
|
+
priority: 'high',
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const currentDatabase = config.techStack?.database ?? [];
|
|
84
|
+
const missingDatabase = databaseFrameworks.filter(f => !currentDatabase.includes(f));
|
|
85
|
+
if (missingDatabase.length > 0) {
|
|
86
|
+
suggestions.push({
|
|
87
|
+
field: 'techStack.database',
|
|
88
|
+
reason: 'Detected new database tool(s)',
|
|
89
|
+
currentValue: currentDatabase,
|
|
90
|
+
suggestedValue: [...currentDatabase, ...missingDatabase],
|
|
91
|
+
priority: 'medium',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return suggestions;
|
|
95
|
+
}
|
|
96
|
+
checkLanguages(analysis, config) {
|
|
97
|
+
const suggestions = [];
|
|
98
|
+
const currentLanguages = config.techStack?.languages ?? [];
|
|
99
|
+
const detectedLanguages = [];
|
|
100
|
+
const hasTypeScript = analysis.configFiles.typescript ||
|
|
101
|
+
analysis.configFiles.detected.some(f => f.includes('tsconfig'));
|
|
102
|
+
if (hasTypeScript && !currentLanguages.includes('TypeScript')) {
|
|
103
|
+
detectedLanguages.push('TypeScript');
|
|
104
|
+
}
|
|
105
|
+
const hasJavaScript = !hasTypeScript &&
|
|
106
|
+
(analysis.packageInfo !== null ||
|
|
107
|
+
analysis.configFiles.detected.some(f => f.includes('jsconfig')));
|
|
108
|
+
if (hasJavaScript && !currentLanguages.includes('JavaScript')) {
|
|
109
|
+
detectedLanguages.push('JavaScript');
|
|
110
|
+
}
|
|
111
|
+
if (detectedLanguages.length > 0) {
|
|
112
|
+
suggestions.push({
|
|
113
|
+
field: 'techStack.languages',
|
|
114
|
+
reason: 'Detected programming language(s)',
|
|
115
|
+
currentValue: currentLanguages,
|
|
116
|
+
suggestedValue: [...currentLanguages, ...detectedLanguages],
|
|
117
|
+
priority: 'medium',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return suggestions;
|
|
121
|
+
}
|
|
122
|
+
checkTestFrameworks(analysis, config) {
|
|
123
|
+
const suggestions = [];
|
|
124
|
+
const detectedFrameworks = analysis.packageInfo?.detectedFrameworks ?? [];
|
|
125
|
+
const testFrameworks = this.getFrameworksByCategory(detectedFrameworks, [
|
|
126
|
+
'testing',
|
|
127
|
+
]);
|
|
128
|
+
const currentTestFrameworks = config.testStrategy?.frameworks ?? [];
|
|
129
|
+
const missingTestFrameworks = testFrameworks.filter(f => !currentTestFrameworks.includes(f));
|
|
130
|
+
if (missingTestFrameworks.length > 0) {
|
|
131
|
+
suggestions.push({
|
|
132
|
+
field: 'testStrategy.frameworks',
|
|
133
|
+
reason: 'Detected test framework(s)',
|
|
134
|
+
currentValue: currentTestFrameworks,
|
|
135
|
+
suggestedValue: [...currentTestFrameworks, ...missingTestFrameworks],
|
|
136
|
+
priority: 'medium',
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return suggestions;
|
|
140
|
+
}
|
|
141
|
+
getFrameworksByCategory(frameworks, categories) {
|
|
142
|
+
return frameworks
|
|
143
|
+
.filter(f => categories.includes(f.category))
|
|
144
|
+
.map(f => f.name);
|
|
145
|
+
}
|
|
146
|
+
formatSuggestionsAsText(result) {
|
|
147
|
+
if (result.isUpToDate) {
|
|
148
|
+
return '✅ Your configuration is up to date with the project analysis.';
|
|
149
|
+
}
|
|
150
|
+
const lines = ['📋 Configuration Update Suggestions:', ''];
|
|
151
|
+
for (const suggestion of result.suggestions) {
|
|
152
|
+
lines.push(`[${suggestion.priority.toUpperCase()}] ${suggestion.field}`);
|
|
153
|
+
lines.push(` Reason: ${suggestion.reason}`);
|
|
154
|
+
lines.push(` Current: ${JSON.stringify(suggestion.currentValue)}`);
|
|
155
|
+
lines.push(` Suggested: ${JSON.stringify(suggestion.suggestedValue)}`);
|
|
156
|
+
lines.push('');
|
|
157
|
+
}
|
|
158
|
+
lines.push('💡 Apply these changes to codingbuddy.config.js to keep your AI context accurate.');
|
|
159
|
+
return lines.join('\n');
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
exports.ConfigDiffService = ConfigDiffService;
|
|
163
|
+
exports.ConfigDiffService = ConfigDiffService = __decorate([
|
|
164
|
+
(0, common_1.Injectable)()
|
|
165
|
+
], ConfigDiffService);
|
|
166
|
+
//# sourceMappingURL=config-diff.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-diff.service.js","sourceRoot":"","sources":["../../../src/config/config-diff.service.ts"],"names":[],"mappings":";;;;;;;;;AAMA,2CAA4C;AAuCrC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAI5B,aAAa,CACX,QAAyB,EACzB,MAAyB;QAEzB,MAAM,WAAW,GAA6B,EAAE,CAAC;QAGjD,MAAM,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACtE,IAAI,qBAAqB,EAAE,CAAC;YAC1B,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC1C,CAAC;QAGD,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnE,WAAW,CAAC,IAAI,CAAC,GAAG,oBAAoB,CAAC,CAAC;QAG1C,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAClE,WAAW,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC;QAGzC,MAAM,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnE,WAAW,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;QAErC,OAAO;YACL,UAAU,EAAE,WAAW,CAAC,MAAM,KAAK,CAAC;YACpC,WAAW;SACZ,CAAC;IACJ,CAAC;IAKO,gBAAgB,CACtB,QAAyB,EACzB,MAAyB;QAEzB,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC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K,MAAM,UAAU,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,aAAa,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7C,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YACpE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACxE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QAED,KAAK,CAAC,IAAI,CACR,mFAAmF,CACpF,CAAC;QAEF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AAzPY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAyP7B"}
|
|
@@ -9,13 +9,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.CodingBuddyConfigModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const config_service_1 = require("./config.service");
|
|
12
|
+
const config_diff_service_1 = require("./config-diff.service");
|
|
12
13
|
let CodingBuddyConfigModule = class CodingBuddyConfigModule {
|
|
13
14
|
};
|
|
14
15
|
exports.CodingBuddyConfigModule = CodingBuddyConfigModule;
|
|
15
16
|
exports.CodingBuddyConfigModule = CodingBuddyConfigModule = __decorate([
|
|
16
17
|
(0, common_1.Module)({
|
|
17
|
-
providers: [config_service_1.ConfigService],
|
|
18
|
-
exports: [config_service_1.ConfigService],
|
|
18
|
+
providers: [config_service_1.ConfigService, config_diff_service_1.ConfigDiffService],
|
|
19
|
+
exports: [config_service_1.ConfigService, config_diff_service_1.ConfigDiffService],
|
|
19
20
|
})
|
|
20
21
|
], CodingBuddyConfigModule);
|
|
21
22
|
//# sourceMappingURL=config.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.module.js","sourceRoot":"","sources":["../../../src/config/config.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;
|
|
1
|
+
{"version":3,"file":"config.module.js","sourceRoot":"","sources":["../../../src/config/config.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+DAA0D;AAMnD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,0DAAuB;kCAAvB,uBAAuB;IAJnC,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,8BAAa,EAAE,uCAAiB,CAAC;QAC7C,OAAO,EAAE,CAAC,8BAAa,EAAE,uCAAiB,CAAC;KAC5C,CAAC;GACW,uBAAuB,CAAG"}
|
|
@@ -11,3 +11,5 @@ export { CONTEXT_DIR_NAME, KNOWN_SUBDIRS, loadContextFiles, formatContextForAI,
|
|
|
11
11
|
export type { ProjectConfig } from './config.service';
|
|
12
12
|
export { ConfigService } from './config.service';
|
|
13
13
|
export { CodingBuddyConfigModule } from './config.module';
|
|
14
|
+
export type { ConfigUpdateSuggestion, ConfigDiffResult, SuggestionPriority, } from './config-diff.service';
|
|
15
|
+
export { ConfigDiffService } from './config-diff.service';
|
package/dist/src/config/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CodingBuddyConfigModule = exports.ConfigService = exports.hasContextDir = exports.formatContextForAI = exports.loadContextFiles = exports.KNOWN_SUBDIRS = exports.CONTEXT_DIR_NAME = exports.getDefaultIgnorePatterns = exports.filterIgnored = exports.shouldIgnore = exports.patternToRegex = exports.loadIgnoreFile = exports.parseIgnoreContent = exports.IGNORE_FILE_NAME = exports.hasConfigFile = exports.loadConfig = exports.findConfigFile = exports.ConfigLoadError = exports.CONFIG_FILE_NAMES = exports.isCodingBuddyConfig = exports.parseConfig = exports.validateConfig = exports.NamingConventionSchema = exports.ArchitectureLayerSchema = exports.TechDetailSchema = exports.TestStrategyConfigSchema = exports.ConventionsConfigSchema = exports.ArchitectureConfigSchema = exports.TechStackConfigSchema = exports.CodingBuddyConfigSchema = void 0;
|
|
3
|
+
exports.ConfigDiffService = exports.CodingBuddyConfigModule = exports.ConfigService = exports.hasContextDir = exports.formatContextForAI = exports.loadContextFiles = exports.KNOWN_SUBDIRS = exports.CONTEXT_DIR_NAME = exports.getDefaultIgnorePatterns = exports.filterIgnored = exports.shouldIgnore = exports.patternToRegex = exports.loadIgnoreFile = exports.parseIgnoreContent = exports.IGNORE_FILE_NAME = exports.hasConfigFile = exports.loadConfig = exports.findConfigFile = exports.ConfigLoadError = exports.CONFIG_FILE_NAMES = exports.isCodingBuddyConfig = exports.parseConfig = exports.validateConfig = exports.NamingConventionSchema = exports.ArchitectureLayerSchema = exports.TechDetailSchema = exports.TestStrategyConfigSchema = exports.ConventionsConfigSchema = exports.ArchitectureConfigSchema = exports.TechStackConfigSchema = exports.CodingBuddyConfigSchema = void 0;
|
|
4
4
|
var config_schema_1 = require("./config.schema");
|
|
5
5
|
Object.defineProperty(exports, "CodingBuddyConfigSchema", { enumerable: true, get: function () { return config_schema_1.CodingBuddyConfigSchema; } });
|
|
6
6
|
Object.defineProperty(exports, "TechStackConfigSchema", { enumerable: true, get: function () { return config_schema_1.TechStackConfigSchema; } });
|
|
@@ -38,4 +38,6 @@ var config_service_1 = require("./config.service");
|
|
|
38
38
|
Object.defineProperty(exports, "ConfigService", { enumerable: true, get: function () { return config_service_1.ConfigService; } });
|
|
39
39
|
var config_module_1 = require("./config.module");
|
|
40
40
|
Object.defineProperty(exports, "CodingBuddyConfigModule", { enumerable: true, get: function () { return config_module_1.CodingBuddyConfigModule; } });
|
|
41
|
+
var config_diff_service_1 = require("./config-diff.service");
|
|
42
|
+
Object.defineProperty(exports, "ConfigDiffService", { enumerable: true, get: function () { return config_diff_service_1.ConfigDiffService; } });
|
|
41
43
|
//# sourceMappingURL=index.js.map
|