@angular-devkit/schematics-cli 14.0.0-next.4 → 14.0.0-next.7
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
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
11
|
if (k2 === undefined) k2 = k;
|
|
12
|
-
Object.
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
13
17
|
}) : (function(o, m, k, k2) {
|
|
14
18
|
if (k2 === undefined) k2 = k;
|
|
15
19
|
o[k2] = m[k];
|
|
@@ -26,9 +30,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
30
|
__setModuleDefault(result, mod);
|
|
27
31
|
return result;
|
|
28
32
|
};
|
|
29
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
-
};
|
|
32
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
34
|
exports.main = void 0;
|
|
34
35
|
// symbol polyfill must go first
|
|
@@ -39,7 +40,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
39
40
|
const tools_1 = require("@angular-devkit/schematics/tools");
|
|
40
41
|
const ansiColors = __importStar(require("ansi-colors"));
|
|
41
42
|
const inquirer = __importStar(require("inquirer"));
|
|
42
|
-
const yargs_parser_1 =
|
|
43
|
+
const yargs_parser_1 = __importStar(require("yargs-parser"));
|
|
43
44
|
/**
|
|
44
45
|
* Parse the name of schematic passed in argument, and return a {collection, schematic} named
|
|
45
46
|
* tuple. The user can pass in `collection-name:schematic-name`, and this function will either
|
|
@@ -182,7 +183,7 @@ async function main({ args, stdout = process.stdout, stderr = process.stderr, })
|
|
|
182
183
|
workflow.reporter.subscribe((event) => {
|
|
183
184
|
nothingDone = false;
|
|
184
185
|
// Strip leading slash to prevent confusion.
|
|
185
|
-
const eventPath = event.path.startsWith('/') ? event.path.
|
|
186
|
+
const eventPath = event.path.startsWith('/') ? event.path.slice(1) : event.path;
|
|
186
187
|
switch (event.kind) {
|
|
187
188
|
case 'error':
|
|
188
189
|
error = true;
|
|
@@ -199,7 +200,7 @@ async function main({ args, stdout = process.stdout, stderr = process.stderr, })
|
|
|
199
200
|
loggingQueue.push(`${colors.yellow('DELETE')} ${eventPath}`);
|
|
200
201
|
break;
|
|
201
202
|
case 'rename':
|
|
202
|
-
const eventToPath = event.to.startsWith('/') ? event.to.
|
|
203
|
+
const eventToPath = event.to.startsWith('/') ? event.to.slice(1) : event.to;
|
|
203
204
|
loggingQueue.push(`${colors.blue('RENAME')} ${eventPath} => ${eventToPath}`);
|
|
204
205
|
break;
|
|
205
206
|
}
|
|
@@ -332,21 +333,19 @@ function parseArgs(args) {
|
|
|
332
333
|
const schematicOptions = {};
|
|
333
334
|
const cliOptions = {};
|
|
334
335
|
const isCliOptions = (key) => booleanArgs.includes(key);
|
|
335
|
-
// Casting temporary until https://github.com/DefinitelyTyped/DefinitelyTyped/pull/59065 is merged and released.
|
|
336
|
-
const { camelCase, decamelize } = yargs_parser_1.default;
|
|
337
336
|
for (const [key, value] of Object.entries(options)) {
|
|
338
337
|
if (/[A-Z]/.test(key)) {
|
|
339
|
-
throw new Error(`Unknown argument ${key}. Did you mean ${decamelize(key)}?`);
|
|
338
|
+
throw new Error(`Unknown argument ${key}. Did you mean ${(0, yargs_parser_1.decamelize)(key)}?`);
|
|
340
339
|
}
|
|
341
340
|
if (isCliOptions(key)) {
|
|
342
341
|
cliOptions[key] = value;
|
|
343
342
|
}
|
|
344
343
|
else {
|
|
345
|
-
schematicOptions[camelCase(key)] = value;
|
|
344
|
+
schematicOptions[(0, yargs_parser_1.camelCase)(key)] = value;
|
|
346
345
|
}
|
|
347
346
|
}
|
|
348
347
|
return {
|
|
349
|
-
_,
|
|
348
|
+
_: _.map((v) => v.toString()),
|
|
350
349
|
schematicOptions,
|
|
351
350
|
cliOptions,
|
|
352
351
|
};
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@angular-devkit/core": "^<%= coreVersion %>",
|
|
17
17
|
"@angular-devkit/schematics": "^<%= schematicsVersion %>",
|
|
18
|
-
"typescript": "~4.
|
|
18
|
+
"typescript": "~4.6.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^
|
|
22
|
-
"@types/jasmine": "~
|
|
21
|
+
"@types/node": "^14.15.0",
|
|
22
|
+
"@types/jasmine": "~4.0.0",
|
|
23
23
|
"jasmine": "^4.0.0"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics-cli",
|
|
3
|
-
"version": "14.0.0-next.
|
|
3
|
+
"version": "14.0.0-next.7",
|
|
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": "14.0.0-next.
|
|
25
|
-
"@angular-devkit/schematics": "14.0.0-next.
|
|
24
|
+
"@angular-devkit/core": "14.0.0-next.7",
|
|
25
|
+
"@angular-devkit/schematics": "14.0.0-next.7",
|
|
26
26
|
"ansi-colors": "4.1.1",
|
|
27
|
-
"inquirer": "8.2.
|
|
27
|
+
"inquirer": "8.2.2",
|
|
28
28
|
"symbol-observable": "4.0.0",
|
|
29
29
|
"yargs-parser": "21.0.1"
|
|
30
30
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"url": "https://github.com/angular/angular-cli.git"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": "^
|
|
36
|
+
"node": "^14.15.0 || >=16.10.0",
|
|
37
37
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
38
38
|
"yarn": ">= 1.13.0"
|
|
39
39
|
},
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@angular-devkit/core": "^<%= coreVersion %>",
|
|
17
17
|
"@angular-devkit/schematics": "^<%= schematicsVersion %>",
|
|
18
|
-
"typescript": "~4.
|
|
18
|
+
"typescript": "~4.6.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^
|
|
22
|
-
"@types/jasmine": "~
|
|
21
|
+
"@types/node": "^14.15.0",
|
|
22
|
+
"@types/jasmine": "~4.0.0",
|
|
23
23
|
"jasmine": "~4.0.0"
|
|
24
24
|
}
|
|
25
25
|
}
|