@rxap/nest-sentry 11.0.0-dev.8 → 11.0.0-dev.9

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [11.0.0-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@11.0.0-dev.8...@rxap/nest-sentry@11.0.0-dev.9) (2025-09-08)
7
+
8
+ **Note:** Version bump only for package @rxap/nest-sentry
9
+
6
10
  # [11.0.0-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@11.0.0-dev.7...@rxap/nest-sentry@11.0.0-dev.8) (2025-09-08)
7
11
 
8
12
  ### Bug Fixes
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "11.0.0-dev.8",
2
+ "version": "11.0.0-dev.9",
3
3
  "name": "@rxap/nest-sentry",
4
4
  "description": "This package provides a Sentry integration for NestJS applications. It includes a logger, interceptor, and module to simplify error tracking and performance monitoring with Sentry. It offers configurable options for setting up Sentry in your NestJS application.\n",
5
5
  "license": "GPL-3.0-or-later",
@@ -128,7 +128,7 @@
128
128
  },
129
129
  "schematics": "./generators.json",
130
130
  "type": "commonjs",
131
- "gitHead": "0475a784cc9348a8c62037f3239b7d9af7695190",
131
+ "gitHead": "89b366e39c6d6f00d6d5872c763c418c45d0737d",
132
132
  "types": "./src/index.d.ts",
133
133
  "main": "./src/index.js"
134
134
  }
package/src/index.d.ts CHANGED
@@ -3,9 +3,9 @@ export * from './lib/determine-sentry-release';
3
3
  export * from './lib/get-sentry-log-levels';
4
4
  export * from './lib/sentry-app-config';
5
5
  export * from './lib/sentry-init-hook';
6
+ export * from './lib/sentry-logger.module';
6
7
  export * from './lib/sentry-module-options.factory';
7
8
  export * from './lib/sentry.interfaces';
8
9
  export * from './lib/sentry.logger';
9
- export * from './lib/sentry.module';
10
10
  export * from './lib/tokens';
11
11
  export * from './lib/use-sentry-logger-factory';
package/src/index.js CHANGED
@@ -7,10 +7,10 @@ tslib_1.__exportStar(require("./lib/determine-sentry-release"), exports);
7
7
  tslib_1.__exportStar(require("./lib/get-sentry-log-levels"), exports);
8
8
  tslib_1.__exportStar(require("./lib/sentry-app-config"), exports);
9
9
  tslib_1.__exportStar(require("./lib/sentry-init-hook"), exports);
10
+ tslib_1.__exportStar(require("./lib/sentry-logger.module"), exports);
10
11
  tslib_1.__exportStar(require("./lib/sentry-module-options.factory"), exports);
11
12
  tslib_1.__exportStar(require("./lib/sentry.interfaces"), exports);
12
13
  tslib_1.__exportStar(require("./lib/sentry.logger"), exports);
13
- tslib_1.__exportStar(require("./lib/sentry.module"), exports);
14
14
  tslib_1.__exportStar(require("./lib/tokens"), exports);
15
15
  tslib_1.__exportStar(require("./lib/use-sentry-logger-factory"), exports);
16
16
  // endregion
@@ -1,4 +1,4 @@
1
- import { DynamicModule } from '@nestjs/common';
1
+ import { ConsoleLoggerOptions, DynamicModule } from '@nestjs/common';
2
2
  import { PrintMessagesFunction } from '@rxap/nest-logger';
3
3
  import { SentryModuleOptions } from './sentry.interfaces';
4
4
  export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<SentryModuleOptions, "register", "create", {
@@ -8,8 +8,8 @@ export declare const ConfigurableModuleClass: import("@nestjs/common").Configura
8
8
  }>, ASYNC_OPTIONS_TYPE: import("@nestjs/common").ConfigurableModuleAsyncOptions<SentryModuleOptions, "create"> & Partial<{
9
9
  isGlobal: boolean;
10
10
  }>;
11
- export declare class SentryModule extends ConfigurableModuleClass {
12
- static register(options: typeof OPTIONS_TYPE, printMessagesFunction?: PrintMessagesFunction | null): DynamicModule;
13
- static registerAsync(options: typeof ASYNC_OPTIONS_TYPE, printMessagesFunction?: PrintMessagesFunction | null): DynamicModule;
11
+ export declare class SentryLoggerModule extends ConfigurableModuleClass {
12
+ static register(options: typeof OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions | null, printMessagesFunction?: PrintMessagesFunction | null): DynamicModule;
13
+ static registerAsync(options: typeof ASYNC_OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions | null, printMessagesFunction?: PrintMessagesFunction | null): DynamicModule;
14
14
  private static updateProviders;
15
15
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SentryModule = exports.ASYNC_OPTIONS_TYPE = exports.OPTIONS_TYPE = exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
4
+ exports.SentryLoggerModule = exports.ASYNC_OPTIONS_TYPE = exports.OPTIONS_TYPE = exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const common_1 = require("@nestjs/common");
7
7
  const config_1 = require("@nestjs/config");
@@ -14,14 +14,14 @@ _a = new common_1.ConfigurableModuleBuilder()
14
14
  isGlobal: true,
15
15
  })
16
16
  .build(), exports.ConfigurableModuleClass = _a.ConfigurableModuleClass, exports.MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN, exports.OPTIONS_TYPE = _a.OPTIONS_TYPE, exports.ASYNC_OPTIONS_TYPE = _a.ASYNC_OPTIONS_TYPE;
