@angular-devkit/schematics-cli 13.0.0-next.5 → 13.0.0-next.9
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/bin/schematics.js
CHANGED
|
@@ -122,7 +122,7 @@ async function main({ args, stdout = process.stdout, stderr = process.stderr, })
|
|
|
122
122
|
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
|
123
123
|
const colors = ansiColors.create();
|
|
124
124
|
/** Create the DevKit Logger used through the CLI. */
|
|
125
|
-
const logger = node_1.createConsoleLogger(argv['verbose'], stdout, stderr, {
|
|
125
|
+
const logger = (0, node_1.createConsoleLogger)(argv['verbose'], stdout, stderr, {
|
|
126
126
|
info: (s) => s,
|
|
127
127
|
debug: (s) => s,
|
|
128
128
|
warn: (s) => colors.bold.yellow(s),
|
|
@@ -227,7 +227,7 @@ async function main({ args, stdout = process.stdout, stderr = process.stderr, })
|
|
|
227
227
|
/**
|
|
228
228
|
* Add options from `--` to args.
|
|
229
229
|
*/
|
|
230
|
-
const argv2 = minimist_1.default(argv['--']);
|
|
230
|
+
const argv2 = (0, minimist_1.default)(argv['--']);
|
|
231
231
|
for (const key of Object.keys(argv2)) {
|
|
232
232
|
parsedArgs[key] = argv2[key];
|
|
233
233
|
}
|
|
@@ -338,7 +338,7 @@ const booleanArgs = [
|
|
|
338
338
|
'interactive',
|
|
339
339
|
];
|
|
340
340
|
function parseArgs(args) {
|
|
341
|
-
return minimist_1.default(args, {
|
|
341
|
+
return (0, minimist_1.default)(args, {
|
|
342
342
|
boolean: booleanArgs,
|
|
343
343
|
alias: {
|
|
344
344
|
'dryRun': 'dry-run',
|
package/blank/factory.js
CHANGED
|
@@ -17,7 +17,7 @@ function addSchematicToCollectionJson(collectionPath, schematicName, description
|
|
|
17
17
|
throw new Error('Invalid collection path: ' + collectionPath);
|
|
18
18
|
}
|
|
19
19
|
const collectionJson = JSON.parse(collectionJsonContent.toString());
|
|
20
|
-
if (!core_1.isJsonObject(collectionJson.schematics)) {
|
|
20
|
+
if (!(0, core_1.isJsonObject)(collectionJson.schematics)) {
|
|
21
21
|
throw new Error('Invalid collection.json; schematics needs to be an object.');
|
|
22
22
|
}
|
|
23
23
|
collectionJson['schematics'][schematicName] = description;
|
|
@@ -38,7 +38,7 @@ function default_1(options) {
|
|
|
38
38
|
if (packageJsonContent) {
|
|
39
39
|
const packageJson = JSON.parse(packageJsonContent.toString());
|
|
40
40
|
if (typeof packageJson.schematics === 'string') {
|
|
41
|
-
const p = core_1.normalize(packageJson.schematics);
|
|
41
|
+
const p = (0, core_1.normalize)(packageJson.schematics);
|
|
42
42
|
if (tree.exists(p)) {
|
|
43
43
|
collectionPath = p;
|
|
44
44
|
}
|
|
@@ -46,8 +46,8 @@ function default_1(options) {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
catch { }
|
|
49
|
-
let source = schematics_1.apply(schematics_1.url('./schematic-files'), [
|
|
50
|
-
schematics_1.template({
|
|
49
|
+
let source = (0, schematics_1.apply)((0, schematics_1.url)('./schematic-files'), [
|
|
50
|
+
(0, schematics_1.template)({
|
|
51
51
|
...options,
|
|
52
52
|
coreVersion,
|
|
53
53
|
schematicsVersion,
|
|
@@ -58,9 +58,9 @@ function default_1(options) {
|
|
|
58
58
|
]);
|
|
59
59
|
// Simply create a new schematic project.
|
|
60
60
|
if (!collectionPath) {
|
|
61
|
-
collectionPath = core_1.normalize('/' + options.name + '/src/collection.json');
|
|
62
|
-
source = schematics_1.apply(schematics_1.url('./project-files'), [
|
|
63
|
-
schematics_1.template({
|
|
61
|
+
collectionPath = (0, core_1.normalize)('/' + options.name + '/src/collection.json');
|
|
62
|
+
source = (0, schematics_1.apply)((0, schematics_1.url)('./project-files'), [
|
|
63
|
+
(0, schematics_1.template)({
|
|
64
64
|
...options,
|
|
65
65
|
coreVersion,
|
|
66
66
|
schematicsVersion,
|
|
@@ -68,13 +68,13 @@ function default_1(options) {
|
|
|
68
68
|
camelize: core_1.strings.camelize,
|
|
69
69
|
dasherize: core_1.strings.dasherize,
|
|
70
70
|
}),
|
|
71
|
-
schematics_1.mergeWith(source),
|
|
72
|
-
schematics_1.move(options.name),
|
|
71
|
+
(0, schematics_1.mergeWith)(source),
|
|
72
|
+
(0, schematics_1.move)(options.name),
|
|
73
73
|
]);
|
|
74
74
|
context.addTask(new tasks_1.NodePackageInstallTask(options.name));
|
|
75
75
|
}
|
|
76
|
-
return schematics_1.chain([
|
|
77
|
-
schematics_1.mergeWith(source),
|
|
76
|
+
return (0, schematics_1.chain)([
|
|
77
|
+
(0, schematics_1.mergeWith)(source),
|
|
78
78
|
addSchematicToCollectionJson(collectionPath, core_1.strings.dasherize(options.name), {
|
|
79
79
|
description: 'A blank schematic.',
|
|
80
80
|
factory: './' + core_1.strings.dasherize(options.name) + '/index#' + core_1.strings.camelize(options.name),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics-cli",
|
|
3
|
-
"version": "13.0.0-next.
|
|
3
|
+
"version": "13.0.0-next.9",
|
|
4
4
|
"description": "Angular Schematics - CLI",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"bin": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
],
|
|
22
22
|
"schematics": "./collection.json",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@angular-devkit/core": "13.0.0-next.
|
|
25
|
-
"@angular-devkit/schematics": "13.0.0-next.
|
|
24
|
+
"@angular-devkit/core": "13.0.0-next.9",
|
|
25
|
+
"@angular-devkit/schematics": "13.0.0-next.9",
|
|
26
26
|
"ansi-colors": "4.1.1",
|
|
27
|
-
"inquirer": "8.
|
|
27
|
+
"inquirer": "8.2.0",
|
|
28
28
|
"minimist": "1.2.5",
|
|
29
29
|
"symbol-observable": "4.0.0"
|
|
30
30
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"url": "https://github.com/angular/angular-cli.git"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": "^12.20.0 ||
|
|
36
|
+
"node": "^12.20.0 || ^14.15.0 || >=16.10.0",
|
|
37
37
|
"npm": "^6.11.0 || ^7.5.6",
|
|
38
38
|
"yarn": ">= 1.13.0"
|
|
39
39
|
},
|
package/schematic/factory.js
CHANGED
|
@@ -15,15 +15,15 @@ function default_1(options) {
|
|
|
15
15
|
const coreVersion = require('@angular-devkit/core/package.json').version;
|
|
16
16
|
return (_, context) => {
|
|
17
17
|
context.addTask(new tasks_1.NodePackageInstallTask(options.name));
|
|
18
|
-
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
|
|
19
|
-
schematics_1.partitionApplyMerge((p) => !/\/src\/.*?\/files\//.test(p), schematics_1.template({
|
|
18
|
+
return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
19
|
+
(0, schematics_1.partitionApplyMerge)((p) => !/\/src\/.*?\/files\//.test(p), (0, schematics_1.template)({
|
|
20
20
|
...options,
|
|
21
21
|
coreVersion,
|
|
22
22
|
schematicsVersion,
|
|
23
23
|
dot: '.',
|
|
24
24
|
dasherize: core_1.strings.dasherize,
|
|
25
25
|
})),
|
|
26
|
-
schematics_1.move(options.name),
|
|
26
|
+
(0, schematics_1.move)(options.name),
|
|
27
27
|
]));
|
|
28
28
|
};
|
|
29
29
|
}
|