From 04992d99cfeab5b6225d6eac7169f3af82c44cc0 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 18 Jul 2022 16:48:56 +0200 Subject: [PATCH] Make Mattermost client work --- packages/plugos/environments/node_worker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugos/environments/node_worker.ts b/packages/plugos/environments/node_worker.ts index 0ce2e3a..fc60d80 100644 --- a/packages/plugos/environments/node_worker.ts +++ b/packages/plugos/environments/node_worker.ts @@ -28,6 +28,9 @@ let consoleLogger = new ConsoleLogger((level, message) => { let loadedModules = new Map(); +// HACK to make Mattermost client work... +loadedModules.set("form-data", require(`${nodeModulesPath}/form-data`)); + let vm = new VM({ sandbox: { // Exposing some "safe" APIs