mongodb-client-encryption
Advanced tools
Comparing version 2.6.0 to 2.7.0-alpha.0
@@ -5,2 +5,4 @@ # Changelog | ||
## [2.7.0-alpha.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.6.0...node-v2.7.0-alpha.0) (2023-03-14) | ||
## [2.6.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.6.0-alpha.0...node-v2.6.0) (2023-02-23) | ||
@@ -7,0 +9,0 @@ |
@@ -66,2 +66,12 @@ import type { | ||
/** | ||
* An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials. | ||
*/ | ||
export class MongoCryptAzureKMSRequestError extends MongoCryptError { | ||
/* The body of the IMDS request that produced the error, if present. */ | ||
body?: Document ; | ||
} | ||
export class MongoCryptKMSRequestNetworkTimeoutError extends MongoCryptError {} | ||
/** | ||
* A set of options for specifying a Socks5 proxy. | ||
@@ -183,3 +193,4 @@ */ | ||
accessToken: string; | ||
}; | ||
} | ||
| Record<string, never>; | ||
@@ -186,0 +197,0 @@ /** |
@@ -12,3 +12,3 @@ 'use strict'; | ||
const BSON = modules.mongodb.BSON; | ||
const { loadCredentials } = require('./credentialsProvider'); | ||
const { loadCredentials } = require('./providers/index'); | ||
const cryptoCallbacks = require('./cryptoCallbacks'); | ||
@@ -15,0 +15,0 @@ |
@@ -16,3 +16,3 @@ 'use strict'; | ||
} = require('./errors'); | ||
const { loadCredentials } = require('./credentialsProvider'); | ||
const { loadCredentials } = require('./providers/index'); | ||
const cryptoCallbacks = require('./cryptoCallbacks'); | ||
@@ -19,0 +19,0 @@ const { promisify } = require('util'); |
@@ -52,6 +52,25 @@ 'use strict'; | ||
/** | ||
* @class | ||
* An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials. | ||
*/ | ||
class MongoCryptAzureKMSRequestError extends MongoCryptError { | ||
/** | ||
* @param {string} message | ||
* @param {object | undefined} body | ||
*/ | ||
constructor(message, body) { | ||
super(message); | ||
this.body = body; | ||
} | ||
} | ||
class MongoCryptKMSRequestNetworkTimeoutError extends MongoCryptError {} | ||
module.exports = { | ||
MongoCryptError, | ||
MongoCryptKMSRequestNetworkTimeoutError, | ||
MongoCryptAzureKMSRequestError, | ||
MongoCryptCreateDataKeyError, | ||
MongoCryptCreateEncryptedCollectionError | ||
}; |
@@ -15,5 +15,9 @@ 'use strict'; | ||
MongoCryptCreateEncryptedCollectionError, | ||
MongoCryptCreateDataKeyError | ||
MongoCryptCreateDataKeyError, | ||
MongoCryptAzureKMSRequestError, | ||
MongoCryptKMSRequestNetworkTimeoutError | ||
} = require('./errors'); | ||
const { fetchAzureKMSToken } = require('./providers/index'); | ||
function extension(mongodb) { | ||
@@ -26,3 +30,3 @@ const modules = { mongodb }; | ||
return { | ||
const exports = { | ||
AutoEncrypter: modules.autoEncrypter.AutoEncrypter, | ||
@@ -32,4 +36,14 @@ ClientEncryption: modules.clientEncryption.ClientEncryption, | ||
MongoCryptCreateEncryptedCollectionError, | ||
MongoCryptCreateDataKeyError | ||
MongoCryptCreateDataKeyError, | ||
MongoCryptAzureKMSRequestError, | ||
MongoCryptKMSRequestNetworkTimeoutError | ||
}; | ||
Object.defineProperty(exports, '___azureKMSProseTestExports', { | ||
enumerable: false, | ||
configurable: false, | ||
value: fetchAzureKMSToken | ||
}); | ||
return exports; | ||
} | ||
@@ -42,2 +56,4 @@ | ||
MongoCryptCreateDataKeyError, | ||
MongoCryptAzureKMSRequestError, | ||
MongoCryptKMSRequestNetworkTimeoutError, | ||
get AutoEncrypter() { | ||
@@ -56,1 +72,7 @@ const m = loadDefaultModule(); | ||
}; | ||
Object.defineProperty(module.exports, '___azureKMSProseTestExports', { | ||
enumerable: false, | ||
configurable: false, | ||
value: fetchAzureKMSToken | ||
}); |
{ | ||
"name": "mongodb-client-encryption", | ||
"version": "2.6.0", | ||
"version": "2.7.0-alpha.0", | ||
"description": "Official client encryption module for the MongoDB Node.js driver", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208421
22
2833
2
5