@darraghor/nest-backend-libs 3.12.4 → 4.0.1

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.
Files changed (103) hide show
  1. package/dist/authorization/authz.module.d.ts +4 -0
  2. package/dist/authorization/authz.module.js +31 -20
  3. package/dist/authorization/authz.module.js.map +1 -1
  4. package/dist/authorization/authz.options.d.ts +12 -0
  5. package/dist/authorization/authz.options.js +2 -0
  6. package/dist/authorization/authz.options.js.map +1 -0
  7. package/dist/authorization/config/AuthConfigurationService.d.ts +3 -3
  8. package/dist/authorization/config/AuthConfigurationService.js +13 -17
  9. package/dist/authorization/config/AuthConfigurationService.js.map +1 -1
  10. package/dist/authzclient/AuthClientConfigurationService.d.ts +3 -3
  11. package/dist/authzclient/AuthClientConfigurationService.js +12 -9
  12. package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
  13. package/dist/authzclient/authz-client.module.d.ts +4 -0
  14. package/dist/authzclient/authz-client.module.js +27 -14
  15. package/dist/authzclient/authz-client.module.js.map +1 -1
  16. package/dist/authzclient/authz-client.options.d.ts +11 -0
  17. package/dist/authzclient/authz-client.options.js +2 -0
  18. package/dist/authzclient/authz-client.options.js.map +1 -0
  19. package/dist/core-config/CoreConfig.module.d.ts +4 -0
  20. package/dist/core-config/CoreConfig.module.js +24 -9
  21. package/dist/core-config/CoreConfig.module.js.map +1 -1
  22. package/dist/core-config/CoreConfigurationService.d.ts +4 -3
  23. package/dist/core-config/CoreConfigurationService.js +22 -17
  24. package/dist/core-config/CoreConfigurationService.js.map +1 -1
  25. package/dist/core-config/core-config.options.d.ts +27 -0
  26. package/dist/core-config/core-config.options.js +2 -0
  27. package/dist/core-config/core-config.options.js.map +1 -0
  28. package/dist/index.d.ts +19 -0
  29. package/dist/index.js +13 -0
  30. package/dist/index.js.map +1 -1
  31. package/dist/invitations/InvitationConfigurationService.d.ts +3 -3
  32. package/dist/invitations/InvitationConfigurationService.js +11 -8
  33. package/dist/invitations/InvitationConfigurationService.js.map +1 -1
  34. package/dist/invitations/invitation.module.d.ts +4 -0
  35. package/dist/invitations/invitation.module.js +34 -16
  36. package/dist/invitations/invitation.module.js.map +1 -1
  37. package/dist/invitations/invitation.options.d.ts +10 -0
  38. package/dist/invitations/invitation.options.js +2 -0
  39. package/dist/invitations/invitation.options.js.map +1 -0
  40. package/dist/logger/LoggingConfigurationService.d.ts +3 -3
  41. package/dist/logger/LoggingConfigurationService.js +14 -11
  42. package/dist/logger/LoggingConfigurationService.js.map +1 -1
  43. package/dist/logger/logger.module.d.ts +4 -0
  44. package/dist/logger/logger.module.js +24 -9
  45. package/dist/logger/logger.module.js.map +1 -1
  46. package/dist/logger/logger.options.d.ts +13 -0
  47. package/dist/logger/logger.options.js +2 -0
  48. package/dist/logger/logger.options.js.map +1 -0
  49. package/dist/root-app/core-app.module.d.ts +10 -2
  50. package/dist/root-app/core-app.module.js +94 -69
  51. package/dist/root-app/core-app.module.js.map +1 -1
  52. package/dist/smtp-email-client/EmailConfigurationService.d.ts +3 -3
  53. package/dist/smtp-email-client/EmailConfigurationService.js +18 -16
  54. package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
  55. package/dist/smtp-email-client/smtp-email-client.module.d.ts +4 -0
  56. package/dist/smtp-email-client/smtp-email-client.module.js +34 -21
  57. package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
  58. package/dist/smtp-email-client/smtp-email-client.options.d.ts +17 -0
  59. package/dist/smtp-email-client/smtp-email-client.options.js +2 -0
  60. package/dist/smtp-email-client/smtp-email-client.options.js.map +1 -0
  61. package/dist/stripe-client/StripeClientConfigurationService.d.ts +3 -3
  62. package/dist/stripe-client/StripeClientConfigurationService.js +13 -10
  63. package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
  64. package/dist/stripe-client/stripe-account.module.d.ts +4 -0
  65. package/dist/stripe-client/stripe-account.module.js +50 -39
  66. package/dist/stripe-client/stripe-account.module.js.map +1 -1
  67. package/dist/stripe-client/stripe-account.options.d.ts +12 -0
  68. package/dist/stripe-client/stripe-account.options.js +2 -0
  69. package/dist/stripe-client/stripe-account.options.js.map +1 -0
  70. package/dist/twitter-client/TwitterClientConfigurationService.d.ts +3 -3
  71. package/dist/twitter-client/TwitterClientConfigurationService.js +14 -11
  72. package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
  73. package/dist/twitter-client/twitter-account.module.d.ts +4 -0
  74. package/dist/twitter-client/twitter-account.module.js +26 -14
  75. package/dist/twitter-client/twitter-account.module.js.map +1 -1
  76. package/dist/twitter-client/twitter-account.options.d.ts +13 -0
  77. package/dist/twitter-client/twitter-account.options.js +2 -0
  78. package/dist/twitter-client/twitter-account.options.js.map +1 -0
  79. package/package.json +1 -1
  80. package/dist/authorization/config/AuthConfigurationVariables.d.ts +0 -10
  81. package/dist/authorization/config/AuthConfigurationVariables.js +0 -7
  82. package/dist/authorization/config/AuthConfigurationVariables.js.map +0 -1
  83. package/dist/authzclient/AuthClientConfigurationVariables.d.ts +0 -8
  84. package/dist/authzclient/AuthClientConfigurationVariables.js +0 -6
  85. package/dist/authzclient/AuthClientConfigurationVariables.js.map +0 -1
  86. package/dist/core-config/CoreConfigurationVariables.d.ts +0 -26
  87. package/dist/core-config/CoreConfigurationVariables.js +0 -15
  88. package/dist/core-config/CoreConfigurationVariables.js.map +0 -1
  89. package/dist/invitations/InvitationConfigurationVariables.d.ts +0 -6
  90. package/dist/invitations/InvitationConfigurationVariables.js +0 -5
  91. package/dist/invitations/InvitationConfigurationVariables.js.map +0 -1
  92. package/dist/logger/LoggingConfigurationVariables.d.ts +0 -12
  93. package/dist/logger/LoggingConfigurationVariables.js +0 -8
  94. package/dist/logger/LoggingConfigurationVariables.js.map +0 -1
  95. package/dist/smtp-email-client/EmailConfigurationVariables.d.ts +0 -20
  96. package/dist/smtp-email-client/EmailConfigurationVariables.js +0 -12
  97. package/dist/smtp-email-client/EmailConfigurationVariables.js.map +0 -1
  98. package/dist/stripe-client/StripeConfigurationVariables.d.ts +0 -10
  99. package/dist/stripe-client/StripeConfigurationVariables.js +0 -7
  100. package/dist/stripe-client/StripeConfigurationVariables.js.map +0 -1
  101. package/dist/twitter-client/TwitterConfigurationVariables.d.ts +0 -12
  102. package/dist/twitter-client/TwitterConfigurationVariables.js +0 -8
  103. package/dist/twitter-client/TwitterConfigurationVariables.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { ConfigService } from "@nestjs/config";
