@o3r/analytics 10.2.0-prerelease.13 → 10.2.0-prerelease.15
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/analytics",
|
|
3
|
-
"version": "10.2.0-prerelease.
|
|
3
|
+
"version": "10.2.0-prerelease.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"otter-module"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@ama-sdk/core": "^10.2.0-prerelease.
|
|
14
|
+
"@ama-sdk/core": "^10.2.0-prerelease.15",
|
|
15
15
|
"@angular/common": "~17.2.0",
|
|
16
16
|
"@angular/core": "~17.2.0",
|
|
17
17
|
"@angular/platform-browser": "~17.2.0",
|
|
18
18
|
"@angular/platform-browser-dynamic": "~17.2.0",
|
|
19
19
|
"@angular/router": "~17.2.0",
|
|
20
20
|
"@ngrx/store": "~17.1.0",
|
|
21
|
-
"@o3r/core": "^10.2.0-prerelease.
|
|
22
|
-
"@o3r/schematics": "^10.2.0-prerelease.
|
|
21
|
+
"@o3r/core": "^10.2.0-prerelease.15",
|
|
22
|
+
"@o3r/schematics": "^10.2.0-prerelease.15",
|
|
23
23
|
"@schematics/angular": "~17.2.0",
|
|
24
24
|
"jasmine": "^5.0.0",
|
|
25
25
|
"rxjs": "^7.8.1",
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { Rule } from '@angular-devkit/schematics';
|
|
2
2
|
import type { NgAddSchematicsSchema } from './schema';
|
|
3
|
-
/**
|
|
4
|
-
* Add Otter analytics to an Angular Project
|
|
5
|
-
*/
|
|
6
3
|
export declare const ngAdd: (options: NgAddSchematicsSchema) => Rule;
|
|
7
4
|
//# 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;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA4BtD,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAGtD,CAAC"}
|
|
@@ -1,24 +1,31 @@
|
|
|
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 path = require("node:path");
|
|
6
5
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
6
|
+
const reportMissingSchematicsDep = (logger) => (reason) => {
|
|
7
|
+
logger.error(`[ERROR]: Adding @o3r/analytics has failed.
|
|
8
|
+
If the error is related to missing @o3r dependencies you need to install '@o3r/core'. Please run 'ng add @o3r/core'.
|
|
9
|
+
Otherwise, use the error message as guidance.`);
|
|
10
|
+
throw reason;
|
|
11
|
+
};
|
|
7
12
|
/**
|
|
8
13
|
* Add Otter analytics to an Angular Project
|
|
9
14
|
* @param options
|
|
10
15
|
*/
|
|
11
16
|
function ngAddFn(options) {
|
|
12
17
|
/* ng add rules */
|
|
13
|
-
return (tree) => {
|
|
14
|
-
|
|
18
|
+
return async (tree) => {
|
|
19
|
+
const { getPackageInstallConfig, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
20
|
+
return setupDependencies({
|
|
15
21
|
projectName: options.projectName,
|
|
16
|
-
dependencies:
|
|
22
|
+
dependencies: getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)
|
|
17
23
|
});
|
|
18
24
|
};
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
const ngAdd = (options) => async (_, { logger }) => {
|
|
27
|
+
const { createSchematicWithMetricsIfInstalled } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
|
|
28
|
+
return createSchematicWithMetricsIfInstalled(ngAddFn)(options);
|
|
29
|
+
};
|
|
30
|
+
exports.ngAdd = ngAdd;
|
|
24
31
|
//# sourceMappingURL=index.js.map
|