@colveor/core 1.4.1 → 1.5.0

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 (203) hide show
  1. package/README.md +3 -2
  2. package/dist/common/guards/index.d.ts +2 -0
  3. package/dist/common/guards/index.d.ts.map +1 -1
  4. package/dist/common/guards/index.js +2 -0
  5. package/dist/common/guards/index.js.map +1 -1
  6. package/dist/common/guards/ratings-ip-rate-limit.guard.d.ts +16 -0
  7. package/dist/common/guards/ratings-ip-rate-limit.guard.d.ts.map +1 -0
  8. package/dist/common/guards/ratings-ip-rate-limit.guard.js +95 -0
  9. package/dist/common/guards/ratings-ip-rate-limit.guard.js.map +1 -0
  10. package/dist/common/guards/ratings-user-rate-limit.guard.d.ts +16 -0
  11. package/dist/common/guards/ratings-user-rate-limit.guard.d.ts.map +1 -0
  12. package/dist/common/guards/ratings-user-rate-limit.guard.js +86 -0
  13. package/dist/common/guards/ratings-user-rate-limit.guard.js.map +1 -0
  14. package/dist/config/firebase.module.d.ts +6 -7
  15. package/dist/config/firebase.module.d.ts.map +1 -1
  16. package/dist/config/firebase.module.js +7 -20
  17. package/dist/config/firebase.module.js.map +1 -1
  18. package/dist/core.module.d.ts +1 -1
  19. package/dist/core.module.d.ts.map +1 -1
  20. package/dist/core.module.js +2 -0
  21. package/dist/core.module.js.map +1 -1
  22. package/dist/database/migrations/1784284557962-user-ratings.d.ts +7 -0
  23. package/dist/database/migrations/1784284557962-user-ratings.d.ts.map +1 -0
  24. package/dist/database/migrations/1784284557962-user-ratings.js +71 -0
  25. package/dist/database/migrations/1784284557962-user-ratings.js.map +1 -0
  26. package/dist/database/migrations/1784284557965-device-token-fcm-unique.d.ts +7 -0
  27. package/dist/database/migrations/1784284557965-device-token-fcm-unique.d.ts.map +1 -0
  28. package/dist/database/migrations/1784284557965-device-token-fcm-unique.js +42 -0
  29. package/dist/database/migrations/1784284557965-device-token-fcm-unique.js.map +1 -0
  30. package/dist/database/seeds/roles.seed.d.ts.map +1 -1
  31. package/dist/database/seeds/roles.seed.js +2 -0
  32. package/dist/database/seeds/roles.seed.js.map +1 -1
  33. package/dist/database/seeds/settings.seed.d.ts +1 -0
  34. package/dist/database/seeds/settings.seed.d.ts.map +1 -1
  35. package/dist/database/seeds/settings.seed.js +148 -10
  36. package/dist/database/seeds/settings.seed.js.map +1 -1
  37. package/dist/e2e/bootstrap-setup.d.ts +41 -0
  38. package/dist/e2e/bootstrap-setup.d.ts.map +1 -0
  39. package/dist/e2e/bootstrap-setup.js +169 -0
  40. package/dist/e2e/bootstrap-setup.js.map +1 -0
  41. package/dist/e2e/create-e2e-app-module.d.ts +42 -0
  42. package/dist/e2e/create-e2e-app-module.d.ts.map +1 -0
  43. package/dist/e2e/create-e2e-app-module.js +67 -0
  44. package/dist/e2e/create-e2e-app-module.js.map +1 -0
  45. package/dist/e2e/define-e2e-host.d.ts +64 -0
  46. package/dist/e2e/define-e2e-host.d.ts.map +1 -0
  47. package/dist/e2e/define-e2e-host.js +70 -0
  48. package/dist/e2e/define-e2e-host.js.map +1 -0
  49. package/dist/e2e/e2e-env.d.ts +20 -0
  50. package/dist/e2e/e2e-env.d.ts.map +1 -0
  51. package/dist/e2e/e2e-env.js +68 -0
  52. package/dist/e2e/e2e-env.js.map +1 -0
  53. package/dist/e2e/http.d.ts +12 -0
  54. package/dist/e2e/http.d.ts.map +1 -0
  55. package/dist/e2e/http.js +29 -0
  56. package/dist/e2e/http.js.map +1 -0
  57. package/dist/e2e/index.d.ts +42 -0
  58. package/dist/e2e/index.d.ts.map +1 -0
  59. package/dist/e2e/index.js +59 -0
  60. package/dist/e2e/index.js.map +1 -0
  61. package/dist/e2e/listen-e2e-app.d.ts +15 -0
  62. package/dist/e2e/listen-e2e-app.d.ts.map +1 -0
  63. package/dist/e2e/listen-e2e-app.js +44 -0
  64. package/dist/e2e/listen-e2e-app.js.map +1 -0
  65. package/dist/e2e/runtime.d.ts +12 -0
  66. package/dist/e2e/runtime.d.ts.map +1 -0
  67. package/dist/e2e/runtime.js +25 -0
  68. package/dist/e2e/runtime.js.map +1 -0
  69. package/dist/index.d.ts +5 -0
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +12 -2
  72. package/dist/index.js.map +1 -1
  73. package/dist/modules/admin/controllers/admin.controller.js +3 -2
  74. package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
  75. package/dist/modules/audit/constants/audit-actions.d.ts +3 -0
  76. package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -1
  77. package/dist/modules/audit/constants/audit-actions.js +4 -0
  78. package/dist/modules/audit/constants/audit-actions.js.map +1 -1
  79. package/dist/modules/auth/services/account.service.d.ts.map +1 -1
  80. package/dist/modules/auth/services/account.service.js +0 -1
  81. package/dist/modules/auth/services/account.service.js.map +1 -1
  82. package/dist/modules/delivery/notification-delivery.service.d.ts +1 -0
  83. package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
  84. package/dist/modules/delivery/notification-delivery.service.js +3 -0
  85. package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
  86. package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
  87. package/dist/modules/delivery/processors/delivery-job.runner.js +3 -1
  88. package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
  89. package/dist/modules/delivery/types/payload-snapshot.d.ts +1 -0
  90. package/dist/modules/delivery/types/payload-snapshot.d.ts.map +1 -1
  91. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
  92. package/dist/modules/delivery/utils/payload-snapshot.util.js +3 -1
  93. package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
  94. package/dist/modules/jobs/queues/jobs.queue.d.ts +2 -1
  95. package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
  96. package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
  97. package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
  98. package/dist/modules/notifications/controllers/notifications.controller.js +5 -2
  99. package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
  100. package/dist/modules/notifications/dto/device.dto.d.ts.map +1 -1
  101. package/dist/modules/notifications/dto/device.dto.js +3 -0
  102. package/dist/modules/notifications/dto/device.dto.js.map +1 -1
  103. package/dist/modules/notifications/dto/fcm.dto.d.ts +2 -2
  104. package/dist/modules/notifications/dto/fcm.dto.d.ts.map +1 -1
  105. package/dist/modules/notifications/dto/fcm.dto.js +36 -0
  106. package/dist/modules/notifications/dto/fcm.dto.js.map +1 -1
  107. package/dist/modules/notifications/dto/index.d.ts +0 -1
  108. package/dist/modules/notifications/dto/index.d.ts.map +1 -1
  109. package/dist/modules/notifications/dto/index.js +0 -1
  110. package/dist/modules/notifications/dto/index.js.map +1 -1
  111. package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
  112. package/dist/modules/notifications/entities/device-token.entity.js +2 -3
  113. package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
  114. package/dist/modules/notifications/firebase.module.d.ts +5 -2
  115. package/dist/modules/notifications/firebase.module.d.ts.map +1 -1
  116. package/dist/modules/notifications/firebase.module.js +9 -4
  117. package/dist/modules/notifications/firebase.module.js.map +1 -1
  118. package/dist/modules/notifications/services/fcm.errors.d.ts +9 -0
  119. package/dist/modules/notifications/services/fcm.errors.d.ts.map +1 -0
  120. package/dist/modules/notifications/services/fcm.errors.js +20 -0
  121. package/dist/modules/notifications/services/fcm.errors.js.map +1 -0
  122. package/dist/modules/notifications/services/fcm.service.d.ts +12 -3
  123. package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
  124. package/dist/modules/notifications/services/fcm.service.js +94 -51
  125. package/dist/modules/notifications/services/fcm.service.js.map +1 -1
  126. package/dist/modules/notifications/services/index.d.ts +1 -0
  127. package/dist/modules/notifications/services/index.d.ts.map +1 -1
  128. package/dist/modules/notifications/services/index.js +1 -0
  129. package/dist/modules/notifications/services/index.js.map +1 -1
  130. package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
  131. package/dist/modules/notifications/services/notifications.service.js +1 -0
  132. package/dist/modules/notifications/services/notifications.service.js.map +1 -1
  133. package/dist/modules/ratings/controllers/ratings.controller.d.ts +17 -0
  134. package/dist/modules/ratings/controllers/ratings.controller.d.ts.map +1 -0
  135. package/dist/modules/ratings/controllers/ratings.controller.js +187 -0
  136. package/dist/modules/ratings/controllers/ratings.controller.js.map +1 -0
  137. package/dist/modules/ratings/dto/rating.dto.d.ts +39 -0
  138. package/dist/modules/ratings/dto/rating.dto.d.ts.map +1 -0
  139. package/dist/modules/ratings/dto/rating.dto.js +186 -0
  140. package/dist/modules/ratings/dto/rating.dto.js.map +1 -0
  141. package/dist/modules/ratings/entities/user-rating-stats.entity.d.ts +14 -0
  142. package/dist/modules/ratings/entities/user-rating-stats.entity.d.ts.map +1 -0
  143. package/dist/modules/ratings/entities/user-rating-stats.entity.js +72 -0
  144. package/dist/modules/ratings/entities/user-rating-stats.entity.js.map +1 -0
  145. package/dist/modules/ratings/entities/user-rating.entity.d.ts +11 -0
  146. package/dist/modules/ratings/entities/user-rating.entity.d.ts.map +1 -0
  147. package/dist/modules/ratings/entities/user-rating.entity.js +56 -0
  148. package/dist/modules/ratings/entities/user-rating.entity.js.map +1 -0
  149. package/dist/modules/ratings/events/rating.events.d.ts +17 -0
  150. package/dist/modules/ratings/events/rating.events.d.ts.map +1 -0
  151. package/dist/modules/ratings/events/rating.events.js +13 -0
  152. package/dist/modules/ratings/events/rating.events.js.map +1 -0
  153. package/dist/modules/ratings/index.d.ts +10 -0
  154. package/dist/modules/ratings/index.d.ts.map +1 -0
  155. package/dist/modules/ratings/index.js +29 -0
  156. package/dist/modules/ratings/index.js.map +1 -0
  157. package/dist/modules/ratings/listeners/ratings-account-deleted.listener.d.ts +10 -0
  158. package/dist/modules/ratings/listeners/ratings-account-deleted.listener.d.ts.map +1 -0
  159. package/dist/modules/ratings/listeners/ratings-account-deleted.listener.js +50 -0
  160. package/dist/modules/ratings/listeners/ratings-account-deleted.listener.js.map +1 -0
  161. package/dist/modules/ratings/ratings.manifest.d.ts +8 -0
  162. package/dist/modules/ratings/ratings.manifest.d.ts.map +1 -0
  163. package/dist/modules/ratings/ratings.manifest.js +31 -0
  164. package/dist/modules/ratings/ratings.manifest.js.map +1 -0
  165. package/dist/modules/ratings/ratings.module.d.ts +3 -0
  166. package/dist/modules/ratings/ratings.module.d.ts.map +1 -0
  167. package/dist/modules/ratings/ratings.module.js +39 -0
  168. package/dist/modules/ratings/ratings.module.js.map +1 -0
  169. package/dist/modules/ratings/services/ratings-retention.service.d.ts +17 -0
  170. package/dist/modules/ratings/services/ratings-retention.service.d.ts.map +1 -0
  171. package/dist/modules/ratings/services/ratings-retention.service.js +96 -0
  172. package/dist/modules/ratings/services/ratings-retention.service.js.map +1 -0
  173. package/dist/modules/ratings/services/ratings.service.d.ts +53 -0
  174. package/dist/modules/ratings/services/ratings.service.d.ts.map +1 -0
  175. package/dist/modules/ratings/services/ratings.service.js +546 -0
  176. package/dist/modules/ratings/services/ratings.service.js.map +1 -0
  177. package/dist/modules/ratings/utils/rating-cursor.util.d.ts +6 -0
  178. package/dist/modules/ratings/utils/rating-cursor.util.d.ts.map +1 -0
  179. package/dist/modules/ratings/utils/rating-cursor.util.js +29 -0
  180. package/dist/modules/ratings/utils/rating-cursor.util.js.map +1 -0
  181. package/dist/modules/settings/constants/settings.defaults.d.ts +15 -1
  182. package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
  183. package/dist/modules/settings/constants/settings.defaults.js +17 -2
  184. package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
  185. package/dist/modules/settings/constants/settings.keys.d.ts +26 -2
  186. package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
  187. package/dist/modules/settings/constants/settings.keys.js +27 -2
  188. package/dist/modules/settings/constants/settings.keys.js.map +1 -1
  189. package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
  190. package/dist/modules/settings/controllers/settings.controller.js +30 -4
  191. package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
  192. package/dist/modules/settings/services/settings.service.d.ts +2 -0
  193. package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
  194. package/dist/modules/settings/services/settings.service.js +17 -0
  195. package/dist/modules/settings/services/settings.service.js.map +1 -1
  196. package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -1
  197. package/dist/modules/settings/utils/settings-secret.util.js +3 -1
  198. package/dist/modules/settings/utils/settings-secret.util.js.map +1 -1
  199. package/dist/modules/users/services/users.service.d.ts +8 -1
  200. package/dist/modules/users/services/users.service.d.ts.map +1 -1
  201. package/dist/modules/users/services/users.service.js +49 -2
  202. package/dist/modules/users/services/users.service.js.map +1 -1
  203. package/package.json +1 -1
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createE2eAppModule = createE2eAppModule;
10
+ const node_path_1 = require("node:path");
11
+ const common_1 = require("@nestjs/common");
12
+ const config_1 = require("@nestjs/config");
13
+ const typeorm_1 = require("@nestjs/typeorm");
14
+ const core_module_1 = require("../core.module");
15
+ const typeorm_util_1 = require("../database/typeorm.util");
16
+ /**
17
+ * Build a minimal Nest host module: config → TypeORM → CoreModule → optional package modules.
18
+ *
19
+ * @example Fintech composition
20
+ * ```ts
21
+ * export const E2eAppModule = createE2eAppModule({
22
+ * imports: [FintechModule.forRoot()],
23
+ * typeOrm: {
24
+ * corePackageRoot: resolveCorePackageRoot(),
25
+ * entities: [join(fintechRoot, 'dist', '**', '*.entity.{ts,js}')],
26
+ * migrations: readSortedMigrations([join(fintechRoot, 'dist', 'database', 'migrations')]),
27
+ * },
28
+ * });
29
+ * ```
30
+ */
31
+ function createE2eAppModule(options = {}) {
32
+ const packageRoot = options.packageRoot ?? process.cwd();
33
+ const envFilePath = options.envFilePath ?? [
34
+ (0, node_path_1.join)(packageRoot, '.env.local'),
35
+ (0, node_path_1.join)(packageRoot, '.env'),
36
+ ];
37
+ const typeOrm = options.typeOrm ?? {};
38
+ const core = options.core ?? {
39
+ modules: {
40
+ realtime: false,
41
+ notifications: false,
42
+ },
43
+ };
44
+ const extraImports = options.imports ?? [];
45
+ let E2eAppModule = class E2eAppModule {
46
+ };
47
+ E2eAppModule = __decorate([
48
+ (0, common_1.Module)({
49
+ imports: [
50
+ (0, core_module_1.createCoreConfigModule)({ envFilePath }),
51
+ typeorm_1.TypeOrmModule.forRootAsync({
52
+ useFactory: (config) => (0, typeorm_util_1.createTypeOrmOptions)(config, {
53
+ autoLoadEntities: true,
54
+ retryAttempts: 5,
55
+ retryDelay: 1000,
56
+ ...typeOrm,
57
+ }),
58
+ inject: [config_1.ConfigService],
59
+ }),
60
+ core_module_1.CoreModule.forRoot(core),
61
+ ...extraImports,
62
+ ],
63
+ })
64
+ ], E2eAppModule);
65
+ return E2eAppModule;
66
+ }
67
+ //# sourceMappingURL=create-e2e-app-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-e2e-app-module.js","sourceRoot":"","sources":["../../src/e2e/create-e2e-app-module.ts"],"names":[],"mappings":";;;;;;;;AA+CA,gDAmCC;AAlFD,yCAAiC;AAEjC,2CAAuE;AACvE,2CAA+C;AAC/C,6CAAgD;AAEhD,gDAA4F;AAC5F,2DAA8F;AAyB9F;;;;;;;;;;;;;;GAcG;AACH,SAAgB,kBAAkB,CAAC,UAAqC,EAAE;IACzE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI;QAC1C,IAAA,gBAAI,EAAC,WAAW,EAAE,YAAY,CAAC;QAC/B,IAAA,gBAAI,EAAC,WAAW,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,IAAI,GAAsB,OAAO,CAAC,IAAI,IAAI;QAC/C,OAAO,EAAE;YACR,QAAQ,EAAE,KAAK;YACf,aAAa,EAAE,KAAK;SACpB;KACD,CAAC;IACF,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IAmB3C,IAAM,YAAY,GAAlB,MAAM,YAAY;KAAG,CAAA;IAAf,YAAY;QAjBjB,IAAA,eAAM,EAAC;YACP,OAAO,EAAE;gBACR,IAAA,oCAAsB,EAAC,EAAE,WAAW,EAAE,CAAC;gBACvC,uBAAa,CAAC,YAAY,CAAC;oBAC1B,UAAU,EAAE,CAAC,MAAqB,EAAE,EAAE,CACrC,IAAA,mCAAoB,EAAC,MAAM,EAAE;wBAC5B,gBAAgB,EAAE,IAAI;wBACtB,aAAa,EAAE,CAAC;wBAChB,UAAU,EAAE,IAAI;wBAChB,GAAG,OAAO;qBACV,CAAC;oBACH,MAAM,EAAE,CAAC,sBAAa,CAAC;iBACvB,CAAC;gBACF,wBAAU,CAAC,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,YAAY;aACf;SACD,CAAC;OACI,YAAY,CAAG;IAErB,OAAO,YAAY,CAAC;AACrB,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { Type } from '@nestjs/common';
2
+ import type { NestExpressApplication } from '@nestjs/platform-express';
3
+ import { type E2eGlobalSetupOptions } from './bootstrap-setup';
4
+ import { type CreateE2eAppModuleOptions } from './create-e2e-app-module';
5
+ import { type ApplyE2eEnvDefaultsOptions } from './e2e-env';
6
+ export type DefineE2eHostOptions = CreateE2eAppModuleOptions & ApplyE2eEnvDefaultsOptions & {
7
+ /**
8
+ * Absolute path to the child server entry (typically `<pkg>/e2e/app/main.ts`).
9
+ * Required for `globalSetup()` / self-hosted boot.
10
+ */
11
+ mainPath?: string;
12
+ /** Extra seed runners after `runCoreSeeds()`. */
13
+ extraSeeds?: E2eGlobalSetupOptions['extraSeeds'];
14
+ /** Skip core seeds. @default false */
15
+ skipCoreSeeds?: boolean;
16
+ /** ts-node project for the child process. @default tsconfig.test.json */
17
+ tsNodeProject?: string;
18
+ };
19
+ export type E2eHost = {
20
+ /** Nest module: config → TypeORM → CoreModule → optional imports. */
21
+ AppModule: Type<unknown>;
22
+ /** Original options (single source of truth for typeOrm / seeds / DB). */
23
+ options: DefineE2eHostOptions;
24
+ /**
25
+ * Child-process entry — call from `e2e/app/main.ts`:
26
+ * `e2eHost.listen().catch(...)`
27
+ */
28
+ listen: () => Promise<NestExpressApplication>;
29
+ /**
30
+ * Jest `globalSetup` — migrate/seed/spawn using the same `typeOrm` as `AppModule`.
31
+ * Pass `mainPath` here if it was omitted from `defineE2eHost`.
32
+ */
33
+ globalSetup: (overrides?: Partial<Pick<E2eGlobalSetupOptions, 'mainPath'>>) => Promise<void>;
34
+ /** Jest `globalTeardown`. */
35
+ globalTeardown: () => void;
36
+ };
37
+ /**
38
+ * Define an HTTP e2e host once — shared TypeORM / module / seed config for Nest boot and migrate.
39
+ *
40
+ * @example Fintech
41
+ * ```ts
42
+ * // e2e/host.ts
43
+ * export const e2eHost = defineE2eHost({
44
+ * packageRoot: join(__dirname, '..'),
45
+ * mainPath: join(__dirname, 'app/main.ts'),
46
+ * databaseName: 'colveor_fintech_e2e',
47
+ * imports: [FintechModule.forRoot()],
48
+ * typeOrm: {
49
+ * corePackageRoot: resolveCorePackageRoot(),
50
+ * entities: [join(fintechRoot, 'dist', '**', '*.entity.{ts,js}')],
51
+ * migrations: readSortedMigrations([join(fintechRoot, 'dist', 'database', 'migrations')]),
52
+ * },
53
+ * extraSeeds: [runFintechSeeds],
54
+ * });
55
+ *
56
+ * // e2e/app/main.ts
57
+ * e2eHost.listen().catch((err) => { console.error(err); process.exit(1); });
58
+ *
59
+ * // e2e/global-setup.ts
60
+ * export default () => e2eHost.globalSetup();
61
+ * ```
62
+ */
63
+ export declare function defineE2eHost(options?: DefineE2eHostOptions): E2eHost;
64
+ //# sourceMappingURL=define-e2e-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-e2e-host.d.ts","sourceRoot":"","sources":["../../src/e2e/define-e2e-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EACN,KAAK,qBAAqB,EAG1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAsB,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAI5D,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAC3D,0BAA0B,GAAG;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,UAAU,CAAC,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;IACjD,sCAAsC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG;IACrB,qEAAqE;IACrE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,0EAA0E;IAC1E,OAAO,EAAE,oBAAoB,CAAC;IAC9B;;;OAGG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC9C;;;OAGG;IACH,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7F,6BAA6B;IAC7B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAyCzE"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defineE2eHost = defineE2eHost;
4
+ const bootstrap_setup_1 = require("./bootstrap-setup");
5
+ const create_e2e_app_module_1 = require("./create-e2e-app-module");
6
+ const listen_e2e_app_1 = require("./listen-e2e-app");
7
+ const runtime_1 = require("./runtime");
8
+ /**
9
+ * Define an HTTP e2e host once — shared TypeORM / module / seed config for Nest boot and migrate.
10
+ *
11
+ * @example Fintech
12
+ * ```ts
13
+ * // e2e/host.ts
14
+ * export const e2eHost = defineE2eHost({
15
+ * packageRoot: join(__dirname, '..'),
16
+ * mainPath: join(__dirname, 'app/main.ts'),
17
+ * databaseName: 'colveor_fintech_e2e',
18
+ * imports: [FintechModule.forRoot()],
19
+ * typeOrm: {
20
+ * corePackageRoot: resolveCorePackageRoot(),
21
+ * entities: [join(fintechRoot, 'dist', '**', '*.entity.{ts,js}')],
22
+ * migrations: readSortedMigrations([join(fintechRoot, 'dist', 'database', 'migrations')]),
23
+ * },
24
+ * extraSeeds: [runFintechSeeds],
25
+ * });
26
+ *
27
+ * // e2e/app/main.ts
28
+ * e2eHost.listen().catch((err) => { console.error(err); process.exit(1); });
29
+ *
30
+ * // e2e/global-setup.ts
31
+ * export default () => e2eHost.globalSetup();
32
+ * ```
33
+ */
34
+ function defineE2eHost(options = {}) {
35
+ const packageRoot = options.packageRoot ?? process.cwd();
36
+ const AppModule = (0, create_e2e_app_module_1.createE2eAppModule)(options);
37
+ const runtimeFile = (0, runtime_1.getE2eRuntimeFile)(packageRoot);
38
+ return {
39
+ AppModule,
40
+ options,
41
+ listen: () => (0, listen_e2e_app_1.listenE2eApp)(AppModule, {
42
+ port: options.port,
43
+ databaseName: options.databaseName,
44
+ runtimeFile,
45
+ }),
46
+ globalSetup: async (overrides = {}) => {
47
+ const mainPath = overrides.mainPath ?? options.mainPath;
48
+ if (!mainPath) {
49
+ throw new Error('defineE2eHost: mainPath is required for globalSetup ' +
50
+ '(pass it to defineE2eHost or e2eHost.globalSetup({ mainPath })).');
51
+ }
52
+ await (0, bootstrap_setup_1.runE2eGlobalSetup)({
53
+ mainPath,
54
+ packageRoot,
55
+ typeOrm: options.typeOrm,
56
+ extraSeeds: options.extraSeeds,
57
+ skipCoreSeeds: options.skipCoreSeeds,
58
+ port: options.port,
59
+ databaseName: options.databaseName,
60
+ runtimeFile,
61
+ tsNodeProject: options.tsNodeProject,
62
+ });
63
+ },
64
+ globalTeardown: () => (0, bootstrap_setup_1.runE2eGlobalTeardown)({
65
+ packageRoot,
66
+ runtimeFile,
67
+ }),
68
+ };
69
+ }
70
+ //# sourceMappingURL=define-e2e-host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-e2e-host.js","sourceRoot":"","sources":["../../src/e2e/define-e2e-host.ts"],"names":[],"mappings":";;AAyEA,sCAyCC;AA/GD,uDAI2B;AAC3B,mEAA6F;AAE7F,qDAAgD;AAChD,uCAA8C;AAoC9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAgB,aAAa,CAAC,UAAgC,EAAE;IAC/D,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzD,MAAM,SAAS,GAAG,IAAA,0CAAkB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAG,IAAA,2BAAiB,EAAC,WAAW,CAAC,CAAC;IAEnD,OAAO;QACN,SAAS;QACT,OAAO;QACP,MAAM,EAAE,GAAG,EAAE,CACZ,IAAA,6BAAY,EAAC,SAAS,EAAE;YACvB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,WAAW;SACX,CAAC;QACH,WAAW,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,EAAE;YACrC,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;YACxD,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CACd,sDAAsD;oBACrD,kEAAkE,CACnE,CAAC;YACH,CAAC;YAED,MAAM,IAAA,mCAAiB,EAAC;gBACvB,QAAQ;gBACR,WAAW;gBACX,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,WAAW;gBACX,aAAa,EAAE,OAAO,CAAC,aAAa;aACpC,CAAC,CAAC;QACJ,CAAC;QACD,cAAc,EAAE,GAAG,EAAE,CACpB,IAAA,sCAAoB,EAAC;YACpB,WAAW;YACX,WAAW;SACX,CAAC;KACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type { E2eRuntime } from './runtime';
2
+ export { clearE2eRuntime, getE2eRuntimeFile, readE2eRuntime, writeE2eRuntime } from './runtime';
3
+ export type ApplyE2eEnvDefaultsOptions = {
4
+ /** Override listen port (default `E2E_PORT` or `3101`). */
5
+ port?: string;
6
+ /** Override isolated database name (default `E2E_DATABASE_NAME` or `colveor_core_e2e`). */
7
+ databaseName?: string;
8
+ };
9
+ /**
10
+ * Shared HTTP e2e env for @colveor/core consumers.
11
+ *
12
+ * E2E_BASE_URL — when set before setup, skip self-hosted boot and hit this API root
13
+ * E2E_OTP_PHONE — E.164 phone for send-otp (prefer a seeded test.otp_identifiers entry)
14
+ * E2E_PORT / E2E_DATABASE_NAME — isolate self-hosted boot from local example apps
15
+ */
16
+ export declare function getE2eBaseUrl(runtimeFile?: string): string;
17
+ export declare function getE2eOtpPhone(): string;
18
+ /** Defaults applied only when the corresponding env var is unset (CI / fresh machines). */
19
+ export declare function applyE2eEnvDefaults(options?: ApplyE2eEnvDefaultsOptions): void;
20
+ //# sourceMappingURL=e2e-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2e-env.d.ts","sourceRoot":"","sources":["../../src/e2e/e2e-env.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEhG,MAAM,MAAM,0BAA0B,GAAG;IACxC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAW1D;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,IAAI,CAmClF"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.writeE2eRuntime = exports.readE2eRuntime = exports.getE2eRuntimeFile = exports.clearE2eRuntime = void 0;
4
+ exports.getE2eBaseUrl = getE2eBaseUrl;
5
+ exports.getE2eOtpPhone = getE2eOtpPhone;
6
+ exports.applyE2eEnvDefaults = applyE2eEnvDefaults;
7
+ const runtime_1 = require("./runtime");
8
+ var runtime_2 = require("./runtime");
9
+ Object.defineProperty(exports, "clearE2eRuntime", { enumerable: true, get: function () { return runtime_2.clearE2eRuntime; } });
10
+ Object.defineProperty(exports, "getE2eRuntimeFile", { enumerable: true, get: function () { return runtime_2.getE2eRuntimeFile; } });
11
+ Object.defineProperty(exports, "readE2eRuntime", { enumerable: true, get: function () { return runtime_2.readE2eRuntime; } });
12
+ Object.defineProperty(exports, "writeE2eRuntime", { enumerable: true, get: function () { return runtime_2.writeE2eRuntime; } });
13
+ /**
14
+ * Shared HTTP e2e env for @colveor/core consumers.
15
+ *
16
+ * E2E_BASE_URL — when set before setup, skip self-hosted boot and hit this API root
17
+ * E2E_OTP_PHONE — E.164 phone for send-otp (prefer a seeded test.otp_identifiers entry)
18
+ * E2E_PORT / E2E_DATABASE_NAME — isolate self-hosted boot from local example apps
19
+ */
20
+ function getE2eBaseUrl(runtimeFile) {
21
+ const fromEnv = process.env.E2E_BASE_URL?.trim();
22
+ if (fromEnv)
23
+ return fromEnv.replace(/\/$/, '');
24
+ const runtime = (0, runtime_1.readE2eRuntime)(runtimeFile ?? (0, runtime_1.getE2eRuntimeFile)());
25
+ if (runtime?.baseUrl)
26
+ return runtime.baseUrl.replace(/\/$/, '');
27
+ throw new Error('E2E_BASE_URL is not set and e2e/.runtime.json is missing. ' +
28
+ 'Run via `npm run test:e2e` (self-hosted) or export E2E_BASE_URL to an already-running API.');
29
+ }
30
+ function getE2eOtpPhone() {
31
+ return process.env.E2E_OTP_PHONE?.trim() || '+2348012345678';
32
+ }
33
+ /** Defaults applied only when the corresponding env var is unset (CI / fresh machines). */
34
+ function applyE2eEnvDefaults(options = {}) {
35
+ const defaults = {
36
+ NODE_ENV: 'development',
37
+ API_PREFIX: 'api/v1',
38
+ LOG_LEVEL: 'error',
39
+ SWAGGER_ENABLED: 'false',
40
+ REDIS_ENABLED: 'false',
41
+ REALTIME_ENABLED: 'false',
42
+ DATABASE_HOST: 'localhost',
43
+ DATABASE_PORT: '5432',
44
+ DATABASE_USERNAME: 'postgres',
45
+ DATABASE_PASSWORD: 'postgres',
46
+ DATABASE_SSL: 'false',
47
+ JWT_SECRET: 'e2e-jwt-secret-min-32-characters-long!',
48
+ REFRESH_TOKEN_PEPPER: 'e2e-refresh-pepper-min-32-chars-long!',
49
+ SUPER_ADMIN_PHONE: '+2348012345678',
50
+ SUPER_ADMIN_EMAIL: 'e2e-admin@example.com',
51
+ SUPER_ADMIN_FIRST_NAME: 'E2E',
52
+ SUPER_ADMIN_LAST_NAME: 'Admin',
53
+ OTP_USERS: '+2348012345678',
54
+ OTP_CODE_LENGTH: '6',
55
+ AUTH_METHOD: 'phone',
56
+ };
57
+ for (const [key, value] of Object.entries(defaults)) {
58
+ if (process.env[key] === undefined || process.env[key] === '') {
59
+ process.env[key] = value;
60
+ }
61
+ }
62
+ // Always isolate self-hosted e2e from a developer .env / example app unless overridden.
63
+ process.env.PORT = options.port ?? process.env.E2E_PORT?.trim() ?? '3101';
64
+ process.env.DATABASE_NAME =
65
+ options.databaseName ?? process.env.E2E_DATABASE_NAME?.trim() ?? 'colveor_core_e2e';
66
+ process.env.APP_URL = `http://127.0.0.1:${process.env.PORT}`;
67
+ }
68
+ //# sourceMappingURL=e2e-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2e-env.js","sourceRoot":"","sources":["../../src/e2e/e2e-env.ts"],"names":[],"mappings":";;;AAmBA,sCAWC;AAED,wCAEC;AAGD,kDAmCC;AAxED,uCAA8D;AAG9D,qCAAgG;AAAvF,0GAAA,eAAe,OAAA;AAAE,4GAAA,iBAAiB,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,0GAAA,eAAe,OAAA;AAS5E;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,WAAoB;IACjD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IACjD,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAE/C,MAAM,OAAO,GAAG,IAAA,wBAAc,EAAC,WAAW,IAAI,IAAA,2BAAiB,GAAE,CAAC,CAAC;IACnE,IAAI,OAAO,EAAE,OAAO;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAEhE,MAAM,IAAI,KAAK,CACd,4DAA4D;QAC3D,4FAA4F,CAC7F,CAAC;AACH,CAAC;AAED,SAAgB,cAAc;IAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,gBAAgB,CAAC;AAC9D,CAAC;AAED,2FAA2F;AAC3F,SAAgB,mBAAmB,CAAC,UAAsC,EAAE;IAC3E,MAAM,QAAQ,GAA2B;QACxC,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,OAAO;QAClB,eAAe,EAAE,OAAO;QACxB,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE,OAAO;QACzB,aAAa,EAAE,WAAW;QAC1B,aAAa,EAAE,MAAM;QACrB,iBAAiB,EAAE,UAAU;QAC7B,iBAAiB,EAAE,UAAU;QAC7B,YAAY,EAAE,OAAO;QACrB,UAAU,EAAE,wCAAwC;QACpD,oBAAoB,EAAE,uCAAuC;QAC7D,iBAAiB,EAAE,gBAAgB;QACnC,iBAAiB,EAAE,uBAAuB;QAC1C,sBAAsB,EAAE,KAAK;QAC7B,qBAAqB,EAAE,OAAO;QAC9B,SAAS,EAAE,gBAAgB;QAC3B,eAAe,EAAE,GAAG;QACpB,WAAW,EAAE,OAAO;KACpB,CAAC;IAEF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrD,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC;YAC/D,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC1B,CAAC;IACF,CAAC;IAED,wFAAwF;IACxF,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,MAAM,CAAC;IAC1E,OAAO,CAAC,GAAG,CAAC,aAAa;QACxB,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,kBAAkB,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,oBAAoB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,12 @@
1
+ export type E2eFetchResult = {
2
+ res: Response;
3
+ body: unknown;
4
+ };
5
+ export type E2eFetchOptions = RequestInit & {
6
+ /** When true, do not throw on non-2xx (for negative tests). Default false. */
7
+ allowError?: boolean;
8
+ /** Override base URL resolution (defaults to getE2eBaseUrl()). */
9
+ baseUrl?: string;
10
+ };
11
+ export declare function e2eFetch(path: string, init?: E2eFetchOptions): Promise<E2eFetchResult>;
12
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/e2e/http.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC5B,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC3C,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CA2BhG"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.e2eFetch = e2eFetch;
4
+ const e2e_env_1 = require("./e2e-env");
5
+ async function e2eFetch(path, init = {}) {
6
+ const { allowError = false, baseUrl, ...requestInit } = init;
7
+ const root = (baseUrl ?? (0, e2e_env_1.getE2eBaseUrl)()).replace(/\/$/, '');
8
+ const url = `${root}${path.startsWith('/') ? path : `/${path}`}`;
9
+ const res = await fetch(url, {
10
+ ...requestInit,
11
+ headers: {
12
+ 'Content-Type': 'application/json',
13
+ ...(requestInit.headers ?? {}),
14
+ },
15
+ });
16
+ const text = await res.text();
17
+ let body = text;
18
+ try {
19
+ body = text ? JSON.parse(text) : null;
20
+ }
21
+ catch {
22
+ // keep raw text
23
+ }
24
+ if (!allowError && !res.ok) {
25
+ throw new Error(`E2E ${requestInit.method ?? 'GET'} ${url} → ${res.status}\n${typeof body === 'string' ? body : JSON.stringify(body, null, 2)}`);
26
+ }
27
+ return { res, body };
28
+ }
29
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/e2e/http.ts"],"names":[],"mappings":";;AAcA,4BA2BC;AAzCD,uCAA0C;AAcnC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,OAAwB,EAAE;IACtE,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC;IAC7D,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,IAAA,uBAAa,GAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;IACjE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC5B,GAAG,WAAW;QACd,OAAO,EAAE;YACR,cAAc,EAAE,kBAAkB;YAClC,GAAG,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC;SAC9B;KACD,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,IAAI,GAAY,IAAI,CAAC;IACzB,IAAI,CAAC;QACJ,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACR,gBAAgB;IACjB,CAAC;IAED,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACd,OAAO,WAAW,CAAC,MAAM,IAAI,KAAK,IAAI,GAAG,MAAM,GAAG,CAAC,MAAM,KAAK,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAC/H,CAAC;IACH,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * HTTP e2e host kit for `@colveor/core` and downstream packages (e.g. `@colveor/fintech`).
3
+ *
4
+ * Import from `@colveor/core/e2e` (not the package root).
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { defineE2eHost, readSortedMigrations, resolveCorePackageRoot } from '@colveor/core/e2e';
9
+ * import { FintechModule } from '@colveor/fintech';
10
+ *
11
+ * export const e2eHost = defineE2eHost({
12
+ * packageRoot: join(__dirname, '..'),
13
+ * mainPath: join(__dirname, 'app/main.ts'),
14
+ * databaseName: 'colveor_fintech_e2e',
15
+ * imports: [FintechModule.forRoot()],
16
+ * typeOrm: {
17
+ * corePackageRoot: resolveCorePackageRoot(),
18
+ * entities: [join(fintechRoot, 'dist', '**', '*.entity.{ts,js}')],
19
+ * migrations: readSortedMigrations([
20
+ * join(fintechRoot, 'dist', 'database', 'migrations'),
21
+ * ]),
22
+ * },
23
+ * extraSeeds: [runFintechSeeds],
24
+ * });
25
+ * ```
26
+ */
27
+ export { runCoreSeeds } from '../database/seeds/run-seed';
28
+ export type { TypeOrmExtensionOptions } from '../database/typeorm.util';
29
+ export { createDataSourceOptions, createTypeOrmOptions, readSortedMigrations, resolveCorePackageRoot, } from '../database/typeorm.util';
30
+ export type { E2eGlobalSetupOptions, E2eGlobalTeardownOptions } from './bootstrap-setup';
31
+ export { ensureE2eDatabaseExists, runE2eGlobalSetup, runE2eGlobalTeardown, runE2eMigrations, runE2eSeeds, } from './bootstrap-setup';
32
+ export type { CreateE2eAppModuleOptions } from './create-e2e-app-module';
33
+ export { createE2eAppModule } from './create-e2e-app-module';
34
+ export type { DefineE2eHostOptions, E2eHost } from './define-e2e-host';
35
+ export { defineE2eHost } from './define-e2e-host';
36
+ export type { ApplyE2eEnvDefaultsOptions, E2eRuntime } from './e2e-env';
37
+ export { applyE2eEnvDefaults, clearE2eRuntime, getE2eBaseUrl, getE2eOtpPhone, getE2eRuntimeFile, readE2eRuntime, writeE2eRuntime, } from './e2e-env';
38
+ export type { E2eFetchOptions, E2eFetchResult } from './http';
39
+ export { e2eFetch } from './http';
40
+ export type { ListenE2eAppOptions } from './listen-e2e-app';
41
+ export { listenE2eApp } from './listen-e2e-app';
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/e2e/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACN,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,GACtB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EACN,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,GACX,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /**
3
+ * HTTP e2e host kit for `@colveor/core` and downstream packages (e.g. `@colveor/fintech`).
4
+ *
5
+ * Import from `@colveor/core/e2e` (not the package root).
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { defineE2eHost, readSortedMigrations, resolveCorePackageRoot } from '@colveor/core/e2e';
10
+ * import { FintechModule } from '@colveor/fintech';
11
+ *
12
+ * export const e2eHost = defineE2eHost({
13
+ * packageRoot: join(__dirname, '..'),
14
+ * mainPath: join(__dirname, 'app/main.ts'),
15
+ * databaseName: 'colveor_fintech_e2e',
16
+ * imports: [FintechModule.forRoot()],
17
+ * typeOrm: {
18
+ * corePackageRoot: resolveCorePackageRoot(),
19
+ * entities: [join(fintechRoot, 'dist', '**', '*.entity.{ts,js}')],
20
+ * migrations: readSortedMigrations([
21
+ * join(fintechRoot, 'dist', 'database', 'migrations'),
22
+ * ]),
23
+ * },
24
+ * extraSeeds: [runFintechSeeds],
25
+ * });
26
+ * ```
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.listenE2eApp = exports.e2eFetch = exports.writeE2eRuntime = exports.readE2eRuntime = exports.getE2eRuntimeFile = exports.getE2eOtpPhone = exports.getE2eBaseUrl = exports.clearE2eRuntime = exports.applyE2eEnvDefaults = exports.defineE2eHost = exports.createE2eAppModule = exports.runE2eSeeds = exports.runE2eMigrations = exports.runE2eGlobalTeardown = exports.runE2eGlobalSetup = exports.ensureE2eDatabaseExists = exports.resolveCorePackageRoot = exports.readSortedMigrations = exports.createTypeOrmOptions = exports.createDataSourceOptions = exports.runCoreSeeds = void 0;
30
+ var run_seed_1 = require("../database/seeds/run-seed");
31
+ Object.defineProperty(exports, "runCoreSeeds", { enumerable: true, get: function () { return run_seed_1.runCoreSeeds; } });
32
+ var typeorm_util_1 = require("../database/typeorm.util");
33
+ Object.defineProperty(exports, "createDataSourceOptions", { enumerable: true, get: function () { return typeorm_util_1.createDataSourceOptions; } });
34
+ Object.defineProperty(exports, "createTypeOrmOptions", { enumerable: true, get: function () { return typeorm_util_1.createTypeOrmOptions; } });
35
+ Object.defineProperty(exports, "readSortedMigrations", { enumerable: true, get: function () { return typeorm_util_1.readSortedMigrations; } });
36
+ Object.defineProperty(exports, "resolveCorePackageRoot", { enumerable: true, get: function () { return typeorm_util_1.resolveCorePackageRoot; } });
37
+ var bootstrap_setup_1 = require("./bootstrap-setup");
38
+ Object.defineProperty(exports, "ensureE2eDatabaseExists", { enumerable: true, get: function () { return bootstrap_setup_1.ensureE2eDatabaseExists; } });
39
+ Object.defineProperty(exports, "runE2eGlobalSetup", { enumerable: true, get: function () { return bootstrap_setup_1.runE2eGlobalSetup; } });
40
+ Object.defineProperty(exports, "runE2eGlobalTeardown", { enumerable: true, get: function () { return bootstrap_setup_1.runE2eGlobalTeardown; } });
41
+ Object.defineProperty(exports, "runE2eMigrations", { enumerable: true, get: function () { return bootstrap_setup_1.runE2eMigrations; } });
42
+ Object.defineProperty(exports, "runE2eSeeds", { enumerable: true, get: function () { return bootstrap_setup_1.runE2eSeeds; } });
43
+ var create_e2e_app_module_1 = require("./create-e2e-app-module");
44
+ Object.defineProperty(exports, "createE2eAppModule", { enumerable: true, get: function () { return create_e2e_app_module_1.createE2eAppModule; } });
45
+ var define_e2e_host_1 = require("./define-e2e-host");
46
+ Object.defineProperty(exports, "defineE2eHost", { enumerable: true, get: function () { return define_e2e_host_1.defineE2eHost; } });
47
+ var e2e_env_1 = require("./e2e-env");
48
+ Object.defineProperty(exports, "applyE2eEnvDefaults", { enumerable: true, get: function () { return e2e_env_1.applyE2eEnvDefaults; } });
49
+ Object.defineProperty(exports, "clearE2eRuntime", { enumerable: true, get: function () { return e2e_env_1.clearE2eRuntime; } });
50
+ Object.defineProperty(exports, "getE2eBaseUrl", { enumerable: true, get: function () { return e2e_env_1.getE2eBaseUrl; } });
51
+ Object.defineProperty(exports, "getE2eOtpPhone", { enumerable: true, get: function () { return e2e_env_1.getE2eOtpPhone; } });
52
+ Object.defineProperty(exports, "getE2eRuntimeFile", { enumerable: true, get: function () { return e2e_env_1.getE2eRuntimeFile; } });
53
+ Object.defineProperty(exports, "readE2eRuntime", { enumerable: true, get: function () { return e2e_env_1.readE2eRuntime; } });
54
+ Object.defineProperty(exports, "writeE2eRuntime", { enumerable: true, get: function () { return e2e_env_1.writeE2eRuntime; } });
55
+ var http_1 = require("./http");
56
+ Object.defineProperty(exports, "e2eFetch", { enumerable: true, get: function () { return http_1.e2eFetch; } });
57
+ var listen_e2e_app_1 = require("./listen-e2e-app");
58
+ Object.defineProperty(exports, "listenE2eApp", { enumerable: true, get: function () { return listen_e2e_app_1.listenE2eApp; } });
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/e2e/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAEH,uDAA0D;AAAjD,wGAAA,YAAY,OAAA;AAErB,yDAKkC;AAJjC,uHAAA,uBAAuB,OAAA;AACvB,oHAAA,oBAAoB,OAAA;AACpB,oHAAA,oBAAoB,OAAA;AACpB,sHAAA,sBAAsB,OAAA;AAGvB,qDAM2B;AAL1B,0HAAA,uBAAuB,OAAA;AACvB,oHAAA,iBAAiB,OAAA;AACjB,uHAAA,oBAAoB,OAAA;AACpB,mHAAA,gBAAgB,OAAA;AAChB,8GAAA,WAAW,OAAA;AAGZ,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAE3B,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AAEtB,qCAQmB;AAPlB,8GAAA,mBAAmB,OAAA;AACnB,0GAAA,eAAe,OAAA;AACf,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,4GAAA,iBAAiB,OAAA;AACjB,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AAGhB,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AAEjB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA"}
@@ -0,0 +1,15 @@
1
+ import type { Type } from '@nestjs/common';
2
+ import type { NestExpressApplication } from '@nestjs/platform-express';
3
+ import { type ApplyE2eEnvDefaultsOptions } from './e2e-env';
4
+ export type ListenE2eAppOptions = ApplyE2eEnvDefaultsOptions & {
5
+ /** Absolute path for e2e/.runtime.json. Defaults to `<cwd>/e2e/.runtime.json`. */
6
+ runtimeFile?: string;
7
+ /** Apply env defaults before boot (default true). */
8
+ applyEnvDefaults?: boolean;
9
+ };
10
+ /**
11
+ * Boot a Nest host with Colveor defaults, write runtime metadata, and keep the process alive
12
+ * until SIGTERM/SIGINT (used as the child entry for Jest globalSetup).
13
+ */
14
+ export declare function listenE2eApp(appModule: Type<unknown>, options?: ListenE2eAppOptions): Promise<NestExpressApplication>;
15
+ //# sourceMappingURL=listen-e2e-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listen-e2e-app.d.ts","sourceRoot":"","sources":["../../src/e2e/listen-e2e-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAGjF,MAAM,MAAM,mBAAmB,GAAG,0BAA0B,GAAG;IAC9D,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAsB,YAAY,CACjC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,EACxB,OAAO,GAAE,mBAAwB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAyCjC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listenE2eApp = listenE2eApp;
4
+ const bootstrap_1 = require("../bootstrap");
5
+ const e2e_env_1 = require("./e2e-env");
6
+ const runtime_1 = require("./runtime");
7
+ /**
8
+ * Boot a Nest host with Colveor defaults, write runtime metadata, and keep the process alive
9
+ * until SIGTERM/SIGINT (used as the child entry for Jest globalSetup).
10
+ */
11
+ async function listenE2eApp(appModule, options = {}) {
12
+ if (options.applyEnvDefaults !== false) {
13
+ (0, e2e_env_1.applyE2eEnvDefaults)({
14
+ port: options.port,
15
+ databaseName: options.databaseName,
16
+ });
17
+ }
18
+ const app = await (0, bootstrap_1.bootstrapColveorApp)(appModule, {
19
+ logger: ['error', 'warn'],
20
+ });
21
+ const address = app.getHttpServer().address();
22
+ const port = typeof address === 'object' && address ? address.port : Number(process.env.PORT ?? 3101);
23
+ const apiPrefix = (process.env.API_PREFIX ?? 'api/v1').replace(/^\/|\/$/g, '');
24
+ const baseUrl = `http://127.0.0.1:${port}/${apiPrefix}`;
25
+ const runtimeFile = options.runtimeFile ?? (0, runtime_1.getE2eRuntimeFile)();
26
+ (0, runtime_1.writeE2eRuntime)({
27
+ baseUrl,
28
+ managed: true,
29
+ pid: process.pid,
30
+ port,
31
+ }, runtimeFile);
32
+ const shutdown = async () => {
33
+ await app.close();
34
+ process.exit(0);
35
+ };
36
+ process.on('SIGTERM', () => {
37
+ void shutdown();
38
+ });
39
+ process.on('SIGINT', () => {
40
+ void shutdown();
41
+ });
42
+ return app;
43
+ }
44
+ //# sourceMappingURL=listen-e2e-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listen-e2e-app.js","sourceRoot":"","sources":["../../src/e2e/listen-e2e-app.ts"],"names":[],"mappings":";;AAkBA,oCA4CC;AA3DD,4CAAmD;AACnD,uCAAiF;AACjF,uCAA+D;AAS/D;;;GAGG;AACI,KAAK,UAAU,YAAY,CACjC,SAAwB,EACxB,UAA+B,EAAE;IAEjC,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,EAAE,CAAC;QACxC,IAAA,6BAAmB,EAAC;YACnB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,OAAO,CAAC,YAAY;SAClC,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,IAAA,+BAAmB,EAAC,SAAS,EAAE;QAChD,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,GAAG,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,CAAC;IAC9C,MAAM,IAAI,GACT,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;IAC1F,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC/E,MAAM,OAAO,GAAG,oBAAoB,IAAI,IAAI,SAAS,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,IAAA,2BAAiB,GAAE,CAAC;IAE/D,IAAA,yBAAe,EACd;QACC,OAAO;QACP,OAAO,EAAE,IAAI;QACb,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,IAAI;KACJ,EACD,WAAW,CACX,CAAC;IAEF,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;QAC3B,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;QAC1B,KAAK,QAAQ,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACzB,KAAK,QAAQ,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export type E2eRuntime = {
2
+ baseUrl: string;
3
+ managed: boolean;
4
+ pid?: number;
5
+ port?: number;
6
+ };
7
+ /** Default runtime metadata path: `<cwd>/e2e/.runtime.json`. */
8
+ export declare function getE2eRuntimeFile(packageRoot?: string): string;
9
+ export declare function readE2eRuntime(runtimeFile?: string): E2eRuntime | undefined;
10
+ export declare function writeE2eRuntime(runtime: E2eRuntime, runtimeFile?: string): void;
11
+ export declare function clearE2eRuntime(runtimeFile?: string): void;
12
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/e2e/runtime.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,WAAW,GAAE,MAAsB,GAAG,MAAM,CAE7E;AAED,wBAAgB,cAAc,CAAC,WAAW,GAAE,MAA4B,GAAG,UAAU,GAAG,SAAS,CAGhG;AAED,wBAAgB,eAAe,CAC9B,OAAO,EAAE,UAAU,EACnB,WAAW,GAAE,MAA4B,GACvC,IAAI,CAEN;AAED,wBAAgB,eAAe,CAAC,WAAW,GAAE,MAA4B,GAAG,IAAI,CAE/E"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getE2eRuntimeFile = getE2eRuntimeFile;
4
+ exports.readE2eRuntime = readE2eRuntime;
5
+ exports.writeE2eRuntime = writeE2eRuntime;
6
+ exports.clearE2eRuntime = clearE2eRuntime;
7
+ const node_fs_1 = require("node:fs");
8
+ const node_path_1 = require("node:path");
9
+ /** Default runtime metadata path: `<cwd>/e2e/.runtime.json`. */
10
+ function getE2eRuntimeFile(packageRoot = process.cwd()) {
11
+ return (0, node_path_1.join)(packageRoot, 'e2e', '.runtime.json');
12
+ }
13
+ function readE2eRuntime(runtimeFile = getE2eRuntimeFile()) {
14
+ if (!(0, node_fs_1.existsSync)(runtimeFile))
15
+ return undefined;
16
+ return JSON.parse((0, node_fs_1.readFileSync)(runtimeFile, 'utf8'));
17
+ }
18
+ function writeE2eRuntime(runtime, runtimeFile = getE2eRuntimeFile()) {
19
+ (0, node_fs_1.writeFileSync)(runtimeFile, JSON.stringify(runtime, null, 2));
20
+ }
21
+ function clearE2eRuntime(runtimeFile = getE2eRuntimeFile()) {
22
+ if ((0, node_fs_1.existsSync)(runtimeFile))
23
+ (0, node_fs_1.unlinkSync)(runtimeFile);
24
+ }
25
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/e2e/runtime.ts"],"names":[],"mappings":";;AAWA,8CAEC;AAED,wCAGC;AAED,0CAKC;AAED,0CAEC;AA7BD,qCAA8E;AAC9E,yCAAiC;AASjC,gEAAgE;AAChE,SAAgB,iBAAiB,CAAC,cAAsB,OAAO,CAAC,GAAG,EAAE;IACpE,OAAO,IAAA,gBAAI,EAAC,WAAW,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,cAAc,CAAC,cAAsB,iBAAiB,EAAE;IACvE,IAAI,CAAC,IAAA,oBAAU,EAAC,WAAW,CAAC;QAAE,OAAO,SAAS,CAAC;IAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,WAAW,EAAE,MAAM,CAAC,CAAe,CAAC;AACpE,CAAC;AAED,SAAgB,eAAe,CAC9B,OAAmB,EACnB,cAAsB,iBAAiB,EAAE;IAEzC,IAAA,uBAAa,EAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,SAAgB,eAAe,CAAC,cAAsB,iBAAiB,EAAE;IACxE,IAAI,IAAA,oBAAU,EAAC,WAAW,CAAC;QAAE,IAAA,oBAAU,EAAC,WAAW,CAAC,CAAC;AACtD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -11,6 +11,9 @@ export { REDIS_CLIENT, RedisModule } from './config/redis.module';
11
11
  export { RedisThrottlerStorage, RedisThrottlerStorageModule, } from './config/redis-throttler.storage';
