@dismissible/nestjs-postgres-storage 2.0.1 → 2.0.2-alpha.72996f5.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/package.json +11 -11
- package/src/prisma.service.d.ts +1 -0
- package/src/prisma.service.js +2 -0
- package/src/prisma.service.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dismissible/nestjs-postgres-storage",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2-alpha.72996f5.0",
|
|
4
4
|
"description": "PostgreSQL storage adapter for Dismissible using Prisma",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"LICENSE.md"
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@nestjs/common": "
|
|
31
|
+
"@nestjs/common": "10.0.0 || ^11.0.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependenciesMeta": {
|
|
34
34
|
"@nestjs/common": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@dismissible/nestjs-storage": "
|
|
40
|
-
"@dismissible/nestjs-item": "
|
|
41
|
-
"@dismissible/nestjs-logger": "
|
|
42
|
-
"prisma": "
|
|
43
|
-
"@prisma/client": "
|
|
44
|
-
"@prisma/adapter-pg": "
|
|
45
|
-
"pg": "
|
|
39
|
+
"@dismissible/nestjs-storage": "2.0.2-alpha.72996f5.0",
|
|
40
|
+
"@dismissible/nestjs-item": "2.0.2-alpha.72996f5.0",
|
|
41
|
+
"@dismissible/nestjs-logger": "2.0.2-alpha.72996f5.0",
|
|
42
|
+
"prisma": "7.2.0",
|
|
43
|
+
"@prisma/client": "7.2.0",
|
|
44
|
+
"@prisma/adapter-pg": "7.2.0",
|
|
45
|
+
"pg": "8.16.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@types/pg": "
|
|
48
|
+
"@types/pg": "8.16.0"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"nestjs",
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"type": "commonjs"
|
|
68
|
-
}
|
|
68
|
+
}
|
package/src/prisma.service.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { PostgresStorageConfig } from './postgres-storage.config';
|
|
|
9
9
|
export declare class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
|
|
10
10
|
private readonly config;
|
|
11
11
|
private readonly logger;
|
|
12
|
+
private readonly pool;
|
|
12
13
|
constructor(config: PostgresStorageConfig, logger: IDismissibleLogger);
|
|
13
14
|
onModuleInit(): Promise<void>;
|
|
14
15
|
onModuleDestroy(): Promise<void>;
|
package/src/prisma.service.js
CHANGED
|
@@ -19,6 +19,7 @@ let PrismaService = class PrismaService extends client_1.PrismaClient {
|
|
|
19
19
|
super({ adapter });
|
|
20
20
|
this.config = config;
|
|
21
21
|
this.logger = logger;
|
|
22
|
+
this.pool = pool;
|
|
22
23
|
}
|
|
23
24
|
async onModuleInit() {
|
|
24
25
|
this.logger.debug('Connecting to PostgreSQL database');
|
|
@@ -36,6 +37,7 @@ let PrismaService = class PrismaService extends client_1.PrismaClient {
|
|
|
36
37
|
async onModuleDestroy() {
|
|
37
38
|
this.logger.debug('Disconnecting from PostgreSQL database');
|
|
38
39
|
await this.$disconnect();
|
|
40
|
+
await this.pool.end();
|
|
39
41
|
this.logger.debug('Disconnected from PostgreSQL database');
|
|
40
42
|
}
|
|
41
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma.service.js","sourceRoot":"","sources":["../../../../libs/postgres-storage/src/prisma.service.ts"],"names":[],"mappings":";;;;AAAA,2CAAmF;AACnF,8DAA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