@o3r/schematics 10.2.0-prerelease.8 → 10.2.0-prerelease.80
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -0
- package/package.json +43 -40
- package/schematics/ng-add/index.d.ts +1 -0
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +11 -7
- package/src/modules/modules.helpers.d.ts +1 -1
- package/src/modules/modules.helpers.d.ts.map +1 -1
- package/src/utility/wrapper.js +1 -1
package/README.md
CHANGED
@@ -9,6 +9,9 @@ This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/ot
|
|
9
9
|
|
10
10
|
## Description
|
11
11
|
|
12
|
+
[![Stable Version](https://img.shields.io/npm/v/@o3r/schematics?style=for-the-badge)](https://www.npmjs.com/package/@o3r/schematics)
|
13
|
+
[![Bundle Size](https://img.shields.io/bundlephobia/min/@o3r/schematics?color=green&style=for-the-badge)](https://www.npmjs.com/package/@o3r/schematics)
|
14
|
+
|
12
15
|
This module provides basic utilities and generic rules (install, lint) reused in other package schematics.
|
13
16
|
|
14
17
|
## How to install
|
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.80",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -26,16 +26,16 @@
|
|
26
26
|
"o3r-environment": "./cli/environment.js"
|
27
27
|
},
|
28
28
|
"peerDependencies": {
|
29
|
-
"@angular-devkit/architect": "~0.
|
30
|
-
"@angular-devkit/core": "~17.
|
31
|
-
"@angular-devkit/schematics": "~17.
|
32
|
-
"@angular/cli": "~17.
|
33
|
-
"@o3r/telemetry": "^10.2.0-prerelease.
|
34
|
-
"@schematics/angular": "~17.
|
29
|
+
"@angular-devkit/architect": "~0.1703.0",
|
30
|
+
"@angular-devkit/core": "~17.3.0",
|
31
|
+
"@angular-devkit/schematics": "~17.3.0",
|
32
|
+
"@angular/cli": "~17.3.0",
|
33
|
+
"@o3r/telemetry": "^10.2.0-prerelease.80",
|
34
|
+
"@schematics/angular": "~17.3.0",
|
35
35
|
"eslint": "^8.42.0",
|
36
36
|
"rxjs": "^7.8.1",
|
37
37
|
"type-fest": "^4.10.2",
|
38
|
-
"typescript": "~5.
|
38
|
+
"typescript": "~5.4.2"
|
39
39
|
},
|
40
40
|
"peerDependenciesMeta": {
|
41
41
|
"@angular-devkit/architect": {
|
@@ -49,6 +49,9 @@
|
|
49
49
|
},
|
50
50
|
"eslint": {
|
51
51
|
"optional": true
|
52
|
+
},
|
53
|
+
"type-fest": {
|
54
|
+
"optional": true
|
52
55
|
}
|
53
56
|
},
|
54
57
|
"dependencies": {
|
@@ -57,56 +60,56 @@
|
|
57
60
|
"inquirer": "~8.2.6",
|
58
61
|
"minimatch": "~9.0.3",
|
59
62
|
"semver": "^7.5.2",
|
60
|
-
"tslib": "^2.
|
63
|
+
"tslib": "^2.6.2"
|
61
64
|
},
|
62
65
|
"devDependencies": {
|
63
|
-
"@angular-devkit/build-angular": "~17.
|
64
|
-
"@angular-devkit/core": "~17.
|
65
|
-
"@angular-devkit/schematics": "~17.
|
66
|
-
"@angular-eslint/eslint-plugin": "~17.
|
67
|
-
"@angular/animations": "~17.
|
68
|
-
"@angular/cli": "~17.
|
69
|
-
"@angular/common": "~17.
|
70
|
-
"@angular/compiler": "~17.
|
71
|
-
"@angular/compiler-cli": "~17.
|
72
|
-
"@angular/core": "~17.
|
73
|
-
"@angular/platform-browser": "~17.
|
74
|
-
"@angular/platform-browser-dynamic": "~17.
|
66
|
+
"@angular-devkit/build-angular": "~17.3.0",
|
67
|
+
"@angular-devkit/core": "~17.3.0",
|
68
|
+
"@angular-devkit/schematics": "~17.3.0",
|
69
|
+
"@angular-eslint/eslint-plugin": "~17.3.0",
|
70
|
+
"@angular/animations": "~17.3.0",
|
71
|
+
"@angular/cli": "~17.3.0",
|
72
|
+
"@angular/common": "~17.3.0",
|
73
|
+
"@angular/compiler": "~17.3.0",
|
74
|
+
"@angular/compiler-cli": "~17.3.0",
|
75
|
+
"@angular/core": "~17.3.0",
|
76
|
+
"@angular/platform-browser": "~17.3.0",
|
77
|
+
"@angular/platform-browser-dynamic": "~17.3.0",
|
75
78
|
"@babel/core": "~7.24.0",
|
76
|
-
"@babel/preset-typescript": "~7.
|
79
|
+
"@babel/preset-typescript": "~7.24.0",
|
77
80
|
"@compodoc/compodoc": "^1.1.19",
|
78
|
-
"@nx/eslint": "~18.0
|
79
|
-
"@nx/eslint-plugin": "~18.0
|
80
|
-
"@nx/jest": "~18.0
|
81
|
-
"@nx/js": "~18.0
|
82
|
-
"@o3r/build-helpers": "^10.2.0-prerelease.
|
83
|
-
"@o3r/eslint-plugin": "^10.2.0-prerelease.
|
84
|
-
"@o3r/telemetry": "^10.2.0-prerelease.
|
85
|
-
"@schematics/angular": "~17.
|
81
|
+
"@nx/eslint": "~18.2.0",
|
82
|
+
"@nx/eslint-plugin": "~18.2.0",
|
83
|
+
"@nx/jest": "~18.2.0",
|
84
|
+
"@nx/js": "~18.2.0",
|
85
|
+
"@o3r/build-helpers": "^10.2.0-prerelease.80",
|
86
|
+
"@o3r/eslint-plugin": "^10.2.0-prerelease.80",
|
87
|
+
"@o3r/telemetry": "^10.2.0-prerelease.80",
|
88
|
+
"@schematics/angular": "~17.3.0",
|
86
89
|
"@stylistic/eslint-plugin-ts": "^1.5.4",
|
87
90
|
"@types/inquirer": "~8.2.10",
|
88
91
|
"@types/jest": "~29.5.2",
|
89
92
|
"@types/node": "^20.0.0",
|
90
93
|
"@types/semver": "^7.3.13",
|
91
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
92
|
-
"@typescript-eslint/parser": "^7.0
|
94
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
95
|
+
"@typescript-eslint/parser": "^7.2.0",
|
93
96
|
"cpy-cli": "^5.0.0",
|
94
|
-
"eslint": "^8.
|
95
|
-
"eslint-import-resolver-node": "^0.3.
|
97
|
+
"eslint": "^8.57.0",
|
98
|
+
"eslint-import-resolver-node": "^0.3.9",
|
96
99
|
"eslint-plugin-jest": "~27.9.0",
|
97
|
-
"eslint-plugin-jsdoc": "~48.2.
|
100
|
+
"eslint-plugin-jsdoc": "~48.2.1",
|
98
101
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
99
|
-
"eslint-plugin-unicorn": "^51.0.
|
102
|
+
"eslint-plugin-unicorn": "^51.0.1",
|
100
103
|
"jest": "~29.7.0",
|
101
104
|
"jest-junit": "~16.0.0",
|
102
105
|
"jsonc-eslint-parser": "~2.4.0",
|
103
106
|
"jsonschema": "~1.4.1",
|
104
|
-
"nx": "~18.0
|
107
|
+
"nx": "~18.2.0",
|
105
108
|
"rxjs": "^7.8.1",
|
106
|
-
"ts-jest": "~29.1.
|
107
|
-
"ts-node": "~10.9.
|
109
|
+
"ts-jest": "~29.1.2",
|
110
|
+
"ts-node": "~10.9.2",
|
108
111
|
"type-fest": "^4.10.2",
|
109
|
-
"typescript": "~5.
|
112
|
+
"typescript": "~5.4.2",
|
110
113
|
"zone.js": "~0.14.2"
|
111
114
|
},
|
112
115
|
"engines": {
|
@@ -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
|
@@ -6,7 +6,7 @@ import { type PackageManagerOptions } from '../utility/index';
|
|
6
6
|
* @param keyword Keyword to identify
|
7
7
|
* @param expect tag expected for the Otter keyword
|
8
8
|
*/
|
9
|
-
export declare const isOtterTag: <T extends string | undefined>(keyword: any, expect?: T
|
9
|
+
export declare const isOtterTag: <T extends string | undefined>(keyword: any, expect?: T) => keyword is `otter-${T extends undefined ? "" : T}`;
|
10
10
|
/** Options for getAvailableModules function */
|
11
11
|
export interface AvailableModuleOptions extends PackageManagerOptions {
|
12
12
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modules.helpers.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuH,MAAM,qBAAqB,CAAC;AAG9K,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAUpD,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAkDjF;;;;GAIG;AACH,eAAO,MAAM,UAAU,0CAA2C,GAAG
|
1
|
+
{"version":3,"file":"modules.helpers.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuH,MAAM,qBAAqB,CAAC;AAG9K,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAUpD,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAkDjF;;;;GAIG;AACH,eAAO,MAAM,UAAU,0CAA2C,GAAG,WAAW,CAAC,uDAGhF,CAAC;AAEF,+CAA+C;AAC/C,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAsBxK;AAED,gEAAgE;AAChE,MAAM,WAAW,uCAAwC,SAAQ,sBAAsB;IACrF;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAsB,oCAAoC,CAAC,OAAO,oBAA+B,EAAE,OAAO,EAAE,uCAAuC,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAoBlL;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,kBAAkB,EAC9B,MAAM,SAAQ,EACd,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACxC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,UA8B7B"}
|
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/
|
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
|
};
|