@prisma/client-generator-js 7.5.0-dev.8 → 7.5.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.
- package/dist/index.js +18 -11
- package/dist/index.mjs +18 -11
- 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-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
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-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
2499
2498
|
"@prisma/query-plan-executor": "workspace:*",
|
|
2500
2499
|
"@prisma/sqlcommenter": "workspace:*",
|
|
2501
2500
|
"@prisma/sqlcommenter-trace-context": "workspace:*",
|
|
@@ -3151,7 +3150,8 @@ ${onlySelect}
|
|
|
3151
3150
|
orderBy: JSDocFields.orderBy,
|
|
3152
3151
|
skip: JSDocFields.skip,
|
|
3153
3152
|
cursor: (singular, plural) => addLinkToDocs(`Sets the position for listing ${plural}.`, "cursor"),
|
|
3154
|
-
take: JSDocFields.take
|
|
3153
|
+
take: JSDocFields.take,
|
|
3154
|
+
distinct: JSDocFields.distinct
|
|
3155
3155
|
}
|
|
3156
3156
|
},
|
|
3157
3157
|
update: {
|
|
@@ -5416,7 +5416,7 @@ function batchingTransactionDefinition(context) {
|
|
|
5416
5416
|
])
|
|
5417
5417
|
\`\`\`
|
|
5418
5418
|
|
|
5419
|
-
Read more in our [docs](https://www.prisma.io/docs/
|
|
5419
|
+
Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
|
|
5420
5420
|
`
|
|
5421
5421
|
).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
5422
|
if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) {
|
|
@@ -5432,12 +5432,16 @@ function interactiveTransactionDefinition(context) {
|
|
|
5432
5432
|
options.add(isolationLevel);
|
|
5433
5433
|
}
|
|
5434
5434
|
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);
|
|
5435
|
+
const callbackType = ts11.functionType().addParameter(ts11.parameter("prisma", ts11.omit(ts11.namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
|
|
5438
5436
|
const method3 = ts11.method("$transaction").addGenericParameter(ts11.genericParameter("R")).addParameter(ts11.parameter("fn", callbackType)).addParameter(ts11.parameter("options", options).optional()).setReturnType(returnType);
|
|
5439
5437
|
return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
|
|
5440
5438
|
}
|
|
5439
|
+
function itxTransactionClientDenyList(context) {
|
|
5440
|
+
if (context.provider === "mongodb") {
|
|
5441
|
+
return ts11.unionType([ts11.namedType("runtime.ITXClientDenyList"), ts11.stringLiteral("$transaction")]);
|
|
5442
|
+
}
|
|
5443
|
+
return ts11.namedType("runtime.ITXClientDenyList");
|
|
5444
|
+
}
|
|
5441
5445
|
function queryRawDefinition(context) {
|
|
5442
5446
|
if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
|
|
5443
5447
|
return "";
|
|
@@ -5564,7 +5568,9 @@ var PrismaClientClass = class {
|
|
|
5564
5568
|
* Type-safe database client for TypeScript & Node.js
|
|
5565
5569
|
* @example
|
|
5566
5570
|
* \`\`\`
|
|
5567
|
-
* const prisma = new PrismaClient(
|
|
5571
|
+
* const prisma = new PrismaClient({
|
|
5572
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
5573
|
+
* })
|
|
5568
5574
|
* // Fetch zero or more ${(0, import_client_common15.capitalize)(example.plural)}
|
|
5569
5575
|
* const ${(0, import_client_common15.uncapitalize)(example.plural)} = await prisma.${(0, import_client_common15.uncapitalize)(example.model)}.findMany()
|
|
5570
5576
|
* \`\`\`
|
|
@@ -5631,6 +5637,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
|
|
|
5631
5637
|
}
|
|
5632
5638
|
toTS() {
|
|
5633
5639
|
const clientOptions = this.buildClientOptions();
|
|
5640
|
+
const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
|
|
5634
5641
|
return `${clientExtensionsDefinitions(this.context)}
|
|
5635
5642
|
export type DefaultPrismaClient = PrismaClient
|
|
5636
5643
|
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
|
|
@@ -5699,7 +5706,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
|
|
|
5699
5706
|
/**
|
|
5700
5707
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
5701
5708
|
*/
|
|
5702
|
-
export type TransactionClient = Omit<Prisma.DefaultPrismaClient,
|
|
5709
|
+
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
|
|
5703
5710
|
`;
|
|
5704
5711
|
}
|
|
5705
5712
|
buildClientOptions() {
|
|
@@ -6826,7 +6833,7 @@ var import_engines_version = require("@prisma/engines-version");
|
|
|
6826
6833
|
var import_internals9 = require("@prisma/internals");
|
|
6827
6834
|
|
|
6828
6835
|
// package.json
|
|
6829
|
-
var version = "7.5.0
|
|
6836
|
+
var version = "7.5.0";
|
|
6830
6837
|
|
|
6831
6838
|
// src/resolvePrismaClient.ts
|
|
6832
6839
|
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-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
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-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
2488
2487
|
"@prisma/query-plan-executor": "workspace:*",
|
|
2489
2488
|
"@prisma/sqlcommenter": "workspace:*",
|
|
2490
2489
|
"@prisma/sqlcommenter-trace-context": "workspace:*",
|
|
@@ -3140,7 +3139,8 @@ ${onlySelect}
|
|
|
3140
3139
|
orderBy: JSDocFields.orderBy,
|
|
3141
3140
|
skip: JSDocFields.skip,
|
|
3142
3141
|
cursor: (singular, plural) => addLinkToDocs(`Sets the position for listing ${plural}.`, "cursor"),
|
|
3143
|
-
take: JSDocFields.take
|
|
3142
|
+
take: JSDocFields.take,
|
|
3143
|
+
distinct: JSDocFields.distinct
|
|
3144
3144
|
}
|
|
3145
3145
|
},
|
|
3146
3146
|
update: {
|
|
@@ -5408,7 +5408,7 @@ function batchingTransactionDefinition(context) {
|
|
|
5408
5408
|
])
|
|
5409
5409
|
\`\`\`
|
|
5410
5410
|
|
|
5411
|
-
Read more in our [docs](https://www.prisma.io/docs/
|
|
5411
|
+
Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
|
|
5412
5412
|
`
|
|
5413
5413
|
).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
5414
|
if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) {
|
|
@@ -5424,12 +5424,16 @@ function interactiveTransactionDefinition(context) {
|
|
|
5424
5424
|
options.add(isolationLevel);
|
|
5425
5425
|
}
|
|
5426
5426
|
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);
|
|
5427
|
+
const callbackType = ts11.functionType().addParameter(ts11.parameter("prisma", ts11.omit(ts11.namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
|
|
5430
5428
|
const method3 = ts11.method("$transaction").addGenericParameter(ts11.genericParameter("R")).addParameter(ts11.parameter("fn", callbackType)).addParameter(ts11.parameter("options", options).optional()).setReturnType(returnType);
|
|
5431
5429
|
return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
|
|
5432
5430
|
}
|
|
5431
|
+
function itxTransactionClientDenyList(context) {
|
|
5432
|
+
if (context.provider === "mongodb") {
|
|
5433
|
+
return ts11.unionType([ts11.namedType("runtime.ITXClientDenyList"), ts11.stringLiteral("$transaction")]);
|
|
5434
|
+
}
|
|
5435
|
+
return ts11.namedType("runtime.ITXClientDenyList");
|
|
5436
|
+
}
|
|
5433
5437
|
function queryRawDefinition(context) {
|
|
5434
5438
|
if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
|
|
5435
5439
|
return "";
|
|
@@ -5556,7 +5560,9 @@ var PrismaClientClass = class {
|
|
|
5556
5560
|
* Type-safe database client for TypeScript & Node.js
|
|
5557
5561
|
* @example
|
|
5558
5562
|
* \`\`\`
|
|
5559
|
-
* const prisma = new PrismaClient(
|
|
5563
|
+
* const prisma = new PrismaClient({
|
|
5564
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
5565
|
+
* })
|
|
5560
5566
|
* // Fetch zero or more ${capitalize7(example.plural)}
|
|
5561
5567
|
* const ${uncapitalize7(example.plural)} = await prisma.${uncapitalize7(example.model)}.findMany()
|
|
5562
5568
|
* \`\`\`
|
|
@@ -5623,6 +5629,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
|
|
|
5623
5629
|
}
|
|
5624
5630
|
toTS() {
|
|
5625
5631
|
const clientOptions = this.buildClientOptions();
|
|
5632
|
+
const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
|
|
5626
5633
|
return `${clientExtensionsDefinitions(this.context)}
|
|
5627
5634
|
export type DefaultPrismaClient = PrismaClient
|
|
5628
5635
|
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
|
|
@@ -5691,7 +5698,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
|
|
|
5691
5698
|
/**
|
|
5692
5699
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
5693
5700
|
*/
|
|
5694
|
-
export type TransactionClient = Omit<Prisma.DefaultPrismaClient,
|
|
5701
|
+
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
|
|
5695
5702
|
`;
|
|
5696
5703
|
}
|
|
5697
5704
|
buildClientOptions() {
|
|
@@ -6818,7 +6825,7 @@ import { enginesVersion } from "@prisma/engines-version";
|
|
|
6818
6825
|
import { parseEnvValue } from "@prisma/internals";
|
|
6819
6826
|
|
|
6820
6827
|
// package.json
|
|
6821
|
-
var version = "7.5.0
|
|
6828
|
+
var version = "7.5.0";
|
|
6822
6829
|
|
|
6823
6830
|
// src/resolvePrismaClient.ts
|
|
6824
6831
|
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
|
|
3
|
+
"version": "7.5.0",
|
|
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-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
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/client-common": "7.5.0
|
|
36
|
-
"@prisma/
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/
|
|
35
|
+
"@prisma/client-common": "7.5.0",
|
|
36
|
+
"@prisma/fetch-engine": "7.5.0",
|
|
37
|
+
"@prisma/generator": "7.5.0",
|
|
38
|
+
"@prisma/debug": "7.5.0",
|
|
39
|
+
"@prisma/dmmf": "7.5.0",
|
|
40
|
+
"@prisma/internals": "7.5.0",
|
|
41
|
+
"@prisma/get-platform": "7.5.0",
|
|
42
|
+
"@prisma/param-graph-builder": "7.5.0",
|
|
43
|
+
"@prisma/ts-builders": "7.5.0"
|
|
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"
|