cidaas-logger-ui-sdk 20.0.2 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,66 @@
1
1
  # CidaasLoggerUiSdk
2
2
 
3
- A logger for used for cidaas UI applications
3
+ A logger SDK for cidaas UI applications.
4
+
5
+ ## Requirements (v21.0.0)
6
+
7
+ | Dependency | Version |
8
+ |------------|---------|
9
+ | Angular | `^21.0.0` |
10
+ | `@sentry/angular` | `^10.40.0` |
11
+ | Node.js | `^20.19.0` \| `^22.12.0` \| `^24.0.0` |
12
+ | TypeScript | `>=5.9.0 <6.0.0` |
13
+ | RxJS | `^6.5.3` \| `^7.4.0` |
14
+ | zone.js | `~0.16.0` |
15
+
16
+ ## Migration from v20.x to v21.0.0
17
+
18
+ This release upgrades the SDK from Angular 20 to **Angular 21.2.11**.
19
+
20
+ ### Angular
21
+
22
+ All `@angular/*` packages are updated to **21.2.11**:
23
+
24
+ - `@angular/animations`, `@angular/common`, `@angular/compiler`, `@angular/core`
25
+ - `@angular/forms`, `@angular/platform-browser`, `@angular/platform-browser-dynamic`, `@angular/router`
26
+ - `@angular/build`, `@angular/cli`, `@angular/compiler-cli`
27
+ - `ng-packagr` → `^21.2.0`
28
+ - `typescript` → `~5.9.0` (required for Angular 21)
29
+ - `zone.js` → `~0.16.0`
30
+
31
+ ### Sentry
32
+
33
+ `@sentry/angular@9.x` only supports Angular ≤20 and will cause an `ERESOLVE` peer dependency conflict on Angular 21. Upgrade Sentry alongside this SDK:
34
+
35
+ | Package | v20.x | v21.0.0 |
36
+ |---------|-------|---------|
37
+ | `@sentry/angular` | `^9.x` | **`^10.40.0`** |
38
+ | `@sentry/browser` | `^9.x` | **`^10.40.0`** |
39
+ | `@sentry/core` | — | **`^10.40.0`** |
40
+ | `@sentry/replay` | `^7.x` | **removed** (included in `@sentry/browser` v10) |
41
+ | `@sentry/tracing` | `^7.x` | **removed** (included in `@sentry/browser` v10) |
42
+ | `@sentry/types` | `^9.x` | **removed** (types moved to `@sentry/core`) |
43
+
44
+ If you import Sentry types directly, replace `@sentry/types` imports with `@sentry/core` (e.g. `Integration`).
45
+
46
+ ### Consumer upgrade steps
47
+
48
+ 1. Update Angular to **21.2.11** and TypeScript to **>=5.9.0**.
49
+ 2. Upgrade `@sentry/angular` to **^10.40.0** (or newer).
50
+ 3. Remove legacy Sentry v7 packages (`@sentry/replay`, `@sentry/tracing`, `@sentry/types`) if present.
51
+ 4. Install this SDK at **v21.0.0**:
52
+
53
+ ```bash
54
+ npm install cidaas-logger-ui-sdk@21.0.0
55
+ ```
56
+
57
+ If you encounter peer dependency errors, ensure no package still pins `@sentry/angular@9.x` or Angular 20.
58
+
59
+ ## Development
60
+
61
+ ```bash
62
+ npm install
63
+ npm run build # build the library
64
+ npm run build:app # build the test app
65
+ npm test # run unit tests
66
+ ```
@@ -175,10 +175,10 @@ class LoggerService {
175
175
  }
176
176
  }
177
177
  }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LoggerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LoggerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
