@modern-js/types 2.5.1-alpha.0 → 2.6.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @modern-js/types
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 49fa0b1: fix: remove header info from SSR ctx to avoid security issues, reserved a switch
8
+ fix: 移除 SSR 上下文中的 header 信息,避免造成安全问题,预留一个字段开启
9
+ - 62930b9: fix: support configure host for devServer
10
+ fix: 支持配置 devServer 的 host
11
+
3
12
  ## 2.5.0
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.5.1-alpha.0",
14
+ "version": "2.6.0",
15
15
  "types": "./index.d.ts",
16
16
  "exports": {
17
17
  ".": "./index.d.ts",
@@ -31,15 +31,15 @@
31
31
  }
32
32
  },
33
33
  "devDependencies": {
34
- "@scripts/build": "2.5.0",
35
34
  "@types/babel__core": "^7.1.19",
36
- "@scripts/jest-config": "2.5.0",
37
35
  "@types/jest": "^27",
38
36
  "@types/node": "^14",
39
37
  "@jest/types": "^27.0.6",
40
38
  "http-proxy-middleware": "^2.0.4",
41
39
  "jest": "^27",
42
- "type-fest": "2.15.0"
40
+ "type-fest": "2.15.0",
41
+ "@scripts/build": "2.6.0",
42
+ "@scripts/jest-config": "2.6.0"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {
@@ -58,7 +58,6 @@ export type BaseSSRServerContext = {
58
58
  query: Record<string, string>;
59
59
  headers: IncomingHttpHeaders;
60
60
  host: string;
61
- cookieMap: Record<string, any>;
62
61
  [propsName: string]: any;
63
62
  };
64
63
  response: {
@@ -90,6 +89,8 @@ export type BaseSSRServerContext = {
90
89
  };
91
90
  cacheConfig?: any;
92
91
 
92
+ enableUnsafeCtx?: boolean;
93
+
93
94
  req: ModernServerContext['req'];
94
95
 
95
96
  res: ModernServerContext['res'];
package/server/index.d.ts CHANGED
@@ -2,5 +2,4 @@ export * from './context';
2
2
  export * from './hook';
3
3
  export * from './utils';
4
4
  export * from './route';
5
- export * from './bff';
6
5
  export * from './devServer';
package/server/bff.d.ts DELETED
@@ -1 +0,0 @@
1
- export type HttpMethodDecider = 'functionName' | 'inputParams';