@o3r/logger 10.2.0-prerelease.7 → 10.2.0-prerelease.70
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 +3 -0
- package/esm2022/services/logger/logger.module.mjs +4 -4
- package/esm2022/services/logger/logger.service.mjs +3 -3
- package/fesm2022/o3r-logger.mjs +7 -7
- package/package.json +6 -6
- 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 +16 -5
- package/schematics/ng-add/index.js.map +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
|
+
[](https://www.npmjs.com/package/@o3r/logger)
|
|
13
|
+
[](https://www.npmjs.com/package/@o3r/logger)
|
|
14
|
+
|
|
12
15
|
This module provides a bridge to target different logger (logrocket, fullstory, smartlook) with a common interface.
|
|
13
16
|
|
|
14
17
|
## How to install
|
|
@@ -19,13 +19,13 @@ export class LoggerModule {
|
|
|
19
19
|
]
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
23
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.
|
|
24
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.
|
|
22
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
23
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule, providers: [
|
|
25
25
|
LoggerService
|
|
26
26
|
] }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule, decorators: [{
|
|
29
29
|
type: NgModule,
|
|
30
30
|
args: [{
|
|
31
31
|
providers: [
|
|
@@ -118,10 +118,10 @@ export class LoggerService {
|
|
|
118
118
|
.filter((metaReducer) => !!metaReducer);
|
|
119
119
|
return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;
|
|
120
120
|
}
|
|
121
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
122
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
121
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerService, deps: [{ token: LOGGER_CLIENT_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
122
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
|
|
123
123
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerService, decorators: [{
|
|
125
125
|
type: Injectable,
|
|
126
126
|
args: [{
|
|
127
127
|
providedIn: 'root'
|
package/fesm2022/o3r-logger.mjs
CHANGED
|
@@ -187,10 +187,10 @@ class LoggerService {
|
|
|
187
187
|
.filter((metaReducer) => !!metaReducer);
|
|
188
188
|
return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;
|
|
189
189
|
}
|
|
190
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
191
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.
|
|
190
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerService, deps: [{ token: LOGGER_CLIENT_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
191
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
|
|
192
192
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerService, decorators: [{
|
|
194
194
|
type: Injectable,
|
|
195
195
|
args: [{
|
|
196
196
|
providedIn: 'root'
|
|
@@ -218,13 +218,13 @@ class LoggerModule {
|
|
|
218
218
|
]
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
222
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.
|
|
223
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.
|
|
221
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
222
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule }); }
|
|
223
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule, providers: [
|
|
224
224
|
LoggerService
|
|
225
225
|
] }); }
|
|
226
226
|
}
|
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: LoggerModule, decorators: [{
|
|
228
228
|
type: NgModule,
|
|
229
229
|
args: [{
|
|
230
230
|
providers: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/logger",
|
|
3
|
-
"version": "10.2.0-prerelease.
|
|
3
|
+
"version": "10.2.0-prerelease.70",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"otter-module"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@angular/core": "~17.
|
|
15
|
-
"@angular/platform-browser-dynamic": "~17.
|
|
14
|
+
"@angular/core": "~17.3.0",
|
|
15
|
+
"@angular/platform-browser-dynamic": "~17.3.0",
|
|
16
16
|
"@fullstory/browser": "^2.0.0",
|
|
17
17
|
"@ngrx/store": "~17.1.0",
|
|
18
|
-
"@o3r/core": "^10.2.0-prerelease.
|
|
19
|
-
"@o3r/schematics": "^10.2.0-prerelease.
|
|
18
|
+
"@o3r/core": "^10.2.0-prerelease.70",
|
|
19
|
+
"@o3r/schematics": "^10.2.0-prerelease.70",
|
|
20
20
|
"logrocket": "~8.1.0",
|
|
21
21
|
"logrocket-ngrx": "~0.2.1",
|
|
22
22
|
"rxjs": "^7.8.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"tslib": "^2.
|
|
43
|
+
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=18.0.0"
|
|
@@ -2,6 +2,7 @@ import type { Rule } from '@angular-devkit/schematics';
|
|
|
2
2
|
import type { NgAddSchematicsSchema } from './schema';
|
|
3
3
|
/**
|
|
4
4
|
* Add Otter logger 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;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA2BtD;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAGtD,CAAC"}
|
|
@@ -1,24 +1,35 @@
|
|
|
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/logger has failed.
|
|
8
|
+
If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the logger package. Please run 'ng add @o3r/core' .
|
|
9
|
+
Otherwise, use the error message as guidance.`);
|
|
10
|
+
throw reason;
|
|
11
|
+
};
|
|
7
12
|
/**
|
|
8
13
|
* Add Otter logger 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
26
|
/**
|
|
21
27
|
* Add Otter logger to an Angular Project
|
|
28
|
+
* @param options
|
|
22
29
|
*/
|
|
23
|
-
|
|
30
|
+
const ngAdd = (options) => async (_, { logger }) => {
|
|
31
|
+
const { createSchematicWithMetricsIfInstalled } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
|
|
32
|
+
return createSchematicWithMetricsIfInstalled(ngAddFn)(options);
|
|
33
|
+
};
|
|
34
|
+
exports.ngAdd = ngAdd;
|
|
24
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAEA,kCAAkC;AAElC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE5E,MAAM,0BAA0B,GAAG,CAAC,MAA2C,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE;IAClG,MAAM,CAAC,KAAK,CAAC;;oDAEqC,CAAC,CAAC;IACpD,MAAM,MAAM,CAAC;AACf,CAAC,CAAC;AAEF;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,kBAAkB;IAClB,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QACvF,OAAO,iBAAiB,CAAC;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,YAAY,EAAE,uBAAuB,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;SACpH,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"}
|