@prisma/query-plan-executor 6.17.0-dev.3 → 6.17.0-dev.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +862 -168
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -19658,14 +19658,14 @@ var require_pool = __commonJS({
|
|
|
19658
19658
|
* @param {Function} onError - Error callback
|
|
19659
19659
|
* @param {number} timeoutEnd - Timestamp when connection attempt should time out
|
|
19660
19660
|
*/
|
|
19661
|
-
_createPoolConnection(onSuccess,
|
|
19661
|
+
_createPoolConnection(onSuccess, onError, timeoutEnd) {
|
|
19662
19662
|
const minTimeout = timeoutEnd - Date.now();
|
|
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
19666
|
const conn = new Connection(connectionOpts);
|
|
19667
19667
|
this._connectionCreationTask = null;
|
|
19668
|
-
conn.connect().then((conn2) => this._prepareNewConnection(conn2, onSuccess,
|
|
19668
|
+
conn.connect().then((conn2) => this._prepareNewConnection(conn2, onSuccess, onError)).catch((err) => this._handleConnectionCreationError(err, onSuccess, onError, timeoutEnd));
|
|
19669
19669
|
}
|
|
19670
19670
|
/**
|
|
19671
19671
|
* Sets up a newly created connection for use in the pool
|
|
@@ -19673,10 +19673,10 @@ var require_pool = __commonJS({
|
|
|
19673
19673
|
* @param {Function} onSuccess - Success callback
|
|
19674
19674
|
* @param {Function} onError - Error callback
|
|
19675
19675
|
*/
|
|
19676
|
-
_prepareNewConnection(conn, onSuccess,
|
|
19676
|
+
_prepareNewConnection(conn, onSuccess, onError) {
|
|
19677
19677
|
if (this.#closed) {
|
|
19678
19678
|
this._cleanupConnection(conn, "pool_closed");
|
|
19679
|
-
|
|
19679
|
+
onError(
|
|
19680
19680
|
new Errors2.createFatalError(
|
|
19681
19681
|
"Cannot create new connection to pool, pool closed",
|
|
19682
19682
|
Errors2.ER_ADD_CONNECTION_CLOSED_POOL
|
|
@@ -19750,7 +19750,7 @@ var require_pool = __commonJS({
|
|
|
19750
19750
|
* @param {Function} onError - Error callback
|
|
19751
19751
|
* @param {number} timeoutEnd - Timestamp when connection attempt should time out
|
|
19752
19752
|
*/
|
|
19753
|
-
_handleConnectionCreationError(err, onSuccess,
|
|
19753
|
+
_handleConnectionCreationError(err, onSuccess, onError, timeoutEnd) {
|
|
19754
19754
|
if (err instanceof AggregateError) {
|
|
19755
19755
|
err = err.errors[0];
|
|
19756
19756
|
}
|
|
@@ -19759,11 +19759,11 @@ var require_pool = __commonJS({
|
|
|
19759
19759
|
if (isFatalError) {
|
|
19760
19760
|
err.message = err.message + this._errorMsgAddon();
|
|
19761
19761
|
this._connectionCreationTask = null;
|
|
19762
|
-
|
|
19762
|
+
onError(err);
|
|
19763
19763
|
return;
|
|
19764
19764
|
}
|
|
19765
19765
|
this._connectionCreationTask = setTimeout(
|
|
19766
|
-
() => this._createPoolConnection(onSuccess,
|
|
19766
|
+
() => this._createPoolConnection(onSuccess, onError, timeoutEnd),
|
|
19767
19767
|
Math.min(500, timeoutEnd - Date.now())
|
|
19768
19768
|
);
|
|
19769
19769
|
}
|
|
@@ -39561,6 +39561,542 @@ var init_formDataPolicy = __esm({
|
|
|
39561
39561
|
}
|
|
39562
39562
|
});
|
|
39563
39563
|
|
|
39564
|
+
// ../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js
|
|
39565
|
+
var require_common2 = __commonJS({
|
|
39566
|
+
"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js"(exports2, module2) {
|
|
39567
|
+
"use strict";
|
|
39568
|
+
function setup(env) {
|
|
39569
|
+
createDebug.debug = createDebug;
|
|
39570
|
+
createDebug.default = createDebug;
|
|
39571
|
+
createDebug.coerce = coerce;
|
|
39572
|
+
createDebug.disable = disable2;
|
|
39573
|
+
createDebug.enable = enable2;
|
|
39574
|
+
createDebug.enabled = enabled2;
|
|
39575
|
+
createDebug.humanize = require_ms();
|
|
39576
|
+
createDebug.destroy = destroy2;
|
|
39577
|
+
Object.keys(env).forEach((key) => {
|
|
39578
|
+
createDebug[key] = env[key];
|
|
39579
|
+
});
|
|
39580
|
+
createDebug.names = [];
|
|
39581
|
+
createDebug.skips = [];
|
|
39582
|
+
createDebug.formatters = {};
|
|
39583
|
+
function selectColor(namespace) {
|
|
39584
|
+
let hash2 = 0;
|
|
39585
|
+
for (let i2 = 0; i2 < namespace.length; i2++) {
|
|
39586
|
+
hash2 = (hash2 << 5) - hash2 + namespace.charCodeAt(i2);
|
|
39587
|
+
hash2 |= 0;
|
|
39588
|
+
}
|
|
39589
|
+
return createDebug.colors[Math.abs(hash2) % createDebug.colors.length];
|
|
39590
|
+
}
|
|
39591
|
+
createDebug.selectColor = selectColor;
|
|
39592
|
+
function createDebug(namespace) {
|
|
39593
|
+
let prevTime;
|
|
39594
|
+
let enableOverride = null;
|
|
39595
|
+
let namespacesCache;
|
|
39596
|
+
let enabledCache;
|
|
39597
|
+
function debug7(...args) {
|
|
39598
|
+
if (!debug7.enabled) {
|
|
39599
|
+
return;
|
|
39600
|
+
}
|
|
39601
|
+
const self2 = debug7;
|
|
39602
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
39603
|
+
const ms = curr - (prevTime || curr);
|
|
39604
|
+
self2.diff = ms;
|
|
39605
|
+
self2.prev = prevTime;
|
|
39606
|
+
self2.curr = curr;
|
|
39607
|
+
prevTime = curr;
|
|
39608
|
+
args[0] = createDebug.coerce(args[0]);
|
|
39609
|
+
if (typeof args[0] !== "string") {
|
|
39610
|
+
args.unshift("%O");
|
|
39611
|
+
}
|
|
39612
|
+
let index = 0;
|
|
39613
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
39614
|
+
if (match === "%%") {
|
|
39615
|
+
return "%";
|
|
39616
|
+
}
|
|
39617
|
+
index++;
|
|
39618
|
+
const formatter = createDebug.formatters[format];
|
|
39619
|
+
if (typeof formatter === "function") {
|
|
39620
|
+
const val = args[index];
|
|
39621
|
+
match = formatter.call(self2, val);
|
|
39622
|
+
args.splice(index, 1);
|
|
39623
|
+
index--;
|
|
39624
|
+
}
|
|
39625
|
+
return match;
|
|
39626
|
+
});
|
|
39627
|
+
createDebug.formatArgs.call(self2, args);
|
|
39628
|
+
const logFn = self2.log || createDebug.log;
|
|
39629
|
+
logFn.apply(self2, args);
|
|
39630
|
+
}
|
|
39631
|
+
debug7.namespace = namespace;
|
|
39632
|
+
debug7.useColors = createDebug.useColors();
|
|
39633
|
+
debug7.color = createDebug.selectColor(namespace);
|
|
39634
|
+
debug7.extend = extend3;
|
|
39635
|
+
debug7.destroy = createDebug.destroy;
|
|
39636
|
+
Object.defineProperty(debug7, "enabled", {
|
|
39637
|
+
enumerable: true,
|
|
39638
|
+
configurable: false,
|
|
39639
|
+
get: () => {
|
|
39640
|
+
if (enableOverride !== null) {
|
|
39641
|
+
return enableOverride;
|
|
39642
|
+
}
|
|
39643
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
39644
|
+
namespacesCache = createDebug.namespaces;
|
|
39645
|
+
enabledCache = createDebug.enabled(namespace);
|
|
39646
|
+
}
|
|
39647
|
+
return enabledCache;
|
|
39648
|
+
},
|
|
39649
|
+
set: (v2) => {
|
|
39650
|
+
enableOverride = v2;
|
|
39651
|
+
}
|
|
39652
|
+
});
|
|
39653
|
+
if (typeof createDebug.init === "function") {
|
|
39654
|
+
createDebug.init(debug7);
|
|
39655
|
+
}
|
|
39656
|
+
return debug7;
|
|
39657
|
+
}
|
|
39658
|
+
function extend3(namespace, delimiter) {
|
|
39659
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
39660
|
+
newDebug.log = this.log;
|
|
39661
|
+
return newDebug;
|
|
39662
|
+
}
|
|
39663
|
+
function enable2(namespaces) {
|
|
39664
|
+
createDebug.save(namespaces);
|
|
39665
|
+
createDebug.namespaces = namespaces;
|
|
39666
|
+
createDebug.names = [];
|
|
39667
|
+
createDebug.skips = [];
|
|
39668
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
39669
|
+
for (const ns of split) {
|
|
39670
|
+
if (ns[0] === "-") {
|
|
39671
|
+
createDebug.skips.push(ns.slice(1));
|
|
39672
|
+
} else {
|
|
39673
|
+
createDebug.names.push(ns);
|
|
39674
|
+
}
|
|
39675
|
+
}
|
|
39676
|
+
}
|
|
39677
|
+
function matchesTemplate(search, template) {
|
|
39678
|
+
let searchIndex = 0;
|
|
39679
|
+
let templateIndex = 0;
|
|
39680
|
+
let starIndex = -1;
|
|
39681
|
+
let matchIndex = 0;
|
|
39682
|
+
while (searchIndex < search.length) {
|
|
39683
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
39684
|
+
if (template[templateIndex] === "*") {
|
|
39685
|
+
starIndex = templateIndex;
|
|
39686
|
+
matchIndex = searchIndex;
|
|
39687
|
+
templateIndex++;
|
|
39688
|
+
} else {
|
|
39689
|
+
searchIndex++;
|
|
39690
|
+
templateIndex++;
|
|
39691
|
+
}
|
|
39692
|
+
} else if (starIndex !== -1) {
|
|
39693
|
+
templateIndex = starIndex + 1;
|
|
39694
|
+
matchIndex++;
|
|
39695
|
+
searchIndex = matchIndex;
|
|
39696
|
+
} else {
|
|
39697
|
+
return false;
|
|
39698
|
+
}
|
|
39699
|
+
}
|
|
39700
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
39701
|
+
templateIndex++;
|
|
39702
|
+
}
|
|
39703
|
+
return templateIndex === template.length;
|
|
39704
|
+
}
|
|
39705
|
+
function disable2() {
|
|
39706
|
+
const namespaces = [
|
|
39707
|
+
...createDebug.names,
|
|
39708
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
39709
|
+
].join(",");
|
|
39710
|
+
createDebug.enable("");
|
|
39711
|
+
return namespaces;
|
|
39712
|
+
}
|
|
39713
|
+
function enabled2(name6) {
|
|
39714
|
+
for (const skip of createDebug.skips) {
|
|
39715
|
+
if (matchesTemplate(name6, skip)) {
|
|
39716
|
+
return false;
|
|
39717
|
+
}
|
|
39718
|
+
}
|
|
39719
|
+
for (const ns of createDebug.names) {
|
|
39720
|
+
if (matchesTemplate(name6, ns)) {
|
|
39721
|
+
return true;
|
|
39722
|
+
}
|
|
39723
|
+
}
|
|
39724
|
+
return false;
|
|
39725
|
+
}
|
|
39726
|
+
function coerce(val) {
|
|
39727
|
+
if (val instanceof Error) {
|
|
39728
|
+
return val.stack || val.message;
|
|
39729
|
+
}
|
|
39730
|
+
return val;
|
|
39731
|
+
}
|
|
39732
|
+
function destroy2() {
|
|
39733
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
39734
|
+
}
|
|
39735
|
+
createDebug.enable(createDebug.load());
|
|
39736
|
+
return createDebug;
|
|
39737
|
+
}
|
|
39738
|
+
module2.exports = setup;
|
|
39739
|
+
}
|
|
39740
|
+
});
|
|
39741
|
+
|
|
39742
|
+
// ../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js
|
|
39743
|
+
var require_browser2 = __commonJS({
|
|
39744
|
+
"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
39745
|
+
"use strict";
|
|
39746
|
+
exports2.formatArgs = formatArgs;
|
|
39747
|
+
exports2.save = save;
|
|
39748
|
+
exports2.load = load;
|
|
39749
|
+
exports2.useColors = useColors;
|
|
39750
|
+
exports2.storage = localstorage();
|
|
39751
|
+
exports2.destroy = /* @__PURE__ */ (() => {
|
|
39752
|
+
let warned = false;
|
|
39753
|
+
return () => {
|
|
39754
|
+
if (!warned) {
|
|
39755
|
+
warned = true;
|
|
39756
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
39757
|
+
}
|
|
39758
|
+
};
|
|
39759
|
+
})();
|
|
39760
|
+
exports2.colors = [
|
|
39761
|
+
"#0000CC",
|
|
39762
|
+
"#0000FF",
|
|
39763
|
+
"#0033CC",
|
|
39764
|
+
"#0033FF",
|
|
39765
|
+
"#0066CC",
|
|
39766
|
+
"#0066FF",
|
|
39767
|
+
"#0099CC",
|
|
39768
|
+
"#0099FF",
|
|
39769
|
+
"#00CC00",
|
|
39770
|
+
"#00CC33",
|
|
39771
|
+
"#00CC66",
|
|
39772
|
+
"#00CC99",
|
|
39773
|
+
"#00CCCC",
|
|
39774
|
+
"#00CCFF",
|
|
39775
|
+
"#3300CC",
|
|
39776
|
+
"#3300FF",
|
|
39777
|
+
"#3333CC",
|
|
39778
|
+
"#3333FF",
|
|
39779
|
+
"#3366CC",
|
|
39780
|
+
"#3366FF",
|
|
39781
|
+
"#3399CC",
|
|
39782
|
+
"#3399FF",
|
|
39783
|
+
"#33CC00",
|
|
39784
|
+
"#33CC33",
|
|
39785
|
+
"#33CC66",
|
|
39786
|
+
"#33CC99",
|
|
39787
|
+
"#33CCCC",
|
|
39788
|
+
"#33CCFF",
|
|
39789
|
+
"#6600CC",
|
|
39790
|
+
"#6600FF",
|
|
39791
|
+
"#6633CC",
|
|
39792
|
+
"#6633FF",
|
|
39793
|
+
"#66CC00",
|
|
39794
|
+
"#66CC33",
|
|
39795
|
+
"#9900CC",
|
|
39796
|
+
"#9900FF",
|
|
39797
|
+
"#9933CC",
|
|
39798
|
+
"#9933FF",
|
|
39799
|
+
"#99CC00",
|
|
39800
|
+
"#99CC33",
|
|
39801
|
+
"#CC0000",
|
|
39802
|
+
"#CC0033",
|
|
39803
|
+
"#CC0066",
|
|
39804
|
+
"#CC0099",
|
|
39805
|
+
"#CC00CC",
|
|
39806
|
+
"#CC00FF",
|
|
39807
|
+
"#CC3300",
|
|
39808
|
+
"#CC3333",
|
|
39809
|
+
"#CC3366",
|
|
39810
|
+
"#CC3399",
|
|
39811
|
+
"#CC33CC",
|
|
39812
|
+
"#CC33FF",
|
|
39813
|
+
"#CC6600",
|
|
39814
|
+
"#CC6633",
|
|
39815
|
+
"#CC9900",
|
|
39816
|
+
"#CC9933",
|
|
39817
|
+
"#CCCC00",
|
|
39818
|
+
"#CCCC33",
|
|
39819
|
+
"#FF0000",
|
|
39820
|
+
"#FF0033",
|
|
39821
|
+
"#FF0066",
|
|
39822
|
+
"#FF0099",
|
|
39823
|
+
"#FF00CC",
|
|
39824
|
+
"#FF00FF",
|
|
39825
|
+
"#FF3300",
|
|
39826
|
+
"#FF3333",
|
|
39827
|
+
"#FF3366",
|
|
39828
|
+
"#FF3399",
|
|
39829
|
+
"#FF33CC",
|
|
39830
|
+
"#FF33FF",
|
|
39831
|
+
"#FF6600",
|
|
39832
|
+
"#FF6633",
|
|
39833
|
+
"#FF9900",
|
|
39834
|
+
"#FF9933",
|
|
39835
|
+
"#FFCC00",
|
|
39836
|
+
"#FFCC33"
|
|
39837
|
+
];
|
|
39838
|
+
function useColors() {
|
|
39839
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
39840
|
+
return true;
|
|
39841
|
+
}
|
|
39842
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
39843
|
+
return false;
|
|
39844
|
+
}
|
|
39845
|
+
let m2;
|
|
39846
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
39847
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
39848
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
39849
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m2 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m2[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
39850
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
39851
|
+
}
|
|
39852
|
+
function formatArgs(args) {
|
|
39853
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
|
|
39854
|
+
if (!this.useColors) {
|
|
39855
|
+
return;
|
|
39856
|
+
}
|
|
39857
|
+
const c2 = "color: " + this.color;
|
|
39858
|
+
args.splice(1, 0, c2, "color: inherit");
|
|
39859
|
+
let index = 0;
|
|
39860
|
+
let lastC = 0;
|
|
39861
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
39862
|
+
if (match === "%%") {
|
|
39863
|
+
return;
|
|
39864
|
+
}
|
|
39865
|
+
index++;
|
|
39866
|
+
if (match === "%c") {
|
|
39867
|
+
lastC = index;
|
|
39868
|
+
}
|
|
39869
|
+
});
|
|
39870
|
+
args.splice(lastC, 0, c2);
|
|
39871
|
+
}
|
|
39872
|
+
exports2.log = console.debug || console.log || (() => {
|
|
39873
|
+
});
|
|
39874
|
+
function save(namespaces) {
|
|
39875
|
+
try {
|
|
39876
|
+
if (namespaces) {
|
|
39877
|
+
exports2.storage.setItem("debug", namespaces);
|
|
39878
|
+
} else {
|
|
39879
|
+
exports2.storage.removeItem("debug");
|
|
39880
|
+
}
|
|
39881
|
+
} catch (error44) {
|
|
39882
|
+
}
|
|
39883
|
+
}
|
|
39884
|
+
function load() {
|
|
39885
|
+
let r2;
|
|
39886
|
+
try {
|
|
39887
|
+
r2 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
39888
|
+
} catch (error44) {
|
|
39889
|
+
}
|
|
39890
|
+
if (!r2 && typeof process !== "undefined" && "env" in process) {
|
|
39891
|
+
r2 = process.env.DEBUG;
|
|
39892
|
+
}
|
|
39893
|
+
return r2;
|
|
39894
|
+
}
|
|
39895
|
+
function localstorage() {
|
|
39896
|
+
try {
|
|
39897
|
+
return localStorage;
|
|
39898
|
+
} catch (error44) {
|
|
39899
|
+
}
|
|
39900
|
+
}
|
|
39901
|
+
module2.exports = require_common2()(exports2);
|
|
39902
|
+
var { formatters } = module2.exports;
|
|
39903
|
+
formatters.j = function(v2) {
|
|
39904
|
+
try {
|
|
39905
|
+
return JSON.stringify(v2);
|
|
39906
|
+
} catch (error44) {
|
|
39907
|
+
return "[UnexpectedJSONParseError]: " + error44.message;
|
|
39908
|
+
}
|
|
39909
|
+
};
|
|
39910
|
+
}
|
|
39911
|
+
});
|
|
39912
|
+
|
|
39913
|
+
// ../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js
|
|
39914
|
+
var require_node2 = __commonJS({
|
|
39915
|
+
"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js"(exports2, module2) {
|
|
39916
|
+
"use strict";
|
|
39917
|
+
var tty = require("tty");
|
|
39918
|
+
var util2 = require("util");
|
|
39919
|
+
exports2.init = init3;
|
|
39920
|
+
exports2.log = log4;
|
|
39921
|
+
exports2.formatArgs = formatArgs;
|
|
39922
|
+
exports2.save = save;
|
|
39923
|
+
exports2.load = load;
|
|
39924
|
+
exports2.useColors = useColors;
|
|
39925
|
+
exports2.destroy = util2.deprecate(
|
|
39926
|
+
() => {
|
|
39927
|
+
},
|
|
39928
|
+
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
39929
|
+
);
|
|
39930
|
+
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
39931
|
+
try {
|
|
39932
|
+
const supportsColor = require_supports_color();
|
|
39933
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
39934
|
+
exports2.colors = [
|
|
39935
|
+
20,
|
|
39936
|
+
21,
|
|
39937
|
+
26,
|
|
39938
|
+
27,
|
|
39939
|
+
32,
|
|
39940
|
+
33,
|
|
39941
|
+
38,
|
|
39942
|
+
39,
|
|
39943
|
+
40,
|
|
39944
|
+
41,
|
|
39945
|
+
42,
|
|
39946
|
+
43,
|
|
39947
|
+
44,
|
|
39948
|
+
45,
|
|
39949
|
+
56,
|
|
39950
|
+
57,
|
|
39951
|
+
62,
|
|
39952
|
+
63,
|
|
39953
|
+
68,
|
|
39954
|
+
69,
|
|
39955
|
+
74,
|
|
39956
|
+
75,
|
|
39957
|
+
76,
|
|
39958
|
+
77,
|
|
39959
|
+
78,
|
|
39960
|
+
79,
|
|
39961
|
+
80,
|
|
39962
|
+
81,
|
|
39963
|
+
92,
|
|
39964
|
+
93,
|
|
39965
|
+
98,
|
|
39966
|
+
99,
|
|
39967
|
+
112,
|
|
39968
|
+
113,
|
|
39969
|
+
128,
|
|
39970
|
+
129,
|
|
39971
|
+
134,
|
|
39972
|
+
135,
|
|
39973
|
+
148,
|
|
39974
|
+
149,
|
|
39975
|
+
160,
|
|
39976
|
+
161,
|
|
39977
|
+
162,
|
|
39978
|
+
163,
|
|
39979
|
+
164,
|
|
39980
|
+
165,
|
|
39981
|
+
166,
|
|
39982
|
+
167,
|
|
39983
|
+
168,
|
|
39984
|
+
169,
|
|
39985
|
+
170,
|
|
39986
|
+
171,
|
|
39987
|
+
172,
|
|
39988
|
+
173,
|
|
39989
|
+
178,
|
|
39990
|
+
179,
|
|
39991
|
+
184,
|
|
39992
|
+
185,
|
|
39993
|
+
196,
|
|
39994
|
+
197,
|
|
39995
|
+
198,
|
|
39996
|
+
199,
|
|
39997
|
+
200,
|
|
39998
|
+
201,
|
|
39999
|
+
202,
|
|
40000
|
+
203,
|
|
40001
|
+
204,
|
|
40002
|
+
205,
|
|
40003
|
+
206,
|
|
40004
|
+
207,
|
|
40005
|
+
208,
|
|
40006
|
+
209,
|
|
40007
|
+
214,
|
|
40008
|
+
215,
|
|
40009
|
+
220,
|
|
40010
|
+
221
|
|
40011
|
+
];
|
|
40012
|
+
}
|
|
40013
|
+
} catch (error44) {
|
|
40014
|
+
}
|
|
40015
|
+
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
40016
|
+
return /^debug_/i.test(key);
|
|
40017
|
+
}).reduce((obj, key) => {
|
|
40018
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_3, k2) => {
|
|
40019
|
+
return k2.toUpperCase();
|
|
40020
|
+
});
|
|
40021
|
+
let val = process.env[key];
|
|
40022
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
40023
|
+
val = true;
|
|
40024
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
40025
|
+
val = false;
|
|
40026
|
+
} else if (val === "null") {
|
|
40027
|
+
val = null;
|
|
40028
|
+
} else {
|
|
40029
|
+
val = Number(val);
|
|
40030
|
+
}
|
|
40031
|
+
obj[prop] = val;
|
|
40032
|
+
return obj;
|
|
40033
|
+
}, {});
|
|
40034
|
+
function useColors() {
|
|
40035
|
+
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
40036
|
+
}
|
|
40037
|
+
function formatArgs(args) {
|
|
40038
|
+
const { namespace: name6, useColors: useColors2 } = this;
|
|
40039
|
+
if (useColors2) {
|
|
40040
|
+
const c2 = this.color;
|
|
40041
|
+
const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2);
|
|
40042
|
+
const prefix = ` ${colorCode};1m${name6} \x1B[0m`;
|
|
40043
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
40044
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
40045
|
+
} else {
|
|
40046
|
+
args[0] = getDate() + name6 + " " + args[0];
|
|
40047
|
+
}
|
|
40048
|
+
}
|
|
40049
|
+
function getDate() {
|
|
40050
|
+
if (exports2.inspectOpts.hideDate) {
|
|
40051
|
+
return "";
|
|
40052
|
+
}
|
|
40053
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
40054
|
+
}
|
|
40055
|
+
function log4(...args) {
|
|
40056
|
+
return process.stderr.write(util2.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
40057
|
+
}
|
|
40058
|
+
function save(namespaces) {
|
|
40059
|
+
if (namespaces) {
|
|
40060
|
+
process.env.DEBUG = namespaces;
|
|
40061
|
+
} else {
|
|
40062
|
+
delete process.env.DEBUG;
|
|
40063
|
+
}
|
|
40064
|
+
}
|
|
40065
|
+
function load() {
|
|
40066
|
+
return process.env.DEBUG;
|
|
40067
|
+
}
|
|
40068
|
+
function init3(debug7) {
|
|
40069
|
+
debug7.inspectOpts = {};
|
|
40070
|
+
const keys = Object.keys(exports2.inspectOpts);
|
|
40071
|
+
for (let i2 = 0; i2 < keys.length; i2++) {
|
|
40072
|
+
debug7.inspectOpts[keys[i2]] = exports2.inspectOpts[keys[i2]];
|
|
40073
|
+
}
|
|
40074
|
+
}
|
|
40075
|
+
module2.exports = require_common2()(exports2);
|
|
40076
|
+
var { formatters } = module2.exports;
|
|
40077
|
+
formatters.o = function(v2) {
|
|
40078
|
+
this.inspectOpts.colors = this.useColors;
|
|
40079
|
+
return util2.inspect(v2, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
40080
|
+
};
|
|
40081
|
+
formatters.O = function(v2) {
|
|
40082
|
+
this.inspectOpts.colors = this.useColors;
|
|
40083
|
+
return util2.inspect(v2, this.inspectOpts);
|
|
40084
|
+
};
|
|
40085
|
+
}
|
|
40086
|
+
});
|
|
40087
|
+
|
|
40088
|
+
// ../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js
|
|
40089
|
+
var require_src3 = __commonJS({
|
|
40090
|
+
"../../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js"(exports2, module2) {
|
|
40091
|
+
"use strict";
|
|
40092
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
40093
|
+
module2.exports = require_browser2();
|
|
40094
|
+
} else {
|
|
40095
|
+
module2.exports = require_node2();
|
|
40096
|
+
}
|
|
40097
|
+
}
|
|
40098
|
+
});
|
|
40099
|
+
|
|
39564
40100
|
// ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js
|
|
39565
40101
|
var require_promisify = __commonJS({
|
|
39566
40102
|
"../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js"(exports2) {
|
|
@@ -39584,14 +40120,14 @@ var require_promisify = __commonJS({
|
|
|
39584
40120
|
});
|
|
39585
40121
|
|
|
39586
40122
|
// ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js
|
|
39587
|
-
var
|
|
40123
|
+
var require_src4 = __commonJS({
|
|
39588
40124
|
"../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js"(exports2, module2) {
|
|
39589
40125
|
"use strict";
|
|
39590
40126
|
var __importDefault = exports2 && exports2.__importDefault || function(mod2) {
|
|
39591
40127
|
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
39592
40128
|
};
|
|
39593
40129
|
var events_1 = require("events");
|
|
39594
|
-
var debug_1 = __importDefault(
|
|
40130
|
+
var debug_1 = __importDefault(require_src3());
|
|
39595
40131
|
var promisify_1 = __importDefault(require_promisify());
|
|
39596
40132
|
var debug7 = debug_1.default("agent-base");
|
|
39597
40133
|
function isAgent(v2) {
|
|
@@ -39774,7 +40310,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
39774
40310
|
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
39775
40311
|
};
|
|
39776
40312
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
39777
|
-
var debug_1 = __importDefault(
|
|
40313
|
+
var debug_1 = __importDefault(require_src3());
|
|
39778
40314
|
var debug7 = debug_1.default("https-proxy-agent:parse-proxy-response");
|
|
39779
40315
|
function parseProxyResponse(socket) {
|
|
39780
40316
|
return new Promise((resolve, reject) => {
|
|
@@ -39871,8 +40407,8 @@ var require_agent = __commonJS({
|
|
|
39871
40407
|
var tls_1 = __importDefault(require("tls"));
|
|
39872
40408
|
var url_1 = __importDefault(require("url"));
|
|
39873
40409
|
var assert_1 = __importDefault(require("assert"));
|
|
39874
|
-
var debug_1 = __importDefault(
|
|
39875
|
-
var agent_base_1 =
|
|
40410
|
+
var debug_1 = __importDefault(require_src3());
|
|
40411
|
+
var agent_base_1 = require_src4();
|
|
39876
40412
|
var parse_proxy_response_1 = __importDefault(require_parse_proxy_response());
|
|
39877
40413
|
var debug7 = debug_1.default("https-proxy-agent:agent");
|
|
39878
40414
|
var HttpsProxyAgent2 = class extends agent_base_1.Agent {
|
|
@@ -40021,19 +40557,19 @@ var require_dist2 = __commonJS({
|
|
|
40021
40557
|
function cleanup() {
|
|
40022
40558
|
signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
|
|
40023
40559
|
emitter.removeListener(name6, onEvent);
|
|
40024
|
-
emitter.removeListener("error",
|
|
40560
|
+
emitter.removeListener("error", onError);
|
|
40025
40561
|
}
|
|
40026
40562
|
function onEvent(...args) {
|
|
40027
40563
|
cleanup();
|
|
40028
40564
|
resolve(args);
|
|
40029
40565
|
}
|
|
40030
|
-
function
|
|
40566
|
+
function onError(err) {
|
|
40031
40567
|
cleanup();
|
|
40032
40568
|
reject(err);
|
|
40033
40569
|
}
|
|
40034
40570
|
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", cleanup);
|
|
40035
40571
|
emitter.on(name6, onEvent);
|
|
40036
|
-
emitter.on("error",
|
|
40572
|
+
emitter.on("error", onError);
|
|
40037
40573
|
});
|
|
40038
40574
|
}
|
|
40039
40575
|
exports2.default = once;
|
|
@@ -40078,9 +40614,9 @@ var require_agent2 = __commonJS({
|
|
|
40078
40614
|
var net_1 = __importDefault(require("net"));
|
|
40079
40615
|
var tls_1 = __importDefault(require("tls"));
|
|
40080
40616
|
var url_1 = __importDefault(require("url"));
|
|
40081
|
-
var debug_1 = __importDefault(
|
|
40617
|
+
var debug_1 = __importDefault(require_src3());
|
|
40082
40618
|
var once_1 = __importDefault(require_dist2());
|
|
40083
|
-
var agent_base_1 =
|
|
40619
|
+
var agent_base_1 = require_src4();
|
|
40084
40620
|
var debug7 = (0, debug_1.default)("http-proxy-agent");
|
|
40085
40621
|
function isHTTPS(protocol) {
|
|
40086
40622
|
return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false;
|
|
@@ -53639,8 +54175,8 @@ var require_lrucache = __commonJS({
|
|
|
53639
54175
|
const deleted = this.delete(key);
|
|
53640
54176
|
if (!deleted && value !== void 0) {
|
|
53641
54177
|
if (this.map.size >= this.max) {
|
|
53642
|
-
const
|
|
53643
|
-
this.delete(
|
|
54178
|
+
const firstKey2 = this.map.keys().next().value;
|
|
54179
|
+
this.delete(firstKey2);
|
|
53644
54180
|
}
|
|
53645
54181
|
this.map.set(key, value);
|
|
53646
54182
|
}
|
|
@@ -61846,7 +62382,7 @@ var require_sender = __commonJS({
|
|
|
61846
62382
|
return await new Promise((resolve, reject) => {
|
|
61847
62383
|
const sockets = [];
|
|
61848
62384
|
let errorCount = 0;
|
|
61849
|
-
const
|
|
62385
|
+
const onError = (err) => {
|
|
61850
62386
|
errorCount++;
|
|
61851
62387
|
if (errorCount === addresses.length) {
|
|
61852
62388
|
signal.removeEventListener("abort", onAbort);
|
|
@@ -61865,7 +62401,7 @@ var require_sender = __commonJS({
|
|
|
61865
62401
|
};
|
|
61866
62402
|
const clearSockets = () => {
|
|
61867
62403
|
for (const socket of sockets) {
|
|
61868
|
-
socket.removeListener("error",
|
|
62404
|
+
socket.removeListener("error", onError);
|
|
61869
62405
|
socket.removeListener("message", onMessage);
|
|
61870
62406
|
socket.close();
|
|
61871
62407
|
}
|
|
@@ -61877,7 +62413,7 @@ var require_sender = __commonJS({
|
|
|
61877
62413
|
const udpType = addresses[j2].family === 6 ? "udp6" : "udp4";
|
|
61878
62414
|
const socket = _dgram.default.createSocket(udpType);
|
|
61879
62415
|
sockets.push(socket);
|
|
61880
|
-
socket.on("error",
|
|
62416
|
+
socket.on("error", onError);
|
|
61881
62417
|
socket.on("message", onMessage);
|
|
61882
62418
|
socket.send(request3, 0, request3.length, port, addresses[j2].address);
|
|
61883
62419
|
}
|
|
@@ -69106,12 +69642,12 @@ var require_pipeline = __commonJS({
|
|
|
69106
69642
|
const end = reading || (opts === null || opts === void 0 ? void 0 : opts.end) !== false;
|
|
69107
69643
|
const isLastStream = i2 === streams.length - 1;
|
|
69108
69644
|
if (isNodeStream(stream)) {
|
|
69109
|
-
let
|
|
69645
|
+
let onError2 = function(err) {
|
|
69110
69646
|
if (err && err.name !== "AbortError" && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
69111
69647
|
finish(err);
|
|
69112
69648
|
}
|
|
69113
69649
|
};
|
|
69114
|
-
var
|
|
69650
|
+
var onError = onError2;
|
|
69115
69651
|
if (end) {
|
|
69116
69652
|
const { destroy: destroy2, cleanup } = destroyer(stream, reading, writing);
|
|
69117
69653
|
destroys.push(destroy2);
|
|
@@ -69119,10 +69655,10 @@ var require_pipeline = __commonJS({
|
|
|
69119
69655
|
lastStreamCleanup.push(cleanup);
|
|
69120
69656
|
}
|
|
69121
69657
|
}
|
|
69122
|
-
stream.on("error",
|
|
69658
|
+
stream.on("error", onError2);
|
|
69123
69659
|
if (isReadable(stream) && isLastStream) {
|
|
69124
69660
|
lastStreamCleanup.push(() => {
|
|
69125
|
-
stream.removeListener("error",
|
|
69661
|
+
stream.removeListener("error", onError2);
|
|
69126
69662
|
});
|
|
69127
69663
|
}
|
|
69128
69664
|
}
|
|
@@ -70800,7 +71336,7 @@ var require_message_io = __commonJS({
|
|
|
70800
71336
|
};
|
|
70801
71337
|
const onSecureConnect = () => {
|
|
70802
71338
|
securePair.encrypted.removeListener("readable", onReadable);
|
|
70803
|
-
securePair.cleartext.removeListener("error",
|
|
71339
|
+
securePair.cleartext.removeListener("error", onError);
|
|
70804
71340
|
securePair.cleartext.removeListener("secureConnect", onSecureConnect);
|
|
70805
71341
|
securePair.cleartext.once("error", (err) => {
|
|
70806
71342
|
this.socket.destroy(err);
|
|
@@ -70820,9 +71356,9 @@ var require_message_io = __commonJS({
|
|
|
70820
71356
|
this.tlsNegotiationComplete = true;
|
|
70821
71357
|
resolve();
|
|
70822
71358
|
};
|
|
70823
|
-
const
|
|
71359
|
+
const onError = (err) => {
|
|
70824
71360
|
securePair.encrypted.removeListener("readable", onReadable);
|
|
70825
|
-
securePair.cleartext.removeListener("error",
|
|
71361
|
+
securePair.cleartext.removeListener("error", onError);
|
|
70826
71362
|
securePair.cleartext.removeListener("secureConnect", onSecureConnect);
|
|
70827
71363
|
securePair.cleartext.destroy();
|
|
70828
71364
|
securePair.encrypted.destroy();
|
|
@@ -70844,9 +71380,9 @@ var require_message_io = __commonJS({
|
|
|
70844
71380
|
for await (const data of response) {
|
|
70845
71381
|
securePair.encrypted.write(data);
|
|
70846
71382
|
}
|
|
70847
|
-
}).catch(
|
|
71383
|
+
}).catch(onError);
|
|
70848
71384
|
};
|
|
70849
|
-
securePair.cleartext.once("error",
|
|
71385
|
+
securePair.cleartext.once("error", onError);
|
|
70850
71386
|
securePair.cleartext.once("secureConnect", onSecureConnect);
|
|
70851
71387
|
securePair.encrypted.once("readable", onReadable);
|
|
70852
71388
|
});
|
|
@@ -87366,9 +87902,9 @@ var require_connector = __commonJS({
|
|
|
87366
87902
|
return await new Promise((resolve, reject) => {
|
|
87367
87903
|
const sockets = new Array(addresses.length);
|
|
87368
87904
|
const errors = [];
|
|
87369
|
-
function
|
|
87905
|
+
function onError(err) {
|
|
87370
87906
|
errors.push(err);
|
|
87371
|
-
this.removeListener("error",
|
|
87907
|
+
this.removeListener("error", onError);
|
|
87372
87908
|
this.removeListener("connect", onConnect);
|
|
87373
87909
|
this.destroy();
|
|
87374
87910
|
if (errors.length === addresses.length) {
|
|
@@ -87383,7 +87919,7 @@ var require_connector = __commonJS({
|
|
|
87383
87919
|
if (this === socket) {
|
|
87384
87920
|
continue;
|
|
87385
87921
|
}
|
|
87386
|
-
socket.removeListener("error",
|
|
87922
|
+
socket.removeListener("error", onError);
|
|
87387
87923
|
socket.removeListener("connect", onConnect);
|
|
87388
87924
|
socket.destroy();
|
|
87389
87925
|
}
|
|
@@ -87392,7 +87928,7 @@ var require_connector = __commonJS({
|
|
|
87392
87928
|
const onAbort = () => {
|
|
87393
87929
|
for (let j2 = 0; j2 < sockets.length; j2++) {
|
|
87394
87930
|
const socket = sockets[j2];
|
|
87395
|
-
socket.removeListener("error",
|
|
87931
|
+
socket.removeListener("error", onError);
|
|
87396
87932
|
socket.removeListener("connect", onConnect);
|
|
87397
87933
|
socket.destroy();
|
|
87398
87934
|
}
|
|
@@ -87404,7 +87940,7 @@ var require_connector = __commonJS({
|
|
|
87404
87940
|
host: addresses[i2].address,
|
|
87405
87941
|
family: addresses[i2].family
|
|
87406
87942
|
});
|
|
87407
|
-
socket.on("error",
|
|
87943
|
+
socket.on("error", onError);
|
|
87408
87944
|
socket.on("connect", onConnect);
|
|
87409
87945
|
}
|
|
87410
87946
|
signal.addEventListener("abort", onAbort, {
|
|
@@ -87427,28 +87963,28 @@ var require_connector = __commonJS({
|
|
|
87427
87963
|
family: address.family
|
|
87428
87964
|
});
|
|
87429
87965
|
const onAbort = () => {
|
|
87430
|
-
socket.removeListener("error",
|
|
87966
|
+
socket.removeListener("error", onError);
|
|
87431
87967
|
socket.removeListener("connect", onConnect);
|
|
87432
87968
|
socket.destroy();
|
|
87433
87969
|
reject(new _abortError.default());
|
|
87434
87970
|
};
|
|
87435
|
-
const
|
|
87971
|
+
const onError = (err) => {
|
|
87436
87972
|
signal.removeEventListener("abort", onAbort);
|
|
87437
|
-
socket.removeListener("error",
|
|
87973
|
+
socket.removeListener("error", onError);
|
|
87438
87974
|
socket.removeListener("connect", onConnect);
|
|
87439
87975
|
socket.destroy();
|
|
87440
87976
|
reject(err);
|
|
87441
87977
|
};
|
|
87442
87978
|
const onConnect = () => {
|
|
87443
87979
|
signal.removeEventListener("abort", onAbort);
|
|
87444
|
-
socket.removeListener("error",
|
|
87980
|
+
socket.removeListener("error", onError);
|
|
87445
87981
|
socket.removeListener("connect", onConnect);
|
|
87446
87982
|
resolve(socket);
|
|
87447
87983
|
};
|
|
87448
87984
|
signal.addEventListener("abort", onAbort, {
|
|
87449
87985
|
once: true
|
|
87450
87986
|
});
|
|
87451
|
-
socket.on("error",
|
|
87987
|
+
socket.on("error", onError);
|
|
87452
87988
|
socket.on("connect", onConnect);
|
|
87453
87989
|
});
|
|
87454
87990
|
} catch (err) {
|
|
@@ -88940,15 +89476,15 @@ var require_connection2 = __commonJS({
|
|
|
88940
89476
|
}
|
|
88941
89477
|
if (connectListener) {
|
|
88942
89478
|
const onConnect = (err) => {
|
|
88943
|
-
this.removeListener("error",
|
|
89479
|
+
this.removeListener("error", onError);
|
|
88944
89480
|
connectListener(err);
|
|
88945
89481
|
};
|
|
88946
|
-
const
|
|
89482
|
+
const onError = (err) => {
|
|
88947
89483
|
this.removeListener("connect", onConnect);
|
|
88948
89484
|
connectListener(err);
|
|
88949
89485
|
};
|
|
88950
89486
|
this.once("connect", onConnect);
|
|
88951
|
-
this.once("error",
|
|
89487
|
+
this.once("error", onError);
|
|
88952
89488
|
}
|
|
88953
89489
|
this.transitionTo(this.STATE.CONNECTING);
|
|
88954
89490
|
}
|
|
@@ -89150,28 +89686,28 @@ var require_connection2 = __commonJS({
|
|
|
89150
89686
|
};
|
|
89151
89687
|
const encryptsocket = tls.connect(encryptOptions);
|
|
89152
89688
|
const onAbort = () => {
|
|
89153
|
-
encryptsocket.removeListener("error",
|
|
89689
|
+
encryptsocket.removeListener("error", onError);
|
|
89154
89690
|
encryptsocket.removeListener("connect", onConnect);
|
|
89155
89691
|
encryptsocket.destroy();
|
|
89156
89692
|
reject(signal.reason);
|
|
89157
89693
|
};
|
|
89158
|
-
const
|
|
89694
|
+
const onError = (err) => {
|
|
89159
89695
|
signal.removeEventListener("abort", onAbort);
|
|
89160
|
-
encryptsocket.removeListener("error",
|
|
89696
|
+
encryptsocket.removeListener("error", onError);
|
|
89161
89697
|
encryptsocket.removeListener("connect", onConnect);
|
|
89162
89698
|
encryptsocket.destroy();
|
|
89163
89699
|
reject(err);
|
|
89164
89700
|
};
|
|
89165
89701
|
const onConnect = () => {
|
|
89166
89702
|
signal.removeEventListener("abort", onAbort);
|
|
89167
|
-
encryptsocket.removeListener("error",
|
|
89703
|
+
encryptsocket.removeListener("error", onError);
|
|
89168
89704
|
encryptsocket.removeListener("connect", onConnect);
|
|
89169
89705
|
resolve(encryptsocket);
|
|
89170
89706
|
};
|
|
89171
89707
|
signal.addEventListener("abort", onAbort, {
|
|
89172
89708
|
once: true
|
|
89173
89709
|
});
|
|
89174
|
-
encryptsocket.on("error",
|
|
89710
|
+
encryptsocket.on("error", onError);
|
|
89175
89711
|
encryptsocket.on("secureConnect", onConnect);
|
|
89176
89712
|
});
|
|
89177
89713
|
}
|
|
@@ -96458,7 +96994,7 @@ var require_pg_pool = __commonJS({
|
|
|
96458
96994
|
return cb(err);
|
|
96459
96995
|
}
|
|
96460
96996
|
let clientReleased = false;
|
|
96461
|
-
const
|
|
96997
|
+
const onError = (err2) => {
|
|
96462
96998
|
if (clientReleased) {
|
|
96463
96999
|
return;
|
|
96464
97000
|
}
|
|
@@ -96466,12 +97002,12 @@ var require_pg_pool = __commonJS({
|
|
|
96466
97002
|
client.release(err2);
|
|
96467
97003
|
cb(err2);
|
|
96468
97004
|
};
|
|
96469
|
-
client.once("error",
|
|
97005
|
+
client.once("error", onError);
|
|
96470
97006
|
this.log("dispatching query");
|
|
96471
97007
|
try {
|
|
96472
97008
|
client.query(text, values, (err2, res) => {
|
|
96473
97009
|
this.log("query dispatched");
|
|
96474
|
-
client.removeListener("error",
|
|
97010
|
+
client.removeListener("error", onError);
|
|
96475
97011
|
if (clientReleased) {
|
|
96476
97012
|
return;
|
|
96477
97013
|
}
|
|
@@ -106552,8 +107088,9 @@ var QueryInterpreter = class _QueryInterpreter {
|
|
|
106552
107088
|
case "diff": {
|
|
106553
107089
|
const { value: from } = await this.interpretNode(node.args.from, queryable, scope, generators);
|
|
106554
107090
|
const { value: to2 } = await this.interpretNode(node.args.to, queryable, scope, generators);
|
|
106555
|
-
const
|
|
106556
|
-
|
|
107091
|
+
const keyGetter = (item) => item !== null ? getRecordKey(asRecord(item), node.args.fields) : null;
|
|
107092
|
+
const toSet = new Set(asList(to2).map(keyGetter));
|
|
107093
|
+
return { value: asList(from).filter((item) => !toSet.has(keyGetter(item))) };
|
|
106557
107094
|
}
|
|
106558
107095
|
case "process": {
|
|
106559
107096
|
const { value, lastInsertId } = await this.interpretNode(node.args.expr, queryable, scope, generators);
|
|
@@ -106823,7 +107360,7 @@ var TransactionManager = class {
|
|
|
106823
107360
|
this.transactions.set(transaction.id, transaction);
|
|
106824
107361
|
let hasTimedOut = false;
|
|
106825
107362
|
const startTimer = setTimeout(() => hasTimedOut = true, validatedOptions.maxWait);
|
|
106826
|
-
startTimer.unref();
|
|
107363
|
+
startTimer.unref?.();
|
|
106827
107364
|
transaction.transaction = await this.driverAdapter.startTransaction(validatedOptions.isolationLevel).catch(rethrowAsUserFacing);
|
|
106828
107365
|
clearTimeout(startTimer);
|
|
106829
107366
|
switch (transaction.status) {
|
|
@@ -106912,7 +107449,7 @@ var TransactionManager = class {
|
|
|
106912
107449
|
debug3("Transaction already committed or rolled back when timeout happened.", transactionId);
|
|
106913
107450
|
}
|
|
106914
107451
|
}, timeout);
|
|
106915
|
-
timer.unref();
|
|
107452
|
+
timer.unref?.();
|
|
106916
107453
|
return timer;
|
|
106917
107454
|
}
|
|
106918
107455
|
async #closeTransaction(tx, status) {
|
|
@@ -106984,7 +107521,7 @@ var TransactionManager = class {
|
|
|
106984
107521
|
};
|
|
106985
107522
|
|
|
106986
107523
|
// ../../node_modules/.pnpm/hono@4.9.4/node_modules/hono/dist/compose.js
|
|
106987
|
-
var compose = (middleware,
|
|
107524
|
+
var compose = (middleware, onError, onNotFound) => {
|
|
106988
107525
|
return (context2, next) => {
|
|
106989
107526
|
let index = -1;
|
|
106990
107527
|
return dispatch(0);
|
|
@@ -107006,9 +107543,9 @@ var compose = (middleware, onError2, onNotFound) => {
|
|
|
107006
107543
|
try {
|
|
107007
107544
|
res = await handler(context2, () => dispatch(i2 + 1));
|
|
107008
107545
|
} catch (err) {
|
|
107009
|
-
if (err instanceof Error &&
|
|
107546
|
+
if (err instanceof Error && onError) {
|
|
107010
107547
|
context2.error = err;
|
|
107011
|
-
res = await
|
|
107548
|
+
res = await onError(err, context2);
|
|
107012
107549
|
isError2 = true;
|
|
107013
107550
|
} else {
|
|
107014
107551
|
throw err;
|
|
@@ -108555,7 +109092,7 @@ function isPromiseLike(value) {
|
|
|
108555
109092
|
}
|
|
108556
109093
|
|
|
108557
109094
|
// package.json
|
|
108558
|
-
var version = "6.17.0-dev.
|
|
109095
|
+
var version = "6.17.0-dev.30";
|
|
108559
109096
|
|
|
108560
109097
|
// src/utils/error.ts
|
|
108561
109098
|
function extractErrorFromUnknown(value) {
|
|
@@ -108625,7 +109162,10 @@ function mapColumnType(field) {
|
|
|
108625
109162
|
case "BLOB":
|
|
108626
109163
|
case "TINY_BLOB":
|
|
108627
109164
|
case "MEDIUM_BLOB":
|
|
108628
|
-
|
|
109165
|
+
case "LONG_BLOB":
|
|
109166
|
+
if (field["dataTypeFormat"] === "json") {
|
|
109167
|
+
return ColumnTypeEnum.Json;
|
|
109168
|
+
} else if (field.flags.valueOf() & BINARY_FLAG) {
|
|
108629
109169
|
return ColumnTypeEnum.Bytes;
|
|
108630
109170
|
} else {
|
|
108631
109171
|
return ColumnTypeEnum.Text;
|
|
@@ -108870,6 +109410,8 @@ var MariaDbQueryable = class {
|
|
|
108870
109410
|
sql: sql4,
|
|
108871
109411
|
rowsAsArray: true,
|
|
108872
109412
|
dateStrings: true,
|
|
109413
|
+
// Disable automatic conversion of JSON blobs to objects.
|
|
109414
|
+
autoJsonMap: false,
|
|
108873
109415
|
// Return JSON strings as strings, not objects.
|
|
108874
109416
|
// Available in the driver, but not provided in the typings.
|
|
108875
109417
|
jsonStrings: true,
|
|
@@ -108882,25 +109424,28 @@ var MariaDbQueryable = class {
|
|
|
108882
109424
|
return await this.client.query(req, values);
|
|
108883
109425
|
} catch (e2) {
|
|
108884
109426
|
const error44 = e2;
|
|
108885
|
-
onError(error44);
|
|
109427
|
+
this.onError(error44);
|
|
108886
109428
|
}
|
|
108887
109429
|
}
|
|
109430
|
+
onError(error44) {
|
|
109431
|
+
debug4("Error in performIO: %O", error44);
|
|
109432
|
+
throw new DriverAdapterError(convertDriverError(error44));
|
|
109433
|
+
}
|
|
108888
109434
|
};
|
|
108889
|
-
function onError(error44) {
|
|
108890
|
-
debug4("Error in performIO: %O", error44);
|
|
108891
|
-
throw new DriverAdapterError(convertDriverError(error44));
|
|
108892
|
-
}
|
|
108893
109435
|
var MariaDbTransaction = class extends MariaDbQueryable {
|
|
108894
|
-
constructor(conn, options) {
|
|
109436
|
+
constructor(conn, options, cleanup) {
|
|
108895
109437
|
super(conn);
|
|
108896
109438
|
this.options = options;
|
|
109439
|
+
this.cleanup = cleanup;
|
|
108897
109440
|
}
|
|
108898
109441
|
async commit() {
|
|
108899
109442
|
debug4(`[js::commit]`);
|
|
109443
|
+
this.cleanup?.();
|
|
108900
109444
|
await this.client.end();
|
|
108901
109445
|
}
|
|
108902
109446
|
async rollback() {
|
|
108903
109447
|
debug4(`[js::rollback]`);
|
|
109448
|
+
this.cleanup?.();
|
|
108904
109449
|
await this.client.end();
|
|
108905
109450
|
}
|
|
108906
109451
|
};
|
|
@@ -108925,13 +109470,17 @@ var PrismaMariaDbAdapter = class extends MariaDbQueryable {
|
|
|
108925
109470
|
};
|
|
108926
109471
|
const tag2 = "[js::startTransaction]";
|
|
108927
109472
|
debug4("%s options: %O", tag2, options);
|
|
108928
|
-
const conn = await this.client.getConnection().catch((error44) => onError(error44));
|
|
108929
|
-
|
|
109473
|
+
const conn = await this.client.getConnection().catch((error44) => this.onError(error44));
|
|
109474
|
+
const onError = (err) => {
|
|
108930
109475
|
debug4(`Error from connection: ${err.message} %O`, err);
|
|
108931
109476
|
this.options?.onConnectionError?.(err);
|
|
108932
|
-
}
|
|
109477
|
+
};
|
|
109478
|
+
conn.on("error", onError);
|
|
109479
|
+
const cleanup = () => {
|
|
109480
|
+
conn.removeListener("error", onError);
|
|
109481
|
+
};
|
|
108933
109482
|
try {
|
|
108934
|
-
const tx = new MariaDbTransaction(conn, options);
|
|
109483
|
+
const tx = new MariaDbTransaction(conn, options, cleanup);
|
|
108935
109484
|
if (isolationLevel) {
|
|
108936
109485
|
await tx.executeRaw({
|
|
108937
109486
|
sql: `SET TRANSACTION ISOLATION LEVEL ${isolationLevel}`,
|
|
@@ -108943,7 +109492,8 @@ var PrismaMariaDbAdapter = class extends MariaDbQueryable {
|
|
|
108943
109492
|
return tx;
|
|
108944
109493
|
} catch (error44) {
|
|
108945
109494
|
await conn.end();
|
|
108946
|
-
|
|
109495
|
+
cleanup();
|
|
109496
|
+
this.onError(error44);
|
|
108947
109497
|
}
|
|
108948
109498
|
}
|
|
108949
109499
|
async dispose() {
|
|
@@ -109265,97 +109815,200 @@ function parseConnectionString(connectionString) {
|
|
|
109265
109815
|
}
|
|
109266
109816
|
config3.port = port;
|
|
109267
109817
|
}
|
|
109818
|
+
const parameters = {};
|
|
109268
109819
|
for (const part of paramParts) {
|
|
109269
109820
|
const [key, value] = part.split("=", 2);
|
|
109270
109821
|
if (!key) continue;
|
|
109271
109822
|
const trimmedKey = key.trim();
|
|
109272
|
-
|
|
109273
|
-
|
|
109274
|
-
|
|
109275
|
-
|
|
109276
|
-
|
|
109277
|
-
|
|
109278
|
-
|
|
109279
|
-
|
|
109280
|
-
|
|
109281
|
-
|
|
109282
|
-
|
|
109283
|
-
|
|
109284
|
-
|
|
109285
|
-
|
|
109286
|
-
|
|
109287
|
-
|
|
109288
|
-
|
|
109289
|
-
|
|
109290
|
-
|
|
109291
|
-
|
|
109292
|
-
|
|
109293
|
-
|
|
109294
|
-
|
|
109295
|
-
|
|
109296
|
-
|
|
109297
|
-
|
|
109298
|
-
|
|
109299
|
-
|
|
109300
|
-
|
|
109301
|
-
|
|
109302
|
-
|
|
109303
|
-
|
|
109304
|
-
|
|
109305
|
-
|
|
109306
|
-
|
|
109307
|
-
|
|
109308
|
-
|
|
109309
|
-
|
|
109310
|
-
|
|
109311
|
-
|
|
109312
|
-
|
|
109313
|
-
|
|
109314
|
-
|
|
109315
|
-
|
|
109316
|
-
|
|
109317
|
-
|
|
109318
|
-
|
|
109319
|
-
|
|
109320
|
-
|
|
109823
|
+
if (trimmedKey in parameters) {
|
|
109824
|
+
throw new Error(`Duplication configuration parameter: ${trimmedKey}`);
|
|
109825
|
+
}
|
|
109826
|
+
parameters[trimmedKey] = value.trim();
|
|
109827
|
+
if (!handledParameters.includes(trimmedKey)) {
|
|
109828
|
+
debug5(`Unknown connection string parameter: ${trimmedKey}`);
|
|
109829
|
+
}
|
|
109830
|
+
}
|
|
109831
|
+
const database = firstKey(parameters, "database", "initial catalog");
|
|
109832
|
+
if (database !== null) {
|
|
109833
|
+
config3.database = database;
|
|
109834
|
+
}
|
|
109835
|
+
const user = firstKey(parameters, "user", "username", "uid", "userid");
|
|
109836
|
+
if (user !== null) {
|
|
109837
|
+
config3.user = user;
|
|
109838
|
+
}
|
|
109839
|
+
const password = firstKey(parameters, "password", "pwd");
|
|
109840
|
+
if (password !== null) {
|
|
109841
|
+
config3.password = password;
|
|
109842
|
+
}
|
|
109843
|
+
const encrypt = firstKey(parameters, "encrypt");
|
|
109844
|
+
if (encrypt !== null) {
|
|
109845
|
+
config3.options = config3.options || {};
|
|
109846
|
+
config3.options.encrypt = encrypt.toLowerCase() === "true";
|
|
109847
|
+
}
|
|
109848
|
+
const trustServerCertificate = firstKey(parameters, "trustServerCertificate");
|
|
109849
|
+
if (trustServerCertificate !== null) {
|
|
109850
|
+
config3.options = config3.options || {};
|
|
109851
|
+
config3.options.trustServerCertificate = trustServerCertificate.toLowerCase() === "true";
|
|
109852
|
+
}
|
|
109853
|
+
const connectionLimit = firstKey(parameters, "connectionLimit");
|
|
109854
|
+
if (connectionLimit !== null) {
|
|
109855
|
+
config3.pool = config3.pool || {};
|
|
109856
|
+
const limit = parseInt(connectionLimit, 10);
|
|
109857
|
+
if (isNaN(limit)) {
|
|
109858
|
+
throw new Error(`Invalid connection limit: ${connectionLimit}`);
|
|
109859
|
+
}
|
|
109860
|
+
config3.pool.max = limit;
|
|
109861
|
+
}
|
|
109862
|
+
const connectionTimeout = firstKey(parameters, "connectionTimeout", "connectTimeout");
|
|
109863
|
+
if (connectionTimeout !== null) {
|
|
109864
|
+
const timeout = parseInt(connectionTimeout, 10);
|
|
109865
|
+
if (isNaN(timeout)) {
|
|
109866
|
+
throw new Error(`Invalid connection timeout: ${connectionTimeout}`);
|
|
109867
|
+
}
|
|
109868
|
+
config3.connectionTimeout = timeout;
|
|
109869
|
+
}
|
|
109870
|
+
const loginTimeout = firstKey(parameters, "loginTimeout");
|
|
109871
|
+
if (loginTimeout !== null) {
|
|
109872
|
+
const timeout = parseInt(loginTimeout, 10);
|
|
109873
|
+
if (isNaN(timeout)) {
|
|
109874
|
+
throw new Error(`Invalid login timeout: ${loginTimeout}`);
|
|
109875
|
+
}
|
|
109876
|
+
config3.connectionTimeout = timeout;
|
|
109877
|
+
}
|
|
109878
|
+
const socketTimeout = firstKey(parameters, "socketTimeout");
|
|
109879
|
+
if (socketTimeout !== null) {
|
|
109880
|
+
const timeout = parseInt(socketTimeout, 10);
|
|
109881
|
+
if (isNaN(timeout)) {
|
|
109882
|
+
throw new Error(`Invalid socket timeout: ${socketTimeout}`);
|
|
109883
|
+
}
|
|
109884
|
+
config3.requestTimeout = timeout;
|
|
109885
|
+
}
|
|
109886
|
+
const poolTimeout = firstKey(parameters, "poolTimeout");
|
|
109887
|
+
if (poolTimeout !== null) {
|
|
109888
|
+
const timeout = parseInt(poolTimeout, 10);
|
|
109889
|
+
if (isNaN(timeout)) {
|
|
109890
|
+
throw new Error(`Invalid pool timeout: ${poolTimeout}`);
|
|
109891
|
+
}
|
|
109892
|
+
config3.pool = config3.pool || {};
|
|
109893
|
+
config3.pool.acquireTimeoutMillis = timeout * 1e3;
|
|
109894
|
+
}
|
|
109895
|
+
const appName = firstKey(parameters, "applicationName", "application name");
|
|
109896
|
+
if (appName !== null) {
|
|
109897
|
+
config3.options = config3.options || {};
|
|
109898
|
+
config3.options.appName = appName;
|
|
109899
|
+
}
|
|
109900
|
+
const isolationLevel = firstKey(parameters, "isolationLevel");
|
|
109901
|
+
if (isolationLevel !== null) {
|
|
109902
|
+
config3.options = config3.options || {};
|
|
109903
|
+
config3.options.isolationLevel = mapIsolationLevelFromString(isolationLevel);
|
|
109904
|
+
}
|
|
109905
|
+
const authentication = firstKey(parameters, "authentication");
|
|
109906
|
+
if (authentication !== null) {
|
|
109907
|
+
config3.authentication = parseAuthenticationOptions(parameters, authentication);
|
|
109908
|
+
}
|
|
109909
|
+
if (!config3.server || config3.server.trim() === "") {
|
|
109910
|
+
throw new Error("Server host is required in connection string");
|
|
109911
|
+
}
|
|
109912
|
+
return config3;
|
|
109913
|
+
}
|
|
109914
|
+
function parseAuthenticationOptions(parameters, authenticationValue) {
|
|
109915
|
+
switch (authenticationValue) {
|
|
109916
|
+
/**
|
|
109917
|
+
* 'DefaultAzureCredential' is not listed in the JDBC driver spec
|
|
109918
|
+
* https://learn.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver15#properties
|
|
109919
|
+
* but is supported by tedious so included here
|
|
109920
|
+
*/
|
|
109921
|
+
case "DefaultAzureCredential":
|
|
109922
|
+
case "ActiveDirectoryIntegrated":
|
|
109923
|
+
case "ActiveDirectoryInteractive":
|
|
109924
|
+
return { type: "azure-active-directory-default", options: {} };
|
|
109925
|
+
case "ActiveDirectoryPassword": {
|
|
109926
|
+
const userName = firstKey(parameters, "userName");
|
|
109927
|
+
const password = firstKey(parameters, "password");
|
|
109928
|
+
const clientId = firstKey(parameters, "clientId");
|
|
109929
|
+
const tenantId = firstKey(parameters, "tenantId");
|
|
109930
|
+
if (!userName || !password || !clientId) {
|
|
109931
|
+
throw new Error(`Invalid authentication, ActiveDirectoryPassword requires userName, password, clientId`);
|
|
109321
109932
|
}
|
|
109322
|
-
|
|
109323
|
-
|
|
109324
|
-
|
|
109325
|
-
|
|
109933
|
+
return {
|
|
109934
|
+
type: "azure-active-directory-password",
|
|
109935
|
+
options: {
|
|
109936
|
+
userName,
|
|
109937
|
+
password,
|
|
109938
|
+
clientId,
|
|
109939
|
+
tenantId: tenantId || ""
|
|
109326
109940
|
}
|
|
109327
|
-
|
|
109328
|
-
|
|
109941
|
+
};
|
|
109942
|
+
}
|
|
109943
|
+
case "ActiveDirectoryManagedIdentity":
|
|
109944
|
+
case "ActiveDirectoryMSI": {
|
|
109945
|
+
const clientId = firstKey(parameters, "clientId");
|
|
109946
|
+
const msiEndpoint = firstKey(parameters, "msiEndpoint");
|
|
109947
|
+
const msiSecret = firstKey(parameters, "msiSecret");
|
|
109948
|
+
if (!msiEndpoint || !msiSecret) {
|
|
109949
|
+
throw new Error(`Invalid authentication, ActiveDirectoryManagedIdentity requires msiEndpoint, msiSecret`);
|
|
109329
109950
|
}
|
|
109330
|
-
|
|
109331
|
-
|
|
109332
|
-
|
|
109333
|
-
|
|
109951
|
+
return {
|
|
109952
|
+
type: "azure-active-directory-msi-app-service",
|
|
109953
|
+
options: {
|
|
109954
|
+
clientId: clientId || void 0,
|
|
109955
|
+
// @ts-expect-error TODO: tedious typings don't define msiEndpoint and msiSecret -- needs to be fixed upstream
|
|
109956
|
+
msiEndpoint,
|
|
109957
|
+
msiSecret
|
|
109334
109958
|
}
|
|
109335
|
-
|
|
109336
|
-
|
|
109337
|
-
|
|
109959
|
+
};
|
|
109960
|
+
}
|
|
109961
|
+
case "ActiveDirectoryServicePrincipal": {
|
|
109962
|
+
const clientId = firstKey(parameters, "userName");
|
|
109963
|
+
const clientSecret = firstKey(parameters, "password");
|
|
109964
|
+
const tenantId = firstKey(parameters, "tenantId");
|
|
109965
|
+
if (clientId && clientSecret) {
|
|
109966
|
+
return {
|
|
109967
|
+
type: "azure-active-directory-service-principal-secret",
|
|
109968
|
+
options: {
|
|
109969
|
+
clientId,
|
|
109970
|
+
clientSecret,
|
|
109971
|
+
tenantId: tenantId || ""
|
|
109972
|
+
}
|
|
109973
|
+
};
|
|
109974
|
+
} else {
|
|
109975
|
+
throw new Error(
|
|
109976
|
+
`Invalid authentication, ActiveDirectoryServicePrincipal requires userName (clientId), password (clientSecret)`
|
|
109977
|
+
);
|
|
109338
109978
|
}
|
|
109339
|
-
case "applicationName":
|
|
109340
|
-
case "application name":
|
|
109341
|
-
config3.options = config3.options || {};
|
|
109342
|
-
config3.options.appName = trimmedValue;
|
|
109343
|
-
break;
|
|
109344
|
-
case "isolationLevel":
|
|
109345
|
-
config3.options = config3.options || {};
|
|
109346
|
-
config3.options.isolationLevel = mapIsolationLevelFromString(trimmedValue);
|
|
109347
|
-
break;
|
|
109348
|
-
case "schema":
|
|
109349
|
-
break;
|
|
109350
|
-
default:
|
|
109351
|
-
debug5(`Unknown connection string parameter: ${trimmedKey}`);
|
|
109352
109979
|
}
|
|
109353
109980
|
}
|
|
109354
|
-
|
|
109355
|
-
|
|
109981
|
+
return void 0;
|
|
109982
|
+
}
|
|
109983
|
+
function firstKey(parameters, ...keys) {
|
|
109984
|
+
for (const key of keys) {
|
|
109985
|
+
if (key in parameters) {
|
|
109986
|
+
return parameters[key];
|
|
109987
|
+
}
|
|
109356
109988
|
}
|
|
109357
|
-
return
|
|
109989
|
+
return null;
|
|
109358
109990
|
}
|
|
109991
|
+
var handledParameters = [
|
|
109992
|
+
"application name",
|
|
109993
|
+
"applicationName",
|
|
109994
|
+
"connectTimeout",
|
|
109995
|
+
"connectionLimit",
|
|
109996
|
+
"connectionTimeout",
|
|
109997
|
+
"database",
|
|
109998
|
+
"encrypt",
|
|
109999
|
+
"initial catalog",
|
|
110000
|
+
"isolationLevel",
|
|
110001
|
+
"loginTimeout",
|
|
110002
|
+
"password",
|
|
110003
|
+
"poolTimeout",
|
|
110004
|
+
"pwd",
|
|
110005
|
+
"socketTimeout",
|
|
110006
|
+
"trustServerCertificate",
|
|
110007
|
+
"uid",
|
|
110008
|
+
"user",
|
|
110009
|
+
"userid",
|
|
110010
|
+
"username"
|
|
110011
|
+
];
|
|
109359
110012
|
function mapColumnType2(col) {
|
|
109360
110013
|
switch (col.type) {
|
|
109361
110014
|
case import_mssql3.default.VarChar:
|
|
@@ -110504,13 +111157,13 @@ var PrismaPgAdapter = class extends PgQueryable {
|
|
|
110504
111157
|
const tag2 = "[js::startTransaction]";
|
|
110505
111158
|
debug6("%s options: %O", tag2, options);
|
|
110506
111159
|
const conn = await this.client.connect().catch((error44) => this.onError(error44));
|
|
110507
|
-
const
|
|
111160
|
+
const onError = (err) => {
|
|
110508
111161
|
debug6(`Error from pool connection: ${err.message} %O`, err);
|
|
110509
111162
|
this.pgOptions?.onConnectionError?.(err);
|
|
110510
111163
|
};
|
|
110511
|
-
conn.on("error",
|
|
111164
|
+
conn.on("error", onError);
|
|
110512
111165
|
const cleanup = () => {
|
|
110513
|
-
conn.removeListener("error",
|
|
111166
|
+
conn.removeListener("error", onError);
|
|
110514
111167
|
};
|
|
110515
111168
|
try {
|
|
110516
111169
|
const tx = new PgTransaction(conn, options, this.pgOptions, cleanup);
|
|
@@ -110601,24 +111254,65 @@ var PrismaPgAdapterFactory = class {
|
|
|
110601
111254
|
|
|
110602
111255
|
// src/logic/adapter.ts
|
|
110603
111256
|
function createAdapter(url2) {
|
|
110604
|
-
|
|
110605
|
-
|
|
110606
|
-
|
|
110607
|
-
});
|
|
110608
|
-
} else if (url2.startsWith("mysql://") || url2.startsWith("mariadb://")) {
|
|
110609
|
-
return new PrismaMariaDbAdapterFactory(url2);
|
|
110610
|
-
} else if (url2.startsWith("sqlserver://")) {
|
|
110611
|
-
return new PrismaMssqlAdapterFactory(url2);
|
|
110612
|
-
} else {
|
|
110613
|
-
let urlObj;
|
|
110614
|
-
try {
|
|
110615
|
-
urlObj = new URL(url2);
|
|
110616
|
-
} catch {
|
|
110617
|
-
throw new Error("Invalid database URL");
|
|
111257
|
+
for (const factory of factories) {
|
|
111258
|
+
if (factory.protocols.some((protocol) => url2.startsWith(`${protocol}://`))) {
|
|
111259
|
+
return factory.create(url2);
|
|
110618
111260
|
}
|
|
110619
|
-
throw new Error(`Unsupported protocol in database URL: ${urlObj.protocol}`);
|
|
110620
111261
|
}
|
|
111262
|
+
let urlObj;
|
|
111263
|
+
try {
|
|
111264
|
+
urlObj = new URL(url2);
|
|
111265
|
+
} catch {
|
|
111266
|
+
throw new Error("Invalid database URL");
|
|
111267
|
+
}
|
|
111268
|
+
throw new Error(`Unsupported protocol in database URL: ${urlObj.protocol}`);
|
|
110621
111269
|
}
|
|
111270
|
+
var factories = [
|
|
111271
|
+
{
|
|
111272
|
+
protocols: ["postgres", "postgresql"],
|
|
111273
|
+
create(connectionString) {
|
|
111274
|
+
const url2 = new URL(connectionString);
|
|
111275
|
+
if (["sslcert", "sslkey", "sslrootcert"].some((param) => url2.searchParams.has(param))) {
|
|
111276
|
+
throw new Error(
|
|
111277
|
+
"Unsupported parameters in connection string: uploading and using custom TLS certificates is not currently supported"
|
|
111278
|
+
);
|
|
111279
|
+
}
|
|
111280
|
+
let sslmode = url2.searchParams.get("sslmode");
|
|
111281
|
+
if (sslmode === null && url2.searchParams.get("ssl") === "true") {
|
|
111282
|
+
sslmode = "require";
|
|
111283
|
+
}
|
|
111284
|
+
const ssl = (() => {
|
|
111285
|
+
switch (sslmode) {
|
|
111286
|
+
case null:
|
|
111287
|
+
case "disable":
|
|
111288
|
+
return false;
|
|
111289
|
+
case "prefer":
|
|
111290
|
+
case "require":
|
|
111291
|
+
case "no-verify":
|
|
111292
|
+
return { rejectUnauthorized: false };
|
|
111293
|
+
case "verify-ca":
|
|
111294
|
+
case "verify-full":
|
|
111295
|
+
return true;
|
|
111296
|
+
default:
|
|
111297
|
+
throw new Error(`Unsupported sslmode: ${sslmode}`);
|
|
111298
|
+
}
|
|
111299
|
+
})();
|
|
111300
|
+
return new PrismaPgAdapterFactory({ connectionString, ssl });
|
|
111301
|
+
}
|
|
111302
|
+
},
|
|
111303
|
+
{
|
|
111304
|
+
protocols: ["mysql", "mariadb"],
|
|
111305
|
+
create(url2) {
|
|
111306
|
+
return new PrismaMariaDbAdapterFactory(url2);
|
|
111307
|
+
}
|
|
111308
|
+
},
|
|
111309
|
+
{
|
|
111310
|
+
protocols: ["sqlserver"],
|
|
111311
|
+
create(url2) {
|
|
111312
|
+
return new PrismaMssqlAdapterFactory(url2);
|
|
111313
|
+
}
|
|
111314
|
+
}
|
|
111315
|
+
];
|
|
110622
111316
|
|
|
110623
111317
|
// src/logic/resource-limits.ts
|
|
110624
111318
|
var ResourceLimitError = class extends Error {
|