@modern-js/plugin-koa 2.41.0 → 2.42.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.
@@ -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 koaPlugin: () => CliPlugin<AppTools>;
4
- export default koaPlugin;
4
+ export default koaPlugin;
@@ -1,4 +1,4 @@
1
1
  import type { Context } from 'koa';
2
2
  export type { Context };
3
3
  declare const run: <O>(context: Context, cb: () => O | Promise<O>) => Promise<O>, useContext: () => Context;
4
- export { run, useContext };
4
+ 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;
@@ -1,4 +1,4 @@
1
1
  import { APIHandlerInfo } from '@modern-js/bff-core';
2
2
  import Router from 'koa-router';
3
3
  declare const registerRoutes: (router: Router, handlerInfos: APIHandlerInfo[]) => void;
4
- export default registerRoutes;
4
+ export default registerRoutes;
@@ -1,4 +1,4 @@
1
1
  import type { Middleware } from 'koa';
2
2
  export declare const hook: (attacher: Middleware) => Middleware;
3
3
  export { useContext } from './context';
4
- export * from '@modern-js/bff-core';
4
+ export * from '@modern-js/bff-core';
@@ -2,8 +2,8 @@ import { HttpMethod, APIHandlerInfo } from '@modern-js/bff-core';
2
2
  import { Context } from 'koa';
3
3
  type Handler = APIHandlerInfo['handler'];
4
4
  export declare const createRouteHandler: (handler: Handler) => (ctx: Context) => Promise<{
5
- code: any;
6
- message: string;
5
+ code: any;
6
+ message: string;
7
7
  } | undefined>;
8
8
  export declare const isNormalMethod: (httpMethod: HttpMethod) => httpMethod is HttpMethod;
9
- export {};
9
+ 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.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/cli/index.d.ts",
21
21
  "main": "./dist/cjs/cli/index.js",
@@ -67,10 +67,10 @@
67
67
  "koa-router": "^10.0.0",
68
68
  "type-is": "^1.6.18",
69
69
  "@swc/helpers": "0.5.3",
70
- "@modern-js/bff-core": "2.41.0",
71
- "@modern-js/utils": "2.41.0",
72
- "@modern-js/bff-runtime": "2.41.0",
73
- "@modern-js/types": "2.41.0"
70
+ "@modern-js/bff-core": "2.42.0",
71
+ "@modern-js/utils": "2.42.0",
72
+ "@modern-js/types": "2.42.0",
73
+ "@modern-js/bff-runtime": "2.42.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/jest": "^29",
@@ -84,11 +84,11 @@
84
84
  "supertest": "^6.1.6",
85
85
  "typescript": "^5",
86
86
  "zod": "^3.22.3",
87
- "@modern-js/core": "2.41.0",
88
- "@modern-js/server-core": "2.41.0",
89
- "@scripts/build": "2.41.0",
90
- "@scripts/jest-config": "2.41.0",
91
- "@modern-js/app-tools": "2.41.0"
87
+ "@modern-js/core": "2.42.0",
88
+ "@modern-js/server-core": "2.42.0",
89
+ "@modern-js/app-tools": "2.42.0",
90
+ "@scripts/build": "2.42.0",
91
+ "@scripts/jest-config": "2.42.0"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "koa": "^2.13.4"