@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.
@@ -1,4 +1,4 @@
1
1
  import type { CliPlugin } from '@modern-js/core';
2
2
  import type { AppTools } from '@modern-js/app-tools';
3
3
  export declare const expressPlugin: () => CliPlugin<AppTools>;
4
- export default expressPlugin;
4
+ export default expressPlugin;
@@ -1,7 +1,7 @@
1
1
  import { Request, Response } from 'express';
2
2
  export type Context = {
3
- req: Request;
4
- res: Response;
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 };
@@ -1,3 +1,3 @@
1
1
  import plugin from './plugin';
2
2
  export * from './context';
3
- export default plugin;
3
+ export default plugin;
@@ -1,3 +1,3 @@
1
1
  import type { ServerPlugin } from '@modern-js/server-core';
2
2
  declare const _default: () => ServerPlugin;
3
- export default _default;
3
+ export default _default;
@@ -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>;
@@ -1,4 +1,4 @@
1
1
  export * from '@modern-js/bff-core';
2
2
  export { useContext } from '../context';
3
3
  export { hook } from './hook';
4
- export * from './operators';
4
+ export * from './operators';
@@ -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 {};
@@ -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.41.0",
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.41.0",
53
- "@modern-js/bff-runtime": "2.41.0",
54
- "@modern-js/utils": "2.41.0",
55
- "@modern-js/types": "2.41.0"
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.41.0",
72
- "@modern-js/server-core": "2.41.0",
73
- "@modern-js/app-tools": "2.41.0",
74
- "@scripts/build": "2.41.0",
75
- "@scripts/jest-config": "2.41.0"
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"