File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9898 run : |
9999 mkdir -p /tmp/test-cli
100100 cd /tmp/test-cli
101- node ${{ github.workspace }}/dist/cli.js generate test-module --features=websocket,database
102- ls -la test-module/
101+ node ${{ github.workspace }}/dist/cli.js module create test-module --features=websocket,database
102+ ls -la src/modules/ test-module/
103103
104104 build :
105105 name : Build
Original file line number Diff line number Diff line change 11{
22 "name" : " @morojs/cli" ,
3- "version" : " 1.2.1 " ,
3+ "version" : " 1.2.2 " ,
44 "description" : " MoroJS Framework - Comprehensive Development Toolkit" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -428,30 +428,6 @@ export async function runCLI(): Promise<void> {
428428 }
429429 } ) ;
430430
431- // Legacy support for existing module generation
432- program
433- . command ( 'generate <name>' )
434- . alias ( 'g' )
435- . description ( 'Generate module (legacy command)' )
436- . option ( '--features <features>' , 'Comma-separated features' )
437- . action ( async ( name : string , options : any ) => {
438- logger . info (
439- 'Using legacy module generation. Consider using "morojs-cli module create" for enhanced features.' ,
440- 'Legacy'
441- ) ;
442- try {
443- const generator = new ModuleStubGenerator ( ) ;
444- const features = options . features ? options . features . split ( ',' ) : [ ] ;
445- await generator . generateModule ( name , features ) ;
446- } catch ( error ) {
447- logger . error (
448- `Failed to generate module: ${ error instanceof Error ? error . message : 'Unknown error' } ` ,
449- 'Generate'
450- ) ;
451- process . exit ( 1 ) ;
452- }
453- } ) ;
454-
455431 // Help and examples
456432 program
457433 . command ( 'examples' )
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ export class ConfigManager {
8181 return `// MoroJS Configuration
8282// Auto-generated by MoroJS CLI
8383
84+ import { AppConfig } from '@morojs/moro';
85+
8486export default {
8587 server: {
8688 port: parseInt(process.env.PORT || '3000'),
@@ -224,7 +226,7 @@ export default {
224226 workers: parseInt(process.env.CLUSTER_WORKERS || '0') || 'auto'
225227 }
226228 }
227- };` ;
229+ } as Partial<AppConfig> ;` ;
228230 }
229231
230232 private generateEnvContent ( environment : string ) : string {
Original file line number Diff line number Diff line change @@ -598,6 +598,8 @@ CLOUDFLARE_API_TOKEN=`
598598// Generated based on selected features: ${ config . features . join ( ', ' ) }
599599// Reference: https://morojs.com/docs/configuration
600600
601+ import { AppConfig } from '@morojs/moro';
602+
601603export default {
602604 // Server Configuration
603605 server: {
852854 }`
853855 : ''
854856 }
855- };` ;
857+ } as Partial<AppConfig> ;` ;
856858
857859 await writeFile ( join ( projectPath , 'moro.config.ts' ) , configContent ) ;
858860 }
You can’t perform that action at this time.
0 commit comments