@prisma/client-generator-js 7.5.0-dev.3 → 7.5.0-dev.31
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 +16 -10
- package/dist/index.mjs +16 -10
- package/package.json +12 -13
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-
|
|
2485
|
+
"@prisma/engines-version": "7.5.0-10.94a226be1cf2967af2541cca5529f0f7ba866919",
|
|
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-
|
|
2497
|
+
"@prisma/query-compiler-wasm": "7.5.0-10.94a226be1cf2967af2541cca5529f0f7ba866919",
|
|
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/
|
|
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 "";
|
|
@@ -5564,7 +5567,9 @@ var PrismaClientClass = class {
|
|
|
5564
5567
|
* Type-safe database client for TypeScript & Node.js
|
|
5565
5568
|
* @example
|
|
5566
5569
|
* \`\`\`
|
|
5567
|
-
* const prisma = new PrismaClient(
|
|
5570
|
+
* const prisma = new PrismaClient({
|
|
5571
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
5572
|
+
* })
|
|
5568
5573
|
* // Fetch zero or more ${(0, import_client_common15.capitalize)(example.plural)}
|
|
5569
5574
|
* const ${(0, import_client_common15.uncapitalize)(example.plural)} = await prisma.${(0, import_client_common15.uncapitalize)(example.model)}.findMany()
|
|
5570
5575
|
* \`\`\`
|
|
@@ -5631,6 +5636,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
|
|
|
5631
5636
|
}
|
|
5632
5637
|
toTS() {
|
|
5633
5638
|
const clientOptions = this.buildClientOptions();
|
|
5639
|
+
const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
|
|
5634
5640
|
return `${clientExtensionsDefinitions(this.context)}
|
|
5635
5641
|
export type DefaultPrismaClient = PrismaClient
|
|
5636
5642
|
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
|
|
@@ -5699,7 +5705,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
|
|
|
5699
5705
|
/**
|
|
5700
5706
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
5701
5707
|
*/
|
|
5702
|
-
export type TransactionClient = Omit<Prisma.DefaultPrismaClient,
|
|
5708
|
+
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
|
|
5703
5709
|
`;
|
|
5704
5710
|
}
|
|
5705
5711
|
buildClientOptions() {
|
|
@@ -6826,7 +6832,7 @@ var import_engines_version = require("@prisma/engines-version");
|
|
|
6826
6832
|
var import_internals9 = require("@prisma/internals");
|
|
6827
6833
|
|
|
6828
6834
|
// package.json
|
|
6829
|
-
var version = "7.5.0-dev.
|
|
6835
|
+
var version = "7.5.0-dev.31";
|
|
6830
6836
|
|
|
6831
6837
|
// src/resolvePrismaClient.ts
|
|
6832
6838
|
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-
|
|
2474
|
+
"@prisma/engines-version": "7.5.0-10.94a226be1cf2967af2541cca5529f0f7ba866919",
|
|
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-
|
|
2486
|
+
"@prisma/query-compiler-wasm": "7.5.0-10.94a226be1cf2967af2541cca5529f0f7ba866919",
|
|
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/
|
|
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 "";
|
|
@@ -5556,7 +5559,9 @@ var PrismaClientClass = class {
|
|
|
5556
5559
|
* Type-safe database client for TypeScript & Node.js
|
|
5557
5560
|
* @example
|
|
5558
5561
|
* \`\`\`
|
|
5559
|
-
* const prisma = new PrismaClient(
|
|
5562
|
+
* const prisma = new PrismaClient({
|
|
5563
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
5564
|
+
* })
|
|
5560
5565
|
* // Fetch zero or more ${capitalize7(example.plural)}
|
|
5561
5566
|
* const ${uncapitalize7(example.plural)} = await prisma.${uncapitalize7(example.model)}.findMany()
|
|
5562
5567
|
* \`\`\`
|
|
@@ -5623,6 +5628,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
|
|
|
5623
5628
|
}
|
|
5624
5629
|
toTS() {
|
|
5625
5630
|
const clientOptions = this.buildClientOptions();
|
|
5631
|
+
const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
|
|
5626
5632
|
return `${clientExtensionsDefinitions(this.context)}
|
|
5627
5633
|
export type DefaultPrismaClient = PrismaClient
|
|
5628
5634
|
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
|
|
@@ -5691,7 +5697,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
|
|
|
5691
5697
|
/**
|
|
5692
5698
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
5693
5699
|
*/
|
|
5694
|
-
export type TransactionClient = Omit<Prisma.DefaultPrismaClient,
|
|
5700
|
+
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
|
|
5695
5701
|
`;
|
|
5696
5702
|
}
|
|
5697
5703
|
buildClientOptions() {
|
|
@@ -6818,7 +6824,7 @@ import { enginesVersion } from "@prisma/engines-version";
|
|
|
6818
6824
|
import { parseEnvValue } from "@prisma/internals";
|
|
6819
6825
|
|
|
6820
6826
|
// package.json
|
|
6821
|
-
var version = "7.5.0-dev.
|
|
6827
|
+
var version = "7.5.0-dev.31";
|
|
6822
6828
|
|
|
6823
6829
|
// src/resolvePrismaClient.ts
|
|
6824
6830
|
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.
|
|
3
|
+
"version": "7.5.0-dev.31",
|
|
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,26 +25,25 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@antfu/ni": "0.21.12",
|
|
28
|
-
"@prisma/engines-version": "7.5.0-
|
|
28
|
+
"@prisma/engines-version": "7.5.0-10.94a226be1cf2967af2541cca5529f0f7ba866919",
|
|
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/
|
|
36
|
-
"@prisma/
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/param-graph-builder": "7.5.0-dev.
|
|
43
|
-
"@prisma/ts-builders": "7.5.0-dev.
|
|
35
|
+
"@prisma/client-common": "7.5.0-dev.31",
|
|
36
|
+
"@prisma/debug": "7.5.0-dev.31",
|
|
37
|
+
"@prisma/fetch-engine": "7.5.0-dev.31",
|
|
38
|
+
"@prisma/dmmf": "7.5.0-dev.31",
|
|
39
|
+
"@prisma/generator": "7.5.0-dev.31",
|
|
40
|
+
"@prisma/internals": "7.5.0-dev.31",
|
|
41
|
+
"@prisma/get-platform": "7.5.0-dev.31",
|
|
42
|
+
"@prisma/param-graph-builder": "7.5.0-dev.31",
|
|
43
|
+
"@prisma/ts-builders": "7.5.0-dev.31"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/pluralize": "0.0.33"
|
|
47
|
-
"vitest": "3.2.4"
|
|
46
|
+
"@types/pluralize": "0.0.33"
|
|
48
47
|
},
|
|
49
48
|
"files": [
|
|
50
49
|
"dist"
|