@o3r/apis-manager 12.3.7 → 12.3.9
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/apis-manager",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,15 +11,16 @@
|
|
|
11
11
|
"otter-module"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@ama-sdk/client-fetch": "^12.3.
|
|
15
|
-
"@ama-sdk/core": "^12.3.
|
|
14
|
+
"@ama-sdk/client-fetch": "^12.3.9",
|
|
15
|
+
"@ama-sdk/core": "^12.3.9",
|
|
16
16
|
"@angular-devkit/schematics": "^19.0.0",
|
|
17
17
|
"@angular/common": "^19.0.0",
|
|
18
18
|
"@angular/core": "^19.0.0",
|
|
19
|
-
"@o3r/schematics": "^12.3.
|
|
19
|
+
"@o3r/schematics": "^12.3.9",
|
|
20
20
|
"@schematics/angular": "^19.0.0",
|
|
21
21
|
"rxjs": "^7.8.1",
|
|
22
22
|
"ts-node": "~10.9.2",
|
|
23
|
+
"type-fest": "^4.30.1",
|
|
23
24
|
"typescript": "^5.5.4"
|
|
24
25
|
},
|
|
25
26
|
"peerDependenciesMeta": {
|
|
@@ -34,10 +35,13 @@
|
|
|
34
35
|
},
|
|
35
36
|
"@schematics/angular": {
|
|
36
37
|
"optional": true
|
|
38
|
+
},
|
|
39
|
+
"type-fest": {
|
|
40
|
+
"optional": true
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
|
-
"@o3r/schematics": "^12.3.
|
|
44
|
+
"@o3r/schematics": "^12.3.9",
|
|
41
45
|
"tslib": "^2.6.2"
|
|
42
46
|
},
|
|
43
47
|
"schematics": "./collection.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAyElB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -4,12 +4,24 @@ exports.ngAdd = void 0;
|
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
6
|
const schematics_2 = require("@o3r/schematics");
|
|
7
|
+
/**
|
|
8
|
+
* List of external dependencies to be added to the project as peer dependencies
|
|
9
|
+
*/
|
|
10
|
+
const dependenciesToInstall = [
|
|
11
|
+
'@angular/common',
|
|
12
|
+
'@angular/core',
|
|
13
|
+
'rxjs'
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* List of external dependencies to be added to the project as dev dependencies
|
|
17
|
+
*/
|
|
18
|
+
const devDependenciesToInstall = [];
|
|
7
19
|
/**
|
|
8
20
|
* Add Otter apis manager to an Angular Project
|
|
9
21
|
* @param options
|
|
10
22
|
*/
|
|
11
23
|
function ngAddFn(options) {
|
|
12
|
-
return async (tree) => {
|
|
24
|
+
return async (tree, context) => {
|
|
13
25
|
const { updateApiDependencies } = await Promise.resolve().then(() => require('../helpers/update-api-deps'));
|
|
14
26
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
15
27
|
const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
|
|
@@ -22,6 +34,15 @@ function ngAddFn(options) {
|
|
|
22
34
|
if (!options.skipCodeSample) {
|
|
23
35
|
depsInfo.o3rPeerDeps.push('@ama-sdk/client-fetch');
|
|
24
36
|
}
|
|
37
|
+
const projectDirectory = workspaceProject?.root || '.';
|
|
38
|
+
const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
|
|
39
|
+
const externalDependenciesInfo = (0, schematics_2.getExternalDependenciesInfo)({
|
|
40
|
+
dependenciesToInstall,
|
|
41
|
+
devDependenciesToInstall,
|
|
42
|
+
projectType: workspaceProject?.projectType,
|
|
43
|
+
o3rPackageJsonPath: packageJsonPath,
|
|
44
|
+
projectPackageJson
|
|
45
|
+
}, context.logger);
|
|
25
46
|
const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
|
|
26
47
|
acc[dep] = {
|
|
27
48
|
inManifest: [{
|
|
@@ -37,7 +58,7 @@ function ngAddFn(options) {
|
|
|
37
58
|
options.skipLinter ? schematics_1.noop : (0, schematics_2.applyEsLintFix)(),
|
|
38
59
|
(0, schematics_2.setupDependencies)({
|
|
39
60
|
projectName: options.projectName,
|
|
40
|
-
dependencies,
|
|
61
|
+
dependencies: { ...dependencies, ...externalDependenciesInfo },
|
|
41
62
|
ngAddToRun: depsInfo.o3rPeerDeps
|
|
42
63
|
})
|
|
43
64
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,2DAIoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,2DAIoC;AACpC,gDASyB;AAQzB;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,iBAAiB;IACjB,eAAe;IACf,MAAM;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAa,EAAE,CAAC;AAE9C;;;GAGG;AACH,SAAS,OAAO,CAAC,OA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