@prisma/query-plan-executor 7.1.0-dev.22 → 7.1.0-dev.24

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 +26 -19
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -40576,7 +40576,7 @@ var require_dist2 = __commonJS({
40576
40576
  "../../node_modules/.pnpm/@tootallnate+once@2.0.0/node_modules/@tootallnate/once/dist/index.js"(exports2) {
40577
40577
  "use strict";
40578
40578
  Object.defineProperty(exports2, "__esModule", { value: true });
40579
- function once(emitter, name6, { signal } = {}) {
40579
+ function once2(emitter, name6, { signal } = {}) {
40580
40580
  return new Promise((resolve, reject) => {
40581
40581
  function cleanup() {
40582
40582
  signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
@@ -40596,7 +40596,7 @@ var require_dist2 = __commonJS({
40596
40596
  emitter.on("error", onError);
40597
40597
  });
40598
40598
  }
40599
- exports2.default = once;
40599
+ exports2.default = once2;
40600
40600
  }
40601
40601
  });
40602
40602
 
@@ -55946,7 +55946,7 @@ var require_lodash7 = __commonJS({
55946
55946
  return result;
55947
55947
  };
55948
55948
  }
55949
- function once(func) {
55949
+ function once2(func) {
55950
55950
  return before(2, func);
55951
55951
  }
55952
55952
  function isObject3(value) {
@@ -55992,7 +55992,7 @@ var require_lodash7 = __commonJS({
55992
55992
  var isBinary2 = reIsBinary.test(value);
55993
55993
  return isBinary2 || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary2 ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
55994
55994
  }
55995
- module2.exports = once;
55995
+ module2.exports = once2;
55996
55996
  }
55997
55997
  });
55998
55998
 
@@ -56010,7 +56010,7 @@ var require_sign2 = __commonJS({
56010
56010
  var isNumber = require_lodash4();
56011
56011
  var isPlainObject2 = require_lodash5();
56012
56012
  var isString = require_lodash6();
56013
- var once = require_lodash7();
56013
+ var once2 = require_lodash7();
56014
56014
  var { KeyObject, createSecretKey, createPrivateKey: createPrivateKey3 } = require("crypto");
56015
56015
  var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"];
56016
56016
  if (PS_SUPPORTED) {
@@ -56199,7 +56199,7 @@ var require_sign2 = __commonJS({
56199
56199
  });
56200
56200
  const encoding = options.encoding || "utf8";
56201
56201
  if (typeof callback === "function") {
56202
- callback = callback && once(callback);
56202
+ callback = callback && once2(callback);
56203
56203
  jws.createSign({
56204
56204
  header,
56205
56205
  privateKey: secretOrPrivateKey,
@@ -66461,7 +66461,7 @@ var require_end_of_stream = __commonJS({
66461
66461
  var process3 = require_process();
66462
66462
  var { AbortError: AbortError3, codes } = require_errors3();
66463
66463
  var { ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE } = codes;
66464
- var { kEmptyObject, once } = require_util();
66464
+ var { kEmptyObject, once: once2 } = require_util();
66465
66465
  var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators();
66466
66466
  var { Promise: Promise2, PromisePrototypeThen } = require_primordials();
66467
66467
  var {
@@ -66497,7 +66497,7 @@ var require_end_of_stream = __commonJS({
66497
66497
  }
66498
66498
  validateFunction(callback, "callback");
66499
66499
  validateAbortSignal(options.signal, "options.signal");
66500
- callback = once(callback);
66500
+ callback = once2(callback);
66501
66501
  if (isReadableStream2(stream) || isWritableStream(stream)) {
66502
66502
  return eosWeb(stream, options, callback);
66503
66503
  }
@@ -66634,7 +66634,7 @@ var require_end_of_stream = __commonJS({
66634
66634
  process3.nextTick(abort);
66635
66635
  } else {
66636
66636
  const originalCallback = callback;
66637
- callback = once((...args) => {
66637
+ callback = once2((...args) => {
66638
66638
  options.signal.removeEventListener("abort", abort);
66639
66639
  originalCallback.apply(stream, args);
66640
66640
  });
@@ -66660,7 +66660,7 @@ var require_end_of_stream = __commonJS({
66660
66660
  process3.nextTick(abort);
66661
66661
  } else {
66662
66662
  const originalCallback = callback;
66663
- callback = once((...args) => {
66663
+ callback = once2((...args) => {
66664
66664
  options.signal.removeEventListener("abort", abort);
66665
66665
  originalCallback.apply(stream, args);
66666
66666
  });
@@ -69478,7 +69478,7 @@ var require_pipeline = __commonJS({
69478
69478
  var process3 = require_process();
69479
69479
  var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator } = require_primordials();
69480
69480
  var eos = require_end_of_stream();
69481
- var { once } = require_util();
69481
+ var { once: once2 } = require_util();
69482
69482
  var destroyImpl = require_destroy();
69483
69483
  var Duplex = require_duplex();
69484
69484
  var {
@@ -69629,7 +69629,7 @@ var require_pipeline = __commonJS({
69629
69629
  }
69630
69630
  }
69631
69631
  function pipeline(...streams) {
69632
- return pipelineImpl(streams, once(popCallback(streams)));
69632
+ return pipelineImpl(streams, once2(popCallback(streams)));
69633
69633
  }
69634
69634
  function pipelineImpl(streams, callback, opts) {
69635
69635
  if (streams.length === 1 && ArrayIsArray(streams[0])) {
@@ -97752,7 +97752,7 @@ __export(index_exports, {
97752
97752
  module.exports = __toCommonJS(index_exports);
97753
97753
 
97754
97754
  // package.json
97755
- var version = "7.1.0-dev.22";
97755
+ var version = "7.1.0-dev.24";
97756
97756
 
97757
97757
  // ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
97758
97758
  function clampProp(e2, n2, t2, o2, r2) {
@@ -107654,6 +107654,11 @@ async function randomUUID2() {
107654
107654
  const crypto7 = await getCrypto();
107655
107655
  return crypto7.randomUUID();
107656
107656
  }
107657
+ async function once(target, event) {
107658
+ return new Promise((resolve) => {
107659
+ target.addEventListener(event, resolve, { once: true });
107660
+ });
107661
+ }
107657
107662
  var TransactionManagerError = class extends UserFacingError {
107658
107663
  name = "TransactionManagerError";
107659
107664
  constructor(message, meta) {
@@ -107766,15 +107771,17 @@ var TransactionManager = class {
107766
107771
  startedAt: Date.now(),
107767
107772
  transaction: void 0
107768
107773
  };
107769
- this.transactions.set(transaction.id, transaction);
107770
- let hasTimedOut = false;
107771
- const startTimer = createTimeoutIfDefined(() => hasTimedOut = true, options.maxWait);
107774
+ const abortController = new AbortController();
107775
+ const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
107772
107776
  startTimer?.unref?.();
107773
- transaction.transaction = await this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing);
107774
- clearTimeout(startTimer);
107777
+ transaction.transaction = await Promise.race([
107778
+ this.driverAdapter.startTransaction(options.isolationLevel).catch(rethrowAsUserFacing).finally(() => clearTimeout(startTimer)),
107779
+ once(abortController.signal, "abort").then(() => void 0)
107780
+ ]);
107781
+ this.transactions.set(transaction.id, transaction);
107775
107782
  switch (transaction.status) {
107776
107783
  case "waiting":
107777
- if (hasTimedOut) {
107784
+ if (abortController.signal.aborted) {
107778
107785
  await this.#closeTransaction(transaction, "timed_out");
107779
107786
  throw new TransactionStartTimeoutError();
107780
107787
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/query-plan-executor",
3
- "version": "7.1.0-dev.22",
3
+ "version": "7.1.0-dev.24",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,11 +20,11 @@
20
20
  "temporal-polyfill": "0.3.0",
21
21
  "vitest": "3.2.4",
22
22
  "zod": "4.1.3",
23
- "@prisma/adapter-pg": "7.1.0-dev.22",
24
- "@prisma/adapter-mariadb": "7.1.0-dev.22",
25
- "@prisma/adapter-mssql": "7.1.0-dev.22",
26
- "@prisma/client-engine-runtime": "7.1.0-dev.22",
27
- "@prisma/driver-adapter-utils": "7.1.0-dev.22"
23
+ "@prisma/adapter-pg": "7.1.0-dev.24",
24
+ "@prisma/adapter-mariadb": "7.1.0-dev.24",
25
+ "@prisma/adapter-mssql": "7.1.0-dev.24",
26
+ "@prisma/client-engine-runtime": "7.1.0-dev.24",
27
+ "@prisma/driver-adapter-utils": "7.1.0-dev.24"
28
28
  },
29
29
  "files": [
30
30
  "dist"