@o3r/logger 13.0.0-next.3 → 13.0.0-next.31

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.
Files changed (47) hide show
  1. package/fesm2022/o3r-logger-services-fullstory-logger-client.mjs.map +1 -1
  2. package/fesm2022/o3r-logger-services-logrocket-logger-client.mjs.map +1 -1
  3. package/fesm2022/o3r-logger-services-smartlook-logger-client.mjs.map +1 -1
  4. package/fesm2022/o3r-logger.mjs +11 -15
  5. package/fesm2022/o3r-logger.mjs.map +1 -1
  6. package/index.d.ts +212 -4
  7. package/index.d.ts.map +1 -0
  8. package/package.json +11 -11
  9. package/schematics/ng-add/schema.json +2 -1
  10. package/services/fullstory-logger-client/index.d.ts +52 -4
  11. package/services/fullstory-logger-client/index.d.ts.map +1 -0
  12. package/services/logrocket-logger-client/index.d.ts +59 -4
  13. package/services/logrocket-logger-client/index.d.ts.map +1 -0
  14. package/services/smartlook-logger-client/index.d.ts +52 -4
  15. package/services/smartlook-logger-client/index.d.ts.map +1 -0
  16. package/o3r-logger.d.ts.map +0 -1
  17. package/public_api.d.ts +0 -3
  18. package/public_api.d.ts.map +0 -1
  19. package/services/fullstory-logger-client/fullstory-logger-client.d.ts +0 -51
  20. package/services/fullstory-logger-client/fullstory-logger-client.d.ts.map +0 -1
  21. package/services/fullstory-logger-client/o3r-logger-services-fullstory-logger-client.d.ts.map +0 -1
  22. package/services/fullstory-logger-client/public_api.d.ts +0 -2
  23. package/services/fullstory-logger-client/public_api.d.ts.map +0 -1
  24. package/services/logger/index.d.ts +0 -7
  25. package/services/logger/index.d.ts.map +0 -1
  26. package/services/logger/logger.client.d.ts +0 -68
  27. package/services/logger/logger.client.d.ts.map +0 -1
  28. package/services/logger/logger.console.d.ts +0 -31
  29. package/services/logger/logger.console.d.ts.map +0 -1
  30. package/services/logger/logger.module.d.ts +0 -25
  31. package/services/logger/logger.module.d.ts.map +0 -1
  32. package/services/logger/logger.noop.d.ts +0 -7
  33. package/services/logger/logger.noop.d.ts.map +0 -1
  34. package/services/logger/logger.service.d.ts +0 -84
  35. package/services/logger/logger.service.d.ts.map +0 -1
  36. package/services/logger/logger.token.d.ts +0 -4
  37. package/services/logger/logger.token.d.ts.map +0 -1
  38. package/services/logrocket-logger-client/logrocket-logger-client.d.ts +0 -58
  39. package/services/logrocket-logger-client/logrocket-logger-client.d.ts.map +0 -1
  40. package/services/logrocket-logger-client/o3r-logger-services-logrocket-logger-client.d.ts.map +0 -1
  41. package/services/logrocket-logger-client/public_api.d.ts +0 -2
  42. package/services/logrocket-logger-client/public_api.d.ts.map +0 -1
  43. package/services/smartlook-logger-client/o3r-logger-services-smartlook-logger-client.d.ts.map +0 -1
  44. package/services/smartlook-logger-client/public_api.d.ts +0 -2
  45. package/services/smartlook-logger-client/public_api.d.ts.map +0 -1
  46. package/services/smartlook-logger-client/smartlook-logger-client.d.ts +0 -51
  47. package/services/smartlook-logger-client/smartlook-logger-client.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-logger-services-fullstory-logger-client.mjs","sources":["../../src/services/fullstory-logger-client/fullstory-logger-client.ts","../../src/services/fullstory-logger-client/o3r-logger-services-fullstory-logger-client.ts"],"sourcesContent":["import {\n FullStory as fullStory,\n init,\n} from '@fullstory/browser';\nimport {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n LoggerClient,\n} from '@o3r/logger';\n\n/**\n * FullStory client.\n */\nexport class FullStoryClient implements LoggerClient {\n /**\n * Constructor.\n * @param orgId FullStory organization ID\n */\n constructor(orgId: string) {\n init({ orgId });\n }\n\n /**\n * @inheritdoc\n */\n public identify(uid: string, vars?: { [key: string]: string }): void {\n if (vars && vars.name) {\n fullStory('setIdentity', { uid, properties: { ...vars, displayName: vars.name } });\n } else {\n fullStory('setIdentity', { uid, properties: vars });\n }\n }\n\n /**\n * @inheritdoc\n */\n public event(name: string, properties?: any): void {\n fullStory('trackEvent', { name, properties });\n }\n\n /**\n * @inheritdoc\n */\n public error(message?: any, ...optionalParams: any[]): void {\n fullStory('log', { level: 'error', msg: `${message.toString() as string}\\n${optionalParams.toString()}` });\n }\n\n /**\n * @inheritdoc\n */\n public warn(message?: any, ...optionalParams: any[]): void {\n fullStory('log', { level: 'warn', msg: `${message.toString() as string}\\n${optionalParams.toString()}` });\n }\n\n /**\n * @inheritdoc\n */\n public log(message?: any, ...optionalParams: any[]): void {\n fullStory('log', { level: 'log', msg: `${message.toString() as string}\\n${optionalParams.toString()}` });\n }\n\n /**\n * @inheritdoc\n */\n public getSessionURL(): string | undefined {\n return fullStory('getSession') || undefined;\n }\n\n /**\n * @inheritdoc\n */\n public stopRecording(): void {\n fullStory('shutdown');\n }\n\n /**\n * @inheritdoc\n */\n public resumeRecording(): void {\n fullStory('restart');\n }\n\n /**\n * @inheritdoc\n */\n public createMetaReducer(): MetaReducer<any, Action> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment -- TODO check later if we can move to arrow function without regression\n const client: FullStoryClient = this;\n // eslint-disable-next-line prefer-arrow/prefer-arrow-functions -- TODO check later if we can move to arrow function without regression\n return function debug(reducer: ActionReducer<any>): ActionReducer<any> {\n return (state, action) => {\n // Filter @ngrx actions\n if (!action.type.startsWith('@ngrx/')) {\n client.event('state', state);\n client.event('action', action);\n }\n\n return reducer(state, action);\n };\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["fullStory"],"mappings":";;AAaA;;AAEG;MACU,eAAe,CAAA;AAC1B;;;AAGG;AACH,IAAA,WAAA,CAAY,KAAa,EAAA;AACvB,QAAA,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;;AAGjB;;AAEG;IACI,QAAQ,CAAC,GAAW,EAAE,IAAgC,EAAA;AAC3D,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;YACrBA,SAAS,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,E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AAS,CAAC;;AAGtB;;AAEG;IACI,iBAAiB,GAAA;;QAEtB,MAAM,MAAM,GAAoB,IAAI;;QAEpC,OAAO,SAAS,KAAK,CAAC,OAA2B,EAAA;AAC/C,YAAA,OAAO,CAAC,KAAK,EAAE,MAAM,KAAI;;gBAEvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AACrC,oBAAA,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AAC5B,oBAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;;AAGhC,gBAAA,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;AAC/B,aAAC;AACH,SAAC;;AAEJ;;ACxGD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-logger-services-fullstory-logger-client.mjs","sources":["../../src/services/fullstory-logger-client/fullstory-logger-client.ts","../../src/services/fullstory-logger-client/o3r-logger-services-fullstory-logger-client.ts"],"sourcesContent":["import {\n FullStory as fullStory,\n init,\n} from '@fullstory/browser';\nimport {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport type {\n LoggerClient,\n} from '@o3r/logger';\n\n/**\n * FullStory client.\n */\nexport class FullStoryClient implements LoggerClient {\n /**\n * Constructor.\n * @param orgId FullStory organization ID\n */\n constructor(orgId: string) {\n init({ orgId });\n }\n\n /**\n * @inheritdoc\n */\n public identify(uid: string, vars?: { [key: string]: string }): void {\n if (vars && vars.name) {\n fullStory('setIdentity', { uid, properties: { ...vars, displayName: vars.name } });\n } else {\n fullStory('setIdentity', { uid, properties: vars });\n }\n }\n\n /**\n * @inheritdoc\n */\n public event(name: string, properties?: any): void {\n fullStory('trackEvent', { name, properties });\n }\n\n /**\n * @inheritdoc\n */\n public error(message?: any, ...optionalParams: any[]): void {\n fullStory('log', { level: 'error', msg: `${message.toString() as string}\\n${optionalParams.toString()}` });\n }\n\n /**\n * @inheritdoc\n */\n public warn(message?: any, ...optionalParams: any[]): void {\n fullStory('log', { level: 'warn', msg: `${message.toString() as string}\\n${optionalParams.toString()}` });\n }\n\n /**\n * @inheritdoc\n */\n public log(message?: any, ...optionalParams: any[]): void {\n fullStory('log', { level: 'log', msg: `${message.toString() as string}\\n${optionalParams.toString()}` });\n }\n\n /**\n * @inheritdoc\n */\n public getSessionURL(): string | undefined {\n return fullStory('getSession') || undefined;\n }\n\n /**\n * @inheritdoc\n */\n public stopRecording(): void {\n fullStory('shutdown');\n }\n\n /**\n * @inheritdoc\n */\n public resumeRecording(): void {\n fullStory('restart');\n }\n\n /**\n * @inheritdoc\n */\n public createMetaReducer(): MetaReducer<any, Action> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment -- TODO check later if we can move to arrow function without regression\n const client: FullStoryClient = this;\n // eslint-disable-next-line prefer-arrow/prefer-arrow-functions -- TODO check later if we can move to arrow function without regression\n return function debug(reducer: ActionReducer<any>): ActionReducer<any> {\n return (state, action) => {\n // Filter @ngrx actions\n if (!action.type.startsWith('@ngrx/')) {\n client.event('state', state);\n client.event('action', action);\n }\n\n return reducer(state, action);\n };\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["fullStory"],"mappings":";;AAaA;;AAEG;MACU,eAAe,CAAA;AAC1B;;;AAGG;AACH,IAAA,WAAA,CAAY,KAAa,EAAA;AACvB,QAAA,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB;AAEA;;AAEG;IACI,QAAQ,CAAC,GAAW,EAAE,IAAgC,EAAA;AAC3D,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;YACrBA,SAAS,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,GAAG,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QACpF;aAAO;YACLA,SAAS,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE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OAAO,SAAS,KAAK,CAAC,OAA2B,EAAA;AAC/C,YAAA,OAAO,CAAC,KAAK,EAAE,MAAM,KAAI;;gBAEvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AACrC,oBAAA,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AAC5B,oBAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAChC;AAEA,gBAAA,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;AAC/B,YAAA,CAAC;AACH,QAAA,CAAC;IACH;AACD;;ACxGD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-logger-services-logrocket-logger-client.mjs","sources":["../../src/services/logrocket-logger-client/logrocket-logger-client.ts","../../src/services/logrocket-logger-client/o3r-logger-services-logrocket-logger-client.ts"],"sourcesContent":["import {\n Action,\n MetaReducer,\n} from '@ngrx/store';\nimport * as LogRocket from 'logrocket';\nimport createNgrxMiddleware, {\n Options,\n} from 'logrocket-ngrx';\nimport type {\n LoggerClient,\n} from '@o3r/logger';\n\n/**\n * LogRocket client.\n */\nexport class LogRocketClient implements LoggerClient {\n /**\n * Meta reducer configuration to change what store related items LogRocket records\n */\n private readonly metaReducerOptions?: Options;\n\n /**\n * Constructor.\n * @param appId LogROcket application ID\n * @param initOptions Optional configuration to change what LogRocket records\n * @param metaReducerOptions Optional meta reducer configuration to change what store related items LogRocket records\n */\n constructor(appId: string, initOptions?: any, metaReducerOptions?: Options) {\n const defaultOptions = {\n network: {\n requestSanitizer: (request: Request) => {\n // if the url contains '/purchase/orders'\n if (request.url.toLowerCase().includes('/purchase/orders')) {\n // scrub out the body\n return { ...request, body: '' };\n }\n return request;\n }\n }\n };\n\n LogRocket.init(appId, { ...defaultOptions, ...initOptions });\n this.metaReducerOptions = metaReducerOptions;\n }\n\n /**\n * @inheritdoc\n */\n public identify(uid: string, vars?: { [key: string]: string }): void {\n LogRocket.identify(uid, vars);\n }\n\n /**\n * @inheritdoc\n */\n public event(name: string, properties?: any): void {\n const trackEvent = properties ? `${name}: ${properties as string}` : name;\n LogRocket.track(trackEvent);\n }\n\n /**\n * @inheritdoc\n */\n public error(message?: any, ...optionalParams: any[]): void {\n LogRocket.error(message, optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public warn(message?: any, ...optionalParams: any[]): void {\n LogRocket.warn(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public log(message?: any, ...optionalParams: any[]): void {\n LogRocket.log(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public getSessionURL(): string | undefined {\n return LogRocket.sessionURL || undefined;\n }\n\n /**\n * @inheritdoc\n */\n public stopRecording(): void {\n // eslint-disable-next-line no-console -- we don't want to log this Error on LogRocket as it's when LogRocket is wrongly used\n console.error('Impossible to stop recording with LogRocket');\n }\n\n /**\n * @inheritdoc\n */\n public resumeRecording(): void {\n // eslint-disable-next-line no-console -- we don't want to log this Error on LogRocket as it's when LogRocket is wrongly used\n console.error('Impossible to restart recording with LogRocket.');\n }\n\n /**\n * @inheritdoc\n */\n public createMetaReducer(): MetaReducer<any, Action> {\n const defaultOptions = {\n actionSanitizer: (action: Action) => {\n // Filter @ngrx actions\n if (action.type.startsWith('@ngrx/')) {\n return null;\n }\n return action;\n }\n };\n return createNgrxMiddleware(LogRocket, { ...defaultOptions, ...this.metaReducerOptions });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAYA;;AAEG;MACU,eAAe,CAAA;AAM1B;;;;;AAKG;AACH,IAAA,WAAA,CAAY,KAAa,EAAE,WAAiB,EAAE,kBAA4B,EAAA;AACxE,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,OAAO,EAAE;AACP,gBAAA,gBAAgB,EAAE,CAAC,OAAgB,KAAI;;AAErC,oBAAA,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAA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O,CAAC,KAAK,CAAC,iDAAiD,CAAC;;AAGlE;;AAEG;IACI,iBAAiB,GAAA;AACtB,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,eAAe,EAAE,CAAC,MAAc,KAAI;;gBAElC,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AACpC,oBAAA,OAAO,IAAI;;AAEb,gBAAA,OAAO,MAAM;;SAEhB;AACD,QAAA,OAAO,oBAAoB,CAAC,SAAS,EAAE,EAAE,GAAG,cAAc,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;;AAE5F;;ACvHD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-logger-services-logrocket-logger-client.mjs","sources":["../../src/services/logrocket-logger-client/logrocket-logger-client.ts","../../src/services/logrocket-logger-client/o3r-logger-services-logrocket-logger-client.ts"],"sourcesContent":["import {\n Action,\n MetaReducer,\n} from '@ngrx/store';\nimport * as LogRocket from 'logrocket';\nimport createNgrxMiddleware, {\n Options,\n} from 'logrocket-ngrx';\nimport type {\n LoggerClient,\n} from '@o3r/logger';\n\n/**\n * LogRocket client.\n */\nexport class LogRocketClient implements LoggerClient {\n /**\n * Meta reducer configuration to change what store related items LogRocket records\n */\n private readonly metaReducerOptions?: Options;\n\n /**\n * Constructor.\n * @param appId LogROcket application ID\n * @param initOptions Optional configuration to change what LogRocket records\n * @param metaReducerOptions Optional meta reducer configuration to change what store related items LogRocket records\n */\n constructor(appId: string, initOptions?: any, metaReducerOptions?: Options) {\n const defaultOptions = {\n network: {\n requestSanitizer: (request: Request) => {\n // if the url contains '/purchase/orders'\n if (request.url.toLowerCase().includes('/purchase/orders')) {\n // scrub out the body\n return { ...request, body: '' };\n }\n return request;\n }\n }\n };\n\n LogRocket.init(appId, { ...defaultOptions, ...initOptions });\n this.metaReducerOptions = metaReducerOptions;\n }\n\n /**\n * @inheritdoc\n */\n public identify(uid: string, vars?: { [key: string]: string }): void {\n LogRocket.identify(uid, vars);\n }\n\n /**\n * @inheritdoc\n */\n public event(name: string, properties?: any): void {\n const trackEvent = properties ? `${name}: ${properties as string}` : name;\n LogRocket.track(trackEvent);\n }\n\n /**\n * @inheritdoc\n */\n public error(message?: any, ...optionalParams: any[]): void {\n LogRocket.error(message, optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public warn(message?: any, ...optionalParams: any[]): void {\n LogRocket.warn(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public log(message?: any, ...optionalParams: any[]): void {\n LogRocket.log(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public getSessionURL(): string | undefined {\n return LogRocket.sessionURL || undefined;\n }\n\n /**\n * @inheritdoc\n */\n public stopRecording(): void {\n // eslint-disable-next-line no-console -- we don't want to log this Error on LogRocket as it's when LogRocket is wrongly used\n console.error('Impossible to stop recording with LogRocket');\n }\n\n /**\n * @inheritdoc\n */\n public resumeRecording(): void {\n // eslint-disable-next-line no-console -- we don't want to log this Error on LogRocket as it's when LogRocket is wrongly used\n console.error('Impossible to restart recording with LogRocket.');\n }\n\n /**\n * @inheritdoc\n */\n public createMetaReducer(): MetaReducer<any, Action> {\n const defaultOptions = {\n actionSanitizer: (action: Action) => {\n // Filter @ngrx actions\n if (action.type.startsWith('@ngrx/')) {\n return null;\n }\n return action;\n }\n };\n return createNgrxMiddleware(LogRocket, { ...defaultOptions, ...this.metaReducerOptions });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAYA;;AAEG;MACU,eAAe,CAAA;AAM1B;;;;;AAKG;AACH,IAAA,WAAA,CAAY,KAAa,EAAE,WAAiB,EAAE,kBAA4B,EAAA;AACxE,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,OAAO,EAAE;AACP,gBAAA,gBAAgB,EAAE,CAAC,OAAgB,KAAI;;AAErC,oBAAA,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,kB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AA;;AAEpB,QAAA,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC;IAClE;AAEA;;AAEG;IACI,iBAAiB,GAAA;AACtB,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,eAAe,EAAE,CAAC,MAAc,KAAI;;gBAElC,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AACpC,oBAAA,OAAO,IAAI;gBACb;AACA,gBAAA,OAAO,MAAM;YACf;SACD;AACD,QAAA,OAAO,oBAAoB,CAAC,SAAS,EAAE,EAAE,GAAG,cAAc,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3F;AACD;;ACvHD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-logger-services-smartlook-logger-client.mjs","sources":["../../src/services/smartlook-logger-client/smartlook-logger-client.ts","../../src/services/smartlook-logger-client/o3r-logger-services-smartlook-logger-client.ts"],"sourcesContent":["import {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport SmartLook from 'smartlook-client';\nimport type {\n LoggerClient,\n} from '@o3r/logger';\n\n/**\n * SmartLook client.\n */\nexport class SmartLookClient implements LoggerClient {\n /**\n * Constructor.\n * @param key SmartLook key\n */\n constructor(key: string) {\n SmartLook.init(key);\n }\n\n /**\n * @inheritdoc\n */\n public identify(uid: string, vars: { [key: string]: string } = {}): void {\n SmartLook.identify(uid, vars);\n }\n\n /**\n * @inheritdoc\n */\n public event(name: string, properties?: any): void {\n SmartLook.track(name, properties);\n }\n\n /**\n * @inheritdoc\n */\n public error(message?: any, ...optionalParams: any[]): void {\n // eslint-disable-next-line no-console -- done on purpose\n console.error(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public warn(message?: any, ...optionalParams: any[]): void {\n // eslint-disable-next-line no-console -- done on purpose\n console.warn(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public log(message?: any, ...optionalParams: any[]): void {\n // eslint-disable-next-line no-console -- done on purpose\n console.log(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public getSessionURL(): undefined {\n this.error('Session URL not implemented in SmartLook client');\n\n return undefined;\n }\n\n /**\n * @inheritdoc\n */\n public stopRecording(): void {\n SmartLook.pause();\n }\n\n /**\n * @inheritdoc\n */\n public resumeRecording(): void {\n SmartLook.resume();\n }\n\n /**\n * @inheritdoc\n */\n public createMetaReducer(): MetaReducer<any, Action> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment -- TODO check later if we can move to arrow function without regression\n const client: SmartLookClient = this;\n // eslint-disable-next-line prefer-arrow/prefer-arrow-functions -- TODO check later if we can move to arrow function without regression\n return function debug(reducer: ActionReducer<any>): ActionReducer<any> {\n return (state, action) => {\n // Filter @ngrx actions\n if (!action.type.startsWith('@ngrx/')) {\n client.log('State', state);\n client.log('Action', action);\n }\n\n return reducer(state, action);\n };\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;AAUA;;AAEG;MACU,eAAe,CAAA;AAC1B;;;AAGG;AACH,IAAA,WAAA,CAAY,GAAW,EAAA;AACrB,QAAA,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;;AAGrB;;AAEG;AACI,IAAA,QAAQ,CAAC,GAAW,EAAE,IAAA,GAAkC,EAAE,EAAA;AAC/D,QAAA,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;;AAG/B;;AAEG;IACI,KAAK,CAAC,IAAY,EAAE,UAAgB,EAAA;AACzC,QAAA,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC;;AAGnC;;AAEG;AACI,IAAA,KAAK,CAAC,OAAa,EAAE,GAAG,cAAqB,EAAA;;QAElD,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC;;AAG3C;;AAEG;AACI,IAAA,IAAI,CAAC,OAAa,EAAE,GAAG,cAAqB,EAAA;;QAEjD,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC;;AAG1C;;AAEG;AACI,IAAA,GAAG,CAAC,OAAa,EAAE,GAAG,cAAqB,EAAA;;QAEhD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC;;AAGzC;;AAEG;IACI,aAAa,GAAA;AAClB,QAAA,IAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC;AAE7D,QAAA,OAAO,SAAS;;AAGlB;;AAEG;IACI,aAAa,GAAA;QAClB,SAAS,CAAC,KAAK,EAAE;;AAGnB;;AAEG;IACI,eAAe,GAAA;QACpB,SAAS,CAAC,MAAM,EAAE;;AAGpB;;AAEG;IACI,iBAAiB,GAAA;;QAEtB,MAAM,MAAM,GAAoB,IAAI;;QAEpC,OAAO,SAAS,KAAK,CAAC,OAA2B,EAAA;AAC/C,YAAA,OAAO,CAAC,KAAK,EAAE,MAAM,KAAI;;gBAEvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AACrC,oBAAA,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC;AAC1B,oBAAA,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;;AAG9B,gBAAA,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;AAC/B,aAAC;AACH,SAAC;;AAEJ;;ACtGD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-logger-services-smartlook-logger-client.mjs","sources":["../../src/services/smartlook-logger-client/smartlook-logger-client.ts","../../src/services/smartlook-logger-client/o3r-logger-services-smartlook-logger-client.ts"],"sourcesContent":["import {\n Action,\n ActionReducer,\n MetaReducer,\n} from '@ngrx/store';\nimport SmartLook from 'smartlook-client';\nimport type {\n LoggerClient,\n} from '@o3r/logger';\n\n/**\n * SmartLook client.\n */\nexport class SmartLookClient implements LoggerClient {\n /**\n * Constructor.\n * @param key SmartLook key\n */\n constructor(key: string) {\n SmartLook.init(key);\n }\n\n /**\n * @inheritdoc\n */\n public identify(uid: string, vars: { [key: string]: string } = {}): void {\n SmartLook.identify(uid, vars);\n }\n\n /**\n * @inheritdoc\n */\n public event(name: string, properties?: any): void {\n SmartLook.track(name, properties);\n }\n\n /**\n * @inheritdoc\n */\n public error(message?: any, ...optionalParams: any[]): void {\n // eslint-disable-next-line no-console -- done on purpose\n console.error(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public warn(message?: any, ...optionalParams: any[]): void {\n // eslint-disable-next-line no-console -- done on purpose\n console.warn(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public log(message?: any, ...optionalParams: any[]): void {\n // eslint-disable-next-line no-console -- done on purpose\n console.log(message, ...optionalParams);\n }\n\n /**\n * @inheritdoc\n */\n public getSessionURL(): undefined {\n this.error('Session URL not implemented in SmartLook client');\n\n return undefined;\n }\n\n /**\n * @inheritdoc\n */\n public stopRecording(): void {\n SmartLook.pause();\n }\n\n /**\n * @inheritdoc\n */\n public resumeRecording(): void {\n SmartLook.resume();\n }\n\n /**\n * @inheritdoc\n */\n public createMetaReducer(): MetaReducer<any, Action> {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment -- TODO check later if we can move to arrow function without regression\n const client: SmartLookClient = this;\n // eslint-disable-next-line prefer-arrow/prefer-arrow-functions -- TODO check later if we can move to arrow function without regression\n return function debug(reducer: ActionReducer<any>): ActionReducer<any> {\n return (state, action) => {\n // Filter @ngrx actions\n if (!action.type.startsWith('@ngrx/')) {\n client.log('State', state);\n client.log('Action', action);\n }\n\n return reducer(state, action);\n };\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;AAUA;;AAEG;MACU,eAAe,CAAA;AAC1B;;;AAGG;AACH,IAAA,WAAA,CAAY,GAAW,EAAA;AACrB,QAAA,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;IAC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AAA,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAC9B;AAEA,gBAAA,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;AAC/B,YAAA,CAAC;AACH,QAAA,CAAC;IACH;AACD;;ACtGD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Optional, Inject, Injectable, NgModule, makeEnvironmentProviders } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, NgModule, makeEnvironmentProviders } from '@angular/core';
3
3
 
4
4
  /**
5
5
  * Console logger used to display the logs in the browser console
@@ -57,11 +57,12 @@ const LOGGER_CLIENT_TOKEN = new InjectionToken('Logger Client injection token');
57
57
  * Logger service
58
58
  */
59
59
  class LoggerService {
60
- constructor(clients) {
60
+ constructor() {
61
61
  /**
62
62
  * Record the recording status to make sure that new clients recording status will be consistent with the service
63
63
  */
64
64
  this.recordingState = 'default';
65
+ const clients = inject(LOGGER_CLIENT_TOKEN, { optional: true });
65
66
  this.clients = clients ? (Array.isArray(clients) ? clients : [clients]) : [new ConsoleLogger()];
66
67
  }
67
68
  /**
@@ -169,20 +170,15 @@ class LoggerService {
169
170
  .filter((metaReducer) => !!metaReducer);
170
171
  return metaReducers.length <= 1 ? metaReducers[0] : metaReducers;
171
172
  }
172
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: LoggerService, deps: [{ token: LOGGER_CLIENT_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
173
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
173
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LoggerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
174
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
174
175
  }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: LoggerService, decorators: [{
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LoggerService, decorators: [{
176
177
  type: Injectable,
177
178
  args: [{
178
179
  providedIn: 'root'
179
180
  }]
180
- }], ctorParameters: () => [{ type: undefined, decorators: [{
181
- type: Optional
182
- }, {
183
- type: Inject,
184
- args: [LOGGER_CLIENT_TOKEN]
185
- }] }] });
181
+ }], ctorParameters: () => [] });
186
182
 
187
183
  /**
188
184
  * @deprecated will be removed in v14.
@@ -209,13 +205,13 @@ class LoggerModule {
209
205
  ]
210
206
  };
211
207
  }
212
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: LoggerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
213
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: LoggerModule }); }
214
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: LoggerModule, providers: [
208
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LoggerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
209
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: LoggerModule }); }
210
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LoggerModule, providers: [
215
211
  LoggerService
216
212
  ] }); }
217
213
  }
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: LoggerModule, decorators: [{
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: LoggerModule, decorators: [{
219
215
  type: NgModule,
220
216
  args: [{
221
217
  providers: [
@@ -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 Optional,\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(@Optional() @Inject(LOGGER_CLIENT_TOKEN) clients?: LoggerClient | LoggerClient[]) {\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 ModuleWithProviders,\n NgModule,\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 * @deprecated will be removed in v14.\n */\n@NgModule({\n providers: [\n LoggerService\n ]\n})\nexport class LoggerModule {\n /**\n * Provide logger at application level\n * By default {@link ConsoleLogger} will be used if nothing is specified\n * @param {...any} clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}\n * @deprecated Please use {@link provideLogger} instead, will be removed in v14.\n */\n public static forRoot(...clients: LoggerClient[]): ModuleWithProviders<LoggerModule> {\n if (clients.length === 0) {\n clients = [new ConsoleLogger()];\n }\n return {\n ngModule: LoggerModule,\n providers: [\n {\n provide: LOGGER_CLIENT_TOKEN,\n useValue: clients,\n multi: false\n }\n ]\n };\n }\n}\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,IA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AA,aAAa,EAAE,MAAK,GAAG;AACvB,IAAA,eAAe,EAAE,MAAK,GAAG;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","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 ModuleWithProviders,\n NgModule,\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 * @deprecated will be removed in v14.\n */\n@NgModule({\n providers: [\n LoggerService\n ]\n})\nexport class LoggerModule {\n /**\n * Provide logger at application level\n * By default {@link ConsoleLogger} will be used if nothing is specified\n * @param {...any} clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}\n * @deprecated Please use {@link provideLogger} instead, will be removed in v14.\n */\n public static forRoot(...clients: LoggerClient[]): ModuleWithProviders<LoggerModule> {\n if (clients.length === 0) {\n clients = [new ConsoleLogger()];\n }\n return {\n ngModule: LoggerModule,\n providers: [\n {\n provide: LOGGER_CLIENT_TOKEN,\n useValue: clients,\n multi: false\n }\n ]\n };\n }\n}\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,CA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AAa,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;;;;"}
package/index.d.ts CHANGED
@@ -1,6 +1,214 @@
1
+ import { MetaReducer, Action } from '@ngrx/store';
2
+ import { Logger } from '@o3r/core';
3
+ export { Logger } from '@o3r/core';
4
+ import * as i0 from '@angular/core';
5
+ import { ModuleWithProviders, InjectionToken } from '@angular/core';
6
+
1
7
  /**
2
- * Generated bundle index. Do not edit.
8
+ * Third party client interface.
3
9
  */
4
- /// <amd-module name="@o3r/logger" />
5
- export * from './public_api';
6
- //# sourceMappingURL=o3r-logger.d.ts.map
10
+ interface LoggerClient extends Logger {
11
+ /**
12
+ * Identify a user.
13
+ * @param uid Unique identifier for the current user
14
+ * @param vars Addition information about the user
15
+ */
16
+ identify(uid: string, vars?: {
17
+ [key: string]: string;
18
+ }): void;
19
+ /**
20
+ * Log custom event.
21
+ * @param name Name of the event to log
22
+ * @param properties Additional properties
23
+ */
24
+ event(name: string, properties?: any): void;
25
+ /**
26
+ * Generate a link to the replay of the current session.
27
+ */
28
+ getSessionURL(): string | undefined;
29
+ /**
30
+ * Stop recording.
31
+ */
32
+ stopRecording(): void;
33
+ /**
34
+ * Resume recording.
35
+ */
36
+ resumeRecording(): void;
37
+ /**
38
+ * Log an error.
39
+ * @param message Message to log
40
+ * @param optionalParams Optional parameters to log
41
+ */
42
+ error(message?: any, ...optionalParams: any[]): void;
43
+ /**
44
+ * Log a warning.
45
+ * @param message Message to log
46
+ * @param optionalParams Optional parameters to log
47
+ */
48
+ warn(message?: any, ...optionalParams: any[]): void;
49
+ /**
50
+ * Log a message.
51
+ * @param message Message to log
52
+ * @param optionalParams Optional parameters to log
53
+ */
54
+ info?(message?: any, ...optionalParams: any[]): void;
55
+ /**
56
+ * Log a message.
57
+ * @param message Message to log
58
+ * @param optionalParams Optional parameters to log
59
+ */
60
+ log(message?: any, ...optionalParams: any[]): void;
61
+ /**
62
+ * Log a debug message.
63
+ * @param message Message to log
64
+ * @param optionalParams Optional parameters to log
65
+ */
66
+ debug?(message?: any, ...optionalParams: any[]): void;
67
+ /**
68
+ * Create a meta reducer to log ngrx store.
69
+ */
70
+ createMetaReducer(): MetaReducer<any, Action>;
71
+ }
72
+
73
+ /**
74
+ * Console logger used to display the logs in the browser console
75
+ * Should be used in development mode.
76
+ */
77
+ declare class ConsoleLogger implements LoggerClient {
78
+ /** @inheritdoc */
79
+ error: (...data: any[]) => void;
80
+ /** @inheritdoc */
81
+ warn: (...data: any[]) => void;
82
+ /** @inheritdoc */
83
+ debug: (...data: any[]) => void;
84
+ /** @inheritdoc */
85
+ info: (...data: any[]) => void;
86
+ /** @inheritdoc */
87
+ log: (...data: any[]) => void;
88
+ /** @inheritdoc */
89
+ identify(uuid: string): void;
90
+ /** @inheritdoc */
91
+ event(name: string, properties?: any): void;
92
+ /** @inheritdoc */
93
+ getSessionURL(): undefined;
94
+ /** @inheritdoc */
95
+ stopRecording(): void;
96
+ /** @inheritdoc */
97
+ resumeRecording(): void;
98
+ /** @inheritdoc */
99
+ createMetaReducer(): MetaReducer<any, Action>;
100
+ }
101
+
102
+ /**
103
+ * @deprecated will be removed in v14.
104
+ */
105
+ declare class LoggerModule {
106
+ /**
107
+ * Provide logger at application level
108
+ * By default {@link ConsoleLogger} will be used if nothing is specified
109
+ * @param {...any} clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}
110
+ * @deprecated Please use {@link provideLogger} instead, will be removed in v14.
111
+ */
112
+ static forRoot(...clients: LoggerClient[]): ModuleWithProviders<LoggerModule>;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerModule, never>;
114
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LoggerModule, never, never, never>;
115
+ static ɵinj: i0.ɵɵInjectorDeclaration<LoggerModule>;
116
+ }
117
+ /**
118
+ * Provide logger for the application
119
+ * By default {@link ConsoleLogger} will be used if nothing is specified
120
+ * @param clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}
121
+ */
122
+ declare function provideLogger(...clients: LoggerClient[]): i0.EnvironmentProviders;
123
+
124
+ /**
125
+ * Console logger used to display the logs in the browser console
126
+ * Should be used in development mode.
127
+ */
128
+ declare const noopLogger: Readonly<LoggerClient>;
129
+
130
+ /**
131
+ * Logger service
132
+ */
133
+ declare class LoggerService implements Logger {
134
+ /** Loggers */
135
+ private readonly clients;
136
+ /**
137
+ * Record the recording status to make sure that new clients recording status will be consistent with the service
138
+ */
139
+ private recordingState;
140
+ constructor();
141
+ /**
142
+ * Identify a user.
143
+ * @param uid Unique identifier for the current user
144
+ * @param vars Addition information about the user
145
+ */
146
+ identify(uid: string, vars?: {
147
+ [key: string]: string;
148
+ }): void;
149
+ /**
150
+ * Log custom event.
151
+ * @param name Name of the event to log
152
+ * @param properties Additional properties
153
+ */
154
+ event(name: string, properties?: any): void;
155
+ /**
156
+ * Generate a link to the replay of the current session.
157
+ */
158
+ getClientSessionURL(): string | string[] | undefined;
159
+ /**
160
+ * Register a new client to the logger service
161
+ * @param client
162
+ */
163
+ registerClient(client: LoggerClient): void;
164
+ /**
165
+ * Stop recording.
166
+ */
167
+ stopClientRecording(): void;
168
+ /**
169
+ * Resume recording.
170
+ */
171
+ resumeClientRecording(): void;
172
+ /**
173
+ * Report an error
174
+ * @param message
175
+ * @param optionalParams
176
+ */
177
+ error(message?: any, ...optionalParams: any[]): void;
178
+ /**
179
+ * Report a warning
180
+ * @param message
181
+ * @param optionalParams
182
+ */
183
+ warn(message?: any, ...optionalParams: any[]): void;
184
+ /**
185
+ * Log a message
186
+ * @param message
187
+ * @param optionalParams
188
+ */
189
+ log(message?: any, ...optionalParams: any[]): void;
190
+ /**
191
+ * Log a message
192
+ * @param message
193
+ * @param optionalParams
194
+ */
195
+ info(message?: any, ...optionalParams: any[]): void;
196
+ /**
197
+ * Log a debug message
198
+ * @param message
199
+ * @param optionalParams
200
+ */
201
+ debug(message?: any, ...optionalParams: any[]): void;
202
+ /**
203
+ * Create a meta reducer to log ngrx store.
204
+ */
205
+ createMetaReducer(): MetaReducer<any, Action> | MetaReducer<any, Action>[] | undefined;
206
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
207
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoggerService>;
208
+ }
209
+
210
+ declare const LOGGER_CLIENT_TOKEN: InjectionToken<LoggerClient | LoggerClient[]>;
211
+
212
+ export { ConsoleLogger, LOGGER_CLIENT_TOKEN, LoggerModule, LoggerService, noopLogger, provideLogger };
213
+ export type { LoggerClient };
214
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":["../src/services/logger/logger.client.ts","../src/services/logger/logger.console.ts","../src/services/logger/logger.module.ts","../src/services/logger/logger.noop.ts","../src/services/logger/logger.service.ts","../src/services/logger/logger.token.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACG;AACJ;;;;AAIG;AACH;AAA+B;AAAuB;AAEtD;;;;AAIG;;AAGH;;AAEG;AACH;AAEA;;AAEG;;AAGH;;AAEG;;AAGH;;;;AAIG;AACH;AAEA;;;;AAIG;AACH;AAEA;;;;AAIG;AACH;AAEA;;;;AAIG;AACH;AAEA;;;;AAIG;AACH;AAEA;;AAEG;AACH;AACD;;ACtED;;;AAGG;AACH;;AAES;;AAGA;;AAGA;;AAGA;;AAGA;;;;;;AAkBA;;;;;;AAgBA;AAIR;;AChDD;;AAEG;AACH;AAME;;;;;AAKG;;;;;AAgBJ;AAED;;;;AAIG;AACH;;AC7CA;;;AAGG;AACH;;ACOA;;AAEG;AACH;;AAKE;AAEA;;AAEG;;;AASH;;;;AAIG;AACI;AAA+B;AAAuB;AAI7D;;;;AAIG;;AAKH;;AAEG;AACI;AAOP;;;AAGG;;AAcH;;AAEG;AACI;AAKP;;AAEG;AACI;AAKP;;;;AAIG;;AAKH;;;;AAIG;;AAKH;;;;AAIG;;AAKH;;;;AAIG;AACI;AAIP;;;;AAIG;;AAKH;;AAEG;AACI;;;AAMR;;ACtJD;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/logger",
3
- "version": "13.0.0-next.3",
3
+ "version": "13.0.0-next.31",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,15 +11,15 @@
11
11
  "otter-module"
12
12
  ],
13
13
  "peerDependencies": {
14
- "@angular-devkit/schematics": "^19.0.0",
15
- "@angular/core": "^19.0.0",
16
- "@angular/platform-browser-dynamic": "^19.0.0",
14
+ "@angular-devkit/schematics": "^20.0.0",
15
+ "@angular/core": "^20.0.0",
16
+ "@angular/platform-browser-dynamic": "^20.0.0",
17
17
  "@fullstory/browser": "^2.0.0",
18
- "@ngrx/store": "^19.0.0",
19
- "@o3r/core": "^13.0.0-next.3",
20
- "@o3r/schematics": "^13.0.0-next.3",
21
- "@schematics/angular": "^19.0.0",
22
- "logrocket": "^9.0.0",
18
+ "@ngrx/store": "^20.0.0",
19
+ "@o3r/core": "^13.0.0-next.31",
20
+ "@o3r/schematics": "^13.0.0-next.31",
21
+ "@schematics/angular": "^20.0.0",
22
+ "logrocket": "^10.0.0",
23
23
  "logrocket-ngrx": "^0.2.1",
24
24
  "rxjs": "^7.8.1",
25
25
  "smartlook-client": "^10.0.0",
@@ -56,11 +56,11 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@o3r/schematics": "^13.0.0-next.3",
59
+ "@o3r/schematics": "^13.0.0-next.31",
60
60
  "tslib": "^2.6.2"
61
61
  },
62
62
  "engines": {
63
- "node": "^20.11.1 || >=22.0.0"
63
+ "node": "^20.19.0 || ^22.17.0 || ^24.0.0"
64
64
  },
65
65
  "schematics": "./collection.json",
66
66
  "module": "fesm2022/o3r-logger.mjs",
@@ -9,7 +9,8 @@
9
9
  "description": "Project name",
10
10
  "$default": {
11
11
  "$source": "projectName"
12
- }
12
+ },
13
+ "alias": "project"
13
14
  },
