@midwayjs/koa 3.9.9 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,8 +20,7 @@ let KoaConfiguration = class KoaConfiguration {
20
20
  init() {
21
21
  // register param decorator
22
22
  this.decoratorService.registerParameterHandler(core_1.WEB_ROUTER_PARAM_KEY, options => {
23
- var _a;
24
- return (0, core_1.extractKoaLikeValue)(options.metadata.type, options.metadata.propertyData, options.originParamType, (_a = options.metadata) === null || _a === void 0 ? void 0 : _a.pipes)(options.originArgs[0], options.originArgs[1]);
23
+ return (0, core_1.extractKoaLikeValue)(options.metadata.type, options.metadata.propertyData, options.originParamType)(options.originArgs[0], options.originArgs[1]);
25
24
  });
26
25
  }
27
26
  async onReady() {
@@ -3,8 +3,8 @@ import { IConfigurationOptions, IMidwayApplication, IMidwayContext } from '@midw
3
3
  import * as koa from 'koa';
4
4
  import { Context as KoaContext, DefaultState, Middleware, Next } from 'koa';
5
5
  import { RouterParamValue } from '@midwayjs/core';
6
- export declare type IMidwayKoaContext = IMidwayContext<KoaContext>;
7
- export declare type IMidwayKoaApplication = IMidwayApplication<IMidwayKoaContext, koa<DefaultState, IMidwayKoaContext> & {
6
+ export type IMidwayKoaContext = IMidwayContext<KoaContext>;
7
+ export type IMidwayKoaApplication = IMidwayApplication<IMidwayKoaContext, koa<DefaultState, IMidwayKoaContext> & {
8
8
  generateController(controllerMapping: string, routeArgsInfo?: RouterParamValue[], routerResponseData?: any[]): Middleware<DefaultState, IMidwayKoaContext>;
9
9
  /**
10
10
  * @deprecated
@@ -15,8 +15,8 @@ export declare type IMidwayKoaApplication = IMidwayApplication<IMidwayKoaContext
15
15
  /**
16
16
  * @deprecated use NextFunction definition
17
17
  */
18
- export declare type IMidwayKoaNext = Next;
19
- export declare type NextFunction = Next;
18
+ export type IMidwayKoaNext = Next;
19
+ export type NextFunction = Next;
20
20
  export interface IMidwayKoaConfigurationOptions extends IConfigurationOptions {
21
21
  /**
22
22
  * cookies sign keys
@@ -75,11 +75,11 @@ export interface IMidwayKoaConfigurationOptions extends IConfigurationOptions {
75
75
  */
76
76
  serverTimeout?: number;
77
77
  }
78
- export declare type MiddlewareParamArray = Array<Middleware<DefaultState, IMidwayKoaContext>>;
78
+ export type MiddlewareParamArray = Array<Middleware<DefaultState, IMidwayKoaContext>>;
79
79
  export interface IWebMiddleware {
80
80
  resolve(): koa.Middleware<DefaultState, IMidwayKoaContext>;
81
81
  }
82
- export declare type Application = IMidwayKoaApplication;
82
+ export type Application = IMidwayKoaApplication;
83
83
  export interface Context extends IMidwayKoaContext {
84
84
  }
85
85
  export interface BodyParserOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/koa",
3
- "version": "3.9.9",
3
+ "version": "3.10.1",
4
4
  "description": "Midway Web Framework for KOA",
5
5
  "main": "dist/index",
6
6
  "typings": "index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
27
  "@midwayjs/logger": "^2.15.0",
28
- "@midwayjs/mock": "^3.9.0",
28
+ "@midwayjs/mock": "^3.10.1",
29
29
  "@types/koa": "2.13.5",
30
30
  "@types/koa-router": "7.4.4",
31
31
  "fs-extra": "10.1.0"
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@koa/router": "^11.0.0",
35
35
  "@midwayjs/cookies": "^1.0.2",
36
- "@midwayjs/core": "^3.9.0",
37
- "@midwayjs/session": "^3.9.0",
36
+ "@midwayjs/core": "^3.10.1",
37
+ "@midwayjs/session": "^3.10.1",
38
38
  "koa": "2.14.1",
39
39
  "koa-bodyparser": "4.3.0"
40
40
  },
@@ -46,5 +46,5 @@
46
46
  "engines": {
47
47
  "node": ">=12"
48
48
  },
49
- "gitHead": "95bb5b3f23b41f685372c45d1c3bb12a3e31b4e0"
49
+ "gitHead": "6bc9f7a97e4188399d2406f5a38bad5aeb983e07"
50
50
  }