@prisma/client 7.5.0-dev.13 → 7.5.0-dev.14
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/generator-build/index.js +11 -6
- package/package.json +34 -34
- package/runtime/client.d.mts +23 -2
- package/runtime/client.d.ts +23 -2
- package/runtime/client.js +18 -18
- package/runtime/client.js.map +3 -3
- package/runtime/client.mjs +18 -18
- package/runtime/client.mjs.map +3 -3
- package/runtime/wasm-compiler-edge.js +17 -17
- package/runtime/wasm-compiler-edge.js.map +4 -4
- package/runtime/wasm-compiler-edge.mjs +17 -17
- package/runtime/wasm-compiler-edge.mjs.map +4 -4
- package/scripts/default-index.js +1 -1
package/generator-build/index.js
CHANGED
|
@@ -4573,7 +4573,7 @@ var import_path4 = __toESM(require("path"));
|
|
|
4573
4573
|
// package.json
|
|
4574
4574
|
var package_default = {
|
|
4575
4575
|
name: "@prisma/client",
|
|
4576
|
-
version: "7.5.0-dev.
|
|
4576
|
+
version: "7.5.0-dev.14",
|
|
4577
4577
|
description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
|
|
4578
4578
|
keywords: [
|
|
4579
4579
|
"ORM",
|
|
@@ -9621,12 +9621,16 @@ function interactiveTransactionDefinition(context) {
|
|
|
9621
9621
|
options2.add(isolationLevel);
|
|
9622
9622
|
}
|
|
9623
9623
|
const returnType = promise(namedType("R"));
|
|
9624
|
-
const callbackType = functionType().addParameter(
|
|
9625
|
-
parameter("prisma", omit(namedType("PrismaClient"), namedType("runtime.ITXClientDenyList")))
|
|
9626
|
-
).setReturnType(returnType);
|
|
9624
|
+
const callbackType = functionType().addParameter(parameter("prisma", omit(namedType("PrismaClient"), itxTransactionClientDenyList(context)))).setReturnType(returnType);
|
|
9627
9625
|
const method2 = method("$transaction").addGenericParameter(genericParameter("R")).addParameter(parameter("fn", callbackType)).addParameter(parameter("options", options2).optional()).setReturnType(returnType);
|
|
9628
9626
|
return stringify(method2, { indentLevel: 1, newLine: "leading" });
|
|
9629
9627
|
}
|
|
9628
|
+
function itxTransactionClientDenyList(context) {
|
|
9629
|
+
if (context.provider === "mongodb") {
|
|
9630
|
+
return unionType([namedType("runtime.ITXClientDenyList"), stringLiteral("$transaction")]);
|
|
9631
|
+
}
|
|
9632
|
+
return namedType("runtime.ITXClientDenyList");
|
|
9633
|
+
}
|
|
9630
9634
|
function queryRawDefinition(context) {
|
|
9631
9635
|
if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) {
|
|
9632
9636
|
return "";
|
|
@@ -9820,6 +9824,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
|
|
|
9820
9824
|
}
|
|
9821
9825
|
toTS() {
|
|
9822
9826
|
const clientOptions = this.buildClientOptions();
|
|
9827
|
+
const transactionClientDenyList = this.context.provider === "mongodb" ? "runtime.ITXClientDenyList | '$transaction'" : "runtime.ITXClientDenyList";
|
|
9823
9828
|
return `${clientExtensionsDefinitions(this.context)}
|
|
9824
9829
|
export type DefaultPrismaClient = PrismaClient
|
|
9825
9830
|
export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
|
|
@@ -9888,7 +9893,7 @@ export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | un
|
|
|
9888
9893
|
/**
|
|
9889
9894
|
* \`PrismaClient\` proxy available in interactive transactions.
|
|
9890
9895
|
*/
|
|
9891
|
-
export type TransactionClient = Omit<Prisma.DefaultPrismaClient,
|
|
9896
|
+
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, ${transactionClientDenyList}>
|
|
9892
9897
|
`;
|
|
9893
9898
|
}
|
|
9894
9899
|
buildClientOptions() {
|
|
@@ -11004,7 +11009,7 @@ var import_node_path4 = __toESM(require("node:path"));
|
|
|
11004
11009
|
var import_engines_version = __toESM(require_engines_version());
|
|
11005
11010
|
|
|
11006
11011
|
// ../client-generator-js/package.json
|
|
11007
|
-
var version = "7.5.0-dev.
|
|
11012
|
+
var version = "7.5.0-dev.14";
|
|
11008
11013
|
|
|
11009
11014
|
// ../client-generator-js/src/resolvePrismaClient.ts
|
|
11010
11015
|
var import_promises5 = __toESM(require("node:fs/promises"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client",
|
|
3
|
-
"version": "7.5.0-dev.
|
|
3
|
+
"version": "7.5.0-dev.14",
|
|
4
4
|
"description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ORM",
|
|
@@ -218,41 +218,41 @@
|
|
|
218
218
|
"typescript": "5.4.5",
|
|
219
219
|
"undici": "7.4.0",
|
|
220
220
|
"zx": "8.4.1",
|
|
221
|
-
"@prisma/adapter-d1": "7.5.0-dev.
|
|
222
|
-
"@prisma/adapter-better-sqlite3": "7.5.0-dev.
|
|
223
|
-
"@prisma/adapter-
|
|
224
|
-
"@prisma/adapter-
|
|
225
|
-
"@prisma/adapter-mssql": "7.5.0-dev.
|
|
226
|
-
"@prisma/adapter-
|
|
227
|
-
"@prisma/adapter-
|
|
228
|
-
"@prisma/
|
|
229
|
-
"@prisma/client-generator-js": "7.5.0-dev.
|
|
230
|
-
"@prisma/client-engine-runtime": "7.5.0-dev.
|
|
231
|
-
"@prisma/client-
|
|
232
|
-
"@prisma/
|
|
233
|
-
"@prisma/
|
|
234
|
-
"@prisma/dmmf": "7.5.0-dev.
|
|
235
|
-
"@prisma/
|
|
236
|
-
"@prisma/driver-adapter-utils": "7.5.0-dev.
|
|
237
|
-
"@prisma/engines": "7.5.0-dev.
|
|
238
|
-
"@prisma/fetch-engine": "7.5.0-dev.
|
|
239
|
-
"@prisma/generator": "7.5.0-dev.
|
|
240
|
-
"@prisma/generator-helper": "7.5.0-dev.
|
|
241
|
-
"@prisma/get-platform": "7.5.0-dev.
|
|
242
|
-
"@prisma/instrumentation": "7.5.0-dev.
|
|
243
|
-
"@prisma/instrumentation
|
|
244
|
-
"@prisma/internals": "7.5.0-dev.
|
|
245
|
-
"@prisma/
|
|
246
|
-
"@prisma/
|
|
247
|
-
"@prisma/
|
|
248
|
-
"@prisma/
|
|
249
|
-
"@prisma/query-plan-executor": "7.5.0-dev.
|
|
250
|
-
"@prisma/
|
|
251
|
-
"@prisma/sqlcommenter": "7.5.0-dev.
|
|
252
|
-
"@prisma/
|
|
221
|
+
"@prisma/adapter-d1": "7.5.0-dev.14",
|
|
222
|
+
"@prisma/adapter-better-sqlite3": "7.5.0-dev.14",
|
|
223
|
+
"@prisma/adapter-mariadb": "7.5.0-dev.14",
|
|
224
|
+
"@prisma/adapter-libsql": "7.5.0-dev.14",
|
|
225
|
+
"@prisma/adapter-mssql": "7.5.0-dev.14",
|
|
226
|
+
"@prisma/adapter-pg": "7.5.0-dev.14",
|
|
227
|
+
"@prisma/adapter-neon": "7.5.0-dev.14",
|
|
228
|
+
"@prisma/client-common": "7.5.0-dev.14",
|
|
229
|
+
"@prisma/client-generator-js": "7.5.0-dev.14",
|
|
230
|
+
"@prisma/client-engine-runtime": "7.5.0-dev.14",
|
|
231
|
+
"@prisma/client-generator-ts": "7.5.0-dev.14",
|
|
232
|
+
"@prisma/debug": "7.5.0-dev.14",
|
|
233
|
+
"@prisma/adapter-planetscale": "7.5.0-dev.14",
|
|
234
|
+
"@prisma/dmmf": "7.5.0-dev.14",
|
|
235
|
+
"@prisma/config": "7.5.0-dev.14",
|
|
236
|
+
"@prisma/driver-adapter-utils": "7.5.0-dev.14",
|
|
237
|
+
"@prisma/engines": "7.5.0-dev.14",
|
|
238
|
+
"@prisma/fetch-engine": "7.5.0-dev.14",
|
|
239
|
+
"@prisma/generator": "7.5.0-dev.14",
|
|
240
|
+
"@prisma/generator-helper": "7.5.0-dev.14",
|
|
241
|
+
"@prisma/get-platform": "7.5.0-dev.14",
|
|
242
|
+
"@prisma/instrumentation-contract": "7.5.0-dev.14",
|
|
243
|
+
"@prisma/instrumentation": "7.5.0-dev.14",
|
|
244
|
+
"@prisma/internals": "7.5.0-dev.14",
|
|
245
|
+
"@prisma/json-protocol": "7.5.0-dev.14",
|
|
246
|
+
"@prisma/param-graph": "7.5.0-dev.14",
|
|
247
|
+
"@prisma/migrate": "7.5.0-dev.14",
|
|
248
|
+
"@prisma/sqlcommenter": "7.5.0-dev.14",
|
|
249
|
+
"@prisma/query-plan-executor": "7.5.0-dev.14",
|
|
250
|
+
"@prisma/ts-builders": "7.5.0-dev.14",
|
|
251
|
+
"@prisma/sqlcommenter-trace-context": "7.5.0-dev.14",
|
|
252
|
+
"@prisma/param-graph-builder": "7.5.0-dev.14"
|
|
253
253
|
},
|
|
254
254
|
"dependencies": {
|
|
255
|
-
"@prisma/client-runtime-utils": "7.5.0-dev.
|
|
255
|
+
"@prisma/client-runtime-utils": "7.5.0-dev.14"
|
|
256
256
|
},
|
|
257
257
|
"peerDependencies": {
|
|
258
258
|
"prisma": "*",
|
package/runtime/client.d.mts
CHANGED
|
@@ -461,7 +461,7 @@ export declare function defineDmmfProperty(target: object, runtimeDataModel: Run
|
|
|
461
461
|
|
|
462
462
|
declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client;
|
|
463
463
|
|
|
464
|
-
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$
|
|
464
|
+
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$use", "$extends"];
|
|
465
465
|
|
|
466
466
|
declare type Deprecation = ReadonlyDeep_2<{
|
|
467
467
|
sinceVersion: string;
|
|
@@ -1260,7 +1260,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1260
1260
|
callback: (client: Client) => Promise<unknown>;
|
|
1261
1261
|
options?: Options;
|
|
1262
1262
|
}): Promise<unknown>;
|
|
1263
|
-
_createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client;
|
|
1263
|
+
_createItxClient(transaction: PrismaPromiseInteractiveTransaction, scopeId: string, scopeState: ItxScopeState): Client;
|
|
1264
1264
|
/**
|
|
1265
1265
|
* Execute queries within a transaction
|
|
1266
1266
|
* @param input a callback or a query list
|
|
@@ -1552,6 +1552,10 @@ export declare type ITXClientDenyList = (typeof denylist)[number];
|
|
|
1552
1552
|
|
|
1553
1553
|
export declare const itxClientDenyList: readonly (string | symbol)[];
|
|
1554
1554
|
|
|
1555
|
+
declare type ItxScopeState = {
|
|
1556
|
+
stack: string[];
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1555
1559
|
declare interface Job {
|
|
1556
1560
|
resolve: (data: any) => void;
|
|
1557
1561
|
reject: (data: any) => void;
|
|
@@ -1910,6 +1914,11 @@ declare type Options = {
|
|
|
1910
1914
|
timeout?: number;
|
|
1911
1915
|
/** Transaction isolation level */
|
|
1912
1916
|
isolationLevel?: IsolationLevel_2;
|
|
1917
|
+
/**
|
|
1918
|
+
* Used for nested interactive transactions. When provided, the engine may
|
|
1919
|
+
* re-use an existing open transaction instead of opening a new one.
|
|
1920
|
+
*/
|
|
1921
|
+
newTxId?: string;
|
|
1913
1922
|
};
|
|
1914
1923
|
|
|
1915
1924
|
export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
|
|
@@ -3147,6 +3156,18 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
|
3147
3156
|
* Roll back the transaction.
|
|
3148
3157
|
*/
|
|
3149
3158
|
rollback(): Promise<void>;
|
|
3159
|
+
/**
|
|
3160
|
+
* Creates a savepoint within the currently running transaction.
|
|
3161
|
+
*/
|
|
3162
|
+
createSavepoint?(name: string): Promise<void>;
|
|
3163
|
+
/**
|
|
3164
|
+
* Rolls back transaction state to a previously created savepoint.
|
|
3165
|
+
*/
|
|
3166
|
+
rollbackToSavepoint?(name: string): Promise<void>;
|
|
3167
|
+
/**
|
|
3168
|
+
* Releases a previously created savepoint. Optional because not every connector supports this operation.
|
|
3169
|
+
*/
|
|
3170
|
+
releaseSavepoint?(name: string): Promise<void>;
|
|
3150
3171
|
}
|
|
3151
3172
|
|
|
3152
3173
|
declare namespace Transaction_2 {
|
package/runtime/client.d.ts
CHANGED
|
@@ -461,7 +461,7 @@ export declare function defineDmmfProperty(target: object, runtimeDataModel: Run
|
|
|
461
461
|
|
|
462
462
|
declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client;
|
|
463
463
|
|
|
464
|
-
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$
|
|
464
|
+
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$use", "$extends"];
|
|
465
465
|
|
|
466
466
|
declare type Deprecation = ReadonlyDeep_2<{
|
|
467
467
|
sinceVersion: string;
|
|
@@ -1260,7 +1260,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1260
1260
|
callback: (client: Client) => Promise<unknown>;
|
|
1261
1261
|
options?: Options;
|
|
1262
1262
|
}): Promise<unknown>;
|
|
1263
|
-
_createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client;
|
|
1263
|
+
_createItxClient(transaction: PrismaPromiseInteractiveTransaction, scopeId: string, scopeState: ItxScopeState): Client;
|
|
1264
1264
|
/**
|
|
1265
1265
|
* Execute queries within a transaction
|
|
1266
1266
|
* @param input a callback or a query list
|
|
@@ -1552,6 +1552,10 @@ export declare type ITXClientDenyList = (typeof denylist)[number];
|
|
|
1552
1552
|
|
|
1553
1553
|
export declare const itxClientDenyList: readonly (string | symbol)[];
|
|
1554
1554
|
|
|
1555
|
+
declare type ItxScopeState = {
|
|
1556
|
+
stack: string[];
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1555
1559
|
declare interface Job {
|
|
1556
1560
|
resolve: (data: any) => void;
|
|
1557
1561
|
reject: (data: any) => void;
|
|
@@ -1910,6 +1914,11 @@ declare type Options = {
|
|
|
1910
1914
|
timeout?: number;
|
|
1911
1915
|
/** Transaction isolation level */
|
|
1912
1916
|
isolationLevel?: IsolationLevel_2;
|
|
1917
|
+
/**
|
|
1918
|
+
* Used for nested interactive transactions. When provided, the engine may
|
|
1919
|
+
* re-use an existing open transaction instead of opening a new one.
|
|
1920
|
+
*/
|
|
1921
|
+
newTxId?: string;
|
|
1913
1922
|
};
|
|
1914
1923
|
|
|
1915
1924
|
export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
|
|
@@ -3147,6 +3156,18 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
|
3147
3156
|
* Roll back the transaction.
|
|
3148
3157
|
*/
|
|
3149
3158
|
rollback(): Promise<void>;
|
|
3159
|
+
/**
|
|
3160
|
+
* Creates a savepoint within the currently running transaction.
|
|
3161
|
+
*/
|
|
3162
|
+
createSavepoint?(name: string): Promise<void>;
|
|
3163
|
+
/**
|
|
3164
|
+
* Rolls back transaction state to a previously created savepoint.
|
|
3165
|
+
*/
|
|
3166
|
+
rollbackToSavepoint?(name: string): Promise<void>;
|
|
3167
|
+
/**
|
|
3168
|
+
* Releases a previously created savepoint. Optional because not every connector supports this operation.
|
|
3169
|
+
*/
|
|
3170
|
+
releaseSavepoint?(name: string): Promise<void>;
|
|
3150
3171
|
}
|
|
3151
3172
|
|
|
3152
3173
|
declare namespace Transaction_2 {
|