mongodb 6.8.0-dev.20240629.sha.d85f827a → 6.8.0-dev.20240703.sha.5abf5fca
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.
|
@@ -8,14 +8,18 @@ const error_1 = require("../error");
|
|
|
8
8
|
*/
|
|
9
9
|
class MongocryptdManager {
|
|
10
10
|
constructor(extraOptions = {}) {
|
|
11
|
+
this.spawnPath = '';
|
|
12
|
+
this.spawnArgs = [];
|
|
11
13
|
this.uri =
|
|
12
14
|
typeof extraOptions.mongocryptdURI === 'string' && extraOptions.mongocryptdURI.length > 0
|
|
13
15
|
? extraOptions.mongocryptdURI
|
|
14
16
|
: MongocryptdManager.DEFAULT_MONGOCRYPTD_URI;
|
|
15
17
|
this.bypassSpawn = !!extraOptions.mongocryptdBypassSpawn;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
if (Object.hasOwn(extraOptions, 'mongocryptdSpawnPath') && extraOptions.mongocryptdSpawnPath) {
|
|
19
|
+
this.spawnPath = extraOptions.mongocryptdSpawnPath;
|
|
20
|
+
}
|
|
21
|
+
if (Object.hasOwn(extraOptions, 'mongocryptdSpawnArgs') &&
|
|
22
|
+
Array.isArray(extraOptions.mongocryptdSpawnArgs)) {
|
|
19
23
|
this.spawnArgs = this.spawnArgs.concat(extraOptions.mongocryptdSpawnArgs);
|
|
20
24
|
}
|
|
21
25
|
if (this.spawnArgs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongocryptd_manager.js","sourceRoot":"","sources":["../../src/client-side-encryption/mongocryptd_manager.ts"],"names":[],"mappings":";;;AAEA,oCAAoD;AAGpD;;;GAGG;AACH,MAAa,kBAAkB;IAS7B,YAAY,eAA2C,EAAE;
|
|
1
|
+
{"version":3,"file":"mongocryptd_manager.js","sourceRoot":"","sources":["../../src/client-side-encryption/mongocryptd_manager.ts"],"names":[],"mappings":";;;AAEA,oCAAoD;AAGpD;;;GAGG;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mC,CAAC;QAE7E,gDAAgD;QAChD,sCAAsC;QACtC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE;YAC3C,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC3B,qBAAqB;YACrB,kFAAkF;YAClF,yEAAyE;YACzE,8EAA8E;YAC9E,8EAA8E;YAC9E,iFAAiF;YACjF,iFAAiF;YACjF,yEAAyE;YACzE,iFAAiF;YACjF,6EAA6E;YAC7E,yFAAyF;YACzF,+EAA+E;YAC/E,+DAA+D;QACjE,CAAC,CAAC,CAAC;QAEH,+CAA+C;QAC/C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAI,EAAoB;QACvC,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;YAC1B,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,8GAA8G;YAC9G,MAAM,WAAW,GAAG,GAAG,YAAY,gCAAwB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YACjF,IAAI,CAAC,WAAW,EAAE;gBAChB,MAAM,GAAG,CAAC;aACX;SACF;QACD,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;;AAxFM,0CAAuB,GAAG,2BAA2B,AAA9B,CAA+B;AADlD,gDAAkB"}
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@ export class MongocryptdManager {
|
|
|
12
12
|
|
|
13
13
|
uri: string;
|
|
14
14
|
bypassSpawn: boolean;
|
|
15
|
-
spawnPath
|
|
16
|
-
spawnArgs: Array<string
|
|
15
|
+
spawnPath = '';
|
|
16
|
+
spawnArgs: Array<string> = [];
|
|
17
17
|
_child?: ChildProcess;
|
|
18
18
|
|
|
19
19
|
constructor(extraOptions: AutoEncryptionExtraOptions = {}) {
|
|
@@ -24,9 +24,13 @@ export class MongocryptdManager {
|
|
|
24
24
|
|
|
25
25
|
this.bypassSpawn = !!extraOptions.mongocryptdBypassSpawn;
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
if (Object.hasOwn(extraOptions, 'mongocryptdSpawnPath') && extraOptions.mongocryptdSpawnPath) {
|
|
28
|
+
this.spawnPath = extraOptions.mongocryptdSpawnPath;
|
|
29
|
+
}
|
|
30
|
+
if (
|
|
31
|
+
Object.hasOwn(extraOptions, 'mongocryptdSpawnArgs') &&
|
|
32
|
+
Array.isArray(extraOptions.mongocryptdSpawnArgs)
|
|
33
|
+
) {
|
|
30
34
|
this.spawnArgs = this.spawnArgs.concat(extraOptions.mongocryptdSpawnArgs);
|
|
31
35
|
}
|
|
32
36
|
if (
|