@bull-board/api
Advanced tools
Comparing version 5.3.1 to 5.4.0
@@ -1,2 +0,5 @@ | ||
import { ViewHandlerReturnType } from '../../typings/app'; | ||
export declare function entryPoint(): ViewHandlerReturnType; | ||
import { UIConfig, ViewHandlerReturnType } from '../../typings/app'; | ||
export declare function entryPoint(params: { | ||
basePath: string; | ||
uiConfig: UIConfig; | ||
}): ViewHandlerReturnType; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.entryPoint = void 0; | ||
function entryPoint() { | ||
return { name: 'index.ejs' }; | ||
function entryPoint(params) { | ||
const basePath = params.basePath.endsWith('/') ? params.basePath : `${params.basePath}/`; | ||
const uiConfig = JSON.stringify(params.uiConfig) | ||
.replace(/</g, '\\u003c') | ||
.replace(/>/g, '\\u003e'); | ||
return { | ||
name: 'index.ejs', | ||
params: { basePath, uiConfig, title: params.uiConfig.boardTitle }, | ||
}; | ||
} | ||
exports.entryPoint = entryPoint; | ||
//# sourceMappingURL=entryPoint.js.map |
@@ -18,3 +18,6 @@ "use strict"; | ||
.setStaticPath('/static', path_1.default.join(uiBasePath, 'dist/static')) | ||
.setUIConfig(options.uiConfig) | ||
.setUIConfig({ | ||
boardTitle: 'Bull Dashboard', | ||
...options.uiConfig, | ||
}) | ||
.setEntryRoute(routes_1.appRoutes.entryPoint) | ||
@@ -21,0 +24,0 @@ .setErrorHandler(error_1.errorHandler) |
@@ -98,2 +98,3 @@ import { RedisInfo } from 'redis-info'; | ||
name: string; | ||
params: Record<string, string>; | ||
}; | ||
@@ -109,3 +110,6 @@ export type Promisify<T> = T | Promise<T>; | ||
route: string | string[]; | ||
handler(request?: BullBoardRequest): ViewHandlerReturnType; | ||
handler(params: { | ||
basePath: string; | ||
uiConfig: UIConfig; | ||
}): ViewHandlerReturnType; | ||
} | ||
@@ -112,0 +116,0 @@ export type AppRouteDefs = { |
{ | ||
"name": "@bull-board/api", | ||
"version": "5.3.1", | ||
"version": "5.4.0", | ||
"description": "A Dashboard server API built on top of bull or bullmq.", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@bull-board/ui": "5.3.1" | ||
"@bull-board/ui": "5.4.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54474
869