@riordanpawley/effect-prisma-generator 0.6.3 → 0.6.5

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/dist/index.js +5 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -293,6 +293,7 @@ function generatePrismaInterface(models, customError) {
293
293
  * This provides a type contract that the service implementation must satisfy.
294
294
  */
295
295
  export interface IPrismaService {
296
+ client: BasePrismaClient
296
297
  // Transaction operations
297
298
  $transaction: <R, E, A>(
298
299
  effect: Effect.Effect<A, E, R>
@@ -766,6 +767,7 @@ const makePrismaService = Effect.gen(function* () {
766
767
  const client = yield* PrismaClient;
767
768
 
768
769
  const prismaService: IPrismaService = {
770
+ client,
769
771
  /**
770
772
  * Execute an effect within a database transaction.
771
773
  * All operations within the effect will be atomic - they either all succeed or all fail.
@@ -1019,7 +1021,7 @@ export class Prisma extends Context.Tag("Prisma")<Prisma, IPrismaService>() {
1019
1021
  static layer = (
1020
1022
  ...args: ConstructorParameters<typeof BasePrismaClient>
1021
1023
  ) => this.Default.pipe(
1022
- Layer.provide(PrismaClient.layer(...args))
1024
+ Layer.provideMerge(PrismaClient.layer(...args))
1023
1025
  );
1024
1026
 
1025
1027
  /**
@@ -1048,7 +1050,7 @@ export class Prisma extends Context.Tag("Prisma")<Prisma, IPrismaService>() {
1048
1050
  static layerEffect = <R, E>(
1049
1051
  optionsEffect: Effect.Effect<ConstructorParameters<typeof BasePrismaClient>[0], E, R>
1050
1052
  ) => this.Default.pipe(
1051
- Layer.provide(PrismaClient.layerEffect(optionsEffect))
1053
+ Layer.provideMerge(PrismaClient.layerEffect(optionsEffect))
1052
1054
  );
1053
1055
  }
1054
1056
 
@@ -1631,6 +1633,7 @@ const makePrismaService = Effect.gen(function* () {
1631
1633
  const client = yield* PrismaClient;
1632
1634
 
1633
1635
  const prismaService: IPrismaService = {
1636
+ client,
1634
1637
  /**
1635
1638
  * Execute an effect within a database transaction.
1636
1639
  * All operations within the effect will be atomic - they either all succeed or all fail.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riordanpawley/effect-prisma-generator",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Prisma generator for Effect (fork with Prisma 7 support)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {