@m2c2kit/cli 0.3.11 → 0.3.13
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/index.d.ts +1 -2
- package/dist/index.js +28 -27
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* The code in this file is adapted from a reference CLI implementation from
|
|
4
4
|
* the Angular devkit repository:
|
|
5
|
-
* https://github.com/angular/angular-cli/blob/
|
|
5
|
+
* https://github.com/angular/angular-cli/blob/72cf799388e16c21855b12a08b29f7dbcb464845/packages/angular_devkit/schematics_cli/bin/schematics.ts
|
|
6
6
|
* The license for that code is as follows:
|
|
7
|
-
*
|
|
8
7
|
* @license
|
|
9
8
|
* Copyright Google LLC All Rights Reserved.
|
|
10
9
|
*
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* The code in this file is adapted from a reference CLI implementation from
|
|
5
5
|
* the Angular devkit repository:
|
|
6
|
-
* https://github.com/angular/angular-cli/blob/
|
|
6
|
+
* https://github.com/angular/angular-cli/blob/72cf799388e16c21855b12a08b29f7dbcb464845/packages/angular_devkit/schematics_cli/bin/schematics.ts
|
|
7
7
|
* The license for that code is as follows:
|
|
8
|
-
*
|
|
9
8
|
* @license
|
|
10
9
|
* Copyright Google LLC All Rights Reserved.
|
|
11
10
|
*
|
|
@@ -35,17 +34,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
35
34
|
__setModuleDefault(result, mod);
|
|
36
35
|
return result;
|
|
37
36
|
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
38
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
41
|
exports.loadEsmModule = exports.main = void 0;
|
|
40
42
|
// symbol polyfill must go first
|
|
41
43
|
require("symbol-observable");
|
|
42
|
-
const core_1 = require("@angular-devkit/core");
|
|
43
44
|
const node_1 = require("@angular-devkit/core/node");
|
|
44
45
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
45
46
|
const tools_1 = require("@angular-devkit/schematics/tools");
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const path = __importStar(require("path"));
|
|
47
|
+
const ansi_colors_1 = __importDefault(require("ansi-colors"));
|
|
48
|
+
const node_fs_1 = require("node:fs");
|
|
49
|
+
const path = __importStar(require("node:path"));
|
|
49
50
|
const yargs_parser_1 = __importStar(require("yargs-parser"));
|
|
50
51
|
/**
|
|
51
52
|
* Parse the name of schematic passed in argument, and return a {collection, schematic} named
|
|
@@ -158,7 +159,7 @@ function findUp(names, from) {
|
|
|
158
159
|
while (currentDir && currentDir !== root) {
|
|
159
160
|
for (const name of names) {
|
|
160
161
|
const p = path.join(currentDir, name);
|
|
161
|
-
if ((0,
|
|
162
|
+
if ((0, node_fs_1.existsSync)(p)) {
|
|
162
163
|
return p;
|
|
163
164
|
}
|
|
164
165
|
}
|
|
@@ -186,7 +187,7 @@ function getPackageManagerName() {
|
|
|
186
187
|
async function main({ args, stdout = process.stdout, stderr = process.stderr, }) {
|
|
187
188
|
const { cliOptions, schematicOptions, _ } = parseArgs(args);
|
|
188
189
|
// Create a separate instance to prevent unintended global changes to the color configuration
|
|
189
|
-
const colors =
|
|
190
|
+
const colors = ansi_colors_1.default.create();
|
|
190
191
|
/** Create the DevKit Logger used through the CLI. */
|
|
191
192
|
const logger = (0, node_1.createConsoleLogger)(!!cliOptions.verbose, stdout, stderr, {
|
|
192
193
|
info: (s) => s,
|
|
@@ -345,35 +346,35 @@ exports.main = main;
|
|
|
345
346
|
* Get usage of the CLI tool.
|
|
346
347
|
*/
|
|
347
348
|
function getUsage() {
|
|
348
|
-
return
|
|
349
|
-
|
|
349
|
+
return `
|
|
350
|
+
m2 <command> [options, ...]
|
|
350
351
|
|
|
351
|
-
|
|
352
|
-
|
|
352
|
+
Commands:
|
|
353
|
+
m2 new <name> create a new m2c2kit app.
|
|
353
354
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
Options:
|
|
356
|
+
--debug Debug mode. This is true by default if the collection is a relative
|
|
357
|
+
path (in that case, turn off with --debug=false).
|
|
357
358
|
|
|
358
|
-
|
|
359
|
-
|
|
359
|
+
--allow-private Allow private schematics to be run from the command line. Default to
|
|
360
|
+
false.
|
|
360
361
|
|
|
361
|
-
|
|
362
|
-
|
|
362
|
+
--dry-run Do not output anything, but instead just show what actions would be
|
|
363
|
+
performed. Default to true if debug is also true.
|
|
363
364
|
|
|
364
|
-
|
|
365
|
+
--force Force overwriting files that would otherwise be an error.
|
|
365
366
|
|
|
366
|
-
|
|
367
|
-
|
|
367
|
+
--list-schematics List all schematics from the collection, by name. A collection name
|
|
368
|
+
should be suffixed by a colon. Example: '@angular-devkit/schematics-cli:'.
|
|
368
369
|
|
|
369
|
-
|
|
370
|
+
--no-interactive Disables interactive input prompts.
|
|
370
371
|
|
|
371
|
-
|
|
372
|
+
--verbose Show more information.
|
|
372
373
|
|
|
373
|
-
|
|
374
|
+
--help Show this message.
|
|
374
375
|
|
|
375
|
-
|
|
376
|
-
|
|
376
|
+
Any additional option is passed to the Schematics depending on its schema.
|
|
377
|
+
`;
|
|
377
378
|
}
|
|
378
379
|
/** Parse the command line. */
|
|
379
380
|
const booleanArgs = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m2c2kit/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "Command line interface to create new m2c2kit apps",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**"
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://m2c2-project.github.io/m2c2kit",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/core": "^17.0.
|
|
29
|
-
"@angular-devkit/schematics": "^17.0.
|
|
28
|
+
"@angular-devkit/core": "^17.0.9",
|
|
29
|
+
"@angular-devkit/schematics": "^17.0.9",
|
|
30
30
|
"@m2c2kit/schematics": "^0.1.0",
|
|
31
|
-
"@schematics/angular": "^17.0.
|
|
31
|
+
"@schematics/angular": "^17.0.9",
|
|
32
32
|
"ansi-colors": "4.1.3",
|
|
33
33
|
"inquirer": "9.2.12",
|
|
34
34
|
"symbol-observable": "4.0.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/inquirer": "9.0.7",
|
|
39
39
|
"rimraf": "5.0.5",
|
|
40
|
-
"typescript": "5.3.
|
|
40
|
+
"typescript": "5.3.3"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=18"
|