@@ -12,30 +12,46 @@ function loadDefaultModule() {
1212const {
1313 MongoCryptError,
1414 MongoCryptCreateEncryptedCollectionError,
15- MongoCryptCreateDataKeyError
15+ MongoCryptCreateDataKeyError,
16+ MongoCryptAzureKMSRequestError,
17+ MongoCryptKMSRequestNetworkTimeoutError
1618} = require ( './errors' ) ;
1719
20+ const { fetchAzureKMSToken } = require ( './providers/index' ) ;
21+
1822function extension ( mongodb ) {
1923 const modules = { mongodb } ;
2024
2125 modules . stateMachine = require ( './stateMachine' ) ( modules ) ;
2226 modules . autoEncrypter = require ( './autoEncrypter' ) ( modules ) ;
2327 modules . clientEncryption = require ( './clientEncryption' ) ( modules ) ;
2428
25- return {
29+ const exports = {
2630 AutoEncrypter : modules . autoEncrypter . AutoEncrypter ,
2731 ClientEncryption : modules . clientEncryption . ClientEncryption ,
2832 MongoCryptError,
2933 MongoCryptCreateEncryptedCollectionError,
30- MongoCryptCreateDataKeyError
34+ MongoCryptCreateDataKeyError,
35+ MongoCryptAzureKMSRequestError,
36+ MongoCryptKMSRequestNetworkTimeoutError
3137 } ;
38+
39+ Object . defineProperty ( exports , '___azureKMSProseTestExports' , {
40+ enumerable : false ,
41+ configurable : false ,
42+ value : fetchAzureKMSToken
43+ } ) ;
44+
45+ return exports ;
3246}
3347
3448module . exports = {
3549 extension,
3650 MongoCryptError,
3751 MongoCryptCreateEncryptedCollectionError,
3852 MongoCryptCreateDataKeyError,
53+ MongoCryptAzureKMSRequestError,
54+ MongoCryptKMSRequestNetworkTimeoutError,
3955 get AutoEncrypter ( ) {
4056 const m = loadDefaultModule ( ) ;
4157 delete module . exports . AutoEncrypter ;
@@ -49,3 +65,9 @@ module.exports = {
4965 return m . ClientEncryption ;
5066 }
5167} ;
68+
69+ Object . defineProperty ( module . exports , '___azureKMSProseTestExports' , {
70+ enumerable : false ,
71+ configurable : false ,
72+ value : fetchAzureKMSToken
73+ } ) ;
0 commit comments