@dynamatix/gb-schemas 2.20.2 → 2.20.4
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.
|
@@ -117,6 +117,10 @@ export declare class EncryptionPlugin {
|
|
|
117
117
|
* keys, parent-object values containing encrypted leaves, and full
|
|
118
118
|
* replacement documents (updates without atomic operators).
|
|
119
119
|
*
|
|
120
|
+
* `null`/`undefined` operator values pass through untouched so callers
|
|
121
|
+
* can clear encrypted fields (`$set: { field: null }`) — libmongocrypt
|
|
122
|
+
* rejects those BSON types for explicit encryption.
|
|
123
|
+
*
|
|
120
124
|
* @param update - The mutable update object from `Query.getUpdate()`.
|
|
121
125
|
* @param paths - Encrypted dot paths of the schema.
|
|
122
126
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption.plugin.d.ts","sourceRoot":"","sources":["../../../shared/encryption/encryption.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AAuBnD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAgB;IACzB,OAAO;IAEP;;;;;;;;;;;;;;OAcG;WACW,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAczC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAc5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAiBjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgChC
|
|
1
|
+
{"version":3,"file":"encryption.plugin.d.ts","sourceRoot":"","sources":["../../../shared/encryption/encryption.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AAuBnD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAgB;IACzB,OAAO;IAEP;;;;;;;;;;;;;;OAcG;WACW,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAczC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAc5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAiBjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgChC;;;;;;;;;;;;;;;OAeG;mBACkB,aAAa;IA6BlC;;;;;;;;;;;;OAYG;mBACkB,eAAe;IAiBpC;;;;;;;;;;OAUG;mBACkB,iBAAiB;IAQtC;;;;;;;;;;;OAWG;mBACkB,gBAAgB;IAarC;;;;;;;;;;;OAWG;mBACkB,cAAc;IAuBnC;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAO9B"}
|
|
@@ -174,6 +174,10 @@ export class EncryptionPlugin {
|
|
|
174
174
|
* keys, parent-object values containing encrypted leaves, and full
|
|
175
175
|
* replacement documents (updates without atomic operators).
|
|
176
176
|
*
|
|
177
|
+
* `null`/`undefined` operator values pass through untouched so callers
|
|
178
|
+
* can clear encrypted fields (`$set: { field: null }`) — libmongocrypt
|
|
179
|
+
* rejects those BSON types for explicit encryption.
|
|
180
|
+
*
|
|
177
181
|
* @param update - The mutable update object from `Query.getUpdate()`.
|
|
178
182
|
* @param paths - Encrypted dot paths of the schema.
|
|
179
183
|
* @example
|
|
@@ -194,6 +198,9 @@ export class EncryptionPlugin {
|
|
|
194
198
|
continue;
|
|
195
199
|
}
|
|
196
200
|
for (const [key, value] of Object.entries(target)) {
|
|
201
|
+
if (value === null || value === undefined) {
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
197
204
|
for (const path of paths) {
|
|
198
205
|
if (key === path) {
|
|
199
206
|
target[key] = await transform(value);
|