@o3r/logger 15.3.0-prerelease.15 → 15.3.0-prerelease.17

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.
@@ -1,225 +1,141 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, makeEnvironmentProviders } from '@angular/core';
3
-
4
- /**
5
- * Console logger used to display the logs in the browser console
6
- * Should be used in development mode.
7
- */
8
- class ConsoleLogger {
9
- constructor() {
10
- /** @inheritdoc */
11
- this.error = console.error;
12
- /** @inheritdoc */
13
- this.warn = console.warn;
14
- /** @inheritdoc */
15
- this.debug = console.debug;
16
- /** @inheritdoc */
17
- this.info = console.info;
18
- /** @inheritdoc */
19
- this.log = console.log;
20
- }
21
- /** @inheritdoc */
22
- identify(uuid) {
23
- this.debug('logging identify function called');
24
- this.log(`Identify user id ${uuid}`);
25
- }
26
- /** @inheritdoc */
27
- event(name, properties) {
28
- this.debug('logging event function called');
29
- this.log('event:', name);
30
- if (properties) {
31
- this.log('properties:', properties);
32
- }
33
- }
34
- /** @inheritdoc */
35
- getSessionURL() {
36
- this.debug('logging getSessionURL function called');
37
- return undefined;
38
- }
39
- /** @inheritdoc */
40
- stopRecording() {
41
- this.debug('logging stopRecording function called');
42
- }
43
- /** @inheritdoc */
44
- resumeRecording() {
45
- this.debug('logging resumeRecording function called');
46
- }
47
- /** @inheritdoc */
48
- createMetaReducer() {
49
- this.debug('logging createMetaReducer function called but a noop reducer is returned for the console logger');
50
- return (reducer) => reducer;
51
- }
52
- }
53
-
54
- const LOGGER_CLIENT_TOKEN = new InjectionToken('Logger Client injection token');
55
-
56
- /**
57
- * Logger service
58
- */
59
- class LoggerService {
60
- constructor() {
61
- /**
62
- * Record the recording status to make sure that new clients recording status will be consistent with the service
63
- */
64
- this.recordingState = 'default';
65
- const clients = inject(LOGGER_CLIENT_TOKEN, { optional: true });
66
- this.clients = clients ? (Array.isArray(clients) ? clients : [clients]) : [new ConsoleLogger()];
67
- }
68
- /**
69
- * Identify a user.
70
- * @param uid Unique identifier for the current user
71
- * @param vars Addition information about the user
72
- */
73
- identify(uid, vars) {
74
- this.clients.forEach((client) => client.identify(uid, vars));
75
- }
76
- /**
77
- * Log custom event.
78
- * @param name Name of the event to log
79
- * @param properties Additional properties
80
- */
81
- event(name, properties) {
82
- this.clients.forEach((client) => client.event(name, properties));
83
- }
84
- /**
85
- * Generate a link to the replay of the current session.
86
- */
87
- getClientSessionURL() {
88
- const sessionUrls = this.clients
89
- .map((client) => client.getSessionURL())
90
- .filter((sessionUrl) => !!sessionUrl);
91
- return sessionUrls.length <= 1 ? sessionUrls[0] : sessionUrls;
92
- }
93
- /**
94
- * Register a new client to the logger service
95
- * @param client
96
- */
97
- registerClient(client) {
98
- if (this.clients.includes(client)) {
99
- this.warn(`Client ${client.constructor.name} already registered`);
100
- return;
101
- }
102
- if (this.recordingState === 'resumed') {
103
- client.resumeRecording();
104
- }
105
- else if (this.recordingState === 'stopped') {
106
- client.stopRecording();
107
- }
108
- this.clients.push(client);
109
- }
110
- /**
111
- * Stop recording.
112
- */
113
- stopClientRecording() {
114
- this.recordingState = 'stopped';
115
- this.clients.forEach((client) => client.stopRecording());
116
- }
117
- /**
118
- * Resume recording.
119
- */
120
- resumeClientRecording() {
121
- this.recordingState = 'resumed';
122
- this.clients.forEach((client) => client.resumeRecording());
123
- }
124
- /**
125
- * Report an error
126
- * @param message
127
- * @param optionalParams
128
- */
129
- error(message, ...optionalParams) {
130
- this.clients.forEach((client) => client.error(message, ...optionalParams));
131
- }
132
- /**
133
- * Report a warning
134
- * @param message
135
- * @param optionalParams
136
- */
137
- warn(message, ...optionalParams) {
138
- this.clients.forEach((client) => client.warn(message, ...optionalParams));
139
- }
140
- /**
141
- * Log a message
142
- * @param message
143
- * @param optionalParams
144
- */
145
- log(message, ...optionalParams) {
146
- this.clients.forEach((client) => client.log(message, ...optionalParams));
147
- }
148
- /**
149
- * Log a message
150
- * @param message
151
- * @param optionalParams
152
- */
153
- info(message, ...optionalParams) {
154
- this.clients.forEach((client) => (client.info ? client.info(message, ...optionalParams) : client.log(message, ...optionalParams)));
155
- }
156
- /**
157
- * Log a debug message
158
- * @param message
159
- * @param optionalParams
160
- */
161
- debug(message, ...optionalParams) {
162
- this.clients.forEach((client) => client.debug?.(message, ...optionalParams));
163
- }
164
- /**
165
- * Create a meta reducer to log ngrx store.
166
- */
167
- createMetaReducer() {
168
- const metaReducers = this.clients
169
- .map((client) => client.createMetaReducer())
170
- .filter((metaReducer) => !!metaReducer);
171
- return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;
172
- }
173
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: LoggerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
174
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
175
- }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: LoggerService, decorators: [{
177
- type: Injectable,
178
- args: [{
179
- providedIn: 'root'
180
- }]
181
- }], ctorParameters: () => [] });
182
-
183
- /**
184
- * Provide logger for the application
185
- * By default {@link ConsoleLogger} will be used if nothing is specified
186
- * @param clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}
187
- */
1
+ import * as i0 from "@angular/core";
2
+ import { Injectable, InjectionToken, inject, makeEnvironmentProviders } from "@angular/core";
3
+ var ConsoleLogger = class {
4
+ constructor() {
5
+ this.error = console.error;
6
+ this.warn = console.warn;
7
+ this.debug = console.debug;
8
+ this.info = console.info;
9
+ this.log = console.log;
10
+ }
11
+ identify(uuid) {
12
+ this.debug("logging identify function called");
13
+ this.log(`Identify user id ${uuid}`);
14
+ }
15
+ event(name, properties) {
16
+ this.debug("logging event function called");
17
+ this.log("event:", name);
18
+ if (properties) this.log("properties:", properties);
19
+ }
20
+ getSessionURL() {
21
+ this.debug("logging getSessionURL function called");
22
+ }
23
+ stopRecording() {
24
+ this.debug("logging stopRecording function called");
25
+ }
26
+ resumeRecording() {
27
+ this.debug("logging resumeRecording function called");
28
+ }
29
+ createMetaReducer() {
30
+ this.debug("logging createMetaReducer function called but a noop reducer is returned for the console logger");
31
+ return (reducer) => reducer;
32
+ }
33
+ };
34
+ const LOGGER_CLIENT_TOKEN = new InjectionToken("Logger Client injection token");
35
+ var LoggerService = class LoggerService {
36
+ constructor() {
37
+ this.recordingState = "default";
38
+ const clients = inject(LOGGER_CLIENT_TOKEN, { optional: true });
39
+ this.clients = clients ? Array.isArray(clients) ? clients : [clients] : [new ConsoleLogger()];
40
+ }
41
+ identify(uid, vars) {
42
+ this.clients.forEach((client) => client.identify(uid, vars));
43
+ }
44
+ event(name, properties) {
45
+ this.clients.forEach((client) => client.event(name, properties));
46
+ }
47
+ getClientSessionURL() {
48
+ const sessionUrls = this.clients.map((client) => client.getSessionURL()).filter((sessionUrl) => !!sessionUrl);
49
+ return sessionUrls.length <= 1 ? sessionUrls[0] : sessionUrls;
50
+ }
51
+ registerClient(client) {
52
+ if (this.clients.includes(client)) {
53
+ this.warn(`Client ${client.constructor.name} already registered`);
54
+ return;
55
+ }
56
+ if (this.recordingState === "resumed") client.resumeRecording();
57
+ else if (this.recordingState === "stopped") client.stopRecording();
58
+ this.clients.push(client);
59
+ }
60
+ stopClientRecording() {
61
+ this.recordingState = "stopped";
62
+ this.clients.forEach((client) => client.stopRecording());
63
+ }
64
+ resumeClientRecording() {
65
+ this.recordingState = "resumed";
66
+ this.clients.forEach((client) => client.resumeRecording());
67
+ }
68
+ error(message, ...optionalParams) {
69
+ this.clients.forEach((client) => client.error(message, ...optionalParams));
70
+ }
71
+ warn(message, ...optionalParams) {
72
+ this.clients.forEach((client) => client.warn(message, ...optionalParams));
73
+ }
74
+ log(message, ...optionalParams) {
75
+ this.clients.forEach((client) => client.log(message, ...optionalParams));
76
+ }
77
+ info(message, ...optionalParams) {
78
+ this.clients.forEach((client) => client.info ? client.info(message, ...optionalParams) : client.log(message, ...optionalParams));
79
+ }
80
+ debug(message, ...optionalParams) {
81
+ this.clients.forEach((client) => client.debug?.(message, ...optionalParams));
82
+ }
83
+ createMetaReducer() {
84
+ const metaReducers = this.clients.map((client) => client.createMetaReducer()).filter((metaReducer) => !!metaReducer);
85
+ return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;
86
+ }
87
+ static {
88
+ this.ɵfac = i0.ɵɵngDeclareFactory({
89
+ minVersion: "12.0.0",
90
+ version: "22.2.3",
91
+ ngImport: i0,
92
+ type: LoggerService,
93
+ deps: [],
94
+ target: i0.ɵɵFactoryTarget.Injectable
95
+ });
96
+ }
97
+ static {
98
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
99
+ minVersion: "12.0.0",
100
+ version: "22.2.3",
101
+ ngImport: i0,
102
+ type: LoggerService,
103
+ providedIn: "root"
104
+ });
105
+ }
106
+ };
107
+ i0.ɵɵngDeclareClassMetadata({
108
+ minVersion: "12.0.0",
109
+ version: "22.2.3",
110
+ ngImport: i0,
111
+ type: LoggerService,
112
+ decorators: [{
113
+ type: Injectable,
114
+ args: [{ providedIn: "root" }]
115
+ }],
116
+ ctorParameters: () => []
117
+ });
188
118
  function provideLogger(...clients) {
189
- if (clients.length === 0) {
190
- clients = [new ConsoleLogger()];
191
- }
192
- return makeEnvironmentProviders([
193
- LoggerService,
194
- {
195
- provide: LOGGER_CLIENT_TOKEN,
196
- useValue: clients,
197
- multi: false
198
- }
199
- ]);
119
+ if (clients.length === 0) clients = [new ConsoleLogger()];
120
+ return makeEnvironmentProviders([LoggerService, {
121
+ provide: LOGGER_CLIENT_TOKEN,
122
+ useValue: clients,
123
+ multi: false
124
+ }]);
200
125
  }
