@morojs/cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +300 -0
  2. package/bin/cli.js +4 -0
  3. package/dist/cli.d.ts +4 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +426 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/config.d.ts +17 -0
  8. package/dist/commands/config.d.ts.map +1 -0
  9. package/dist/commands/config.js +334 -0
  10. package/dist/commands/config.js.map +1 -0
  11. package/dist/commands/database.d.ts +38 -0
  12. package/dist/commands/database.d.ts.map +1 -0
  13. package/dist/commands/database.js +523 -0
  14. package/dist/commands/database.js.map +1 -0
  15. package/dist/commands/deploy.d.ts +18 -0
  16. package/dist/commands/deploy.d.ts.map +1 -0
  17. package/dist/commands/deploy.js +166 -0
  18. package/dist/commands/deploy.js.map +1 -0
  19. package/dist/commands/dev.d.ts +27 -0
  20. package/dist/commands/dev.d.ts.map +1 -0
  21. package/dist/commands/dev.js +216 -0
  22. package/dist/commands/dev.js.map +1 -0
  23. package/dist/commands/init.d.ts +27 -0
  24. package/dist/commands/init.d.ts.map +1 -0
  25. package/dist/commands/init.js +1061 -0
  26. package/dist/commands/init.js.map +1 -0
  27. package/dist/commands/middleware.d.ts +11 -0
  28. package/dist/commands/middleware.d.ts.map +1 -0
  29. package/dist/commands/middleware.js +229 -0
  30. package/dist/commands/middleware.js.map +1 -0
  31. package/dist/index.d.ts +4 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +11 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/logger.d.ts +7 -0
  36. package/dist/logger.d.ts.map +1 -0
  37. package/dist/logger.js +23 -0
  38. package/dist/logger.js.map +1 -0
  39. package/dist/module-stub-generator.d.ts +16 -0
  40. package/dist/module-stub-generator.d.ts.map +1 -0
  41. package/dist/module-stub-generator.js +505 -0
  42. package/dist/module-stub-generator.js.map +1 -0
  43. package/dist/utils/terminal.d.ts +11 -0
  44. package/dist/utils/terminal.d.ts.map +1 -0
  45. package/dist/utils/terminal.js +43 -0
  46. package/dist/utils/terminal.js.map +1 -0
  47. package/package.json +97 -0
