@prisma/client-generator-ts 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 +14 -7
- package/dist/index.mjs +14 -7
- package/package.json +12 -13
package/dist/index.js
CHANGED
|
@@ -3570,7 +3570,7 @@ function batchingTransactionDefinition(context) {
|
|
|
3570
3570
|
])
|
|
3571
3571
|
\`\`\`
|
|
3572
3572
|
|
|
3573
|
-
Read more in our [docs](https://www.prisma.io/docs/
|
|
3573
|
+
Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
|
|
3574
3574
|
`
|
|
3575
3575
|
).addGenericParameter(ts5.genericParameter("P").extends(ts5.array(prismaPromise(ts5.anyType)))).addParameter(ts5.parameter("arg", ts5.arraySpread(ts5.namedType("P")))).setReturnType(promise(ts5.namedType("runtime.Types.Utils.UnwrapTuple").addGenericArgument(ts5.namedType("P"))));
|
|
3576
3576
|
if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) {
|
|
@@ -3586,12 +3586,16 @@ function interactiveTransactionDefinition(context) {
|
|
|
3586
3586
|
options.add(isolationLevel);
|
|
3587
3587
|
}
|
|
3588
3588
|
const returnType = promise(ts5.namedType("R"));
|
|
3589
|
-
const callbackType = ts5.functionType().addParameter(
|
|
3590
|
-
ts5.parameter("prisma", omit(ts5.namedType("PrismaClient"), ts5.namedType("runtime.ITXClientDenyList")))
|
|
3591
|
-
).setReturnType(returnType);
|
|
3589
|
+
const callbackType = ts5.functionType().addParameter(ts5.parameter("prisma", omit(ts5.namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
|
|
3592
3590
|
const method3 = ts5.method("$transaction").addGenericParameter(ts5.genericParameter("R")).addParameter(ts5.parameter("fn", callbackType)).addParameter(ts5.parameter("options", options).optional()).setReturnType(returnType);
|
|
3593
3591
|
return ts5.stringify(method3, { indentLevel: 1, newLine: "leading" });
|
|
3594
3592
|
}
|
|
3593
|
+
function itxTransactionClientDenyList(context) {
|
|
3594
|
+
if (!context.isSqlProvider()) {
|
|
3595
|
+
return ts5.unionType([ts5.namedType("runtime.ITXClientDenyList"), ts5.stringLiteral("$transaction")]);
|
|
3596
|
+
}
|
|
3597
|
+
return ts5.namedType("runtime.ITXClientDenyList");
|
|
3598
|
+
}
|
|
3595
3599
|
function queryRawDefinition(context) {
|
|
3596
3600
|
if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
|
|
3597
3601
|
return "";
|
|
@@ -3709,7 +3713,9 @@ function getPrismaClientClassDocComment({ dmmf }) {
|
|
|
3709
3713
|
Type-safe database client for TypeScript
|
|
3710
3714
|
@example
|
|
3711
3715
|
\`\`\`
|
|
3712
|
-
const prisma = new PrismaClient(
|
|
3716
|
+
const prisma = new PrismaClient({
|
|
3717
|
+
adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
3718
|
+
})
|
|
3713
3719
|
// Fetch zero or more ${(0, import_client_common11.capitalize)(example.plural)}
|
|
3714
3720
|
const ${(0, import_client_common11.uncapitalize)(example.plural)} = await prisma.${(0, import_client_common11.uncapitalize)(example.model)}.findMany()
|
|
3715
3721
|
\`\`\`
|
|
@@ -5587,6 +5593,7 @@ function createPrismaNamespaceFile(context, options) {
|
|
|
5587
5593
|
].map((i) => ts19.stringify(i));
|
|
5588
5594
|
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5589
5595
|
const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
|
|
5596
|
+
const transactionClientDenyList = context.isSqlProvider() ? "runtime.ITXClientDenyList" : "runtime.ITXClientDenyList | '$transaction'";
|
|
5590
5597
|
return `${jsDocHeader8}
|
|
5591
5598
|
${imports.join("\n")}
|
|
5592
5599
|
|
|
@@ -5688,7 +5695,7 @@ export type PrismaAction =
|
|
|
5688
5695
|
/**
|
|
5689
5696
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
5690
5697
|
*/
|
|
5691
|
-
export type TransactionClient = Omit<DefaultPrismaClient,
|
|
5698
|
+
export type TransactionClient = Omit<DefaultPrismaClient, ${transactionClientDenyList}>
|
|
5692
5699
|
|
|
5693
5700
|
`;
|
|
5694
5701
|
}
|
|
@@ -6425,7 +6432,7 @@ var import_internals7 = require("@prisma/internals");
|
|
|
6425
6432
|
var import_get_tsconfig = require("get-tsconfig");
|
|
6426
6433
|
|
|
6427
6434
|
// package.json
|
|
6428
|
-
var version = "7.5.0-dev.
|
|
6435
|
+
var version = "7.5.0-dev.31";
|
|
6429
6436
|
|
|
6430
6437
|
// src/module-format.ts
|
|
6431
6438
|
function parseModuleFormat(format) {
|
package/dist/index.mjs
CHANGED
|
@@ -3563,7 +3563,7 @@ function batchingTransactionDefinition(context) {
|
|
|
3563
3563
|
])
|
|
3564
3564
|
\`\`\`
|
|
3565
3565
|
|
|
3566
|
-
Read more in our [docs](https://www.prisma.io/docs/
|
|
3566
|
+
Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
|
|
3567
3567
|
`
|
|
3568
3568
|
).addGenericParameter(ts5.genericParameter("P").extends(ts5.array(prismaPromise(ts5.anyType)))).addParameter(ts5.parameter("arg", ts5.arraySpread(ts5.namedType("P")))).setReturnType(promise(ts5.namedType("runtime.Types.Utils.UnwrapTuple").addGenericArgument(ts5.namedType("P"))));
|
|
3569
3569
|
if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) {
|
|
@@ -3579,12 +3579,16 @@ function interactiveTransactionDefinition(context) {
|
|
|
3579
3579
|
options.add(isolationLevel);
|
|
3580
3580
|
}
|
|
3581
3581
|
const returnType = promise(ts5.namedType("R"));
|
|
3582
|
-
const callbackType = ts5.functionType().addParameter(
|
|
3583
|
-
ts5.parameter("prisma", omit(ts5.namedType("PrismaClient"), ts5.namedType("runtime.ITXClientDenyList")))
|
|
3584
|
-
).setReturnType(returnType);
|
|
3582
|
+
const callbackType = ts5.functionType().addParameter(ts5.parameter("prisma", omit(ts5.namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
|
|
3585
3583
|
const method3 = ts5.method("$transaction").addGenericParameter(ts5.genericParameter("R")).addParameter(ts5.parameter("fn", callbackType)).addParameter(ts5.parameter("options", options).optional()).setReturnType(returnType);
|
|
3586
3584
|
return ts5.stringify(method3, { indentLevel: 1, newLine: "leading" });
|
|
3587
3585
|
}
|
|
3586
|
+
function itxTransactionClientDenyList(context) {
|
|
3587
|
+
if (!context.isSqlProvider()) {
|
|
3588
|
+
return ts5.unionType([ts5.namedType("runtime.ITXClientDenyList"), ts5.stringLiteral("$transaction")]);
|
|
3589
|
+
}
|
|
3590
|
+
return ts5.namedType("runtime.ITXClientDenyList");
|
|
3591
|
+
}
|
|
3588
3592
|
function queryRawDefinition(context) {
|
|
3589
3593
|
if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
|
|
3590
3594
|
return "";
|
|
@@ -3702,7 +3706,9 @@ function getPrismaClientClassDocComment({ dmmf }) {
|
|
|
3702
3706
|
Type-safe database client for TypeScript
|
|
3703
3707
|
@example
|
|
3704
3708
|
\`\`\`
|
|
3705
|
-
const prisma = new PrismaClient(
|
|
3709
|
+
const prisma = new PrismaClient({
|
|
3710
|
+
adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
3711
|
+
})
|
|
3706
3712
|
// Fetch zero or more ${capitalize6(example.plural)}
|
|
3707
3713
|
const ${uncapitalize4(example.plural)} = await prisma.${uncapitalize4(example.model)}.findMany()
|
|
3708
3714
|
\`\`\`
|
|
@@ -5580,6 +5586,7 @@ function createPrismaNamespaceFile(context, options) {
|
|
|
5580
5586
|
].map((i) => ts19.stringify(i));
|
|
5581
5587
|
const prismaEnums = context.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
|
|
5582
5588
|
const fieldRefs = context.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? [];
|
|
5589
|
+
const transactionClientDenyList = context.isSqlProvider() ? "runtime.ITXClientDenyList" : "runtime.ITXClientDenyList | '$transaction'";
|
|
5583
5590
|
return `${jsDocHeader8}
|
|
5584
5591
|
${imports.join("\n")}
|
|
5585
5592
|
|
|
@@ -5681,7 +5688,7 @@ export type PrismaAction =
|
|
|
5681
5688
|
/**
|
|
5682
5689
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
5683
5690
|
*/
|
|
5684
|
-
export type TransactionClient = Omit<DefaultPrismaClient,
|
|
5691
|
+
export type TransactionClient = Omit<DefaultPrismaClient, ${transactionClientDenyList}>
|
|
5685
5692
|
|
|
5686
5693
|
`;
|
|
5687
5694
|
}
|
|
@@ -6418,7 +6425,7 @@ import { parseEnvValue } from "@prisma/internals";
|
|
|
6418
6425
|
import { getTsconfig } from "get-tsconfig";
|
|
6419
6426
|
|
|
6420
6427
|
// package.json
|
|
6421
|
-
var version = "7.5.0-dev.
|
|
6428
|
+
var version = "7.5.0-dev.31";
|
|
6422
6429
|
|
|
6423
6430
|
// src/module-format.ts
|
|
6424
6431
|
function parseModuleFormat(format) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-ts",
|
|
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,7 +25,7 @@
|
|
|
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
|
"fast-glob": "3.3.3",
|
|
30
30
|
"get-tsconfig": "4.10.0",
|
|
31
31
|
"indent-string": "4.0.0",
|
|
@@ -33,19 +33,18 @@
|
|
|
33
33
|
"package-up": "5.0.0",
|
|
34
34
|
"pluralize": "8.0.0",
|
|
35
35
|
"ts-pattern": "5.6.2",
|
|
36
|
-
"@prisma/
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/param-graph-builder": "7.5.0-dev.
|
|
43
|
-
"@prisma/
|
|
44
|
-
"@prisma/ts-builders": "7.5.0-dev.
|
|
36
|
+
"@prisma/client-common": "7.5.0-dev.31",
|
|
37
|
+
"@prisma/debug": "7.5.0-dev.31",
|
|
38
|
+
"@prisma/dmmf": "7.5.0-dev.31",
|
|
39
|
+
"@prisma/get-platform": "7.5.0-dev.31",
|
|
40
|
+
"@prisma/generator": "7.5.0-dev.31",
|
|
41
|
+
"@prisma/fetch-engine": "7.5.0-dev.31",
|
|
42
|
+
"@prisma/param-graph-builder": "7.5.0-dev.31",
|
|
43
|
+
"@prisma/internals": "7.5.0-dev.31",
|
|
44
|
+
"@prisma/ts-builders": "7.5.0-dev.31"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/pluralize": "0.0.33"
|
|
48
|
-
"vitest": "3.2.4"
|
|
47
|
+
"@types/pluralize": "0.0.33"
|
|
49
48
|
},
|
|
50
49
|
"files": [
|
|
51
50
|
"dist"
|