ueberdb2 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +29 -19
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -114592,7 +114592,7 @@ bson$1.serialize = serialize$2;
|
|
|
114592
114592
|
bson$1.serializeWithBufferAndIndex = serializeWithBufferAndIndex;
|
|
114593
114593
|
bson$1.setInternalBufferSize = setInternalBufferSize;(function (exports) {
|
|
114594
114594
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
114595
|
-
exports.resolveBSONOptions = exports.pluckBSONSerializeOptions = exports.toUTF8 = exports.getBigInt64LE = exports.getFloat64LE = exports.getInt32LE = exports.parseToElementsToArray = 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;
|
|
114595
|
+
exports.parseUtf8ValidationOption = exports.resolveBSONOptions = exports.pluckBSONSerializeOptions = exports.toUTF8 = exports.getBigInt64LE = exports.getFloat64LE = exports.getInt32LE = exports.parseToElementsToArray = 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;
|
|
114596
114596
|
const bson_1 = bson$1;
|
|
114597
114597
|
var bson_2 = bson$1;
|
|
114598
114598
|
Object.defineProperty(exports, "Binary", { enumerable: true, get: function () { return bson_2.Binary; } });
|
|
@@ -114663,6 +114663,15 @@ bson$1.setInternalBufferSize = setInternalBufferSize;(function (exports) {
|
|
|
114663
114663
|
};
|
|
114664
114664
|
}
|
|
114665
114665
|
exports.resolveBSONOptions = resolveBSONOptions;
|
|
114666
|
+
/** @internal */
|
|
114667
|
+
function parseUtf8ValidationOption(options) {
|
|
114668
|
+
const enableUtf8Validation = options?.enableUtf8Validation;
|
|
114669
|
+
if (enableUtf8Validation === false) {
|
|
114670
|
+
return { utf8: false };
|
|
114671
|
+
}
|
|
114672
|
+
return { utf8: { writeErrors: false } };
|
|
114673
|
+
}
|
|
114674
|
+
exports.parseUtf8ValidationOption = parseUtf8ValidationOption;
|
|
114666
114675
|
|
|
114667
114676
|
} (bson$2));var execute_operation = {};var error$4 = {};(function (exports) {
|
|
114668
114677
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -116840,7 +116849,7 @@ class OnDemandDocument {
|
|
|
116840
116849
|
* @param options - BSON deserialization options
|
|
116841
116850
|
*/
|
|
116842
116851
|
toObject(options) {
|
|
116843
|
-
return bson_1$e.
|
|
116852
|
+
return (0, bson_1$e.deserialize)(this.bson, {
|
|
116844
116853
|
...options,
|
|
116845
116854
|
index: this.offset,
|
|
116846
116855
|
allowObjectSmallerThanBufferSize: true
|
|
@@ -116924,7 +116933,8 @@ function requireResponses () {
|
|
|
116924
116933
|
return (this.get('recoveryToken', bson_1.BSONType.object)?.toObject({
|
|
116925
116934
|
promoteValues: false,
|
|
116926
116935
|
promoteLongs: false,
|
|
116927
|
-
promoteBuffers: false
|
|
116936
|
+
promoteBuffers: false,
|
|
116937
|
+
validation: { utf8: true }
|
|
116928
116938
|
}) ?? null);
|
|
116929
116939
|
}
|
|
116930
116940
|
/**
|
|
@@ -116969,17 +116979,10 @@ function requireResponses () {
|
|
|
116969
116979
|
toObject(options) {
|
|
116970
116980
|
const exactBSONOptions = {
|
|
116971
116981
|
...(0, bson_1.pluckBSONSerializeOptions)(options ?? {}),
|
|
116972
|
-
validation:
|
|
116982
|
+
validation: (0, bson_1.parseUtf8ValidationOption)(options)
|
|
116973
116983
|
};
|
|
116974
116984
|
return super.toObject(exactBSONOptions);
|
|
116975
116985
|
}
|
|
116976
|
-
parseBsonSerializationOptions(options) {
|
|
116977
|
-
const enableUtf8Validation = options?.enableUtf8Validation;
|
|
116978
|
-
if (enableUtf8Validation === false) {
|
|
116979
|
-
return { utf8: false };
|
|
116980
|
-
}
|
|
116981
|
-
return { utf8: { writeErrors: false } };
|
|
116982
|
-
}
|
|
116983
116986
|
}
|
|
116984
116987
|
// {ok:1}
|
|
116985
116988
|
MongoDBResponse.empty = new MongoDBResponse(new Uint8Array([13, 0, 0, 0, 16, 111, 107, 0, 1, 0, 0, 0, 0]));
|
|
@@ -117048,7 +117051,8 @@ function requireResponses () {
|
|
|
117048
117051
|
return (this.cursor.get('postBatchResumeToken', bson_1.BSONType.object)?.toObject({
|
|
117049
117052
|
promoteValues: false,
|
|
117050
117053
|
promoteLongs: false,
|
|
117051
|
-
promoteBuffers: false
|
|
117054
|
+
promoteBuffers: false,
|
|
117055
|
+
validation: { utf8: true }
|
|
117052
117056
|
}) ?? null);
|
|
117053
117057
|
}
|
|
117054
117058
|
shift(options) {
|
|
@@ -122900,6 +122904,12 @@ sessions.updateSessionFromResponse = updateSessionFromResponse;(function (export
|
|
|
122900
122904
|
else {
|
|
122901
122905
|
this.cursorSession = this.cursorClient.startSession({ owner: this, explicit: false });
|
|
122902
122906
|
}
|
|
122907
|
+
this.deserializationOptions = {
|
|
122908
|
+
...this.cursorOptions,
|
|
122909
|
+
validation: {
|
|
122910
|
+
utf8: options?.enableUtf8Validation === false ? false : true
|
|
122911
|
+
}
|
|
122912
|
+
};
|
|
122903
122913
|
}
|
|
122904
122914
|
/**
|
|
122905
122915
|
* The cursor has no id until it receives a response from the initial cursor creating command.
|
|
@@ -122964,7 +122974,7 @@ sessions.updateSessionFromResponse = updateSessionFromResponse;(function (export
|
|
|
122964
122974
|
const bufferedDocs = [];
|
|
122965
122975
|
const documentsToRead = Math.min(number ?? this.documents?.length ?? 0, this.documents?.length ?? 0);
|
|
122966
122976
|
for (let count = 0; count < documentsToRead; count++) {
|
|
122967
|
-
const document = this.documents?.shift(this.
|
|
122977
|
+
const document = this.documents?.shift(this.deserializationOptions);
|
|
122968
122978
|
if (document != null) {
|
|
122969
122979
|
bufferedDocs.push(document);
|
|
122970
122980
|
}
|
|
@@ -123049,7 +123059,7 @@ sessions.updateSessionFromResponse = updateSessionFromResponse;(function (export
|
|
|
123049
123059
|
throw new error_1.MongoCursorExhaustedError();
|
|
123050
123060
|
}
|
|
123051
123061
|
do {
|
|
123052
|
-
const doc = this.documents?.shift(this.
|
|
123062
|
+
const doc = this.documents?.shift(this.deserializationOptions);
|
|
123053
123063
|
if (doc != null) {
|
|
123054
123064
|
if (this.transform != null)
|
|
123055
123065
|
return await this.transformDocument(doc);
|
|
@@ -123066,14 +123076,14 @@ sessions.updateSessionFromResponse = updateSessionFromResponse;(function (export
|
|
|
123066
123076
|
if (this.cursorId === bson_1.Long.ZERO) {
|
|
123067
123077
|
throw new error_1.MongoCursorExhaustedError();
|
|
123068
123078
|
}
|
|
123069
|
-
let doc = this.documents?.shift(this.
|
|
123079
|
+
let doc = this.documents?.shift(this.deserializationOptions);
|
|
123070
123080
|
if (doc != null) {
|
|
123071
123081
|
if (this.transform != null)
|
|
123072
123082
|
return await this.transformDocument(doc);
|
|
123073
123083
|
return doc;
|
|
123074
123084
|
}
|
|
123075
123085
|
await this.fetchBatch();
|
|
123076
|
-
doc = this.documents?.shift(this.
|
|
123086
|
+
doc = this.documents?.shift(this.deserializationOptions);
|
|
123077
123087
|
if (doc != null) {
|
|
123078
123088
|
if (this.transform != null)
|
|
123079
123089
|
return await this.transformDocument(doc);
|
|
@@ -123558,7 +123568,7 @@ class AggregationCursor extends abstract_cursor_1$4.AbstractCursor {
|
|
|
123558
123568
|
...this.aggregateOptions,
|
|
123559
123569
|
...this.cursorOptions,
|
|
123560
123570
|
explain: verbosity ?? true
|
|
123561
|
-
}))).shift(this.
|
|
123571
|
+
}))).shift(this.deserializationOptions);
|
|
123562
123572
|
}
|
|
123563
123573
|
addStage(stage) {
|
|
123564
123574
|
this.throwIfInitialized();
|
|
@@ -124037,7 +124047,7 @@ class FindCursor extends abstract_cursor_1$3.AbstractCursor {
|
|
|
124037
124047
|
...this.findOptions,
|
|
124038
124048
|
...this.cursorOptions,
|
|
124039
124049
|
explain: verbosity ?? true
|
|
124040
|
-
}))).shift(this.
|
|
124050
|
+
}))).shift(this.deserializationOptions);
|
|
124041
124051
|
}
|
|
124042
124052
|
/** Set the cursor query */
|
|
124043
124053
|
filter(filter) {
|
|
@@ -179414,7 +179424,7 @@ function requireLib$3 () {
|
|
|
179414
179424
|
} (lib$7));
|
|
179415
179425
|
return lib$7;
|
|
179416
179426
|
}var client_metadata = {};var name$5 = "mongodb";
|
|
179417
|
-
var version$6 = "6.8.
|
|
179427
|
+
var version$6 = "6.8.1";
|
|
179418
179428
|
var description$2 = "The official MongoDB driver for Node.js";
|
|
179419
179429
|
var main$3 = "lib/index.js";
|
|
179420
179430
|
var files$2 = [
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"eslint": "^8.57.0",
|
|
42
42
|
"eslint-config-etherpad": "^4.0.4",
|
|
43
43
|
"eslint-plugin-import": "^2.30.0",
|
|
44
|
-
"mongodb": "^6.8.
|
|
44
|
+
"mongodb": "^6.8.1",
|
|
45
45
|
"mssql": "^11.0.1",
|
|
46
46
|
"mysql2": "^3.11.0",
|
|
47
47
|
"nano": "^10.1.4",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"url": "https://github.com/ether/ueberDB.git"
|
|
66
66
|
},
|
|
67
67
|
"main": "./dist/index.js",
|
|
68
|
-
"version": "5.0.
|
|
68
|
+
"version": "5.0.2",
|
|
69
69
|
"bugs": {
|
|
70
70
|
"url": "https://github.com/ether/ueberDB/issues"
|
|
71
71
|
},
|