@modern-js/server-core 0.0.0-next-20230226140607 → 0.0.0-next-20230227084544
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# @modern-js/server-plugin
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-20230227084544
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 84bfb439b: feat: support custom apiDir, lambdaDir and style of writing for bff
|
|
8
|
+
feat: 支持定制 api 目录,lambda 目录,bff 的写法
|
|
4
9
|
|
|
5
10
|
### Patch Changes
|
|
6
11
|
|
|
@@ -10,8 +15,9 @@
|
|
|
10
15
|
|
|
11
16
|
- Updated dependencies [dcad88702]
|
|
12
17
|
- Updated dependencies [7fff9020e]
|
|
13
|
-
|
|
14
|
-
- @modern-js/
|
|
18
|
+
- Updated dependencies [84bfb439b]
|
|
19
|
+
- @modern-js/utils@0.0.0-next-20230227084544
|
|
20
|
+
- @modern-js/plugin@0.0.0-next-20230227084544
|
|
15
21
|
|
|
16
22
|
## 2.6.0
|
|
17
23
|
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
3
|
import type { Component } from 'react';
|
|
4
4
|
import { CommonAPI, ToThreads, AsyncSetup, PluginOptions } from '@modern-js/plugin';
|
|
5
|
-
import type { ModernServerContext, BaseSSRServerContext, AfterMatchContext, AfterRenderContext, MiddlewareContext, ISAppContext, ServerRoute } from '@modern-js/types';
|
|
5
|
+
import type { ModernServerContext, BaseSSRServerContext, AfterMatchContext, AfterRenderContext, MiddlewareContext, ISAppContext, ServerRoute, HttpMethodDecider } from '@modern-js/types';
|
|
6
6
|
import type { BffUserConfig, ServerOptions, UserConfig } from './types/config';
|
|
7
7
|
export type WebAdapter = (ctx: MiddlewareContext) => void | Promise<void>;
|
|
8
8
|
export type Adapter = (req: IncomingMessage, res: ServerResponse) => void | Promise<void>;
|
|
@@ -14,6 +14,7 @@ export type BeforeRouteHandler = (context: ModernServerContext) => Promise<void>
|
|
|
14
14
|
export type APIServerStartInput = {
|
|
15
15
|
pwd: string;
|
|
16
16
|
prefix?: string;
|
|
17
|
+
httpMethodDecider?: HttpMethodDecider;
|
|
17
18
|
config?: {
|
|
18
19
|
middleware?: Array<any>;
|
|
19
20
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Options } from 'http-proxy-middleware';
|
|
2
|
+
import type { HttpMethodDecider } from '@modern-js/types';
|
|
2
3
|
export interface BffUserConfig {
|
|
3
4
|
prefix?: string;
|
|
4
5
|
proxy?: Record<string, Options>;
|
|
6
|
+
httpMethodDecider?: HttpMethodDecider;
|
|
5
7
|
enableHandleWeb?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export type BffNormalizedConfig = BffUserConfig;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-20230227084544",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/cjs/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@modern-js/
|
|
32
|
-
"@modern-js/
|
|
31
|
+
"@modern-js/utils": "0.0.0-next-20230227084544",
|
|
32
|
+
"@modern-js/plugin": "0.0.0-next-20230227084544"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/jest": "^27",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"jest": "^27",
|
|
39
39
|
"ts-jest": "^27.0.4",
|
|
40
40
|
"typescript": "^4",
|
|
41
|
-
"@modern-js/types": "0.0.0-next-
|
|
42
|
-
"@modern-js/babel-preset-app": "0.0.0-next-
|
|
43
|
-
"@scripts/build": "0.0.0-next-
|
|
44
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
41
|
+
"@modern-js/types": "0.0.0-next-20230227084544",
|
|
42
|
+
"@modern-js/babel-preset-app": "0.0.0-next-20230227084544",
|
|
43
|
+
"@scripts/build": "0.0.0-next-20230227084544",
|
|
44
|
+
"@scripts/jest-config": "0.0.0-next-20230227084544"
|
|
45
45
|
},
|
|
46
46
|
"sideEffects": false,
|
|
47
47
|
"publishConfig": {
|