@o3r/schematics 11.7.0-prerelease.38 → 11.7.0-prerelease.39

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/schematics",
3
- "version": "11.7.0-prerelease.38",
3
+ "version": "11.7.0-prerelease.39",
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.38",
33
+ "@o3r/telemetry": "^11.7.0-prerelease.39",
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.38",
92
- "@o3r/eslint-plugin": "^11.7.0-prerelease.38",
93
- "@o3r/telemetry": "^11.7.0-prerelease.38",
91
+ "@o3r/build-helpers": "^11.7.0-prerelease.39",
92
+ "@o3r/eslint-plugin": "^11.7.0-prerelease.39",
93
+ "@o3r/telemetry": "^11.7.0-prerelease.39",
94
94
  "@schematics/angular": "~18.2.0",
95
95
  "@stylistic/eslint-plugin": "~2.7.0",
96
96
  "@swc/helpers": "~0.5.0",
@@ -1,5 +1,6 @@
1
1
  export * from './interfaces';
2
2
  export * from './npm-exec';
3
3
  export * from './npm-install';
4
+ export * from './npm-node-run';
4
5
  export * from './npm-run';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -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"}