@ama-mfe/ng-utils 12.3.0-prerelease.47 → 12.3.0-prerelease.49
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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-mfe/ng-utils",
|
|
3
|
-
"version": "12.3.0-prerelease.
|
|
3
|
+
"version": "12.3.0-prerelease.49",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@ama-mfe/messages": "^12.3.0-prerelease.
|
|
8
|
+
"@ama-mfe/messages": "^12.3.0-prerelease.49",
|
|
9
9
|
"@amadeus-it-group/microfrontends": "0.0.7",
|
|
10
10
|
"@amadeus-it-group/microfrontends-angular": "0.0.7",
|
|
11
11
|
"@angular-devkit/core": "~19.2.0",
|
|
@@ -14,14 +14,15 @@
|
|
|
14
14
|
"@angular/core": "^19.0.0",
|
|
15
15
|
"@angular/platform-browser": "~19.2.0",
|
|
16
16
|
"@angular/router": "~19.2.0",
|
|
17
|
-
"@o3r/logger": "^12.3.0-prerelease.
|
|
18
|
-
"@o3r/schematics": "^12.3.0-prerelease.
|
|
17
|
+
"@o3r/logger": "^12.3.0-prerelease.49",
|
|
18
|
+
"@o3r/schematics": "^12.3.0-prerelease.49",
|
|
19
19
|
"rxjs": "^7.8.1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@amadeus-it-group/microfrontends": "0.0.7",
|
|
23
23
|
"@amadeus-it-group/microfrontends-angular": "0.0.7",
|
|
24
|
-
"@o3r/logger": "^12.3.0-prerelease.
|
|
24
|
+
"@o3r/logger": "^12.3.0-prerelease.49",
|
|
25
|
+
"@o3r/schematics": "^12.3.0-prerelease.49",
|
|
25
26
|
"tslib": "^2.6.2"
|
|
26
27
|
},
|
|
27
28
|
"sideEffects": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AASpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAiDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.ngAdd = void 0;
|
|
|
4
4
|
const fs = require("node:fs");
|
|
5
5
|
const path = require("node:path");
|
|
6
6
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
const schematics_2 = require("@o3r/schematics");
|
|
7
8
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
8
9
|
const doCustomAction = (tree) => {
|
|
9
10
|
// your custom code here
|
|
@@ -20,26 +21,24 @@ const dependenciesToNgAdd = [
|
|
|
20
21
|
* @param options
|
|
21
22
|
*/
|
|
22
23
|
function ngAddFn(options) {
|
|
23
|
-
return
|
|
24
|
-
// use dynamic import to properly raise an exception if it is not an Otter project.
|
|
25
|
-
const { getProjectNewDependenciesTypes, getPackageInstallConfig, applyEsLintFix, getWorkspaceConfig, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
24
|
+
return (tree) => {
|
|
26
25
|
// current package version
|
|
27
26
|
const version = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' })).version;
|
|
28
|
-
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
|
27
|
+
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
29
28
|
const dependencies = [...dependenciesToInstall, ...dependenciesToNgAdd].reduce((acc, dep) => {
|
|
30
29
|
acc[dep] = {
|
|
31
30
|
inManifest: [{
|
|
32
31
|
range: `~${version}`,
|
|
33
|
-
types: getProjectNewDependenciesTypes(workspaceProject)
|
|
32
|
+
types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
|
|
34
33
|
}]
|
|
35
34
|
};
|
|
36
35
|
return acc;
|
|
37
|
-
}, getPackageInstallConfig(packageJsonPath, tree, options.projectName));
|
|
36
|
+
}, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName));
|
|
38
37
|
return (0, schematics_1.chain)([
|
|
39
38
|
// optional custom action dedicated to this module
|
|
40
39
|
doCustomAction,
|
|
41
|
-
options.skipLinter ? (0, schematics_1.noop)() : applyEsLintFix(),
|
|
42
|
-
setupDependencies({
|
|
40
|
+
options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
|
|
41
|
+
(0, schematics_2.setupDependencies)({
|
|
43
42
|
projectName: options.projectName,
|
|
44
43
|
dependencies,
|
|
45
44
|
ngAddToRun: dependenciesToNgAdd,
|
|
@@ -52,9 +51,6 @@ function ngAddFn(options) {
|
|
|
52
51
|
* Add module to an Angular Project
|
|
53
52
|
* @param options ng add options
|
|
54
53
|
*/
|
|
55
|
-
const ngAdd = (options) =>
|
|
56
|
-
const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(() => ({ createOtterSchematic: (ngAddCallback) => ngAddCallback }));
|
|
57
|
-
return createOtterSchematic(ngAddFn)(options);
|
|
58
|
-
};
|
|
54
|
+
const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
|
|
59
55
|
exports.ngAdd = ngAdd;
|
|
60
56
|
//# sourceMappingURL=index.js.map
|