@modern-js/types 2.6.0 → 2.7.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/CHANGELOG.md +9 -0
- package/common/index.d.ts +2 -0
- package/package.json +3 -3
- package/server/bff.d.ts +1 -0
- package/server/context.d.ts +3 -0
- package/server/devServer.d.ts +2 -1
- package/server/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- dcad887024: feat: support deferred data for streaming ssr
|
|
8
|
+
feat: 流式渲染支持 deferred data
|
|
9
|
+
- 84bfb439b8: feat: support custom apiDir, lambdaDir and style of writing for bff
|
|
10
|
+
feat: 支持定制 api 目录,lambda 目录,bff 的写法
|
|
11
|
+
|
|
3
12
|
## 2.6.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/common/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.7.0",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"http-proxy-middleware": "^2.0.4",
|
|
39
39
|
"jest": "^27",
|
|
40
40
|
"type-fest": "2.15.0",
|
|
41
|
-
"@scripts/build": "2.
|
|
42
|
-
"@scripts/jest-config": "2.
|
|
41
|
+
"@scripts/build": "2.7.0",
|
|
42
|
+
"@scripts/jest-config": "2.7.0"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"publishConfig": {
|
package/server/bff.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HttpMethodDecider = 'functionName' | 'inputParams';
|
package/server/context.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse, IncomingHttpHeaders } from 'http';
|
|
2
2
|
import { URL } from 'url';
|
|
3
3
|
import qs from 'querystring';
|
|
4
|
+
import type { SSRMode } from 'common';
|
|
4
5
|
import { Metrics, Logger } from './utils';
|
|
5
6
|
|
|
6
7
|
export interface ModernServerContext {
|
|
@@ -94,6 +95,8 @@ export type BaseSSRServerContext = {
|
|
|
94
95
|
req: ModernServerContext['req'];
|
|
95
96
|
|
|
96
97
|
res: ModernServerContext['res'];
|
|
98
|
+
|
|
99
|
+
mode?: SSRMode; // ssr type
|
|
97
100
|
};
|
|
98
101
|
export interface ISAppContext {
|
|
99
102
|
appDirectory: string;
|
package/server/devServer.d.ts
CHANGED
|
@@ -25,7 +25,8 @@ export type DevServerOptions = {
|
|
|
25
25
|
protocol?: string;
|
|
26
26
|
};
|
|
27
27
|
devMiddleware?: {
|
|
28
|
-
writeToDisk
|
|
28
|
+
writeToDisk?: boolean | ((filename: string) => boolean);
|
|
29
|
+
outputFileSystem?: Record<string, any>;
|
|
29
30
|
};
|
|
30
31
|
proxy?: BffProxyOptions;
|
|
31
32
|
headers?: Record<string, string>;
|