mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
Merge pull request #3515 from lohxt1/feat/delete-env-var--safe-mode-shim
feat: deleteEnvVar safe mode shim
This commit is contained in:
commit
28d30b1ef7
@ -39,6 +39,12 @@ const addBruShimToContext = (vm, bru) => {
|
|||||||
vm.setProp(bruObject, 'setEnvVar', setEnvVar);
|
vm.setProp(bruObject, 'setEnvVar', setEnvVar);
|
||||||
setEnvVar.dispose();
|
setEnvVar.dispose();
|
||||||
|
|
||||||
|
let deleteEnvVar = vm.newFunction('deleteEnvVar', function (key) {
|
||||||
|
return marshallToVm(bru.deleteEnvVar(vm.dump(key)), vm);
|
||||||
|
});
|
||||||
|
vm.setProp(bruObject, 'deleteEnvVar', deleteEnvVar);
|
||||||
|
deleteEnvVar.dispose();
|
||||||
|
|
||||||
let getGlobalEnvVar = vm.newFunction('getGlobalEnvVar', function (key) {
|
let getGlobalEnvVar = vm.newFunction('getGlobalEnvVar', function (key) {
|
||||||
return marshallToVm(bru.getGlobalEnvVar(vm.dump(key)), vm);
|
return marshallToVm(bru.getGlobalEnvVar(vm.dump(key)), vm);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user