Add node-vault library

This commit is contained in:
Boris Baskovec 2023-11-03 12:25:43 +01:00
parent 9271c67d7f
commit fdb9b10353
3 changed files with 10 additions and 4 deletions

View File

@ -28,6 +28,7 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"nanoid": "3.3.4", "nanoid": "3.3.4",
"node-fetch": "2.*", "node-fetch": "2.*",
"uuid": "^9.0.0" "uuid": "^9.0.0",
"node-vault": "^0.10.2"
} }
} }

View File

@ -26,6 +26,7 @@ const axios = require('axios');
const fetch = require('node-fetch'); const fetch = require('node-fetch');
const chai = require('chai'); const chai = require('chai');
const CryptoJS = require('crypto-js'); const CryptoJS = require('crypto-js');
const NodeVault = require('node-vault');
class ScriptRuntime { class ScriptRuntime {
constructor() {} constructor() {}
@ -112,7 +113,8 @@ class ScriptRuntime {
'node-fetch': fetch, 'node-fetch': fetch,
'crypto-js': CryptoJS, 'crypto-js': CryptoJS,
...whitelistedModules, ...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined fs: allowScriptFilesystemAccess ? fs : undefined,
'node-vault': NodeVault
} }
} }
}); });
@ -201,7 +203,8 @@ class ScriptRuntime {
'node-fetch': fetch, 'node-fetch': fetch,
'crypto-js': CryptoJS, 'crypto-js': CryptoJS,
...whitelistedModules, ...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined fs: allowScriptFilesystemAccess ? fs : undefined,
'node-vault': NodeVault
} }
} }
}); });

View File

@ -28,6 +28,7 @@ const nanoid = require('nanoid');
const axios = require('axios'); const axios = require('axios');
const fetch = require('node-fetch'); const fetch = require('node-fetch');
const CryptoJS = require('crypto-js'); const CryptoJS = require('crypto-js');
const NodeVault = require('node-vault');
class TestRuntime { class TestRuntime {
constructor() {} constructor() {}
@ -130,7 +131,8 @@ class TestRuntime {
'node-fetch': fetch, 'node-fetch': fetch,
'crypto-js': CryptoJS, 'crypto-js': CryptoJS,
...whitelistedModules, ...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined fs: allowScriptFilesystemAccess ? fs : undefined,
'node-vault': NodeVault
} }
} }
}); });