14
15
  "exactO3rVersion": {
15
16
  "type": "boolean",
@@ -1,6 +1,54 @@
1
+ import { MetaReducer, Action } from '@ngrx/store';
2
+ import { LoggerClient } from '@o3r/logger';
3
+
1
4
  /**
2
- * Generated bundle index. Do not edit.
5
+ * FullStory client.
3
6
  */
4
- /// <amd-module name="@o3r/logger/services/fullstory-logger-client" />
5
- export * from './public_api';
6
- //# sourceMappingURL=o3r-logger-services-fullstory-logger-client.d.ts.map
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>;
51
+ }
52
+
53
+ export { FullStoryClient };
54
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":["../../../src/services/fullstory-logger-client/fullstory-logger-client.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAaA;;AAEG;AACH,cAAA,eAAA,YAAA,YAAA;AACE;;;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,yBAAA,WAAA,MAAA,MAAA;AAgBR;;;;"}
@@ -1,6 +1,61 @@
1
+ import { MetaReducer, Action } from '@ngrx/store';
2
+ import { Options } from 'logrocket-ngrx';
3
+ import { LoggerClient } from '@o3r/logger';
4
+
1
5
  /**
2
- * Generated bundle index. Do not edit.
6
+ * LogRocket client.
3
7
  */
