@evolith/smart-cli 1.1.1 → 1.1.2

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.
Files changed (197) hide show
  1. package/README.md +22 -13
  2. package/package.json +1 -1
  3. package/dist/app.module.d.ts +0 -2
  4. package/dist/app.module.js +0 -134
  5. package/dist/app.module.js.map +0 -1
  6. package/dist/commands/adr/adr.command.d.ts +0 -34
  7. package/dist/commands/adr/adr.command.js +0 -351
  8. package/dist/commands/adr/adr.command.js.map +0 -1
  9. package/dist/commands/agents/agents.command.d.ts +0 -14
  10. package/dist/commands/agents/agents.command.js +0 -61
  11. package/dist/commands/agents/agents.command.js.map +0 -1
  12. package/dist/commands/agents/index.d.ts +0 -1
  13. package/dist/commands/agents/index.js +0 -6
  14. package/dist/commands/agents/index.js.map +0 -1
  15. package/dist/commands/alias/alias.command.d.ts +0 -16
  16. package/dist/commands/alias/alias.command.js +0 -95
  17. package/dist/commands/alias/alias.command.js.map +0 -1
  18. package/dist/commands/api/api.catalog.d.ts +0 -38
  19. package/dist/commands/api/api.catalog.js +0 -167
  20. package/dist/commands/api/api.catalog.js.map +0 -1
  21. package/dist/commands/api/api.command.d.ts +0 -21
  22. package/dist/commands/api/api.command.js +0 -162
  23. package/dist/commands/api/api.command.js.map +0 -1
  24. package/dist/commands/architecture/scaffold/index.d.ts +0 -2
  25. package/dist/commands/architecture/scaffold/index.js +0 -6
  26. package/dist/commands/architecture/scaffold/index.js.map +0 -1
  27. package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +0 -15
  28. package/dist/commands/architecture/scaffold/scaffold-strategy.js +0 -20
  29. package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +0 -1
  30. package/dist/commands/architecture/scaffold.command.d.ts +0 -16
  31. package/dist/commands/architecture/scaffold.command.js +0 -321
  32. package/dist/commands/architecture/scaffold.command.js.map +0 -1
  33. package/dist/commands/completion/completion.command.d.ts +0 -28
  34. package/dist/commands/completion/completion.command.js +0 -321
  35. package/dist/commands/completion/completion.command.js.map +0 -1
  36. package/dist/commands/docs/docs.command.d.ts +0 -17
  37. package/dist/commands/docs/docs.command.js +0 -292
  38. package/dist/commands/docs/docs.command.js.map +0 -1
  39. package/dist/commands/drift/drift.command.d.ts +0 -28
  40. package/dist/commands/drift/drift.command.js +0 -283
  41. package/dist/commands/drift/drift.command.js.map +0 -1
  42. package/dist/commands/fixtures/fixtures.command.d.ts +0 -21
  43. package/dist/commands/fixtures/fixtures.command.js +0 -310
  44. package/dist/commands/fixtures/fixtures.command.js.map +0 -1
  45. package/dist/commands/gate/gate.command.d.ts +0 -29
  46. package/dist/commands/gate/gate.command.js +0 -193
  47. package/dist/commands/gate/gate.command.js.map +0 -1
  48. package/dist/commands/history/history.command.d.ts +0 -29
  49. package/dist/commands/history/history.command.js +0 -237
  50. package/dist/commands/history/history.command.js.map +0 -1
  51. package/dist/commands/init/agents.command.d.ts +0 -24
  52. package/dist/commands/init/agents.command.js +0 -330
  53. package/dist/commands/init/agents.command.js.map +0 -1
  54. package/dist/commands/init/init.command.d.ts +0 -26
  55. package/dist/commands/init/init.command.js +0 -170
  56. package/dist/commands/init/init.command.js.map +0 -1
  57. package/dist/commands/init/init.wizard.d.ts +0 -19
  58. package/dist/commands/init/init.wizard.js +0 -181
  59. package/dist/commands/init/init.wizard.js.map +0 -1
  60. package/dist/commands/init/upgrade.command.d.ts +0 -22
  61. package/dist/commands/init/upgrade.command.js +0 -178
  62. package/dist/commands/init/upgrade.command.js.map +0 -1
  63. package/dist/commands/mcp/mcp-serve.command.d.ts +0 -17
  64. package/dist/commands/mcp/mcp-serve.command.js +0 -153
  65. package/dist/commands/mcp/mcp-serve.command.js.map +0 -1
  66. package/dist/commands/phase/phase-advance.command.d.ts +0 -30
  67. package/dist/commands/phase/phase-advance.command.js +0 -206
  68. package/dist/commands/phase/phase-advance.command.js.map +0 -1
  69. package/dist/commands/profile/profile.command.d.ts +0 -18
  70. package/dist/commands/profile/profile.command.js +0 -198
  71. package/dist/commands/profile/profile.command.js.map +0 -1
  72. package/dist/commands/sdlc/gate-status.command.d.ts +0 -10
  73. package/dist/commands/sdlc/gate-status.command.js +0 -162
  74. package/dist/commands/sdlc/gate-status.command.js.map +0 -1
  75. package/dist/commands/sdlc/generate-domain.command.d.ts +0 -8
  76. package/dist/commands/sdlc/generate-domain.command.js +0 -165
  77. package/dist/commands/sdlc/generate-domain.command.js.map +0 -1
  78. package/dist/commands/sdlc/handoff.command.d.ts +0 -27
  79. package/dist/commands/sdlc/handoff.command.js +0 -275
  80. package/dist/commands/sdlc/handoff.command.js.map +0 -1
  81. package/dist/commands/sdlc/sdlc.command.d.ts +0 -5
  82. package/dist/commands/sdlc/sdlc.command.js +0 -44
  83. package/dist/commands/sdlc/sdlc.command.js.map +0 -1
  84. package/dist/commands/standards/standards.command.d.ts +0 -30
  85. package/dist/commands/standards/standards.command.js +0 -283
  86. package/dist/commands/standards/standards.command.js.map +0 -1
  87. package/dist/commands/update/update.command.d.ts +0 -21
  88. package/dist/commands/update/update.command.js +0 -214
  89. package/dist/commands/update/update.command.js.map +0 -1
  90. package/dist/commands/upgrade/index.d.ts +0 -1
  91. package/dist/commands/upgrade/index.js +0 -6
  92. package/dist/commands/upgrade/index.js.map +0 -1
  93. package/dist/commands/upgrade/upgrade.command.d.ts +0 -14
  94. package/dist/commands/upgrade/upgrade.command.js +0 -58
  95. package/dist/commands/upgrade/upgrade.command.js.map +0 -1
  96. package/dist/commands/validate/validate.command.d.ts +0 -43
  97. package/dist/commands/validate/validate.command.js +0 -514
  98. package/dist/commands/validate/validate.command.js.map +0 -1
  99. package/dist/config/alias.service.d.ts +0 -14
  100. package/dist/config/alias.service.js +0 -103
  101. package/dist/config/alias.service.js.map +0 -1
  102. package/dist/contributions/contribution-validator.d.ts +0 -16
  103. package/dist/contributions/contribution-validator.js +0 -34
  104. package/dist/contributions/contribution-validator.js.map +0 -1
  105. package/dist/contributions/index.d.ts +0 -1
  106. package/dist/contributions/index.js +0 -6
  107. package/dist/contributions/index.js.map +0 -1
  108. package/dist/infrastructure/adapters/agent-registry.service.d.ts +0 -30
  109. package/dist/infrastructure/adapters/agent-registry.service.js +0 -175
  110. package/dist/infrastructure/adapters/agent-registry.service.js.map +0 -1
  111. package/dist/infrastructure/architecture/nx-workspace.strategy.d.ts +0 -19
  112. package/dist/infrastructure/architecture/nx-workspace.strategy.js +0 -125
  113. package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +0 -1
  114. package/dist/infrastructure/catalog/catalog-loader.d.ts +0 -21
  115. package/dist/infrastructure/catalog/catalog-loader.js +0 -144
  116. package/dist/infrastructure/catalog/catalog-loader.js.map +0 -1
  117. package/dist/infrastructure/cli/base-command.d.ts +0 -14
  118. package/dist/infrastructure/cli/base-command.js +0 -41
  119. package/dist/infrastructure/cli/base-command.js.map +0 -1
  120. package/dist/infrastructure/cli/command-executor.d.ts +0 -20
  121. package/dist/infrastructure/cli/command-executor.js +0 -110
  122. package/dist/infrastructure/cli/command-executor.js.map +0 -1
  123. package/dist/infrastructure/cli/providers/index.d.ts +0 -52
  124. package/dist/infrastructure/cli/providers/index.js +0 -175
  125. package/dist/infrastructure/cli/providers/index.js.map +0 -1
  126. package/dist/infrastructure/config/config.service.d.ts +0 -34
  127. package/dist/infrastructure/config/config.service.js +0 -126
  128. package/dist/infrastructure/config/config.service.js.map +0 -1
  129. package/dist/infrastructure/filesystem/file-manager.service.d.ts +0 -12
  130. package/dist/infrastructure/filesystem/file-manager.service.js +0 -79
  131. package/dist/infrastructure/filesystem/file-manager.service.js.map +0 -1
  132. package/dist/infrastructure/formatters/output-formatter.service.d.ts +0 -28
  133. package/dist/infrastructure/formatters/output-formatter.service.js +0 -199
  134. package/dist/infrastructure/formatters/output-formatter.service.js.map +0 -1
  135. package/dist/infrastructure/observability/command-watcher.d.ts +0 -45
  136. package/dist/infrastructure/observability/command-watcher.js +0 -199
  137. package/dist/infrastructure/observability/command-watcher.js.map +0 -1
  138. package/dist/infrastructure/observability/error-reporter.d.ts +0 -47
  139. package/dist/infrastructure/observability/error-reporter.js +0 -163
  140. package/dist/infrastructure/observability/error-reporter.js.map +0 -1
  141. package/dist/infrastructure/observability/index.d.ts +0 -11
  142. package/dist/infrastructure/observability/index.js +0 -31
  143. package/dist/infrastructure/observability/index.js.map +0 -1
  144. package/dist/infrastructure/observability/otel-tracing.d.ts +0 -4
  145. package/dist/infrastructure/observability/otel-tracing.js +0 -34
  146. package/dist/infrastructure/observability/otel-tracing.js.map +0 -1
  147. package/dist/infrastructure/observability/structured-logger.d.ts +0 -53
  148. package/dist/infrastructure/observability/structured-logger.js +0 -123
  149. package/dist/infrastructure/observability/structured-logger.js.map +0 -1
  150. package/dist/infrastructure/observability/timing.d.ts +0 -23
  151. package/dist/infrastructure/observability/timing.js +0 -140
  152. package/dist/infrastructure/observability/timing.js.map +0 -1
  153. package/dist/infrastructure/observability/tool-usage-telemetry.service.d.ts +0 -46
  154. package/dist/infrastructure/observability/tool-usage-telemetry.service.js +0 -181
  155. package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +0 -1
  156. package/dist/infrastructure/plugins/plugin-loader.d.ts +0 -10
  157. package/dist/infrastructure/plugins/plugin-loader.js +0 -145
  158. package/dist/infrastructure/plugins/plugin-loader.js.map +0 -1
  159. package/dist/infrastructure/plugins/plugin.module.d.ts +0 -4
  160. package/dist/infrastructure/plugins/plugin.module.js +0 -28
  161. package/dist/infrastructure/plugins/plugin.module.js.map +0 -1
  162. package/dist/infrastructure/prompts/init-prompt-group.d.ts +0 -3
  163. package/dist/infrastructure/prompts/init-prompt-group.js +0 -115
  164. package/dist/infrastructure/prompts/init-prompt-group.js.map +0 -1
  165. package/dist/infrastructure/prompts/init-prompt-options.d.ts +0 -10
  166. package/dist/infrastructure/prompts/init-prompt-options.js +0 -40
  167. package/dist/infrastructure/prompts/init-prompt-options.js.map +0 -1
  168. package/dist/infrastructure/prompts/progress.service.d.ts +0 -24
  169. package/dist/infrastructure/prompts/progress.service.js +0 -180
  170. package/dist/infrastructure/prompts/progress.service.js.map +0 -1
  171. package/dist/infrastructure/prompts/prompt.service.d.ts +0 -42
  172. package/dist/infrastructure/prompts/prompt.service.js +0 -142
  173. package/dist/infrastructure/prompts/prompt.service.js.map +0 -1
  174. package/dist/infrastructure/prompts/wizard.service.d.ts +0 -27
  175. package/dist/infrastructure/prompts/wizard.service.js +0 -163
  176. package/dist/infrastructure/prompts/wizard.service.js.map +0 -1
  177. package/dist/infrastructure/providers/config-parser.provider.d.ts +0 -15
  178. package/dist/infrastructure/providers/config-parser.provider.js +0 -68
  179. package/dist/infrastructure/providers/config-parser.provider.js.map +0 -1
  180. package/dist/infrastructure/providers/logger.provider.d.ts +0 -10
  181. package/dist/infrastructure/providers/logger.provider.js +0 -84
  182. package/dist/infrastructure/providers/logger.provider.js.map +0 -1
  183. package/dist/infrastructure/providers/mock-filesystem.provider.d.ts +0 -34
  184. package/dist/infrastructure/providers/mock-filesystem.provider.js +0 -129
  185. package/dist/infrastructure/providers/mock-filesystem.provider.js.map +0 -1
  186. package/dist/infrastructure/providers/node-filesystem.provider.d.ts +0 -23
  187. package/dist/infrastructure/providers/node-filesystem.provider.js +0 -117
  188. package/dist/infrastructure/providers/node-filesystem.provider.js.map +0 -1
  189. package/dist/main.d.ts +0 -2
  190. package/dist/main.js +0 -27
  191. package/dist/main.js.map +0 -1
  192. package/dist/plugins/index.d.ts +0 -1
  193. package/dist/plugins/index.js +0 -6
  194. package/dist/plugins/index.js.map +0 -1
  195. package/dist/plugins/plugin-registry.d.ts +0 -22
  196. package/dist/plugins/plugin-registry.js +0 -33
  197. package/dist/plugins/plugin-registry.js.map +0 -1
