@modern-js/types 1.6.1 → 1.16.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 +24 -0
- package/package.json +4 -5
- package/server/utils.d.ts +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
+
## 1.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1100dd58c: chore: support react 18
|
|
8
|
+
|
|
9
|
+
chore: 支持 React 18
|
|
10
|
+
|
|
11
|
+
## 1.15.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- ad05af9: fix: bff.proxy and devServer.proxy types
|
|
16
|
+
|
|
17
|
+
fix: 修复 bff.proxy 和 devServer.proxy 类型定义不完整的问题
|
|
18
|
+
|
|
19
|
+
## 1.6.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- c423820: fix: missing devServer.proxy.cookieDomainRewrite type
|
|
24
|
+
|
|
25
|
+
fix: 修复 devServer.proxy.cookieDomainRewrite 类型缺失的问题
|
|
26
|
+
|
|
3
27
|
## 1.6.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.16.0",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./index.d.ts",
|
|
@@ -21,12 +21,11 @@
|
|
|
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
|
-
"
|
|
29
|
-
"@types/react-dom": "^17",
|
|
28
|
+
"http-proxy-middleware": "^2.0.4",
|
|
30
29
|
"jest": "^27"
|
|
31
30
|
},
|
|
32
31
|
"sideEffects": false,
|
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 =
|