@o3r/schematics 10.2.0-prerelease.14 → 10.2.0-prerelease.15
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.2.0-prerelease.
|
3
|
+
"version": "10.2.0-prerelease.15",
|
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.2.0-prerelease.
|
33
|
+
"@o3r/telemetry": "^10.2.0-prerelease.15",
|
34
34
|
"@schematics/angular": "~17.2.0",
|
35
35
|
"eslint": "^8.42.0",
|
36
36
|
"rxjs": "^7.8.1",
|
@@ -79,9 +79,9 @@
|
|
79
79
|
"@nx/eslint-plugin": "~18.0.2",
|
80
80
|
"@nx/jest": "~18.0.2",
|
81
81
|
"@nx/js": "~18.0.2",
|
82
|
-
"@o3r/build-helpers": "^10.2.0-prerelease.
|
83
|
-
"@o3r/eslint-plugin": "^10.2.0-prerelease.
|
84
|
-
"@o3r/telemetry": "^10.2.0-prerelease.
|
82
|
+
"@o3r/build-helpers": "^10.2.0-prerelease.15",
|
83
|
+
"@o3r/eslint-plugin": "^10.2.0-prerelease.15",
|
84
|
+
"@o3r/telemetry": "^10.2.0-prerelease.15",
|
85
85
|
"@schematics/angular": "~17.2.0",
|
86
86
|
"@stylistic/eslint-plugin-ts": "^1.5.4",
|
87
87
|
"@types/inquirer": "~8.2.10",
|
@@ -2,6 +2,7 @@ import type { Rule } from '@angular-devkit/schematics';
|
|
2
2
|
import type { NgAddSchematicsSchema } from './schema';
|
3
3
|
/**
|
4
4
|
* Add Otter schematics to an Angular Project
|
5
|
+
* @param options
|
5
6
|
*/
|
6
7
|
export declare const ngAdd: (options: NgAddSchematicsSchema) => Rule;
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAIvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAqCtD;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAGtD,CAAC"}
|
@@ -1,19 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.ngAdd = void 0;
|
4
|
-
const schematics_1 = require("@o3r/schematics");
|
5
4
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
6
5
|
const path = require("node:path");
|
7
|
-
const schematics_2 = require("@o3r/schematics");
|
8
6
|
/**
|
9
7
|
* Add Otter schematics to an Angular Project
|
10
8
|
* @param options schematics options
|
11
9
|
*/
|
12
10
|
function ngAddFn(options) {
|
13
11
|
const schematicsDependencies = ['@angular-devkit/architect', '@angular-devkit/schematics', '@angular-devkit/core', '@schematics/angular', 'globby'];
|
14
|
-
return
|
12
|
+
return async () => {
|
15
13
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
16
|
-
const
|
14
|
+
const { getExternalDependenciesVersionRange, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
15
|
+
const dependencies = Object.entries(getExternalDependenciesVersionRange(schematicsDependencies, packageJsonPath)).reduce((acc, [dep, range]) => {
|
17
16
|
acc[dep] = {
|
18
17
|
inManifest: [{
|
19
18
|
range,
|
@@ -22,7 +21,7 @@ function ngAddFn(options) {
|
|
22
21
|
};
|
23
22
|
return acc;
|
24
23
|
}, {});
|
25
|
-
Object.entries(
|
24
|
+
Object.entries(getExternalDependenciesVersionRange(schematicsDependencies, packageJsonPath))
|
26
25
|
.forEach(([dep, range]) => {
|
27
26
|
dependencies[dep] = {
|
28
27
|
inManifest: [{
|
@@ -31,7 +30,7 @@ function ngAddFn(options) {
|
|
31
30
|
}]
|
32
31
|
};
|
33
32
|
});
|
34
|
-
return
|
33
|
+
return setupDependencies({
|
35
34
|
projectName: options.projectName,
|
36
35
|
dependencies,
|
37
36
|
skipInstall: false
|
@@ -40,6 +39,11 @@ function ngAddFn(options) {
|
|
40
39
|
}
|
41
40
|
/**
|
42
41
|
* Add Otter schematics to an Angular Project
|
42
|
+
* @param options
|
43
43
|
*/
|
44
|
-
|
44
|
+
const ngAdd = (options) => async () => {
|
45
|
+
const { createSchematicWithMetricsIfInstalled } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
46
|
+
return createSchematicWithMetricsIfInstalled(ngAddFn)(options);
|
47
|
+
};
|
48
|
+
exports.ngAdd = ngAdd;
|
45
49
|
//# sourceMappingURL=index.js.map
|