@modern-js/types 1.18.1-alpha.0 → 1.19.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 +12 -1
- package/package.json +4 -5
- package/server/devServer.d.ts +38 -0
- package/server/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.19.0
|
|
4
|
+
|
|
5
|
+
## 1.18.1
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- 318e149: fix: tools.devServer type missing some properties
|
|
10
|
+
|
|
11
|
+
fix: 修复 tools.devServer 类型定义不完整的问题
|
|
12
|
+
|
|
13
|
+
- 60d95ad: fix: dev server config should be optional
|
|
14
|
+
fix: devServer 配置项应该是可选配置的
|
|
4
15
|
|
|
5
16
|
## 1.18.0
|
|
6
17
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.19.0",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@scripts/build": "1.
|
|
25
|
-
"@scripts/jest-config": "1.
|
|
24
|
+
"@scripts/build": "1.19.0",
|
|
25
|
+
"@scripts/jest-config": "1.19.0",
|
|
26
26
|
"@types/jest": "^27",
|
|
27
27
|
"@types/node": "^14",
|
|
28
28
|
"http-proxy-middleware": "^2.0.4",
|
|
@@ -48,6 +48,5 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"test": "wireit"
|
|
50
50
|
},
|
|
51
|
-
"main": ""
|
|
52
|
-
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
51
|
+
"main": ""
|
|
53
52
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
import type { NextFunction, BffProxyOptions } from './utils';
|
|
3
|
+
|
|
4
|
+
export type DevServerHttpsOptions = boolean | { key: string; cert: string };
|
|
5
|
+
|
|
6
|
+
export type RequestHandler = (
|
|
7
|
+
req: IncomingMessage,
|
|
8
|
+
res: ServerResponse,
|
|
9
|
+
next: NextFunction,
|
|
10
|
+
) => void;
|
|
11
|
+
|
|
12
|
+
export type DevServerOptions = {
|
|
13
|
+
/** config of hmr client. */
|
|
14
|
+
client?: {
|
|
15
|
+
path?: string;
|
|
16
|
+
port?: string;
|
|
17
|
+
host?: string;
|
|
18
|
+
logging?: string;
|
|
19
|
+
overlay?: boolean;
|
|
20
|
+
progress?: boolean;
|
|
21
|
+
};
|
|
22
|
+
devMiddleware?: {
|
|
23
|
+
writeToDisk: boolean | ((filename: string) => boolean);
|
|
24
|
+
};
|
|
25
|
+
proxy?: BffProxyOptions;
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
before?: RequestHandler[];
|
|
28
|
+
after?: RequestHandler[];
|
|
29
|
+
/** Whether to watch files change. */
|
|
30
|
+
watch?: boolean;
|
|
31
|
+
/** Whether to enable hot reload. */
|
|
32
|
+
hot?: boolean | string;
|
|
33
|
+
/** Whether to enable page reload. */
|
|
34
|
+
liveReload?: boolean;
|
|
35
|
+
/** Whether to enable https. */
|
|
36
|
+
https?: DevServerHttpsOptions;
|
|
37
|
+
[propName: string]: any;
|
|
38
|
+
};
|
package/server/index.d.ts
CHANGED