@angular-devkit/schematics-cli 17.1.0-next.1 → 17.1.0-next.3
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 +27 -25
- package/package.json +3 -3
package/bin/schematics.js
CHANGED
|
@@ -30,17 +30,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
30
30
|
__setModuleDefault(result, mod);
|
|
31
31
|
return result;
|
|
32
32
|
};
|
|
33
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
+
};
|
|
33
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
37
|
exports.loadEsmModule = exports.main = void 0;
|
|
35
38
|
// symbol polyfill must go first
|
|
36
39
|
require("symbol-observable");
|
|
37
|
-
const core_1 = require("@angular-devkit/core");
|
|
38
40
|
const node_1 = require("@angular-devkit/core/node");
|
|
39
41
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
40
42
|
const tools_1 = require("@angular-devkit/schematics/tools");
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const path = __importStar(require("path"));
|
|
43
|
+
const ansi_colors_1 = __importDefault(require("ansi-colors"));
|
|
44
|
+
const node_fs_1 = require("node:fs");
|
|
45
|
+
const path = __importStar(require("node:path"));
|
|
44
46
|
const yargs_parser_1 = __importStar(require("yargs-parser"));
|
|
45
47
|
/**
|
|
46
48
|
* Parse the name of schematic passed in argument, and return a {collection, schematic} named
|
|
@@ -152,7 +154,7 @@ function findUp(names, from) {
|
|
|
152
154
|
while (currentDir && currentDir !== root) {
|
|
153
155
|
for (const name of names) {
|
|
154
156
|
const p = path.join(currentDir, name);
|
|
155
|
-
if ((0,
|
|
157
|
+
if ((0, node_fs_1.existsSync)(p)) {
|
|
156
158
|
return p;
|
|
157
159
|
}
|
|
158
160
|
}
|
|
@@ -180,7 +182,7 @@ function getPackageManagerName() {
|
|
|
180
182
|
async function main({ args, stdout = process.stdout, stderr = process.stderr, }) {
|
|
181
183
|
const { cliOptions, schematicOptions, _ } = parseArgs(args);
|
|
182
184
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
|
183
|
-
const colors =
|
|
185
|
+
const colors = ansi_colors_1.default.create();
|
|
184
186
|
/** Create the DevKit Logger used through the CLI. */
|
|
185
187
|
const logger = (0, node_1.createConsoleLogger)(!!cliOptions.verbose, stdout, stderr, {
|
|
186
188
|
info: (s) => s,
|
|
@@ -331,35 +333,35 @@ exports.main = main;
|
|
|
331
333
|
* Get usage of the CLI tool.
|
|
332
334
|
*/
|
|
333
335
|
function getUsage() {
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
+
return `
|
|
337
|
+
schematics [collection-name:]schematic-name [options, ...]
|
|
336
338
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
+
By default, if the collection name is not specified, use the internal collection provided
|
|
340
|
+
by the Schematics CLI.
|
|
339
341
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
342
|
+
Options:
|
|
343
|
+
--debug Debug mode. This is true by default if the collection is a relative
|
|
344
|
+
path (in that case, turn off with --debug=false).
|
|
343
345
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
+
--allow-private Allow private schematics to be run from the command line. Default to
|
|
347
|
+
false.
|
|
346
348
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
+
--dry-run Do not output anything, but instead just show what actions would be
|
|
350
|
+
performed. Default to true if debug is also true.
|
|
349
351
|
|
|
350
|
-
|
|
352
|
+
--force Force overwriting files that would otherwise be an error.
|
|
351
353
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
+
--list-schematics List all schematics from the collection, by name. A collection name
|
|
355
|
+
should be suffixed by a colon. Example: '@angular-devkit/schematics-cli:'.
|
|
354
356
|
|
|
355
|
-
|
|
357
|
+
--no-interactive Disables interactive input prompts.
|
|
356
358
|
|
|
357
|
-
|
|
359
|
+
--verbose Show more information.
|
|
358
360
|
|
|
359
|
-
|
|
361
|
+
--help Show this message.
|
|
360
362
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
+
Any additional option is passed to the Schematics depending on its schema.
|
|
364
|
+
`;
|
|
363
365
|
}
|
|
364
366
|
/** Parse the command line. */
|
|
365
367
|
const booleanArgs = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics-cli",
|
|
3
|
-
"version": "17.1.0-next.
|
|
3
|
+
"version": "17.1.0-next.3",
|
|
4
4
|
"description": "Angular Schematics - CLI",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"bin": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
],
|
|
22
22
|
"schematics": "./collection.json",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@angular-devkit/core": "17.1.0-next.
|
|
25
|
-
"@angular-devkit/schematics": "17.1.0-next.
|
|
24
|
+
"@angular-devkit/core": "17.1.0-next.3",
|
|
25
|
+
"@angular-devkit/schematics": "17.1.0-next.3",
|
|
26
26
|
"ansi-colors": "4.1.3",
|
|
27
27
|
"inquirer": "9.2.12",
|
|
28
28
|
"symbol-observable": "4.0.0",
|