@@ -1,103 +0,0 @@
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 __metadata = (this && this.__metadata) || function (k, v) {
42
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.AliasService = void 0;
46
- const fs = __importStar(require("fs"));
47
- const path = __importStar(require("path"));
48
- const common_1 = require("@nestjs/common");
49
- let AliasService = class AliasService {
50
- constructor() {
51
- this.aliases = {};
52
- const home = process.env.HOME || process.env.USERPROFILE || '';
53
- const dir = path.join(home, '.evolith');
54
- if (!fs.existsSync(dir)) {
55
- fs.mkdirSync(dir, { recursive: true });
56
- }
57
- this.aliasFile = path.join(dir, 'aliases.json');
58
- this.load();
59
- }
60
- load() {
61
- if (fs.existsSync(this.aliasFile)) {
62
- try {
63
- const data = fs.readFileSync(this.aliasFile, 'utf-8');
64
- this.aliases = JSON.parse(data);
65
- }
66
- catch {
67
- this.aliases = {};
68
- }
69
- }
70
- }
71
- save() {
72
- fs.writeFileSync(this.aliasFile, JSON.stringify(this.aliases, null, 2), 'utf-8');
73
- }
74
- getAll() {
75
- return { ...this.aliases };
76
- }
77
- add(alias, command) {
78
- if (this.aliases[alias]) {
79
- throw new Error(`Alias \"${alias}\" already exists`);
80
- }
81
- if (Object.keys(this.aliases).includes(command)) {
82
- throw new Error(`Cannot alias to an existing command name \"${command}\"`);
83
- }
84
- this.aliases[alias] = command;
85
- this.save();
86
- }
87
- remove(alias) {
88
- if (!this.aliases[alias]) {
89
- throw new Error(`Alias \"${alias}\" not found`);
90
- }
91
- delete this.aliases[alias];
92
- this.save();
93
- }
94
- resolve(aliasOrCommand) {
95
- return this.aliases[aliasOrCommand] || aliasOrCommand;
96
- }
97
- };
98
- exports.AliasService = AliasService;
99
- exports.AliasService = AliasService = __decorate([
100
- (0, common_1.Injectable)(),
101
- __metadata("design:paramtypes", [])
102
- ], AliasService);
103
- //# sourceMappingURL=alias.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alias.service.js","sourceRoot":"","sources":["../../src/config/alias.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA4C;AAOrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAIvB;QAFQ,YAAO,GAAa,EAAE,CAAC;QAG7B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,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C,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CAAC,8CAA8C,OAAO,IAAI,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,cAAc,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,OAAO,CAAC,cAAsB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC;IACxD,CAAC;CACF,CAAA;AAvDY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;;GACA,YAAY,CAuDxB"}
@@ -1,16 +0,0 @@
1
- export type ContributionType = 'ruleset' | 'topology' | 'adr' | 'template';
2
- export interface Contribution {
3
- type: ContributionType;
4
- path: string;
5
- author: string;
6
- description: string;
7
- }
8
- export interface ValidationResult {
9
- valid: boolean;
10
- errors: string[];
11
- warnings: string[];
12
- }
13
- export declare class ContributionValidator {
14
- validate(contribution: Contribution): ValidationResult;
15
- validateBatch(contributions: Contribution[]): Map<string, ValidationResult>;
16
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContributionValidator = void 0;
4
- class ContributionValidator {
5
- validate(contribution) {
6
- const errors = [];
7
- const warnings = [];
8
- if (!contribution.path || contribution.path.trim().length === 0) {
9
- errors.push('Contribution path is required');
10
- }
11
- if (!contribution.author || contribution.author.trim().length === 0) {
12
- errors.push('Contribution author is required');
13
- }
14
- if (!contribution.description || contribution.description.trim().length === 0) {
15
- warnings.push('Contribution description is empty — recommended for review clarity');
16
- }
17
- if (contribution.type === 'ruleset' && !contribution.path.endsWith('.rules.json')) {
18
- errors.push('Ruleset contributions must end with .rules.json');
19
- }
20
- if (contribution.type === 'adr' && !contribution.path.includes('/adrs/')) {
21
- errors.push('ADR contributions must be placed under a /adrs/ directory');
22
- }
23
- return { valid: errors.length === 0, errors, warnings };
24
- }
25
- validateBatch(contributions) {
26
- const results = new Map();
27
- for (const contrib of contributions) {
28
- results.set(contrib.path, this.validate(contrib));
29
- }
30
- return results;
31
- }
32
- }
33
- exports.ContributionValidator = ContributionValidator;
34
- //# sourceMappingURL=contribution-validator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contribution-validator.js","sourceRoot":"","sources":["../../src/contributions/contribution-validator.ts"],"names":[],"mappings":";;;AAeA,MAAa,qBAAqB;IAChC,QAAQ,CAAC,YAA0B;QACjC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChE,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC/C,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpE,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9E,QAAQ,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;QACtF,CAAC;QAED,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAClF,MAAM,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,YAAY,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzE,MAAM,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC;QAC3E,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC1D,CAAC;IAED,aAAa,CAAC,aAA6B;QACzC,MAAM,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;QACpD,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAnCD,sDAmCC"}
@@ -1 +0,0 @@
1
- export { ContributionValidator, Contribution, ContributionType, ValidationResult } from './contribution-validator';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContributionValidator = void 0;
4
- var contribution_validator_1 = require("./contribution-validator");
5
- Object.defineProperty(exports, "ContributionValidator", { enumerable: true, get: function () { return contribution_validator_1.ContributionValidator; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contributions/index.ts"],"names":[],"mappings":";;;AAAA,mEAAmH;AAA1G,+HAAA,qBAAqB,OAAA"}
@@ -1,30 +0,0 @@
1
- import { IFileSystem } from '@evolith/core-domain/domain/interfaces';
2
- export interface AgentInfo {
3
- name: string;
4
- version: string;
5
- template: string;
6
- rulesetFiles: string[];
7
- installedAt: string;
8
- description?: string;
9
- adrs?: string[];
10
- rulesets?: string[];
11
- lastValidated?: string;
12
- }
13
- export interface AgentRegistry {
14
- agents: AgentInfo[];
15
- lastUpdated: string;
16
- }
17
- export declare class AgentRegistryService {
18
- private readonly fs;
19
- private readonly registryFileName;
20
- private readonly agentsDirName;
21
- constructor(fs: IFileSystem);
22
- discover(repoPath: string): Promise<AgentInfo[]>;
23
- installAgent(repoPath: string, agentInfo: AgentInfo, rulesetContent: Record<string, unknown>): Promise<void>;
24
- unregister(repoPath: string, agentName: string): Promise<boolean>;
25
- getAgent(repoPath: string, agentName: string): Promise<AgentInfo | undefined>;
26
- updateAgent(repoPath: string, agentName: string, config: AgentInfo, rulesetContent: Record<string, unknown>): Promise<boolean>;
27
- updateLastValidated(repoPath: string, agentName: string): Promise<void>;
28
- exportManifest(repoPath: string): Promise<string>;
29
- private loadOrCreateRegistry;
30
- }
@@ -1,175 +0,0 @@
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.AgentRegistryService = void 0;
37
- const path = __importStar(require("path"));
38
- class AgentRegistryService {
39
- constructor(fs) {
40
- this.registryFileName = 'agents-registry.json';
41
- this.agentsDirName = 'rulesets/agents';
42
- this.fs = fs;
43
- }
44
- async discover(repoPath) {
45
- const agentsPath = path.join(repoPath, this.agentsDirName);
46
- if (!(await this.fs.exists(agentsPath))) {
47
- return [];
48
- }
49
- const registryPath = path.join(agentsPath, this.registryFileName);
50
- if (await this.fs.exists(registryPath)) {
51
- const registry = await this.fs.readJson(registryPath);
52
- return registry.agents || [];
53
- }
54
- const entries = await this.fs.readdirNames(agentsPath);
55
- const agents = [];
56
- for (const entry of entries) {
57
- const agentPath = path.join(agentsPath, entry);
58
- const stat = await this.fs.stat(agentPath);
59
- if (stat.isDirectory()) {
60
- const agentConfigPath = path.join(agentPath, 'agent.config.json');
61
- if (await this.fs.exists(agentConfigPath)) {
62
- const agentData = await this.fs.readJson(agentConfigPath);
63
- agents.push(agentData);
64
- }
65
- }
66
- }
67
- return agents;
68
- }
69
- async installAgent(repoPath, agentInfo, rulesetContent) {
70
- const agentsPath = path.join(repoPath, this.agentsDirName);
71
- await this.fs.ensureDir(agentsPath);
72
- const agentPath = path.join(agentsPath, agentInfo.name);
73
- await this.fs.ensureDir(agentPath);
74
- const configPath = path.join(agentPath, 'agent.config.json');
75
- const rulesetPath = path.join(agentPath, 'agent.rules.json');
76
- await this.fs.writeJson(configPath, agentInfo);
77
- await this.fs.writeJson(rulesetPath, rulesetContent);
78
- const registry = await this.loadOrCreateRegistry(agentsPath);
79
- const existingIdx = registry.agents.findIndex(a => a.name === agentInfo.name);
80
- if (existingIdx >= 0) {
81
- registry.agents[existingIdx] = agentInfo;
82
- }
83
- else {
84
- registry.agents.push(agentInfo);
85
- }
86
- registry.lastUpdated = new Date().toISOString();
87
- await this.fs.writeJson(path.join(agentsPath, this.registryFileName), registry);
88
- }
89
- async unregister(repoPath, agentName) {
90
- const agentsPath = path.join(repoPath, this.agentsDirName);
91
- const registryPath = path.join(agentsPath, this.registryFileName);
92
- if (!(await this.fs.exists(registryPath))) {
93
- return false;
94
- }
95
- const registry = await this.fs.readJson(registryPath);
96
- const idx = registry.agents.findIndex(a => a.name === agentName);
97
- if (idx < 0) {
98
- return false;
99
- }
100
- registry.agents.splice(idx, 1);
101
- registry.lastUpdated = new Date().toISOString();
102
- await this.fs.writeJson(registryPath, registry);
103
- const agentPath = path.join(agentsPath, agentName);
104
- if (await this.fs.exists(agentPath)) {
105
- await this.fs.remove(agentPath);
106
- }
107
- return true;
108
- }
109
- async getAgent(repoPath, agentName) {
110
- const agents = await this.discover(repoPath);
111
- return agents.find(a => a.name === agentName);
112
- }
113
- async updateAgent(repoPath, agentName, config, rulesetContent) {
114
- const agentsPath = path.join(repoPath, this.agentsDirName);
115
- const agentPath = path.join(agentsPath, agentName);
116
- if (!(await this.fs.exists(agentPath))) {
117
- return false;
118
- }
119
- await this.fs.writeJson(path.join(agentPath, 'agent.config.json'), config);
120
- await this.fs.writeJson(path.join(agentPath, 'agent.rules.json'), rulesetContent);
121
- const registryPath = path.join(agentsPath, this.registryFileName);
122
- if (await this.fs.exists(registryPath)) {
123
- const registry = await this.fs.readJson(registryPath);
124
- const idx = registry.agents.findIndex(a => a.name === agentName);
125
- if (idx >= 0) {
126
- registry.agents[idx] = config;
127
- registry.lastUpdated = new Date().toISOString();
128
- await this.fs.writeJson(registryPath, registry);
129
- }
130
- }
131
- return true;
132
- }
133
- async updateLastValidated(repoPath, agentName) {
134
- const agentsPath = path.join(repoPath, this.agentsDirName);
135
- const registryPath = path.join(agentsPath, this.registryFileName);
136
- if (!(await this.fs.exists(registryPath))) {
137
- return;
138
- }
139
- const registry = await this.fs.readJson(registryPath);
140
- const agent = registry.agents.find(a => a.name === agentName);
141
- if (agent) {
142
- agent.lastValidated = new Date().toISOString();
143
- registry.lastUpdated = new Date().toISOString();
144
- await this.fs.writeJson(registryPath, registry);
145
- }
146
- }
147
- async exportManifest(repoPath) {
148
- const agents = await this.discover(repoPath);
149
- return JSON.stringify({
150
- version: '1.0',
151
- exportedAt: new Date().toISOString(),
152
- agentCount: agents.length,
153
- agents: agents.map(a => ({
154
- name: a.name,
155
- version: a.version,
156
- template: a.template,
157
- rulesets: a.rulesetFiles,
158
- installedAt: a.installedAt,
159
- status: a.lastValidated ? 'validated' : 'pending',
160
- })),
161
- }, null, 2);
162
- }
163
- async loadOrCreateRegistry(agentsPath) {
164
- const registryPath = path.join(agentsPath, this.registryFileName);
165
- if (await this.fs.exists(registryPath)) {
166
- return await this.fs.readJson(registryPath);
167
- }
168
- return {
169
- agents: [],
170
- lastUpdated: new Date().toISOString(),
171
- };
172
- }
173
- }
174
- exports.AgentRegistryService = AgentRegistryService;
175
- //# sourceMappingURL=agent-registry.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-registry.service.js","sourceRoot":"","sources":["../../../src/infrastructure/adapters/agent-registry.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAoB7B,MAAa,oBAAoB;IAK/B,YAAY,EAAe;QAHV,qBAAgB,GAAG,sBAAsB,CAAC;QAC1C,kBAAa,GAAG,iBAAiB,CAAC;QAGjD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB;QAC7B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAE3D,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;YACxC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,CAAC;YACpB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,UAAU,EAAE,MAAM,CAAC,MAAM;YACzB,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACvB,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;gBACpB,QAAQ,EAAE,CAAC,CAAC,YAAY;gBACxB,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;aAClD,CAAC,CAAC;SACJ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAAC,UAAkB;QACnD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAElE,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACvC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAkB,CAAC;QAC/D,CAAC;QAED,OAAO;YACL,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACtC,CAAC;IACJ,CAAC;CACF;AA1KD,oDA0KC"}
@@ -1,19 +0,0 @@
1
- import { WorkspaceManagerStrategy } from '@evolith/core-domain/application/architecture/workspace-manager.strategy';
2
- import { ICommandExecutor } from '@evolith/core-domain/domain/interfaces';
3
- import { PromptService } from '../prompts/prompt.service';
4
- export declare class NxWorkspaceStrategy implements WorkspaceManagerStrategy {
5
- private readonly commandExecutor;
6
- private readonly promptService;
7
- private frontendFramework;
8
- private dryRun;
9
- constructor(commandExecutor: ICommandExecutor, promptService: PromptService);
10
- setDryRun(dryRun: boolean): void;
11
- private getTargetDir;
12
- private runNx;
13
- private runNpm;
14
- installDependencies(frontendFramework: string, orm: string): Promise<void>;
15
- generateStandardWebApp(name: string, framework: string): Promise<void>;
16
- generateHostApp(name: string, remotes: string[], framework: string): Promise<void>;
17
- generateApiApp(name: string): Promise<void>;
18
- generateLibrary(name: string, type: 'domain' | 'shell' | 'shared'): Promise<void>;
19
- }
@@ -1,125 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.NxWorkspaceStrategy = void 0;
40
- const chalk_1 = __importDefault(require("chalk"));
41
- const path = __importStar(require("path"));
42
- const process = __importStar(require("process"));
43
- const MFE_CAPABLE_FRAMEWORKS = new Set(['react', 'angular']);
44
- class NxWorkspaceStrategy {
45
- constructor(commandExecutor, promptService) {
46
- this.commandExecutor = commandExecutor;
47
- this.promptService = promptService;
48
- this.frontendFramework = 'react';
49
- this.dryRun = false;
50
- }
51
- setDryRun(dryRun) {
52
- this.dryRun = dryRun;
53
- }
54
- getTargetDir() {
55
- const currentDir = process.cwd();
56
- return path.join(currentDir, 'src');
57
- }
58
- async runNx(command) {
59
- const targetDir = this.getTargetDir();
60
- if (this.dryRun) {
61
- this.promptService.showInfo(chalk_1.default.yellow(`[DRY-RUN] Would execute in ${targetDir}: npx nx ${command}`));
62
- return;
63
- }
64
- this.promptService.showInfo(chalk_1.default.gray(`> Executing in ${targetDir}: npx nx ${command}`));
65
- await this.commandExecutor.executeOrThrow(`npx nx ${command} --no-interactive`, targetDir);
66
- }
67
- async runNpm(command) {
68
- const targetDir = this.getTargetDir();
69
- if (this.dryRun) {
70
- this.promptService.showInfo(chalk_1.default.yellow(`[DRY-RUN] Would execute in ${targetDir}: npm ${command}`));
71
- return;
72
- }
73
- this.promptService.showInfo(chalk_1.default.gray(`> Executing in ${targetDir}: npm ${command}`));
74
- await this.commandExecutor.executeOrThrow(`npm ${command} --legacy-peer-deps`, targetDir);
75
- }
76
- async installDependencies(frontendFramework, orm) {
77
- const fw = frontendFramework.toLowerCase();
78
- this.frontendFramework = fw;
79
- this.promptService.showInfo(chalk_1.default.cyan(`\nšŸ“¦ Installing Nx Plugins for ${fw.toUpperCase()} and NestJS...`));
80
- await this.runNpm(`install -D @nx/nest @nx/${fw} @nx/webpack`);
81
- if (orm.toLowerCase() === 'prisma') {
82
- await this.runNpm(`install -D prisma @prisma/client`);
83
- }
84
- else if (orm.toLowerCase() === 'typeorm') {
85
- await this.runNpm(`install -D typeorm`);
86
- }
87
- }
88
- async generateStandardWebApp(name, framework) {
89
- const fw = framework.toLowerCase();
90
- this.frontendFramework = fw;
91
- this.promptService.showInfo(chalk_1.default.cyan(`\nšŸ—ļø Generating Standard Web App (Phase 1) [${name}] (${fw.toUpperCase()})...`));
92
- await this.runNx(`g @nx/${fw}:app --name=${name} --directory=apps/${name}`);
93
- }
94
- async generateHostApp(name, remotes, framework) {
95
- const fw = framework.toLowerCase();
96
- this.frontendFramework = fw;
97
- this.promptService.showInfo(chalk_1.default.cyan(`\nšŸ—ļø Generating MFE Host App [${name}] with Remotes [${remotes.join(', ')}] (${fw.toUpperCase()})...`));
98
- if (!MFE_CAPABLE_FRAMEWORKS.has(fw)) {
99
- this.promptService.showInfo(chalk_1.default.yellow(`⚠ @nx/${fw} does not provide a native Module Federation :host generator.\n` +
100
- ` Generating a standard ${fw.toUpperCase()} app instead. Configure MFE manually\n` +
101
- ` (e.g. @originjs/vite-plugin-federation for Vue).`));
102
- await this.runNx(`g @nx/${fw}:app --name=${name} --directory=apps/${name}`);
103
- return;
104
- }
105
- const remotesFlag = remotes.length > 0 ? `--remotes=${remotes.join(',')}` : '';
106
- await this.runNx(`g @nx/${fw}:host --name=${name} ${remotesFlag} --directory=apps/${name}`);
107
- }
108
- async generateApiApp(name) {
109
- this.promptService.showInfo(chalk_1.default.cyan(`\nāš™ļø Generating NestJS API App [${name}]...`));
110
- await this.runNx(`g @nx/nest:app --name=${name} --directory=apps/${name}`);
111
- }
112
- async generateLibrary(name, type) {
113
- this.promptService.showInfo(chalk_1.default.cyan(`\nšŸ“š Generating Library [${type}/${name}]...`));
114
- if (type === 'shared' && name.includes('ui')) {
115
- const fw = this.frontendFramework;
116
- this.promptService.showInfo(chalk_1.default.gray(` Using @nx/${fw}:library for shared UI library.`));
117
- await this.runNx(`g @nx/${fw}:library --name=${name} --directory=libs/${type}/${name}`);
118
- }
119
- else {
120
- await this.runNx(`g @nx/nest:library --name=${name} --directory=libs/${type}/${name}`);
121
- }
122
- }
123
- }
124
- exports.NxWorkspaceStrategy = NxWorkspaceStrategy;
125
- //# sourceMappingURL=nx-workspace.strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nx-workspace.strategy.js","sourceRoot":"","sources":["../../../src/infrastructure/architecture/nx-workspace.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,kDAA0B;AAC1B,2CAA6B;AAC7B,iDAAmC;AAQnC,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7D,MAAa,mBAAmB;IAK9B,YACmB,eAAiC,EACjC,aAA4B;QAD5B,oBAAe,GAAf,eAAe,CAAkB;QACjC,kBAAa,GAAb,aAAa,CAAe;QALvC,sBAAiB,GAAG,OAAO,CAAC;QAC5B,WAAM,GAAG,KAAK,CAAC;IAKpB,CAAC;IAEJ,SAAS,CAAC,MAAe;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,YAAY;QAClB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAEO,KAAK,CAAC,KAAK,CAAC,OAAe;QACjC,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAK,CAAC,MAAM,CAAC,8BAA8B,SAAS,YAAY,OAAO,EAAE,CAAC,CAAC,CAAC;YACxG,OAAO;QACT,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAK,CAAC,IAAI,CAAC,kBAAkB,SAAS,YAAY,OAAO,EAAE,CAAC,CAAC,CAAC;QAG1F,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,UAAU,OAAO,mBAAm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AI,IAAI,WAAW,qBAAqB,IAAI,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,IAAY;QAC/B,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAK,CAAC,IAAI,CAAC,oCAAoC,IAAI,MAAM,CAAC,CAAC,CAAC;QACxF,MAAM,IAAI,CAAC,KAAK,CAAC,yBAAyB,IAAI,qBAAqB,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,IAAY,EAAE,IAAmC;QACrE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAK,CAAC,IAAI,CAAC,4BAA4B,IAAI,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC;QAExF,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAG7C,MAAM,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC;YAClC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,iCAAiC,CAAC,CAAC,CAAC;YAC7F,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,mBAAmB,IAAI,qBAAqB,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;QAC1F,CAAC;aAAM,CAAC;YAEN,MAAM,IAAI,CAAC,KAAK,CAAC,6BAA6B,IAAI,qBAAqB,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;CACF;AArGD,kDAqGC"}
@@ -1,21 +0,0 @@
1
- import { ICatalogLoader, Runtime, MonorepoOption, ArchitecturePattern, ToolCatalog, CommandsMatrix } from '@evolith/core-domain/domain/interfaces';
2
- export declare class CatalogLoader implements ICatalogLoader {
3
- private runtimeCatalog;
4
- private toolCatalog;
5
- private commandsMatrix;
6
- private getConfigPath;
7
- loadRuntimeCatalog(): Runtime[];
8
- loadToolCatalog(): ToolCatalog;
9
- loadCommandsMatrix(): CommandsMatrix;
10
- getMonorepoOptions(): MonorepoOption[];
11
- getArchitecturePatterns(): ArchitecturePattern[];
12
- getDefaultDatabase(runtimeId: string): string;
13
- getApiProtocols(): Array<{
14
- id: string;
15
- name: string;
16
- description: string;
17
- }>;
18
- private loadJson;
19
- private transformToCommandsMatrix;
20
- reload(): void;
21
- }