@prisma/query-plan-executor 7.5.0-dev.9 → 7.5.0

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 (3) hide show
  1. package/dist/index.d.ts +49 -27
  2. package/dist/index.js +442 -178
  3. package/package.json +6 -7
package/dist/index.js CHANGED
@@ -39859,32 +39859,44 @@ var require_dist = __commonJS({
39859
39859
  }
39860
39860
  });
39861
39861
 
39862
- // ../../node_modules/.pnpm/@tootallnate+once@2.0.0/node_modules/@tootallnate/once/dist/index.js
39863
- var require_dist2 = __commonJS({
39864
- "../../node_modules/.pnpm/@tootallnate+once@2.0.0/node_modules/@tootallnate/once/dist/index.js"(exports2) {
39865
- "use strict";
39866
- Object.defineProperty(exports2, "__esModule", { value: true });
39867
- function once2(emitter, name6, { signal } = {}) {
39868
- return new Promise((resolve, reject) => {
39869
- function cleanup() {
39870
- signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
39871
- emitter.removeListener(name6, onEvent);
39872
- emitter.removeListener("error", onError);
39873
- }
39874
- function onEvent(...args) {
39875
- cleanup();
39876
- resolve(args);
39877
- }
39878
- function onError(err) {
39879
- cleanup();
39880
- reject(err);
39881
- }
39882
- signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", cleanup);
39883
- emitter.on(name6, onEvent);
39884
- emitter.on("error", onError);
39885
- });
39862
+ // ../../node_modules/.pnpm/@tootallnate+once@3.0.1/node_modules/@tootallnate/once/dist/index.js
39863
+ var dist_exports = {};
39864
+ __export(dist_exports, {
39865
+ default: () => once2
39866
+ });
39867
+ function once2(emitter, name6, { signal } = {}) {
39868
+ return new Promise((resolve, reject) => {
39869
+ function cleanup() {
39870
+ signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", onAbort);
39871
+ emitter.removeListener(name6, onEvent);
39872
+ emitter.removeListener("error", onError);
39873
+ }
39874
+ function onEvent(...args) {
39875
+ cleanup();
39876
+ resolve(args);
39877
+ }
39878
+ function onError(err) {
39879
+ cleanup();
39880
+ reject(err);
39886
39881
  }
39887
- exports2.default = once2;
39882
+ function onAbort() {
39883
+ cleanup();
39884
+ const err = new Error("The operation was aborted");
39885
+ err.name = "AbortError";
39886
+ reject(err);
39887
+ }
39888
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
39889
+ onAbort();
39890
+ return;
39891
+ }
39892
+ signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", onAbort);
39893
+ emitter.on(name6, onEvent);
39894
+ emitter.on("error", onError);
39895
+ });
39896
+ }
39897
+ var init_dist = __esm({
39898
+ "../../node_modules/.pnpm/@tootallnate+once@3.0.1/node_modules/@tootallnate/once/dist/index.js"() {
39899
+ "use strict";
39888
39900
  }
39889
39901
  });
39890
39902
 
@@ -39927,7 +39939,7 @@ var require_agent2 = __commonJS({
39927
39939
  var tls_1 = __importDefault(require("tls"));
39928
39940
  var url_1 = __importDefault(require("url"));
39929
39941
  var debug_1 = __importDefault(require_src2());
39930
- var once_1 = __importDefault(require_dist2());
39942
+ var once_1 = __importDefault((init_dist(), __toCommonJS(dist_exports)));
39931
39943
  var agent_base_1 = require_src3();
39932
39944
  var debug7 = (0, debug_1.default)("http-proxy-agent");
39933
39945
  function isHTTPS(protocol) {
@@ -40025,7 +40037,7 @@ var require_agent2 = __commonJS({
40025
40037
  });
40026
40038
 
40027
40039
  // ../../node_modules/.pnpm/http-proxy-agent@5.0.0/node_modules/http-proxy-agent/dist/index.js
40028
- var require_dist3 = __commonJS({
40040
+ var require_dist2 = __commonJS({
40029
40041
  "../../node_modules/.pnpm/http-proxy-agent@5.0.0/node_modules/http-proxy-agent/dist/index.js"(exports2, module2) {
40030
40042
  "use strict";
40031
40043
  var __importDefault = exports2 && exports2.__importDefault || function(mod2) {
@@ -40182,7 +40194,7 @@ var init_proxyPolicy = __esm({
40182
40194
  "../../node_modules/.pnpm/@azure+core-rest-pipeline@1.9.2/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.js"() {
40183
40195
  "use strict";
40184
40196
  import_https_proxy_agent = __toESM(require_dist());
40185
- import_http_proxy_agent = __toESM(require_dist3());
40197
+ import_http_proxy_agent = __toESM(require_dist2());
40186
40198
  init_log2();
40187
40199
  HTTPS_PROXY = "HTTPS_PROXY";
40188
40200
  HTTP_PROXY = "HTTP_PROXY";
@@ -50041,7 +50053,7 @@ var init_ServerTelemetryManager = __esm({
50041
50053
  });
50042
50054
 
50043
50055
  // ../../node_modules/.pnpm/@azure+msal-common@14.12.0/node_modules/@azure/msal-common/dist/index.mjs
50044
- var init_dist = __esm({
50056
+ var init_dist2 = __esm({
50045
50057
  "../../node_modules/.pnpm/@azure+msal-common@14.12.0/node_modules/@azure/msal-common/dist/index.mjs"() {
50046
50058
  "use strict";
50047
50059
  init_AuthToken();
@@ -50088,7 +50100,7 @@ var Deserializer;
50088
50100
  var init_Deserializer = __esm({
50089
50101
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/cache/serializer/Deserializer.mjs"() {
50090
50102
  "use strict";
50091
- init_dist();
50103
+ init_dist2();
50092
50104
  Deserializer = class {
50093
50105
  /**
50094
50106
  * Parse the JSON blob in memory and deserialize the content
@@ -50261,7 +50273,7 @@ var AUTHORIZATION_HEADER_NAME, METADATA_HEADER_NAME, APP_SERVICE_SECRET_HEADER_N
50261
50273
  var init_Constants2 = __esm({
50262
50274
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/utils/Constants.mjs"() {
50263
50275
  "use strict";
50264
- init_dist();
50276
+ init_dist2();
50265
50277
  AUTHORIZATION_HEADER_NAME = "Authorization";
50266
50278
  METADATA_HEADER_NAME = "Metadata";
50267
50279
  APP_SERVICE_SECRET_HEADER_NAME = "X-IDENTITY-HEADER";
@@ -50401,7 +50413,7 @@ var import_http, import_https, HttpClient, networkRequestViaProxy, networkReques
50401
50413
  var init_HttpClient = __esm({
50402
50414
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/network/HttpClient.mjs"() {
50403
50415
  "use strict";
50404
- init_dist();
50416
+ init_dist2();
50405
50417
  init_Constants2();
50406
50418
  init_NetworkUtils();
50407
50419
  import_http = __toESM(require("http"), 1);
@@ -50661,7 +50673,7 @@ var ManagedIdentityErrorMessages, ManagedIdentityError;
50661
50673
  var init_ManagedIdentityError = __esm({
50662
50674
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/error/ManagedIdentityError.mjs"() {
50663
50675
  "use strict";
50664
- init_dist();
50676
+ init_dist2();
50665
50677
  init_ManagedIdentityErrorCodes();
50666
50678
  init_Constants2();
50667
50679
  ManagedIdentityErrorMessages = {
@@ -50790,7 +50802,7 @@ var HttpClientWithRetries;
50790
50802
  var init_HttpClientWithRetries = __esm({
50791
50803
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/network/HttpClientWithRetries.mjs"() {
50792
50804
  "use strict";
50793
- init_dist();
50805
+ init_dist2();
50794
50806
  init_Constants2();
50795
50807
  HttpClientWithRetries = class {
50796
50808
  constructor(httpClientNoRetries, retryPolicy2) {
@@ -50864,7 +50876,7 @@ var DEFAULT_AUTH_OPTIONS, DEFAULT_CACHE_OPTIONS2, DEFAULT_LOGGER_OPTIONS, DEFAUL
50864
50876
  var init_Configuration = __esm({
50865
50877
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/config/Configuration.mjs"() {
50866
50878
  "use strict";
50867
- init_dist();
50879
+ init_dist2();
50868
50880
  init_HttpClient();
50869
50881
  init_ManagedIdentityId();
50870
50882
  init_Constants2();
@@ -50948,7 +50960,7 @@ var EncodingUtils;
50948
50960
  var init_EncodingUtils = __esm({
50949
50961
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/utils/EncodingUtils.mjs"() {
50950
50962
  "use strict";
50951
- init_dist();
50963
+ init_dist2();
50952
50964
  EncodingUtils = class _EncodingUtils {
50953
50965
  /**
50954
50966
  * 'utf8': Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8.
@@ -51013,7 +51025,7 @@ var import_crypto7, PkceGenerator;
51013
51025
  var init_PkceGenerator = __esm({
51014
51026
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/crypto/PkceGenerator.mjs"() {
51015
51027
  "use strict";
51016
- init_dist();
51028
+ init_dist2();
51017
51029
  init_Constants2();
51018
51030
  init_EncodingUtils();
51019
51031
  init_HashUtils();
@@ -51155,7 +51167,7 @@ var NodeStorage;
51155
51167
  var init_NodeStorage = __esm({
51156
51168
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/cache/NodeStorage.mjs"() {
51157
51169
  "use strict";
51158
- init_dist();
51170
+ init_dist2();
51159
51171
  init_Deserializer();
51160
51172
  init_Serializer();
51161
51173
  NodeStorage = class extends CacheManager {
@@ -51557,7 +51569,7 @@ var defaultSerializedCache, TokenCache;
51557
51569
  var init_TokenCache = __esm({
51558
51570
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/cache/TokenCache.mjs"() {
51559
51571
  "use strict";
51560
- init_dist();
51572
+ init_dist2();
51561
51573
  init_Deserializer();
51562
51574
  init_Serializer();
51563
51575
  defaultSerializedCache = {
@@ -55255,7 +55267,7 @@ var require_lodash7 = __commonJS({
55255
55267
  return result;
55256
55268
  };
55257
55269
  }
55258
- function once2(func) {
55270
+ function once3(func) {
55259
55271
  return before(2, func);
55260
55272
  }
55261
55273
  function isObject3(value) {
@@ -55301,7 +55313,7 @@ var require_lodash7 = __commonJS({
55301
55313
  var isBinary2 = reIsBinary.test(value);
55302
55314
  return isBinary2 || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary2 ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
55303
55315
  }
55304
- module2.exports = once2;
55316
+ module2.exports = once3;
55305
55317
  }
55306
55318
  });
55307
55319
 
@@ -55319,7 +55331,7 @@ var require_sign2 = __commonJS({
55319
55331
  var isNumber = require_lodash4();
55320
55332
  var isPlainObject2 = require_lodash5();
55321
55333
  var isString = require_lodash6();
55322
- var once2 = require_lodash7();
55334
+ var once3 = require_lodash7();
55323
55335
  var { KeyObject, createSecretKey, createPrivateKey: createPrivateKey3 } = require("crypto");
55324
55336
  var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"];
55325
55337
  if (PS_SUPPORTED) {
@@ -55508,7 +55520,7 @@ var require_sign2 = __commonJS({
55508
55520
  });
55509
55521
  const encoding = options.encoding || "utf8";
55510
55522
  if (typeof callback === "function") {
55511
- callback = callback && once2(callback);
55523
+ callback = callback && once3(callback);
55512
55524
  jws.createSign({
55513
55525
  header,
55514
55526
  privateKey: secretOrPrivateKey,
@@ -55552,7 +55564,7 @@ var init_ClientAssertion = __esm({
55552
55564
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/ClientAssertion.mjs"() {
55553
55565
  "use strict";
55554
55566
  import_jsonwebtoken = __toESM(require_jsonwebtoken(), 1);
55555
- init_dist();
55567
+ init_dist2();
55556
55568
  init_EncodingUtils();
55557
55569
  init_Constants2();
55558
55570
  ClientAssertion = class _ClientAssertion {
@@ -55664,7 +55676,7 @@ var NodeAuthErrorMessage, NodeAuthError;
55664
55676
  var init_NodeAuthError = __esm({
55665
55677
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/error/NodeAuthError.mjs"() {
55666
55678
  "use strict";
55667
- init_dist();
55679
+ init_dist2();
55668
55680
  NodeAuthErrorMessage = {
55669
55681
  invalidLoopbackAddressType: {
55670
55682
  code: "invalid_loopback_server_address_type",
@@ -55751,7 +55763,7 @@ var UsernamePasswordClient;
55751
55763
  var init_UsernamePasswordClient = __esm({
55752
55764
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/UsernamePasswordClient.mjs"() {
55753
55765
  "use strict";
55754
- init_dist();
55766
+ init_dist2();
55755
55767
  UsernamePasswordClient = class extends BaseClient {
55756
55768
  constructor(configuration) {
55757
55769
  super(configuration);
@@ -55842,7 +55854,7 @@ var ClientApplication;
55842
55854
  var init_ClientApplication = __esm({
55843
55855
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/ClientApplication.mjs"() {
55844
55856
  "use strict";
55845
- init_dist();
55857
+ init_dist2();
55846
55858
  init_Configuration();
55847
55859
  init_CryptoProvider();
55848
55860
  init_NodeStorage();
@@ -56169,7 +56181,7 @@ var import_http2, LoopbackClient;
56169
56181
  var init_LoopbackClient = __esm({
56170
56182
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/network/LoopbackClient.mjs"() {
56171
56183
  "use strict";
56172
- init_dist();
56184
+ init_dist2();
56173
56185
  import_http2 = __toESM(require("http"), 1);
56174
56186
  init_NodeAuthError();
56175
56187
  init_Constants2();
@@ -56247,7 +56259,7 @@ var DeviceCodeClient;
56247
56259
  var init_DeviceCodeClient = __esm({
56248
56260
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/DeviceCodeClient.mjs"() {
56249
56261
  "use strict";
56250
- init_dist();
56262
+ init_dist2();
56251
56263
  DeviceCodeClient = class extends BaseClient {
56252
56264
  constructor(configuration) {
56253
56265
  super(configuration);
@@ -56433,7 +56445,7 @@ var init_PublicClientApplication = __esm({
56433
56445
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/PublicClientApplication.mjs"() {
56434
56446
  "use strict";
56435
56447
  init_Constants2();
56436
- init_dist();
56448
+ init_dist2();
56437
56449
  init_ClientApplication();
56438
56450
  init_NodeAuthError();
56439
56451
  init_LoopbackClient();
@@ -56650,7 +56662,7 @@ var ClientCredentialClient;
56650
56662
  var init_ClientCredentialClient = __esm({
56651
56663
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/ClientCredentialClient.mjs"() {
56652
56664
  "use strict";
56653
- init_dist();
56665
+ init_dist2();
56654
56666
  ClientCredentialClient = class extends BaseClient {
56655
56667
  constructor(configuration, appTokenProvider) {
56656
56668
  super(configuration);
@@ -56825,7 +56837,7 @@ var OnBehalfOfClient;
56825
56837
  var init_OnBehalfOfClient = __esm({
56826
56838
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/OnBehalfOfClient.mjs"() {
56827
56839
  "use strict";
56828
- init_dist();
56840
+ init_dist2();
56829
56841
  init_EncodingUtils();
56830
56842
  OnBehalfOfClient = class extends BaseClient {
56831
56843
  constructor(configuration) {
@@ -57011,7 +57023,7 @@ var init_ConfidentialClientApplication = __esm({
57011
57023
  init_ClientApplication();
57012
57024
  init_ClientAssertion();
57013
57025
  init_Constants2();
57014
- init_dist();
57026
+ init_dist2();
57015
57027
  init_ClientCredentialClient();
57016
57028
  init_OnBehalfOfClient();
57017
57029
  ConfidentialClientApplication = class extends ClientApplication {
@@ -57163,7 +57175,7 @@ var ManagedIdentityUserAssignedIdQueryParameterNames, BaseManagedIdentitySource;
57163
57175
  var init_BaseManagedIdentitySource = __esm({
57164
57176
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs"() {
57165
57177
  "use strict";
57166
- init_dist();
57178
+ init_dist2();
57167
57179
  init_Constants2();
57168
57180
  init_ManagedIdentityError();
57169
57181
  init_ManagedIdentityErrorCodes();
@@ -57264,7 +57276,7 @@ var ManagedIdentityRequestParameters;
57264
57276
  var init_ManagedIdentityRequestParameters = __esm({
57265
57277
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/config/ManagedIdentityRequestParameters.mjs"() {
57266
57278
  "use strict";
57267
- init_dist();
57279
+ init_dist2();
57268
57280
  ManagedIdentityRequestParameters = class {
57269
57281
  constructor(httpMethod, endpoint) {
57270
57282
  this.httpMethod = httpMethod;
@@ -57341,7 +57353,7 @@ var import_fs2, import_path2, ARC_API_VERSION, SUPPORTED_AZURE_ARC_PLATFORMS, Az
57341
57353
  var init_AzureArc = __esm({
57342
57354
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/ManagedIdentitySources/AzureArc.mjs"() {
57343
57355
  "use strict";
57344
- init_dist();
57356
+ init_dist2();
57345
57357
  init_ManagedIdentityRequestParameters();
57346
57358
  init_BaseManagedIdentitySource();
57347
57359
  init_ManagedIdentityError();
@@ -57632,7 +57644,7 @@ var ManagedIdentityApplication;
57632
57644
  var init_ManagedIdentityApplication = __esm({
57633
57645
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/client/ManagedIdentityApplication.mjs"() {
57634
57646
  "use strict";
57635
- init_dist();
57647
+ init_dist2();
57636
57648
  init_Configuration();
57637
57649
  init_packageMetadata2();
57638
57650
  init_CryptoProvider();
@@ -57726,7 +57738,7 @@ var DistributedCachePlugin;
57726
57738
  var init_DistributedCachePlugin = __esm({
57727
57739
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/cache/distributed/DistributedCachePlugin.mjs"() {
57728
57740
  "use strict";
57729
- init_dist();
57741
+ init_dist2();
57730
57742
  DistributedCachePlugin = class {
57731
57743
  constructor(client, partitionManager) {
57732
57744
  this.client = client;
@@ -57753,8 +57765,8 @@ var init_DistributedCachePlugin = __esm({
57753
57765
  });
57754
57766
 
57755
57767
  // ../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/index.mjs
57756
- var dist_exports = {};
57757
- __export(dist_exports, {
57768
+ var dist_exports2 = {};
57769
+ __export(dist_exports2, {
57758
57770
  AuthError: () => AuthError,
57759
57771
  AuthErrorCodes: () => AuthErrorCodes_exports,
57760
57772
  AuthErrorMessage: () => AuthErrorMessage,
@@ -57793,7 +57805,7 @@ __export(dist_exports, {
57793
57805
  internals: () => internals_exports,
57794
57806
  version: () => version3
57795
57807
  });
57796
- var init_dist2 = __esm({
57808
+ var init_dist3 = __esm({
57797
57809
  "../../node_modules/.pnpm/@azure+msal-node@2.9.2/node_modules/@azure/msal-node/dist/index.mjs"() {
57798
57810
  "use strict";
57799
57811
  init_internals();
@@ -57812,7 +57824,7 @@ var init_dist2 = __esm({
57812
57824
  init_DistributedCachePlugin();
57813
57825
  init_Constants2();
57814
57826
  init_CryptoProvider();
57815
- init_dist();
57827
+ init_dist2();
57816
57828
  init_packageMetadata2();
57817
57829
  }
57818
57830
  });
@@ -58244,7 +58256,7 @@ var init_fabricMsi = __esm({
58244
58256
  var init_msal = __esm({
58245
58257
  "../../node_modules/.pnpm/@azure+identity@4.3.0/node_modules/@azure/identity/dist-esm/src/msal/msal.js"() {
58246
58258
  "use strict";
58247
- init_dist2();
58259
+ init_dist3();
58248
58260
  }
58249
58261
  });
58250
58262
 
@@ -58290,15 +58302,15 @@ function getKnownAuthorities(tenantId, authorityHost, disableInstanceDiscovery)
58290
58302
  function getMSALLogLevel(logLevel) {
58291
58303
  switch (logLevel) {
58292
58304
  case "error":
58293
- return dist_exports.LogLevel.Error;
58305
+ return dist_exports2.LogLevel.Error;
58294
58306
  case "info":
58295
- return dist_exports.LogLevel.Info;
58307
+ return dist_exports2.LogLevel.Info;
58296
58308
  case "verbose":
58297
- return dist_exports.LogLevel.Verbose;
58309
+ return dist_exports2.LogLevel.Verbose;
58298
58310
  case "warning":
58299
- return dist_exports.LogLevel.Warning;
58311
+ return dist_exports2.LogLevel.Warning;
58300
58312
  default:
58301
- return dist_exports.LogLevel.Info;
58313
+ return dist_exports2.LogLevel.Info;
58302
58314
  }
58303
58315
  }
58304
58316
  function randomUUID4() {
@@ -58374,16 +58386,16 @@ var init_utils3 = __esm({
58374
58386
  return;
58375
58387
  }
58376
58388
  switch (level) {
58377
- case dist_exports.LogLevel.Error:
58389
+ case dist_exports2.LogLevel.Error:
58378
58390
  credLogger.info(`MSAL ${platform} V2 error: ${message}`);
58379
58391
  return;
58380
- case dist_exports.LogLevel.Info:
58392
+ case dist_exports2.LogLevel.Info:
58381
58393
  credLogger.info(`MSAL ${platform} V2 info message: ${message}`);
58382
58394
  return;
58383
- case dist_exports.LogLevel.Verbose:
58395
+ case dist_exports2.LogLevel.Verbose:
58384
58396
  credLogger.info(`MSAL ${platform} V2 verbose message: ${message}`);
58385
58397
  return;
58386
- case dist_exports.LogLevel.Warning:
58398
+ case dist_exports2.LogLevel.Warning:
58387
58399
  credLogger.info(`MSAL ${platform} V2 warning: ${message}`);
58388
58400
  return;
58389
58401
  }
@@ -58856,7 +58868,7 @@ var msalLogger;
58856
58868
  var init_msalClient = __esm({
58857
58869
  "../../node_modules/.pnpm/@azure+identity@4.3.0/node_modules/@azure/identity/dist-esm/src/msal/nodeFlows/msalClient.js"() {
58858
58870
  "use strict";
58859
- init_dist2();
58871
+ init_dist3();
58860
58872
  init_logging();
58861
58873
  init_msalPlugins();
58862
58874
  init_utils3();
@@ -59041,7 +59053,7 @@ var logger15, ManagedIdentityCredential;
59041
59053
  var init_managedIdentityCredential = __esm({
59042
59054
  "../../node_modules/.pnpm/@azure+identity@4.3.0/node_modules/@azure/identity/dist-esm/src/credentials/managedIdentityCredential/index.js"() {
59043
59055
  "use strict";
59044
- init_dist2();
59056
+ init_dist3();
59045
59057
  init_errors();
59046
59058
  init_logging();
59047
59059
  init_constants();
@@ -60302,7 +60314,7 @@ var MsalNode;
60302
60314
  var init_msalNodeCommon = __esm({
60303
60315
  "../../node_modules/.pnpm/@azure+identity@4.3.0/node_modules/@azure/identity/dist-esm/src/msal/nodeFlows/msalNodeCommon.js"() {
60304
60316
  "use strict";
60305
- init_dist2();
60317
+ init_dist3();
60306
60318
  init_constants();
60307
60319
  init_logging();
60308
60320
  init_utils3();
@@ -66294,7 +66306,7 @@ var require_end_of_stream = __commonJS({
66294
66306
  var process3 = require_process();
66295
66307
  var { AbortError: AbortError3, codes } = require_errors3();
66296
66308
  var { ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE } = codes;
66297
- var { kEmptyObject, once: once2 } = require_util();
66309
+ var { kEmptyObject, once: once3 } = require_util();
66298
66310
  var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators();
66299
66311
  var { Promise: Promise2, PromisePrototypeThen } = require_primordials();
66300
66312
  var {
@@ -66330,7 +66342,7 @@ var require_end_of_stream = __commonJS({
66330
66342
  }
66331
66343
  validateFunction(callback, "callback");
66332
66344
  validateAbortSignal(options.signal, "options.signal");
66333
- callback = once2(callback);
66345
+ callback = once3(callback);
66334
66346
  if (isReadableStream2(stream) || isWritableStream(stream)) {
66335
66347
  return eosWeb(stream, options, callback);
66336
66348
  }
@@ -66467,7 +66479,7 @@ var require_end_of_stream = __commonJS({
66467
66479
  process3.nextTick(abort);
66468
66480
  } else {
66469
66481
  const originalCallback = callback;
66470
- callback = once2((...args) => {
66482
+ callback = once3((...args) => {
66471
66483
  options.signal.removeEventListener("abort", abort);
66472
66484
  originalCallback.apply(stream, args);
66473
66485
  });
@@ -66493,7 +66505,7 @@ var require_end_of_stream = __commonJS({
66493
66505
  process3.nextTick(abort);
66494
66506
  } else {
66495
66507
  const originalCallback = callback;
66496
- callback = once2((...args) => {
66508
+ callback = once3((...args) => {
66497
66509
  options.signal.removeEventListener("abort", abort);
66498
66510
  originalCallback.apply(stream, args);
66499
66511
  });
@@ -69311,7 +69323,7 @@ var require_pipeline = __commonJS({
69311
69323
  var process3 = require_process();
69312
69324
  var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator } = require_primordials();
69313
69325
  var eos = require_end_of_stream();
69314
- var { once: once2 } = require_util();
69326
+ var { once: once3 } = require_util();
69315
69327
  var destroyImpl = require_destroy();
69316
69328
  var Duplex = require_duplex();
69317
69329
  var {
@@ -69462,7 +69474,7 @@ var require_pipeline = __commonJS({
69462
69474
  }
69463
69475
  }
69464
69476
  function pipeline(...streams) {
69465
- return pipelineImpl(streams, once2(popCallback(streams)));
69477
+ return pipelineImpl(streams, once3(popCallback(streams)));
69466
69478
  }
69467
69479
  function pipelineImpl(streams, callback, opts) {
69468
69480
  if (streams.length === 1 && ArrayIsArray(streams[0])) {
@@ -99268,7 +99280,7 @@ var require_parser2 = __commonJS({
99268
99280
  });
99269
99281
 
99270
99282
  // ../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/index.js
99271
- var require_dist4 = __commonJS({
99283
+ var require_dist3 = __commonJS({
99272
99284
  "../../node_modules/.pnpm/pg-protocol@1.10.3/node_modules/pg-protocol/dist/index.js"(exports2) {
99273
99285
  "use strict";
99274
99286
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -99372,7 +99384,7 @@ var require_connection3 = __commonJS({
99372
99384
  "../../node_modules/.pnpm/pg@8.16.3/node_modules/pg/lib/connection.js"(exports2, module2) {
99373
99385
  "use strict";
99374
99386
  var EventEmitter = require("events").EventEmitter;
99375
- var { parse: parse5, serialize: serialize2 } = require_dist4();
99387
+ var { parse: parse5, serialize: serialize2 } = require_dist3();
99376
99388
  var { getStream, getSecureStream } = require_stream3();
99377
99389
  var flushBuffer = serialize2.flush();
99378
99390
  var syncBuffer = serialize2.sync();
@@ -101162,7 +101174,7 @@ var require_lib5 = __commonJS({
101162
101174
  var utils = require_utils6();
101163
101175
  var Pool2 = require_pg_pool();
101164
101176
  var TypeOverrides2 = require_type_overrides();
101165
- var { DatabaseError: DatabaseError2 } = require_dist4();
101177
+ var { DatabaseError: DatabaseError2 } = require_dist3();
101166
101178
  var { escapeIdentifier: escapeIdentifier2, escapeLiteral: escapeLiteral2 } = require_utils6();
101167
101179
  var poolFactory = (Client3) => {
101168
101180
  return class BoundPool extends Pool2 {
@@ -101325,7 +101337,7 @@ __export(index_exports, {
101325
101337
  module.exports = __toCommonJS(index_exports);
101326
101338
 
101327
101339
  // package.json
101328
- var version = "7.5.0-dev.9";
101340
+ var version = "7.5.0";
101329
101341
 
101330
101342
  // ../../node_modules/.pnpm/temporal-polyfill@0.3.0/node_modules/temporal-polyfill/chunks/internal.js
101331
101343
  function clampProp(e2, n2, t2, o2, r2) {
@@ -106189,7 +106201,7 @@ function createConsoleLogger(logFormat, logLevel) {
106189
106201
  return new Logger(sink);
106190
106202
  }
106191
106203
 
106192
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/utils/url.js
106204
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/utils/url.js
106193
106205
  var splitPath = (path3) => {
106194
106206
  const paths = path3.split("/");
106195
106207
  if (paths[0] === "") {
@@ -106264,9 +106276,11 @@ var getPath = (request3) => {
106264
106276
  const charCode = url2.charCodeAt(i2);
106265
106277
  if (charCode === 37) {
106266
106278
  const queryIndex = url2.indexOf("?", i2);
106267
- const path3 = url2.slice(start, queryIndex === -1 ? void 0 : queryIndex);
106279
+ const hashIndex = url2.indexOf("#", i2);
106280
+ const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);
106281
+ const path3 = url2.slice(start, end);
106268
106282
  return tryDecodeURI(path3.includes("%25") ? path3.replace(/%25/g, "%2525") : path3);
106269
- } else if (charCode === 63) {
106283
+ } else if (charCode === 63 || charCode === 35) {
106270
106284
  break;
106271
106285
  }
106272
106286
  }
@@ -106391,7 +106405,7 @@ var getQueryParams = (url2, key) => {
106391
106405
  };
106392
106406
  var decodeURIComponent_ = decodeURIComponent;
106393
106407
 
106394
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/utils/cookie.js
106408
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/utils/cookie.js
106395
106409
  var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/;
106396
106410
  var validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/;
106397
106411
  var parse = (cookie, name6) => {
@@ -106424,7 +106438,7 @@ var parse = (cookie, name6) => {
106424
106438
  return parsedCookie;
106425
106439
  };
106426
106440
 
106427
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/helper/cookie/index.js
106441
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/helper/cookie/index.js
106428
106442
  var getCookie = (c2, key, prefix) => {
106429
106443
  const cookie = c2.req.raw.headers.get("Cookie");
106430
106444
  if (typeof key === "string") {
@@ -106447,7 +106461,7 @@ var getCookie = (c2, key, prefix) => {
106447
106461
  return obj;
106448
106462
  };
106449
106463
 
106450
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/http-exception.js
106464
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/http-exception.js
106451
106465
  var HTTPException = class extends Error {
106452
106466
  res;
106453
106467
  status;
@@ -106480,7 +106494,7 @@ var HTTPException = class extends Error {
106480
106494
  }
106481
106495
  };
106482
106496
 
106483
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/utils/buffer.js
106497
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/utils/buffer.js
106484
106498
  var bufferToFormData = (arrayBuffer, contentType) => {
106485
106499
  const response = new Response(arrayBuffer, {
106486
106500
  headers: {
@@ -106490,7 +106504,7 @@ var bufferToFormData = (arrayBuffer, contentType) => {
106490
106504
  return response.formData();
106491
106505
  };
106492
106506
 
106493
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/validator/validator.js
106507
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/validator/validator.js
106494
106508
  var jsonRegex = /^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/;
106495
106509
  var multipartRegex = /^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/;
106496
106510
  var urlencodedRegex = /^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/;
@@ -106528,7 +106542,7 @@ var validator = (target, validationFunc) => {
106528
106542
  throw new HTTPException(400, { message });
106529
106543
  }
106530
106544
  }
106531
- const form = {};
106545
+ const form = /* @__PURE__ */ Object.create(null);
106532
106546
  formData.forEach((value2, key) => {
106533
106547
  if (key.endsWith("[]")) {
106534
106548
  ;
@@ -106536,7 +106550,7 @@ var validator = (target, validationFunc) => {
106536
106550
  } else if (Array.isArray(form[key])) {
106537
106551
  ;
106538
106552
  form[key].push(value2);
106539
- } else if (key in form) {
106553
+ } else if (Object.hasOwn(form, key)) {
106540
106554
  form[key] = [form[key], value2];
106541
106555
  } else {
106542
106556
  form[key] = value2;
@@ -106571,7 +106585,7 @@ var validator = (target, validationFunc) => {
106571
106585
  };
106572
106586
  };
106573
106587
 
106574
- // ../../node_modules/.pnpm/@hono+zod-validator@0.7.2_hono@4.11.7_zod@4.1.3/node_modules/@hono/zod-validator/dist/index.js
106588
+ // ../../node_modules/.pnpm/@hono+zod-validator@0.7.2_hono@4.12.7_zod@4.1.3/node_modules/@hono/zod-validator/dist/index.js
106575
106589
  var zValidator = (target, schema, hook, options) => (
106576
106590
  // @ts-expect-error not typed well
106577
106591
  validator(target, async (value, c2) => {
@@ -106735,20 +106749,22 @@ var PrismaClientValidationError = class extends Error {
106735
106749
  };
106736
106750
  setClassName(PrismaClientValidationError, "PrismaClientValidationError");
106737
106751
  var secret = Symbol();
106738
- var representations = /* @__PURE__ */ new WeakMap();
106752
+ var PRISMA_OBJECT_ENUM_VALUE = Symbol.for("prisma.objectEnumValue");
106739
106753
  var ObjectEnumValue = class {
106754
+ [PRISMA_OBJECT_ENUM_VALUE] = true;
106755
+ #representation;
106740
106756
  constructor(arg) {
106741
106757
  if (arg === secret) {
106742
- representations.set(this, `Prisma.${this._getName()}`);
106758
+ this.#representation = `Prisma.${this._getName()}`;
106743
106759
  } else {
106744
- representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`);
106760
+ this.#representation = `new Prisma.${this._getNamespace()}.${this._getName()}()`;
106745
106761
  }
106746
106762
  }
106747
106763
  _getName() {
106748
106764
  return this.constructor.name;
106749
106765
  }
106750
106766
  toString() {
106751
- return representations.get(this);
106767
+ return this.#representation;
106752
106768
  }
106753
106769
  };
106754
106770
  function setClassName2(classObject, name6) {
@@ -110496,8 +110512,11 @@ function paginateSingleList(list, { cursor, skip, take }) {
110496
110512
  const end = take !== null ? start + take : list.length;
110497
110513
  return list.slice(start, end);
110498
110514
  }
110499
- function getRecordKey(record2, fields) {
110500
- return JSON.stringify(fields.map((field) => record2[field]));
110515
+ function getRecordKey(record2, fields, mappers) {
110516
+ const array2 = fields.map(
110517
+ (field, index) => mappers?.[index] ? record2[field] !== null ? mappers[index](record2[field]) : null : record2[field]
110518
+ );
110519
+ return JSON.stringify(array2);
110501
110520
  }
110502
110521
  function isPrismaValuePlaceholder(value) {
110503
110522
  return typeof value === "object" && value !== null && value["prisma__type"] === "param";
@@ -110530,7 +110549,11 @@ function evaluateArg(arg, scope, generators) {
110530
110549
  if (found === void 0) {
110531
110550
  throw new Error(`Missing value for query variable ${arg.prisma__value.name}`);
110532
110551
  }
110533
- arg = found;
110552
+ if (arg.prisma__value.type === "DateTime" && typeof found === "string") {
110553
+ arg = new Date(found);
110554
+ } else {
110555
+ arg = found;
110556
+ }
110534
110557
  } else if (isPrismaValueGenerator(arg)) {
110535
110558
  const { name: name6, args } = arg.prisma__value;
110536
110559
  const generator = generators[name6];
@@ -110588,7 +110611,10 @@ function renderFragment(fragment, placeholderFormat, ctx) {
110588
110611
  case "stringChunk":
110589
110612
  return fragment.chunk;
110590
110613
  case "parameterTuple": {
110591
- const placeholders = fragment.value.length == 0 ? "NULL" : fragment.value.map(() => formatPlaceholder(placeholderFormat, ctx.placeholderNumber++)).join(",");
110614
+ const placeholders = fragment.value.length == 0 ? "NULL" : fragment.value.map(() => {
110615
+ const item = formatPlaceholder(placeholderFormat, ctx.placeholderNumber++);
110616
+ return `${fragment.itemPrefix}${item}${fragment.itemSuffix}`;
110617
+ }).join(fragment.itemSeparator);
110592
110618
  return `(${placeholders})`;
110593
110619
  }
110594
110620
  case "parameterTupleList": {
@@ -110942,7 +110968,7 @@ function doesSatisfyRule(data, rule) {
110942
110968
  }
110943
110969
  }
110944
110970
  function renderMessage(data, error44) {
110945
- switch (error44.error_identifier) {
110971
+ switch (error44.errorIdentifier) {
110946
110972
  case "RELATION_VIOLATION":
110947
110973
  return `The change you are trying to make would violate the required relation '${error44.context.relation}' between the \`${error44.context.modelA}\` and \`${error44.context.modelB}\` models.`;
110948
110974
  case "MISSING_RECORD":
@@ -110962,7 +110988,7 @@ function renderMessage(data, error44) {
110962
110988
  }
110963
110989
  }
110964
110990
  function getErrorCode2(error44) {
110965
- switch (error44.error_identifier) {
110991
+ switch (error44.errorIdentifier) {
110966
110992
  case "RELATION_VIOLATION":
110967
110993
  return "P2014";
110968
110994
  case "RECORDS_NOT_CONNECTED":
@@ -111075,7 +111101,7 @@ var QueryInterpreter = class _QueryInterpreter {
111075
111101
  sum2 += await this.#withQuerySpanAndEvent(
111076
111102
  commentedQuery,
111077
111103
  context2.queryable,
111078
- () => context2.queryable.executeRaw(commentedQuery).catch(
111104
+ () => context2.queryable.executeRaw(cloneObject(commentedQuery)).catch(
111079
111105
  (err) => node.args.type === "rawSql" ? rethrowAsUserFacingRawError(err) : rethrowAsUserFacing(err)
111080
111106
  )
111081
111107
  );
@@ -111090,7 +111116,7 @@ var QueryInterpreter = class _QueryInterpreter {
111090
111116
  const result = await this.#withQuerySpanAndEvent(
111091
111117
  commentedQuery,
111092
111118
  context2.queryable,
111093
- () => context2.queryable.queryRaw(commentedQuery).catch(
111119
+ () => context2.queryable.queryRaw(cloneObject(commentedQuery)).catch(
111094
111120
  (err) => node.args.type === "rawSql" ? rethrowAsUserFacingRawError(err) : rethrowAsUserFacing(err)
111095
111121
  )
111096
111122
  );
@@ -111142,7 +111168,7 @@ var QueryInterpreter = class _QueryInterpreter {
111142
111168
  childRecords: (await this.interpretNode(joinExpr.child, context2)).value
111143
111169
  }))
111144
111170
  );
111145
- return { value: attachChildrenToParents(parent, children), lastInsertId };
111171
+ return { value: attachChildrenToParents(parent, children, node.args.canAssumeStrictEquality), lastInsertId };
111146
111172
  }
111147
111173
  case "transaction": {
111148
111174
  if (!context2.transactionManager.enabled) {
@@ -111189,8 +111215,9 @@ var QueryInterpreter = class _QueryInterpreter {
111189
111215
  }
111190
111216
  case "process": {
111191
111217
  const { value, lastInsertId } = await this.interpretNode(node.args.expr, context2);
111192
- evaluateProcessingParameters(node.args.operations, context2.scope, context2.generators);
111193
- return { value: processRecords(value, node.args.operations), lastInsertId };
111218
+ const ops = cloneObject(node.args.operations);
111219
+ evaluateProcessingParameters(ops, context2.scope, context2.generators);
111220
+ return { value: processRecords(value, ops), lastInsertId };
111194
111221
  }
111195
111222
  case "initializeRecord": {
111196
111223
  const { lastInsertId } = await this.interpretNode(node.args.expr, context2);
@@ -111283,12 +111310,13 @@ function mapField2(value, field) {
111283
111310
  }
111284
111311
  return value;
111285
111312
  }
111286
- function attachChildrenToParents(parentRecords, children) {
111313
+ function attachChildrenToParents(parentRecords, children, canAssumeStrictEquality) {
111287
111314
  for (const { joinExpr, childRecords } of children) {
111288
111315
  const parentKeys = joinExpr.on.map(([k2]) => k2);
111289
111316
  const childKeys = joinExpr.on.map(([, k2]) => k2);
111290
111317
  const parentMap = {};
111291
- for (const parent of Array.isArray(parentRecords) ? parentRecords : [parentRecords]) {
111318
+ const parentArray = Array.isArray(parentRecords) ? parentRecords : [parentRecords];
111319
+ for (const parent of parentArray) {
111292
111320
  const parentRecord = asRecord(parent);
111293
111321
  const key = getRecordKey(parentRecord, parentKeys);
111294
111322
  if (!parentMap[key]) {
@@ -111301,11 +111329,12 @@ function attachChildrenToParents(parentRecords, children) {
111301
111329
  parentRecord[joinExpr.parentField] = [];
111302
111330
  }
111303
111331
  }
111332
+ const mappers = canAssumeStrictEquality ? void 0 : inferKeyCasts(parentArray, parentKeys);
111304
111333
  for (const childRecord of Array.isArray(childRecords) ? childRecords : [childRecords]) {
111305
111334
  if (childRecord === null) {
111306
111335
  continue;
111307
111336
  }
111308
- const key = getRecordKey(asRecord(childRecord), childKeys);
111337
+ const key = getRecordKey(asRecord(childRecord), childKeys, mappers);
111309
111338
  for (const parentRecord of parentMap[key] ?? []) {
111310
111339
  if (joinExpr.isRelationUnique) {
111311
111340
  parentRecord[joinExpr.parentField] = childRecord;
@@ -111317,6 +111346,40 @@ function attachChildrenToParents(parentRecords, children) {
111317
111346
  }
111318
111347
  return parentRecords;
111319
111348
  }
111349
+ function inferKeyCasts(rows, keys) {
111350
+ function getKeyCast(type2) {
111351
+ switch (type2) {
111352
+ case "number":
111353
+ return Number;
111354
+ case "string":
111355
+ return String;
111356
+ case "boolean":
111357
+ return Boolean;
111358
+ case "bigint":
111359
+ return BigInt;
111360
+ default:
111361
+ return;
111362
+ }
111363
+ }
111364
+ const keyCasts = Array.from({ length: keys.length });
111365
+ let keysFound = 0;
111366
+ for (const parent of rows) {
111367
+ const parentRecord = asRecord(parent);
111368
+ for (const [i2, key] of keys.entries()) {
111369
+ if (parentRecord[key] !== null && keyCasts[i2] === void 0) {
111370
+ const keyCast = getKeyCast(typeof parentRecord[key]);
111371
+ if (keyCast !== void 0) {
111372
+ keyCasts[i2] = keyCast;
111373
+ }
111374
+ keysFound++;
111375
+ }
111376
+ }
111377
+ if (keysFound === keys.length) {
111378
+ break;
111379
+ }
111380
+ }
111381
+ return keyCasts;
111382
+ }
111320
111383
  function evalFieldInitializer(initializer3, lastInsertId, scope, generators) {
111321
111384
  switch (initializer3.type) {
111322
111385
  case "value":
@@ -111376,6 +111439,9 @@ function evaluateProcessingParameters(ops, scope, generators) {
111376
111439
  evaluateProcessingParameters(nested, scope, generators);
111377
111440
  }
111378
111441
  }
111442
+ function cloneObject(value) {
111443
+ return klona(value);
111444
+ }
111379
111445
  async function getCrypto() {
111380
111446
  return globalThis.crypto ?? await import("node:crypto");
111381
111447
  }
@@ -111492,13 +111558,42 @@ var TransactionManager = class {
111492
111558
  );
111493
111559
  }
111494
111560
  async #startTransactionImpl(options) {
111561
+ if (options.newTxId) {
111562
+ return await this.#withActiveTransactionLock(options.newTxId, "start", async (existing) => {
111563
+ if (existing.status !== "running") {
111564
+ throw new TransactionInternalConsistencyError(
111565
+ `Transaction in invalid state ${existing.status} when starting a nested transaction.`
111566
+ );
111567
+ }
111568
+ if (!existing.transaction) {
111569
+ throw new TransactionInternalConsistencyError(
111570
+ `Transaction missing underlying driver transaction when starting a nested transaction.`
111571
+ );
111572
+ }
111573
+ existing.depth += 1;
111574
+ const savepointName = this.#nextSavepointName(existing);
111575
+ existing.savepoints.push(savepointName);
111576
+ try {
111577
+ await this.#requiredCreateSavepoint(existing.transaction)(savepointName);
111578
+ } catch (e2) {
111579
+ existing.depth -= 1;
111580
+ existing.savepoints.pop();
111581
+ throw e2;
111582
+ }
111583
+ return { id: existing.id };
111584
+ });
111585
+ }
111495
111586
  const transaction = {
111496
111587
  id: await randomUUID2(),
111497
111588
  status: "waiting",
111498
111589
  timer: void 0,
111499
111590
  timeout: options.timeout,
111500
111591
  startedAt: Date.now(),
111501
- transaction: void 0
111592
+ transaction: void 0,
111593
+ operationQueue: Promise.resolve(),
111594
+ depth: 1,
111595
+ savepoints: [],
111596
+ savepointCounter: 0
111502
111597
  };
111503
111598
  const abortController = new AbortController();
111504
111599
  const startTimer = createTimeoutIfDefined(() => abortController.abort(), options.maxWait);
@@ -111532,14 +111627,49 @@ var TransactionManager = class {
111532
111627
  }
111533
111628
  async commitTransaction(transactionId) {
111534
111629
  return await this.tracingHelper.runInChildSpan("commit_transaction", async () => {
111535
- const txw = this.#getActiveOrClosingTransaction(transactionId, "commit");
111536
- await this.#closeTransaction(txw, "committed");
111630
+ await this.#withActiveTransactionLock(transactionId, "commit", async (txw) => {
111631
+ if (txw.depth > 1) {
111632
+ if (!txw.transaction) throw new TransactionNotFoundError();
111633
+ const savepointName = txw.savepoints.at(-1);
111634
+ if (!savepointName) {
111635
+ throw new TransactionInternalConsistencyError(
111636
+ `Missing savepoint for nested commit. Depth: ${txw.depth}, transactionId: ${txw.id}`
111637
+ );
111638
+ }
111639
+ try {
111640
+ await this.#releaseSavepoint(txw.transaction, savepointName);
111641
+ } finally {
111642
+ txw.savepoints.pop();
111643
+ txw.depth -= 1;
111644
+ }
111645
+ return;
111646
+ }
111647
+ await this.#closeTransaction(txw, "committed");
111648
+ });
111537
111649
  });
111538
111650
  }
111539
111651
  async rollbackTransaction(transactionId) {
111540
111652
  return await this.tracingHelper.runInChildSpan("rollback_transaction", async () => {
111541
- const txw = this.#getActiveOrClosingTransaction(transactionId, "rollback");
111542
- await this.#closeTransaction(txw, "rolled_back");
111653
+ await this.#withActiveTransactionLock(transactionId, "rollback", async (txw) => {
111654
+ if (txw.depth > 1) {
111655
+ if (!txw.transaction) throw new TransactionNotFoundError();
111656
+ const savepointName = txw.savepoints.at(-1);
111657
+ if (!savepointName) {
111658
+ throw new TransactionInternalConsistencyError(
111659
+ `Missing savepoint for nested rollback. Depth: ${txw.depth}, transactionId: ${txw.id}`
111660
+ );
111661
+ }
111662
+ try {
111663
+ await this.#requiredRollbackToSavepoint(txw.transaction)(savepointName);
111664
+ await this.#releaseSavepoint(txw.transaction, savepointName);
111665
+ } finally {
111666
+ txw.savepoints.pop();
111667
+ txw.depth -= 1;
111668
+ }
111669
+ return;
111670
+ }
111671
+ await this.#closeTransaction(txw, "rolled_back");
111672
+ });
111543
111673
  });
111544
111674
  }
111545
111675
  async getTransaction(txInfo, operation) {
@@ -111583,22 +111713,90 @@ var TransactionManager = class {
111583
111713
  return transaction;
111584
111714
  }
111585
111715
  async cancelAllTransactions() {
111586
- await Promise.allSettled([...this.transactions.values()].map((tx) => this.#closeTransaction(tx, "rolled_back")));
111716
+ await Promise.allSettled(
111717
+ [...this.transactions.values()].map(
111718
+ (tx) => this.#runSerialized(tx, async () => {
111719
+ const current = this.transactions.get(tx.id);
111720
+ if (current) {
111721
+ await this.#closeTransaction(current, "rolled_back");
111722
+ }
111723
+ })
111724
+ )
111725
+ );
111726
+ }
111727
+ #nextSavepointName(transaction) {
111728
+ return `prisma_sp_${transaction.savepointCounter++}`;
111729
+ }
111730
+ #requiredCreateSavepoint(transaction) {
111731
+ if (transaction.createSavepoint) {
111732
+ return transaction.createSavepoint.bind(transaction);
111733
+ }
111734
+ throw new TransactionManagerError(
111735
+ `Nested transactions are not supported by adapter "${transaction.adapterName}" (${transaction.provider}): createSavepoint is not implemented.`
111736
+ );
111737
+ }
111738
+ #requiredRollbackToSavepoint(transaction) {
111739
+ if (transaction.rollbackToSavepoint) {
111740
+ return transaction.rollbackToSavepoint.bind(transaction);
111741
+ }
111742
+ throw new TransactionManagerError(
111743
+ `Nested transactions are not supported by adapter "${transaction.adapterName}" (${transaction.provider}): rollbackToSavepoint is not implemented.`
111744
+ );
111745
+ }
111746
+ async #releaseSavepoint(transaction, name6) {
111747
+ if (transaction.releaseSavepoint) {
111748
+ await transaction.releaseSavepoint(name6);
111749
+ }
111750
+ }
111751
+ #debugTransactionAlreadyClosedOnTimeout(transactionId) {
111752
+ debug3("Transaction already committed or rolled back when timeout happened.", transactionId);
111587
111753
  }
111588
111754
  #startTransactionTimeout(transactionId, timeout) {
111589
111755
  const timeoutStartedAt = Date.now();
111590
111756
  const timer = createTimeoutIfDefined(async () => {
111591
111757
  debug3("Transaction timed out.", { transactionId, timeoutStartedAt, timeout });
111592
111758
  const tx = this.transactions.get(transactionId);
111593
- if (tx && ["running", "waiting"].includes(tx.status)) {
111594
- await this.#closeTransaction(tx, "timed_out");
111595
- } else {
111596
- debug3("Transaction already committed or rolled back when timeout happened.", transactionId);
111759
+ if (!tx) {
111760
+ this.#debugTransactionAlreadyClosedOnTimeout(transactionId);
111761
+ return;
111597
111762
  }
111763
+ await this.#runSerialized(tx, async () => {
111764
+ const current = this.transactions.get(transactionId);
111765
+ if (current && ["running", "waiting"].includes(current.status)) {
111766
+ await this.#closeTransaction(current, "timed_out");
111767
+ } else {
111768
+ this.#debugTransactionAlreadyClosedOnTimeout(transactionId);
111769
+ }
111770
+ });
111598
111771
  }, timeout);
111599
111772
  timer?.unref?.();
111600
111773
  return timer;
111601
111774
  }
111775
+ // Any operation that mutates or closes a transaction must run through this lock so
111776
+ // status/savepoint/depth checks and updates happen against a stable view of state.
111777
+ async #withActiveTransactionLock(transactionId, operation, callback) {
111778
+ const tx = this.#getActiveOrClosingTransaction(transactionId, operation);
111779
+ return await this.#runSerialized(tx, async () => {
111780
+ const current = this.#getActiveOrClosingTransaction(transactionId, operation);
111781
+ return await callback(current);
111782
+ });
111783
+ }
111784
+ // Serializes operations per transaction id to prevent interleaving across awaits.
111785
+ // This avoids races where one operation mutates savepoint/depth state while another
111786
+ // operation is suspended, which could otherwise corrupt cleanup logic.
111787
+ async #runSerialized(tx, callback) {
111788
+ const previousOperation = tx.operationQueue;
111789
+ let releaseOperationLock;
111790
+ tx.operationQueue = new Promise((resolve) => {
111791
+ releaseOperationLock = resolve;
111792
+ });
111793
+ await previousOperation;
111794
+ try {
111795
+ return await callback();
111796
+ } finally {
111797
+ releaseOperationLock();
111798
+ }
111799
+ }
111602
111800
  async #closeTransaction(tx, status) {
111603
111801
  const createClosingPromise = async () => {
111604
111802
  debug3("Closing transaction.", { transactionId: tx.id, status });
@@ -111678,7 +111876,7 @@ function createTimeoutIfDefined(cb, ms) {
111678
111876
  return ms !== void 0 ? setTimeout(cb, ms) : void 0;
111679
111877
  }
111680
111878
 
111681
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/compose.js
111879
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/compose.js
111682
111880
  var compose = (middleware, onError, onNotFound) => {
111683
111881
  return (context2, next) => {
111684
111882
  let index = -1;
@@ -111722,10 +111920,10 @@ var compose = (middleware, onError, onNotFound) => {
111722
111920
  };
111723
111921
  };
111724
111922
 
111725
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/request/constants.js
111923
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/request/constants.js
111726
111924
  var GET_MATCH_RESULT = /* @__PURE__ */ Symbol();
111727
111925
 
111728
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/utils/body.js
111926
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/utils/body.js
111729
111927
  var parseBody = async (request3, options = /* @__PURE__ */ Object.create(null)) => {
111730
111928
  const { all = false, dot = false } = options;
111731
111929
  const headers = request3 instanceof HonoRequest ? request3.raw.headers : request3.headers;
@@ -111780,6 +111978,9 @@ var handleParsingAllValues = (form, key, value) => {
111780
111978
  }
111781
111979
  };
111782
111980
  var handleParsingNestedValues = (form, key, value) => {
111981
+ if (/(?:^|\.)__proto__\./.test(key)) {
111982
+ return;
111983
+ }
111783
111984
  let nestedForm = form;
111784
111985
  const keys = key.split(".");
111785
111986
  keys.forEach((key2, index) => {
@@ -111794,7 +111995,7 @@ var handleParsingNestedValues = (form, key, value) => {
111794
111995
  });
111795
111996
  };
111796
111997
 
111797
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/request.js
111998
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/request.js
111798
111999
  var tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);
111799
112000
  var HonoRequest = class {
111800
112001
  /**
@@ -112062,7 +112263,7 @@ var HonoRequest = class {
112062
112263
  }
112063
112264
  };
112064
112265
 
112065
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/utils/html.js
112266
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/utils/html.js
112066
112267
  var HtmlEscapedCallbackPhase = {
112067
112268
  Stringify: 1,
112068
112269
  BeforeStream: 2,
@@ -112104,7 +112305,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context2, buffer) =>
112104
112305
  }
112105
112306
  };
112106
112307
 
112107
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/context.js
112308
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/context.js
112108
112309
  var TEXT_PLAIN = "text/plain; charset=UTF-8";
112109
112310
  var setDefaultContentType = (contentType, headers) => {
112110
112311
  return {
@@ -112112,6 +112313,7 @@ var setDefaultContentType = (contentType, headers) => {
112112
112313
  ...headers
112113
112314
  };
112114
112315
  };
112316
+ var createResponseInstance = (body, init3) => new Response(body, init3);
112115
112317
  var Context = class {
112116
112318
  #rawRequest;
112117
112319
  #req;
@@ -112210,7 +112412,7 @@ var Context = class {
112210
112412
  * The Response object for the current request.
112211
112413
  */
112212
112414
  get res() {
112213
- return this.#res ||= new Response(null, {
112415
+ return this.#res ||= createResponseInstance(null, {
112214
112416
  headers: this.#preparedHeaders ??= new Headers()
112215
112417
  });
112216
112418
  }
@@ -112221,7 +112423,7 @@ var Context = class {
112221
112423
  */
112222
112424
  set res(_res) {
112223
112425
  if (this.#res && _res) {
112224
- _res = new Response(_res.body, _res);
112426
+ _res = createResponseInstance(_res.body, _res);
112225
112427
  for (const [k2, v2] of this.#res.headers.entries()) {
112226
112428
  if (k2 === "content-type") {
112227
112429
  continue;
@@ -112311,7 +112513,7 @@ var Context = class {
112311
112513
  */
112312
112514
  header = (name6, value, options) => {
112313
112515
  if (this.finalized) {
112314
- this.#res = new Response(this.#res.body, this.#res);
112516
+ this.#res = createResponseInstance(this.#res.body, this.#res);
112315
112517
  }
112316
112518
  const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();
112317
112519
  if (value === void 0) {
@@ -112400,7 +112602,7 @@ var Context = class {
112400
112602
  }
112401
112603
  }
112402
112604
  const status = typeof arg === "number" ? arg : arg?.status ?? this.#status;
112403
- return new Response(data, { status, headers: responseHeaders });
112605
+ return createResponseInstance(data, { status, headers: responseHeaders });
112404
112606
  }
112405
112607
  newResponse = (...args) => this.#newResponse(...args);
112406
112608
  /**
@@ -112505,12 +112707,12 @@ var Context = class {
112505
112707
  * ```
112506
112708
  */
112507
112709
  notFound = () => {
112508
- this.#notFoundHandler ??= () => new Response();
112710
+ this.#notFoundHandler ??= () => createResponseInstance();
112509
112711
  return this.#notFoundHandler(this);
112510
112712
  };
112511
112713
  };
112512
112714
 
112513
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router.js
112715
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router.js
112514
112716
  var METHOD_NAME_ALL = "ALL";
112515
112717
  var METHOD_NAME_ALL_LOWERCASE = "all";
112516
112718
  var METHODS = ["get", "post", "put", "delete", "options", "patch"];
@@ -112518,10 +112720,10 @@ var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is
112518
112720
  var UnsupportedPathError = class extends Error {
112519
112721
  };
112520
112722
 
112521
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/utils/constants.js
112723
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/utils/constants.js
112522
112724
  var COMPOSED_HANDLER = "__COMPOSED_HANDLER";
112523
112725
 
112524
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/hono-base.js
112726
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/hono-base.js
112525
112727
  var notFoundHandler = (c2) => {
112526
112728
  return c2.text("404 Not Found", 404);
112527
112729
  };
@@ -112892,7 +113094,7 @@ var Hono = class _Hono {
112892
113094
  };
112893
113095
  };
112894
113096
 
112895
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/reg-exp-router/matcher.js
113097
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/reg-exp-router/matcher.js
112896
113098
  var emptyParam = [];
112897
113099
  function match(method, path3) {
112898
113100
  const matchers = this.buildAllMatchers();
@@ -112913,7 +113115,7 @@ function match(method, path3) {
112913
113115
  return match2(method, path3);
112914
113116
  }
112915
113117
 
112916
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/reg-exp-router/node.js
113118
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/reg-exp-router/node.js
112917
113119
  var LABEL_REG_EXP_STR = "[^/]+";
112918
113120
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
112919
113121
  var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)";
@@ -113021,7 +113223,7 @@ var Node = class _Node {
113021
113223
  }
113022
113224
  };
113023
113225
 
113024
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/reg-exp-router/trie.js
113226
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/reg-exp-router/trie.js
113025
113227
  var Trie = class {
113026
113228
  #context = { varIndex: 0 };
113027
113229
  #root = new Node();
@@ -113077,7 +113279,7 @@ var Trie = class {
113077
113279
  }
113078
113280
  };
113079
113281
 
113080
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/reg-exp-router/router.js
113282
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/reg-exp-router/router.js
113081
113283
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
113082
113284
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
113083
113285
  function buildWildcardRegExp(path3) {
@@ -113256,7 +113458,7 @@ var RegExpRouter = class {
113256
113458
  }
113257
113459
  };
113258
113460
 
113259
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/smart-router/router.js
113461
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/smart-router/router.js
113260
113462
  var SmartRouter = class {
113261
113463
  name = "SmartRouter";
113262
113464
  #routers = [];
@@ -113311,8 +113513,14 @@ var SmartRouter = class {
113311
113513
  }
113312
113514
  };
113313
113515
 
113314
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/trie-router/node.js
113516
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/trie-router/node.js
113315
113517
  var emptyParams = /* @__PURE__ */ Object.create(null);
113518
+ var hasChildren = (children) => {
113519
+ for (const _3 in children) {
113520
+ return true;
113521
+ }
113522
+ return false;
113523
+ };
113316
113524
  var Node2 = class _Node2 {
113317
113525
  #methods;
113318
113526
  #children;
@@ -113362,8 +113570,7 @@ var Node2 = class _Node2 {
113362
113570
  });
113363
113571
  return curNode;
113364
113572
  }
113365
- #getHandlerSets(node, method, nodeParams, params) {
113366
- const handlerSets = [];
113573
+ #pushHandlerSets(handlerSets, node, method, nodeParams, params) {
113367
113574
  for (let i2 = 0, len = node.#methods.length; i2 < len; i2++) {
113368
113575
  const m2 = node.#methods[i2];
113369
113576
  const handlerSet = m2[method] || m2[METHOD_NAME_ALL];
@@ -113381,7 +113588,6 @@ var Node2 = class _Node2 {
113381
113588
  }
113382
113589
  }
113383
113590
  }
113384
- return handlerSets;
113385
113591
  }
113386
113592
  search(method, path3) {
113387
113593
  const handlerSets = [];
@@ -113390,7 +113596,9 @@ var Node2 = class _Node2 {
113390
113596
  let curNodes = [curNode];
113391
113597
  const parts = splitPath(path3);
113392
113598
  const curNodesQueue = [];
113393
- for (let i2 = 0, len = parts.length; i2 < len; i2++) {
113599
+ const len = parts.length;
113600
+ let partOffsets = null;
113601
+ for (let i2 = 0; i2 < len; i2++) {
113394
113602
  const part = parts[i2];
113395
113603
  const isLast = i2 === len - 1;
113396
113604
  const tempNodes = [];
@@ -113401,11 +113609,9 @@ var Node2 = class _Node2 {
113401
113609
  nextNode.#params = node.#params;
113402
113610
  if (isLast) {
113403
113611
  if (nextNode.#children["*"]) {
113404
- handlerSets.push(
113405
- ...this.#getHandlerSets(nextNode.#children["*"], method, node.#params)
113406
- );
113612
+ this.#pushHandlerSets(handlerSets, nextNode.#children["*"], method, node.#params);
113407
113613
  }
113408
- handlerSets.push(...this.#getHandlerSets(nextNode, method, node.#params));
113614
+ this.#pushHandlerSets(handlerSets, nextNode, method, node.#params);
113409
113615
  } else {
113410
113616
  tempNodes.push(nextNode);
113411
113617
  }
@@ -113416,7 +113622,7 @@ var Node2 = class _Node2 {
113416
113622
  if (pattern === "*") {
113417
113623
  const astNode = node.#children["*"];
113418
113624
  if (astNode) {
113419
- handlerSets.push(...this.#getHandlerSets(astNode, method, node.#params));
113625
+ this.#pushHandlerSets(handlerSets, astNode, method, node.#params);
113420
113626
  astNode.#params = params;
113421
113627
  tempNodes.push(astNode);
113422
113628
  }
@@ -113427,13 +113633,21 @@ var Node2 = class _Node2 {
113427
113633
  continue;
113428
113634
  }
113429
113635
  const child = node.#children[key];
113430
- const restPathString = parts.slice(i2).join("/");
113431
113636
  if (matcher instanceof RegExp) {
113637
+ if (partOffsets === null) {
113638
+ partOffsets = new Array(len);
113639
+ let offset = path3[0] === "/" ? 1 : 0;
113640
+ for (let p2 = 0; p2 < len; p2++) {
113641
+ partOffsets[p2] = offset;
113642
+ offset += parts[p2].length + 1;
113643
+ }
113644
+ }
113645
+ const restPathString = path3.substring(partOffsets[i2]);
113432
113646
  const m2 = matcher.exec(restPathString);
113433
113647
  if (m2) {
113434
113648
  params[name6] = m2[0];
113435
- handlerSets.push(...this.#getHandlerSets(child, method, node.#params, params));
113436
- if (Object.keys(child.#children).length) {
113649
+ this.#pushHandlerSets(handlerSets, child, method, node.#params, params);
113650
+ if (hasChildren(child.#children)) {
113437
113651
  child.#params = params;
113438
113652
  const componentCount = m2[0].match(/\//)?.length ?? 0;
113439
113653
  const targetCurNodes = curNodesQueue[componentCount] ||= [];
@@ -113445,10 +113659,14 @@ var Node2 = class _Node2 {
113445
113659
  if (matcher === true || matcher.test(part)) {
113446
113660
  params[name6] = part;
113447
113661
  if (isLast) {
113448
- handlerSets.push(...this.#getHandlerSets(child, method, params, node.#params));
113662
+ this.#pushHandlerSets(handlerSets, child, method, params, node.#params);
113449
113663
  if (child.#children["*"]) {
113450
- handlerSets.push(
113451
- ...this.#getHandlerSets(child.#children["*"], method, params, node.#params)
113664
+ this.#pushHandlerSets(
113665
+ handlerSets,
113666
+ child.#children["*"],
113667
+ method,
113668
+ params,
113669
+ node.#params
113452
113670
  );
113453
113671
  }
113454
113672
  } else {
@@ -113458,7 +113676,8 @@ var Node2 = class _Node2 {
113458
113676
  }
113459
113677
  }
113460
113678
  }
113461
- curNodes = tempNodes.concat(curNodesQueue.shift() ?? []);
113679
+ const shifted = curNodesQueue.shift();
113680
+ curNodes = shifted ? tempNodes.concat(shifted) : tempNodes;
113462
113681
  }
113463
113682
  if (handlerSets.length > 1) {
113464
113683
  handlerSets.sort((a2, b2) => {
@@ -113469,7 +113688,7 @@ var Node2 = class _Node2 {
113469
113688
  }
113470
113689
  };
113471
113690
 
113472
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/router/trie-router/router.js
113691
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/router/trie-router/router.js
113473
113692
  var TrieRouter = class {
113474
113693
  name = "TrieRouter";
113475
113694
  #node;
@@ -113491,7 +113710,7 @@ var TrieRouter = class {
113491
113710
  }
113492
113711
  };
113493
113712
 
113494
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/hono.js
113713
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/hono.js
113495
113714
  var Hono2 = class extends Hono {
113496
113715
  /**
113497
113716
  * Creates an instance of the Hono class.
@@ -113815,7 +114034,7 @@ function runInActiveSpan(nameOrOptions, fn2) {
113815
114034
  var mariadb = __toESM(require_promise(), 1);
113816
114035
  var name = "@prisma/adapter-mariadb";
113817
114036
  var UNSIGNED_FLAG = 1 << 5;
113818
- var BINARY_FLAG = 1 << 7;
114037
+ var BINARY_COLLATION_INDEX = 63;
113819
114038
  function mapColumnType(field) {
113820
114039
  switch (field.type) {
113821
114040
  case "TINY":
@@ -113858,7 +114077,7 @@ function mapColumnType(field) {
113858
114077
  case "LONG_BLOB":
113859
114078
  if (field["dataTypeFormat"] === "json") {
113860
114079
  return ColumnTypeEnum.Json;
113861
- } else if (field.flags.valueOf() & BINARY_FLAG) {
114080
+ } else if (field.collation.index === BINARY_COLLATION_INDEX) {
113862
114081
  return ColumnTypeEnum.Bytes;
113863
114082
  } else {
113864
114083
  return ColumnTypeEnum.Text;
@@ -114110,7 +114329,7 @@ var MariaDbQueryable = class {
114110
114329
  typeCast
114111
114330
  };
114112
114331
  const values = args.map((arg, i2) => mapArg(arg, query2.argTypes[i2]));
114113
- return await this.client.query(req, values);
114332
+ return await this.client.execute(req, values);
114114
114333
  } catch (e2) {
114115
114334
  const error44 = e2;
114116
114335
  this.onError(error44);
@@ -114124,18 +114343,40 @@ var MariaDbQueryable = class {
114124
114343
  var MariaDbTransaction = class extends MariaDbQueryable {
114125
114344
  constructor(conn, options, cleanup) {
114126
114345
  super(conn);
114346
+ this.conn = conn;
114127
114347
  this.options = options;
114128
114348
  this.cleanup = cleanup;
114129
114349
  }
114130
114350
  async commit() {
114131
114351
  debug4(`[js::commit]`);
114132
- this.cleanup?.();
114133
- await this.client.end();
114352
+ try {
114353
+ await this.client.query({ sql: "COMMIT" });
114354
+ } catch (err) {
114355
+ this.onError(err);
114356
+ } finally {
114357
+ this.cleanup?.();
114358
+ await this.client.end();
114359
+ }
114134
114360
  }
114135
114361
  async rollback() {
114136
114362
  debug4(`[js::rollback]`);
114137
- this.cleanup?.();
114138
- await this.client.end();
114363
+ try {
114364
+ await this.client.query({ sql: "ROLLBACK" });
114365
+ } catch (err) {
114366
+ this.onError(err);
114367
+ } finally {
114368
+ this.cleanup?.();
114369
+ await this.client.end();
114370
+ }
114371
+ }
114372
+ async createSavepoint(name22) {
114373
+ await this.client.query({ sql: `SAVEPOINT ${name22}` }).catch(this.onError.bind(this));
114374
+ }
114375
+ async rollbackToSavepoint(name22) {
114376
+ await this.client.query({ sql: `ROLLBACK TO ${name22}` }).catch(this.onError.bind(this));
114377
+ }
114378
+ async releaseSavepoint(name22) {
114379
+ await this.client.query({ sql: `RELEASE SAVEPOINT ${name22}` }).catch(this.onError.bind(this));
114139
114380
  }
114140
114381
  };
114141
114382
  var PrismaMariaDbAdapter = class extends MariaDbQueryable {
@@ -114155,7 +114396,7 @@ var PrismaMariaDbAdapter = class extends MariaDbQueryable {
114155
114396
  }
114156
114397
  async startTransaction(isolationLevel) {
114157
114398
  const options = {
114158
- usePhantomQuery: false
114399
+ usePhantomQuery: true
114159
114400
  };
114160
114401
  const tag2 = "[js::startTransaction]";
114161
114402
  debug4("%s options: %O", tag2, options);
@@ -114177,7 +114418,7 @@ var PrismaMariaDbAdapter = class extends MariaDbQueryable {
114177
114418
  argTypes: []
114178
114419
  });
114179
114420
  }
114180
- await tx.executeRaw({ sql: "BEGIN", args: [], argTypes: [] });
114421
+ await tx.conn.query({ sql: "BEGIN" }).catch(this.onError.bind(this));
114181
114422
  return tx;
114182
114423
  } catch (error44) {
114183
114424
  await conn.end();
@@ -114244,7 +114485,7 @@ function inferCapabilities(version5) {
114244
114485
  const [versionStr, suffix] = version5.split("-");
114245
114486
  const [major2, minor, patch] = versionStr.split(".").map((n2) => parseInt(n2, 10));
114246
114487
  const isMariaDB = suffix?.toLowerCase()?.includes("mariadb") ?? false;
114247
- const supportsRelationJoins = !isMariaDB && (major2 > 8 || major2 === 8 && minor >= 0 && patch >= 13);
114488
+ const supportsRelationJoins = !isMariaDB && (major2 > 8 || major2 === 8 && (minor > 0 || minor === 0 && patch >= 13));
114248
114489
  return { supportsRelationJoins };
114249
114490
  }
114250
114491
  function rewriteConnectionString(config3) {
@@ -115165,6 +115406,12 @@ var MssqlTransaction = class extends MssqlQueryable {
115165
115406
  release2();
115166
115407
  }
115167
115408
  }
115409
+ async createSavepoint(name22) {
115410
+ await this.executeRaw({ sql: `SAVE TRANSACTION ${name22}`, args: [], argTypes: [] });
115411
+ }
115412
+ async rollbackToSavepoint(name22) {
115413
+ await this.executeRaw({ sql: `ROLLBACK TRANSACTION ${name22}`, args: [], argTypes: [] });
115414
+ }
115168
115415
  };
115169
115416
  var PrismaMssqlAdapter = class extends MssqlQueryable {
115170
115417
  constructor(pool2, options) {
@@ -115907,6 +116154,15 @@ var PgTransaction = class extends PgQueryable {
115907
116154
  this.cleanup?.();
115908
116155
  this.client.release();
115909
116156
  }
116157
+ async createSavepoint(name22) {
116158
+ await this.executeRaw({ sql: `SAVEPOINT ${name22}`, args: [], argTypes: [] });
116159
+ }
116160
+ async rollbackToSavepoint(name22) {
116161
+ await this.executeRaw({ sql: `ROLLBACK TO SAVEPOINT ${name22}`, args: [], argTypes: [] });
116162
+ }
116163
+ async releaseSavepoint(name22) {
116164
+ await this.executeRaw({ sql: `RELEASE SAVEPOINT ${name22}`, args: [], argTypes: [] });
116165
+ }
115910
116166
  };
115911
116167
  var PrismaPgAdapter = class extends PgQueryable {
115912
116168
  constructor(client, pgOptions, release2) {
@@ -116103,13 +116359,15 @@ function createConnectionStringRegex(protocols) {
116103
116359
  }
116104
116360
  function wrapFactory(protocols, factory) {
116105
116361
  return {
116106
- ...factory,
116362
+ adapterName: factory.adapterName,
116363
+ provider: factory.provider,
116107
116364
  connect: () => factory.connect().then(wrapAdapter.bind(null, protocols), rethrowSanitizedError.bind(null, protocols))
116108
116365
  };
116109
116366
  }
116110
116367
  function wrapAdapter(protocols, adapter) {
116111
116368
  return {
116112
- ...adapter,
116369
+ adapterName: adapter.adapterName,
116370
+ provider: adapter.provider,
116113
116371
  dispose: () => adapter.dispose().catch(rethrowSanitizedError.bind(null, protocols)),
116114
116372
  executeRaw: (query2) => adapter.executeRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
116115
116373
  queryRaw: (query2) => adapter.queryRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
@@ -116120,11 +116378,16 @@ function wrapAdapter(protocols, adapter) {
116120
116378
  }
116121
116379
  function wrapTransaction(protocols, tx) {
116122
116380
  return {
116123
- ...tx,
116381
+ adapterName: tx.adapterName,
116382
+ provider: tx.provider,
116383
+ options: tx.options,
116124
116384
  commit: () => tx.commit().catch(rethrowSanitizedError.bind(null, protocols)),
116125
116385
  rollback: () => tx.rollback().catch(rethrowSanitizedError.bind(null, protocols)),
116126
116386
  executeRaw: (query2) => tx.executeRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
116127
- queryRaw: (query2) => tx.queryRaw(query2).catch(rethrowSanitizedError.bind(null, protocols))
116387
+ queryRaw: (query2) => tx.queryRaw(query2).catch(rethrowSanitizedError.bind(null, protocols)),
116388
+ createSavepoint: tx.createSavepoint ? (name6) => tx.createSavepoint(name6).catch(rethrowSanitizedError.bind(null, protocols)) : void 0,
116389
+ rollbackToSavepoint: tx.rollbackToSavepoint ? (name6) => tx.rollbackToSavepoint(name6).catch(rethrowSanitizedError.bind(null, protocols)) : void 0,
116390
+ releaseSavepoint: tx.releaseSavepoint ? (name6) => tx.releaseSavepoint(name6).catch(rethrowSanitizedError.bind(null, protocols)) : void 0
116128
116391
  };
116129
116392
  }
116130
116393
 
@@ -116247,7 +116510,7 @@ function logQuery(event) {
116247
116510
  });
116248
116511
  }
116249
116512
 
116250
- // ../../node_modules/.pnpm/hono@4.11.7/node_modules/hono/dist/helper/factory/index.js
116513
+ // ../../node_modules/.pnpm/hono@4.12.7/node_modules/hono/dist/helper/factory/index.js
116251
116514
  var createMiddleware = (middleware) => middleware;
116252
116515
 
116253
116516
  // src/server/middleware/client-telemetry.ts
@@ -128429,7 +128692,8 @@ var QueryRequestBody = external_exports.object({
128429
128692
  var TransactionStartRequestBody = external_exports.object({
128430
128693
  timeout: external_exports.number().optional(),
128431
128694
  maxWait: external_exports.number().optional(),
128432
- isolationLevel: external_exports.enum(["READ UNCOMMITTED", "READ COMMITTED", "REPEATABLE READ", "SNAPSHOT", "SERIALIZABLE"]).optional()
128695
+ isolationLevel: external_exports.enum(["READ UNCOMMITTED", "READ COMMITTED", "REPEATABLE READ", "SNAPSHOT", "SERIALIZABLE"]).optional(),
128696
+ newTxId: external_exports.string().optional()
128433
128697
  });
128434
128698
 
128435
128699
  // src/server/server.ts