@midwayjs/koa 3.0.0 → 3.0.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.
Files changed (2) hide show
  1. package/dist/interface.d.ts +13 -13
  2. package/package.json +6 -6
@@ -64,48 +64,48 @@ interface BodyParserOptions {
64
64
  /**
65
65
  * parser will only parse when request type hits enableTypes, default is ['json', 'form'].
66
66
  */
67
- enableTypes?: string[] | undefined;
67
+ enableTypes?: string[];
68
68
  /**
69
69
  * requested encoding. Default is utf-8 by co-body
70
70
  */
71
- encode?: string | undefined;
71
+ encode?: string;
72
72
  /**
73
73
  * limit of the urlencoded body. If the body ends up being larger than this limit
74
74
  * a 413 error code is returned. Default is 56kb
75
75
  */
76
- formLimit?: string | undefined;
76
+ formLimit?: string;
77
77
  /**
78
78
  * limit of the json body. Default is 1mb
79
79
  */
80
- jsonLimit?: string | undefined;
80
+ jsonLimit?: string;
81
81
  /**
82
82
  * limit of the text body. Default is 1mb.
83
83
  */
84
- textLimit?: string | undefined;
84
+ textLimit?: string;
85
85
  /**
86
86
  * limit of the xml body. Default is 1mb.
87
87
  */
88
- xmlLimit?: string | undefined;
88
+ xmlLimit?: string;
89
89
  /**
90
90
  * when set to true, JSON parser will only accept arrays and objects. Default is true
91
91
  */
92
- strict?: boolean | undefined;
92
+ strict?: boolean;
93
93
  /**
94
94
  * custom json request detect function. Default is null
95
95
  */
96
- detectJSON?: ((ctx: IMidwayKoaContext) => boolean) | undefined;
96
+ detectJSON?: ((ctx: IMidwayKoaContext) => boolean);
97
97
  /**
98
98
  * support extend types
99
99
  */
100
100
  extendTypes?: {
101
- json?: string[] | undefined;
102
- form?: string[] | undefined;
103
- text?: string[] | undefined;
104
- } | undefined;
101
+ json?: string[];
102
+ form?: string[];
103
+ text?: string[];
104
+ };
105
105
  /**
106
106
  * support custom error handle
107
107
  */
108
- onerror?: ((err: Error, ctx: IMidwayKoaContext) => void) | undefined;
108
+ onerror?: ((err: Error, ctx: IMidwayKoaContext) => void);
109
109
  }
110
110
  declare module '@midwayjs/core/dist/interface' {
111
111
  interface MidwayConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/koa",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Midway Web Framework for KOA",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
26
  "@midwayjs/decorator": "^3.0.0",
27
- "@midwayjs/logger": "2.14.0",
28
- "@midwayjs/mock": "^3.0.0",
27
+ "@midwayjs/logger": "^2.14.0",
28
+ "@midwayjs/mock": "^3.0.1",
29
29
  "@types/koa": "2.13.4",
30
30
  "@types/koa-router": "7.4.4",
31
31
  "fs-extra": "10.0.0"
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@koa/router": "^10.0.0",
35
35
  "@midwayjs/cookies": "1.0.1",
36
- "@midwayjs/core": "^3.0.0",
37
- "@midwayjs/session": "^3.0.0",
36
+ "@midwayjs/core": "^3.0.1",
37
+ "@midwayjs/session": "^3.0.1",
38
38
  "koa": "2.13.4",
39
39
  "koa-bodyparser": "4.3.0"
40
40
  },
@@ -46,5 +46,5 @@
46
46
  "engines": {
47
47
  "node": ">=12"
48
48
  },
49
- "gitHead": "55c26029bccf7bbb739fa1597e8f418dafa2caa0"
49
+ "gitHead": "f345b4ed0392e5c3b9e815438ef0a377ad6da076"
50
50
  }