@mongoosejs/studio 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1324,7 +1324,7 @@ module.exports = "<div>\n <div class=\"mb-2\">\n <textarea class=\"border bo
1324
1324
 
1325
1325
  const api = __webpack_require__(/*! ../api */ "./frontend/src/api.js");
1326
1326
 
1327
- const { BSON, EJSON } = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
1327
+ const { BSON, EJSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
1328
1328
 
1329
1329
  const ObjectId = new Proxy(BSON.ObjectId, {
1330
1330
  apply(target, thisArg, argumentsList) {
@@ -1383,6 +1383,7 @@ module.exports = app => app.component('create-document', {
1383
1383
  }
1384
1384
  });
1385
1385
 
1386
+
1386
1387
  /***/ }),
1387
1388
 
1388
1389
  /***/ "./frontend/src/dashboard-result/dashboard-chart/dashboard-chart.html":
@@ -3011,7 +3012,7 @@ module.exports = "<div class=\"edit-array\">\n <textarea\n ref=\"arrayEditor
3011
3012
 
3012
3013
  const template = __webpack_require__(/*! ./edit-array.html */ "./frontend/src/edit-array/edit-array.html");
3013
3014
 
3014
- const { BSON } = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
3015
+ const { BSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
3015
3016
 
3016
3017
  const ObjectId = new Proxy(BSON.ObjectId, {
3017
3018
  apply(target, thisArg, argumentsList) {
@@ -3479,7 +3480,7 @@ module.exports = "<div class=\"edit-subdocument\">\n <textarea\n ref=\"edito
3479
3480
 
3480
3481
  const template = __webpack_require__(/*! ./edit-subdocument.html */ "./frontend/src/edit-subdocument/edit-subdocument.html");
3481
3482
 
3482
- const { BSON, EJSON } = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
3483
+ const { BSON, EJSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
3483
3484
 
3484
3485
  const ObjectId = new Proxy(BSON.ObjectId, {
3485
3486
  apply(target, thisArg, argumentsList) {
@@ -5998,7 +5999,7 @@ module.exports = "<div>\n <div class=\"mb-2\">\n <textarea class=\"borde
5998
5999
 
5999
6000
  const api = __webpack_require__(/*! ../api */ "./frontend/src/api.js");
6000
6001
 
6001
- const { BSON, EJSON } = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
6002
+ const { BSON, EJSON } = __webpack_require__(/*! mongodb/lib/bson */ "./node_modules/mongodb/lib/bson.js");
6002
6003
 
6003
6004
  const ObjectId = new Proxy(BSON.ObjectId, {
6004
6005
  apply(target, thisArg, argumentsList) {
@@ -6065,6 +6066,7 @@ module.exports = app => app.component('update-document', {
6065
6066
  }
6066
6067
  });
6067
6068
 
6069
+
6068
6070
  /***/ }),
6069
6071
 
6070
6072
  /***/ "./node_modules/axios/dist/browser/axios.cjs":
@@ -9264,6 +9266,7 @@ __webpack_require__.r(__webpack_exports__);
9264
9266
  /* harmony export */ ObjectId: () => (/* binding */ ObjectId),
9265
9267
  /* harmony export */ Timestamp: () => (/* binding */ Timestamp),
9266
9268
  /* harmony export */ UUID: () => (/* binding */ UUID),
9269
+ /* harmony export */ bsonType: () => (/* binding */ bsonType),
9267
9270
  /* harmony export */ calculateObjectSize: () => (/* binding */ calculateObjectSize),
9268
9271
  /* harmony export */ deserialize: () => (/* binding */ deserialize),
9269
9272
  /* harmony export */ deserializeStream: () => (/* binding */ deserializeStream),
@@ -9319,7 +9322,7 @@ function getStylizeFunction(options) {
9319
9322
  }
9320
9323
  }
9321
9324
 
9322
- const BSON_MAJOR_VERSION = 6;
9325
+ const BSON_MAJOR_VERSION = 7;
9323
9326
  const BSON_VERSION_SYMBOL = Symbol.for('@@mdb.bson.version');
9324
9327
  const BSON_INT32_MAX = 0x7fffffff;
9325
9328
  const BSON_INT32_MIN = -2147483648;
@@ -9414,6 +9417,7 @@ class BSONOffsetError extends BSONError {
9414
9417
  get name() {
9415
9418
  return 'BSONOffsetError';
9416
9419
  }
9420
+ offset;
9417
9421
  constructor(message, offset, options) {
9418
9422
  super(`${message}. offset: ${offset}`, options);
9419
9423
  this.offset = offset;
@@ -9490,7 +9494,18 @@ function tryWriteBasicLatin(destination, source, offset) {
9490
9494
  function nodejsMathRandomBytes(byteLength) {
9491
9495
  return nodeJsByteUtils.fromNumberArray(Array.from({ length: byteLength }, () => Math.floor(Math.random() * 256)));
9492
9496
  }
9493
- const nodejsRandomBytes = nodejsMathRandomBytes;
9497
+ function nodejsSecureRandomBytes(byteLength) {
9498
+ return crypto.getRandomValues(nodeJsByteUtils.allocate(byteLength));
9499
+ }
9500
+ const nodejsRandomBytes = (() => {
9501
+ const { crypto } = globalThis;
9502
+ if (crypto != null && typeof crypto.getRandomValues === 'function') {
9503
+ return nodejsSecureRandomBytes;
9504
+ }
9505
+ else {
9506
+ return nodejsMathRandomBytes;
9507
+ }
9508
+ })();
9494
9509
  const nodeJsByteUtils = {
9495
9510
  toLocalBufferType(potentialBuffer) {
9496
9511
  if (Buffer.isBuffer(potentialBuffer)) {
@@ -9706,7 +9721,11 @@ const webByteUtils = {
9706
9721
  const hasGlobalBuffer = typeof Buffer === 'function' && Buffer.prototype?._isBuffer !== true;
9707
9722
  const ByteUtils = hasGlobalBuffer ? nodeJsByteUtils : webByteUtils;
9708
9723
 
9724
+ const bsonType = Symbol.for('@@mdb.bson.type');
9709
9725
  class BSONValue {
9726
+ get [bsonType]() {
9727
+ return this._bsontype;
9728
+ }
9710
9729
  get [BSON_VERSION_SYMBOL]() {
9711
9730
  return BSON_MAJOR_VERSION;
9712
9731
  }
@@ -9757,7 +9776,7 @@ const NumberUtils = {
9757
9776
  source[offset + 1] * 256 +
9758
9777
  source[offset + 2] * 65536 +
9759
9778
  source[offset + 3] * 16777216);
9760
- return (hi << BigInt(32)) + lo;
9779
+ return (hi << 32n) + lo;
9761
9780
  },
9762
9781
  getFloat64LE: isBigEndian
9763
9782
  ? (source, offset) => {
@@ -9803,7 +9822,7 @@ const NumberUtils = {
9803
9822
  return 4;
9804
9823
  },
9805
9824
  setBigInt64LE(destination, offset, value) {
9806
- const mask32bits = BigInt(0xffff_ffff);
9825
+ const mask32bits = 0xffffffffn;
9807
9826
  let lo = Number(value & mask32bits);
9808
9827
  destination[offset] = lo;
9809
9828
  lo >>= 8;
@@ -9812,7 +9831,7 @@ const NumberUtils = {
9812
9831
  destination[offset + 2] = lo;
9813
9832
  lo >>= 8;
9814
9833
  destination[offset + 3] = lo;
9815
- let hi = Number((value >> BigInt(32)) & mask32bits);
9834
+ let hi = Number((value >> 32n) & mask32bits);
9816
9835
  destination[offset + 4] = hi;
9817
9836
  hi >>= 8;
9818
9837
  destination[offset + 5] = hi;
@@ -9853,6 +9872,27 @@ class Binary extends BSONValue {
9853
9872
  get _bsontype() {
9854
9873
  return 'Binary';
9855
9874
  }
9875
+ static BSON_BINARY_SUBTYPE_DEFAULT = 0;
9876
+ static BUFFER_SIZE = 256;
9877
+ static SUBTYPE_DEFAULT = 0;
9878
+ static SUBTYPE_FUNCTION = 1;
9879
+ static SUBTYPE_BYTE_ARRAY = 2;
9880
+ static SUBTYPE_UUID_OLD = 3;
9881
+ static SUBTYPE_UUID = 4;
9882
+ static SUBTYPE_MD5 = 5;
9883
+ static SUBTYPE_ENCRYPTED = 6;
9884
+ static SUBTYPE_COLUMN = 7;
9885
+ static SUBTYPE_SENSITIVE = 8;
9886
+ static SUBTYPE_VECTOR = 9;
9887
+ static SUBTYPE_USER_DEFINED = 128;
9888
+ static VECTOR_TYPE = Object.freeze({
9889
+ Int8: 0x03,
9890
+ Float32: 0x27,
9891
+ PackedBit: 0x10
9892
+ });
9893
+ buffer;
9894
+ sub_type;
9895
+ position;
9856
9896
  constructor(buffer, subType) {
9857
9897
  super();
9858
9898
  if (!(buffer == null) &&
@@ -10112,24 +10152,6 @@ class Binary extends BSONValue {
10112
10152
  return new this(bytes, Binary.SUBTYPE_VECTOR);
10113
10153
  }
10114
10154
  }
10115
- Binary.BSON_BINARY_SUBTYPE_DEFAULT = 0;
10116
- Binary.BUFFER_SIZE = 256;
10117
- Binary.SUBTYPE_DEFAULT = 0;
10118
- Binary.SUBTYPE_FUNCTION = 1;
10119
- Binary.SUBTYPE_BYTE_ARRAY = 2;
10120
- Binary.SUBTYPE_UUID_OLD = 3;
10121
- Binary.SUBTYPE_UUID = 4;
10122
- Binary.SUBTYPE_MD5 = 5;
10123
- Binary.SUBTYPE_ENCRYPTED = 6;
10124
- Binary.SUBTYPE_COLUMN = 7;
10125
- Binary.SUBTYPE_SENSITIVE = 8;
10126
- Binary.SUBTYPE_VECTOR = 9;
10127
- Binary.SUBTYPE_USER_DEFINED = 128;
10128
- Binary.VECTOR_TYPE = Object.freeze({
10129
- Int8: 0x03,
10130
- Float32: 0x27,
10131
- PackedBit: 0x10
10132
- });
10133
10155
  function validateBinaryVector(vector) {
10134
10156
  if (vector.sub_type !== Binary.SUBTYPE_VECTOR)
10135
10157
  return;
@@ -10266,6 +10288,8 @@ class Code extends BSONValue {
10266
10288
  get _bsontype() {
10267
10289
  return 'Code';
10268
10290
  }
10291
+ code;
10292
+ scope;
10269
10293
  constructor(code, scope) {
10270
10294
  super();
10271
10295
  this.code = code.toString();
@@ -10311,6 +10335,10 @@ class DBRef extends BSONValue {
10311
10335
  get _bsontype() {
10312
10336
  return 'DBRef';
10313
10337
  }
10338
+ collection;
10339
+ oid;
10340
+ db;
10341
+ fields;
10314
10342
  constructor(collection, oid, db, fields) {
10315
10343
  super();
10316
10344
  const parts = collection.split('.');
@@ -10420,6 +10448,9 @@ class Long extends BSONValue {
10420
10448
  get __isLong__() {
10421
10449
  return true;
10422
10450
  }
10451
+ high;
10452
+ low;
10453
+ unsigned;
10423
10454
  constructor(lowOrValue = 0, highOrUnsigned, unsigned) {
10424
10455
  super();
10425
10456
  const unsignedBool = typeof highOrUnsigned === 'boolean' ? highOrUnsigned : Boolean(unsigned);
@@ -10433,6 +10464,15 @@ class Long extends BSONValue {
10433
10464
  this.high = res.high;
10434
10465
  this.unsigned = res.unsigned;
10435
10466
  }
10467
+ static TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
10468
+ static MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
10469
+ static ZERO = Long.fromInt(0);
10470
+ static UZERO = Long.fromInt(0, true);
10471
+ static ONE = Long.fromInt(1);
10472
+ static UONE = Long.fromInt(1, true);
10473
+ static NEG_ONE = Long.fromInt(-1);
10474
+ static MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
10475
+ static MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
10436
10476
  static fromBits(lowBits, highBits, unsigned) {
10437
10477
  return new Long(lowBits, highBits, unsigned);
10438
10478
  }
@@ -10473,7 +10513,7 @@ class Long extends BSONValue {
10473
10513
  return Long.MAX_UNSIGNED_VALUE;
10474
10514
  }
10475
10515
  else {
10476
- if (value <= -9223372036854776e3)
10516
+ if (value <= -TWO_PWR_63_DBL)
10477
10517
  return Long.MIN_VALUE;
10478
10518
  if (value + 1 >= TWO_PWR_63_DBL)
10479
10519
  return Long.MAX_VALUE;
@@ -10483,8 +10523,8 @@ class Long extends BSONValue {
10483
10523
  return Long.fromBits(value % TWO_PWR_32_DBL | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
10484
10524
  }
10485
10525
  static fromBigInt(value, unsigned) {
10486
- const FROM_BIGINT_BIT_MASK = BigInt(0xffffffff);
10487
- const FROM_BIGINT_BIT_SHIFT = BigInt(32);
10526
+ const FROM_BIGINT_BIT_MASK = 0xffffffffn;
10527
+ const FROM_BIGINT_BIT_SHIFT = 32n;
10488
10528
  return new Long(Number(value & FROM_BIGINT_BIT_MASK), Number((value >> FROM_BIGINT_BIT_SHIFT) & FROM_BIGINT_BIT_MASK), unsigned);
10489
10529
  }
10490
10530
  static _fromString(str, unsigned, radix) {
@@ -10517,7 +10557,7 @@ class Long extends BSONValue {
10517
10557
  static fromStringStrict(str, unsignedOrRadix, radix) {
10518
10558
  let unsigned = false;
10519
10559
  if (typeof unsignedOrRadix === 'number') {
10520
- (radix = unsignedOrRadix), (unsignedOrRadix = false);
10560
+ ((radix = unsignedOrRadix), (unsignedOrRadix = false));
10521
10561
  }
10522
10562
  else {
10523
10563
  unsigned = !!unsignedOrRadix;
@@ -10539,7 +10579,7 @@ class Long extends BSONValue {
10539
10579
  static fromString(str, unsignedOrRadix, radix) {
10540
10580
  let unsigned = false;
10541
10581
  if (typeof unsignedOrRadix === 'number') {
10542
- (radix = unsignedOrRadix), (unsignedOrRadix = false);
10582
+ ((radix = unsignedOrRadix), (unsignedOrRadix = false));
10543
10583
  }
10544
10584
  else {
10545
10585
  unsigned = !!unsignedOrRadix;
@@ -11059,15 +11099,6 @@ class Long extends BSONValue {
11059
11099
  return `new Long(${longVal}${unsignedVal})`;
11060
11100
  }
11061
11101
  }
11062
- Long.TWO_PWR_24 = Long.fromInt(TWO_PWR_24_DBL);
11063
- Long.MAX_UNSIGNED_VALUE = Long.fromBits(0xffffffff | 0, 0xffffffff | 0, true);
11064
- Long.ZERO = Long.fromInt(0);
11065
- Long.UZERO = Long.fromInt(0, true);
11066
- Long.ONE = Long.fromInt(1);
11067
- Long.UONE = Long.fromInt(1, true);
11068
- Long.NEG_ONE = Long.fromInt(-1);
11069
- Long.MAX_VALUE = Long.fromBits(0xffffffff | 0, 0x7fffffff | 0, false);
11070
- Long.MIN_VALUE = Long.fromBits(0, 0x80000000 | 0, false);
11071
11102
 
11072
11103
  const PARSE_STRING_REGEXP = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/;
11073
11104
  const PARSE_INF_REGEXP = /^(\+|-)?(Infinity|inf)$/i;
@@ -11148,6 +11179,7 @@ class Decimal128 extends BSONValue {
11148
11179
  get _bsontype() {
11149
11180
  return 'Decimal128';
11150
11181
  }
11182
+ bytes;
11151
11183
  constructor(bytes) {
11152
11184
  super();
11153
11185
  if (typeof bytes === 'string') {
@@ -11623,6 +11655,7 @@ class Double extends BSONValue {
11623
11655
  get _bsontype() {
11624
11656
  return 'Double';
11625
11657
  }
11658
+ value;
11626
11659
  constructor(value) {
11627
11660
  super();
11628
11661
  if (value instanceof Number) {
@@ -11686,6 +11719,7 @@ class Int32 extends BSONValue {
11686
11719
  get _bsontype() {
11687
11720
  return 'Int32';
11688
11721
  }
11722
+ value;
11689
11723
  constructor(value) {
11690
11724
  super();
11691
11725
  if (value instanceof Number) {
@@ -11769,6 +11803,9 @@ class ObjectId extends BSONValue {
11769
11803
  get _bsontype() {
11770
11804
  return 'ObjectId';
11771
11805
  }
11806
+ static index = Math.floor(Math.random() * 0xffffff);
11807
+ static cacheHexString;
11808
+ buffer;
11772
11809
  constructor(inputId) {
11773
11810
  super();
11774
11811
  let workingId;
@@ -11786,8 +11823,8 @@ class ObjectId extends BSONValue {
11786
11823
  else {
11787
11824
  workingId = inputId;
11788
11825
  }
11789
- if (workingId == null || typeof workingId === 'number') {
11790
- this.buffer = ObjectId.generate(typeof workingId === 'number' ? workingId : undefined);
11826
+ if (workingId == null) {
11827
+ this.buffer = ObjectId.generate();
11791
11828
  }
11792
11829
  else if (ArrayBuffer.isView(workingId) && workingId.byteLength === 12) {
11793
11830
  this.buffer = ByteUtils.toLocalBufferType(workingId);
@@ -11970,7 +12007,6 @@ class ObjectId extends BSONValue {
11970
12007
  return `new ObjectId(${inspect(this.toHexString(), options)})`;
11971
12008
  }
11972
12009
  }
11973
- ObjectId.index = Math.floor(Math.random() * 0xffffff);
11974
12010
 
11975
12011
  function internalCalculateObjectSize(object, serializeFunctions, ignoreUndefined) {
11976
12012
  let totalLength = 4 + 1;
@@ -12139,6 +12175,8 @@ class BSONRegExp extends BSONValue {
12139
12175
  get _bsontype() {
12140
12176
  return 'BSONRegExp';
12141
12177
  }
12178
+ pattern;
12179
+ options;
12142
12180
  constructor(pattern, options) {
12143
12181
  super();
12144
12182
  this.pattern = pattern;
@@ -12199,6 +12237,7 @@ class BSONSymbol extends BSONValue {
12199
12237
  get _bsontype() {
12200
12238
  return 'BSONSymbol';
12201
12239
  }
12240
+ value;
12202
12241
  constructor(value) {
12203
12242
  super();
12204
12243
  this.value = value;
@@ -12229,6 +12268,10 @@ class Timestamp extends LongWithoutOverridesClass {
12229
12268
  get _bsontype() {
12230
12269
  return 'Timestamp';
12231
12270
  }
12271
+ get [bsonType]() {
12272
+ return 'Timestamp';
12273
+ }
12274
+ static MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
12232
12275
  get i() {
12233
12276
  return this.low >>> 0;
12234
12277
  }
@@ -12308,7 +12351,6 @@ class Timestamp extends LongWithoutOverridesClass {
12308
12351
  return `new Timestamp({ t: ${t}, i: ${i} })`;
12309
12352
  }
12310
12353
  }
12311
- Timestamp.MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
12312
12354
 
12313
12355
  const JS_INT_MAX_LONG = Long.fromNumber(JS_INT_MAX);
12314
12356
  const JS_INT_MIN_LONG = Long.fromNumber(JS_INT_MIN);
@@ -13860,6 +13902,7 @@ var bson = /*#__PURE__*/Object.freeze({
13860
13902
  ObjectId: ObjectId,
13861
13903
  Timestamp: Timestamp,
13862
13904
  UUID: UUID,
13905
+ bsonType: bsonType,
13863
13906
  calculateObjectSize: calculateObjectSize,
13864
13907
  deserialize: deserialize,
13865
13908
  deserializeStream: deserializeStream,
@@ -16095,6 +16138,100 @@ var lexer = _Lexer.lex;
16095
16138
  //# sourceMappingURL=marked.cjs.map
16096
16139
 
16097
16140
 
16141
+ /***/ }),
16142
+
16143
+ /***/ "./node_modules/mongodb/lib/bson.js":
16144
+ /*!******************************************!*\
16145
+ !*** ./node_modules/mongodb/lib/bson.js ***!
16146
+ \******************************************/
16147
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
16148
+
16149
+ "use strict";
16150
+
16151
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
16152
+ exports.toUTF8 = exports.getBigInt64LE = exports.getFloat64LE = exports.getInt32LE = exports.UUID = exports.Timestamp = exports.serialize = exports.ObjectId = exports.MinKey = exports.MaxKey = exports.Long = exports.Int32 = exports.EJSON = exports.Double = exports.deserialize = exports.Decimal128 = exports.DBRef = exports.Code = exports.calculateObjectSize = exports.BSONType = exports.BSONSymbol = exports.BSONRegExp = exports.BSONError = exports.BSON = exports.Binary = void 0;
16153
+ exports.parseToElementsToArray = parseToElementsToArray;
16154
+ exports.pluckBSONSerializeOptions = pluckBSONSerializeOptions;
16155
+ exports.resolveBSONOptions = resolveBSONOptions;
16156
+ exports.parseUtf8ValidationOption = parseUtf8ValidationOption;
16157
+ /* eslint-disable no-restricted-imports */
16158
+ const bson_1 = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
16159
+ var bson_2 = __webpack_require__(/*! bson */ "./node_modules/bson/lib/bson.mjs");
16160
+ Object.defineProperty(exports, "Binary", ({ enumerable: true, get: function () { return bson_2.Binary; } }));
16161
+ Object.defineProperty(exports, "BSON", ({ enumerable: true, get: function () { return bson_2.BSON; } }));
16162
+ Object.defineProperty(exports, "BSONError", ({ enumerable: true, get: function () { return bson_2.BSONError; } }));
16163
+ Object.defineProperty(exports, "BSONRegExp", ({ enumerable: true, get: function () { return bson_2.BSONRegExp; } }));
16164
+ Object.defineProperty(exports, "BSONSymbol", ({ enumerable: true, get: function () { return bson_2.BSONSymbol; } }));
16165
+ Object.defineProperty(exports, "BSONType", ({ enumerable: true, get: function () { return bson_2.BSONType; } }));
16166
+ Object.defineProperty(exports, "calculateObjectSize", ({ enumerable: true, get: function () { return bson_2.calculateObjectSize; } }));
16167
+ Object.defineProperty(exports, "Code", ({ enumerable: true, get: function () { return bson_2.Code; } }));
16168
+ Object.defineProperty(exports, "DBRef", ({ enumerable: true, get: function () { return bson_2.DBRef; } }));
16169
+ Object.defineProperty(exports, "Decimal128", ({ enumerable: true, get: function () { return bson_2.Decimal128; } }));
16170
+ Object.defineProperty(exports, "deserialize", ({ enumerable: true, get: function () { return bson_2.deserialize; } }));
16171
+ Object.defineProperty(exports, "Double", ({ enumerable: true, get: function () { return bson_2.Double; } }));
16172
+ Object.defineProperty(exports, "EJSON", ({ enumerable: true, get: function () { return bson_2.EJSON; } }));
16173
+ Object.defineProperty(exports, "Int32", ({ enumerable: true, get: function () { return bson_2.Int32; } }));
16174
+ Object.defineProperty(exports, "Long", ({ enumerable: true, get: function () { return bson_2.Long; } }));
16175
+ Object.defineProperty(exports, "MaxKey", ({ enumerable: true, get: function () { return bson_2.MaxKey; } }));
16176
+ Object.defineProperty(exports, "MinKey", ({ enumerable: true, get: function () { return bson_2.MinKey; } }));
16177
+ Object.defineProperty(exports, "ObjectId", ({ enumerable: true, get: function () { return bson_2.ObjectId; } }));
16178
+ Object.defineProperty(exports, "serialize", ({ enumerable: true, get: function () { return bson_2.serialize; } }));
16179
+ Object.defineProperty(exports, "Timestamp", ({ enumerable: true, get: function () { return bson_2.Timestamp; } }));
16180
+ Object.defineProperty(exports, "UUID", ({ enumerable: true, get: function () { return bson_2.UUID; } }));
16181
+ function parseToElementsToArray(bytes, offset) {
16182
+ const res = bson_1.BSON.onDemand.parseToElements(bytes, offset);
16183
+ return Array.isArray(res) ? res : [...res];
16184
+ }
16185
+ exports.getInt32LE = bson_1.BSON.onDemand.NumberUtils.getInt32LE;
16186
+ exports.getFloat64LE = bson_1.BSON.onDemand.NumberUtils.getFloat64LE;
16187
+ exports.getBigInt64LE = bson_1.BSON.onDemand.NumberUtils.getBigInt64LE;
16188
+ exports.toUTF8 = bson_1.BSON.onDemand.ByteUtils.toUTF8;
16189
+ function pluckBSONSerializeOptions(options) {
16190
+ const { fieldsAsRaw, useBigInt64, promoteValues, promoteBuffers, promoteLongs, serializeFunctions, ignoreUndefined, bsonRegExp, raw, enableUtf8Validation } = options;
16191
+ return {
16192
+ fieldsAsRaw,
16193
+ useBigInt64,
16194
+ promoteValues,
16195
+ promoteBuffers,
16196
+ promoteLongs,
16197
+ serializeFunctions,
16198
+ ignoreUndefined,
16199
+ bsonRegExp,
16200
+ raw,
16201
+ enableUtf8Validation
16202
+ };
16203
+ }
16204
+ /**
16205
+ * Merge the given BSONSerializeOptions, preferring options over the parent's options, and
16206
+ * substituting defaults for values not set.
16207
+ *
16208
+ * @internal
16209
+ */
16210
+ function resolveBSONOptions(options, parent) {
16211
+ const parentOptions = parent?.bsonOptions;
16212
+ return {
16213
+ raw: options?.raw ?? parentOptions?.raw ?? false,
16214
+ useBigInt64: options?.useBigInt64 ?? parentOptions?.useBigInt64 ?? false,
16215
+ promoteLongs: options?.promoteLongs ?? parentOptions?.promoteLongs ?? true,
16216
+ promoteValues: options?.promoteValues ?? parentOptions?.promoteValues ?? true,
16217
+ promoteBuffers: options?.promoteBuffers ?? parentOptions?.promoteBuffers ?? false,
16218
+ ignoreUndefined: options?.ignoreUndefined ?? parentOptions?.ignoreUndefined ?? false,
16219
+ bsonRegExp: options?.bsonRegExp ?? parentOptions?.bsonRegExp ?? false,
16220
+ serializeFunctions: options?.serializeFunctions ?? parentOptions?.serializeFunctions ?? false,
16221
+ fieldsAsRaw: options?.fieldsAsRaw ?? parentOptions?.fieldsAsRaw ?? {},
16222
+ enableUtf8Validation: options?.enableUtf8Validation ?? parentOptions?.enableUtf8Validation ?? true
16223
+ };
16224
+ }
16225
+ /** @internal */
16226
+ function parseUtf8ValidationOption(options) {
16227
+ const enableUtf8Validation = options?.enableUtf8Validation;
16228
+ if (enableUtf8Validation === false) {
16229
+ return { utf8: false };
16230
+ }
16231
+ return { utf8: { writeErrors: false } };
16232
+ }
16233
+ //# sourceMappingURL=bson.js.map
16234
+
16098
16235
  /***/ }),
16099
16236
 
16100
16237
  /***/ "./node_modules/mpath/index.js":
@@ -16709,7 +16846,7 @@ module.exports = function stringToParts(str) {
16709
16846
  /***/ ((module) => {
16710
16847
 
16711
16848
  "use strict";
16712
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.1.8","description":"A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.","homepage":"https://studio.mongoosejs.io/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"license":"Apache-2.0","dependencies":{"@ai-sdk/openai":"2.x","@ai-sdk/anthropic":"2.x","ai":"5.x","archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"^0.2.0","marked":"15.0.12","node-inspect-extracted":"3.x","tailwindcss":"3.4.0","vanillatoasts":"^1.6.0","vue":"3.x","webpack":"5.x"},"peerDependencies":{"bson":"^5.5.1 || 6.x","express":"4.x","mongoose":"7.x || 8.x || ^9.0.0-0"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongoose":"9.x"},"scripts":{"lint":"eslint .","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js"}}');
16849
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.1.9","description":"A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.","homepage":"https://studio.mongoosejs.io/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"license":"Apache-2.0","dependencies":{"@ai-sdk/openai":"2.x","@ai-sdk/anthropic":"2.x","ai":"5.x","archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"^0.2.0","marked":"15.0.12","node-inspect-extracted":"3.x","tailwindcss":"3.4.0","vanillatoasts":"^1.6.0","vue":"3.x","webpack":"5.x"},"peerDependencies":{"mongoose":"7.x || 8.x || ^9.0.0-0"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongoose":"9.x"},"scripts":{"lint":"eslint .","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js"}}');
16713
16850
 
16714
16851
  /***/ })
16715
16852
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  const api = require('../api');
4
4
 
5
- const { BSON, EJSON } = require('bson');
5
+ const { BSON, EJSON } = require('mongodb/lib/bson');
6
6
 
7
7
  const ObjectId = new Proxy(BSON.ObjectId, {
8
8
  apply(target, thisArg, argumentsList) {
@@ -59,4 +59,4 @@ module.exports = app => app.component('create-document', {
59
59
  smartIndent: false
60
60
  });
61
61
  }
62
- });
62
+ });
@@ -2,7 +2,7 @@
2
2
 
3
3
  const template = require('./edit-array.html');
4
4
 
5
- const { BSON } = require('bson');
5
+ const { BSON } = require('mongodb/lib/bson');
6
6
 
7
7
  const ObjectId = new Proxy(BSON.ObjectId, {
8
8
  apply(target, thisArg, argumentsList) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  const template = require('./edit-subdocument.html');
4
4
 
5
- const { BSON, EJSON } = require('bson');
5
+ const { BSON, EJSON } = require('mongodb/lib/bson');
6
6
 
7
7
  const ObjectId = new Proxy(BSON.ObjectId, {
8
8
  apply(target, thisArg, argumentsList) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  const api = require('../api');
4
4
 
5
- const { BSON, EJSON } = require('bson');
5
+ const { BSON, EJSON } = require('mongodb/lib/bson');
6
6
 
7
7
  const ObjectId = new Proxy(BSON.ObjectId, {
8
8
  apply(target, thisArg, argumentsList) {
@@ -67,4 +67,4 @@ module.exports = app => app.component('update-document', {
67
67
  smartIndent: false
68
68
  });
69
69
  }
70
- });
70
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.",
5
5
  "homepage": "https://studio.mongoosejs.io/",
6
6
  "repository": {
@@ -24,8 +24,6 @@
24
24
  "webpack": "5.x"
25
25
  },
26
26
  "peerDependencies": {
27
- "bson": "^5.5.1 || 6.x",
28
- "express": "4.x",
29
27
  "mongoose": "7.x || 8.x || ^9.0.0-0"
30
28
  },
31
29
  "devDependencies": {