fix(worker): 🐛 Remove old bull-board patch, use official fix instead

Explicitely specifying the path prevents the module from using `eval`
This commit is contained in:
Jesse Wierzbinski 2025-04-07 21:50:43 +02:00
parent 512e0295a2
commit 2908fcc9e8
No known key found for this signature in database
4 changed files with 1 additions and 15 deletions

View file

@ -1,13 +0,0 @@
diff --git a/dist/src/index.js b/dist/src/index.js
index b7fa76b4861aefc96e27b3167b1511c3723ad318..c56d37721672b9ede3c85c84cb40c91c4ed2cc83 100644
--- a/dist/src/index.js
+++ b/dist/src/index.js
@@ -10,7 +10,7 @@ const queuesApi_1 = require("./queuesApi");
const routes_1 = require("./routes");
function createBullBoard({ queues, serverAdapter, options = { uiConfig: {} }, }) {
const { bullBoardQueues, setQueues, replaceQueues, addQueue, removeQueue } = (0, queuesApi_1.getQueuesApi)(queues);
- const uiBasePath = options.uiBasePath || path_1.default.dirname(eval(`require.resolve('@bull-board/ui/package.json')`));
+ const uiBasePath = options.uiBasePath || path_1.default.dirname(import.meta.require.resolve('@bull-board/ui/package.json'));
serverAdapter
.setQueues(bullBoardQueues)
.setViewsPath(path_1.default.join(uiBasePath, 'dist'))