201
-
202
- /**
203
- * Console logger used to display the logs in the browser console
204
- * Should be used in development mode.
205
- */
206
126
  const noopLogger = {
207
- identify: () => { },
208
- event: () => { },
209
- getSessionURL: () => undefined,
210
- stopRecording: () => { },
211
- resumeRecording: () => { },
212
- error: console.error,
213
- warn: console.warn,
214
- debug: console.debug,
215
- info: console.info,
216
- log: console.log,
217
- createMetaReducer: () => (reducer) => reducer
127
+ identify: () => {},
128
+ event: () => {},
129
+ getSessionURL: () => void 0,
130
+ stopRecording: () => {},
131
+ resumeRecording: () => {},
132
+ error: console.error,
133
+ warn: console.warn,
134
+ debug: console.debug,
135
+ info: console.info,
136
+ log: console.log,
137
+ createMetaReducer: () => (reducer) => reducer
218
138
  };
219
-
220
- /**
221
- * Generated bundle index. Do not edit.
222
- */
223
-
224
139
  export { ConsoleLogger, LOGGER_CLIENT_TOKEN, LoggerService, noopLogger, provideLogger };
225
- //# sourceMappingURL=o3r-logger.mjs.map
140
+
141
+ //# sourceMappingURL=o3r-logger.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-logger.mjs","sources":["../../src/services/logger/logger-console.ts","../../src/services/logger/logger-token.ts","../../src/services/logger/logger-service.ts","../../src/services/logger/logger-module.ts","../../src/services/logger/logger-noop.ts","../../src/o3r-logger.ts"],"sourcesContent":["/* eslint-disable no-console -- this is the purpose of this logger */\nimport {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n LoggerClient,\n} from './logger-client';\n\n/**\n * Console logger used to display the logs in the browser console\n * Should be used in development mode.\n */\nexport class ConsoleLogger implements LoggerClient {\n /** @inheritdoc */\n public error = console.error;\n\n /** @inheritdoc */\n public warn = console.warn;\n\n /** @inheritdoc */\n public debug = console.debug;\n\n /** @inheritdoc */\n public info = console.info;\n\n /** @inheritdoc */\n public log = console.log;\n\n /** @inheritdoc */\n public identify(uuid: string) {\n this.debug('logging identify function called');\n this.log(`Identify user id ${uuid}`);\n }\n\n /** @inheritdoc */\n public event(name: string, properties?: any) {\n this.debug('logging event function called');\n this.log('event:', name);\n if (properties) {\n this.log('properties:', properties);\n }\n }\n\n /** @inheritdoc */\n public getSessionURL(): undefined {\n this.debug('logging getSessionURL function called');\n return undefined;\n }\n\n /** @inheritdoc */\n public stopRecording() {\n this.debug('logging stopRecording function called');\n }\n\n /** @inheritdoc */\n public resumeRecording() {\n this.debug('logging resumeRecording function called');\n }\n\n /** @inheritdoc */\n public createMetaReducer(): MetaReducer<any, Action> {\n this.debug('logging createMetaReducer function called but a noop reducer is returned for the console logger');\n return (reducer: ActionReducer<any>): ActionReducer<any> => reducer;\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n LoggerClient,\n} from './logger-client';\n\nexport const LOGGER_CLIENT_TOKEN: InjectionToken<LoggerClient | LoggerClient[]> = new InjectionToken('Logger Client injection token');\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n Action,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n Logger,\n} from '@o3r/core';\nimport {\n LoggerClient,\n} from './logger-client';\nimport {\n ConsoleLogger,\n} from './logger-console';\nimport {\n LOGGER_CLIENT_TOKEN,\n} from './logger-token';\n\n/**\n * Logger service\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService implements Logger {\n /** Loggers */\n private readonly clients: LoggerClient[];\n\n /**\n * Record the recording status to make sure that new clients recording status will be consistent with the service\n */\n private recordingState: 'default' | 'resumed' | 'stopped' = 'default';\n\n constructor() {\n const clients = inject<LoggerClient | LoggerClient[]>(LOGGER_CLIENT_TOKEN, { optional: true });\n\n this.clients = clients ? (Array.isArray(clients) ? clients : [clients]) : [new ConsoleLogger()];\n }\n\n /**\n * Identify a user.\n * @param uid Unique identifier for the current user\n * @param vars Addition information about the user\n */\n public identify(uid: string, vars?: { [key: string]: string }) {\n this.clients.forEach((client) => client.identify(uid, vars));\n }\n\n /**\n * Log custom event.\n * @param name Name of the event to log\n * @param properties Additional properties\n */\n public event(name: string, properties?: any): void {\n this.clients.forEach((client) => client.event(name, properties));\n }\n\n /**\n * Generate a link to the replay of the current session.\n */\n public getClientSessionURL(): string | string[] | undefined {\n const sessionUrls = this.clients\n .map((client) => client.getSessionURL())\n .filter((sessionUrl): sessionUrl is string => !!sessionUrl);\n return sessionUrls.length <= 1 ? sessionUrls[0] : sessionUrls;\n }\n\n /**\n * Register a new client to the logger service\n * @param client\n */\n public registerClient(client: LoggerClient) {\n if (this.clients.includes(client)) {\n this.warn(`Client ${client.constructor.name} already registered`);\n return;\n }\n if (this.recordingState === 'resumed') {\n client.resumeRecording();\n } else if (this.recordingState === 'stopped') {\n client.stopRecording();\n }\n this.clients.push(client);\n }\n\n /**\n * Stop recording.\n */\n public stopClientRecording(): void {\n this.recordingState = 'stopped';\n this.clients.forEach((client) => client.stopRecording());\n }\n\n /**\n * Resume recording.\n */\n public resumeClientRecording(): void {\n this.recordingState = 'resumed';\n this.clients.forEach((client) => client.resumeRecording());\n }\n\n /**\n * Report an error\n * @param message\n * @param optionalParams\n */\n public error(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.error(message, ...optionalParams));\n }\n\n /**\n * Report a warning\n * @param message\n * @param optionalParams\n */\n public warn(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.warn(message, ...optionalParams));\n }\n\n /**\n * Log a message\n * @param message\n * @param optionalParams\n */\n public log(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.log(message, ...optionalParams));\n }\n\n /**\n * Log a message\n * @param message\n * @param optionalParams\n */\n public info(message?: any, ...optionalParams: any[]): void {\n this.clients.forEach((client) => (client.info ? client.info(message, ...optionalParams) : client.log(message, ...optionalParams)));\n }\n\n /**\n * Log a debug message\n * @param message\n * @param optionalParams\n */\n public debug(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.debug?.(message, ...optionalParams));\n }\n\n /**\n * Create a meta reducer to log ngrx store.\n */\n public createMetaReducer(): MetaReducer<any, Action> | MetaReducer<any, Action>[] | undefined {\n const metaReducers = this.clients\n .map((client) => client.createMetaReducer())\n .filter((metaReducer): metaReducer is MetaReducer<any, Action> => !!metaReducer);\n return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;\n }\n}\n","import {\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n LoggerClient,\n} from './logger-client';\nimport {\n ConsoleLogger,\n} from './logger-console';\nimport {\n LoggerService,\n} from './logger-service';\nimport {\n LOGGER_CLIENT_TOKEN,\n} from './logger-token';\n\n/**\n * Provide logger for the application\n * By default {@link ConsoleLogger} will be used if nothing is specified\n * @param clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}\n */\nexport function provideLogger(...clients: LoggerClient[]) {\n if (clients.length === 0) {\n clients = [new ConsoleLogger()];\n }\n return makeEnvironmentProviders([\n LoggerService,\n {\n provide: LOGGER_CLIENT_TOKEN,\n useValue: clients,\n multi: false\n }\n ]);\n}\n","/* eslint-disable no-console -- this is the purpose of this logger */\nimport type {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n LoggerClient,\n} from './logger-client';\n\n/**\n * Console logger used to display the logs in the browser console\n * Should be used in development mode.\n */\nexport const noopLogger: Readonly<LoggerClient> = {\n identify: () => {},\n event: () => {},\n getSessionURL: () => undefined,\n stopRecording: () => {},\n resumeRecording: () => {},\n error: console.error,\n warn: console.warn,\n debug: console.debug,\n info: console.info,\n log: console.log,\n createMetaReducer: (): MetaReducer<any, Action> => (reducer: ActionReducer<any>): ActionReducer<any> => reducer\n} as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAUA;;;AAGG;MACU,aAAa,CAAA;AAA1B,IAAA,WAAA,GAAA;;AAES,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,KAAK;;AAGrB,QAAA,IAAA,CAAA,IAAI,GAAG,OAAO,CAAC,IAAI;;AAGnB,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,KAAK;;AAGrB,QAAA,IAAA,CAAA,IAAI,GAAG,OAAO,CAAC,IAAI;;AAGnB,QAAA,IAAA,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AACI,MAAM,UAAU,GAA2B;AAChD,IAAA,QAAQ,EAAE,MAAK,EAAE,CAAC;AAClB,IAAA,KAAK,EAAE,MAAK,EAAE,CAAC;AACf,IAAA,aAAa,EAAE,MAAM,SAAS;AAC9B,IAAA,aAAa,EAAE,MAAK,EAAE,CAAC;AACvB,IAAA,eAAe,EAAE,MAAK,EAAE,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,GAAG,EAAE,OAAO,CAAC,GAAG;IAChB,iBAAiB,EAAE,MAAgC,CAAC,OAA2B,KAAyB;;;ACzB1G;;AAEG;;"}
1
+ {"version":3,"file":"o3r-logger.mjs","names":[],"sources":["../../src/services/logger/logger-console.ts","../../src/services/logger/logger-token.ts","../../src/services/logger/logger-service.ts","../../src/services/logger/logger-module.ts","../../src/services/logger/logger-noop.ts"],"sourcesContent":["/* eslint-disable no-console -- this is the purpose of this logger */\nimport {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n LoggerClient,\n} from './logger-client';\n\n/**\n * Console logger used to display the logs in the browser console\n * Should be used in development mode.\n */\nexport class ConsoleLogger implements LoggerClient {\n /** @inheritdoc */\n public error = console.error;\n\n /** @inheritdoc */\n public warn = console.warn;\n\n /** @inheritdoc */\n public debug = console.debug;\n\n /** @inheritdoc */\n public info = console.info;\n\n /** @inheritdoc */\n public log = console.log;\n\n /** @inheritdoc */\n public identify(uuid: string) {\n this.debug('logging identify function called');\n this.log(`Identify user id ${uuid}`);\n }\n\n /** @inheritdoc */\n public event(name: string, properties?: any) {\n this.debug('logging event function called');\n this.log('event:', name);\n if (properties) {\n this.log('properties:', properties);\n }\n }\n\n /** @inheritdoc */\n public getSessionURL(): undefined {\n this.debug('logging getSessionURL function called');\n return undefined;\n }\n\n /** @inheritdoc */\n public stopRecording() {\n this.debug('logging stopRecording function called');\n }\n\n /** @inheritdoc */\n public resumeRecording() {\n this.debug('logging resumeRecording function called');\n }\n\n /** @inheritdoc */\n public createMetaReducer(): MetaReducer<any, Action> {\n this.debug('logging createMetaReducer function called but a noop reducer is returned for the console logger');\n return (reducer: ActionReducer<any>): ActionReducer<any> => reducer;\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n LoggerClient,\n} from './logger-client';\n\nexport const LOGGER_CLIENT_TOKEN: InjectionToken<LoggerClient | LoggerClient[]> = new InjectionToken('Logger Client injection token');\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n Action,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n Logger,\n} from '@o3r/core';\nimport {\n LoggerClient,\n} from './logger-client';\nimport {\n ConsoleLogger,\n} from './logger-console';\nimport {\n LOGGER_CLIENT_TOKEN,\n} from './logger-token';\n\n/**\n * Logger service\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService implements Logger {\n /** Loggers */\n private readonly clients: LoggerClient[];\n\n /**\n * Record the recording status to make sure that new clients recording status will be consistent with the service\n */\n private recordingState: 'default' | 'resumed' | 'stopped' = 'default';\n\n constructor() {\n const clients = inject<LoggerClient | LoggerClient[]>(LOGGER_CLIENT_TOKEN, { optional: true });\n\n this.clients = clients ? (Array.isArray(clients) ? clients : [clients]) : [new ConsoleLogger()];\n }\n\n /**\n * Identify a user.\n * @param uid Unique identifier for the current user\n * @param vars Addition information about the user\n */\n public identify(uid: string, vars?: { [key: string]: string }) {\n this.clients.forEach((client) => client.identify(uid, vars));\n }\n\n /**\n * Log custom event.\n * @param name Name of the event to log\n * @param properties Additional properties\n */\n public event(name: string, properties?: any): void {\n this.clients.forEach((client) => client.event(name, properties));\n }\n\n /**\n * Generate a link to the replay of the current session.\n */\n public getClientSessionURL(): string | string[] | undefined {\n const sessionUrls = this.clients\n .map((client) => client.getSessionURL())\n .filter((sessionUrl): sessionUrl is string => !!sessionUrl);\n return sessionUrls.length <= 1 ? sessionUrls[0] : sessionUrls;\n }\n\n /**\n * Register a new client to the logger service\n * @param client\n */\n public registerClient(client: LoggerClient) {\n if (this.clients.includes(client)) {\n this.warn(`Client ${client.constructor.name} already registered`);\n return;\n }\n if (this.recordingState === 'resumed') {\n client.resumeRecording();\n } else if (this.recordingState === 'stopped') {\n client.stopRecording();\n }\n this.clients.push(client);\n }\n\n /**\n * Stop recording.\n */\n public stopClientRecording(): void {\n this.recordingState = 'stopped';\n this.clients.forEach((client) => client.stopRecording());\n }\n\n /**\n * Resume recording.\n */\n public resumeClientRecording(): void {\n this.recordingState = 'resumed';\n this.clients.forEach((client) => client.resumeRecording());\n }\n\n /**\n * Report an error\n * @param message\n * @param optionalParams\n */\n public error(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.error(message, ...optionalParams));\n }\n\n /**\n * Report a warning\n * @param message\n * @param optionalParams\n */\n public warn(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.warn(message, ...optionalParams));\n }\n\n /**\n * Log a message\n * @param message\n * @param optionalParams\n */\n public log(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.log(message, ...optionalParams));\n }\n\n /**\n * Log a message\n * @param message\n * @param optionalParams\n */\n public info(message?: any, ...optionalParams: any[]): void {\n this.clients.forEach((client) => (client.info ? client.info(message, ...optionalParams) : client.log(message, ...optionalParams)));\n }\n\n /**\n * Log a debug message\n * @param message\n * @param optionalParams\n */\n public debug(message?: any, ...optionalParams: any[]) {\n this.clients.forEach((client) => client.debug?.(message, ...optionalParams));\n }\n\n /**\n * Create a meta reducer to log ngrx store.\n */\n public createMetaReducer(): MetaReducer<any, Action> | MetaReducer<any, Action>[] | undefined {\n const metaReducers = this.clients\n .map((client) => client.createMetaReducer())\n .filter((metaReducer): metaReducer is MetaReducer<any, Action> => !!metaReducer);\n return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;\n }\n}\n","import {\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n LoggerClient,\n} from './logger-client';\nimport {\n ConsoleLogger,\n} from './logger-console';\nimport {\n LoggerService,\n} from './logger-service';\nimport {\n LOGGER_CLIENT_TOKEN,\n} from './logger-token';\n\n/**\n * Provide logger for the application\n * By default {@link ConsoleLogger} will be used if nothing is specified\n * @param clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}\n */\nexport function provideLogger(...clients: LoggerClient[]) {\n if (clients.length === 0) {\n clients = [new ConsoleLogger()];\n }\n return makeEnvironmentProviders([\n LoggerService,\n {\n provide: LOGGER_CLIENT_TOKEN,\n useValue: clients,\n multi: false\n }\n ]);\n}\n","/* eslint-disable no-console -- this is the purpose of this logger */\nimport type {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n LoggerClient,\n} from './logger-client';\n\n/**\n * Console logger used to display the logs in the browser console\n * Should be used in development mode.\n */\nexport const noopLogger: Readonly<LoggerClient> = {\n identify: () => {},\n event: () => {},\n getSessionURL: () => undefined,\n stopRecording: () => {},\n resumeRecording: () => {},\n error: console.error,\n warn: console.warn,\n debug: console.debug,\n info: console.info,\n log: console.log,\n createMetaReducer: (): MetaReducer<any, Action> => (reducer: ActionReducer<any>): ActionReducer<any> => reducer\n} as const;\n"],"mappings":";;AAcA,IAAa,gBAAb,MAA0B;CAA1B,cAAA;EAES,KAAA,QAAQ,QAAQ;EAGhB,KAAA,OAAO,QAAQ;EAGf,KAAA,QAAQ,QAAQ;EAGhB,KAAA,OAAO,QAAQ;EAGf,KAAA,MAAM,QAAQ;CAsCvB;CAnCS,SAAS,MAAY;EAC1B,KAAK,MAAM,kCAAkC;EAC7C,KAAK,IAAI,oBAAoB,MAAM;CACrC;CAGO,MAAM,MAAc,YAAgB;EACzC,KAAK,MAAM,+BAA+B;EAC1C,KAAK,IAAI,UAAU,IAAI;EACvB,IAAI,YACF,KAAK,IAAI,eAAe,UAAU;CAEtC;CAGO,gBAAa;EAClB,KAAK,MAAM,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AAW,GACrB,UAAU,CAAC,IAAI,cAAa,CAAE;CAEhC,OAAO,yBAAyB,CAC9B,eACA;EACE,SAAS;EACT,UAAU;EACV,OAAO;CACR,CACF,CAAA;AACH;ACnBA,MAAa,aAAqC;CAChD,gBAAe,CAAE;CACjB,aAAY,CAAE;CACd,qBAAqB;CACrB,qBAAoB,CAAE;CACtB,uBAAsB,CAAE;CACxB,OAAO,QAAQ;CACf,MAAM,QAAQ;CACd,OAAO,QAAQ;CACf,MAAM,QAAQ;CACd,KAAK,QAAQ;CACb,0BAAoD,YAAoD;AAChG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/logger",
3
- "version": "15.3.0-prerelease.15",
3
+ "version": "15.3.0-prerelease.17",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,8 +16,8 @@
16
16
  "@angular/platform-browser-dynamic": "^22.0.0",
17
17
  "@fullstory/browser": "^2.0.0",
18
18
  "@ngrx/store": "^22.0.0",
19
- "@o3r/core": "~15.3.0-prerelease.15",
20
- "@o3r/schematics": "~15.3.0-prerelease.15",
19
+ "@o3r/core": "~15.3.0-prerelease.17",
20
+ "@o3r/schematics": "~15.3.0-prerelease.17",
21
21
  "@schematics/angular": "^22.0.0",
22
22
  "logrocket": "^11.0.0",
23
23
  "logrocket-ngrx": "^0.2.1",
@@ -55,7 +55,7 @@
55
55
  }
