@modern-js/types 1.6.2 → 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 +8 -0
- package/package.json +4 -3
- package/server/utils.d.ts +3 -9
package/CHANGELOG.md
CHANGED
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/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,20 +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
|
-
/** Rewrites domain of set-cookie headers. */
|
|
36
|
-
cookieDomainRewrite?: false | string | Record<string, string>;
|
|
37
31
|
};
|
|
38
32
|
|
|
39
33
|
export type BffProxyOptions =
|