mycontext-cli 1.0.2 → 1.0.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/README.md +34 -36
- package/dist/agents/intelligence/ProjectIntelligence.d.ts.map +1 -1
- package/dist/agents/intelligence/ProjectIntelligence.js +4 -16
- package/dist/agents/intelligence/ProjectIntelligence.js.map +1 -1
- package/dist/cli.js +55 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +15 -8
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/enhance.d.ts.map +1 -1
- package/dist/commands/enhance.js +11 -0
- package/dist/commands/enhance.js.map +1 -1
- package/dist/commands/playbooks.d.ts +1 -0
- package/dist/commands/playbooks.d.ts.map +1 -1
- package/dist/commands/playbooks.js +58 -24
- package/dist/commands/playbooks.js.map +1 -1
- package/dist/commands/predict.d.ts.map +1 -1
- package/dist/commands/predict.js +11 -0
- package/dist/commands/predict.js.map +1 -1
- package/dist/commands/refine.d.ts.map +1 -1
- package/dist/commands/refine.js +11 -0
- package/dist/commands/refine.js.map +1 -1
- package/dist/commands/sanitize.d.ts +30 -0
- package/dist/commands/sanitize.d.ts.map +1 -0
- package/dist/commands/sanitize.js +489 -0
- package/dist/commands/sanitize.js.map +1 -0
- package/dist/commands/setup-database.d.ts +33 -0
- package/dist/commands/setup-database.d.ts.map +1 -0
- package/dist/commands/setup-database.js +665 -0
- package/dist/commands/setup-database.js.map +1 -0
- package/dist/utils/contextLoader.d.ts +50 -0
- package/dist/utils/contextLoader.d.ts.map +1 -0
- package/dist/utils/contextLoader.js +283 -0
- package/dist/utils/contextLoader.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ProjectContext {
|
|
2
|
+
prd?: string;
|
|
3
|
+
types?: string;
|
|
4
|
+
brand?: string;
|
|
5
|
+
componentList?: any;
|
|
6
|
+
userStories?: string;
|
|
7
|
+
technicalSpecs?: string;
|
|
8
|
+
projectStructure?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ContextLoadOptions {
|
|
11
|
+
verbose?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Loads project context from .mycontext directory
|
|
16
|
+
* Provides fallback to context/ directory for backward compatibility
|
|
17
|
+
*/
|
|
18
|
+
export declare class ContextLoader {
|
|
19
|
+
private projectPath;
|
|
20
|
+
constructor(projectPath?: string);
|
|
21
|
+
/**
|
|
22
|
+
* Load all available context files
|
|
23
|
+
*/
|
|
24
|
+
loadProjectContext(options?: ContextLoadOptions): Promise<ProjectContext>;
|
|
25
|
+
/**
|
|
26
|
+
* Load context from a specific directory
|
|
27
|
+
*/
|
|
28
|
+
private loadFromDirectory;
|
|
29
|
+
/**
|
|
30
|
+
* Get a description from context files, with fallback priority
|
|
31
|
+
*/
|
|
32
|
+
getDescriptionFromContext(options?: ContextLoadOptions): Promise<string | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if context files exist
|
|
35
|
+
*/
|
|
36
|
+
hasContextFiles(): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Get context summary for display
|
|
39
|
+
*/
|
|
40
|
+
getContextSummary(context: ProjectContext): string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Convenience function to load project context
|
|
44
|
+
*/
|
|
45
|
+
export declare function loadProjectContext(projectPath?: string, options?: ContextLoadOptions): Promise<ProjectContext>;
|
|
46
|
+
/**
|
|
47
|
+
* Convenience function to get description from context
|
|
48
|
+
*/
|
|
49
|
+
export declare function getDescriptionFromContext(projectPath?: string, options?: ContextLoadOptions): Promise<string | null>;
|
|
50
|
+
//# sourceMappingURL=contextLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextLoader.d.ts","sourceRoot":"","sources":["../../src/utils/contextLoader.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,GAAE,MAAsB;IAI/C;;OAEG;IACG,kBAAkB,CACtB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,cAAc,CAAC;IA2C1B;;OAEG;YACW,iBAAiB;IAoI/B;;OAEG;IACG,yBAAyB,CAC7B,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAuBzB;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAKzC;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM;CAanD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,cAAc,CAAC,CAGzB;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGxB"}
|
|
@@ -0,0 +1,283 @@
|
|
|
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.ContextLoader = void 0;
|
|
40
|
+
exports.loadProjectContext = loadProjectContext;
|
|
41
|
+
exports.getDescriptionFromContext = getDescriptionFromContext;
|
|
42
|
+
const fs = __importStar(require("fs-extra"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
45
|
+
/**
|
|
46
|
+
* Loads project context from .mycontext directory
|
|
47
|
+
* Provides fallback to context/ directory for backward compatibility
|
|
48
|
+
*/
|
|
49
|
+
class ContextLoader {
|
|
50
|
+
constructor(projectPath = process.cwd()) {
|
|
51
|
+
this.projectPath = projectPath;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Load all available context files
|
|
55
|
+
*/
|
|
56
|
+
async loadProjectContext(options = {}) {
|
|
57
|
+
const context = {};
|
|
58
|
+
const { verbose = false, required = false } = options;
|
|
59
|
+
try {
|
|
60
|
+
// Try .mycontext directory first (new structure)
|
|
61
|
+
const mycontextDir = path.join(this.projectPath, ".mycontext");
|
|
62
|
+
if (await fs.pathExists(mycontextDir)) {
|
|
63
|
+
await this.loadFromDirectory(mycontextDir, context, verbose);
|
|
64
|
+
}
|
|
65
|
+
else if (required) {
|
|
66
|
+
throw new Error("No .mycontext directory found. Run 'mycontext init' first.");
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// Fallback to context/ directory (legacy structure)
|
|
70
|
+
const contextDir = path.join(this.projectPath, "context");
|
|
71
|
+
if (await fs.pathExists(contextDir)) {
|
|
72
|
+
if (verbose) {
|
|
73
|
+
console.log(chalk_1.default.gray("📁 Using legacy context/ directory"));
|
|
74
|
+
}
|
|
75
|
+
await this.loadFromDirectory(contextDir, context, verbose);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (verbose && Object.keys(context).length > 0) {
|
|
79
|
+
console.log(chalk_1.default.green("✅ Context loaded successfully"));
|
|
80
|
+
console.log(chalk_1.default.gray(` Available: ${Object.keys(context).join(", ")}`));
|
|
81
|
+
}
|
|
82
|
+
return context;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (required) {
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
if (verbose) {
|
|
89
|
+
console.log(chalk_1.default.yellow("⚠️ Some context files could not be loaded"));
|
|
90
|
+
}
|
|
91
|
+
return context;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Load context from a specific directory
|
|
96
|
+
*/
|
|
97
|
+
async loadFromDirectory(dir, context, verbose) {
|
|
98
|
+
// Load PRD
|
|
99
|
+
const prdCandidates = ["01-prd.md", "prd.md", "01_PRD.md", "PRD.md"];
|
|
100
|
+
for (const candidate of prdCandidates) {
|
|
101
|
+
const prdPath = path.join(dir, candidate);
|
|
102
|
+
if (await fs.pathExists(prdPath)) {
|
|
103
|
+
context.prd = await fs.readFile(prdPath, "utf8");
|
|
104
|
+
if (verbose) {
|
|
105
|
+
console.log(chalk_1.default.gray(` 📄 PRD: ${candidate}`));
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Load Types
|
|
111
|
+
const typesCandidates = [
|
|
112
|
+
"02-types.ts",
|
|
113
|
+
"types.ts",
|
|
114
|
+
"02_types.ts",
|
|
115
|
+
"types/index.ts",
|
|
116
|
+
];
|
|
117
|
+
for (const candidate of typesCandidates) {
|
|
118
|
+
const typesPath = path.join(dir, candidate);
|
|
119
|
+
if (await fs.pathExists(typesPath)) {
|
|
120
|
+
context.types = await fs.readFile(typesPath, "utf8");
|
|
121
|
+
if (verbose) {
|
|
122
|
+
console.log(chalk_1.default.gray(` 📄 Types: ${candidate}`));
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// Load Brand
|
|
128
|
+
const brandCandidates = [
|
|
129
|
+
"03-branding.md",
|
|
130
|
+
"branding.md",
|
|
131
|
+
"03_branding.md",
|
|
132
|
+
"brand/globals.css",
|
|
133
|
+
"brand/branding.md",
|
|
134
|
+
];
|
|
135
|
+
for (const candidate of brandCandidates) {
|
|
136
|
+
const brandPath = path.join(dir, candidate);
|
|
137
|
+
if (await fs.pathExists(brandPath)) {
|
|
138
|
+
context.brand = await fs.readFile(brandPath, "utf8");
|
|
139
|
+
if (verbose) {
|
|
140
|
+
console.log(chalk_1.default.gray(` 📄 Brand: ${candidate}`));
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Load Component List
|
|
146
|
+
const compListCandidates = [
|
|
147
|
+
"04-component-list.json",
|
|
148
|
+
"component-list.json",
|
|
149
|
+
"04_component_list.json",
|
|
150
|
+
"components-list.json",
|
|
151
|
+
];
|
|
152
|
+
for (const candidate of compListCandidates) {
|
|
153
|
+
const compListPath = path.join(dir, candidate);
|
|
154
|
+
if (await fs.pathExists(compListPath)) {
|
|
155
|
+
try {
|
|
156
|
+
const compListRaw = await fs.readFile(compListPath, "utf8");
|
|
157
|
+
context.componentList = JSON.parse(compListRaw);
|
|
158
|
+
if (verbose) {
|
|
159
|
+
console.log(chalk_1.default.gray(` 📄 Component List: ${candidate}`));
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
// Invalid JSON, try next candidate
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Load User Stories
|
|
170
|
+
const userStoriesCandidates = [
|
|
171
|
+
"02_user_stories.md",
|
|
172
|
+
"user_stories.md",
|
|
173
|
+
"01a-brief.md",
|
|
174
|
+
"01b-requirements.md",
|
|
175
|
+
];
|
|
176
|
+
for (const candidate of userStoriesCandidates) {
|
|
177
|
+
const userStoriesPath = path.join(dir, candidate);
|
|
178
|
+
if (await fs.pathExists(userStoriesPath)) {
|
|
179
|
+
context.userStories = await fs.readFile(userStoriesPath, "utf8");
|
|
180
|
+
if (verbose) {
|
|
181
|
+
console.log(chalk_1.default.gray(` 📄 User Stories: ${candidate}`));
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// Load Technical Specs
|
|
187
|
+
const techSpecsCandidates = [
|
|
188
|
+
"03_technical_specs.md",
|
|
189
|
+
"technical_specs.md",
|
|
190
|
+
"01c-flows.md",
|
|
191
|
+
];
|
|
192
|
+
for (const candidate of techSpecsCandidates) {
|
|
193
|
+
const techSpecsPath = path.join(dir, candidate);
|
|
194
|
+
if (await fs.pathExists(techSpecsPath)) {
|
|
195
|
+
context.technicalSpecs = await fs.readFile(techSpecsPath, "utf8");
|
|
196
|
+
if (verbose) {
|
|
197
|
+
console.log(chalk_1.default.gray(` 📄 Technical Specs: ${candidate}`));
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// Load Project Structure
|
|
203
|
+
const structureCandidates = [
|
|
204
|
+
"05-project-structure.md",
|
|
205
|
+
"project-structure.md",
|
|
206
|
+
"05_project_structure.md",
|
|
207
|
+
];
|
|
208
|
+
for (const candidate of structureCandidates) {
|
|
209
|
+
const structurePath = path.join(dir, candidate);
|
|
210
|
+
if (await fs.pathExists(structurePath)) {
|
|
211
|
+
context.projectStructure = await fs.readFile(structurePath, "utf8");
|
|
212
|
+
if (verbose) {
|
|
213
|
+
console.log(chalk_1.default.gray(` 📄 Project Structure: ${candidate}`));
|
|
214
|
+
}
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Get a description from context files, with fallback priority
|
|
221
|
+
*/
|
|
222
|
+
async getDescriptionFromContext(options = {}) {
|
|
223
|
+
const context = await this.loadProjectContext(options);
|
|
224
|
+
// Priority order: PRD > Types > User Stories > Technical Specs
|
|
225
|
+
if (context.prd && context.prd.trim()) {
|
|
226
|
+
return context.prd.trim();
|
|
227
|
+
}
|
|
228
|
+
if (context.types && context.types.trim()) {
|
|
229
|
+
return context.types.trim();
|
|
230
|
+
}
|
|
231
|
+
if (context.userStories && context.userStories.trim()) {
|
|
232
|
+
return context.userStories.trim();
|
|
233
|
+
}
|
|
234
|
+
if (context.technicalSpecs && context.technicalSpecs.trim()) {
|
|
235
|
+
return context.technicalSpecs.trim();
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Check if context files exist
|
|
241
|
+
*/
|
|
242
|
+
async hasContextFiles() {
|
|
243
|
+
const context = await this.loadProjectContext();
|
|
244
|
+
return Object.keys(context).length > 0;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get context summary for display
|
|
248
|
+
*/
|
|
249
|
+
getContextSummary(context) {
|
|
250
|
+
const parts = [];
|
|
251
|
+
if (context.prd)
|
|
252
|
+
parts.push("PRD");
|
|
253
|
+
if (context.types)
|
|
254
|
+
parts.push("Types");
|
|
255
|
+
if (context.brand)
|
|
256
|
+
parts.push("Brand");
|
|
257
|
+
if (context.componentList)
|
|
258
|
+
parts.push("Components");
|
|
259
|
+
if (context.userStories)
|
|
260
|
+
parts.push("User Stories");
|
|
261
|
+
if (context.technicalSpecs)
|
|
262
|
+
parts.push("Technical Specs");
|
|
263
|
+
if (context.projectStructure)
|
|
264
|
+
parts.push("Project Structure");
|
|
265
|
+
return parts.length > 0 ? parts.join(", ") : "No context found";
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.ContextLoader = ContextLoader;
|
|
269
|
+
/**
|
|
270
|
+
* Convenience function to load project context
|
|
271
|
+
*/
|
|
272
|
+
async function loadProjectContext(projectPath, options) {
|
|
273
|
+
const loader = new ContextLoader(projectPath);
|
|
274
|
+
return loader.loadProjectContext(options);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Convenience function to get description from context
|
|
278
|
+
*/
|
|
279
|
+
async function getDescriptionFromContext(projectPath, options) {
|
|
280
|
+
const loader = new ContextLoader(projectPath);
|
|
281
|
+
return loader.getDescriptionFromContext(options);
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=contextLoader.js.map
|
|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AC,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,OAAO,CAAC,aAAa;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,cAAc;YAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC1D,IAAI,OAAO,CAAC,gBAAgB;YAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAE9D,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAClE,CAAC;CACF;AAlPD,sCAkPC;AAED;;GAEG;AACI,KAAK,UAAU,kBAAkB,CACtC,WAAoB,EACpB,OAA4B;IAE5B,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,yBAAyB,CAC7C,WAAoB,EACpB,OAA4B;IAE5B,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mycontext-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "mycontext CLI - AI-powered component generation with shadcn/ui and Next.js 15 integration",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -47,10 +47,12 @@
|
|
|
47
47
|
"chalk": "^5.3.0",
|
|
48
48
|
"commander": "^11.1.0",
|
|
49
49
|
"fs-extra": "^11.1.1",
|
|
50
|
+
"glob": "^10.3.10",
|
|
50
51
|
"inquirer": "^9.2.12",
|
|
51
52
|
"node-fetch": "^2.7.0",
|
|
52
53
|
"ora": "^7.0.1",
|
|
53
54
|
"prompts": "^2.4.2",
|
|
55
|
+
"sonner": "^2.0.7",
|
|
54
56
|
"uuid": "^9.0.1"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|