odm-client 0.0.12 → 0.0.13
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/cloudbase.cjs +1 -1
- package/dist/cloudbase.js +1 -1
- package/dist/generate.cjs +3 -3
- package/dist/generate.js +15 -15
- package/dist/mongodb.cjs +5 -5
- package/dist/mongodb.js +493 -493
- package/package.json +1 -1
- /package/dist/deps/{_commonjsHelpers-KaVRbhAgd4-tl33na53h.js → _commonjsHelpers-KaVRbhAgd4-7e7it5m96.js} +0 -0
- /package/dist/deps/{_commonjsHelpers-KaVRbhAgd4-ikvxkuahc.js → _commonjsHelpers-KaVRbhAgd4-wmtu91iiv.js} +0 -0
- /package/dist/deps/{acorn-DYjaOAP8Gz-z3tscz5ei.js → acorn-DYjaOAP8Gz-261lwm6wa.js} +0 -0
- /package/dist/deps/{acorn-DYjaOAP8Gz-uk33c5cyt.js → acorn-DYjaOAP8Gz-5sugrw1ec.js} +0 -0
- /package/dist/deps/{angular-1bp1uAROl4-vmgbkpcc4.js → angular-1bp1uAROl4-gqet7e1e7.js} +0 -0
- /package/dist/deps/{angular-1bp1uAROl4-gtm2lvgsf.js → angular-1bp1uAROl4-lyajdwmmy.js} +0 -0
- /package/dist/deps/{babel-_P9jsDBVVy-vjqlci9b0.js → babel-_P9jsDBVVy-29e1a5pd5.js} +0 -0
- /package/dist/deps/{babel-_P9jsDBVVy-aimapq343.js → babel-_P9jsDBVVy-2ifo8vwyl.js} +0 -0
- /package/dist/deps/{estree-Q-oFBmJEml-f4yzsva37.js → estree-Q-oFBmJEml-n79kju5jq.js} +0 -0
- /package/dist/deps/{estree-Q-oFBmJEml-af146fyk6.js → estree-Q-oFBmJEml-qg443sns0.js} +0 -0
- /package/dist/deps/{flow-j77MFvzLrn-wxfbjld4y.js → flow-j77MFvzLrn-27tctymqu.js} +0 -0
- /package/dist/deps/{flow-j77MFvzLrn-2fqhus1ch.js → flow-j77MFvzLrn-ehemf7rlh.js} +0 -0
- /package/dist/deps/{glimmer-ewQPb5nTUl-mkguoqlo3.js → glimmer-ewQPb5nTUl-oiwya5y5g.js} +0 -0
- /package/dist/deps/{glimmer-ewQPb5nTUl-rrfdalt62.js → glimmer-ewQPb5nTUl-yxc8y0mi9.js} +0 -0
- /package/dist/deps/{graphql-8EXR1_taGG-55efhnqes.js → graphql-8EXR1_taGG-o6ywirnvb.js} +0 -0
- /package/dist/deps/{graphql-8EXR1_taGG-rf47bs55b.js → graphql-8EXR1_taGG-yn0wxvzb1.js} +0 -0
- /package/dist/deps/{html-dGbiW_CFWL-ghspsfha5.js → html-dGbiW_CFWL-0c7g96rut.js} +0 -0
- /package/dist/deps/{html-dGbiW_CFWL-p0ywmijjf.js → html-dGbiW_CFWL-n4fypxfnz.js} +0 -0
- /package/dist/deps/{markdown-vAYIRClyWZ-h3abl11br.js → markdown-vAYIRClyWZ-9hli96gkh.js} +0 -0
- /package/dist/deps/{markdown-vAYIRClyWZ-bhap5opjr.js → markdown-vAYIRClyWZ-emcum8efc.js} +0 -0
- /package/dist/deps/{meriyah-d5_qqf88x--8044094pk.js → meriyah-d5_qqf88x--k0ftp7z6v.js} +0 -0
- /package/dist/deps/{meriyah-d5_qqf88x--pcvnciq2c.js → meriyah-d5_qqf88x--sky96ccgv.js} +0 -0
- /package/dist/deps/{postcss-Vz5bDQ3hJO-ro4pnefgg.js → postcss-Vz5bDQ3hJO-mjbsthnf2.js} +0 -0
- /package/dist/deps/{postcss-Vz5bDQ3hJO-l00t96ehl.js → postcss-Vz5bDQ3hJO-pjyjkitnn.js} +0 -0
- /package/dist/deps/{query-builder-h6B2D2BCoQ-wcp4tk68m.js → query-builder-h6B2D2BCoQ-1a5ik32ue.js} +0 -0
- /package/dist/deps/{query-builder-h6B2D2BCoQ-kxfdtzdpf.js → query-builder-h6B2D2BCoQ-5rguae8qq.js} +0 -0
- /package/dist/deps/{typescript-2hCq12HCbJ-jwucnfl28.js → typescript-2hCq12HCbJ-9b31w357y.js} +0 -0
- /package/dist/deps/{typescript-2hCq12HCbJ-iza7mqr9w.js → typescript-2hCq12HCbJ-iaaddyq48.js} +0 -0
- /package/dist/deps/{yaml-I5o0CrcX7J-xuhk07qnp.js → yaml-I5o0CrcX7J-7j0myiauj.js} +0 -0
- /package/dist/deps/{yaml-I5o0CrcX7J-gkwhp2lxa.js → yaml-I5o0CrcX7J-vfb8sb037.js} +0 -0
package/dist/mongodb.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
var $l = Object.defineProperty;
|
|
2
2
|
var e2 = (e, t, r) => t in e ? $l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var se = (e, t, r) => e2(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { Q as ir, i as t2, a as r2, b as Ru } from "./deps/query-builder-h6B2D2BCoQ-
|
|
4
|
+
import { Q as ir, i as t2, a as r2, b as Ru } from "./deps/query-builder-h6B2D2BCoQ-5rguae8qq.js";
|
|
5
5
|
import gn from "timers";
|
|
6
6
|
import Fc from "crypto";
|
|
7
7
|
import D1 from "fs";
|
|
8
8
|
import n2 from "http";
|
|
9
9
|
import Ar from "process";
|
|
10
|
-
import
|
|
10
|
+
import ao from "stream";
|
|
11
11
|
import i2 from "events";
|
|
12
12
|
import o2 from "util";
|
|
13
13
|
import Rc from "timers/promises";
|
|
14
14
|
import T1 from "dns";
|
|
15
15
|
import Nc from "os";
|
|
16
|
-
import { g as pr, c as jt } from "./deps/_commonjsHelpers-KaVRbhAgd4-
|
|
16
|
+
import { g as pr, c as jt } from "./deps/_commonjsHelpers-KaVRbhAgd4-7e7it5m96.js";
|
|
17
17
|
import s2 from "url";
|
|
18
18
|
import Ic from "zlib";
|
|
19
19
|
import B1 from "net";
|
|
20
20
|
import vc from "fs/promises";
|
|
21
21
|
import Pc from "tls";
|
|
22
22
|
import u2 from "child_process";
|
|
23
|
-
var
|
|
23
|
+
var is = {}, ei = {}, pe = {}, Oe = {};
|
|
24
24
|
const a2 = (() => {
|
|
25
25
|
const e = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
26
26
|
return (t) => e.call(t);
|
|
@@ -47,7 +47,7 @@ function c2(e) {
|
|
|
47
47
|
if (e != null && typeof e == "object" && "stylize" in e && typeof e.stylize == "function")
|
|
48
48
|
return e.stylize;
|
|
49
49
|
}
|
|
50
|
-
const Rr = 7, dn = Symbol.for("@@mdb.bson.version"), ti = 2147483647, ri = -2147483648, Lc = Math.pow(2, 63) - 1, kc = -Math.pow(2, 63), Uc = Math.pow(2, 53), jc = -Math.pow(2, 53), F1 = 1, xc = 2, R1 = 3, zc = 4, N1 = 5, l2 = 6, Vc = 7, Wc = 8, Gc = 9, I1 = 10,
|
|
50
|
+
const Rr = 7, dn = Symbol.for("@@mdb.bson.version"), ti = 2147483647, ri = -2147483648, Lc = Math.pow(2, 63) - 1, kc = -Math.pow(2, 63), Uc = Math.pow(2, 53), jc = -Math.pow(2, 53), F1 = 1, xc = 2, R1 = 3, zc = 4, N1 = 5, l2 = 6, Vc = 7, Wc = 8, Gc = 9, I1 = 10, Yi = 11, h2 = 12, v1 = 13, qc = 14, Hc = 15, Hn = 16, Kc = 17, P1 = 18, Yc = 19, Xc = 255, Jc = 127, d2 = 0, L1 = 4, Qc = Object.freeze({
|
|
51
51
|
double: 1,
|
|
52
52
|
string: 2,
|
|
53
53
|
object: 3,
|
|
@@ -92,7 +92,7 @@ class Nr extends q {
|
|
|
92
92
|
super(`Unsupported BSON version, bson types must be from bson ${Rr}.x.x`);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
class
|
|
95
|
+
class Xi extends q {
|
|
96
96
|
get name() {
|
|
97
97
|
return "BSONRuntimeError";
|
|
98
98
|
}
|
|
@@ -384,9 +384,9 @@ const C2 = (() => {
|
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
var Mc;
|
|
387
|
-
const S2 = typeof Buffer == "function" && ((Mc = Buffer.prototype) == null ? void 0 : Mc._isBuffer) !== !0, W = S2 ? yt : Mr,
|
|
387
|
+
const S2 = typeof Buffer == "function" && ((Mc = Buffer.prototype) == null ? void 0 : Mc._isBuffer) !== !0, W = S2 ? yt : Mr, co = Symbol.for("@@mdb.bson.type");
|
|
388
388
|
class at {
|
|
389
|
-
get [
|
|
389
|
+
get [co]() {
|
|
390
390
|
return this._bsontype;
|
|
391
391
|
}
|
|
392
392
|
get [dn]() {
|
|
@@ -398,8 +398,8 @@ class at {
|
|
|
398
398
|
}
|
|
399
399
|
const cn = new Float64Array(1), we = new Uint8Array(cn.buffer, 0, 8);
|
|
400
400
|
cn[0] = -1;
|
|
401
|
-
const
|
|
402
|
-
isBigEndian:
|
|
401
|
+
const os = we[7] === 0, ue = {
|
|
402
|
+
isBigEndian: os,
|
|
403
403
|
getNonnegativeInt32LE(e, t) {
|
|
404
404
|
if (e[t + 3] > 127)
|
|
405
405
|
throw new RangeError(`Size cannot be negative at offset: ${t}`);
|
|
@@ -418,7 +418,7 @@ const ss = we[7] === 0, ue = {
|
|
|
418
418
|
const r = BigInt(e[t + 4] + e[t + 5] * 256 + e[t + 6] * 65536 + (e[t + 7] << 24)), n = BigInt(e[t] + e[t + 1] * 256 + e[t + 2] * 65536 + e[t + 3] * 16777216);
|
|
419
419
|
return (r << 32n) + n;
|
|
420
420
|
},
|
|
421
|
-
getFloat64LE:
|
|
421
|
+
getFloat64LE: os ? (e, t) => (we[7] = e[t], we[6] = e[t + 1], we[5] = e[t + 2], we[4] = e[t + 3], we[3] = e[t + 4], we[2] = e[t + 5], we[1] = e[t + 6], we[0] = e[t + 7], cn[0]) : (e, t) => (we[0] = e[t], we[1] = e[t + 1], we[2] = e[t + 2], we[3] = e[t + 3], we[4] = e[t + 4], we[5] = e[t + 5], we[6] = e[t + 6], we[7] = e[t + 7], cn[0]),
|
|
422
422
|
setInt32BE(e, t, r) {
|
|
423
423
|
return e[t + 3] = r, r >>>= 8, e[t + 2] = r, r >>>= 8, e[t + 1] = r, r >>>= 8, e[t] = r, 4;
|
|
424
424
|
},
|
|
@@ -432,7 +432,7 @@ const ss = we[7] === 0, ue = {
|
|
|
432
432
|
let o = Number(r >> 32n & n);
|
|
433
433
|
return e[t + 4] = o, o >>= 8, e[t + 5] = o, o >>= 8, e[t + 6] = o, o >>= 8, e[t + 7] = o, 8;
|
|
434
434
|
},
|
|
435
|
-
setFloat64LE:
|
|
435
|
+
setFloat64LE: os ? (e, t, r) => (cn[0] = r, e[t] = we[7], e[t + 1] = we[6], e[t + 2] = we[5], e[t + 3] = we[4], e[t + 4] = we[3], e[t + 5] = we[2], e[t + 6] = we[1], e[t + 7] = we[0], 8) : (e, t, r) => (cn[0] = r, e[t] = we[0], e[t + 1] = we[1], e[t + 2] = we[2], e[t + 3] = we[3], e[t + 4] = we[4], e[t + 5] = we[5], e[t + 6] = we[6], e[t + 7] = we[7], 8)
|
|
436
436
|
}, ge = class ge extends at {
|
|
437
437
|
constructor(r, n) {
|
|
438
438
|
super();
|
|
@@ -618,7 +618,7 @@ function Kt(e) {
|
|
|
618
618
|
if (r === je.VECTOR_TYPE.PackedBit && n > 7)
|
|
619
619
|
throw new q(`Invalid Vector: padding must be a value between 0 and 7. found: ${n}`);
|
|
620
620
|
}
|
|
621
|
-
const
|
|
621
|
+
const ss = 16, y2 = /^[0-9A-F]{32}$/i, O2 = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
|
|
622
622
|
class Xe extends je {
|
|
623
623
|
constructor(t) {
|
|
624
624
|
let r;
|
|
@@ -626,7 +626,7 @@ class Xe extends je {
|
|
|
626
626
|
r = Xe.generate();
|
|
627
627
|
else if (t instanceof Xe)
|
|
628
628
|
r = W.toLocalBufferType(new Uint8Array(t.buffer));
|
|
629
|
-
else if (ArrayBuffer.isView(t) && t.byteLength ===
|
|
629
|
+
else if (ArrayBuffer.isView(t) && t.byteLength === ss)
|
|
630
630
|
r = W.toLocalBufferType(t);
|
|
631
631
|
else if (typeof t == "string")
|
|
632
632
|
r = Xe.bytesFromString(t);
|
|
@@ -670,11 +670,11 @@ class Xe extends je {
|
|
|
670
670
|
return new je(this.id, je.SUBTYPE_UUID);
|
|
671
671
|
}
|
|
672
672
|
static generate() {
|
|
673
|
-
const t = W.randomBytes(
|
|
673
|
+
const t = W.randomBytes(ss);
|
|
674
674
|
return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, t;
|
|
675
675
|
}
|
|
676
676
|
static isValid(t) {
|
|
677
|
-
return t ? typeof t == "string" ? Xe.isValidUUIDString(t) : hr(t) ? t.byteLength ===
|
|
677
|
+
return t ? typeof t == "string" ? Xe.isValidUUIDString(t) : hr(t) ? t.byteLength === ss : t._bsontype === "Binary" && t.sub_type === this.SUBTYPE_UUID && t.buffer.byteLength === 16 : !1;
|
|
678
678
|
}
|
|
679
679
|
static createFromHexString(t) {
|
|
680
680
|
const r = Xe.bytesFromString(t);
|
|
@@ -1218,7 +1218,7 @@ const Pu = 65536, _2 = 1 << 24, ln = Pu * Pu, r0 = ln * ln, Lu = r0 / 2, ku = {}
|
|
|
1218
1218
|
};
|
|
1219
1219
|
se(G, "TWO_PWR_24", G.fromInt(_2)), se(G, "MAX_UNSIGNED_VALUE", G.fromBits(-1, -1, !0)), se(G, "ZERO", G.fromInt(0)), se(G, "UZERO", G.fromInt(0, !0)), se(G, "ONE", G.fromInt(1)), se(G, "UONE", G.fromInt(1, !0)), se(G, "NEG_ONE", G.fromInt(-1)), se(G, "MAX_VALUE", G.fromBits(-1, 2147483647, !1)), se(G, "MIN_VALUE", G.fromBits(0, -2147483648, !1));
|
|
1220
1220
|
let ie = G;
|
|
1221
|
-
const B2 = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/, b2 = /^(\+|-)?(Infinity|inf)$/i, M2 = /^(\+|-)?NaN$/i, Yr = 6111, On = -6176, ju = 6176, xu = 34,
|
|
1221
|
+
const B2 = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/, b2 = /^(\+|-)?(Infinity|inf)$/i, M2 = /^(\+|-)?NaN$/i, Yr = 6111, On = -6176, ju = 6176, xu = 34, us = W.fromNumberArray([
|
|
1222
1222
|
124,
|
|
1223
1223
|
0,
|
|
1224
1224
|
0,
|
|
@@ -1344,7 +1344,7 @@ class $e extends at {
|
|
|
1344
1344
|
if (r[d] === "i" || r[d] === "I")
|
|
1345
1345
|
return new $e(i ? zu : Vu);
|
|
1346
1346
|
if (r[d] === "N")
|
|
1347
|
-
return new $e(
|
|
1347
|
+
return new $e(us);
|
|
1348
1348
|
}
|
|
1349
1349
|
for (; Gu(r[d]) || r[d] === "."; ) {
|
|
1350
1350
|
if (r[d] === ".") {
|
|
@@ -1358,11 +1358,11 @@ class $e extends at {
|
|
|
1358
1358
|
if (r[d] === "e" || r[d] === "E") {
|
|
1359
1359
|
const A = r.substr(++d).match(F2);
|
|
1360
1360
|
if (!A || !A[2])
|
|
1361
|
-
return new $e(
|
|
1361
|
+
return new $e(us);
|
|
1362
1362
|
O = parseInt(A[0], 10), d = d + A[0].length;
|
|
1363
1363
|
}
|
|
1364
1364
|
if (r[d])
|
|
1365
|
-
return new $e(
|
|
1365
|
+
return new $e(us);
|
|
1366
1366
|
if (!C)
|
|
1367
1367
|
m[0] = 0, E = 1, C = 1, s = 0;
|
|
1368
1368
|
else if (D = C - 1, s = E, s !== 1)
|
|
@@ -1777,7 +1777,7 @@ const wn = /* @__PURE__ */ new WeakMap(), ke = class ke extends at {
|
|
|
1777
1777
|
};
|
|
1778
1778
|
se(ke, "index", Math.floor(Math.random() * 16777215)), se(ke, "cacheHexString");
|
|
1779
1779
|
let Er = ke;
|
|
1780
|
-
function
|
|
1780
|
+
function xi(e, t, r) {
|
|
1781
1781
|
let n = 5;
|
|
1782
1782
|
if (Array.isArray(e))
|
|
1783
1783
|
for (let i = 0; i < e.length; i++)
|
|
@@ -1815,7 +1815,7 @@ function qu(e, t, r = !1, n = !1, i = !1) {
|
|
|
1815
1815
|
if (t._bsontype === "Decimal128")
|
|
1816
1816
|
return (e != null ? W.utf8ByteLength(e) + 1 : 0) + 17;
|
|
1817
1817
|
if (t._bsontype === "Code")
|
|
1818
|
-
return t.scope != null && Object.keys(t.scope).length > 0 ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + 4 + 4 + W.utf8ByteLength(t.code.toString()) + 1 +
|
|
1818
|
+
return t.scope != null && Object.keys(t.scope).length > 0 ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + 4 + 4 + W.utf8ByteLength(t.code.toString()) + 1 + xi(t.scope, r, i) : (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + 4 + W.utf8ByteLength(t.code.toString()) + 1;
|
|
1819
1819
|
if (t._bsontype === "Binary") {
|
|
1820
1820
|
const o = t;
|
|
1821
1821
|
return o.sub_type === je.SUBTYPE_BYTE_ARRAY ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + (o.position + 1 + 4 + 1 + 4) : (e != null ? W.utf8ByteLength(e) + 1 : 0) + (o.position + 1 + 4 + 1);
|
|
@@ -1827,8 +1827,8 @@ function qu(e, t, r = !1, n = !1, i = !1) {
|
|
|
1827
1827
|
$ref: t.collection,
|
|
1828
1828
|
$id: t.oid
|
|
1829
1829
|
}, t.fields);
|
|
1830
|
-
return t.db != null && (o.$db = t.db), (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 +
|
|
1831
|
-
} else return t instanceof RegExp || un(t) ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + W.utf8ByteLength(t.source) + 1 + (t.global ? 1 : 0) + (t.ignoreCase ? 1 : 0) + (t.multiline ? 1 : 0) + 1 : t._bsontype === "BSONRegExp" ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + W.utf8ByteLength(t.pattern) + 1 + W.utf8ByteLength(t.options) + 1 : (e != null ? W.utf8ByteLength(e) + 1 : 0) +
|
|
1830
|
+
return t.db != null && (o.$db = t.db), (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + xi(o, r, i);
|
|
1831
|
+
} else return t instanceof RegExp || un(t) ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + W.utf8ByteLength(t.source) + 1 + (t.global ? 1 : 0) + (t.ignoreCase ? 1 : 0) + (t.multiline ? 1 : 0) + 1 : t._bsontype === "BSONRegExp" ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + W.utf8ByteLength(t.pattern) + 1 + W.utf8ByteLength(t.options) + 1 : (e != null ? W.utf8ByteLength(e) + 1 : 0) + xi(t, r, i) + 1;
|
|
1832
1832
|
}
|
|
1833
1833
|
case "function":
|
|
1834
1834
|
return r ? (e != null ? W.utf8ByteLength(e) + 1 : 0) + 1 + 4 + W.utf8ByteLength(t.toString()) + 1 : 0;
|
|
@@ -1915,7 +1915,7 @@ const U2 = ie, cr = class cr extends U2 {
|
|
|
1915
1915
|
get _bsontype() {
|
|
1916
1916
|
return "Timestamp";
|
|
1917
1917
|
}
|
|
1918
|
-
get [
|
|
1918
|
+
get [co]() {
|
|
1919
1919
|
return "Timestamp";
|
|
1920
1920
|
}
|
|
1921
1921
|
get i() {
|
|
@@ -1995,10 +1995,10 @@ function n0(e, t, r) {
|
|
|
1995
1995
|
throw new q(`(bson size ${i} + options.index ${n} must be <= buffer length ${e.byteLength})`);
|
|
1996
1996
|
if (e[n + i - 1] !== 0)
|
|
1997
1997
|
throw new q("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
|
|
1998
|
-
return
|
|
1998
|
+
return zi(e, n, t, r);
|
|
1999
1999
|
}
|
|
2000
2000
|
const z2 = /^\$ref$|^\$id$|^\$db$/;
|
|
2001
|
-
function
|
|
2001
|
+
function zi(e, t, r, n = !1) {
|
|
2002
2002
|
const i = r.fieldsAsRaw == null ? null : r.fieldsAsRaw, o = r.raw == null ? !1 : r.raw, u = typeof r.bsonRegExp == "boolean" ? r.bsonRegExp : !1, c = r.promoteBuffers ?? !1, s = r.promoteLongs ?? !0, a = r.promoteValues ?? !0, E = r.useBigInt64 ?? !1;
|
|
2003
2003
|
if (E && !a)
|
|
2004
2004
|
throw new q("Must either request bigint or Long for int64 deserialization");
|
|
@@ -2078,14 +2078,14 @@ function Vi(e, t, r, n = !1) {
|
|
|
2078
2078
|
w = e.subarray(t, t + _);
|
|
2079
2079
|
else {
|
|
2080
2080
|
let A = r;
|
|
2081
|
-
g || (A = { ...r, validation: { utf8: l } }), w =
|
|
2081
|
+
g || (A = { ...r, validation: { utf8: l } }), w = zi(e, T, A, !1);
|
|
2082
2082
|
}
|
|
2083
2083
|
t = t + _;
|
|
2084
2084
|
} else if (d === zc) {
|
|
2085
2085
|
const T = t, _ = ue.getInt32LE(e, t);
|
|
2086
2086
|
let A = r;
|
|
2087
2087
|
const y = t + _;
|
|
2088
|
-
if (i && i[f] && (A = { ...r, raw: !0 }), g || (A = { ...A, validation: { utf8: l } }), w =
|
|
2088
|
+
if (i && i[f] && (A = { ...r, raw: !0 }), g || (A = { ...A, validation: { utf8: l } }), w = zi(e, T, A, !0), t = t + _, e[t - 1] !== 0)
|
|
2089
2089
|
throw new q("invalid array terminator byte");
|
|
2090
2090
|
if (t !== y)
|
|
2091
2091
|
throw new q("corrupted array bson");
|
|
@@ -2124,7 +2124,7 @@ function Vi(e, t, r, n = !1) {
|
|
|
2124
2124
|
throw new q("Binary type with subtype 0x02 contains too short binary size");
|
|
2125
2125
|
}
|
|
2126
2126
|
c && a ? w = W.toLocalBufferType(e.subarray(t, t + T)) : (w = new je(e.subarray(t, t + T), A), A === L1 && Xe.isValid(w) && (w = w.toUUID())), t = t + T;
|
|
2127
|
-
} else if (d ===
|
|
2127
|
+
} else if (d === Yi && u === !1) {
|
|
2128
2128
|
for (b = t; e[b] !== 0 && b < e.length; )
|
|
2129
2129
|
b++;
|
|
2130
2130
|
if (b >= e.length)
|
|
@@ -2150,7 +2150,7 @@ function Vi(e, t, r, n = !1) {
|
|
|
2150
2150
|
break;
|
|
2151
2151
|
}
|
|
2152
2152
|
w = new RegExp(T, A.join(""));
|
|
2153
|
-
} else if (d ===
|
|
2153
|
+
} else if (d === Yi && u === !0) {
|
|
2154
2154
|
for (b = t; e[b] !== 0 && b < e.length; )
|
|
2155
2155
|
b++;
|
|
2156
2156
|
if (b >= e.length)
|
|
@@ -2192,7 +2192,7 @@ function Vi(e, t, r, n = !1) {
|
|
|
2192
2192
|
throw new q("bad string length in bson");
|
|
2193
2193
|
const A = W.toUTF8(e, t, t + _ - 1, l);
|
|
2194
2194
|
t = t + _;
|
|
2195
|
-
const y = t, F = ue.getInt32LE(e, t), R =
|
|
2195
|
+
const y = t, F = ue.getInt32LE(e, t), R = zi(e, y, r, !1);
|
|
2196
2196
|
if (t = t + F, T < 8 + F + _)
|
|
2197
2197
|
throw new q("code_w_scope total size is too short, truncating scope");
|
|
2198
2198
|
if (T > 8 + F + _)
|
|
@@ -2228,21 +2228,21 @@ function Vi(e, t, r, n = !1) {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
return M;
|
|
2230
2230
|
}
|
|
2231
|
-
const
|
|
2232
|
-
function
|
|
2231
|
+
const Ji = /\x00/, Hu = /* @__PURE__ */ new Set(["$db", "$ref", "$id", "$clusterTime"]);
|
|
2232
|
+
function as(e, t, r, n) {
|
|
2233
2233
|
e[n++] = xc;
|
|
2234
2234
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2235
2235
|
n = n + i + 1, e[n - 1] = 0;
|
|
2236
2236
|
const o = W.encodeUTF8Into(e, r, n + 4);
|
|
2237
2237
|
return ue.setInt32LE(e, n, o + 1), n = n + 4 + o, e[n++] = 0, n;
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2239
|
+
function cs(e, t, r, n) {
|
|
2240
2240
|
const o = !Object.is(r, -0) && Number.isSafeInteger(r) && r <= ti && r >= ri ? Hn : F1;
|
|
2241
2241
|
e[n++] = o;
|
|
2242
2242
|
const u = W.encodeUTF8Into(e, t, n);
|
|
2243
2243
|
return n = n + u, e[n++] = 0, o === Hn ? n += ue.setInt32LE(e, n, r) : n += ue.setFloat64LE(e, n, r), n;
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function ls(e, t, r, n) {
|
|
2246
2246
|
e[n++] = P1;
|
|
2247
2247
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2248
2248
|
return n += i, e[n++] = 0, n += ue.setBigInt64LE(e, n, r), n;
|
|
@@ -2252,45 +2252,45 @@ function Xr(e, t, r, n) {
|
|
|
2252
2252
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2253
2253
|
return n = n + i, e[n++] = 0, n;
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2255
|
+
function hs(e, t, r, n) {
|
|
2256
2256
|
e[n++] = Wc;
|
|
2257
2257
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2258
2258
|
return n = n + i, e[n++] = 0, e[n++] = r ? 1 : 0, n;
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function ds(e, t, r, n) {
|
|
2261
2261
|
e[n++] = Gc;
|
|
2262
2262
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2263
2263
|
n = n + i, e[n++] = 0;
|
|
2264
2264
|
const o = ie.fromNumber(r.getTime()), u = o.getLowBits(), c = o.getHighBits();
|
|
2265
2265
|
return n += ue.setInt32LE(e, n, u), n += ue.setInt32LE(e, n, c), n;
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2268
|
-
e[n++] =
|
|
2267
|
+
function fs(e, t, r, n) {
|
|
2268
|
+
e[n++] = Yi;
|
|
2269
2269
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2270
|
-
if (n = n + i, e[n++] = 0, r.source && r.source.match(
|
|
2270
|
+
if (n = n + i, e[n++] = 0, r.source && r.source.match(Ji) != null)
|
|
2271
2271
|
throw new q("value " + r.source + " must not contain null bytes");
|
|
2272
2272
|
return n = n + W.encodeUTF8Into(e, r.source, n), e[n++] = 0, r.ignoreCase && (e[n++] = 105), r.global && (e[n++] = 115), r.multiline && (e[n++] = 109), e[n++] = 0, n;
|
|
2273
2273
|
}
|
|
2274
|
-
function
|
|
2275
|
-
e[n++] =
|
|
2274
|
+
function ms(e, t, r, n) {
|
|
2275
|
+
e[n++] = Yi;
|
|
2276
2276
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2277
|
-
if (n = n + i, e[n++] = 0, r.pattern.match(
|
|
2277
|
+
if (n = n + i, e[n++] = 0, r.pattern.match(Ji) != null)
|
|
2278
2278
|
throw new q("pattern " + r.pattern + " must not contain null bytes");
|
|
2279
2279
|
n = n + W.encodeUTF8Into(e, r.pattern, n), e[n++] = 0;
|
|
2280
2280
|
const o = r.options.split("").sort().join("");
|
|
2281
2281
|
return n = n + W.encodeUTF8Into(e, o, n), e[n++] = 0, n;
|
|
2282
2282
|
}
|
|
2283
|
-
function
|
|
2283
|
+
function Es(e, t, r, n) {
|
|
2284
2284
|
r === null ? e[n++] = I1 : r._bsontype === "MinKey" ? e[n++] = Xc : e[n++] = Jc;
|
|
2285
2285
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2286
2286
|
return n = n + i, e[n++] = 0, n;
|
|
2287
2287
|
}
|
|
2288
|
-
function
|
|
2288
|
+
function gs(e, t, r, n) {
|
|
2289
2289
|
e[n++] = Vc;
|
|
2290
2290
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2291
2291
|
return n = n + i, e[n++] = 0, n += r.serializeInto(e, n), n;
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function As(e, t, r, n) {
|
|
2294
2294
|
e[n++] = N1;
|
|
2295
2295
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2296
2296
|
n = n + i, e[n++] = 0;
|
|
@@ -2302,7 +2302,7 @@ function ps(e, t, r, n) {
|
|
|
2302
2302
|
e.set(r, n);
|
|
2303
2303
|
return n = n + o, n;
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function ps(e, t, r, n, i, o, u, c, s) {
|
|
2306
2306
|
if (s.has(r))
|
|
2307
2307
|
throw new q("Cannot convert circular structure to BSON");
|
|
2308
2308
|
s.add(r), e[n++] = Array.isArray(r) ? zc : R1;
|
|
@@ -2311,7 +2311,7 @@ function Cs(e, t, r, n, i, o, u, c, s) {
|
|
|
2311
2311
|
const E = ni(e, r, i, n, o + 1, u, c, s);
|
|
2312
2312
|
return s.delete(r), E;
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function Cs(e, t, r, n) {
|
|
2315
2315
|
e[n++] = Yc;
|
|
2316
2316
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2317
2317
|
n = n + i, e[n++] = 0;
|
|
@@ -2319,31 +2319,31 @@ function Ss(e, t, r, n) {
|
|
|
2319
2319
|
e[n + o] = r.bytes[o];
|
|
2320
2320
|
return n + 16;
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function Ss(e, t, r, n) {
|
|
2323
2323
|
e[n++] = r._bsontype === "Long" ? P1 : Kc;
|
|
2324
2324
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2325
2325
|
n = n + i, e[n++] = 0;
|
|
2326
2326
|
const o = r.getLowBits(), u = r.getHighBits();
|
|
2327
2327
|
return n += ue.setInt32LE(e, n, o), n += ue.setInt32LE(e, n, u), n;
|
|
2328
2328
|
}
|
|
2329
|
-
function
|
|
2329
|
+
function ys(e, t, r, n) {
|
|
2330
2330
|
r = r.valueOf(), e[n++] = Hn;
|
|
2331
2331
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2332
2332
|
return n = n + i, e[n++] = 0, n += ue.setInt32LE(e, n, r), n;
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function Os(e, t, r, n) {
|
|
2335
2335
|
e[n++] = F1;
|
|
2336
2336
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2337
2337
|
return n = n + i, e[n++] = 0, n += ue.setFloat64LE(e, n, r.value), n;
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2339
|
+
function ws(e, t, r, n) {
|
|
2340
2340
|
e[n++] = v1;
|
|
2341
2341
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2342
2342
|
n = n + i, e[n++] = 0;
|
|
2343
2343
|
const o = r.toString(), u = W.encodeUTF8Into(e, o, n + 4) + 1;
|
|
2344
2344
|
return ue.setInt32LE(e, n, u), n = n + 4 + u - 1, e[n++] = 0, n;
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function _s(e, t, r, n, i = !1, o = 0, u = !1, c = !0, s) {
|
|
2347
2347
|
if (r.scope && typeof r.scope == "object") {
|
|
2348
2348
|
e[n++] = Hc;
|
|
2349
2349
|
const a = W.encodeUTF8Into(e, t, n);
|
|
@@ -2366,7 +2366,7 @@ function Ds(e, t, r, n, i = !1, o = 0, u = !1, c = !0, s) {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
return n;
|
|
2368
2368
|
}
|
|
2369
|
-
function
|
|
2369
|
+
function Ds(e, t, r, n) {
|
|
2370
2370
|
e[n++] = N1;
|
|
2371
2371
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2372
2372
|
n = n + i, e[n++] = 0;
|
|
@@ -2379,14 +2379,14 @@ function Ts(e, t, r, n) {
|
|
|
2379
2379
|
e.set(o, n);
|
|
2380
2380
|
return n = n + r.position, n;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function Ts(e, t, r, n) {
|
|
2383
2383
|
e[n++] = qc;
|
|
2384
2384
|
const i = W.encodeUTF8Into(e, t, n);
|
|
2385
2385
|
n = n + i, e[n++] = 0;
|
|
2386
2386
|
const o = W.encodeUTF8Into(e, r.value, n + 4) + 1;
|
|
2387
2387
|
return ue.setInt32LE(e, n, o), n = n + 4 + o - 1, e[n++] = 0, n;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function Bs(e, t, r, n, i, o, u) {
|
|
2390
2390
|
e[n++] = R1;
|
|
2391
2391
|
const c = W.encodeUTF8Into(e, t, n);
|
|
2392
2392
|
n = n + c, e[n++] = 0;
|
|
@@ -2425,43 +2425,43 @@ function ni(e, t, r, n, i, o, u, c) {
|
|
|
2425
2425
|
else if (g === null)
|
|
2426
2426
|
s = Xr(e, h, g, s);
|
|
2427
2427
|
else if (m === "string")
|
|
2428
|
-
s =
|
|
2428
|
+
s = as(e, h, g, s);
|
|
2429
2429
|
else if (m === "number")
|
|
2430
|
-
s =
|
|
2430
|
+
s = cs(e, h, g, s);
|
|
2431
2431
|
else if (m === "bigint")
|
|
2432
|
-
s =
|
|
2432
|
+
s = ls(e, h, g, s);
|
|
2433
2433
|
else if (m === "boolean")
|
|
2434
|
-
s =
|
|
2434
|
+
s = hs(e, h, g, s);
|
|
2435
2435
|
else if (m === "object" && g._bsontype == null)
|
|
2436
|
-
g instanceof Date || an(g) ? s =
|
|
2436
|
+
g instanceof Date || an(g) ? s = ds(e, h, g, s) : g instanceof Uint8Array || hr(g) ? s = As(e, h, g, s) : g instanceof RegExp || un(g) ? s = fs(e, h, g, s) : s = ps(e, h, g, s, r, i, o, u, c);
|
|
2437
2437
|
else if (m === "object") {
|
|
2438
2438
|
if (g[dn] !== Rr)
|
|
2439
2439
|
throw new Nr();
|
|
2440
2440
|
if (g._bsontype === "ObjectId")
|
|
2441
|
-
s =
|
|
2441
|
+
s = gs(e, h, g, s);
|
|
2442
2442
|
else if (g._bsontype === "Decimal128")
|
|
2443
|
-
s =
|
|
2443
|
+
s = Cs(e, h, g, s);
|
|
2444
2444
|
else if (g._bsontype === "Long" || g._bsontype === "Timestamp")
|
|
2445
|
-
s =
|
|
2445
|
+
s = Ss(e, h, g, s);
|
|
2446
2446
|
else if (g._bsontype === "Double")
|
|
2447
|
-
s =
|
|
2447
|
+
s = Os(e, h, g, s);
|
|
2448
2448
|
else if (g._bsontype === "Code")
|
|
2449
|
-
s =
|
|
2449
|
+
s = _s(e, h, g, s, r, i, o, u, c);
|
|
2450
2450
|
else if (g._bsontype === "Binary")
|
|
2451
|
-
s =
|
|
2451
|
+
s = Ds(e, h, g, s);
|
|
2452
2452
|
else if (g._bsontype === "BSONSymbol")
|
|
2453
|
-
s =
|
|
2453
|
+
s = Ts(e, h, g, s);
|
|
2454
2454
|
else if (g._bsontype === "DBRef")
|
|
2455
|
-
s =
|
|
2455
|
+
s = Bs(e, h, g, s, i, o, c);
|
|
2456
2456
|
else if (g._bsontype === "BSONRegExp")
|
|
2457
|
-
s =
|
|
2457
|
+
s = ms(e, h, g, s);
|
|
2458
2458
|
else if (g._bsontype === "Int32")
|
|
2459
|
-
s =
|
|
2459
|
+
s = ys(e, h, g, s);
|
|
2460
2460
|
else if (g._bsontype === "MinKey" || g._bsontype === "MaxKey")
|
|
2461
|
-
s =
|
|
2461
|
+
s = Es(e, h, g, s);
|
|
2462
2462
|
else if (typeof g._bsontype < "u")
|
|
2463
2463
|
throw new q(`Unrecognized or invalid _bsontype: ${String(g._bsontype)}`);
|
|
2464
|
-
} else m === "function" && o && (s =
|
|
2464
|
+
} else m === "function" && o && (s = ws(e, h, g, s));
|
|
2465
2465
|
}
|
|
2466
2466
|
else if (t instanceof Map || M1(t)) {
|
|
2467
2467
|
const E = t.entries();
|
|
@@ -2475,7 +2475,7 @@ function ni(e, t, r, n, i, o, u, c) {
|
|
|
2475
2475
|
typeof (C == null ? void 0 : C.toBSON) == "function" && (C = C.toBSON());
|
|
2476
2476
|
const S = typeof C;
|
|
2477
2477
|
if (typeof m == "string" && !Hu.has(m)) {
|
|
2478
|
-
if (m.match(
|
|
2478
|
+
if (m.match(Ji) != null)
|
|
2479
2479
|
throw new q("key " + m + " must not contain null bytes");
|
|
2480
2480
|
if (r) {
|
|
2481
2481
|
if (m[0] === "$")
|
|
@@ -2489,43 +2489,43 @@ function ni(e, t, r, n, i, o, u, c) {
|
|
|
2489
2489
|
else if (C === null)
|
|
2490
2490
|
s = Xr(e, m, C, s);
|
|
2491
2491
|
else if (S === "string")
|
|
2492
|
-
s =
|
|
2492
|
+
s = as(e, m, C, s);
|
|
2493
2493
|
else if (S === "number")
|
|
2494
|
-
s =
|
|
2494
|
+
s = cs(e, m, C, s);
|
|
2495
2495
|
else if (S === "bigint")
|
|
2496
|
-
s =
|
|
2496
|
+
s = ls(e, m, C, s);
|
|
2497
2497
|
else if (S === "boolean")
|
|
2498
|
-
s =
|
|
2498
|
+
s = hs(e, m, C, s);
|
|
2499
2499
|
else if (S === "object" && C._bsontype == null)
|
|
2500
|
-
C instanceof Date || an(C) ? s =
|
|
2500
|
+
C instanceof Date || an(C) ? s = ds(e, m, C, s) : C instanceof Uint8Array || hr(C) ? s = As(e, m, C, s) : C instanceof RegExp || un(C) ? s = fs(e, m, C, s) : s = ps(e, m, C, s, r, i, o, u, c);
|
|
2501
2501
|
else if (S === "object") {
|
|
2502
2502
|
if (C[dn] !== Rr)
|
|
2503
2503
|
throw new Nr();
|
|
2504
2504
|
if (C._bsontype === "ObjectId")
|
|
2505
|
-
s =
|
|
2505
|
+
s = gs(e, m, C, s);
|
|
2506
2506
|
else if (C._bsontype === "Decimal128")
|
|
2507
|
-
s =
|
|
2507
|
+
s = Cs(e, m, C, s);
|
|
2508
2508
|
else if (C._bsontype === "Long" || C._bsontype === "Timestamp")
|
|
2509
|
-
s =
|
|
2509
|
+
s = Ss(e, m, C, s);
|
|
2510
2510
|
else if (C._bsontype === "Double")
|
|
2511
|
-
s =
|
|
2511
|
+
s = Os(e, m, C, s);
|
|
2512
2512
|
else if (C._bsontype === "Code")
|
|
2513
|
-
s =
|
|
2513
|
+
s = _s(e, m, C, s, r, i, o, u, c);
|
|
2514
2514
|
else if (C._bsontype === "Binary")
|
|
2515
|
-
s =
|
|
2515
|
+
s = Ds(e, m, C, s);
|
|
2516
2516
|
else if (C._bsontype === "BSONSymbol")
|
|
2517
|
-
s =
|
|
2517
|
+
s = Ts(e, m, C, s);
|
|
2518
2518
|
else if (C._bsontype === "DBRef")
|
|
2519
|
-
s =
|
|
2519
|
+
s = Bs(e, m, C, s, i, o, c);
|
|
2520
2520
|
else if (C._bsontype === "BSONRegExp")
|
|
2521
|
-
s =
|
|
2521
|
+
s = ms(e, m, C, s);
|
|
2522
2522
|
else if (C._bsontype === "Int32")
|
|
2523
|
-
s =
|
|
2523
|
+
s = ys(e, m, C, s);
|
|
2524
2524
|
else if (C._bsontype === "MinKey" || C._bsontype === "MaxKey")
|
|
2525
|
-
s =
|
|
2525
|
+
s = Es(e, m, C, s);
|
|
2526
2526
|
else if (typeof C._bsontype < "u")
|
|
2527
2527
|
throw new q(`Unrecognized or invalid _bsontype: ${String(C._bsontype)}`);
|
|
2528
|
-
} else S === "function" && o && (s =
|
|
2528
|
+
} else S === "function" && o && (s = ws(e, m, C, s));
|
|
2529
2529
|
}
|
|
2530
2530
|
} else {
|
|
2531
2531
|
if (typeof (t == null ? void 0 : t.toBSON) == "function" && (t = t.toBSON(), t != null && typeof t != "object"))
|
|
@@ -2535,7 +2535,7 @@ function ni(e, t, r, n, i, o, u, c) {
|
|
|
2535
2535
|
typeof (h == null ? void 0 : h.toBSON) == "function" && (h = h.toBSON());
|
|
2536
2536
|
const g = typeof h;
|
|
2537
2537
|
if (typeof E == "string" && !Hu.has(E)) {
|
|
2538
|
-
if (E.match(
|
|
2538
|
+
if (E.match(Ji) != null)
|
|
2539
2539
|
throw new q("key " + E + " must not contain null bytes");
|
|
2540
2540
|
if (r) {
|
|
2541
2541
|
if (E[0] === "$")
|
|
@@ -2549,43 +2549,43 @@ function ni(e, t, r, n, i, o, u, c) {
|
|
|
2549
2549
|
else if (h === null)
|
|
2550
2550
|
s = Xr(e, E, h, s);
|
|
2551
2551
|
else if (g === "string")
|
|
2552
|
-
s =
|
|
2552
|
+
s = as(e, E, h, s);
|
|
2553
2553
|
else if (g === "number")
|
|
2554
|
-
s =
|
|
2554
|
+
s = cs(e, E, h, s);
|
|
2555
2555
|
else if (g === "bigint")
|
|
2556
|
-
s =
|
|
2556
|
+
s = ls(e, E, h, s);
|
|
2557
2557
|
else if (g === "boolean")
|
|
2558
|
-
s =
|
|
2558
|
+
s = hs(e, E, h, s);
|
|
2559
2559
|
else if (g === "object" && h._bsontype == null)
|
|
2560
|
-
h instanceof Date || an(h) ? s =
|
|
2560
|
+
h instanceof Date || an(h) ? s = ds(e, E, h, s) : h instanceof Uint8Array || hr(h) ? s = As(e, E, h, s) : h instanceof RegExp || un(h) ? s = fs(e, E, h, s) : s = ps(e, E, h, s, r, i, o, u, c);
|
|
2561
2561
|
else if (g === "object") {
|
|
2562
2562
|
if (h[dn] !== Rr)
|
|
2563
2563
|
throw new Nr();
|
|
2564
2564
|
if (h._bsontype === "ObjectId")
|
|
2565
|
-
s =
|
|
2565
|
+
s = gs(e, E, h, s);
|
|
2566
2566
|
else if (h._bsontype === "Decimal128")
|
|
2567
|
-
s =
|
|
2567
|
+
s = Cs(e, E, h, s);
|
|
2568
2568
|
else if (h._bsontype === "Long" || h._bsontype === "Timestamp")
|
|
2569
|
-
s =
|
|
2569
|
+
s = Ss(e, E, h, s);
|
|
2570
2570
|
else if (h._bsontype === "Double")
|
|
2571
|
-
s =
|
|
2571
|
+
s = Os(e, E, h, s);
|
|
2572
2572
|
else if (h._bsontype === "Code")
|
|
2573
|
-
s =
|
|
2573
|
+
s = _s(e, E, h, s, r, i, o, u, c);
|
|
2574
2574
|
else if (h._bsontype === "Binary")
|
|
2575
|
-
s =
|
|
2575
|
+
s = Ds(e, E, h, s);
|
|
2576
2576
|
else if (h._bsontype === "BSONSymbol")
|
|
2577
|
-
s =
|
|
2577
|
+
s = Ts(e, E, h, s);
|
|
2578
2578
|
else if (h._bsontype === "DBRef")
|
|
2579
|
-
s =
|
|
2579
|
+
s = Bs(e, E, h, s, i, o, c);
|
|
2580
2580
|
else if (h._bsontype === "BSONRegExp")
|
|
2581
|
-
s =
|
|
2581
|
+
s = ms(e, E, h, s);
|
|
2582
2582
|
else if (h._bsontype === "Int32")
|
|
2583
|
-
s =
|
|
2583
|
+
s = ys(e, E, h, s);
|
|
2584
2584
|
else if (h._bsontype === "MinKey" || h._bsontype === "MaxKey")
|
|
2585
|
-
s =
|
|
2585
|
+
s = Es(e, E, h, s);
|
|
2586
2586
|
else if (typeof h._bsontype < "u")
|
|
2587
2587
|
throw new q(`Unrecognized or invalid _bsontype: ${String(h._bsontype)}`);
|
|
2588
|
-
} else g === "function" && o && (s =
|
|
2588
|
+
} else g === "function" && o && (s = ws(e, E, h, s));
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
2591
|
c.delete(t), e[s++] = 0;
|
|
@@ -2643,7 +2643,7 @@ function i0(e, t = {}) {
|
|
|
2643
2643
|
else if (typeof n == "bigint")
|
|
2644
2644
|
i.setTime(Number(n));
|
|
2645
2645
|
else
|
|
2646
|
-
throw new
|
|
2646
|
+
throw new Xi(`Unrecognized type for EJSON date: ${typeof n}`);
|
|
2647
2647
|
else if (typeof n == "string")
|
|
2648
2648
|
i.setTime(Date.parse(n));
|
|
2649
2649
|
else if (ie.isLong(n))
|
|
@@ -2653,7 +2653,7 @@ function i0(e, t = {}) {
|
|
|
2653
2653
|
else if (typeof n == "bigint")
|
|
2654
2654
|
i.setTime(Number(n));
|
|
2655
2655
|
else
|
|
2656
|
-
throw new
|
|
2656
|
+
throw new Xi(`Unrecognized type for EJSON date: ${typeof n}`);
|
|
2657
2657
|
return i;
|
|
2658
2658
|
}
|
|
2659
2659
|
if (e.$code != null) {
|
|
@@ -2842,14 +2842,14 @@ const Pe = {
|
|
|
2842
2842
|
minKey: 255,
|
|
2843
2843
|
maxKey: 127
|
|
2844
2844
|
};
|
|
2845
|
-
function
|
|
2845
|
+
function bs(e, t) {
|
|
2846
2846
|
try {
|
|
2847
2847
|
return ue.getNonnegativeInt32LE(e, t);
|
|
2848
2848
|
} catch (r) {
|
|
2849
2849
|
throw new xt("BSON size cannot be negative", t, { cause: r });
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function Ms(e, t) {
|
|
2853
2853
|
let r = t;
|
|
2854
2854
|
for (; e[r] !== 0; r++)
|
|
2855
2855
|
;
|
|
@@ -2860,7 +2860,7 @@ function Fs(e, t) {
|
|
|
2860
2860
|
function X2(e, t = 0) {
|
|
2861
2861
|
if (t ?? (t = 0), e.length < 5)
|
|
2862
2862
|
throw new xt(`Input must be at least 5 bytes, got ${e.length} bytes`, t);
|
|
2863
|
-
const r =
|
|
2863
|
+
const r = bs(e, t);
|
|
2864
2864
|
if (r > e.length - t)
|
|
2865
2865
|
throw new xt(`Parsed documentSize (${r} bytes) does not match input length (${e.length} bytes)`, t);
|
|
2866
2866
|
if (e[t + r - 1] !== 0)
|
|
@@ -2874,7 +2874,7 @@ function X2(e, t = 0) {
|
|
|
2874
2874
|
throw new xt("Invalid 0x00 type byte", i);
|
|
2875
2875
|
break;
|
|
2876
2876
|
}
|
|
2877
|
-
const u = i, c =
|
|
2877
|
+
const u = i, c = Ms(e, i) - u;
|
|
2878
2878
|
i += c + 1;
|
|
2879
2879
|
let s;
|
|
2880
2880
|
if (o === Pe.double || o === Pe.long || o === Pe.date || o === Pe.timestamp)
|
|
@@ -2890,11 +2890,11 @@ function X2(e, t = 0) {
|
|
|
2890
2890
|
else if (o === Pe.null || o === Pe.undefined || o === Pe.maxKey || o === Pe.minKey)
|
|
2891
2891
|
s = 0;
|
|
2892
2892
|
else if (o === Pe.regex)
|
|
2893
|
-
s =
|
|
2893
|
+
s = Ms(e, Ms(e, i) + 1) + 1 - i;
|
|
2894
2894
|
else if (o === Pe.object || o === Pe.array || o === Pe.javascriptWithScope)
|
|
2895
|
-
s =
|
|
2895
|
+
s = bs(e, i);
|
|
2896
2896
|
else if (o === Pe.string || o === Pe.binData || o === Pe.dbPointer || o === Pe.javascript || o === Pe.symbol)
|
|
2897
|
-
s =
|
|
2897
|
+
s = bs(e, i) + 4, o === Pe.binData && (s += 1), o === Pe.dbPointer && (s += 12);
|
|
2898
2898
|
else
|
|
2899
2899
|
throw new xt(`Invalid 0x${o.toString(16).padStart(2, "0")} type byte`, i);
|
|
2900
2900
|
if (s > r)
|
|
@@ -2929,7 +2929,7 @@ function h0(e, t = {}) {
|
|
|
2929
2929
|
function d0(e, t = {}) {
|
|
2930
2930
|
t = t || {};
|
|
2931
2931
|
const r = typeof t.serializeFunctions == "boolean" ? t.serializeFunctions : !1, n = typeof t.ignoreUndefined == "boolean" ? t.ignoreUndefined : !0;
|
|
2932
|
-
return
|
|
2932
|
+
return xi(e, r, n);
|
|
2933
2933
|
}
|
|
2934
2934
|
function f0(e, t, r, n, i, o) {
|
|
2935
2935
|
const u = Object.assign({ allowObjectSmallerThanBufferSize: !0, index: 0 }, o), c = W.toLocalBufferType(e);
|
|
@@ -2945,7 +2945,7 @@ var J2 = /* @__PURE__ */ Object.freeze({
|
|
|
2945
2945
|
BSONError: q,
|
|
2946
2946
|
BSONOffsetError: xt,
|
|
2947
2947
|
BSONRegExp: wt,
|
|
2948
|
-
BSONRuntimeError:
|
|
2948
|
+
BSONRuntimeError: Xi,
|
|
2949
2949
|
BSONSymbol: Vr,
|
|
2950
2950
|
BSONType: Qc,
|
|
2951
2951
|
BSONValue: at,
|
|
@@ -2965,7 +2965,7 @@ var J2 = /* @__PURE__ */ Object.freeze({
|
|
|
2965
2965
|
ObjectId: Er,
|
|
2966
2966
|
Timestamp: vr,
|
|
2967
2967
|
UUID: Xe,
|
|
2968
|
-
bsonType:
|
|
2968
|
+
bsonType: co,
|
|
2969
2969
|
calculateObjectSize: d0,
|
|
2970
2970
|
deserialize: h0,
|
|
2971
2971
|
deserializeStream: f0,
|
|
@@ -2978,7 +2978,7 @@ Oe.BSON = J2;
|
|
|
2978
2978
|
Oe.BSONError = q;
|
|
2979
2979
|
Oe.BSONOffsetError = xt;
|
|
2980
2980
|
Oe.BSONRegExp = wt;
|
|
2981
|
-
Oe.BSONRuntimeError =
|
|
2981
|
+
Oe.BSONRuntimeError = Xi;
|
|
2982
2982
|
Oe.BSONSymbol = Vr;
|
|
2983
2983
|
Oe.BSONType = Qc;
|
|
2984
2984
|
Oe.BSONValue = at;
|
|
@@ -2998,7 +2998,7 @@ Oe.NumberUtils = ue;
|
|
|
2998
2998
|
Oe.ObjectId = Er;
|
|
2999
2999
|
Oe.Timestamp = vr;
|
|
3000
3000
|
Oe.UUID = Xe;
|
|
3001
|
-
Oe.bsonType =
|
|
3001
|
+
Oe.bsonType = co;
|
|
3002
3002
|
Oe.calculateObjectSize = d0;
|
|
3003
3003
|
Oe.deserialize = h0;
|
|
3004
3004
|
Oe.deserializeStream = f0;
|
|
@@ -4387,7 +4387,7 @@ function Q2(e, t) {
|
|
|
4387
4387
|
};
|
|
4388
4388
|
}
|
|
4389
4389
|
})(pn);
|
|
4390
|
-
var Te = {},
|
|
4390
|
+
var Te = {}, Fs = {}, Ve = {};
|
|
4391
4391
|
(function(e) {
|
|
4392
4392
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.END = e.CHANGE = e.INIT = e.MORE = e.RESPONSE = e.SERVER_HEARTBEAT_FAILED = e.SERVER_HEARTBEAT_SUCCEEDED = e.SERVER_HEARTBEAT_STARTED = e.COMMAND_FAILED = e.COMMAND_SUCCEEDED = e.COMMAND_STARTED = e.CLUSTER_TIME_RECEIVED = e.CONNECTION_CHECKED_IN = e.CONNECTION_CHECKED_OUT = e.CONNECTION_CHECK_OUT_FAILED = e.CONNECTION_CHECK_OUT_STARTED = e.CONNECTION_CLOSED = e.CONNECTION_READY = e.CONNECTION_CREATED = e.CONNECTION_POOL_READY = e.CONNECTION_POOL_CLEARED = e.CONNECTION_POOL_CLOSED = e.CONNECTION_POOL_CREATED = e.WAITING_FOR_SUITABLE_SERVER = e.SERVER_SELECTION_SUCCEEDED = e.SERVER_SELECTION_FAILED = e.SERVER_SELECTION_STARTED = e.TOPOLOGY_DESCRIPTION_CHANGED = e.TOPOLOGY_CLOSED = e.TOPOLOGY_OPENING = e.SERVER_DESCRIPTION_CHANGED = e.SERVER_CLOSED = e.SERVER_OPENING = e.DESCRIPTION_RECEIVED = e.UNPINNED = e.PINNED = e.MESSAGE = e.ENDED = e.CLOSED = e.CONNECT = e.OPEN = e.CLOSE = e.TIMEOUT = e.ERROR = e.SYSTEM_JS_COLLECTION = e.SYSTEM_COMMAND_COLLECTION = e.SYSTEM_USER_COLLECTION = e.SYSTEM_PROFILE_COLLECTION = e.SYSTEM_INDEX_COLLECTION = e.SYSTEM_NAMESPACE_COLLECTION = void 0, e.kDecoratedKeys = e.kDecorateResult = e.LEGACY_HELLO_COMMAND_CAMEL_CASE = e.LEGACY_HELLO_COMMAND = e.MONGO_CLIENT_EVENTS = e.LOCAL_SERVER_EVENTS = e.SERVER_RELAY_EVENTS = e.APM_EVENTS = e.TOPOLOGY_EVENTS = e.CMAP_EVENTS = e.HEARTBEAT_EVENTS = e.RESUME_TOKEN_CHANGED = void 0, e.SYSTEM_NAMESPACE_COLLECTION = "system.namespaces", e.SYSTEM_INDEX_COLLECTION = "system.indexes", e.SYSTEM_PROFILE_COLLECTION = "system.profile", e.SYSTEM_USER_COLLECTION = "system.users", e.SYSTEM_COMMAND_COLLECTION = "$cmd", e.SYSTEM_JS_COLLECTION = "system.js", e.ERROR = "error", e.TIMEOUT = "timeout", e.CLOSE = "close", e.OPEN = "open", e.CONNECT = "connect", e.CLOSED = "closed", e.ENDED = "ended", e.MESSAGE = "message", e.PINNED = "pinned", e.UNPINNED = "unpinned", e.DESCRIPTION_RECEIVED = "descriptionReceived", e.SERVER_OPENING = "serverOpening", e.SERVER_CLOSED = "serverClosed", e.SERVER_DESCRIPTION_CHANGED = "serverDescriptionChanged", e.TOPOLOGY_OPENING = "topologyOpening", e.TOPOLOGY_CLOSED = "topologyClosed", e.TOPOLOGY_DESCRIPTION_CHANGED = "topologyDescriptionChanged", e.SERVER_SELECTION_STARTED = "serverSelectionStarted", e.SERVER_SELECTION_FAILED = "serverSelectionFailed", e.SERVER_SELECTION_SUCCEEDED = "serverSelectionSucceeded", e.WAITING_FOR_SUITABLE_SERVER = "waitingForSuitableServer", e.CONNECTION_POOL_CREATED = "connectionPoolCreated", e.CONNECTION_POOL_CLOSED = "connectionPoolClosed", e.CONNECTION_POOL_CLEARED = "connectionPoolCleared", e.CONNECTION_POOL_READY = "connectionPoolReady", e.CONNECTION_CREATED = "connectionCreated", e.CONNECTION_READY = "connectionReady", e.CONNECTION_CLOSED = "connectionClosed", e.CONNECTION_CHECK_OUT_STARTED = "connectionCheckOutStarted", e.CONNECTION_CHECK_OUT_FAILED = "connectionCheckOutFailed", e.CONNECTION_CHECKED_OUT = "connectionCheckedOut", e.CONNECTION_CHECKED_IN = "connectionCheckedIn", e.CLUSTER_TIME_RECEIVED = "clusterTimeReceived", e.COMMAND_STARTED = "commandStarted", e.COMMAND_SUCCEEDED = "commandSucceeded", e.COMMAND_FAILED = "commandFailed", e.SERVER_HEARTBEAT_STARTED = "serverHeartbeatStarted", e.SERVER_HEARTBEAT_SUCCEEDED = "serverHeartbeatSucceeded", e.SERVER_HEARTBEAT_FAILED = "serverHeartbeatFailed", e.RESPONSE = "response", e.MORE = "more", e.INIT = "init", e.CHANGE = "change", e.END = "end", e.RESUME_TOKEN_CHANGED = "resumeTokenChanged", e.HEARTBEAT_EVENTS = Object.freeze([
|
|
4393
4393
|
e.SERVER_HEARTBEAT_STARTED,
|
|
@@ -4491,9 +4491,9 @@ var Pt = {};
|
|
|
4491
4491
|
}
|
|
4492
4492
|
e.ReadConcern = t;
|
|
4493
4493
|
})(Pt);
|
|
4494
|
-
var or = {}, At = {},
|
|
4495
|
-
Object.defineProperty(
|
|
4496
|
-
|
|
4494
|
+
var or = {}, At = {}, lo = {};
|
|
4495
|
+
Object.defineProperty(lo, "__esModule", { value: !0 });
|
|
4496
|
+
lo.OnDemandDocument = void 0;
|
|
4497
4497
|
const me = pe, _n = {
|
|
4498
4498
|
type: 0,
|
|
4499
4499
|
nameOffset: 1,
|
|
@@ -4501,7 +4501,7 @@ const me = pe, _n = {
|
|
|
4501
4501
|
offset: 3,
|
|
4502
4502
|
length: 4
|
|
4503
4503
|
};
|
|
4504
|
-
class
|
|
4504
|
+
class Qi {
|
|
4505
4505
|
constructor(t, r = 0, n = !1, i) {
|
|
4506
4506
|
this.cache = /* @__PURE__ */ Object.create(null), this.indexFound = /* @__PURE__ */ Object.create(null), this.bson = t, this.offset = r, this.isArray = n, this.elements = i ?? (0, me.parseToElementsToArray)(this.bson, r);
|
|
4507
4507
|
}
|
|
@@ -4591,9 +4591,9 @@ class Zi {
|
|
|
4591
4591
|
case me.BSONType.date:
|
|
4592
4592
|
return new Date(Number((0, me.getBigInt64LE)(this.bson, i)));
|
|
4593
4593
|
case me.BSONType.object:
|
|
4594
|
-
return new
|
|
4594
|
+
return new Qi(this.bson, i);
|
|
4595
4595
|
case me.BSONType.array:
|
|
4596
|
-
return new
|
|
4596
|
+
return new Qi(this.bson, i, !0);
|
|
4597
4597
|
default:
|
|
4598
4598
|
throw new me.BSONError(`Unsupported BSON type: ${r}`);
|
|
4599
4599
|
}
|
|
@@ -4658,12 +4658,12 @@ class Zi {
|
|
|
4658
4658
|
return this.bson.subarray(this.offset, this.offset + t);
|
|
4659
4659
|
}
|
|
4660
4660
|
}
|
|
4661
|
-
|
|
4661
|
+
lo.OnDemandDocument = Qi;
|
|
4662
4662
|
var Yu;
|
|
4663
4663
|
function De() {
|
|
4664
4664
|
if (Yu) return At;
|
|
4665
4665
|
Yu = 1, Object.defineProperty(At, "__esModule", { value: !0 }), At.ClientBulkWriteCursorResponse = At.ExplainedCursorResponse = At.CursorResponse = At.MongoDBResponse = void 0, At.isErrorResponse = o;
|
|
4666
|
-
const e = pe, t = Q, r = ne(), n =
|
|
4666
|
+
const e = pe, t = Q, r = ne(), n = lo, i = {
|
|
4667
4667
|
nameOffset: 1,
|
|
4668
4668
|
nameLength: 2,
|
|
4669
4669
|
offset: 3,
|
|
@@ -4962,7 +4962,7 @@ function ct() {
|
|
|
4962
4962
|
var Ju;
|
|
4963
4963
|
function ne() {
|
|
4964
4964
|
return Ju || (Ju = 1, function(e) {
|
|
4965
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.kDispose = e.randomBytes = e.COSMOS_DB_MSG = e.DOCUMENT_DB_MSG = e.COSMOS_DB_CHECK = e.DOCUMENT_DB_CHECK = e.MONGODB_WARNING_CODE = e.DEFAULT_PK_FACTORY = e.HostAddress = e.BufferPool = e.List = e.MongoDBCollectionNamespace = e.MongoDBNamespace = e.ByteUtils = void 0, e.isUint8Array = C, e.hostMatchesWildcards = S, e.normalizeHintField = D, e.isObject = M, e.mergeOptions = p, e.filterOptions = B, e.isPromiseLike = d, e.decorateWithCollation = b, e.decorateWithReadConcern = f, e.getTopology = l, e.ns = w, e.makeCounter = A, e.uuidV4 = y, e.maxWireVersion = F, e.arrayStrictEqual = R, e.errorStrictEqual = v, e.makeStateMachine = J, e.processTimeMS = I, e.calculateDurationInMs = N, e.hasAtomicOperators = j, e.resolveTimeoutOptions = x, e.resolveOptions = Y, e.isSuperset = $, e.isHello = K, e.setDifference = ee, e.isRecord = ye, e.emitWarning = Ee, e.emitWarningOnce = Ce, e.enumToString = _e, e.supportsRetryableWrites = He, e.shuffle = nt, e.commandSupportsReadConcern = k, e.compareObjectId = P, e.parseInteger = X, e.parseUnsignedInteger = V, e.checkParentDomainMatch = z, e.get = Z, e.isHostMatch = Be, e.promiseWithResolvers = lt, e.squashError = it, e.once = Kl, e.maybeAddIdToDocuments = Yl, e.fileIsAccessible = Xl, e.csotMin = Jl, e.noop = Ql, e.decorateDecryptionResult = Fu, e.addAbortListener =
|
|
4965
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.kDispose = e.randomBytes = e.COSMOS_DB_MSG = e.DOCUMENT_DB_MSG = e.COSMOS_DB_CHECK = e.DOCUMENT_DB_CHECK = e.MONGODB_WARNING_CODE = e.DEFAULT_PK_FACTORY = e.HostAddress = e.BufferPool = e.List = e.MongoDBCollectionNamespace = e.MongoDBNamespace = e.ByteUtils = void 0, e.isUint8Array = C, e.hostMatchesWildcards = S, e.normalizeHintField = D, e.isObject = M, e.mergeOptions = p, e.filterOptions = B, e.isPromiseLike = d, e.decorateWithCollation = b, e.decorateWithReadConcern = f, e.getTopology = l, e.ns = w, e.makeCounter = A, e.uuidV4 = y, e.maxWireVersion = F, e.arrayStrictEqual = R, e.errorStrictEqual = v, e.makeStateMachine = J, e.processTimeMS = I, e.calculateDurationInMs = N, e.hasAtomicOperators = j, e.resolveTimeoutOptions = x, e.resolveOptions = Y, e.isSuperset = $, e.isHello = K, e.setDifference = ee, e.isRecord = ye, e.emitWarning = Ee, e.emitWarningOnce = Ce, e.enumToString = _e, e.supportsRetryableWrites = He, e.shuffle = nt, e.commandSupportsReadConcern = k, e.compareObjectId = P, e.parseInteger = X, e.parseUnsignedInteger = V, e.checkParentDomainMatch = z, e.get = Z, e.isHostMatch = Be, e.promiseWithResolvers = lt, e.squashError = it, e.once = Kl, e.maybeAddIdToDocuments = Yl, e.fileIsAccessible = Xl, e.csotMin = Jl, e.noop = Ql, e.decorateDecryptionResult = Fu, e.addAbortListener = rs, e.abortable = Zl;
|
|
4966
4966
|
const t = Fc, r = D1, n = n2, i = Ar, o = gn, u = pe, c = fe, s = Ve, a = Q, E = Pt, h = Ke, g = Ne, m = ct();
|
|
4967
4967
|
e.ByteUtils = {
|
|
4968
4968
|
toLocalBufferType(L) {
|
|
@@ -5470,7 +5470,7 @@ function ne() {
|
|
|
5470
5470
|
async function Kl(L, U, H) {
|
|
5471
5471
|
var yn;
|
|
5472
5472
|
(yn = H == null ? void 0 : H.signal) == null || yn.throwIfAborted();
|
|
5473
|
-
const { promise: te, resolve: oe, reject: Le } = lt(), Re = (
|
|
5473
|
+
const { promise: te, resolve: oe, reject: Le } = lt(), Re = (ns) => oe(ns), xe = (ns) => Le(ns), gt = rs(H == null ? void 0 : H.signal, function() {
|
|
5474
5474
|
Le(this.reason);
|
|
5475
5475
|
});
|
|
5476
5476
|
L.once(U, Re).once("error", xe);
|
|
@@ -5515,14 +5515,14 @@ function ne() {
|
|
|
5515
5515
|
}
|
|
5516
5516
|
}
|
|
5517
5517
|
e.kDispose = Symbol.dispose ?? Symbol("dispose");
|
|
5518
|
-
function
|
|
5518
|
+
function rs(L, U) {
|
|
5519
5519
|
if (L != null)
|
|
5520
5520
|
return L.addEventListener("abort", U, { once: !0 }), { [e.kDispose]: () => L.removeEventListener("abort", U) };
|
|
5521
5521
|
}
|
|
5522
5522
|
async function Zl(L, { signal: U }) {
|
|
5523
5523
|
if (U == null)
|
|
5524
5524
|
return await L;
|
|
5525
|
-
const { promise: H, reject: te } = lt(), oe = U.aborted ? te(U.reason) :
|
|
5525
|
+
const { promise: H, reject: te } = lt(), oe = U.aborted ? te(U.reason) : rs(U, function() {
|
|
5526
5526
|
te(this.reason);
|
|
5527
5527
|
});
|
|
5528
5528
|
try {
|
|
@@ -5531,7 +5531,7 @@ function ne() {
|
|
|
5531
5531
|
oe == null || oe[e.kDispose]();
|
|
5532
5532
|
}
|
|
5533
5533
|
}
|
|
5534
|
-
}(
|
|
5534
|
+
}(Fs)), Fs;
|
|
5535
5535
|
}
|
|
5536
5536
|
Object.defineProperty(Te, "__esModule", { value: !0 });
|
|
5537
5537
|
Te.LegacyTimeoutContext = Te.CSOTTimeoutContext = Te.TimeoutContext = Te.Timeout = Te.TimeoutError = void 0;
|
|
@@ -5599,7 +5599,7 @@ class k1 {
|
|
|
5599
5599
|
if ($2(t))
|
|
5600
5600
|
return new Kn(t);
|
|
5601
5601
|
if (Z2(t))
|
|
5602
|
-
return new
|
|
5602
|
+
return new ho(t);
|
|
5603
5603
|
throw new br.MongoRuntimeError("Unrecognized options");
|
|
5604
5604
|
}
|
|
5605
5605
|
}
|
|
@@ -5690,7 +5690,7 @@ class Kn extends k1 {
|
|
|
5690
5690
|
}
|
|
5691
5691
|
}
|
|
5692
5692
|
Te.CSOTTimeoutContext = Kn;
|
|
5693
|
-
class
|
|
5693
|
+
class ho extends k1 {
|
|
5694
5694
|
constructor(t) {
|
|
5695
5695
|
super(), this.options = t, this.clearServerSelectionTimeout = !0;
|
|
5696
5696
|
}
|
|
@@ -5717,7 +5717,7 @@ class fo extends k1 {
|
|
|
5717
5717
|
return null;
|
|
5718
5718
|
}
|
|
5719
5719
|
refreshed() {
|
|
5720
|
-
return new
|
|
5720
|
+
return new ho(this.options);
|
|
5721
5721
|
}
|
|
5722
5722
|
addMaxTimeMSToCommand(t, r) {
|
|
5723
5723
|
}
|
|
@@ -5725,7 +5725,7 @@ class fo extends k1 {
|
|
|
5725
5725
|
return this.options.socketTimeoutMS;
|
|
5726
5726
|
}
|
|
5727
5727
|
}
|
|
5728
|
-
Te.LegacyTimeoutContext =
|
|
5728
|
+
Te.LegacyTimeoutContext = ho;
|
|
5729
5729
|
var ii = {}, Ie = {}, oi = {};
|
|
5730
5730
|
(function(e) {
|
|
5731
5731
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Explain = e.ExplainVerbosity = void 0, e.validateExplainTimeoutOptions = n, e.decorateWithExplain = i;
|
|
@@ -5840,13 +5840,13 @@ var Me = {};
|
|
|
5840
5840
|
})(Me);
|
|
5841
5841
|
Object.defineProperty(Ie, "__esModule", { value: !0 });
|
|
5842
5842
|
Ie.CommandOperation = void 0;
|
|
5843
|
-
const eh = fe, th = Q,
|
|
5843
|
+
const eh = fe, th = Q, Rs = oi, rh = Pt, Bi = ne(), Zu = ct(), Or = Me;
|
|
5844
5844
|
class nh extends Or.AbstractOperation {
|
|
5845
5845
|
constructor(t, r) {
|
|
5846
5846
|
super(r), this.options = r ?? {};
|
|
5847
5847
|
const n = (r == null ? void 0 : r.dbName) || (r == null ? void 0 : r.authdb);
|
|
5848
5848
|
if (n ? this.ns = new Bi.MongoDBNamespace(n, "$cmd") : this.ns = t ? t.s.namespace.withCollection("$cmd") : new Bi.MongoDBNamespace("admin", "$cmd"), this.readConcern = rh.ReadConcern.fromOptions(r), this.writeConcern = Zu.WriteConcern.fromOptions(r), this.hasAspect(Or.Aspect.EXPLAINABLE))
|
|
5849
|
-
this.explain =
|
|
5849
|
+
this.explain = Rs.Explain.fromOptions(r), this.explain && (0, Rs.validateExplainTimeoutOptions)(this.options, this.explain);
|
|
5850
5850
|
else if ((r == null ? void 0 : r.explain) != null)
|
|
5851
5851
|
throw new th.MongoInvalidArgumentError('Option "explain" is not supported on this command');
|
|
5852
5852
|
}
|
|
@@ -5864,7 +5864,7 @@ class nh extends Or.AbstractOperation {
|
|
|
5864
5864
|
}
|
|
5865
5865
|
buildCommand(t, r) {
|
|
5866
5866
|
const n = this.buildCommandDocument(t, r), i = this.session && this.session.inTransaction();
|
|
5867
|
-
return this.readConcern && (0, Bi.commandSupportsReadConcern)(n) && !i && Object.assign(n, { readConcern: this.readConcern }), this.writeConcern && this.hasAspect(Or.Aspect.WRITE_OPERATION) && !i && Zu.WriteConcern.apply(n, this.writeConcern), this.options.collation && typeof this.options.collation == "object" && !this.hasAspect(Or.Aspect.SKIP_COLLATION) && Object.assign(n, { collation: this.options.collation }), typeof this.options.maxTimeMS == "number" && (n.maxTimeMS = this.options.maxTimeMS), this.options.rawData != null && this.hasAspect(Or.Aspect.SUPPORTS_RAW_DATA) && (0, Bi.maxWireVersion)(t) >= eh.MIN_SUPPORTED_RAW_DATA_WIRE_VERSION && (n.rawData = this.options.rawData), this.hasAspect(Or.Aspect.EXPLAINABLE) && this.explain ? (0,
|
|
5867
|
+
return this.readConcern && (0, Bi.commandSupportsReadConcern)(n) && !i && Object.assign(n, { readConcern: this.readConcern }), this.writeConcern && this.hasAspect(Or.Aspect.WRITE_OPERATION) && !i && Zu.WriteConcern.apply(n, this.writeConcern), this.options.collation && typeof this.options.collation == "object" && !this.hasAspect(Or.Aspect.SKIP_COLLATION) && Object.assign(n, { collation: this.options.collation }), typeof this.options.maxTimeMS == "number" && (n.maxTimeMS = this.options.maxTimeMS), this.options.rawData != null && this.hasAspect(Or.Aspect.SUPPORTS_RAW_DATA) && (0, Bi.maxWireVersion)(t) >= eh.MIN_SUPPORTED_RAW_DATA_WIRE_VERSION && (n.rawData = this.options.rawData), this.hasAspect(Or.Aspect.EXPLAINABLE) && this.explain ? (0, Rs.decorateWithExplain)(n, this.explain) : n;
|
|
5868
5868
|
}
|
|
5869
5869
|
}
|
|
5870
5870
|
Ie.CommandOperation = nh;
|
|
@@ -5912,18 +5912,18 @@ Ie.CommandOperation = nh;
|
|
|
5912
5912
|
Object.defineProperty(qe, "__esModule", { value: !0 });
|
|
5913
5913
|
qe.executeOperation = ah;
|
|
5914
5914
|
qe.autoConnect = m0;
|
|
5915
|
-
const ih = fe, et = Q, $u = Ke, bi = pn, oh = Te,
|
|
5915
|
+
const ih = fe, et = Q, $u = Ke, bi = pn, oh = Te, Zi = ne(), sh = ii, Yt = Me, uh = et.MONGODB_ERROR_CODES.IllegalOperation, ea = "This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.";
|
|
5916
5916
|
async function ah(e, t, r) {
|
|
5917
5917
|
if (!(t instanceof Yt.AbstractOperation))
|
|
5918
5918
|
throw new et.MongoRuntimeError("This method requires a valid operation instance");
|
|
5919
|
-
const n = e.topology == null ? await (0,
|
|
5919
|
+
const n = e.topology == null ? await (0, Zi.abortable)(m0(e), t.options) : e.topology;
|
|
5920
5920
|
let i = t.session, o;
|
|
5921
5921
|
if (i == null)
|
|
5922
5922
|
o = Symbol(), i = e.startSession({ owner: o, explicit: !1 });
|
|
5923
5923
|
else {
|
|
5924
5924
|
if (i.hasEnded)
|
|
5925
5925
|
throw new et.MongoExpiredSessionError("Use of expired sessions is not permitted");
|
|
5926
|
-
if (i.snapshotEnabled && (0,
|
|
5926
|
+
if (i.snapshotEnabled && (0, Zi.maxWireVersion)(n) < ih.MIN_SUPPORTED_SNAPSHOT_READS_WIRE_VERSION)
|
|
5927
5927
|
throw new et.MongoCompatibilityError("Snapshot reads require MongoDB 5.0 or later");
|
|
5928
5928
|
if (i.client !== e)
|
|
5929
5929
|
throw new et.MongoInvalidArgumentError("ClientSession must be from the same MongoClient");
|
|
@@ -5975,7 +5975,7 @@ async function ch(e, { topology: t, timeoutContext: r, session: n, readPreferenc
|
|
|
5975
5975
|
signal: e.options.signal,
|
|
5976
5976
|
deprioritizedServers: new bi.DeprioritizedServers()
|
|
5977
5977
|
});
|
|
5978
|
-
const c = e.hasAspect(Yt.Aspect.READ_OPERATION), s = e.hasAspect(Yt.Aspect.WRITE_OPERATION), a = (n == null ? void 0 : n.inTransaction()) ?? !1, E = t.s.options.retryReads && !a && e.canRetryRead, h = t.s.options.retryWrites && !a && (0,
|
|
5978
|
+
const c = e.hasAspect(Yt.Aspect.READ_OPERATION), s = e.hasAspect(Yt.Aspect.WRITE_OPERATION), a = (n == null ? void 0 : n.inTransaction()) ?? !1, E = t.s.options.retryReads && !a && e.canRetryRead, h = t.s.options.retryWrites && !a && (0, Zi.supportsRetryableWrites)(u) && e.canRetryWrite, g = e.hasAspect(Yt.Aspect.RETRYABLE) && n != null && (c && E || s && h);
|
|
5979
5979
|
s && h && n != null && (e.options.willRetryWrite = !0, n.incrementTransactionNumber());
|
|
5980
5980
|
const m = g ? r.csotEnabled() ? 1 / 0 : 2 : 1;
|
|
5981
5981
|
let C;
|
|
@@ -5995,7 +5995,7 @@ async function ch(e, { topology: t, timeoutContext: r, session: n, readPreferenc
|
|
|
5995
5995
|
operationName: e.commandName,
|
|
5996
5996
|
deprioritizedServers: S,
|
|
5997
5997
|
signal: e.options.signal
|
|
5998
|
-
}), s && !(0,
|
|
5998
|
+
}), s && !(0, Zi.supportsRetryableWrites)(u))
|
|
5999
5999
|
throw new et.MongoUnexpectedServerResponseError("Selected server does not support retryable writes");
|
|
6000
6000
|
}
|
|
6001
6001
|
e.server = u;
|
|
@@ -6017,10 +6017,10 @@ async function ch(e, { topology: t, timeoutContext: r, session: n, readPreferenc
|
|
|
6017
6017
|
}
|
|
6018
6018
|
throw C ?? new et.MongoRuntimeError("Tried to propagate retryability error, but no error was found.");
|
|
6019
6019
|
}
|
|
6020
|
-
var
|
|
6021
|
-
Object.defineProperty(
|
|
6022
|
-
|
|
6023
|
-
const lh = De(), ta = ne(), hh = Ie,
|
|
6020
|
+
var fo = {};
|
|
6021
|
+
Object.defineProperty(fo, "__esModule", { value: !0 });
|
|
6022
|
+
fo.ListDatabasesOperation = void 0;
|
|
6023
|
+
const lh = De(), ta = ne(), hh = Ie, Ns = Me;
|
|
6024
6024
|
class E0 extends hh.CommandOperation {
|
|
6025
6025
|
constructor(t, r) {
|
|
6026
6026
|
super(t, r), this.SERVER_COMMAND_RESPONSE_TYPE = lh.MongoDBResponse, this.options = r ?? {}, this.ns = new ta.MongoDBNamespace("admin", "$cmd");
|
|
@@ -6033,8 +6033,8 @@ class E0 extends hh.CommandOperation {
|
|
|
6033
6033
|
return typeof this.options.nameOnly == "boolean" && (n.nameOnly = this.options.nameOnly), this.options.filter && (n.filter = this.options.filter), typeof this.options.authorizedDatabases == "boolean" && (n.authorizedDatabases = this.options.authorizedDatabases), (0, ta.maxWireVersion)(t) >= 9 && this.options.comment !== void 0 && (n.comment = this.options.comment), n;
|
|
6034
6034
|
}
|
|
6035
6035
|
}
|
|
6036
|
-
|
|
6037
|
-
(0,
|
|
6036
|
+
fo.ListDatabasesOperation = E0;
|
|
6037
|
+
(0, Ns.defineAspects)(E0, [Ns.Aspect.READ_OPERATION, Ns.Aspect.RETRYABLE]);
|
|
6038
6038
|
var si = {};
|
|
6039
6039
|
Object.defineProperty(si, "__esModule", { value: !0 });
|
|
6040
6040
|
si.RemoveUserOperation = void 0;
|
|
@@ -6089,10 +6089,10 @@ class Eh extends p0 {
|
|
|
6089
6089
|
}
|
|
6090
6090
|
}
|
|
6091
6091
|
er.RunCursorCommandOperation = Eh;
|
|
6092
|
-
var
|
|
6093
|
-
Object.defineProperty(
|
|
6094
|
-
|
|
6095
|
-
const gh = De(),
|
|
6092
|
+
var mo = {};
|
|
6093
|
+
Object.defineProperty(mo, "__esModule", { value: !0 });
|
|
6094
|
+
mo.ValidateCollectionOperation = void 0;
|
|
6095
|
+
const gh = De(), Is = Q, Ah = Ie;
|
|
6096
6096
|
class ph extends Ah.CommandOperation {
|
|
6097
6097
|
constructor(t, r, n) {
|
|
6098
6098
|
super(t.s.db, n), this.SERVER_COMMAND_RESPONSE_TYPE = gh.MongoDBResponse, this.options = n, this.collectionName = r;
|
|
@@ -6109,18 +6109,18 @@ class ph extends Ah.CommandOperation {
|
|
|
6109
6109
|
handleOk(t) {
|
|
6110
6110
|
const r = super.handleOk(t);
|
|
6111
6111
|
if (r.result != null && typeof r.result != "string")
|
|
6112
|
-
throw new
|
|
6112
|
+
throw new Is.MongoUnexpectedServerResponseError("Error with validation data");
|
|
6113
6113
|
if (r.result != null && r.result.match(/exception|corrupt/) != null)
|
|
6114
|
-
throw new
|
|
6114
|
+
throw new Is.MongoUnexpectedServerResponseError(`Invalid collection ${this.collectionName}`);
|
|
6115
6115
|
if (r.valid != null && !r.valid)
|
|
6116
|
-
throw new
|
|
6116
|
+
throw new Is.MongoUnexpectedServerResponseError(`Invalid collection ${this.collectionName}`);
|
|
6117
6117
|
return t;
|
|
6118
6118
|
}
|
|
6119
6119
|
}
|
|
6120
|
-
|
|
6120
|
+
mo.ValidateCollectionOperation = ph;
|
|
6121
6121
|
Object.defineProperty(ei, "__esModule", { value: !0 });
|
|
6122
6122
|
ei.Admin = void 0;
|
|
6123
|
-
const Ch = pe, Mi = qe, Sh =
|
|
6123
|
+
const Ch = pe, Mi = qe, Sh = fo, yh = si, Oh = er, wh = mo, _h = ne();
|
|
6124
6124
|
class Dh {
|
|
6125
6125
|
/**
|
|
6126
6126
|
* Create a new Admin instance
|
|
@@ -6232,7 +6232,7 @@ Object.defineProperty(Wt, "__esModule", { value: !0 });
|
|
|
6232
6232
|
Wt.DeleteManyOperation = Wt.DeleteOneOperation = Wt.DeleteOperation = void 0;
|
|
6233
6233
|
Wt.makeDeleteStatement = U1;
|
|
6234
6234
|
const Th = De(), Xn = Q, Bh = ne(), bh = Ie, st = Me;
|
|
6235
|
-
class
|
|
6235
|
+
class Eo extends bh.CommandOperation {
|
|
6236
6236
|
constructor(t, r, n) {
|
|
6237
6237
|
super(void 0, n), this.SERVER_COMMAND_RESPONSE_TYPE = Th.MongoDBResponse, this.options = n, this.ns = t, this.statements = r;
|
|
6238
6238
|
}
|
|
@@ -6253,8 +6253,8 @@ class go extends bh.CommandOperation {
|
|
|
6253
6253
|
return o;
|
|
6254
6254
|
}
|
|
6255
6255
|
}
|
|
6256
|
-
Wt.DeleteOperation =
|
|
6257
|
-
class C0 extends
|
|
6256
|
+
Wt.DeleteOperation = Eo;
|
|
6257
|
+
class C0 extends Eo {
|
|
6258
6258
|
constructor(t, r, n) {
|
|
6259
6259
|
super(t, [U1(r, { ...n, limit: 1 })], n);
|
|
6260
6260
|
}
|
|
@@ -6274,7 +6274,7 @@ class C0 extends go {
|
|
|
6274
6274
|
}
|
|
6275
6275
|
}
|
|
6276
6276
|
Wt.DeleteOneOperation = C0;
|
|
6277
|
-
class S0 extends
|
|
6277
|
+
class S0 extends Eo {
|
|
6278
6278
|
constructor(t, r, n) {
|
|
6279
6279
|
super(t, [U1(r, n)], n);
|
|
6280
6280
|
}
|
|
@@ -6301,7 +6301,7 @@ function U1(e, t) {
|
|
|
6301
6301
|
};
|
|
6302
6302
|
return t.collation && (r.collation = t.collation), t.hint && (r.hint = t.hint), r;
|
|
6303
6303
|
}
|
|
6304
|
-
(0, st.defineAspects)(
|
|
6304
|
+
(0, st.defineAspects)(Eo, [
|
|
6305
6305
|
st.Aspect.RETRYABLE,
|
|
6306
6306
|
st.Aspect.WRITE_OPERATION,
|
|
6307
6307
|
st.Aspect.SUPPORTS_RAW_DATA
|
|
@@ -6449,7 +6449,7 @@ function Vh(e, t) {
|
|
|
6449
6449
|
}
|
|
6450
6450
|
Object.defineProperty(_t, "__esModule", { value: !0 });
|
|
6451
6451
|
_t.ReplaceOneOperation = _t.UpdateManyOperation = _t.UpdateOneOperation = _t.UpdateOperation = void 0;
|
|
6452
|
-
_t.makeUpdateStatement =
|
|
6452
|
+
_t.makeUpdateStatement = go;
|
|
6453
6453
|
const Wh = De(), Rt = Q, Gh = Gr, x1 = ne(), qh = Ie, ze = Me;
|
|
6454
6454
|
class ai extends qh.CommandOperation {
|
|
6455
6455
|
constructor(t, r, n) {
|
|
@@ -6473,7 +6473,7 @@ class ai extends qh.CommandOperation {
|
|
|
6473
6473
|
_t.UpdateOperation = ai;
|
|
6474
6474
|
class w0 extends ai {
|
|
6475
6475
|
constructor(t, r, n, i) {
|
|
6476
|
-
if (super(t, [
|
|
6476
|
+
if (super(t, [go(r, n, { ...i, multi: !1 })], i), !(0, x1.hasAtomicOperators)(n, i))
|
|
6477
6477
|
throw new Rt.MongoInvalidArgumentError("Update document requires atomic operators");
|
|
6478
6478
|
}
|
|
6479
6479
|
handleOk(t) {
|
|
@@ -6497,7 +6497,7 @@ class w0 extends ai {
|
|
|
6497
6497
|
_t.UpdateOneOperation = w0;
|
|
6498
6498
|
class _0 extends ai {
|
|
6499
6499
|
constructor(t, r, n, i) {
|
|
6500
|
-
if (super(t, [
|
|
6500
|
+
if (super(t, [go(r, n, { ...i, multi: !0 })], i), !(0, x1.hasAtomicOperators)(n, i))
|
|
6501
6501
|
throw new Rt.MongoInvalidArgumentError("Update document requires atomic operators");
|
|
6502
6502
|
}
|
|
6503
6503
|
handleOk(t) {
|
|
@@ -6521,7 +6521,7 @@ class _0 extends ai {
|
|
|
6521
6521
|
_t.UpdateManyOperation = _0;
|
|
6522
6522
|
class D0 extends ai {
|
|
6523
6523
|
constructor(t, r, n, i) {
|
|
6524
|
-
if (super(t, [
|
|
6524
|
+
if (super(t, [go(r, n, { ...i, multi: !1 })], i), (0, x1.hasAtomicOperators)(n))
|
|
6525
6525
|
throw new Rt.MongoInvalidArgumentError("Replacement document must not contain atomic operators");
|
|
6526
6526
|
}
|
|
6527
6527
|
handleOk(t) {
|
|
@@ -6543,7 +6543,7 @@ class D0 extends ai {
|
|
|
6543
6543
|
}
|
|
6544
6544
|
}
|
|
6545
6545
|
_t.ReplaceOneOperation = D0;
|
|
6546
|
-
function
|
|
6546
|
+
function go(e, t, r) {
|
|
6547
6547
|
if (e == null || typeof e != "object")
|
|
6548
6548
|
throw new Rt.MongoInvalidArgumentError("Selector must be a valid JavaScript object");
|
|
6549
6549
|
if (t == null || typeof t != "object")
|
|
@@ -7632,8 +7632,8 @@ Je.CancellationToken = $h;
|
|
|
7632
7632
|
var li = {};
|
|
7633
7633
|
Object.defineProperty(li, "__esModule", { value: !0 });
|
|
7634
7634
|
li.GetMoreOperation = void 0;
|
|
7635
|
-
const ed = De(), sa = Q, td = ne(),
|
|
7636
|
-
class B0 extends
|
|
7635
|
+
const ed = De(), sa = Q, td = ne(), Vi = Me;
|
|
7636
|
+
class B0 extends Vi.AbstractOperation {
|
|
7637
7637
|
constructor(t, r, n, i) {
|
|
7638
7638
|
super(i), this.SERVER_COMMAND_RESPONSE_TYPE = ed.CursorResponse, this.options = i, this.ns = t, this.cursorId = r, this.server = n;
|
|
7639
7639
|
}
|
|
@@ -7665,10 +7665,10 @@ class B0 extends Wi.AbstractOperation {
|
|
|
7665
7665
|
}
|
|
7666
7666
|
}
|
|
7667
7667
|
li.GetMoreOperation = B0;
|
|
7668
|
-
(0,
|
|
7669
|
-
var
|
|
7670
|
-
Object.defineProperty(
|
|
7671
|
-
|
|
7668
|
+
(0, Vi.defineAspects)(B0, [Vi.Aspect.READ_OPERATION, Vi.Aspect.MUST_SELECT_SAME_SERVER]);
|
|
7669
|
+
var Ao = {};
|
|
7670
|
+
Object.defineProperty(Ao, "__esModule", { value: !0 });
|
|
7671
|
+
Ao.KillCursorsOperation = void 0;
|
|
7672
7672
|
const rd = De(), nd = Q, d1 = Me;
|
|
7673
7673
|
class b0 extends d1.AbstractOperation {
|
|
7674
7674
|
constructor(t, r, n, i) {
|
|
@@ -7695,7 +7695,7 @@ class b0 extends d1.AbstractOperation {
|
|
|
7695
7695
|
handleError(t) {
|
|
7696
7696
|
}
|
|
7697
7697
|
}
|
|
7698
|
-
|
|
7698
|
+
Ao.KillCursorsOperation = b0;
|
|
7699
7699
|
(0, d1.defineAspects)(b0, [d1.Aspect.MUST_SELECT_SAME_SERVER]);
|
|
7700
7700
|
var ut = {}, hi = {};
|
|
7701
7701
|
Object.defineProperty(hi, "__esModule", { value: !0 });
|
|
@@ -7838,10 +7838,10 @@ var z1 = {};
|
|
|
7838
7838
|
})(z1);
|
|
7839
7839
|
Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
7840
7840
|
ut.ServerSessionPool = ut.ServerSession = ut.ClientSession = void 0;
|
|
7841
|
-
ut.maybeClearPinnedConnection =
|
|
7841
|
+
ut.maybeClearPinnedConnection = Gi;
|
|
7842
7842
|
ut.applySession = ad;
|
|
7843
7843
|
ut.updateSessionFromResponse = cd;
|
|
7844
|
-
const id = Rc,
|
|
7844
|
+
const id = Rc, Wi = pe, $i = hi, M0 = Ve, de = Q, od = Je, Ri = qe, vs = er, sd = Pt, Ps = Ke, m1 = Ne, Ls = Te, be = z1, Ye = ne(), Qr = ct();
|
|
7845
7845
|
class V1 extends od.TypedEventEmitter {
|
|
7846
7846
|
/**
|
|
7847
7847
|
* Create a client session.
|
|
@@ -7890,12 +7890,12 @@ class V1 extends od.TypedEventEmitter {
|
|
|
7890
7890
|
pin(t) {
|
|
7891
7891
|
if (this.pinnedConnection)
|
|
7892
7892
|
throw TypeError("Cannot pin multiple connections to the same session");
|
|
7893
|
-
this.pinnedConnection = t, t.emit(M0.PINNED, this.inTransaction() ?
|
|
7893
|
+
this.pinnedConnection = t, t.emit(M0.PINNED, this.inTransaction() ? $i.ConnectionPoolMetrics.TXN : $i.ConnectionPoolMetrics.CURSOR);
|
|
7894
7894
|
}
|
|
7895
7895
|
/** @internal */
|
|
7896
7896
|
unpin(t) {
|
|
7897
7897
|
if (this.loadBalanced)
|
|
7898
|
-
return
|
|
7898
|
+
return Gi(this, t);
|
|
7899
7899
|
this.transaction.unpinServer();
|
|
7900
7900
|
}
|
|
7901
7901
|
get isPinned() {
|
|
@@ -7921,7 +7921,7 @@ class V1 extends od.TypedEventEmitter {
|
|
|
7921
7921
|
const r = this.serverSession;
|
|
7922
7922
|
r != null && (this.sessionPool.release(r), this._serverSession = new W1(r)), this.hasEnded = !0, this.emit("ended", this);
|
|
7923
7923
|
}
|
|
7924
|
-
|
|
7924
|
+
Gi(this, { force: !0, ...t });
|
|
7925
7925
|
}
|
|
7926
7926
|
}
|
|
7927
7927
|
/**
|
|
@@ -8028,11 +8028,11 @@ class V1 extends od.TypedEventEmitter {
|
|
|
8028
8028
|
(s.length > 2 || !s.includes("wtimeoutMS") && !s.includes("wTimeoutMS")) && Qr.WriteConcern.apply(r, { ...i, wtimeoutMS: void 0 });
|
|
8029
8029
|
}
|
|
8030
8030
|
(this.transaction.state === be.TxnState.TRANSACTION_COMMITTED || this.commitAttempted) && (n == null && this.timeoutContext == null ? Qr.WriteConcern.apply(r, { wtimeoutMS: 1e4, ...i, w: "majority" }) : Qr.WriteConcern.apply(r, { w: "majority", ...i, wtimeoutMS: void 0 })), typeof this.transaction.options.maxTimeMS == "number" && (r.maxTimeMS = this.transaction.options.maxTimeMS), this.transaction.recoveryToken && (r.recoveryToken = this.transaction.recoveryToken);
|
|
8031
|
-
const o = new
|
|
8031
|
+
const o = new vs.RunCommandOperation(new Ye.MongoDBNamespace("admin"), r, {
|
|
8032
8032
|
session: this,
|
|
8033
|
-
readPreference:
|
|
8033
|
+
readPreference: Ps.ReadPreference.primary,
|
|
8034
8034
|
bypassPinningCheck: !0
|
|
8035
|
-
}), u = this.timeoutContext ?? (typeof n == "number" ?
|
|
8035
|
+
}), u = this.timeoutContext ?? (typeof n == "number" ? Ls.TimeoutContext.create({
|
|
8036
8036
|
serverSelectionTimeoutMS: this.clientOptions.serverSelectionTimeoutMS,
|
|
8037
8037
|
socketTimeoutMS: this.clientOptions.socketTimeoutMS,
|
|
8038
8038
|
timeoutMS: n
|
|
@@ -8044,9 +8044,9 @@ class V1 extends od.TypedEventEmitter {
|
|
|
8044
8044
|
if (this.commitAttempted = !0, s instanceof de.MongoError && (0, de.isRetryableWriteError)(s)) {
|
|
8045
8045
|
Qr.WriteConcern.apply(r, { wtimeoutMS: 1e4, ...i, w: "majority" }), this.unpin({ force: !0 });
|
|
8046
8046
|
try {
|
|
8047
|
-
await (0, Ri.executeOperation)(this.client, new
|
|
8047
|
+
await (0, Ri.executeOperation)(this.client, new vs.RunCommandOperation(new Ye.MongoDBNamespace("admin"), r, {
|
|
8048
8048
|
session: this,
|
|
8049
|
-
readPreference:
|
|
8049
|
+
readPreference: Ps.ReadPreference.primary,
|
|
8050
8050
|
bypassPinningCheck: !0
|
|
8051
8051
|
}), u);
|
|
8052
8052
|
return;
|
|
@@ -8071,15 +8071,15 @@ class V1 extends od.TypedEventEmitter {
|
|
|
8071
8071
|
throw new de.MongoTransactionError("Cannot call abortTransaction twice");
|
|
8072
8072
|
if (this.transaction.state === be.TxnState.TRANSACTION_COMMITTED || this.transaction.state === be.TxnState.TRANSACTION_COMMITTED_EMPTY)
|
|
8073
8073
|
throw new de.MongoTransactionError("Cannot call abortTransaction after calling commitTransaction");
|
|
8074
|
-
const r = { abortTransaction: 1 }, n = typeof (t == null ? void 0 : t.timeoutMS) == "number" ? t.timeoutMS : (c = this.timeoutContext) != null && c.csotEnabled() ? this.timeoutContext.timeoutMS : typeof this.timeoutMS == "number" ? this.timeoutMS : null, i = n != null ?
|
|
8074
|
+
const r = { abortTransaction: 1 }, n = typeof (t == null ? void 0 : t.timeoutMS) == "number" ? t.timeoutMS : (c = this.timeoutContext) != null && c.csotEnabled() ? this.timeoutContext.timeoutMS : typeof this.timeoutMS == "number" ? this.timeoutMS : null, i = n != null ? Ls.TimeoutContext.create({
|
|
8075
8075
|
timeoutMS: n,
|
|
8076
8076
|
serverSelectionTimeoutMS: this.clientOptions.serverSelectionTimeoutMS,
|
|
8077
8077
|
socketTimeoutMS: this.clientOptions.socketTimeoutMS
|
|
8078
8078
|
}) : null, o = this.transaction.options.writeConcern ?? ((s = this.clientOptions) == null ? void 0 : s.writeConcern);
|
|
8079
8079
|
o != null && n == null && Qr.WriteConcern.apply(r, { wtimeoutMS: 1e4, w: "majority", ...o }), this.transaction.recoveryToken && (r.recoveryToken = this.transaction.recoveryToken);
|
|
8080
|
-
const u = new
|
|
8080
|
+
const u = new vs.RunCommandOperation(new Ye.MongoDBNamespace("admin"), r, {
|
|
8081
8081
|
session: this,
|
|
8082
|
-
readPreference:
|
|
8082
|
+
readPreference: Ps.ReadPreference.primary,
|
|
8083
8083
|
bypassPinningCheck: !0
|
|
8084
8084
|
});
|
|
8085
8085
|
try {
|
|
@@ -8097,7 +8097,7 @@ class V1 extends od.TypedEventEmitter {
|
|
|
8097
8097
|
throw E;
|
|
8098
8098
|
}
|
|
8099
8099
|
} finally {
|
|
8100
|
-
this.transaction.transition(be.TxnState.TRANSACTION_ABORTED), this.loadBalanced &&
|
|
8100
|
+
this.transaction.transition(be.TxnState.TRANSACTION_ABORTED), this.loadBalanced && Gi(this, { force: !1 });
|
|
8101
8101
|
}
|
|
8102
8102
|
}
|
|
8103
8103
|
/**
|
|
@@ -8144,7 +8144,7 @@ class V1 extends od.TypedEventEmitter {
|
|
|
8144
8144
|
async withTransaction(t, r) {
|
|
8145
8145
|
var a, E, h, g;
|
|
8146
8146
|
const i = (r == null ? void 0 : r.timeoutMS) ?? this.timeoutMS ?? null;
|
|
8147
|
-
this.timeoutContext = i != null ?
|
|
8147
|
+
this.timeoutContext = i != null ? Ls.TimeoutContext.create({
|
|
8148
8148
|
timeoutMS: i,
|
|
8149
8149
|
serverSelectionTimeoutMS: this.clientOptions.serverSelectionTimeoutMS,
|
|
8150
8150
|
socketTimeoutMS: this.clientOptions.socketTimeoutMS
|
|
@@ -8180,7 +8180,7 @@ class V1 extends od.TypedEventEmitter {
|
|
|
8180
8180
|
await this.commitTransaction(), u = !0;
|
|
8181
8181
|
} catch (S) {
|
|
8182
8182
|
if (!(!((g = this.timeoutContext) != null && g.csotEnabled()) && (0, Ye.processTimeMS)() - o >= 12e4)) {
|
|
8183
|
-
if (!
|
|
8183
|
+
if (!po(S) && S.hasErrorLabel(de.MongoErrorLabel.UnknownTransactionCommitResult))
|
|
8184
8184
|
continue t;
|
|
8185
8185
|
if (S.hasErrorLabel(de.MongoErrorLabel.TransientTransactionError)) {
|
|
8186
8186
|
s = S;
|
|
@@ -8204,7 +8204,7 @@ const ud = /* @__PURE__ */ new Set([
|
|
|
8204
8204
|
]);
|
|
8205
8205
|
function ua(e) {
|
|
8206
8206
|
if (e instanceof de.MongoError) {
|
|
8207
|
-
if ((0, de.isRetryableWriteError)(e) || e instanceof de.MongoWriteConcernError ||
|
|
8207
|
+
if ((0, de.isRetryableWriteError)(e) || e instanceof de.MongoWriteConcernError || po(e)) {
|
|
8208
8208
|
if (F0(e))
|
|
8209
8209
|
return !0;
|
|
8210
8210
|
} else if (e.hasErrorLabel(de.MongoErrorLabel.TransientTransactionError))
|
|
@@ -8214,23 +8214,23 @@ function ua(e) {
|
|
|
8214
8214
|
}
|
|
8215
8215
|
function aa(e) {
|
|
8216
8216
|
let t = (0, de.isRetryableWriteError)(e);
|
|
8217
|
-
return t || (t = e instanceof de.MongoWriteConcernError), t || (t =
|
|
8217
|
+
return t || (t = e instanceof de.MongoWriteConcernError), t || (t = po(e)), t && (t = F0(e)), t;
|
|
8218
8218
|
}
|
|
8219
8219
|
function F0(e) {
|
|
8220
8220
|
const t = e instanceof de.MongoServerError && e.codeName && ud.has(e.codeName);
|
|
8221
|
-
return
|
|
8221
|
+
return po(e) || !t && e.code !== de.MONGODB_ERROR_CODES.UnsatisfiableWriteConcern && e.code !== de.MONGODB_ERROR_CODES.UnknownReplWriteConcern;
|
|
8222
8222
|
}
|
|
8223
|
-
function
|
|
8223
|
+
function Gi(e, t) {
|
|
8224
8224
|
const r = e.pinnedConnection, n = t == null ? void 0 : t.error;
|
|
8225
8225
|
if (e.inTransaction() && n && n instanceof de.MongoError && n.hasErrorLabel(de.MongoErrorLabel.TransientTransactionError))
|
|
8226
8226
|
return;
|
|
8227
8227
|
const i = e.client.topology;
|
|
8228
8228
|
if (r && i != null) {
|
|
8229
8229
|
const u = Array.from(i.s.servers.values())[0];
|
|
8230
|
-
((t == null ? void 0 : t.error) == null || t != null && t.force) && (u.pool.checkIn(r), e.pinnedConnection = void 0, r.emit(M0.UNPINNED, e.transaction.state !== be.TxnState.NO_TRANSACTION ?
|
|
8230
|
+
((t == null ? void 0 : t.error) == null || t != null && t.force) && (u.pool.checkIn(r), e.pinnedConnection = void 0, r.emit(M0.UNPINNED, e.transaction.state !== be.TxnState.NO_TRANSACTION ? $i.ConnectionPoolMetrics.TXN : $i.ConnectionPoolMetrics.CURSOR), t != null && t.forceClear && u.pool.clear({ serviceId: r.serviceId }));
|
|
8231
8231
|
}
|
|
8232
8232
|
}
|
|
8233
|
-
function
|
|
8233
|
+
function po(e) {
|
|
8234
8234
|
var t;
|
|
8235
8235
|
return e == null || !(e instanceof de.MongoServerError) ? !1 : e.code === de.MONGODB_ERROR_CODES.MaxTimeMSExpired || ((t = e.writeConcernError) == null ? void 0 : t.code) === de.MONGODB_ERROR_CODES.MaxTimeMSExpired;
|
|
8236
8236
|
}
|
|
@@ -8239,10 +8239,10 @@ class W1 {
|
|
|
8239
8239
|
constructor(t) {
|
|
8240
8240
|
if (t != null) {
|
|
8241
8241
|
const r = Buffer.allocUnsafe(16);
|
|
8242
|
-
r.set(t.id.id.buffer), this.id = { id: new
|
|
8242
|
+
r.set(t.id.id.buffer), this.id = { id: new Wi.Binary(r, t.id.id.sub_type) }, this.lastUse = t.lastUse, this.txnNumber = t.txnNumber, this.isDirty = t.isDirty;
|
|
8243
8243
|
return;
|
|
8244
8244
|
}
|
|
8245
|
-
this.id = { id: new
|
|
8245
|
+
this.id = { id: new Wi.Binary((0, Ye.uuidV4)(), Wi.Binary.SUBTYPE_UUID) }, this.lastUse = (0, Ye.processTimeMS)(), this.txnNumber = 0, this.isDirty = !1;
|
|
8246
8246
|
}
|
|
8247
8247
|
/**
|
|
8248
8248
|
* Determines if the server session has timed out.
|
|
@@ -8308,7 +8308,7 @@ function ad(e, t, r) {
|
|
|
8308
8308
|
return e && e.explicit ? new de.MongoAPIError("Cannot have explicit session with unacknowledged writes") : void 0;
|
|
8309
8309
|
n.lastUse = (0, Ye.processTimeMS)(), t.lsid = n.id;
|
|
8310
8310
|
const i = e.inTransaction() || (0, be.isTransactionCommand)(t);
|
|
8311
|
-
if ((!!r.willRetryWrite || i) && (n.txnNumber += e.txnNumberIncrement, e.txnNumberIncrement = 0, t.txnNumber =
|
|
8311
|
+
if ((!!r.willRetryWrite || i) && (n.txnNumber += e.txnNumberIncrement, e.txnNumberIncrement = 0, t.txnNumber = Wi.Long.fromNumber(n.txnNumber)), !i) {
|
|
8312
8312
|
e.transaction.state !== be.TxnState.NO_TRANSACTION && e.transaction.transition(be.TxnState.NO_TRANSACTION), e.supports.causalConsistency && e.operationTime && (0, Ye.commandSupportsReadConcern)(t) ? (t.readConcern = t.readConcern || {}, Object.assign(t.readConcern, { afterClusterTime: e.operationTime })) : e.snapshotEnabled && (t.readConcern = t.readConcern || { level: sd.ReadConcernLevel.snapshot }, e.snapshotTime != null && Object.assign(t.readConcern, { atClusterTime: e.snapshotTime }));
|
|
8313
8313
|
return;
|
|
8314
8314
|
}
|
|
@@ -8326,7 +8326,7 @@ function cd(e, t) {
|
|
|
8326
8326
|
}
|
|
8327
8327
|
(function(e) {
|
|
8328
8328
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CursorTimeoutContext = e.AbstractCursor = e.CursorTimeoutMode = e.CURSOR_FLAGS = void 0;
|
|
8329
|
-
const t =
|
|
8329
|
+
const t = ao, r = pe, n = Q, i = Je, o = qe, u = li, c = Ao, s = Pt, a = Ke, E = ut, h = Te, g = ne();
|
|
8330
8330
|
e.CURSOR_FLAGS = [
|
|
8331
8331
|
"tailable",
|
|
8332
8332
|
"oplogReplay",
|
|
@@ -8940,14 +8940,14 @@ class hd extends ld.AbstractCursor {
|
|
|
8940
8940
|
Sn.ExplainableCursor = hd;
|
|
8941
8941
|
Object.defineProperty(qr, "__esModule", { value: !0 });
|
|
8942
8942
|
qr.AggregationCursor = void 0;
|
|
8943
|
-
const
|
|
8943
|
+
const ks = Q, ca = oi, la = ii, ha = qe, dd = ne(), da = tt, fd = Sn;
|
|
8944
8944
|
class G1 extends fd.ExplainableCursor {
|
|
8945
8945
|
/** @internal */
|
|
8946
8946
|
constructor(t, r, n = [], i = {}) {
|
|
8947
8947
|
super(t, r, i), this.pipeline = n, this.aggregateOptions = i;
|
|
8948
8948
|
const o = this.pipeline[this.pipeline.length - 1];
|
|
8949
8949
|
if (this.cursorOptions.timeoutMS != null && this.cursorOptions.timeoutMode === da.CursorTimeoutMode.ITERATION && ((o == null ? void 0 : o.$merge) != null || (o == null ? void 0 : o.$out) != null))
|
|
8950
|
-
throw new
|
|
8950
|
+
throw new ks.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");
|
|
8951
8951
|
}
|
|
8952
8952
|
clone() {
|
|
8953
8953
|
const t = (0, dd.mergeOptions)({}, this.aggregateOptions);
|
|
@@ -8970,7 +8970,7 @@ class G1 extends fd.ExplainableCursor {
|
|
|
8970
8970
|
try {
|
|
8971
8971
|
(0, ca.validateExplainTimeoutOptions)(r, ca.Explain.fromOptions(r));
|
|
8972
8972
|
} catch {
|
|
8973
|
-
throw new
|
|
8973
|
+
throw new ks.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in aggregateOptions");
|
|
8974
8974
|
}
|
|
8975
8975
|
const n = new la.AggregateOperation(this.namespace, this.pipeline, r), i = await (0, ha.executeOperation)(this.client, n, this.timeoutContext);
|
|
8976
8976
|
return { server: n.server, session: t, response: i };
|
|
@@ -8987,7 +8987,7 @@ class G1 extends fd.ExplainableCursor {
|
|
|
8987
8987
|
}
|
|
8988
8988
|
addStage(t) {
|
|
8989
8989
|
if (this.throwIfInitialized(), this.cursorOptions.timeoutMS != null && this.cursorOptions.timeoutMode === da.CursorTimeoutMode.ITERATION && (t.$out != null || t.$merge != null))
|
|
8990
|
-
throw new
|
|
8990
|
+
throw new ks.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");
|
|
8991
8991
|
return this.pipeline.push(t), this;
|
|
8992
8992
|
}
|
|
8993
8993
|
group(t) {
|
|
@@ -9099,15 +9099,15 @@ class N0 extends Ed.CommandOperation {
|
|
|
9099
9099
|
}
|
|
9100
9100
|
di.CountOperation = N0;
|
|
9101
9101
|
(0, Ni.defineAspects)(N0, [Ni.Aspect.READ_OPERATION, Ni.Aspect.RETRYABLE, Ni.Aspect.SUPPORTS_RAW_DATA]);
|
|
9102
|
-
var
|
|
9103
|
-
Object.defineProperty(
|
|
9104
|
-
|
|
9105
|
-
const
|
|
9102
|
+
var Co = {};
|
|
9103
|
+
Object.defineProperty(Co, "__esModule", { value: !0 });
|
|
9104
|
+
Co.FindOperation = void 0;
|
|
9105
|
+
const Us = De(), gd = Q, Ad = Gr, pd = ne(), Cd = Ie, Zr = Me;
|
|
9106
9106
|
class I0 extends Cd.CommandOperation {
|
|
9107
9107
|
constructor(t, r = {}, n = {}) {
|
|
9108
|
-
if (super(void 0, n), this.SERVER_COMMAND_RESPONSE_TYPE =
|
|
9108
|
+
if (super(void 0, n), this.SERVER_COMMAND_RESPONSE_TYPE = Us.CursorResponse, this.options = { ...n }, delete this.options.writeConcern, this.ns = t, typeof r != "object" || Array.isArray(r))
|
|
9109
9109
|
throw new gd.MongoInvalidArgumentError("Query filter must be a plain object or ObjectId");
|
|
9110
|
-
this.filter = r != null && r._bsontype === "ObjectId" ? { _id: r } : r, this.SERVER_COMMAND_RESPONSE_TYPE = this.explain ?
|
|
9110
|
+
this.filter = r != null && r._bsontype === "ObjectId" ? { _id: r } : r, this.SERVER_COMMAND_RESPONSE_TYPE = this.explain ? Us.ExplainedCursorResponse : Us.CursorResponse;
|
|
9111
9111
|
}
|
|
9112
9112
|
get commandName() {
|
|
9113
9113
|
return "find";
|
|
@@ -9128,7 +9128,7 @@ class I0 extends Cd.CommandOperation {
|
|
|
9128
9128
|
return Sd(this.ns, this.filter, this.options);
|
|
9129
9129
|
}
|
|
9130
9130
|
}
|
|
9131
|
-
|
|
9131
|
+
Co.FindOperation = I0;
|
|
9132
9132
|
function Sd(e, t, r) {
|
|
9133
9133
|
const n = {
|
|
9134
9134
|
find: e.collection,
|
|
@@ -9149,7 +9149,7 @@ function Sd(e, t, r) {
|
|
|
9149
9149
|
]);
|
|
9150
9150
|
Object.defineProperty(Lr, "__esModule", { value: !0 });
|
|
9151
9151
|
Lr.FindCursor = Lr.FLAGS = void 0;
|
|
9152
|
-
const yd = De(), pt = Q, fa = oi, Od = di,
|
|
9152
|
+
const yd = De(), pt = Q, fa = oi, Od = di, js = qe, ma = Co, xs = Gr, Ii = ne(), wd = Sn;
|
|
9153
9153
|
Lr.FLAGS = [
|
|
9154
9154
|
"tailable",
|
|
9155
9155
|
"oplogReplay",
|
|
@@ -9161,7 +9161,7 @@ Lr.FLAGS = [
|
|
|
9161
9161
|
class q1 extends wd.ExplainableCursor {
|
|
9162
9162
|
/** @internal */
|
|
9163
9163
|
constructor(t, r, n = {}, i = {}) {
|
|
9164
|
-
super(t, r, i), this.numReturned = 0, this.cursorFilter = n, this.findOptions = i, i.sort != null && (this.findOptions.sort = (0,
|
|
9164
|
+
super(t, r, i), this.numReturned = 0, this.cursorFilter = n, this.findOptions = i, i.sort != null && (this.findOptions.sort = (0, xs.formatSort)(i.sort));
|
|
9165
9165
|
}
|
|
9166
9166
|
clone() {
|
|
9167
9167
|
const t = (0, Ii.mergeOptions)({}, this.findOptions);
|
|
@@ -9187,7 +9187,7 @@ class q1 extends wd.ExplainableCursor {
|
|
|
9187
9187
|
} catch {
|
|
9188
9188
|
throw new pt.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in findOptions");
|
|
9189
9189
|
}
|
|
9190
|
-
const n = new ma.FindOperation(this.namespace, this.cursorFilter, r), i = await (0,
|
|
9190
|
+
const n = new ma.FindOperation(this.namespace, this.cursorFilter, r), i = await (0, js.executeOperation)(this.client, n, this.timeoutContext);
|
|
9191
9191
|
return this.numReturned = i.batchSize, { server: n.server, session: t, response: i };
|
|
9192
9192
|
}
|
|
9193
9193
|
/** @internal */
|
|
@@ -9221,7 +9221,7 @@ class q1 extends wd.ExplainableCursor {
|
|
|
9221
9221
|
async count(t) {
|
|
9222
9222
|
if ((0, Ii.emitWarningOnce)("cursor.count is deprecated and will be removed in the next major version, please use `collection.estimatedDocumentCount` or `collection.countDocuments` instead "), typeof t == "boolean")
|
|
9223
9223
|
throw new pt.MongoInvalidArgumentError("Invalid first parameter to count");
|
|
9224
|
-
return await (0,
|
|
9224
|
+
return await (0, js.executeOperation)(this.client, new Od.CountOperation(this.namespace, this.cursorFilter, {
|
|
9225
9225
|
...this.findOptions,
|
|
9226
9226
|
// NOTE: order matters here, we may need to refine this
|
|
9227
9227
|
...this.cursorOptions,
|
|
@@ -9230,7 +9230,7 @@ class q1 extends wd.ExplainableCursor {
|
|
|
9230
9230
|
}
|
|
9231
9231
|
async explain(t, r) {
|
|
9232
9232
|
const { explain: n, timeout: i } = this.resolveExplainTimeoutOptions(t, r);
|
|
9233
|
-
return (await (0,
|
|
9233
|
+
return (await (0, js.executeOperation)(this.client, new ma.FindOperation(this.namespace, this.cursorFilter, {
|
|
9234
9234
|
...this.findOptions,
|
|
9235
9235
|
// NOTE: order matters here, we may need to refine this
|
|
9236
9236
|
...this.cursorOptions,
|
|
@@ -9313,7 +9313,7 @@ class q1 extends wd.ExplainableCursor {
|
|
|
9313
9313
|
this.findOptions.min = r;
|
|
9314
9314
|
break;
|
|
9315
9315
|
case "orderby":
|
|
9316
|
-
this.findOptions.sort = (0,
|
|
9316
|
+
this.findOptions.sort = (0, xs.formatSort)(r);
|
|
9317
9317
|
break;
|
|
9318
9318
|
case "query":
|
|
9319
9319
|
this.cursorFilter = r;
|
|
@@ -9409,7 +9409,7 @@ class q1 extends wd.ExplainableCursor {
|
|
|
9409
9409
|
sort(t, r) {
|
|
9410
9410
|
if (this.throwIfInitialized(), this.findOptions.tailable)
|
|
9411
9411
|
throw new pt.MongoTailableCursorError("Tailable cursor does not support sorting");
|
|
9412
|
-
return this.findOptions.sort = (0,
|
|
9412
|
+
return this.findOptions.sort = (0, xs.formatSort)(t, r), this;
|
|
9413
9413
|
}
|
|
9414
9414
|
/**
|
|
9415
9415
|
* Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)
|
|
@@ -9609,9 +9609,9 @@ class X1 extends Nd.AbstractCursor {
|
|
|
9609
9609
|
}
|
|
9610
9610
|
}
|
|
9611
9611
|
fi.ListIndexesCursor = X1;
|
|
9612
|
-
var
|
|
9613
|
-
Object.defineProperty(
|
|
9614
|
-
|
|
9612
|
+
var So = {};
|
|
9613
|
+
Object.defineProperty(So, "__esModule", { value: !0 });
|
|
9614
|
+
So.ListSearchIndexesCursor = void 0;
|
|
9615
9615
|
const Id = qr;
|
|
9616
9616
|
class vd extends Id.AggregationCursor {
|
|
9617
9617
|
/** @internal */
|
|
@@ -9620,10 +9620,10 @@ class vd extends Id.AggregationCursor {
|
|
|
9620
9620
|
super(r, t, o, i);
|
|
9621
9621
|
}
|
|
9622
9622
|
}
|
|
9623
|
-
|
|
9624
|
-
var
|
|
9625
|
-
Object.defineProperty(
|
|
9626
|
-
|
|
9623
|
+
So.ListSearchIndexesCursor = vd;
|
|
9624
|
+
var yo = {};
|
|
9625
|
+
Object.defineProperty(yo, "__esModule", { value: !0 });
|
|
9626
|
+
yo.DistinctOperation = void 0;
|
|
9627
9627
|
const Pd = De(), Ld = Ie, Tn = Me;
|
|
9628
9628
|
class L0 extends Ld.CommandOperation {
|
|
9629
9629
|
/**
|
|
@@ -9652,16 +9652,16 @@ class L0 extends Ld.CommandOperation {
|
|
|
9652
9652
|
return this.explain ? t.toObject(this.bsonOptions) : t.toObject(this.bsonOptions).values;
|
|
9653
9653
|
}
|
|
9654
9654
|
}
|
|
9655
|
-
|
|
9655
|
+
yo.DistinctOperation = L0;
|
|
9656
9656
|
(0, Tn.defineAspects)(L0, [
|
|
9657
9657
|
Tn.Aspect.READ_OPERATION,
|
|
9658
9658
|
Tn.Aspect.RETRYABLE,
|
|
9659
9659
|
Tn.Aspect.EXPLAINABLE,
|
|
9660
9660
|
Tn.Aspect.SUPPORTS_RAW_DATA
|
|
9661
9661
|
]);
|
|
9662
|
-
var
|
|
9663
|
-
Object.defineProperty(
|
|
9664
|
-
|
|
9662
|
+
var Oo = {};
|
|
9663
|
+
Object.defineProperty(Oo, "__esModule", { value: !0 });
|
|
9664
|
+
Oo.EstimatedDocumentCountOperation = void 0;
|
|
9665
9665
|
const kd = De(), Ud = Ie, Bn = Me;
|
|
9666
9666
|
class k0 extends Ud.CommandOperation {
|
|
9667
9667
|
constructor(t, r = {}) {
|
|
@@ -9678,7 +9678,7 @@ class k0 extends Ud.CommandOperation {
|
|
|
9678
9678
|
return t.getNumber("n") ?? 0;
|
|
9679
9679
|
}
|
|
9680
9680
|
}
|
|
9681
|
-
|
|
9681
|
+
Oo.EstimatedDocumentCountOperation = k0;
|
|
9682
9682
|
(0, Bn.defineAspects)(k0, [
|
|
9683
9683
|
Bn.Aspect.READ_OPERATION,
|
|
9684
9684
|
Bn.Aspect.RETRYABLE,
|
|
@@ -9803,9 +9803,9 @@ function U0() {
|
|
|
9803
9803
|
}
|
|
9804
9804
|
return bn.RenameOperation = o, (0, i.defineAspects)(o, [i.Aspect.WRITE_OPERATION]), bn;
|
|
9805
9805
|
}
|
|
9806
|
-
var
|
|
9807
|
-
Object.defineProperty(
|
|
9808
|
-
|
|
9806
|
+
var wo = {};
|
|
9807
|
+
Object.defineProperty(wo, "__esModule", { value: !0 });
|
|
9808
|
+
wo.CreateSearchIndexesOperation = void 0;
|
|
9809
9809
|
const jd = De(), xd = Me;
|
|
9810
9810
|
class zd extends xd.AbstractOperation {
|
|
9811
9811
|
constructor(t, r) {
|
|
@@ -9827,10 +9827,10 @@ class zd extends xd.AbstractOperation {
|
|
|
9827
9827
|
return { session: this.session, timeoutContext: t };
|
|
9828
9828
|
}
|
|
9829
9829
|
}
|
|
9830
|
-
|
|
9831
|
-
var
|
|
9832
|
-
Object.defineProperty(
|
|
9833
|
-
|
|
9830
|
+
wo.CreateSearchIndexesOperation = zd;
|
|
9831
|
+
var _o = {};
|
|
9832
|
+
Object.defineProperty(_o, "__esModule", { value: !0 });
|
|
9833
|
+
_o.DropSearchIndexOperation = void 0;
|
|
9834
9834
|
const Vd = De(), ga = Q, Wd = Me;
|
|
9835
9835
|
class Gd extends Wd.AbstractOperation {
|
|
9836
9836
|
constructor(t, r) {
|
|
@@ -9855,10 +9855,10 @@ class Gd extends Wd.AbstractOperation {
|
|
|
9855
9855
|
throw t;
|
|
9856
9856
|
}
|
|
9857
9857
|
}
|
|
9858
|
-
|
|
9859
|
-
var
|
|
9860
|
-
Object.defineProperty(
|
|
9861
|
-
|
|
9858
|
+
_o.DropSearchIndexOperation = Gd;
|
|
9859
|
+
var Do = {};
|
|
9860
|
+
Object.defineProperty(Do, "__esModule", { value: !0 });
|
|
9861
|
+
Do.UpdateSearchIndexOperation = void 0;
|
|
9862
9862
|
const qd = De(), Hd = Me;
|
|
9863
9863
|
class Kd extends Hd.AbstractOperation {
|
|
9864
9864
|
constructor(t, r, n) {
|
|
@@ -9880,12 +9880,12 @@ class Kd extends Hd.AbstractOperation {
|
|
|
9880
9880
|
return { session: this.session, timeoutContext: t };
|
|
9881
9881
|
}
|
|
9882
9882
|
}
|
|
9883
|
-
|
|
9883
|
+
Do.UpdateSearchIndexOperation = Kd;
|
|
9884
9884
|
var Aa;
|
|
9885
9885
|
function mi() {
|
|
9886
9886
|
if (Aa) return Dn;
|
|
9887
9887
|
Aa = 1, Object.defineProperty(Dn, "__esModule", { value: !0 }), Dn.Collection = void 0;
|
|
9888
|
-
const e = pe, t = ui, r = ci, n = wi(), i = qr, o = Lr, u = fi, c =
|
|
9888
|
+
const e = pe, t = ui, r = ci, n = wi(), i = qr, o = Lr, u = fi, c = So, s = Q, a = di, E = Wt, h = yo, g = Oo, m = qe, C = J1, S = Nt, D = Pr, O = U0(), M = wo, p = _o, B = Do, d = _t, b = Pt, f = Ke, l = ne(), w = ct();
|
|
9889
9889
|
class T {
|
|
9890
9890
|
/**
|
|
9891
9891
|
* Create a new Collection instance
|
|
@@ -10563,13 +10563,13 @@ function j0() {
|
|
|
10563
10563
|
}
|
|
10564
10564
|
return Mn.ChangeStreamCursor = u, Mn;
|
|
10565
10565
|
}
|
|
10566
|
-
var Fn = {}, Ei = {},
|
|
10567
|
-
Object.defineProperty(
|
|
10568
|
-
|
|
10569
|
-
const
|
|
10566
|
+
var Fn = {}, Ei = {}, To = {};
|
|
10567
|
+
Object.defineProperty(To, "__esModule", { value: !0 });
|
|
10568
|
+
To.ListCollectionsOperation = void 0;
|
|
10569
|
+
const zs = De(), Yd = ne(), Xd = Ie, Rn = Me;
|
|
10570
10570
|
class x0 extends Xd.CommandOperation {
|
|
10571
10571
|
constructor(t, r, n) {
|
|
10572
|
-
super(t, n), this.SERVER_COMMAND_RESPONSE_TYPE =
|
|
10572
|
+
super(t, n), this.SERVER_COMMAND_RESPONSE_TYPE = zs.CursorResponse, this.options = { ...n }, delete this.options.writeConcern, this.db = t, this.filter = r, this.nameOnly = !!this.options.nameOnly, this.authorizedCollections = !!this.options.authorizedCollections, typeof this.options.batchSize == "number" && (this.batchSize = this.options.batchSize), this.SERVER_COMMAND_RESPONSE_TYPE = this.explain ? zs.ExplainedCursorResponse : zs.CursorResponse;
|
|
10573
10573
|
}
|
|
10574
10574
|
get commandName() {
|
|
10575
10575
|
return "listCollections";
|
|
@@ -10588,7 +10588,7 @@ class x0 extends Xd.CommandOperation {
|
|
|
10588
10588
|
return t;
|
|
10589
10589
|
}
|
|
10590
10590
|
}
|
|
10591
|
-
|
|
10591
|
+
To.ListCollectionsOperation = x0;
|
|
10592
10592
|
(0, Rn.defineAspects)(x0, [
|
|
10593
10593
|
Rn.Aspect.READ_OPERATION,
|
|
10594
10594
|
Rn.Aspect.RETRYABLE,
|
|
@@ -10597,7 +10597,7 @@ Bo.ListCollectionsOperation = x0;
|
|
|
10597
10597
|
]);
|
|
10598
10598
|
Object.defineProperty(Ei, "__esModule", { value: !0 });
|
|
10599
10599
|
Ei.ListCollectionsCursor = void 0;
|
|
10600
|
-
const Jd = qe, Qd =
|
|
10600
|
+
const Jd = qe, Qd = To, Zd = tt;
|
|
10601
10601
|
class Q1 extends Zd.AbstractCursor {
|
|
10602
10602
|
constructor(t, r, n) {
|
|
10603
10603
|
super(t.client, t.s.namespace, n), this.parent = t, this.filter = r, this.options = n;
|
|
@@ -10620,9 +10620,9 @@ class Q1 extends Zd.AbstractCursor {
|
|
|
10620
10620
|
}
|
|
10621
10621
|
}
|
|
10622
10622
|
Ei.ListCollectionsCursor = Q1;
|
|
10623
|
-
var
|
|
10624
|
-
Object.defineProperty(
|
|
10625
|
-
|
|
10623
|
+
var Bo = {};
|
|
10624
|
+
Object.defineProperty(Bo, "__esModule", { value: !0 });
|
|
10625
|
+
Bo.RunCommandCursor = void 0;
|
|
10626
10626
|
const $r = Q, Ca = qe, $d = li, ef = er, tf = ne(), rf = tt;
|
|
10627
10627
|
class nf extends rf.AbstractCursor {
|
|
10628
10628
|
/**
|
|
@@ -10697,7 +10697,7 @@ class nf extends rf.AbstractCursor {
|
|
|
10697
10697
|
return await (0, Ca.executeOperation)(this.client, t, this.timeoutContext);
|
|
10698
10698
|
}
|
|
10699
10699
|
}
|
|
10700
|
-
|
|
10700
|
+
Bo.RunCommandCursor = nf;
|
|
10701
10701
|
var en = {}, Sa;
|
|
10702
10702
|
function of() {
|
|
10703
10703
|
if (Sa) return en;
|
|
@@ -10786,7 +10786,7 @@ var sr = {}, ya;
|
|
|
10786
10786
|
function sf() {
|
|
10787
10787
|
if (ya) return sr;
|
|
10788
10788
|
ya = 1, Object.defineProperty(sr, "__esModule", { value: !0 }), sr.DropDatabaseOperation = sr.DropCollectionOperation = void 0, sr.dropCollections = a;
|
|
10789
|
-
const e =
|
|
10789
|
+
const e = ts(), t = De(), r = tt, n = Q, i = Te, o = Ie, u = qe, c = Me;
|
|
10790
10790
|
class s extends o.CommandOperation {
|
|
10791
10791
|
constructor(g, m, C = {}) {
|
|
10792
10792
|
super(g, C), this.SERVER_COMMAND_RESPONSE_TYPE = t.MongoDBResponse, this.options = C, this.name = m;
|
|
@@ -10849,9 +10849,9 @@ function sf() {
|
|
|
10849
10849
|
}
|
|
10850
10850
|
return sr.DropDatabaseOperation = E, (0, c.defineAspects)(s, [c.Aspect.WRITE_OPERATION]), (0, c.defineAspects)(E, [c.Aspect.WRITE_OPERATION]), sr;
|
|
10851
10851
|
}
|
|
10852
|
-
var
|
|
10853
|
-
Object.defineProperty(
|
|
10854
|
-
|
|
10852
|
+
var bo = {};
|
|
10853
|
+
Object.defineProperty(bo, "__esModule", { value: !0 });
|
|
10854
|
+
bo.ProfilingLevelOperation = void 0;
|
|
10855
10855
|
const uf = pe, af = De(), Oa = Q, cf = Ie;
|
|
10856
10856
|
class lf extends af.MongoDBResponse {
|
|
10857
10857
|
get was() {
|
|
@@ -10882,7 +10882,7 @@ class hf extends cf.CommandOperation {
|
|
|
10882
10882
|
throw new Oa.MongoUnexpectedServerResponseError("Error with profile command");
|
|
10883
10883
|
}
|
|
10884
10884
|
}
|
|
10885
|
-
|
|
10885
|
+
bo.ProfilingLevelOperation = hf;
|
|
10886
10886
|
var Z1 = {};
|
|
10887
10887
|
(function(e) {
|
|
10888
10888
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.SetProfilingLevelOperation = e.ProfilingLevel = void 0;
|
|
@@ -10925,9 +10925,9 @@ var Z1 = {};
|
|
|
10925
10925
|
}
|
|
10926
10926
|
e.SetProfilingLevelOperation = u;
|
|
10927
10927
|
})(Z1);
|
|
10928
|
-
var
|
|
10929
|
-
Object.defineProperty(
|
|
10930
|
-
|
|
10928
|
+
var Mo = {};
|
|
10929
|
+
Object.defineProperty(Mo, "__esModule", { value: !0 });
|
|
10930
|
+
Mo.DbStatsOperation = void 0;
|
|
10931
10931
|
const df = De(), ff = Ie, wa = Me;
|
|
10932
10932
|
class z0 extends ff.CommandOperation {
|
|
10933
10933
|
constructor(t, r) {
|
|
@@ -10941,13 +10941,13 @@ class z0 extends ff.CommandOperation {
|
|
|
10941
10941
|
return this.options.scale != null && (r.scale = this.options.scale), r;
|
|
10942
10942
|
}
|
|
10943
10943
|
}
|
|
10944
|
-
|
|
10944
|
+
Mo.DbStatsOperation = z0;
|
|
10945
10945
|
(0, wa.defineAspects)(z0, [wa.Aspect.READ_OPERATION]);
|
|
10946
10946
|
var _a;
|
|
10947
10947
|
function $1() {
|
|
10948
10948
|
if (_a) return Fn;
|
|
10949
10949
|
_a = 1, Object.defineProperty(Fn, "__esModule", { value: !0 }), Fn.Db = void 0;
|
|
10950
|
-
const e = ei, t = pe, r = wi(), n = mi(), i = Ve, o = qr, u = Ei, c =
|
|
10950
|
+
const e = ei, t = pe, r = wi(), n = mi(), i = Ve, o = qr, u = Ei, c = Bo, s = Q, a = of(), E = sf(), h = qe, g = Nt, m = bo, C = si, S = U0(), D = er, O = Z1, M = Mo, p = Pt, B = Ke, d = ne(), b = ct(), f = [
|
|
10951
10951
|
"writeConcern",
|
|
10952
10952
|
"readPreference",
|
|
10953
10953
|
"readPreferenceTags",
|
|
@@ -11290,7 +11290,7 @@ function $1() {
|
|
|
11290
11290
|
let l = w;
|
|
11291
11291
|
return Fn.Db = l, Fn;
|
|
11292
11292
|
}
|
|
11293
|
-
var wr = {},
|
|
11293
|
+
var wr = {}, Fo = {}, Ro = {}, Qe = {};
|
|
11294
11294
|
const mf = {}, Ef = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11295
11295
|
__proto__: null,
|
|
11296
11296
|
default: mf
|
|
@@ -11322,7 +11322,7 @@ Qe.getSnappy = jf;
|
|
|
11322
11322
|
Qe.getSocks = xf;
|
|
11323
11323
|
Qe.getMongoDBClientEncryption = zf;
|
|
11324
11324
|
const Hr = Q;
|
|
11325
|
-
function
|
|
11325
|
+
function No(e) {
|
|
11326
11326
|
const t = e ? { kModuleError: e } : {};
|
|
11327
11327
|
return new Proxy(t, {
|
|
11328
11328
|
get: (r, n) => {
|
|
@@ -11340,7 +11340,7 @@ function Pf() {
|
|
|
11340
11340
|
try {
|
|
11341
11341
|
e = gf;
|
|
11342
11342
|
} catch (t) {
|
|
11343
|
-
e =
|
|
11343
|
+
e = No(new Hr.MongoMissingDependencyError("Optional module `kerberos` not found. Please install it to enable kerberos authentication", { cause: t, dependencyName: "kerberos" }));
|
|
11344
11344
|
}
|
|
11345
11345
|
return e;
|
|
11346
11346
|
}
|
|
@@ -11349,7 +11349,7 @@ function Lf() {
|
|
|
11349
11349
|
try {
|
|
11350
11350
|
e = Cf;
|
|
11351
11351
|
} catch (t) {
|
|
11352
|
-
e =
|
|
11352
|
+
e = No(new Hr.MongoMissingDependencyError("Optional module `@mongodb-js/zstd` not found. Please install it to enable zstd compression", { cause: t, dependencyName: "zstd" }));
|
|
11353
11353
|
}
|
|
11354
11354
|
return e;
|
|
11355
11355
|
}
|
|
@@ -11357,14 +11357,14 @@ function kf() {
|
|
|
11357
11357
|
try {
|
|
11358
11358
|
return Of;
|
|
11359
11359
|
} catch (e) {
|
|
11360
|
-
return
|
|
11360
|
+
return No(new Hr.MongoMissingDependencyError("Optional module `@aws-sdk/credential-providers` not found. Please install it to enable getting aws credentials via the official sdk.", { cause: e, dependencyName: "@aws-sdk/credential-providers" }));
|
|
11361
11361
|
}
|
|
11362
11362
|
}
|
|
11363
11363
|
function Uf() {
|
|
11364
11364
|
try {
|
|
11365
11365
|
return Df;
|
|
11366
11366
|
} catch (e) {
|
|
11367
|
-
return
|
|
11367
|
+
return No(new Hr.MongoMissingDependencyError("Optional module `gcp-metadata` not found. Please install it to enable getting gcp credentials via the official sdk.", { cause: e, dependencyName: "gcp-metadata" }));
|
|
11368
11368
|
}
|
|
11369
11369
|
}
|
|
11370
11370
|
function jf() {
|
|
@@ -11519,7 +11519,7 @@ Dt.AuthProvider = Gf;
|
|
|
11519
11519
|
function O() {
|
|
11520
11520
|
s || (s = (0, n.getKerberos)());
|
|
11521
11521
|
}
|
|
11522
|
-
})(
|
|
11522
|
+
})(Ro);
|
|
11523
11523
|
var qt = {};
|
|
11524
11524
|
(function(e) {
|
|
11525
11525
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.AUTH_MECHS_AUTH_SRC_EXTERNAL = e.AuthMechanism = void 0, e.AuthMechanism = Object.freeze({
|
|
@@ -11540,7 +11540,7 @@ var qt = {};
|
|
|
11540
11540
|
})(qt);
|
|
11541
11541
|
(function(e) {
|
|
11542
11542
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MongoCredentials = e.DEFAULT_ALLOWED_HOSTS = void 0;
|
|
11543
|
-
const t = Q, r =
|
|
11543
|
+
const t = Q, r = Ro, n = qt;
|
|
11544
11544
|
function i(a) {
|
|
11545
11545
|
return a && Array.isArray(a.saslSupportedMechs) ? a.saslSupportedMechs.includes(n.AuthMechanism.MONGODB_SCRAM_SHA256) ? n.AuthMechanism.MONGODB_SCRAM_SHA256 : n.AuthMechanism.MONGODB_SCRAM_SHA1 : n.AuthMechanism.MONGODB_SCRAM_SHA256;
|
|
11546
11546
|
}
|
|
@@ -11636,7 +11636,7 @@ var qt = {};
|
|
|
11636
11636
|
}
|
|
11637
11637
|
}
|
|
11638
11638
|
e.MongoCredentials = s;
|
|
11639
|
-
})(
|
|
11639
|
+
})(Fo);
|
|
11640
11640
|
var Sr = {};
|
|
11641
11641
|
const qf = "7.1.0", Hf = {
|
|
11642
11642
|
version: qf
|
|
@@ -11730,7 +11730,7 @@ function $f() {
|
|
|
11730
11730
|
const e = Ir.NumberUtils.isBigEndian ? "BE" : "LE";
|
|
11731
11731
|
return "Deno" in globalThis ? `Deno v${typeof ((t = Deno == null ? void 0 : Deno.version) == null ? void 0 : t.deno) == "string" ? (r = Deno == null ? void 0 : Deno.version) == null ? void 0 : r.deno : "0.0.0-unknown"}, ${e}` : "Bun" in globalThis ? `Bun v${typeof (Bun == null ? void 0 : Bun.version) == "string" ? Bun == null ? void 0 : Bun.version : "0.0.0-unknown"}, ${e}` : `Node.js ${eu.version}, ${e}`;
|
|
11732
11732
|
}
|
|
11733
|
-
var
|
|
11733
|
+
var Vs = {}, Ws = {}, rt = {}, ru = {}, W0 = {}, Io = {};
|
|
11734
11734
|
(function(e) {
|
|
11735
11735
|
function t(O, M, p) {
|
|
11736
11736
|
return p.globals && (O = p.globals[O.name]), new O(`${p.context ? p.context : "Value"} ${M}.`);
|
|
@@ -11947,7 +11947,7 @@ var Ws = {}, Gs = {}, rt = {}, ru = {}, W0 = {}, vo = {};
|
|
|
11947
11947
|
throw t(TypeError, "is a detached ArrayBuffer", M);
|
|
11948
11948
|
return O;
|
|
11949
11949
|
}, e.DOMTimeStamp = e["unsigned long long"];
|
|
11950
|
-
})(
|
|
11950
|
+
})(Io);
|
|
11951
11951
|
var G0 = { exports: {} };
|
|
11952
11952
|
(function(e, t) {
|
|
11953
11953
|
function r(x) {
|
|
@@ -12074,12 +12074,12 @@ var G0 = { exports: {} };
|
|
|
12074
12074
|
iteratorResult: d
|
|
12075
12075
|
};
|
|
12076
12076
|
})(G0);
|
|
12077
|
-
var nu = G0.exports,
|
|
12077
|
+
var nu = G0.exports, Gs = {}, q0 = { exports: {} };
|
|
12078
12078
|
const fn = 2147483647, zt = 36, iu = 1, Qn = 26, e3 = 38, t3 = 700, H0 = 72, K0 = 128, Y0 = "-", r3 = /^xn--/, n3 = /[^\0-\x7F]/, i3 = /[\x2E\u3002\uFF0E\uFF61]/g, o3 = {
|
|
12079
12079
|
overflow: "Overflow: input needs wider integers to process",
|
|
12080
12080
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
12081
12081
|
"invalid-input": "Invalid input"
|
|
12082
|
-
},
|
|
12082
|
+
}, qs = zt - iu, Vt = Math.floor, Hs = String.fromCharCode;
|
|
12083
12083
|
function ar(e) {
|
|
12084
12084
|
throw new RangeError(o3[e]);
|
|
12085
12085
|
}
|
|
@@ -12117,9 +12117,9 @@ const J0 = (e) => String.fromCodePoint(...e), u3 = function(e) {
|
|
|
12117
12117
|
return e + 22 + 75 * (e < 26) - ((t != 0) << 5);
|
|
12118
12118
|
}, Q0 = function(e, t, r) {
|
|
12119
12119
|
let n = 0;
|
|
12120
|
-
for (e = r ? Vt(e / t3) : e >> 1, e += Vt(e / t); e >
|
|
12121
|
-
e = Vt(e /
|
|
12122
|
-
return Vt(n + (
|
|
12120
|
+
for (e = r ? Vt(e / t3) : e >> 1, e += Vt(e / t); e > qs * Qn >> 1; n += zt)
|
|
12121
|
+
e = Vt(e / qs);
|
|
12122
|
+
return Vt(n + (qs + 1) * e / (e + e3));
|
|
12123
12123
|
}, su = function(e) {
|
|
12124
12124
|
const t = [], r = e.length;
|
|
12125
12125
|
let n = 0, i = K0, o = H0, u = e.lastIndexOf(Y0);
|
|
@@ -12148,7 +12148,7 @@ const J0 = (e) => String.fromCodePoint(...e), u3 = function(e) {
|
|
|
12148
12148
|
const r = e.length;
|
|
12149
12149
|
let n = K0, i = 0, o = H0;
|
|
12150
12150
|
for (const s of e)
|
|
12151
|
-
s < 128 && t.push(
|
|
12151
|
+
s < 128 && t.push(Hs(s));
|
|
12152
12152
|
const u = t.length;
|
|
12153
12153
|
let c = u;
|
|
12154
12154
|
for (u && t.push(Y0); c < r; ) {
|
|
@@ -12166,10 +12166,10 @@ const J0 = (e) => String.fromCodePoint(...e), u3 = function(e) {
|
|
|
12166
12166
|
break;
|
|
12167
12167
|
const C = h - m, S = zt - m;
|
|
12168
12168
|
t.push(
|
|
12169
|
-
|
|
12169
|
+
Hs(Ba(m + C % S, 0))
|
|
12170
12170
|
), h = Vt(C / S);
|
|
12171
12171
|
}
|
|
12172
|
-
t.push(
|
|
12172
|
+
t.push(Hs(Ba(h, 0))), o = Q0(i, a, c === u), i = 0, ++c;
|
|
12173
12173
|
}
|
|
12174
12174
|
++i, ++n;
|
|
12175
12175
|
}
|
|
@@ -61629,9 +61629,9 @@ var fu = {
|
|
|
61629
61629
|
return P === void 0 && (P = {}), e.exports.basicURLParse(k, { baseURL: P.baseURL, encodingOverride: P.encodingOverride });
|
|
61630
61630
|
};
|
|
61631
61631
|
})(q0);
|
|
61632
|
-
var ll = q0.exports,
|
|
61632
|
+
var ll = q0.exports, Ks, Fa;
|
|
61633
61633
|
function hl() {
|
|
61634
|
-
if (Fa) return
|
|
61634
|
+
if (Fa) return Ks;
|
|
61635
61635
|
Fa = 1;
|
|
61636
61636
|
const { utf8Encode: e, utf8DecodeWithoutBOM: t } = lu, { percentDecodeBytes: r, utf8PercentEncodeString: n, isURLEncodedPercentEncode: i } = fu;
|
|
61637
61637
|
function o(h) {
|
|
@@ -61674,13 +61674,13 @@ function hl() {
|
|
|
61674
61674
|
h[C] = m, C = h.indexOf(g, C + 1);
|
|
61675
61675
|
return h;
|
|
61676
61676
|
}
|
|
61677
|
-
return
|
|
61677
|
+
return Ks = {
|
|
61678
61678
|
parseUrlencodedString: c,
|
|
61679
61679
|
serializeUrlencoded: s
|
|
61680
|
-
},
|
|
61680
|
+
}, Ks;
|
|
61681
61681
|
}
|
|
61682
61682
|
var mu = {}, dl = {};
|
|
61683
|
-
const Ra =
|
|
61683
|
+
const Ra = Io, Pi = nu;
|
|
61684
61684
|
dl.convert = (e, t, { context: r = "The provided value" } = {}) => {
|
|
61685
61685
|
if (typeof t != "function")
|
|
61686
61686
|
throw new e.TypeError(r + " is not a function");
|
|
@@ -61698,12 +61698,12 @@ dl.convert = (e, t, { context: r = "The provided value" } = {}) => {
|
|
|
61698
61698
|
return o = Ra.any(o, { context: r, globals: e }), o;
|
|
61699
61699
|
}, n[Pi.wrapperSymbol] = t, n.objectReference = t, n;
|
|
61700
61700
|
};
|
|
61701
|
-
var
|
|
61701
|
+
var Ys = {}, Na;
|
|
61702
61702
|
function Q3() {
|
|
61703
|
-
if (Na) return
|
|
61703
|
+
if (Na) return Ys;
|
|
61704
61704
|
Na = 1;
|
|
61705
61705
|
const e = hl();
|
|
61706
|
-
return
|
|
61706
|
+
return Ys.implementation = class {
|
|
61707
61707
|
constructor(r, n, { doNotStripQMark: i = !1 }) {
|
|
61708
61708
|
let o = n[0];
|
|
61709
61709
|
if (this._list = [], this._url = null, !i && typeof o == "string" && o[0] === "?" && (o = o.slice(1)), Array.isArray(o))
|
|
@@ -61771,10 +61771,10 @@ function Q3() {
|
|
|
61771
61771
|
toString() {
|
|
61772
61772
|
return e.serializeUrlencoded(this._list);
|
|
61773
61773
|
}
|
|
61774
|
-
},
|
|
61774
|
+
}, Ys;
|
|
61775
61775
|
}
|
|
61776
61776
|
(function(e) {
|
|
61777
|
-
const t =
|
|
61777
|
+
const t = Io, r = nu, n = dl, i = r.newObjectInRealm, o = r.implSymbol, u = r.ctorRegistrySymbol, c = "URLSearchParams";
|
|
61778
61778
|
e.is = (h) => r.isObject(h) && r.hasOwn(h, o) && h[o] instanceof E.implementation, e.isImpl = (h) => r.isObject(h) && h instanceof E.implementation, e.convert = (h, g, { context: m = "The provided value" } = {}) => {
|
|
61779
61779
|
if (e.is(g))
|
|
61780
61780
|
return r.implForWrapper(g);
|
|
@@ -62120,10 +62120,10 @@ function Q3() {
|
|
|
62120
62120
|
})(mu);
|
|
62121
62121
|
var Ia;
|
|
62122
62122
|
function Z3() {
|
|
62123
|
-
if (Ia) return
|
|
62123
|
+
if (Ia) return Gs;
|
|
62124
62124
|
Ia = 1;
|
|
62125
62125
|
const e = ll, t = hl(), r = mu;
|
|
62126
|
-
return
|
|
62126
|
+
return Gs.implementation = class fl {
|
|
62127
62127
|
// Unlike the spec, we duplicate some code between the constructor and canParse, because we want to give useful error
|
|
62128
62128
|
// messages in the constructor that distinguish between the different causes of failure.
|
|
62129
62129
|
constructor(i, [o, u]) {
|
|
@@ -62233,10 +62233,10 @@ function Z3() {
|
|
|
62233
62233
|
toJSON() {
|
|
62234
62234
|
return this.href;
|
|
62235
62235
|
}
|
|
62236
|
-
},
|
|
62236
|
+
}, Gs;
|
|
62237
62237
|
}
|
|
62238
62238
|
(function(e) {
|
|
62239
|
-
const t =
|
|
62239
|
+
const t = Io, r = nu, n = r.implSymbol, i = r.ctorRegistrySymbol, o = "URL";
|
|
62240
62240
|
e.is = (a) => r.isObject(a) && r.hasOwn(a, n) && a[n] instanceof s.implementation, e.isImpl = (a) => r.isObject(a) && a instanceof s.implementation, e.convert = (a, E, { context: h = "The provided value" } = {}) => {
|
|
62241
62241
|
if (e.is(E))
|
|
62242
62242
|
return r.implForWrapper(E);
|
|
@@ -62541,11 +62541,11 @@ function Z3() {
|
|
|
62541
62541
|
const $3 = W0, e6 = mu;
|
|
62542
62542
|
ru.URL = $3;
|
|
62543
62543
|
ru.URLSearchParams = e6;
|
|
62544
|
-
const { URL: t6, URLSearchParams: r6 } = ru, Lt = ll, ml = fu,
|
|
62545
|
-
t6.install(
|
|
62546
|
-
r6.install(
|
|
62547
|
-
rt.URL =
|
|
62548
|
-
rt.URLSearchParams =
|
|
62544
|
+
const { URL: t6, URLSearchParams: r6 } = ru, Lt = ll, ml = fu, vo = { Array, Object, Promise, String, TypeError };
|
|
62545
|
+
t6.install(vo, ["Window"]);
|
|
62546
|
+
r6.install(vo, ["Window"]);
|
|
62547
|
+
rt.URL = vo.URL;
|
|
62548
|
+
rt.URLSearchParams = vo.URLSearchParams;
|
|
62549
62549
|
rt.parseURL = Lt.parseURL;
|
|
62550
62550
|
rt.basicURLParse = Lt.basicURLParse;
|
|
62551
62551
|
rt.serializeURL = Lt.serializeURL;
|
|
@@ -62828,13 +62828,13 @@ function El() {
|
|
|
62828
62828
|
}
|
|
62829
62829
|
}
|
|
62830
62830
|
e.CommaAndColonSeparatedRecord = h, e.default = E;
|
|
62831
|
-
}(
|
|
62831
|
+
}(Ws)), Ws;
|
|
62832
62832
|
}
|
|
62833
|
-
var
|
|
62834
|
-
function
|
|
62833
|
+
var Xs = {}, ot = {}, La;
|
|
62834
|
+
function Po() {
|
|
62835
62835
|
if (La) return ot;
|
|
62836
62836
|
La = 1, Object.defineProperty(ot, "__esModule", { value: !0 }), ot.OpCompressedRequest = ot.OpMsgResponse = ot.OpMsgRequest = ot.DocumentSequence = ot.OpReply = ot.OpQueryRequest = void 0;
|
|
62837
|
-
const e = pe, t = Q, r =
|
|
62837
|
+
const e = pe, t = Q, r = Lo(), n = fe;
|
|
62838
62838
|
let i = 0;
|
|
62839
62839
|
const o = 2, u = 4, c = 8, s = 16, a = 32, E = 64, h = 128, g = 1, m = 2, C = 4, S = 8, D = e.BSON.onDemand.ByteUtils.encodeUTF8Into;
|
|
62840
62840
|
class O {
|
|
@@ -63056,10 +63056,10 @@ function Lo() {
|
|
|
63056
63056
|
return ot.OpCompressedRequest = _, ot;
|
|
63057
63057
|
}
|
|
63058
63058
|
var ka;
|
|
63059
|
-
function
|
|
63059
|
+
function Lo() {
|
|
63060
63060
|
return ka || (ka = 1, function(e) {
|
|
63061
63061
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.uncompressibleCommands = e.Compressor = void 0, e.compress = m, e.decompress = C, e.compressCommand = O, e.decompressResponse = M;
|
|
63062
|
-
const t = Ic, r = Ve, n = Qe, i = Q, o =
|
|
63062
|
+
const t = Ic, r = Ve, n = Qe, i = Q, o = Po(), u = fe;
|
|
63063
63063
|
e.Compressor = Object.freeze({
|
|
63064
63064
|
none: 0,
|
|
63065
63065
|
snappy: 1,
|
|
@@ -63165,7 +63165,7 @@ function ko() {
|
|
|
63165
63165
|
throw new i.MongoDecompressionError("Message body and message header must be the same length");
|
|
63166
63166
|
return new l(p, d, w);
|
|
63167
63167
|
}
|
|
63168
|
-
}(
|
|
63168
|
+
}(Xs)), Xs;
|
|
63169
63169
|
}
|
|
63170
63170
|
var In = {}, _r = {}, tn = {}, Ge = {};
|
|
63171
63171
|
Object.defineProperty(Ge, "__esModule", { value: !0 });
|
|
@@ -63439,16 +63439,16 @@ async function A6(e) {
|
|
|
63439
63439
|
return { ...e, gcp: { accessToken: r } };
|
|
63440
63440
|
}
|
|
63441
63441
|
Object.defineProperty(gi, "__esModule", { value: !0 });
|
|
63442
|
-
gi.isEmptyCredentials =
|
|
63442
|
+
gi.isEmptyCredentials = qi;
|
|
63443
63443
|
gi.refreshKMSCredentials = y6;
|
|
63444
63444
|
const p6 = Eu, C6 = gu, S6 = Au;
|
|
63445
|
-
function
|
|
63445
|
+
function qi(e, t) {
|
|
63446
63446
|
const r = t[e];
|
|
63447
63447
|
return r == null ? !1 : typeof r == "object" && Object.keys(r).length === 0;
|
|
63448
63448
|
}
|
|
63449
63449
|
async function y6(e, t) {
|
|
63450
63450
|
let r = e;
|
|
63451
|
-
return
|
|
63451
|
+
return qi("aws", e) && (r = await (0, p6.loadAWSCredentials)(r, t == null ? void 0 : t.aws)), qi("gcp", e) && (r = await (0, S6.loadGCPCredentials)(r)), qi("azure", e) && (r = await (0, C6.loadAzureCredentials)(r)), r;
|
|
63452
63452
|
}
|
|
63453
63453
|
var vn = {}, Ua;
|
|
63454
63454
|
function gl() {
|
|
@@ -64226,12 +64226,12 @@ function pu() {
|
|
|
64226
64226
|
}
|
|
64227
64227
|
return tn;
|
|
64228
64228
|
}
|
|
64229
|
-
var
|
|
64230
|
-
Object.defineProperty(
|
|
64231
|
-
|
|
64232
|
-
const O6 = Q,
|
|
64229
|
+
var ko = {};
|
|
64230
|
+
Object.defineProperty(ko, "__esModule", { value: !0 });
|
|
64231
|
+
ko.MongocryptdManager = void 0;
|
|
64232
|
+
const O6 = Q, so = class so {
|
|
64233
64233
|
constructor(t = {}) {
|
|
64234
|
-
this.spawnPath = "", this.spawnArgs = [], this.uri = typeof t.mongocryptdURI == "string" && t.mongocryptdURI.length > 0 ? t.mongocryptdURI :
|
|
64234
|
+
this.spawnPath = "", this.spawnArgs = [], this.uri = typeof t.mongocryptdURI == "string" && t.mongocryptdURI.length > 0 ? t.mongocryptdURI : so.DEFAULT_MONGOCRYPTD_URI, this.bypassSpawn = !!t.mongocryptdBypassSpawn, Object.hasOwn(t, "mongocryptdSpawnPath") && t.mongocryptdSpawnPath && (this.spawnPath = t.mongocryptdSpawnPath), Object.hasOwn(t, "mongocryptdSpawnArgs") && Array.isArray(t.mongocryptdSpawnArgs) && (this.spawnArgs = this.spawnArgs.concat(t.mongocryptdSpawnArgs)), this.spawnArgs.filter((r) => typeof r == "string").every((r) => r.indexOf("--idleShutdownTimeoutSecs") < 0) && this.spawnArgs.push("--idleShutdownTimeoutSecs", "60");
|
|
64235
64235
|
}
|
|
64236
64236
|
/**
|
|
64237
64237
|
* Will check to see if a mongocryptd is up. If it is not up, it will attempt
|
|
@@ -64258,16 +64258,16 @@ const O6 = Q, uo = class uo {
|
|
|
64258
64258
|
return await this.spawn(), await t();
|
|
64259
64259
|
}
|
|
64260
64260
|
};
|
|
64261
|
-
|
|
64262
|
-
let g1 =
|
|
64263
|
-
|
|
64261
|
+
so.DEFAULT_MONGOCRYPTD_URI = "mongodb://localhost:27020";
|
|
64262
|
+
let g1 = so;
|
|
64263
|
+
ko.MongocryptdManager = g1;
|
|
64264
64264
|
var xa;
|
|
64265
64265
|
function Al() {
|
|
64266
64266
|
if (xa) return _r;
|
|
64267
64267
|
xa = 1;
|
|
64268
64268
|
var e;
|
|
64269
64269
|
Object.defineProperty(_r, "__esModule", { value: !0 }), _r.AutoEncrypter = _r.AutoEncryptionLoggerLevel = void 0;
|
|
64270
|
-
const t = B1, r = pe, n = Ve, i = Qe, o = Q, u = En(), c = ne(), s = pu(), a = Ge, E =
|
|
64270
|
+
const t = B1, r = pe, n = Ve, i = Qe, o = Q, u = En(), c = ne(), s = pu(), a = Ge, E = ko, h = gi, g = gl();
|
|
64271
64271
|
_r.AutoEncryptionLoggerLevel = Object.freeze({
|
|
64272
64272
|
FatalError: 0,
|
|
64273
64273
|
Error: 1,
|
|
@@ -64500,10 +64500,10 @@ function w6() {
|
|
|
64500
64500
|
}
|
|
64501
64501
|
return In.Encrypter = o, In;
|
|
64502
64502
|
}
|
|
64503
|
-
var
|
|
64503
|
+
var Js = {}, Cu = {}, It = {}, Su = {};
|
|
64504
64504
|
(function(e) {
|
|
64505
64505
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.SENSITIVE_COMMANDS = e.CommandFailedEvent = e.CommandSucceededEvent = e.CommandStartedEvent = void 0;
|
|
64506
|
-
const t = Ve, r = ne(), n =
|
|
64506
|
+
const t = Ve, r = ne(), n = Po();
|
|
64507
64507
|
class i {
|
|
64508
64508
|
/**
|
|
64509
64509
|
* Create a started event
|
|
@@ -64623,7 +64623,7 @@ var Qs = {}, Cu = {}, It = {}, Su = {};
|
|
|
64623
64623
|
};
|
|
64624
64624
|
}
|
|
64625
64625
|
})(Su);
|
|
64626
|
-
var
|
|
64626
|
+
var Uo = {}, rr = {};
|
|
64627
64627
|
Object.defineProperty(rr, "__esModule", { value: !0 });
|
|
64628
64628
|
rr.ServerDescription = void 0;
|
|
64629
64629
|
rr.parseServerType = pl;
|
|
@@ -64703,8 +64703,8 @@ function Cl(e, t) {
|
|
|
64703
64703
|
const r = typeof e.counter == "bigint" ? rn.Long.fromBigInt(e.counter) : rn.Long.isLong(e.counter) ? e.counter : rn.Long.fromNumber(e.counter), n = typeof t.counter == "bigint" ? rn.Long.fromBigInt(t.counter) : rn.Long.isLong(t.counter) ? t.counter : rn.Long.fromNumber(t.counter);
|
|
64704
64704
|
return r.compare(n);
|
|
64705
64705
|
}
|
|
64706
|
-
Object.defineProperty(
|
|
64707
|
-
|
|
64706
|
+
Object.defineProperty(Uo, "__esModule", { value: !0 });
|
|
64707
|
+
Uo.StreamDescription = void 0;
|
|
64708
64708
|
const M6 = pe, F6 = Ne, R6 = rr, N6 = [
|
|
64709
64709
|
"minWireVersion",
|
|
64710
64710
|
"maxWireVersion",
|
|
@@ -64736,7 +64736,7 @@ class I6 {
|
|
|
64736
64736
|
);
|
|
64737
64737
|
}
|
|
64738
64738
|
}
|
|
64739
|
-
|
|
64739
|
+
Uo.StreamDescription = I6;
|
|
64740
64740
|
var yu = {};
|
|
64741
64741
|
Object.defineProperty(yu, "__esModule", { value: !0 });
|
|
64742
64742
|
yu.onData = v6;
|
|
@@ -64793,10 +64793,10 @@ function v6(e, { timeoutContext: t, signal: r }) {
|
|
|
64793
64793
|
return Promise.resolve(m);
|
|
64794
64794
|
}
|
|
64795
64795
|
}
|
|
64796
|
-
var
|
|
64796
|
+
var jo = {}, pi = {};
|
|
64797
64797
|
Object.defineProperty(pi, "__esModule", { value: !0 });
|
|
64798
64798
|
pi.TopologyDescription = void 0;
|
|
64799
|
-
const P6 = pe,
|
|
64799
|
+
const P6 = pe, xo = fe, Hi = Q, A1 = ne(), Ae = Ne, mr = rr, L6 = xo.MIN_SUPPORTED_SERVER_VERSION, k6 = xo.MAX_SUPPORTED_SERVER_VERSION, Va = xo.MIN_SUPPORTED_WIRE_VERSION, Wa = xo.MAX_SUPPORTED_WIRE_VERSION, U6 = /* @__PURE__ */ new Set([Ae.ServerType.Mongos, Ae.ServerType.Unknown]), Ga = /* @__PURE__ */ new Set([Ae.ServerType.Mongos, Ae.ServerType.Standalone]), qa = /* @__PURE__ */ new Set([
|
|
64800
64800
|
Ae.ServerType.RSSecondary,
|
|
64801
64801
|
Ae.ServerType.RSArbiter,
|
|
64802
64802
|
Ae.ServerType.RSOther
|
|
@@ -64938,14 +64938,14 @@ function Ha(e, t, r = null, n = null, i = null) {
|
|
|
64938
64938
|
i = t.electionId, n = t.setVersion;
|
|
64939
64939
|
else
|
|
64940
64940
|
return e.set(t.address, new mr.ServerDescription(t.address, void 0, {
|
|
64941
|
-
error: new
|
|
64941
|
+
error: new Hi.MongoStalePrimaryError(o(t, n, i))
|
|
64942
64942
|
})), [Fr(e), r, n, i];
|
|
64943
64943
|
} else {
|
|
64944
64944
|
const s = t.electionId ? t.electionId : null;
|
|
64945
64945
|
if (t.setVersion && s) {
|
|
64946
64946
|
if (n && i && (n > t.setVersion || (0, A1.compareObjectId)(i, s) > 0))
|
|
64947
64947
|
return e.set(t.address, new mr.ServerDescription(t.address, void 0, {
|
|
64948
|
-
error: new
|
|
64948
|
+
error: new Hi.MongoStalePrimaryError(o(t, n, i))
|
|
64949
64949
|
})), [Fr(e), r, n, i];
|
|
64950
64950
|
i = t.electionId;
|
|
64951
64951
|
}
|
|
@@ -64954,7 +64954,7 @@ function Ha(e, t, r = null, n = null, i = null) {
|
|
|
64954
64954
|
for (const [s, a] of e)
|
|
64955
64955
|
if (a.type === Ae.ServerType.RSPrimary && a.address !== t.address) {
|
|
64956
64956
|
e.set(s, new mr.ServerDescription(a.address, void 0, {
|
|
64957
|
-
error: new
|
|
64957
|
+
error: new Hi.MongoStalePrimaryError("primary marked stale due to discovery of newer primary")
|
|
64958
64958
|
}));
|
|
64959
64959
|
break;
|
|
64960
64960
|
}
|
|
@@ -64968,7 +64968,7 @@ function Ha(e, t, r = null, n = null, i = null) {
|
|
|
64968
64968
|
}
|
|
64969
64969
|
function x6(e, t, r = null) {
|
|
64970
64970
|
if (r == null)
|
|
64971
|
-
throw new
|
|
64971
|
+
throw new Hi.MongoRuntimeError('Argument "setName" is required if connected to a replica set');
|
|
64972
64972
|
return (r !== t.setName || t.me && t.address !== t.me) && e.delete(t.address), Fr(e);
|
|
64973
64973
|
}
|
|
64974
64974
|
function z6(e, t, r = null) {
|
|
@@ -64983,13 +64983,13 @@ function Fr(e) {
|
|
|
64983
64983
|
return Ae.TopologyType.ReplicaSetWithPrimary;
|
|
64984
64984
|
return Ae.TopologyType.ReplicaSetNoPrimary;
|
|
64985
64985
|
}
|
|
64986
|
-
Object.defineProperty(
|
|
64987
|
-
|
|
64988
|
-
|
|
64989
|
-
const V6 = Q,
|
|
64986
|
+
Object.defineProperty(jo, "__esModule", { value: !0 });
|
|
64987
|
+
jo.getReadPreference = G6;
|
|
64988
|
+
jo.isSharded = q6;
|
|
64989
|
+
const V6 = Q, Qs = Ke, Ka = Ne, W6 = pi;
|
|
64990
64990
|
function G6(e) {
|
|
64991
|
-
let t = (e == null ? void 0 : e.readPreference) ??
|
|
64992
|
-
if (typeof t == "string" && (t =
|
|
64991
|
+
let t = (e == null ? void 0 : e.readPreference) ?? Qs.ReadPreference.primary;
|
|
64992
|
+
if (typeof t == "string" && (t = Qs.ReadPreference.fromString(t)), !(t instanceof Qs.ReadPreference))
|
|
64993
64993
|
throw new V6.MongoInvalidArgumentError('Option "readPreference" must be a ReadPreference instance');
|
|
64994
64994
|
return t;
|
|
64995
64995
|
}
|
|
@@ -64999,7 +64999,7 @@ function q6(e) {
|
|
|
64999
64999
|
Object.defineProperty(It, "__esModule", { value: !0 });
|
|
65000
65000
|
It.CryptoConnection = It.SizedMessageTransform = It.Connection = void 0;
|
|
65001
65001
|
It.hasSessionSupport = em;
|
|
65002
|
-
const H6 =
|
|
65002
|
+
const H6 = ao, Sl = gn, K6 = pe, ur = Ve, ve = Q, Ya = Cr, Y6 = Je, X6 = Ke, J6 = Ne, Xa = ut, Ja = Te, ht = ne(), Zs = Su, Li = Po(), Q6 = Uo, Z6 = Lo(), $6 = yu, qn = De(), $s = jo;
|
|
65003
65003
|
function em(e) {
|
|
65004
65004
|
return e.description.logicalSessionTimeoutMinutes != null;
|
|
65005
65005
|
}
|
|
@@ -65085,7 +65085,7 @@ const Ze = class Ze extends Y6.TypedEventEmitter {
|
|
|
65085
65085
|
prepareCommand(t, r, n) {
|
|
65086
65086
|
var E;
|
|
65087
65087
|
let i = { ...r };
|
|
65088
|
-
const o = (0,
|
|
65088
|
+
const o = (0, $s.getReadPreference)(n), u = n == null ? void 0 : n.session;
|
|
65089
65089
|
let c = this.clusterTime;
|
|
65090
65090
|
if (this.serverApi) {
|
|
65091
65091
|
const { version: h, strict: g, deprecationErrors: m } = this.serverApi;
|
|
@@ -65098,7 +65098,7 @@ const Ze = class Ze extends Y6.TypedEventEmitter {
|
|
|
65098
65098
|
throw h;
|
|
65099
65099
|
} else if (u != null && u.explicit)
|
|
65100
65100
|
throw new ve.MongoCompatibilityError("Current topology does not support sessions");
|
|
65101
|
-
c && (i.$clusterTime = c), this.description.type !== J6.ServerType.Standalone && (!(0,
|
|
65101
|
+
c && (i.$clusterTime = c), this.description.type !== J6.ServerType.Standalone && (!(0, $s.isSharded)(this) && !this.description.loadBalanced && this.supportsOpMsg && n.directConnection === !0 && (o == null ? void 0 : o.mode) === "primary" ? i.$readPreference = X6.ReadPreference.primaryPreferred.toJSON() : (0, $s.isSharded)(this) && !this.supportsOpMsg && (o == null ? void 0 : o.mode) !== "primary" ? i = {
|
|
65102
65102
|
$query: i,
|
|
65103
65103
|
$readPreference: o.toJSON()
|
|
65104
65104
|
} : (o == null ? void 0 : o.mode) !== "primary" && (i.$readPreference = o.toJSON()));
|
|
@@ -65143,7 +65143,7 @@ const Ze = class Ze extends Y6.TypedEventEmitter {
|
|
|
65143
65143
|
(E = n == null ? void 0 : n.signal) == null || E.throwIfAborted();
|
|
65144
65144
|
const o = this.prepareCommand(t.db, r, n);
|
|
65145
65145
|
let u = 0;
|
|
65146
|
-
this.shouldEmitAndLogCommand && (u = (0, ht.processTimeMS)(), this.emitAndLogCommand(this.monitorCommands, Ze.COMMAND_STARTED, o.databaseName, this.established, new
|
|
65146
|
+
this.shouldEmitAndLogCommand && (u = (0, ht.processTimeMS)(), this.emitAndLogCommand(this.monitorCommands, Ze.COMMAND_STARTED, o.databaseName, this.established, new Zs.CommandStartedEvent(this, o, this.description.serverConnectionId)));
|
|
65147
65147
|
const c = n.documentsReturnedIn == null || !n.raw ? n : {
|
|
65148
65148
|
...n,
|
|
65149
65149
|
raw: !1,
|
|
@@ -65157,10 +65157,10 @@ const Ze = class Ze extends Y6.TypedEventEmitter {
|
|
|
65157
65157
|
throw (h = n.timeoutContext) != null && h.csotEnabled() && s.isMaxTimeExpiredError ? new ve.MongoOperationTimeoutError("Server reported a timeout error", {
|
|
65158
65158
|
cause: new ve.MongoServerError(a ?? (a = s.toObject(c)))
|
|
65159
65159
|
}) : new ve.MongoServerError(a ?? (a = s.toObject(c)));
|
|
65160
|
-
this.shouldEmitAndLogCommand && this.emitAndLogCommand(this.monitorCommands, Ze.COMMAND_SUCCEEDED, o.databaseName, this.established, new
|
|
65160
|
+
this.shouldEmitAndLogCommand && this.emitAndLogCommand(this.monitorCommands, Ze.COMMAND_SUCCEEDED, o.databaseName, this.established, new Zs.CommandSucceededEvent(this, o, o.moreToCome ? { ok: 1 } : a ?? (a = s.toObject(c)), u, this.description.serverConnectionId)), i == null ? yield a ?? (a = s.toObject(c)) : yield s, this.throwIfAborted();
|
|
65161
65161
|
}
|
|
65162
65162
|
} catch (g) {
|
|
65163
|
-
throw this.shouldEmitAndLogCommand && this.emitAndLogCommand(this.monitorCommands, Ze.COMMAND_FAILED, o.databaseName, this.established, new
|
|
65163
|
+
throw this.shouldEmitAndLogCommand && this.emitAndLogCommand(this.monitorCommands, Ze.COMMAND_FAILED, o.databaseName, this.established, new Zs.CommandFailedEvent(this, o, g, u, this.description.serverConnectionId)), g;
|
|
65164
65164
|
}
|
|
65165
65165
|
}
|
|
65166
65166
|
async command(t, r, n = {}, i) {
|
|
@@ -65260,8 +65260,8 @@ const Ze = class Ze extends Y6.TypedEventEmitter {
|
|
|
65260
65260
|
}
|
|
65261
65261
|
};
|
|
65262
65262
|
Ze.COMMAND_STARTED = ur.COMMAND_STARTED, Ze.COMMAND_SUCCEEDED = ur.COMMAND_SUCCEEDED, Ze.COMMAND_FAILED = ur.COMMAND_FAILED, Ze.CLUSTER_TIME_RECEIVED = ur.CLUSTER_TIME_RECEIVED, Ze.CLOSE = ur.CLOSE, Ze.PINNED = ur.PINNED, Ze.UNPINNED = ur.UNPINNED;
|
|
65263
|
-
let
|
|
65264
|
-
It.Connection =
|
|
65263
|
+
let eo = Ze;
|
|
65264
|
+
It.Connection = eo;
|
|
65265
65265
|
class yl extends H6.Transform {
|
|
65266
65266
|
constructor({ connection: t }) {
|
|
65267
65267
|
super({ writableObjectMode: !1, readableObjectMode: !0 }), this.bufferPool = new ht.BufferPool(), this.connection = t;
|
|
@@ -65283,7 +65283,7 @@ class yl extends H6.Transform {
|
|
|
65283
65283
|
}
|
|
65284
65284
|
}
|
|
65285
65285
|
It.SizedMessageTransform = yl;
|
|
65286
|
-
class rm extends
|
|
65286
|
+
class rm extends eo {
|
|
65287
65287
|
constructor(t, r) {
|
|
65288
65288
|
super(t, r), this.autoEncrypter = r.autoEncrypter;
|
|
65289
65289
|
}
|
|
@@ -65688,8 +65688,8 @@ Fe.ConnectionPoolClearedEvent = Om;
|
|
|
65688
65688
|
var Ft = {};
|
|
65689
65689
|
Object.defineProperty(Ft, "__esModule", { value: !0 });
|
|
65690
65690
|
Ft.WaitQueueTimeoutError = Ft.PoolClearedOnNetworkError = Ft.PoolClearedError = Ft.PoolClosedError = void 0;
|
|
65691
|
-
const
|
|
65692
|
-
class wm extends
|
|
65691
|
+
const to = Q;
|
|
65692
|
+
class wm extends to.MongoDriverError {
|
|
65693
65693
|
/**
|
|
65694
65694
|
* **Do not use this constructor!**
|
|
65695
65695
|
*
|
|
@@ -65709,7 +65709,7 @@ class wm extends ro.MongoDriverError {
|
|
|
65709
65709
|
}
|
|
65710
65710
|
}
|
|
65711
65711
|
Ft.PoolClosedError = wm;
|
|
65712
|
-
class wl extends
|
|
65712
|
+
class wl extends to.MongoNetworkError {
|
|
65713
65713
|
/**
|
|
65714
65714
|
* **Do not use this constructor!**
|
|
65715
65715
|
*
|
|
@@ -65724,7 +65724,7 @@ class wl extends ro.MongoNetworkError {
|
|
|
65724
65724
|
constructor(t, r) {
|
|
65725
65725
|
var i;
|
|
65726
65726
|
const n = r || `Connection pool for ${t.address} was cleared because another operation failed with: "${(i = t.serverError) == null ? void 0 : i.message}"`;
|
|
65727
|
-
super(n, t.serverError ? { cause: t.serverError } : void 0), this.address = t.address, this.addErrorLabel(
|
|
65727
|
+
super(n, t.serverError ? { cause: t.serverError } : void 0), this.address = t.address, this.addErrorLabel(to.MongoErrorLabel.PoolRequestedRetry);
|
|
65728
65728
|
}
|
|
65729
65729
|
get name() {
|
|
65730
65730
|
return "MongoPoolClearedError";
|
|
@@ -65751,7 +65751,7 @@ class _m extends wl {
|
|
|
65751
65751
|
}
|
|
65752
65752
|
}
|
|
65753
65753
|
Ft.PoolClearedOnNetworkError = _m;
|
|
65754
|
-
class Dm extends
|
|
65754
|
+
class Dm extends to.MongoDriverError {
|
|
65755
65755
|
/**
|
|
65756
65756
|
* **Do not use this constructor!**
|
|
65757
65757
|
*
|
|
@@ -66616,13 +66616,13 @@ function Dl() {
|
|
|
66616
66616
|
}
|
|
66617
66617
|
}
|
|
66618
66618
|
e.RTTSampler = T;
|
|
66619
|
-
}(
|
|
66619
|
+
}(Js)), Js;
|
|
66620
66620
|
}
|
|
66621
66621
|
var $a;
|
|
66622
66622
|
function Tl() {
|
|
66623
66623
|
return $a || ($a = 1, function(e) {
|
|
66624
66624
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DEFAULT_OPTIONS = e.OPTIONS = void 0, e.resolveSRVRecord = l, e.parseOptions = R;
|
|
66625
|
-
const t = T1, r = El(), n = Ar, i = s2, o =
|
|
66625
|
+
const t = T1, r = El(), n = Ar, i = s2, o = Fo, u = qt, c = Lo(), s = w6(), a = Q, E = En(), h = Cr, g = Pt, m = Ke, C = Dl(), S = ne(), D = ct(), O = ["authSource", "replicaSet", "loadBalanced"], M = "loadBalanced option only supported with a single host in the URI", p = "loadBalanced option not supported with a replicaSet option", B = "loadBalanced option not supported when directConnection is provided";
|
|
66626
66626
|
function d(I) {
|
|
66627
66627
|
return async function(j) {
|
|
66628
66628
|
try {
|
|
@@ -67446,14 +67446,14 @@ function Tl() {
|
|
|
67446
67446
|
// Legacy options from v3 era
|
|
67447
67447
|
__skipPingOnConnect: { type: "boolean" }
|
|
67448
67448
|
}, e.DEFAULT_OPTIONS = new F(Object.entries(e.OPTIONS).filter(([, I]) => I.default != null).map(([I, N]) => [I, N.default]));
|
|
67449
|
-
}(
|
|
67449
|
+
}(Vs)), Vs;
|
|
67450
67450
|
}
|
|
67451
|
-
var Ci = {},
|
|
67451
|
+
var Ci = {}, zo = {}, wu = {};
|
|
67452
67452
|
Object.defineProperty(wu, "__esModule", { value: !0 });
|
|
67453
67453
|
wu.aws4Sign = Tm;
|
|
67454
|
-
const
|
|
67454
|
+
const ro = pe, ec = async (e) => {
|
|
67455
67455
|
const t = p1(e), r = await crypto.subtle.digest("SHA-256", t);
|
|
67456
|
-
return
|
|
67456
|
+
return ro.BSON.onDemand.ByteUtils.toHex(new Uint8Array(r));
|
|
67457
67457
|
}, kn = async (e, t) => {
|
|
67458
67458
|
let r;
|
|
67459
67459
|
typeof e == "string" ? r = p1(e) : r = e;
|
|
@@ -67461,8 +67461,8 @@ const no = pe, ec = async (e) => {
|
|
|
67461
67461
|
return new Uint8Array(o);
|
|
67462
67462
|
}, Dr = (e) => e.toString().trim().replace(/\s+/g, " ");
|
|
67463
67463
|
function p1(e) {
|
|
67464
|
-
const t = new Uint8Array(
|
|
67465
|
-
return
|
|
67464
|
+
const t = new Uint8Array(ro.BSON.onDemand.ByteUtils.utf8ByteLength(e));
|
|
67465
|
+
return ro.BSON.onDemand.ByteUtils.encodeUTF8Into(t, e, 0), t;
|
|
67466
67466
|
}
|
|
67467
67467
|
async function Tm(e, t) {
|
|
67468
67468
|
const n = e.date.toISOString().replace(/[:-]|\.\d{3}/g, ""), i = n.substring(0, 8), o = e.method, u = e.path, c = "", s = new Headers({
|
|
@@ -67485,7 +67485,7 @@ async function Tm(e, t) {
|
|
|
67485
67485
|
g
|
|
67486
67486
|
].join(`
|
|
67487
67487
|
`), C = await ec(m), S = "AWS4-HMAC-SHA256", D = `${i}/${e.region}/${e.service}/aws4_request`, O = [S, n, D, C].join(`
|
|
67488
|
-
`), M = await kn("AWS4" + t.secretAccessKey, i), p = await kn(M, e.region), B = await kn(p, e.service), d = await kn(B, "aws4_request"), b = await kn(d, O), f =
|
|
67488
|
+
`), M = await kn("AWS4" + t.secretAccessKey, i), p = await kn(M, e.region), B = await kn(p, e.service), d = await kn(B, "aws4_request"), b = await kn(d, O), f = ro.BSON.onDemand.ByteUtils.toHex(b);
|
|
67489
67489
|
return {
|
|
67490
67490
|
Authorization: [
|
|
67491
67491
|
"AWS4-HMAC-SHA256 Credential=" + t.accessKeyId + "/" + D,
|
|
@@ -67495,9 +67495,9 @@ async function Tm(e, t) {
|
|
|
67495
67495
|
"X-Amz-Date": n
|
|
67496
67496
|
};
|
|
67497
67497
|
}
|
|
67498
|
-
Object.defineProperty(
|
|
67499
|
-
|
|
67500
|
-
const
|
|
67498
|
+
Object.defineProperty(zo, "__esModule", { value: !0 });
|
|
67499
|
+
zo.MongoDBAWS = void 0;
|
|
67500
|
+
const e1 = pe, sn = Q, on = ne(), Bm = Dt, bm = Ai, Mm = wu, Fm = Fo, Rm = qt, Nm = 110, t1 = {
|
|
67501
67501
|
useBigInt64: !1,
|
|
67502
67502
|
promoteLongs: !0,
|
|
67503
67503
|
promoteValues: !0,
|
|
@@ -67518,8 +67518,8 @@ class Im extends Bm.AuthProvider {
|
|
|
67518
67518
|
const { credentials: n } = t, i = n.username, o = n.password, u = n.mechanismProperties.AWS_SESSION_TOKEN, c = u ? { accessKeyId: i, secretAccessKey: o, sessionToken: u } : { accessKeyId: i, secretAccessKey: o }, s = n.source, a = await (0, on.randomBytes)(32), E = {
|
|
67519
67519
|
saslStart: 1,
|
|
67520
67520
|
mechanism: "MONGODB-AWS",
|
|
67521
|
-
payload:
|
|
67522
|
-
}, h = await r.command((0, on.ns)(`${s}.$cmd`), E, void 0), g =
|
|
67521
|
+
payload: e1.serialize({ r: a, p: Nm }, t1)
|
|
67522
|
+
}, h = await r.command((0, on.ns)(`${s}.$cmd`), E, void 0), g = e1.deserialize(h.payload.buffer, t1), m = g.h, C = g.s.buffer;
|
|
67523
67523
|
if (C.length !== 64)
|
|
67524
67524
|
throw new sn.MongoRuntimeError(`Invalid server nonce length ${C.length}, expected 64`);
|
|
67525
67525
|
if (!on.ByteUtils.equals(C.subarray(0, a.byteLength), a))
|
|
@@ -67548,12 +67548,12 @@ class Im extends Bm.AuthProvider {
|
|
|
67548
67548
|
const M = {
|
|
67549
67549
|
saslContinue: 1,
|
|
67550
67550
|
conversationId: h.conversationId,
|
|
67551
|
-
payload:
|
|
67551
|
+
payload: e1.serialize(O, t1)
|
|
67552
67552
|
};
|
|
67553
67553
|
await r.command((0, on.ns)(`${s}.$cmd`), M, void 0);
|
|
67554
67554
|
}
|
|
67555
67555
|
}
|
|
67556
|
-
|
|
67556
|
+
zo.MongoDBAWS = Im;
|
|
67557
67557
|
async function vm(e, t) {
|
|
67558
67558
|
function r(i) {
|
|
67559
67559
|
if (!i.AccessKeyId || !i.SecretAccessKey)
|
|
@@ -67575,10 +67575,10 @@ function Pm(e) {
|
|
|
67575
67575
|
const t = e.split(".");
|
|
67576
67576
|
return t.length === 1 || t[1] === "amazonaws" ? "us-east-1" : t[1];
|
|
67577
67577
|
}
|
|
67578
|
-
var
|
|
67579
|
-
Object.defineProperty(
|
|
67580
|
-
|
|
67581
|
-
|
|
67578
|
+
var r1 = {}, Un = {}, Qt = {}, Vo = {};
|
|
67579
|
+
Object.defineProperty(Vo, "__esModule", { value: !0 });
|
|
67580
|
+
Vo.finishCommandDocument = Lm;
|
|
67581
|
+
Vo.startCommandDocument = km;
|
|
67582
67582
|
const hn = pe, Bl = qt;
|
|
67583
67583
|
function Lm(e, t) {
|
|
67584
67584
|
return t != null ? {
|
|
@@ -67602,16 +67602,16 @@ function km(e) {
|
|
|
67602
67602
|
}
|
|
67603
67603
|
Object.defineProperty(Qt, "__esModule", { value: !0 });
|
|
67604
67604
|
Qt.CallbackWorkflow = Qt.AUTOMATED_TIMEOUT_MS = Qt.HUMAN_TIMEOUT_MS = void 0;
|
|
67605
|
-
const Um = Rc, jm = Q, tc = ne(),
|
|
67605
|
+
const Um = Rc, jm = Q, tc = ne(), n1 = Vo;
|
|
67606
67606
|
Qt.HUMAN_TIMEOUT_MS = 3e5;
|
|
67607
67607
|
Qt.AUTOMATED_TIMEOUT_MS = 6e4;
|
|
67608
|
-
const xm = ["accessToken", "expiresInSeconds", "refreshToken"], zm = "User provided OIDC callbacks must return a valid object with an accessToken.",
|
|
67608
|
+
const xm = ["accessToken", "expiresInSeconds", "refreshToken"], zm = "User provided OIDC callbacks must return a valid object with an accessToken.", i1 = 100;
|
|
67609
67609
|
class Vm {
|
|
67610
67610
|
/**
|
|
67611
67611
|
* Instantiate the callback workflow.
|
|
67612
67612
|
*/
|
|
67613
67613
|
constructor(t, r) {
|
|
67614
|
-
this.cache = t, this.callback = this.withLock(r), this.lastExecutionTime = Date.now() -
|
|
67614
|
+
this.cache = t, this.callback = this.withLock(r), this.lastExecutionTime = Date.now() - i1;
|
|
67615
67615
|
}
|
|
67616
67616
|
/**
|
|
67617
67617
|
* Get the document to add for speculative authentication. This also needs
|
|
@@ -67621,7 +67621,7 @@ class Vm {
|
|
|
67621
67621
|
if (this.cache.hasAccessToken) {
|
|
67622
67622
|
const n = this.cache.getAccessToken();
|
|
67623
67623
|
t.accessToken = n;
|
|
67624
|
-
const i = (0,
|
|
67624
|
+
const i = (0, n1.finishCommandDocument)(n);
|
|
67625
67625
|
return i.db = r.source, { speculativeAuthenticate: i };
|
|
67626
67626
|
}
|
|
67627
67627
|
return {};
|
|
@@ -67641,13 +67641,13 @@ class Vm {
|
|
|
67641
67641
|
*/
|
|
67642
67642
|
async startAuthentication(t, r, n) {
|
|
67643
67643
|
let i;
|
|
67644
|
-
return n != null && n.speculativeAuthenticate ? i = n.speculativeAuthenticate : i = await t.command((0, tc.ns)(r.source), (0,
|
|
67644
|
+
return n != null && n.speculativeAuthenticate ? i = n.speculativeAuthenticate : i = await t.command((0, tc.ns)(r.source), (0, n1.startCommandDocument)(r), void 0), i;
|
|
67645
67645
|
}
|
|
67646
67646
|
/**
|
|
67647
67647
|
* Finishes the callback authentication process.
|
|
67648
67648
|
*/
|
|
67649
67649
|
async finishAuthentication(t, r, n, i) {
|
|
67650
|
-
await t.command((0, tc.ns)(r.source), (0,
|
|
67650
|
+
await t.command((0, tc.ns)(r.source), (0, n1.finishCommandDocument)(n, i), void 0);
|
|
67651
67651
|
}
|
|
67652
67652
|
/**
|
|
67653
67653
|
* Executes the callback and validates the output.
|
|
@@ -67666,7 +67666,7 @@ class Vm {
|
|
|
67666
67666
|
let r = Promise.resolve();
|
|
67667
67667
|
return async (n) => (await r, r = r.catch(() => null).then(async () => {
|
|
67668
67668
|
const i = Date.now() - this.lastExecutionTime;
|
|
67669
|
-
return i <=
|
|
67669
|
+
return i <= i1 && await (0, Um.setTimeout)(i1 - i, { signal: n.timeoutContext }), this.lastExecutionTime = Date.now(), await t(n);
|
|
67670
67670
|
}), await r);
|
|
67671
67671
|
}
|
|
67672
67672
|
}
|
|
@@ -67725,9 +67725,9 @@ function bl() {
|
|
|
67725
67725
|
}
|
|
67726
67726
|
return Un.AutomatedCallbackWorkflow = i, Un;
|
|
67727
67727
|
}
|
|
67728
|
-
var
|
|
67729
|
-
Object.defineProperty(
|
|
67730
|
-
|
|
67728
|
+
var Wo = {};
|
|
67729
|
+
Object.defineProperty(Wo, "__esModule", { value: !0 });
|
|
67730
|
+
Wo.callback = void 0;
|
|
67731
67731
|
const nc = gu, C1 = Q, Gm = ne(), qm = Object.freeze({ Metadata: "true", Accept: "application/json" }), Hm = "Azure endpoint did not return a value with only access_token and expires_in properties", Km = "TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure.", Ym = async (e) => {
|
|
67732
67732
|
const t = e.tokenAudience, r = e.username;
|
|
67733
67733
|
if (!t)
|
|
@@ -67737,7 +67737,7 @@ const nc = gu, C1 = Q, Gm = ne(), qm = Object.freeze({ Metadata: "true", Accept:
|
|
|
67737
67737
|
throw new C1.MongoAzureError(Hm);
|
|
67738
67738
|
return n;
|
|
67739
67739
|
};
|
|
67740
|
-
|
|
67740
|
+
Wo.callback = Ym;
|
|
67741
67741
|
async function Xm(e, t) {
|
|
67742
67742
|
const r = new URL(nc.AZURE_BASE_URL);
|
|
67743
67743
|
(0, nc.addAzureParams)(r, e, t);
|
|
@@ -67755,16 +67755,16 @@ async function Xm(e, t) {
|
|
|
67755
67755
|
function Jm(e) {
|
|
67756
67756
|
return e == null || typeof e != "object" ? !1 : "accessToken" in e && typeof e.accessToken == "string" && "expiresInSeconds" in e && typeof e.expiresInSeconds == "number";
|
|
67757
67757
|
}
|
|
67758
|
-
var
|
|
67759
|
-
Object.defineProperty(
|
|
67760
|
-
|
|
67758
|
+
var Go = {};
|
|
67759
|
+
Object.defineProperty(Go, "__esModule", { value: !0 });
|
|
67760
|
+
Go.callback = void 0;
|
|
67761
67761
|
const Ml = Q, Qm = ne(), Zm = "http://metadata/computeMetadata/v1/instance/service-accounts/default/identity", $m = Object.freeze({ "Metadata-Flavor": "Google" }), eE = "TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is gcp.", tE = async (e) => {
|
|
67762
67762
|
const t = e.tokenAudience;
|
|
67763
67763
|
if (!t)
|
|
67764
67764
|
throw new Ml.MongoGCPError(eE);
|
|
67765
67765
|
return await rE(t);
|
|
67766
67766
|
};
|
|
67767
|
-
|
|
67767
|
+
Go.callback = tE;
|
|
67768
67768
|
async function rE(e) {
|
|
67769
67769
|
const t = new URL(Zm);
|
|
67770
67770
|
t.searchParams.append("audience", e);
|
|
@@ -67775,19 +67775,19 @@ async function rE(e) {
|
|
|
67775
67775
|
throw new Ml.MongoGCPError(`Status code ${r.status} returned from the GCP endpoint. Response body: ${r.body}`);
|
|
67776
67776
|
return { accessToken: r.body };
|
|
67777
67777
|
}
|
|
67778
|
-
var
|
|
67779
|
-
Object.defineProperty(
|
|
67780
|
-
|
|
67778
|
+
var qo = {};
|
|
67779
|
+
Object.defineProperty(qo, "__esModule", { value: !0 });
|
|
67780
|
+
qo.callback = void 0;
|
|
67781
67781
|
const nE = vc, ki = Ar, iE = "/var/run/secrets/kubernetes.io/serviceaccount/token", ic = "AZURE_FEDERATED_TOKEN_FILE", oc = "AWS_WEB_IDENTITY_TOKEN_FILE", oE = async () => {
|
|
67782
67782
|
let e;
|
|
67783
67783
|
return ki.env[ic] ? e = ki.env[ic] : ki.env[oc] ? e = ki.env[oc] : e = iE, { accessToken: await (0, nE.readFile)(e, "utf8") };
|
|
67784
67784
|
};
|
|
67785
|
-
|
|
67785
|
+
qo.callback = oE;
|
|
67786
67786
|
var Si = {};
|
|
67787
67787
|
Object.defineProperty(Si, "__esModule", { value: !0 });
|
|
67788
67788
|
Si.TokenCache = void 0;
|
|
67789
67789
|
const sE = Q;
|
|
67790
|
-
class
|
|
67790
|
+
class o1 extends sE.MongoDriverError {
|
|
67791
67791
|
}
|
|
67792
67792
|
class uE {
|
|
67793
67793
|
get hasAccessToken() {
|
|
@@ -67801,17 +67801,17 @@ class uE {
|
|
|
67801
67801
|
}
|
|
67802
67802
|
getAccessToken() {
|
|
67803
67803
|
if (!this.accessToken)
|
|
67804
|
-
throw new
|
|
67804
|
+
throw new o1("Attempted to get an access token when none exists.");
|
|
67805
67805
|
return this.accessToken;
|
|
67806
67806
|
}
|
|
67807
67807
|
getRefreshToken() {
|
|
67808
67808
|
if (!this.refreshToken)
|
|
67809
|
-
throw new
|
|
67809
|
+
throw new o1("Attempted to get a refresh token when none exists.");
|
|
67810
67810
|
return this.refreshToken;
|
|
67811
67811
|
}
|
|
67812
67812
|
getIdpInfo() {
|
|
67813
67813
|
if (!this.idpInfo)
|
|
67814
|
-
throw new
|
|
67814
|
+
throw new o1("Attempted to get IDP information when none exists.");
|
|
67815
67815
|
return this.idpInfo;
|
|
67816
67816
|
}
|
|
67817
67817
|
put(t, r) {
|
|
@@ -67825,21 +67825,21 @@ class uE {
|
|
|
67825
67825
|
}
|
|
67826
67826
|
}
|
|
67827
67827
|
Si.TokenCache = uE;
|
|
67828
|
-
var
|
|
67829
|
-
Object.defineProperty(
|
|
67830
|
-
|
|
67828
|
+
var Ho = {};
|
|
67829
|
+
Object.defineProperty(Ho, "__esModule", { value: !0 });
|
|
67830
|
+
Ho.callback = void 0;
|
|
67831
67831
|
const aE = D1, cE = Ar, lE = Q, hE = "OIDC_TOKEN_FILE must be set in the environment.", dE = async () => {
|
|
67832
67832
|
const e = cE.env.OIDC_TOKEN_FILE;
|
|
67833
67833
|
if (!e)
|
|
67834
67834
|
throw new lE.MongoAWSError(hE);
|
|
67835
67835
|
return { accessToken: await aE.promises.readFile(e, "utf8") };
|
|
67836
67836
|
};
|
|
67837
|
-
|
|
67837
|
+
Ho.callback = dE;
|
|
67838
67838
|
var sc;
|
|
67839
67839
|
function _u() {
|
|
67840
67840
|
return sc || (sc = 1, function(e) {
|
|
67841
67841
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MongoDBOIDC = e.OIDC_WORKFLOWS = e.OIDC_VERSION = void 0;
|
|
67842
|
-
const t = Q, r = Dt, n = bl(), i =
|
|
67842
|
+
const t = Q, r = Dt, n = bl(), i = Wo, o = Go, u = qo, c = Si, s = Ho, a = "AuthContext must provide credentials.";
|
|
67843
67843
|
e.OIDC_VERSION = 1, e.OIDC_WORKFLOWS = /* @__PURE__ */ new Map(), e.OIDC_WORKFLOWS.set("test", () => new n.AutomatedCallbackWorkflow(new c.TokenCache(), s.callback)), e.OIDC_WORKFLOWS.set("azure", () => new n.AutomatedCallbackWorkflow(new c.TokenCache(), i.callback)), e.OIDC_WORKFLOWS.set("gcp", () => new n.AutomatedCallbackWorkflow(new c.TokenCache(), o.callback)), e.OIDC_WORKFLOWS.set("k8s", () => new n.AutomatedCallbackWorkflow(new c.TokenCache(), u.callback));
|
|
67844
67844
|
class E extends r.AuthProvider {
|
|
67845
67845
|
/**
|
|
@@ -67876,13 +67876,13 @@ function _u() {
|
|
|
67876
67876
|
throw new t.MongoMissingCredentialsError(a);
|
|
67877
67877
|
return m;
|
|
67878
67878
|
}
|
|
67879
|
-
}(
|
|
67879
|
+
}(r1)), r1;
|
|
67880
67880
|
}
|
|
67881
|
-
var
|
|
67882
|
-
Object.defineProperty(
|
|
67883
|
-
|
|
67884
|
-
const fE = pe, jn = Q, uc = Te, mE = _u(),
|
|
67885
|
-
class EE extends
|
|
67881
|
+
var Ko = {};
|
|
67882
|
+
Object.defineProperty(Ko, "__esModule", { value: !0 });
|
|
67883
|
+
Ko.HumanCallbackWorkflow = void 0;
|
|
67884
|
+
const fE = pe, jn = Q, uc = Te, mE = _u(), s1 = Qt;
|
|
67885
|
+
class EE extends s1.CallbackWorkflow {
|
|
67886
67886
|
/**
|
|
67887
67887
|
* Instantiate the human callback workflow.
|
|
67888
67888
|
*/
|
|
@@ -67928,20 +67928,20 @@ class EE extends u1.CallbackWorkflow {
|
|
|
67928
67928
|
idpInfo: t
|
|
67929
67929
|
};
|
|
67930
67930
|
r.username && (o.username = r.username), n && (o.refreshToken = n);
|
|
67931
|
-
const u = uc.Timeout.expires(
|
|
67931
|
+
const u = uc.Timeout.expires(s1.HUMAN_TIMEOUT_MS);
|
|
67932
67932
|
try {
|
|
67933
67933
|
return await Promise.race([this.executeAndValidateCallback(o), u]);
|
|
67934
67934
|
} catch (c) {
|
|
67935
|
-
throw uc.TimeoutError.is(c) ? (i.abort(), new jn.MongoOIDCError(`OIDC callback timed out after ${
|
|
67935
|
+
throw uc.TimeoutError.is(c) ? (i.abort(), new jn.MongoOIDCError(`OIDC callback timed out after ${s1.HUMAN_TIMEOUT_MS}ms.`)) : c;
|
|
67936
67936
|
} finally {
|
|
67937
67937
|
u.clear();
|
|
67938
67938
|
}
|
|
67939
67939
|
}
|
|
67940
67940
|
}
|
|
67941
|
-
|
|
67942
|
-
var
|
|
67943
|
-
Object.defineProperty(
|
|
67944
|
-
|
|
67941
|
+
Ko.HumanCallbackWorkflow = EE;
|
|
67942
|
+
var Yo = {};
|
|
67943
|
+
Object.defineProperty(Yo, "__esModule", { value: !0 });
|
|
67944
|
+
Yo.Plain = void 0;
|
|
67945
67945
|
const gE = pe, AE = Q, pE = ne(), CE = Dt;
|
|
67946
67946
|
class SE extends CE.AuthProvider {
|
|
67947
67947
|
async auth(t) {
|
|
@@ -67957,7 +67957,7 @@ class SE extends CE.AuthProvider {
|
|
|
67957
67957
|
await r.command((0, pE.ns)("$external.$cmd"), c, void 0);
|
|
67958
67958
|
}
|
|
67959
67959
|
}
|
|
67960
|
-
|
|
67960
|
+
Yo.Plain = SE;
|
|
67961
67961
|
var mn = {};
|
|
67962
67962
|
const ac = (e) => e.codePointAt(0), yE = (e) => e[0], OE = (e) => e[e.length - 1];
|
|
67963
67963
|
function cc(e) {
|
|
@@ -67999,7 +67999,7 @@ Zn.default = Zn;
|
|
|
67999
67999
|
var wE = Zn, Du = {}, _E = tr;
|
|
68000
68000
|
function tr(e, t) {
|
|
68001
68001
|
if (!(this instanceof tr)) return new tr(e, t);
|
|
68002
|
-
this.length = 0, this.updates = [], this.path = new Uint16Array(4), this.pages = new Array(32768), this.maxPages = this.pages.length, this.level = 0, this.pageSize = e || 1024, this.deduplicate = t ? t.deduplicate : null, this.zeros = this.deduplicate ?
|
|
68002
|
+
this.length = 0, this.updates = [], this.path = new Uint16Array(4), this.pages = new Array(32768), this.maxPages = this.pages.length, this.level = 0, this.pageSize = e || 1024, this.deduplicate = t ? t.deduplicate : null, this.zeros = this.deduplicate ? Xo(this.deduplicate.length) : null;
|
|
68003
68003
|
}
|
|
68004
68004
|
tr.prototype.updated = function(e) {
|
|
68005
68005
|
for (; this.deduplicate && e.buffer[e.deduplicate] === this.deduplicate[e.deduplicate]; )
|
|
@@ -68032,7 +68032,7 @@ tr.prototype._array = function(e, t) {
|
|
|
68032
68032
|
};
|
|
68033
68033
|
tr.prototype.get = function(e, t) {
|
|
68034
68034
|
var r = this._array(e, t), n = this.path[0], i = r && r[n];
|
|
68035
|
-
return !i && !t && (i = r[n] = new Fl(e,
|
|
68035
|
+
return !i && !t && (i = r[n] = new Fl(e, Xo(this.pageSize)), e >= this.length && (this.length = e + 1)), i && i.buffer === this.deduplicate && this.deduplicate && !t && (i.buffer = BE(i.buffer), i.deduplicate = 0), i;
|
|
68036
68036
|
};
|
|
68037
68037
|
tr.prototype.set = function(e, t) {
|
|
68038
68038
|
var r = this._array(e, !1), n = this.path[0];
|
|
@@ -68045,7 +68045,7 @@ tr.prototype.set = function(e, t) {
|
|
|
68045
68045
|
i ? i.buffer = o : r[n] = new Fl(e, o);
|
|
68046
68046
|
};
|
|
68047
68047
|
tr.prototype.toBuffer = function() {
|
|
68048
|
-
for (var e = new Array(this.length), t =
|
|
68048
|
+
for (var e = new Array(this.length), t = Xo(this.pageSize), r = 0; r < e.length; )
|
|
68049
68049
|
for (var n = this._array(r, !0), i = 0; i < 32768 && r < e.length; i++)
|
|
68050
68050
|
e[r++] = n && n[i] ? n[i].buffer : t;
|
|
68051
68051
|
return Buffer.concat(e);
|
|
@@ -68059,10 +68059,10 @@ function DE(e, t) {
|
|
|
68059
68059
|
function TE(e, t) {
|
|
68060
68060
|
if (e.length === t) return e;
|
|
68061
68061
|
if (e.length > t) return e.slice(0, t);
|
|
68062
|
-
var r =
|
|
68062
|
+
var r = Xo(t);
|
|
68063
68063
|
return e.copy(r), r;
|
|
68064
68064
|
}
|
|
68065
|
-
function
|
|
68065
|
+
function Xo(e) {
|
|
68066
68066
|
if (Buffer.alloc) return Buffer.alloc(e);
|
|
68067
68067
|
var t = new Buffer(e);
|
|
68068
68068
|
return t.fill(0), t;
|
|
@@ -68158,7 +68158,7 @@ $n.default = $n;
|
|
|
68158
68158
|
var zE = $n;
|
|
68159
68159
|
Object.defineProperty(mn, "__esModule", { value: !0 });
|
|
68160
68160
|
mn.ScramSHA256 = mn.ScramSHA1 = void 0;
|
|
68161
|
-
const VE = zE, kr = Fc, S1 = pe, Mt = Q,
|
|
68161
|
+
const VE = zE, kr = Fc, S1 = pe, Mt = Q, no = ne(), WE = Dt, lc = qt;
|
|
68162
68162
|
class Nl extends WE.AuthProvider {
|
|
68163
68163
|
constructor(t) {
|
|
68164
68164
|
super(), this.cryptoMethod = t || "sha1";
|
|
@@ -68167,7 +68167,7 @@ class Nl extends WE.AuthProvider {
|
|
|
68167
68167
|
const n = this.cryptoMethod, i = r.credentials;
|
|
68168
68168
|
if (!i)
|
|
68169
68169
|
throw new Mt.MongoMissingCredentialsError("AuthContext must provide credentials.");
|
|
68170
|
-
const o = await (0,
|
|
68170
|
+
const o = await (0, no.randomBytes)(24);
|
|
68171
68171
|
return r.nonce = o, {
|
|
68172
68172
|
...t,
|
|
68173
68173
|
speculativeAuthenticate: {
|
|
@@ -68208,7 +68208,7 @@ async function GE(e, t) {
|
|
|
68208
68208
|
throw new Mt.MongoMissingCredentialsError("AuthContext must provide credentials.");
|
|
68209
68209
|
if (!t.nonce)
|
|
68210
68210
|
throw new Mt.MongoInvalidArgumentError("AuthContext must contain a valid nonce property");
|
|
68211
|
-
const i = t.nonce, o = n.source, u = Pl(e, n, i), c = await r.command((0,
|
|
68211
|
+
const i = t.nonce, o = n.source, u = Pl(e, n, i), c = await r.command((0, no.ns)(`${o}.$cmd`), u, void 0);
|
|
68212
68212
|
await Ll(e, c, t);
|
|
68213
68213
|
}
|
|
68214
68214
|
async function Ll(e, t, r) {
|
|
@@ -68231,7 +68231,7 @@ async function Ll(e, t, r) {
|
|
|
68231
68231
|
saslContinue: 1,
|
|
68232
68232
|
conversationId: t.conversationId,
|
|
68233
68233
|
payload: new S1.Binary(Buffer.from(f))
|
|
68234
|
-
}, T = await n.command((0,
|
|
68234
|
+
}, T = await n.command((0, no.ns)(`${u}.$cmd`), w, void 0), _ = hc(T.payload);
|
|
68235
68235
|
if (!QE(Buffer.from(_.v, "base64"), l))
|
|
68236
68236
|
throw new Mt.MongoRuntimeError("Server returned an invalid signature");
|
|
68237
68237
|
if (T.done !== !1)
|
|
@@ -68241,7 +68241,7 @@ async function Ll(e, t, r) {
|
|
|
68241
68241
|
conversationId: T.conversationId,
|
|
68242
68242
|
payload: Buffer.alloc(0)
|
|
68243
68243
|
};
|
|
68244
|
-
await n.command((0,
|
|
68244
|
+
await n.command((0, no.ns)(`${u}.$cmd`), A, void 0);
|
|
68245
68245
|
}
|
|
68246
68246
|
function hc(e) {
|
|
68247
68247
|
const t = e.toString("utf8"), r = {}, n = t.split(",");
|
|
@@ -68279,9 +68279,9 @@ function KE(e, t) {
|
|
|
68279
68279
|
function Ui(e, t, r) {
|
|
68280
68280
|
return kr.createHmac(e, t).update(r).digest();
|
|
68281
68281
|
}
|
|
68282
|
-
let
|
|
68282
|
+
let Ki = {}, y1 = 0;
|
|
68283
68283
|
function YE() {
|
|
68284
|
-
|
|
68284
|
+
Ki = {}, y1 = 0;
|
|
68285
68285
|
}
|
|
68286
68286
|
const XE = {
|
|
68287
68287
|
sha256: 32,
|
|
@@ -68289,10 +68289,10 @@ const XE = {
|
|
|
68289
68289
|
};
|
|
68290
68290
|
function JE(e, t, r, n) {
|
|
68291
68291
|
const i = [e, t.toString("base64"), r].join("_");
|
|
68292
|
-
if (
|
|
68293
|
-
return
|
|
68292
|
+
if (Ki[i] != null)
|
|
68293
|
+
return Ki[i];
|
|
68294
68294
|
const o = kr.pbkdf2Sync(e, t, r, XE[n], n);
|
|
68295
|
-
return y1 >= 200 && YE(),
|
|
68295
|
+
return y1 >= 200 && YE(), Ki[i] = o, y1 += 1, o;
|
|
68296
68296
|
}
|
|
68297
68297
|
function QE(e, t) {
|
|
68298
68298
|
if (e.length !== t.length)
|
|
@@ -68316,9 +68316,9 @@ class $E extends Nl {
|
|
|
68316
68316
|
}
|
|
68317
68317
|
}
|
|
68318
68318
|
mn.ScramSHA256 = $E;
|
|
68319
|
-
var
|
|
68320
|
-
Object.defineProperty(
|
|
68321
|
-
|
|
68319
|
+
var Jo = {};
|
|
68320
|
+
Object.defineProperty(Jo, "__esModule", { value: !0 });
|
|
68321
|
+
Jo.X509 = void 0;
|
|
68322
68322
|
const dc = Q, e4 = ne(), t4 = Dt;
|
|
68323
68323
|
class r4 extends t4.AuthProvider {
|
|
68324
68324
|
async prepare(t, r) {
|
|
@@ -68335,14 +68335,14 @@ class r4 extends t4.AuthProvider {
|
|
|
68335
68335
|
i != null && i.speculativeAuthenticate || await r.command((0, e4.ns)("$external.$cmd"), fc(n), void 0);
|
|
68336
68336
|
}
|
|
68337
68337
|
}
|
|
68338
|
-
|
|
68338
|
+
Jo.X509 = r4;
|
|
68339
68339
|
function fc(e) {
|
|
68340
68340
|
const t = { authenticate: 1, mechanism: "MONGODB-X509" };
|
|
68341
68341
|
return e.username && (t.user = e.username), t;
|
|
68342
68342
|
}
|
|
68343
68343
|
Object.defineProperty(Ci, "__esModule", { value: !0 });
|
|
68344
68344
|
Ci.MongoClientAuthProviders = void 0;
|
|
68345
|
-
const n4 =
|
|
68345
|
+
const n4 = Ro, i4 = zo, kl = _u(), o4 = bl(), s4 = Ko, mc = Si, u4 = Yo, Tr = qt, Ec = mn, a4 = Jo, Ul = Q, c4 = /* @__PURE__ */ new Map([
|
|
68346
68346
|
[
|
|
68347
68347
|
Tr.AuthMechanism.MONGODB_AWS,
|
|
68348
68348
|
({ AWS_CREDENTIAL_PROVIDER: e }) => new i4.MongoDBAWS(e)
|
|
@@ -68392,7 +68392,7 @@ function h4(e) {
|
|
|
68392
68392
|
return n;
|
|
68393
68393
|
}
|
|
68394
68394
|
}
|
|
68395
|
-
var xn = {},
|
|
68395
|
+
var xn = {}, Qo = {}, yi = {};
|
|
68396
68396
|
Object.defineProperty(yi, "__esModule", { value: !0 });
|
|
68397
68397
|
yi.ClientBulkWriteOperation = void 0;
|
|
68398
68398
|
const d4 = De(), f4 = ne(), m4 = Ie, Br = Me;
|
|
@@ -68426,8 +68426,8 @@ yi.ClientBulkWriteOperation = jl;
|
|
|
68426
68426
|
Br.Aspect.COMMAND_BATCHING,
|
|
68427
68427
|
Br.Aspect.SUPPORTS_RAW_DATA
|
|
68428
68428
|
]);
|
|
68429
|
-
Object.defineProperty(
|
|
68430
|
-
|
|
68429
|
+
Object.defineProperty(Qo, "__esModule", { value: !0 });
|
|
68430
|
+
Qo.ClientBulkWriteCursor = void 0;
|
|
68431
68431
|
const E4 = yi, g4 = qe, gc = ne(), A4 = tt;
|
|
68432
68432
|
class Bu extends A4.AbstractCursor {
|
|
68433
68433
|
/** @internal */
|
|
@@ -68460,11 +68460,11 @@ class Bu extends A4.AbstractCursor {
|
|
|
68460
68460
|
return this.cursorResponse = n, { server: r.server, session: t, response: n };
|
|
68461
68461
|
}
|
|
68462
68462
|
}
|
|
68463
|
-
|
|
68463
|
+
Qo.ClientBulkWriteCursor = Bu;
|
|
68464
68464
|
var xl = {};
|
|
68465
68465
|
(function(e) {
|
|
68466
68466
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.buildReplaceOneOperation = e.buildUpdateManyOperation = e.buildUpdateOneOperation = e.buildDeleteManyOperation = e.buildDeleteOneOperation = e.buildInsertOneOperation = e.ClientBulkWriteCommandBuilder = void 0, e.buildOperation = M;
|
|
68467
|
-
const t = pe, r =
|
|
68467
|
+
const t = pe, r = Po(), n = Q, i = Gr, o = ne(), u = 1e3;
|
|
68468
68468
|
class c {
|
|
68469
68469
|
/**
|
|
68470
68470
|
* Create the command builder.
|
|
@@ -68622,7 +68622,7 @@ var zn = {}, Ac;
|
|
|
68622
68622
|
function p4() {
|
|
68623
68623
|
if (Ac) return zn;
|
|
68624
68624
|
Ac = 1, Object.defineProperty(zn, "__esModule", { value: !0 }), zn.ClientBulkWriteResultsMerger = void 0;
|
|
68625
|
-
const e =
|
|
68625
|
+
const e = ts(), t = Q, r = {
|
|
68626
68626
|
acknowledged: !1,
|
|
68627
68627
|
insertedCount: 0,
|
|
68628
68628
|
upsertedCount: 0,
|
|
@@ -68767,7 +68767,7 @@ var pc;
|
|
|
68767
68767
|
function C4() {
|
|
68768
68768
|
if (pc) return xn;
|
|
68769
68769
|
pc = 1, Object.defineProperty(xn, "__esModule", { value: !0 }), xn.ClientBulkWriteExecutor = void 0;
|
|
68770
|
-
const e = tt, t =
|
|
68770
|
+
const e = tt, t = Qo, r = Q, n = Te, i = ne(), o = ct(), u = qe, c = yi, s = xl, a = p4();
|
|
68771
68771
|
class E {
|
|
68772
68772
|
/**
|
|
68773
68773
|
* Instantiate the executor.
|
|
@@ -68837,9 +68837,9 @@ function C4() {
|
|
|
68837
68837
|
}
|
|
68838
68838
|
return xn.ClientBulkWriteExecutor = E, xn;
|
|
68839
68839
|
}
|
|
68840
|
-
var
|
|
68841
|
-
Object.defineProperty(
|
|
68842
|
-
|
|
68840
|
+
var Zo = {};
|
|
68841
|
+
Object.defineProperty(Zo, "__esModule", { value: !0 });
|
|
68842
|
+
Zo.EndSessionsOperation = void 0;
|
|
68843
68843
|
const S4 = De(), y4 = Ie, O4 = Ke, w4 = ne(), Cc = Me;
|
|
68844
68844
|
class zl extends y4.CommandOperation {
|
|
68845
68845
|
constructor(t) {
|
|
@@ -68860,12 +68860,12 @@ class zl extends y4.CommandOperation {
|
|
|
68860
68860
|
return "endSessions";
|
|
68861
68861
|
}
|
|
68862
68862
|
}
|
|
68863
|
-
|
|
68863
|
+
Zo.EndSessionsOperation = zl;
|
|
68864
68864
|
(0, Cc.defineAspects)(zl, Cc.Aspect.WRITE_OPERATION);
|
|
68865
68865
|
var Vn = {}, ft = {};
|
|
68866
68866
|
Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
68867
68867
|
ft.WaitingForSuitableServerEvent = ft.ServerSelectionSucceededEvent = ft.ServerSelectionFailedEvent = ft.ServerSelectionStartedEvent = ft.ServerSelectionEvent = void 0;
|
|
68868
|
-
const _4 = ne(),
|
|
68868
|
+
const _4 = ne(), $o = Ve;
|
|
68869
68869
|
class Oi {
|
|
68870
68870
|
/** @internal */
|
|
68871
68871
|
constructor(t, r, n) {
|
|
@@ -68876,21 +68876,21 @@ ft.ServerSelectionEvent = Oi;
|
|
|
68876
68876
|
class D4 extends Oi {
|
|
68877
68877
|
/** @internal */
|
|
68878
68878
|
constructor(t, r, n) {
|
|
68879
|
-
super(t, r, n), this.name =
|
|
68879
|
+
super(t, r, n), this.name = $o.SERVER_SELECTION_STARTED, this.message = "Server selection started";
|
|
68880
68880
|
}
|
|
68881
68881
|
}
|
|
68882
68882
|
ft.ServerSelectionStartedEvent = D4;
|
|
68883
68883
|
class T4 extends Oi {
|
|
68884
68884
|
/** @internal */
|
|
68885
68885
|
constructor(t, r, n, i) {
|
|
68886
|
-
super(t, r, i), this.name =
|
|
68886
|
+
super(t, r, i), this.name = $o.SERVER_SELECTION_FAILED, this.message = "Server selection failed", this.failure = n;
|
|
68887
68887
|
}
|
|
68888
68888
|
}
|
|
68889
68889
|
ft.ServerSelectionFailedEvent = T4;
|
|
68890
68890
|
class B4 extends Oi {
|
|
68891
68891
|
/** @internal */
|
|
68892
68892
|
constructor(t, r, n, i) {
|
|
68893
|
-
super(t, r, i), this.name =
|
|
68893
|
+
super(t, r, i), this.name = $o.SERVER_SELECTION_SUCCEEDED, this.message = "Server selection succeeded";
|
|
68894
68894
|
const { host: o, port: u } = _4.HostAddress.fromString(n).toHostPort();
|
|
68895
68895
|
this.serverHost = o, this.serverPort = u;
|
|
68896
68896
|
}
|
|
@@ -68899,14 +68899,14 @@ ft.ServerSelectionSucceededEvent = B4;
|
|
|
68899
68899
|
class b4 extends Oi {
|
|
68900
68900
|
/** @internal */
|
|
68901
68901
|
constructor(t, r, n, i) {
|
|
68902
|
-
super(t, r, i), this.name =
|
|
68902
|
+
super(t, r, i), this.name = $o.WAITING_FOR_SUITABLE_SERVER, this.message = "Waiting for suitable server to become available", this.remainingTimeMS = n;
|
|
68903
68903
|
}
|
|
68904
68904
|
}
|
|
68905
68905
|
ft.WaitingForSuitableServerEvent = b4;
|
|
68906
68906
|
var Ur = {};
|
|
68907
68907
|
Object.defineProperty(Ur, "__esModule", { value: !0 });
|
|
68908
68908
|
Ur.SrvPoller = Ur.SrvPollingEvent = void 0;
|
|
68909
|
-
const M4 = T1,
|
|
68909
|
+
const M4 = T1, u1 = gn, F4 = Q, R4 = Je, Wn = ne();
|
|
68910
68910
|
class Vl {
|
|
68911
68911
|
constructor(t) {
|
|
68912
68912
|
this.srvRecords = t;
|
|
@@ -68916,7 +68916,7 @@ class Vl {
|
|
|
68916
68916
|
}
|
|
68917
68917
|
}
|
|
68918
68918
|
Ur.SrvPollingEvent = Vl;
|
|
68919
|
-
const
|
|
68919
|
+
const uo = class uo extends R4.TypedEventEmitter {
|
|
68920
68920
|
constructor(t) {
|
|
68921
68921
|
if (super(), this.on("error", Wn.noop), !t || !t.srvHost)
|
|
68922
68922
|
throw new F4.MongoRuntimeError("Options for SrvPoller must exist and include srvHost");
|
|
@@ -68932,16 +68932,16 @@ const ao = class ao extends R4.TypedEventEmitter {
|
|
|
68932
68932
|
this._timeout || this.schedule();
|
|
68933
68933
|
}
|
|
68934
68934
|
stop() {
|
|
68935
|
-
this._timeout && ((0,
|
|
68935
|
+
this._timeout && ((0, u1.clearTimeout)(this._timeout), this.generation += 1, this._timeout = void 0);
|
|
68936
68936
|
}
|
|
68937
68937
|
// TODO(NODE-4994): implement new logging logic for SrvPoller failures
|
|
68938
68938
|
schedule() {
|
|
68939
|
-
this._timeout && (0,
|
|
68939
|
+
this._timeout && (0, u1.clearTimeout)(this._timeout), this._timeout = (0, u1.setTimeout)(() => {
|
|
68940
68940
|
this._poll().then(void 0, Wn.squashError);
|
|
68941
68941
|
}, this.intervalMS);
|
|
68942
68942
|
}
|
|
68943
68943
|
success(t) {
|
|
68944
|
-
this.haMode = !1, this.schedule(), this.emit(
|
|
68944
|
+
this.haMode = !1, this.schedule(), this.emit(uo.SRV_RECORD_DISCOVERY, new Vl(t));
|
|
68945
68945
|
}
|
|
68946
68946
|
failure() {
|
|
68947
68947
|
this.haMode = !0, this.schedule();
|
|
@@ -68971,8 +68971,8 @@ const ao = class ao extends R4.TypedEventEmitter {
|
|
|
68971
68971
|
this.success(n);
|
|
68972
68972
|
}
|
|
68973
68973
|
};
|
|
68974
|
-
|
|
68975
|
-
let O1 =
|
|
68974
|
+
uo.SRV_RECORD_DISCOVERY = "srvRecordDiscovery";
|
|
68975
|
+
let O1 = uo;
|
|
68976
68976
|
Ur.SrvPoller = O1;
|
|
68977
68977
|
var Sc;
|
|
68978
68978
|
function N4() {
|
|
@@ -69334,7 +69334,7 @@ var yc;
|
|
|
69334
69334
|
function En() {
|
|
69335
69335
|
if (yc) return wr;
|
|
69336
69336
|
yc = 1, Object.defineProperty(wr, "__esModule", { value: !0 }), wr.MongoClient = wr.ServerApiVersion = void 0;
|
|
69337
|
-
const e = D1, t =
|
|
69337
|
+
const e = D1, t = ts(), r = pe, n = wi(), i = Fo, o = qt, u = Sr, c = Tl(), s = Ve, a = $1(), E = Q, h = Ci, g = Cr, m = Je, C = C4(), S = Zo, D = qe, O = Ke, M = pn, p = N4(), B = ut, d = ne();
|
|
69338
69338
|
wr.ServerApiVersion = Object.freeze({
|
|
69339
69339
|
v1: "1"
|
|
69340
69340
|
});
|
|
@@ -70062,10 +70062,10 @@ function wi() {
|
|
|
70062
70062
|
}
|
|
70063
70063
|
return Jr;
|
|
70064
70064
|
}
|
|
70065
|
-
var
|
|
70065
|
+
var es = {}, _i = {};
|
|
70066
70066
|
Object.defineProperty(_i, "__esModule", { value: !0 });
|
|
70067
70067
|
_i.GridFSBucketReadStream = void 0;
|
|
70068
|
-
const I4 =
|
|
70068
|
+
const I4 = ao, v4 = tt, mt = Q, P4 = Te, bu = class bu extends I4.Readable {
|
|
70069
70069
|
/**
|
|
70070
70070
|
* @param chunks - Handle for chunks collection
|
|
70071
70071
|
* @param files - Handle for files collection
|
|
@@ -70134,8 +70134,8 @@ const I4 = co, v4 = tt, mt = Q, P4 = Te, bu = class bu extends I4.Readable {
|
|
|
70134
70134
|
}
|
|
70135
70135
|
};
|
|
70136
70136
|
bu.FILE = "file";
|
|
70137
|
-
let
|
|
70138
|
-
_i.GridFSBucketReadStream =
|
|
70137
|
+
let io = bu;
|
|
70138
|
+
_i.GridFSBucketReadStream = io;
|
|
70139
70139
|
function wc(e) {
|
|
70140
70140
|
if (e.s.init)
|
|
70141
70141
|
throw new mt.MongoGridFSStreamError("Options cannot be changed after the stream is initialized");
|
|
@@ -70217,7 +70217,7 @@ function k4(e) {
|
|
|
70217
70217
|
} catch (h) {
|
|
70218
70218
|
return e.destroy(h);
|
|
70219
70219
|
}
|
|
70220
|
-
e.emit(
|
|
70220
|
+
e.emit(io.FILE, u);
|
|
70221
70221
|
};
|
|
70222
70222
|
let n;
|
|
70223
70223
|
try {
|
|
@@ -70263,7 +70263,7 @@ function x4(e, t, r, n) {
|
|
|
70263
70263
|
var Di = {};
|
|
70264
70264
|
Object.defineProperty(Di, "__esModule", { value: !0 });
|
|
70265
70265
|
Di.GridFSBucketWriteStream = void 0;
|
|
70266
|
-
const z4 =
|
|
70266
|
+
const z4 = ao, Wl = pe, Gl = tt, vt = Q, V4 = Te, _c = ne(), W4 = ct();
|
|
70267
70267
|
class G4 extends z4.Writable {
|
|
70268
70268
|
/**
|
|
70269
70269
|
* @param bucket - Handle for this stream's corresponding bucket
|
|
@@ -70378,7 +70378,7 @@ function w1(e, t) {
|
|
|
70378
70378
|
if (e.state.streamEnd && e.state.outstandingRequests === 0 && !e.state.errored) {
|
|
70379
70379
|
e.done = !0;
|
|
70380
70380
|
const i = K4(e.id, e.length, e.chunkSizeBytes, e.filename, e.options.metadata);
|
|
70381
|
-
if (
|
|
70381
|
+
if (oo(e, t))
|
|
70382
70382
|
return;
|
|
70383
70383
|
const o = (r = e.timeoutContext) == null ? void 0 : r.remainingTimeMS;
|
|
70384
70384
|
if (o != null && o <= 0)
|
|
@@ -70427,7 +70427,7 @@ function K4(e, t, r, n, i) {
|
|
|
70427
70427
|
}
|
|
70428
70428
|
function Y4(e, t, r, n) {
|
|
70429
70429
|
var a, E;
|
|
70430
|
-
if (
|
|
70430
|
+
if (oo(e, n))
|
|
70431
70431
|
return;
|
|
70432
70432
|
const i = Buffer.isBuffer(t) ? t : Buffer.from(t, r);
|
|
70433
70433
|
if (e.length += i.length, e.pos + i.length < e.chunkSizeBytes) {
|
|
@@ -70444,7 +70444,7 @@ function Y4(e, t, r, n) {
|
|
|
70444
70444
|
const m = (a = e.timeoutContext) == null ? void 0 : a.remainingTimeMS;
|
|
70445
70445
|
if (m != null && m <= 0)
|
|
70446
70446
|
return jr(e, new vt.MongoOperationTimeoutError(`Upload timed out after ${(E = e.timeoutContext) == null ? void 0 : E.timeoutMS}ms`), n);
|
|
70447
|
-
if (++e.state.outstandingRequests, ++s,
|
|
70447
|
+
if (++e.state.outstandingRequests, ++s, oo(e, n))
|
|
70448
70448
|
return;
|
|
70449
70449
|
e.chunks.insertOne(g, { writeConcern: e.writeConcern, timeoutMS: m }).then(() => {
|
|
70450
70450
|
--e.state.outstandingRequests, --s, s || w1(e, n);
|
|
@@ -70460,7 +70460,7 @@ function X4(e, t) {
|
|
|
70460
70460
|
const r = Buffer.alloc(e.pos);
|
|
70461
70461
|
e.bufToStore.copy(r, 0, 0, e.pos);
|
|
70462
70462
|
const n = ql(e.id, e.n, r);
|
|
70463
|
-
if (
|
|
70463
|
+
if (oo(e, t))
|
|
70464
70464
|
return;
|
|
70465
70465
|
const i = (o = e.timeoutContext) == null ? void 0 : o.remainingTimeMS;
|
|
70466
70466
|
if (i != null && i <= 0)
|
|
@@ -70469,12 +70469,12 @@ function X4(e, t) {
|
|
|
70469
70469
|
--e.state.outstandingRequests, w1(e, t);
|
|
70470
70470
|
}, (c) => jr(e, c, t));
|
|
70471
70471
|
}
|
|
70472
|
-
function
|
|
70472
|
+
function oo(e, t) {
|
|
70473
70473
|
return e.state.aborted ? (queueMicrotask(() => t(new vt.MongoAPIError("Stream has been aborted"))), !0) : !1;
|
|
70474
70474
|
}
|
|
70475
|
-
Object.defineProperty(
|
|
70476
|
-
|
|
70477
|
-
const
|
|
70475
|
+
Object.defineProperty(es, "__esModule", { value: !0 });
|
|
70476
|
+
es.GridFSBucket = void 0;
|
|
70477
|
+
const a1 = Q, J4 = Je, Dc = Te, ji = ne(), Q4 = ct(), Tc = _i, Bc = Di, Z4 = {
|
|
70478
70478
|
bucketName: "fs",
|
|
70479
70479
|
chunkSizeBytes: 255 * 1024
|
|
70480
70480
|
}, Mu = class Mu extends J4.TypedEventEmitter {
|
|
@@ -70538,9 +70538,9 @@ const c1 = Q, J4 = Je, Dc = Te, ji = ne(), Q4 = ct(), Tc = _i, Bc = Di, Z4 = {
|
|
|
70538
70538
|
}));
|
|
70539
70539
|
const { deletedCount: o } = await this.s._filesCollection.deleteOne({ _id: t }, { timeoutMS: i == null ? void 0 : i.remainingTimeMS }), u = i == null ? void 0 : i.remainingTimeMS;
|
|
70540
70540
|
if (u != null && u <= 0)
|
|
70541
|
-
throw new
|
|
70541
|
+
throw new a1.MongoOperationTimeoutError(`Timed out after ${n}ms`);
|
|
70542
70542
|
if (await this.s._chunksCollection.deleteMany({ files_id: t }, { timeoutMS: u }), o === 0)
|
|
70543
|
-
throw new
|
|
70543
|
+
throw new a1.MongoRuntimeError(`File not found for id ${t}`);
|
|
70544
70544
|
}
|
|
70545
70545
|
/** Convenience wrapper around find on the files collection */
|
|
70546
70546
|
find(t = {}, r = {}) {
|
|
@@ -70566,7 +70566,7 @@ const c1 = Q, J4 = Je, Dc = Te, ji = ne(), Q4 = ct(), Tc = _i, Bc = Di, Z4 = {
|
|
|
70566
70566
|
async rename(t, r, n) {
|
|
70567
70567
|
const i = { _id: t }, o = { $set: { filename: r } }, { matchedCount: u } = await this.s._filesCollection.updateOne(i, o, n);
|
|
70568
70568
|
if (u === 0)
|
|
70569
|
-
throw new
|
|
70569
|
+
throw new a1.MongoRuntimeError(`File with id ${t} not found`);
|
|
70570
70570
|
}
|
|
70571
70571
|
/** Removes this bucket's files collection, followed by its chunks collection. */
|
|
70572
70572
|
async drop(t) {
|
|
@@ -70585,9 +70585,9 @@ const c1 = Q, J4 = Je, Dc = Te, ji = ne(), Q4 = ct(), Tc = _i, Bc = Di, Z4 = {
|
|
|
70585
70585
|
};
|
|
70586
70586
|
Mu.INDEX = "index";
|
|
70587
70587
|
let _1 = Mu;
|
|
70588
|
-
|
|
70588
|
+
es.GridFSBucket = _1;
|
|
70589
70589
|
var bc;
|
|
70590
|
-
function
|
|
70590
|
+
function ts() {
|
|
70591
70591
|
return bc || (bc = 1, function(e) {
|
|
70592
70592
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MongoRuntimeError = e.MongoParseError = e.MongoOperationTimeoutError = e.MongoOIDCError = e.MongoNotConnectedError = e.MongoNetworkTimeoutError = e.MongoNetworkError = e.MongoMissingDependencyError = e.MongoMissingCredentialsError = e.MongoKerberosError = e.MongoInvalidArgumentError = e.MongoGridFSStreamError = e.MongoGridFSChunkError = e.MongoGCPError = e.MongoExpiredSessionError = e.MongoError = e.MongoDriverError = e.MongoDecompressionError = e.MongoCursorInUseError = e.MongoCursorExhaustedError = e.MongoCompatibilityError = e.MongoClientClosedError = e.MongoClientBulkWriteExecutionError = e.MongoClientBulkWriteError = e.MongoClientBulkWriteCursorError = e.MongoChangeStreamError = e.MongoBatchReExecutionError = e.MongoAzureError = e.MongoAWSError = e.MongoAPIError = e.ExplainableCursor = e.ChangeStreamCursor = e.ClientEncryption = e.MongoBulkWriteError = e.UUID = e.Timestamp = e.ObjectId = e.MinKey = e.MaxKey = e.Long = e.Int32 = e.Double = e.Decimal128 = e.DBRef = e.Code = e.BSONType = e.BSONSymbol = e.BSONRegExp = e.Binary = e.BSON = void 0, e.CommandStartedEvent = e.CommandFailedEvent = e.WriteConcern = e.ReadPreference = e.ReadConcern = e.TopologyType = e.ServerType = e.ReadPreferenceMode = e.ReadConcernLevel = e.ProfilingLevel = e.ReturnDocument = e.SeverityLevel = e.MongoLoggableComponent = e.ServerApiVersion = e.ExplainVerbosity = e.MongoErrorLabel = e.CursorTimeoutMode = e.CURSOR_FLAGS = e.Compressor = e.AuthMechanism = e.GSSAPICanonicalizationValue = e.AutoEncryptionLoggerLevel = e.BatchType = e.UnorderedBulkOperation = e.OrderedBulkOperation = e.MongoClient = e.ListIndexesCursor = e.ListCollectionsCursor = e.GridFSBucketWriteStream = e.GridFSBucketReadStream = e.GridFSBucket = e.FindCursor = e.Db = e.Collection = e.ClientSession = e.ChangeStream = e.CancellationToken = e.AggregationCursor = e.Admin = e.AbstractCursor = e.MongoWriteConcernError = e.MongoUnexpectedServerResponseError = e.MongoTransactionError = e.MongoTopologyClosedError = e.MongoTailableCursorError = e.MongoSystemError = e.MongoStalePrimaryError = e.MongoServerSelectionError = e.MongoServerError = e.MongoServerClosedError = void 0, e.MongoClientAuthProviders = e.MongoCryptKMSRequestNetworkTimeoutError = e.MongoCryptInvalidArgumentError = e.MongoCryptError = e.MongoCryptCreateEncryptedCollectionError = e.MongoCryptCreateDataKeyError = e.MongoCryptAzureKMSRequestError = e.SrvPollingEvent = e.WaitingForSuitableServerEvent = e.ServerSelectionSucceededEvent = e.ServerSelectionStartedEvent = e.ServerSelectionFailedEvent = e.ServerSelectionEvent = e.TopologyOpeningEvent = e.TopologyDescriptionChangedEvent = e.TopologyClosedEvent = e.ServerOpeningEvent = e.ServerHeartbeatSucceededEvent = e.ServerHeartbeatStartedEvent = e.ServerHeartbeatFailedEvent = e.ServerDescriptionChangedEvent = e.ServerClosedEvent = e.ConnectionReadyEvent = e.ConnectionPoolReadyEvent = e.ConnectionPoolMonitoringEvent = e.ConnectionPoolCreatedEvent = e.ConnectionPoolClosedEvent = e.ConnectionPoolClearedEvent = e.ConnectionCreatedEvent = e.ConnectionClosedEvent = e.ConnectionCheckOutStartedEvent = e.ConnectionCheckOutFailedEvent = e.ConnectionCheckedOutEvent = e.ConnectionCheckedInEvent = e.CommandSucceededEvent = void 0;
|
|
70593
70593
|
const t = ei;
|
|
@@ -70634,7 +70634,7 @@ function rs() {
|
|
|
70634
70634
|
Object.defineProperty(e, "Db", { enumerable: !0, get: function() {
|
|
70635
70635
|
return h.Db;
|
|
70636
70636
|
} });
|
|
70637
|
-
const g =
|
|
70637
|
+
const g = es;
|
|
70638
70638
|
Object.defineProperty(e, "GridFSBucket", { enumerable: !0, get: function() {
|
|
70639
70639
|
return g.GridFSBucket;
|
|
70640
70640
|
} });
|
|
@@ -70800,7 +70800,7 @@ function rs() {
|
|
|
70800
70800
|
Object.defineProperty(e, "AutoEncryptionLoggerLevel", { enumerable: !0, get: function() {
|
|
70801
70801
|
return T.AutoEncryptionLoggerLevel;
|
|
70802
70802
|
} });
|
|
70803
|
-
var _ =
|
|
70803
|
+
var _ = Ro;
|
|
70804
70804
|
Object.defineProperty(e, "GSSAPICanonicalizationValue", { enumerable: !0, get: function() {
|
|
70805
70805
|
return _.GSSAPICanonicalizationValue;
|
|
70806
70806
|
} });
|
|
@@ -70808,7 +70808,7 @@ function rs() {
|
|
|
70808
70808
|
Object.defineProperty(e, "AuthMechanism", { enumerable: !0, get: function() {
|
|
70809
70809
|
return A.AuthMechanism;
|
|
70810
70810
|
} });
|
|
70811
|
-
var y =
|
|
70811
|
+
var y = Lo();
|
|
70812
70812
|
Object.defineProperty(e, "Compressor", { enumerable: !0, get: function() {
|
|
70813
70813
|
return y.Compressor;
|
|
70814
70814
|
} });
|
|
@@ -70958,9 +70958,9 @@ function rs() {
|
|
|
70958
70958
|
Object.defineProperty(e, "MongoClientAuthProviders", { enumerable: !0, get: function() {
|
|
70959
70959
|
return Ce.MongoClientAuthProviders;
|
|
70960
70960
|
} });
|
|
70961
|
-
}(
|
|
70961
|
+
}(is)), is;
|
|
70962
70962
|
}
|
|
70963
|
-
var
|
|
70963
|
+
var c1 = ts();
|
|
70964
70964
|
class $4 {
|
|
70965
70965
|
constructor(t, r, n, i) {
|
|
70966
70966
|
se(this, "client");
|
|
@@ -70973,7 +70973,7 @@ class $4 {
|
|
|
70973
70973
|
this.client = t, this.schemaMeta = r, this.context = n, this.session = i, this.dbName = t.options.dbName, this.fieldMetaMap = Object.entries(r).reduce((o, [u, c]) => (o[u] = c.columns.reduce((s, a) => (s[a.name] = a, s), {}), o), {});
|
|
70974
70974
|
}
|
|
70975
70975
|
getObjectId(t) {
|
|
70976
|
-
return new
|
|
70976
|
+
return new c1.ObjectId(t);
|
|
70977
70977
|
}
|
|
70978
70978
|
/**
|
|
70979
70979
|
* 辅助方法:安全获取集合实例
|
|
@@ -70985,7 +70985,7 @@ class $4 {
|
|
|
70985
70985
|
* 辅助方法:尝试将字符串转换为 ObjectId
|
|
70986
70986
|
*/
|
|
70987
70987
|
normalizeId(t) {
|
|
70988
|
-
return typeof t == "string" &&
|
|
70988
|
+
return typeof t == "string" && c1.ObjectId.isValid(t) ? new c1.ObjectId(t) : t;
|
|
70989
70989
|
}
|
|
70990
70990
|
/**
|
|
70991
70991
|
* 辅助方法:构建 MongoDB Sort 对象
|
|
@@ -71009,7 +71009,7 @@ class $4 {
|
|
|
71009
71009
|
}
|
|
71010
71010
|
// 将 ObjectId 转换为字符串
|
|
71011
71011
|
transformResultData(t) {
|
|
71012
|
-
return t && t2(t) ? Object.entries(t).reduce((r, [n, i]) => (
|
|
71012
|
+
return t && t2(t) ? Object.entries(t).reduce((r, [n, i]) => (n === this.idField && typeof i == "object" ? r[n] = i.toString() : r[n] = i, r), {}) : t;
|
|
71013
71013
|
}
|
|
71014
71014
|
async findUnique(t, { where: r, select: n }) {
|
|
71015
71015
|
const i = this.getCollection(t), o = Object.keys(r ?? {});
|