@estgbue/mezgeb 0.0.32 → 0.0.33

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.
@@ -1,11 +1,4 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- export interface AuditClientModuleOptions {
3
- /** Optional TypeORM connection name; defaults to the default connection. */
4
- connectionName?: string;
5
- /** Custom DataSource injection token; overrides connectionName when provided. */
6
- dataSourceToken?: string | symbol;
7
- }
8
1
  export declare class AuditClientModule {
9
- static register(options?: AuditClientModuleOptions): DynamicModule;
2
+ constructor();
10
3
  }
11
4
  //# sourceMappingURL=client.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.module.d.ts","sourceRoot":"","sources":["../../../libs/mezgeb/src/mezgeb/client/client.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAUvD,MAAM,WAAW,wBAAwB;IACvC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,qBACa,iBAAiB;IAC5B,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAE,wBAA6B,GAAG,aAAa;CA0BvE"}
1
+ {"version":3,"file":"client.module.d.ts","sourceRoot":"","sources":["../../../libs/mezgeb/src/mezgeb/client/client.module.ts"],"names":[],"mappings":"AAUA,qBAqBa,iBAAiB;;CAI5B"}
@@ -5,7 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
- var AuditClientModule_1;
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
9
11
  Object.defineProperty(exports, "__esModule", { value: true });
10
12
  exports.AuditClientModule = void 0;
11
13
  const common_1 = require("@nestjs/common");
@@ -16,34 +18,31 @@ const mezgeb_enum_1 = require("../mezgeb.enum");
16
18
  const client_audit_interceptor_1 = require("./client-audit.interceptor");
17
19
  const client_logger_config_1 = require("./client.logger.config");
18
20
  const client_subscriber_1 = require("./client.subscriber");
19
- let AuditClientModule = AuditClientModule_1 = class AuditClientModule {
20
- static register(options = {}) {
21
- var _a;
22
- const dataSourceToken = (_a = options.dataSourceToken) !== null && _a !== void 0 ? _a : (0, typeorm_1.getDataSourceToken)(options.connectionName);
23
- return {
24
- module: AuditClientModule_1,
25
- imports: [
26
- microservices_1.ClientsModule.register([client_logger_config_1.auditLoggerConfig]),
27
- typeorm_1.TypeOrmModule.forFeature([], options.connectionName),
28
- ],
29
- providers: [
30
- core_1.Reflector,
31
- {
32
- provide: core_1.APP_INTERCEPTOR,
33
- useClass: client_audit_interceptor_1.ClientLoggerInterceptor,
34
- },
35
- {
36
- provide: mezgeb_enum_1.AuditDatasource,
37
- useFactory: (dataSource) => dataSource,
38
- inject: [dataSourceToken],
39
- },
40
- client_subscriber_1.ClientSubscriber,
41
- ],
42
- exports: [mezgeb_enum_1.AuditDatasource],
43
- };
21
+ let AuditClientModule = class AuditClientModule {
22
+ constructor() {
23
+ common_1.Logger.log('Audit Client Module initialized');
44
24
  }
45
25
  };
46
26
  exports.AuditClientModule = AuditClientModule;
47
- exports.AuditClientModule = AuditClientModule = AuditClientModule_1 = __decorate([
48
- (0, common_1.Module)({})
27
+ exports.AuditClientModule = AuditClientModule = __decorate([
28
+ (0, common_1.Module)({
29
+ imports: [
30
+ microservices_1.ClientsModule.register([client_logger_config_1.auditLoggerConfig]),
31
+ typeorm_1.TypeOrmModule.forFeature([]), // 👈 required even if no entities
32
+ ],
33
+ providers: [
34
+ core_1.Reflector,
35
+ {
36
+ provide: core_1.APP_INTERCEPTOR,
37
+ useClass: client_audit_interceptor_1.ClientLoggerInterceptor,
38
+ },
39
+ {
40
+ provide: mezgeb_enum_1.AuditDatasource,
41
+ useFactory: (dataSource) => dataSource,
42
+ inject: [(0, typeorm_1.getDataSourceToken)()],
43
+ },
44
+ client_subscriber_1.ClientSubscriber,
45
+ ],
46
+ }),
47
+ __metadata("design:paramtypes", [])
49
48
  ], AuditClientModule);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@estgbue/mezgeb",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "main": "./src/index",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"