4
- /// <amd-module name="@o3r/logger/services/logrocket-logger-client" />
5
- export * from './public_api';
6
- //# sourceMappingURL=o3r-logger-services-logrocket-logger-client.d.ts.map
8
+ declare class LogRocketClient implements LoggerClient {
9
+ /**
10
+ * Meta reducer configuration to change what store related items LogRocket records
11
+ */
12
+ private readonly metaReducerOptions?;
13
+ /**
14
+ * Constructor.
15
+ * @param appId LogROcket application ID
16
+ * @param initOptions Optional configuration to change what LogRocket records
17
+ * @param metaReducerOptions Optional meta reducer configuration to change what store related items LogRocket records
18
+ */
19
+ constructor(appId: string, initOptions?: any, metaReducerOptions?: Options);
20
+ /**
21
+ * @inheritdoc
22
+ */
23
+ identify(uid: string, vars?: {
24
+ [key: string]: string;
25
+ }): void;
26
+ /**
27
+ * @inheritdoc
28
+ */
29
+ event(name: string, properties?: any): void;
30
+ /**
31
+ * @inheritdoc
32
+ */
33
+ error(message?: any, ...optionalParams: any[]): void;
34
+ /**
35
+ * @inheritdoc
36
+ */
37
+ warn(message?: any, ...optionalParams: any[]): void;
38
+ /**
39
+ * @inheritdoc
40
+ */
41
+ log(message?: any, ...optionalParams: any[]): void;
42
+ /**
43
+ * @inheritdoc
44
+ */
45
+ getSessionURL(): string | undefined;
46
+ /**
47
+ * @inheritdoc
48
+ */
49
+ stopRecording(): void;
50
+ /**
51
+ * @inheritdoc
52
+ */
53
+ resumeRecording(): void;
54
+ /**
55
+ * @inheritdoc
56
+ */
57
+ createMetaReducer(): MetaReducer<any, Action>;
58
+ }
59
+
60
+ export { LogRocketClient };
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":["../../../src/services/logrocket-logger-client/logrocket-logger-client.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAYA;;AAEG;AACH,cAAA,eAAA,YAAA,YAAA;AACE;;AAEG;AACH;AAEA;;;;;AAKG;;AAmBH;;AAEG;AACI;AAA+B;AAAuB;AAI7D;;AAEG;;AAMH;;AAEG;AACI;AAIP;;AAEG;AACI;AAIP;;AAEG;AACI;AAIP;;AAEG;;AAKH;;AAEG;AACI;AAKP;;AAEG;AACI;AAKP;;AAEG;AACI,yBAAA,WAAA,MAAA,MAAA;AAYR;;;;"}
@@ -1,6 +1,54 @@
1
+ import { MetaReducer, Action } from '@ngrx/store';
2
+ import { LoggerClient } from '@o3r/logger';
3
+
1
4
  /**
2
- * Generated bundle index. Do not edit.
5
+ * SmartLook client.
3
6
  */
