@o3r/third-party 10.2.0-prerelease.3 → 10.2.0-prerelease.30
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/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
|
+
[](https://www.npmjs.com/package/@o3r/third-party)
|
|
13
|
+
[](https://www.npmjs.com/package/@o3r/third-party)
|
|
14
|
+
|
|
12
15
|
This module aims at improving the communication with third parties.
|
|
13
16
|
It exposes bridges to integrate third parties iFrame via an established communication protocol.
|
|
14
17
|
It also provides support of an A/B Testing solution via shared windows properties
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/third-party",
|
|
3
|
-
"version": "10.2.0-prerelease.
|
|
3
|
+
"version": "10.2.0-prerelease.30",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"otter-module"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"tslib": "^2.
|
|
15
|
+
"tslib": "^2.6.2",
|
|
16
16
|
"uuid": "^9.0.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@angular-devkit/schematics": "~17.
|
|
20
|
-
"@o3r/core": "^10.2.0-prerelease.
|
|
21
|
-
"@o3r/schematics": "^10.2.0-prerelease.
|
|
19
|
+
"@angular-devkit/schematics": "~17.3.0",
|
|
20
|
+
"@o3r/core": "^10.2.0-prerelease.30",
|
|
21
|
+
"@o3r/schematics": "^10.2.0-prerelease.30",
|
|
22
22
|
"rxjs": "^7.8.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
@@ -2,6 +2,7 @@ import { type Rule } from '@angular-devkit/schematics';
|
|
|
2
2
|
import type { NgAddSchematicsSchema } from './schema';
|
|
3
3
|
/**
|
|
4
4
|
* Add Otter third-party 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,EAAS,KAAK,IAAI,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA4BtD;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAGtD,CAAC"}
|
|
@@ -2,38 +2,39 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAdd = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const schematics_2 = require("@o3r/schematics");
|
|
6
5
|
const fs = require("node:fs");
|
|
7
6
|
const path = require("node:path");
|
|
7
|
+
const reportMissingSchematicsDep = (logger) => (reason) => {
|
|
8
|
+
logger.error(`[ERROR]: Adding @o3r/third-party has failed.
|
|
9
|
+
If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the configuration package. Please run 'ng add @o3r/core' .
|
|
10
|
+
Otherwise, use the error message as guidance.`);
|
|
11
|
+
throw reason;
|
|
12
|
+
};
|
|
8
13
|
/**
|
|
9
14
|
* Add Otter third-party to an Angular Project
|
|
10
15
|
* @param options
|
|
11
16
|
*/
|
|
12
17
|
function ngAddFn(options) {
|
|
13
|
-
return async (tree
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
]);
|
|
25
|
-
}
|
|
26
|
-
catch (e) {
|
|
27
|
-
// third-party needs o3r/core as peer dep. o3r/core will install o3r/schematics
|
|
28
|
-
context.logger.error(`[ERROR]: Adding @o3r/third-party has failed.
|
|
29
|
-
If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the configuration package. Please run 'ng add @o3r/core' .
|
|
30
|
-
Otherwise, use the error message as guidance.`);
|
|
31
|
-
throw (e);
|
|
32
|
-
}
|
|
18
|
+
return async (tree) => {
|
|
19
|
+
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
20
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
|
|
21
|
+
const { getPackageInstallConfig, registerPackageCollectionSchematics, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
22
|
+
return (0, schematics_1.chain)([
|
|
23
|
+
registerPackageCollectionSchematics(packageJson),
|
|
24
|
+
setupDependencies({
|
|
25
|
+
projectName: options.projectName,
|
|
26
|
+
dependencies: getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
|
|
27
|
+
})
|
|
28
|
+
]);
|
|
33
29
|
};
|
|
34
30
|
}
|
|
35
31
|
/**
|
|
36
32
|
* Add Otter third-party to an Angular Project
|
|
33
|
+
* @param options
|
|
37
34
|
*/
|
|
38
|
-
|
|
35
|
+
const ngAdd = (options) => async (_, { logger }) => {
|
|
36
|
+
const { createSchematicWithMetricsIfInstalled } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
|
|
37
|
+
return createSchematicWithMetricsIfInstalled(ngAddFn)(options);
|
|
38
|
+
};
|
|
39
|
+
exports.ngAdd = ngAdd;
|
|
39
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA8D;AAC9D,8BAA8B;AAC9B,kCAAkC;AAGlC,MAAM,0BAA0B,GAAG,CAAC,MAA2C,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE;IAClG,MAAM,CAAC,KAAK,CAAC;;8CAE+B,CAAC,CAAC;IAC9C,MAAM,MAAM,CAAC;AACf,CAAC,CAAC;AAEF;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5E,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QACxF,MAAM,EAAE,uBAAuB,EAAE,mCAAmC,EAAE,iBAAiB,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QAC5H,OAAO,IAAA,kBAAK,EAAC;YACX,mCAAmC,CAAC,WAAW,CAAC;YAChD,iBAAiB,CAAC;gBAChB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,YAAY,EAAE,uBAAuB,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;aACpH,CAAC;SACH,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,MAAM,KAAK,GAAG,CAAC,OAA8B,EAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACrF,MAAM,EAAE,qCAAqC,EAAE,GAAG,MAAM,qCAAO,iBAAiB,GAAE,KAAK,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5H,OAAO,qCAAqC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC,CAAC;AAHW,QAAA,KAAK,SAGhB"}
|