@m2c2kit/cli 0.3.17 → 0.3.18

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 CHANGED
@@ -2,7 +2,7 @@
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/f5c250ab48e22c5aff31d8ebd35fb9a88e380fd7/packages/angular_devkit/schematics_cli/bin/schematics.ts
5
+ * https://github.com/angular/angular-cli/blob/a7f466a5fa87c51b914441524bd0dff5b3957ced/packages/angular_devkit/schematics_cli/bin/schematics.ts
6
6
  * The license for that code is as follows:
7
7
  * @license
8
8
  * Copyright Google LLC All Rights Reserved.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
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/f5c250ab48e22c5aff31d8ebd35fb9a88e380fd7/packages/angular_devkit/schematics_cli/bin/schematics.ts
6
+ * https://github.com/angular/angular-cli/blob/a7f466a5fa87c51b914441524bd0dff5b3957ced/packages/angular_devkit/schematics_cli/bin/schematics.ts
7
7
  * The license for that code is as follows:
8
8
  * @license
9
9
  * Copyright Google LLC All Rights Reserved.
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.main = main;
42
42
  // symbol polyfill must go first
43
43
  require("symbol-observable");
44
+ const core_1 = require("@angular-devkit/core");
44
45
  const node_1 = require("@angular-devkit/core/node");
45
46
  const schematics_1 = require("@angular-devkit/schematics");
46
47
  const tools_1 = require("@angular-devkit/schematics/tools");
@@ -110,6 +111,12 @@ function _createPromptProvider() {
110
111
  answers[definition.id] = await (definition.multiselect ? prompts.checkbox : prompts.select)({
111
112
  message: definition.message,
112
113
  default: definition.default,
114
+ validate: (values) => {
115
+ if (!definition.validator) {
116
+ return true;
117
+ }
118
+ return definition.validator(Object.values(values).map(({ value }) => value));
119
+ },
113
120
  choices: definition.items.map((item) => typeof item == "string"
114
121
  ? {
115
122
  name: item,
@@ -299,6 +306,7 @@ async function main({ args, stdout = process.stdout, stderr = process.stderr, })
299
306
  error = false;
300
307
  }
301
308
  });
309
+ workflow.registry.addPostTransform(core_1.schema.transforms.addUndefinedDefaults);
302
310
  // Show usage of deprecated options
303
311
  workflow.registry.useXDeprecatedProvider((msg) => logger.warn(msg));
304
312
  // Pass the rest of the arguments as the smart default "argv". Then delete it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2c2kit/cli",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "description": "Command line interface to create new m2c2kit apps",
5
5
  "files": [
6
6
  "dist/**"
@@ -25,11 +25,11 @@
25
25
  },
26
26
  "homepage": "https://m2c2-project.github.io/m2c2kit",
27
27
  "dependencies": {
28
- "@angular-devkit/core": "^18.1.3",
29
- "@angular-devkit/schematics": "^18.1.3",
28
+ "@angular-devkit/core": "^18.2.0",
29
+ "@angular-devkit/schematics": "^18.2.0",
30
30
  "@inquirer/prompts": "5.3.8",
31
- "@m2c2kit/schematics": "0.1.17",
32
- "@schematics/angular": "^18.1.3",
31
+ "@m2c2kit/schematics": "0.1.18",
32
+ "@schematics/angular": "^18.2.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "symbol-observable": "4.0.0",
35
35
  "yargs-parser": "21.1.1"