Commit e2d6267d authored by nanahira's avatar nanahira

some missing types

parent 7c3c6c27
Pipeline #6076 passed with stages
in 1 minute and 13 seconds
This diff is collapsed.
{ {
"name": "koishi-nestjs", "name": "koishi-nestjs",
"version": "1.0.9", "version": "1.0.11",
"description": "Koishi.js as Nest.js Module", "description": "Koishi.js as Nest.js Module",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
"devDependencies": { "devDependencies": {
"@nestjs/common": "^8.0.9", "@nestjs/common": "^8.0.9",
"@nestjs/core": "^8.0.9", "@nestjs/core": "^8.0.9",
"@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.8",
"@types/koa-bodyparser": "^4.3.3",
"@types/node": "^16.10.2", "@types/node": "^16.10.2",
"@typescript-eslint/eslint-plugin": "^4.32.0", "@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0", "@typescript-eslint/parser": "^4.32.0",
...@@ -55,6 +58,8 @@ ...@@ -55,6 +58,8 @@
"dependencies": { "dependencies": {
"@koa/router": "^10.1.1", "@koa/router": "^10.1.1",
"http-proxy-middleware": "^2.0.1", "http-proxy-middleware": "^2.0.1",
"koa": "^2.13.3" "koa": "^2.13.3",
"koa-body-parser": "^1.1.2",
"koa-bodyparser": "^4.3.0"
} }
} }
...@@ -11,6 +11,7 @@ import { KoishiModuleOptions } from './koishi.interfaces'; ...@@ -11,6 +11,7 @@ import { KoishiModuleOptions } from './koishi.interfaces';
import { Server } from 'http'; import { Server } from 'http';
import Koa from 'koa'; import Koa from 'koa';
import KoaRouter from '@koa/router'; import KoaRouter from '@koa/router';
import KoaBodyParser from 'koa-bodyparser';
@Injectable() @Injectable()
export class KoishiService export class KoishiService
...@@ -27,6 +28,7 @@ export class KoishiService ...@@ -27,6 +28,7 @@ export class KoishiService
this.router = new KoaRouter(); this.router = new KoaRouter();
this._nestKoaTmpInstance.use(this.router.routes()); this._nestKoaTmpInstance.use(this.router.routes());
this._nestKoaTmpInstance.use(this.router.allowedMethods()); this._nestKoaTmpInstance.use(this.router.allowedMethods());
this._nestKoaTmpInstance.use(KoaBodyParser());
} }
_nestKoaTmpInstance = new Koa(); _nestKoaTmpInstance = new Koa();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment