@dismissible/nestjs-postgres-storage 0.0.2-canary.738340d.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.
@@ -0,0 +1,12 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This is a barrel export file for all models and their related types.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+ export type * from './models/DismissibleItem'
12
+ export type * from './commonInputTypes'
@@ -0,0 +1,24 @@
1
+ // Prisma schema for Dismissible PostgreSQL storage
2
+ // https://pris.ly/d/prisma-schema
3
+
4
+ generator client {
5
+ provider = "prisma-client"
6
+ output = "./generated/prisma"
7
+ }
8
+
9
+ datasource db {
10
+ provider = "postgresql"
11
+ }
12
+
13
+ model DismissibleItem {
14
+ id String
15
+ userId String @map("user_id")
16
+ createdAt DateTime @default(now()) @map("created_at")
17
+ dismissedAt DateTime? @map("dismissed_at")
18
+ metadata Json?
19
+
20
+ @@id([userId, id])
21
+ @@index([userId])
22
+ @@map("dismissible_items")
23
+ }
24
+
package/project.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "postgres-storage",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "libs/postgres-storage/src",
5
+ "projectType": "library",
6
+ "tags": [],
7
+ "targets": {
8
+ "build": {
9
+ "executor": "@nx/js:tsc",
10
+ "outputs": ["{options.outputPath}"],
11
+ "options": {
12
+ "outputPath": "dist/libs/postgres-storage",
13
+ "main": "libs/postgres-storage/src/index.ts",
14
+ "tsConfig": "libs/postgres-storage/tsconfig.lib.json",
15
+ "assets": [
16
+ "libs/postgres-storage/package.json",
17
+ "libs/postgres-storage/README.md",
18
+ {
19
+ "input": "libs/postgres-storage/prisma",
20
+ "glob": "**/*",
21
+ "output": "prisma"
22
+ },
23
+ {
24
+ "input": "libs/postgres-storage/bin",
25
+ "glob": "**/*",
26
+ "output": "bin"
27
+ }
28
+ ],
29
+ "generatePackageJson": true
30
+ }
31
+ },
32
+ "lint": {
33
+ "executor": "@nx/eslint:lint",
34
+ "outputs": ["{options.outputFile}"],
35
+ "options": {
36
+ "lintFilePatterns": ["libs/postgres-storage/**/*.ts"]
37
+ }
38
+ },
39
+ "test": {
40
+ "executor": "@nx/jest:jest",
41
+ "outputs": ["{workspaceRoot}/coverage/libs/postgres-storage"],
42
+ "options": {
43
+ "jestConfig": "libs/postgres-storage/jest.config.ts",
44
+ "passWithNoTests": true
45
+ }
46
+ },
47
+ "prisma:generate": {
48
+ "executor": "nx:run-commands",
49
+ "options": {
50
+ "command": "npx prisma generate --schema=libs/postgres-storage/prisma/schema.prisma"
51
+ }
52
+ },
53
+ "prisma:migrate": {
54
+ "executor": "nx:run-commands",
55
+ "options": {
56
+ "command": "npx prisma migrate dev --schema=libs/postgres-storage/prisma/schema.prisma"
57
+ }
58
+ },
59
+ "prisma:push": {
60
+ "executor": "nx:run-commands",
61
+ "options": {
62
+ "command": "npx prisma db push --schema=libs/postgres-storage/prisma/schema.prisma"
63
+ }
64
+ },
65
+ "npm-publish": {
66
+ "executor": "nx:run-commands",
67
+ "options": {
68
+ "command": "npm publish --access public",
69
+ "cwd": "dist/libs/postgres-storage"
70
+ }
71
+ }
72
+ }
73
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './postgres-storage.adapter';
2
+ export * from './postgres-storage.config';
3
+ export * from './postgres-storage.module';
4
+ export * from './prisma.service';
5
+ export * from './schema-path';
@@ -0,0 +1,248 @@
1
+ import { mock } from 'ts-jest-mocker';
2
+ import { Prisma } from '../prisma/generated/prisma/client';
3
+ import { PostgresStorageAdapter } from './postgres-storage.adapter';
4
+ import { PrismaService } from './prisma.service';
5
+ import { IDismissibleLogger } from '@dismissible/nestjs-logger';
6
+ import { DismissibleItemDto, DismissibleItemFactory } from '@dismissible/nestjs-dismissible-item';
7
+
8
+ describe('PostgresStorageAdapter', () => {
9
+ let adapter: PostgresStorageAdapter;
10
+ let mockPrismaService: PrismaService;
11
+ let mockLogger: jest.Mocked<IDismissibleLogger>;
12
+ let mockItemFactory: DismissibleItemFactory;
13
+ let mockDismissibleItem: {
14
+ findUnique: jest.Mock;
15
+ create: jest.Mock;
16
+ update: jest.Mock;
17
+ };
18
+
19
+ beforeEach(() => {
20
+ mockLogger = mock<IDismissibleLogger>({ failIfMockNotProvided: false });
21
+
22
+ // Use real DismissibleItemFactory since it's a simple factory
23
+ mockItemFactory = new DismissibleItemFactory();
24
+
25
+ // Create a mock for the dismissibleItem delegate
26
+ mockDismissibleItem = {
27
+ findUnique: jest.fn(),
28
+ create: jest.fn(),
29
+ update: jest.fn(),
30
+ };
31
+
32
+ // Create a partial mock of PrismaService with the dismissibleItem property
33
+ mockPrismaService = {
34
+ dismissibleItem: mockDismissibleItem,
35
+ } as unknown as PrismaService;
36
+
37
+ adapter = new PostgresStorageAdapter(mockPrismaService, mockLogger, mockItemFactory);
38
+ });
39
+
40
+ describe('get', () => {
41
+ it('should return null when item is not found', async () => {
42
+ mockDismissibleItem.findUnique.mockResolvedValue(null);
43
+
44
+ const result = await adapter.get('user-123', 'item-456');
45
+
46
+ expect(result).toBeNull();
47
+ expect(mockDismissibleItem.findUnique).toHaveBeenCalledWith({
48
+ where: {
49
+ userId_id: {
50
+ userId: 'user-123',
51
+ id: 'item-456',
52
+ },
53
+ },
54
+ });
55
+ expect(mockLogger.debug).toHaveBeenCalledWith('PostgreSQL storage miss', {
56
+ userId: 'user-123',
57
+ itemId: 'item-456',
58
+ });
59
+ });
60
+
61
+ it('should return the item when found', async () => {
62
+ const dbItem = {
63
+ id: 'item-456',
64
+ userId: 'user-123',
65
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
66
+ dismissedAt: null,
67
+ metadata: null,
68
+ };
69
+ mockDismissibleItem.findUnique.mockResolvedValue(dbItem);
70
+
71
+ const result = await adapter.get('user-123', 'item-456');
72
+
73
+ expect(result).toEqual({
74
+ id: 'item-456',
75
+ userId: 'user-123',
76
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
77
+ dismissedAt: undefined,
78
+ metadata: undefined,
79
+ });
80
+ expect(mockLogger.debug).toHaveBeenCalledWith('PostgreSQL storage hit', {
81
+ userId: 'user-123',
82
+ itemId: 'item-456',
83
+ });
84
+ });
85
+
86
+ it('should return item with metadata when present', async () => {
87
+ const dbItem = {
88
+ id: 'item-456',
89
+ userId: 'user-123',
90
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
91
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
92
+ metadata: { version: 2, category: 'promotional' },
93
+ };
94
+ mockDismissibleItem.findUnique.mockResolvedValue(dbItem);
95
+
96
+ const result = await adapter.get('user-123', 'item-456');
97
+
98
+ expect(result).toEqual({
99
+ id: 'item-456',
100
+ userId: 'user-123',
101
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
102
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
103
+ metadata: { version: 2, category: 'promotional' },
104
+ });
105
+ });
106
+ });
107
+
108
+ describe('create', () => {
109
+ it('should create a new item', async () => {
110
+ const item: DismissibleItemDto = {
111
+ id: 'item-456',
112
+ userId: 'user-123',
113
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
114
+ };
115
+ const dbItem = {
116
+ id: 'item-456',
117
+ userId: 'user-123',
118
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
119
+ dismissedAt: null,
120
+ metadata: null,
121
+ };
122
+ mockDismissibleItem.create.mockResolvedValue(dbItem);
123
+
124
+ const result = await adapter.create(item);
125
+
126
+ expect(result).toEqual({
127
+ id: 'item-456',
128
+ userId: 'user-123',
129
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
130
+ dismissedAt: undefined,
131
+ metadata: undefined,
132
+ });
133
+ expect(mockDismissibleItem.create).toHaveBeenCalledWith({
134
+ data: {
135
+ id: 'item-456',
136
+ userId: 'user-123',
137
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
138
+ dismissedAt: null,
139
+ metadata: Prisma.JsonNull,
140
+ },
141
+ });
142
+ expect(mockLogger.debug).toHaveBeenCalledWith('PostgreSQL storage create', {
143
+ userId: 'user-123',
144
+ itemId: 'item-456',
145
+ });
146
+ });
147
+
148
+ it('should create an item with metadata', async () => {
149
+ const item: DismissibleItemDto = {
150
+ id: 'item-456',
151
+ userId: 'user-123',
152
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
153
+ metadata: { version: 2 },
154
+ };
155
+ const dbItem = {
156
+ id: 'item-456',
157
+ userId: 'user-123',
158
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
159
+ dismissedAt: null,
160
+ metadata: { version: 2 },
161
+ };
162
+ mockDismissibleItem.create.mockResolvedValue(dbItem);
163
+
164
+ const result = await adapter.create(item);
165
+
166
+ expect(result).toEqual({
167
+ id: 'item-456',
168
+ userId: 'user-123',
169
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
170
+ dismissedAt: undefined,
171
+ metadata: { version: 2 },
172
+ });
173
+ });
174
+ });
175
+
176
+ describe('update', () => {
177
+ it('should update an existing item', async () => {
178
+ const item: DismissibleItemDto = {
179
+ id: 'item-456',
180
+ userId: 'user-123',
181
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
182
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
183
+ };
184
+ const dbItem = {
185
+ id: 'item-456',
186
+ userId: 'user-123',
187
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
188
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
189
+ metadata: null,
190
+ };
191
+ mockDismissibleItem.update.mockResolvedValue(dbItem);
192
+
193
+ const result = await adapter.update(item);
194
+
195
+ expect(result).toEqual({
196
+ id: 'item-456',
197
+ userId: 'user-123',
198
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
199
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
200
+ metadata: undefined,
201
+ });
202
+ expect(mockDismissibleItem.update).toHaveBeenCalledWith({
203
+ where: {
204
+ userId_id: {
205
+ userId: 'user-123',
206
+ id: 'item-456',
207
+ },
208
+ },
209
+ data: {
210
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
211
+ metadata: Prisma.JsonNull,
212
+ },
213
+ });
214
+ expect(mockLogger.debug).toHaveBeenCalledWith('PostgreSQL storage update', {
215
+ userId: 'user-123',
216
+ itemId: 'item-456',
217
+ });
218
+ });
219
+
220
+ it('should update an item with metadata', async () => {
221
+ const item: DismissibleItemDto = {
222
+ id: 'item-456',
223
+ userId: 'user-123',
224
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
225
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
226
+ metadata: { version: 3, updated: true },
227
+ };
228
+ const dbItem = {
229
+ id: 'item-456',
230
+ userId: 'user-123',
231
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
232
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
233
+ metadata: { version: 3, updated: true },
234
+ };
235
+ mockDismissibleItem.update.mockResolvedValue(dbItem);
236
+
237
+ const result = await adapter.update(item);
238
+
239
+ expect(result).toEqual({
240
+ id: 'item-456',
241
+ userId: 'user-123',
242
+ createdAt: new Date('2024-01-15T10:30:00.000Z'),
243
+ dismissedAt: new Date('2024-01-15T12:00:00.000Z'),
244
+ metadata: { version: 3, updated: true },
245
+ });
246
+ });
247
+ });
248
+ });
@@ -0,0 +1,101 @@
1
+ import { Injectable, Inject } from '@nestjs/common';
2
+ import { DISMISSIBLE_LOGGER, IDismissibleLogger } from '@dismissible/nestjs-logger';
3
+ import { IDismissibleStorage } from '@dismissible/nestjs-storage';
4
+ import {
5
+ BaseMetadata,
6
+ DismissibleItemDto,
7
+ DismissibleItemFactory,
8
+ } from '@dismissible/nestjs-dismissible-item';
9
+ import { Prisma } from '../prisma/generated/prisma/client';
10
+ import { PrismaService } from './prisma.service';
11
+
12
+ /**
13
+ * PostgreSQL storage adapter for dismissible items using Prisma.
14
+ * Implements IDismissibleStorage for persistent database storage.
15
+ */
16
+ @Injectable()
17
+ export class PostgresStorageAdapter<
18
+ TMetadata extends BaseMetadata = BaseMetadata,
19
+ > implements IDismissibleStorage<TMetadata> {
20
+ constructor(
21
+ private readonly prisma: PrismaService,
22
+ @Inject(DISMISSIBLE_LOGGER) private readonly logger: IDismissibleLogger,
23
+ private readonly itemFactory: DismissibleItemFactory,
24
+ ) {}
25
+
26
+ async get(userId: string, itemId: string): Promise<DismissibleItemDto<TMetadata> | null> {
27
+ this.logger.debug('PostgreSQL storage get', { userId, itemId });
28
+
29
+ const item = await this.prisma.dismissibleItem.findUnique({
30
+ where: {
31
+ userId_id: {
32
+ userId,
33
+ id: itemId,
34
+ },
35
+ },
36
+ });
37
+
38
+ if (!item) {
39
+ this.logger.debug('PostgreSQL storage miss', { userId, itemId });
40
+ return null;
41
+ }
42
+
43
+ this.logger.debug('PostgreSQL storage hit', { userId, itemId });
44
+
45
+ return this.mapToDto(item);
46
+ }
47
+
48
+ async create(item: DismissibleItemDto<TMetadata>): Promise<DismissibleItemDto<TMetadata>> {
49
+ this.logger.debug('PostgreSQL storage create', { userId: item.userId, itemId: item.id });
50
+
51
+ const created = await this.prisma.dismissibleItem.create({
52
+ data: {
53
+ id: item.id,
54
+ userId: item.userId,
55
+ createdAt: item.createdAt,
56
+ dismissedAt: item.dismissedAt ?? null,
57
+ metadata: (item.metadata as Prisma.InputJsonValue) ?? Prisma.JsonNull,
58
+ },
59
+ });
60
+
61
+ return this.mapToDto(created);
62
+ }
63
+
64
+ async update(item: DismissibleItemDto<TMetadata>): Promise<DismissibleItemDto<TMetadata>> {
65
+ this.logger.debug('PostgreSQL storage update', { userId: item.userId, itemId: item.id });
66
+
67
+ const updated = await this.prisma.dismissibleItem.update({
68
+ where: {
69
+ userId_id: {
70
+ userId: item.userId,
71
+ id: item.id,
72
+ },
73
+ },
74
+ data: {
75
+ dismissedAt: item.dismissedAt ?? null,
76
+ metadata: (item.metadata as Prisma.InputJsonValue) ?? Prisma.JsonNull,
77
+ },
78
+ });
79
+
80
+ return this.mapToDto(updated);
81
+ }
82
+
83
+ /**
84
+ * Map a Prisma model to a DismissibleItemDto.
85
+ */
86
+ private mapToDto(item: {
87
+ id: string;
88
+ userId: string;
89
+ createdAt: Date;
90
+ dismissedAt: Date | null;
91
+ metadata: unknown;
92
+ }): DismissibleItemDto<TMetadata> {
93
+ return this.itemFactory.create({
94
+ id: item.id,
95
+ userId: item.userId,
96
+ createdAt: item.createdAt,
97
+ dismissedAt: item.dismissedAt ?? undefined,
98
+ metadata: (item.metadata as TMetadata) ?? undefined,
99
+ });
100
+ }
101
+ }
@@ -0,0 +1,11 @@
1
+ import { IsString } from 'class-validator';
2
+
3
+ /**
4
+ * Injection token for the PostgresStorage configuration.
5
+ */
6
+ export const DISMISSIBLE_POSTGRES_STORAGE_CONFIG = Symbol('DISMISSIBLE_POSTGRES_STORAGE_CONFIG');
7
+
8
+ export class PostgresStorageConfig {
9
+ @IsString()
10
+ public readonly connectionString!: string;
11
+ }
@@ -0,0 +1,79 @@
1
+ import { DynamicModule, Module, ModuleMetadata } from '@nestjs/common';
2
+ import { DISMISSIBLE_STORAGE_ADAPTER } from '@dismissible/nestjs-storage';
3
+ import { PostgresStorageAdapter } from './postgres-storage.adapter';
4
+ import { PrismaService } from './prisma.service';
5
+ import { DismissibleItemModule } from '@dismissible/nestjs-dismissible-item';
6
+ import { DISMISSIBLE_LOGGER, IDismissibleLogger } from '@dismissible/nestjs-logger';
7
+ import {
8
+ PostgresStorageConfig,
9
+ DISMISSIBLE_POSTGRES_STORAGE_CONFIG,
10
+ } from './postgres-storage.config';
11
+
12
+ export interface PostgresStorageModuleOptions {
13
+ connectionString: string;
14
+ }
15
+
16
+ export interface PostgresStorageModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
17
+ inject?: any[];
18
+ useFactory: (
19
+ ...args: any[]
20
+ ) => PostgresStorageModuleOptions | Promise<PostgresStorageModuleOptions>;
21
+ }
22
+
23
+ @Module({})
24
+ export class PostgresStorageModule {
25
+ static forRoot(options: PostgresStorageModuleOptions): DynamicModule {
26
+ return {
27
+ module: PostgresStorageModule,
28
+ imports: [DismissibleItemModule],
29
+ providers: [
30
+ {
31
+ provide: DISMISSIBLE_POSTGRES_STORAGE_CONFIG,
32
+ useValue: {
33
+ connectionString: options.connectionString,
34
+ },
35
+ },
36
+ {
37
+ provide: PrismaService,
38
+ useFactory(config: PostgresStorageConfig, logger: IDismissibleLogger) {
39
+ return new PrismaService(config, logger);
40
+ },
41
+ inject: [DISMISSIBLE_POSTGRES_STORAGE_CONFIG, DISMISSIBLE_LOGGER],
42
+ },
43
+ PostgresStorageAdapter,
44
+ {
45
+ provide: DISMISSIBLE_STORAGE_ADAPTER,
46
+ useExisting: PostgresStorageAdapter,
47
+ },
48
+ ],
49
+ exports: [DISMISSIBLE_STORAGE_ADAPTER],
50
+ };
51
+ }
52
+
53
+ static forRootAsync(options: PostgresStorageModuleAsyncOptions): DynamicModule {
54
+ return {
55
+ module: PostgresStorageModule,
56
+ imports: [...(options.imports || []), DismissibleItemModule],
57
+ providers: [
58
+ {
59
+ provide: DISMISSIBLE_POSTGRES_STORAGE_CONFIG,
60
+ useFactory: options.useFactory,
61
+ inject: options.inject || [],
62
+ },
63
+ {
64
+ provide: PrismaService,
65
+ useFactory(config: PostgresStorageConfig, logger: IDismissibleLogger) {
66
+ return new PrismaService(config, logger);
67
+ },
68
+ inject: [DISMISSIBLE_POSTGRES_STORAGE_CONFIG, DISMISSIBLE_LOGGER],
69
+ },
70
+ PostgresStorageAdapter,
71
+ {
72
+ provide: DISMISSIBLE_STORAGE_ADAPTER,
73
+ useExisting: PostgresStorageAdapter,
74
+ },
75
+ ],
76
+ exports: [DISMISSIBLE_STORAGE_ADAPTER],
77
+ };
78
+ }
79
+ }
@@ -0,0 +1,34 @@
1
+ import { Injectable, OnModuleInit, OnModuleDestroy, Inject } from '@nestjs/common';
2
+ import { PrismaClient } from '../prisma/generated/prisma/client';
3
+ import { PrismaPg } from '@prisma/adapter-pg';
4
+ import { Pool } from 'pg';
5
+ import { DISMISSIBLE_LOGGER, IDismissibleLogger } from '@dismissible/nestjs-logger';
6
+ import { PostgresStorageConfig } from './postgres-storage.config';
7
+
8
+ /**
9
+ * PrismaService wraps the PrismaClient and handles connection lifecycle.
10
+ * It connects to the database on module initialization and disconnects on shutdown.
11
+ */
12
+ @Injectable()
13
+ export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
14
+ constructor(
15
+ private readonly config: PostgresStorageConfig,
16
+ @Inject(DISMISSIBLE_LOGGER) private readonly logger: IDismissibleLogger,
17
+ ) {
18
+ const pool = new Pool({ connectionString: config.connectionString });
19
+ const adapter = new PrismaPg(pool);
20
+ super({ adapter });
21
+ }
22
+
23
+ async onModuleInit(): Promise<void> {
24
+ this.logger.debug('Connecting to PostgreSQL database');
25
+ await this.$connect();
26
+ this.logger.debug('Connected to PostgreSQL database');
27
+ }
28
+
29
+ async onModuleDestroy(): Promise<void> {
30
+ this.logger.debug('Disconnecting from PostgreSQL database');
31
+ await this.$disconnect();
32
+ this.logger.debug('Disconnected from PostgreSQL database');
33
+ }
34
+ }
@@ -0,0 +1,17 @@
1
+ import { join } from 'path';
2
+
3
+ /**
4
+ * Returns the absolute path to the Prisma schema file.
5
+ * Useful for consumers who need to run prisma commands programmatically.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { getSchemaPath } from '@dismissible/nestjs-postgres-storage';
10
+ * import { execSync } from 'child_process';
11
+ *
12
+ * execSync(`npx prisma generate --schema=${getSchemaPath()}`);
13
+ * ```
14
+ */
15
+ export function getSchemaPath(): string {
16
+ return join(__dirname, '..', 'prisma', 'schema.prisma');
17
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "files": [],
4
+ "include": [],
5
+ "references": [
6
+ {
7
+ "path": "./tsconfig.lib.json"
8
+ }
9
+ ],
10
+ "compilerOptions": {
11
+ "esModuleInterop": true
12
+ }
13
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "declaration": true,
6
+ "module": "commonjs",
7
+ "types": ["node"],
8
+ "emitDecoratorMetadata": true,
9
+ "experimentalDecorators": true,
10
+ "target": "ES2021"
11
+ },
12
+ "exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"],
13
+ "include": ["src/**/*.ts"]
14
+ }