@lossless.org/client 1.18.1 → 1.18.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_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/nosqldb/classes.bsonassertion.d.ts +6 -2
- package/dist_ts/nosqldb/classes.bsonassertion.js +9 -7
- package/dist_ts/nosqldb/classes.exactpersistence.d.ts +41 -5
- package/dist_ts/nosqldb/classes.exactpersistence.js +133 -90
- package/dist_ts/nosqldb/classes.ordinarypersistence.js +2 -2
- package/package.json +4 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/nosqldb/classes.bsonassertion.ts +9 -6
- package/ts/nosqldb/classes.exactpersistence.ts +183 -144
- package/ts/nosqldb/classes.ordinarypersistence.ts +2 -1
|
@@ -94,7 +94,8 @@ export const validateOrdinaryStoredDocument = (
|
|
|
94
94
|
: !(clone._id instanceof plugins.mongodb.ObjectId)) throw invalid();
|
|
95
95
|
if (policyArg.timestamps === 'managed' &&
|
|
96
96
|
(typeof clone._createdAt !== 'string' || typeof clone._updatedAt !== 'string')) throw invalid();
|
|
97
|
-
assertBsonWithoutMutation(clone,
|
|
97
|
+
assertBsonWithoutMutation(clone, plugins.mongodb.BSON.serialize(clone),
|
|
98
|
+
(documentArg) => plugins.mongodb.BSON.serialize(documentArg), policyArg.assertStoredDocument, invalid);
|
|
98
99
|
// The assertion must not retain authority to mutate the returned document.
|
|
99
100
|
return plugins.mongodb.BSON.deserialize(plugins.mongodb.BSON.serialize(clone));
|
|
100
101
|
};
|