@ddd-ts-kit/prisma 0.1.1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +7 -7
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -97,7 +97,7 @@ class, which is then the injection token:
97
97
  ```ts
98
98
  // platform/database/database.ts
99
99
  import { PrismaContext } from '@ddd-ts-kit/prisma';
100
- import type { Prisma } from '$generated/prisma/client.js';
100
+ import type { Prisma } from '$generated/prisma/client';
101
101
 
102
102
  export abstract class Database extends PrismaContext<Prisma.TransactionClient> {}
103
103
  ```
@@ -116,8 +116,8 @@ import {
116
116
  PrismaOutboxStore,
117
117
  PrismaProcessedEventStore,
118
118
  } from '@ddd-ts-kit/prisma';
119
- import { PrismaClient } from '$generated/prisma/client.js';
120
- import { Database } from '@/platform/database/database.js';
119
+ import { PrismaClient } from '$generated/prisma/client';
120
+ import { Database } from '@/platform/database/database';
121
121
 
122
122
  const prisma = new PrismaClient({
123
123
  adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }),
@@ -204,7 +204,7 @@ export abstract class InvoiceRepository extends Repository<Invoice> {}
204
204
  import { Repository } from '@ddd-ts-kit/kernel/declarations';
205
205
  import { optimisticUpdate } from '@ddd-ts-kit/prisma';
206
206
 
207
- @Repository(InvoiceRepository, [Database])
207
+ @Repository(InvoiceRepository)
208
208
  export class PrismaInvoiceRepository implements InvoiceRepository {
209
209
  constructor(private readonly database: Database) {}
210
210
 
@@ -287,7 +287,7 @@ Prisma's own attributes know nothing of who acts.
287
287
  import { Clock, ExecutionScope, stampCreation, stampUpdate, tenantScopeOf } from '@ddd-ts-kit/kernel';
288
288
  import { Repository } from '@ddd-ts-kit/kernel/declarations';
289
289
 
290
- @Repository(InvoiceRepository, [Database, ExecutionScope, Clock])
290
+ @Repository(InvoiceRepository)
291
291
  export class PrismaInvoiceRepository implements InvoiceRepository {
292
292
  constructor(
293
293
  private readonly database: Database,
@@ -340,7 +340,7 @@ export abstract class InvoiceQueries {
340
340
  import { ExecutionScope, encodeCursor, pageOf, tenantScopeOf } from '@ddd-ts-kit/kernel';
341
341
  import { Repository } from '@ddd-ts-kit/kernel/declarations';
342
342
 
343
- @Repository(InvoiceQueries, [Database, ExecutionScope])
343
+ @Repository(InvoiceQueries)
344
344
  export class PrismaInvoiceQueries implements InvoiceQueries {
345
345
  constructor(
346
346
  private readonly database: Database,
@@ -490,7 +490,7 @@ model AppointmentRow {
490
490
 
491
491
  ```ts
492
492
  // infrastructure/persistence/prisma-appointment-list.repository.ts
493
- @Repository(AppointmentList, [Database])
493
+ @Repository(AppointmentList)
494
494
  export class PrismaAppointmentList extends PrismaReadModelStore<AppointmentRow, Prisma.TransactionClient> implements AppointmentList {
495
495
  constructor(database: Database) {
496
496
  super(database, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/prisma",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Prisma adapters for the kernel ports: unit of work, transactional outbox store, processed-event store.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,8 +27,8 @@
27
27
  "prisma"
28
28
  ],
29
29
  "dependencies": {
30
- "@ddd-ts-kit/kernel": "0.1.1",
31
- "@ddd-ts-kit/events": "0.1.1"
30
+ "@ddd-ts-kit/kernel": "0.2.0",
31
+ "@ddd-ts-kit/events": "0.2.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@prisma/client": "^7.0.0"
@@ -37,7 +37,7 @@
37
37
  "@prisma/client": "^7.10.0",
38
38
  "prisma": "^7.10.0",
39
39
  "@prisma/adapter-pg": "^7.10.0",
40
- "@ddd-ts-kit/testing": "0.1.1",
40
+ "@ddd-ts-kit/testing": "0.2.0",
41
41
  "pg": "^8.23.1",
42
42
  "@types/pg": "^8.23.1",
43
43
  "@electric-sql/pglite": "^0.5.8",