Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongodb-client-encryption

Package Overview
Dependencies
Maintainers
6
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-client-encryption - npm Package Compare versions

Comparing version 2.2.0-alpha.3 to 2.2.0-alpha.4

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## [2.2.0-alpha.4](https://github.com/mongodb/libmongocrypt/compare/node-v2.2.0-alpha.3...node-v2.2.0-alpha.4) (2022-07-06)
## [2.2.0-alpha.3](https://github.com/mongodb/libmongocrypt/compare/node-v2.2.0-alpha.2...node-v2.2.0-alpha.3) (2022-06-23)

@@ -7,0 +9,0 @@

23

index.d.ts

@@ -313,3 +313,4 @@ import type { Document, Binary } from 'bson';

export interface ClientEncryptionRewrapManyDataKeyResult {
bulkWriteResult: BulkWriteResult;
/** The result of rewrapping data keys. If unset, no keys matched the filter. */
bulkWriteResult?: BulkWriteResult;
}

@@ -341,9 +342,6 @@

/** @experimental */
indexKeyId?: Binary;
/** @experimental */
/** @experimental Public Technical Preview: The contention factor. */
contentionFactor?: bigint | number;
/** @experimental */
/** @experimental Public Technical Preview: The query type supported */
queryType?: 'equality';

@@ -381,15 +379,2 @@ }

/** Alias for @see createDataKey. */
createKey(
provider: ClientEncryptionDataKeyProvider,
callback: ClientEncryptionCreateDataKeyCallback
): void;
/** Alias for @see createDataKey. */
createKey(
provider: ClientEncryptionDataKeyProvider,
options: ClientEncryptionCreateDataKeyProviderOptions,
callback: ClientEncryptionCreateDataKeyCallback
): void;
/**

@@ -396,0 +381,0 @@ * Creates a data key used for explicit encryption and inserts it into the key vault namespace

@@ -173,6 +173,2 @@ 'use strict';

*/
createKey(provider, options, callback) {
return this.createDataKey(provider, options, callback);
}
createDataKey(provider, options, callback) {

@@ -286,8 +282,21 @@ if (typeof options === 'function') {

if (dataKey.v.length === 0) {
cb(null, {});
return;
}
const dbName = databaseNamespace(this._keyVaultNamespace);
const collectionName = collectionNamespace(this._keyVaultNamespace);
const replacements = dataKey.v.map(key => ({
replaceOne: {
updateOne: {
filter: { _id: key._id },
replacement: key
update: {
$set: {
masterKey: key.masterKey,
keyMaterial: key.keyMaterial
},
$currentDate: {
updateDate: true
}
}
}

@@ -370,5 +379,2 @@ }));

}
if (options.indexKeyId) {
contextOptions.indexKeyId = options.indexKeyId.buffer;
}
if (options.keyAltName) {

@@ -375,0 +381,0 @@ const keyAltName = options.keyAltName;

@@ -41,5 +41,8 @@ 'use strict';

super(message);
this.name = 'MongoCryptError';
Error.captureStackTrace(this, this.constructor);
}
get name() {
return 'MongoCryptError';
}
}

@@ -46,0 +49,0 @@

{
"name": "mongodb-client-encryption",
"version": "2.2.0-alpha.3",
"version": "2.2.0-alpha.4",
"description": "Official client encryption module for the MongoDB Node.js driver",

@@ -39,7 +39,7 @@ "main": "lib/index.js",

"node-addon-api": "^4.3.0",
"prebuild-install": "^7.0.1",
"prebuild-install": "^7.1.1",
"socks": "^2.6.1"
},
"devDependencies": {
"bson": "^4.6.1",
"bson": "^4.6.4",
"chai": "^4.3.6",

@@ -46,0 +46,0 @@ "chai-subset": "^1.6.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc