-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @bull-board/ui as peerDep of @bull-board/api #565
Conversation
packages/api/package.json
Outdated
@@ -36,6 +36,9 @@ | |||
"bullmq": "^1.80.6", | |||
"ioredis-mock": "^7.2.0" | |||
}, | |||
"peerDependencies": { | |||
"@bull-board/ui": "5.1.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not restrict the version here, make it *
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't sure about compatibility issues so I copied the version from the inverse dependency (ui's dependency on [email protected])
Changed to *
Released in |
Works now :) Although the solution feels off to me. export function createBullBoard({
queues,
serverAdapter,
options = { uiConfig: {} },
}: {
queues: ReadonlyArray<BaseAdapter>;
serverAdapter: IServerAdapter;
options?: BoardOptions;
}) {
const { bullBoardQueues, setQueues, replaceQueues, addQueue, removeQueue } = getQueuesApi(queues);
const uiBasePath = path.dirname(eval(`require.resolve('@bull-board/ui/package.json')`));
serverAdapter
.setQueues(bullBoardQueues)
.setViewsPath(path.join(uiBasePath, 'dist'))
.setStaticPath('/static', path.join(uiBasePath, 'dist/static'))
.setUIConfig(options.uiConfig)
.setEntryRoute(appRoutes.entryPoint)
.setErrorHandler(errorHandler)
.setApiRoutes(appRoutes.api);
return { setQueues, replaceQueues, addQueue, removeQueue };
} I think there are a few approaches that would be better than the current
|
Thanx for the feedback.
|
This closes #564