@prisma/query-plan-executor 6.20.0-dev.7 → 6.20.0-dev.9

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.
Files changed (2) hide show
  1. package/dist/index.js +791 -407
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -324,10 +324,10 @@ var require_utils = __commonJS({
324
324
  }
325
325
  };
326
326
  exports2.Hash = Hash2;
327
- function checkOpts(defaults, opts) {
327
+ function checkOpts(defaults2, opts) {
328
328
  if (opts !== void 0 && {}.toString.call(opts) !== "[object Object]")
329
329
  throw new Error("Options should be object or undefined");
330
- const merged = Object.assign(defaults, opts);
330
+ const merged = Object.assign(defaults2, opts);
331
331
  return merged;
332
332
  }
333
333
  function wrapConstructor(hashCons) {
@@ -9092,20 +9092,20 @@ var require_packet_output_stream = __commonJS({
9092
9092
  writeDefaultStringEscapeQuote(str) {
9093
9093
  this.writeInt8(QUOTE);
9094
9094
  let match;
9095
- let lastIndex2 = 0;
9095
+ let lastIndex = 0;
9096
9096
  while ((match = CHARS_GLOBAL_REGEXP.exec(str)) !== null) {
9097
- this.writeString(str.slice(lastIndex2, match.index));
9097
+ this.writeString(str.slice(lastIndex, match.index));
9098
9098
  this.writeInt8(SLASH);
9099
9099
  this.writeInt8(match[0].charCodeAt(0));
9100
- lastIndex2 = CHARS_GLOBAL_REGEXP.lastIndex;
9100
+ lastIndex = CHARS_GLOBAL_REGEXP.lastIndex;
9101
9101
  }
9102
- if (lastIndex2 === 0) {
9102
+ if (lastIndex === 0) {
9103
9103
  this.writeString(str);
9104
9104
  this.writeInt8(QUOTE);
9105
9105
  return;
9106
9106
  }
9107
- if (lastIndex2 < str.length) {
9108
- this.writeString(str.slice(lastIndex2));
9107
+ if (lastIndex < str.length) {
9108
+ this.writeString(str.slice(lastIndex));
9109
9109
  }
9110
9110
  this.writeInt8(QUOTE);
9111
9111
  }
@@ -13866,7 +13866,7 @@ var require_query = __commonJS({
13866
13866
  var TextEncoder2 = require_text_encoder();
13867
13867
  var { Readable } = require("stream");
13868
13868
  var QUOTE = 39;
13869
- var Query = class extends Parser {
13869
+ var Query2 = class extends Parser {
13870
13870
  constructor(resolve, reject, connOpts, cmdParam) {
13871
13871
  super(resolve, reject, connOpts, cmdParam);
13872
13872
  this.binary = false;
@@ -14169,7 +14169,7 @@ var require_query = __commonJS({
14169
14169
  return this.inStream;
14170
14170
  }
14171
14171
  };
14172
- module2.exports = Query;
14172
+ module2.exports = Query2;
14173
14173
  }
14174
14174
  });
14175
14175
 
@@ -17343,7 +17343,7 @@ var require_connection = __commonJS({
17343
17343
  var Quit = require_quit();
17344
17344
  var Ping = require_ping();
17345
17345
  var Reset = require_reset();
17346
- var Query = require_query();
17346
+ var Query2 = require_query();
17347
17347
  var Prepare = require_prepare();
17348
17348
  var OkPacket = require_ok_packet();
17349
17349
  var Execute = require_execute();
@@ -17382,7 +17382,7 @@ var require_connection = __commonJS({
17382
17382
  return tz;
17383
17383
  };
17384
17384
  var redirectUrlFormat = /(mariadb|mysql):\/\/(([^/@:]+)?(:([^/]+))?@)?(([^/:]+)(:([0-9]+))?)(\/([^?]+)(\?(.*))?)?$/;
17385
- var Connection = class _Connection extends EventEmitter {
17385
+ var Connection2 = class _Connection extends EventEmitter {
17386
17386
  opts;
17387
17387
  sendQueue = new Queue();
17388
17388
  receiveQueue = new Queue();
@@ -18687,7 +18687,7 @@ ${Utils.log(this.opts, packet.buf, packet.pos, packet.end)}`,
18687
18687
  return;
18688
18688
  }
18689
18689
  if (this.receiveQueue.peekFront() || this.info.status & ServerStatus.STATUS_IN_TRANS) {
18690
- const cmd = new Query(resolve, (err) => this._logAndReject(reject, err), this.opts, cmdParam);
18690
+ const cmd = new Query2(resolve, (err) => this._logAndReject(reject, err), this.opts, cmdParam);
18691
18691
  this.addCommand(cmd, true);
18692
18692
  } else resolve();
18693
18693
  }
@@ -18753,7 +18753,7 @@ ${Utils.log(this.opts, packet.buf, packet.pos, packet.end)}`,
18753
18753
  cmdParam.stack
18754
18754
  )
18755
18755
  );
18756
- const cmd = new Query(resolve, (err) => this._logAndReject(reject, err), this.opts, cmdParam);
18756
+ const cmd = new Query2(resolve, (err) => this._logAndReject(reject, err), this.opts, cmdParam);
18757
18757
  this.addCommand(cmd, true);
18758
18758
  }
18759
18759
  prepare(cmdParam, resolve, reject) {
@@ -18891,7 +18891,7 @@ ${Utils.log(this.opts, packet.buf, packet.pos, packet.end)}`,
18891
18891
  this.waitingAuthenticationQueue = new Queue();
18892
18892
  this.addCommand = this.addCommandQueue;
18893
18893
  const tmpQuery = function(sql4, resolve2, reject2) {
18894
- const cmd = new Query(
18894
+ const cmd = new Query2(
18895
18895
  resolve2,
18896
18896
  (err) => {
18897
18897
  if (conn.opts.logger.error) conn.opts.logger.error(err);
@@ -19154,7 +19154,7 @@ ${Utils.log(this.opts, packet.buf, packet.pos, packet.end)}`,
19154
19154
  return this.#socket;
19155
19155
  }
19156
19156
  };
19157
- module2.exports = Connection;
19157
+ module2.exports = Connection2;
19158
19158
  }
19159
19159
  });
19160
19160
 
@@ -19162,9 +19162,9 @@ ${Utils.log(this.opts, packet.buf, packet.pos, packet.end)}`,
19162
19162
  var require_stream = __commonJS({
19163
19163
  "../../node_modules/.pnpm/mariadb@3.4.5/node_modules/mariadb/lib/cmd/stream.js"(exports2, module2) {
19164
19164
  "use strict";
19165
- var Query = require_query();
19165
+ var Query2 = require_query();
19166
19166
  var { Readable } = require("stream");
19167
- var Stream = class extends Query {
19167
+ var Stream = class extends Query2 {
19168
19168
  constructor(cmdParam, connOpts, socket) {
19169
19169
  super(
19170
19170
  () => {
@@ -19533,8 +19533,8 @@ var require_pool = __commonJS({
19533
19533
  var Queue = require_denque();
19534
19534
  var Errors2 = require_errors();
19535
19535
  var Utils = require_utils2();
19536
- var Connection = require_connection();
19537
- var Pool = class extends EventEmitter {
19536
+ var Connection2 = require_connection();
19537
+ var Pool2 = class extends EventEmitter {
19538
19538
  opts;
19539
19539
  #closed = false;
19540
19540
  #connectionInCreation = false;
@@ -19663,7 +19663,7 @@ var require_pool = __commonJS({
19663
19663
  const connectionOpts = Object.assign({}, this.opts.connOptions, {
19664
19664
  connectTimeout: Math.max(1, Math.min(minTimeout, this.opts.connOptions.connectTimeout || Number.MAX_SAFE_INTEGER))
19665
19665
  });
19666
- const conn = new Connection(connectionOpts);
19666
+ const conn = new Connection2(connectionOpts);
19667
19667
  this._connectionCreationTask = null;
19668
19668
  conn.connect().then((conn2) => this._prepareNewConnection(conn2, onSuccess, onError)).catch((err) => this._handleConnectionCreationError(err, onSuccess, onError, timeoutEnd));
19669
19669
  }
@@ -20295,7 +20295,7 @@ var require_pool = __commonJS({
20295
20295
  process.nextTick(this.rejecter, err);
20296
20296
  }
20297
20297
  };
20298
- module2.exports = Pool;
20298
+ module2.exports = Pool2;
20299
20299
  }
20300
20300
  });
20301
20301
 
@@ -20304,14 +20304,14 @@ var require_pool_promise = __commonJS({
20304
20304
  "../../node_modules/.pnpm/mariadb@3.4.5/node_modules/mariadb/lib/pool-promise.js"(exports2, module2) {
20305
20305
  "use strict";
20306
20306
  var { EventEmitter } = require("events");
20307
- var Pool = require_pool();
20307
+ var Pool2 = require_pool();
20308
20308
  var ConnectionPromise = require_connection_promise();
20309
20309
  var Errors2 = require_errors();
20310
20310
  var PoolPromise = class extends EventEmitter {
20311
20311
  #pool;
20312
20312
  constructor(options) {
20313
20313
  super();
20314
- this.#pool = new Pool(options);
20314
+ this.#pool = new Pool2(options);
20315
20315
  this.#pool.on("acquire", this.emit.bind(this, "acquire"));
20316
20316
  this.#pool.on("connection", this.emit.bind(this, "connection"));
20317
20317
  this.#pool.on("enqueue", this.emit.bind(this, "enqueue"));
@@ -20594,7 +20594,7 @@ var require_connection_callback = __commonJS({
20594
20594
  "use strict";
20595
20595
  var Errors2 = require_errors();
20596
20596
  var { Status } = require_connection_status();
20597
- var Query = require_query();
20597
+ var Query2 = require_query();
20598
20598
  var ConnectionCallback = class _ConnectionCallback {
20599
20599
  #conn;
20600
20600
  constructor(conn) {
@@ -20706,7 +20706,7 @@ var require_connection_callback = __commonJS({
20706
20706
  let cmd;
20707
20707
  if (cmdParam.callback) {
20708
20708
  cmdParam.opts = cmdParam.opts ? Object.assign(cmdParam.opts, { metaAsArray: true }) : { metaAsArray: true };
20709
- cmd = new Query(
20709
+ cmd = new Query2(
20710
20710
  ([rows, meta]) => {
20711
20711
  cmdParam.callback(null, rows, meta);
20712
20712
  },
@@ -20715,7 +20715,7 @@ var require_connection_callback = __commonJS({
20715
20715
  cmdParam
20716
20716
  );
20717
20717
  } else {
20718
- cmd = new Query(
20718
+ cmd = new Query2(
20719
20719
  () => {
20720
20720
  },
20721
20721
  () => {
@@ -21055,14 +21055,14 @@ var require_pool_callback = __commonJS({
21055
21055
  "../../node_modules/.pnpm/mariadb@3.4.5/node_modules/mariadb/lib/pool-callback.js"(exports2, module2) {
21056
21056
  "use strict";
21057
21057
  var { EventEmitter } = require("events");
21058
- var Pool = require_pool();
21058
+ var Pool2 = require_pool();
21059
21059
  var Errors2 = require_errors();
21060
21060
  var ConnectionCallback = require_connection_callback();
21061
21061
  var PoolCallback = class extends EventEmitter {
21062
21062
  #pool;
21063
21063
  constructor(options) {
21064
21064
  super();
21065
- this.#pool = new Pool(options);
21065
+ this.#pool = new Pool2(options);
21066
21066
  this.#pool.on("acquire", this.emit.bind(this, "acquire"));
21067
21067
  this.#pool.on("connection", this.emit.bind(this, "connection"));
21068
21068
  this.#pool.on("enqueue", this.emit.bind(this, "enqueue"));
@@ -21837,7 +21837,7 @@ var require_promise = __commonJS({
21837
21837
  "../../node_modules/.pnpm/mariadb@3.4.5/node_modules/mariadb/promise.js"(exports2, module2) {
21838
21838
  "use strict";
21839
21839
  require_check_node();
21840
- var Connection = require_connection();
21840
+ var Connection2 = require_connection();
21841
21841
  var ConnectionPromise = require_connection_promise();
21842
21842
  var PoolPromise = require_pool_promise();
21843
21843
  var Cluster = require_cluster();
@@ -21859,7 +21859,7 @@ var require_promise = __commonJS({
21859
21859
  module2.exports.createConnection = function createConnection(opts) {
21860
21860
  try {
21861
21861
  const options = new ConnOptions(opts);
21862
- const conn = new Connection(options);
21862
+ const conn = new Connection2(options);
21863
21863
  const connPromise = new ConnectionPromise(conn);
21864
21864
  return conn.connect().then(() => Promise.resolve(connPromise));
21865
21865
  } catch (err) {
@@ -21880,7 +21880,7 @@ var require_promise = __commonJS({
21880
21880
  module2.exports.importFile = function importFile(opts) {
21881
21881
  try {
21882
21882
  const options = new ConnOptions(opts);
21883
- const conn = new Connection(options);
21883
+ const conn = new Connection2(options);
21884
21884
  return conn.connect().then(() => {
21885
21885
  return new Promise(conn.importFile.bind(conn, Object.assign({ skipDbCheck: true }, opts)));
21886
21886
  }).finally(() => {
@@ -23369,7 +23369,7 @@ var require_Pool = __commonJS({
23369
23369
  var utils_1 = require_utils3();
23370
23370
  var events_1 = require("events");
23371
23371
  var timers_1 = require("timers");
23372
- var Pool = class {
23372
+ var Pool2 = class {
23373
23373
  constructor(opt) {
23374
23374
  this.destroyed = false;
23375
23375
  this.emitter = new events_1.EventEmitter();
@@ -23753,7 +23753,7 @@ var require_Pool = __commonJS({
23753
23753
  });
23754
23754
  }
23755
23755
  };
23756
- exports2.Pool = Pool;
23756
+ exports2.Pool = Pool2;
23757
23757
  function remove(arr, item) {
23758
23758
  const idx = arr.indexOf(item);
23759
23759
  if (idx === -1) {
@@ -39431,7 +39431,7 @@ var require_form_data = __commonJS({
39431
39431
  });
39432
39432
  };
39433
39433
  FormData2.prototype.submit = function(params, cb) {
39434
- var request3, options, defaults = { method: "post" };
39434
+ var request3, options, defaults2 = { method: "post" };
39435
39435
  if (typeof params == "string") {
39436
39436
  params = parseUrl(params);
39437
39437
  options = populate({
@@ -39439,9 +39439,9 @@ var require_form_data = __commonJS({
39439
39439
  path: params.pathname,
39440
39440
  host: params.hostname,
39441
39441
  protocol: params.protocol
39442
- }, defaults);
39442
+ }, defaults2);
39443
39443
  } else {
39444
- options = populate(params, defaults);
39444
+ options = populate(params, defaults2);
39445
39445
  if (!options.port) {
39446
39446
  options.port = options.protocol == "https:" ? 443 : 80;
39447
39447
  }
@@ -49798,11 +49798,11 @@ ${serverError}`);
49798
49798
  if (cacheRecord.accessToken) {
49799
49799
  if (cacheRecord.accessToken.tokenType === AuthenticationScheme.POP && !request3.popKid) {
49800
49800
  const popTokenGenerator = new PopTokenGenerator(cryptoObj);
49801
- const { secret, keyId } = cacheRecord.accessToken;
49801
+ const { secret: secret2, keyId } = cacheRecord.accessToken;
49802
49802
  if (!keyId) {
49803
49803
  throw createClientAuthError(keyIdMissing);
49804
49804
  }
49805
- accessToken = await popTokenGenerator.signPopToken(secret, keyId, request3);
49805
+ accessToken = await popTokenGenerator.signPopToken(secret2, keyId, request3);
49806
49806
  } else {
49807
49807
  accessToken = cacheRecord.accessToken.secret;
49808
49808
  }
@@ -52889,17 +52889,17 @@ var require_jwa = __commonJS({
52889
52889
  return thing;
52890
52890
  }
52891
52891
  function createHmacSigner(bits) {
52892
- return function sign2(thing, secret) {
52893
- checkIsSecretKey(secret);
52892
+ return function sign2(thing, secret2) {
52893
+ checkIsSecretKey(secret2);
52894
52894
  thing = normalizeInput(thing);
52895
- var hmac = crypto7.createHmac("sha" + bits, secret);
52895
+ var hmac = crypto7.createHmac("sha" + bits, secret2);
52896
52896
  var sig = (hmac.update(thing), hmac.digest("base64"));
52897
52897
  return fromBase64(sig);
52898
52898
  };
52899
52899
  }
52900
52900
  function createHmacVerifier(bits) {
52901
- return function verify(thing, signature, secret) {
52902
- var computedSig = createHmacSigner(bits)(thing, secret);
52901
+ return function verify(thing, signature, secret2) {
52902
+ var computedSig = createHmacSigner(bits)(thing, secret2);
52903
52903
  return bufferEqual(Buffer2.from(signature), Buffer2.from(computedSig));
52904
52904
  };
52905
52905
  }
@@ -53048,8 +53048,8 @@ var require_sign_stream = __commonJS({
53048
53048
  return util2.format("%s.%s", securedInput, signature);
53049
53049
  }
53050
53050
  function SignStream(opts) {
53051
- var secret = opts.secret || opts.privateKey || opts.key;
53052
- var secretStream = new DataStream(secret);
53051
+ var secret2 = opts.secret || opts.privateKey || opts.key;
53052
+ var secretStream = new DataStream(secret2);
53053
53053
  this.readable = true;
53054
53054
  this.header = opts.header;
53055
53055
  this.encoding = opts.encoding;
@@ -58084,13 +58084,13 @@ var init_AzureArc = __esm({
58084
58084
  if (secretFileSize > AZURE_ARC_SECRET_FILE_MAX_SIZE_BYTES) {
58085
58085
  throw createManagedIdentityError(invalidSecret);
58086
58086
  }
58087
- let secret;
58087
+ let secret2;
58088
58088
  try {
58089
- secret = (0, import_fs2.readFileSync)(secretFilePath, "utf-8");
58089
+ secret2 = (0, import_fs2.readFileSync)(secretFilePath, "utf-8");
58090
58090
  } catch (e2) {
58091
58091
  throw createManagedIdentityError(unableToReadSecretFile);
58092
58092
  }
58093
- const authHeaderValue = `Basic ${secret}`;
58093
+ const authHeaderValue = `Basic ${secret2}`;
58094
58094
  this.logger.info(`[Managed Identity] Adding authorization header to the request.`);
58095
58095
  networkRequest.headers[AUTHORIZATION_HEADER_NAME] = authHeaderValue;
58096
58096
  try {
@@ -61332,9 +61332,9 @@ var require_define_lazy_prop = __commonJS({
61332
61332
  }
61333
61333
  });
61334
61334
 
61335
- // ../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js
61335
+ // ../../node_modules/.pnpm/open@8.4.2/node_modules/open/index.js
61336
61336
  var require_open = __commonJS({
61337
- "../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js"(exports2, module2) {
61337
+ "../../node_modules/.pnpm/open@8.4.2/node_modules/open/index.js"(exports2, module2) {
61338
61338
  "use strict";
61339
61339
  var path3 = require("path");
61340
61340
  var childProcess2 = require("child_process");
@@ -61344,6 +61344,21 @@ var require_open = __commonJS({
61344
61344
  var defineLazyProperty = require_define_lazy_prop();
61345
61345
  var localXdgOpenPath = path3.join(__dirname, "xdg-open");
61346
61346
  var { platform, arch: arch2 } = process;
61347
+ var hasContainerEnv = () => {
61348
+ try {
61349
+ fs3.statSync("/run/.containerenv");
61350
+ return true;
61351
+ } catch {
61352
+ return false;
61353
+ }
61354
+ };
61355
+ var cachedResult;
61356
+ function isInsideContainer() {
61357
+ if (cachedResult === void 0) {
61358
+ cachedResult = hasContainerEnv() || isDocker();
61359
+ }
61360
+ return cachedResult;
61361
+ }
61347
61362
  var getWslDrivesMountPoint = /* @__PURE__ */ (() => {
61348
61363
  const defaultMountPoint = "/mnt/";
61349
61364
  let mountPoint;
@@ -61424,7 +61439,7 @@ var require_open = __commonJS({
61424
61439
  if (app) {
61425
61440
  cliArguments.push("-a", app);
61426
61441
  }
61427
- } else if (platform === "win32" || isWsl && !isDocker()) {
61442
+ } else if (platform === "win32" || isWsl && !isInsideContainer() && !app) {
61428
61443
  const mountPoint = await getWslDrivesMountPoint();
61429
61444
  command = isWsl ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
61430
61445
  cliArguments.push(
@@ -61487,7 +61502,7 @@ var require_open = __commonJS({
61487
61502
  return new Promise((resolve, reject) => {
61488
61503
  subprocess.once("error", reject);
61489
61504
  subprocess.once("close", (exitCode) => {
61490
- if (options.allowNonzeroExitCode && exitCode > 0) {
61505
+ if (!options.allowNonzeroExitCode && exitCode > 0) {
61491
61506
  reject(new Error(`Exited with code ${exitCode}`));
61492
61507
  return;
61493
61508
  }
@@ -84953,13 +84968,13 @@ var require_helpers = __commonJS({
84953
84968
  exports2.readUNumeric96LE = readUNumeric96LE;
84954
84969
  exports2.readUsVarByte = readUsVarByte;
84955
84970
  exports2.readUsVarChar = readUsVarChar;
84956
- var Result = class {
84971
+ var Result2 = class {
84957
84972
  constructor(value, offset) {
84958
84973
  this.value = value;
84959
84974
  this.offset = offset;
84960
84975
  }
84961
84976
  };
84962
- exports2.Result = Result;
84977
+ exports2.Result = Result2;
84963
84978
  var NotEnoughDataError = class extends Error {
84964
84979
  byteCount;
84965
84980
  constructor(byteCount) {
@@ -84973,84 +84988,84 @@ var require_helpers = __commonJS({
84973
84988
  if (buf.length < offset + 1) {
84974
84989
  throw new NotEnoughDataError(offset + 1);
84975
84990
  }
84976
- return new Result(buf.readUInt8(offset), offset + 1);
84991
+ return new Result2(buf.readUInt8(offset), offset + 1);
84977
84992
  }
84978
84993
  function readUInt16LE(buf, offset) {
84979
84994
  offset = +offset;
84980
84995
  if (buf.length < offset + 2) {
84981
84996
  throw new NotEnoughDataError(offset + 2);
84982
84997
  }
84983
- return new Result(buf.readUInt16LE(offset), offset + 2);
84998
+ return new Result2(buf.readUInt16LE(offset), offset + 2);
84984
84999
  }
84985
85000
  function readInt16LE(buf, offset) {
84986
85001
  offset = +offset;
84987
85002
  if (buf.length < offset + 2) {
84988
85003
  throw new NotEnoughDataError(offset + 2);
84989
85004
  }
84990
- return new Result(buf.readInt16LE(offset), offset + 2);
85005
+ return new Result2(buf.readInt16LE(offset), offset + 2);
84991
85006
  }
84992
85007
  function readUInt24LE(buf, offset) {
84993
85008
  offset = +offset;
84994
85009
  if (buf.length < offset + 3) {
84995
85010
  throw new NotEnoughDataError(offset + 3);
84996
85011
  }
84997
- return new Result(buf.readUIntLE(offset, 3), offset + 3);
85012
+ return new Result2(buf.readUIntLE(offset, 3), offset + 3);
84998
85013
  }
84999
85014
  function readUInt32LE(buf, offset) {
85000
85015
  offset = +offset;
85001
85016
  if (buf.length < offset + 4) {
85002
85017
  throw new NotEnoughDataError(offset + 4);
85003
85018
  }
85004
- return new Result(buf.readUInt32LE(offset), offset + 4);
85019
+ return new Result2(buf.readUInt32LE(offset), offset + 4);
85005
85020
  }
85006
85021
  function readUInt32BE(buf, offset) {
85007
85022
  offset = +offset;
85008
85023
  if (buf.length < offset + 4) {
85009
85024
  throw new NotEnoughDataError(offset + 4);
85010
85025
  }
85011
- return new Result(buf.readUInt32BE(offset), offset + 4);
85026
+ return new Result2(buf.readUInt32BE(offset), offset + 4);
85012
85027
  }
85013
85028
  function readUInt40LE(buf, offset) {
85014
85029
  offset = +offset;
85015
85030
  if (buf.length < offset + 5) {
85016
85031
  throw new NotEnoughDataError(offset + 5);
85017
85032
  }
85018
- return new Result(buf.readUIntLE(offset, 5), offset + 5);
85033
+ return new Result2(buf.readUIntLE(offset, 5), offset + 5);
85019
85034
  }
85020
85035
  function readInt32LE(buf, offset) {
85021
85036
  offset = +offset;
85022
85037
  if (buf.length < offset + 4) {
85023
85038
  throw new NotEnoughDataError(offset + 4);
85024
85039
  }
85025
- return new Result(buf.readInt32LE(offset), offset + 4);
85040
+ return new Result2(buf.readInt32LE(offset), offset + 4);
85026
85041
  }
85027
85042
  function readBigUInt64LE(buf, offset) {
85028
85043
  offset = +offset;
85029
85044
  if (buf.length < offset + 8) {
85030
85045
  throw new NotEnoughDataError(offset + 8);
85031
85046
  }
85032
- return new Result(buf.readBigUInt64LE(offset), offset + 8);
85047
+ return new Result2(buf.readBigUInt64LE(offset), offset + 8);
85033
85048
  }
85034
85049
  function readBigInt64LE(buf, offset) {
85035
85050
  offset = +offset;
85036
85051
  if (buf.length < offset + 8) {
85037
85052
  throw new NotEnoughDataError(offset + 8);
85038
85053
  }
85039
- return new Result(buf.readBigInt64LE(offset), offset + 8);
85054
+ return new Result2(buf.readBigInt64LE(offset), offset + 8);
85040
85055
  }
85041
85056
  function readFloatLE(buf, offset) {
85042
85057
  offset = +offset;
85043
85058
  if (buf.length < offset + 4) {
85044
85059
  throw new NotEnoughDataError(offset + 4);
85045
85060
  }
85046
- return new Result(buf.readFloatLE(offset), offset + 4);
85061
+ return new Result2(buf.readFloatLE(offset), offset + 4);
85047
85062
  }
85048
85063
  function readDoubleLE(buf, offset) {
85049
85064
  offset = +offset;
85050
85065
  if (buf.length < offset + 8) {
85051
85066
  throw new NotEnoughDataError(offset + 8);
85052
85067
  }
85053
- return new Result(buf.readDoubleLE(offset), offset + 8);
85068
+ return new Result2(buf.readDoubleLE(offset), offset + 8);
85054
85069
  }
85055
85070
  function readBVarChar(buf, offset) {
85056
85071
  offset = +offset;
@@ -85063,7 +85078,7 @@ var require_helpers = __commonJS({
85063
85078
  if (buf.length < offset + byteLength) {
85064
85079
  throw new NotEnoughDataError(offset + byteLength);
85065
85080
  }
85066
- return new Result(buf.toString("ucs2", offset, offset + byteLength), offset + byteLength);
85081
+ return new Result2(buf.toString("ucs2", offset, offset + byteLength), offset + byteLength);
85067
85082
  }
85068
85083
  function readBVarByte(buf, offset) {
85069
85084
  offset = +offset;
@@ -85075,7 +85090,7 @@ var require_helpers = __commonJS({
85075
85090
  if (buf.length < offset + byteLength) {
85076
85091
  throw new NotEnoughDataError(offset + byteLength);
85077
85092
  }
85078
- return new Result(buf.slice(offset, offset + byteLength), offset + byteLength);
85093
+ return new Result2(buf.slice(offset, offset + byteLength), offset + byteLength);
85079
85094
  }
85080
85095
  function readUsVarChar(buf, offset) {
85081
85096
  offset = +offset;
@@ -85088,7 +85103,7 @@ var require_helpers = __commonJS({
85088
85103
  if (buf.length < offset + byteLength) {
85089
85104
  throw new NotEnoughDataError(offset + byteLength);
85090
85105
  }
85091
- return new Result(buf.toString("ucs2", offset, offset + byteLength), offset + byteLength);
85106
+ return new Result2(buf.toString("ucs2", offset, offset + byteLength), offset + byteLength);
85092
85107
  }
85093
85108
  function readUsVarByte(buf, offset) {
85094
85109
  offset = +offset;
@@ -85100,7 +85115,7 @@ var require_helpers = __commonJS({
85100
85115
  if (buf.length < offset + byteLength) {
85101
85116
  throw new NotEnoughDataError(offset + byteLength);
85102
85117
  }
85103
- return new Result(buf.slice(offset, offset + byteLength), offset + byteLength);
85118
+ return new Result2(buf.slice(offset, offset + byteLength), offset + byteLength);
85104
85119
  }
85105
85120
  function readUNumeric64LE(buf, offset) {
85106
85121
  offset = +offset;
@@ -85109,7 +85124,7 @@ var require_helpers = __commonJS({
85109
85124
  }
85110
85125
  const low = buf.readUInt32LE(offset);
85111
85126
  const high = buf.readUInt32LE(offset + 4);
85112
- return new Result(4294967296 * high + low, offset + 8);
85127
+ return new Result2(4294967296 * high + low, offset + 8);
85113
85128
  }
85114
85129
  function readUNumeric96LE(buf, offset) {
85115
85130
  offset = +offset;
@@ -85119,7 +85134,7 @@ var require_helpers = __commonJS({
85119
85134
  const dword1 = buf.readUInt32LE(offset);
85120
85135
  const dword2 = buf.readUInt32LE(offset + 4);
85121
85136
  const dword3 = buf.readUInt32LE(offset + 8);
85122
- return new Result(dword1 + 4294967296 * dword2 + 4294967296 * 4294967296 * dword3, offset + 12);
85137
+ return new Result2(dword1 + 4294967296 * dword2 + 4294967296 * 4294967296 * dword3, offset + 12);
85123
85138
  }
85124
85139
  function readUNumeric128LE(buf, offset) {
85125
85140
  offset = +offset;
@@ -85130,7 +85145,7 @@ var require_helpers = __commonJS({
85130
85145
  const dword2 = buf.readUInt32LE(offset + 4);
85131
85146
  const dword3 = buf.readUInt32LE(offset + 8);
85132
85147
  const dword4 = buf.readUInt32LE(offset + 12);
85133
- return new Result(dword1 + 4294967296 * dword2 + 4294967296 * 4294967296 * dword3 + 4294967296 * 4294967296 * 4294967296 * dword4, offset + 16);
85148
+ return new Result2(dword1 + 4294967296 * dword2 + 4294967296 * 4294967296 * dword3 + 4294967296 * 4294967296 * 4294967296 * dword4, offset + 16);
85134
85149
  }
85135
85150
  }
85136
85151
  });
@@ -88809,7 +88824,7 @@ var require_connection2 = __commonJS({
88809
88824
  REDIRECT: 1,
88810
88825
  RETRY: 2
88811
88826
  };
88812
- var Connection = class extends _events.EventEmitter {
88827
+ var Connection2 = class extends _events.EventEmitter {
88813
88828
  /**
88814
88829
  * @private
88815
88830
  */
@@ -90721,9 +90736,9 @@ var require_connection2 = __commonJS({
90721
90736
  }
90722
90737
  return error44 instanceof _errors.ConnectionError && !!error44.isTransient;
90723
90738
  }
90724
- var _default3 = exports2.default = Connection;
90725
- module2.exports = Connection;
90726
- Connection.prototype.STATE = {
90739
+ var _default3 = exports2.default = Connection2;
90740
+ module2.exports = Connection2;
90741
+ Connection2.prototype.STATE = {
90727
90742
  INITIALIZED: {
90728
90743
  name: "Initialized",
90729
90744
  events: {}
@@ -92893,11 +92908,11 @@ var require_postgres_interval = __commonJS({
92893
92908
  "use strict";
92894
92909
  var extend3 = require_mutable();
92895
92910
  module2.exports = PostgresInterval;
92896
- function PostgresInterval(raw2) {
92911
+ function PostgresInterval(raw3) {
92897
92912
  if (!(this instanceof PostgresInterval)) {
92898
- return new PostgresInterval(raw2);
92913
+ return new PostgresInterval(raw3);
92899
92914
  }
92900
- extend3(this, parse5(raw2));
92915
+ extend3(this, parse5(raw3));
92901
92916
  }
92902
92917
  var properties = ["seconds", "minutes", "hours", "days", "months", "years"];
92903
92918
  PostgresInterval.prototype.toPostgres = function() {
@@ -93606,9 +93621,9 @@ var require_pg_types = __commonJS({
93606
93621
  }
93607
93622
  });
93608
93623
 
93609
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/defaults.js
93624
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/defaults.js
93610
93625
  var require_defaults = __commonJS({
93611
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/defaults.js"(exports2, module2) {
93626
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/defaults.js"(exports2, module2) {
93612
93627
  "use strict";
93613
93628
  module2.exports = {
93614
93629
  // database host. defaults to localhost
@@ -93668,18 +93683,20 @@ var require_defaults = __commonJS({
93668
93683
  }
93669
93684
  });
93670
93685
 
93671
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/utils.js
93686
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/utils.js
93672
93687
  var require_utils6 = __commonJS({
93673
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/utils.js"(exports2, module2) {
93688
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/utils.js"(exports2, module2) {
93674
93689
  "use strict";
93675
- var defaults = require_defaults();
93690
+ var defaults2 = require_defaults();
93691
+ var util2 = require("util");
93692
+ var { isDate } = util2.types || util2;
93676
93693
  function escapeElement(elementRepresentation) {
93677
- var escaped = elementRepresentation.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
93694
+ const escaped = elementRepresentation.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
93678
93695
  return '"' + escaped + '"';
93679
93696
  }
93680
93697
  function arrayString(val) {
93681
- var result = "{";
93682
- for (var i2 = 0; i2 < val.length; i2++) {
93698
+ let result = "{";
93699
+ for (let i2 = 0; i2 < val.length; i2++) {
93683
93700
  if (i2 > 0) {
93684
93701
  result = result + ",";
93685
93702
  }
@@ -93688,9 +93705,9 @@ var require_utils6 = __commonJS({
93688
93705
  } else if (Array.isArray(val[i2])) {
93689
93706
  result = result + arrayString(val[i2]);
93690
93707
  } else if (ArrayBuffer.isView(val[i2])) {
93691
- var item = val[i2];
93708
+ let item = val[i2];
93692
93709
  if (!(item instanceof Buffer)) {
93693
- var buf = Buffer.from(item.buffer, item.byteOffset, item.byteLength);
93710
+ const buf = Buffer.from(item.buffer, item.byteOffset, item.byteLength);
93694
93711
  if (buf.length === item.byteLength) {
93695
93712
  item = buf;
93696
93713
  } else {
@@ -93714,14 +93731,14 @@ var require_utils6 = __commonJS({
93714
93731
  return val;
93715
93732
  }
93716
93733
  if (ArrayBuffer.isView(val)) {
93717
- var buf = Buffer.from(val.buffer, val.byteOffset, val.byteLength);
93734
+ const buf = Buffer.from(val.buffer, val.byteOffset, val.byteLength);
93718
93735
  if (buf.length === val.byteLength) {
93719
93736
  return buf;
93720
93737
  }
93721
93738
  return buf.slice(val.byteOffset, val.byteOffset + val.byteLength);
93722
93739
  }
93723
- if (val instanceof Date) {
93724
- if (defaults.parseInputDatesAsUTC) {
93740
+ if (isDate(val)) {
93741
+ if (defaults2.parseInputDatesAsUTC) {
93725
93742
  return dateToStringUTC(val);
93726
93743
  } else {
93727
93744
  return dateToString(val);
@@ -93746,11 +93763,11 @@ var require_utils6 = __commonJS({
93746
93763
  return JSON.stringify(val);
93747
93764
  }
93748
93765
  function dateToString(date5) {
93749
- var offset = -date5.getTimezoneOffset();
93750
- var year = date5.getFullYear();
93751
- var isBCYear = year < 1;
93766
+ let offset = -date5.getTimezoneOffset();
93767
+ let year = date5.getFullYear();
93768
+ const isBCYear = year < 1;
93752
93769
  if (isBCYear) year = Math.abs(year) + 1;
93753
- var ret = String(year).padStart(4, "0") + "-" + String(date5.getMonth() + 1).padStart(2, "0") + "-" + String(date5.getDate()).padStart(2, "0") + "T" + String(date5.getHours()).padStart(2, "0") + ":" + String(date5.getMinutes()).padStart(2, "0") + ":" + String(date5.getSeconds()).padStart(2, "0") + "." + String(date5.getMilliseconds()).padStart(3, "0");
93770
+ let ret = String(year).padStart(4, "0") + "-" + String(date5.getMonth() + 1).padStart(2, "0") + "-" + String(date5.getDate()).padStart(2, "0") + "T" + String(date5.getHours()).padStart(2, "0") + ":" + String(date5.getMinutes()).padStart(2, "0") + ":" + String(date5.getSeconds()).padStart(2, "0") + "." + String(date5.getMilliseconds()).padStart(3, "0");
93754
93771
  if (offset < 0) {
93755
93772
  ret += "-";
93756
93773
  offset *= -1;
@@ -93762,10 +93779,10 @@ var require_utils6 = __commonJS({
93762
93779
  return ret;
93763
93780
  }
93764
93781
  function dateToStringUTC(date5) {
93765
- var year = date5.getUTCFullYear();
93766
- var isBCYear = year < 1;
93782
+ let year = date5.getUTCFullYear();
93783
+ const isBCYear = year < 1;
93767
93784
  if (isBCYear) year = Math.abs(year) + 1;
93768
- var ret = String(year).padStart(4, "0") + "-" + String(date5.getUTCMonth() + 1).padStart(2, "0") + "-" + String(date5.getUTCDate()).padStart(2, "0") + "T" + String(date5.getUTCHours()).padStart(2, "0") + ":" + String(date5.getUTCMinutes()).padStart(2, "0") + ":" + String(date5.getUTCSeconds()).padStart(2, "0") + "." + String(date5.getUTCMilliseconds()).padStart(3, "0");
93785
+ let ret = String(year).padStart(4, "0") + "-" + String(date5.getUTCMonth() + 1).padStart(2, "0") + "-" + String(date5.getUTCDate()).padStart(2, "0") + "T" + String(date5.getUTCHours()).padStart(2, "0") + ":" + String(date5.getUTCMinutes()).padStart(2, "0") + ":" + String(date5.getUTCSeconds()).padStart(2, "0") + "." + String(date5.getUTCMilliseconds()).padStart(3, "0");
93769
93786
  ret += "+00:00";
93770
93787
  if (isBCYear) ret += " BC";
93771
93788
  return ret;
@@ -93784,14 +93801,20 @@ var require_utils6 = __commonJS({
93784
93801
  }
93785
93802
  return config3;
93786
93803
  }
93787
- var escapeIdentifier = function(str) {
93804
+ var escapeIdentifier2 = function(str) {
93788
93805
  return '"' + str.replace(/"/g, '""') + '"';
93789
93806
  };
93790
- var escapeLiteral = function(str) {
93791
- var hasBackslash = false;
93792
- var escaped = "'";
93793
- for (var i2 = 0; i2 < str.length; i2++) {
93794
- var c2 = str[i2];
93807
+ var escapeLiteral2 = function(str) {
93808
+ let hasBackslash = false;
93809
+ let escaped = "'";
93810
+ if (str == null) {
93811
+ return "''";
93812
+ }
93813
+ if (typeof str !== "string") {
93814
+ return "''";
93815
+ }
93816
+ for (let i2 = 0; i2 < str.length; i2++) {
93817
+ const c2 = str[i2];
93795
93818
  if (c2 === "'") {
93796
93819
  escaped += c2 + c2;
93797
93820
  } else if (c2 === "\\") {
@@ -93812,23 +93835,23 @@ var require_utils6 = __commonJS({
93812
93835
  return prepareValue(value);
93813
93836
  },
93814
93837
  normalizeQueryConfig,
93815
- escapeIdentifier,
93816
- escapeLiteral
93838
+ escapeIdentifier: escapeIdentifier2,
93839
+ escapeLiteral: escapeLiteral2
93817
93840
  };
93818
93841
  }
93819
93842
  });
93820
93843
 
93821
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/utils-legacy.js
93844
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/utils-legacy.js
93822
93845
  var require_utils_legacy = __commonJS({
93823
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/utils-legacy.js"(exports2, module2) {
93846
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/utils-legacy.js"(exports2, module2) {
93824
93847
  "use strict";
93825
93848
  var nodeCrypto = require("crypto");
93826
93849
  function md5(string4) {
93827
93850
  return nodeCrypto.createHash("md5").update(string4, "utf-8").digest("hex");
93828
93851
  }
93829
93852
  function postgresMd5PasswordHash(user, password, salt) {
93830
- var inner = md5(password + user);
93831
- var outer = md5(Buffer.concat([Buffer.from(inner), salt]));
93853
+ const inner = md5(password + user);
93854
+ const outer = md5(Buffer.concat([Buffer.from(inner), salt]));
93832
93855
  return "md5" + outer;
93833
93856
  }
93834
93857
  function sha2562(text) {
@@ -93856,9 +93879,9 @@ var require_utils_legacy = __commonJS({
93856
93879
  }
93857
93880
  });
93858
93881
 
93859
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/utils-webcrypto.js
93882
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/utils-webcrypto.js
93860
93883
  var require_utils_webcrypto = __commonJS({
93861
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/utils-webcrypto.js"(exports2, module2) {
93884
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/utils-webcrypto.js"(exports2, module2) {
93862
93885
  "use strict";
93863
93886
  var nodeCrypto = require("crypto");
93864
93887
  module2.exports = {
@@ -93886,8 +93909,8 @@ var require_utils_webcrypto = __commonJS({
93886
93909
  }
93887
93910
  }
93888
93911
  async function postgresMd5PasswordHash(user, password, salt) {
93889
- var inner = await md5(password + user);
93890
- var outer = await md5(Buffer.concat([Buffer.from(inner), salt]));
93912
+ const inner = await md5(password + user);
93913
+ const outer = await md5(Buffer.concat([Buffer.from(inner), salt]));
93891
93914
  return "md5" + outer;
93892
93915
  }
93893
93916
  async function sha2562(text) {
@@ -93908,9 +93931,9 @@ var require_utils_webcrypto = __commonJS({
93908
93931
  }
93909
93932
  });
93910
93933
 
93911
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/utils.js
93934
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/utils.js
93912
93935
  var require_utils7 = __commonJS({
93913
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/utils.js"(exports2, module2) {
93936
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/utils.js"(exports2, module2) {
93914
93937
  "use strict";
93915
93938
  var useLegacyCrypto = parseInt(process.versions && process.versions.node && process.versions.node.split(".")[0]) < 15;
93916
93939
  if (useLegacyCrypto) {
@@ -93921,18 +93944,18 @@ var require_utils7 = __commonJS({
93921
93944
  }
93922
93945
  });
93923
93946
 
93924
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/cert-signatures.js
93947
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/cert-signatures.js
93925
93948
  var require_cert_signatures = __commonJS({
93926
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/cert-signatures.js"(exports2, module2) {
93949
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/cert-signatures.js"(exports2, module2) {
93927
93950
  "use strict";
93928
93951
  function x509Error(msg, cert) {
93929
- throw new Error("SASL channel binding: " + msg + " when parsing public certificate " + cert.toString("base64"));
93952
+ return new Error("SASL channel binding: " + msg + " when parsing public certificate " + cert.toString("base64"));
93930
93953
  }
93931
93954
  function readASN1Length(data, index) {
93932
93955
  let length2 = data[index++];
93933
93956
  if (length2 < 128) return { length: length2, index };
93934
93957
  const lengthBytes = length2 & 127;
93935
- if (lengthBytes > 4) x509Error("bad length", data);
93958
+ if (lengthBytes > 4) throw x509Error("bad length", data);
93936
93959
  length2 = 0;
93937
93960
  for (let i2 = 0; i2 < lengthBytes; i2++) {
93938
93961
  length2 = length2 << 8 | data[index++];
@@ -93940,10 +93963,10 @@ var require_cert_signatures = __commonJS({
93940
93963
  return { length: length2, index };
93941
93964
  }
93942
93965
  function readASN1OID(data, index) {
93943
- if (data[index++] !== 6) x509Error("non-OID data", data);
93966
+ if (data[index++] !== 6) throw x509Error("non-OID data", data);
93944
93967
  const { length: OIDLength, index: indexAfterOIDLength } = readASN1Length(data, index);
93945
93968
  index = indexAfterOIDLength;
93946
- lastIndex = index + OIDLength;
93969
+ const lastIndex = index + OIDLength;
93947
93970
  const byte1 = data[index++];
93948
93971
  let oid = (byte1 / 40 >> 0) + "." + byte1 % 40;
93949
93972
  while (index < lastIndex) {
@@ -93958,7 +93981,7 @@ var require_cert_signatures = __commonJS({
93958
93981
  return { oid, index };
93959
93982
  }
93960
93983
  function expectASN1Seq(data, index) {
93961
- if (data[index++] !== 48) x509Error("non-sequence data", data);
93984
+ if (data[index++] !== 48) throw x509Error("non-sequence data", data);
93962
93985
  return readASN1Length(data, index);
93963
93986
  }
93964
93987
  function signatureAlgorithmHashFromCertificate(data, index) {
@@ -93998,10 +94021,10 @@ var require_cert_signatures = __commonJS({
93998
94021
  case "1.2.840.10045.4.3.4":
93999
94022
  return "SHA-512";
94000
94023
  // RSASSA-PSS: hash is indicated separately
94001
- case "1.2.840.113549.1.1.10":
94024
+ case "1.2.840.113549.1.1.10": {
94002
94025
  index = indexAfterOID;
94003
94026
  index = expectASN1Seq(data, index).index;
94004
- if (data[index++] !== 160) x509Error("non-tag data", data);
94027
+ if (data[index++] !== 160) throw x509Error("non-tag data", data);
94005
94028
  index = readASN1Length(data, index).index;
94006
94029
  index = expectASN1Seq(data, index).index;
94007
94030
  const { oid: hashOID } = readASN1OID(data, index);
@@ -94018,7 +94041,8 @@ var require_cert_signatures = __commonJS({
94018
94041
  case "2.16.840.1.101.3.4.2.3":
94019
94042
  return "SHA-512";
94020
94043
  }
94021
- x509Error("unknown hash OID " + hashOID, data);
94044
+ throw x509Error("unknown hash OID " + hashOID, data);
94045
+ }
94022
94046
  // Ed25519 -- see https: return//github.com/openssl/openssl/issues/15477
94023
94047
  case "1.3.101.110":
94024
94048
  case "1.3.101.112":
@@ -94026,17 +94050,17 @@ var require_cert_signatures = __commonJS({
94026
94050
  // Ed448 -- still not in pg 17.2 (if supported, digest would be SHAKE256 x 64 bytes)
94027
94051
  case "1.3.101.111":
94028
94052
  case "1.3.101.113":
94029
- x509Error("Ed448 certificate channel binding is not currently supported by Postgres");
94053
+ throw x509Error("Ed448 certificate channel binding is not currently supported by Postgres");
94030
94054
  }
94031
- x509Error("unknown OID " + oid, data);
94055
+ throw x509Error("unknown OID " + oid, data);
94032
94056
  }
94033
94057
  module2.exports = { signatureAlgorithmHashFromCertificate };
94034
94058
  }
94035
94059
  });
94036
94060
 
94037
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/sasl.js
94061
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/sasl.js
94038
94062
  var require_sasl = __commonJS({
94039
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/crypto/sasl.js"(exports2, module2) {
94063
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/crypto/sasl.js"(exports2, module2) {
94040
94064
  "use strict";
94041
94065
  var crypto7 = require_utils7();
94042
94066
  var { signatureAlgorithmHashFromCertificate } = require_cert_signatures();
@@ -94078,8 +94102,8 @@ var require_sasl = __commonJS({
94078
94102
  } else if (sv.nonce.length === session.clientNonce.length) {
94079
94103
  throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");
94080
94104
  }
94081
- var clientFirstMessageBare = "n=*,r=" + session.clientNonce;
94082
- var serverFirstMessage = "r=" + sv.nonce + ",s=" + sv.salt + ",i=" + sv.iteration;
94105
+ const clientFirstMessageBare = "n=*,r=" + session.clientNonce;
94106
+ const serverFirstMessage = "r=" + sv.nonce + ",s=" + sv.salt + ",i=" + sv.iteration;
94083
94107
  let channelBinding = stream ? "eSws" : "biws";
94084
94108
  if (session.mechanism === "SCRAM-SHA-256-PLUS") {
94085
94109
  const peerCert = stream.getPeerCertificate().raw;
@@ -94089,16 +94113,16 @@ var require_sasl = __commonJS({
94089
94113
  const bindingData = Buffer.concat([Buffer.from("p=tls-server-end-point,,"), Buffer.from(certHash)]);
94090
94114
  channelBinding = bindingData.toString("base64");
94091
94115
  }
94092
- var clientFinalMessageWithoutProof = "c=" + channelBinding + ",r=" + sv.nonce;
94093
- var authMessage = clientFirstMessageBare + "," + serverFirstMessage + "," + clientFinalMessageWithoutProof;
94094
- var saltBytes = Buffer.from(sv.salt, "base64");
94095
- var saltedPassword = await crypto7.deriveKey(password, saltBytes, sv.iteration);
94096
- var clientKey = await crypto7.hmacSha256(saltedPassword, "Client Key");
94097
- var storedKey = await crypto7.sha256(clientKey);
94098
- var clientSignature = await crypto7.hmacSha256(storedKey, authMessage);
94099
- var clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString("base64");
94100
- var serverKey = await crypto7.hmacSha256(saltedPassword, "Server Key");
94101
- var serverSignatureBytes = await crypto7.hmacSha256(serverKey, authMessage);
94116
+ const clientFinalMessageWithoutProof = "c=" + channelBinding + ",r=" + sv.nonce;
94117
+ const authMessage = clientFirstMessageBare + "," + serverFirstMessage + "," + clientFinalMessageWithoutProof;
94118
+ const saltBytes = Buffer.from(sv.salt, "base64");
94119
+ const saltedPassword = await crypto7.deriveKey(password, saltBytes, sv.iteration);
94120
+ const clientKey = await crypto7.hmacSha256(saltedPassword, "Client Key");
94121
+ const storedKey = await crypto7.sha256(clientKey);
94122
+ const clientSignature = await crypto7.hmacSha256(storedKey, authMessage);
94123
+ const clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString("base64");
94124
+ const serverKey = await crypto7.hmacSha256(saltedPassword, "Server Key");
94125
+ const serverSignatureBytes = await crypto7.hmacSha256(serverKey, authMessage);
94102
94126
  session.message = "SASLResponse";
94103
94127
  session.serverSignature = Buffer.from(serverSignatureBytes).toString("base64");
94104
94128
  session.response = clientFinalMessageWithoutProof + ",p=" + clientProof;
@@ -94201,17 +94225,17 @@ var require_sasl = __commonJS({
94201
94225
  }
94202
94226
  });
94203
94227
 
94204
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/type-overrides.js
94228
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/type-overrides.js
94205
94229
  var require_type_overrides = __commonJS({
94206
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/type-overrides.js"(exports2, module2) {
94230
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/type-overrides.js"(exports2, module2) {
94207
94231
  "use strict";
94208
94232
  var types3 = require_pg_types();
94209
- function TypeOverrides(userTypes) {
94233
+ function TypeOverrides2(userTypes) {
94210
94234
  this._types = userTypes || types3;
94211
94235
  this.text = {};
94212
94236
  this.binary = {};
94213
94237
  }
94214
- TypeOverrides.prototype.getOverrides = function(format) {
94238
+ TypeOverrides2.prototype.getOverrides = function(format) {
94215
94239
  switch (format) {
94216
94240
  case "text":
94217
94241
  return this.text;
@@ -94221,26 +94245,26 @@ var require_type_overrides = __commonJS({
94221
94245
  return {};
94222
94246
  }
94223
94247
  };
94224
- TypeOverrides.prototype.setTypeParser = function(oid, format, parseFn) {
94248
+ TypeOverrides2.prototype.setTypeParser = function(oid, format, parseFn) {
94225
94249
  if (typeof format === "function") {
94226
94250
  parseFn = format;
94227
94251
  format = "text";
94228
94252
  }
94229
94253
  this.getOverrides(format)[oid] = parseFn;
94230
94254
  };
94231
- TypeOverrides.prototype.getTypeParser = function(oid, format) {
94255
+ TypeOverrides2.prototype.getTypeParser = function(oid, format) {
94232
94256
  format = format || "text";
94233
94257
  return this.getOverrides(format)[oid] || this._types.getTypeParser(oid, format);
94234
94258
  };
94235
- module2.exports = TypeOverrides;
94259
+ module2.exports = TypeOverrides2;
94236
94260
  }
94237
94261
  });
94238
94262
 
94239
- // ../../node_modules/.pnpm/pg-connection-string@2.7.0/node_modules/pg-connection-string/index.js
94263
+ // ../../node_modules/.pnpm/pg-connection-string@2.9.1/node_modules/pg-connection-string/index.js
94240
94264
  var require_pg_connection_string = __commonJS({
94241
- "../../node_modules/.pnpm/pg-connection-string@2.7.0/node_modules/pg-connection-string/index.js"(exports2, module2) {
94265
+ "../../node_modules/.pnpm/pg-connection-string@2.9.1/node_modules/pg-connection-string/index.js"(exports2, module2) {
94242
94266
  "use strict";
94243
- function parse5(str) {
94267
+ function parse5(str, options = {}) {
94244
94268
  if (str.charAt(0) === "/") {
94245
94269
  const config4 = str.split(" ");
94246
94270
  return { host: config4[0], database: config4[1] };
@@ -94249,13 +94273,17 @@ var require_pg_connection_string = __commonJS({
94249
94273
  let result;
94250
94274
  let dummyHost = false;
94251
94275
  if (/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(str)) {
94252
- str = encodeURI(str).replace(/\%25(\d\d)/g, "%$1");
94276
+ str = encodeURI(str).replace(/%25(\d\d)/g, "%$1");
94253
94277
  }
94254
94278
  try {
94255
- result = new URL(str, "postgres://base");
94256
- } catch (e2) {
94257
- result = new URL(str.replace("@/", "@___DUMMY___/"), "postgres://base");
94258
- dummyHost = true;
94279
+ try {
94280
+ result = new URL(str, "postgres://base");
94281
+ } catch (e2) {
94282
+ result = new URL(str.replace("@/", "@___DUMMY___/"), "postgres://base");
94283
+ dummyHost = true;
94284
+ }
94285
+ } catch (err) {
94286
+ err.input && (err.input = "*****REDACTED*****");
94259
94287
  }
94260
94288
  for (const entry of result.searchParams.entries()) {
94261
94289
  config3[entry[0]] = entry[1];
@@ -94298,35 +94326,114 @@ var require_pg_connection_string = __commonJS({
94298
94326
  if (config3.sslrootcert) {
94299
94327
  config3.ssl.ca = fs3.readFileSync(config3.sslrootcert).toString();
94300
94328
  }
94301
- switch (config3.sslmode) {
94302
- case "disable": {
94303
- config3.ssl = false;
94304
- break;
94305
- }
94306
- case "prefer":
94307
- case "require":
94308
- case "verify-ca":
94309
- case "verify-full": {
94310
- break;
94329
+ if (options.useLibpqCompat && config3.uselibpqcompat) {
94330
+ throw new Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");
94331
+ }
94332
+ if (config3.uselibpqcompat === "true" || options.useLibpqCompat) {
94333
+ switch (config3.sslmode) {
94334
+ case "disable": {
94335
+ config3.ssl = false;
94336
+ break;
94337
+ }
94338
+ case "prefer": {
94339
+ config3.ssl.rejectUnauthorized = false;
94340
+ break;
94341
+ }
94342
+ case "require": {
94343
+ if (config3.sslrootcert) {
94344
+ config3.ssl.checkServerIdentity = function() {
94345
+ };
94346
+ } else {
94347
+ config3.ssl.rejectUnauthorized = false;
94348
+ }
94349
+ break;
94350
+ }
94351
+ case "verify-ca": {
94352
+ if (!config3.ssl.ca) {
94353
+ throw new Error(
94354
+ "SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security."
94355
+ );
94356
+ }
94357
+ config3.ssl.checkServerIdentity = function() {
94358
+ };
94359
+ break;
94360
+ }
94361
+ case "verify-full": {
94362
+ break;
94363
+ }
94311
94364
  }
94312
- case "no-verify": {
94313
- config3.ssl.rejectUnauthorized = false;
94314
- break;
94365
+ } else {
94366
+ switch (config3.sslmode) {
94367
+ case "disable": {
94368
+ config3.ssl = false;
94369
+ break;
94370
+ }
94371
+ case "prefer":
94372
+ case "require":
94373
+ case "verify-ca":
94374
+ case "verify-full": {
94375
+ break;
94376
+ }
94377
+ case "no-verify": {
94378
+ config3.ssl.rejectUnauthorized = false;
94379
+ break;
94380
+ }
94315
94381
  }
94316
94382
  }
94317
94383
  return config3;
94318
94384
  }
94385
+ function toConnectionOptions(sslConfig) {
94386
+ const connectionOptions = Object.entries(sslConfig).reduce((c2, [key, value]) => {
94387
+ if (value !== void 0 && value !== null) {
94388
+ c2[key] = value;
94389
+ }
94390
+ return c2;
94391
+ }, {});
94392
+ return connectionOptions;
94393
+ }
94394
+ function toClientConfig(config3) {
94395
+ const poolConfig = Object.entries(config3).reduce((c2, [key, value]) => {
94396
+ if (key === "ssl") {
94397
+ const sslConfig = value;
94398
+ if (typeof sslConfig === "boolean") {
94399
+ c2[key] = sslConfig;
94400
+ }
94401
+ if (typeof sslConfig === "object") {
94402
+ c2[key] = toConnectionOptions(sslConfig);
94403
+ }
94404
+ } else if (value !== void 0 && value !== null) {
94405
+ if (key === "port") {
94406
+ if (value !== "") {
94407
+ const v2 = parseInt(value, 10);
94408
+ if (isNaN(v2)) {
94409
+ throw new Error(`Invalid ${key}: ${value}`);
94410
+ }
94411
+ c2[key] = v2;
94412
+ }
94413
+ } else {
94414
+ c2[key] = value;
94415
+ }
94416
+ }
94417
+ return c2;
94418
+ }, {});
94419
+ return poolConfig;
94420
+ }
94421
+ function parseIntoClientConfig(str) {
94422
+ return toClientConfig(parse5(str));
94423
+ }
94319
94424
  module2.exports = parse5;
94320
94425
  parse5.parse = parse5;
94426
+ parse5.toClientConfig = toClientConfig;
94427
+ parse5.parseIntoClientConfig = parseIntoClientConfig;
94321
94428
  }
94322
94429
  });
94323
94430
 
94324
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/connection-parameters.js
94431
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/connection-parameters.js
94325
94432
  var require_connection_parameters = __commonJS({
94326
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/connection-parameters.js"(exports2, module2) {
94433
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/connection-parameters.js"(exports2, module2) {
94327
94434
  "use strict";
94328
94435
  var dns = require("dns");
94329
- var defaults = require_defaults();
94436
+ var defaults2 = require_defaults();
94330
94437
  var parse5 = require_pg_connection_string().parse;
94331
94438
  var val = function(key, config3, envVar) {
94332
94439
  if (envVar === void 0) {
@@ -94335,7 +94442,7 @@ var require_connection_parameters = __commonJS({
94335
94442
  } else {
94336
94443
  envVar = process.env[envVar];
94337
94444
  }
94338
- return config3[key] || envVar || defaults[key];
94445
+ return config3[key] || envVar || defaults2[key];
94339
94446
  };
94340
94447
  var readSSLConfigFromEnvironment = function() {
94341
94448
  switch (process.env.PGSSLMODE) {
@@ -94349,13 +94456,13 @@ var require_connection_parameters = __commonJS({
94349
94456
  case "no-verify":
94350
94457
  return { rejectUnauthorized: false };
94351
94458
  }
94352
- return defaults.ssl;
94459
+ return defaults2.ssl;
94353
94460
  };
94354
94461
  var quoteParamValue = function(value) {
94355
94462
  return "'" + ("" + value).replace(/\\/g, "\\\\").replace(/'/g, "\\'") + "'";
94356
94463
  };
94357
94464
  var add2 = function(params, config3, paramName) {
94358
- var value = config3[paramName];
94465
+ const value = config3[paramName];
94359
94466
  if (value !== void 0 && value !== null) {
94360
94467
  params.push(paramName + "=" + quoteParamValue(value));
94361
94468
  }
@@ -94419,7 +94526,7 @@ var require_connection_parameters = __commonJS({
94419
94526
  }
94420
94527
  }
94421
94528
  getLibpqConnectionString(cb) {
94422
- var params = [];
94529
+ const params = [];
94423
94530
  add2(params, this, "user");
94424
94531
  add2(params, this, "password");
94425
94532
  add2(params, this, "port");
@@ -94427,7 +94534,7 @@ var require_connection_parameters = __commonJS({
94427
94534
  add2(params, this, "fallback_application_name");
94428
94535
  add2(params, this, "connect_timeout");
94429
94536
  add2(params, this, "options");
94430
- var ssl = typeof this.ssl === "object" ? this.ssl : this.ssl ? { sslmode: this.ssl } : {};
94537
+ const ssl = typeof this.ssl === "object" ? this.ssl : this.ssl ? { sslmode: this.ssl } : {};
94431
94538
  add2(params, ssl, "sslmode");
94432
94539
  add2(params, ssl, "sslca");
94433
94540
  add2(params, ssl, "sslkey");
@@ -94459,13 +94566,13 @@ var require_connection_parameters = __commonJS({
94459
94566
  }
94460
94567
  });
94461
94568
 
94462
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/result.js
94569
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/result.js
94463
94570
  var require_result = __commonJS({
94464
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/result.js"(exports2, module2) {
94571
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/result.js"(exports2, module2) {
94465
94572
  "use strict";
94466
94573
  var types3 = require_pg_types();
94467
94574
  var matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;
94468
- var Result = class {
94575
+ var Result2 = class {
94469
94576
  constructor(rowMode, types4) {
94470
94577
  this.command = null;
94471
94578
  this.rowCount = null;
@@ -94483,7 +94590,7 @@ var require_result = __commonJS({
94483
94590
  }
94484
94591
  // adds a command complete message
94485
94592
  addCommandComplete(msg) {
94486
- var match;
94593
+ let match;
94487
94594
  if (msg.text) {
94488
94595
  match = matchRegexp.exec(msg.text);
94489
94596
  } else {
@@ -94500,9 +94607,9 @@ var require_result = __commonJS({
94500
94607
  }
94501
94608
  }
94502
94609
  _parseRowAsArray(rowData) {
94503
- var row = new Array(rowData.length);
94504
- for (var i2 = 0, len = rowData.length; i2 < len; i2++) {
94505
- var rawValue = rowData[i2];
94610
+ const row = new Array(rowData.length);
94611
+ for (let i2 = 0, len = rowData.length; i2 < len; i2++) {
94612
+ const rawValue = rowData[i2];
94506
94613
  if (rawValue !== null) {
94507
94614
  row[i2] = this._parsers[i2](rawValue);
94508
94615
  } else {
@@ -94512,12 +94619,13 @@ var require_result = __commonJS({
94512
94619
  return row;
94513
94620
  }
94514
94621
  parseRow(rowData) {
94515
- var row = { ...this._prebuiltEmptyResultObject };
94516
- for (var i2 = 0, len = rowData.length; i2 < len; i2++) {
94517
- var rawValue = rowData[i2];
94518
- var field = this.fields[i2].name;
94622
+ const row = { ...this._prebuiltEmptyResultObject };
94623
+ for (let i2 = 0, len = rowData.length; i2 < len; i2++) {
94624
+ const rawValue = rowData[i2];
94625
+ const field = this.fields[i2].name;
94519
94626
  if (rawValue !== null) {
94520
- row[field] = this._parsers[i2](rawValue);
94627
+ const v2 = this.fields[i2].format === "binary" ? Buffer.from(rawValue) : rawValue;
94628
+ row[field] = this._parsers[i2](v2);
94521
94629
  } else {
94522
94630
  row[field] = null;
94523
94631
  }
@@ -94532,9 +94640,9 @@ var require_result = __commonJS({
94532
94640
  if (this.fields.length) {
94533
94641
  this._parsers = new Array(fieldDescriptions.length);
94534
94642
  }
94535
- var row = {};
94536
- for (var i2 = 0; i2 < fieldDescriptions.length; i2++) {
94537
- var desc = fieldDescriptions[i2];
94643
+ const row = {};
94644
+ for (let i2 = 0; i2 < fieldDescriptions.length; i2++) {
94645
+ const desc = fieldDescriptions[i2];
94538
94646
  row[desc.name] = null;
94539
94647
  if (this._types) {
94540
94648
  this._parsers[i2] = this._types.getTypeParser(desc.dataTypeID, desc.format || "text");
@@ -94545,18 +94653,18 @@ var require_result = __commonJS({
94545
94653
  this._prebuiltEmptyResultObject = { ...row };
94546
94654
  }
94547
94655
  };
94548
- module2.exports = Result;
94656
+ module2.exports = Result2;
94549
94657
  }
94550
94658
  });
94551
94659
 
94552
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/query.js
94660
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/query.js
94553
94661
  var require_query2 = __commonJS({
94554
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/query.js"(exports2, module2) {
94662
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/query.js"(exports2, module2) {
94555
94663
  "use strict";
94556
94664
  var { EventEmitter } = require("events");
94557
- var Result = require_result();
94665
+ var Result2 = require_result();
94558
94666
  var utils = require_utils6();
94559
- var Query = class extends EventEmitter {
94667
+ var Query2 = class extends EventEmitter {
94560
94668
  constructor(config3, values, callback) {
94561
94669
  super();
94562
94670
  config3 = utils.normalizeQueryConfig(config3, values, callback);
@@ -94573,7 +94681,7 @@ var require_query2 = __commonJS({
94573
94681
  if (process.domain && config3.callback) {
94574
94682
  this.callback = process.domain.bind(config3.callback);
94575
94683
  }
94576
- this._result = new Result(this._rowMode, this.types);
94684
+ this._result = new Result2(this._rowMode, this.types);
94577
94685
  this._results = this._result;
94578
94686
  this._canceledDueToError = false;
94579
94687
  }
@@ -94600,7 +94708,7 @@ var require_query2 = __commonJS({
94600
94708
  if (!Array.isArray(this._results)) {
94601
94709
  this._results = [this._result];
94602
94710
  }
94603
- this._result = new Result(this._rowMode, this._result._types);
94711
+ this._result = new Result2(this._rowMode, this._result._types);
94604
94712
  this._results.push(this._result);
94605
94713
  }
94606
94714
  }
@@ -94638,7 +94746,7 @@ var require_query2 = __commonJS({
94638
94746
  // if a named prepared statement is created with empty query text
94639
94747
  // the backend will send an emptyQuery message but *not* a command complete message
94640
94748
  // since we pipeline sync immediately after execute we don't need to do anything here
94641
- // unless we have rows specified, in which case we did not pipeline the intial sync call
94749
+ // unless we have rows specified, in which case we did not pipeline the initial sync call
94642
94750
  handleEmptyQuery(connection) {
94643
94751
  if (this.rows) {
94644
94752
  connection.sync();
@@ -94739,17 +94847,16 @@ var require_query2 = __commonJS({
94739
94847
  handleCopyInResponse(connection) {
94740
94848
  connection.sendCopyFail("No source stream defined");
94741
94849
  }
94742
- // eslint-disable-next-line no-unused-vars
94743
94850
  handleCopyData(msg, connection) {
94744
94851
  }
94745
94852
  };
94746
- module2.exports = Query;
94853
+ module2.exports = Query2;
94747
94854
  }
94748
94855
  });
94749
94856
 
94750
- // ../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/messages.js
94857
+ // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/messages.js
94751
94858
  var require_messages = __commonJS({
94752
- "../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/messages.js"(exports2) {
94859
+ "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/messages.js"(exports2) {
94753
94860
  "use strict";
94754
94861
  Object.defineProperty(exports2, "__esModule", { value: true });
94755
94862
  exports2.NoticeMessage = exports2.DataRowMessage = exports2.CommandCompleteMessage = exports2.ReadyForQueryMessage = exports2.NotificationResponseMessage = exports2.BackendKeyDataMessage = exports2.AuthenticationMD5Password = exports2.ParameterStatusMessage = exports2.ParameterDescriptionMessage = exports2.RowDescriptionMessage = exports2.Field = exports2.CopyResponse = exports2.CopyDataMessage = exports2.DatabaseError = exports2.copyDone = exports2.emptyQuery = exports2.replicationStart = exports2.portalSuspended = exports2.noData = exports2.closeComplete = exports2.bindComplete = exports2.parseComplete = void 0;
@@ -94785,14 +94892,14 @@ var require_messages = __commonJS({
94785
94892
  name: "copyDone",
94786
94893
  length: 4
94787
94894
  };
94788
- var DatabaseError = class extends Error {
94895
+ var DatabaseError2 = class extends Error {
94789
94896
  constructor(message, length2, name6) {
94790
94897
  super(message);
94791
94898
  this.length = length2;
94792
94899
  this.name = name6;
94793
94900
  }
94794
94901
  };
94795
- exports2.DatabaseError = DatabaseError;
94902
+ exports2.DatabaseError = DatabaseError2;
94796
94903
  var CopyDataMessage = class {
94797
94904
  constructor(length2, chunk) {
94798
94905
  this.length = length2;
@@ -94912,9 +95019,9 @@ var require_messages = __commonJS({
94912
95019
  }
94913
95020
  });
94914
95021
 
94915
- // ../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/buffer-writer.js
95022
+ // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/buffer-writer.js
94916
95023
  var require_buffer_writer = __commonJS({
94917
- "../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/buffer-writer.js"(exports2) {
95024
+ "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/buffer-writer.js"(exports2) {
94918
95025
  "use strict";
94919
95026
  Object.defineProperty(exports2, "__esModule", { value: true });
94920
95027
  exports2.Writer = void 0;
@@ -94926,10 +95033,10 @@ var require_buffer_writer = __commonJS({
94926
95033
  this.buffer = Buffer.allocUnsafe(size);
94927
95034
  }
94928
95035
  ensure(size) {
94929
- var remaining = this.buffer.length - this.offset;
95036
+ const remaining = this.buffer.length - this.offset;
94930
95037
  if (remaining < size) {
94931
- var oldBuffer = this.buffer;
94932
- var newSize = oldBuffer.length + (oldBuffer.length >> 1) + size;
95038
+ const oldBuffer = this.buffer;
95039
+ const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size;
94933
95040
  this.buffer = Buffer.allocUnsafe(newSize);
94934
95041
  oldBuffer.copy(this.buffer);
94935
95042
  }
@@ -94952,7 +95059,7 @@ var require_buffer_writer = __commonJS({
94952
95059
  if (!string4) {
94953
95060
  this.ensure(1);
94954
95061
  } else {
94955
- var len = Buffer.byteLength(string4);
95062
+ const len = Buffer.byteLength(string4);
94956
95063
  this.ensure(len + 1);
94957
95064
  this.buffer.write(string4, this.offset, "utf-8");
94958
95065
  this.offset += len;
@@ -94961,7 +95068,7 @@ var require_buffer_writer = __commonJS({
94961
95068
  return this;
94962
95069
  }
94963
95070
  addString(string4 = "") {
94964
- var len = Buffer.byteLength(string4);
95071
+ const len = Buffer.byteLength(string4);
94965
95072
  this.ensure(len);
94966
95073
  this.buffer.write(string4, this.offset);
94967
95074
  this.offset += len;
@@ -94982,7 +95089,7 @@ var require_buffer_writer = __commonJS({
94982
95089
  return this.buffer.slice(code ? 0 : 5, this.offset);
94983
95090
  }
94984
95091
  flush(code) {
94985
- var result = this.join(code);
95092
+ const result = this.join(code);
94986
95093
  this.offset = 5;
94987
95094
  this.headerPosition = 0;
94988
95095
  this.buffer = Buffer.allocUnsafe(this.size);
@@ -94993,9 +95100,9 @@ var require_buffer_writer = __commonJS({
94993
95100
  }
94994
95101
  });
94995
95102
 
94996
- // ../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/serializer.js
95103
+ // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/serializer.js
94997
95104
  var require_serializer = __commonJS({
94998
- "../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/serializer.js"(exports2) {
95105
+ "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/serializer.js"(exports2) {
94999
95106
  "use strict";
95000
95107
  Object.defineProperty(exports2, "__esModule", { value: true });
95001
95108
  exports2.serialize = void 0;
@@ -95007,8 +95114,8 @@ var require_serializer = __commonJS({
95007
95114
  writer.addCString(key).addCString(opts[key]);
95008
95115
  }
95009
95116
  writer.addCString("client_encoding").addCString("UTF8");
95010
- var bodyBuffer = writer.addCString("").flush();
95011
- var length2 = bodyBuffer.length + 4;
95117
+ const bodyBuffer = writer.addCString("").flush();
95118
+ const length2 = bodyBuffer.length + 4;
95012
95119
  return new buffer_writer_1.Writer().addInt32(length2).add(bodyBuffer).flush();
95013
95120
  };
95014
95121
  var requestSsl = () => {
@@ -95051,9 +95158,9 @@ var require_serializer = __commonJS({
95051
95158
  console.error("This can cause conflicts and silent errors executing queries");
95052
95159
  }
95053
95160
  const types3 = query3.types || emptyArray;
95054
- var len = types3.length;
95055
- var buffer = writer.addCString(name6).addCString(query3.text).addInt16(len);
95056
- for (var i2 = 0; i2 < len; i2++) {
95161
+ const len = types3.length;
95162
+ const buffer = writer.addCString(name6).addCString(query3.text).addInt16(len);
95163
+ for (let i2 = 0; i2 < len; i2++) {
95057
95164
  buffer.addInt32(types3[i2]);
95058
95165
  }
95059
95166
  return writer.flush(
@@ -95099,6 +95206,7 @@ var require_serializer = __commonJS({
95099
95206
  writeValues(values, config3.valueMapper);
95100
95207
  writer.addInt16(len);
95101
95208
  writer.add(paramWriter.flush());
95209
+ writer.addInt16(1);
95102
95210
  writer.addInt16(
95103
95211
  binary ? 1 : 0
95104
95212
  /* ParamType.STRING */
@@ -95209,9 +95317,9 @@ var require_serializer = __commonJS({
95209
95317
  }
95210
95318
  });
95211
95319
 
95212
- // ../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/buffer-reader.js
95320
+ // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/buffer-reader.js
95213
95321
  var require_buffer_reader = __commonJS({
95214
- "../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/buffer-reader.js"(exports2) {
95322
+ "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/buffer-reader.js"(exports2) {
95215
95323
  "use strict";
95216
95324
  Object.defineProperty(exports2, "__esModule", { value: true });
95217
95325
  exports2.BufferReader = void 0;
@@ -95269,9 +95377,9 @@ var require_buffer_reader = __commonJS({
95269
95377
  }
95270
95378
  });
95271
95379
 
95272
- // ../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/parser.js
95380
+ // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/parser.js
95273
95381
  var require_parser2 = __commonJS({
95274
- "../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/parser.js"(exports2) {
95382
+ "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/parser.js"(exports2) {
95275
95383
  "use strict";
95276
95384
  Object.defineProperty(exports2, "__esModule", { value: true });
95277
95385
  exports2.Parser = void 0;
@@ -95504,15 +95612,17 @@ var require_parser2 = __commonJS({
95504
95612
  }
95505
95613
  break;
95506
95614
  case 10:
95507
- message.name = "authenticationSASL";
95508
- message.mechanisms = [];
95509
- let mechanism;
95510
- do {
95511
- mechanism = this.reader.cstring();
95512
- if (mechanism) {
95513
- message.mechanisms.push(mechanism);
95514
- }
95515
- } while (mechanism);
95615
+ {
95616
+ message.name = "authenticationSASL";
95617
+ message.mechanisms = [];
95618
+ let mechanism;
95619
+ do {
95620
+ mechanism = this.reader.cstring();
95621
+ if (mechanism) {
95622
+ message.mechanisms.push(mechanism);
95623
+ }
95624
+ } while (mechanism);
95625
+ }
95516
95626
  break;
95517
95627
  case 11:
95518
95628
  message.name = "authenticationSASLContinue";
@@ -95560,9 +95670,9 @@ var require_parser2 = __commonJS({
95560
95670
  }
95561
95671
  });
95562
95672
 
95563
- // ../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/index.js
95673
+ // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/index.js
95564
95674
  var require_dist4 = __commonJS({
95565
- "../../node_modules/.pnpm/pg-protocol@1.8.0/node_modules/pg-protocol/dist/index.js"(exports2) {
95675
+ "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/index.js"(exports2) {
95566
95676
  "use strict";
95567
95677
  Object.defineProperty(exports2, "__esModule", { value: true });
95568
95678
  exports2.DatabaseError = exports2.serialize = exports2.parse = void 0;
@@ -95584,22 +95694,18 @@ var require_dist4 = __commonJS({
95584
95694
  }
95585
95695
  });
95586
95696
 
95587
- // ../../node_modules/.pnpm/pg-cloudflare@1.1.1/node_modules/pg-cloudflare/dist/empty.js
95588
- var empty_exports = {};
95589
- __export(empty_exports, {
95590
- default: () => empty_default
95591
- });
95592
- var empty_default;
95593
- var init_empty = __esm({
95594
- "../../node_modules/.pnpm/pg-cloudflare@1.1.1/node_modules/pg-cloudflare/dist/empty.js"() {
95697
+ // ../../node_modules/.pnpm/pg-cloudflare@1.2.7/node_modules/pg-cloudflare/dist/empty.js
95698
+ var require_empty = __commonJS({
95699
+ "../../node_modules/.pnpm/pg-cloudflare@1.2.7/node_modules/pg-cloudflare/dist/empty.js"(exports2) {
95595
95700
  "use strict";
95596
- empty_default = {};
95701
+ Object.defineProperty(exports2, "__esModule", { value: true });
95702
+ exports2.default = {};
95597
95703
  }
95598
95704
  });
95599
95705
 
95600
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/stream.js
95706
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/stream.js
95601
95707
  var require_stream3 = __commonJS({
95602
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/stream.js"(exports2, module2) {
95708
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/stream.js"(exports2, module2) {
95603
95709
  "use strict";
95604
95710
  var { getStream, getSecureStream } = getStreamFuncs();
95605
95711
  module2.exports = {
@@ -95621,7 +95727,7 @@ var require_stream3 = __commonJS({
95621
95727
  return new net.Socket();
95622
95728
  }
95623
95729
  function getSecureStream2(options) {
95624
- var tls = require("tls");
95730
+ const tls = require("tls");
95625
95731
  return tls.connect(options);
95626
95732
  }
95627
95733
  return {
@@ -95631,7 +95737,7 @@ var require_stream3 = __commonJS({
95631
95737
  }
95632
95738
  function getCloudflareStreamFuncs() {
95633
95739
  function getStream2(ssl) {
95634
- const { CloudflareSocket } = (init_empty(), __toCommonJS(empty_exports));
95740
+ const { CloudflareSocket } = require_empty();
95635
95741
  return new CloudflareSocket(ssl);
95636
95742
  }
95637
95743
  function getSecureStream2(options) {
@@ -95664,9 +95770,9 @@ var require_stream3 = __commonJS({
95664
95770
  }
95665
95771
  });
95666
95772
 
95667
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/connection.js
95773
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/connection.js
95668
95774
  var require_connection3 = __commonJS({
95669
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/connection.js"(exports2, module2) {
95775
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/connection.js"(exports2, module2) {
95670
95776
  "use strict";
95671
95777
  var EventEmitter = require("events").EventEmitter;
95672
95778
  var { parse: parse5, serialize: serialize2 } = require_dist4();
@@ -95674,7 +95780,7 @@ var require_connection3 = __commonJS({
95674
95780
  var flushBuffer = serialize2.flush();
95675
95781
  var syncBuffer = serialize2.sync();
95676
95782
  var endBuffer = serialize2.end();
95677
- var Connection = class extends EventEmitter {
95783
+ var Connection2 = class extends EventEmitter {
95678
95784
  constructor(config3) {
95679
95785
  super();
95680
95786
  config3 = config3 || {};
@@ -95689,7 +95795,7 @@ var require_connection3 = __commonJS({
95689
95795
  this.ssl = config3.ssl || false;
95690
95796
  this._ending = false;
95691
95797
  this._emitMessage = false;
95692
- var self2 = this;
95798
+ const self2 = this;
95693
95799
  this.on("newListener", function(eventName) {
95694
95800
  if (eventName === "message") {
95695
95801
  self2._emitMessage = true;
@@ -95697,7 +95803,7 @@ var require_connection3 = __commonJS({
95697
95803
  });
95698
95804
  }
95699
95805
  connect(port, host) {
95700
- var self2 = this;
95806
+ const self2 = this;
95701
95807
  this._connecting = true;
95702
95808
  this.stream.setNoDelay(true);
95703
95809
  this.stream.connect(port, host);
@@ -95721,7 +95827,7 @@ var require_connection3 = __commonJS({
95721
95827
  return this.attachListeners(this.stream);
95722
95828
  }
95723
95829
  this.stream.once("data", function(buffer) {
95724
- var responseCode = buffer.toString("utf8");
95830
+ const responseCode = buffer.toString("utf8");
95725
95831
  switch (responseCode) {
95726
95832
  case "S":
95727
95833
  break;
@@ -95741,7 +95847,7 @@ var require_connection3 = __commonJS({
95741
95847
  options.key = self2.ssl.key;
95742
95848
  }
95743
95849
  }
95744
- var net = require("net");
95850
+ const net = require("net");
95745
95851
  if (net.isIP && net.isIP(host) === 0) {
95746
95852
  options.servername = host;
95747
95853
  }
@@ -95757,7 +95863,7 @@ var require_connection3 = __commonJS({
95757
95863
  }
95758
95864
  attachListeners(stream) {
95759
95865
  parse5(stream, (msg) => {
95760
- var eventName = msg.name === "error" ? "errorMessage" : msg.name;
95866
+ const eventName = msg.name === "error" ? "errorMessage" : msg.name;
95761
95867
  if (this._emitMessage) {
95762
95868
  this.emit("message", msg);
95763
95869
  }
@@ -95844,7 +95950,7 @@ var require_connection3 = __commonJS({
95844
95950
  this._send(serialize2.copyFail(msg));
95845
95951
  }
95846
95952
  };
95847
- module2.exports = Connection;
95953
+ module2.exports = Connection2;
95848
95954
  }
95849
95955
  });
95850
95956
 
@@ -96141,20 +96247,20 @@ var require_lib3 = __commonJS({
96141
96247
  }
96142
96248
  });
96143
96249
 
96144
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/client.js
96250
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/client.js
96145
96251
  var require_client = __commonJS({
96146
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/client.js"(exports2, module2) {
96252
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/client.js"(exports2, module2) {
96147
96253
  "use strict";
96148
96254
  var EventEmitter = require("events").EventEmitter;
96149
96255
  var utils = require_utils6();
96150
96256
  var sasl = require_sasl();
96151
- var TypeOverrides = require_type_overrides();
96257
+ var TypeOverrides2 = require_type_overrides();
96152
96258
  var ConnectionParameters = require_connection_parameters();
96153
- var Query = require_query2();
96154
- var defaults = require_defaults();
96155
- var Connection = require_connection3();
96259
+ var Query2 = require_query2();
96260
+ var defaults2 = require_defaults();
96261
+ var Connection2 = require_connection3();
96156
96262
  var crypto7 = require_utils7();
96157
- var Client = class extends EventEmitter {
96263
+ var Client2 = class extends EventEmitter {
96158
96264
  constructor(config3) {
96159
96265
  super();
96160
96266
  this.connectionParameters = new ConnectionParameters(config3);
@@ -96169,9 +96275,9 @@ var require_client = __commonJS({
96169
96275
  value: this.connectionParameters.password
96170
96276
  });
96171
96277
  this.replication = this.connectionParameters.replication;
96172
- var c2 = config3 || {};
96278
+ const c2 = config3 || {};
96173
96279
  this._Promise = c2.Promise || global.Promise;
96174
- this._types = new TypeOverrides(c2.types);
96280
+ this._types = new TypeOverrides2(c2.types);
96175
96281
  this._ending = false;
96176
96282
  this._ended = false;
96177
96283
  this._connecting = false;
@@ -96179,7 +96285,7 @@ var require_client = __commonJS({
96179
96285
  this._connectionError = false;
96180
96286
  this._queryable = true;
96181
96287
  this.enableChannelBinding = Boolean(c2.enableChannelBinding);
96182
- this.connection = c2.connection || new Connection({
96288
+ this.connection = c2.connection || new Connection2({
96183
96289
  stream: c2.stream,
96184
96290
  ssl: this.connectionParameters.ssl,
96185
96291
  keepAlive: c2.keepAlive || false,
@@ -96187,7 +96293,7 @@ var require_client = __commonJS({
96187
96293
  encoding: this.connectionParameters.client_encoding || "utf8"
96188
96294
  });
96189
96295
  this.queryQueue = [];
96190
- this.binary = c2.binary || defaults.binary;
96296
+ this.binary = c2.binary || defaults2.binary;
96191
96297
  this.processID = null;
96192
96298
  this.secretKey = null;
96193
96299
  this.ssl = this.connectionParameters.ssl || false;
@@ -96212,8 +96318,8 @@ var require_client = __commonJS({
96212
96318
  this.queryQueue.length = 0;
96213
96319
  }
96214
96320
  _connect(callback) {
96215
- var self2 = this;
96216
- var con = this.connection;
96321
+ const self2 = this;
96322
+ const con = this.connection;
96217
96323
  this._connectionCallback = callback;
96218
96324
  if (this._connecting || this._connected) {
96219
96325
  const err = new Error("Client has already been connected. You cannot reuse a client.");
@@ -96409,7 +96515,7 @@ var require_client = __commonJS({
96409
96515
  }
96410
96516
  this._pulseQueryQueue();
96411
96517
  }
96412
- // if we receieve an error event or error message
96518
+ // if we receive an error event or error message
96413
96519
  // during the connection process we handle it here
96414
96520
  _handleErrorWhileConnecting(err) {
96415
96521
  if (this._connectionError) {
@@ -96489,12 +96595,12 @@ var require_client = __commonJS({
96489
96595
  this.emit("notice", msg);
96490
96596
  }
96491
96597
  getStartupConf() {
96492
- var params = this.connectionParameters;
96493
- var data = {
96598
+ const params = this.connectionParameters;
96599
+ const data = {
96494
96600
  user: params.user,
96495
96601
  database: params.database
96496
96602
  };
96497
- var appName = params.application_name || params.fallback_application_name;
96603
+ const appName = params.application_name || params.fallback_application_name;
96498
96604
  if (appName) {
96499
96605
  data.application_name = appName;
96500
96606
  }
@@ -96517,7 +96623,7 @@ var require_client = __commonJS({
96517
96623
  }
96518
96624
  cancel(client, query2) {
96519
96625
  if (client.activeQuery === query2) {
96520
- var con = this.connection;
96626
+ const con = this.connection;
96521
96627
  if (this.host && this.host.indexOf("/") === 0) {
96522
96628
  con.connect(this.host + "/.s.PGSQL." + this.port);
96523
96629
  } else {
@@ -96566,11 +96672,11 @@ var require_client = __commonJS({
96566
96672
  }
96567
96673
  }
96568
96674
  query(config3, values, callback) {
96569
- var query2;
96570
- var result;
96571
- var readTimeout;
96572
- var readTimeoutTimer;
96573
- var queryCallback;
96675
+ let query2;
96676
+ let result;
96677
+ let readTimeout;
96678
+ let readTimeoutTimer;
96679
+ let queryCallback;
96574
96680
  if (config3 === null || config3 === void 0) {
96575
96681
  throw new TypeError("Client was passed a null or undefined query");
96576
96682
  } else if (typeof config3.submit === "function") {
@@ -96581,7 +96687,7 @@ var require_client = __commonJS({
96581
96687
  }
96582
96688
  } else {
96583
96689
  readTimeout = config3.query_timeout || this.connectionParameters.query_timeout;
96584
- query2 = new Query(config3, values, callback);
96690
+ query2 = new Query2(config3, values, callback);
96585
96691
  if (!query2.callback) {
96586
96692
  result = new this._Promise((resolve, reject) => {
96587
96693
  query2.callback = (err, res) => err ? reject(err) : resolve(res);
@@ -96594,14 +96700,14 @@ var require_client = __commonJS({
96594
96700
  if (readTimeout) {
96595
96701
  queryCallback = query2.callback;
96596
96702
  readTimeoutTimer = setTimeout(() => {
96597
- var error44 = new Error("Query read timeout");
96703
+ const error44 = new Error("Query read timeout");
96598
96704
  process.nextTick(() => {
96599
96705
  query2.handleError(error44, this.connection);
96600
96706
  });
96601
96707
  queryCallback(error44);
96602
96708
  query2.callback = () => {
96603
96709
  };
96604
- var index = this.queryQueue.indexOf(query2);
96710
+ const index = this.queryQueue.indexOf(query2);
96605
96711
  if (index > -1) {
96606
96712
  this.queryQueue.splice(index, 1);
96607
96713
  }
@@ -96663,14 +96769,14 @@ var require_client = __commonJS({
96663
96769
  }
96664
96770
  }
96665
96771
  };
96666
- Client.Query = Query;
96667
- module2.exports = Client;
96772
+ Client2.Query = Query2;
96773
+ module2.exports = Client2;
96668
96774
  }
96669
96775
  });
96670
96776
 
96671
- // ../../node_modules/.pnpm/pg-pool@3.8.0_pg@8.14.1/node_modules/pg-pool/index.js
96777
+ // ../../node_modules/.pnpm/pg-pool@3.10.1_pg@8.16.3/node_modules/pg-pool/index.js
96672
96778
  var require_pg_pool = __commonJS({
96673
- "../../node_modules/.pnpm/pg-pool@3.8.0_pg@8.14.1/node_modules/pg-pool/index.js"(exports2, module2) {
96779
+ "../../node_modules/.pnpm/pg-pool@3.10.1_pg@8.16.3/node_modules/pg-pool/index.js"(exports2, module2) {
96674
96780
  "use strict";
96675
96781
  var EventEmitter = require("events").EventEmitter;
96676
96782
  var NOOP = function() {
@@ -96723,8 +96829,8 @@ var require_pg_pool = __commonJS({
96723
96829
  pool2.emit("error", err, client);
96724
96830
  };
96725
96831
  }
96726
- var Pool = class extends EventEmitter {
96727
- constructor(options, Client) {
96832
+ var Pool2 = class extends EventEmitter {
96833
+ constructor(options, Client2) {
96728
96834
  super();
96729
96835
  this.options = Object.assign({}, options);
96730
96836
  if (options != null && "password" in options) {
@@ -96741,12 +96847,13 @@ var require_pg_pool = __commonJS({
96741
96847
  });
96742
96848
  }
96743
96849
  this.options.max = this.options.max || this.options.poolSize || 10;
96850
+ this.options.min = this.options.min || 0;
96744
96851
  this.options.maxUses = this.options.maxUses || Infinity;
96745
96852
  this.options.allowExitOnIdle = this.options.allowExitOnIdle || false;
96746
96853
  this.options.maxLifetimeSeconds = this.options.maxLifetimeSeconds || 0;
96747
96854
  this.log = this.options.log || function() {
96748
96855
  };
96749
- this.Client = this.options.Client || Client || require_lib4().Client;
96856
+ this.Client = this.options.Client || Client2 || require_lib4().Client;
96750
96857
  this.Promise = this.options.Promise || global.Promise;
96751
96858
  if (typeof this.options.idleTimeoutMillis === "undefined") {
96752
96859
  this.options.idleTimeoutMillis = 1e4;
@@ -96762,6 +96869,9 @@ var require_pg_pool = __commonJS({
96762
96869
  _isFull() {
96763
96870
  return this._clients.length >= this.options.max;
96764
96871
  }
96872
+ _isAboveMin() {
96873
+ return this._clients.length > this.options.min;
96874
+ }
96765
96875
  _pulseQueue() {
96766
96876
  this.log("pulse queue");
96767
96877
  if (this.ended) {
@@ -96802,14 +96912,19 @@ var require_pg_pool = __commonJS({
96802
96912
  }
96803
96913
  throw new Error("unexpected condition");
96804
96914
  }
96805
- _remove(client) {
96915
+ _remove(client, callback) {
96806
96916
  const removed = removeWhere(this._idle, (item) => item.client === client);
96807
96917
  if (removed !== void 0) {
96808
96918
  clearTimeout(removed.timeoutId);
96809
96919
  }
96810
96920
  this._clients = this._clients.filter((c2) => c2 !== client);
96811
- client.end();
96812
- this.emit("remove", client);
96921
+ const context2 = this;
96922
+ client.end(() => {
96923
+ context2.emit("remove", client);
96924
+ if (typeof callback === "function") {
96925
+ callback();
96926
+ }
96927
+ });
96813
96928
  }
96814
96929
  connect(cb) {
96815
96930
  if (this.ending) {
@@ -96947,23 +97062,19 @@ var require_pg_pool = __commonJS({
96947
97062
  if (client._poolUseCount >= this.options.maxUses) {
96948
97063
  this.log("remove expended client");
96949
97064
  }
96950
- this._remove(client);
96951
- this._pulseQueue();
96952
- return;
97065
+ return this._remove(client, this._pulseQueue.bind(this));
96953
97066
  }
96954
97067
  const isExpired = this._expired.has(client);
96955
97068
  if (isExpired) {
96956
97069
  this.log("remove expired client");
96957
97070
  this._expired.delete(client);
96958
- this._remove(client);
96959
- this._pulseQueue();
96960
- return;
97071
+ return this._remove(client, this._pulseQueue.bind(this));
96961
97072
  }
96962
97073
  let tid;
96963
- if (this.options.idleTimeoutMillis) {
97074
+ if (this.options.idleTimeoutMillis && this._isAboveMin()) {
96964
97075
  tid = setTimeout(() => {
96965
97076
  this.log("remove idle client");
96966
- this._remove(client);
97077
+ this._remove(client, this._pulseQueue.bind(this));
96967
97078
  }, this.options.idleTimeoutMillis);
96968
97079
  if (this.options.allowExitOnIdle) {
96969
97080
  tid.unref();
@@ -97050,13 +97161,13 @@ var require_pg_pool = __commonJS({
97050
97161
  return this._clients.length;
97051
97162
  }
97052
97163
  };
97053
- module2.exports = Pool;
97164
+ module2.exports = Pool2;
97054
97165
  }
97055
97166
  });
97056
97167
 
97057
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/native/query.js
97168
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/native/query.js
97058
97169
  var require_query3 = __commonJS({
97059
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/native/query.js"(exports2, module2) {
97170
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/native/query.js"(exports2, module2) {
97060
97171
  "use strict";
97061
97172
  var EventEmitter = require("events").EventEmitter;
97062
97173
  var util2 = require("util");
@@ -97081,7 +97192,6 @@ var require_query3 = __commonJS({
97081
97192
  };
97082
97193
  util2.inherits(NativeQuery, EventEmitter);
97083
97194
  var errorFieldMap = {
97084
- /* eslint-disable quote-props */
97085
97195
  sqlState: "code",
97086
97196
  statementPosition: "position",
97087
97197
  messagePrimary: "message",
@@ -97096,10 +97206,10 @@ var require_query3 = __commonJS({
97096
97206
  sourceFunction: "routine"
97097
97207
  };
97098
97208
  NativeQuery.prototype.handleError = function(err) {
97099
- var fields = this.native.pq.resultErrorFields();
97209
+ const fields = this.native.pq.resultErrorFields();
97100
97210
  if (fields) {
97101
- for (var key in fields) {
97102
- var normalizedFieldName = errorFieldMap[key] || key;
97211
+ for (const key in fields) {
97212
+ const normalizedFieldName = errorFieldMap[key] || key;
97103
97213
  err[normalizedFieldName] = fields[key];
97104
97214
  }
97105
97215
  }
@@ -97128,10 +97238,10 @@ var require_query3 = __commonJS({
97128
97238
  };
97129
97239
  NativeQuery.prototype.submit = function(client) {
97130
97240
  this.state = "running";
97131
- var self2 = this;
97241
+ const self2 = this;
97132
97242
  this.native = client.native;
97133
97243
  client.native.arrayMode = this._arrayMode;
97134
- var after = function(err, rows, results) {
97244
+ let after = function(err, rows, results) {
97135
97245
  client.native.arrayMode = false;
97136
97246
  setImmediate(function() {
97137
97247
  self2.emit("_done");
@@ -97167,7 +97277,7 @@ var require_query3 = __commonJS({
97167
97277
  console.error("You supplied %s (%s)", this.name, this.name.length);
97168
97278
  console.error("This can cause conflicts and silent errors executing queries");
97169
97279
  }
97170
- var values = (this.values || []).map(utils.prepareValue);
97280
+ const values = (this.values || []).map(utils.prepareValue);
97171
97281
  if (client.namedQueries[this.name]) {
97172
97282
  if (this.text && client.namedQueries[this.name] !== this.text) {
97173
97283
  const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);
@@ -97185,7 +97295,7 @@ var require_query3 = __commonJS({
97185
97295
  const err = new Error("Query values must be an array");
97186
97296
  return after(err);
97187
97297
  }
97188
- var vals = this.values.map(utils.prepareValue);
97298
+ const vals = this.values.map(utils.prepareValue);
97189
97299
  client.native.query(this.text, vals, after);
97190
97300
  } else if (this.queryMode === "extended") {
97191
97301
  client.native.query(this.text, [], after);
@@ -97196,9 +97306,9 @@ var require_query3 = __commonJS({
97196
97306
  }
97197
97307
  });
97198
97308
 
97199
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/native/client.js
97309
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/native/client.js
97200
97310
  var require_client2 = __commonJS({
97201
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/native/client.js"(exports2, module2) {
97311
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/native/client.js"(exports2, module2) {
97202
97312
  "use strict";
97203
97313
  var Native;
97204
97314
  try {
@@ -97206,16 +97316,16 @@ var require_client2 = __commonJS({
97206
97316
  } catch (e2) {
97207
97317
  throw e2;
97208
97318
  }
97209
- var TypeOverrides = require_type_overrides();
97319
+ var TypeOverrides2 = require_type_overrides();
97210
97320
  var EventEmitter = require("events").EventEmitter;
97211
97321
  var util2 = require("util");
97212
97322
  var ConnectionParameters = require_connection_parameters();
97213
97323
  var NativeQuery = require_query3();
97214
- var Client = module2.exports = function(config3) {
97324
+ var Client2 = module2.exports = function(config3) {
97215
97325
  EventEmitter.call(this);
97216
97326
  config3 = config3 || {};
97217
97327
  this._Promise = config3.Promise || global.Promise;
97218
- this._types = new TypeOverrides(config3.types);
97328
+ this._types = new TypeOverrides2(config3.types);
97219
97329
  this.native = new Native({
97220
97330
  types: this._types
97221
97331
  });
@@ -97224,7 +97334,7 @@ var require_client2 = __commonJS({
97224
97334
  this._connecting = false;
97225
97335
  this._connected = false;
97226
97336
  this._queryable = true;
97227
- var cp = this.connectionParameters = new ConnectionParameters(config3);
97337
+ const cp = this.connectionParameters = new ConnectionParameters(config3);
97228
97338
  if (config3.nativeConnectionString) cp.nativeConnectionString = config3.nativeConnectionString;
97229
97339
  this.user = cp.user;
97230
97340
  Object.defineProperty(this, "password", {
@@ -97238,9 +97348,9 @@ var require_client2 = __commonJS({
97238
97348
  this.port = cp.port;
97239
97349
  this.namedQueries = {};
97240
97350
  };
97241
- Client.Query = NativeQuery;
97242
- util2.inherits(Client, EventEmitter);
97243
- Client.prototype._errorAllQueries = function(err) {
97351
+ Client2.Query = NativeQuery;
97352
+ util2.inherits(Client2, EventEmitter);
97353
+ Client2.prototype._errorAllQueries = function(err) {
97244
97354
  const enqueueError = (query2) => {
97245
97355
  process.nextTick(() => {
97246
97356
  query2.native = this.native;
@@ -97254,8 +97364,8 @@ var require_client2 = __commonJS({
97254
97364
  this._queryQueue.forEach(enqueueError);
97255
97365
  this._queryQueue.length = 0;
97256
97366
  };
97257
- Client.prototype._connect = function(cb) {
97258
- var self2 = this;
97367
+ Client2.prototype._connect = function(cb) {
97368
+ const self2 = this;
97259
97369
  if (this._connecting) {
97260
97370
  process.nextTick(() => cb(new Error("Client has already been connected. You cannot reuse a client.")));
97261
97371
  return;
@@ -97287,7 +97397,7 @@ var require_client2 = __commonJS({
97287
97397
  });
97288
97398
  });
97289
97399
  };
97290
- Client.prototype.connect = function(callback) {
97400
+ Client2.prototype.connect = function(callback) {
97291
97401
  if (callback) {
97292
97402
  this._connect(callback);
97293
97403
  return;
@@ -97302,12 +97412,12 @@ var require_client2 = __commonJS({
97302
97412
  });
97303
97413
  });
97304
97414
  };
97305
- Client.prototype.query = function(config3, values, callback) {
97306
- var query2;
97307
- var result;
97308
- var readTimeout;
97309
- var readTimeoutTimer;
97310
- var queryCallback;
97415
+ Client2.prototype.query = function(config3, values, callback) {
97416
+ let query2;
97417
+ let result;
97418
+ let readTimeout;
97419
+ let readTimeoutTimer;
97420
+ let queryCallback;
97311
97421
  if (config3 === null || config3 === void 0) {
97312
97422
  throw new TypeError("Client was passed a null or undefined query");
97313
97423
  } else if (typeof config3.submit === "function") {
@@ -97334,14 +97444,14 @@ var require_client2 = __commonJS({
97334
97444
  if (readTimeout) {
97335
97445
  queryCallback = query2.callback;
97336
97446
  readTimeoutTimer = setTimeout(() => {
97337
- var error44 = new Error("Query read timeout");
97447
+ const error44 = new Error("Query read timeout");
97338
97448
  process.nextTick(() => {
97339
97449
  query2.handleError(error44, this.connection);
97340
97450
  });
97341
97451
  queryCallback(error44);
97342
97452
  query2.callback = () => {
97343
97453
  };
97344
- var index = this._queryQueue.indexOf(query2);
97454
+ const index = this._queryQueue.indexOf(query2);
97345
97455
  if (index > -1) {
97346
97456
  this._queryQueue.splice(index, 1);
97347
97457
  }
@@ -97370,13 +97480,13 @@ var require_client2 = __commonJS({
97370
97480
  this._pulseQueryQueue();
97371
97481
  return result;
97372
97482
  };
97373
- Client.prototype.end = function(cb) {
97374
- var self2 = this;
97483
+ Client2.prototype.end = function(cb) {
97484
+ const self2 = this;
97375
97485
  this._ending = true;
97376
97486
  if (!this._connected) {
97377
97487
  this.once("connect", this.end.bind(this, cb));
97378
97488
  }
97379
- var result;
97489
+ let result;
97380
97490
  if (!cb) {
97381
97491
  result = new this._Promise(function(resolve, reject) {
97382
97492
  cb = (err) => err ? reject(err) : resolve();
@@ -97391,17 +97501,17 @@ var require_client2 = __commonJS({
97391
97501
  });
97392
97502
  return result;
97393
97503
  };
97394
- Client.prototype._hasActiveQuery = function() {
97504
+ Client2.prototype._hasActiveQuery = function() {
97395
97505
  return this._activeQuery && this._activeQuery.state !== "error" && this._activeQuery.state !== "end";
97396
97506
  };
97397
- Client.prototype._pulseQueryQueue = function(initialConnection) {
97507
+ Client2.prototype._pulseQueryQueue = function(initialConnection) {
97398
97508
  if (!this._connected) {
97399
97509
  return;
97400
97510
  }
97401
97511
  if (this._hasActiveQuery()) {
97402
97512
  return;
97403
97513
  }
97404
- var query2 = this._queryQueue.shift();
97514
+ const query2 = this._queryQueue.shift();
97405
97515
  if (!query2) {
97406
97516
  if (!initialConnection) {
97407
97517
  this.emit("drain");
@@ -97410,12 +97520,12 @@ var require_client2 = __commonJS({
97410
97520
  }
97411
97521
  this._activeQuery = query2;
97412
97522
  query2.submit(this);
97413
- var self2 = this;
97523
+ const self2 = this;
97414
97524
  query2.once("_done", function() {
97415
97525
  self2._pulseQueryQueue();
97416
97526
  });
97417
97527
  };
97418
- Client.prototype.cancel = function(query2) {
97528
+ Client2.prototype.cancel = function(query2) {
97419
97529
  if (this._activeQuery === query2) {
97420
97530
  this.native.cancel(function() {
97421
97531
  });
@@ -97423,65 +97533,71 @@ var require_client2 = __commonJS({
97423
97533
  this._queryQueue.splice(this._queryQueue.indexOf(query2), 1);
97424
97534
  }
97425
97535
  };
97426
- Client.prototype.ref = function() {
97536
+ Client2.prototype.ref = function() {
97427
97537
  };
97428
- Client.prototype.unref = function() {
97538
+ Client2.prototype.unref = function() {
97429
97539
  };
97430
- Client.prototype.setTypeParser = function(oid, format, parseFn) {
97540
+ Client2.prototype.setTypeParser = function(oid, format, parseFn) {
97431
97541
  return this._types.setTypeParser(oid, format, parseFn);
97432
97542
  };
97433
- Client.prototype.getTypeParser = function(oid, format) {
97543
+ Client2.prototype.getTypeParser = function(oid, format) {
97434
97544
  return this._types.getTypeParser(oid, format);
97435
97545
  };
97436
97546
  }
97437
97547
  });
97438
97548
 
97439
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/native/index.js
97549
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/native/index.js
97440
97550
  var require_native = __commonJS({
97441
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/native/index.js"(exports2, module2) {
97551
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/native/index.js"(exports2, module2) {
97442
97552
  "use strict";
97443
97553
  module2.exports = require_client2();
97444
97554
  }
97445
97555
  });
97446
97556
 
97447
- // ../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/index.js
97557
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/index.js
97448
97558
  var require_lib4 = __commonJS({
97449
- "../../node_modules/.pnpm/pg@8.14.1/node_modules/pg/lib/index.js"(exports2, module2) {
97450
- "use strict";
97451
- var Client = require_client();
97452
- var defaults = require_defaults();
97453
- var Connection = require_connection3();
97454
- var Pool = require_pg_pool();
97455
- var { DatabaseError } = require_dist4();
97456
- var { escapeIdentifier, escapeLiteral } = require_utils6();
97457
- var poolFactory = (Client2) => {
97458
- return class BoundPool extends Pool {
97559
+ "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/index.js"(exports2, module2) {
97560
+ "use strict";
97561
+ var Client2 = require_client();
97562
+ var defaults2 = require_defaults();
97563
+ var Connection2 = require_connection3();
97564
+ var Result2 = require_result();
97565
+ var utils = require_utils6();
97566
+ var Pool2 = require_pg_pool();
97567
+ var TypeOverrides2 = require_type_overrides();
97568
+ var { DatabaseError: DatabaseError2 } = require_dist4();
97569
+ var { escapeIdentifier: escapeIdentifier2, escapeLiteral: escapeLiteral2 } = require_utils6();
97570
+ var poolFactory = (Client3) => {
97571
+ return class BoundPool extends Pool2 {
97459
97572
  constructor(options) {
97460
- super(options, Client2);
97573
+ super(options, Client3);
97461
97574
  }
97462
97575
  };
97463
97576
  };
97464
97577
  var PG = function(clientConstructor) {
97465
- this.defaults = defaults;
97578
+ this.defaults = defaults2;
97466
97579
  this.Client = clientConstructor;
97467
97580
  this.Query = this.Client.Query;
97468
97581
  this.Pool = poolFactory(this.Client);
97469
97582
  this._pools = [];
97470
- this.Connection = Connection;
97583
+ this.Connection = Connection2;
97471
97584
  this.types = require_pg_types();
97472
- this.DatabaseError = DatabaseError;
97473
- this.escapeIdentifier = escapeIdentifier;
97474
- this.escapeLiteral = escapeLiteral;
97585
+ this.DatabaseError = DatabaseError2;
97586
+ this.TypeOverrides = TypeOverrides2;
97587
+ this.escapeIdentifier = escapeIdentifier2;
97588
+ this.escapeLiteral = escapeLiteral2;
97589
+ this.Result = Result2;
97590
+ this.utils = utils;
97475
97591
  };
97476
97592
  if (typeof process.env.NODE_PG_FORCE_NATIVE !== "undefined") {
97477
97593
  module2.exports = new PG(require_native());
97478
97594
  } else {
97479
- module2.exports = new PG(Client);
97595
+ module2.exports = new PG(Client2);
97480
97596
  Object.defineProperty(module2.exports, "native", {
97481
97597
  configurable: true,
97482
97598
  enumerable: false,
97483
97599
  get() {
97484
- var native = null;
97600
+ let native = null;
97485
97601
  try {
97486
97602
  native = new PG(require_native());
97487
97603
  } catch (err) {
@@ -97612,7 +97728,7 @@ __export(index_exports, {
97612
97728
  module.exports = __toCommonJS(index_exports);
97613
97729
 
97614
97730
  // package.json
97615
- var version = "6.20.0-dev.7";
97731
+ var version = "6.20.0-dev.9";
97616
97732
 
97617
97733
  // ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
97618
97734
  function clampProp(e2, n2, t2, o2, r2) {
@@ -102884,7 +103000,182 @@ var zValidator = (target, schema, hook, options) => (
102884
103000
  })
102885
103001
  );
102886
103002
 
102887
- // ../../node_modules/.pnpm/decimal.js@10.5.0/node_modules/decimal.js/decimal.mjs
103003
+ // ../client-runtime-utils/dist/index.mjs
103004
+ function setClassName(classObject, name6) {
103005
+ Object.defineProperty(classObject, "name", {
103006
+ value: name6,
103007
+ configurable: true
103008
+ });
103009
+ }
103010
+ var PrismaClientInitializationError = class _PrismaClientInitializationError extends Error {
103011
+ clientVersion;
103012
+ errorCode;
103013
+ retryable;
103014
+ constructor(message, clientVersion, errorCode) {
103015
+ super(message);
103016
+ this.name = "PrismaClientInitializationError";
103017
+ this.clientVersion = clientVersion;
103018
+ this.errorCode = errorCode;
103019
+ Error.captureStackTrace(_PrismaClientInitializationError);
103020
+ }
103021
+ get [Symbol.toStringTag]() {
103022
+ return "PrismaClientInitializationError";
103023
+ }
103024
+ };
103025
+ setClassName(PrismaClientInitializationError, "PrismaClientInitializationError");
103026
+ var PrismaClientKnownRequestError = class extends Error {
103027
+ code;
103028
+ meta;
103029
+ clientVersion;
103030
+ batchRequestIdx;
103031
+ constructor(message, { code, clientVersion, meta, batchRequestIdx }) {
103032
+ super(message);
103033
+ this.name = "PrismaClientKnownRequestError";
103034
+ this.code = code;
103035
+ this.clientVersion = clientVersion;
103036
+ this.meta = meta;
103037
+ Object.defineProperty(this, "batchRequestIdx", {
103038
+ value: batchRequestIdx,
103039
+ enumerable: false,
103040
+ writable: true
103041
+ });
103042
+ }
103043
+ get [Symbol.toStringTag]() {
103044
+ return "PrismaClientKnownRequestError";
103045
+ }
103046
+ };
103047
+ setClassName(PrismaClientKnownRequestError, "PrismaClientKnownRequestError");
103048
+ function getBacktrace(log32) {
103049
+ if (log32.fields?.message) {
103050
+ let str = log32.fields?.message;
103051
+ if (log32.fields?.file) {
103052
+ str += ` in ${log32.fields.file}`;
103053
+ if (log32.fields?.line) {
103054
+ str += `:${log32.fields.line}`;
103055
+ }
103056
+ if (log32.fields?.column) {
103057
+ str += `:${log32.fields.column}`;
103058
+ }
103059
+ }
103060
+ if (log32.fields?.reason) {
103061
+ str += `
103062
+ ${log32.fields?.reason}`;
103063
+ }
103064
+ return str;
103065
+ }
103066
+ return "Unknown error";
103067
+ }
103068
+ function isPanic(err) {
103069
+ return err.fields?.message === "PANIC";
103070
+ }
103071
+ var PrismaClientRustError = class extends Error {
103072
+ clientVersion;
103073
+ _isPanic;
103074
+ constructor({ clientVersion, error: error44 }) {
103075
+ const backtrace = getBacktrace(error44);
103076
+ super(backtrace ?? "Unknown error");
103077
+ this._isPanic = isPanic(error44);
103078
+ this.clientVersion = clientVersion;
103079
+ }
103080
+ get [Symbol.toStringTag]() {
103081
+ return "PrismaClientRustError";
103082
+ }
103083
+ isPanic() {
103084
+ return this._isPanic;
103085
+ }
103086
+ };
103087
+ setClassName(PrismaClientRustError, "PrismaClientRustError");
103088
+ var PrismaClientRustPanicError = class extends Error {
103089
+ clientVersion;
103090
+ constructor(message, clientVersion) {
103091
+ super(message);
103092
+ this.name = "PrismaClientRustPanicError";
103093
+ this.clientVersion = clientVersion;
103094
+ }
103095
+ get [Symbol.toStringTag]() {
103096
+ return "PrismaClientRustPanicError";
103097
+ }
103098
+ };
103099
+ setClassName(PrismaClientRustPanicError, "PrismaClientRustPanicError");
103100
+ var PrismaClientUnknownRequestError = class extends Error {
103101
+ clientVersion;
103102
+ batchRequestIdx;
103103
+ constructor(message, { clientVersion, batchRequestIdx }) {
103104
+ super(message);
103105
+ this.name = "PrismaClientUnknownRequestError";
103106
+ this.clientVersion = clientVersion;
103107
+ Object.defineProperty(this, "batchRequestIdx", {
103108
+ value: batchRequestIdx,
103109
+ writable: true,
103110
+ enumerable: false
103111
+ });
103112
+ }
103113
+ get [Symbol.toStringTag]() {
103114
+ return "PrismaClientUnknownRequestError";
103115
+ }
103116
+ };
103117
+ setClassName(PrismaClientUnknownRequestError, "PrismaClientUnknownRequestError");
103118
+ var PrismaClientValidationError = class extends Error {
103119
+ name = "PrismaClientValidationError";
103120
+ clientVersion;
103121
+ constructor(message, { clientVersion }) {
103122
+ super(message);
103123
+ this.clientVersion = clientVersion;
103124
+ }
103125
+ get [Symbol.toStringTag]() {
103126
+ return "PrismaClientValidationError";
103127
+ }
103128
+ };
103129
+ setClassName(PrismaClientValidationError, "PrismaClientValidationError");
103130
+ var secret = Symbol();
103131
+ var representations = /* @__PURE__ */ new WeakMap();
103132
+ var ObjectEnumValue = class {
103133
+ constructor(arg) {
103134
+ if (arg === secret) {
103135
+ representations.set(this, `Prisma.${this._getName()}`);
103136
+ } else {
103137
+ representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`);
103138
+ }
103139
+ }
103140
+ _getName() {
103141
+ return this.constructor.name;
103142
+ }
103143
+ toString() {
103144
+ return representations.get(this);
103145
+ }
103146
+ };
103147
+ function setClassName2(classObject, name6) {
103148
+ Object.defineProperty(classObject, "name", {
103149
+ value: name6,
103150
+ configurable: true
103151
+ });
103152
+ }
103153
+ var NullTypesEnumValue = class extends ObjectEnumValue {
103154
+ _getNamespace() {
103155
+ return "NullTypes";
103156
+ }
103157
+ };
103158
+ var DbNullClass = class extends NullTypesEnumValue {
103159
+ // Phantom private property to prevent structural type equality
103160
+ // eslint-disable-next-line no-unused-private-class-members
103161
+ #_brand_DbNull;
103162
+ };
103163
+ setClassName2(DbNullClass, "DbNull");
103164
+ var JsonNullClass = class extends NullTypesEnumValue {
103165
+ // Phantom private property to prevent structural type equality
103166
+ // eslint-disable-next-line no-unused-private-class-members
103167
+ #_brand_JsonNull;
103168
+ };
103169
+ setClassName2(JsonNullClass, "JsonNull");
103170
+ var AnyNullClass = class extends NullTypesEnumValue {
103171
+ // Phantom private property to prevent structural type equality
103172
+ // eslint-disable-next-line no-unused-private-class-members
103173
+ #_brand_AnyNull;
103174
+ };
103175
+ setClassName2(AnyNullClass, "AnyNull");
103176
+ var DbNull = new DbNullClass(secret);
103177
+ var JsonNull = new JsonNullClass(secret);
103178
+ var AnyNull = new AnyNullClass(secret);
102888
103179
  var EXP_LIMIT = 9e15;
102889
103180
  var MAX_DIGITS = 1e9;
102890
103181
  var NUMERALS = "0123456789abcdef";
@@ -104764,7 +105055,7 @@ function cosh(x2) {
104764
105055
  function clone(obj) {
104765
105056
  var i2, p2, ps;
104766
105057
  function Decimal2(v2) {
104767
- var e2, i3, t2, x2 = this;
105058
+ var e2, i22, t2, x2 = this;
104768
105059
  if (!(x2 instanceof Decimal2)) return new Decimal2(v2);
104769
105060
  x2.constructor = Decimal2;
104770
105061
  if (isDecimalInstance(v2)) {
@@ -104801,7 +105092,7 @@ function clone(obj) {
104801
105092
  x2.s = 1;
104802
105093
  }
104803
105094
  if (v2 === ~~v2 && v2 < 1e7) {
104804
- for (e2 = 0, i3 = v2; i3 >= 10; i3 /= 10) e2++;
105095
+ for (e2 = 0, i22 = v2; i22 >= 10; i22 /= 10) e2++;
104805
105096
  if (external) {
104806
105097
  if (e2 > Decimal2.maxE) {
104807
105098
  x2.e = NaN;
@@ -104828,11 +105119,11 @@ function clone(obj) {
104828
105119
  return parseDecimal(x2, v2.toString());
104829
105120
  }
104830
105121
  if (t2 === "string") {
104831
- if ((i3 = v2.charCodeAt(0)) === 45) {
105122
+ if ((i22 = v2.charCodeAt(0)) === 45) {
104832
105123
  v2 = v2.slice(1);
104833
105124
  x2.s = -1;
104834
105125
  } else {
104835
- if (i3 === 43) v2 = v2.slice(1);
105126
+ if (i22 === 43) v2 = v2.slice(1);
104836
105127
  x2.s = 1;
104837
105128
  }
104838
105129
  return isDecimal.test(v2) ? parseDecimal(x2, v2) : parseOther(x2, v2);
@@ -105059,7 +105350,73 @@ P2[Symbol.toStringTag] = "Decimal";
105059
105350
  var Decimal = P2.constructor = clone(DEFAULTS);
105060
105351
  LN10 = new Decimal(LN10);
105061
105352
  PI = new Decimal(PI);
105062
- var decimal_default = Decimal;
105353
+ var Sql = class _Sql {
105354
+ constructor(rawStrings, rawValues) {
105355
+ if (rawStrings.length - 1 !== rawValues.length) {
105356
+ if (rawStrings.length === 0) {
105357
+ throw new TypeError("Expected at least 1 string");
105358
+ }
105359
+ throw new TypeError(`Expected ${rawStrings.length} strings to have ${rawStrings.length - 1} values`);
105360
+ }
105361
+ const valuesLength = rawValues.reduce((len, value) => len + (value instanceof _Sql ? value.values.length : 1), 0);
105362
+ this.values = new Array(valuesLength);
105363
+ this.strings = new Array(valuesLength + 1);
105364
+ this.strings[0] = rawStrings[0];
105365
+ let i2 = 0, pos = 0;
105366
+ while (i2 < rawValues.length) {
105367
+ const child = rawValues[i2++];
105368
+ const rawString = rawStrings[i2];
105369
+ if (child instanceof _Sql) {
105370
+ this.strings[pos] += child.strings[0];
105371
+ let childIndex = 0;
105372
+ while (childIndex < child.values.length) {
105373
+ this.values[pos++] = child.values[childIndex++];
105374
+ this.strings[pos] = child.strings[childIndex];
105375
+ }
105376
+ this.strings[pos] += rawString;
105377
+ } else {
105378
+ this.values[pos++] = child;
105379
+ this.strings[pos] = rawString;
105380
+ }
105381
+ }
105382
+ }
105383
+ get sql() {
105384
+ const len = this.strings.length;
105385
+ let i2 = 1;
105386
+ let value = this.strings[0];
105387
+ while (i2 < len)
105388
+ value += `?${this.strings[i2++]}`;
105389
+ return value;
105390
+ }
105391
+ get statement() {
105392
+ const len = this.strings.length;
105393
+ let i2 = 1;
105394
+ let value = this.strings[0];
105395
+ while (i2 < len)
105396
+ value += `:${i2}${this.strings[i2++]}`;
105397
+ return value;
105398
+ }
105399
+ get text() {
105400
+ const len = this.strings.length;
105401
+ let i2 = 1;
105402
+ let value = this.strings[0];
105403
+ while (i2 < len)
105404
+ value += `$${i2}${this.strings[i2++]}`;
105405
+ return value;
105406
+ }
105407
+ inspect() {
105408
+ return {
105409
+ sql: this.sql,
105410
+ statement: this.statement,
105411
+ text: this.text,
105412
+ values: this.values
105413
+ };
105414
+ }
105415
+ };
105416
+ function raw(value) {
105417
+ return new Sql([value], []);
105418
+ }
105419
+ var empty = raw("");
105063
105420
 
105064
105421
  // ../debug/dist/index.mjs
105065
105422
  var __defProp2 = Object.defineProperty;
@@ -105623,7 +105980,7 @@ function doKeysMatch(lhs, rhs) {
105623
105980
  if (typeof lhs[key] === typeof rhs[key] && typeof lhs[key] !== "object") {
105624
105981
  return lhs[key] === rhs[key];
105625
105982
  }
105626
- if (decimal_default.isDecimal(lhs[key]) || decimal_default.isDecimal(rhs[key])) {
105983
+ if (Decimal.isDecimal(lhs[key]) || Decimal.isDecimal(rhs[key])) {
105627
105984
  const lhsDecimal = asDecimal(lhs[key]);
105628
105985
  const rhsDecimal = asDecimal(rhs[key]);
105629
105986
  return lhsDecimal && rhsDecimal && lhsDecimal.equals(rhsDecimal);
@@ -105642,10 +105999,10 @@ function doKeysMatch(lhs, rhs) {
105642
105999
  });
105643
106000
  }
105644
106001
  function asDecimal(value) {
105645
- if (decimal_default.isDecimal(value)) {
106002
+ if (Decimal.isDecimal(value)) {
105646
106003
  return value;
105647
106004
  } else if (typeof value === "number" || typeof value === "string") {
105648
- return new decimal_default(value);
106005
+ return new Decimal(value);
105649
106006
  } else {
105650
106007
  return;
105651
106008
  }
@@ -106090,7 +106447,7 @@ function mapValue(value, columnName, scalarType, enums) {
106090
106447
  throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
106091
106448
  }
106092
106449
  case "decimal":
106093
- if (typeof value !== "number" && typeof value !== "string" && !decimal_default.isDecimal(value)) {
106450
+ if (typeof value !== "number" && typeof value !== "string" && !Decimal.isDecimal(value)) {
106094
106451
  throw new DataMapperError(`Expected a decimal in column '${columnName}', got ${typeof value}: ${value}`);
106095
106452
  }
106096
106453
  return { $type: "Decimal", value };
@@ -107489,8 +107846,13 @@ var TransactionManager = class {
107489
107846
  await this.#withQuerySpanAndEvent(PHANTOM_COMMIT_QUERY(), tx.transaction, () => tx.transaction.commit());
107490
107847
  } else {
107491
107848
  const query2 = COMMIT_QUERY();
107492
- await this.#withQuerySpanAndEvent(query2, tx.transaction, () => tx.transaction.executeRaw(query2));
107493
- await tx.transaction.commit();
107849
+ await this.#withQuerySpanAndEvent(query2, tx.transaction, () => tx.transaction.executeRaw(query2)).then(
107850
+ () => tx.transaction.commit(),
107851
+ (err) => {
107852
+ const fail = () => Promise.reject(err);
107853
+ return tx.transaction.rollback().then(fail, fail);
107854
+ }
107855
+ );
107494
107856
  }
107495
107857
  } else if (tx.transaction) {
107496
107858
  if (tx.transaction.options.usePhantomQuery) {
@@ -107501,8 +107863,11 @@ var TransactionManager = class {
107501
107863
  );
107502
107864
  } else {
107503
107865
  const query2 = ROLLBACK_QUERY();
107504
- await this.#withQuerySpanAndEvent(query2, tx.transaction, () => tx.transaction.executeRaw(query2));
107505
- await tx.transaction.rollback();
107866
+ try {
107867
+ await this.#withQuerySpanAndEvent(query2, tx.transaction, () => tx.transaction.executeRaw(query2));
107868
+ } finally {
107869
+ await tx.transaction.rollback();
107870
+ }
107506
107871
  }
107507
107872
  }
107508
107873
  } finally {
@@ -107724,7 +108089,7 @@ var HonoRequest = class {
107724
108089
  return this.bodyCache.parsedBody ??= await parseBody(this, options);
107725
108090
  }
107726
108091
  #cachedBody = (key) => {
107727
- const { bodyCache, raw: raw2 } = this;
108092
+ const { bodyCache, raw: raw3 } = this;
107728
108093
  const cachedBody = bodyCache[key];
107729
108094
  if (cachedBody) {
107730
108095
  return cachedBody;
@@ -107738,7 +108103,7 @@ var HonoRequest = class {
107738
108103
  return new Response(body)[key]();
107739
108104
  });
107740
108105
  }
107741
- return bodyCache[key] = raw2[key]();
108106
+ return bodyCache[key] = raw3[key]();
107742
108107
  };
107743
108108
  json() {
107744
108109
  return this.#cachedBody("text").then((text) => JSON.parse(text));
@@ -107784,7 +108149,7 @@ var HtmlEscapedCallbackPhase = {
107784
108149
  BeforeStream: 2,
107785
108150
  Stream: 3
107786
108151
  };
107787
- var raw = (value, callbacks) => {
108152
+ var raw2 = (value, callbacks) => {
107788
108153
  const escapedString = new String(value);
107789
108154
  escapedString.isEscaped = true;
107790
108155
  escapedString.callbacks = callbacks;
@@ -107814,7 +108179,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context2, buffer) =>
107814
108179
  ).then(() => buffer[0])
107815
108180
  );
107816
108181
  if (preserveCallbacks) {
107817
- return raw(await resStr, callbacks);
108182
+ return raw2(await resStr, callbacks);
107818
108183
  } else {
107819
108184
  return resStr;
107820
108185
  }
@@ -110517,14 +110882,30 @@ var PrismaMssqlAdapterFactory = class {
110517
110882
  }
110518
110883
  };
110519
110884
 
110885
+ // ../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/esm/index.mjs
110886
+ var import_lib = __toESM(require_lib4(), 1);
110887
+ var Client = import_lib.default.Client;
110888
+ var Pool = import_lib.default.Pool;
110889
+ var Connection = import_lib.default.Connection;
110890
+ var types = import_lib.default.types;
110891
+ var Query = import_lib.default.Query;
110892
+ var DatabaseError = import_lib.default.DatabaseError;
110893
+ var escapeIdentifier = import_lib.default.escapeIdentifier;
110894
+ var escapeLiteral = import_lib.default.escapeLiteral;
110895
+ var Result = import_lib.default.Result;
110896
+ var TypeOverrides = import_lib.default.TypeOverrides;
110897
+ var defaults = import_lib.default.defaults;
110898
+ var esm_default = import_lib.default;
110899
+
110520
110900
  // ../adapter-pg/dist/index.mjs
110521
- var import_pg = __toESM(require_lib4(), 1);
110522
- var import_pg2 = __toESM(require_lib4(), 1);
110523
110901
  var import_postgres_array = __toESM(require_postgres_array2(), 1);
110524
110902
  var name5 = "@prisma/adapter-pg";
110525
110903
  var FIRST_NORMAL_OBJECT_ID = 16384;
110526
- var { types } = import_pg2.default;
110527
- var { builtins: ScalarColumnType, getTypeParser } = types;
110904
+ var { types: types2 } = esm_default;
110905
+ var { builtins: ScalarColumnType, getTypeParser } = types2;
110906
+ var AdditionalScalarColumnType = {
110907
+ NAME: 19
110908
+ };
110528
110909
  var ArrayColumnType = {
110529
110910
  BIT_ARRAY: 1561,
110530
110911
  BOOL_ARRAY: 1e3,
@@ -110715,6 +111096,7 @@ function fieldToColumnType(fieldTypeId) {
110715
111096
  case ScalarColumnType.INET:
110716
111097
  case ScalarColumnType.CIDR:
110717
111098
  case ScalarColumnType.XML:
111099
+ case AdditionalScalarColumnType.NAME:
110718
111100
  return ColumnTypeEnum.Text;
110719
111101
  case ScalarColumnType.BYTEA:
110720
111102
  return ColumnTypeEnum.Bytes;
@@ -111057,7 +111439,7 @@ function isTlsError(error44) {
111057
111439
  }
111058
111440
  return false;
111059
111441
  }
111060
- var types2 = import_pg.default.types;
111442
+ var types22 = esm_default.types;
111061
111443
  var debug6 = Debug("prisma:driver-adapter:pg");
111062
111444
  var PgQueryable = class {
111063
111445
  constructor(client, pgOptions) {
@@ -111144,7 +111526,7 @@ var PgQueryable = class {
111144
111526
  if (format === "text" && customParsers[oid]) {
111145
111527
  return customParsers[oid];
111146
111528
  }
111147
- return types2.getTypeParser(oid, format);
111529
+ return types22.getTypeParser(oid, format);
111148
111530
  }
111149
111531
  }
111150
111532
  },
@@ -111242,7 +111624,7 @@ var PrismaPgAdapter = class extends PgQueryable {
111242
111624
  var PrismaPgAdapterFactory = class {
111243
111625
  constructor(poolOrConfig, options) {
111244
111626
  this.options = options;
111245
- if (poolOrConfig instanceof import_pg.default.Pool) {
111627
+ if (poolOrConfig instanceof esm_default.Pool) {
111246
111628
  this.externalPool = poolOrConfig;
111247
111629
  this.config = poolOrConfig.options;
111248
111630
  } else {
@@ -111255,7 +111637,7 @@ var PrismaPgAdapterFactory = class {
111255
111637
  config;
111256
111638
  externalPool;
111257
111639
  async connect() {
111258
- const client = this.externalPool ?? new import_pg.default.Pool(this.config);
111640
+ const client = this.externalPool ?? new esm_default.Pool(this.config);
111259
111641
  const onIdleClientError = (err) => {
111260
111642
  debug6(`Error from idle pool client: ${err.message} %O`, err);
111261
111643
  this.options?.onPoolError?.(err);
@@ -111278,7 +111660,7 @@ var PrismaPgAdapterFactory = class {
111278
111660
  const conn = await this.connect();
111279
111661
  const database = `prisma_migrate_shadow_db_${globalThis.crypto.randomUUID()}`;
111280
111662
  await conn.executeScript(`CREATE DATABASE "${database}"`);
111281
- const client = new import_pg.default.Pool({ ...this.config, database });
111663
+ const client = new esm_default.Pool({ ...this.config, database });
111282
111664
  return new PrismaPgAdapter(client, void 0, async () => {
111283
111665
  await conn.executeScript(`DROP DATABASE "${database}"`);
111284
111666
  await client.end();
@@ -123731,6 +124113,17 @@ function getErrorResponse(error44, ctx) {
123731
124113
  });
123732
124114
  /*! Bundled license information:
123733
124115
 
124116
+ decimal.js/decimal.mjs:
124117
+ (*!
124118
+ * decimal.js v10.5.0
124119
+ * An arbitrary-precision Decimal type for JavaScript.
124120
+ * https://github.com/MikeMcl/decimal.js
124121
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
124122
+ * MIT Licence
124123
+ *)
124124
+ */
124125
+ /*! Bundled license information:
124126
+
123734
124127
  @noble/hashes/utils.js:
123735
124128
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
123736
124129
 
@@ -123903,13 +124296,4 @@ js-md4/src/md4.js:
123903
124296
  * @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
123904
124297
  * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
123905
124298
  *)
123906
-
123907
- decimal.js/decimal.mjs:
123908
- (*!
123909
- * decimal.js v10.5.0
123910
- * An arbitrary-precision Decimal type for JavaScript.
123911
- * https://github.com/MikeMcl/decimal.js
123912
- * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
123913
- * MIT Licence
123914
- *)
123915
124299
  */