mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix: 🐛 Correctly include bull-board UI package in dist
This commit is contained in:
parent
ecc7d1eee7
commit
fb84db3ea7
6
build.ts
6
build.ts
|
|
@ -25,7 +25,7 @@ await Bun.build({
|
||||||
target: "bun",
|
target: "bun",
|
||||||
splitting: true,
|
splitting: true,
|
||||||
minify: false,
|
minify: false,
|
||||||
external: ["unzipit", "acorn"],
|
external: ["unzipit", "acorn", "@bull-board/ui"],
|
||||||
}).then((output) => {
|
}).then((output) => {
|
||||||
if (!output.success) {
|
if (!output.success) {
|
||||||
console.error(output.logs);
|
console.error(output.logs);
|
||||||
|
|
@ -57,6 +57,10 @@ await $`cp -r node_modules/uzip-module dist/node_modules/uzip-module`;
|
||||||
// Copy acorn to dist
|
// Copy acorn to dist
|
||||||
await $`cp -r node_modules/acorn dist/node_modules/acorn`;
|
await $`cp -r node_modules/acorn dist/node_modules/acorn`;
|
||||||
|
|
||||||
|
// Copy bull-board to dist
|
||||||
|
await $`mkdir -p dist/node_modules/@bull-board`;
|
||||||
|
await $`cp -r node_modules/@bull-board/ui dist/node_modules/@bull-board/ui`;
|
||||||
|
|
||||||
// Copy the Bee Movie script from pages
|
// Copy the Bee Movie script from pages
|
||||||
await $`cp beemovie.txt dist/beemovie.txt`;
|
await $`cp beemovie.txt dist/beemovie.txt`;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ index b7fa76b4861aefc96e27b3167b1511c3723ad318..c56d37721672b9ede3c85c84cb40c91c
|
||||||
function createBullBoard({ queues, serverAdapter, options = { uiConfig: {} }, }) {
|
function createBullBoard({ queues, serverAdapter, options = { uiConfig: {} }, }) {
|
||||||
const { bullBoardQueues, setQueues, replaceQueues, addQueue, removeQueue } = (0, queuesApi_1.getQueuesApi)(queues);
|
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(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'));
|
+ const uiBasePath = options.uiBasePath || path_1.default.dirname(import.meta.resolve('@bull-board/ui/package.json'));
|
||||||
serverAdapter
|
serverAdapter
|
||||||
.setQueues(bullBoardQueues)
|
.setQueues(bullBoardQueues)
|
||||||
.setViewsPath(path_1.default.join(uiBasePath, 'dist'))
|
.setViewsPath(path_1.default.join(uiBasePath, 'dist'))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue