@prisma/query-plan-executor 7.10.0-dev.31 → 7.10.0-dev.33
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 +36 -26
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -62073,7 +62073,7 @@ var require_stream2 = __commonJS({
|
|
|
62073
62073
|
}
|
|
62074
62074
|
});
|
|
62075
62075
|
Stream.Stream = Stream;
|
|
62076
|
-
Stream._isUint8Array = function
|
|
62076
|
+
Stream._isUint8Array = function isUint8Array2(value) {
|
|
62077
62077
|
return value instanceof Uint8Array;
|
|
62078
62078
|
};
|
|
62079
62079
|
Stream._uint8ArrayToBuffer = function _uint8ArrayToBuffer(chunk) {
|
|
@@ -88897,7 +88897,7 @@ var require_utils5 = __commonJS({
|
|
|
88897
88897
|
"use strict";
|
|
88898
88898
|
var defaults2 = require_defaults();
|
|
88899
88899
|
var util4 = require("util");
|
|
88900
|
-
var { isDate } = util4.types || util4;
|
|
88900
|
+
var { isDate: isDate2 } = util4.types || util4;
|
|
88901
88901
|
function escapeElement(elementRepresentation) {
|
|
88902
88902
|
const escaped = elementRepresentation.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
88903
88903
|
return '"' + escaped + '"';
|
|
@@ -88945,7 +88945,7 @@ var require_utils5 = __commonJS({
|
|
|
88945
88945
|
}
|
|
88946
88946
|
return buf.slice(val.byteOffset, val.byteOffset + val.byteLength);
|
|
88947
88947
|
}
|
|
88948
|
-
if (
|
|
88948
|
+
if (isDate2(val)) {
|
|
88949
88949
|
if (defaults2.parseInputDatesAsUTC) {
|
|
88950
88950
|
return dateToStringUTC(val);
|
|
88951
88951
|
} else {
|
|
@@ -92936,7 +92936,7 @@ __export(index_exports, {
|
|
|
92936
92936
|
module.exports = __toCommonJS(index_exports);
|
|
92937
92937
|
|
|
92938
92938
|
// package.json
|
|
92939
|
-
var version = "7.10.0-dev.
|
|
92939
|
+
var version = "7.10.0-dev.33";
|
|
92940
92940
|
|
|
92941
92941
|
// ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
|
|
92942
92942
|
function clampProp(e2, n2, t2, o2, r2) {
|
|
@@ -102896,6 +102896,12 @@ function ulid(seedTime, prng) {
|
|
|
102896
102896
|
|
|
102897
102897
|
// ../client-engine-runtime/dist/index.mjs
|
|
102898
102898
|
init_dist_node();
|
|
102899
|
+
function isUint8Array(value) {
|
|
102900
|
+
return ArrayBuffer.isView(value) && Object.prototype.toString.call(value) === "[object Uint8Array]";
|
|
102901
|
+
}
|
|
102902
|
+
function isDate(value) {
|
|
102903
|
+
return Object.prototype.toString.call(value) === "[object Date]";
|
|
102904
|
+
}
|
|
102899
102905
|
function assertNever(_3, message) {
|
|
102900
102906
|
throw new Error(message);
|
|
102901
102907
|
}
|
|
@@ -102914,11 +102920,11 @@ function doKeysMatch(lhs, rhs) {
|
|
|
102914
102920
|
const lhsDecimal = asDecimal(lhs[key]);
|
|
102915
102921
|
const rhsDecimal = asDecimal(rhs[key]);
|
|
102916
102922
|
return lhsDecimal && rhsDecimal && lhsDecimal.equals(rhsDecimal);
|
|
102917
|
-
} else if (lhs[key]
|
|
102923
|
+
} else if (isUint8Array(lhs[key]) || isUint8Array(rhs[key])) {
|
|
102918
102924
|
const lhsBuffer = asBuffer(lhs[key]);
|
|
102919
102925
|
const rhsBuffer = asBuffer(rhs[key]);
|
|
102920
102926
|
return lhsBuffer && rhsBuffer && lhsBuffer.equals(rhsBuffer);
|
|
102921
|
-
} else if (lhs[key]
|
|
102927
|
+
} else if (isDate(lhs[key]) || isDate(rhs[key])) {
|
|
102922
102928
|
return asDate(lhs[key])?.getTime() === asDate(rhs[key])?.getTime();
|
|
102923
102929
|
} else if (typeof lhs[key] === "bigint" || typeof rhs[key] === "bigint") {
|
|
102924
102930
|
return asBigInt(lhs[key]) === asBigInt(rhs[key]);
|
|
@@ -102940,7 +102946,7 @@ function asDecimal(value) {
|
|
|
102940
102946
|
function asBuffer(value) {
|
|
102941
102947
|
if (Buffer.isBuffer(value)) {
|
|
102942
102948
|
return value;
|
|
102943
|
-
} else if (value
|
|
102949
|
+
} else if (isUint8Array(value)) {
|
|
102944
102950
|
return Buffer.from(value.buffer, value.byteOffset, value.byteLength);
|
|
102945
102951
|
} else if (typeof value === "string") {
|
|
102946
102952
|
return Buffer.from(value, "base64");
|
|
@@ -102949,7 +102955,7 @@ function asBuffer(value) {
|
|
|
102949
102955
|
}
|
|
102950
102956
|
}
|
|
102951
102957
|
function asDate(value) {
|
|
102952
|
-
if (value
|
|
102958
|
+
if (isDate(value)) {
|
|
102953
102959
|
return value;
|
|
102954
102960
|
} else if (typeof value === "string" || typeof value === "number") {
|
|
102955
102961
|
return new Date(value);
|
|
@@ -103433,7 +103439,7 @@ function mapValue(value, columnName, scalarType, enums) {
|
|
|
103433
103439
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
103434
103440
|
}
|
|
103435
103441
|
}
|
|
103436
|
-
if (Array.isArray(value) || value
|
|
103442
|
+
if (Array.isArray(value) || isUint8Array(value)) {
|
|
103437
103443
|
for (const byte of value) {
|
|
103438
103444
|
if (byte !== 0) return true;
|
|
103439
103445
|
}
|
|
@@ -103450,7 +103456,7 @@ function mapValue(value, columnName, scalarType, enums) {
|
|
|
103450
103456
|
if (typeof value === "string") {
|
|
103451
103457
|
return { $type: "DateTime", value: normalizeDateTime(value) };
|
|
103452
103458
|
}
|
|
103453
|
-
if (typeof value === "number" || value
|
|
103459
|
+
if (typeof value === "number" || isDate(value)) {
|
|
103454
103460
|
return { $type: "DateTime", value };
|
|
103455
103461
|
}
|
|
103456
103462
|
throw new DataMapperError(`Expected a date in column '${columnName}', got ${typeof value}: ${value}`);
|
|
@@ -103481,7 +103487,7 @@ function mapValue(value, columnName, scalarType, enums) {
|
|
|
103481
103487
|
if (Array.isArray(value)) {
|
|
103482
103488
|
return { $type: "Bytes", value: Buffer.from(value).toString("base64") };
|
|
103483
103489
|
}
|
|
103484
|
-
if (value
|
|
103490
|
+
if (isUint8Array(value)) {
|
|
103485
103491
|
return { $type: "Bytes", value: Buffer.from(value).toString("base64") };
|
|
103486
103492
|
}
|
|
103487
103493
|
throw new DataMapperError(`Expected a byte array in column '${columnName}', got ${typeof value}: ${value}`);
|
|
@@ -105332,20 +105338,24 @@ var TransactionManager = class {
|
|
|
105332
105338
|
#startTransactionTimeout(transactionId, timeout) {
|
|
105333
105339
|
const timeoutStartedAt = Date.now();
|
|
105334
105340
|
const timer = createTimeoutIfDefined(async () => {
|
|
105335
|
-
|
|
105336
|
-
|
|
105337
|
-
|
|
105338
|
-
|
|
105339
|
-
return;
|
|
105340
|
-
}
|
|
105341
|
-
await this.#runSerialized(tx, async () => {
|
|
105342
|
-
const current = this.transactions.get(transactionId);
|
|
105343
|
-
if (current && ["running", "waiting"].includes(current.status)) {
|
|
105344
|
-
await this.#closeTransaction(current, "timed_out");
|
|
105345
|
-
} else {
|
|
105341
|
+
try {
|
|
105342
|
+
debug3("Transaction timed out.", { transactionId, timeoutStartedAt, timeout });
|
|
105343
|
+
const tx = this.transactions.get(transactionId);
|
|
105344
|
+
if (!tx) {
|
|
105346
105345
|
this.#debugTransactionAlreadyClosedOnTimeout(transactionId);
|
|
105346
|
+
return;
|
|
105347
105347
|
}
|
|
105348
|
-
|
|
105348
|
+
await this.#runSerialized(tx, async () => {
|
|
105349
|
+
const current = this.transactions.get(transactionId);
|
|
105350
|
+
if (current && ["running", "waiting"].includes(current.status)) {
|
|
105351
|
+
await this.#closeTransaction(current, "timed_out");
|
|
105352
|
+
} else {
|
|
105353
|
+
this.#debugTransactionAlreadyClosedOnTimeout(transactionId);
|
|
105354
|
+
}
|
|
105355
|
+
});
|
|
105356
|
+
} catch (error44) {
|
|
105357
|
+
debug3("Error while closing timed-out transaction.", { transactionId, error: error44 });
|
|
105358
|
+
}
|
|
105349
105359
|
}, timeout);
|
|
105350
105360
|
timer?.unref?.();
|
|
105351
105361
|
return timer;
|
|
@@ -113097,15 +113107,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
113097
113107
|
}
|
|
113098
113108
|
}
|
|
113099
113109
|
const input = payload.value;
|
|
113100
|
-
const
|
|
113101
|
-
const isValidDate =
|
|
113110
|
+
const isDate2 = input instanceof Date;
|
|
113111
|
+
const isValidDate = isDate2 && !Number.isNaN(input.getTime());
|
|
113102
113112
|
if (isValidDate)
|
|
113103
113113
|
return payload;
|
|
113104
113114
|
payload.issues.push({
|
|
113105
113115
|
expected: "date",
|
|
113106
113116
|
code: "invalid_type",
|
|
113107
113117
|
input,
|
|
113108
|
-
...
|
|
113118
|
+
...isDate2 ? { received: "Invalid Date" } : {},
|
|
113109
113119
|
inst
|
|
113110
113120
|
});
|
|
113111
113121
|
return payload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/query-plan-executor",
|
|
3
|
-
"version": "7.10.0-dev.
|
|
3
|
+
"version": "7.10.0-dev.33",
|
|
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",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"hono": "^4.12.23",
|
|
20
20
|
"temporal-polyfill": "0.3.0",
|
|
21
21
|
"zod": "4.1.3",
|
|
22
|
-
"@prisma/adapter-pg": "7.10.0-dev.
|
|
23
|
-
"@prisma/adapter-mariadb": "7.10.0-dev.
|
|
24
|
-
"@prisma/
|
|
25
|
-
"@prisma/
|
|
26
|
-
"@prisma/
|
|
22
|
+
"@prisma/adapter-pg": "7.10.0-dev.33",
|
|
23
|
+
"@prisma/adapter-mariadb": "7.10.0-dev.33",
|
|
24
|
+
"@prisma/driver-adapter-utils": "7.10.0-dev.33",
|
|
25
|
+
"@prisma/client-engine-runtime": "7.10.0-dev.33",
|
|
26
|
+
"@prisma/adapter-mssql": "7.10.0-dev.33"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist"
|