@colveor/core 1.4.0 → 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.
- package/CHANGELOG.md +6 -0
- package/README.md +3 -2
- package/dist/common/guards/index.d.ts +2 -0
- package/dist/common/guards/index.d.ts.map +1 -1
- package/dist/common/guards/index.js +2 -0
- package/dist/common/guards/index.js.map +1 -1
- package/dist/common/guards/ratings-ip-rate-limit.guard.d.ts +16 -0
- package/dist/common/guards/ratings-ip-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/ratings-ip-rate-limit.guard.js +95 -0
- package/dist/common/guards/ratings-ip-rate-limit.guard.js.map +1 -0
- package/dist/common/guards/ratings-user-rate-limit.guard.d.ts +16 -0
- package/dist/common/guards/ratings-user-rate-limit.guard.d.ts.map +1 -0
- package/dist/common/guards/ratings-user-rate-limit.guard.js +86 -0
- package/dist/common/guards/ratings-user-rate-limit.guard.js.map +1 -0
- package/dist/config/firebase.module.d.ts +6 -7
- package/dist/config/firebase.module.d.ts.map +1 -1
- package/dist/config/firebase.module.js +7 -20
- package/dist/config/firebase.module.js.map +1 -1
- package/dist/core.module.d.ts +1 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +2 -0
- package/dist/core.module.js.map +1 -1
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts.map +1 -1
- package/dist/database/migrations/1784284557960-audit-partitioning.js +78 -35
- package/dist/database/migrations/1784284557960-audit-partitioning.js.map +1 -1
- package/dist/database/migrations/1784284557961-audit-chain-seq-ensure.d.ts +14 -0
- package/dist/database/migrations/1784284557961-audit-chain-seq-ensure.d.ts.map +1 -0
- package/dist/database/migrations/1784284557961-audit-chain-seq-ensure.js +86 -0
- package/dist/database/migrations/1784284557961-audit-chain-seq-ensure.js.map +1 -0
- package/dist/database/migrations/1784284557962-user-ratings.d.ts +7 -0
- package/dist/database/migrations/1784284557962-user-ratings.d.ts.map +1 -0
- package/dist/database/migrations/1784284557962-user-ratings.js +71 -0
- package/dist/database/migrations/1784284557962-user-ratings.js.map +1 -0
- package/dist/database/migrations/1784284557965-device-token-fcm-unique.d.ts +7 -0
- package/dist/database/migrations/1784284557965-device-token-fcm-unique.d.ts.map +1 -0
- package/dist/database/migrations/1784284557965-device-token-fcm-unique.js +42 -0
- package/dist/database/migrations/1784284557965-device-token-fcm-unique.js.map +1 -0
- package/dist/database/seeds/roles.seed.d.ts.map +1 -1
- package/dist/database/seeds/roles.seed.js +2 -0
- package/dist/database/seeds/roles.seed.js.map +1 -1
- package/dist/database/seeds/settings.seed.d.ts +1 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -1
- package/dist/database/seeds/settings.seed.js +148 -10
- package/dist/database/seeds/settings.seed.js.map +1 -1
- package/dist/database/seeds/user.seed.js +1 -1
- package/dist/database/seeds/user.seed.js.map +1 -1
- package/dist/e2e/bootstrap-setup.d.ts +41 -0
- package/dist/e2e/bootstrap-setup.d.ts.map +1 -0
- package/dist/e2e/bootstrap-setup.js +169 -0
- package/dist/e2e/bootstrap-setup.js.map +1 -0
- package/dist/e2e/create-e2e-app-module.d.ts +42 -0
- package/dist/e2e/create-e2e-app-module.d.ts.map +1 -0
- package/dist/e2e/create-e2e-app-module.js +67 -0
- package/dist/e2e/create-e2e-app-module.js.map +1 -0
- package/dist/e2e/define-e2e-host.d.ts +64 -0
- package/dist/e2e/define-e2e-host.d.ts.map +1 -0
- package/dist/e2e/define-e2e-host.js +70 -0
- package/dist/e2e/define-e2e-host.js.map +1 -0
- package/dist/e2e/e2e-env.d.ts +20 -0
- package/dist/e2e/e2e-env.d.ts.map +1 -0
- package/dist/e2e/e2e-env.js +68 -0
- package/dist/e2e/e2e-env.js.map +1 -0
- package/dist/e2e/http.d.ts +12 -0
- package/dist/e2e/http.d.ts.map +1 -0
- package/dist/e2e/http.js +29 -0
- package/dist/e2e/http.js.map +1 -0
- package/dist/e2e/index.d.ts +42 -0
- package/dist/e2e/index.d.ts.map +1 -0
- package/dist/e2e/index.js +59 -0
- package/dist/e2e/index.js.map +1 -0
- package/dist/e2e/listen-e2e-app.d.ts +15 -0
- package/dist/e2e/listen-e2e-app.d.ts.map +1 -0
- package/dist/e2e/listen-e2e-app.js +44 -0
- package/dist/e2e/listen-e2e-app.js.map +1 -0
- package/dist/e2e/runtime.d.ts +12 -0
- package/dist/e2e/runtime.d.ts.map +1 -0
- package/dist/e2e/runtime.js +25 -0
- package/dist/e2e/runtime.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.js +3 -2
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
- package/dist/modules/audit/constants/audit-actions.d.ts +3 -0
- package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -1
- package/dist/modules/audit/constants/audit-actions.js +4 -0
- package/dist/modules/audit/constants/audit-actions.js.map +1 -1
- package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -1
- package/dist/modules/audit/services/audit-write.service.js +2 -4
- package/dist/modules/audit/services/audit-write.service.js.map +1 -1
- package/dist/modules/auth/services/account.service.d.ts.map +1 -1
- package/dist/modules/auth/services/account.service.js +0 -1
- package/dist/modules/auth/services/account.service.js.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts +1 -0
- package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.js +3 -0
- package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.js +3 -1
- package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/types/payload-snapshot.d.ts +1 -0
- package/dist/modules/delivery/types/payload-snapshot.d.ts.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.js +3 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.d.ts +2 -1
- package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.js +5 -2
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
- package/dist/modules/notifications/dto/device.dto.d.ts.map +1 -1
- package/dist/modules/notifications/dto/device.dto.js +3 -0
- package/dist/modules/notifications/dto/device.dto.js.map +1 -1
- package/dist/modules/notifications/dto/fcm.dto.d.ts +2 -2
- package/dist/modules/notifications/dto/fcm.dto.d.ts.map +1 -1
- package/dist/modules/notifications/dto/fcm.dto.js +36 -0
- package/dist/modules/notifications/dto/fcm.dto.js.map +1 -1
- package/dist/modules/notifications/dto/index.d.ts +0 -1
- package/dist/modules/notifications/dto/index.d.ts.map +1 -1
- package/dist/modules/notifications/dto/index.js +0 -1
- package/dist/modules/notifications/dto/index.js.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.js +2 -3
- package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
- package/dist/modules/notifications/firebase.module.d.ts +5 -2
- package/dist/modules/notifications/firebase.module.d.ts.map +1 -1
- package/dist/modules/notifications/firebase.module.js +9 -4
- package/dist/modules/notifications/firebase.module.js.map +1 -1
- package/dist/modules/notifications/services/fcm.errors.d.ts +9 -0
- package/dist/modules/notifications/services/fcm.errors.d.ts.map +1 -0
- package/dist/modules/notifications/services/fcm.errors.js +20 -0
- package/dist/modules/notifications/services/fcm.errors.js.map +1 -0
- package/dist/modules/notifications/services/fcm.service.d.ts +12 -3
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/fcm.service.js +94 -51
- package/dist/modules/notifications/services/fcm.service.js.map +1 -1
- package/dist/modules/notifications/services/index.d.ts +1 -0
- package/dist/modules/notifications/services/index.d.ts.map +1 -1
- package/dist/modules/notifications/services/index.js +1 -0
- package/dist/modules/notifications/services/index.js.map +1 -1
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/notifications.service.js +1 -0
- package/dist/modules/notifications/services/notifications.service.js.map +1 -1
- package/dist/modules/ratings/controllers/ratings.controller.d.ts +17 -0
- package/dist/modules/ratings/controllers/ratings.controller.d.ts.map +1 -0
- package/dist/modules/ratings/controllers/ratings.controller.js +187 -0
- package/dist/modules/ratings/controllers/ratings.controller.js.map +1 -0
- package/dist/modules/ratings/dto/rating.dto.d.ts +39 -0
- package/dist/modules/ratings/dto/rating.dto.d.ts.map +1 -0
- package/dist/modules/ratings/dto/rating.dto.js +186 -0
- package/dist/modules/ratings/dto/rating.dto.js.map +1 -0
- package/dist/modules/ratings/entities/user-rating-stats.entity.d.ts +14 -0
- package/dist/modules/ratings/entities/user-rating-stats.entity.d.ts.map +1 -0
- package/dist/modules/ratings/entities/user-rating-stats.entity.js +72 -0
- package/dist/modules/ratings/entities/user-rating-stats.entity.js.map +1 -0
- package/dist/modules/ratings/entities/user-rating.entity.d.ts +11 -0
- package/dist/modules/ratings/entities/user-rating.entity.d.ts.map +1 -0
- package/dist/modules/ratings/entities/user-rating.entity.js +56 -0
- package/dist/modules/ratings/entities/user-rating.entity.js.map +1 -0
- package/dist/modules/ratings/events/rating.events.d.ts +17 -0
- package/dist/modules/ratings/events/rating.events.d.ts.map +1 -0
- package/dist/modules/ratings/events/rating.events.js +13 -0
- package/dist/modules/ratings/events/rating.events.js.map +1 -0
- package/dist/modules/ratings/index.d.ts +10 -0
- package/dist/modules/ratings/index.d.ts.map +1 -0
- package/dist/modules/ratings/index.js +29 -0
- package/dist/modules/ratings/index.js.map +1 -0
- package/dist/modules/ratings/listeners/ratings-account-deleted.listener.d.ts +10 -0
- package/dist/modules/ratings/listeners/ratings-account-deleted.listener.d.ts.map +1 -0
- package/dist/modules/ratings/listeners/ratings-account-deleted.listener.js +50 -0
- package/dist/modules/ratings/listeners/ratings-account-deleted.listener.js.map +1 -0
- package/dist/modules/ratings/ratings.manifest.d.ts +8 -0
- package/dist/modules/ratings/ratings.manifest.d.ts.map +1 -0
- package/dist/modules/ratings/ratings.manifest.js +31 -0
- package/dist/modules/ratings/ratings.manifest.js.map +1 -0
- package/dist/modules/ratings/ratings.module.d.ts +3 -0
- package/dist/modules/ratings/ratings.module.d.ts.map +1 -0
- package/dist/modules/ratings/ratings.module.js +39 -0
- package/dist/modules/ratings/ratings.module.js.map +1 -0
- package/dist/modules/ratings/services/ratings-retention.service.d.ts +17 -0
- package/dist/modules/ratings/services/ratings-retention.service.d.ts.map +1 -0
- package/dist/modules/ratings/services/ratings-retention.service.js +96 -0
- package/dist/modules/ratings/services/ratings-retention.service.js.map +1 -0
- package/dist/modules/ratings/services/ratings.service.d.ts +53 -0
- package/dist/modules/ratings/services/ratings.service.d.ts.map +1 -0
- package/dist/modules/ratings/services/ratings.service.js +546 -0
- package/dist/modules/ratings/services/ratings.service.js.map +1 -0
- package/dist/modules/ratings/utils/rating-cursor.util.d.ts +6 -0
- package/dist/modules/ratings/utils/rating-cursor.util.d.ts.map +1 -0
- package/dist/modules/ratings/utils/rating-cursor.util.js +29 -0
- package/dist/modules/ratings/utils/rating-cursor.util.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +15 -1
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.defaults.js +17 -2
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
- package/dist/modules/settings/constants/settings.keys.d.ts +26 -2
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.keys.js +27 -2
- package/dist/modules/settings/constants/settings.keys.js.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.js +30 -4
- package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
- package/dist/modules/settings/services/settings.service.d.ts +2 -0
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
- package/dist/modules/settings/services/settings.service.js +17 -0
- package/dist/modules/settings/services/settings.service.js.map +1 -1
- package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -1
- package/dist/modules/settings/utils/settings-secret.util.js +3 -1
- package/dist/modules/settings/utils/settings-secret.util.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +8 -1
- package/dist/modules/users/services/users.service.d.ts.map +1 -1
- package/dist/modules/users/services/users.service.js +49 -2
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;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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"}
|
package/dist/e2e/http.js
ADDED
|
@@ -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,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AE,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,CAC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AAC;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';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAG5B,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,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0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.UsersModule = exports.UsersService = exports.UserStatus = exports.User = exports.SettingsModule = exports.AppSetting = exports.SessionsModule = exports.TokenService = exports.RolesModule = exports.userRoom = exports.RealtimeService = exports.RealtimePresenceService = exports.RealtimeModule = exports.RealtimeHandlerRegistry = exports.REALTIME_SERVER_EVENTS = exports.REALTIME_ROOM_PREFIX_ALLOWLIST = exports.REALTIME_PERMISSIONS = exports.REALTIME_PATH = exports.REALTIME_ENVELOPE_VERSION = exports.REALTIME_ENABLED_TOKEN = exports.REALTIME_CONTROL_CHANNEL = exports.REALTIME_CLOSE_CODES = exports.REALTIME_CLIENT_EVENTS = exports.mapRealtimeHandshakeError = exports.installRealtimeIoAdapter = exports.familyRoom = exports.buildEnvelope = exports.ProfileModule = exports.NotificationsModule = exports.InvitationsModule = exports.FileUploadService = exports.FileUploadModule = exports.registerUploadCategories = exports.mergeUploadCategories = exports.getDefaultUploadCategories = exports.DEFAULT_UPLOAD_CATEGORIES = exports.clearRegisteredUploadCategories = exports.AccessTokenValidator = exports.USER_SESSION_EPOCH_PREFIX = exports.JWT_REVOKED_FAMILY_PREFIX = exports.JWT_BLOCKLIST_PREFIX = void 0;
|
|
17
|
+
exports.AuditFilterDto = exports.AuditExportQueryDto = exports.AuditEvent = exports.AUDIT_PERMISSIONS = exports.AUDIT_ACTIONS = exports.Audit = exports.AdminModule = exports.runCoreSeeds = exports.USER_PERMISSION_SLUGS = exports.TracingService = exports.StructuredLoggingInterceptor = exports.StructuredLoggerService = exports.ObservabilityModule = exports.ObservabilityContextStore = exports.ObservabilityContextMiddleware = exports.MetricsService = exports.JobObservabilityRunner = exports.ErrorReporterService = exports.HealthModule = exports.NotificationDeliveryService = exports.NotificationAuditService = exports.DeliveryModule = exports.resolveCorePackageRoot = exports.readSortedMigrations = exports.getCoreTypeOrmPaths = exports.createTypeOrmOptions = exports.createDataSourceOptions = exports.TypeOrmService = exports.FirebaseService = exports.FcmService = exports.FcmTransientSendError = exports.FcmNotConfiguredError = exports.redisTlsFromInput = exports.redisTlsFromConfigService = exports.readOptionalTlsCa = exports.postgresSslFromEnv = exports.RedisThrottlerStorageModule = exports.RedisThrottlerStorage = exports.RedisModule = exports.REDIS_CLIENT = exports.FirebaseModule = exports.envValidation = exports.tryDecrypt = exports.encrypt = exports.decrypt = exports.databaseConfig = exports.parseHttpRequestTimeoutMs = exports.appConfig = exports.CoreModule = exports.createCoreConfigModule = void 0;
|
|
18
|
+
exports.UsersModule = exports.UsersService = exports.UserStatus = exports.User = exports.SettingsModule = exports.AppSetting = exports.SessionsModule = exports.TokenService = exports.RolesModule = exports.userRoom = exports.RealtimeService = exports.RealtimePresenceService = exports.RealtimeModule = exports.RealtimeHandlerRegistry = exports.REALTIME_SERVER_EVENTS = exports.REALTIME_ROOM_PREFIX_ALLOWLIST = exports.REALTIME_PERMISSIONS = exports.REALTIME_PATH = exports.REALTIME_ENVELOPE_VERSION = exports.REALTIME_ENABLED_TOKEN = exports.REALTIME_CONTROL_CHANNEL = exports.REALTIME_CLOSE_CODES = exports.REALTIME_CLIENT_EVENTS = exports.mapRealtimeHandshakeError = exports.installRealtimeIoAdapter = exports.familyRoom = exports.buildEnvelope = exports.RatingsModule = exports.ProfileModule = exports.NotificationsModule = exports.InvitationsModule = exports.FileUploadService = exports.FileUploadModule = exports.registerUploadCategories = exports.mergeUploadCategories = exports.getDefaultUploadCategories = exports.DEFAULT_UPLOAD_CATEGORIES = exports.clearRegisteredUploadCategories = exports.AccessTokenValidator = exports.USER_SESSION_EPOCH_PREFIX = exports.JWT_REVOKED_FAMILY_PREFIX = exports.JWT_BLOCKLIST_PREFIX = exports.AuthModule = exports.AuditService = exports.AuditModule = exports.AuditLegalHoldDto = void 0;
|
|
19
19
|
// ─── Bootstrap ───────────────────────────────────────────────────────────────────
|
|
20
20
|
__exportStar(require("./bootstrap"), exports);
|
|
21
21
|
var core_module_1 = require("./core.module");
|
|
@@ -47,6 +47,13 @@ Object.defineProperty(exports, "postgresSslFromEnv", { enumerable: true, get: fu
|
|
|
47
47
|
Object.defineProperty(exports, "readOptionalTlsCa", { enumerable: true, get: function () { return tls_util_1.readOptionalTlsCa; } });
|
|
48
48
|
Object.defineProperty(exports, "redisTlsFromConfigService", { enumerable: true, get: function () { return tls_util_1.redisTlsFromConfigService; } });
|
|
49
49
|
Object.defineProperty(exports, "redisTlsFromInput", { enumerable: true, get: function () { return tls_util_1.redisTlsFromInput; } });
|
|
50
|
+
var fcm_errors_1 = require("./modules/notifications/services/fcm.errors");
|
|
51
|
+
Object.defineProperty(exports, "FcmNotConfiguredError", { enumerable: true, get: function () { return fcm_errors_1.FcmNotConfiguredError; } });
|
|
52
|
+
Object.defineProperty(exports, "FcmTransientSendError", { enumerable: true, get: function () { return fcm_errors_1.FcmTransientSendError; } });
|
|
53
|
+
var fcm_service_1 = require("./modules/notifications/services/fcm.service");
|
|
54
|
+
Object.defineProperty(exports, "FcmService", { enumerable: true, get: function () { return fcm_service_1.FcmService; } });
|
|
55
|
+
var firebase_service_1 = require("./modules/notifications/services/firebase.service");
|
|
56
|
+
Object.defineProperty(exports, "FirebaseService", { enumerable: true, get: function () { return firebase_service_1.FirebaseService; } });
|
|
50
57
|
// ─── Common ───────────────────────────────────────────────────────────────────
|
|
51
58
|
__exportStar(require("./common"), exports);
|
|
52
59
|
// ─── Infrastructure ───────────────────────────────────────────────────────────
|
|
@@ -121,6 +128,9 @@ var notifications_module_1 = require("./modules/notifications/notifications.modu
|
|
|
121
128
|
Object.defineProperty(exports, "NotificationsModule", { enumerable: true, get: function () { return notifications_module_1.NotificationsModule; } });
|
|
122
129
|
var profile_module_1 = require("./modules/profile/profile.module");
|
|
123
130
|
Object.defineProperty(exports, "ProfileModule", { enumerable: true, get: function () { return profile_module_1.ProfileModule; } });
|
|
131
|
+
__exportStar(require("./modules/ratings"), exports);
|
|
132
|
+
var ratings_module_1 = require("./modules/ratings/ratings.module");
|
|
133
|
+
Object.defineProperty(exports, "RatingsModule", { enumerable: true, get: function () { return ratings_module_1.RatingsModule; } });
|
|
124
134
|
var realtime_1 = require("./modules/realtime");
|
|
125
135
|
Object.defineProperty(exports, "buildEnvelope", { enumerable: true, get: function () { return realtime_1.buildEnvelope; } });
|
|
126
136
|
Object.defineProperty(exports, "familyRoom", { enumerable: true, get: function () { return realtime_1.familyRoom; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oFAAoF;AACpF,8CAA4B;AAI5B,6CAAuD;AAA9C,qHAAA,sBAA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mHAAA,uBAAuB,OAAA;AACvB,2GAAA,eAAe,OAAA;AACf,oGAAA,QAAQ,OAAA;AAET,sDAAoC;AACpC,2DAAyC;AACzC,2DAAyC;AACzC,6DAA2D;AAAlD,2GAAA,WAAW,OAAA;AACpB,2DAAyC;AACzC,uEAAqD;AACrD,2EAAyE;AAAhE,6GAAA,YAAY,OAAA;AACrB,sEAAoE;AAA3D,iHAAA,cAAc,OAAA;AACvB,6EAA2D;AAC3D,sEAAoD;AACpD,qFAA4E;AAAnE,gHAAA,UAAU,OAAA;AACnB,+EAA6D;AAC7D,uEAAqD;AACrD,sEAAoE;AAA3D,iHAAA,cAAc,OAAA;AACvB,oEAAwE;AAA/D,mGAAA,IAAI,OAAA;AAAE,yGAAA,UAAU,OAAA;AACzB,wEAAsE;AAA7D,6GAAA,YAAY,OAAA;AACrB,6DAA2D;AAAlD,2GAAA,WAAW,OAAA"}
|
|
@@ -25,6 +25,7 @@ const audit_actions_1 = require("../../audit/constants/audit-actions");
|
|
|
25
25
|
const audit_service_1 = require("../../audit/services/audit.service");
|
|
26
26
|
const delivery_1 = require("../../delivery");
|
|
27
27
|
const notification_delivery_log_dto_1 = require("../../delivery/dto/notification-delivery-log.dto");
|
|
28
|
+
const dto_1 = require("../../notifications/dto");
|
|
28
29
|
const notifications_manifest_1 = require("../../notifications/notifications.manifest");
|
|
29
30
|
const notifications_service_1 = require("../../notifications/services/notifications.service");
|
|
30
31
|
const refresh_token_entity_1 = require("../../sessions/entities/refresh-token.entity");
|
|
@@ -139,7 +140,7 @@ let AdminController = class AdminController {
|
|
|
139
140
|
});
|
|
140
141
|
return row;
|
|
141
142
|
});
|
|
142
|
-
await this.notificationsService.
|
|
143
|
+
await this.notificationsService.enqueueDeliveryIfNeeded(dto, notification);
|
|
143
144
|
return {
|
|
144
145
|
message: 'Notification sent',
|
|
145
146
|
id: notification.id,
|
|
@@ -233,7 +234,7 @@ __decorate([
|
|
|
233
234
|
__param(0, (0, decorators_1.CurrentUser)()),
|
|
234
235
|
__param(1, (0, common_1.Body)()),
|
|
235
236
|
__metadata("design:type", Function),
|
|
236
|
-
__metadata("design:paramtypes", [Object,
|
|
237
|
+
__metadata("design:paramtypes", [Object, dto_1.SendNotificationDto]),
|
|
237
238
|
__metadata("design:returntype", Promise)
|
|
238
239
|
], AdminController.prototype, "sendNotification", null);
|
|
239
240
|
exports.AdminController = AdminController = __decorate([
|