@rxap/nest-sentry 10.5.0-dev.0 → 10.5.0-dev.10

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,52 @@
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
+ # [10.5.0-dev.10](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.9...@rxap/nest-sentry@10.5.0-dev.10) (2025-01-30)
7
+
8
+ **Note:** Version bump only for package @rxap/nest-sentry
9
+
10
+ # [10.5.0-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.8...@rxap/nest-sentry@10.5.0-dev.9) (2025-01-29)
11
+
12
+ **Note:** Version bump only for package @rxap/nest-sentry
13
+
14
+ # [10.5.0-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.7...@rxap/nest-sentry@10.5.0-dev.8) (2025-01-29)
15
+
16
+ **Note:** Version bump only for package @rxap/nest-sentry
17
+
18
+ # [10.5.0-dev.7](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.6...@rxap/nest-sentry@10.5.0-dev.7) (2025-01-29)
19
+
20
+ **Note:** Version bump only for package @rxap/nest-sentry
21
+
22
+ # [10.5.0-dev.6](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.5...@rxap/nest-sentry@10.5.0-dev.6) (2025-01-28)
23
+
24
+ **Note:** Version bump only for package @rxap/nest-sentry
25
+
26
+ # [10.5.0-dev.5](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.4...@rxap/nest-sentry@10.5.0-dev.5) (2025-01-28)
27
+
28
+ **Note:** Version bump only for package @rxap/nest-sentry
29
+
30
+ # [10.5.0-dev.4](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.3...@rxap/nest-sentry@10.5.0-dev.4) (2025-01-22)
31
+
32
+ ### Features
33
+
34
+ - add validation schema ([792719a](https://gitlab.com/rxap/packages/commit/792719a1bbea5aef18b7352933f0650725485e99))
35
+
36
+ # [10.5.0-dev.3](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.2...@rxap/nest-sentry@10.5.0-dev.3) (2025-01-21)
37
+
38
+ **Note:** Version bump only for package @rxap/nest-sentry
39
+
40
+ # [10.5.0-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.1...@rxap/nest-sentry@10.5.0-dev.2) (2025-01-16)
41
+
42
+ ### Bug Fixes
43
+
44
+ - improve logging output ([f9b8a0d](https://gitlab.com/rxap/packages/commit/f9b8a0d59694a6548a73744685c507ff0ceb262a))
45
+
46
+ # [10.5.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.5.0-dev.0...@rxap/nest-sentry@10.5.0-dev.1) (2025-01-16)
47
+
48
+ ### Features
49
+
50
+ - support custom print messages function ([db34f07](https://gitlab.com/rxap/packages/commit/db34f070178b9ea7a453304e7f66d20d3a508e01))
51
+
6
52
  # [10.5.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.4.6-dev.0...@rxap/nest-sentry@10.5.0-dev.0) (2025-01-15)
7
53
 
8
54
  ### Features
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
- "version": "10.5.0-dev.0",
2
+ "version": "10.5.0-dev.10",
3
3
  "name": "@rxap/nest-sentry",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "dependencies": {
6
- "@nx/devkit": "20.3.1",
7
- "@rxap/ts-morph": "^1.5.3-dev.0",
8
- "@rxap/workspace-utilities": "^19.6.1-dev.0",
6
+ "@nx/devkit": "20.4.0",
7
+ "@rxap/ts-morph": "^1.5.3-dev.3",
8
+ "@rxap/workspace-utilities": "^19.6.1-dev.7",
9
9
  "tslib": "2.6.2"
10
10
  },
11
11
  "peerDependencies": {
12
12
  "@nestjs/common": "^10.3.8",
13
13
  "@nestjs/config": "^3.2.2",
14
14
  "@nestjs/core": "^10.3.8",
15
- "@rxap/nest-logger": "^10.2.11-dev.0",
16
- "@rxap/nest-utilities": "^10.3.9-dev.0",
15
+ "@rxap/nest-logger": "^10.3.0-dev.8",
16
+ "@rxap/nest-utilities": "^10.4.0-dev.1",
17
17
  "@sentry/core": "^8.18.0",
18
18
  "@sentry/nestjs": "^8.18.0",
19
19
  "@sentry/node": "^8.18.0",
@@ -79,11 +79,15 @@
79
79
  },
80
80
  {
81
81
  "package": "@rxap/nest-logger",
82
- "version": "10.2.11-dev.0"
82
+ "version": "10.3.0-dev.8"
83
83
  },
84
84
  {
85
85
  "package": "@rxap/nest-utilities",
86
- "version": "10.3.9-dev.0"
86
+ "version": "10.4.0-dev.1"
87
+ },
88
+ {
89
+ "package": "@rxap/utilities",
90
+ "version": "16.4.2-dev.2"
87
91
  },
88
92
  {
89
93
  "package": "@sentry/core",
@@ -121,7 +125,7 @@
121
125
  "directory": "packages/nest/sentry"
122
126
  },
123
127
  "type": "commonjs",
124
- "gitHead": "53662c33c565118f22d8d14ea8205f530437cf8f",
128
+ "gitHead": "46346e73f18714b44ad1c9dafb311abdab1c33f1",
125
129
  "types": "./src/index.d.ts",
126
130
  "main": "./src/index.js"
127
131
  }
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './lib/sentry-app-config';
1
2
  export * from './lib/sentry-logger.module';
2
3
  export * from './lib/sentry-options.factory';
3
4
  export * from './lib/sentry.interceptor';
package/src/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  // region
5
+ tslib_1.__exportStar(require("./lib/sentry-app-config"), exports);
5
6
  tslib_1.__exportStar(require("./lib/sentry-logger.module"), exports);
6
7
  tslib_1.__exportStar(require("./lib/sentry-options.factory"), exports);
7
8
  tslib_1.__exportStar(require("./lib/sentry.interceptor"), exports);
@@ -0,0 +1,3 @@
1
+ import { Environment } from '@rxap/nest-utilities';
2
+ import type { SchemaMap } from 'joi';
3
+ export declare function sentryValidationSchema(environment: Environment): SchemaMap;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sentryValidationSchema = sentryValidationSchema;
4
+ const Joi = require("joi");
5
+ function sentryValidationSchema(environment) {
6
+ const schema = {};
7
+ schema['SENTRY_DEBUG'] = Joi.string().default(environment.sentry?.debug ?? false);
8
+ schema['SENTRY_SERVER_NAME'] = Joi.string().default(process.env['ROOT_DOMAIN'] ?? environment.app);
9
+ schema['SENTRY_RELEASE'] = Joi.string();
10
+ schema['SENTRY_ENVIRONMENT'] = Joi.string();
11
+ schema['SENTRY_ENABLED'] = Joi.string().default(environment.sentry?.enabled ?? false);
12
+ schema['SENTRY_DSN'] = Joi.string();
13
+ return schema;
14
+ }
@@ -17,7 +17,7 @@ function SentryOptionsFactory(environment) {
17
17
  maxValueLength: config.get('SENTRY_MAX_VALUE_LENGTH', Number.MAX_SAFE_INTEGER),
18
18
  normalizeDepth: config.get('SENTRY_NORMALIZE_DEPTH', 5),
19
19
  };
20
- console.debug('SentryOptions:', JSON.stringify(options));
20
+ console.debug(`[SentryOptionsFactory] SentryOptions: ${JSON.stringify(options)}`);
21
21
  return options;
22
22
  };
23
23
  }
@@ -1,4 +1,5 @@
1
1
  import { ConsoleLoggerOptions, DynamicModule } from '@nestjs/common';
2
+ import { PrintMessagesFunction } from '@rxap/nest-logger';
2
3
  import { SentryInterceptorOptions, SentryModuleOptions } from './sentry.interfaces';
3
4
  export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<SentryModuleOptions, "register", "create", {
4
5
  isGlobal: boolean;
@@ -13,8 +14,8 @@ export declare const ConfigurableModuleClass: import("@nestjs/common").Configura
13
14
  }>;
14
15
  export declare const DEFAULT_SENTRY_INTERCEPTOR_OPTIONS: SentryInterceptorOptions;
15
16
  export declare class SentryModule extends ConfigurableModuleClass {
16
- static register(options?: typeof OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions): DynamicModule;
17
- static registerAsync(options: typeof ASYNC_OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions): DynamicModule;
17
+ static register(options?: typeof OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions, printMessagesFunction?: PrintMessagesFunction | null): DynamicModule;
18
+ static registerAsync(options: typeof ASYNC_OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions, printMessagesFunction?: PrintMessagesFunction | null): DynamicModule;
18
19
  private static updateProviders;
19
20
  static forRoot(options: typeof OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions): DynamicModule;
20
21
  static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE, consoleLoggerOptions?: ConsoleLoggerOptions): DynamicModule;
@@ -25,13 +25,13 @@ exports.DEFAULT_SENTRY_INTERCEPTOR_OPTIONS = {
25
25
  ],
26
26
  };
27
27
  let SentryModule = class SentryModule extends exports.ConfigurableModuleClass {
28
- static register(options = {}, consoleLoggerOptions = {}) {
29
- return this.updateProviders(super.register(options), consoleLoggerOptions);
28
+ static register(options = {}, consoleLoggerOptions = {}, printMessagesFunction = null) {
29
+ return this.updateProviders(super.register(options), consoleLoggerOptions, printMessagesFunction);
30
30
  }
31
- static registerAsync(options, consoleLoggerOptions = {}) {
32
- return this.updateProviders(super.registerAsync(options), consoleLoggerOptions);
31
+ static registerAsync(options, consoleLoggerOptions = {}, printMessagesFunction = null) {
32
+ return this.updateProviders(super.registerAsync(options), consoleLoggerOptions, printMessagesFunction);
33
33
  }
34
- static updateProviders(module, { timestamp, logLevels, ...consoleLoggerOptions }) {
34
+ static updateProviders(module, { timestamp, logLevels, ...consoleLoggerOptions }, printMessagesFunction) {
35
35
  module.providers ??= [];
36
36
  module.providers.push({
37
37
  provide: tokens_1.SENTRY_MODULE_OPTIONS,
@@ -50,6 +50,12 @@ let SentryModule = class SentryModule extends exports.ConfigurableModuleClass {
50
50
  useFactory: (options) => options.interceptors ?? exports.DEFAULT_SENTRY_INTERCEPTOR_OPTIONS,
51
51
  inject: [exports.MODULE_OPTIONS_TOKEN]
52
52
  });
53
+ if (printMessagesFunction) {
54
+ module.providers.push({
55
+ provide: nest_logger_1.RXAP_LOGGER_PRINT_MESSAGES,
56
+ useValue: printMessagesFunction
57
+ });
58
+ }
53
59
  module.providers.push({
54
60
  provide: core_1.APP_INTERCEPTOR,
55
61
  useClass: sentry_interceptor_1.SentryInterceptor,