@o3r/schematics 11.7.0-prerelease.4 → 11.7.0-prerelease.40
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/package.json +8 -8
- package/src/tasks/package-manager/index.d.ts +1 -0
- package/src/tasks/package-manager/index.d.ts.map +1 -1
- package/src/tasks/package-manager/index.js +1 -0
- package/src/tasks/package-manager/index.js.map +1 -1
- package/src/tasks/package-manager/npm-node-run.d.ts +16 -0
- package/src/tasks/package-manager/npm-node-run.d.ts.map +1 -0
- package/src/tasks/package-manager/npm-node-run.js +37 -0
- package/src/tasks/package-manager/npm-node-run.js.map +1 -0
- package/src/utility/wrapper.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/schematics",
|
3
|
-
"version": "11.7.0-prerelease.
|
3
|
+
"version": "11.7.0-prerelease.40",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@angular-devkit/core": "^18.2.0",
|
31
31
|
"@angular-devkit/schematics": "^18.2.0",
|
32
32
|
"@angular/cli": "^18.2.0",
|
33
|
-
"@o3r/telemetry": "^11.7.0-prerelease.
|
33
|
+
"@o3r/telemetry": "^11.7.0-prerelease.40",
|
34
34
|
"@schematics/angular": "^18.2.0",
|
35
35
|
"eslint": ">=8.57.0 <9.15.0",
|
36
36
|
"rxjs": "^7.8.1",
|
@@ -88,9 +88,9 @@
|
|
88
88
|
"@nx/eslint-plugin": "~19.8.0",
|
89
89
|
"@nx/jest": "~19.8.0",
|
90
90
|
"@nx/js": "~19.8.0",
|
91
|
-
"@o3r/build-helpers": "^11.7.0-prerelease.
|
92
|
-
"@o3r/eslint-plugin": "^11.7.0-prerelease.
|
93
|
-
"@o3r/telemetry": "^11.7.0-prerelease.
|
91
|
+
"@o3r/build-helpers": "^11.7.0-prerelease.40",
|
92
|
+
"@o3r/eslint-plugin": "^11.7.0-prerelease.40",
|
93
|
+
"@o3r/telemetry": "^11.7.0-prerelease.40",
|
94
94
|
"@schematics/angular": "~18.2.0",
|
95
95
|
"@stylistic/eslint-plugin": "~2.7.0",
|
96
96
|
"@swc/helpers": "~0.5.0",
|
@@ -98,7 +98,7 @@
|
|
98
98
|
"@types/jest": "~29.5.2",
|
99
99
|
"@types/node": "^20.0.0",
|
100
100
|
"@types/semver": "^7.3.13",
|
101
|
-
"@typescript-eslint/parser": "~8.
|
101
|
+
"@typescript-eslint/parser": "~8.21.0",
|
102
102
|
"angular-eslint": "~18.4.0",
|
103
103
|
"cpy-cli": "^5.0.0",
|
104
104
|
"eslint": "~9.14.0",
|
@@ -115,14 +115,14 @@
|
|
115
115
|
"jest": "~29.7.0",
|
116
116
|
"jest-junit": "~16.0.0",
|
117
117
|
"jsonc-eslint-parser": "~2.4.0",
|
118
|
-
"jsonschema": "~1.
|
118
|
+
"jsonschema": "~1.5.0",
|
119
119
|
"nx": "~19.8.0",
|
120
120
|
"rxjs": "^7.8.1",
|
121
121
|
"ts-jest": "~29.2.0",
|
122
122
|
"ts-node": "~10.9.2",
|
123
123
|
"type-fest": "^4.10.2",
|
124
124
|
"typescript": "~5.5.4",
|
125
|
-
"typescript-eslint": "~8.
|
125
|
+
"typescript-eslint": "~8.21.0",
|
126
126
|
"zone.js": "~0.14.2"
|
127
127
|
},
|
128
128
|
"engines": {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
|
@@ -4,5 +4,6 @@ const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./interfaces"), exports);
|
5
5
|
tslib_1.__exportStar(require("./npm-exec"), exports);
|
6
6
|
tslib_1.__exportStar(require("./npm-install"), exports);
|
7
|
+
tslib_1.__exportStar(require("./npm-node-run"), exports);
|
7
8
|
tslib_1.__exportStar(require("./npm-run"), exports);
|
8
9
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,oDAA0B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,yDAA+B;AAC/B,oDAA0B"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { TaskConfiguration, TaskConfigurationGenerator } from '@angular-devkit/schematics';
|
2
|
+
import { NodePackageTaskOptions } from '@angular-devkit/schematics/tasks/package-manager/options';
|
3
|
+
import { type SupportedPackageManagers } from '../../utility/package-manager-runner';
|
4
|
+
/**
|
5
|
+
* Configuration used to run Node script via Package Manager.
|
6
|
+
* Warning: The command only supports single quote strings when run with NPM. In NPM, the " character will be replaced by its char code
|
7
|
+
* Note that this only works if the necessary files are created on the disk (doesn't work on tree)
|
8
|
+
*/
|
9
|
+
export declare class NodeRunScriptTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
|
10
|
+
private readonly script;
|
11
|
+
private readonly workingDirectory?;
|
12
|
+
private readonly packageManager?;
|
13
|
+
constructor(script: string, workingDirectory?: string | undefined, packageManager?: SupportedPackageManagers | undefined);
|
14
|
+
toConfiguration(): TaskConfiguration<NodePackageTaskOptions>;
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=npm-node-run.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"npm-node-run.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/npm-node-run.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,sBAAsB,EACvB,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,iBAAkB,YAAW,0BAA0B,CAAC,sBAAsB,CAAC;IAExF,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;gBAFf,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,YAAA,EACzB,cAAc,CAAC,EAAE,wBAAwB,YAAA;IAGrD,eAAe,IAAI,iBAAiB,CAAC,sBAAsB,CAAC;CAkBpE"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NodeRunScriptTask = void 0;
|
4
|
+
const options_1 = require("@angular-devkit/schematics/tasks/package-manager/options");
|
5
|
+
const package_manager_runner_1 = require("../../utility/package-manager-runner");
|
6
|
+
/**
|
7
|
+
* Configuration used to run Node script via Package Manager.
|
8
|
+
* Warning: The command only supports single quote strings when run with NPM. In NPM, the " character will be replaced by its char code
|
9
|
+
* Note that this only works if the necessary files are created on the disk (doesn't work on tree)
|
10
|
+
*/
|
11
|
+
class NodeRunScriptTask {
|
12
|
+
constructor(script, workingDirectory, packageManager) {
|
13
|
+
this.script = script;
|
14
|
+
this.workingDirectory = workingDirectory;
|
15
|
+
this.packageManager = packageManager;
|
16
|
+
}
|
17
|
+
toConfiguration() {
|
18
|
+
const packageManager = this.packageManager || (0, package_manager_runner_1.getPackageManager)();
|
19
|
+
const scriptString = JSON.stringify(this.script);
|
20
|
+
const scriptStringInQuotes = this.script
|
21
|
+
.replace(/"/g, '\' + String.fromCharCode(34) + \'');
|
22
|
+
const script = packageManager === 'npm'
|
23
|
+
? `exec --call "node -e \\"${scriptStringInQuotes}\\""`
|
24
|
+
: `node -e ${scriptString}`;
|
25
|
+
return {
|
26
|
+
name: options_1.NodePackageName,
|
27
|
+
options: {
|
28
|
+
command: 'exec',
|
29
|
+
packageName: script,
|
30
|
+
workingDirectory: this.workingDirectory,
|
31
|
+
packageManager
|
32
|
+
}
|
33
|
+
};
|
34
|
+
}
|
35
|
+
}
|
36
|
+
exports.NodeRunScriptTask = NodeRunScriptTask;
|
37
|
+
//# sourceMappingURL=npm-node-run.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"npm-node-run.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/npm-node-run.ts"],"names":[],"mappings":";;;AAIA,sFAGkE;AAClE,iFAG8C;AAE9C;;;;GAIG;AACH,MAAa,iBAAiB;IAC5B,YACmB,MAAc,EACd,gBAAyB,EACzB,cAAyC;QAFzC,WAAM,GAAN,MAAM,CAAQ;QACd,qBAAgB,GAAhB,gBAAgB,CAAS;QACzB,mBAAc,GAAd,cAAc,CAA2B;IACzD,CAAC;IAEG,eAAe;QACpB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,IAAI,IAAA,0CAAiB,GAAE,CAAC;QAClE,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM;aACrC,OAAO,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,cAAc,KAAK,KAAK;YACrC,CAAC,CAAC,2BAA2B,oBAAoB,MAAM;YACvD,CAAC,CAAC,WAAW,YAAY,EAAE,CAAC;QAC9B,OAAO;YACL,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,OAAO,EAAE,MAAM;gBACf,WAAW,EAAE,MAAM;gBACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,cAAc;aACf;SACF,CAAC;IACJ,CAAC;CACF;AAzBD,8CAyBC"}
|
package/src/utility/wrapper.js
CHANGED
@@ -64,7 +64,7 @@ const createSchematicWithMetricsIfInstalled = (schematicFn) => (opts) => async (
|
|
64
64
|
message: `
|
65
65
|
Would you like to share anonymous data about the usage of Otter builders and schematics with the Otter Team at Amadeus ?
|
66
66
|
It will help us to improve our tools.
|
67
|
-
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/PRIVACY_NOTICE.md
|
67
|
+
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/PRIVACY_NOTICE.md
|
68
68
|
`,
|
69
69
|
default: false
|
70
70
|
};
|