@modern-js/types 1.6.0 → 1.15.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 +23 -0
- package/package.json +4 -3
- package/server/route.d.ts +2 -1
- package/server/utils.d.ts +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
+
## 1.15.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ad05af9: fix: bff.proxy and devServer.proxy types
|
|
8
|
+
|
|
9
|
+
fix: 修复 bff.proxy 和 devServer.proxy 类型定义不完整的问题
|
|
10
|
+
|
|
11
|
+
## 1.6.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- c423820: fix: missing devServer.proxy.cookieDomainRewrite type
|
|
16
|
+
|
|
17
|
+
fix: 修复 devServer.proxy.cookieDomainRewrite 类型缺失的问题
|
|
18
|
+
|
|
19
|
+
## 1.6.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 44e3bb1: feat: support response headers
|
|
24
|
+
feat: 支持设置响应头
|
|
25
|
+
|
|
3
26
|
## 1.6.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.15.0",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./index.d.ts",
|
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@scripts/build": "
|
|
25
|
-
"@scripts/jest-config": "
|
|
24
|
+
"@scripts/build": "1.15.0",
|
|
25
|
+
"@scripts/jest-config": "1.15.0",
|
|
26
26
|
"@types/jest": "^27",
|
|
27
27
|
"@types/node": "^14",
|
|
28
28
|
"@types/react": "^17",
|
|
29
29
|
"@types/react-dom": "^17",
|
|
30
|
+
"http-proxy-middleware": "^2.0.4",
|
|
30
31
|
"jest": "^27"
|
|
31
32
|
},
|
|
32
33
|
"sideEffects": false,
|
package/server/route.d.ts
CHANGED
package/server/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
import type { Options as ProxyOptions } from 'http-proxy-middleware';
|
|
2
3
|
|
|
3
4
|
export type Metrics = {
|
|
4
5
|
emitCounter: (name: string, value: number, tags: Record<string, any>) => void;
|
|
@@ -20,18 +21,13 @@ export type Logger = {
|
|
|
20
21
|
|
|
21
22
|
export type NextFunction = () => void;
|
|
22
23
|
|
|
23
|
-
export type ProxyDetail = {
|
|
24
|
-
target: string;
|
|
25
|
-
pathRewrite?: Record<string, string>;
|
|
26
|
-
secure?: boolean;
|
|
27
|
-
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
24
|
+
export type ProxyDetail = ProxyOptions & {
|
|
28
25
|
bypass?: (
|
|
29
26
|
req: IncomingMessage,
|
|
30
27
|
res: ServerResponse,
|
|
31
28
|
proxyOptions: BffProxyOptions,
|
|
32
29
|
) => string | undefined | null | false;
|
|
33
30
|
context?: string | string[];
|
|
34
|
-
changeOrigin?: boolean;
|
|
35
31
|
};
|
|
36
32
|
|
|
37
33
|
export type BffProxyOptions =
|