56
56
  },
57
57
  "dependencies": {
58
- "@o3r/schematics": "~15.3.0-prerelease.15",
58
+ "@o3r/schematics": "~15.3.0-prerelease.17",
59
59
  "tslib": "^2.6.2"
60
60
  },
61
61
  "engines": {
@@ -1,54 +1,51 @@
1
- import { MetaReducer, Action } from '@ngrx/store';
2
- import { LoggerClient } from '@o3r/logger';
3
-
1
+ import { Action, MetaReducer } from "@ngrx/store";
2
+ import { LoggerClient } from "@o3r/logger";
4
3
  /**
5
4
  * FullStory client.
6
5
  */
7
- declare class FullStoryClient implements LoggerClient {
8
- /**
9
- * Constructor.
10
- * @param orgId FullStory organization ID
11
- */
12
- constructor(orgId: string);
13
- /**
14
- * @inheritdoc
15
- */
16
- identify(uid: string, vars?: {
17
- [key: string]: string;
18
- }): void;
19
- /**
20
- * @inheritdoc
21
- */
22
- event(name: string, properties?: any): void;
23
- /**
24
- * @inheritdoc
25
- */
26
- error(message?: any, ...optionalParams: any[]): void;
27
- /**
28
- * @inheritdoc
29
- */
30
- warn(message?: any, ...optionalParams: any[]): void;
31
- /**
32
- * @inheritdoc
33
- */
34
- log(message?: any, ...optionalParams: any[]): void;
35
- /**
36
- * @inheritdoc
37
- */
38
- getSessionURL(): string | undefined;
39
- /**
40
- * @inheritdoc
41
- */
42
- stopRecording(): void;
43
- /**
44
- * @inheritdoc
45
- */
46
- resumeRecording(): void;
47
- /**
48
- * @inheritdoc
49
- */
50
- createMetaReducer(): MetaReducer<any, Action>;
6
+ export declare class FullStoryClient implements LoggerClient {
7
+ /**
8
+ * Constructor.
9
+ * @param orgId FullStory organization ID
10
+ */
11
+ constructor(orgId: string);
12
+ /**
13
+ * @inheritdoc
14
+ */
15
+ identify(uid: string, vars?: {
16
+ [key: string]: string;
17
+ }): void;
18
+ /**
19
+ * @inheritdoc
20
+ */
21
+ event(name: string, properties?: any): void;
22
+ /**
23
+ * @inheritdoc
24
+ */
25
+ error(message?: any, ...optionalParams: any[]): void;
26
+ /**
27
+ * @inheritdoc
28
+ */
29
+ warn(message?: any, ...optionalParams: any[]): void;
30
+ /**
31
+ * @inheritdoc
32
+ */
33
+ log(message?: any, ...optionalParams: any[]): void;
34
+ /**
35
+ * @inheritdoc
36
+ */
37
+ getSessionURL(): string | undefined;
38
+ /**
39
+ * @inheritdoc
40
+ */
41
+ stopRecording(): void;
42
+ /**
43
+ * @inheritdoc
44
+ */
45
+ resumeRecording(): void;
46
+ /**
47
+ * @inheritdoc
48
+ */
49
+ createMetaReducer(): MetaReducer<any, Action>;
51
50
  }
52
-
53
- export { FullStoryClient };
54
- //# sourceMappingURL=o3r-logger-services-fullstory-logger-client.d.ts.map
51
+ //# sourceMappingURL=o3r-logger-services-fullstory-logger-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-logger-services-fullstory-logger-client.d.ts","sources":["../../src/services/fullstory-logger-client/fullstory-logger-client.ts"],"mappings":";;;AAaA;;AAEG;AACH,cAAa,eAAgB,YAAW,YAAY;AAClD;;;AAGG;AACS;AAIZ;;AAEG;AACI;AAA+B;AAAuB;AAQ7D;;AAEG;;AAKH;;AAEG;AACI;AAIP;;AAEG;AACI;AAIP;;AAEG;AACI;AAIP;;AAEG;;AAKH;;AAEG;AACI;AAIP;;AAEG;AACI;AAIP;;AAEG;AACI,yBAAqB,WAAW,MAAM,MAAM;AAgBpD;;","names":[]}
1
+ {"version":3,"file":"o3r-logger-services-fullstory-logger-client.d.ts","names":[],"sources":["../../src/services/fullstory-logger-client/fullstory-logger-client.ts"],"mappings":";;;;;qBAgBa,2BAA2B;;;;;EAK1B,YAAA;;;;EAOL,SAAS,aAAa;KAAU;;;;;EAWhC,MAAM,cAAc;;;;EAOpB,MAAM,kBAAkB;;;;EAOxB,KAAK,kBAAkB;;;;EAOvB,IAAI,kBAAkB;;;;EAOtB;;;;EAOA;;;;EAOA;;;;EAOA,qBAAqB,iBAAiB"}