@midwayjs/express 3.1.6 → 3.1.7-alpha.0
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.
- package/dist/interface.d.ts +1 -26
- package/index.d.ts +35 -0
- package/package.json +8 -7
package/dist/interface.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { CommonMiddlewareUnion, ContextMiddlewareManager, FunctionMiddleware, IConfigurationOptions, IMiddleware, IMidwayApplication, IMidwayContext } from '@midwayjs/core';
|
|
3
|
-
import { Application as ExpressApplication,
|
|
4
|
-
import { Options, OptionsJson, OptionsText, OptionsUrlencoded } from 'body-parser';
|
|
3
|
+
import { Application as ExpressApplication, NextFunction as ExpressNextFunction, Request as ExpressRequest, Response as ExpressResponse } from 'express';
|
|
5
4
|
declare type Request = IMidwayContext<ExpressRequest>;
|
|
6
5
|
export declare type Response = ExpressResponse;
|
|
7
6
|
export declare type NextFunction = ExpressNextFunction;
|
|
@@ -68,29 +67,5 @@ export interface IMidwayExpressConfigurationOptions extends IConfigurationOption
|
|
|
68
67
|
globalPrefix?: string;
|
|
69
68
|
}
|
|
70
69
|
export declare type Application = IMidwayExpressApplication;
|
|
71
|
-
declare module '@midwayjs/core/dist/interface' {
|
|
72
|
-
interface MidwayConfig {
|
|
73
|
-
express?: IMidwayExpressConfigurationOptions;
|
|
74
|
-
cookieParser?: {
|
|
75
|
-
secret?: string | string[];
|
|
76
|
-
options?: CookieOptions;
|
|
77
|
-
};
|
|
78
|
-
bodyParser?: {
|
|
79
|
-
enable?: boolean;
|
|
80
|
-
json?: OptionsJson & {
|
|
81
|
-
enable?: boolean;
|
|
82
|
-
};
|
|
83
|
-
raw?: Options & {
|
|
84
|
-
enable?: boolean;
|
|
85
|
-
};
|
|
86
|
-
text?: OptionsText & {
|
|
87
|
-
enable?: boolean;
|
|
88
|
-
};
|
|
89
|
-
urlencoded?: OptionsUrlencoded & {
|
|
90
|
-
enable?: boolean;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
70
|
export {};
|
|
96
71
|
//# sourceMappingURL=interface.d.ts.map
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CookieOptions } from 'express';
|
|
2
|
+
import {
|
|
3
|
+
Options,
|
|
4
|
+
OptionsJson,
|
|
5
|
+
OptionsText,
|
|
6
|
+
OptionsUrlencoded,
|
|
7
|
+
} from 'body-parser';
|
|
8
|
+
import { IMidwayExpressConfigurationOptions } from './dist';
|
|
9
|
+
|
|
10
|
+
export * from './dist/index';
|
|
11
|
+
|
|
12
|
+
declare module '@midwayjs/core' {
|
|
13
|
+
interface MidwayConfig {
|
|
14
|
+
express?: IMidwayExpressConfigurationOptions;
|
|
15
|
+
cookieParser?: {
|
|
16
|
+
secret?: string | string[];
|
|
17
|
+
options?: CookieOptions;
|
|
18
|
+
};
|
|
19
|
+
bodyParser?: {
|
|
20
|
+
enable?: boolean;
|
|
21
|
+
json?: OptionsJson & {
|
|
22
|
+
enable?: boolean;
|
|
23
|
+
};
|
|
24
|
+
raw?: Options & {
|
|
25
|
+
enable?: boolean;
|
|
26
|
+
};
|
|
27
|
+
text?: OptionsText & {
|
|
28
|
+
enable?: boolean;
|
|
29
|
+
};
|
|
30
|
+
urlencoded?: OptionsUrlencoded & {
|
|
31
|
+
enable?: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/express",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7-alpha.0",
|
|
4
4
|
"description": "Midway Web Framework for Express",
|
|
5
5
|
"main": "dist/index",
|
|
6
|
-
"typings": "
|
|
6
|
+
"typings": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
|
|
@@ -19,20 +19,21 @@
|
|
|
19
19
|
],
|
|
20
20
|
"files": [
|
|
21
21
|
"dist/**/*.js",
|
|
22
|
-
"dist/**/*.d.ts"
|
|
22
|
+
"dist/**/*.d.ts",
|
|
23
|
+
"index.d.ts"
|
|
23
24
|
],
|
|
24
25
|
"license": "MIT",
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@midwayjs/decorator": "^3.1.6",
|
|
27
28
|
"@midwayjs/logger": "^2.15.0",
|
|
28
|
-
"@midwayjs/mock": "^3.1.
|
|
29
|
+
"@midwayjs/mock": "^3.1.7-alpha.0",
|
|
29
30
|
"@types/body-parser": "1.19.2",
|
|
30
31
|
"@types/express": "4.17.13",
|
|
31
32
|
"fs-extra": "10.0.1"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@midwayjs/core": "^3.1.
|
|
35
|
-
"@midwayjs/express-session": "^3.1.
|
|
35
|
+
"@midwayjs/core": "^3.1.7-alpha.0",
|
|
36
|
+
"@midwayjs/express-session": "^3.1.7-alpha.0",
|
|
36
37
|
"body-parser": "1.19.2",
|
|
37
38
|
"cookie-parser": "^1.4.6",
|
|
38
39
|
"express": "4.17.3"
|
|
@@ -45,5 +46,5 @@
|
|
|
45
46
|
"engines": {
|
|
46
47
|
"node": ">=12"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "8cb6db25f7eb794d9c61aaf69a43ac6506a289b5"
|
|
49
50
|
}
|