@bull-board/koa
Advanced tools
Comparing version 4.8.0 to 4.9.0
@@ -1,2 +0,2 @@ | ||
import { AppControllerRoute, AppViewRoute, BullBoardQueues, ControllerHandlerReturnType, IServerAdapter } from '@bull-board/api/dist/typings/app'; | ||
import { AppControllerRoute, AppViewRoute, BullBoardQueues, ControllerHandlerReturnType, IServerAdapter, UIConfig } from '@bull-board/api/dist/typings/app'; | ||
import Koa from 'koa'; | ||
@@ -11,2 +11,3 @@ export declare class KoaAdapter implements IServerAdapter { | ||
private apiRoutes; | ||
private uiConfig; | ||
setBasePath(path: string): KoaAdapter; | ||
@@ -19,2 +20,3 @@ setStaticPath(staticsRoute: string, staticsPath: string): KoaAdapter; | ||
setQueues(bullBoardQueues: BullBoardQueues): KoaAdapter; | ||
setUIConfig(config?: UIConfig): KoaAdapter; | ||
registerPlugin(options?: Partial<{ | ||
@@ -21,0 +23,0 @@ mount: string; |
@@ -16,2 +16,3 @@ "use strict"; | ||
this.basePath = ''; | ||
this.uiConfig = {}; | ||
} | ||
@@ -46,2 +47,6 @@ setBasePath(path) { | ||
} | ||
setUIConfig(config = {}) { | ||
this.uiConfig = config; | ||
return this; | ||
} | ||
registerPlugin(options = { mount: this.basePath }) { | ||
@@ -95,3 +100,6 @@ if (!this.statics) { | ||
const basePath = this.basePath.endsWith('/') ? this.basePath : `${this.basePath}/`; | ||
await ctx.render(name, { basePath }); | ||
const uiConfig = JSON.stringify(this.uiConfig) | ||
.replace(/</g, '\\u003c') | ||
.replace(/>/g, '\\u003e'); | ||
await ctx.render(name, { basePath, uiConfig }); | ||
}); | ||
@@ -98,0 +106,0 @@ }); |
{ | ||
"name": "@bull-board/koa", | ||
"version": "4.8.0", | ||
"version": "4.9.0", | ||
"description": "Koa.js server adapter for Bull-Board package", | ||
@@ -31,4 +31,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@bull-board/api": "4.8.0", | ||
"@bull-board/ui": "4.8.0", | ||
"@bull-board/api": "4.9.0", | ||
"@bull-board/ui": "4.9.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
13337
161
+ Added@bull-board/api@4.9.0(transitive)
+ Added@bull-board/ui@4.9.0(transitive)
- Removed@bull-board/api@4.8.0(transitive)
- Removed@bull-board/ui@4.8.0(transitive)
Updated@bull-board/api@4.9.0
Updated@bull-board/ui@4.9.0