postman-sandbox
Advanced tools
Comparing version 5.1.0 to 5.1.1
@@ -120,3 +120,7 @@ const _ = require('lodash'), | ||
// extract the code from event | ||
code = _.isFunction(event.script && event.script.toSource) && ((code) => { | ||
code = ((code) => { | ||
if (typeof code !== 'string') { | ||
return; | ||
} | ||
// wrap it in an async function to support top-level await | ||
@@ -128,3 +132,3 @@ const asyncCode = `;(async()=>{; | ||
return isNonLegacySandbox(code) ? `${getNonLegacyCodeMarker()}${asyncCode}` : asyncCode; | ||
})(event.script.toSource()), | ||
})(event.script?.toSource()), | ||
@@ -255,2 +259,7 @@ // create the execution object | ||
// @todo: throw helpful error message if script access to vault is disabled | ||
if (!context.vaultSecrets) { | ||
disabledAPIs.push('vault'); | ||
} | ||
// send control to the function that executes the context and prepares the scope | ||
@@ -257,0 +266,0 @@ executeContext(scope, code, execution, |
{ | ||
"name": "postman-sandbox", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "Sandbox for Postman Scripts to run in Node.js or browser", | ||
@@ -46,3 +46,3 @@ "author": "Postman Inc.", | ||
"lodash": "4.17.21", | ||
"postman-collection": "4.4.1", | ||
"postman-collection": "4.5.0", | ||
"teleport-javascript": "1.0.0", | ||
@@ -73,3 +73,3 @@ "uvm": "3.0.0" | ||
"eslint-plugin-lodash": "^7.4.0", | ||
"eslint-plugin-mocha": "^10.4.3", | ||
"eslint-plugin-mocha": "^10.5.0", | ||
"eslint-plugin-n": "^16.6.2", | ||
@@ -80,3 +80,3 @@ "eslint-plugin-security": "^2.1.1", | ||
"jsdoc": "^3.6.10", | ||
"karma": "^6.4.3", | ||
"karma": "^6.4.4", | ||
"karma-browserify": "^8.1.0", | ||
@@ -88,3 +88,3 @@ "karma-chrome-launcher": "^3.2.0", | ||
"lodash3": "3.10.2", | ||
"mocha": "^10.4.0", | ||
"mocha": "^10.7.0", | ||
"moment": "2.30.1", | ||
@@ -91,0 +91,0 @@ "nyc": "^15.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
11975
5375084
+ Addedpostman-collection@4.5.0(transitive)
+ Addedsemver@7.6.3(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removedpostman-collection@4.4.1(transitive)
- Removedsemver@7.5.4(transitive)
- Removedyallist@4.0.0(transitive)
Updatedpostman-collection@4.5.0