codingbuddy 2.1.0 → 2.2.0
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/agent/agent-prompt.builder.js +6 -0
- package/dist/src/agent/agent-prompt.builder.js.map +1 -1
- package/dist/src/cli/cli.js +5 -0
- package/dist/src/cli/cli.js.map +1 -1
- package/dist/src/cli/cli.types.d.ts +1 -0
- package/dist/src/cli/init/init.command.js +29 -52
- package/dist/src/cli/init/init.command.js.map +1 -1
- package/dist/src/cli/init/init.wizard.d.ts +22 -0
- package/dist/src/cli/init/init.wizard.js +277 -0
- package/dist/src/cli/init/init.wizard.js.map +1 -0
- package/dist/src/cli/init/prompts/architecture-prompt.d.ts +16 -0
- package/dist/src/cli/init/prompts/architecture-prompt.js +66 -0
- package/dist/src/cli/init/prompts/architecture-prompt.js.map +1 -0
- package/dist/src/cli/init/prompts/basic-prompt.d.ts +13 -0
- package/dist/src/cli/init/prompts/basic-prompt.js +53 -0
- package/dist/src/cli/init/prompts/basic-prompt.js.map +1 -0
- package/dist/src/cli/init/prompts/conventions-prompt.d.ts +19 -0
- package/dist/src/cli/init/prompts/conventions-prompt.js +74 -0
- package/dist/src/cli/init/prompts/conventions-prompt.js.map +1 -0
- package/dist/src/cli/init/prompts/index.d.ts +10 -0
- package/dist/src/cli/init/prompts/index.js +27 -1
- package/dist/src/cli/init/prompts/index.js.map +1 -1
- package/dist/src/cli/init/prompts/language-prompt.d.ts +1 -1
- package/dist/src/cli/init/prompts/model-prompt.js +2 -2
- package/dist/src/cli/init/prompts/model-prompt.js.map +1 -1
- package/dist/src/cli/init/prompts/tech-stack-prompt.d.ts +22 -0
- package/dist/src/cli/init/prompts/tech-stack-prompt.js +68 -0
- package/dist/src/cli/init/prompts/tech-stack-prompt.js.map +1 -0
- package/dist/src/cli/init/prompts/test-strategy-prompt.d.ts +19 -0
- package/dist/src/cli/init/prompts/test-strategy-prompt.js +75 -0
- package/dist/src/cli/init/prompts/test-strategy-prompt.js.map +1 -0
- package/dist/src/cli/init/summary/index.d.ts +2 -0
- package/dist/src/cli/init/summary/index.js +9 -0
- package/dist/src/cli/init/summary/index.js.map +1 -0
- package/dist/src/cli/init/summary/summary.prompt.d.ts +7 -0
- package/dist/src/cli/init/summary/summary.prompt.js +22 -0
- package/dist/src/cli/init/summary/summary.prompt.js.map +1 -0
- package/dist/src/cli/init/summary/summary.renderer.d.ts +32 -0
- package/dist/src/cli/init/summary/summary.renderer.js +41 -0
- package/dist/src/cli/init/summary/summary.renderer.js.map +1 -0
- package/dist/src/cli/init/templates/config-renderer.d.ts +42 -0
- package/dist/src/cli/init/templates/config-renderer.js +247 -0
- package/dist/src/cli/init/templates/config-renderer.js.map +1 -0
- package/dist/src/cli/init/templates/index.d.ts +1 -0
- package/dist/src/cli/init/templates/index.js +5 -1
- package/dist/src/cli/init/templates/index.js.map +1 -1
- package/dist/src/cli/utils/console.js +26 -7
- package/dist/src/cli/utils/console.js.map +1 -1
- package/dist/src/config/config.loader.d.ts +1 -0
- package/dist/src/config/config.loader.js +23 -0
- package/dist/src/config/config.loader.js.map +1 -1
- package/dist/src/config/config.schema.d.ts +7 -0
- package/dist/src/config/config.schema.js +5 -1
- package/dist/src/config/config.schema.js.map +1 -1
- package/dist/src/config/config.service.d.ts +1 -0
- package/dist/src/config/config.service.js +26 -1
- package/dist/src/config/config.service.js.map +1 -1
- package/dist/src/keyword/auto-executor.d.ts +17 -0
- package/dist/src/keyword/auto-executor.js +95 -0
- package/dist/src/keyword/auto-executor.js.map +1 -0
- package/dist/src/keyword/auto-executor.types.d.ts +44 -0
- package/dist/src/keyword/auto-executor.types.js +7 -0
- package/dist/src/keyword/auto-executor.types.js.map +1 -0
- package/dist/src/keyword/auto-formatter.d.ts +8 -0
- package/dist/src/keyword/auto-formatter.js +79 -0
- package/dist/src/keyword/auto-formatter.js.map +1 -0
- package/dist/src/keyword/index.d.ts +9 -0
- package/dist/src/keyword/index.js +28 -0
- package/dist/src/keyword/index.js.map +1 -0
- package/dist/src/keyword/keyword.service.js +17 -0
- package/dist/src/keyword/keyword.service.js.map +1 -1
- package/dist/src/keyword/keyword.types.d.ts +11 -5
- package/dist/src/keyword/keyword.types.js +22 -9
- package/dist/src/keyword/keyword.types.js.map +1 -1
- package/dist/src/keyword/rule-filter.js +1 -0
- package/dist/src/keyword/rule-filter.js.map +1 -1
- package/dist/src/mcp/mcp-serverless.js +5 -0
- package/dist/src/mcp/mcp-serverless.js.map +1 -1
- package/dist/src/model/model.constants.js.map +1 -1
- package/dist/src/model/model.resolver.js +8 -0
- package/dist/src/model/model.resolver.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_DESCRIPTION = exports.DEFAULT_PROJECT_NAME = void 0;
|
|
4
|
+
exports.validateProjectName = validateProjectName;
|
|
5
|
+
exports.validateDescription = validateDescription;
|
|
6
|
+
exports.promptBasicSettings = promptBasicSettings;
|
|
7
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
8
|
+
exports.DEFAULT_PROJECT_NAME = 'my-project';
|
|
9
|
+
exports.DEFAULT_DESCRIPTION = '';
|
|
10
|
+
const MAX_PROJECT_NAME_LENGTH = 214;
|
|
11
|
+
const MAX_DESCRIPTION_LENGTH = 250;
|
|
12
|
+
const PROJECT_NAME_PATTERN = /^(?:@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9][a-z0-9-._~]*$/;
|
|
13
|
+
function validateProjectName(name) {
|
|
14
|
+
if (!name || name.trim() === '') {
|
|
15
|
+
return 'Project name is required';
|
|
16
|
+
}
|
|
17
|
+
if (name.length > MAX_PROJECT_NAME_LENGTH) {
|
|
18
|
+
return `Project name must be ${MAX_PROJECT_NAME_LENGTH} characters or less`;
|
|
19
|
+
}
|
|
20
|
+
if (!PROJECT_NAME_PATTERN.test(name)) {
|
|
21
|
+
return 'Project name must be lowercase, alphanumeric, with hyphens or underscores only (e.g., my-project, @scope/my-package)';
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function validateDescription(description) {
|
|
26
|
+
if (!description) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (description.length > MAX_DESCRIPTION_LENGTH) {
|
|
30
|
+
return `Description must be ${MAX_DESCRIPTION_LENGTH} characters or less`;
|
|
31
|
+
}
|
|
32
|
+
if (/[\x00-\x1f\x7f]/.test(description)) {
|
|
33
|
+
return 'Description cannot contain control characters (newlines, tabs, etc.)';
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
async function promptBasicSettings(options = {}) {
|
|
38
|
+
const projectName = await (0, prompts_1.input)({
|
|
39
|
+
message: 'Project name:',
|
|
40
|
+
default: options.detectedProjectName ?? exports.DEFAULT_PROJECT_NAME,
|
|
41
|
+
validate: validateProjectName,
|
|
42
|
+
});
|
|
43
|
+
const description = await (0, prompts_1.input)({
|
|
44
|
+
message: 'Project description:',
|
|
45
|
+
default: options.detectedDescription ?? exports.DEFAULT_DESCRIPTION,
|
|
46
|
+
validate: validateDescription,
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
projectName,
|
|
50
|
+
description,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=basic-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-prompt.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/basic-prompt.ts"],"names":[],"mappings":";;;AAmDA,kDAcC;AAQD,kDAiBC;AAkBD,kDAmBC;AAzHD,+CAA0C;AAa7B,QAAA,oBAAoB,GAAG,YAAY,CAAC;AAKpC,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAKtC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAKpC,MAAM,sBAAsB,GAAG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AAW;QACX,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ConvChoice<T = string> {
|
|
2
|
+
name: string;
|
|
3
|
+
value: T;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ConventionsSettings {
|
|
7
|
+
fileNaming: string;
|
|
8
|
+
quotes: 'single' | 'double';
|
|
9
|
+
semicolons: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const FILE_NAMING_CHOICES: ConvChoice[];
|
|
12
|
+
export declare const QUOTES_CHOICES: ConvChoice<'single' | 'double'>[];
|
|
13
|
+
export declare const SEMICOLONS_CHOICES: ConvChoice<boolean>[];
|
|
14
|
+
export interface ConventionsPromptOptions {
|
|
15
|
+
detectedFileNaming?: string;
|
|
16
|
+
detectedQuotes?: 'single' | 'double';
|
|
17
|
+
detectedSemicolons?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function promptConventionsSettings(options?: ConventionsPromptOptions): Promise<ConventionsSettings>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEMICOLONS_CHOICES = exports.QUOTES_CHOICES = exports.FILE_NAMING_CHOICES = void 0;
|
|
4
|
+
exports.promptConventionsSettings = promptConventionsSettings;
|
|
5
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
6
|
+
exports.FILE_NAMING_CHOICES = [
|
|
7
|
+
{
|
|
8
|
+
name: 'kebab-case',
|
|
9
|
+
value: 'kebab-case',
|
|
10
|
+
description: 'my-component.ts (recommended for most projects)',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'camelCase',
|
|
14
|
+
value: 'camelCase',
|
|
15
|
+
description: 'myComponent.ts',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'PascalCase',
|
|
19
|
+
value: 'PascalCase',
|
|
20
|
+
description: 'MyComponent.ts (common for React components)',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'snake_case',
|
|
24
|
+
value: 'snake_case',
|
|
25
|
+
description: 'my_component.ts (common for Python)',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
exports.QUOTES_CHOICES = [
|
|
29
|
+
{
|
|
30
|
+
name: 'Single quotes',
|
|
31
|
+
value: 'single',
|
|
32
|
+
description: "const x = 'hello'",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Double quotes',
|
|
36
|
+
value: 'double',
|
|
37
|
+
description: 'const x = "hello"',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
exports.SEMICOLONS_CHOICES = [
|
|
41
|
+
{
|
|
42
|
+
name: 'With semicolons',
|
|
43
|
+
value: true,
|
|
44
|
+
description: 'const x = 1;',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Without semicolons',
|
|
48
|
+
value: false,
|
|
49
|
+
description: 'const x = 1',
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
async function promptConventionsSettings(options = {}) {
|
|
53
|
+
const fileNaming = await (0, prompts_1.select)({
|
|
54
|
+
message: 'Select file naming convention:',
|
|
55
|
+
choices: exports.FILE_NAMING_CHOICES,
|
|
56
|
+
default: options.detectedFileNaming ?? 'kebab-case',
|
|
57
|
+
});
|
|
58
|
+
const quotes = await (0, prompts_1.select)({
|
|
59
|
+
message: 'Select quote style:',
|
|
60
|
+
choices: exports.QUOTES_CHOICES,
|
|
61
|
+
default: options.detectedQuotes ?? 'single',
|
|
62
|
+
});
|
|
63
|
+
const semicolons = await (0, prompts_1.select)({
|
|
64
|
+
message: 'Use semicolons?',
|
|
65
|
+
choices: exports.SEMICOLONS_CHOICES,
|
|
66
|
+
default: options.detectedSemicolons ?? true,
|
|
67
|
+
});
|
|
68
|
+
return {
|
|
69
|
+
fileNaming,
|
|
70
|
+
quotes,
|
|
71
|
+
semicolons,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=conventions-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conventions-prompt.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/conventions-prompt.ts"],"names":[],"mappings":";;;AAmGA,8DA0BC;AAvHD,+CAA2C;AAuB9B,QAAA,mBAAmB,GAAiB;IAC/C;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,iDAAiD;KAC/D;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,gBAAgB;KAC9B;IACD;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,8CAA8C;KAC5D;IACD;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,qCAAqC;KACnD;CACF,CAAC;AAKW,QAAA,cAAc,GAAsC;IAC/D;QACE,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,mBAAmB;KACjC;IACD;QACE,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,mBAAmB;KACjC;CACF,CAAC;AAKW,QAAA,kBAAkB,GAA0B;IACvD;QACE,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,cAAc;KAC5B;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,aAAa;KAC3B;CACF,CAAC;AAiBK,KAAK,UAAU,yBAAyB,CAC7C,UAAoC,EAAE;IAEtC,MAAM,UAAU,GAAG,MAAM,IAAA,gBAAM,EAAC;QAC9B,OAAO,EAAE,gCAAgC;QACzC,OAAO,EAAE,2BAAmB;QAC5B,OAAO,EAAE,OAAO,CAAC,kBAAkB,IAAI,YAAY;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,IAAA,gBAAM,EAAC;QAC1B,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,sBAAc;QACvB,OAAO,EAAE,OAAO,CAAC,cAAc,IAAI,QAAQ;KAC5C,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,MAAM,IAAA,gBAAM,EAAC;QAC9B,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,0BAAkB;QAC3B,OAAO,EAAE,OAAO,CAAC,kBAAkB,IAAI,IAAI;KAC5C,CAAC,CAAC;IAEH,OAAO;QACL,UAAU;QACV,MAAM;QACN,UAAU;KACX,CAAC;AACJ,CAAC"}
|
|
@@ -5,3 +5,13 @@ export type { LanguageChoice } from './language-prompt';
|
|
|
5
5
|
export { getPrimaryAgentChoices, promptPrimaryAgentSelection, DEFAULT_PRIMARY_AGENT, } from './agent-prompt';
|
|
6
6
|
export type { AgentChoice } from './agent-prompt';
|
|
7
7
|
export type { ActPrimaryAgent } from '../../../keyword/keyword.types';
|
|
8
|
+
export { promptBasicSettings, validateProjectName, validateDescription, DEFAULT_PROJECT_NAME, DEFAULT_DESCRIPTION, } from './basic-prompt';
|
|
9
|
+
export type { BasicSettings, BasicPromptOptions } from './basic-prompt';
|
|
10
|
+
export { promptTechStackSettings, LANGUAGE_CHOICES, FRONTEND_CHOICES, BACKEND_CHOICES, TOOL_CHOICES, } from './tech-stack-prompt';
|
|
11
|
+
export type { TechStackSettings, TechStackPromptOptions, StackChoice, } from './tech-stack-prompt';
|
|
12
|
+
export { promptArchitectureSettings, PATTERN_CHOICES, COMPONENT_STYLE_CHOICES, } from './architecture-prompt';
|
|
13
|
+
export type { ArchitectureSettings, ArchitecturePromptOptions, ArchChoice, } from './architecture-prompt';
|
|
14
|
+
export { promptConventionsSettings, FILE_NAMING_CHOICES, QUOTES_CHOICES, SEMICOLONS_CHOICES, } from './conventions-prompt';
|
|
15
|
+
export type { ConventionsSettings, ConventionsPromptOptions, ConvChoice, } from './conventions-prompt';
|
|
16
|
+
export { promptTestStrategySettings, APPROACH_CHOICES, MOCKING_STRATEGY_CHOICES, DEFAULT_COVERAGE, } from './test-strategy-prompt';
|
|
17
|
+
export type { TestStrategySettings, TestStrategyPromptOptions, TestChoice, } from './test-strategy-prompt';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_PRIMARY_AGENT = exports.promptPrimaryAgentSelection = exports.getPrimaryAgentChoices = exports.DEFAULT_LANGUAGE = exports.promptLanguageSelection = exports.getLanguageChoices = exports.DEFAULT_MODEL_CHOICE = exports.promptModelSelection = exports.getModelChoices = void 0;
|
|
3
|
+
exports.DEFAULT_COVERAGE = exports.MOCKING_STRATEGY_CHOICES = exports.APPROACH_CHOICES = exports.promptTestStrategySettings = exports.SEMICOLONS_CHOICES = exports.QUOTES_CHOICES = exports.FILE_NAMING_CHOICES = exports.promptConventionsSettings = exports.COMPONENT_STYLE_CHOICES = exports.PATTERN_CHOICES = exports.promptArchitectureSettings = exports.TOOL_CHOICES = exports.BACKEND_CHOICES = exports.FRONTEND_CHOICES = exports.LANGUAGE_CHOICES = exports.promptTechStackSettings = exports.DEFAULT_DESCRIPTION = exports.DEFAULT_PROJECT_NAME = exports.validateDescription = exports.validateProjectName = exports.promptBasicSettings = exports.DEFAULT_PRIMARY_AGENT = exports.promptPrimaryAgentSelection = exports.getPrimaryAgentChoices = exports.DEFAULT_LANGUAGE = exports.promptLanguageSelection = exports.getLanguageChoices = exports.DEFAULT_MODEL_CHOICE = exports.promptModelSelection = exports.getModelChoices = void 0;
|
|
4
4
|
var model_prompt_1 = require("./model-prompt");
|
|
5
5
|
Object.defineProperty(exports, "getModelChoices", { enumerable: true, get: function () { return model_prompt_1.getModelChoices; } });
|
|
6
6
|
Object.defineProperty(exports, "promptModelSelection", { enumerable: true, get: function () { return model_prompt_1.promptModelSelection; } });
|
|
@@ -13,4 +13,30 @@ var agent_prompt_1 = require("./agent-prompt");
|
|
|
13
13
|
Object.defineProperty(exports, "getPrimaryAgentChoices", { enumerable: true, get: function () { return agent_prompt_1.getPrimaryAgentChoices; } });
|
|
14
14
|
Object.defineProperty(exports, "promptPrimaryAgentSelection", { enumerable: true, get: function () { return agent_prompt_1.promptPrimaryAgentSelection; } });
|
|
15
15
|
Object.defineProperty(exports, "DEFAULT_PRIMARY_AGENT", { enumerable: true, get: function () { return agent_prompt_1.DEFAULT_PRIMARY_AGENT; } });
|
|
16
|
+
var basic_prompt_1 = require("./basic-prompt");
|
|
17
|
+
Object.defineProperty(exports, "promptBasicSettings", { enumerable: true, get: function () { return basic_prompt_1.promptBasicSettings; } });
|
|
18
|
+
Object.defineProperty(exports, "validateProjectName", { enumerable: true, get: function () { return basic_prompt_1.validateProjectName; } });
|
|
19
|
+
Object.defineProperty(exports, "validateDescription", { enumerable: true, get: function () { return basic_prompt_1.validateDescription; } });
|
|
20
|
+
Object.defineProperty(exports, "DEFAULT_PROJECT_NAME", { enumerable: true, get: function () { return basic_prompt_1.DEFAULT_PROJECT_NAME; } });
|
|
21
|
+
Object.defineProperty(exports, "DEFAULT_DESCRIPTION", { enumerable: true, get: function () { return basic_prompt_1.DEFAULT_DESCRIPTION; } });
|
|
22
|
+
var tech_stack_prompt_1 = require("./tech-stack-prompt");
|
|
23
|
+
Object.defineProperty(exports, "promptTechStackSettings", { enumerable: true, get: function () { return tech_stack_prompt_1.promptTechStackSettings; } });
|
|
24
|
+
Object.defineProperty(exports, "LANGUAGE_CHOICES", { enumerable: true, get: function () { return tech_stack_prompt_1.LANGUAGE_CHOICES; } });
|
|
25
|
+
Object.defineProperty(exports, "FRONTEND_CHOICES", { enumerable: true, get: function () { return tech_stack_prompt_1.FRONTEND_CHOICES; } });
|
|
26
|
+
Object.defineProperty(exports, "BACKEND_CHOICES", { enumerable: true, get: function () { return tech_stack_prompt_1.BACKEND_CHOICES; } });
|
|
27
|
+
Object.defineProperty(exports, "TOOL_CHOICES", { enumerable: true, get: function () { return tech_stack_prompt_1.TOOL_CHOICES; } });
|
|
28
|
+
var architecture_prompt_1 = require("./architecture-prompt");
|
|
29
|
+
Object.defineProperty(exports, "promptArchitectureSettings", { enumerable: true, get: function () { return architecture_prompt_1.promptArchitectureSettings; } });
|
|
30
|
+
Object.defineProperty(exports, "PATTERN_CHOICES", { enumerable: true, get: function () { return architecture_prompt_1.PATTERN_CHOICES; } });
|
|
31
|
+
Object.defineProperty(exports, "COMPONENT_STYLE_CHOICES", { enumerable: true, get: function () { return architecture_prompt_1.COMPONENT_STYLE_CHOICES; } });
|
|
32
|
+
var conventions_prompt_1 = require("./conventions-prompt");
|
|
33
|
+
Object.defineProperty(exports, "promptConventionsSettings", { enumerable: true, get: function () { return conventions_prompt_1.promptConventionsSettings; } });
|
|
34
|
+
Object.defineProperty(exports, "FILE_NAMING_CHOICES", { enumerable: true, get: function () { return conventions_prompt_1.FILE_NAMING_CHOICES; } });
|
|
35
|
+
Object.defineProperty(exports, "QUOTES_CHOICES", { enumerable: true, get: function () { return conventions_prompt_1.QUOTES_CHOICES; } });
|
|
36
|
+
Object.defineProperty(exports, "SEMICOLONS_CHOICES", { enumerable: true, get: function () { return conventions_prompt_1.SEMICOLONS_CHOICES; } });
|
|
37
|
+
var test_strategy_prompt_1 = require("./test-strategy-prompt");
|
|
38
|
+
Object.defineProperty(exports, "promptTestStrategySettings", { enumerable: true, get: function () { return test_strategy_prompt_1.promptTestStrategySettings; } });
|
|
39
|
+
Object.defineProperty(exports, "APPROACH_CHOICES", { enumerable: true, get: function () { return test_strategy_prompt_1.APPROACH_CHOICES; } });
|
|
40
|
+
Object.defineProperty(exports, "MOCKING_STRATEGY_CHOICES", { enumerable: true, get: function () { return test_strategy_prompt_1.MOCKING_STRATEGY_CHOICES; } });
|
|
41
|
+
Object.defineProperty(exports, "DEFAULT_COVERAGE", { enumerable: true, get: function () { return test_strategy_prompt_1.DEFAULT_COVERAGE; } });
|
|
16
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/index.ts"],"names":[],"mappings":";;;AAOA,+CAIwB;AAHtB,+GAAA,eAAe,OAAA;AACf,oHAAA,oBAAoB,OAAA;AACpB,oHAAA,oBAAoB,OAAA;AAKtB,qDAI2B;AAHzB,qHAAA,kBAAkB,OAAA;AAClB,0HAAA,uBAAuB,OAAA;AACvB,mHAAA,gBAAgB,OAAA;AAKlB,+CAIwB;AAHtB,sHAAA,sBAAsB,OAAA;AACtB,2HAAA,2BAA2B,OAAA;AAC3B,qHAAA,qBAAqB,OAAA;AAMvB,+CAMwB;AALtB,mHAAA,mBAAmB,OAAA;AACnB,mHAAA,mBAAmB,OAAA;AACnB,mHAAA,mBAAmB,OAAA;AACnB,oHAAA,oBAAoB,OAAA;AACpB,mHAAA,mBAAmB,OAAA;AAKrB,yDAM6B;AAL3B,4HAAA,uBAAuB,OAAA;AACvB,qHAAA,gBAAgB,OAAA;AAChB,qHAAA,gBAAgB,OAAA;AAChB,oHAAA,eAAe,OAAA;AACf,iHAAA,YAAY,OAAA;AASd,6DAI+B;AAH7B,iIAAA,0BAA0B,OAAA;AAC1B,sHAAA,eAAe,OAAA;AACf,8HAAA,uBAAuB,OAAA;AASzB,2DAK8B;AAJ5B,+HAAA,yBAAyB,OAAA;AACzB,yHAAA,mBAAmB,OAAA;AACnB,oHAAA,cAAc,OAAA;AACd,wHAAA,kBAAkB,OAAA;AASpB,+DAKgC;AAJ9B,kIAAA,0BAA0B,OAAA;AAC1B,wHAAA,gBAAgB,OAAA;AAChB,gIAAA,wBAAwB,OAAA;AACxB,wHAAA,gBAAgB,OAAA"}
|
|
@@ -3,6 +3,6 @@ export interface LanguageChoice {
|
|
|
3
3
|
value: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const DEFAULT_LANGUAGE: "
|
|
6
|
+
export declare const DEFAULT_LANGUAGE: "en";
|
|
7
7
|
export declare function getLanguageChoices(): LanguageChoice[];
|
|
8
8
|
export declare function promptLanguageSelection(message?: string): Promise<string>;
|
|
@@ -19,9 +19,9 @@ function getModelChoices() {
|
|
|
19
19
|
description: 'Most capable, best for complex tasks',
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
name: 'Claude Haiku 3.5',
|
|
22
|
+
name: 'Claude Haiku 3.5 (Not recommended)',
|
|
23
23
|
value: model_1.CLAUDE_HAIKU_35,
|
|
24
|
-
description: 'Fastest
|
|
24
|
+
description: 'Fastest but least capable - not recommended for coding tasks',
|
|
25
25
|
},
|
|
26
26
|
];
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-prompt.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/model-prompt.ts"],"names":[],"mappings":";;;AA+BA,
|
|
1
|
+
{"version":3,"file":"model-prompt.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/model-prompt.ts"],"names":[],"mappings":";;;AA+BA,0CAmBC;AAOD,oDAUC;AA7DD,+CAA2C;AAC3C,0CAKwB;AAcX,QAAA,oBAAoB,GAAG,qBAAa,CAAC;AAKlD,SAAgB,eAAe;IAC7B,OAAO;QACL;YACE,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,uBAAe;YACtB,WAAW,EAAE,+BAA+B;SAC7C;QACD;YACE,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,qBAAa;YACpB,WAAW,EAAE,sCAAsC;SACpD;QACD;YACE,IAAI,EAAE,oCAAoC;YAC1C,KAAK,EAAE,uBAAe;YACtB,WAAW,EACT,8DAA8D;SACjE;KACF,CAAC;AACJ,CAAC;AAOM,KAAK,UAAU,oBAAoB,CACxC,OAAO,GAAG,0BAA0B;IAEpC,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC;IAElC,OAAO,IAAA,gBAAM,EAAC;QACZ,OAAO;QACP,OAAO;QACP,OAAO,EAAE,4BAAoB;KAC9B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface StackChoice {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface TechStackSettings {
|
|
7
|
+
languages: string[];
|
|
8
|
+
frontend: string[];
|
|
9
|
+
backend: string[];
|
|
10
|
+
tools: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const LANGUAGE_CHOICES: StackChoice[];
|
|
13
|
+
export declare const FRONTEND_CHOICES: StackChoice[];
|
|
14
|
+
export declare const BACKEND_CHOICES: StackChoice[];
|
|
15
|
+
export declare const TOOL_CHOICES: StackChoice[];
|
|
16
|
+
export interface TechStackPromptOptions {
|
|
17
|
+
detectedLanguages?: string[];
|
|
18
|
+
detectedFrontend?: string[];
|
|
19
|
+
detectedBackend?: string[];
|
|
20
|
+
detectedTools?: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare function promptTechStackSettings(options?: TechStackPromptOptions): Promise<TechStackSettings>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_CHOICES = exports.BACKEND_CHOICES = exports.FRONTEND_CHOICES = exports.LANGUAGE_CHOICES = void 0;
|
|
4
|
+
exports.promptTechStackSettings = promptTechStackSettings;
|
|
5
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
6
|
+
exports.LANGUAGE_CHOICES = [
|
|
7
|
+
{ name: 'TypeScript', value: 'TypeScript' },
|
|
8
|
+
{ name: 'JavaScript', value: 'JavaScript' },
|
|
9
|
+
{ name: 'Python', value: 'Python' },
|
|
10
|
+
{ name: 'Go', value: 'Go' },
|
|
11
|
+
{ name: 'Rust', value: 'Rust' },
|
|
12
|
+
{ name: 'Java', value: 'Java' },
|
|
13
|
+
];
|
|
14
|
+
exports.FRONTEND_CHOICES = [
|
|
15
|
+
{ name: 'React', value: 'React' },
|
|
16
|
+
{ name: 'Next.js', value: 'Next.js' },
|
|
17
|
+
{ name: 'Vue', value: 'Vue' },
|
|
18
|
+
{ name: 'Nuxt', value: 'Nuxt' },
|
|
19
|
+
{ name: 'Svelte', value: 'Svelte' },
|
|
20
|
+
{ name: 'Angular', value: 'Angular' },
|
|
21
|
+
];
|
|
22
|
+
exports.BACKEND_CHOICES = [
|
|
23
|
+
{ name: 'NestJS', value: 'NestJS' },
|
|
24
|
+
{ name: 'Express', value: 'Express' },
|
|
25
|
+
{ name: 'Fastify', value: 'Fastify' },
|
|
26
|
+
{ name: 'FastAPI', value: 'FastAPI' },
|
|
27
|
+
{ name: 'Django', value: 'Django' },
|
|
28
|
+
{ name: 'Spring Boot', value: 'Spring Boot' },
|
|
29
|
+
];
|
|
30
|
+
exports.TOOL_CHOICES = [
|
|
31
|
+
{ name: 'Vitest', value: 'Vitest' },
|
|
32
|
+
{ name: 'Jest', value: 'Jest' },
|
|
33
|
+
{ name: 'ESLint', value: 'ESLint' },
|
|
34
|
+
{ name: 'Prettier', value: 'Prettier' },
|
|
35
|
+
{ name: 'Docker', value: 'Docker' },
|
|
36
|
+
{ name: 'GitHub Actions', value: 'GitHub Actions' },
|
|
37
|
+
];
|
|
38
|
+
function getChoicesWithDefaults(choices, detected = []) {
|
|
39
|
+
return choices.map(choice => ({
|
|
40
|
+
...choice,
|
|
41
|
+
checked: detected.includes(choice.value),
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
async function promptTechStackSettings(options = {}) {
|
|
45
|
+
const languages = await (0, prompts_1.checkbox)({
|
|
46
|
+
message: 'Select programming languages:',
|
|
47
|
+
choices: getChoicesWithDefaults(exports.LANGUAGE_CHOICES, options.detectedLanguages),
|
|
48
|
+
});
|
|
49
|
+
const frontend = await (0, prompts_1.checkbox)({
|
|
50
|
+
message: 'Select frontend frameworks:',
|
|
51
|
+
choices: getChoicesWithDefaults(exports.FRONTEND_CHOICES, options.detectedFrontend),
|
|
52
|
+
});
|
|
53
|
+
const backend = await (0, prompts_1.checkbox)({
|
|
54
|
+
message: 'Select backend frameworks:',
|
|
55
|
+
choices: getChoicesWithDefaults(exports.BACKEND_CHOICES, options.detectedBackend),
|
|
56
|
+
});
|
|
57
|
+
const tools = await (0, prompts_1.checkbox)({
|
|
58
|
+
message: 'Select tools:',
|
|
59
|
+
choices: getChoicesWithDefaults(exports.TOOL_CHOICES, options.detectedTools),
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
languages,
|
|
63
|
+
frontend,
|
|
64
|
+
backend,
|
|
65
|
+
tools,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=tech-stack-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tech-stack-prompt.js","sourceRoot":"","sources":["../../../../../src/cli/init/prompts/tech-stack-prompt.ts"],"names":[],"mappings":";;;AA6GA,0DAgCC;AAtID,+CAA6C;AAwBhC,QAAA,gBAAgB,GAAkB;IAC7C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACnC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAC/B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CAChC,CAAC;AAKW,QAAA,gBAAgB,GAAkB;IAC7C,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACjC,EAAE,IAAI,EAAE,SAA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C5B,GAAG,MAAM;QACT,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;KACzC,CAAC,CAAC,CAAC;AACN,CAAC;AAQM,KAAK,UAAU,uBAAuB,CAC3C,UAAkC,EAAE;IAEpC,MAAM,SAAS,GAAG,MAAM,IAAA,kBAAQ,EAAC;QAC/B,OAAO,EAAE,+BAA+B;QACxC,OAAO,EAAE,sBAAsB,CAC7B,wBAAgB,EAChB,OAAO,CAAC,iBAAiB,CAC1B;KACF,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,IAAA,kBAAQ,EAAC;QAC9B,OAAO,EAAE,6BAA6B;QACtC,OAAO,EAAE,sBAAsB,CAAC,wBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC;KAC5E,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAQ,EAAC;QAC7B,OAAO,EAAE,4BAA4B;QACrC,OAAO,EAAE,sBAAsB,CAAC,uBAAe,EAAE,OAAO,CAAC,eAAe,CAAC;KAC1E,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,MAAM,IAAA,kBAAQ,EAAC;QAC3B,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE,sBAAsB,CAAC,oBAAY,EAAE,OAAO,CAAC,aAAa,CAAC;KACrE,CAAC,CAAC;IAEH,OAAO;QACL,SAAS;QACT,QAAQ;QACR,OAAO;QACP,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface TestChoice<T = string> {
|
|
2
|
+
name: string;
|
|
3
|
+
value: T;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TestStrategySettings {
|
|
7
|
+
approach: 'tdd' | 'bdd' | 'test-after' | 'mixed';
|
|
8
|
+
coverage: number;
|
|
9
|
+
mockingStrategy: 'minimal' | 'extensive' | 'no-mocks';
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_COVERAGE = 90;
|
|
12
|
+
export declare const APPROACH_CHOICES: TestChoice<TestStrategySettings['approach']>[];
|
|
13
|
+
export declare const MOCKING_STRATEGY_CHOICES: TestChoice<TestStrategySettings['mockingStrategy']>[];
|
|
14
|
+
export interface TestStrategyPromptOptions {
|
|
15
|
+
detectedApproach?: TestStrategySettings['approach'];
|
|
16
|
+
detectedCoverage?: number;
|
|
17
|
+
detectedMockingStrategy?: TestStrategySettings['mockingStrategy'];
|
|
18
|
+
}
|
|
19
|
+
export declare function promptTestStrategySettings(options?: TestStrategyPromptOptions): Promise<TestStrategySettings>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOCKING_STRATEGY_CHOICES = exports.APPROACH_CHOICES = exports.DEFAULT_COVERAGE = void 0;
|
|
4
|
+
exports.promptTestStrategySettings = promptTestStrategySettings;
|
|
5
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
6
|
+
exports.DEFAULT_COVERAGE = 90;
|
|
7
|
+
exports.APPROACH_CHOICES = [
|
|
8
|
+
{
|
|
9
|
+
name: 'TDD (Test-Driven Development)',
|
|
10
|
+
value: 'tdd',
|
|
11
|
+
description: 'Write tests first, then implement',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'BDD (Behavior-Driven Development)',
|
|
15
|
+
value: 'bdd',
|
|
16
|
+
description: 'Focus on behavior specifications',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Test-After',
|
|
20
|
+
value: 'test-after',
|
|
21
|
+
description: 'Write tests after implementation',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Mixed',
|
|
25
|
+
value: 'mixed',
|
|
26
|
+
description: 'TDD for core logic, test-after for UI',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
exports.MOCKING_STRATEGY_CHOICES = [
|
|
30
|
+
{
|
|
31
|
+
name: 'Minimal',
|
|
32
|
+
value: 'minimal',
|
|
33
|
+
description: 'Mock only external services (recommended)',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Extensive',
|
|
37
|
+
value: 'extensive',
|
|
38
|
+
description: 'Mock most dependencies',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'No Mocks',
|
|
42
|
+
value: 'no-mocks',
|
|
43
|
+
description: 'Integration tests with real implementations',
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
async function promptTestStrategySettings(options = {}) {
|
|
47
|
+
const approach = await (0, prompts_1.select)({
|
|
48
|
+
message: 'Select test approach:',
|
|
49
|
+
choices: exports.APPROACH_CHOICES,
|
|
50
|
+
default: options.detectedApproach ?? 'tdd',
|
|
51
|
+
});
|
|
52
|
+
const coverageInput = await (0, prompts_1.input)({
|
|
53
|
+
message: 'Target test coverage (%):',
|
|
54
|
+
default: String(options.detectedCoverage ?? exports.DEFAULT_COVERAGE),
|
|
55
|
+
validate: value => {
|
|
56
|
+
const num = parseInt(value, 10);
|
|
57
|
+
if (isNaN(num) || num < 0 || num > 100) {
|
|
58
|
+
return 'Please enter a number between 0 and 100';
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
const coverage = parseInt(coverageInput, 10);
|
|
64
|
+
const mockingStrategy = await (0, prompts_1.select)({
|
|
65
|
+
message: 'Select mocking strategy:',
|
|
66
|
+
choices: exports.MOCKING_STRATEGY_CHOICES,
|
|
67
|
+
default: options.detectedMockingStrategy ?? 'minimal',
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
approach,
|
|
71
|
+
coverage,
|
|
72
|
+
mockingStrategy,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=test-strategy-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-strategy-prompt.js","sourceRoot":"","sources":["../../../../../src/c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AAK,EAAE,EAAE,CAAC,CAAC;YAChC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;gBACvC,OAAO,yCAAyC,CAAC;YACnD,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAE7C,MAAM,eAAe,GAAG,MAAM,IAAA,gBAAM,EAAC;QACnC,OAAO,EAAE,0BAA0B;QACnC,OAAO,EAAE,gCAAwB;QACjC,OAAO,EAAE,OAAO,CAAC,uBAAuB,IAAI,SAAS;KACtD,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ;QACR,QAAQ;QACR,eAAe;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUMMARY_ACTION_CHOICES = exports.promptSummaryAction = exports.renderConfigSummary = void 0;
|
|
4
|
+
var summary_renderer_1 = require("./summary.renderer");
|
|
5
|
+
Object.defineProperty(exports, "renderConfigSummary", { enumerable: true, get: function () { return summary_renderer_1.renderConfigSummary; } });
|
|
6
|
+
var summary_prompt_1 = require("./summary.prompt");
|
|
7
|
+
Object.defineProperty(exports, "promptSummaryAction", { enumerable: true, get: function () { return summary_prompt_1.promptSummaryAction; } });
|
|
8
|
+
Object.defineProperty(exports, "SUMMARY_ACTION_CHOICES", { enumerable: true, get: function () { return summary_prompt_1.SUMMARY_ACTION_CHOICES; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cli/init/summary/index.ts"],"names":[],"mappings":";;;AAMA,uDAG4B;AAF1B,uHAAA,mBAAmB,OAAA;AAIrB,mDAK0B;AAJxB,qHAAA,mBAAmB,OAAA;AACnB,wHAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SummaryAction = 'confirm' | 'edit-basic' | 'edit-tech-stack' | 'edit-architecture' | 'edit-conventions' | 'edit-test-strategy' | 'edit-ai' | 'cancel';
|
|
2
|
+
export interface SummaryChoice {
|
|
3
|
+
name: string;
|
|
4
|
+
value: SummaryAction;
|
|
5
|
+
}
|
|
6
|
+
export declare const SUMMARY_ACTION_CHOICES: SummaryChoice[];
|
|
7
|
+
export declare function promptSummaryAction(): Promise<SummaryAction>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUMMARY_ACTION_CHOICES = void 0;
|
|
4
|
+
exports.promptSummaryAction = promptSummaryAction;
|
|
5
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
6
|
+
exports.SUMMARY_ACTION_CHOICES = [
|
|
7
|
+
{ name: '[Confirm] ✅ Confirm and generate config', value: 'confirm' },
|
|
8
|
+
{ name: '[Edit Basic] ✏️ Edit Basic settings', value: 'edit-basic' },
|
|
9
|
+
{ name: '[Edit Tech] ✏️ Edit Tech Stack', value: 'edit-tech-stack' },
|
|
10
|
+
{ name: '[Edit Arch] ✏️ Edit Architecture', value: 'edit-architecture' },
|
|
11
|
+
{ name: '[Edit Conv] ✏️ Edit Conventions', value: 'edit-conventions' },
|
|
12
|
+
{ name: '[Edit Test] ✏️ Edit Test Strategy', value: 'edit-test-strategy' },
|
|
13
|
+
{ name: '[Edit AI] ✏️ Edit AI settings', value: 'edit-ai' },
|
|
14
|
+
{ name: '[Cancel] ❌ Cancel', value: 'cancel' },
|
|
15
|
+
];
|
|
16
|
+
async function promptSummaryAction() {
|
|
17
|
+
return (0, prompts_1.select)({
|
|
18
|
+
message: 'What would you like to do?',
|
|
19
|
+
choices: exports.SUMMARY_ACTION_CHOICES,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=summary.prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.prompt.js","sourceRoot":"","sources":["../../../../../src/cli/init/summary/summary.prompt.ts"],"names":[],"mappings":";;;AAyDA,kDAKC;AAxDD,+CAA2C;AAqC9B,QAAA,sBAAsB,GAAoB;IACrD,EAAE,IAAI,EAAE,yCAAyC,EAAE,KAAK,EAAE,SAAS,EAAE;IACrE,EAAE,IAAI,EAAE,sCAAsC,EAAE,KAAK,EAAE,YAAY,EAAE;IACrE,EAAE,IAAI,EAAE,iCAAiC,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACrE,EAAE,IAAI,EAAE,mCAAmC,EAAE,KAAK,EAAE,mBAAmB,EAAE;IACzE,EAAE,IAAI,EAAE,kCAAkC,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACvE,EAAE,IAAI,EAAE,oCAAoC,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC3E,EAAE,IAAI,EAAE,gCAAgC,EAAE,KAAK,EAAE,SAAS,EAAE;IAC5D,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE;CAC/C,CAAC;AAKK,KAAK,UAAU,mBAAmB;IACvC,OAAO,IAAA,gBAAM,EAAC;QACZ,OAAO,EAAE,4BAA4B;QACrC,OAAO,EAAE,8BAAsB;KAChC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ConfigSummaryData {
|
|
2
|
+
basic: {
|
|
3
|
+
language: string;
|
|
4
|
+
projectName: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
techStack: {
|
|
8
|
+
languages: string[];
|
|
9
|
+
frontend: string[];
|
|
10
|
+
backend: string[];
|
|
11
|
+
tools: string[];
|
|
12
|
+
};
|
|
13
|
+
architecture: {
|
|
14
|
+
pattern: string;
|
|
15
|
+
componentStyle: string;
|
|
16
|
+
};
|
|
17
|
+
conventions: {
|
|
18
|
+
fileNaming: string;
|
|
19
|
+
quotes: 'single' | 'double';
|
|
20
|
+
semicolons: boolean;
|
|
21
|
+
};
|
|
22
|
+
testStrategy: {
|
|
23
|
+
approach: string;
|
|
24
|
+
coverage: number;
|
|
25
|
+
mockingStrategy: string;
|
|
26
|
+
};
|
|
27
|
+
ai: {
|
|
28
|
+
defaultModel: string;
|
|
29
|
+
primaryAgent: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare function renderConfigSummary(data: ConfigSummaryData): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderConfigSummary = renderConfigSummary;
|
|
4
|
+
function formatArray(arr) {
|
|
5
|
+
return arr.length > 0 ? arr.join(', ') : '(none)';
|
|
6
|
+
}
|
|
7
|
+
function renderConfigSummary(data) {
|
|
8
|
+
const lines = [];
|
|
9
|
+
lines.push('');
|
|
10
|
+
lines.push(' [Basic]');
|
|
11
|
+
lines.push(` Language: ${data.basic.language}`);
|
|
12
|
+
lines.push(` Project: ${data.basic.projectName}`);
|
|
13
|
+
lines.push(` Description: ${data.basic.description || '(none)'}`);
|
|
14
|
+
lines.push('');
|
|
15
|
+
lines.push(' [Tech Stack]');
|
|
16
|
+
lines.push(` Languages: ${formatArray(data.techStack.languages)}`);
|
|
17
|
+
lines.push(` Frontend: ${formatArray(data.techStack.frontend)}`);
|
|
18
|
+
lines.push(` Backend: ${formatArray(data.techStack.backend)}`);
|
|
19
|
+
lines.push(` Tools: ${formatArray(data.techStack.tools)}`);
|
|
20
|
+
lines.push('');
|
|
21
|
+
lines.push(' [Architecture]');
|
|
22
|
+
lines.push(` Pattern: ${data.architecture.pattern}`);
|
|
23
|
+
lines.push(` Style: ${data.architecture.componentStyle}`);
|
|
24
|
+
lines.push('');
|
|
25
|
+
lines.push(' [Conventions]');
|
|
26
|
+
lines.push(` Files: ${data.conventions.fileNaming}`);
|
|
27
|
+
lines.push(` Quotes: ${data.conventions.quotes}`);
|
|
28
|
+
lines.push(` Semicolons: ${data.conventions.semicolons ? 'yes' : 'no'}`);
|
|
29
|
+
lines.push('');
|
|
30
|
+
lines.push(' [Test Strategy]');
|
|
31
|
+
lines.push(` Approach: ${data.testStrategy.approach}`);
|
|
32
|
+
lines.push(` Coverage: ${data.testStrategy.coverage}%`);
|
|
33
|
+
lines.push(` Mocking: ${data.testStrategy.mockingStrategy}`);
|
|
34
|
+
lines.push('');
|
|
35
|
+
lines.push(' [AI]');
|
|
36
|
+
lines.push(` Model: ${data.ai.defaultModel}`);
|
|
37
|
+
lines.push(` Agent: ${data.ai.primaryAgent}`);
|
|
38
|
+
lines.push('');
|
|
39
|
+
return lines.join('\n');
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=summary.renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.renderer.js","sourceRoot":"","sources":["../../../../../src/cli/init/summary/summary.renderer.ts"],"names":[],"mappings":";;AAmDA,kDAyCC;AAhDD,SAAS,WAAW,CAAC,GAAa;IAChC,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACpD,CAAC;AAKD,SAAgB,mBAAmB,CAAC,IAAuB;IACzD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxB,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvD,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1D,KAAK,CAAC,IAA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,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAE9E,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAChC,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9D,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC/D,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC;IAErE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrB,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;IACxD,KAAK,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;IAExD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
interface ConfigObject {
|
|
2
|
+
language?: string;
|
|
3
|
+
projectName?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
techStack?: {
|
|
6
|
+
languages?: string[];
|
|
7
|
+
frontend?: string[];
|
|
8
|
+
backend?: string[];
|
|
9
|
+
database?: string[];
|
|
10
|
+
infrastructure?: string[];
|
|
11
|
+
tools?: string[];
|
|
12
|
+
};
|
|
13
|
+
architecture?: {
|
|
14
|
+
pattern?: string;
|
|
15
|
+
componentStyle?: string;
|
|
16
|
+
structure?: string[];
|
|
17
|
+
};
|
|
18
|
+
conventions?: {
|
|
19
|
+
naming?: {
|
|
20
|
+
files?: string;
|
|
21
|
+
components?: string;
|
|
22
|
+
functions?: string;
|
|
23
|
+
variables?: string;
|
|
24
|
+
};
|
|
25
|
+
quotes?: string;
|
|
26
|
+
semicolons?: boolean;
|
|
27
|
+
};
|
|
28
|
+
testStrategy?: {
|
|
29
|
+
approach?: string;
|
|
30
|
+
coverage?: number;
|
|
31
|
+
mockingStrategy?: string;
|
|
32
|
+
frameworks?: string[];
|
|
33
|
+
};
|
|
34
|
+
ai?: {
|
|
35
|
+
defaultModel?: string;
|
|
36
|
+
primaryAgent?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export declare function renderConfigObjectAsJs(config: ConfigObject): string;
|
|
40
|
+
export declare function renderConfigObjectAsJson(config: ConfigObject): string;
|
|
41
|
+
export declare function escapeJsString(str: string): string;
|
|
42
|
+
export {};
|