@nestjs/schematics 8.0.2 → 8.0.6
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/dist/collection.json +34 -17
- package/dist/index.js +1 -1
- package/dist/lib/application/application.factory.js +6 -6
- package/dist/lib/application/files/js/package.json +11 -11
- package/dist/lib/application/files/ts/package.json +7 -6
- package/dist/lib/application/files/ts/tsconfig.json +6 -1
- package/dist/lib/application/schema.json +6 -1
- package/dist/lib/class/class.factory.js +6 -6
- package/dist/lib/client-app/angular/angular.factory.js +9 -9
- package/dist/lib/configuration/configuration.factory.js +4 -4
- package/dist/lib/controller/controller.factory.js +8 -8
- package/dist/lib/decorator/decorator.factory.js +5 -5
- package/dist/lib/filter/filter.factory.js +6 -6
- package/dist/lib/gateway/gateway.factory.js +8 -8
- package/dist/lib/guard/guard.factory.js +6 -6
- package/dist/lib/interceptor/interceptor.factory.js +6 -6
- package/dist/lib/interface/interface.factory.js +5 -5
- package/dist/lib/library/library.factory.js +19 -18
- package/dist/lib/middleware/middleware.factory.js +6 -6
- package/dist/lib/module/module.factory.js +7 -7
- package/dist/lib/pipe/pipe.factory.js +6 -6
- package/dist/lib/provider/provider.factory.js +8 -8
- package/dist/lib/resolver/resolver.factory.js +8 -8
- package/dist/lib/resource/resource.factory.js +13 -13
- package/dist/lib/service/service.factory.js +9 -9
- package/dist/lib/sub-app/files/ts/test/app.e2e-spec.ts +1 -1
- package/dist/lib/sub-app/sub-app.factory.js +28 -27
- package/dist/utils/index.js +1 -1
- package/dist/utils/json-file.util.js +7 -7
- package/dist/utils/metadata.manager.js +1 -1
- package/dist/utils/module-import.declarator.js +2 -2
- package/dist/utils/module.declarator.js +2 -2
- package/dist/utils/module.finder.js +1 -1
- package/dist/utils/name.parser.js +3 -3
- package/dist/utils/path.solver.js +2 -2
- package/dist/utils/source-root.helpers.js +2 -2
- package/package.json +18 -18
package/dist/collection.json
CHANGED
|
@@ -14,37 +14,44 @@
|
|
|
14
14
|
"class": {
|
|
15
15
|
"factory": "./lib/class/class.factory#main",
|
|
16
16
|
"description": "Create a new class.",
|
|
17
|
-
"schema": "./lib/class/schema.json"
|
|
17
|
+
"schema": "./lib/class/schema.json",
|
|
18
|
+
"aliases": ["cl"]
|
|
18
19
|
},
|
|
19
20
|
"controller": {
|
|
20
21
|
"factory": "./lib/controller/controller.factory#main",
|
|
21
22
|
"description": "Create a Nest controller.",
|
|
22
|
-
"schema": "./lib/controller/schema.json"
|
|
23
|
+
"schema": "./lib/controller/schema.json",
|
|
24
|
+
"aliases": ["co"]
|
|
23
25
|
},
|
|
24
26
|
"decorator": {
|
|
25
27
|
"factory": "./lib/decorator/decorator.factory#main",
|
|
26
28
|
"description": "Create a Nest decorator.",
|
|
27
|
-
"schema": "./lib/decorator/schema.json"
|
|
29
|
+
"schema": "./lib/decorator/schema.json",
|
|
30
|
+
"aliases": ["d"]
|
|
28
31
|
},
|
|
29
32
|
"filter": {
|
|
30
33
|
"factory": "./lib/filter/filter.factory#main",
|
|
31
34
|
"description": "Create a Nest filter.",
|
|
32
|
-
"schema": "./lib/filter/schema.json"
|
|
35
|
+
"schema": "./lib/filter/schema.json",
|
|
36
|
+
"aliases": ["f"]
|
|
33
37
|
},
|
|
34
38
|
"gateway": {
|
|
35
39
|
"factory": "./lib/gateway/gateway.factory#main",
|
|
36
40
|
"description": "Create a Nest gateway.",
|
|
37
|
-
"schema": "./lib/gateway/schema.json"
|
|
41
|
+
"schema": "./lib/gateway/schema.json",
|
|
42
|
+
"aliases": ["ga"]
|
|
38
43
|
},
|
|
39
44
|
"guard": {
|
|
40
45
|
"factory": "./lib/guard/guard.factory#main",
|
|
41
46
|
"description": "Create a Nest guard.",
|
|
42
|
-
"schema": "./lib/guard/schema.json"
|
|
47
|
+
"schema": "./lib/guard/schema.json",
|
|
48
|
+
"aliases": ["gu"]
|
|
43
49
|
},
|
|
44
50
|
"interceptor": {
|
|
45
51
|
"factory": "./lib/interceptor/interceptor.factory#main",
|
|
46
52
|
"description": "Create a Nest interceptor.",
|
|
47
|
-
"schema": "./lib/interceptor/schema.json"
|
|
53
|
+
"schema": "./lib/interceptor/schema.json",
|
|
54
|
+
"aliases": ["in"]
|
|
48
55
|
},
|
|
49
56
|
"interface": {
|
|
50
57
|
"factory": "./lib/interface/interface.factory#main",
|
|
@@ -54,51 +61,61 @@
|
|
|
54
61
|
"middleware": {
|
|
55
62
|
"factory": "./lib/middleware/middleware.factory#main",
|
|
56
63
|
"description": "Create a Nest middleware.",
|
|
57
|
-
"schema": "./lib/middleware/schema.json"
|
|
64
|
+
"schema": "./lib/middleware/schema.json",
|
|
65
|
+
"aliases": ["mi"]
|
|
58
66
|
},
|
|
59
67
|
"module": {
|
|
60
68
|
"factory": "./lib/module/module.factory#main",
|
|
61
69
|
"description": "Create a Nest module.",
|
|
62
|
-
"schema": "./lib/module/schema.json"
|
|
70
|
+
"schema": "./lib/module/schema.json",
|
|
71
|
+
"aliases": ["mo"]
|
|
63
72
|
},
|
|
64
73
|
"pipe": {
|
|
65
74
|
"factory": "./lib/pipe/pipe.factory#main",
|
|
66
75
|
"description": "Create a Nest pipe.",
|
|
67
|
-
"schema": "./lib/pipe/schema.json"
|
|
76
|
+
"schema": "./lib/pipe/schema.json",
|
|
77
|
+
"aliases": ["pi"]
|
|
68
78
|
},
|
|
69
79
|
"provider": {
|
|
70
80
|
"factory": "./lib/provider/provider.factory#main",
|
|
71
81
|
"description": "Create a Nest provider.",
|
|
72
|
-
"schema": "./lib/provider/schema.json"
|
|
82
|
+
"schema": "./lib/provider/schema.json",
|
|
83
|
+
"aliases": ["pr"]
|
|
73
84
|
},
|
|
74
85
|
"service": {
|
|
75
86
|
"factory": "./lib/service/service.factory#main",
|
|
76
87
|
"description": "Create a Nest service.",
|
|
77
|
-
"schema": "./lib/service/schema.json"
|
|
88
|
+
"schema": "./lib/service/schema.json",
|
|
89
|
+
"aliases": ["s"]
|
|
78
90
|
},
|
|
79
91
|
"resolver": {
|
|
80
92
|
"factory": "./lib/resolver/resolver.factory#main",
|
|
81
93
|
"description": "Create a Nest resolver.",
|
|
82
|
-
"schema": "./lib/resolver/schema.json"
|
|
94
|
+
"schema": "./lib/resolver/schema.json",
|
|
95
|
+
"aliases": ["r"]
|
|
83
96
|
},
|
|
84
97
|
"configuration": {
|
|
85
98
|
"factory": "./lib/configuration/configuration.factory#main",
|
|
86
|
-
"description": "Create a Nest CLI configuration."
|
|
99
|
+
"description": "Create a Nest CLI configuration.",
|
|
100
|
+
"aliases": ["config"]
|
|
87
101
|
},
|
|
88
102
|
"library": {
|
|
89
103
|
"factory": "./lib/library/library.factory#main",
|
|
90
104
|
"description": "Create a Nest library (mono-repo).",
|
|
91
|
-
"schema": "./lib/library/schema.json"
|
|
105
|
+
"schema": "./lib/library/schema.json",
|
|
106
|
+
"aliases": ["lib"]
|
|
92
107
|
},
|
|
93
108
|
"sub-app": {
|
|
94
109
|
"factory": "./lib/sub-app/sub-app.factory#main",
|
|
95
110
|
"description": "Create a Nest application (mono-repo).",
|
|
96
|
-
"schema": "./lib/sub-app/schema.json"
|
|
111
|
+
"schema": "./lib/sub-app/schema.json",
|
|
112
|
+
"aliases": ["app"]
|
|
97
113
|
},
|
|
98
114
|
"resource": {
|
|
99
115
|
"factory": "./lib/resource/resource.factory#main",
|
|
100
116
|
"description": "Create a Nest resource.",
|
|
101
|
-
"schema": "./lib/resource/schema.json"
|
|
117
|
+
"schema": "./lib/resource/schema.json",
|
|
118
|
+
"aliases": ["res"]
|
|
102
119
|
}
|
|
103
120
|
}
|
|
104
121
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
7
7
|
o[k2] = m[k];
|
|
8
8
|
}));
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./utils"), exports);
|
|
@@ -11,7 +11,7 @@ function main(options) {
|
|
|
11
11
|
? options.name
|
|
12
12
|
: options.directory;
|
|
13
13
|
options = transform(options);
|
|
14
|
-
return schematics_1.mergeWith(generate(options, path));
|
|
14
|
+
return (0, schematics_1.mergeWith)(generate(options, path));
|
|
15
15
|
}
|
|
16
16
|
exports.main = main;
|
|
17
17
|
function transform(options) {
|
|
@@ -34,15 +34,15 @@ function transform(options) {
|
|
|
34
34
|
return target;
|
|
35
35
|
}
|
|
36
36
|
function resolvePackageName(path) {
|
|
37
|
-
const { name } = path_1.parse(path);
|
|
37
|
+
const { name } = (0, path_1.parse)(path);
|
|
38
38
|
if (name === '.') {
|
|
39
|
-
return path_1.basename(process.cwd());
|
|
39
|
+
return (0, path_1.basename)(process.cwd());
|
|
40
40
|
}
|
|
41
41
|
return name;
|
|
42
42
|
}
|
|
43
43
|
function generate(options, path) {
|
|
44
|
-
return schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
45
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
46
|
-
schematics_1.move(path),
|
|
44
|
+
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
45
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
46
|
+
(0, schematics_1.move)(path),
|
|
47
47
|
]);
|
|
48
48
|
}
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@nestjs/testing": "^8.0.0",
|
|
25
|
-
"@babel/core": "7.
|
|
26
|
-
"@babel/node": "7.
|
|
27
|
-
"@babel/plugin-proposal-decorators": "7.
|
|
28
|
-
"@babel/plugin-transform-runtime": "7.
|
|
29
|
-
"@babel/preset-env": "7.
|
|
30
|
-
"@babel/register": "7.
|
|
31
|
-
"@babel/runtime": "7.
|
|
32
|
-
"jest": "27.
|
|
33
|
-
"nodemon": "2.0.
|
|
34
|
-
"prettier": "2.
|
|
35
|
-
"supertest": "6.
|
|
25
|
+
"@babel/core": "7.17.2",
|
|
26
|
+
"@babel/node": "7.16.8",
|
|
27
|
+
"@babel/plugin-proposal-decorators": "7.17.2",
|
|
28
|
+
"@babel/plugin-transform-runtime": "7.17.0",
|
|
29
|
+
"@babel/preset-env": "7.16.11",
|
|
30
|
+
"@babel/register": "7.17.0",
|
|
31
|
+
"@babel/runtime": "7.17.2",
|
|
32
|
+
"jest": "27.5.1",
|
|
33
|
+
"nodemon": "2.0.15",
|
|
34
|
+
"prettier": "2.5.1",
|
|
35
|
+
"supertest": "6.2.2"
|
|
36
36
|
},
|
|
37
37
|
"jest": {
|
|
38
38
|
"moduleFileExtensions": [
|
|
@@ -33,16 +33,17 @@
|
|
|
33
33
|
"@nestjs/schematics": "^8.0.0",
|
|
34
34
|
"@nestjs/testing": "^8.0.0",
|
|
35
35
|
"@types/express": "^4.17.13",
|
|
36
|
-
"@types/jest": "
|
|
36
|
+
"@types/jest": "27.4.0",
|
|
37
37
|
"@types/node": "^16.0.0",
|
|
38
38
|
"@types/supertest": "^2.0.11",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
40
|
-
"@typescript-eslint/parser": "^
|
|
41
|
-
"eslint": "^
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
40
|
+
"@typescript-eslint/parser": "^5.0.0",
|
|
41
|
+
"eslint": "^8.0.1",
|
|
42
42
|
"eslint-config-prettier": "^8.3.0",
|
|
43
|
-
"eslint-plugin-prettier": "^
|
|
44
|
-
"jest": "27.
|
|
43
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
44
|
+
"jest": "^27.2.5",
|
|
45
45
|
"prettier": "^2.3.2",
|
|
46
|
+
"source-map-support": "^0.5.20",
|
|
46
47
|
"supertest": "^6.1.3",
|
|
47
48
|
"ts-jest": "^27.0.3",
|
|
48
49
|
"ts-loader": "^9.2.3",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"outDir": "./dist",
|
|
12
12
|
"baseUrl": "./",
|
|
13
13
|
"incremental": true,
|
|
14
|
-
"skipLibCheck": true
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"strictNullChecks": <%= strict %>,
|
|
16
|
+
"noImplicitAny": <%= strict %>,
|
|
17
|
+
"strictBindCallApply": <%= strict %>,
|
|
18
|
+
"forceConsistentCasingInFileNames": <%= strict %>,
|
|
19
|
+
"noFallthroughCasesInSwitch": <%= strict %>
|
|
15
20
|
}
|
|
16
21
|
}
|
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"directory": {
|
|
27
27
|
"type": "string",
|
|
28
|
-
"description": "Nest application destination directory"
|
|
28
|
+
"description": "Nest application destination directory."
|
|
29
|
+
},
|
|
30
|
+
"strict": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "With TypeScript strict mode.",
|
|
33
|
+
"default": false
|
|
29
34
|
},
|
|
30
35
|
"version": {
|
|
31
36
|
"type": "string",
|
|
@@ -8,7 +8,7 @@ const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
|
8
8
|
const defaults_1 = require("../defaults");
|
|
9
9
|
function main(options) {
|
|
10
10
|
options = transform(options);
|
|
11
|
-
return schematics_1.chain([source_root_helpers_1.mergeSourceRoot(options), schematics_1.mergeWith(generate(options))]);
|
|
11
|
+
return (0, schematics_1.chain)([(0, source_root_helpers_1.mergeSourceRoot)(options), (0, schematics_1.mergeWith)(generate(options))]);
|
|
12
12
|
}
|
|
13
13
|
exports.main = main;
|
|
14
14
|
function transform(options) {
|
|
@@ -29,13 +29,13 @@ function transform(options) {
|
|
|
29
29
|
target.path = core_1.strings.dasherize(location.path);
|
|
30
30
|
target.path = target.flat
|
|
31
31
|
? target.path
|
|
32
|
-
: core_1.join(target.path, target.name);
|
|
32
|
+
: (0, core_1.join)(target.path, target.name);
|
|
33
33
|
return target;
|
|
34
34
|
}
|
|
35
35
|
function generate(options) {
|
|
36
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
37
|
-
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
|
|
38
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
39
|
-
schematics_1.move(options.path),
|
|
36
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
37
|
+
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)(path => !path.endsWith('.spec.ts')),
|
|
38
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
39
|
+
(0, schematics_1.move)(options.path),
|
|
40
40
|
])(context);
|
|
41
41
|
}
|
|
@@ -11,12 +11,12 @@ const source_root_helpers_1 = require("../../../utils/source-root.helpers");
|
|
|
11
11
|
function main(options) {
|
|
12
12
|
options = transform(options);
|
|
13
13
|
return (tree, context) => {
|
|
14
|
-
return schematics_1.branchAndMerge(schematics_1.chain([
|
|
14
|
+
return (0, schematics_1.branchAndMerge)((0, schematics_1.chain)([
|
|
15
15
|
createAngularApplication(options),
|
|
16
|
-
source_root_helpers_1.mergeSourceRoot(options),
|
|
16
|
+
(0, source_root_helpers_1.mergeSourceRoot)(options),
|
|
17
17
|
addDeclarationToModule(options),
|
|
18
18
|
addGlobalPrefix(),
|
|
19
|
-
schematics_1.mergeWith(generate(options)),
|
|
19
|
+
(0, schematics_1.mergeWith)(generate(options)),
|
|
20
20
|
]))(tree, context);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -29,20 +29,20 @@ function transform(source) {
|
|
|
29
29
|
target.type = 'module';
|
|
30
30
|
const location = new name_parser_1.NameParser().parse(target);
|
|
31
31
|
target.name = core_1.strings.dasherize(location.name);
|
|
32
|
-
target.path = path_1.join(core_1.strings.dasherize(location.path), target.name);
|
|
32
|
+
target.path = (0, path_1.join)(core_1.strings.dasherize(location.path), target.name);
|
|
33
33
|
return target;
|
|
34
34
|
}
|
|
35
35
|
function generate(options) {
|
|
36
|
-
return (context) => schematics_1.apply(schematics_1.url('./files'), [
|
|
37
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
38
|
-
schematics_1.move(options.path),
|
|
36
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
37
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
38
|
+
(0, schematics_1.move)(options.path),
|
|
39
39
|
])(context);
|
|
40
40
|
}
|
|
41
41
|
function createAngularApplication(options) {
|
|
42
42
|
if (!options.initApp) {
|
|
43
|
-
return schematics_1.noop();
|
|
43
|
+
return (0, schematics_1.noop)();
|
|
44
44
|
}
|
|
45
|
-
return schematics_1.externalSchematic('@schematics/angular', 'ng-new', {
|
|
45
|
+
return (0, schematics_1.externalSchematic)('@schematics/angular', 'ng-new', {
|
|
46
46
|
name: options.directory,
|
|
47
47
|
version: '8.0.0',
|
|
48
48
|
});
|
|
@@ -5,7 +5,7 @@ const core_1 = require("@angular-devkit/core");
|
|
|
5
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
6
|
const defaults_1 = require("../defaults");
|
|
7
7
|
function main(options) {
|
|
8
|
-
return schematics_1.mergeWith(generate(transform(options)));
|
|
8
|
+
return (0, schematics_1.mergeWith)(generate(transform(options)));
|
|
9
9
|
}
|
|
10
10
|
exports.main = main;
|
|
11
11
|
function transform(options) {
|
|
@@ -17,8 +17,8 @@ function transform(options) {
|
|
|
17
17
|
return target;
|
|
18
18
|
}
|
|
19
19
|
function generate(options) {
|
|
20
|
-
return schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
21
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
22
|
-
schematics_1.move(options.project),
|
|
20
|
+
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
21
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
22
|
+
(0, schematics_1.move)(options.project),
|
|
23
23
|
]);
|
|
24
24
|
}
|
|
@@ -13,9 +13,9 @@ const ELEMENT_TYPE = 'controller';
|
|
|
13
13
|
function main(options) {
|
|
14
14
|
options = transform(options);
|
|
15
15
|
return (tree, context) => {
|
|
16
|
-
return schematics_1.branchAndMerge(schematics_1.chain([
|
|
17
|
-
source_root_helpers_1.mergeSourceRoot(options),
|
|
18
|
-
schematics_1.mergeWith(generate(options)),
|
|
16
|
+
return (0, schematics_1.branchAndMerge)((0, schematics_1.chain)([
|
|
17
|
+
(0, source_root_helpers_1.mergeSourceRoot)(options),
|
|
18
|
+
(0, schematics_1.mergeWith)(generate(options)),
|
|
19
19
|
addDeclarationToModule(options),
|
|
20
20
|
]))(tree, context);
|
|
21
21
|
};
|
|
@@ -32,14 +32,14 @@ function transform(source) {
|
|
|
32
32
|
target.language !== undefined ? target.language : defaults_1.DEFAULT_LANGUAGE;
|
|
33
33
|
target.path = target.flat
|
|
34
34
|
? target.path
|
|
35
|
-
: core_1.join(target.path, target.name);
|
|
35
|
+
: (0, core_1.join)(target.path, target.name);
|
|
36
36
|
return target;
|
|
37
37
|
}
|
|
38
38
|
function generate(options) {
|
|
39
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
40
|
-
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
|
|
41
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
42
|
-
schematics_1.move(options.path),
|
|
39
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
40
|
+
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)(path => !path.endsWith('.spec.ts')),
|
|
41
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
42
|
+
(0, schematics_1.move)(options.path),
|
|
43
43
|
])(context);
|
|
44
44
|
}
|
|
45
45
|
function addDeclarationToModule(options) {
|
|
@@ -7,7 +7,7 @@ const name_parser_1 = require("../../utils/name.parser");
|
|
|
7
7
|
const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
8
8
|
function main(options) {
|
|
9
9
|
options = transform(options);
|
|
10
|
-
return schematics_1.chain([source_root_helpers_1.mergeSourceRoot(options), schematics_1.mergeWith(generate(options))]);
|
|
10
|
+
return (0, schematics_1.chain)([(0, source_root_helpers_1.mergeSourceRoot)(options), (0, schematics_1.mergeWith)(generate(options))]);
|
|
11
11
|
}
|
|
12
12
|
exports.main = main;
|
|
13
13
|
function transform(options) {
|
|
@@ -21,12 +21,12 @@ function transform(options) {
|
|
|
21
21
|
target.language = target.language !== undefined ? target.language : 'ts';
|
|
22
22
|
target.path = target.flat
|
|
23
23
|
? target.path
|
|
24
|
-
: core_1.join(target.path, target.name);
|
|
24
|
+
: (0, core_1.join)(target.path, target.name);
|
|
25
25
|
return target;
|
|
26
26
|
}
|
|
27
27
|
function generate(options) {
|
|
28
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
29
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
30
|
-
schematics_1.move(options.path),
|
|
28
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
29
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
30
|
+
(0, schematics_1.move)(options.path),
|
|
31
31
|
])(context);
|
|
32
32
|
}
|
|
@@ -7,7 +7,7 @@ const name_parser_1 = require("../../utils/name.parser");
|
|
|
7
7
|
const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
8
8
|
function main(options) {
|
|
9
9
|
options = transform(options);
|
|
10
|
-
return schematics_1.chain([source_root_helpers_1.mergeSourceRoot(options), schematics_1.mergeWith(generate(options))]);
|
|
10
|
+
return (0, schematics_1.chain)([(0, source_root_helpers_1.mergeSourceRoot)(options), (0, schematics_1.mergeWith)(generate(options))]);
|
|
11
11
|
}
|
|
12
12
|
exports.main = main;
|
|
13
13
|
function transform(options) {
|
|
@@ -21,13 +21,13 @@ function transform(options) {
|
|
|
21
21
|
target.language = target.language !== undefined ? target.language : 'ts';
|
|
22
22
|
target.path = target.flat
|
|
23
23
|
? target.path
|
|
24
|
-
: core_1.join(target.path, target.name);
|
|
24
|
+
: (0, core_1.join)(target.path, target.name);
|
|
25
25
|
return target;
|
|
26
26
|
}
|
|
27
27
|
function generate(options) {
|
|
28
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
29
|
-
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
|
|
30
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
31
|
-
schematics_1.move(options.path),
|
|
28
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
29
|
+
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)(path => !path.endsWith('.spec.ts')),
|
|
30
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
31
|
+
(0, schematics_1.move)(options.path),
|
|
32
32
|
])(context);
|
|
33
33
|
}
|
|
@@ -10,10 +10,10 @@ const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
|
10
10
|
function main(options) {
|
|
11
11
|
options = transform(options);
|
|
12
12
|
return (tree, context) => {
|
|
13
|
-
return schematics_1.branchAndMerge(schematics_1.chain([
|
|
14
|
-
source_root_helpers_1.mergeSourceRoot(options),
|
|
13
|
+
return (0, schematics_1.branchAndMerge)((0, schematics_1.chain)([
|
|
14
|
+
(0, source_root_helpers_1.mergeSourceRoot)(options),
|
|
15
15
|
addDeclarationToModule(options),
|
|
16
|
-
schematics_1.mergeWith(generate(options)),
|
|
16
|
+
(0, schematics_1.mergeWith)(generate(options)),
|
|
17
17
|
]))(tree, context);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -31,14 +31,14 @@ function transform(options) {
|
|
|
31
31
|
target.language = target.language !== undefined ? target.language : 'ts';
|
|
32
32
|
target.path = target.flat
|
|
33
33
|
? target.path
|
|
34
|
-
: core_1.join(target.path, target.name);
|
|
34
|
+
: (0, core_1.join)(target.path, target.name);
|
|
35
35
|
return target;
|
|
36
36
|
}
|
|
37
37
|
function generate(options) {
|
|
38
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
39
|
-
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
|
|
40
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
41
|
-
schematics_1.move(options.path),
|
|
38
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
39
|
+
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)(path => !path.endsWith('.spec.ts')),
|
|
40
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
41
|
+
(0, schematics_1.move)(options.path),
|
|
42
42
|
])(context);
|
|
43
43
|
}
|
|
44
44
|
function addDeclarationToModule(options) {
|
|
@@ -7,7 +7,7 @@ const name_parser_1 = require("../../utils/name.parser");
|
|
|
7
7
|
const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
8
8
|
function main(options) {
|
|
9
9
|
options = transform(options);
|
|
10
|
-
return schematics_1.chain([source_root_helpers_1.mergeSourceRoot(options), schematics_1.mergeWith(generate(options))]);
|
|
10
|
+
return (0, schematics_1.chain)([(0, source_root_helpers_1.mergeSourceRoot)(options), (0, schematics_1.mergeWith)(generate(options))]);
|
|
11
11
|
}
|
|
12
12
|
exports.main = main;
|
|
13
13
|
function transform(options) {
|
|
@@ -21,13 +21,13 @@ function transform(options) {
|
|
|
21
21
|
target.language = target.language !== undefined ? target.language : 'ts';
|
|
22
22
|
target.path = target.flat
|
|
23
23
|
? target.path
|
|
24
|
-
: core_1.join(target.path, target.name);
|
|
24
|
+
: (0, core_1.join)(target.path, target.name);
|
|
25
25
|
return target;
|
|
26
26
|
}
|
|
27
27
|
function generate(options) {
|
|
28
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
29
|
-
options.spec ? schematics_1.noop() : schematics_1.filter((path) => !path.endsWith('.spec.ts')),
|
|
30
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
31
|
-
schematics_1.move(options.path),
|
|
28
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
29
|
+
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)((path) => !path.endsWith('.spec.ts')),
|
|
30
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
31
|
+
(0, schematics_1.move)(options.path),
|
|
32
32
|
])(context);
|
|
33
33
|
}
|
|
@@ -7,7 +7,7 @@ const name_parser_1 = require("../../utils/name.parser");
|
|
|
7
7
|
const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
8
8
|
function main(options) {
|
|
9
9
|
options = transform(options);
|
|
10
|
-
return schematics_1.chain([source_root_helpers_1.mergeSourceRoot(options), schematics_1.mergeWith(generate(options))]);
|
|
10
|
+
return (0, schematics_1.chain)([(0, source_root_helpers_1.mergeSourceRoot)(options), (0, schematics_1.mergeWith)(generate(options))]);
|
|
11
11
|
}
|
|
12
12
|
exports.main = main;
|
|
13
13
|
function transform(options) {
|
|
@@ -21,13 +21,13 @@ function transform(options) {
|
|
|
21
21
|
target.language = target.language !== undefined ? target.language : 'ts';
|
|
22
22
|
target.path = target.flat
|
|
23
23
|
? target.path
|
|
24
|
-
: core_1.join(target.path, target.name);
|
|
24
|
+
: (0, core_1.join)(target.path, target.name);
|
|
25
25
|
return target;
|
|
26
26
|
}
|
|
27
27
|
function generate(options) {
|
|
28
|
-
return (context) => schematics_1.apply(schematics_1.url(core_1.join('./files', options.language)), [
|
|
29
|
-
options.spec ? schematics_1.noop() : schematics_1.filter(path => !path.endsWith('.spec.ts')),
|
|
30
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
31
|
-
schematics_1.move(options.path),
|
|
28
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [
|
|
29
|
+
options.spec ? (0, schematics_1.noop)() : (0, schematics_1.filter)(path => !path.endsWith('.spec.ts')),
|
|
30
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
31
|
+
(0, schematics_1.move)(options.path),
|
|
32
32
|
])(context);
|
|
33
33
|
}
|
|
@@ -7,7 +7,7 @@ const name_parser_1 = require("../../utils/name.parser");
|
|
|
7
7
|
const source_root_helpers_1 = require("../../utils/source-root.helpers");
|
|
8
8
|
function main(options) {
|
|
9
9
|
options = transform(options);
|
|
10
|
-
return schematics_1.chain([source_root_helpers_1.mergeSourceRoot(options), schematics_1.mergeWith(generate(options))]);
|
|
10
|
+
return (0, schematics_1.chain)([(0, source_root_helpers_1.mergeSourceRoot)(options), (0, schematics_1.mergeWith)(generate(options))]);
|
|
11
11
|
}
|
|
12
12
|
exports.main = main;
|
|
13
13
|
function transform(options) {
|
|
@@ -20,12 +20,12 @@ function transform(options) {
|
|
|
20
20
|
target.path = core_1.strings.dasherize(location.path);
|
|
21
21
|
target.path = target.flat
|
|
22
22
|
? target.path
|
|
23
|
-
: core_1.join(target.path, target.name);
|
|
23
|
+
: (0, core_1.join)(target.path, target.name);
|
|
24
24
|
return target;
|
|
25
25
|
}
|
|
26
26
|
function generate(options) {
|
|
27
|
-
return (context) => schematics_1.apply(schematics_1.url('./files'), [
|
|
28
|
-
schematics_1.template(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
29
|
-
schematics_1.move(options.path),
|
|
27
|
+
return (context) => (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
28
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)),
|
|
29
|
+
(0, schematics_1.move)(options.path),
|
|
30
30
|
])(context);
|
|
31
31
|
}
|