@modern-js/types 1.3.0 → 1.3.3
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 +19 -0
- package/cli/index.d.ts +2 -0
- package/package.json +2 -4
- package/server/utils.d.ts +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
+
## 1.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- deeaa602: support svg/proxy/multi-version in unbundled
|
|
8
|
+
|
|
9
|
+
## 1.3.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 6891e4c2: add addDefineTypes define
|
|
14
|
+
|
|
15
|
+
## 1.3.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 78279953: compiler entry bug fix and dev build console
|
|
20
|
+
- 4d72edea: support dev compiler by entry
|
|
21
|
+
|
|
3
22
|
## 1.3.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
package/cli/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface IAppContext {
|
|
|
62
62
|
serverPath?: any;
|
|
63
63
|
}[];
|
|
64
64
|
entrypoints: Entrypoint[];
|
|
65
|
+
checkedEntries: string[];
|
|
65
66
|
serverRoutes: ServerRoute[];
|
|
66
67
|
htmlTemplates: HtmlTemplates;
|
|
67
68
|
existSrc: boolean;
|
|
@@ -129,4 +130,5 @@ export interface Hooks {
|
|
|
129
130
|
entrypoint: Entrypoint;
|
|
130
131
|
code: string;
|
|
131
132
|
}>;
|
|
133
|
+
addDefineTypes: AsyncWaterfall<void>;
|
|
132
134
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.3.
|
|
14
|
+
"version": "1.3.3",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@modern-js/plugin": "^1.2.1",
|
|
@@ -36,9 +36,7 @@
|
|
|
36
36
|
"sideEffects": false,
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"registry": "https://registry.npmjs.org/",
|
|
39
|
-
"access": "public"
|
|
40
|
-
"main": "",
|
|
41
|
-
"types": "./index.d.ts"
|
|
39
|
+
"access": "public"
|
|
42
40
|
},
|
|
43
41
|
"scripts": {
|
|
44
42
|
"test": "jest --passWithNoTests"
|
package/server/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
|
|
1
3
|
export type Metrics = {
|
|
2
4
|
counter: () => void;
|
|
3
5
|
timer: () => void;
|
|
@@ -17,3 +19,23 @@ export type Logger = {
|
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export type NextFunction = () => void;
|
|
22
|
+
|
|
23
|
+
export type ProxyDetail = {
|
|
24
|
+
target: string;
|
|
25
|
+
pathRewrite?: Record<string, string>;
|
|
26
|
+
secure?: boolean;
|
|
27
|
+
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
28
|
+
bypass?: (
|
|
29
|
+
req: IncomingMessage,
|
|
30
|
+
res: ServerResponse,
|
|
31
|
+
proxyOptions: ProxyOptions,
|
|
32
|
+
) => string | undefined | null | false;
|
|
33
|
+
context?: string | string[];
|
|
34
|
+
changeOrigin?: boolean;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ProxyOptions =
|
|
38
|
+
| Record<string, string>
|
|
39
|
+
| Record<string, ProxyDetail>
|
|
40
|
+
| ProxyDetail[]
|
|
41
|
+
| ProxyDetail;
|