@@ -0,0 +1,505 @@
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.ModuleStubGenerator = void 0;
37
+ // Module Stub Generator for MoroJS
38
+ const promises_1 = require("fs/promises");
39
+ const path_1 = require("path");
40
+ const fs_1 = require("fs");
41
+ const logger_1 = require("./logger");
42
+ class ModuleStubGenerator {
43
+ constructor() {
44
+ this.logger = (0, logger_1.createFrameworkLogger)('ModuleStubGenerator');
45
+ }
46
+ async generateAdvancedModule(name, options) {
47
+ const features = options.features ? options.features.split(',') : [];
48
+ const middleware = options.middleware ? options.middleware.split(',') : [];
49
+ const authRoles = options.authRoles ? options.authRoles.split(',') : [];
50
+ this.logger.info(`Generating advanced module: ${name}`, 'ModuleGenerator');
51
+ this.logger.info(`Features: ${features.join(', ') || 'basic'}`, 'ModuleGenerator');
52
+ this.logger.info(`Middleware: ${middleware.join(', ') || 'none'}`, 'ModuleGenerator');
53
+ await this.generateModule(name, features, {
54
+ middleware,
55
+ authRoles,
56
+ withTests: options.withTests,
57
+ withDocs: options.withDocs,
58
+ database: options.database,
59
+ template: options.template,
60
+ routes: options.routes
61
+ });
62
+ }
63
+ async listModules() {
64
+ this.logger.info('Discovering modules in current project...', 'ModuleList');
65
+ try {
66
+ const modulesPath = (0, path_1.join)(process.cwd(), 'src', 'modules');
67
+ if (!(0, fs_1.existsSync)(modulesPath)) {
68
+ this.logger.info('No modules directory found. Create one with: morojs-cli module create <name>', 'ModuleList');
69
+ return;
70
+ }
71
+ const { readdir } = await Promise.resolve().then(() => __importStar(require('fs/promises')));
72
+ const modules = await readdir(modulesPath, { withFileTypes: true });
73
+ const moduleDirectories = modules.filter(dirent => dirent.isDirectory());
74
+ if (moduleDirectories.length === 0) {
75
+ this.logger.info('No modules found. Create one with: morojs-cli module create <name>', 'ModuleList');
76
+ return;
77
+ }
78
+ this.logger.info(`Found ${moduleDirectories.length} module(s):`, 'ModuleList');
79
+ for (const module of moduleDirectories) {
80
+ this.logger.info(` ${module.name}`, 'ModuleList');
81
+ }
82
+ }
83
+ catch (error) {
84
+ this.logger.error(`Failed to list modules: ${error instanceof Error ? error.message : 'Unknown error'}`, 'ModuleList');
85
+ }
86
+ }
87
+ async generateModule(name, features = [], advancedOptions = {}) {
88
+ const modulePath = (0, path_1.join)(process.cwd(), name);
89
+ // Create module directory
90
+ await (0, promises_1.mkdir)(modulePath, { recursive: true });
91
+ // Generate files based on features
92
+ const hasWebSocket = features.includes('websocket');
93
+ const hasDatabase = features.includes('database');
94
+ await Promise.all([
95
+ this.writeTypes(modulePath, name),
96
+ this.writeSchemas(modulePath, name),
97
+ this.writeConfig(modulePath, name),
98
+ this.writeActions(modulePath, name, hasDatabase),
99
+ this.writeRoutes(modulePath, name),
100
+ hasWebSocket ? this.writeSockets(modulePath, name) : Promise.resolve(),
101
+ hasDatabase ? this.writeDatabase(modulePath, name) : Promise.resolve()
102
+ ]);
103
+ await this.writeIndex(modulePath, name, hasWebSocket);
104
+ this.logger.info(`Generated functional module: ${name}`, 'Generation');
105
+ this.logger.info(`Features: ${features.join(', ') || 'basic'}`, 'Instructions');
106
+ this.logger.info(`To get started:`, 'Instructions');
107
+ this.logger.info(` cd ${name}`, 'Instructions');
108
+ this.logger.info(` # Add your business logic to actions.ts`, 'Instructions');
109
+ this.logger.info(` # Configure routes in routes.ts`, 'Instructions');
110
+ this.logger.info(` # Update validation schemas in schemas.ts`, 'Instructions');
111
+ this.logger.info(` # Test with: curl http://localhost:3000/api/v1.0.0/${name}/${name}s`, 'Instructions');
112
+ }
113
+ writeTypes(modulePath, name) {
114
+ const className = this.capitalize(name);
115
+ const content = `// ${className} Types
116
+ export interface ${className} {
117
+ id: number;
118
+ name: string;
119
+ description: string;
120
+ active: boolean;
121
+ createdAt: Date;
122
+ updatedAt: Date;
123
+ }
124
+
125
+ export interface Create${className}Request {
126
+ name: string;
127
+ description: string;
128
+ active?: boolean;
129
+ }
130
+
131
+ export interface Update${className}Request {
132
+ name?: string;
133
+ description?: string;
134
+ active?: boolean;
135
+ }`;
136
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'types.ts'), content);
137
+ }
138
+ writeSchemas(modulePath, name) {
139
+ const className = this.capitalize(name);
140
+ const content = `// ${className} Validation Schemas using Zod
141
+ import { z } from 'zod';
142
+
143
+ // Base schema
144
+ export const ${className}Schema = z.object({
145
+ id: z.number(),
146
+ name: z.string().min(1).max(100),
147
+ description: z.string().max(500),
148
+ active: z.boolean(),
149
+ createdAt: z.date(),
150
+ updatedAt: z.date()
151
+ });
152
+
153
+ // Request schemas
154
+ export const Create${className}Schema = z.object({
155
+ name: z.string().min(2).max(100),
156
+ description: z.string().max(500),
157
+ active: z.boolean().default(true)
158
+ });
159
+
160
+ export const Update${className}Schema = z.object({
161
+ name: z.string().min(2).max(100).optional(),
162
+ description: z.string().max(500).optional(),
163
+ active: z.boolean().optional()
164
+ });
165
+
166
+ // Parameter schemas
167
+ export const ${className}ParamsSchema = z.object({
168
+ id: z.coerce.number().min(1)
169
+ });
170
+
171
+ // Query schemas
172
+ export const ${className}QuerySchema = z.object({
173
+ limit: z.coerce.number().min(1).max(100).default(10),
174
+ offset: z.coerce.number().min(0).default(0),
175
+ active: z.coerce.boolean().optional(),
176
+ search: z.string().optional()
177
+ });
178
+
179
+ // Export types for TypeScript inference
180
+ export type ${className} = z.infer<typeof ${className}Schema>;
181
+ export type Create${className}Request = z.infer<typeof Create${className}Schema>;
182
+ export type Update${className}Request = z.infer<typeof Update${className}Schema>;
183
+ export type ${className}Params = z.infer<typeof ${className}ParamsSchema>;
184
+ export type ${className}Query = z.infer<typeof ${className}QuerySchema>;`;
185
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'schemas.ts'), content);
186
+ }
187
+ writeConfig(modulePath, name) {
188
+ const content = `// ${this.capitalize(name)} Module Configuration
189
+ export const config = {
190
+ prefix: '/${name}s',
191
+ version: '1.0.0',
192
+ description: '${this.capitalize(name)} management module',
193
+ tags: ['${name}', 'api']
194
+ };`;
195
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'config.ts'), content);
196
+ }
197
+ writeActions(modulePath, name, hasDatabase) {
198
+ const className = this.capitalize(name);
199
+ const content = `// ${className} Actions - Pure Business Logic
200
+ import { ${className}, Create${className}Request, Update${className}Request } from './types';
201
+
202
+ // Pure business logic functions that receive dependencies as parameters
203
+ export async function getAll${className}s(database: any): Promise<${className}[]> {
204
+ return database.${name}s || [];
205
+ }
206
+
207
+ export async function get${className}ById(id: number, database: any): Promise<${className} | null> {
208
+ const items = database.${name}s || [];
209
+ return items.find((item: ${className}) => item.id === id) || null;
210
+ }
211
+
212
+ export async function create${className}(data: Create${className}Request, database: any, events: any): Promise<${className}> {
213
+ const items = database.${name}s || [];
214
+ const newItem: ${className} = {
215
+ id: Math.max(...items.map((item: ${className}) => item.id), 0) + 1,
216
+ name: data.name,
217
+ description: data.description,
218
+ active: data.active || true,
219
+ createdAt: new Date(),
220
+ updatedAt: new Date()
221
+ };
222
+
223
+ items.push(newItem);
224
+
225
+ // Intentional event emission
226
+ await events.emit('${name}.created', { ${name}: newItem });
227
+
228
+ return newItem;
229
+ }
230
+
231
+ export async function update${className}(id: number, data: Update${className}Request, database: any, events: any): Promise<${className} | null> {
232
+ const items = database.${name}s || [];
233
+ const itemIndex = items.findIndex((item: ${className}) => item.id === id);
234
+
235
+ if (itemIndex === -1) {
236
+ return null;
237
+ }
238
+
239
+ const updates: any = {};
240
+ if (data.name !== undefined) updates.name = data.name;
241
+ if (data.description !== undefined) updates.description = data.description;
242
+ if (data.active !== undefined) updates.active = data.active;
243
+
244
+ if (Object.keys(updates).length === 0) {
245
+ return items[itemIndex];
246
+ }
247
+
248
+ updates.updatedAt = new Date();
249
+ items[itemIndex] = { ...items[itemIndex], ...updates };
250
+
251
+ // Intentional event emission
252
+ await events.emit('${name}.updated', { ${name}: items[itemIndex], changes: updates });
253
+
254
+ return items[itemIndex];
255
+ }
256
+
257
+ export async function delete${className}(id: number, database: any, events: any): Promise<boolean> {
258
+ const items = database.${name}s || [];
259
+ const itemIndex = items.findIndex((item: ${className}) => item.id === id);
260
+
261
+ if (itemIndex === -1) {
262
+ return false;
263
+ }
264
+
265
+ const item = items[itemIndex];
266
+ items.splice(itemIndex, 1);
267
+
268
+ // Intentional event emission
269
+ await events.emit('${name}.deleted', { ${name}Id: id, ${name}: item });
270
+
271
+ return true;
272
+ }`;
273
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'actions.ts'), content);
274
+ }
275
+ writeRoutes(modulePath, name) {
276
+ const className = this.capitalize(name);
277
+ const content = `// ${className} Routes - HTTP Handlers with Intelligent Routing
278
+ import {
279
+ getAll${className}s,
280
+ get${className}ById,
281
+ create${className},
282
+ update${className},
283
+ delete${className}
284
+ } from './actions';
285
+ import {
286
+ ${className}QuerySchema,
287
+ ${className}ParamsSchema,
288
+ Create${className}Schema,
289
+ Update${className}Schema
290
+ } from './schemas';
291
+
292
+ export const routes = [
293
+ {
294
+ method: 'GET' as const,
295
+ path: '/',
296
+ validation: {
297
+ query: ${className}QuerySchema
298
+ },
299
+ cache: { ttl: 60 },
300
+ rateLimit: { requests: 100, window: 60000 },
301
+ description: 'Get all ${name}s with pagination and filtering',
302
+ tags: ['${name}', 'list'],
303
+ handler: async (req: any, res: any) => {
304
+ const items = await getAll${className}s(req.database);
305
+
306
+ // Apply query filtering
307
+ let filteredItems = items;
308
+ if (req.query.active !== undefined) {
309
+ filteredItems = filteredItems.filter((item: any) => item.active === req.query.active);
310
+ }
311
+ if (req.query.search) {
312
+ filteredItems = filteredItems.filter((item: any) =>
313
+ item.name.toLowerCase().includes(req.query.search.toLowerCase()) ||
314
+ item.description.toLowerCase().includes(req.query.search.toLowerCase())
315
+ );
316
+ }
317
+
318
+ // Apply pagination
319
+ const offset = req.query.offset || 0;
320
+ const limit = req.query.limit || 10;
321
+ const paginatedItems = filteredItems.slice(offset, offset + limit);
322
+
323
+ return {
324
+ success: true,
325
+ data: paginatedItems,
326
+ meta: {
327
+ total: filteredItems.length,
328
+ offset,
329
+ limit,
330
+ hasMore: offset + limit < filteredItems.length
331
+ }
332
+ };
333
+ }
334
+ },
335
+ {
336
+ method: 'GET' as const,
337
+ path: '/:id',
338
+ validation: {
339
+ params: ${className}ParamsSchema
340
+ },
341
+ cache: { ttl: 300 },
342
+ description: 'Get a ${name} by ID',
343
+ tags: ['${name}', 'get'],
344
+ handler: async (req: any, res: any) => {
345
+ const item = await get${className}ById(req.params.id, req.database);
346
+
347
+ if (!item) {
348
+ res.status(404);
349
+ return { success: false, error: '${className} not found' };
350
+ }
351
+
352
+ return { success: true, data: item };
353
+ }
354
+ },
355
+ {
356
+ method: 'POST' as const,
357
+ path: '/',
358
+ validation: {
359
+ body: Create${className}Schema
360
+ },
361
+ rateLimit: { requests: 20, window: 60000 },
362
+ description: 'Create a new ${name}',
363
+ tags: ['${name}', 'create'],
364
+ handler: async (req: any, res: any) => {
365
+ const item = await create${className}(req.body, req.database, req.events);
366
+ res.status(201);
367
+ return { success: true, data: item };
368
+ }
369
+ },
370
+ {
371
+ method: 'PUT' as const,
372
+ path: '/:id',
373
+ validation: {
374
+ params: ${className}ParamsSchema,
375
+ body: Update${className}Schema
376
+ },
377
+ description: 'Update a ${name}',
378
+ tags: ['${name}', 'update'],
379
+ handler: async (req: any, res: any) => {
380
+ const item = await update${className}(req.params.id, req.body, req.database, req.events);
381
+
382
+ if (!item) {
383
+ res.status(404);
384
+ return { success: false, error: '${className} not found' };
385
+ }
386
+
387
+ return { success: true, data: item };
388
+ }
389
+ },
390
+ {
391
+ method: 'DELETE' as const,
392
+ path: '/:id',
393
+ validation: {
394
+ params: ${className}ParamsSchema
395
+ },
396
+ description: 'Delete a ${name}',
397
+ tags: ['${name}', 'delete'],
398
+ handler: async (req: any, res: any) => {
399
+ const success = await delete${className}(req.params.id, req.database, req.events);
400
+
401
+ if (!success) {
402
+ res.status(404);
403
+ return { success: false, error: '${className} not found' };
404
+ }
405
+
406
+ return { success: true, message: '${className} deleted successfully' };
407
+ }
408
+ }
409
+ ];`;
410
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'routes.ts'), content);
411
+ }
412
+ writeSockets(modulePath, name) {
413
+ const className = this.capitalize(name);
414
+ const content = `// ${className} WebSocket Events
415
+ export const ${name}Sockets = [
416
+ {
417
+ event: 'join-${name}-room',
418
+ handler: async (socket: any, data: any) => {
419
+ socket.join(\`${name}-\${data.room}\`);
420
+ return { success: true, room: data.room };
421
+ },
422
+ rateLimit: { requests: 10, window: 60000 }
423
+ },
424
+ {
425
+ event: '${name}-update',
426
+ handler: async (socket: any, data: any) => {
427
+ socket.to(\`${name}-\${data.room}\`).emit('${name}-updated', data);
428
+ return { success: true, data: data };
429
+ },
430
+ rateLimit: { requests: 20, window: 60000 },
431
+ broadcast: true
432
+ }
433
+ ];`;
434
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'sockets.ts'), content);
435
+ }
436
+ async writeDatabase(modulePath, name) {
437
+ const className = this.capitalize(name);
438
+ // Create database directory structure
439
+ await (0, promises_1.mkdir)((0, path_1.join)(modulePath, 'database'), { recursive: true });
440
+ await (0, promises_1.mkdir)((0, path_1.join)(modulePath, 'database', 'migrations'), { recursive: true });
441
+ await (0, promises_1.mkdir)((0, path_1.join)(modulePath, 'database', 'seeds'), { recursive: true });
442
+ // Schema
443
+ const schemaContent = `-- ${className} Module Database Schema
444
+ CREATE TABLE IF NOT EXISTS ${name}s (
445
+ id SERIAL PRIMARY KEY,
446
+ name VARCHAR(255) NOT NULL,
447
+ description TEXT,
448
+ active BOOLEAN DEFAULT TRUE,
449
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
450
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
451
+ );
452
+
453
+ -- Indexes for common queries
454
+ CREATE INDEX IF NOT EXISTS idx_${name}s_name ON ${name}s(name);
455
+ CREATE INDEX IF NOT EXISTS idx_${name}s_created_at ON ${name}s(created_at);`;
456
+ await (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'database', 'schema.sql'), schemaContent);
457
+ // Migration
458
+ const migrationContent = `-- Migration 001: Create ${name}s table
459
+ CREATE TABLE ${name}s (
460
+ id SERIAL PRIMARY KEY,
461
+ name VARCHAR(255) NOT NULL,
462
+ description TEXT,
463
+ active BOOLEAN DEFAULT TRUE,
464
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
465
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
466
+ );
467
+
468
+ -- Indexes for performance
469
+ CREATE INDEX idx_${name}s_name ON ${name}s(name);
470
+ CREATE INDEX idx_${name}s_created_at ON ${name}s(created_at);`;
471
+ await (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'database', 'migrations', '001_create_' + name + 's.sql'), migrationContent);
472
+ // Seeds
473
+ const seedContent = `-- Sample ${className} Data
474
+ INSERT INTO ${name}s (name, description) VALUES
475
+ ('Sample ${className} 1', 'This is a sample ${name} item'),
476
+ ('Sample ${className} 2', 'Another sample ${name} item');`;
477
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'database', 'seeds', 'sample_' + name + 's.sql'), seedContent);
478
+ }
479
+ writeIndex(modulePath, name, hasWebSocket) {
480
+ const className = this.capitalize(name);
481
+ const content = `// ${className} Module - Functional Structure
482
+ import { config } from './config';
483
+ import { routes } from './routes';${hasWebSocket ? `
484
+ import { ${name}Sockets as sockets } from './sockets';` : ''}
485
+ import { defineModule } from '@morojs/moro';
486
+
487
+ export default defineModule({
488
+ name: '${name}',
489
+ version: '1.0.0',
490
+ config,
491
+ routes${hasWebSocket ? `,
492
+ sockets` : ''}
493
+ });
494
+
495
+ // Re-export types and actions for direct usage
496
+ export * from './types';
497
+ export * from './actions';`;
498
+ return (0, promises_1.writeFile)((0, path_1.join)(modulePath, 'index.ts'), content);
499
+ }
500
+ capitalize(str) {
501
+ return str.charAt(0).toUpperCase() + str.slice(1);
502
+ }
503
+ }
504
+ exports.ModuleStubGenerator = ModuleStubGenerator;
505
+ //# sourceMappingURL=module-stub-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-stub-generator.js","sourceRoot":"","sources":["../src/module-stub-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAmC;AACnC,0CAA+C;AAC/C,+BAA4B;AAC5B,2BAAgC;AAChC,qCAAiD;AAEjD,MAAa,mBAAmB;IAAhC;QAC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GAAG,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC;IACnG,CAAC;IAEO,UAAU,CAAC,UAAkB,EAAE,IAAY,EAAE,YAAqB;QACxE,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,MAAM,SAAS;;oCAEC,YAAY,CAAC,CAAC,CAAC;WACxC,IAAI,wCAAwC,CAAC,CAAC,CAAC,EAAE;;;;WAIjD,IAAI;;;UAGL,YAAY,CAAC,CAAC,CAAC;UACf,CAAC,CAAC,CAAC,EAAE;;;;;2BAKY,CAAC;QAExB,OAAO,IAAA,oBAAS,EAAC,IAAA,WAAI,EAAC,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEO,UAAU,CAAC,GAAW;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;CACF;AA/eD,kDA+eC"}
@@ -0,0 +1,11 @@
1
+ export interface TerminalOptions {
2
+ cwd?: string;
3
+ env?: Record<string, string>;
4
+ stdio?: 'inherit' | 'pipe';
5
+ }
6
+ export declare function runTerminalCmd(command: string, options?: TerminalOptions): Promise<{
7
+ stdout: string;
8
+ stderr: string;
9
+ }>;
10
+ export declare function spawnCommand(command: string, args?: string[], options?: TerminalOptions): Promise<number>;
11
+ //# sourceMappingURL=terminal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/utils/terminal.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAa7C;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,MAAM,EAAO,EACnB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runTerminalCmd = runTerminalCmd;
4
+ exports.spawnCommand = spawnCommand;
5
+ // Terminal Command Utilities
6
+ const child_process_1 = require("child_process");
7
+ const util_1 = require("util");
8
+ const execAsync = (0, util_1.promisify)(child_process_1.exec);
9
+ async function runTerminalCmd(command, options = {}) {
10
+ const { cwd = process.cwd(), env = process.env, stdio = 'pipe' } = options;
11
+ try {
12
+ const { stdout, stderr } = await execAsync(command, {
13
+ cwd,
14
+ env: { ...env },
15
+ });
16
+ return { stdout, stderr };
17
+ }
18
+ catch (error) {
19
+ throw new Error(`Command failed: ${command}\n${error.message}`);
20
+ }
21
+ }
22
+ function spawnCommand(command, args = [], options = {}) {
23
+ return new Promise((resolve, reject) => {
24
+ const { cwd = process.cwd(), env = process.env, stdio = 'inherit' } = options;
25
+ const child = (0, child_process_1.spawn)(command, args, {
26
+ cwd,
27
+ env: { ...env },
28
+ stdio,
29
+ });
30
+ child.on('close', code => {
31
+ if (code === 0) {
32
+ resolve(code);
33
+ }
34
+ else {
35
+ reject(new Error(`Command failed with code ${code}: ${command} ${args.join(' ')}`));
36
+ }
37
+ });
38
+ child.on('error', error => {
39
+ reject(error);
40
+ });
41
+ });
42
+ }
43
+ //# sourceMappingURL=terminal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../src/utils/terminal.ts"],"names":[],"mappings":";;AAYA,wCAgBC;AAED,oC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AAC,CAAC;YAChB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,KAAK,CAAC,4BAA4B,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACtF,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACxB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@morojs/cli",
3
+ "version": "1.0.0",
4
+ "description": "MoroJS Framework - Comprehensive Development Toolkit",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "morojs-cli": "./bin/cli.js",
9
+ "moro-cli": "./bin/cli.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ }
17
+ },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "dev": "tsc --watch",
21
+ "clean": "rm -rf dist",
22
+ "prepare-release": "bash scripts/prepare-release.sh",
23
+ "prepublish": "npm run build",
24
+ "test": "jest",
25
+ "test:watch": "jest --watch",
26
+ "lint": "eslint src --fix",
27
+ "format": "prettier --write src/**/*.ts"
28
+ },
29
+ "keywords": [
30
+ "morojs",
31
+ "cli",
32
+ "generator",
33
+ "scaffolding",
34
+ "module",
35
+ "typescript",
36
+ "nodejs",
37
+ "framework",
38
+ "api",
39
+ "microservice",
40
+ "serverless",
41
+ "edge",
42
+ "lambda",
43
+ "vercel",
44
+ "cloudflare"
45
+ ],
46
+ "author": "Moro Framework Team",
47
+ "license": "MIT",
48
+ "homepage": "https://morojs.com",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/Moro-JS/cli.git"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/Moro-JS/cli/issues"
55
+ },
56
+ "engines": {
57
+ "node": ">=18.0.0"
58
+ },
59
+ "dependencies": {
60
+ "commander": "^14.0.0",
61
+ "winston": "^3.11.0",
62
+ "chalk": "^4.1.2",
63
+ "inquirer": "^8.2.6",
64
+ "ora": "^5.4.1",
65
+ "boxen": "^5.1.2",
66
+ "figlet": "^1.7.0",
67
+ "zod": "^3.22.4",
68
+ "fs-extra": "^11.2.0",
69
+ "glob": "^11.0.0",
70
+ "chokidar": "^3.5.3",
71
+ "esbuild": "^0.25.9",
72
+ "nodemon": "^3.0.2"
73
+ },
74
+ "devDependencies": {
75
+ "@types/node": "^24.0.0",
76
+ "@types/inquirer": "^9.0.7",
77
+ "@types/fs-extra": "^11.0.4",
78
+ "@types/figlet": "^1.5.8",
79
+ "@typescript-eslint/eslint-plugin": "^6.13.1",
80
+ "@typescript-eslint/parser": "^6.13.1",
81
+ "eslint": "^8.54.0",
82
+ "eslint-config-prettier": "^10.0.0",
83
+ "eslint-plugin-prettier": "^5.0.1",
84
+ "prettier": "^3.1.0",
85
+ "jest": "^29.7.0",
86
+ "@types/jest": "^30.0.0",
87
+ "ts-jest": "^29.1.1",
88
+ "typescript": "^5.3.2"
89
+ },
90
+ "files": [
91
+ "dist/**/*",
92
+ "bin/**/*",
93
+ "templates/**/*",
94
+ "README.md",
95
+ "LICENSE"
96
+ ]
97
+ }