@@ -8,49 +8,14 @@ export default class MMakeModel extends MakeModel {
8
8
@flags . string ( MODULE_FLAG )
9
9
declare module : string
10
10
11
- /**
12
- * Run migrations
13
- */
14
- private async runMakeMigration ( ) {
15
- if ( ! this . migration || this . exitCode ) {
16
- return
17
- }
18
-
19
- const makeMigration = await this . kernel . exec ( 'make:migration' , [ this . name ] )
20
- this . exitCode = makeMigration . exitCode
21
- this . error = makeMigration . error
22
- }
23
-
24
- /**
25
- * Make controller
26
- */
27
- private async runMakeController ( ) {
28
- if ( ! this . controller || this . exitCode ) {
29
- return
30
- }
31
-
32
- const makeController = await this . kernel . exec ( 'make:controller' , [ this . name ] )
33
- this . exitCode = makeController . exitCode
34
- this . error = makeController . error
35
- }
36
-
37
- /**
38
- * Make factory
39
- */
40
- private async runMakeFactory ( ) {
41
- if ( ! this . factory || this . exitCode ) {
42
- return
43
- }
44
-
45
- const makeFactory = await this . kernel . exec ( 'make:factory' , [ this . name ] )
46
- this . exitCode = makeFactory . exitCode
47
- this . error = makeFactory . error
48
- }
49
-
50
11
/**
51
12
* Execute command
52
13
*/
53
14
override async run ( ) : Promise < void > {
15
+ if ( ! this . module ) {
16
+ return super . run ( )
17
+ }
18
+
54
19
if ( ! checkModule ( this . app , this . module ) ) {
55
20
this . kernel . exec ( `${ COMMAND_PREFIX } :module` , [ this . module ] )
56
21
}
@@ -60,9 +25,5 @@ export default class MMakeModel extends MakeModel {
60
25
flags : this . parsed . flags ,
61
26
entity : this . app . generators . createEntity ( this . name ) ,
62
27
} )
63
-
64
- await this . runMakeMigration ( )
65
- await this . runMakeController ( )
66
- await this . runMakeFactory ( )
67
28
}
68
29
}
0 commit comments