17
- let SentryModule = class SentryModule extends exports.ConfigurableModuleClass {
18
- static register(options, printMessagesFunction = null) {
19
- return this.updateProviders(super.register(options), printMessagesFunction);
17
+ let SentryLoggerModule = class SentryLoggerModule extends exports.ConfigurableModuleClass {
18
+ static register(options, consoleLoggerOptions = null, printMessagesFunction = null) {
19
+ return this.updateProviders(super.register(options), consoleLoggerOptions, printMessagesFunction);
20
20
  }
21
- static registerAsync(options, printMessagesFunction = null) {
22
- return this.updateProviders(super.registerAsync(options), printMessagesFunction);
21
+ static registerAsync(options, consoleLoggerOptions = null, printMessagesFunction = null) {
22
+ return this.updateProviders(super.registerAsync(options), consoleLoggerOptions, printMessagesFunction);
23
23
  }
24
- static updateProviders(module, printMessagesFunction) {
24
+ static updateProviders(module, consoleLoggerOptions = null, printMessagesFunction) {
25
25
  module.providers ??= [];
26
26
  module.providers.push({
27
27
  provide: tokens_1.SENTRY_MODULE_OPTIONS,
@@ -33,6 +33,7 @@ let SentryModule = class SentryModule extends exports.ConfigurableModuleClass {
33
33
  timestamp: true,
34
34
  logLevels: (0, nest_utilities_1.GetLogLevels)(),
35
35
  ...options.logger ?? {},
36
+ ...consoleLoggerOptions ?? {},
36
37
  }),
37
38
  inject: [tokens_1.SENTRY_MODULE_OPTIONS],
38
39
  });
@@ -45,8 +46,8 @@ let SentryModule = class SentryModule extends exports.ConfigurableModuleClass {
45
46
  return module;
46
47
  }
47
48
  };
48
- exports.SentryModule = SentryModule;
49
- exports.SentryModule = SentryModule = tslib_1.__decorate([
49
+ exports.SentryLoggerModule = SentryLoggerModule;
50
+ exports.SentryLoggerModule = SentryLoggerModule = tslib_1.__decorate([
50
51
  (0, common_1.Global)(),
51
52
  (0, common_1.Module)({
52
53
  providers: [
@@ -68,4 +69,4 @@ exports.SentryModule = SentryModule = tslib_1.__decorate([
68
69
  imports: [],
69
70
  exports: [common_1.Logger],
70
71
  })
71
- ], SentryModule);
72
+ ], SentryLoggerModule);
@@ -1,10 +1,7 @@
1
- import { ConfigurableModuleOptionsFactory, Logger } from '@nestjs/common';
2
- import { ConsoleLoggerOptions } from '@nestjs/common/services/console-logger.service';
1
+ import { ConfigurableModuleOptionsFactory } from '@nestjs/common';
3
2
  import { ConfigService } from '@nestjs/config';
4
3
  import { SentryModuleOptions } from '@rxap/nest-sentry';
5
4
  export declare class SentryModuleOptionsFactory implements ConfigurableModuleOptionsFactory<SentryModuleOptions, 'create'> {
6
5
  protected readonly config: ConfigService;
7
- protected readonly logger: Logger;
8
- protected readonly options?: ConsoleLoggerOptions;
9
6
  create(): Promise<SentryModuleOptions>;
10
7
  }
@@ -4,17 +4,22 @@ exports.SentryModuleOptionsFactory = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const common_1 = require("@nestjs/common");
6
6
  const config_1 = require("@nestjs/config");
7
- const nest_logger_1 = require("@rxap/nest-logger");
8
7
  const nest_utilities_1 = require("@rxap/nest-utilities");
9
8
  const get_sentry_log_levels_1 = require("./get-sentry-log-levels");
10
9
  let SentryModuleOptionsFactory = class SentryModuleOptionsFactory {
10
+ // Do not inject the logger, because it will be created circularly with the SentryModule
11
+ // @Inject(Logger)
12
+ // protected readonly logger!: Logger;
13
+ // Do not inject the logger, because it will be created circularly with the SentryModule
14
+ // @Optional()
15
+ // @Inject(CONSOLE_LOGGER_OPTIONS)
16
+ // protected readonly options?: ConsoleLoggerOptions;
11
17
  async create() {
12
18
  return {
13
19
  logLevels: (0, get_sentry_log_levels_1.GetSentryLogLevels)(this.config.getOrThrow('SENTRY_LOG_LEVEL')),
14
20
  logger: {
15
21
  timestamp: true,
16
22
  logLevels: (0, nest_utilities_1.GetLogLevels)(),
17
- ...this.options ?? {},
18
23
  }
19
24
  };
20
25
  }
@@ -24,15 +29,6 @@ tslib_1.__decorate([
24
29
  (0, common_1.Inject)(config_1.ConfigService),
25
30
  tslib_1.__metadata("design:type", config_1.ConfigService)
26
31
  ], SentryModuleOptionsFactory.prototype, "config", void 0);
27
- tslib_1.__decorate([
28
- (0, common_1.Inject)(common_1.Logger),
29
- tslib_1.__metadata("design:type", common_1.Logger)
30
- ], SentryModuleOptionsFactory.prototype, "logger", void 0);
31
- tslib_1.__decorate([
32
- (0, common_1.Optional)(),
33
- (0, common_1.Inject)(nest_logger_1.CONSOLE_LOGGER_OPTIONS),
34
- tslib_1.__metadata("design:type", Object)
35
- ], SentryModuleOptionsFactory.prototype, "options", void 0);
36
32
  exports.SentryModuleOptionsFactory = SentryModuleOptionsFactory = tslib_1.__decorate([
37
33
  (0, common_1.Injectable)()
38
34
  ], SentryModuleOptionsFactory);