koatty_cli
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -188,2 +188,3 @@ #!/usr/bin/env node | ||
copyFile('config' + path.sep + 'router.ts', APP_PATH + path.sep + 'config' + path.sep + 'router.ts'); | ||
copyFile('config' + path.sep + 'plugin.ts', APP_PATH + path.sep + 'config' + path.sep + 'plugin.ts'); | ||
copyFile('config' + path.sep + 'middleware.ts', APP_PATH + path.sep + 'config' + path.sep + 'middleware.ts'); | ||
@@ -434,2 +435,3 @@ | ||
copyFile('plugin' + path.sep + 'NewPlugin.ts', APP_PATH + path.sep + 'plugin' + path.sep + plugin + 'Plugin.ts', { | ||
'<Path>': '..', | ||
'<PLUG>': plugin + 'Plugin' | ||
@@ -436,0 +438,0 @@ }); |
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
import { Middleware, IMiddleware, Helper } from "koatty"; | ||
import { Middleware, IMiddleware, KoattyContext, Helper } from "koatty"; | ||
import { App } from '<Path>/App'; | ||
@@ -24,3 +24,3 @@ | ||
return function (ctx: any, next: any) { | ||
return function (ctx: KoattyContext, next: Function) { | ||
return next(); | ||
@@ -27,0 +27,0 @@ }; |
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
import { Middleware, IMiddleware, Helper } from "koatty"; | ||
import { Middleware, IMiddleware, KoattyContext, Helper } from "koatty"; | ||
import { createConnection, Connection } from "typeorm"; | ||
@@ -38,6 +38,5 @@ import { App } from '<Path>/App'; | ||
//应用启动执行一次 | ||
app.once('appReady', async () => { | ||
await conn(); | ||
}); | ||
return async function (ctx: any, next: any) { | ||
await conn(); | ||
return async function (ctx: KoattyContext, next: Function) { | ||
if (!app.connection) { | ||
@@ -44,0 +43,0 @@ await conn(); |
{ | ||
"name": "koatty_cli", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Koatty command line tool.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
51386
30
884