@bull-board/nestjs 6.9.6 → 6.10.0

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.
@@ -30,7 +30,18 @@ let BullBoardRootModule = BullBoardRootModule_1 = class BullBoardRootModule {
30
30
  const addForwardSlash = (path) => {
31
31
  return path.startsWith('/') || path === '' ? path : `/${path}`;
32
32
  };
33
- const prefix = addForwardSlash(this.applicationConfig.getGlobalPrefix() + this.options.route);
33
+ const shouldBypassGlobalPrefix = () => {
34
+ const prefixOptions = this.applicationConfig.getGlobalPrefixOptions();
35
+ if (!(prefixOptions === null || prefixOptions === void 0 ? void 0 : prefixOptions.exclude))
36
+ return false;
37
+ return prefixOptions.exclude.some(exclusion => {
38
+ const routePath = addForwardSlash(this.options.route);
39
+ return exclusion.pathRegex.test(routePath);
40
+ });
41
+ };
42
+ const prefix = shouldBypassGlobalPrefix()
43
+ ? addForwardSlash(this.options.route)
44
+ : addForwardSlash(this.applicationConfig.getGlobalPrefix() + this.options.route);
34
45
  this.adapter.setBasePath(prefix);
35
46
  if ((0, bull_board_util_1.isExpressAdapter)(this.adapter)) {
36
47
  return consumer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bull-board/nestjs",
3
- "version": "6.9.6",
3
+ "version": "6.10.0",
4
4
  "description": "A NestJS module for Bull-Board dashboard.",
5
5
  "keywords": [
6
6
  "bull",
@@ -19,23 +19,23 @@
19
19
  "clean": "rm -rf dist"
20
20
  },
21
21
  "devDependencies": {
22
- "@bull-board/api": "^6.9.6",
23
- "@bull-board/express": "^6.9.6",
24
- "@bull-board/fastify": "^6.9.6",
22
+ "@bull-board/api": "^6.10.0",
23
+ "@bull-board/express": "^6.10.0",
24
+ "@bull-board/fastify": "^6.10.0",
25
25
  "@nestjs/bull-shared": "^11.0.2",
26
26
  "@nestjs/bullmq": "^11.0.2",
27
- "@nestjs/common": "^11.1.0",
28
- "@nestjs/core": "^11.1.0",
29
- "@types/node": "18.19.87",
27
+ "@nestjs/common": "^11.1.3",
28
+ "@nestjs/core": "^11.1.3",
29
+ "@types/node": "18.19.111",
30
30
  "bull": "^4.16.5",
31
- "bullmq": "^5.52.1",
31
+ "bullmq": "^5.53.2",
32
32
  "reflect-metadata": "^0.2.2",
33
33
  "rxjs": "^7.8.2",
34
34
  "typescript": "^5.8.3"
35
35
  },
36
36
  "peerDependencies": {
37
- "@bull-board/api": "^6.9.6",
38
- "@bull-board/express": "^6.9.6",
37
+ "@bull-board/api": "^6.10.0",
38
+ "@bull-board/express": "^6.10.0",
39
39
  "@nestjs/bull-shared": "^10.0.0 || ^11.0.0",
40
40
  "@nestjs/common": "^9.0.0 || ^10.0.0 || ^11.0.0",
41
41
  "@nestjs/core": "^9.0.0 || ^10.0.0 || ^11.0.0",
@@ -20,7 +20,21 @@ export class BullBoardRootModule implements NestModule {
20
20
  const addForwardSlash = (path: string) => {
21
21
  return path.startsWith('/') || path === '' ? path : `/${path}`;
22
22
  };
23
- const prefix = addForwardSlash(this.applicationConfig.getGlobalPrefix() + this.options.route);
23
+
24
+ const shouldBypassGlobalPrefix = () => {
25
+ const prefixOptions = this.applicationConfig.getGlobalPrefixOptions();
26
+ if (!prefixOptions?.exclude) return false;
27
+
28
+ return prefixOptions.exclude.some(exclusion => {
29
+ const routePath = addForwardSlash(this.options.route);
30
+ return exclusion.pathRegex.test(routePath);
31
+ });
32
+ };
33
+
34
+ const prefix =
35
+ shouldBypassGlobalPrefix()
36
+ ? addForwardSlash(this.options.route)
37
+ : addForwardSlash(this.applicationConfig.getGlobalPrefix() + this.options.route);
24
38
 
25
39
  this.adapter.setBasePath(prefix);
26
40
 
@@ -35,7 +49,7 @@ export class BullBoardRootModule implements NestModule {
35
49
  .getInstance()
36
50
  .register(this.adapter.registerPlugin(), { prefix });
37
51
 
38
- return consumer
52
+ return consumer
39
53
  .apply(this.options.middleware)
40
54
  .forRoutes(this.options.route);
41
55
  }