@dismissible/nestjs-postgres-storage 1.0.2 → 1.0.3-alpha.cdc64a4.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/README.md +24 -9
- package/package.json +13 -12
- package/prisma.config.mjs +3 -1
- package/src/postgres-storage.adapter.d.ts +3 -1
- package/src/postgres-storage.adapter.js +17 -2
- package/src/postgres-storage.adapter.js.map +1 -1
- package/src/postgres-storage.module.js +3 -3
- package/src/postgres-storage.module.js.map +1 -1
- package/src/prisma-config.js +1 -1
- package/src/prisma.service.js +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://dismissible.io" target="_blank"><img src="../../docs/images/dismissible_logo.png" width="120" alt="Dismissible" /></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">Never Show The Same Thing Twice!</p>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://www.npmjs.com/package/@dismissible/nestjs-postgres-storage" target="_blank"><img src="https://img.shields.io/npm/v/@dismissible/nestjs-postgres-storage.svg" alt="NPM Version" /></a>
|
|
8
|
+
<a href="https://github.com/dismissibleio/dismissible-api/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/npm/l/@dismissible/nestjs-postgres-storage.svg" alt="Package License" /></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@dismissible/nestjs-postgres-storage" target="_blank"><img src="https://img.shields.io/npm/dm/@dismissible/nestjs-postgres-storage.svg" alt="NPM Downloads" /></a>
|
|
10
|
+
<a href="https://github.com/dismissibleio/dismissible-api" target="_blank"><img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/dismissibleio/dismissible-api/release.yml"></a>
|
|
11
|
+
<a href="https://paypal.me/joshstuartx" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
Dismissible manages the state of your UI elements across sessions, so your users see what matters, once! No more onboarding messages reappearing on every tab, no more notifications haunting users across devices. Dismissible syncs dismissal state everywhere, so every message is intentional, never repetitive.
|
|
15
|
+
|
|
1
16
|
# @dismissible/nestjs-postgres-storage
|
|
2
17
|
|
|
3
18
|
PostgreSQL storage adapter for the Dismissible system using Prisma.
|
|
@@ -22,13 +37,13 @@ npm install @dismissible/nestjs-postgres-storage
|
|
|
22
37
|
You'll also need to install the peer dependencies:
|
|
23
38
|
|
|
24
39
|
```bash
|
|
25
|
-
npm install @dismissible/nestjs-storage @dismissible/nestjs-
|
|
40
|
+
npm install @dismissible/nestjs-storage @dismissible/nestjs-item @dismissible/nestjs-logger prisma
|
|
26
41
|
```
|
|
27
42
|
|
|
28
43
|
## Prerequisites
|
|
29
44
|
|
|
30
45
|
- PostgreSQL database (version 12 or higher)
|
|
31
|
-
- Node.js
|
|
46
|
+
- Node.js 24 or higher
|
|
32
47
|
|
|
33
48
|
## Getting Started
|
|
34
49
|
|
|
@@ -37,7 +52,7 @@ npm install @dismissible/nestjs-storage @dismissible/nestjs-dismissible-item @di
|
|
|
37
52
|
First, set up your PostgreSQL database connection string:
|
|
38
53
|
|
|
39
54
|
```env
|
|
40
|
-
|
|
55
|
+
DISMISSIBLE_STORAGE_POSTGRES_CONNECTION_STRING=postgresql://user:password@localhost:5432/dismissible
|
|
41
56
|
```
|
|
42
57
|
|
|
43
58
|
### 2. Initialize Database Schema
|
|
@@ -100,7 +115,7 @@ Import and configure the module in your NestJS application:
|
|
|
100
115
|
|
|
101
116
|
```typescript
|
|
102
117
|
import { Module } from '@nestjs/common';
|
|
103
|
-
import { DismissibleModule } from '@dismissible/nestjs-
|
|
118
|
+
import { DismissibleModule } from '@dismissible/nestjs-core';
|
|
104
119
|
import { PostgresStorageModule } from '@dismissible/nestjs-postgres-storage';
|
|
105
120
|
import { LoggerModule } from '@dismissible/nestjs-logger';
|
|
106
121
|
|
|
@@ -108,7 +123,7 @@ import { LoggerModule } from '@dismissible/nestjs-logger';
|
|
|
108
123
|
imports: [
|
|
109
124
|
LoggerModule.forRoot({}),
|
|
110
125
|
PostgresStorageModule.forRoot({
|
|
111
|
-
connectionString: process.env.
|
|
126
|
+
connectionString: process.env.DISMISSIBLE_STORAGE_POSTGRES_CONNECTION_STRING!,
|
|
112
127
|
}),
|
|
113
128
|
DismissibleModule.forRoot({
|
|
114
129
|
storage: PostgresStorageModule,
|
|
@@ -133,7 +148,7 @@ import { PostgresStorageModule } from '@dismissible/nestjs-postgres-storage';
|
|
|
133
148
|
PostgresStorageModule.forRootAsync({
|
|
134
149
|
imports: [ConfigModule],
|
|
135
150
|
useFactory: (config: ConfigService) => ({
|
|
136
|
-
connectionString: config.get<string>('
|
|
151
|
+
connectionString: config.get<string>('DISMISSIBLE_STORAGE_POSTGRES_CONNECTION_STRING')!,
|
|
137
152
|
}),
|
|
138
153
|
inject: [ConfigService],
|
|
139
154
|
}),
|
|
@@ -275,7 +290,7 @@ const config = createPrismaConfig();
|
|
|
275
290
|
## Environment Variables
|
|
276
291
|
|
|
277
292
|
- `DATABASE_URL` - PostgreSQL connection string (standard Prisma convention)
|
|
278
|
-
- `
|
|
293
|
+
- `DISMISSIBLE_STORAGE_POSTGRES_CONNECTION_STRING` - Alternative PostgreSQL connection string (fallback if `DATABASE_URL` is not set)
|
|
279
294
|
|
|
280
295
|
## Production Considerations
|
|
281
296
|
|
|
@@ -299,9 +314,9 @@ const config = createPrismaConfig();
|
|
|
299
314
|
|
|
300
315
|
## Related Packages
|
|
301
316
|
|
|
302
|
-
- `@dismissible/nestjs-
|
|
317
|
+
- `@dismissible/nestjs-core` - Main dismissible service
|
|
303
318
|
- `@dismissible/nestjs-storage` - Storage interface
|
|
304
|
-
- `@dismissible/nestjs-
|
|
319
|
+
- `@dismissible/nestjs-item` - Data models
|
|
305
320
|
- `@dismissible/nestjs-logger` - Logging
|
|
306
321
|
|
|
307
322
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dismissible/nestjs-postgres-storage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-alpha.cdc64a4.0",
|
|
4
4
|
"description": "PostgreSQL storage adapter for Dismissible using Prisma",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -24,10 +24,11 @@
|
|
|
24
24
|
"bin",
|
|
25
25
|
"prisma",
|
|
26
26
|
"prisma.config.mjs",
|
|
27
|
-
"README.md"
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE.md"
|
|
28
29
|
],
|
|
29
30
|
"peerDependencies": {
|
|
30
|
-
"@nestjs/common": "
|
|
31
|
+
"@nestjs/common": "10.0.0 || ^11.0.0"
|
|
31
32
|
},
|
|
32
33
|
"peerDependenciesMeta": {
|
|
33
34
|
"@nestjs/common": {
|
|
@@ -35,16 +36,16 @@
|
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@dismissible/nestjs-storage": "
|
|
39
|
-
"@dismissible/nestjs-
|
|
40
|
-
"@dismissible/nestjs-logger": "
|
|
41
|
-
"prisma": "
|
|
42
|
-
"@prisma/client": "
|
|
43
|
-
"@prisma/adapter-pg": "
|
|
44
|
-
"pg": "
|
|
39
|
+
"@dismissible/nestjs-storage": "1.0.3-alpha.cdc64a4.0",
|
|
40
|
+
"@dismissible/nestjs-item": "1.0.3-alpha.cdc64a4.0",
|
|
41
|
+
"@dismissible/nestjs-logger": "1.0.3-alpha.cdc64a4.0",
|
|
42
|
+
"prisma": "7.2.0",
|
|
43
|
+
"@prisma/client": "7.2.0",
|
|
44
|
+
"@prisma/adapter-pg": "7.2.0",
|
|
45
|
+
"pg": "8.16.3"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@types/pg": "
|
|
48
|
+
"@types/pg": "8.16.0"
|
|
48
49
|
},
|
|
49
50
|
"keywords": [
|
|
50
51
|
"nestjs",
|
|
@@ -64,4 +65,4 @@
|
|
|
64
65
|
"access": "public"
|
|
65
66
|
},
|
|
66
67
|
"type": "commonjs"
|
|
67
|
-
}
|
|
68
|
+
}
|
package/prisma.config.mjs
CHANGED
|
@@ -28,6 +28,8 @@ export default defineConfig({
|
|
|
28
28
|
},
|
|
29
29
|
datasource: {
|
|
30
30
|
url:
|
|
31
|
-
process.env.DATABASE_URL ??
|
|
31
|
+
process.env.DATABASE_URL ??
|
|
32
|
+
process.env.DISMISSIBLE_STORAGE_POSTGRES_CONNECTION_STRING ??
|
|
33
|
+
'postgresql://postgres:postgres@localhost:5432/dismissible',
|
|
32
34
|
},
|
|
33
35
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDismissibleLogger } from '@dismissible/nestjs-logger';
|
|
2
2
|
import { IDismissibleStorage } from '@dismissible/nestjs-storage';
|
|
3
|
-
import { DismissibleItemDto, DismissibleItemFactory } from '@dismissible/nestjs-
|
|
3
|
+
import { DismissibleItemDto, DismissibleItemFactory } from '@dismissible/nestjs-item';
|
|
4
4
|
import { PrismaService } from './prisma.service';
|
|
5
5
|
/**
|
|
6
6
|
* PostgreSQL storage adapter for dismissible items using Prisma.
|
|
@@ -14,6 +14,8 @@ export declare class PostgresStorageAdapter implements IDismissibleStorage {
|
|
|
14
14
|
get(userId: string, itemId: string): Promise<DismissibleItemDto | null>;
|
|
15
15
|
create(item: DismissibleItemDto): Promise<DismissibleItemDto>;
|
|
16
16
|
update(item: DismissibleItemDto): Promise<DismissibleItemDto>;
|
|
17
|
+
delete(userId: string, itemId: string): Promise<void>;
|
|
18
|
+
deleteAll(): Promise<void>;
|
|
17
19
|
/**
|
|
18
20
|
* Map a Prisma model to a DismissibleItemDto.
|
|
19
21
|
*/
|
|
@@ -4,7 +4,7 @@ exports.PostgresStorageAdapter = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const nestjs_logger_1 = require("@dismissible/nestjs-logger");
|
|
7
|
-
const
|
|
7
|
+
const nestjs_item_1 = require("@dismissible/nestjs-item");
|
|
8
8
|
const prisma_service_1 = require("./prisma.service");
|
|
9
9
|
/**
|
|
10
10
|
* PostgreSQL storage adapter for dismissible items using Prisma.
|
|
@@ -60,6 +60,21 @@ let PostgresStorageAdapter = class PostgresStorageAdapter {
|
|
|
60
60
|
});
|
|
61
61
|
return this.mapToDto(updated);
|
|
62
62
|
}
|
|
63
|
+
async delete(userId, itemId) {
|
|
64
|
+
this.logger.debug('PostgreSQL storage delete', { userId, itemId });
|
|
65
|
+
await this.prisma.dismissibleItem.delete({
|
|
66
|
+
where: {
|
|
67
|
+
userId_id: {
|
|
68
|
+
userId,
|
|
69
|
+
id: itemId,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async deleteAll() {
|
|
75
|
+
this.logger.debug('PostgreSQL storage deleteAll');
|
|
76
|
+
await this.prisma.dismissibleItem.deleteMany({});
|
|
77
|
+
}
|
|
63
78
|
/**
|
|
64
79
|
* Map a Prisma model to a DismissibleItemDto.
|
|
65
80
|
*/
|
|
@@ -76,6 +91,6 @@ exports.PostgresStorageAdapter = PostgresStorageAdapter;
|
|
|
76
91
|
exports.PostgresStorageAdapter = PostgresStorageAdapter = tslib_1.__decorate([
|
|
77
92
|
(0, common_1.Injectable)(),
|
|
78
93
|
tslib_1.__param(1, (0, common_1.Inject)(nestjs_logger_1.DISMISSIBLE_LOGGER)),
|
|
79
|
-
tslib_1.__metadata("design:paramtypes", [prisma_service_1.PrismaService, Object,
|
|
94
|
+
tslib_1.__metadata("design:paramtypes", [prisma_service_1.PrismaService, Object, nestjs_item_1.DismissibleItemFactory])
|
|
80
95
|
], PostgresStorageAdapter);
|
|
81
96
|
//# sourceMappingURL=postgres-storage.adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-storage.adapter.js","sourceRoot":"","sources":["../../../../libs/postgres-storage/src/postgres-storage.adapter.ts"],"names":[],"mappings":";;;;AAAA,2CAAoD;AACpD,8DAAoF;AAEpF,
|
|
1
|
+
{"version":3,"file":"postgres-storage.adapter.js","sourceRoot":"","sources":["../../../../libs/postgres-storage/src/postgres-storage.adapter.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,14 +7,14 @@ const common_1 = require("@nestjs/common");
|
|
|
7
7
|
const nestjs_storage_1 = require("@dismissible/nestjs-storage");
|
|
8
8
|
const postgres_storage_adapter_1 = require("./postgres-storage.adapter");
|
|
9
9
|
const prisma_service_1 = require("./prisma.service");
|
|
10
|
-
const
|
|
10
|
+
const nestjs_item_1 = require("@dismissible/nestjs-item");
|
|
11
11
|
const nestjs_logger_1 = require("@dismissible/nestjs-logger");
|
|
12
12
|
const postgres_storage_config_1 = require("./postgres-storage.config");
|
|
13
13
|
let PostgresStorageModule = PostgresStorageModule_1 = class PostgresStorageModule {
|
|
14
14
|
static forRoot(options) {
|
|
15
15
|
return {
|
|
16
16
|
module: PostgresStorageModule_1,
|
|
17
|
-
imports: [
|
|
17
|
+
imports: [nestjs_item_1.DismissibleItemModule],
|
|
18
18
|
providers: [
|
|
19
19
|
{
|
|
20
20
|
provide: postgres_storage_config_1.DISMISSIBLE_POSTGRES_STORAGE_CONFIG,
|
|
@@ -41,7 +41,7 @@ let PostgresStorageModule = PostgresStorageModule_1 = class PostgresStorageModul
|
|
|
41
41
|
static forRootAsync(options) {
|
|
42
42
|
return {
|
|
43
43
|
module: PostgresStorageModule_1,
|
|
44
|
-
imports: [...(options.imports || []),
|
|
44
|
+
imports: [...(options.imports || []), nestjs_item_1.DismissibleItemModule],
|
|
45
45
|
providers: [
|
|
46
46
|
{
|
|
47
47
|
provide: postgres_storage_config_1.DISMISSIBLE_POSTGRES_STORAGE_CONFIG,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-storage.module.js","sourceRoot":"","sources":["../../../../libs/postgres-storage/src/postgres-storage.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuE;AACvE,gEAA0E;AAC1E,yEAAoE;AACpE,qDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"postgres-storage.module.js","sourceRoot":"","sources":["../../../../libs/postgres-storage/src/postgres-storage.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuE;AACvE,gEAA0E;AAC1E,yEAAoE;AACpE,qDAAiD;AACjD,0DAAiE;AACjE,8DAAoF;AACpF,uEAGmC;AAc5B,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAChC,MAAM,CAAC,OAAO,CAAC,OAAqC;QAClD,OAAO;YACL,MAAM,EAAE,uBAAqB;YAC7B,OAAO,EAAE,CAAC,mCAAqB,CAAC;YAChC,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,6DAAmC;oBAC5C,QAAQ,EAAE;wBACR,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;qBAC3C;iBACF;gBACD;oBACE,OAAO,EAAE,8BAAa;oBACtB,UAAU,CAAC,MAA6B,EAAE,MAA0B;wBAClE,OAAO,IAAI,8BAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;oBAC3C,CAAC;oBACD,MAAM,EAAE,CAAC,6DAAmC,EAAE,kCAAkB,CAAC;iBAClE;gBACD,iDAAsB;gBACtB;oBACE,OAAO,EAAE,4CAA2B;oBACpC,WAAW,EAAE,iDAAsB;iBACpC;aACF;YACD,OAAO,EAAE,CAAC,4CAA2B,EAAE,8BAAa,CAAC;SACtD,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAA0C;QAC5D,OAAO;YACL,MAAM,EAAE,uBAAqB;YAC7B,OAAO,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,mCAAqB,CAAC;YAC5D,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,6DAAmC;oBAC5C,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;iBAC7B;gBACD;oBACE,OAAO,EAAE,8BAAa;oBACtB,UAAU,CAAC,MAA6B,EAAE,MAA0B;wBAClE,OAAO,IAAI,8BAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;oBAC3C,CAAC;oBACD,MAAM,EAAE,CAAC,6DAAmC,EAAE,kCAAkB,CAAC;iBAClE;gBACD,iDAAsB;gBACtB;oBACE,OAAO,EAAE,4CAA2B;oBACpC,WAAW,EAAE,iDAAsB;iBACpC;aACF;YACD,OAAO,EAAE,CAAC,4CAA2B,EAAE,8BAAa,CAAC;SACtD,CAAC;IACJ,CAAC;CACF,CAAA;AAvDY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,qBAAqB,CAuDjC"}
|
package/src/prisma-config.js
CHANGED
package/src/prisma.service.js
CHANGED
|
@@ -30,7 +30,7 @@ let PrismaService = class PrismaService extends client_1.PrismaClient {
|
|
|
30
30
|
catch (error) {
|
|
31
31
|
this.logger.error('Failed to connect to PostgreSQL database', error);
|
|
32
32
|
throw new Error(`Database connection failed: ${error instanceof Error ? error.message : 'Unknown error'}. ` +
|
|
33
|
-
'Ensure PostgreSQL is running and
|
|
33
|
+
'Ensure PostgreSQL is running and DISMISSIBLE_STORAGE_POSTGRES_CONNECTION_STRING is configured correctly.');
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
async onModuleDestroy() {
|