@prisma/query-plan-executor 7.5.0-dev.3 → 7.5.0-dev.30
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.d.ts +27 -6
- package/dist/index.js +272 -73
- package/package.json +6 -7
package/dist/index.d.ts
CHANGED
|
@@ -668,6 +668,7 @@ json: {
|
|
|
668
668
|
timeout?: number | undefined;
|
|
669
669
|
maxWait?: number | undefined;
|
|
670
670
|
isolationLevel?: "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SNAPSHOT" | "SERIALIZABLE" | undefined;
|
|
671
|
+
newTxId?: string | undefined;
|
|
671
672
|
};
|
|
672
673
|
};
|
|
673
674
|
output: {
|
|
@@ -844,6 +845,10 @@ declare interface ExecutionContext {
|
|
|
844
845
|
* For compatibility with Wrangler 4.x.
|
|
845
846
|
*/
|
|
846
847
|
props: any;
|
|
848
|
+
/**
|
|
849
|
+
* For compatibility with Wrangler 4.x.
|
|
850
|
+
*/
|
|
851
|
+
exports?: any;
|
|
847
852
|
}
|
|
848
853
|
|
|
849
854
|
/**
|
|
@@ -955,6 +960,9 @@ declare type Fragment = {
|
|
|
955
960
|
type: 'parameter';
|
|
956
961
|
} | {
|
|
957
962
|
type: 'parameterTuple';
|
|
963
|
+
itemPrefix: string;
|
|
964
|
+
itemSeparator: string;
|
|
965
|
+
itemSuffix: string;
|
|
958
966
|
} | {
|
|
959
967
|
type: 'parameterTupleList';
|
|
960
968
|
itemPrefix: string;
|
|
@@ -3248,6 +3256,18 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
|
3248
3256
|
* Roll back the transaction.
|
|
3249
3257
|
*/
|
|
3250
3258
|
rollback(): Promise<void>;
|
|
3259
|
+
/**
|
|
3260
|
+
* Creates a savepoint within the currently running transaction.
|
|
3261
|
+
*/
|
|
3262
|
+
createSavepoint?(name: string): Promise<void>;
|
|
3263
|
+
/**
|
|
3264
|
+
* Rolls back transaction state to a previously created savepoint.
|
|
3265
|
+
*/
|
|
3266
|
+
rollbackToSavepoint?(name: string): Promise<void>;
|
|
3267
|
+
/**
|
|
3268
|
+
* Releases a previously created savepoint. Optional because not every connector supports this operation.
|
|
3269
|
+
*/
|
|
3270
|
+
releaseSavepoint?(name: string): Promise<void>;
|
|
3251
3271
|
}
|
|
3252
3272
|
|
|
3253
3273
|
declare type TransactionInfo = {
|
|
@@ -3289,6 +3309,7 @@ declare type TransactionOptions_2 = {
|
|
|
3289
3309
|
maxWait?: number;
|
|
3290
3310
|
timeout?: number;
|
|
3291
3311
|
isolationLevel?: IsolationLevel;
|
|
3312
|
+
newTxId?: string;
|
|
3292
3313
|
};
|
|
3293
3314
|
|
|
3294
3315
|
declare type TypedResponse<T = unknown, U extends StatusCode = StatusCode, F extends ResponseFormat = T extends string ? 'text' : T extends JSONValue ? 'json' : ResponseFormat> = {
|
|
@@ -3312,14 +3333,14 @@ declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) e
|
|
|
3312
3333
|
declare type UnofficialStatusCode = -1;
|
|
3313
3334
|
|
|
3314
3335
|
declare type ValidationError = {
|
|
3315
|
-
|
|
3336
|
+
errorIdentifier: 'RELATION_VIOLATION';
|
|
3316
3337
|
context: {
|
|
3317
3338
|
relation: string;
|
|
3318
3339
|
modelA: string;
|
|
3319
3340
|
modelB: string;
|
|
3320
3341
|
};
|
|
3321
3342
|
} | {
|
|
3322
|
-
|
|
3343
|
+
errorIdentifier: 'MISSING_RELATED_RECORD';
|
|
3323
3344
|
context: {
|
|
3324
3345
|
model: string;
|
|
3325
3346
|
relation: string;
|
|
@@ -3328,24 +3349,24 @@ declare type ValidationError = {
|
|
|
3328
3349
|
neededFor?: string;
|
|
3329
3350
|
};
|
|
3330
3351
|
} | {
|
|
3331
|
-
|
|
3352
|
+
errorIdentifier: 'MISSING_RECORD';
|
|
3332
3353
|
context: {
|
|
3333
3354
|
operation: string;
|
|
3334
3355
|
};
|
|
3335
3356
|
} | {
|
|
3336
|
-
|
|
3357
|
+
errorIdentifier: 'INCOMPLETE_CONNECT_INPUT';
|
|
3337
3358
|
context: {
|
|
3338
3359
|
expectedRows: number;
|
|
3339
3360
|
};
|
|
3340
3361
|
} | {
|
|
3341
|
-
|
|
3362
|
+
errorIdentifier: 'INCOMPLETE_CONNECT_OUTPUT';
|
|
3342
3363
|
context: {
|
|
3343
3364
|
expectedRows: number;
|
|
3344
3365
|
relation: string;
|
|
3345
3366
|
relationType: string;
|
|
3346
3367
|
};
|
|
3347
3368
|
} | {
|
|
3348
|
-
|
|
3369
|
+
errorIdentifier: 'RECORDS_NOT_CONNECTED';
|
|
3349
3370
|
context: {
|
|
3350
3371
|
relation: string;
|
|
3351
3372
|
parent: string;
|
package/dist/index.js
CHANGED
|
@@ -101325,7 +101325,7 @@ __export(index_exports, {
|
|
|
101325
101325
|
module.exports = __toCommonJS(index_exports);
|
|
101326
101326
|
|
|
101327
101327
|
// package.json
|
|
101328
|
-
var version = "7.5.0-dev.
|
|
101328
|
+
var version = "7.5.0-dev.30";
|
|
101329
101329
|
|
|
101330
101330
|
// ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
|
|
101331
101331
|
function clampProp(e2, n2, t2, o2, r2) {
|
|
@@ -106189,7 +106189,7 @@ function createConsoleLogger(logFormat, logLevel) {
|
|
|
106189
106189
|
return new Logger(sink);
|
|
106190
106190
|
}
|
|
106191
106191
|
|
|
106192
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
106192
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/utils/url.js
|
|
106193
106193
|
var splitPath = (path3) => {
|
|
106194
106194
|
const paths = path3.split("/");
|
|
106195
106195
|
if (paths[0] === "") {
|
|
@@ -106264,9 +106264,11 @@ var getPath = (request3) => {
|
|
|
106264
106264
|
const charCode = url2.charCodeAt(i2);
|
|
106265
106265
|
if (charCode === 37) {
|
|
106266
106266
|
const queryIndex = url2.indexOf("?", i2);
|
|
106267
|
-
const
|
|
106267
|
+
const hashIndex = url2.indexOf("#", i2);
|
|
106268
|
+
const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
|
|
106269
|
+
const path3 = url2.slice(start, end);
|
|
106268
106270
|
return tryDecodeURI(path3.includes("%25") ? path3.replace(/%25/g, "%2525") : path3);
|
|
106269
|
-
} else if (charCode === 63) {
|
|
106271
|
+
} else if (charCode === 63 || charCode === 35) {
|
|
106270
106272
|
break;
|
|
106271
106273
|
}
|
|
106272
106274
|
}
|
|
@@ -106391,7 +106393,7 @@ var getQueryParams = (url2, key) => {
|
|
|
106391
106393
|
};
|
|
106392
106394
|
var decodeURIComponent_ = decodeURIComponent;
|
|
106393
106395
|
|
|
106394
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
106396
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/utils/cookie.js
|
|
106395
106397
|
var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/;
|
|
106396
106398
|
var validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/;
|
|
106397
106399
|
var parse = (cookie, name6) => {
|
|
@@ -106424,7 +106426,7 @@ var parse = (cookie, name6) => {
|
|
|
106424
106426
|
return parsedCookie;
|
|
106425
106427
|
};
|
|
106426
106428
|
|
|
106427
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
106429
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/helper/cookie/index.js
|
|
106428
106430
|
var getCookie = (c2, key, prefix) => {
|
|
106429
106431
|
const cookie = c2.req.raw.headers.get("Cookie");
|
|
106430
106432
|
if (typeof key === "string") {
|
|
@@ -106447,7 +106449,7 @@ var getCookie = (c2, key, prefix) => {
|
|
|
106447
106449
|
return obj;
|
|
106448
106450
|
};
|
|
106449
106451
|
|
|
106450
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
106452
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/http-exception.js
|
|
106451
106453
|
var HTTPException = class extends Error {
|
|
106452
106454
|
res;
|
|
106453
106455
|
status;
|
|
@@ -106480,7 +106482,7 @@ var HTTPException = class extends Error {
|
|
|
106480
106482
|
}
|
|
106481
106483
|
};
|
|
106482
106484
|
|
|
106483
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
106485
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/utils/buffer.js
|
|
106484
106486
|
var bufferToFormData = (arrayBuffer, contentType) => {
|
|
106485
106487
|
const response = new Response(arrayBuffer, {
|
|
106486
106488
|
headers: {
|
|
@@ -106490,7 +106492,7 @@ var bufferToFormData = (arrayBuffer, contentType) => {
|
|
|
106490
106492
|
return response.formData();
|
|
106491
106493
|
};
|
|
106492
106494
|
|
|
106493
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
106495
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/validator/validator.js
|
|
106494
106496
|
var jsonRegex = /^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/;
|
|
106495
106497
|
var multipartRegex = /^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/;
|
|
106496
106498
|
var urlencodedRegex = /^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/;
|
|
@@ -106571,7 +106573,7 @@ var validator = (target, validationFunc) => {
|
|
|
106571
106573
|
};
|
|
106572
106574
|
};
|
|
106573
106575
|
|
|
106574
|
-
// ../../node_modules/.pnpm/@hono+zod-validator@0.7.2_hono@4.
|
|
106576
|
+
// ../../node_modules/.pnpm/@hono+zod-validator@0.7.2_hono@4.12.0_zod@4.1.3/node_modules/@hono/zod-validator/dist/index.js
|
|
106575
106577
|
var zValidator = (target, schema, hook, options) => (
|
|
106576
106578
|
// @ts-expect-error not typed well
|
|
106577
106579
|
validator(target, async (value, c2) => {
|
|
@@ -109757,7 +109759,10 @@ function normalizeJsonProtocolValues(result) {
|
|
|
109757
109759
|
function isTaggedValue(value) {
|
|
109758
109760
|
return value !== null && typeof value == "object" && typeof value["$type"] === "string";
|
|
109759
109761
|
}
|
|
109760
|
-
function normalizeTaggedValue({
|
|
109762
|
+
function normalizeTaggedValue({
|
|
109763
|
+
$type,
|
|
109764
|
+
value
|
|
109765
|
+
}) {
|
|
109761
109766
|
switch ($type) {
|
|
109762
109767
|
case "BigInt":
|
|
109763
109768
|
return { $type, value: String(value) };
|
|
@@ -109769,6 +109774,12 @@ function normalizeTaggedValue({ $type, value }) {
|
|
|
109769
109774
|
return { $type, value: String(new Decimal(value)) };
|
|
109770
109775
|
case "Json":
|
|
109771
109776
|
return { $type, value: JSON.stringify(JSON.parse(value)) };
|
|
109777
|
+
case "Raw":
|
|
109778
|
+
return { $type, value };
|
|
109779
|
+
case "FieldRef":
|
|
109780
|
+
return { $type, value };
|
|
109781
|
+
case "Enum":
|
|
109782
|
+
return { $type, value };
|
|
109772
109783
|
default:
|
|
109773
109784
|
assertNever(value, "Unknown tagged value");
|
|
109774
109785
|
}
|
|
@@ -110579,7 +110590,10 @@ function renderFragment(fragment, placeholderFormat, ctx) {
|
|
|
110579
110590
|
case "stringChunk":
|
|
110580
110591
|
return fragment.chunk;
|
|
110581
110592
|
case "parameterTuple": {
|
|
110582
|
-
const placeholders = fragment.value.length == 0 ? "NULL" : fragment.value.map(() =>
|
|
110593
|
+
const placeholders = fragment.value.length == 0 ? "NULL" : fragment.value.map(() => {
|
|
110594
|
+
const item = formatPlaceholder(placeholderFormat, ctx.placeholderNumber++);
|
|
110595
|
+
return `${fragment.itemPrefix}${item}${fragment.itemSuffix}`;
|
|
110596
|
+
}).join(fragment.itemSeparator);
|
|
110583
110597
|
return `(${placeholders})`;
|
|
110584
110598
|
}
|
|
110585
110599
|
case "parameterTupleList": {
|
|
@@ -110933,7 +110947,7 @@ function doesSatisfyRule(data, rule) {
|
|
|
110933
110947
|
}
|
|
110934
110948
|
}
|
|
110935
110949
|
function renderMessage(data, error44) {
|
|
110936
|
-
switch (error44.
|
|
110950
|
+
switch (error44.errorIdentifier) {
|
|
110937
110951
|
case "RELATION_VIOLATION":
|
|
110938
110952
|
return `The change you are trying to make would violate the required relation '${error44.context.relation}' between the \`${error44.context.modelA}\` and \`${error44.context.modelB}\` models.`;
|
|
110939
110953
|
case "MISSING_RECORD":
|
|
@@ -110953,7 +110967,7 @@ function renderMessage(data, error44) {
|
|
|
110953
110967
|
}
|
|
110954
110968
|
}
|
|
110955
110969
|
function getErrorCode2(error44) {
|
|
110956
|
-
switch (error44.
|
|
110970
|
+
switch (error44.errorIdentifier) {
|
|
110957
110971
|
case "RELATION_VIOLATION":
|
|
110958
110972
|
return "P2014";
|
|
110959
110973
|
case "RECORDS_NOT_CONNECTED":
|
|
@@ -111483,13 +111497,42 @@ var TransactionManager = class {
|
|
|
111483
111497
|
);
|
|
111484
111498
|
}
|
|
111485
111499
|
async #startTransactionImpl(options) {
|
|
111500
|
+
if (options.newTxId) {
|
|
111501
|
+
return await this.#withActiveTransactionLock(options.newTxId, "start", async (existing) => {
|
|
111502
|
+
if (existing.status !== "running") {
|
|
111503
|
+
throw new TransactionInternalConsistencyError(
|
|
111504
|
+
`Transaction in invalid state ${existing.status} when starting a nested transaction.`
|
|
111505
|
+
);
|
|
111506
|
+
}
|
|
111507
|
+
if (!existing.transaction) {
|
|
111508
|
+
throw new TransactionInternalConsistencyError(
|
|
111509
|
+
`Transaction missing underlying driver transaction when starting a nested transaction.`
|
|
111510
|
+
);
|
|
111511
|
+
}
|
|
111512
|
+
existing.depth += 1;
|
|
111513
|
+
const savepointName = this.#nextSavepointName(existing);
|
|
111514
|
+
existing.savepoints.push(savepointName);
|
|
111515
|
+
try {
|
|
111516
|
+
await this.#requiredCreateSavepoint(existing.transaction)(savepointName);
|
|
111517
|
+
} catch (e2) {
|
|
111518
|
+
existing.depth -= 1;
|
|
111519
|
+
existing.savepoints.pop();
|
|
111520
|
+
throw e2;
|
|
111521
|
+
}
|
|
111522
|
+
return { id: existing.id };
|
|
111523
|
+
});
|
|
111524
|
+
}
|
|
111486
111525
|
const transaction = {
|
|
111487
111526
|
id: await randomUUID2(),
|
|
111488
111527
|
status: "waiting",
|
|
111489
111528
|
timer: void 0,
|
|
111490
111529
|
timeout: options.timeout,
|
|
111491
111530
|
startedAt: Date.now(),
|
|
111492
|
-
transaction: void 0
|
|
111531
|
+
transaction: void 0,
|
|
111532
|
+
operationQueue: Promise.resolve(),
|
|
111533
|
+
depth: 1,
|
|
111534
|
+
savepoints: [],
|
|
111535
|
+
savepointCounter: 0
|
|
111493
111536
|
};
|
|
111494
111537
|
const abortController = new AbortController();
|
|
111495
111538
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
@@ -111523,14 +111566,49 @@ var TransactionManager = class {
|
|
|
111523
111566
|
}
|
|
111524
111567
|
async commitTransaction(transactionId) {
|
|
111525
111568
|
return await this.tracingHelper.runInChildSpan("commit_transaction", async () => {
|
|
111526
|
-
|
|
111527
|
-
|
|
111569
|
+
await this.#withActiveTransactionLock(transactionId, "commit", async (txw) => {
|
|
111570
|
+
if (txw.depth > 1) {
|
|
111571
|
+
if (!txw.transaction) throw new TransactionNotFoundError();
|
|
111572
|
+
const savepointName = txw.savepoints.at(-1);
|
|
111573
|
+
if (!savepointName) {
|
|
111574
|
+
throw new TransactionInternalConsistencyError(
|
|
111575
|
+
`Missing savepoint for nested commit. Depth: ${txw.depth}, transactionId: ${txw.id}`
|
|
111576
|
+
);
|
|
111577
|
+
}
|
|
111578
|
+
try {
|
|
111579
|
+
await this.#releaseSavepoint(txw.transaction, savepointName);
|
|
111580
|
+
} finally {
|
|
111581
|
+
txw.savepoints.pop();
|
|
111582
|
+
txw.depth -= 1;
|
|
111583
|
+
}
|
|
111584
|
+
return;
|
|
111585
|
+
}
|
|
111586
|
+
await this.#closeTransaction(txw, "committed");
|
|
111587
|
+
});
|
|
111528
111588
|
});
|
|
111529
111589
|
}
|
|
111530
111590
|
async rollbackTransaction(transactionId) {
|
|
111531
111591
|
return await this.tracingHelper.runInChildSpan("rollback_transaction", async () => {
|
|
111532
|
-
|
|
111533
|
-
|
|
111592
|
+
await this.#withActiveTransactionLock(transactionId, "rollback", async (txw) => {
|
|
111593
|
+
if (txw.depth > 1) {
|
|
111594
|
+
if (!txw.transaction) throw new TransactionNotFoundError();
|
|
111595
|
+
const savepointName = txw.savepoints.at(-1);
|
|
111596
|
+
if (!savepointName) {
|
|
111597
|
+
throw new TransactionInternalConsistencyError(
|
|
111598
|
+
`Missing savepoint for nested rollback. Depth: ${txw.depth}, transactionId: ${txw.id}`
|
|
111599
|
+
);
|
|
111600
|
+
}
|
|
111601
|
+
try {
|
|
111602
|
+
await this.#requiredRollbackToSavepoint(txw.transaction)(savepointName);
|
|
111603
|
+
await this.#releaseSavepoint(txw.transaction, savepointName);
|
|
111604
|
+
} finally {
|
|
111605
|
+
txw.savepoints.pop();
|
|
111606
|
+
txw.depth -= 1;
|
|
111607
|
+
}
|
|
111608
|
+
return;
|
|
111609
|
+
}
|
|
111610
|
+
await this.#closeTransaction(txw, "rolled_back");
|
|
111611
|
+
});
|
|
111534
111612
|
});
|
|
111535
111613
|
}
|
|
111536
111614
|
async getTransaction(txInfo, operation) {
|
|
@@ -111574,22 +111652,90 @@ var TransactionManager = class {
|
|
|
111574
111652
|
return transaction;
|
|
111575
111653
|
}
|
|
111576
111654
|
async cancelAllTransactions() {
|
|
111577
|
-
await Promise.allSettled(
|
|
111655
|
+
await Promise.allSettled(
|
|
111656
|
+
[...this.transactions.values()].map(
|
|
111657
|
+
(tx) => this.#runSerialized(tx, async () => {
|
|
111658
|
+
const current = this.transactions.get(tx.id);
|
|
111659
|
+
if (current) {
|
|
111660
|
+
await this.#closeTransaction(current, "rolled_back");
|
|
111661
|
+
}
|
|
111662
|
+
})
|
|
111663
|
+
)
|
|
111664
|
+
);
|
|
111665
|
+
}
|
|
111666
|
+
#nextSavepointName(transaction) {
|
|
111667
|
+
return `prisma_sp_${transaction.savepointCounter++}`;
|
|
111668
|
+
}
|
|
111669
|
+
#requiredCreateSavepoint(transaction) {
|
|
111670
|
+
if (transaction.createSavepoint) {
|
|
111671
|
+
return transaction.createSavepoint.bind(transaction);
|
|
111672
|
+
}
|
|
111673
|
+
throw new TransactionManagerError(
|
|
111674
|
+
`Nested transactions are not supported by adapter "${transaction.adapterName}" (${transaction.provider}): createSavepoint is not implemented.`
|
|
111675
|
+
);
|
|
111676
|
+
}
|
|
111677
|
+
#requiredRollbackToSavepoint(transaction) {
|
|
111678
|
+
if (transaction.rollbackToSavepoint) {
|
|
111679
|
+
return transaction.rollbackToSavepoint.bind(transaction);
|
|
111680
|
+
}
|
|
111681
|
+
throw new TransactionManagerError(
|
|
111682
|
+
`Nested transactions are not supported by adapter "${transaction.adapterName}" (${transaction.provider}): rollbackToSavepoint is not implemented.`
|
|
111683
|
+
);
|
|
111684
|
+
}
|
|
111685
|
+
async #releaseSavepoint(transaction, name6) {
|
|
111686
|
+
if (transaction.releaseSavepoint) {
|
|
111687
|
+
await transaction.releaseSavepoint(name6);
|
|
111688
|
+
}
|
|
111689
|
+
}
|
|
111690
|
+
#debugTransactionAlreadyClosedOnTimeout(transactionId) {
|
|
111691
|
+
debug3("Transaction already committed or rolled back when timeout happened.", transactionId);
|
|
111578
111692
|
}
|
|
111579
111693
|
#startTransactionTimeout(transactionId, timeout) {
|
|
111580
111694
|
const timeoutStartedAt = Date.now();
|
|
111581
111695
|
const timer = createTimeoutIfDefined(async () => {
|
|
111582
111696
|
debug3("Transaction timed out.", { transactionId, timeoutStartedAt, timeout });
|
|
111583
111697
|
const tx = this.transactions.get(transactionId);
|
|
111584
|
-
if (tx
|
|
111585
|
-
|
|
111586
|
-
|
|
111587
|
-
debug3("Transaction already committed or rolled back when timeout happened.", transactionId);
|
|
111698
|
+
if (!tx) {
|
|
111699
|
+
this.#debugTransactionAlreadyClosedOnTimeout(transactionId);
|
|
111700
|
+
return;
|
|
111588
111701
|
}
|
|
111702
|
+
await this.#runSerialized(tx, async () => {
|
|
111703
|
+
const current = this.transactions.get(transactionId);
|
|
111704
|
+
if (current && ["running", "waiting"].includes(current.status)) {
|
|
111705
|
+
await this.#closeTransaction(current, "timed_out");
|
|
111706
|
+
} else {
|
|
111707
|
+
this.#debugTransactionAlreadyClosedOnTimeout(transactionId);
|
|
111708
|
+
}
|
|
111709
|
+
});
|
|
111589
111710
|
}, timeout);
|
|
111590
111711
|
timer?.unref?.();
|
|
111591
111712
|
return timer;
|
|
111592
111713
|
}
|
|
111714
|
+
// Any operation that mutates or closes a transaction must run through this lock so
|
|
111715
|
+
// status/savepoint/depth checks and updates happen against a stable view of state.
|
|
111716
|
+
async #withActiveTransactionLock(transactionId, operation, callback) {
|
|
111717
|
+
const tx = this.#getActiveOrClosingTransaction(transactionId, operation);
|
|
111718
|
+
return await this.#runSerialized(tx, async () => {
|
|
111719
|
+
const current = this.#getActiveOrClosingTransaction(transactionId, operation);
|
|
111720
|
+
return await callback(current);
|
|
111721
|
+
});
|
|
111722
|
+
}
|
|
111723
|
+
// Serializes operations per transaction id to prevent interleaving across awaits.
|
|
111724
|
+
// This avoids races where one operation mutates savepoint/depth state while another
|
|
111725
|
+
// operation is suspended, which could otherwise corrupt cleanup logic.
|
|
111726
|
+
async #runSerialized(tx, callback) {
|
|
111727
|
+
const previousOperation = tx.operationQueue;
|
|
111728
|
+
let releaseOperationLock;
|
|
111729
|
+
tx.operationQueue = new Promise((resolve) => {
|
|
111730
|
+
releaseOperationLock = resolve;
|
|
111731
|
+
});
|
|
111732
|
+
await previousOperation;
|
|
111733
|
+
try {
|
|
111734
|
+
return await callback();
|
|
111735
|
+
} finally {
|
|
111736
|
+
releaseOperationLock();
|
|
111737
|
+
}
|
|
111738
|
+
}
|
|
111593
111739
|
async #closeTransaction(tx, status) {
|
|
111594
111740
|
const createClosingPromise = async () => {
|
|
111595
111741
|
debug3("Closing transaction.", { transactionId: tx.id, status });
|
|
@@ -111669,7 +111815,7 @@ function createTimeoutIfDefined(cb, ms) {
|
|
|
111669
111815
|
return ms !== void 0 ? setTimeout(cb, ms) : void 0;
|
|
111670
111816
|
}
|
|
111671
111817
|
|
|
111672
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
111818
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/compose.js
|
|
111673
111819
|
var compose = (middleware, onError, onNotFound) => {
|
|
111674
111820
|
return (context2, next) => {
|
|
111675
111821
|
let index = -1;
|
|
@@ -111713,10 +111859,10 @@ var compose = (middleware, onError, onNotFound) => {
|
|
|
111713
111859
|
};
|
|
111714
111860
|
};
|
|
111715
111861
|
|
|
111716
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
111862
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/request/constants.js
|
|
111717
111863
|
var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
|
|
111718
111864
|
|
|
111719
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
111865
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/utils/body.js
|
|
111720
111866
|
var parseBody = async (request3, options = /* @__PURE__ */ Object.create(null)) => {
|
|
111721
111867
|
const { all = false, dot = false } = options;
|
|
111722
111868
|
const headers = request3 instanceof HonoRequest ? request3.raw.headers : request3.headers;
|
|
@@ -111785,7 +111931,7 @@ var handleParsingNestedValues = (form, key, value) => {
|
|
|
111785
111931
|
});
|
|
111786
111932
|
};
|
|
111787
111933
|
|
|
111788
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
111934
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/request.js
|
|
111789
111935
|
var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
|
|
111790
111936
|
var HonoRequest = class {
|
|
111791
111937
|
/**
|
|
@@ -112053,7 +112199,7 @@ var HonoRequest = class {
|
|
|
112053
112199
|
}
|
|
112054
112200
|
};
|
|
112055
112201
|
|
|
112056
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
112202
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/utils/html.js
|
|
112057
112203
|
var HtmlEscapedCallbackPhase = {
|
|
112058
112204
|
Stringify: 1,
|
|
112059
112205
|
BeforeStream: 2,
|
|
@@ -112095,7 +112241,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context2, buffer) =>
|
|
|
112095
112241
|
}
|
|
112096
112242
|
};
|
|
112097
112243
|
|
|
112098
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
112244
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/context.js
|
|
112099
112245
|
var TEXT_PLAIN = "text/plain; charset=UTF-8";
|
|
112100
112246
|
var setDefaultContentType = (contentType, headers) => {
|
|
112101
112247
|
return {
|
|
@@ -112103,6 +112249,7 @@ var setDefaultContentType = (contentType, headers) => {
|
|
|
112103
112249
|
...headers
|
|
112104
112250
|
};
|
|
112105
112251
|
};
|
|
112252
|
+
var createResponseInstance = (body, init3) => new Response(body, init3);
|
|
112106
112253
|
var Context = class {
|
|
112107
112254
|
#rawRequest;
|
|
112108
112255
|
#req;
|
|
@@ -112201,7 +112348,7 @@ var Context = class {
|
|
|
112201
112348
|
* The Response object for the current request.
|
|
112202
112349
|
*/
|
|
112203
112350
|
get res() {
|
|
112204
|
-
return this.#res ||=
|
|
112351
|
+
return this.#res ||= createResponseInstance(null, {
|
|
112205
112352
|
headers: this.#preparedHeaders ??= new Headers()
|
|
112206
112353
|
});
|
|
112207
112354
|
}
|
|
@@ -112212,7 +112359,7 @@ var Context = class {
|
|
|
112212
112359
|
*/
|
|
112213
112360
|
set res(_res) {
|
|
112214
112361
|
if (this.#res && _res) {
|
|
112215
|
-
_res =
|
|
112362
|
+
_res = createResponseInstance(_res.body, _res);
|
|
112216
112363
|
for (const [k2, v2] of this.#res.headers.entries()) {
|
|
112217
112364
|
if (k2 === "content-type") {
|
|
112218
112365
|
continue;
|
|
@@ -112302,7 +112449,7 @@ var Context = class {
|
|
|
112302
112449
|
*/
|
|
112303
112450
|
header = (name6, value, options) => {
|
|
112304
112451
|
if (this.finalized) {
|
|
112305
|
-
this.#res =
|
|
112452
|
+
this.#res = createResponseInstance(this.#res.body, this.#res);
|
|
112306
112453
|
}
|
|
112307
112454
|
const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();
|
|
112308
112455
|
if (value === void 0) {
|
|
@@ -112391,7 +112538,7 @@ var Context = class {
|
|
|
112391
112538
|
}
|
|
112392
112539
|
}
|
|
112393
112540
|
const status = typeof arg === "number" ? arg : arg?.status ?? this.#status;
|
|
112394
|
-
return
|
|
112541
|
+
return createResponseInstance(data, { status, headers: responseHeaders });
|
|
112395
112542
|
}
|
|
112396
112543
|
newResponse = (...args) => this.#newResponse(...args);
|
|
112397
112544
|
/**
|
|
@@ -112416,6 +112563,9 @@ var Context = class {
|
|
|
112416
112563
|
* ```
|
|
112417
112564
|
*/
|
|
112418
112565
|
body = (data, arg, headers) => this.#newResponse(data, arg, headers);
|
|
112566
|
+
#useFastPath() {
|
|
112567
|
+
return !this.#preparedHeaders && !this.#status && !this.finalized;
|
|
112568
|
+
}
|
|
112419
112569
|
/**
|
|
112420
112570
|
* `.text()` can render text as `Content-Type:text/plain`.
|
|
112421
112571
|
*
|
|
@@ -112429,7 +112579,7 @@ var Context = class {
|
|
|
112429
112579
|
* ```
|
|
112430
112580
|
*/
|
|
112431
112581
|
text = (text, arg, headers) => {
|
|
112432
|
-
return
|
|
112582
|
+
return this.#useFastPath() && !arg && !headers ? createResponseInstance(text) : this.#newResponse(
|
|
112433
112583
|
text,
|
|
112434
112584
|
arg,
|
|
112435
112585
|
setDefaultContentType(TEXT_PLAIN, headers)
|
|
@@ -112448,7 +112598,7 @@ var Context = class {
|
|
|
112448
112598
|
* ```
|
|
112449
112599
|
*/
|
|
112450
112600
|
json = (object2, arg, headers) => {
|
|
112451
|
-
return this.#newResponse(
|
|
112601
|
+
return this.#useFastPath() && !arg && !headers ? Response.json(object2) : this.#newResponse(
|
|
112452
112602
|
JSON.stringify(object2),
|
|
112453
112603
|
arg,
|
|
112454
112604
|
setDefaultContentType("application/json", headers)
|
|
@@ -112496,12 +112646,12 @@ var Context = class {
|
|
|
112496
112646
|
* ```
|
|
112497
112647
|
*/
|
|
112498
112648
|
notFound = () => {
|
|
112499
|
-
this.#notFoundHandler ??= () =>
|
|
112649
|
+
this.#notFoundHandler ??= () => createResponseInstance();
|
|
112500
112650
|
return this.#notFoundHandler(this);
|
|
112501
112651
|
};
|
|
112502
112652
|
};
|
|
112503
112653
|
|
|
112504
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
112654
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router.js
|
|
112505
112655
|
var METHOD_NAME_ALL = "ALL";
|
|
112506
112656
|
var METHOD_NAME_ALL_LOWERCASE = "all";
|
|
112507
112657
|
var METHODS = ["get", "post", "put", "delete", "options", "patch"];
|
|
@@ -112509,10 +112659,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
|
|
|
112509
112659
|
var UnsupportedPathError = class extends Error {
|
|
112510
112660
|
};
|
|
112511
112661
|
|
|
112512
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
112662
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/utils/constants.js
|
|
112513
112663
|
var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
|
|
112514
112664
|
|
|
112515
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
112665
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/hono-base.js
|
|
112516
112666
|
var notFoundHandler = (c2) => {
|
|
112517
112667
|
return c2.text("404 Not Found", 404);
|
|
112518
112668
|
};
|
|
@@ -112883,7 +113033,7 @@ var Hono = class _Hono {
|
|
|
112883
113033
|
};
|
|
112884
113034
|
};
|
|
112885
113035
|
|
|
112886
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113036
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/reg-exp-router/matcher.js
|
|
112887
113037
|
var emptyParam = [];
|
|
112888
113038
|
function match(method, path3) {
|
|
112889
113039
|
const matchers = this.buildAllMatchers();
|
|
@@ -112904,7 +113054,7 @@ function match(method, path3) {
|
|
|
112904
113054
|
return match2(method, path3);
|
|
112905
113055
|
}
|
|
112906
113056
|
|
|
112907
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113057
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/reg-exp-router/node.js
|
|
112908
113058
|
var LABEL_REG_EXP_STR = "[^/]+";
|
|
112909
113059
|
var ONLY_WILDCARD_REG_EXP_STR = ".*";
|
|
112910
113060
|
var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
|
|
@@ -113012,7 +113162,7 @@ var Node = class _Node {
|
|
|
113012
113162
|
}
|
|
113013
113163
|
};
|
|
113014
113164
|
|
|
113015
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113165
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/reg-exp-router/trie.js
|
|
113016
113166
|
var Trie = class {
|
|
113017
113167
|
#context = { varIndex: 0 };
|
|
113018
113168
|
#root = new Node();
|
|
@@ -113068,7 +113218,7 @@ var Trie = class {
|
|
|
113068
113218
|
}
|
|
113069
113219
|
};
|
|
113070
113220
|
|
|
113071
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113221
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/reg-exp-router/router.js
|
|
113072
113222
|
var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
|
|
113073
113223
|
var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
|
|
113074
113224
|
function buildWildcardRegExp(path3) {
|
|
@@ -113247,7 +113397,7 @@ var RegExpRouter = class {
|
|
|
113247
113397
|
}
|
|
113248
113398
|
};
|
|
113249
113399
|
|
|
113250
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113400
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/smart-router/router.js
|
|
113251
113401
|
var SmartRouter = class {
|
|
113252
113402
|
name = "SmartRouter";
|
|
113253
113403
|
#routers = [];
|
|
@@ -113302,8 +113452,14 @@ var SmartRouter = class {
|
|
|
113302
113452
|
}
|
|
113303
113453
|
};
|
|
113304
113454
|
|
|
113305
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113455
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/trie-router/node.js
|
|
113306
113456
|
var emptyParams = /* @__PURE__ */ Object.create(null);
|
|
113457
|
+
var hasChildren = (children) => {
|
|
113458
|
+
for (const _3 in children) {
|
|
113459
|
+
return true;
|
|
113460
|
+
}
|
|
113461
|
+
return false;
|
|
113462
|
+
};
|
|
113307
113463
|
var Node2 = class _Node2 {
|
|
113308
113464
|
#methods;
|
|
113309
113465
|
#children;
|
|
@@ -113353,8 +113509,7 @@ var Node2 = class _Node2 {
|
|
|
113353
113509
|
});
|
|
113354
113510
|
return curNode;
|
|
113355
113511
|
}
|
|
113356
|
-
#
|
|
113357
|
-
const handlerSets = [];
|
|
113512
|
+
#pushHandlerSets(handlerSets, node, method, nodeParams, params) {
|
|
113358
113513
|
for (let i2 = 0, len = node.#methods.length; i2 < len; i2++) {
|
|
113359
113514
|
const m2 = node.#methods[i2];
|
|
113360
113515
|
const handlerSet = m2[method] || m2[METHOD_NAME_ALL];
|
|
@@ -113372,7 +113527,6 @@ var Node2 = class _Node2 {
|
|
|
113372
113527
|
}
|
|
113373
113528
|
}
|
|
113374
113529
|
}
|
|
113375
|
-
return handlerSets;
|
|
113376
113530
|
}
|
|
113377
113531
|
search(method, path3) {
|
|
113378
113532
|
const handlerSets = [];
|
|
@@ -113381,7 +113535,9 @@ var Node2 = class _Node2 {
|
|
|
113381
113535
|
let curNodes = [curNode];
|
|
113382
113536
|
const parts = splitPath(path3);
|
|
113383
113537
|
const curNodesQueue = [];
|
|
113384
|
-
|
|
113538
|
+
const len = parts.length;
|
|
113539
|
+
let partOffsets = null;
|
|
113540
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
113385
113541
|
const part = parts[i2];
|
|
113386
113542
|
const isLast = i2 === len - 1;
|
|
113387
113543
|
const tempNodes = [];
|
|
@@ -113392,11 +113548,9 @@ var Node2 = class _Node2 {
|
|
|
113392
113548
|
nextNode.#params = node.#params;
|
|
113393
113549
|
if (isLast) {
|
|
113394
113550
|
if (nextNode.#children["*"]) {
|
|
113395
|
-
handlerSets
|
|
113396
|
-
...this.#getHandlerSets(nextNode.#children["*"], method, node.#params)
|
|
113397
|
-
);
|
|
113551
|
+
this.#pushHandlerSets(handlerSets, nextNode.#children["*"], method, node.#params);
|
|
113398
113552
|
}
|
|
113399
|
-
|
|
113553
|
+
this.#pushHandlerSets(handlerSets, nextNode, method, node.#params);
|
|
113400
113554
|
} else {
|
|
113401
113555
|
tempNodes.push(nextNode);
|
|
113402
113556
|
}
|
|
@@ -113407,7 +113561,7 @@ var Node2 = class _Node2 {
|
|
|
113407
113561
|
if (pattern === "*") {
|
|
113408
113562
|
const astNode = node.#children["*"];
|
|
113409
113563
|
if (astNode) {
|
|
113410
|
-
|
|
113564
|
+
this.#pushHandlerSets(handlerSets, astNode, method, node.#params);
|
|
113411
113565
|
astNode.#params = params;
|
|
113412
113566
|
tempNodes.push(astNode);
|
|
113413
113567
|
}
|
|
@@ -113418,13 +113572,21 @@ var Node2 = class _Node2 {
|
|
|
113418
113572
|
continue;
|
|
113419
113573
|
}
|
|
113420
113574
|
const child = node.#children[key];
|
|
113421
|
-
const restPathString = parts.slice(i2).join("/");
|
|
113422
113575
|
if (matcher instanceof RegExp) {
|
|
113576
|
+
if (partOffsets === null) {
|
|
113577
|
+
partOffsets = new Array(len);
|
|
113578
|
+
let offset = path3[0] === "/" ? 1 : 0;
|
|
113579
|
+
for (let p2 = 0; p2 < len; p2++) {
|
|
113580
|
+
partOffsets[p2] = offset;
|
|
113581
|
+
offset += parts[p2].length + 1;
|
|
113582
|
+
}
|
|
113583
|
+
}
|
|
113584
|
+
const restPathString = path3.substring(partOffsets[i2]);
|
|
113423
113585
|
const m2 = matcher.exec(restPathString);
|
|
113424
113586
|
if (m2) {
|
|
113425
113587
|
params[name6] = m2[0];
|
|
113426
|
-
|
|
113427
|
-
if (
|
|
113588
|
+
this.#pushHandlerSets(handlerSets, child, method, node.#params, params);
|
|
113589
|
+
if (hasChildren(child.#children)) {
|
|
113428
113590
|
child.#params = params;
|
|
113429
113591
|
const componentCount = m2[0].match(/\//)?.length ?? 0;
|
|
113430
113592
|
const targetCurNodes = curNodesQueue[componentCount] ||= [];
|
|
@@ -113436,10 +113598,14 @@ var Node2 = class _Node2 {
|
|
|
113436
113598
|
if (matcher === true || matcher.test(part)) {
|
|
113437
113599
|
params[name6] = part;
|
|
113438
113600
|
if (isLast) {
|
|
113439
|
-
|
|
113601
|
+
this.#pushHandlerSets(handlerSets, child, method, params, node.#params);
|
|
113440
113602
|
if (child.#children["*"]) {
|
|
113441
|
-
|
|
113442
|
-
|
|
113603
|
+
this.#pushHandlerSets(
|
|
113604
|
+
handlerSets,
|
|
113605
|
+
child.#children["*"],
|
|
113606
|
+
method,
|
|
113607
|
+
params,
|
|
113608
|
+
node.#params
|
|
113443
113609
|
);
|
|
113444
113610
|
}
|
|
113445
113611
|
} else {
|
|
@@ -113449,7 +113615,8 @@ var Node2 = class _Node2 {
|
|
|
113449
113615
|
}
|
|
113450
113616
|
}
|
|
113451
113617
|
}
|
|
113452
|
-
|
|
113618
|
+
const shifted = curNodesQueue.shift();
|
|
113619
|
+
curNodes = shifted ? tempNodes.concat(shifted) : tempNodes;
|
|
113453
113620
|
}
|
|
113454
113621
|
if (handlerSets.length > 1) {
|
|
113455
113622
|
handlerSets.sort((a2, b2) => {
|
|
@@ -113460,7 +113627,7 @@ var Node2 = class _Node2 {
|
|
|
113460
113627
|
}
|
|
113461
113628
|
};
|
|
113462
113629
|
|
|
113463
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113630
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/router/trie-router/router.js
|
|
113464
113631
|
var TrieRouter = class {
|
|
113465
113632
|
name = "TrieRouter";
|
|
113466
113633
|
#node;
|
|
@@ -113482,7 +113649,7 @@ var TrieRouter = class {
|
|
|
113482
113649
|
}
|
|
113483
113650
|
};
|
|
113484
113651
|
|
|
113485
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
113652
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/hono.js
|
|
113486
113653
|
var Hono2 = class extends Hono {
|
|
113487
113654
|
/**
|
|
113488
113655
|
* Creates an instance of the Hono class.
|
|
@@ -113806,7 +113973,7 @@ function runInActiveSpan(nameOrOptions, fn2) {
|
|
|
113806
113973
|
var mariadb = __toESM(require_promise(), 1);
|
|
113807
113974
|
var name = "@prisma/adapter-mariadb";
|
|
113808
113975
|
var UNSIGNED_FLAG = 1 << 5;
|
|
113809
|
-
var
|
|
113976
|
+
var BINARY_COLLATION_INDEX = 63;
|
|
113810
113977
|
function mapColumnType(field) {
|
|
113811
113978
|
switch (field.type) {
|
|
113812
113979
|
case "TINY":
|
|
@@ -113849,7 +114016,7 @@ function mapColumnType(field) {
|
|
|
113849
114016
|
case "LONG_BLOB":
|
|
113850
114017
|
if (field["dataTypeFormat"] === "json") {
|
|
113851
114018
|
return ColumnTypeEnum.Json;
|
|
113852
|
-
} else if (field.
|
|
114019
|
+
} else if (field.collation.index === BINARY_COLLATION_INDEX) {
|
|
113853
114020
|
return ColumnTypeEnum.Bytes;
|
|
113854
114021
|
} else {
|
|
113855
114022
|
return ColumnTypeEnum.Text;
|
|
@@ -114128,6 +114295,15 @@ var MariaDbTransaction = class extends MariaDbQueryable {
|
|
|
114128
114295
|
this.cleanup?.();
|
|
114129
114296
|
await this.client.end();
|
|
114130
114297
|
}
|
|
114298
|
+
async createSavepoint(name22) {
|
|
114299
|
+
await this.executeRaw({ sql: `SAVEPOINT ${name22}`, args: [], argTypes: [] });
|
|
114300
|
+
}
|
|
114301
|
+
async rollbackToSavepoint(name22) {
|
|
114302
|
+
await this.executeRaw({ sql: `ROLLBACK TO ${name22}`, args: [], argTypes: [] });
|
|
114303
|
+
}
|
|
114304
|
+
async releaseSavepoint(name22) {
|
|
114305
|
+
await this.executeRaw({ sql: `RELEASE SAVEPOINT ${name22}`, args: [], argTypes: [] });
|
|
114306
|
+
}
|
|
114131
114307
|
};
|
|
114132
114308
|
var PrismaMariaDbAdapter = class extends MariaDbQueryable {
|
|
114133
114309
|
constructor(client, capabilities, options) {
|
|
@@ -114235,7 +114411,7 @@ function inferCapabilities(version5) {
|
|
|
114235
114411
|
const [versionStr, suffix] = version5.split("-");
|
|
114236
114412
|
const [major2, minor, patch] = versionStr.split(".").map((n2) => parseInt(n2, 10));
|
|
114237
114413
|
const isMariaDB = suffix?.toLowerCase()?.includes("mariadb") ?? false;
|
|
114238
|
-
const supportsRelationJoins = !isMariaDB && (major2 > 8 || major2 === 8 && minor
|
|
114414
|
+
const supportsRelationJoins = !isMariaDB && (major2 > 8 || major2 === 8 && (minor > 0 || minor === 0 && patch >= 13));
|
|
114239
114415
|
return { supportsRelationJoins };
|
|
114240
114416
|
}
|
|
114241
114417
|
function rewriteConnectionString(config3) {
|
|
@@ -115156,6 +115332,12 @@ var MssqlTransaction = class extends MssqlQueryable {
|
|
|
115156
115332
|
release2();
|
|
115157
115333
|
}
|
|
115158
115334
|
}
|
|
115335
|
+
async createSavepoint(name22) {
|
|
115336
|
+
await this.executeRaw({ sql: `SAVE TRANSACTION ${name22}`, args: [], argTypes: [] });
|
|
115337
|
+
}
|
|
115338
|
+
async rollbackToSavepoint(name22) {
|
|
115339
|
+
await this.executeRaw({ sql: `ROLLBACK TRANSACTION ${name22}`, args: [], argTypes: [] });
|
|
115340
|
+
}
|
|
115159
115341
|
};
|
|
115160
115342
|
var PrismaMssqlAdapter = class extends MssqlQueryable {
|
|
115161
115343
|
constructor(pool2, options) {
|
|
@@ -115898,6 +116080,15 @@ var PgTransaction = class extends PgQueryable {
|
|
|
115898
116080
|
this.cleanup?.();
|
|
115899
116081
|
this.client.release();
|
|
115900
116082
|
}
|
|
116083
|
+
async createSavepoint(name22) {
|
|
116084
|
+
await this.executeRaw({ sql: `SAVEPOINT ${name22}`, args: [], argTypes: [] });
|
|
116085
|
+
}
|
|
116086
|
+
async rollbackToSavepoint(name22) {
|
|
116087
|
+
await this.executeRaw({ sql: `ROLLBACK TO SAVEPOINT ${name22}`, args: [], argTypes: [] });
|
|
116088
|
+
}
|
|
116089
|
+
async releaseSavepoint(name22) {
|
|
116090
|
+
await this.executeRaw({ sql: `RELEASE SAVEPOINT ${name22}`, args: [], argTypes: [] });
|
|
116091
|
+
}
|
|
115901
116092
|
};
|
|
115902
116093
|
var PrismaPgAdapter = class extends PgQueryable {
|
|
115903
116094
|
constructor(client, pgOptions, release2) {
|
|
@@ -116094,13 +116285,15 @@ function createConnectionStringRegex(protocols) {
|
|
|
116094
116285
|
}
|
|
116095
116286
|
function wrapFactory(protocols, factory) {
|
|
116096
116287
|
return {
|
|
116097
|
-
|
|
116288
|
+
adapterName: factory.adapterName,
|
|
116289
|
+
provider: factory.provider,
|
|
116098
116290
|
connect: () => factory.connect().then(wrapAdapter.bind(null, protocols), rethrowSanitizedError.bind(null, protocols))
|
|
116099
116291
|
};
|
|
116100
116292
|
}
|
|
116101
116293
|
function wrapAdapter(protocols, adapter) {
|
|
116102
116294
|
return {
|
|
116103
|
-
|
|
116295
|
+
adapterName: adapter.adapterName,
|
|
116296
|
+
provider: adapter.provider,
|
|
116104
116297
|
dispose: () => adapter.dispose().catch(rethrowSanitizedError.bind(null, protocols)),
|
|
116105
116298
|
executeRaw: (query2) => adapter.executeRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
|
|
116106
116299
|
queryRaw: (query2) => adapter.queryRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
|
|
@@ -116111,11 +116304,16 @@ function wrapAdapter(protocols, adapter) {
|
|
|
116111
116304
|
}
|
|
116112
116305
|
function wrapTransaction(protocols, tx) {
|
|
116113
116306
|
return {
|
|
116114
|
-
|
|
116307
|
+
adapterName: tx.adapterName,
|
|
116308
|
+
provider: tx.provider,
|
|
116309
|
+
options: tx.options,
|
|
116115
116310
|
commit: () => tx.commit().catch(rethrowSanitizedError.bind(null, protocols)),
|
|
116116
116311
|
rollback: () => tx.rollback().catch(rethrowSanitizedError.bind(null, protocols)),
|
|
116117
116312
|
executeRaw: (query2) => tx.executeRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
|
|
116118
|
-
queryRaw: (query2) => tx.queryRaw(query2).catch(rethrowSanitizedError.bind(null, protocols))
|
|
116313
|
+
queryRaw: (query2) => tx.queryRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
|
|
116314
|
+
createSavepoint: tx.createSavepoint ? (name6) => tx.createSavepoint(name6).catch(rethrowSanitizedError.bind(null, protocols)) : void 0,
|
|
116315
|
+
rollbackToSavepoint: tx.rollbackToSavepoint ? (name6) => tx.rollbackToSavepoint(name6).catch(rethrowSanitizedError.bind(null, protocols)) : void 0,
|
|
116316
|
+
releaseSavepoint: tx.releaseSavepoint ? (name6) => tx.releaseSavepoint(name6).catch(rethrowSanitizedError.bind(null, protocols)) : void 0
|
|
116119
116317
|
};
|
|
116120
116318
|
}
|
|
116121
116319
|
|
|
@@ -116238,7 +116436,7 @@ function logQuery(event) {
|
|
|
116238
116436
|
});
|
|
116239
116437
|
}
|
|
116240
116438
|
|
|
116241
|
-
// ../../node_modules/.pnpm/hono@4.
|
|
116439
|
+
// ../../node_modules/.pnpm/hono@4.12.0/node_modules/hono/dist/helper/factory/index.js
|
|
116242
116440
|
var createMiddleware = (middleware) => middleware;
|
|
116243
116441
|
|
|
116244
116442
|
// src/server/middleware/client-telemetry.ts
|
|
@@ -128420,7 +128618,8 @@ var QueryRequestBody = external_exports.object({
|
|
|
128420
128618
|
var TransactionStartRequestBody = external_exports.object({
|
|
128421
128619
|
timeout: external_exports.number().optional(),
|
|
128422
128620
|
maxWait: external_exports.number().optional(),
|
|
128423
|
-
isolationLevel: external_exports.enum(["READ UNCOMMITTED", "READ COMMITTED", "REPEATABLE READ", "SNAPSHOT", "SERIALIZABLE"]).optional()
|
|
128621
|
+
isolationLevel: external_exports.enum(["READ UNCOMMITTED", "READ COMMITTED", "REPEATABLE READ", "SNAPSHOT", "SERIALIZABLE"]).optional(),
|
|
128622
|
+
newTxId: external_exports.string().optional()
|
|
128424
128623
|
});
|
|
128425
128624
|
|
|
128426
128625
|
// src/server/server.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/query-plan-executor",
|
|
3
|
-
"version": "7.5.0-dev.
|
|
3
|
+
"version": "7.5.0-dev.30",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
"@opentelemetry/sdk-trace-base": "2.1.0",
|
|
19
19
|
"hono": "4.11.7",
|
|
20
20
|
"temporal-polyfill": "0.3.0",
|
|
21
|
-
"vitest": "3.2.4",
|
|
22
21
|
"zod": "4.1.3",
|
|
23
|
-
"@prisma/adapter-
|
|
24
|
-
"@prisma/adapter-
|
|
25
|
-
"@prisma/adapter-
|
|
26
|
-
"@prisma/
|
|
27
|
-
"@prisma/client-engine-runtime": "7.5.0-dev.
|
|
22
|
+
"@prisma/adapter-mariadb": "7.5.0-dev.30",
|
|
23
|
+
"@prisma/adapter-mssql": "7.5.0-dev.30",
|
|
24
|
+
"@prisma/driver-adapter-utils": "7.5.0-dev.30",
|
|
25
|
+
"@prisma/adapter-pg": "7.5.0-dev.30",
|
|
26
|
+
"@prisma/client-engine-runtime": "7.5.0-dev.30"
|
|
28
27
|
},
|
|
29
28
|
"files": [
|
|
30
29
|
"dist"
|