@warlock.js/core 4.0.142 → 4.0.144
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/esm/cli/commands/generate/generate.command.d.ts.map +1 -1
- package/esm/cli/commands/generate/generate.command.js +20 -0
- package/esm/cli/commands/generate/generate.command.js.map +1 -1
- package/esm/cli/commands/generate/generators/column-dsl-parser.d.ts +11 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.d.ts.map +1 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.js +47 -0
- package/esm/cli/commands/generate/generators/column-dsl-parser.js.map +1 -0
- package/esm/cli/commands/generate/generators/controller.generator.js +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.d.ts +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.d.ts.map +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.js +44 -4
- package/esm/cli/commands/generate/generators/migration.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.d.ts.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.js +5 -3
- package/esm/cli/commands/generate/generators/model.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/module.generator.d.ts.map +1 -1
- package/esm/cli/commands/generate/generators/module.generator.js +19 -27
- package/esm/cli/commands/generate/generators/module.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.js +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.js +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.js +1 -1
- package/esm/cli/commands/generate/generators/service.generator.js.map +1 -1
- package/esm/cli/commands/generate/generators/validation.generator.js +1 -1
- package/esm/cli/commands/generate/generators/validation.generator.js.map +1 -1
- package/esm/cli/commands/generate/templates/stubs.d.ts +42 -27
- package/esm/cli/commands/generate/templates/stubs.d.ts.map +1 -1
- package/esm/cli/commands/generate/templates/stubs.js +184 -237
- package/esm/cli/commands/generate/templates/stubs.js.map +1 -1
- package/esm/cli/commands/generate/utils/name-parser.d.ts +22 -27
- package/esm/cli/commands/generate/utils/name-parser.d.ts.map +1 -1
- package/esm/cli/commands/generate/utils/name-parser.js +41 -52
- package/esm/cli/commands/generate/utils/name-parser.js.map +1 -1
- package/esm/cli/commands/migrate.command.d.ts.map +1 -1
- package/esm/cli/commands/migrate.command.js +5 -0
- package/esm/cli/commands/migrate.command.js.map +1 -1
- package/esm/database/migrate-action.d.ts.map +1 -1
- package/esm/database/migrate-action.js +7 -2
- package/esm/database/migrate-action.js.map +1 -1
- package/package.json +8 -7
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ParsedName } from "../types";
|
|
2
|
+
import { Name } from "../utils/name-parser";
|
|
2
3
|
/**
|
|
3
4
|
* Controller template stub
|
|
4
5
|
*/
|
|
@@ -9,106 +10,120 @@ export declare function controllerStub(name: ParsedName, options?: {
|
|
|
9
10
|
* CRUD Create Controller template
|
|
10
11
|
* Note: moduleName is the module (plural), we need singular entity name
|
|
11
12
|
*/
|
|
12
|
-
export declare function crudCreateControllerStub(moduleName:
|
|
13
|
+
export declare function crudCreateControllerStub(moduleName: Name): string;
|
|
13
14
|
/**
|
|
14
15
|
* CRUD Update Controller template
|
|
15
16
|
*/
|
|
16
|
-
export declare function crudUpdateControllerStub(moduleName:
|
|
17
|
+
export declare function crudUpdateControllerStub(moduleName: Name): string;
|
|
17
18
|
/**
|
|
18
19
|
* CRUD List Controller template
|
|
19
20
|
*/
|
|
20
|
-
export declare function crudListControllerStub(moduleName:
|
|
21
|
+
export declare function crudListControllerStub(moduleName: Name): string;
|
|
21
22
|
/**
|
|
22
23
|
* CRUD Show/Get Controller template
|
|
23
24
|
*/
|
|
24
|
-
export declare function crudShowControllerStub(moduleName:
|
|
25
|
+
export declare function crudShowControllerStub(moduleName: Name): string;
|
|
25
26
|
/**
|
|
26
27
|
* CRUD Delete Controller template
|
|
27
28
|
*/
|
|
28
|
-
export declare function crudDeleteControllerStub(moduleName:
|
|
29
|
+
export declare function crudDeleteControllerStub(moduleName: Name): string;
|
|
29
30
|
/**
|
|
30
31
|
* CRUD Routes template
|
|
31
32
|
*/
|
|
32
|
-
export declare function crudRoutesStub(moduleName:
|
|
33
|
+
export declare function crudRoutesStub(moduleName: Name): string;
|
|
33
34
|
/**
|
|
34
35
|
* CRUD Model template
|
|
35
36
|
*/
|
|
36
|
-
export declare function crudModelStub(moduleName:
|
|
37
|
+
export declare function crudModelStub(moduleName: Name): string;
|
|
37
38
|
/**
|
|
38
39
|
* CRUD Resource template
|
|
39
40
|
*/
|
|
40
|
-
export declare function crudResourceStub(moduleName:
|
|
41
|
+
export declare function crudResourceStub(moduleName: Name): string;
|
|
41
42
|
/**
|
|
42
43
|
* CRUD Repository template
|
|
43
44
|
*/
|
|
44
|
-
export declare function crudRepositoryStub(
|
|
45
|
+
export declare function crudRepositoryStub(entity: Name): string;
|
|
45
46
|
/**
|
|
46
47
|
* CRUD Create Service template
|
|
47
48
|
*/
|
|
48
|
-
export declare function crudCreateServiceStub(
|
|
49
|
+
export declare function crudCreateServiceStub(entity: Name): string;
|
|
49
50
|
/**
|
|
50
51
|
* CRUD Update Service template
|
|
51
52
|
*/
|
|
52
|
-
export declare function crudUpdateServiceStub(
|
|
53
|
+
export declare function crudUpdateServiceStub(entity: Name): string;
|
|
53
54
|
/**
|
|
54
55
|
* CRUD List Service template
|
|
55
56
|
*/
|
|
56
|
-
export declare function crudListServiceStub(
|
|
57
|
+
export declare function crudListServiceStub(entity: Name): string;
|
|
57
58
|
/**
|
|
58
59
|
* CRUD Get Service template
|
|
59
60
|
*/
|
|
60
|
-
export declare function crudGetServiceStub(
|
|
61
|
+
export declare function crudGetServiceStub(entity: Name): string;
|
|
61
62
|
/**
|
|
62
63
|
* CRUD Delete Service template
|
|
63
64
|
*/
|
|
64
|
-
export declare function crudDeleteServiceStub(
|
|
65
|
+
export declare function crudDeleteServiceStub(entity: Name): string;
|
|
65
66
|
/**
|
|
66
67
|
* CRUD Seed template
|
|
67
68
|
*/
|
|
68
|
-
export declare function crudSeedStub(
|
|
69
|
+
export declare function crudSeedStub(entity: Name): string;
|
|
69
70
|
/**
|
|
70
71
|
* Migration template
|
|
71
72
|
*/
|
|
72
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Migration Create template
|
|
75
|
+
*/
|
|
76
|
+
export declare function migrationStub(entityName: ParsedName, options?: {
|
|
77
|
+
columns?: string;
|
|
78
|
+
imports?: string[];
|
|
79
|
+
timestamps?: boolean;
|
|
80
|
+
tableName?: string;
|
|
81
|
+
}): string;
|
|
82
|
+
/**
|
|
83
|
+
* Migration Alter template
|
|
84
|
+
*/
|
|
85
|
+
export declare function migrationAlterStub(entityName: ParsedName, options?: {
|
|
86
|
+
add?: string;
|
|
87
|
+
drop?: string;
|
|
88
|
+
rename?: string;
|
|
89
|
+
imports?: string[];
|
|
90
|
+
}): string;
|
|
73
91
|
/**
|
|
74
92
|
* CRUD Create Schema template
|
|
75
93
|
* Outputs to: schema/create-{entity}.schema.ts
|
|
76
94
|
*/
|
|
77
|
-
export declare function crudCreateValidationStub(moduleName:
|
|
95
|
+
export declare function crudCreateValidationStub(moduleName: Name): string;
|
|
78
96
|
/**
|
|
79
97
|
* CRUD Update Schema template
|
|
80
98
|
* Outputs to: schema/update-{entity}.schema.ts
|
|
81
99
|
*/
|
|
82
|
-
export declare function crudUpdateValidationStub(moduleName:
|
|
100
|
+
export declare function crudUpdateValidationStub(moduleName: Name): string;
|
|
83
101
|
/**
|
|
84
102
|
* Service template stub
|
|
85
103
|
*/
|
|
86
|
-
export declare function serviceStub(name:
|
|
104
|
+
export declare function serviceStub(name: Name): string;
|
|
87
105
|
/**
|
|
88
106
|
* Schema template stub
|
|
89
107
|
* Outputs to: schema/{name}.schema.ts
|
|
90
108
|
*/
|
|
91
|
-
export declare function validationStub(name:
|
|
109
|
+
export declare function validationStub(name: Name): string;
|
|
92
110
|
/**
|
|
93
111
|
* Request type template stub
|
|
94
112
|
*/
|
|
95
|
-
export declare function requestStub(name:
|
|
113
|
+
export declare function requestStub(name: Name): string;
|
|
96
114
|
/**
|
|
97
115
|
* Model template stub
|
|
98
116
|
*/
|
|
99
|
-
export declare function modelStub(name:
|
|
117
|
+
export declare function modelStub(name: Name, options?: {
|
|
100
118
|
tableName?: string;
|
|
101
119
|
withResource?: boolean;
|
|
102
120
|
}): string;
|
|
103
121
|
/**
|
|
104
122
|
* Repository template stub
|
|
105
123
|
*/
|
|
106
|
-
export declare function repositoryStub(name:
|
|
124
|
+
export declare function repositoryStub(name: Name): string;
|
|
107
125
|
/**
|
|
108
126
|
* Resource template stub
|
|
109
127
|
*/
|
|
110
|
-
export declare function resourceStub(name:
|
|
111
|
-
/**
|
|
112
|
-
* Migration template stub
|
|
113
|
-
*/
|
|
128
|
+
export declare function resourceStub(name: Name): string;
|
|
114
129
|
//# sourceMappingURL=stubs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/generate/templates/stubs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/generate/templates/stubs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,MAAM,CA2BR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,CAqBjE;AAED;;GAEG;AAC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