@evolith/smart-cli 1.1.2 → 1.1.4
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/.tsbuildinfo +1 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +134 -0
- package/dist/app.module.js.map +1 -0
- package/dist/commands/adr/adr.command.d.ts +34 -0
- package/dist/commands/adr/adr.command.js +351 -0
- package/dist/commands/adr/adr.command.js.map +1 -0
- package/dist/commands/agents/agents.command.d.ts +14 -0
- package/dist/commands/agents/agents.command.js +61 -0
- package/dist/commands/agents/agents.command.js.map +1 -0
- package/dist/commands/agents/index.d.ts +1 -0
- package/dist/commands/agents/index.js +6 -0
- package/dist/commands/agents/index.js.map +1 -0
- package/dist/commands/alias/alias.command.d.ts +16 -0
- package/dist/commands/alias/alias.command.js +95 -0
- package/dist/commands/alias/alias.command.js.map +1 -0
- package/dist/commands/api/api.catalog.d.ts +38 -0
- package/dist/commands/api/api.catalog.js +167 -0
- package/dist/commands/api/api.catalog.js.map +1 -0
- package/dist/commands/api/api.command.d.ts +21 -0
- package/dist/commands/api/api.command.js +162 -0
- package/dist/commands/api/api.command.js.map +1 -0
- package/dist/commands/architecture/scaffold/index.d.ts +2 -0
- package/dist/commands/architecture/scaffold/index.js +6 -0
- package/dist/commands/architecture/scaffold/index.js.map +1 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +15 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.js +20 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +1 -0
- package/dist/commands/architecture/scaffold.command.d.ts +16 -0
- package/dist/commands/architecture/scaffold.command.js +328 -0
- package/dist/commands/architecture/scaffold.command.js.map +1 -0
- package/dist/commands/completion/completion.command.d.ts +28 -0
- package/dist/commands/completion/completion.command.js +321 -0
- package/dist/commands/completion/completion.command.js.map +1 -0
- package/dist/commands/docs/docs.command.d.ts +17 -0
- package/dist/commands/docs/docs.command.js +292 -0
- package/dist/commands/docs/docs.command.js.map +1 -0
- package/dist/commands/drift/drift.command.d.ts +28 -0
- package/dist/commands/drift/drift.command.js +292 -0
- package/dist/commands/drift/drift.command.js.map +1 -0
- package/dist/commands/fixtures/fixtures.command.d.ts +21 -0
- package/dist/commands/fixtures/fixtures.command.js +310 -0
- package/dist/commands/fixtures/fixtures.command.js.map +1 -0
- package/dist/commands/gate/gate.command.d.ts +29 -0
- package/dist/commands/gate/gate.command.js +193 -0
- package/dist/commands/gate/gate.command.js.map +1 -0
- package/dist/commands/history/history.command.d.ts +29 -0
- package/dist/commands/history/history.command.js +237 -0
- package/dist/commands/history/history.command.js.map +1 -0
- package/dist/commands/init/agents.command.d.ts +24 -0
- package/dist/commands/init/agents.command.js +330 -0
- package/dist/commands/init/agents.command.js.map +1 -0
- package/dist/commands/init/init.command.d.ts +26 -0
- package/dist/commands/init/init.command.js +170 -0
- package/dist/commands/init/init.command.js.map +1 -0
- package/dist/commands/init/init.wizard.d.ts +19 -0
- package/dist/commands/init/init.wizard.js +181 -0
- package/dist/commands/init/init.wizard.js.map +1 -0
- package/dist/commands/init/upgrade.command.d.ts +22 -0
- package/dist/commands/init/upgrade.command.js +178 -0
- package/dist/commands/init/upgrade.command.js.map +1 -0
- package/dist/commands/mcp/mcp-serve.command.d.ts +17 -0
- package/dist/commands/mcp/mcp-serve.command.js +153 -0
- package/dist/commands/mcp/mcp-serve.command.js.map +1 -0
- package/dist/commands/phase/phase-advance.command.d.ts +30 -0
- package/dist/commands/phase/phase-advance.command.js +206 -0
- package/dist/commands/phase/phase-advance.command.js.map +1 -0
- package/dist/commands/profile/profile.command.d.ts +18 -0
- package/dist/commands/profile/profile.command.js +198 -0
- package/dist/commands/profile/profile.command.js.map +1 -0
- package/dist/commands/sdlc/gate-status.command.d.ts +10 -0
- package/dist/commands/sdlc/gate-status.command.js +162 -0
- package/dist/commands/sdlc/gate-status.command.js.map +1 -0
- package/dist/commands/sdlc/generate-domain.command.d.ts +8 -0
- package/dist/commands/sdlc/generate-domain.command.js +165 -0
- package/dist/commands/sdlc/generate-domain.command.js.map +1 -0
- package/dist/commands/sdlc/handoff.command.d.ts +27 -0
- package/dist/commands/sdlc/handoff.command.js +275 -0
- package/dist/commands/sdlc/handoff.command.js.map +1 -0
- package/dist/commands/sdlc/sdlc.command.d.ts +5 -0
- package/dist/commands/sdlc/sdlc.command.js +44 -0
- package/dist/commands/sdlc/sdlc.command.js.map +1 -0
- package/dist/commands/standards/standards.command.d.ts +30 -0
- package/dist/commands/standards/standards.command.js +283 -0
- package/dist/commands/standards/standards.command.js.map +1 -0
- package/dist/commands/update/update.command.d.ts +21 -0
- package/dist/commands/update/update.command.js +214 -0
- package/dist/commands/update/update.command.js.map +1 -0
- package/dist/commands/upgrade/index.d.ts +1 -0
- package/dist/commands/upgrade/index.js +6 -0
- package/dist/commands/upgrade/index.js.map +1 -0
- package/dist/commands/upgrade/upgrade.command.d.ts +14 -0
- package/dist/commands/upgrade/upgrade.command.js +58 -0
- package/dist/commands/upgrade/upgrade.command.js.map +1 -0
- package/dist/commands/validate/validate.command.d.ts +43 -0
- package/dist/commands/validate/validate.command.js +528 -0
- package/dist/commands/validate/validate.command.js.map +1 -0
- package/dist/config/alias.service.d.ts +14 -0
- package/dist/config/alias.service.js +103 -0
- package/dist/config/alias.service.js.map +1 -0
- package/dist/contributions/contribution-validator.d.ts +16 -0
- package/dist/contributions/contribution-validator.js +34 -0
- package/dist/contributions/contribution-validator.js.map +1 -0
- package/dist/contributions/index.d.ts +1 -0
- package/dist/contributions/index.js +6 -0
- package/dist/contributions/index.js.map +1 -0
- package/dist/infrastructure/adapters/agent-registry.service.d.ts +30 -0
- package/dist/infrastructure/adapters/agent-registry.service.js +175 -0
- package/dist/infrastructure/adapters/agent-registry.service.js.map +1 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.d.ts +19 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.js +125 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +1 -0
- package/dist/infrastructure/architecture/topology-catalog.d.ts +17 -0
- package/dist/infrastructure/architecture/topology-catalog.js +69 -0
- package/dist/infrastructure/architecture/topology-catalog.js.map +1 -0
- package/dist/infrastructure/catalog/catalog-loader.d.ts +21 -0
- package/dist/infrastructure/catalog/catalog-loader.js +144 -0
- package/dist/infrastructure/catalog/catalog-loader.js.map +1 -0
- package/dist/infrastructure/cli/base-command.d.ts +14 -0
- package/dist/infrastructure/cli/base-command.js +41 -0
- package/dist/infrastructure/cli/base-command.js.map +1 -0
- package/dist/infrastructure/cli/command-executor.d.ts +20 -0
- package/dist/infrastructure/cli/command-executor.js +110 -0
- package/dist/infrastructure/cli/command-executor.js.map +1 -0
- package/dist/infrastructure/cli/providers/index.d.ts +52 -0
- package/dist/infrastructure/cli/providers/index.js +175 -0
- package/dist/infrastructure/cli/providers/index.js.map +1 -0
- package/dist/infrastructure/config/config.service.d.ts +34 -0
- package/dist/infrastructure/config/config.service.js +126 -0
- package/dist/infrastructure/config/config.service.js.map +1 -0
- package/dist/infrastructure/filesystem/file-manager.service.d.ts +12 -0
- package/dist/infrastructure/filesystem/file-manager.service.js +79 -0
- package/dist/infrastructure/filesystem/file-manager.service.js.map +1 -0
- package/dist/infrastructure/formatters/output-formatter.service.d.ts +28 -0
- package/dist/infrastructure/formatters/output-formatter.service.js +199 -0
- package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -0
- package/dist/infrastructure/observability/command-watcher.d.ts +45 -0
- package/dist/infrastructure/observability/command-watcher.js +199 -0
- package/dist/infrastructure/observability/command-watcher.js.map +1 -0
- package/dist/infrastructure/observability/error-reporter.d.ts +47 -0
- package/dist/infrastructure/observability/error-reporter.js +163 -0
- package/dist/infrastructure/observability/error-reporter.js.map +1 -0
- package/dist/infrastructure/observability/index.d.ts +11 -0
- package/dist/infrastructure/observability/index.js +31 -0
- package/dist/infrastructure/observability/index.js.map +1 -0
- package/dist/infrastructure/observability/otel-tracing.d.ts +4 -0
- package/dist/infrastructure/observability/otel-tracing.js +34 -0
- package/dist/infrastructure/observability/otel-tracing.js.map +1 -0
- package/dist/infrastructure/observability/structured-logger.d.ts +53 -0
- package/dist/infrastructure/observability/structured-logger.js +123 -0
- package/dist/infrastructure/observability/structured-logger.js.map +1 -0
- package/dist/infrastructure/observability/timing.d.ts +23 -0
- package/dist/infrastructure/observability/timing.js +140 -0
- package/dist/infrastructure/observability/timing.js.map +1 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.d.ts +46 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.js +181 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +1 -0
- package/dist/infrastructure/plugins/plugin-loader.d.ts +10 -0
- package/dist/infrastructure/plugins/plugin-loader.js +145 -0
- package/dist/infrastructure/plugins/plugin-loader.js.map +1 -0
- package/dist/infrastructure/plugins/plugin.module.d.ts +4 -0
- package/dist/infrastructure/plugins/plugin.module.js +28 -0
- package/dist/infrastructure/plugins/plugin.module.js.map +1 -0
- package/dist/infrastructure/prompts/init-prompt-group.d.ts +3 -0
- package/dist/infrastructure/prompts/init-prompt-group.js +115 -0
- package/dist/infrastructure/prompts/init-prompt-group.js.map +1 -0
- package/dist/infrastructure/prompts/init-prompt-options.d.ts +10 -0
- package/dist/infrastructure/prompts/init-prompt-options.js +40 -0
- package/dist/infrastructure/prompts/init-prompt-options.js.map +1 -0
- package/dist/infrastructure/prompts/progress.service.d.ts +24 -0
- package/dist/infrastructure/prompts/progress.service.js +180 -0
- package/dist/infrastructure/prompts/progress.service.js.map +1 -0
- package/dist/infrastructure/prompts/prompt.service.d.ts +42 -0
- package/dist/infrastructure/prompts/prompt.service.js +142 -0
- package/dist/infrastructure/prompts/prompt.service.js.map +1 -0
- package/dist/infrastructure/prompts/wizard.service.d.ts +27 -0
- package/dist/infrastructure/prompts/wizard.service.js +163 -0
- package/dist/infrastructure/prompts/wizard.service.js.map +1 -0
- package/dist/infrastructure/providers/config-parser.provider.d.ts +15 -0
- package/dist/infrastructure/providers/config-parser.provider.js +68 -0
- package/dist/infrastructure/providers/config-parser.provider.js.map +1 -0
- package/dist/infrastructure/providers/logger.provider.d.ts +10 -0
- package/dist/infrastructure/providers/logger.provider.js +84 -0
- package/dist/infrastructure/providers/logger.provider.js.map +1 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.d.ts +34 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.js +129 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.js.map +1 -0
- package/dist/infrastructure/providers/node-filesystem.provider.d.ts +23 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js +117 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +27 -0
- package/dist/main.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/plugin-registry.d.ts +22 -0
- package/dist/plugins/plugin-registry.js +33 -0
- package/dist/plugins/plugin-registry.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PluginLoader = void 0;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const fs = __importStar(require("fs-extra"));
|
|
39
|
+
const yaml = __importStar(require("yaml"));
|
|
40
|
+
const common_1 = require("@nestjs/common");
|
|
41
|
+
class PluginLoader {
|
|
42
|
+
static async loadPlugins(workspaceDir = process.cwd()) {
|
|
43
|
+
const providers = [];
|
|
44
|
+
const imports = [];
|
|
45
|
+
const localPluginsDir = path.join(workspaceDir, '.evolith', 'plugins');
|
|
46
|
+
if (await fs.pathExists(localPluginsDir)) {
|
|
47
|
+
try {
|
|
48
|
+
const files = await fs.readdir(localPluginsDir);
|
|
49
|
+
for (const file of files) {
|
|
50
|
+
const pluginPath = path.join(localPluginsDir, file);
|
|
51
|
+
const stat = await fs.stat(pluginPath);
|
|
52
|
+
let importPath = '';
|
|
53
|
+
if (stat.isDirectory()) {
|
|
54
|
+
importPath = pluginPath;
|
|
55
|
+
}
|
|
56
|
+
else if (file.endsWith('.js') || file.endsWith('.ts')) {
|
|
57
|
+
importPath = pluginPath;
|
|
58
|
+
}
|
|
59
|
+
if (importPath) {
|
|
60
|
+
await this.loadPluginFromPath(importPath, providers, imports);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
this.logger.warn(`Failed to scan local plugins directory: ${err instanceof Error ? err.message : String(err)}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const configPath = path.join(workspaceDir, 'evolith.yaml');
|
|
69
|
+
if (await fs.pathExists(configPath)) {
|
|
70
|
+
try {
|
|
71
|
+
const configContent = await fs.readFile(configPath, 'utf-8');
|
|
72
|
+
const config = yaml.parse(configContent);
|
|
73
|
+
const plugins = config?.plugins;
|
|
74
|
+
if (Array.isArray(plugins)) {
|
|
75
|
+
for (const plugin of plugins) {
|
|
76
|
+
if (typeof plugin === 'string') {
|
|
77
|
+
let resolvePath = plugin;
|
|
78
|
+
if (plugin.startsWith('.') || plugin.startsWith('/')) {
|
|
79
|
+
resolvePath = path.resolve(workspaceDir, plugin);
|
|
80
|
+
}
|
|
81
|
+
await this.loadPluginFromPath(resolvePath, providers, imports);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
this.logger.warn(`Failed to read evolith.yaml plugins configuration: ${err instanceof Error ? err.message : String(err)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return { providers, imports };
|
|
91
|
+
}
|
|
92
|
+
static async loadPluginFromPath(pluginPath, providers, imports) {
|
|
93
|
+
try {
|
|
94
|
+
const mod = await Promise.resolve(`${pluginPath}`).then(s => __importStar(require(s)));
|
|
95
|
+
const plugin = mod && typeof mod === 'object' && 'default' in mod && mod.default ? mod.default : mod;
|
|
96
|
+
if (Array.isArray(plugin)) {
|
|
97
|
+
this.registerPluginContent(plugin, providers, imports);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
if (plugin.default) {
|
|
101
|
+
this.registerPluginContent(plugin.default, providers, imports);
|
|
102
|
+
}
|
|
103
|
+
if (plugin.commands) {
|
|
104
|
+
this.registerPluginContent(plugin.commands, providers, imports);
|
|
105
|
+
}
|
|
106
|
+
if (plugin.module) {
|
|
107
|
+
this.registerPluginContent(plugin.module, providers, imports);
|
|
108
|
+
}
|
|
109
|
+
if (typeof plugin === 'function' && plugin.prototype) {
|
|
110
|
+
this.registerPluginContent(plugin, providers, imports);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
this.logger.log(`Successfully loaded plugin: ${pluginPath}`);
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
this.logger.warn(`Failed to load plugin from ${pluginPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
static registerPluginContent(content, providers, imports) {
|
|
120
|
+
if (!content)
|
|
121
|
+
return;
|
|
122
|
+
if (Array.isArray(content)) {
|
|
123
|
+
for (const item of content) {
|
|
124
|
+
this.registerPluginContent(item, providers, imports);
|
|
125
|
+
}
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (typeof content === 'function') {
|
|
129
|
+
const isModule = Reflect.getMetadata('imports', content) || Reflect.getMetadata('providers', content);
|
|
130
|
+
if (isModule) {
|
|
131
|
+
if (!imports.includes(content)) {
|
|
132
|
+
imports.push(content);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
if (!providers.includes(content)) {
|
|
137
|
+
providers.push(content);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.PluginLoader = PluginLoader;
|
|
144
|
+
PluginLoader.logger = new common_1.Logger('PluginLoader');
|
|
145
|
+
//# sourceMappingURL=plugin-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-loader.js","sourceRoot":"","sources":["../../../src/infrastructure/plugins/plugin-lo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+
"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
|
+
var PluginModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PluginModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const plugin_loader_1 = require("./plugin-loader");
|
|
13
|
+
let PluginModule = PluginModule_1 = class PluginModule {
|
|
14
|
+
static async register(workspaceDir) {
|
|
15
|
+
const { providers, imports } = await plugin_loader_1.PluginLoader.loadPlugins(workspaceDir);
|
|
16
|
+
return {
|
|
17
|
+
module: PluginModule_1,
|
|
18
|
+
imports,
|
|
19
|
+
providers,
|
|
20
|
+
exports: providers,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.PluginModule = PluginModule;
|
|
25
|
+
exports.PluginModule = PluginModule = PluginModule_1 = __decorate([
|
|
26
|
+
(0, common_1.Module)({})
|
|
27
|
+
], PluginModule);
|
|
28
|
+
//# sourceMappingURL=plugin.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../../../src/infrastructure/plugins/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,mDAA+C;AAGxC,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAqB;QACzC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,4BAAY,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC5E,OAAO;YACL,MAAM,EAAE,cAAY;YACpB,OAAO;YACP,SAAS;YACT,OAAO,EAAE,SAAS;SACnB,CAAC;IACJ,CAAC;CACF,CAAA;AAVY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,YAAY,CAUxB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.runInitPromptGroup = runInitPromptGroup;
|
|
37
|
+
const p = __importStar(require("@clack/prompts"));
|
|
38
|
+
const errors_1 = require("@evolith/core-domain/domain/errors");
|
|
39
|
+
const init_prompt_options_1 = require("./init-prompt-options");
|
|
40
|
+
async function runInitPromptGroup(catalog) {
|
|
41
|
+
const selection = await p.group({
|
|
42
|
+
projectName: () => p.text({
|
|
43
|
+
message: 'Nombre del proyecto:',
|
|
44
|
+
placeholder: 'my-satellite-repo',
|
|
45
|
+
validate: init_prompt_options_1.validateProjectName,
|
|
46
|
+
}),
|
|
47
|
+
runtime: () => {
|
|
48
|
+
const runtimes = catalog.loadRuntimeCatalog();
|
|
49
|
+
return p.select({
|
|
50
|
+
message: 'Selecciona el runtime principal:',
|
|
51
|
+
options: runtimes.map((r) => ({ value: r.id, label: `${r.name} (${r.defaultVersion})`, hint: r.language })),
|
|
52
|
+
initialValue: 'nodejs',
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
monorepo: () => {
|
|
56
|
+
const monorepos = catalog.getMonorepoOptions();
|
|
57
|
+
return p.select({
|
|
58
|
+
message: 'Selecciona la estrategia de monorepo:',
|
|
59
|
+
options: monorepos.map((m) => ({ value: m.id, label: m.name, hint: m.description })),
|
|
60
|
+
initialValue: 'none',
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
architecture: () => {
|
|
64
|
+
const architectures = catalog.getArchitecturePatterns();
|
|
65
|
+
return p.select({
|
|
66
|
+
message: 'Selecciona el patrón arquitectónico:',
|
|
67
|
+
options: architectures.map((a) => ({ value: a.id, label: a.name, hint: a.description })),
|
|
68
|
+
initialValue: 'clean',
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
database: ({ results }) => {
|
|
72
|
+
const runtimes = catalog.loadRuntimeCatalog();
|
|
73
|
+
const runtime = runtimes.find((r) => r.id === results.runtime);
|
|
74
|
+
const databases = runtime?.databases || [];
|
|
75
|
+
return p.select({
|
|
76
|
+
message: 'Selecciona el tipo de base de datos:',
|
|
77
|
+
options: databases.map((db) => ({ value: db.id, label: db.name, hint: db.orm || db.type || '' })),
|
|
78
|
+
initialValue: catalog.getDefaultDatabase(results.runtime ?? ''),
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
apiProtocol: () => {
|
|
82
|
+
const protocols = catalog.getApiProtocols();
|
|
83
|
+
return p.select({
|
|
84
|
+
message: 'Selecciona el protocolo de API:',
|
|
85
|
+
options: protocols.map((pr) => ({ value: pr.id, label: pr.name, hint: pr.description })),
|
|
86
|
+
initialValue: 'rest',
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
ciCd: () => p.select({ message: 'Selecciona la plataforma de CI/CD:', options: init_prompt_options_1.CI_CD_OPTIONS, initialValue: 'github' }),
|
|
90
|
+
observability: () => p.select({ message: 'Selecciona el nivel de observabilidad:', options: init_prompt_options_1.OBSERVABILITY_OPTIONS, initialValue: 'otel' }),
|
|
91
|
+
features: () => p.multiselect({ message: '¿Qué características base quieres incluir?', options: init_prompt_options_1.FEATURE_OPTIONS, required: false }),
|
|
92
|
+
agents: () => p.multiselect({ message: '¿Qué agentes de Evolith deseas configurar?', options: init_prompt_options_1.AGENT_OPTIONS, required: false }),
|
|
93
|
+
confirmInit: () => p.confirm({ message: '¿Comenzar inicialización con las opciones seleccionadas?', initialValue: true }),
|
|
94
|
+
}, {
|
|
95
|
+
onCancel: () => {
|
|
96
|
+
p.cancel('Operación cancelada.');
|
|
97
|
+
throw new errors_1.UserCancelledError();
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
if (!selection.confirmInit)
|
|
101
|
+
return null;
|
|
102
|
+
return {
|
|
103
|
+
name: selection.projectName,
|
|
104
|
+
runtime: selection.runtime,
|
|
105
|
+
monorepo: selection.monorepo,
|
|
106
|
+
architecture: selection.architecture,
|
|
107
|
+
database: selection.database,
|
|
108
|
+
apiProtocol: selection.apiProtocol,
|
|
109
|
+
ciCd: selection.ciCd,
|
|
110
|
+
observability: selection.observability,
|
|
111
|
+
features: selection.features || [],
|
|
112
|
+
agents: selection.agents || [],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=init-prompt-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-prompt-group.js","sourceRoot":"","sources":["../../../src/infrastructure/prompts/init-prompt-group.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gDAsFC;AA/FD,kDAAoC;AAGpC,+DAAwE;AACxE,+DAG+B;AAExB,KAAK,UAAU,kBAAkB,CACtC,OAAsB;IAEtB,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,KAAK,CAC7B;QACE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACxB,OAAO,EAAE,sBAAsB;YAC/B,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,yCAAmB;SAC9B,CAAC;QAEF,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAC9C,OAAO,CAAC,CAAC,MAAM,CAAC;gBACd,OAAO,EAAE,kCAAkC;gBAC3C,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,cAAc,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC3G,YAAY,EAAE,QAA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AAC,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,4CAA4C,EAAE,OAAO,EAAE,mCAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC/H,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,0DAA0D,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;KAC1H,EACD;QACE,QAAQ,EAAE,GAAG,EAAE;YACb,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;YACjC,MAAM,IAAI,2BAAkB,EAAE,CAAC;QACjC,CAAC;KACF,CACF,CAAC;IAEF,IAAI,CAAC,SAAS,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAExC,OAAO;QACL,IAAI,EAAE,SAAS,CAAC,WAAqB;QACrC,OAAO,EAAE,SAAS,CAAC,OAAiB;QACpC,QAAQ,EAAE,SAAS,CAAC,QAAkB;QACtC,YAAY,EAAE,SAAS,CAAC,YAAsB;QAC9C,QAAQ,EAAE,SAAS,CAAC,QAAkB;QACtC,WAAW,EAAE,SAAS,CAAC,WAAqB;QAC5C,IAAI,EAAE,SAAS,CAAC,IAAc;QAC9B,aAAa,EAAE,SAAS,CAAC,aAAuB;QAChD,QAAQ,EAAG,SAAS,CAAC,QAAqB,IAAI,EAAE;QAChD,MAAM,EAAG,SAAS,CAAC,MAAmB,IAAI,EAAE;KAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface InitPromptOption<T extends string = string> {
|
|
2
|
+
value: T;
|
|
3
|
+
label: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const CI_CD_OPTIONS: InitPromptOption[];
|
|
7
|
+
export declare const OBSERVABILITY_OPTIONS: InitPromptOption[];
|
|
8
|
+
export declare const FEATURE_OPTIONS: InitPromptOption[];
|
|
9
|
+
export declare const AGENT_OPTIONS: InitPromptOption[];
|
|
10
|
+
export declare function validateProjectName(value: string | undefined): string | undefined;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENT_OPTIONS = exports.FEATURE_OPTIONS = exports.OBSERVABILITY_OPTIONS = exports.CI_CD_OPTIONS = void 0;
|
|
4
|
+
exports.validateProjectName = validateProjectName;
|
|
5
|
+
exports.CI_CD_OPTIONS = [
|
|
6
|
+
{ value: 'github', label: 'GitHub Actions', hint: 'Primary CI/CD' },
|
|
7
|
+
{ value: 'gitlab', label: 'GitLab CI', hint: 'Integrated registry' },
|
|
8
|
+
{ value: 'azure', label: 'Azure DevOps', hint: 'Enterprise ALM' },
|
|
9
|
+
{ value: 'none', label: 'None', hint: 'Skip CI/CD' },
|
|
10
|
+
];
|
|
11
|
+
exports.OBSERVABILITY_OPTIONS = [
|
|
12
|
+
{ value: 'otel', label: 'OpenTelemetry (All)', hint: 'Traces + Metrics + Logs' },
|
|
13
|
+
{ value: 'otel-traces', label: 'Traces only', hint: 'Distributed tracing' },
|
|
14
|
+
{ value: 'minimal', label: 'Minimal', hint: 'Basic logging' },
|
|
15
|
+
{ value: 'none', label: 'None', hint: 'Skip observability' },
|
|
16
|
+
];
|
|
17
|
+
exports.FEATURE_OPTIONS = [
|
|
18
|
+
{ value: 'otel', label: 'OpenTelemetry', hint: 'Traces + Metrics + Logs' },
|
|
19
|
+
{ value: 'acl', label: 'Anti-Corruption Layer', hint: 'Schema validation' },
|
|
20
|
+
{ value: 'bilingual', label: 'Bilingual Docs', hint: 'EN + ES docs' },
|
|
21
|
+
{ value: 'hooks', label: 'Git Hooks', hint: 'Husky pre-commit' },
|
|
22
|
+
{ value: 'adr', label: 'ADR System', hint: 'Architecture Decisions' },
|
|
23
|
+
];
|
|
24
|
+
exports.AGENT_OPTIONS = [
|
|
25
|
+
{ value: 'bmad', label: 'BMad', hint: 'Recommended' },
|
|
26
|
+
{ value: 'architecture', label: 'Architecture', hint: 'Recommended' },
|
|
27
|
+
{ value: 'qa', label: 'QA' },
|
|
28
|
+
{ value: 'sdlc', label: 'SDLC' },
|
|
29
|
+
];
|
|
30
|
+
function validateProjectName(value) {
|
|
31
|
+
if (!value)
|
|
32
|
+
return 'Por favor ingresa un nombre.';
|
|
33
|
+
if (value.includes(' '))
|
|
34
|
+
return 'El nombre no debe contener espacios.';
|
|
35
|
+
if (!/^[a-zA-Z][a-zA-Z0-9-_]*$/.test(value)) {
|
|
36
|
+
return 'El nombre debe empezar con letra y contener solo letras, números, guiones.';
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=init-prompt-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-prompt-options.js","sourceRoot":"","sources":["../../../src/infrastructure/prompts/init-prompt-options.ts"],"names":[],"mappings":";;;AAmCA,kDAOC;AApCY,QAAA,aAAa,GAAuB;IAC/C,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,EAAE;IACnE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,qBAAqB,EAAE;IACpE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACjE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE;CACrD,CAAC;AAEW,QAAA,qBAAqB,GAAuB;IACvD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,yBAAyB,EAAE;IAChF,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC3E,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAA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@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ProgressOptions {
|
|
2
|
+
total?: number;
|
|
3
|
+
message?: string;
|
|
4
|
+
quiet?: boolean;
|
|
5
|
+
isTTY?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class ProgressService {
|
|
8
|
+
private spinner?;
|
|
9
|
+
private current;
|
|
10
|
+
private total;
|
|
11
|
+
private message;
|
|
12
|
+
private quiet;
|
|
13
|
+
private ttyEnabled;
|
|
14
|
+
start(options?: ProgressOptions): void;
|
|
15
|
+
update(current: number, total?: number, message?: string): void;
|
|
16
|
+
increment(message?: string): void;
|
|
17
|
+
stop(message?: string): void;
|
|
18
|
+
succeed(message?: string): void;
|
|
19
|
+
fail(message?: string): void;
|
|
20
|
+
private formatMessage;
|
|
21
|
+
private formatProgressBar;
|
|
22
|
+
isQuiet(): boolean;
|
|
23
|
+
isTTY(): boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.ProgressService = void 0;
|
|
46
|
+
const common_1 = require("@nestjs/common");
|
|
47
|
+
const p = __importStar(require("@clack/prompts"));
|
|
48
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
49
|
+
let ProgressService = class ProgressService {
|
|
50
|
+
constructor() {
|
|
51
|
+
this.current = 0;
|
|
52
|
+
this.total = 0;
|
|
53
|
+
this.message = '';
|
|
54
|
+
this.quiet = false;
|
|
55
|
+
this.ttyEnabled = true;
|
|
56
|
+
}
|
|
57
|
+
start(options = {}) {
|
|
58
|
+
this.total = options.total ?? 0;
|
|
59
|
+
this.message = options.message ?? '';
|
|
60
|
+
this.quiet = options.quiet ?? false;
|
|
61
|
+
this.ttyEnabled = options.isTTY ?? process.stdout.isTTY ?? true;
|
|
62
|
+
this.current = 0;
|
|
63
|
+
if (this.quiet || !this.ttyEnabled) {
|
|
64
|
+
if (this.message) {
|
|
65
|
+
console.log(this.message);
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.spinner = p.spinner();
|
|
70
|
+
this.spinner.start(this.formatMessage());
|
|
71
|
+
}
|
|
72
|
+
update(current, total, message) {
|
|
73
|
+
this.current = current;
|
|
74
|
+
if (total !== undefined) {
|
|
75
|
+
this.total = total;
|
|
76
|
+
}
|
|
77
|
+
if (message !== undefined) {
|
|
78
|
+
this.message = message;
|
|
79
|
+
}
|
|
80
|
+
if (this.quiet || !this.ttyEnabled) {
|
|
81
|
+
if (message) {
|
|
82
|
+
console.log(message);
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (this.spinner) {
|
|
87
|
+
this.spinner.message(this.formatMessage());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
increment(message) {
|
|
91
|
+
this.current++;
|
|
92
|
+
if (message) {
|
|
93
|
+
this.message = message;
|
|
94
|
+
}
|
|
95
|
+
if (this.quiet || !this.ttyEnabled) {
|
|
96
|
+
if (message) {
|
|
97
|
+
console.log(message);
|
|
98
|
+
}
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (this.spinner) {
|
|
102
|
+
this.spinner.message(this.formatMessage());
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
stop(message) {
|
|
106
|
+
if (this.quiet || !this.ttyEnabled) {
|
|
107
|
+
if (message) {
|
|
108
|
+
console.log(message);
|
|
109
|
+
}
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (this.spinner) {
|
|
113
|
+
this.spinner.stop(message);
|
|
114
|
+
this.spinner = undefined;
|
|
115
|
+
}
|
|
116
|
+
this.current = 0;
|
|
117
|
+
this.total = 0;
|
|
118
|
+
this.message = '';
|
|
119
|
+
}
|
|
120
|
+
succeed(message) {
|
|
121
|
+
if (this.quiet || !this.ttyEnabled) {
|
|
122
|
+
if (message) {
|
|
123
|
+
console.log(chalk_1.default.green(message));
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (this.spinner) {
|
|
128
|
+
this.spinner.stop(message ?? chalk_1.default.green('Done'));
|
|
129
|
+
this.spinner = undefined;
|
|
130
|
+
}
|
|
131
|
+
this.current = 0;
|
|
132
|
+
this.total = 0;
|
|
133
|
+
this.message = '';
|
|
134
|
+
}
|
|
135
|
+
fail(message) {
|
|
136
|
+
if (this.quiet || !this.ttyEnabled) {
|
|
137
|
+
if (message) {
|
|
138
|
+
console.log(chalk_1.default.red(message));
|
|
139
|
+
}
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (this.spinner) {
|
|
143
|
+
this.spinner.stop(message ?? chalk_1.default.red('Failed'));
|
|
144
|
+
this.spinner = undefined;
|
|
145
|
+
}
|
|
146
|
+
this.current = 0;
|
|
147
|
+
this.total = 0;
|
|
148
|
+
this.message = '';
|
|
149
|
+
}
|
|
150
|
+
formatMessage() {
|
|
151
|
+
if (this.total <= 0) {
|
|
152
|
+
return this.message;
|
|
153
|
+
}
|
|
154
|
+
const percentage = Math.min(100, Math.round((this.current / this.total) * 100));
|
|
155
|
+
const bar = this.formatProgressBar(percentage);
|
|
156
|
+
if (this.message) {
|
|
157
|
+
return `${this.message} ${bar} ${percentage}%`;
|
|
158
|
+
}
|
|
159
|
+
return `${bar} ${percentage}%`;
|
|
160
|
+
}
|
|
161
|
+
formatProgressBar(percentage) {
|
|
162
|
+
const width = 20;
|
|
163
|
+
const filled = Math.round((percentage / 100) * width);
|
|
164
|
+
const empty = width - filled;
|
|
165
|
+
const greenPart = chalk_1.default.green('='.repeat(filled));
|
|
166
|
+
const grayPart = chalk_1.default.gray('.'.repeat(empty));
|
|
167
|
+
return `[${greenPart}${grayPart}]`;
|
|
168
|
+
}
|
|
169
|
+
isQuiet() {
|
|
170
|
+
return this.quiet;
|
|
171
|
+
}
|
|
172
|
+
isTTY() {
|
|
173
|
+
return this.ttyEnabled;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
exports.ProgressService = ProgressService;
|
|
177
|
+
exports.ProgressService = ProgressService = __decorate([
|
|
178
|
+
(0, common_1.Injectable)()
|
|
179
|
+
], ProgressService);
|
|
180
|
+
//# sourceMappingURL=progress.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.service.js","sourceRoot":"","sources":["../../../src/infrastructure/prompts/progress.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kDAAoC;AACpC,kDAA0B;AAUnB,IAAM,eAAe,GAArB,MAAM,eAAe;IAArB;QAEG,YAAO,GAAG,CAAC,CAAC;QACZ,UAAK,GAAG,CAAC,CAAC;QACV,YAAO,GAAG,EAAE,CAAC;QACb,UAAK,GAAG,KAAK,CAAC;QACd,eAAU,GAAG,IAAI,CAAC;IAkJ5B,CAAC;IAhJC,KAAK,CAAC,UAA2B,EAAE;QACjC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC;QAChE,IAAI,CAAC,OAAO,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,GAAG,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;QACtD,MAAM,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;QAE7B,MAAM,SAAS,GAAG,eAAK,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAClD,MAAM,QAAQ,GAAG,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/C,OAAO,IAAI,SAAS,GAAG,QAAQ,GAAG,CAAC;IACrC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF,CAAA;AAxJY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;GACA,eAAe,CAwJ3B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CatalogLoader } from '../catalog/catalog-loader';
|
|
2
|
+
import { InitProjectInput } from '@evolith/core-domain/application/services';
|
|
3
|
+
export declare class PromptService {
|
|
4
|
+
private spinner?;
|
|
5
|
+
showIntro(message: string): void;
|
|
6
|
+
showOutro(message: string): void;
|
|
7
|
+
showInfo(message: string): void;
|
|
8
|
+
showSuccess(message: string): void;
|
|
9
|
+
showWarning(message: string): void;
|
|
10
|
+
showError(message: string): void;
|
|
11
|
+
startSpinner(message: string): void;
|
|
12
|
+
stopSpinner(message?: string): void;
|
|
13
|
+
confirm(message: string, initialValue?: boolean): Promise<boolean>;
|
|
14
|
+
text(options: {
|
|
15
|
+
message: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
validate?: (value: string) => string | undefined;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
select<T extends string>(options: {
|
|
21
|
+
message: string;
|
|
22
|
+
options: {
|
|
23
|
+
value: T;
|
|
24
|
+
label?: string;
|
|
25
|
+
hint?: string;
|
|
26
|
+
}[];
|
|
27
|
+
initialValue?: T;
|
|
28
|
+
}): Promise<T>;
|
|
29
|
+
multiselect<T extends string>(options: {
|
|
30
|
+
message: string;
|
|
31
|
+
options: {
|
|
32
|
+
value: T;
|
|
33
|
+
label?: string;
|
|
34
|
+
hint?: string;
|
|
35
|
+
}[];
|
|
36
|
+
required?: boolean;
|
|
37
|
+
initialValues?: T[];
|
|
38
|
+
}): Promise<T[]>;
|
|
39
|
+
askInitOptions(catalog: CatalogLoader): Promise<Partial<InitProjectInput> | null>;
|
|
40
|
+
private isCancelled;
|
|
41
|
+
private writeLog;
|
|
42
|
+
}
|