@rxap/nest-sentry 10.1.0-dev.1 → 10.1.0-dev.3

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,28 @@
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.1.0-dev.3](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@9.1.0-dev.2...@rxap/nest-sentry@10.1.0-dev.3) (2023-10-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - add licence file to publishable packages ([d7de1cb](https://gitlab.com/rxap/packages/commit/d7de1cb9db1bd1628f37084e3b0ffd1755aa75f6))
11
+ - change from commonjs to es2022 ([cf675a7](https://gitlab.com/rxap/packages/commit/cf675a7254de9ce4b269264df59794dd42fcbd8b))
12
+ - ensure the project name is not included in the project tag list ([46d4479](https://gitlab.com/rxap/packages/commit/46d44798258ea1b20df9d4408b9c0809f55027b2))
13
+ - generate readme with peer dependencies to install ([27c2cd7](https://gitlab.com/rxap/packages/commit/27c2cd7d98f0c8a499b8c30719f49d69e4970ae9))
14
+ - peer dependency issue ([ee95415](https://gitlab.com/rxap/packages/commit/ee95415370d9ef2396916d6c25061a0df791034a))
15
+
16
+ ### Features
17
+
18
+ - add SetupSentryLogger function ([1424be7](https://gitlab.com/rxap/packages/commit/1424be7c4bac5a39782877c4145db5b95646ffb3))
19
+
20
+ ### Reverts
21
+
22
+ - change from commonjs to es2022 ([50eca61](https://gitlab.com/rxap/packages/commit/50eca61e9a89388d1cfeefb8b1029b302b6f307e))
23
+
24
+ # [10.1.0-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.1.0-dev.1...@rxap/nest-sentry@10.1.0-dev.2) (2023-09-27)
25
+
26
+ **Note:** Version bump only for package @rxap/nest-sentry
27
+
6
28
  # [10.1.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@10.1.0-dev.0...@rxap/nest-sentry@10.1.0-dev.1) (2023-09-12)
7
29
 
8
30
  ### Bug Fixes
package/README.md CHANGED
@@ -17,5 +17,5 @@ yarn add @rxap/nest-sentry
17
17
  ```
18
18
  **Install peer dependencies:**
19
19
  ```bash
20
- yarn add @nestjs/common@^10.0.5 @nestjs/config@^3.0.0 @rxap/nest-logger@* @sentry/core@^7.28.1 @sentry/node@^7.28.1 @sentry/types@^7.28.1 rxjs@^7.8.0 tslib@2.6.2
20
+ yarn add @nestjs/common@^10.0.5 @nestjs/config@^3.0.0 @rxap/nest-logger@^10.1.0-dev.6 @rxap/nest-utilities@^10.1.0-dev.12 @sentry/core@^7.28.1 @sentry/node@^7.28.1 @sentry/types@^7.28.1 rxjs@^7.8.0 tslib@2.6.2
21
21
  ```
package/package.json CHANGED
@@ -1,19 +1,25 @@
1
1
  {
2
- "version": "10.1.0-dev.1",
2
+ "version": "10.1.0-dev.3",
3
3
  "name": "@rxap/nest-sentry",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "dependencies": {
6
+ "@nestjs/core": "10.0.5",
7
+ "@nestjs/throttler": "^5.0.0",
8
+ "class-transformer": "0.5.1",
9
+ "class-validator": "0.14.0",
6
10
  "tslib": "2.6.2"
7
11
  },
8
12
  "peerDependencies": {
9
13
  "@nestjs/common": "^10.0.5",
10
14
  "@nestjs/config": "^3.0.0",
11
- "@rxap/nest-logger": "*",
15
+ "@rxap/nest-logger": "^10.1.0-dev.6",
16
+ "@rxap/nest-utilities": "^10.1.0-dev.12",
12
17
  "@sentry/core": "^7.28.1",
13
18
  "@sentry/node": "^7.28.1",
14
19
  "@sentry/types": "^7.28.1",
15
20
  "rxjs": "^7.8.0",
16
- "tslib": "2.6.2"
21
+ "tslib": "2.6.2",
22
+ "@rxap/utilities": "16.0.0-dev.22"
17
23
  },
18
24
  "author": {
19
25
  "name": "Merzough Münker",
@@ -35,7 +41,11 @@
35
41
  "packageGroup": [
36
42
  {
37
43
  "package": "@rxap/nest-logger",
38
- "version": "10.1.0-dev.4"
44
+ "version": "10.1.0-dev.6"
45
+ },
46
+ {
47
+ "package": "@rxap/nest-utilities",
48
+ "version": "10.1.0-dev.12"
39
49
  }
40
50
  ]
41
51
  },
@@ -49,7 +59,7 @@
49
59
  "directory": "packages/nest/sentry"
50
60
  },
51
61
  "type": "commonjs",
52
- "gitHead": "db8e53ef6cfd297abb6f8c4fb54f289f9c971fe4",
62
+ "gitHead": "cc79abe8b76799cf9e91a91b92e8172b23a74b13",
53
63
  "main": "./src/index.js",
54
64
  "types": "./src/index.d.ts"
55
65
  }
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './lib/sentry-options.factory';
1
2
  export * from './lib/sentry.interceptor';
2
3
  export * from './lib/sentry.interfaces';
3
4
  export * from './lib/sentry.logger';
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-options.factory"), exports);
5
6
  tslib_1.__exportStar(require("./lib/sentry.interceptor"), exports);
6
7
  tslib_1.__exportStar(require("./lib/sentry.interfaces"), exports);
7
8
  tslib_1.__exportStar(require("./lib/sentry.logger"), exports);
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/nest/sentry/src/index.ts"],"names":[],"mappings":";;;AAAA,UAAU;AACV,mEAAyC;AACzC,kEAAwC;AACxC,8DAAoC;AACpC,8DAAoC;AACpC,+DAAqC;AACrC,oEAA0C;AAC1C,uDAA6B;AAC7B,YAAY"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/nest/sentry/src/index.ts"],"names":[],"mappings":";;;AAAA,UAAU;AACV,uEAA6C;AAC7C,mEAAyC;AACzC,kEAAwC;AACxC,8DAAoC;AACpC,8DAAoC;AACpC,+DAAqC;AACrC,oEAA0C;AAC1C,uDAA6B;AAC7B,YAAY"}
@@ -0,0 +1,4 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { Environment } from '@rxap/nest-utilities';
3
+ import { SentryModuleOptions } from './sentry.interfaces';
4
+ export declare function SentryOptionsFactory(environment: Environment): (config: ConfigService) => SentryModuleOptions;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SentryOptionsFactory = void 0;
4
+ const nest_utilities_1 = require("@rxap/nest-utilities");
5
+ function SentryOptionsFactory(environment) {
6
+ return (config) => {
7
+ const options = {
8
+ dsn: config.get('SENTRY_DSN'),
9
+ enabled: config.get('SENTRY_ENABLED', false),
10
+ environment: config.get('SENTRY_ENVIRONMENT', (0, nest_utilities_1.DetermineEnvironment)(environment)),
11
+ release: config.get('SENTRY_RELEASE', (0, nest_utilities_1.DetermineRelease)(environment)),
12
+ serverName: config.get('SENTRY_SERVER_NAME', environment.name),
13
+ debug: config.get('SENTRY_DEBUG', false),
14
+ tracesSampleRate: config.get('SENTRY_TRACES_SAMPLE_RATE', 1.0),
15
+ profilesSampleRate: config.get('SENTRY_PROFILES_SAMPLE_RATE', 1.0),
16
+ logLevels: config.get('SENTRY_LOG_LEVELS', ['warn', 'error']),
17
+ maxValueLength: config.get('SENTRY_MAX_VALUE_LENGTH', Number.MAX_SAFE_INTEGER),
18
+ normalizeDepth: config.get('SENTRY_NORMALIZE_DEPTH', 5),
19
+ };
20
+ console.debug('SentryOptions:', JSON.stringify(options));
21
+ return options;
22
+ };
23
+ }
24
+ exports.SentryOptionsFactory = SentryOptionsFactory;
25
+ //# sourceMappingURL=sentry-options.factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-options.factory.js","sourceRoot":"","sources":["../../../../../../packages/nest/sentry/src/lib/sentry-options.factory.ts"],"names":[],"mappings":";;;AACA,yDAI8B;AAG9B,SAAgB,oBAAoB,CAAC,WAAwB;IAC3D,OAAO,CAAC,MAAqB,EAAE,EAAE;QAC/B,MAAM,OAAO,GAAwB;YACnC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;YAC7B,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC;YAC5C,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAA,qCAAoB,EAAC,WAAW,CAAC,CAAC;YAChF,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAA,iCAAgB,EAAC,WAAW,CAAC,CAAC;YACpE,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,WAAW,CAAC,IAAI,CAAC;YAC9D,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC;YACxC,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,2BAA2B,EAAE,GAAG,CAAC;YAC9D,kBAAkB,EAAE,MAAM,CAAC,GAAG,CAAC,6BAA6B,EAAE,GAAG,CAAC;YAClE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAE,MAAM,EAAE,OAAO,CAAE,CAAC;YAC/D,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,yBAAyB,EAAE,MAAM,CAAC,gBAAgB,CAAC;YAC9E,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,wBAAwB,EAAE,CAAC,CAAC;SACxD,CAAC;QACF,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACzD,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAlBD,oDAkBC"}
@@ -11,13 +11,13 @@ export type SentryModuleOptions = Omit<NodeOptions, 'integrations'> & {
11
11
  integrations?: Integration[];
12
12
  close?: SentryCloseOptions;
13
13
  } & ConsoleLoggerOptions;
14
- export interface SentryOptionsFactory {
14
+ export interface ISentryOptionsFactory {
15
15
  createSentryModuleOptions(): Promise<SentryModuleOptions> | SentryModuleOptions;
16
16
  }
17
17
  export interface SentryModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
18
18
  inject?: any[];
19
- useClass?: Type<SentryOptionsFactory>;
20
- useExisting?: Type<SentryOptionsFactory>;
19
+ useClass?: Type<ISentryOptionsFactory>;
20
+ useExisting?: Type<ISentryOptionsFactory>;
21
21
  useFactory?: (...args: any[]) => Promise<SentryModuleOptions> | SentryModuleOptions;
22
22
  }
23
23
  export interface SentryFilterFunction {
@@ -1,6 +1,6 @@
1
1
  import { DynamicModule } from '@nestjs/common';
2
- import { SentryModuleAsyncOptions, SentryModuleOptions } from './sentry.interfaces';
3
2
  import { ConsoleLoggerOptions } from '@nestjs/common/services/console-logger.service';
3
+ import { SentryModuleAsyncOptions, SentryModuleOptions } from './sentry.interfaces';
4
4
  export declare class SentryModule {
5
5
  static forRoot(options: SentryModuleOptions, { timestamp, logLevels, }?: ConsoleLoggerOptions): DynamicModule;
6
6
  static forRootAsync(options: SentryModuleAsyncOptions, { timestamp, logLevels, }?: ConsoleLoggerOptions): DynamicModule;
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.SentryModule = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const common_1 = require("@nestjs/common");
7
- const tokens_1 = require("./tokens");
8
7
  const sentry_logger_1 = require("./sentry.logger");
9
8
  const sentry_service_1 = require("./sentry.service");
9
+ const tokens_1 = require("./tokens");
10
10
  let SentryModule = exports.SentryModule = SentryModule_1 = class SentryModule {
11
11
  static forRoot(options, { timestamp, logLevels, } = {}) {
12
12
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"sentry.module.js","sourceRoot":"","sources":["../../../../../../packages/nest/sentry/src/lib/sentry.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAMwB;AACxB,qCAGkB;AAMlB,mDAA+C;AAC/C,qDAAiD;AAQ1C,IAAM,YAAY,2CAAlB,MAA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,QAAQ;aACT;SACF,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,0BAA0B,CACvC,OAAiC;QAEjC,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,OAAO;gBACL,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;gBAC5B,OAAO,EAAE,8BAAqB;gBAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC;SACH;QACD,MAAM,MAAM,GAAG;YACb,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,WAAW,CAA+B;SACxE,CAAC;QACF,OAAO;YACL,OAAO,EAAE,8BAAqB;YAC9B,UAAU,EAAE,KAAK,EAAE,cAAoC,EAAE,EAAE,CACzD,MAAM,cAAc,CAAC,yBAAyB,EAAE;YAClD,MAAM;SACP,CAAC;IACJ,CAAC;CAEF,CAAA;uBAxFY,YAAY;IALxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAE,4BAAY,EAAE,8BAAa,CAAE;QAC1C,OAAO,EAAE,CAAE,4BAAY,EAAE,8BAAa,CAAE;KACzC,CAAC;GACW,YAAY,CAwFxB"}
1
+ {"version":3,"file":"sentry.module.js","sourceRoot":"","sources":["../../../../../../packages/nest/sentry/src/lib/sentry.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAMwB;AAOxB,mDAA+C;AAC/C,qDAAiD;AACjD,qCAGkB;AAOX,IAAM,YAAY,2CAAlB,MAAM,YAAY;IAChB,MAAM,CAAC,OAAO,CACnB,OAA4B,EAC5B,EACE,SAAS,EACT,SAAS,MACe,EAAE;QAE5B,OAAO;YACL,OAAO,EAAE,CAAE,8BAAa,CAAE;YAC1B,MAAM,EAAE,cAAY;YACpB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,8BAAqB;oBAC9B,QAAQ,EAAE,OAAO;iBAClB;gBACD;oBACE,OAAO,EAAE,+BAAsB;oBAC/B,QAAQ,EAAE;wBACR,SAAS,EAAE,SAA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