@prisma/client-generator-js 7.5.0-dev.2 → 7.5.0-dev.20

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/dist/index.js CHANGED
@@ -2422,7 +2422,6 @@ var package_default = {
2422
2422
  "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts",
2423
2423
  "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts",
2424
2424
  "test:functional:client": "pnpm run test:functional --client-runtime client",
2425
- "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts",
2426
2425
  "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types",
2427
2426
  "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only",
2428
2427
  "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts",
@@ -2483,7 +2482,7 @@ var package_default = {
2483
2482
  "@prisma/dmmf": "workspace:*",
2484
2483
  "@prisma/driver-adapter-utils": "workspace:*",
2485
2484
  "@prisma/engines": "workspace:*",
2486
- "@prisma/engines-version": "7.5.0-1.6f4d6f15829886a577303c96ec521cb23b86a9a3",
2485
+ "@prisma/engines-version": "7.5.0-7.e32e01e74d5841684e517d184a54aedc852ef795",
2487
2486
  "@prisma/fetch-engine": "workspace:*",
2488
2487
  "@prisma/generator": "workspace:*",
2489
2488
  "@prisma/generator-helper": "workspace:*",
@@ -2495,7 +2494,7 @@ var package_default = {
2495
2494
  "@prisma/migrate": "workspace:*",
2496
2495
  "@prisma/param-graph": "workspace:*",
2497
2496
  "@prisma/param-graph-builder": "workspace:*",
2498
- "@prisma/query-compiler-wasm": "7.5.0-1.6f4d6f15829886a577303c96ec521cb23b86a9a3",
2497
+ "@prisma/query-compiler-wasm": "7.5.0-7.e32e01e74d5841684e517d184a54aedc852ef795",
2499
2498
  "@prisma/query-plan-executor": "workspace:*",
2500
2499
  "@prisma/sqlcommenter": "workspace:*",
2501
2500
  "@prisma/sqlcommenter-trace-context": "workspace:*",
@@ -5416,7 +5415,7 @@ function batchingTransactionDefinition(context) {
5416
5415
  ])
5417
5416
  \`\`\`
5418
5417
 
5419
- Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
5418
+ Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
5420
5419
  `
5421
5420
  ).addGenericParameter(ts11.genericParameter("P").extends(ts11.array(prismaPromise(ts11.anyType)))).addParameter(ts11.parameter("arg", ts11.arraySpread(ts11.namedType("P")))).setReturnType(promise(ts11.namedType("runtime.Types.Utils.UnwrapTuple").addGenericArgument(ts11.namedType("P"))));
5422
5421
  if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) {
@@ -5432,12 +5431,16 @@ function interactiveTransactionDefinition(context) {
5432
5431
  options.add(isolationLevel);
5433
5432
  }
5434
5433
  const returnType = promise(ts11.namedType("R"));
5435
- const callbackType = ts11.functionType().addParameter(
5436
- ts11.parameter("prisma", ts11.omit(ts11.namedType("PrismaClient"), ts11.namedType("runtime.ITXClientDenyList")))
5437
- ).setReturnType(returnType);
5434
+ const callbackType = ts11.functionType().addParameter(ts11.parameter("prisma", ts11.omit(ts11.namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
5438
5435
  const method3 = ts11.method("$transaction").addGenericParameter(ts11.genericParameter("R")).addParameter(ts11.parameter("fn", callbackType)).addParameter(ts11.parameter("options", options).optional()).setReturnType(returnType);
5439
5436
  return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
5440
5437
  }
5438
+ function itxTransactionClientDenyList(context) {
5439
+ if (context.provider === "mongodb") {
5440
+ return ts11.unionType([ts11.namedType("runtime.ITXClientDenyList"), ts11.stringLiteral("$transaction")]);
5441
+ }
5442
+ return ts11.namedType("runtime.ITXClientDenyList");
5443
+ }
5441
5444
  function queryRawDefinition(context) {
5442
5445
  if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
5443
5446
  return "";
@@ -5631,6 +5634,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
5631
5634
  }
5632
5635
  toTS() {
5633
5636
  const clientOptions = this.buildClientOptions();
5637
+ const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
5634
5638
  return `${clientExtensionsDefinitions(this.context)}
5635
5639
  export type DefaultPrismaClient = PrismaClient
5636
5640
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
@@ -5699,7 +5703,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
5699
5703
  /**
5700
5704
  * \`PrismaClient\` proxy available in interactive transactions.
5701
5705
  */
5702
- export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>
5706
+ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
5703
5707
  `;
5704
5708
  }
5705
5709
  buildClientOptions() {
@@ -6826,7 +6830,7 @@ var import_engines_version = require("@prisma/engines-version");
6826
6830
  var import_internals9 = require("@prisma/internals");
6827
6831
 
6828
6832
  // package.json
6829
- var version = "7.5.0-dev.2";
6833
+ var version = "7.5.0-dev.20";
6830
6834
 
6831
6835
  // src/resolvePrismaClient.ts
6832
6836
  var import_promises2 = __toESM(require("node:fs/promises"));
package/dist/index.mjs CHANGED
@@ -2411,7 +2411,6 @@ var package_default = {
2411
2411
  "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts",
2412
2412
  "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts",
2413
2413
  "test:functional:client": "pnpm run test:functional --client-runtime client",
2414
- "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts",
2415
2414
  "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types",
2416
2415
  "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only",
2417
2416
  "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts",
@@ -2472,7 +2471,7 @@ var package_default = {
2472
2471
  "@prisma/dmmf": "workspace:*",
2473
2472
  "@prisma/driver-adapter-utils": "workspace:*",
2474
2473
  "@prisma/engines": "workspace:*",
2475
- "@prisma/engines-version": "7.5.0-1.6f4d6f15829886a577303c96ec521cb23b86a9a3",
2474
+ "@prisma/engines-version": "7.5.0-7.e32e01e74d5841684e517d184a54aedc852ef795",
2476
2475
  "@prisma/fetch-engine": "workspace:*",
2477
2476
  "@prisma/generator": "workspace:*",
2478
2477
  "@prisma/generator-helper": "workspace:*",
@@ -2484,7 +2483,7 @@ var package_default = {
2484
2483
  "@prisma/migrate": "workspace:*",
2485
2484
  "@prisma/param-graph": "workspace:*",
2486
2485
  "@prisma/param-graph-builder": "workspace:*",
2487
- "@prisma/query-compiler-wasm": "7.5.0-1.6f4d6f15829886a577303c96ec521cb23b86a9a3",
2486
+ "@prisma/query-compiler-wasm": "7.5.0-7.e32e01e74d5841684e517d184a54aedc852ef795",
2488
2487
  "@prisma/query-plan-executor": "workspace:*",
2489
2488
  "@prisma/sqlcommenter": "workspace:*",
2490
2489
  "@prisma/sqlcommenter-trace-context": "workspace:*",
@@ -5408,7 +5407,7 @@ function batchingTransactionDefinition(context) {
5408
5407
  ])
5409
5408
  \`\`\`
5410
5409
 
5411
- Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
5410
+ Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
5412
5411
  `
5413
5412
  ).addGenericParameter(ts11.genericParameter("P").extends(ts11.array(prismaPromise(ts11.anyType)))).addParameter(ts11.parameter("arg", ts11.arraySpread(ts11.namedType("P")))).setReturnType(promise(ts11.namedType("runtime.Types.Utils.UnwrapTuple").addGenericArgument(ts11.namedType("P"))));
5414
5413
  if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) {
@@ -5424,12 +5423,16 @@ function interactiveTransactionDefinition(context) {
5424
5423
  options.add(isolationLevel);
5425
5424
  }
5426
5425
  const returnType = promise(ts11.namedType("R"));
5427
- const callbackType = ts11.functionType().addParameter(
5428
- ts11.parameter("prisma", ts11.omit(ts11.namedType("PrismaClient"), ts11.namedType("runtime.ITXClientDenyList")))
5429
- ).setReturnType(returnType);
5426
+ const callbackType = ts11.functionType().addParameter(ts11.parameter("prisma", ts11.omit(ts11.namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
5430
5427
  const method3 = ts11.method("$transaction").addGenericParameter(ts11.genericParameter("R")).addParameter(ts11.parameter("fn", callbackType)).addParameter(ts11.parameter("options", options).optional()).setReturnType(returnType);
5431
5428
  return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
5432
5429
  }
5430
+ function itxTransactionClientDenyList(context) {
5431
+ if (context.provider === "mongodb") {
5432
+ return ts11.unionType([ts11.namedType("runtime.ITXClientDenyList"), ts11.stringLiteral("$transaction")]);
5433
+ }
5434
+ return ts11.namedType("runtime.ITXClientDenyList");
5435
+ }
5433
5436
  function queryRawDefinition(context) {
5434
5437
  if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
5435
5438
  return "";
@@ -5623,6 +5626,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
5623
5626
  }
5624
5627
  toTS() {
5625
5628
  const clientOptions = this.buildClientOptions();
5629
+ const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
5626
5630
  return `${clientExtensionsDefinitions(this.context)}
5627
5631
  export type DefaultPrismaClient = PrismaClient
5628
5632
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
@@ -5691,7 +5695,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
5691
5695
  /**
5692
5696
  * \`PrismaClient\` proxy available in interactive transactions.
5693
5697
  */
5694
- export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>
5698
+ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
5695
5699
  `;
5696
5700
  }
5697
5701
  buildClientOptions() {
@@ -6818,7 +6822,7 @@ import { enginesVersion } from "@prisma/engines-version";
6818
6822
  import { parseEnvValue } from "@prisma/internals";
6819
6823
 
6820
6824
  // package.json
6821
- var version = "7.5.0-dev.2";
6825
+ var version = "7.5.0-dev.20";
6822
6826
 
6823
6827
  // src/resolvePrismaClient.ts
6824
6828
  import fs2 from "node:fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-generator-js",
3
- "version": "7.5.0-dev.2",
3
+ "version": "7.5.0-dev.20",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -25,22 +25,22 @@
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@antfu/ni": "0.21.12",
28
- "@prisma/engines-version": "7.5.0-1.6f4d6f15829886a577303c96ec521cb23b86a9a3",
28
+ "@prisma/engines-version": "7.5.0-7.e32e01e74d5841684e517d184a54aedc852ef795",
29
29
  "env-paths": "2.2.1",
30
30
  "indent-string": "4.0.0",
31
31
  "klona": "2.0.6",
32
32
  "package-up": "5.0.0",
33
33
  "pluralize": "8.0.0",
34
34
  "ts-pattern": "5.6.2",
35
- "@prisma/fetch-engine": "7.5.0-dev.2",
36
- "@prisma/dmmf": "7.5.0-dev.2",
37
- "@prisma/client-common": "7.5.0-dev.2",
38
- "@prisma/get-platform": "7.5.0-dev.2",
39
- "@prisma/generator": "7.5.0-dev.2",
40
- "@prisma/debug": "7.5.0-dev.2",
41
- "@prisma/param-graph-builder": "7.5.0-dev.2",
42
- "@prisma/internals": "7.5.0-dev.2",
43
- "@prisma/ts-builders": "7.5.0-dev.2"
35
+ "@prisma/client-common": "7.5.0-dev.20",
36
+ "@prisma/dmmf": "7.5.0-dev.20",
37
+ "@prisma/fetch-engine": "7.5.0-dev.20",
38
+ "@prisma/generator": "7.5.0-dev.20",
39
+ "@prisma/debug": "7.5.0-dev.20",
40
+ "@prisma/get-platform": "7.5.0-dev.20",
41
+ "@prisma/param-graph-builder": "7.5.0-dev.20",
42
+ "@prisma/internals": "7.5.0-dev.20",
43
+ "@prisma/ts-builders": "7.5.0-dev.20"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/pluralize": "0.0.33",