12
12
  export type { PostgresSslOptions, RedisTlsInput, RedisTlsOptions } from './config/tls.util';
13
13
  export { postgresSslFromEnv, readOptionalTlsCa, redisTlsFromConfigService, redisTlsFromInput, } from './config/tls.util';
14
+ export { FcmNotConfiguredError, FcmTransientSendError, } from './modules/notifications/services/fcm.errors';
15
+ export { FcmService } from './modules/notifications/services/fcm.service';
16
+ export { FirebaseService } from './modules/notifications/services/firebase.service';
14
17
  export * from './common';
15
18
  export { TypeOrmService } from './database/typeorm.service';
16
19
  export type { CoreTypeOrmPaths, TypeOrmExtensionOptions } from './database/typeorm.util';
@@ -39,6 +42,8 @@ export * from './modules/invitations';
39
42
  export { InvitationsModule } from './modules/invitations/invitations.module';
40
43
  export { NotificationsModule } from './modules/notifications/notifications.module';
41
44
  export { ProfileModule } from './modules/profile/profile.module';
45
+ export * from './modules/ratings';
46
+ export { RatingsModule } from './modules/ratings/ratings.module';
42
47
  export type { RealtimeControlMessage, RealtimeEmitOptions, RealtimeEnvelope, RealtimeInboundHandler, RealtimeModuleOptions, RealtimePresence, RealtimeSocketData, } from './modules/realtime';
43
48
  export { buildEnvelope, familyRoom, installRealtimeIoAdapter, mapRealtimeHandshakeError, REALTIME_CLIENT_EVENTS, REALTIME_CLOSE_CODES, REALTIME_CONTROL_CHANNEL, REALTIME_ENABLED_TOKEN, REALTIME_ENVELOPE_VERSION, REALTIME_PATH, REALTIME_PERMISSIONS, REALTIME_ROOM_PREFIX_ALLOWLIST, REALTIME_SERVER_EVENTS, RealtimeHandlerRegistry, RealtimeModule, RealtimePresenceService, RealtimeService, userRoom, } from './modules/realtime';
44
49
  export * from './modules/roles/dto';