From 8d4e7526624400d57df75c60968aca8efa1a49de Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Wed, 19 Feb 2025 20:04:49 +0000 Subject: [PATCH] use `listenLiveDirectory` --- packages/wrapper/src/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/wrapper/src/index.js b/packages/wrapper/src/index.js index 66f97fa0..d9e401e6 100644 --- a/packages/wrapper/src/index.js +++ b/packages/wrapper/src/index.js @@ -105,9 +105,16 @@ class WebWrapper extends Server { setTimeout(async () => { await this.updateDistApp() + await this.listenLiveDirectory() }, 30000) } + async listenLiveDirectory() { + global.staticLiveDirectory = new LiveDirectory(WebWrapper.appDistPath, { + static: false, + }) + } + async onInitialize() { if (process.env.WRAPPER_AUTO_UPDATE_KEY) { console.log("Auto update key is set, enabling webhook update") @@ -152,9 +159,7 @@ class WebWrapper extends Server { } } - global.staticLiveDirectory = new LiveDirectory(WebWrapper.appDistPath, { - static: false, - }) + await this.listenLiveDirectory() } }