@modern-js/plugin-express 2.41.0 → 2.42.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.
- package/dist/types/cli/index.d.ts +1 -1
- package/dist/types/context.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/registerRoutes.d.ts +1 -1
- package/dist/types/runtime/hook.d.ts +1 -1
- package/dist/types/runtime/index.d.ts +1 -1
- package/dist/types/runtime/operators.d.ts +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/package.json +10 -10
package/dist/types/context.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Request, Response } from 'express';
|
|
2
2
|
export type Context = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
req: Request;
|
|
4
|
+
res: Response;
|
|
5
5
|
};
|
|
6
6
|
declare const run: <O>(context: Context, cb: () => O | Promise<O>) => Promise<O>, useContext: () => Context;
|
|
7
|
-
export { run, useContext };
|
|
7
|
+
export { run, useContext };
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/plugin.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import 'reflect-metadata';
|
|
|
2
2
|
import type { APIHandlerInfo } from '@modern-js/bff-core';
|
|
3
3
|
import type { Express } from 'express';
|
|
4
4
|
declare const registerRoutes: (app: Express, handlerInfos: APIHandlerInfo[]) => void;
|
|
5
|
-
export default registerRoutes;
|
|
5
|
+
export default registerRoutes;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Request, Response, NextFunction } from 'express';
|
|
2
|
-
export declare const hook: (attacher: (req: Request, res: Response, next: NextFunction) => void | Promise<void>) => (req: Request, res: Response, next: NextFunction) => void | Promise<void>;
|
|
2
|
+
export declare const hook: (attacher: (req: Request, res: Response, next: NextFunction) => void | Promise<void>) => (req: Request, res: Response, next: NextFunction) => void | Promise<void>;
|
|
@@ -8,4 +8,4 @@ export declare const Pipe: <T>(func: PipeFunction<T>) => Operator;
|
|
|
8
8
|
export type Pipe = typeof Pipe;
|
|
9
9
|
export declare const Middleware: (middleware: (req: Request, res: Response, next: NextFunction) => void) => Operator<void>;
|
|
10
10
|
export type Middleware = typeof Middleware;
|
|
11
|
-
export {};
|
|
11
|
+
export {};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ import type { Request, Response, NextFunction } from 'express';
|
|
|
5
5
|
type Handler = APIHandlerInfo['handler'];
|
|
6
6
|
export declare const createRouteHandler: (handler: Handler) => (req: Request, res: Response, next: NextFunction) => Promise<void | Response<any, Record<string, any>>>;
|
|
7
7
|
export declare const isNormalMethod: (httpMethod: HttpMethod) => httpMethod is HttpMethod;
|
|
8
|
-
export {};
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.42.1",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"reflect-metadata": "^0.1.13",
|
|
50
50
|
"type-is": "^1.6.18",
|
|
51
51
|
"@swc/helpers": "0.5.3",
|
|
52
|
-
"@modern-js/bff-core": "2.
|
|
53
|
-
"@modern-js/bff-runtime": "2.
|
|
54
|
-
"@modern-js/
|
|
55
|
-
"@modern-js/
|
|
52
|
+
"@modern-js/bff-core": "2.42.1",
|
|
53
|
+
"@modern-js/bff-runtime": "2.42.1",
|
|
54
|
+
"@modern-js/types": "2.42.1",
|
|
55
|
+
"@modern-js/utils": "2.42.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/cookie-parser": "^1.4.2",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"supertest": "^6.1.6",
|
|
69
69
|
"typescript": "^5",
|
|
70
70
|
"zod": "^3.22.3",
|
|
71
|
-
"@modern-js/core": "2.
|
|
72
|
-
"@modern-js/
|
|
73
|
-
"@modern-js/app-tools": "2.
|
|
74
|
-
"@scripts/build": "2.
|
|
75
|
-
"@scripts/jest-config": "2.
|
|
71
|
+
"@modern-js/server-core": "2.42.1",
|
|
72
|
+
"@modern-js/core": "2.42.1",
|
|
73
|
+
"@modern-js/app-tools": "2.42.1",
|
|
74
|
+
"@scripts/build": "2.42.1",
|
|
75
|
+
"@scripts/jest-config": "2.42.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"express": "^4.17.1"
|