2
1
  import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
2
+ import { InvitationModuleOptions } from "./invitation.options.js";
3
3
  export declare class InvitationsConfigurationService extends ValidatedConfigurationService {
4
- private configService;
5
- constructor(configService: ConfigService);
4
+ private options;
5
+ constructor(options: InvitationModuleOptions);
6
6
  get baseUrl(): string;
7
7
  }
@@ -7,19 +7,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
11
- import { Injectable } from "@nestjs/common";
12
- import { ConfigService } from "@nestjs/config";
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { Inject, Injectable } from "@nestjs/common";
13
14
  import { IsDefined, IsString } from "class-validator";
14
15
  import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
16
+ import { INVITATION_MODULE_OPTIONS, } from "./invitation.options.js";
15
17
  let InvitationsConfigurationService = class InvitationsConfigurationService extends ValidatedConfigurationService {
16
- configService;
17
- constructor(configService) {
18
+ options;
19
+ constructor(options) {
18
20
  super();
19
- this.configService = configService;
21
+ this.options = options;
20
22
  }
21
23
  get baseUrl() {
22
- return this.configService.get("invitations.baseUrl");
24
+ return this.options.baseUrl;
23
25
  }
24
26
  };
25
27
  __decorate([
@@ -30,7 +32,8 @@ __decorate([
30
32
  ], InvitationsConfigurationService.prototype, "baseUrl", null);
31
33
  InvitationsConfigurationService = __decorate([
32
34
  Injectable(),
33
- __metadata("design:paramtypes", [ConfigService])
35
+ __param(0, Inject(INVITATION_MODULE_OPTIONS)),
36
+ __metadata("design:paramtypes", [Object])
34
37
  ], InvitationsConfigurationService);
35
38
  export { InvitationsConfigurationService };
36
39
  //# sourceMappingURL=InvitationConfigurationService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvitationConfigurationService.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6DAA6D;AAC7D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAGzF,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,6BAA6B;IAC1D;IAApB,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,CAAC;IAED,IAEI,OAAO;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,qBAAqB,CAAE,CAAC;IAClE,CAAC;CACJ,CAAA;AALG;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;8DAGV;AATQ,+BAA+B;IAD3C,UAAU,EAAE;qCAE0B,aAAa;GADvC,+BAA+B,CAU3C"}
1
+ {"version":3,"file":"InvitationConfigurationService.js","sourceRoot":"","sources":["../../src/invitations/InvitationConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAChG,OAAO,EACH,yBAAyB,GAE5B,MAAM,yBAAyB,CAAC;AAG1B,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,6BAA6B;IAGlE;IAFZ,YAEY,OAAgC;QAExC,KAAK,EAAE,CAAC;QAFA,YAAO,GAAP,OAAO,CAAyB;IAG5C,CAAC;IAED,IAEI,OAAO;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAChC,CAAC;CACJ,CAAA;AALG;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;8DAGV;AAZQ,+BAA+B;IAD3C,UAAU,EAAE;IAGJ,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;;GAF7B,+BAA+B,CAa3C"}
@@ -1,2 +1,6 @@
1
+ import { DynamicModule } from "@nestjs/common";
2
+ import { InvitationModuleAsyncOptions } from "./invitation.options.js";
1
3
  export declare class InvitationModule {
4
+ static forRoot(): never;
5
+ static forRootAsync(options: InvitationModuleAsyncOptions): DynamicModule;
2
6
  }
@@ -4,32 +4,50 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  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;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var InvitationModule_1;
7
8
  import { Module } from "@nestjs/common";
8
9
  import { TypeOrmModule } from "@nestjs/typeorm";
9
10
  import { Invitation } from "./entities/invitation.entity.js";
10
11
  import { InvitationController } from "./invitation.controller.js";
11
12
  import { InvitationService } from "./invitation.service.js";
12
- import { SmtpEmailClientModule } from "../smtp-email-client/smtp-email-client.module.js";
13
13
  import { OrganisationModule } from "../organisation/organisation.module.js";
14
- import { ConfigModule } from "@nestjs/config";
15
- import configVariables from "./InvitationConfigurationVariables.js";
16
14
  import { InvitationsConfigurationService } from "./InvitationConfigurationService.js";
17
15
  import { OrganisationMembership } from "../organisation-memberships/entities/organisation-membership.entity.js";
18
16
  import { User } from "../user/entities/user.entity.js";
19
- let InvitationModule = class InvitationModule {
17
+ import { INVITATION_MODULE_OPTIONS, } from "./invitation.options.js";
18
+ let InvitationModule = InvitationModule_1 = class InvitationModule {
19
+ static forRoot() {
20
+ throw new Error("InvitationModule.forRoot() is not supported. Use forRootAsync() instead.");
21
+ }
22
+ static forRootAsync(options) {
23
+ return {
24
+ module: InvitationModule_1,
25
+ global: options.isGlobal ?? false,
26
+ imports: [
27
+ ...(options.imports || []),
28
+ OrganisationModule,
29
+ TypeOrmModule.forFeature([
30
+ OrganisationMembership,
31
+ User,
32
+ Invitation,
33
+ ]),
34
+ ],
35
+ controllers: [InvitationController],
36
+ providers: [
37
+ {
38
+ provide: INVITATION_MODULE_OPTIONS,
39
+ useFactory: options.useFactory,
40
+ inject: options.inject || [],
41
+ },
42
+ InvitationsConfigurationService,
43
+ InvitationService,
44
+ ],
45
+ exports: [InvitationService],
46
+ };
47
+ }
20
48
  };
21
- InvitationModule = __decorate([
22
- Module({
23
- imports: [
24
- ConfigModule.forFeature(configVariables),
25
- OrganisationModule,
26
- SmtpEmailClientModule,
27
- TypeOrmModule.forFeature([OrganisationMembership, User, Invitation]),
28
- ],
29
- controllers: [InvitationController],
30
- providers: [InvitationsConfigurationService, InvitationService],
31
- exports: [InvitationService],
32
- })
49
+ InvitationModule = InvitationModule_1 = __decorate([
50
+ Module({})
33
51
  ], InvitationModule);
34
52
  export { InvitationModule };
35
53
  //# sourceMappingURL=invitation.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invitation.module.js","sourceRoot":"","sources":["../../src/invitations/invitation.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,C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AyB,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAC,+BAA+B,EAAC,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAC,sBAAsB,EAAC,MAAM,wEAAwE,CAAC;AAC9G,OAAO,EAAC,IAAI,EAAC,MAAM,iCAAiC,CAAC;AACrD,OAAO,EACH,yBAAyB,GAE5B,MAAM,yBAAyB,CAAC;AAG1B,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IACzB,MAAM,CAAC,OAAO;QACV,MAAM,IAAI,KAAK,CACX,0EAA0E,CAC7E,CAAC;IACN,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAqC;QACrD,OAAO;YACH,MAAM,EAAE,kBAAgB;YACxB,MAAM,EAAE,OAAO,CAAC,QAAQ,IAAI,KAAK;YACjC,OAAO,EAAE;gBACL,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;gBAC1B,kBAAkB;gBAClB,aAAa,CAAC,UAAU,CAAC;oBACrB,sBAAsB;oBACtB,IAAI;oBACJ,UAAU;iBACb,CAAC;aACL;YACD,WAAW,EAAE,CAAC,oBAAoB,CAAC;YACnC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,yBAAyB;oBAClC,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;iBAC/B;gBACD,+BAA+B;gBAC/B,iBAAiB;aACpB;YACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;SAC/B,CAAC;IACN,CAAC;CACJ,CAAA;AAjCY,gBAAgB;IAD5B,MAAM,CAAC,EAAE,CAAC;GACE,gBAAgB,CAiC5B"}
@@ -0,0 +1,10 @@
1
+ import type { ModuleMetadata } from "@nestjs/common";
2
+ export declare const INVITATION_MODULE_OPTIONS: unique symbol;
3
+ export interface InvitationModuleOptions {
4
+ baseUrl: string;
5
+ }
6
+ export interface InvitationModuleAsyncOptions extends Pick<ModuleMetadata, "imports"> {
7
+ useFactory: (...args: any[]) => Promise<InvitationModuleOptions> | InvitationModuleOptions;
8
+ inject?: any[];
9
+ isGlobal?: boolean;
10
+ }
@@ -0,0 +1,2 @@
1
+ export const INVITATION_MODULE_OPTIONS = Symbol("INVITATION_MODULE_OPTIONS");
2
+ //# sourceMappingURL=invitation.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invitation.options.js","sourceRoot":"","sources":["../../src/invitations/invitation.options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
- import { ConfigService } from "@nestjs/config";
2
1
  import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
2
+ import { LoggerModuleOptions } from "./logger.options.js";
3
3
  export declare class LoggingConfigurationService extends ValidatedConfigurationService {
4
- private configService;
5
- constructor(configService: ConfigService);
4
+ private options;
5
+ constructor(options: LoggerModuleOptions);
6
6
  get shouldLogForDevelopment(): boolean;
7
7
  get loggerName(): string;
8
8
  get minLevel(): string;
@@ -7,28 +7,30 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { Injectable } from "@nestjs/common";
11
- import { ConfigService } from "@nestjs/config";
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { Inject, Injectable } from "@nestjs/common";
12
14
  import { IsBoolean, IsDefined, IsOptional, IsString } from "class-validator";
13
15
  import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
16
+ import { LOGGER_MODULE_OPTIONS } from "./logger.options.js";
14
17
  let LoggingConfigurationService = class LoggingConfigurationService extends ValidatedConfigurationService {
15
- configService;
16
- constructor(configService) {
18
+ options;
19
+ constructor(options) {
17
20
  super();
18
- this.configService = configService;
21
+ this.options = options;
19
22
  }
20
23
  get shouldLogForDevelopment() {
21
- return this.configService.get("logging.nodeEnv") === "dev";
24
+ return this.options.nodeEnv === "dev";
22
25
  }
23
26
  get loggerName() {
24
- return (this.configService.get("logging.loggerName") ||
25
- "DefaultLogger");
27
+ return this.options.loggerName ?? "DefaultLogger";
26
28
  }
27
29
  get minLevel() {
28
- return (this.configService.get("logging.loggerMinLevel") || "debug");
30
+ return this.options.minLevel ?? "debug";
29
31
  }
30
32
  get usePrettyLogs() {
31
- return (this.configService.get("logging.usePrettyLogs") === "true");
33
+ return this.options.usePrettyLogs ?? false;
32
34
  }
33
35
  };
34
36
  __decorate([
@@ -57,7 +59,8 @@ __decorate([
57
59
  ], LoggingConfigurationService.prototype, "usePrettyLogs", null);
58
60
  LoggingConfigurationService = __decorate([
59
61
  Injectable(),
60
- __metadata("design:paramtypes", [ConfigService])
62
+ __param(0, Inject(LOGGER_MODULE_OPTIONS)),
63
+ __metadata("design:paramtypes", [Object])
61
64
  ], LoggingConfigurationService);
62
65
  export { LoggingConfigurationService };
63
66
  //# sourceMappingURL=LoggingConfigurationService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoggingConfigurationService.js","sourceRoot":"","sources":["../../src/logger/LoggingConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAGzF,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,6BAA6B;IACtD;IAApB,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,CAAC;IAED,IAEI,uBAAuB;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,iBAAiB,CAAC,KAAK,KAAK,CAAC;IACvE,CAAC;IAED,IAEI,UAAU;QACV,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,oBAAoB,CAAC;YACpD,eAAe,CAClB,CAAC;IACN,CAAC;IAED,IAEI,QAAQ;QACR,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,wBAAwB,CAAC,IAAI,OAAO,CACtE,CAAC;IACN,CAAC;IAED,IAEI,aAAa;QACb,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,uBAAuB,CAAC,KAAK,MAAM,CACrE,CAAC;IACN,CAAC;CACJ,CAAA;AA9BG;IAAC,SAAS,EAAE;IACX,SAAS,EAAE;;;0EAGX;AAED;IAAC,QAAQ,EAAE;IACV,SAAS,EAAE;;;6DAMX;AAED;IAAC,QAAQ,EAAE;IACV,UAAU,EAAE;;;2DAKZ;AAED;IAAC,SAAS,EAAE;IACX,UAAU,EAAE;;;gEAKZ;AAlCQ,2BAA2B;IADvC,UAAU,EAAE;qCAE0B,aAAa;GADvC,2BAA2B,CAmCvC"}
1
+ {"version":3,"file":"LoggingConfigurationService.js","sourceRoot":"","sources":["../../src/logger/LoggingConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAC,qBAAqB,EAAsB,MAAM,qBAAqB,CAAC;AAGxE,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,6BAA6B;IAG9D;IAFZ,YAEY,OAA4B;QAEpC,KAAK,EAAE,CAAC;QAFA,YAAO,GAAP,OAAO,CAAqB;IAGxC,CAAC;IAED,IAEI,uBAAuB;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC;IAC1C,CAAC;IAED,IAEI,UAAU;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,eAAe,CAAC;IACtD,CAAC;IAED,IAEI,QAAQ;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC5C,CAAC;IAED,IAEI,aAAa;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,IAAI,KAAK,CAAC;IAC/C,CAAC;CACJ,CAAA;AAvBG;IAAC,SAAS,EAAE;IACX,SAAS,EAAE;;;0EAGX;AAED;IAAC,QAAQ,EAAE;IACV,SAAS,EAAE;;;6DAGX;AAED;IAAC,QAAQ,EAAE;IACV,UAAU,EAAE;;;2DAGZ;AAED;IAAC,SAAS,EAAE;IACX,UAAU,EAAE;;;gEAGZ;AA9BQ,2BAA2B;IADvC,UAAU,EAAE;IAGJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;;GAFzB,2BAA2B,CA+BvC"}
@@ -1,2 +1,6 @@
1
+ import { DynamicModule } from "@nestjs/common";
2
+ import { LoggerModuleAsyncOptions } from "./logger.options.js";
1
3
  export declare class LoggerModule {
4
+ static forRoot(): never;
5
+ static forRootAsync(options: LoggerModuleAsyncOptions): DynamicModule;
2
6
  }
@@ -4,19 +4,34 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  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;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var LoggerModule_1;
7
8
  import { Global, Module } from "@nestjs/common";
8
- import { ConfigModule } from "@nestjs/config";
9
9
  import { LoggingConfigurationService } from "./LoggingConfigurationService.js";
10
- import configVariables from "./LoggingConfigurationVariables.js";
11
- let LoggerModule = class LoggerModule {
10
+ import { LOGGER_MODULE_OPTIONS, } from "./logger.options.js";
11
+ let LoggerModule = LoggerModule_1 = class LoggerModule {
12
+ static forRoot() {
13
+ throw new Error("LoggerModule.forRoot() is not supported. Use forRootAsync() instead.");
14
+ }
15
+ static forRootAsync(options) {
16
+ return {
17
+ module: LoggerModule_1,
18
+ global: options.isGlobal ?? true,
19
+ imports: [...(options.imports || [])],
20
+ providers: [
21
+ {
22
+ provide: LOGGER_MODULE_OPTIONS,
23
+ useFactory: options.useFactory,
24
+ inject: options.inject || [],
25
+ },
26
+ LoggingConfigurationService,
27
+ ],
28
+ exports: [LoggingConfigurationService],
29
+ };
30
+ }
12
31
  };
13
- LoggerModule = __decorate([
32
+ LoggerModule = LoggerModule_1 = __decorate([
14
33
  Global(),
15
- Module({
16
- imports: [ConfigModule.forFeature(configVariables)],
17
- providers: [LoggingConfigurationService],
18
- exports: [LoggingConfigurationService],
19
- })
34
+ Module({})
20
35
  ], LoggerModule);
21
36
  export { LoggerModule };
22
37
  //# sourceMappingURL=logger.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.module.js","sourceRoot":"","sources":["../../src/logger/logger.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AAC7E,OAAO,eAAe,MAAM,oCAAoC,CAAC;AAQ1D,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,YAAY;IANxB,MAAM,EAAE;IACR,MAAM,CAAC;QACJ,OAAO,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACnD,SAAS,EAAE,CAAC,2BAA2B,CAAC;QACxC,OAAO,EAAE,CAAC,2BAA2B,CAAC;KACzC,CAAC;GACW,YAAY,CAAG"}
1
+ {"version":3,"file":"logger.module.js","sourceRoot":"","sources":["../../src/logger/logger.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,2BAA2B,EAAC,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACH,qBAAqB,GAExB,MAAM,qBAAqB,CAAC;AAItB,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACrB,MAAM,CAAC,OAAO;QACV,MAAM,IAAI,KAAK,CACX,sEAAsE,CACzE,CAAC;IACN,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAiC;QACjD,OAAO;YACH,MAAM,EAAE,cAAY;YACpB,MAAM,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;YAChC,OAAO,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YACrC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;iBAC/B;gBACD,2BAA2B;aAC9B;YACD,OAAO,EAAE,CAAC,2BAA2B,CAAC;SACzC,CAAC;IACN,CAAC;CACJ,CAAA;AAvBY,YAAY;IAFxB,MAAM,EAAE;IACR,MAAM,CAAC,EAAE,CAAC;GACE,YAAY,CAuBxB"}
@@ -0,0 +1,13 @@
1
+ import type { ModuleMetadata } from "@nestjs/common";
2
+ export declare const LOGGER_MODULE_OPTIONS: unique symbol;
3
+ export interface LoggerModuleOptions {
4
+ nodeEnv: string;
5
+ loggerName?: string;
6
+ minLevel?: string;
7
+ usePrettyLogs?: boolean;
8
+ }
9
+ export interface LoggerModuleAsyncOptions extends Pick<ModuleMetadata, "imports"> {
10
+ useFactory: (...args: any[]) => Promise<LoggerModuleOptions> | LoggerModuleOptions;
11
+ inject?: any[];
12
+ isGlobal?: boolean;
13
+ }
@@ -0,0 +1,2 @@
1
+ export const LOGGER_MODULE_OPTIONS = Symbol("LOGGER_MODULE_OPTIONS");
2
+ //# sourceMappingURL=logger.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.options.js","sourceRoot":"","sources":["../../src/logger/logger.options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
@@ -1,5 +1,13 @@
1
1
  import "reflect-metadata";
2
- import { INestApplication, NestApplicationOptions } from "@nestjs/common";
2
+ import { DynamicModule, INestApplication } from "@nestjs/common";
3
+ import { CoreModuleAsyncOptions } from "../core-config/core-config.options.js";
4
+ import { LoggerModuleAsyncOptions } from "../logger/logger.options.js";
5
+ export interface CoreModuleForRootAsyncOptions {
6
+ core: CoreModuleAsyncOptions;
7
+ logger: LoggerModuleAsyncOptions;
8
+ }
3
9
  export declare class CoreModule {
4
- static initApplication(rootModule: any, callback: (appModule: INestApplication) => void | Promise<void>, options?: NestApplicationOptions): void;
10
+ static forRoot(): never;
11
+ static forRootAsync(options: CoreModuleForRootAsyncOptions): DynamicModule;
12
+ static initApplication(rootModule: any, callback: (appModule: INestApplication) => void | Promise<void>): void;
5
13
  }
@@ -4,6 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  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;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var CoreModule_1;
7
8
  import "reflect-metadata";
8
9
  import helmet from "helmet";
9
10
  import { BadRequestException, ClassSerializerInterceptor, Module, ValidationPipe, } from "@nestjs/common";
@@ -14,20 +15,95 @@ import { SwaggerGen } from "./SwaggerGen.js";
14
15
  import { NestFactory, Reflector } from "@nestjs/core";
15
16
  import { CoreConfigurationService } from "../core-config/CoreConfigurationService.js";
16
17
  import { CoreConfigModule } from "../core-config/CoreConfig.module.js";
17
- import { ConfigModule } from "@nestjs/config";
18
18
  import { BullModule } from "@nestjs/bull";
19
19
  import { HealthModule } from "../health/Health.module.js";
20
- import { LoggerModule as LoggingConfigModule } from "../logger/logger.module.js";
21
- import { LoggingConfigurationService } from "../logger/LoggingConfigurationService.js";
22
- import { AuthzModule } from "../authorization/authz.module.js";
23
20
  import { CacheModule } from "@nestjs/cache-manager";
24
21
  import KeyvRedis from "@keyv/redis";
25
- let CoreModule = class CoreModule {
22
+ import { LOGGER_MODULE_OPTIONS, } from "../logger/logger.options.js";
23
+ import { LoggingConfigurationService } from "../logger/LoggingConfigurationService.js";
24
+ let CoreModule = CoreModule_1 = class CoreModule {
25
+ static forRoot() {
26
+ throw new Error("CoreModule.forRoot() is not supported. Use forRootAsync() instead.");
27
+ }
28
+ static forRootAsync(options) {
29
+ return {
30
+ module: CoreModule_1,
31
+ global: true,
32
+ imports: [
33
+ // Core config
34
+ CoreConfigModule.forRootAsync(options.core),
35
+ // Bull queue - uses core config
36
+ BullModule.forRootAsync({
37
+ imports: [CoreConfigModule.forRootAsync(options.core)],
38
+ useFactory: (configService) => {
39
+ const redisUrl = new URL(configService.bullQueueHost);
40
+ return {
41
+ redis: {
42
+ host: redisUrl.hostname,
43
+ password: redisUrl.password,
44
+ port: Number(redisUrl.port),
45
+ username: redisUrl.username,
46
+ maxRetriesPerRequest: 3,
47
+ },
48
+ };
49
+ },
50
+ inject: [CoreConfigurationService],
51
+ }),
52
+ // Cache - uses core config
53
+ CacheModule.registerAsync({
54
+ imports: [CoreConfigModule.forRootAsync(options.core)],
55
+ useFactory: (configService) => {
56
+ const redis = new KeyvRedis(configService.bullQueueHost);
57
+ return {
58
+ stores: [redis],
59
+ };
60
+ },
61
+ isGlobal: true,
62
+ inject: [CoreConfigurationService],
63
+ }),
64
+ // Health check
65
+ HealthModule,
66
+ // Pino logger - uses logger config
67
+ LoggerModule.forRootAsync({
68
+ imports: [...(options.logger.imports || [])],
69
+ inject: [LOGGER_MODULE_OPTIONS],
70
+ useFactory: (loggerOptions) => {
71
+ return {
72
+ pinoHttp: {
73
+ level: loggerOptions.minLevel ?? "debug",
74
+ transport: loggerOptions.usePrettyLogs
75
+ ? { target: "pino-pretty" }
76
+ : undefined,
77
+ },
78
+ };
79
+ },
80
+ }),
81
+ ],
82
+ controllers: [AppController],
83
+ providers: [
84
+ // Provide logger options for pino config
85
+ {
86
+ provide: LOGGER_MODULE_OPTIONS,
87
+ useFactory: options.logger.useFactory,
88
+ inject: options.logger.inject || [],
89
+ },
90
+ LoggingConfigurationService,
91
+ AppService,
92
+ SwaggerGen,
93
+ ],
94
+ exports: [
95
+ BullModule,
96
+ CacheModule,
97
+ CoreConfigModule,
98
+ LoggerModule,
99
+ LoggingConfigurationService,
100
+ SwaggerGen,
101
+ ],
102
+ };
103
+ }
26
104
  static initApplication(
27
105
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
- rootModule, callback,
29
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
30
- options) {
106
+ rootModule, callback) {
31
107
  void (async () => {
32
108
  try {
33
109
  const app = await NestFactory.create(rootModule, {
@@ -44,7 +120,10 @@ let CoreModule = class CoreModule {
44
120
  exclude: ["health"],
45
121
  });
46
122
  }
47
- app.use(helmet());
123
+ const helmetOptions = configService.helmetOptions;
124
+ if (helmetOptions !== false) {
125
+ app.use(helmet(helmetOptions ?? undefined));
126
+ }
48
127
  app.enableCors({
49
128
  origin: [configService.frontEndAppUrl],
50
129
  });
@@ -54,22 +133,22 @@ let CoreModule = class CoreModule {
54
133
  whitelist: true,
55
134
  forbidNonWhitelisted: true,
56
135
  forbidUnknownValues: true,
57
- exceptionFactory: (e) => {
58
- loggerService.error(e);
136
+ exceptionFactory: (error) => {
137
+ loggerService.error(error);
59
138
  throw new BadRequestException("Bad request, please check your input");
60
139
  },
61
140
  }));
62
141
  app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)));
63
142
  const swaggerGen = app.get(SwaggerGen);
64
143
  swaggerGen.generate(app, "open-api/swagger.json");
65
- const baseUrl = `http://localhost:${configService.webPort}`;
144
+ const baseUrl = `http://localhost:${String(configService.webPort)}`;
66
145
  const prefixPath = configService.globalPrefix
67
146
  ? `/${configService.globalPrefix}`
68
147
  : "";
69
148
  const swaggerPath = configService.globalPrefix
70
149
  ? `/${configService.globalPrefix}/swagger`
71
150
  : "/swagger";
72
- loggerService.log(`will listen on port ${configService.webPort} (DEV: ${baseUrl}${prefixPath} )`);
151
+ loggerService.log(`will listen on port ${String(configService.webPort)} (DEV: ${baseUrl}${prefixPath} )`);
73
152
  loggerService.log(`swagger will be available at (DEV: ${baseUrl}${swaggerPath} )`);
74
153
  app.enableShutdownHooks();
75
154
  await callback(app);
@@ -84,62 +163,8 @@ let CoreModule = class CoreModule {
84
163
  })();
85
164
  }
86
165
  };
87
- CoreModule = __decorate([
88
- Module({
89
- imports: [
90
- AuthzModule,
91
- BullModule.forRootAsync({
92
- imports: [CoreConfigModule],
93
- useFactory: (configService) => {
94
- const redisUrl = new URL(configService.bullQueueHost || "redis://localhost");
95
- return {
96
- redis: {
97
- host: redisUrl.hostname,
98
- password: redisUrl.password,
99
- port: Number(redisUrl.port),
100
- username: redisUrl.username,
101
- maxRetriesPerRequest: 3,
102
- },
103
- };
104
- },
105
- inject: [CoreConfigurationService],
106
- }),
107
- CacheModule.registerAsync({
108
- imports: [CoreConfigModule],
109
- // eslint-disable-next-line @typescript-eslint/require-await
110
- useFactory: async (configService) => {
111
- console.debug("Loading cache module with url", configService.bullQueueHost);
112
- const redis = new KeyvRedis(configService.bullQueueHost);
113
- return {
114
- stores: [redis],
115
- };
116
- },
117
- isGlobal: true,
118
- inject: [CoreConfigurationService],
119
- }),
120
- ConfigModule.forRoot({ cache: true, isGlobal: true }),
121
- CoreConfigModule,
122
- HealthModule,
123
- LoggerModule.forRootAsync({
124
- imports: [LoggingConfigModule],
125
- inject: [LoggingConfigurationService],
126
- // eslint-disable-next-line @typescript-eslint/require-await
127
- useFactory: async (config) => {
128
- return {
129
- pinoHttp: {
130
- level: config.minLevel,
131
- transport: config.usePrettyLogs
132
- ? { target: "pino-pretty" }
133
- : undefined,
134
- },
135
- };
136
- },
137
- }),
138
- ],
139
- controllers: [AppController],
140
- providers: [AppService, SwaggerGen],
141
- exports: [AuthzModule, BullModule, CacheModule, LoggerModule, SwaggerGen],
142
- })
166
+ CoreModule = CoreModule_1 = __decorate([
167
+ Module({})
143
168
  ], CoreModule);
144
169
  export { CoreModule };
145
170
  //# sourceMappingURL=core-app.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-app.module.js","sourceRoot":"","sources":["../../src/root-app/core-app.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAE1B,MAAM,EAEN,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAC,YAAY,IAAI,mBAAmB,EAAC,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E,UAAU,CAwKtB"}
@@ -1,8 +1,8 @@
1
- import { ConfigService } from "@nestjs/config";
2
1
  import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
2
+ import { SmtpEmailModuleOptions } from "./smtp-email-client.options.js";
3
3
  export declare class EmailConfigurationService extends ValidatedConfigurationService {
4
- private configService;
5
- constructor(configService: ConfigService);
4
+ private options;
5
+ constructor(options: SmtpEmailModuleOptions);
6
6
  get isEmailSyncSendEnabled(): boolean;
7
7
  get extraEmailBcc(): string;
8
8
  get emailPassword(): string;