@bull-board/koa
Advanced tools
Comparing version 5.3.1 to 5.4.0
@@ -90,3 +90,5 @@ "use strict"; | ||
app.use((0, koa_views_1.default)(this.viewPath, { | ||
extension: path_1.default.extname(this.entryRoute.handler().name).substring(1), | ||
extension: path_1.default | ||
.extname(this.entryRoute.handler({ basePath: this.basePath, uiConfig: this.uiConfig }).name) | ||
.substring(1), | ||
})); | ||
@@ -97,8 +99,4 @@ const { method, route, handler } = this.entryRoute; | ||
router[method](path, async (ctx) => { | ||
const { name } = handler(); | ||
const basePath = this.basePath.endsWith('/') ? this.basePath : `${this.basePath}/`; | ||
const uiConfig = JSON.stringify(this.uiConfig) | ||
.replace(/</g, '\\u003c') | ||
.replace(/>/g, '\\u003e'); | ||
await ctx.render(name, { basePath, uiConfig }); | ||
const { name, params } = handler({ basePath: this.basePath, uiConfig: this.uiConfig }); | ||
await ctx.render(name, params); | ||
}); | ||
@@ -105,0 +103,0 @@ }); |
{ | ||
"name": "@bull-board/koa", | ||
"version": "5.3.1", | ||
"version": "5.4.0", | ||
"description": "A Koa.js server adapter for Bull-Board dashboard.", | ||
@@ -31,4 +31,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@bull-board/api": "5.3.1", | ||
"@bull-board/ui": "5.3.1", | ||
"@bull-board/api": "5.4.0", | ||
"@bull-board/ui": "5.4.0", | ||
"ejs": "^3.1.7", | ||
@@ -35,0 +35,0 @@ "koa": "^2.13.1", |
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
12087
150
+ Added@bull-board/api@5.4.0(transitive)
+ Added@bull-board/ui@5.4.0(transitive)
- Removed@bull-board/api@5.3.1(transitive)
- Removed@bull-board/ui@5.3.1(transitive)
Updated@bull-board/api@5.4.0
Updated@bull-board/ui@5.4.0