179
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LoggerService, providedIn: 'root' }); }
180
180
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LoggerService, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LoggerService, decorators: [{
182
182
  type: Injectable,
183
183
  args: [{
184
184
  providedIn: 'root'
@@ -201,11 +201,11 @@ class CidaasLoggerUiSdkModule {
201
201
  ]
202
202
  };
203
203
  }
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CidaasLoggerUiSdkModule, deps: [{ token: CidaasLoggerUiSdkModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
205
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: CidaasLoggerUiSdkModule, imports: [BrowserModule] }); }
206
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CidaasLoggerUiSdkModule, providers: [provideHttpClient(withInterceptorsFromDi())], imports: [BrowserModule] }); }
204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CidaasLoggerUiSdkModule, deps: [{ token: CidaasLoggerUiSdkModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
205
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: CidaasLoggerUiSdkModule, imports: [BrowserModule] }); }
206
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CidaasLoggerUiSdkModule, providers: [provideHttpClient(withInterceptorsFromDi())], imports: [BrowserModule] }); }
207
207
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CidaasLoggerUiSdkModule, decorators: [{
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CidaasLoggerUiSdkModule, decorators: [{
209
209
  type: NgModule,
210
210
  args: [{ imports: [BrowserModule], providers: [provideHttpClient(withInterceptorsFromDi())] }]
211
211
  }], ctorParameters: () => [{ type: CidaasLoggerUiSdkModule, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"cidaas-logger-ui-sdk.mjs","sources":["../../../projects/cidaas-logger-ui-sdk/src/lib/model/LogLevel.enum.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/services/sentry-error-handler.model.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/services/sentry-error-handler.service.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/services/logger.service.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/cidaas-logger-ui-sdk.module.ts","../../../projects/cidaas-logger-ui-sdk/src/public-api.ts","../../../projects/cidaas-logger-ui-sdk/src/cidaas-logger-ui-sdk.ts"],"sourcesContent":["export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';\nexport type LogLevelValue = 0 | 1 | 2 | 3 | 4;\n\n\nexport class LogLevelInfo {\n\n public static TRACE = new LogLevelInfo('trace', 0);\n public static DEBUG = new LogLevelInfo('debug', 1);\n public static INFO = new LogLevelInfo('info', 2);\n public static WARN = new LogLevelInfo('warn', 3);\n public static ERROR = new LogLevelInfo('error', 4);\n\n\n static levels = [LogLevelInfo.TRACE, LogLevelInfo.DEBUG, LogLevelInfo.INFO, LogLevelInfo.WARN, LogLevelInfo.ERROR];\n\n constructor(id: LogLevel, value: LogLevelValue) {\n this.id = id;\n this.value = value;\n }\n\n static of = (logLevelId: LogLevel): LogLevelInfo => {\n const level = LogLevelInfo.levels\n .find(l => l.id === logLevelId);\n if (!level) {\n throw new Error(`unknown loglevel passed: ${logLevelId}`)\n }\n return level;\n }\n\n static getLevels = (logLevelId: LogLevel): LogLevelInfo[] => {\n const level = LogLevelInfo.of(logLevelId);\n return LogLevelInfo.levels.slice(level.value, LogLevelInfo.levels.length);\n}\n\n\n readonly id: LogLevel;\n readonly value: LogLevelValue;\n\n}\n","import { LogLevel, LogLevelInfo, LogMonitoringType } from '../model';\nimport * as Sentry from '@sentry/angular';\n\n/**\n * Domain Helpers\n * */\nexport const createRelease = (options: { appName: string, version: string }) =>\n `${options.appName}@${options.version}`;\n\n\nexport const isAdvancedMonitoringEnabled = (monitoringType?: LogMonitoringType) =>\n monitoringType === LogMonitoringType.ADVANCED\n\nexport const getAppLogLevel = (logLevel?: LogLevel): LogLevel => logLevel || LogLevelInfo.WARN.id\n\n/**\n * Sentry Helpers\n * */\n\n\nexport const mapLogLevelToSentrySeverity = (logLevel?: LogLevel): Sentry.SeverityLevel => {\n logLevel = getAppLogLevel(logLevel);\n switch (logLevel) {\n case 'trace':\n case 'debug':\n return 'debug';\n case 'error':\n return 'error';\n case 'info':\n return 'info';\n case 'warn':\n return 'warning';\n }\n}\n\n\nexport const getCaptureLogLevels = (logLevel: LogLevel | undefined) => {\n logLevel = getAppLogLevel(logLevel);\n return LogLevelInfo.getLevels(logLevel).map(l =>\n mapLogLevelToSentrySeverity(l.id));\n};\n","import { ErrorHandler, Provider } from '@angular/core';\n\nimport { LoggerConfig, LogLevelInfo, LogLevel, LogMonitoringType } from '../model';\nimport { Router } from '@angular/router';\nimport {\n createRelease,\n getAppLogLevel, getCaptureLogLevels,\n isAdvancedMonitoringEnabled,\n mapLogLevelToSentrySeverity\n} from './sentry-error-handler.model';\nimport * as Sentry from '@sentry/angular';\nimport { Integration } from '@sentry/types';\n\nexport class SentryErrorHandlerService {\n\n private static logLevel: LogLevel | undefined;\n\n\n constructor() {\n }\n\n\n static initSentry = (sentryConfig: LoggerConfig): void => {\n\n if (!sentryConfig || !sentryConfig.dsn || sentryConfig.monitoringType === LogMonitoringType.OFF) {\n return;\n }\n\n const commonOptions = this.getCommonOptions(sentryConfig);\n const defaultOptions = this.getDefaultOptions(sentryConfig);\n SentryErrorHandlerService.logLevel = defaultOptions.logLevel;\n const simpleMonitoringOptions =\n SentryErrorHandlerService.getSimpleMonitoringOptions(defaultOptions);\n\n switch (defaultOptions.monitoringType.toString()) {\n case LogMonitoringType.SIMPLE:\n Sentry.init({\n ...commonOptions,\n ...simpleMonitoringOptions,\n defaultIntegrations: false,\n });\n\n break;\n case LogMonitoringType.ADVANCED:\n\n const advancedMonitoringOptions = SentryErrorHandlerService.getAdvancedMonitoringOptions(defaultOptions);\n Sentry.init({\n ...commonOptions,\n ...simpleMonitoringOptions,\n ...advancedMonitoringOptions,\n });\n break;\n case LogMonitoringType.OFF:\n return;\n }\n }\n\n\n static getAppLogLevel(): LogLevelInfo {\n return LogLevelInfo.of(SentryErrorHandlerService.logLevel || 'warn');\n }\n\n static getCommonOptions = (options: LoggerConfig) => ({\n dsn: options.dsn,\n release: createRelease(options)\n });\n\n\n\n static getDefaultOptions = (options: LoggerConfig) => ({\n monitoringType: options.monitoringType || LogMonitoringType.SIMPLE,\n logLevel: getAppLogLevel(options.logLevel),\n dsn: options.dsn,\n appName: options.appName,\n version: options.version\n });\n\n static getSimpleMonitoringOptions = (options: LoggerConfig) => ({\n 'initialScope': (scope: any) => {\n scope.setLevel(\n mapLogLevelToSentrySeverity(options.logLevel)\n );\n return scope;\n },\n tracesSampleRate: 1.0\n });\n\n static getAdvancedMonitoringOptions = (\n options: LoggerConfig\n): {\n integrations: () => Integration[];\n replaysSessionSampleRate: number;\n replaysOnErrorSampleRate: number;\n} => ({\n integrations: () => [\n Sentry.replayIntegration(),\n Sentry.browserTracingIntegration(),\n Sentry.captureConsoleIntegration({\n levels: getCaptureLogLevels(options.logLevel),\n }),\n ],\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n});\n\n\n\n static getSentryProviders(monitoringType?: LogMonitoringType): Provider[] {\n if (!isAdvancedMonitoringEnabled(monitoringType)) {\n return [];\n }\n\n return [\n {\n provide: ErrorHandler, useValue: Sentry.createErrorHandler({ showDialog: false })\n },\n { provide: Sentry.TraceService, deps: [Router] }\n ]\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { LogLevelInfo, LogLevelValue } from \"../model\";\nimport { SentryErrorHandlerService } from \"./sentry-error-handler.service\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService {\n\n appLogLevel: LogLevelInfo = SentryErrorHandlerService.getAppLogLevel();\n\n public logDebug(...message: any): void {\n this.writeToLog(LogLevelInfo.DEBUG.value, ...message);\n }\n\n public log(...message: any) {\n this.writeToLog(LogLevelInfo.INFO.value, ...message);\n }\n\n public logWarn(...message: any) {\n this.writeToLog(LogLevelInfo.WARN.value, ...message);\n }\n\n public logError(...message: any) {\n this.writeToLog(LogLevelInfo.ERROR.value, ...message);\n }\n\n public logTrace(...message: any) {\n this.writeToLog(LogLevelInfo.TRACE.value, ...message);\n }\n\n /**\n * Write logs.\n */\n private writeToLog(level: LogLevelValue, ...message: any) {\n if (level >= this.appLogLevel.value) {\n if (level === LogLevelInfo.INFO.value) {\n console.info(...message);\n } else if (level === LogLevelInfo.ERROR.value) {\n console.error(...message);\n } else if (level === LogLevelInfo.WARN.value) {\n console.warn(...message);\n } else if (level === LogLevelInfo.TRACE.value) {\n console.trace(...message);\n }else if (level === LogLevelInfo.DEBUG.value) {\n console.debug(...message);\n }\n }\n }\n\n}\n","import { InjectionToken, ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\nimport { SentryErrorHandlerService } from './services';\nimport { ILoggerOptions } from './model';\n\nexport const LOGGER_CONFIG = new InjectionToken<ILoggerOptions>('LOGGER_CONFIG_PARAMS');\n\n\n@NgModule({ imports: [BrowserModule], providers: [provideHttpClient(withInterceptorsFromDi())] })\nexport class CidaasLoggerUiSdkModule {\n\n constructor(@Optional() @SkipSelf() parentModule: CidaasLoggerUiSdkModule){\n if(parentModule){\n throw new Error('CidaasLoggerUiSdkModule is already loaded. Please add it in AppModule only.');\n }\n }\n\n static forRoot(conf?: ILoggerOptions): ModuleWithProviders<CidaasLoggerUiSdkModule> {\n return {\n ngModule: CidaasLoggerUiSdkModule,\n providers: [\n {provide: LOGGER_CONFIG, useValue: conf} ,\n ...SentryErrorHandlerService.getSentryProviders(conf?.monitoringType)\n ]\n }\n }\n\n}\n","/*\n * Public API Surface of cidaas-logger-ui-sdk\n */\n\nexport * from './lib/cidaas-logger-ui-sdk.module';\n\n//enum\nexport * from './lib/model/index'\n\n// Services\nexport * from './lib/services/index';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAIa,YAAY,CAAA;aAET,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACrC,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACrC,IAAA,CAAA,IAAI,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aACnC,IAAA,CAAA,IAAI,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aACnC,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aAG5C,IAAA,CAAA,MAAM,GAAG,CAAC,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAEnH,WAAA,CAAY,EAAY,EAAE,KAAoB,EAAA;AAC5C,QAAA,IAAI,CAAC,EAAE,GAAG,EAAE;AACZ,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;;AAGb,IAAA,SAAA,IAAA,CAAA,EAAE,GAAG,CAAC,UAAoB,KAAkB;AACjD,QAAA,MAAM,KAAK,GAAG,YAAY,CAAC;aACtB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC;QACnC,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,CAAA,CAAE,CAAC;;AAE3D,Q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A,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YADd,aAAa,CAAA,EAAA,CAAA,CAAA;+GACtB,uBAAuB,EAAA,SAAA,EADa,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAA,OAAA,EAAA,CAAxE,aAAa,CAAA,EAAA,CAAA,CAAA;;2FACtB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;;0BAGjF;;0BAAY;;;ACZ3B;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cidaas-logger-ui-sdk.mjs","sources":["../../../projects/cidaas-logger-ui-sdk/src/lib/model/LogLevel.enum.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/services/sentry-error-handler.model.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/services/sentry-error-handler.service.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/services/logger.service.ts","../../../projects/cidaas-logger-ui-sdk/src/lib/cidaas-logger-ui-sdk.module.ts","../../../projects/cidaas-logger-ui-sdk/src/public-api.ts","../../../projects/cidaas-logger-ui-sdk/src/cidaas-logger-ui-sdk.ts"],"sourcesContent":["export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';\nexport type LogLevelValue = 0 | 1 | 2 | 3 | 4;\n\n\nexport class LogLevelInfo {\n\n public static TRACE = new LogLevelInfo('trace', 0);\n public static DEBUG = new LogLevelInfo('debug', 1);\n public static INFO = new LogLevelInfo('info', 2);\n public static WARN = new LogLevelInfo('warn', 3);\n public static ERROR = new LogLevelInfo('error', 4);\n\n\n static levels = [LogLevelInfo.TRACE, LogLevelInfo.DEBUG, LogLevelInfo.INFO, LogLevelInfo.WARN, LogLevelInfo.ERROR];\n\n constructor(id: LogLevel, value: LogLevelValue) {\n this.id = id;\n this.value = value;\n }\n\n static of = (logLevelId: LogLevel): LogLevelInfo => {\n const level = LogLevelInfo.levels\n .find(l => l.id === logLevelId);\n if (!level) {\n throw new Error(`unknown loglevel passed: ${logLevelId}`)\n }\n return level;\n }\n\n static getLevels = (logLevelId: LogLevel): LogLevelInfo[] => {\n const level = LogLevelInfo.of(logLevelId);\n return LogLevelInfo.levels.slice(level.value, LogLevelInfo.levels.length);\n}\n\n\n readonly id: LogLevel;\n readonly value: LogLevelValue;\n\n}\n","import { LogLevel, LogLevelInfo, LogMonitoringType } from '../model';\nimport * as Sentry from '@sentry/angular';\n\n/**\n * Domain Helpers\n * */\nexport const createRelease = (options: { appName: string, version: string }) =>\n `${options.appName}@${options.version}`;\n\n\nexport const isAdvancedMonitoringEnabled = (monitoringType?: LogMonitoringType) =>\n monitoringType === LogMonitoringType.ADVANCED\n\nexport const getAppLogLevel = (logLevel?: LogLevel): LogLevel => logLevel || LogLevelInfo.WARN.id\n\n/**\n * Sentry Helpers\n * */\n\n\nexport const mapLogLevelToSentrySeverity = (logLevel?: LogLevel): Sentry.SeverityLevel => {\n logLevel = getAppLogLevel(logLevel);\n switch (logLevel) {\n case 'trace':\n case 'debug':\n return 'debug';\n case 'error':\n return 'error';\n case 'info':\n return 'info';\n case 'warn':\n return 'warning';\n }\n}\n\n\nexport const getCaptureLogLevels = (logLevel: LogLevel | undefined) => {\n logLevel = getAppLogLevel(logLevel);\n return LogLevelInfo.getLevels(logLevel).map(l =>\n mapLogLevelToSentrySeverity(l.id));\n};\n","import { ErrorHandler, Provider } from '@angular/core';\n\nimport { LoggerConfig, LogLevelInfo, LogLevel, LogMonitoringType } from '../model';\nimport { Router } from '@angular/router';\nimport {\n createRelease,\n getAppLogLevel, getCaptureLogLevels,\n isAdvancedMonitoringEnabled,\n mapLogLevelToSentrySeverity\n} from './sentry-error-handler.model';\nimport * as Sentry from '@sentry/angular';\nimport type { Integration } from '@sentry/core';\n\nexport class SentryErrorHandlerService {\n\n private static logLevel: LogLevel | undefined;\n\n\n constructor() {\n }\n\n\n static initSentry = (sentryConfig: LoggerConfig): void => {\n\n if (!sentryConfig || !sentryConfig.dsn || sentryConfig.monitoringType === LogMonitoringType.OFF) {\n return;\n }\n\n const commonOptions = this.getCommonOptions(sentryConfig);\n const defaultOptions = this.getDefaultOptions(sentryConfig);\n SentryErrorHandlerService.logLevel = defaultOptions.logLevel;\n const simpleMonitoringOptions =\n SentryErrorHandlerService.getSimpleMonitoringOptions(defaultOptions);\n\n switch (defaultOptions.monitoringType.toString()) {\n case LogMonitoringType.SIMPLE:\n Sentry.init({\n ...commonOptions,\n ...simpleMonitoringOptions,\n defaultIntegrations: false,\n });\n\n break;\n case LogMonitoringType.ADVANCED:\n\n const advancedMonitoringOptions = SentryErrorHandlerService.getAdvancedMonitoringOptions(defaultOptions);\n Sentry.init({\n ...commonOptions,\n ...simpleMonitoringOptions,\n ...advancedMonitoringOptions,\n });\n break;\n case LogMonitoringType.OFF:\n return;\n }\n }\n\n\n static getAppLogLevel(): LogLevelInfo {\n return LogLevelInfo.of(SentryErrorHandlerService.logLevel || 'warn');\n }\n\n static getCommonOptions = (options: LoggerConfig) => ({\n dsn: options.dsn,\n release: createRelease(options)\n });\n\n\n\n static getDefaultOptions = (options: LoggerConfig) => ({\n monitoringType: options.monitoringType || LogMonitoringType.SIMPLE,\n logLevel: getAppLogLevel(options.logLevel),\n dsn: options.dsn,\n appName: options.appName,\n version: options.version\n });\n\n static getSimpleMonitoringOptions = (options: LoggerConfig) => ({\n 'initialScope': (scope: any) => {\n scope.setLevel(\n mapLogLevelToSentrySeverity(options.logLevel)\n );\n return scope;\n },\n tracesSampleRate: 1.0\n });\n\n static getAdvancedMonitoringOptions = (\n options: LoggerConfig\n): {\n integrations: () => Integration[];\n replaysSessionSampleRate: number;\n replaysOnErrorSampleRate: number;\n} => ({\n integrations: () => [\n Sentry.replayIntegration(),\n Sentry.browserTracingIntegration(),\n Sentry.captureConsoleIntegration({\n levels: getCaptureLogLevels(options.logLevel),\n }),\n ],\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n});\n\n\n\n static getSentryProviders(monitoringType?: LogMonitoringType): Provider[] {\n if (!isAdvancedMonitoringEnabled(monitoringType)) {\n return [];\n }\n\n return [\n {\n provide: ErrorHandler, useValue: Sentry.createErrorHandler({ showDialog: false })\n },\n { provide: Sentry.TraceService, deps: [Router] }\n ]\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { LogLevelInfo, LogLevelValue } from \"../model\";\nimport { SentryErrorHandlerService } from \"./sentry-error-handler.service\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService {\n\n appLogLevel: LogLevelInfo = SentryErrorHandlerService.getAppLogLevel();\n\n public logDebug(...message: any): void {\n this.writeToLog(LogLevelInfo.DEBUG.value, ...message);\n }\n\n public log(...message: any) {\n this.writeToLog(LogLevelInfo.INFO.value, ...message);\n }\n\n public logWarn(...message: any) {\n this.writeToLog(LogLevelInfo.WARN.value, ...message);\n }\n\n public logError(...message: any) {\n this.writeToLog(LogLevelInfo.ERROR.value, ...message);\n }\n\n public logTrace(...message: any) {\n this.writeToLog(LogLevelInfo.TRACE.value, ...message);\n }\n\n /**\n * Write logs.\n */\n private writeToLog(level: LogLevelValue, ...message: any) {\n if (level >= this.appLogLevel.value) {\n if (level === LogLevelInfo.INFO.value) {\n console.info(...message);\n } else if (level === LogLevelInfo.ERROR.value) {\n console.error(...message);\n } else if (level === LogLevelInfo.WARN.value) {\n console.warn(...message);\n } else if (level === LogLevelInfo.TRACE.value) {\n console.trace(...message);\n }else if (level === LogLevelInfo.DEBUG.value) {\n console.debug(...message);\n }\n }\n }\n\n}\n","import { InjectionToken, ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\nimport { SentryErrorHandlerService } from './services';\nimport { ILoggerOptions } from './model';\n\nexport const LOGGER_CONFIG = new InjectionToken<ILoggerOptions>('LOGGER_CONFIG_PARAMS');\n\n\n@NgModule({ imports: [BrowserModule], providers: [provideHttpClient(withInterceptorsFromDi())] })\nexport class CidaasLoggerUiSdkModule {\n\n constructor(@Optional() @SkipSelf() parentModule: CidaasLoggerUiSdkModule){\n if(parentModule){\n throw new Error('CidaasLoggerUiSdkModule is already loaded. Please add it in AppModule only.');\n }\n }\n\n static forRoot(conf?: ILoggerOptions): ModuleWithProviders<CidaasLoggerUiSdkModule> {\n return {\n ngModule: CidaasLoggerUiSdkModule,\n providers: [\n {provide: LOGGER_CONFIG, useValue: conf} ,\n ...SentryErrorHandlerService.getSentryProviders(conf?.monitoringType)\n ]\n }\n }\n\n}\n","/*\n * Public API Surface of cidaas-logger-ui-sdk\n */\n\nexport * from './lib/cidaas-logger-ui-sdk.module';\n\n//enum\nexport * from './lib/model/index'\n\n// Services\nexport * from './lib/services/index';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAIa,YAAY,CAAA;aAET,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACrC,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;aACrC,IAAA,CAAA,IAAI,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aACnC,IAAA,CAAA,IAAI,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aACnC,IAAA,CAAA,KAAK,GAAG,IAAI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,YAAA,IAAA,EAAA,CAAA,EAAE,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;;0BAGjF;;0BAAY;;;ACZ3B;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "name": "cidaas-logger-ui-sdk",
3
- "version": "20.0.2",
3
+ "version": "21.1.0",
4
4
  "peerDependencies": {
5
- "@angular/common": "^20.0.0",
6
- "@angular/core": "^20.0.0",
7
- "@sentry/angular": "^8.0.0"
5
+ "@angular/common": "^21.0.0",
6
+ "@angular/core": "^21.0.0",
7
+ "@sentry/angular": "^10.40.0"
8
8
  },
9
9
  "dependencies": {
10
10
  "tslib": "^2.3.0"
11
11
  },
12
12
  "module": "fesm2022/cidaas-logger-ui-sdk.mjs",
13
- "typings": "index.d.ts",
13
+ "typings": "types/cidaas-logger-ui-sdk.d.ts",
14
14
  "exports": {
15
15
  "./package.json": {
16
16
  "default": "./package.json"
17
17
  },
18
18
  ".": {
19
- "types": "./index.d.ts",
19
+ "types": "./types/cidaas-logger-ui-sdk.d.ts",
20
20
  "default": "./fesm2022/cidaas-logger-ui-sdk.mjs"
21
21
  }
22
22
  },
23
- "sideEffects": false
23
+ "sideEffects": false,
24
+ "type": "module"
24
25
  }
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, ModuleWithProviders, Provider } from '@angular/core';
2
+ import { ModuleWithProviders, InjectionToken, Provider } from '@angular/core';
3
3
  import * as i1 from '@angular/platform-browser';
4
- import { Integration } from '@sentry/types';
4
+ import { Integration } from '@sentry/core';
5
5
 
6
6
  type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';
7
7
  type LogLevelValue = 0 | 1 | 2 | 3 | 4;