mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 13:15:40 +00:00
chore: code cleanup
This commit is contained in:
@@ -100,6 +100,10 @@ class Bru {
|
||||
setNextRequest(nextRequest) {
|
||||
this.nextRequest = nextRequest;
|
||||
}
|
||||
|
||||
sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Bru;
|
||||
|
||||
@@ -93,14 +93,12 @@ const executeQuickJsVmAsync = async ({ script: externalScript, context: external
|
||||
fn.apply();
|
||||
}
|
||||
await sleep(0);
|
||||
console?.debug?.('quick-js:execution-start:');
|
||||
try {
|
||||
${externalScript}
|
||||
}
|
||||
catch(error) {
|
||||
console?.debug?.('quick-js:execution-end:with-error', error?.message);
|
||||
}
|
||||
console?.debug?.('quick-js:execution-end:');
|
||||
return 'done';
|
||||
})()
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user