@o3r/schematics 10.1.0-prerelease.5 → 10.1.0-prerelease.7

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/schematics",
3
- "version": "10.1.0-prerelease.5",
3
+ "version": "10.1.0-prerelease.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,7 +30,7 @@
30
30
  "@angular-devkit/core": "~17.2.0",
31
31
  "@angular-devkit/schematics": "~17.2.0",
32
32
  "@angular/cli": "~17.2.0",
33
- "@o3r/telemetry": "^10.1.0-prerelease.5",
33
+ "@o3r/telemetry": "^10.1.0-prerelease.7",
34
34
  "@schematics/angular": "~17.2.0",
35
35
  "eslint": "^8.42.0",
36
36
  "rxjs": "^7.8.1",
@@ -54,6 +54,7 @@
54
54
  "dependencies": {
55
55
  "chalk": "^4.1.2",
56
56
  "globby": "^11.1.0",
57
+ "inquirer": "~8.2.6",
57
58
  "minimatch": "~9.0.3",
58
59
  "semver": "^7.5.2",
59
60
  "tslib": "^2.5.3"
@@ -78,11 +79,12 @@
78
79
  "@nx/eslint-plugin": "~18.0.2",
79
80
  "@nx/jest": "~18.0.2",
80
81
  "@nx/js": "~18.0.2",
81
- "@o3r/build-helpers": "^10.1.0-prerelease.5",
82
- "@o3r/eslint-plugin": "^10.1.0-prerelease.5",
83
- "@o3r/telemetry": "^10.1.0-prerelease.5",
82
+ "@o3r/build-helpers": "^10.1.0-prerelease.7",
83
+ "@o3r/eslint-plugin": "^10.1.0-prerelease.7",
84
+ "@o3r/telemetry": "^10.1.0-prerelease.7",
84
85
  "@schematics/angular": "~17.2.0",
85
86
  "@stylistic/eslint-plugin-ts": "^1.5.4",
87
+ "@types/inquirer": "~8.2.10",
86
88
  "@types/jest": "~29.5.2",
87
89
  "@types/node": "^20.0.0",
88
90
  "@types/semver": "^7.3.13",
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AASvD;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,EAAE,gBAgEnD,CAAC"}
1
+ {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAUvD;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,EAAE,gBAkEnD,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSchematicWithMetricsIfInstalled = void 0;
4
- const prompt_1 = require("@angular/cli/src/utilities/prompt");
5
4
  const dependencies_1 = require("@schematics/angular/utility/dependencies");
5
+ const inquirer_1 = require("inquirer");
6
6
  const node_fs_1 = require("node:fs");
7
7
  const path = require("node:path");
8
8
  const rxjs_1 = require("rxjs");
@@ -32,11 +32,16 @@ const createSchematicWithMetricsIfInstalled = (schematicFn) => (opts) => async (
32
32
  && context.interactive
33
33
  && packageJson.config?.o3rMetrics !== false) {
34
34
  context.logger.debug('`@o3r/telemetry` is not available.\nAsking to add the dependency\n' + e.toString());
35
- const isReplyPositive = await (0, prompt_1.askConfirmation)(`
35
+ const question = {
36
+ type: 'confirm',
37
+ name: 'isReplyPositive',
38
+ message: `
36
39
  Would you like to share anonymous data about the usage of Otter builders and schematics with the Otter Team at Amadeus ?
37
40
  It will help us to improve our tools.
38
41
  For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/README.md.
39
- `, false);
42
+ `
43
+ };
44
+ const { isReplyPositive } = await (0, inquirer_1.prompt)([question]);
40
45
  if (isReplyPositive) {
41
46
  const version = JSON.parse((0, node_fs_1.readFileSync)(path.join(__dirname, '..', '..', 'package.json'), 'utf-8')).version;
42
47
  context.addTask(new index_1.NodePackageNgAddTask('@o3r/telemetry', {
@@ -1 +1 @@
1
- {"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../../src/utility/wrapper.ts"],"names":[],"mappings":";;;AACA,8DAAoE;AAEpE,2EAA8E;AAC9E,qCAAuC;AACvC,kCAAkC;AAClC,+BAAqC;AACrC,0CAAsD;AAEtD,MAAM,oBAAoB,GAAqB,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;AAE1D;;;;GAIG;AACI,MAAM,qCAAqC,GAAqB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IACxH,IAAI,OAAO,GAAqB,oBAAoB,CAAC;IACrD,MAAM,eAAe,GAAG,cAAc,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACrG,IAAI,CAAC;QACH,MAAM,EAAE,0BAA0B,EAAE,GAAG,2CAAa,gBAAgB,EAAC,CAAC;QACtE,IAAK,WAAW,CAAC,MAAqB,EAAE,UAAU,EAAE,CAAC;YACnD,OAAO,GAAG,0BAA0B,CAAC;QACvC,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,mDAAmD;QACnD,IAAK,WAAW,CAAC,MAAqB,EAAE,UAAU,EAAE,CAAC;YACnD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iKAAiK,CAAC,CAAC;QACzL,CAAC;aAAM,IACL,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,CAAC;eACzE,OAAO,CAAC,WAAW;eAClB,WAAW,CAAC,MAAqB,EAAE,UAAU,KAAK,KAAK,EAC3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