Describe the bug
Current plugin launcher omits most variables/methods from global object, for example queueMicrotask, setTimeout, setImmediate, setInterval, btoa, atob, structuredClone.
To reproduce
The following plugin would not work, due to setTimeout being undefined:
module.exports = function initPlugin() {
setTimeout(() => console.log(""), 1000);
}
Additional context
This is likely an oversight when creating the context for Script.runInContext call to execute the plugin as it overrides global object.
Relevant code segment:
https://github.com/thepeacockproject/Peacock/blob/master/components/controller.ts#L1218-L1232