mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-22 07:53:34 +01:00
chore: code cleanup
This commit is contained in:
parent
bd3388d226
commit
d4beb7ddda
@ -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';
|
||||
})()
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user