feat: replace vm2 sandbox with isolated-vm

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2023-06-15 12:07:47 +02:00
parent 7e272d18e1
commit fb7375507d
@@ -115,6 +115,7 @@ export class SecureTemplater {
templateFilters = {},
templateGlobals = {},
} = options;
const isolate = new Isolate({ memoryLimit: 128 });
const context = await isolate.createContext();
const contextGlobal = context.global;