4
- /// <amd-module name="@o3r/logger/services/smartlook-logger-client" />
5
- export * from './public_api';
6
- //# sourceMappingURL=o3r-logger-services-smartlook-logger-client.d.ts.map
7
+ declare class SmartLookClient implements LoggerClient {
8
+ /**
9
+ * Constructor.
10
+ * @param key SmartLook key
11
+ */
12
+ constructor(key: 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(): undefined;
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ stopRecording(): void;
43
+ /**
44
+ * @inheritdoc
45
+ */
46
+ resumeRecording(): void;
47
+ /**
48
+ * @inheritdoc
49
+ */
50
+ createMetaReducer(): MetaReducer<any, Action>;
51
+ }
52
+
53
+ export { SmartLookClient };
54
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sources":["../../../src/services/smartlook-logger-client/smartlook-logger-client.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAUA;;AAEG;AACH,cAAA,eAAA,YAAA,YAAA;AACE;;;AAGG;AACS;AAIZ;;AAEG;AACI;AAA8B;AAA4B;AAIjE;;AAEG;;AAKH;;AAEG;AACI;AAKP;;AAEG;AACI;AAKP;;AAEG;AACI;AAKP;;AAEG;AACI;AAMP;;AAEG;AACI;AAIP;;AAEG;AACI;AAIP;;AAEG;AACI,yBAAA,WAAA,MAAA,MAAA;AAgBR;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"o3r-logger.d.ts","sourceRoot":"","sources":["../src/o3r-logger.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
package/public_api.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './services/logger/index';
2
- export type { Logger } from '@o3r/core';
3
- //# sourceMappingURL=public_api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC"}
@@ -1,51 +0,0 @@
1
- import { Action, MetaReducer } from '@ngrx/store';
2
- import type { LoggerClient } from '@o3r/logger';
3
- /**
4
- * FullStory client.
5
- */
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>;
50
- }
51
- //# sourceMappingURL=fullstory-logger-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fullstory-logger-client.d.ts","sourceRoot":"","sources":["../../../src/services/fullstory-logger-client/fullstory-logger-client.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,MAAM,EAEN,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,qBAAa,eAAgB,YAAW,YAAY;IAClD;;;OAGG;gBACS,KAAK,EAAE,MAAM;IAIzB;;OAEG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI;IAQpE;;OAEG;IACI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI;IAIlD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3D;;OAEG;IACI,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAI1D;;OAEG;IACI,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAIzD;;OAEG;IACI,aAAa,IAAI,MAAM,GAAG,SAAS;IAI1C;;OAEG;IACI,aAAa,IAAI,IAAI;IAI5B;;OAEG;IACI,eAAe,IAAI,IAAI;IAI9B;;OAEG;IACI,iBAAiB,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC;CAgBrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"o3r-logger-services-fullstory-logger-client.d.ts","sourceRoot":"","sources":["../../../src/services/fullstory-logger-client/o3r-logger-services-fullstory-logger-client.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './fullstory-logger-client';
2
- //# sourceMappingURL=public_api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../src/services/fullstory-logger-client/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1,7 +0,0 @@
1
- export * from './logger.client';
2
- export * from './logger.console';
3
- export * from './logger.module';
4
- export * from './logger.noop';
5
- export * from './logger.service';
6
- export * from './logger.token';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/logger/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
@@ -1,68 +0,0 @@
1
- import { Action, MetaReducer } from '@ngrx/store';
2
- import type { Logger } from '@o3r/core';
3
- /**
4
- * Third party client interface.
5
- */
6
- export interface LoggerClient extends Logger {
7
- /**
8
- * Identify a user.
9
- * @param uid Unique identifier for the current user
10
- * @param vars Addition information about the user
11
- */
12
- identify(uid: string, vars?: {
13
- [key: string]: string;
14
- }): void;
15
- /**
16
- * Log custom event.
17
- * @param name Name of the event to log
18
- * @param properties Additional properties
19
- */
20
- event(name: string, properties?: any): void;
21
- /**
22
- * Generate a link to the replay of the current session.
23
- */
24
- getSessionURL(): string | undefined;
25
- /**
26
- * Stop recording.
27
- */
28
- stopRecording(): void;
29
- /**
30
- * Resume recording.
31
- */
32
- resumeRecording(): void;
33
- /**
34
- * Log an error.
35
- * @param message Message to log
36
- * @param optionalParams Optional parameters to log
37
- */
38
- error(message?: any, ...optionalParams: any[]): void;
39
- /**
40
- * Log a warning.
41
- * @param message Message to log
42
- * @param optionalParams Optional parameters to log
43
- */
44
- warn(message?: any, ...optionalParams: any[]): void;
45
- /**
46
- * Log a message.
47
- * @param message Message to log
48
- * @param optionalParams Optional parameters to log
49
- */
50
- info?(message?: any, ...optionalParams: any[]): void;
51
- /**
52
- * Log a message.
53
- * @param message Message to log
54
- * @param optionalParams Optional parameters to log
55
- */
56
- log(message?: any, ...optionalParams: any[]): void;
57
- /**
58
- * Log a debug message.
59
- * @param message Message to log
60
- * @param optionalParams Optional parameters to log
61
- */
62
- debug?(message?: any, ...optionalParams: any[]): void;
63
- /**
64
- * Create a meta reducer to log ngrx store.
65
- */
66
- createMetaReducer(): MetaReducer<any, Action>;
67
- }
68
- //# sourceMappingURL=logger.client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.client.d.ts","sourceRoot":"","sources":["../../../src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"}
@@ -1,31 +0,0 @@
1
- import { Action, MetaReducer } from '@ngrx/store';
2
- import type { LoggerClient } from './logger.client';
3
- /**
4
- * Console logger used to display the logs in the browser console
5
- * Should be used in development mode.
6
- */
7
- export declare class ConsoleLogger implements LoggerClient {
8
- /** @inheritdoc */
9
- error: (...data: any[]) => void;
10
- /** @inheritdoc */
11
- warn: (...data: any[]) => void;
12
- /** @inheritdoc */
13
- debug: (...data: any[]) => void;
14
- /** @inheritdoc */
15
- info: (...data: any[]) => void;
16
- /** @inheritdoc */
17
- log: (...data: any[]) => void;
18
- /** @inheritdoc */
19
- identify(uuid: string): void;
20
- /** @inheritdoc */
21
- event(name: string, properties?: any): void;
22
- /** @inheritdoc */
23
- getSessionURL(): undefined;
24
- /** @inheritdoc */
25
- stopRecording(): void;
26
- /** @inheritdoc */
27
- resumeRecording(): void;
28
- /** @inheritdoc */
29
- createMetaReducer(): MetaReducer<any, Action>;
30
- }
31
- //# sourceMappingURL=logger.console.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.console.d.ts","sourceRoot":"","sources":["../../../src/services/logger/logger.console.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EAEN,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EACb,MAAM,iBAAiB,CAAC;AAEzB;;;GAGG;AACH,qBAAa,aAAc,YAAW,YAAY;IAChD,kBAAkB;IACX,KAAK,2BAAiB;IAE7B,kBAAkB;IACX,IAAI,2BAAgB;IAE3B,kBAAkB;IACX,KAAK,2BAAiB;IAE7B,kBAAkB;IACX,IAAI,2BAAgB;IAE3B,kBAAkB;IACX,GAAG,2BAAe;IAEzB,kBAAkB;IACX,QAAQ,CAAC,IAAI,EAAE,MAAM;IAK5B,kBAAkB;IACX,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG;IAQ3C,kBAAkB;IACX,aAAa,IAAI,SAAS;IAKjC,kBAAkB;IACX,aAAa;IAIpB,kBAAkB;IACX,eAAe;IAItB,kBAAkB;IACX,iBAAiB,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC;CAIrD"}
@@ -1,25 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { LoggerClient } from './logger.client';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * @deprecated will be removed in v14.
6
- */
7
- export declare class LoggerModule {
8
- /**
9
- * Provide logger at application level
10
- * By default {@link ConsoleLogger} will be used if nothing is specified
11
- * @param {...any} clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}
12
- * @deprecated Please use {@link provideLogger} instead, will be removed in v14.
13
- */
14
- static forRoot(...clients: LoggerClient[]): ModuleWithProviders<LoggerModule>;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<LoggerModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<LoggerModule, never, never, never>;
17
- static ɵinj: i0.ɵɵInjectorDeclaration<LoggerModule>;
18
- }
19
- /**
20
- * Provide logger for the application
21
- * By default {@link ConsoleLogger} will be used if nothing is specified
22
- * @param clients Registered {@link https://github.com/AmadeusITGroup/otter/blob/main/docs/logger/LOGS.md | Logger Client}
23
- */
24
- export declare function provideLogger(...clients: LoggerClient[]): import("@angular/core").EnvironmentProviders;
25
- //# sourceMappingURL=logger.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.module.d.ts","sourceRoot":"","sources":["../../../src/services/logger/logger.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACb,MAAM,iBAAiB,CAAC;;AAWzB;;GAEG;AACH,qBAKa,YAAY;IACvB;;;;;OAKG;WACW,OAAO,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAC,YAAY,CAAC;yCAPzE,YAAY;0CAAZ,YAAY;0CAAZ,YAAY;CAsBxB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,gDAYvD"}
@@ -1,7 +0,0 @@
1
- import type { LoggerClient } from './logger.client';
2
- /**
3
- * Console logger used to display the logs in the browser console
4
- * Should be used in development mode.
5
- */
6
- export declare const noopLogger: Readonly<LoggerClient>;
7
- //# sourceMappingURL=logger.noop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.noop.d.ts","sourceRoot":"","sources":["../../../src/services/logger/logger.noop.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,YAAY,EACb,MAAM,iBAAiB,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,YAAY,CAYpC,CAAC"}
@@ -1,84 +0,0 @@
1
- import { Action, MetaReducer } from '@ngrx/store';
2
- import type { Logger } from '@o3r/core';
3
- import { LoggerClient } from './logger.client';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Logger service
7
- */
8
- export declare class LoggerService implements Logger {
9
- /** Loggers */
10
- private readonly clients;
11
- /**
12
- * Record the recording status to make sure that new clients recording status will be consistent with the service
13
- */
14
- private recordingState;
15
- constructor(clients?: LoggerClient | LoggerClient[]);
16
- /**
17
- * Identify a user.
18
- * @param uid Unique identifier for the current user
19
- * @param vars Addition information about the user
20
- */
21
- identify(uid: string, vars?: {
22
- [key: string]: string;
23
- }): void;
24
- /**
25
- * Log custom event.
26
- * @param name Name of the event to log
27
- * @param properties Additional properties
28
- */
29
- event(name: string, properties?: any): void;
30
- /**
31
- * Generate a link to the replay of the current session.
32
- */
33
- getClientSessionURL(): string | string[] | undefined;
34
- /**
35
- * Register a new client to the logger service
36
- * @param client
37
- */
38
- registerClient(client: LoggerClient): void;
39
- /**
40
- * Stop recording.
41
- */
42
- stopClientRecording(): void;
43
- /**
44
- * Resume recording.
45
- */
46
- resumeClientRecording(): void;
47
- /**
48
- * Report an error
49
- * @param message
50
- * @param optionalParams
51
- */
52
- error(message?: any, ...optionalParams: any[]): void;
53
- /**
54
- * Report a warning
55
- * @param message
56
- * @param optionalParams
57
- */
58
- warn(message?: any, ...optionalParams: any[]): void;
59
- /**
60
- * Log a message
61
- * @param message
62
- * @param optionalParams
63
- */
64
- log(message?: any, ...optionalParams: any[]): void;
65
- /**
66
- * Log a message
67
- * @param message
68
- * @param optionalParams
69
- */
70
- info(message?: any, ...optionalParams: any[]): void;
71
- /**
72
- * Log a debug message
73
- * @param message
74
- * @param optionalParams
75
- */
76
- debug(message?: any, ...optionalParams: any[]): void;
77
- /**
78
- * Create a meta reducer to log ngrx store.
79
- */
80
- createMetaReducer(): MetaReducer<any, Action> | MetaReducer<any, Action>[] | undefined;
81
- static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, [{ optional: true; }]>;
82
- static ɵprov: i0.ɵɵInjectableDeclaration<LoggerService>;
83
- }
84
- //# sourceMappingURL=logger.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.service.d.ts","sourceRoot":"","sources":["../../../src/services/logger/logger.service.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,MAAM,EACN,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,MAAM,EACP,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,YAAY,EACb,MAAM,iBAAiB,CAAC;;AAQzB;;GAEG;AACH,qBAGa,aAAc,YAAW,MAAM;IAC1C,cAAc;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IAEzC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAgD;gBAEjB,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE;IAI5F;;;;OAIG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAI7D;;;;OAIG;IACI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI;IAIlD;;OAEG;IACI,mBAAmB,IAAI,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAO3D;;;OAGG;IACI,cAAc,CAAC,MAAM,EAAE,YAAY;IAa1C;;OAEG;IACI,mBAAmB,IAAI,IAAI;IAKlC;;OAEG;IACI,qBAAqB,IAAI,IAAI;IAKpC;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAIpD;;;;OAIG;IACI,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAInD;;;;OAIG;IACI,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAIlD;;;;OAIG;IACI,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAI1D;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAIpD;;OAEG;IACI,iBAAiB,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,SAAS;yCA1HlF,aAAa;6CAAb,aAAa;CAgIzB"}
@@ -1,4 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { LoggerClient } from './logger.client';
3
- export declare const LOGGER_CLIENT_TOKEN: InjectionToken<LoggerClient | LoggerClient[]>;
4
- //# sourceMappingURL=logger.token.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.token.d.ts","sourceRoot":"","sources":["../../../src/services/logger/logger.token.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACb,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,mBAAmB,EAAE,cAAc,CAAC,YAAY,GAAG,YAAY,EAAE,CAAuD,CAAC"}
@@ -1,58 +0,0 @@
1
- import { Action, MetaReducer } from '@ngrx/store';
2
- import { Options } from 'logrocket-ngrx';
3
- import type { LoggerClient } from '@o3r/logger';
4
- /**
5
- * LogRocket client.
6
- */
7
- export declare class LogRocketClient implements LoggerClient {
8
- /**
9
- * Meta reducer configuration to change what store related items LogRocket records
10
- */
11
- private readonly metaReducerOptions?;
12
- /**
13
- * Constructor.
14
- * @param appId LogROcket application ID
15
- * @param initOptions Optional configuration to change what LogRocket records
16
- * @param metaReducerOptions Optional meta reducer configuration to change what store related items LogRocket records
17
- */
18
- constructor(appId: string, initOptions?: any, metaReducerOptions?: Options);
19
- /**
20
- * @inheritdoc
21
- */
22
- identify(uid: string, vars?: {
23
- [key: string]: string;
24
- }): void;
25
- /**
26
- * @inheritdoc
27
- */
28
- event(name: string, properties?: any): void;
29
- /**
30
- * @inheritdoc
31
- */
32
- error(message?: any, ...optionalParams: any[]): void;
33
- /**
34
- * @inheritdoc
35
- */
36
- warn(message?: any, ...optionalParams: any[]): void;
37
- /**
38
- * @inheritdoc
39
- */
40
- log(message?: any, ...optionalParams: any[]): void;
41
- /**
42
- * @inheritdoc
43
- */
44
- getSessionURL(): string | undefined;
45
- /**
46
- * @inheritdoc
47
- */
48
- stopRecording(): void;
49
- /**
50
- * @inheritdoc
51
- */
52
- resumeRecording(): void;
53
- /**
54
- * @inheritdoc
55
- */
56
- createMetaReducer(): MetaReducer<any, Action>;
57
- }
58
- //# sourceMappingURL=logrocket-logger-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logrocket-logger-client.d.ts","sourceRoot":"","sources":["../../../src/services/logrocket-logger-client/logrocket-logger-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,OAA6B,EAC3B,OAAO,EACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,qBAAa,eAAgB,YAAW,YAAY;IAClD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAU;IAE9C;;;;;OAKG;gBACS,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,kBAAkB,CAAC,EAAE,OAAO;IAkB1E;;OAEG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI;IAIpE;;OAEG;IACI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI;IAKlD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3D;;OAEG;IACI,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAI1D;;OAEG;IACI,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAIzD;;OAEG;IACI,aAAa,IAAI,MAAM,GAAG,SAAS;IAI1C;;OAEG;IACI,aAAa,IAAI,IAAI;IAK5B;;OAEG;IACI,eAAe,IAAI,IAAI;IAK9B;;OAEG;IACI,iBAAiB,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC;CAYrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"o3r-logger-services-logrocket-logger-client.d.ts","sourceRoot":"","sources":["../../../src/services/logrocket-logger-client/o3r-logger-services-logrocket-logger-client.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './logrocket-logger-client';
2
- //# sourceMappingURL=public_api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../src/services/logrocket-logger-client/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"o3r-logger-services-smartlook-logger-client.d.ts","sourceRoot":"","sources":["../../../src/services/smartlook-logger-client/o3r-logger-services-smartlook-logger-client.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './smartlook-logger-client';
2
- //# sourceMappingURL=public_api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../src/services/smartlook-logger-client/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1,51 +0,0 @@
1
- import { Action, MetaReducer } from '@ngrx/store';
2
- import type { LoggerClient } from '@o3r/logger';
3
- /**
4
- * SmartLook client.
5
- */
6
- export declare class SmartLookClient implements LoggerClient {
7
- /**
8
- * Constructor.
9
- * @param key SmartLook key
10
- */
11
- constructor(key: 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(): undefined;
38
- /**
39
- * @inheritdoc
40
- */
41
- stopRecording(): void;
42
- /**
43
- * @inheritdoc
44
- */
45
- resumeRecording(): void;
46
- /**
47
- * @inheritdoc
48
- */
49
- createMetaReducer(): MetaReducer<any, Action>;
50
- }
51
- //# sourceMappingURL=smartlook-logger-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"smartlook-logger-client.d.ts","sourceRoot":"","sources":["../../../src/services/smartlook-logger-client/smartlook-logger-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EAEN,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACV,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,qBAAa,eAAgB,YAAW,YAAY;IAClD;;;OAGG;gBACS,GAAG,EAAE,MAAM;IAIvB;;OAEG;IACI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAO,GAAG,IAAI;IAIxE;;OAEG;IACI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI;IAIlD;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAK3D;;OAEG;IACI,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAK1D;;OAEG;IACI,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI;IAKzD;;OAEG;IACI,aAAa,IAAI,SAAS;IAMjC;;OAEG;IACI,aAAa,IAAI,IAAI;IAI5B;;OAEG;IACI,eAAe,IAAI,IAAI;IAI9B;;OAEG;IACI,iBAAiB,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC;CAgBrD"}