zyket 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -7,16 +7,17 @@ const basicAuth = require('express-basic-auth')
|
|
|
7
7
|
module.exports = class BullBoardExtension extends Extension {
|
|
8
8
|
path;
|
|
9
9
|
|
|
10
|
-
constructor({ path = '/bullboard' } = {}) {
|
|
10
|
+
constructor({ path = '/bullboard', basePath = '' } = {}) {
|
|
11
11
|
super("BullBoardExtension");
|
|
12
12
|
this.path = path || '/bullboard';
|
|
13
|
+
this.basePath = basePath;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
load(container) {
|
|
16
17
|
if (!container.get('bullmq')) return container.get('logger').warn('BullBoardExtension: bullmq service not found, skipping BullBoard setup');
|
|
17
18
|
const bull = container.get('bullmq')
|
|
18
19
|
const serverAdapter = new ExpressAdapter()
|
|
19
|
-
serverAdapter.setBasePath(this.path)
|
|
20
|
+
serverAdapter.setBasePath(this.basePath + this.path)
|
|
20
21
|
|
|
21
22
|
createBullBoard({
|
|
22
23
|
queues: Object.values(bull.queues).map(queue => new BullMQAdapter(queue)),
|