@prisma/cli-init 0.0.0-dev.202601192140 → 0.0.0-dev.202601192152
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/{accelerate-J2NFNHM6.js → accelerate-65GWNMEW.js} +118 -126
- package/dist/index.js +11 -11
- package/package.json +1 -1
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
__toESM
|
|
24
24
|
} from "./chunk-NJX2BODH.js";
|
|
25
25
|
|
|
26
|
-
// ../../node_modules/.pnpm/@prisma+query-plan-executor@7.
|
|
26
|
+
// ../../node_modules/.pnpm/@prisma+query-plan-executor@7.2.0/node_modules/@prisma/query-plan-executor/dist/index.js
|
|
27
27
|
var require_dist = __commonJS({
|
|
28
|
-
"../../node_modules/.pnpm/@prisma+query-plan-executor@7.
|
|
28
|
+
"../../node_modules/.pnpm/@prisma+query-plan-executor@7.2.0/node_modules/@prisma/query-plan-executor/dist/index.js"(exports2, module2) {
|
|
29
29
|
"use strict";
|
|
30
30
|
var __create = Object.create;
|
|
31
31
|
var __defProp = Object.defineProperty;
|
|
@@ -52580,7 +52580,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52580
52580
|
}
|
|
52581
52581
|
});
|
|
52582
52582
|
var require_data_stream = __commonJS2({
|
|
52583
|
-
"../../node_modules/.pnpm/jws@
|
|
52583
|
+
"../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js"(exports22, module22) {
|
|
52584
52584
|
"use strict";
|
|
52585
52585
|
var Buffer22 = require_safe_buffer().Buffer;
|
|
52586
52586
|
var Stream = __require("stream");
|
|
@@ -52626,38 +52626,6 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52626
52626
|
module22.exports = DataStream;
|
|
52627
52627
|
}
|
|
52628
52628
|
});
|
|
52629
|
-
var require_buffer_equal_constant_time = __commonJS2({
|
|
52630
|
-
"../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports22, module22) {
|
|
52631
|
-
"use strict";
|
|
52632
|
-
var Buffer22 = __require("buffer").Buffer;
|
|
52633
|
-
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
52634
|
-
module22.exports = bufferEq;
|
|
52635
|
-
function bufferEq(a2, b2) {
|
|
52636
|
-
if (!Buffer22.isBuffer(a2) || !Buffer22.isBuffer(b2)) {
|
|
52637
|
-
return false;
|
|
52638
|
-
}
|
|
52639
|
-
if (a2.length !== b2.length) {
|
|
52640
|
-
return false;
|
|
52641
|
-
}
|
|
52642
|
-
var c2 = 0;
|
|
52643
|
-
for (var i2 = 0; i2 < a2.length; i2++) {
|
|
52644
|
-
c2 |= a2[i2] ^ b2[i2];
|
|
52645
|
-
}
|
|
52646
|
-
return c2 === 0;
|
|
52647
|
-
}
|
|
52648
|
-
bufferEq.install = function() {
|
|
52649
|
-
Buffer22.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
|
|
52650
|
-
return bufferEq(this, that);
|
|
52651
|
-
};
|
|
52652
|
-
};
|
|
52653
|
-
var origBufEqual = Buffer22.prototype.equal;
|
|
52654
|
-
var origSlowBufEqual = SlowBuffer.prototype.equal;
|
|
52655
|
-
bufferEq.restore = function() {
|
|
52656
|
-
Buffer22.prototype.equal = origBufEqual;
|
|
52657
|
-
SlowBuffer.prototype.equal = origSlowBufEqual;
|
|
52658
|
-
};
|
|
52659
|
-
}
|
|
52660
|
-
});
|
|
52661
52629
|
var require_param_bytes_for_alg = __commonJS2({
|
|
52662
52630
|
"../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js"(exports22, module22) {
|
|
52663
52631
|
"use strict";
|
|
@@ -52818,10 +52786,41 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52818
52786
|
};
|
|
52819
52787
|
}
|
|
52820
52788
|
});
|
|
52789
|
+
var require_buffer_equal_constant_time = __commonJS2({
|
|
52790
|
+
"../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports22, module22) {
|
|
52791
|
+
"use strict";
|
|
52792
|
+
var Buffer22 = __require("buffer").Buffer;
|
|
52793
|
+
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
52794
|
+
module22.exports = bufferEq;
|
|
52795
|
+
function bufferEq(a2, b2) {
|
|
52796
|
+
if (!Buffer22.isBuffer(a2) || !Buffer22.isBuffer(b2)) {
|
|
52797
|
+
return false;
|
|
52798
|
+
}
|
|
52799
|
+
if (a2.length !== b2.length) {
|
|
52800
|
+
return false;
|
|
52801
|
+
}
|
|
52802
|
+
var c2 = 0;
|
|
52803
|
+
for (var i2 = 0; i2 < a2.length; i2++) {
|
|
52804
|
+
c2 |= a2[i2] ^ b2[i2];
|
|
52805
|
+
}
|
|
52806
|
+
return c2 === 0;
|
|
52807
|
+
}
|
|
52808
|
+
bufferEq.install = function() {
|
|
52809
|
+
Buffer22.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
|
|
52810
|
+
return bufferEq(this, that);
|
|
52811
|
+
};
|
|
52812
|
+
};
|
|
52813
|
+
var origBufEqual = Buffer22.prototype.equal;
|
|
52814
|
+
var origSlowBufEqual = SlowBuffer.prototype.equal;
|
|
52815
|
+
bufferEq.restore = function() {
|
|
52816
|
+
Buffer22.prototype.equal = origBufEqual;
|
|
52817
|
+
SlowBuffer.prototype.equal = origSlowBufEqual;
|
|
52818
|
+
};
|
|
52819
|
+
}
|
|
52820
|
+
});
|
|
52821
52821
|
var require_jwa = __commonJS2({
|
|
52822
|
-
"../../node_modules/.pnpm/jwa@
|
|
52822
|
+
"../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports22, module22) {
|
|
52823
52823
|
"use strict";
|
|
52824
|
-
var bufferEqual = require_buffer_equal_constant_time();
|
|
52825
52824
|
var Buffer22 = require_safe_buffer().Buffer;
|
|
52826
52825
|
var crypto7 = __require("crypto");
|
|
52827
52826
|
var formatEcdsa = require_ecdsa_sig_formatter();
|
|
@@ -52925,10 +52924,22 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52925
52924
|
return fromBase64(sig);
|
|
52926
52925
|
};
|
|
52927
52926
|
}
|
|
52927
|
+
var bufferEqual;
|
|
52928
|
+
var timingSafeEqual = "timingSafeEqual" in crypto7 ? function timingSafeEqual2(a2, b2) {
|
|
52929
|
+
if (a2.byteLength !== b2.byteLength) {
|
|
52930
|
+
return false;
|
|
52931
|
+
}
|
|
52932
|
+
return crypto7.timingSafeEqual(a2, b2);
|
|
52933
|
+
} : function timingSafeEqual2(a2, b2) {
|
|
52934
|
+
if (!bufferEqual) {
|
|
52935
|
+
bufferEqual = require_buffer_equal_constant_time();
|
|
52936
|
+
}
|
|
52937
|
+
return bufferEqual(a2, b2);
|
|
52938
|
+
};
|
|
52928
52939
|
function createHmacVerifier(bits) {
|
|
52929
52940
|
return function verify(thing, signature, secret2) {
|
|
52930
52941
|
var computedSig = createHmacSigner(bits)(thing, secret2);
|
|
52931
|
-
return
|
|
52942
|
+
return timingSafeEqual(Buffer22.from(signature), Buffer22.from(computedSig));
|
|
52932
52943
|
};
|
|
52933
52944
|
}
|
|
52934
52945
|
function createKeySigner(bits) {
|
|
@@ -53018,7 +53029,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53018
53029
|
es: createECDSAVerifer,
|
|
53019
53030
|
none: createNoneVerifier
|
|
53020
53031
|
};
|
|
53021
|
-
var match2 = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/
|
|
53032
|
+
var match2 = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);
|
|
53022
53033
|
if (!match2)
|
|
53023
53034
|
throw typeError(MSG_INVALID_ALGORITHM, algorithm);
|
|
53024
53035
|
var algo = (match2[1] || match2[3]).toLowerCase();
|
|
@@ -53031,7 +53042,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53031
53042
|
}
|
|
53032
53043
|
});
|
|
53033
53044
|
var require_tostring = __commonJS2({
|
|
53034
|
-
"../../node_modules/.pnpm/jws@
|
|
53045
|
+
"../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js"(exports22, module22) {
|
|
53035
53046
|
"use strict";
|
|
53036
53047
|
var Buffer22 = __require("buffer").Buffer;
|
|
53037
53048
|
module22.exports = function toString2(obj) {
|
|
@@ -53044,7 +53055,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53044
53055
|
}
|
|
53045
53056
|
});
|
|
53046
53057
|
var require_sign_stream = __commonJS2({
|
|
53047
|
-
"../../node_modules/.pnpm/jws@
|
|
53058
|
+
"../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js"(exports22, module22) {
|
|
53048
53059
|
"use strict";
|
|
53049
53060
|
var Buffer22 = require_safe_buffer().Buffer;
|
|
53050
53061
|
var DataStream = require_data_stream();
|
|
@@ -53072,7 +53083,12 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53072
53083
|
return util2.format("%s.%s", securedInput, signature);
|
|
53073
53084
|
}
|
|
53074
53085
|
function SignStream(opts) {
|
|
53075
|
-
var secret2 = opts.secret
|
|
53086
|
+
var secret2 = opts.secret;
|
|
53087
|
+
secret2 = secret2 == null ? opts.privateKey : secret2;
|
|
53088
|
+
secret2 = secret2 == null ? opts.key : secret2;
|
|
53089
|
+
if (/^hs/i.test(opts.header.alg) === true && secret2 == null) {
|
|
53090
|
+
throw new TypeError("secret must be a string or buffer or a KeyObject");
|
|
53091
|
+
}
|
|
53076
53092
|
var secretStream = new DataStream(secret2);
|
|
53077
53093
|
this.readable = true;
|
|
53078
53094
|
this.header = opts.header;
|
|
@@ -53113,7 +53129,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53113
53129
|
}
|
|
53114
53130
|
});
|
|
53115
53131
|
var require_verify_stream = __commonJS2({
|
|
53116
|
-
"../../node_modules/.pnpm/jws@
|
|
53132
|
+
"../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js"(exports22, module22) {
|
|
53117
53133
|
"use strict";
|
|
53118
53134
|
var Buffer22 = require_safe_buffer().Buffer;
|
|
53119
53135
|
var DataStream = require_data_stream();
|
|
@@ -53183,7 +53199,12 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53183
53199
|
}
|
|
53184
53200
|
function VerifyStream(opts) {
|
|
53185
53201
|
opts = opts || {};
|
|
53186
|
-
var secretOrKey = opts.secret
|
|
53202
|
+
var secretOrKey = opts.secret;
|
|
53203
|
+
secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey;
|
|
53204
|
+
secretOrKey = secretOrKey == null ? opts.key : secretOrKey;
|
|
53205
|
+
if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) {
|
|
53206
|
+
throw new TypeError("secret must be a string or buffer or a KeyObject");
|
|
53207
|
+
}
|
|
53187
53208
|
var secretStream = new DataStream(secretOrKey);
|
|
53188
53209
|
this.readable = true;
|
|
53189
53210
|
this.algorithm = opts.algorithm;
|
|
@@ -53222,7 +53243,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
53222
53243
|
}
|
|
53223
53244
|
});
|
|
53224
53245
|
var require_jws = __commonJS2({
|
|
53225
|
-
"../../node_modules/.pnpm/jws@
|
|
53246
|
+
"../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js"(exports22) {
|
|
53226
53247
|
"use strict";
|
|
53227
53248
|
var SignStream = require_sign_stream();
|
|
53228
53249
|
var VerifyStream = require_verify_stream();
|
|
@@ -97593,7 +97614,7 @@ To work with multiple accounts for the same Client ID and Tenant ID, please prov
|
|
|
97593
97614
|
withActiveLogger: () => withActiveLogger
|
|
97594
97615
|
});
|
|
97595
97616
|
module2.exports = __toCommonJS(index_exports);
|
|
97596
|
-
var version4 = "7.
|
|
97617
|
+
var version4 = "7.2.0";
|
|
97597
97618
|
function clampProp(e2, n2, t2, o2, r2) {
|
|
97598
97619
|
return clampEntity(n2, ((e3, n3) => {
|
|
97599
97620
|
const t3 = e3[n3];
|
|
@@ -106116,6 +106137,8 @@ ${log32.fields?.reason}`;
|
|
|
106116
106137
|
return "P2002";
|
|
106117
106138
|
case "ForeignKeyConstraintViolation":
|
|
106118
106139
|
return "P2003";
|
|
106140
|
+
case "InvalidInputValue":
|
|
106141
|
+
return "P2007";
|
|
106119
106142
|
case "UnsupportedNativeDataType":
|
|
106120
106143
|
return "P2010";
|
|
106121
106144
|
case "NullConstraintViolation":
|
|
@@ -106212,6 +106235,8 @@ ${log32.fields?.reason}`;
|
|
|
106212
106235
|
return `Error in external connector (id ${err.cause.id})`;
|
|
106213
106236
|
case "TooManyConnections":
|
|
106214
106237
|
return `Too many database connections opened: ${err.cause.cause}`;
|
|
106238
|
+
case "InvalidInputValue":
|
|
106239
|
+
return `Invalid input value: ${err.cause.message}`;
|
|
106215
106240
|
case "sqlite":
|
|
106216
106241
|
case "postgres":
|
|
106217
106242
|
case "mysql":
|
|
@@ -106231,8 +106256,11 @@ ${log32.fields?.reason}`;
|
|
|
106231
106256
|
}
|
|
106232
106257
|
return "(not available)";
|
|
106233
106258
|
}
|
|
106234
|
-
var DataMapperError = class extends
|
|
106259
|
+
var DataMapperError = class extends UserFacingError {
|
|
106235
106260
|
name = "DataMapperError";
|
|
106261
|
+
constructor(message, options) {
|
|
106262
|
+
super(message, "P2023", options);
|
|
106263
|
+
}
|
|
106236
106264
|
};
|
|
106237
106265
|
function applyDataMap(data, structure, enums) {
|
|
106238
106266
|
switch (structure.type) {
|
|
@@ -106387,7 +106415,7 @@ ${log32.fields?.reason}`;
|
|
|
106387
106415
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
106388
106416
|
}
|
|
106389
106417
|
}
|
|
106390
|
-
if (Array.isArray(value)) {
|
|
106418
|
+
if (Array.isArray(value) || value instanceof Uint8Array) {
|
|
106391
106419
|
for (const byte of value) {
|
|
106392
106420
|
if (byte !== 0)
|
|
106393
106421
|
return true;
|
|
@@ -107058,17 +107086,6 @@ ${log32.fields?.reason}`;
|
|
|
107058
107086
|
throw new Error(`Cannot serialize value of type ${typeof value} as JsonArray`);
|
|
107059
107087
|
}
|
|
107060
107088
|
return value.map((v2) => serializeRawValue(v2, ColumnTypeEnum.Json));
|
|
107061
|
-
case ColumnTypeEnum.Bytes:
|
|
107062
|
-
if (Array.isArray(value)) {
|
|
107063
|
-
return new Uint8Array(value);
|
|
107064
|
-
} else {
|
|
107065
|
-
throw new Error(`Cannot serialize value of type ${typeof value} as Bytes`);
|
|
107066
|
-
}
|
|
107067
|
-
case ColumnTypeEnum.BytesArray:
|
|
107068
|
-
if (!Array.isArray(value)) {
|
|
107069
|
-
throw new Error(`Cannot serialize value of type ${typeof value} as BytesArray`);
|
|
107070
|
-
}
|
|
107071
|
-
return value.map((v2) => serializeRawValue(v2, ColumnTypeEnum.Bytes));
|
|
107072
107089
|
case ColumnTypeEnum.Boolean:
|
|
107073
107090
|
switch (typeof value) {
|
|
107074
107091
|
case "boolean":
|
|
@@ -107754,14 +107771,16 @@ ${log32.fields?.reason}`;
|
|
|
107754
107771
|
const abortController = new AbortController();
|
|
107755
107772
|
const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
|
|
107756
107773
|
startTimer?.unref?.();
|
|
107774
|
+
const startTransactionPromise = this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing);
|
|
107757
107775
|
transaction.transaction = await Promise.race([
|
|
107758
|
-
|
|
107776
|
+
startTransactionPromise.finally(() => clearTimeout(startTimer)),
|
|
107759
107777
|
once(abortController.signal, "abort").then(() => void 0)
|
|
107760
107778
|
]);
|
|
107761
107779
|
this.transactions.set(transaction.id, transaction);
|
|
107762
107780
|
switch (transaction.status) {
|
|
107763
107781
|
case "waiting":
|
|
107764
107782
|
if (abortController.signal.aborted) {
|
|
107783
|
+
void startTransactionPromise.then((tx) => tx.rollback()).catch((e2) => debug3("error in discarded transaction:", e2));
|
|
107765
107784
|
await this.#closeTransaction(transaction, "timed_out");
|
|
107766
107785
|
throw new TransactionStartTimeoutError();
|
|
107767
107786
|
}
|
|
@@ -109327,7 +109346,7 @@ ${log32.fields?.reason}`;
|
|
|
109327
109346
|
parentId,
|
|
109328
109347
|
attributes,
|
|
109329
109348
|
links,
|
|
109330
|
-
name: `prisma:
|
|
109349
|
+
name: `prisma:accelerate:${this.#name}`,
|
|
109331
109350
|
kind: serializeSpanKind(this.#kind),
|
|
109332
109351
|
startTime: this.#startTime,
|
|
109333
109352
|
endTime: instantToHrTime(endTime)
|
|
@@ -109570,9 +109589,6 @@ ${log32.fields?.reason}`;
|
|
|
109570
109589
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
109571
109590
|
return Buffer.from(arg, "base64");
|
|
109572
109591
|
}
|
|
109573
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
109574
|
-
return Buffer.from(arg);
|
|
109575
|
-
}
|
|
109576
109592
|
if (ArrayBuffer.isView(arg)) {
|
|
109577
109593
|
return Buffer.from(arg.buffer, arg.byteOffset, arg.byteLength);
|
|
109578
109594
|
}
|
|
@@ -109591,9 +109607,6 @@ ${log32.fields?.reason}`;
|
|
|
109591
109607
|
case "DATETIME2":
|
|
109592
109608
|
return (/* @__PURE__ */ new Date(`${value}Z`)).toISOString().replace(/(\.000)?Z$/, "+00:00");
|
|
109593
109609
|
}
|
|
109594
|
-
if (Buffer.isBuffer(value)) {
|
|
109595
|
-
return Array.from(value);
|
|
109596
|
-
}
|
|
109597
109610
|
if (typeof value === "bigint") {
|
|
109598
109611
|
return value.toString();
|
|
109599
109612
|
}
|
|
@@ -109735,7 +109748,8 @@ ${log32.fields?.reason}`;
|
|
|
109735
109748
|
kind: "mysql",
|
|
109736
109749
|
code: error44.errno,
|
|
109737
109750
|
message: error44.sqlMessage ?? "N/A",
|
|
109738
|
-
state: error44.sqlState ?? "N/A"
|
|
109751
|
+
state: error44.sqlState ?? "N/A",
|
|
109752
|
+
cause: error44.cause?.message ?? void 0
|
|
109739
109753
|
};
|
|
109740
109754
|
}
|
|
109741
109755
|
}
|
|
@@ -110466,9 +110480,6 @@ ${log32.fields?.reason}`;
|
|
|
110466
110480
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
110467
110481
|
return Buffer.from(arg, "base64");
|
|
110468
110482
|
}
|
|
110469
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
110470
|
-
return Buffer.from(arg);
|
|
110471
|
-
}
|
|
110472
110483
|
if (ArrayBuffer.isView(arg)) {
|
|
110473
110484
|
return Buffer.from(arg.buffer, arg.byteOffset, arg.byteLength);
|
|
110474
110485
|
}
|
|
@@ -110492,9 +110503,6 @@ ${log32.fields?.reason}`;
|
|
|
110492
110503
|
}
|
|
110493
110504
|
return value;
|
|
110494
110505
|
}
|
|
110495
|
-
if (Buffer.isBuffer(value)) {
|
|
110496
|
-
return Array.from(value);
|
|
110497
|
-
}
|
|
110498
110506
|
if (typeof value === "string" && type2 === import_mssql3.default.UniqueIdentifier) {
|
|
110499
110507
|
return value.toLowerCase();
|
|
110500
110508
|
}
|
|
@@ -111135,18 +111143,10 @@ ${log32.fields?.reason}`;
|
|
|
111135
111143
|
function toJson(json2) {
|
|
111136
111144
|
return json2;
|
|
111137
111145
|
}
|
|
111138
|
-
function encodeBuffer(buffer) {
|
|
111139
|
-
return Array.from(new Uint8Array(buffer));
|
|
111140
|
-
}
|
|
111141
111146
|
var parsePgBytes = getTypeParser(ScalarColumnType.BYTEA);
|
|
111142
|
-
var
|
|
111143
|
-
function normalizeByteaArray(serializedBytesArray) {
|
|
111144
|
-
const buffers = parseBytesArray(serializedBytesArray);
|
|
111145
|
-
return buffers.map((buf) => buf ? encodeBuffer(buf) : null);
|
|
111146
|
-
}
|
|
111147
|
+
var normalizeByteaArray = getTypeParser(ArrayColumnType.BYTEA_ARRAY);
|
|
111147
111148
|
function convertBytes(serializedBytes) {
|
|
111148
|
-
|
|
111149
|
-
return encodeBuffer(buffer);
|
|
111149
|
+
return parsePgBytes(serializedBytes);
|
|
111150
111150
|
}
|
|
111151
111151
|
function normalizeBit(bit) {
|
|
111152
111152
|
return bit;
|
|
@@ -111199,11 +111199,8 @@ ${log32.fields?.reason}`;
|
|
|
111199
111199
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
111200
111200
|
return Buffer.from(arg, "base64");
|
|
111201
111201
|
}
|
|
111202
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
111203
|
-
return Buffer.from(arg);
|
|
111204
|
-
}
|
|
111205
111202
|
if (ArrayBuffer.isView(arg)) {
|
|
111206
|
-
return
|
|
111203
|
+
return new Uint8Array(arg.buffer, arg.byteOffset, arg.byteLength);
|
|
111207
111204
|
}
|
|
111208
111205
|
return arg;
|
|
111209
111206
|
}
|
|
@@ -111283,6 +111280,11 @@ ${log32.fields?.reason}`;
|
|
|
111283
111280
|
kind: "ValueOutOfRange",
|
|
111284
111281
|
cause: error44.message
|
|
111285
111282
|
};
|
|
111283
|
+
case "22P02":
|
|
111284
|
+
return {
|
|
111285
|
+
kind: "InvalidInputValue",
|
|
111286
|
+
message: error44.message
|
|
111287
|
+
};
|
|
111286
111288
|
case "23505": {
|
|
111287
111289
|
const fields = error44.detail?.match(/Key \(([^)]+)\)/)?.at(1)?.split(", ");
|
|
111288
111290
|
return {
|
|
@@ -111721,59 +111723,49 @@ ${log32.fields?.reason}`;
|
|
|
111721
111723
|
* @param transactionId - Transaction ID if running within a transaction
|
|
111722
111724
|
*/
|
|
111723
111725
|
async query(queryPlan, placeholderValues, comments, resourceLimits, transactionId) {
|
|
111724
|
-
|
|
111725
|
-
|
|
111726
|
-
|
|
111727
|
-
|
|
111728
|
-
|
|
111729
|
-
|
|
111730
|
-
|
|
111731
|
-
|
|
111732
|
-
|
|
111733
|
-
|
|
111734
|
-
|
|
111735
|
-
|
|
111736
|
-
|
|
111737
|
-
sqlCommenter
|
|
111738
|
-
});
|
|
111739
|
-
const result = await Promise.race([
|
|
111740
|
-
queryInterpreter.run(queryPlan, queryable),
|
|
111741
|
-
import_promises3.default.setTimeout(resourceLimits.queryTimeout.total("milliseconds"), void 0, { ref: false }).then(() => {
|
|
111742
|
-
throw new ResourceLimitError("Query timeout exceeded");
|
|
111743
|
-
})
|
|
111744
|
-
]);
|
|
111745
|
-
return normalizeJsonProtocolValues(result);
|
|
111726
|
+
const queryable = transactionId !== null ? await this.#transactionManager.getTransaction({ id: transactionId }, "query") : this.#db;
|
|
111727
|
+
const sqlCommenter = comments && Object.keys(comments).length > 0 ? {
|
|
111728
|
+
plugins: [() => comments],
|
|
111729
|
+
// For pre-computed comments, we use a placeholder queryInfo since the actual
|
|
111730
|
+
// query info was already used on the client side to compute the comments
|
|
111731
|
+
queryInfo: { type: "single", action: "queryRaw", query: {} }
|
|
111732
|
+
} : void 0;
|
|
111733
|
+
const queryInterpreter = QueryInterpreter.forSql({
|
|
111734
|
+
placeholderValues,
|
|
111735
|
+
tracingHelper: this.#tracingHandler,
|
|
111736
|
+
transactionManager: transactionId === null ? { enabled: true, manager: this.#transactionManager } : { enabled: false },
|
|
111737
|
+
onQuery: logQuery,
|
|
111738
|
+
sqlCommenter
|
|
111746
111739
|
});
|
|
111740
|
+
const result = await Promise.race([
|
|
111741
|
+
queryInterpreter.run(queryPlan, queryable),
|
|
111742
|
+
import_promises3.default.setTimeout(resourceLimits.queryTimeout.total("milliseconds"), void 0, { ref: false }).then(() => {
|
|
111743
|
+
throw new ResourceLimitError("Query timeout exceeded");
|
|
111744
|
+
})
|
|
111745
|
+
]);
|
|
111746
|
+
return normalizeJsonProtocolValues(result);
|
|
111747
111747
|
}
|
|
111748
111748
|
/**
|
|
111749
111749
|
* Starts a new transaction.
|
|
111750
111750
|
*/
|
|
111751
111751
|
async startTransaction(options, resourceLimits) {
|
|
111752
|
-
|
|
111753
|
-
|
|
111754
|
-
|
|
111755
|
-
|
|
111756
|
-
timeout
|
|
111757
|
-
});
|
|
111752
|
+
const timeout = Math.min(options.timeout ?? Infinity, resourceLimits.maxTransactionTimeout.total("milliseconds"));
|
|
111753
|
+
return this.#transactionManager.startTransaction({
|
|
111754
|
+
...options,
|
|
111755
|
+
timeout
|
|
111758
111756
|
});
|
|
111759
111757
|
}
|
|
111760
111758
|
/**
|
|
111761
111759
|
* Commits a transaction.
|
|
111762
111760
|
*/
|
|
111763
|
-
|
|
111764
|
-
return
|
|
111765
|
-
"commit_transaction",
|
|
111766
|
-
() => this.#transactionManager.commitTransaction(transactionId)
|
|
111767
|
-
);
|
|
111761
|
+
commitTransaction(transactionId) {
|
|
111762
|
+
return this.#transactionManager.commitTransaction(transactionId);
|
|
111768
111763
|
}
|
|
111769
111764
|
/**
|
|
111770
111765
|
* Rolls back a transaction.
|
|
111771
111766
|
*/
|
|
111772
|
-
|
|
111773
|
-
return
|
|
111774
|
-
"rollback_transaction",
|
|
111775
|
-
() => this.#transactionManager.rollbackTransaction(transactionId)
|
|
111776
|
-
);
|
|
111767
|
+
rollbackTransaction(transactionId) {
|
|
111768
|
+
return this.#transactionManager.rollbackTransaction(transactionId);
|
|
111777
111769
|
}
|
|
111778
111770
|
/**
|
|
111779
111771
|
* Retrieves connection information necessary for building the queries.
|
package/dist/index.js
CHANGED
|
@@ -2145,13 +2145,13 @@ async function checkPort(port, host = process.env.HOST, verbose) {
|
|
|
2145
2145
|
return port;
|
|
2146
2146
|
}
|
|
2147
2147
|
|
|
2148
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2148
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
2149
2149
|
function e(e2, t6, n3) {
|
|
2150
2150
|
let r4 = (n4) => e2(n4, ...t6);
|
|
2151
2151
|
return n3 === void 0 ? r4 : Object.assign(r4, { lazy: n3, lazyArgs: t6 });
|
|
2152
2152
|
}
|
|
2153
2153
|
|
|
2154
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2154
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/purry-GjwKKIlp.js
|
|
2155
2155
|
function t(t6, n3, r4) {
|
|
2156
2156
|
let i3 = t6.length - n3.length;
|
|
2157
2157
|
if (i3 === 0)
|
|
@@ -2161,11 +2161,11 @@ function t(t6, n3, r4) {
|
|
|
2161
2161
|
throw Error(`Wrong number of arguments`);
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2164
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/utilityEvaluators-D7O7U3FY.js
|
|
2165
2165
|
var t2 = { done: false, hasNext: false };
|
|
2166
2166
|
var r = (e2) => ({ hasNext: true, next: e2, done: false });
|
|
2167
2167
|
|
|
2168
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2168
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/pipe-CRsqNjLF.js
|
|
2169
2169
|
function t3(e2, ...t6) {
|
|
2170
2170
|
let a = e2, o = t6.map((e3) => `lazy` in e3 ? r2(e3) : void 0), s = 0;
|
|
2171
2171
|
for (; s < t6.length; ) {
|
|
@@ -2218,7 +2218,7 @@ function i(e2) {
|
|
|
2218
2218
|
return typeof e2 == `string` || typeof e2 == `object` && !!e2 && Symbol.iterator in e2;
|
|
2219
2219
|
}
|
|
2220
2220
|
|
|
2221
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2221
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/purryFromLazy-C1RBdBlx.js
|
|
2222
2222
|
function t4(t6, n3) {
|
|
2223
2223
|
let r4 = n3.length - t6.length;
|
|
2224
2224
|
if (r4 === 1) {
|
|
@@ -2232,7 +2232,7 @@ function t4(t6, n3) {
|
|
|
2232
2232
|
throw Error(`Wrong number of arguments`);
|
|
2233
2233
|
}
|
|
2234
2234
|
|
|
2235
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2235
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/difference.js
|
|
2236
2236
|
function r3(...e2) {
|
|
2237
2237
|
return t4(i2, e2);
|
|
2238
2238
|
}
|
|
@@ -2242,13 +2242,13 @@ function i2(n3) {
|
|
|
2242
2242
|
let r4 = /* @__PURE__ */ new Map();
|
|
2243
2243
|
for (let e2 of n3)
|
|
2244
2244
|
r4.set(e2, (r4.get(e2) ?? 0) + 1);
|
|
2245
|
-
return (
|
|
2246
|
-
let n4 = r4.get(
|
|
2247
|
-
return n4 === void 0 || n4 === 0 ? { done: false, hasNext: true, next:
|
|
2245
|
+
return (e2) => {
|
|
2246
|
+
let n4 = r4.get(e2);
|
|
2247
|
+
return n4 === void 0 || n4 === 0 ? { done: false, hasNext: true, next: e2 } : (r4.set(e2, n4 - 1), t2);
|
|
2248
2248
|
};
|
|
2249
2249
|
}
|
|
2250
2250
|
|
|
2251
|
-
// ../../node_modules/.pnpm/remeda@2.
|
|
2251
|
+
// ../../node_modules/.pnpm/remeda@2.33.4/node_modules/remeda/dist/range.js
|
|
2252
2252
|
function t5(...t6) {
|
|
2253
2253
|
return t(n2, t6);
|
|
2254
2254
|
}
|
|
@@ -2744,7 +2744,7 @@ async function getApp(dbServer, serverState) {
|
|
|
2744
2744
|
const { debug: debug3 } = serverState;
|
|
2745
2745
|
const [{ Hono }, { accelerateRoute }, { utilityRoute }] = await Promise.all([
|
|
2746
2746
|
import("hono/tiny"),
|
|
2747
|
-
import("./accelerate-
|
|
2747
|
+
import("./accelerate-65GWNMEW.js"),
|
|
2748
2748
|
import("./utility-GHLCRQFS.js")
|
|
2749
2749
|
]);
|
|
2750
2750
|
const app = new Hono();
|