@lyrolab/nest-shared 1.6.2 → 1.8.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 -1
- package/dist/ai/services/ai.service.d.ts +4 -4
- package/dist/ai/services/ai.service.js +6 -1
- package/dist/ai/services/ai.service.js.map +1 -1
- package/dist/auth/auth.constants.d.ts +1 -0
- package/dist/auth/auth.constants.js +5 -0
- package/dist/auth/auth.constants.js.map +1 -0
- package/dist/auth/decorators/current-user.decorator.d.ts +1 -0
- package/dist/auth/decorators/current-user.decorator.js +11 -0
- package/dist/auth/decorators/current-user.decorator.js.map +1 -0
- package/dist/auth/decorators/public.decorator.d.ts +2 -0
- package/dist/auth/decorators/public.decorator.js +8 -0
- package/dist/auth/decorators/public.decorator.js.map +1 -0
- package/dist/auth/guards/jwt-auth.guard.d.ts +9 -0
- package/dist/auth/guards/jwt-auth.guard.js +41 -0
- package/dist/auth/guards/jwt-auth.guard.js.map +1 -0
- package/dist/auth/helpers/keycloak.helper.d.ts +4 -0
- package/dist/auth/helpers/keycloak.helper.js +10 -0
- package/dist/auth/helpers/keycloak.helper.js.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.js +25 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/interfaces/auth-module-options.interface.d.ts +14 -0
- package/dist/auth/interfaces/auth-module-options.interface.js +3 -0
- package/dist/auth/interfaces/auth-module-options.interface.js.map +1 -0
- package/dist/auth/models/jwt-payload.d.ts +15 -0
- package/dist/auth/models/jwt-payload.js +3 -0
- package/dist/auth/models/jwt-payload.js.map +1 -0
- package/dist/auth/shared-auth.module.d.ts +8 -0
- package/dist/auth/shared-auth.module.js +82 -0
- package/dist/auth/shared-auth.module.js.map +1 -0
- package/dist/auth/strategies/jwt.strategy.d.ts +11 -0
- package/dist/auth/strategies/jwt.strategy.js +49 -0
- package/dist/auth/strategies/jwt.strategy.js.map +1 -0
- package/dist/database/shared-database.module.d.ts +13 -7
- package/dist/database/shared-database.module.js +72 -64
- package/dist/database/shared-database.module.js.map +1 -1
- package/dist/redis/shared-redis.module.d.ts +3 -7
- package/dist/redis/shared-redis.module.js +18 -32
- package/dist/redis/shared-redis.module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +30 -13
|
@@ -13,15 +13,13 @@ const config_1 = require("@nestjs/config");
|
|
|
13
13
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
14
14
|
const path_1 = require("path");
|
|
15
15
|
const find_main_path_1 = require("./helpers/find-main-path");
|
|
16
|
-
const testcontainers_1 = require("testcontainers");
|
|
17
16
|
const typeorm_2 = require("typeorm");
|
|
18
|
-
const isJest = () => process.env.JEST_WORKER_ID !== undefined;
|
|
19
17
|
const ENTITIES_PATH = "**/*.entity.{ts,js}";
|
|
20
18
|
const MIGRATIONS_PATH = "dist/migrations/**/*.{ts,js}";
|
|
21
19
|
let SharedDatabaseModule = class SharedDatabaseModule {
|
|
22
20
|
static { SharedDatabaseModule_1 = this; }
|
|
23
|
-
static testContainer;
|
|
24
21
|
static testDataSource;
|
|
22
|
+
static testEntities;
|
|
25
23
|
static forRoot(options = {}) {
|
|
26
24
|
return {
|
|
27
25
|
module: SharedDatabaseModule_1,
|
|
@@ -29,11 +27,7 @@ let SharedDatabaseModule = class SharedDatabaseModule {
|
|
|
29
27
|
typeorm_1.TypeOrmModule.forRootAsync({
|
|
30
28
|
imports: [config_1.ConfigModule],
|
|
31
29
|
inject: [config_1.ConfigService],
|
|
32
|
-
useFactory:
|
|
33
|
-
const isTestEnvironment = process.env.NODE_ENV === "test";
|
|
34
|
-
if (isTestEnvironment) {
|
|
35
|
-
return await this.createTestConfiguration(options);
|
|
36
|
-
}
|
|
30
|
+
useFactory: (configService) => {
|
|
37
31
|
return this.createProductionConfiguration(configService, options);
|
|
38
32
|
},
|
|
39
33
|
}),
|
|
@@ -41,77 +35,91 @@ let SharedDatabaseModule = class SharedDatabaseModule {
|
|
|
41
35
|
exports: [typeorm_1.TypeOrmModule],
|
|
42
36
|
};
|
|
43
37
|
}
|
|
44
|
-
static
|
|
45
|
-
|
|
46
|
-
this.testContainer = await new testcontainers_1.GenericContainer("postgres")
|
|
47
|
-
.withExposedPorts(5432)
|
|
48
|
-
.withEnvironment({
|
|
49
|
-
POSTGRES_PASSWORD: "secret",
|
|
50
|
-
POSTGRES_DB: "test",
|
|
51
|
-
})
|
|
52
|
-
.withWaitStrategy(testcontainers_1.Wait.forAll([
|
|
53
|
-
testcontainers_1.Wait.forListeningPorts(),
|
|
54
|
-
testcontainers_1.Wait.forLogMessage("database system is ready to accept connections"),
|
|
55
|
-
]))
|
|
56
|
-
.start();
|
|
57
|
-
}
|
|
58
|
-
const connectionUri = `postgres://postgres:secret@localhost:${this.testContainer.getMappedPort(5432)}/test`;
|
|
59
|
-
const entities = options.entities || [
|
|
60
|
-
(0, path_1.join)((0, find_main_path_1.findMainPath)(), isJest() ? "" : "dist", ENTITIES_PATH),
|
|
61
|
-
];
|
|
62
|
-
const migrations = options.migrations || [
|
|
63
|
-
(0, path_1.join)((0, find_main_path_1.findMainPath)(), MIGRATIONS_PATH),
|
|
64
|
-
];
|
|
65
|
-
if (!this.testDataSource) {
|
|
66
|
-
this.testDataSource = new typeorm_2.DataSource({
|
|
67
|
-
type: "postgres",
|
|
68
|
-
url: connectionUri,
|
|
69
|
-
entities,
|
|
70
|
-
synchronize: true,
|
|
71
|
-
migrations,
|
|
72
|
-
});
|
|
73
|
-
await this.testDataSource.initialize();
|
|
74
|
-
}
|
|
38
|
+
static forTest(options) {
|
|
39
|
+
this.testEntities = options.entities;
|
|
75
40
|
return {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
41
|
+
module: SharedDatabaseModule_1,
|
|
42
|
+
imports: [
|
|
43
|
+
typeorm_1.TypeOrmModule.forRoot({
|
|
44
|
+
type: "postgres",
|
|
45
|
+
url: this.workerDatabaseUrl(),
|
|
46
|
+
entities: options.entities,
|
|
47
|
+
synchronize: false,
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
exports: [typeorm_1.TypeOrmModule],
|
|
81
51
|
};
|
|
82
52
|
}
|
|
83
|
-
static
|
|
84
|
-
|
|
53
|
+
static async setupTestDatabase() {
|
|
54
|
+
if (this.testDataSource)
|
|
55
|
+
return;
|
|
56
|
+
const { baseUrl, testDbName } = this.getWorkerDbInfo();
|
|
57
|
+
const adminDataSource = new typeorm_2.DataSource({
|
|
85
58
|
type: "postgres",
|
|
86
|
-
url:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
59
|
+
url: baseUrl,
|
|
60
|
+
});
|
|
61
|
+
await adminDataSource.initialize();
|
|
62
|
+
await adminDataSource.query(`DROP DATABASE IF EXISTS "${testDbName}" WITH (FORCE)`);
|
|
63
|
+
await adminDataSource.query(`CREATE DATABASE "${testDbName}"`);
|
|
64
|
+
await adminDataSource.destroy();
|
|
65
|
+
const workerUrl = new URL(baseUrl);
|
|
66
|
+
workerUrl.pathname = `/${testDbName}`;
|
|
67
|
+
this.testDataSource = new typeorm_2.DataSource({
|
|
68
|
+
type: "postgres",
|
|
69
|
+
url: workerUrl.toString(),
|
|
70
|
+
entities: this.testEntities,
|
|
71
|
+
synchronize: true,
|
|
72
|
+
});
|
|
73
|
+
await this.testDataSource.initialize();
|
|
74
|
+
}
|
|
75
|
+
static async clearTestDatabase() {
|
|
76
|
+
if (!this.testDataSource)
|
|
77
|
+
return;
|
|
78
|
+
const tableNames = this.testDataSource.entityMetadatas
|
|
79
|
+
.map((meta) => meta.tableName)
|
|
80
|
+
.join(", ");
|
|
81
|
+
if (tableNames) {
|
|
82
|
+
await this.testDataSource.query(`TRUNCATE TABLE ${tableNames} CASCADE`);
|
|
83
|
+
}
|
|
94
84
|
}
|
|
95
85
|
static getTestDataSource() {
|
|
86
|
+
if (!this.testDataSource) {
|
|
87
|
+
throw new Error("SharedDatabaseModule not initialized. Call setupTestDatabase() first.");
|
|
88
|
+
}
|
|
96
89
|
return this.testDataSource;
|
|
97
90
|
}
|
|
98
91
|
static async closeTestConnection() {
|
|
99
92
|
if (this.testDataSource) {
|
|
100
93
|
await this.testDataSource.destroy();
|
|
101
94
|
}
|
|
102
|
-
if (this.testContainer) {
|
|
103
|
-
await this.testContainer.stop();
|
|
104
|
-
}
|
|
105
95
|
}
|
|
106
|
-
static
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
static getWorkerDbInfo() {
|
|
97
|
+
const baseUrl = process.env.DATABASE_URL;
|
|
98
|
+
if (!baseUrl) {
|
|
99
|
+
throw new Error("DATABASE_URL environment variable is required for test database setup");
|
|
109
100
|
}
|
|
101
|
+
const url = new URL(baseUrl);
|
|
102
|
+
const dbName = url.pathname.slice(1);
|
|
103
|
+
const poolId = process.env.VITEST_POOL_ID ?? process.env.JEST_WORKER_ID ?? "0";
|
|
104
|
+
return { baseUrl, testDbName: `${dbName}_test_${poolId}` };
|
|
110
105
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
106
|
+
static workerDatabaseUrl() {
|
|
107
|
+
const { baseUrl, testDbName } = this.getWorkerDbInfo();
|
|
108
|
+
const url = new URL(baseUrl);
|
|
109
|
+
url.pathname = `/${testDbName}`;
|
|
110
|
+
return url.toString();
|
|
111
|
+
}
|
|
112
|
+
static createProductionConfiguration(configService, options) {
|
|
113
|
+
return {
|
|
114
|
+
type: "postgres",
|
|
115
|
+
url: configService.get("DATABASE_URL"),
|
|
116
|
+
entities: options.entities || [
|
|
117
|
+
(0, path_1.join)((0, find_main_path_1.findMainPath)(), "dist", ENTITIES_PATH),
|
|
118
|
+
],
|
|
119
|
+
migrations: options.migrations || [(0, path_1.join)((0, find_main_path_1.findMainPath)(), MIGRATIONS_PATH)],
|
|
120
|
+
synchronize: false,
|
|
121
|
+
autoLoadEntities: true,
|
|
122
|
+
};
|
|
115
123
|
}
|
|
116
124
|
};
|
|
117
125
|
exports.SharedDatabaseModule = SharedDatabaseModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-database.module.js","sourceRoot":"","sources":["../../src/database/shared-database.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"shared-database.module.js","sourceRoot":"","sources":["../../src/database/shared-database.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAsD;AACtD,2CAA4D;AAC5D,6CAAqE;AACrE,+BAA2B;AAC3B,6DAAuD;AACvD,qCAAoC;AAEpC,MAAM,aAAa,GAAG,qBAAqB,CAAA;AAC3C,MAAM,eAAe,GAAG,8BAA8B,CAAA;AAc/C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;;IACvB,MAAM,CAAC,cAAc,CAAY;IACjC,MAAM,CAAC,YAAY,CAAe;IAE1C,MAAM,CAAC,OAAO,CAAC,UAAuC,EAAE;QACtD,OAAO;YACL,MAAM,EAAE,sBAAoB;YAC5B,OAAO,EAAE;gBACP,uBAAa,CAAC,YAAY,CAAC;oBACzB,OAAO,EAAE,CAAC,qBAAY,CAAC;oBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;oBACvB,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE;wBAC3C,OAAO,IAAI,CAAC,6BAA6B,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;oBACnE,CAAC;iBACF,CAAC;aACH;YACD,OAAO,EAAE,CAAC,uBAAa,CAAC;SACzB,CAAA;IACH,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAuB;QACpC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAA;QAEpC,OAAO;YACL,MAAM,EAAE,sBAAoB;YAC5B,OAAO,EAAE;gBACP,uBAAa,CAAC,OAAO,CAAC;oBACpB,IAAI,EAAE,UAAU;oBAChB,GAAG,EAAE,IAAI,CAAC,iBAAiB,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AAG,IAAI,UAAU,EAAE,CAAA;QAC/B,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAA;IACvB,CAAC;IAEO,MAAM,CAAC,6BAA6B,CAC1C,aAA4B,EAC5B,OAAoC;QAEpC,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC;YACtC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI;gBAC5B,IAAA,WAAI,EAAC,IAAA,6BAAY,GAAE,EAAE,MAAM,EAAE,aAAa,CAAC;aAC5C;YACD,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,CAAC,IAAA,WAAI,EAAC,IAAA,6BAAY,GAAE,EAAE,eAAe,CAAC,CAAC;YACzE,WAAW,EAAE,KAAK;YAClB,gBAAgB,EAAE,IAAI;SACvB,CAAA;IACH,CAAC;CACF,CAAA;AArIY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,oBAAoB,CAqIhC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { DynamicModule
|
|
2
|
-
export declare class SharedRedisModule
|
|
3
|
-
private static testContainer;
|
|
1
|
+
import { DynamicModule } from "@nestjs/common";
|
|
2
|
+
export declare class SharedRedisModule {
|
|
4
3
|
static forRoot(): DynamicModule;
|
|
5
|
-
|
|
6
|
-
private static createProductionConfiguration;
|
|
7
|
-
static closeTestConnection(): Promise<void>;
|
|
8
|
-
onModuleDestroy(): Promise<void>;
|
|
4
|
+
static forTest(): DynamicModule;
|
|
9
5
|
}
|
|
@@ -10,23 +10,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.SharedRedisModule = void 0;
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const config_1 = require("@nestjs/config");
|
|
13
|
-
const testcontainers_1 = require("testcontainers");
|
|
14
13
|
const redis_config_1 = require("./redis.config");
|
|
15
|
-
let SharedRedisModule = class SharedRedisModule {
|
|
16
|
-
static { SharedRedisModule_1 = this; }
|
|
17
|
-
static testContainer = null;
|
|
14
|
+
let SharedRedisModule = SharedRedisModule_1 = class SharedRedisModule {
|
|
18
15
|
static forRoot() {
|
|
19
16
|
return {
|
|
20
17
|
module: SharedRedisModule_1,
|
|
21
18
|
providers: [
|
|
22
19
|
{
|
|
23
20
|
provide: redis_config_1.RedisConfig,
|
|
24
|
-
useFactory:
|
|
25
|
-
|
|
26
|
-
if (isTestEnvironment) {
|
|
27
|
-
return new redis_config_1.RedisConfig(await this.createTestConfiguration());
|
|
28
|
-
}
|
|
29
|
-
return new redis_config_1.RedisConfig(this.createProductionConfiguration(configService));
|
|
21
|
+
useFactory: (configService) => {
|
|
22
|
+
return new redis_config_1.RedisConfig(configService.get("REDIS_URL"));
|
|
30
23
|
},
|
|
31
24
|
inject: [config_1.ConfigService],
|
|
32
25
|
},
|
|
@@ -36,29 +29,22 @@ let SharedRedisModule = class SharedRedisModule {
|
|
|
36
29
|
global: true,
|
|
37
30
|
};
|
|
38
31
|
}
|
|
39
|
-
static
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.withWaitStrategy(testcontainers_1.Wait.forAll([
|
|
44
|
-
testcontainers_1.Wait.forListeningPorts(),
|
|
45
|
-
testcontainers_1.Wait.forLogMessage("Ready to accept connections tcp"),
|
|
46
|
-
]))
|
|
47
|
-
.start();
|
|
32
|
+
static forTest() {
|
|
33
|
+
const redisUrl = process.env.REDIS_URL;
|
|
34
|
+
if (!redisUrl) {
|
|
35
|
+
throw new Error("REDIS_URL environment variable is required for test setup");
|
|
48
36
|
}
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
async onModuleDestroy() {
|
|
61
|
-
await SharedRedisModule_1.closeTestConnection();
|
|
37
|
+
return {
|
|
38
|
+
module: SharedRedisModule_1,
|
|
39
|
+
providers: [
|
|
40
|
+
{
|
|
41
|
+
provide: redis_config_1.RedisConfig,
|
|
42
|
+
useValue: new redis_config_1.RedisConfig(redisUrl),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
exports: [redis_config_1.RedisConfig],
|
|
46
|
+
global: true,
|
|
47
|
+
};
|
|
62
48
|
}
|
|
63
49
|
};
|
|
64
50
|
exports.SharedRedisModule = SharedRedisModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-redis.module.js","sourceRoot":"","sources":["../../src/redis/shared-redis.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"shared-redis.module.js","sourceRoot":"","sources":["../../src/redis/shared-redis.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAsD;AACtD,2CAA4D;AAC5D,iDAA4C;AAGrC,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAC5B,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,mBAAiB;YACzB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,0BAAW;oBACpB,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE;wBAC3C,OAAO,IAAI,0BAAW,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,CAAW,CAAC,CAAA;oBAClE,CAAC;oBACD,MAAM,EAAE,CAAC,sBAAa,CAAC;iBACxB;aACF;YACD,OAAO,EAAE,CAAC,0BAAW,CAAC;YACtB,OAAO,EAAE,CAAC,qBAAY,CAAC;YACvB,MAAM,EAAE,IAAI;SACb,CAAA;IACH,CAAC;IAED,MAAM,CAAC,OAAO;QACZ,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAA;QACH,CAAC;QAED,OAAO;YACL,MAAM,EAAE,mBAAiB;YACzB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,0BAAW;oBACpB,QAAQ,EAAE,IAAI,0BAAW,CAAC,QAAQ,CAAC;iBACpC;aACF;YACD,OAAO,EAAE,CAAC,0BAAW,CAAC;YACtB,MAAM,EAAE,IAAI;SACb,CAAA;IACH,CAAC;CACF,CAAA;AAvCY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,iBAAiB,CAuC7B"}
|