webpack-dev-server 3.8.1 → 3.10.1
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 +42 -0
- package/bin/cli-flags.js +195 -0
- package/client/index.bundle.js +2 -1
- package/client/index.bundle.js.LICENSE +1 -0
- package/client/live.bundle.js +2 -25
- package/client/live.bundle.js.LICENSE +24 -0
- package/client/sockjs.bundle.js +2 -1
- package/client/sockjs.bundle.js.LICENSE +1 -0
- package/client/utils/createSocketUrl.js +41 -39
- package/lib/Server.js +7 -5
- package/lib/options.json +17 -2
- package/lib/servers/WebsocketServer.js +11 -1
- package/lib/utils/createCertificate.js +11 -4
- package/lib/utils/createConfig.js +1 -1
- package/lib/utils/normalizeOptions.js +3 -0
- package/lib/utils/runBonjour.js +2 -1
- package/lib/utils/runOpen.js +17 -11
- package/package.json +32 -32
package/lib/utils/runBonjour.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
function runBonjour({ port }) {
|
|
4
4
|
const bonjour = require('bonjour')();
|
|
5
|
+
const os = require('os');
|
|
5
6
|
|
|
6
7
|
bonjour.publish({
|
|
7
|
-
name:
|
|
8
|
+
name: `Webpack Dev Server ${os.hostname()}:${port}`,
|
|
8
9
|
port,
|
|
9
10
|
type: 'http',
|
|
10
11
|
subtypes: ['webpack'],
|
package/lib/utils/runOpen.js
CHANGED
|
@@ -6,23 +6,29 @@ const isAbsoluteUrl = require('is-absolute-url');
|
|
|
6
6
|
function runOpen(uri, options, log) {
|
|
7
7
|
// https://github.com/webpack/webpack-dev-server/issues/1990
|
|
8
8
|
let openOptions = { wait: false };
|
|
9
|
-
let
|
|
9
|
+
let openOptionValue = '';
|
|
10
10
|
|
|
11
11
|
if (typeof options.open === 'string') {
|
|
12
12
|
openOptions = Object.assign({}, openOptions, { app: options.open });
|
|
13
|
-
|
|
13
|
+
openOptionValue = `: "${options.open}"`;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
options.openPage
|
|
18
|
-
? options.openPage
|
|
19
|
-
:
|
|
16
|
+
const pages =
|
|
17
|
+
typeof options.openPage === 'string'
|
|
18
|
+
? [options.openPage]
|
|
19
|
+
: options.openPage || [''];
|
|
20
20
|
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return Promise.all(
|
|
22
|
+
pages.map((page) => {
|
|
23
|
+
const pageUrl = page && isAbsoluteUrl(page) ? page : `${uri}${page}`;
|
|
24
|
+
|
|
25
|
+
return open(pageUrl, openOptions).catch(() => {
|
|
26
|
+
log.warn(
|
|
27
|
+
`Unable to open "${pageUrl}" in browser${openOptionValue}. If you are running in a headless environment, please do not use the --open flag`
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
);
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
module.exports = runOpen;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack-dev-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.1",
|
|
4
4
|
"description": "Serves a webpack app. Updates the browser on changes.",
|
|
5
5
|
"bin": "bin/webpack-dev-server.js",
|
|
6
6
|
"main": "lib/Server.js",
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"del": "^4.1.1",
|
|
46
46
|
"express": "^4.17.1",
|
|
47
47
|
"html-entities": "^1.2.1",
|
|
48
|
-
"http-proxy-middleware": "
|
|
48
|
+
"http-proxy-middleware": "0.19.1",
|
|
49
49
|
"import-local": "^2.0.0",
|
|
50
50
|
"internal-ip": "^4.3.0",
|
|
51
51
|
"ip": "^1.1.5",
|
|
52
|
-
"is-absolute-url": "^3.0.
|
|
52
|
+
"is-absolute-url": "^3.0.3",
|
|
53
53
|
"killable": "^1.0.1",
|
|
54
|
-
"loglevel": "^1.6.
|
|
54
|
+
"loglevel": "^1.6.6",
|
|
55
55
|
"opn": "^5.5.0",
|
|
56
56
|
"p-retry": "^3.0.1",
|
|
57
|
-
"portfinder": "^1.0.
|
|
57
|
+
"portfinder": "^1.0.25",
|
|
58
58
|
"schema-utils": "^1.0.0",
|
|
59
|
-
"selfsigned": "^1.10.
|
|
59
|
+
"selfsigned": "^1.10.7",
|
|
60
60
|
"semver": "^6.3.0",
|
|
61
61
|
"serve-index": "^1.9.1",
|
|
62
62
|
"sockjs": "0.3.19",
|
|
@@ -65,56 +65,56 @@
|
|
|
65
65
|
"strip-ansi": "^3.0.1",
|
|
66
66
|
"supports-color": "^6.1.0",
|
|
67
67
|
"url": "^0.11.0",
|
|
68
|
-
"webpack-dev-middleware": "^3.7.
|
|
68
|
+
"webpack-dev-middleware": "^3.7.2",
|
|
69
69
|
"webpack-log": "^2.0.0",
|
|
70
70
|
"ws": "^6.2.1",
|
|
71
71
|
"yargs": "12.0.5"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@babel/cli": "^7.
|
|
75
|
-
"@babel/core": "^7.
|
|
76
|
-
"@babel/plugin-transform-runtime": "^7.6
|
|
77
|
-
"@babel/preset-env": "^7.6
|
|
78
|
-
"@babel/runtime": "^7.6
|
|
79
|
-
"@commitlint/cli": "^8.
|
|
80
|
-
"@commitlint/config-conventional": "^8.
|
|
74
|
+
"@babel/cli": "^7.7.5",
|
|
75
|
+
"@babel/core": "^7.7.5",
|
|
76
|
+
"@babel/plugin-transform-runtime": "^7.7.6",
|
|
77
|
+
"@babel/preset-env": "^7.7.6",
|
|
78
|
+
"@babel/runtime": "^7.7.6",
|
|
79
|
+
"@commitlint/cli": "^8.2.0",
|
|
80
|
+
"@commitlint/config-conventional": "^8.2.0",
|
|
81
81
|
"babel-loader": "^8.0.6",
|
|
82
82
|
"body-parser": "^1.19.0",
|
|
83
83
|
"commitlint-azure-pipelines-cli": "^1.0.2",
|
|
84
|
-
"copy-webpack-plugin": "^5.
|
|
84
|
+
"copy-webpack-plugin": "^5.1.1",
|
|
85
85
|
"css-loader": "^2.1.1",
|
|
86
|
-
"eslint": "^6.
|
|
87
|
-
"eslint-config-prettier": "^6.
|
|
86
|
+
"eslint": "^6.7.2",
|
|
87
|
+
"eslint-config-prettier": "^6.7.0",
|
|
88
88
|
"eslint-config-webpack": "^1.2.5",
|
|
89
|
-
"eslint-plugin-import": "^2.
|
|
89
|
+
"eslint-plugin-import": "^2.19.1",
|
|
90
90
|
"execa": "^1.0.0",
|
|
91
|
-
"file-loader": "^
|
|
91
|
+
"file-loader": "^5.0.2",
|
|
92
92
|
"html-loader": "^0.5.5",
|
|
93
93
|
"html-webpack-plugin": "^3.2.0",
|
|
94
|
-
"husky": "^3.0
|
|
94
|
+
"husky": "^3.1.0",
|
|
95
95
|
"jest": "^24.9.0",
|
|
96
|
-
"jest-junit": "^
|
|
96
|
+
"jest-junit": "^10.0.0",
|
|
97
97
|
"jquery": "^3.4.1",
|
|
98
98
|
"less": "^3.10.3",
|
|
99
99
|
"less-loader": "^5.0.0",
|
|
100
|
-
"lint-staged": "^9.
|
|
101
|
-
"marked": "^0.
|
|
102
|
-
"memfs": "^
|
|
100
|
+
"lint-staged": "^9.5.0",
|
|
101
|
+
"marked": "^0.8.0",
|
|
102
|
+
"memfs": "^3.0.1",
|
|
103
103
|
"npm-run-all": "^4.1.5",
|
|
104
|
-
"prettier": "^1.
|
|
104
|
+
"prettier": "^1.19.1",
|
|
105
105
|
"puppeteer": "^1.20.0",
|
|
106
106
|
"rimraf": "^3.0.0",
|
|
107
|
-
"standard-version": "^7.0.
|
|
108
|
-
"style-loader": "^1.0.
|
|
107
|
+
"standard-version": "^7.0.1",
|
|
108
|
+
"style-loader": "^1.0.1",
|
|
109
109
|
"supertest": "^4.0.2",
|
|
110
110
|
"tcp-port-used": "^1.0.1",
|
|
111
|
-
"typescript": "^3.
|
|
112
|
-
"url-loader": "^
|
|
113
|
-
"webpack": "^4.
|
|
114
|
-
"webpack-cli": "^3.3.
|
|
111
|
+
"typescript": "^3.7.3",
|
|
112
|
+
"url-loader": "^3.0.0",
|
|
113
|
+
"webpack": "^4.41.3",
|
|
114
|
+
"webpack-cli": "^3.3.10"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
|
-
"webpack": "^4.0.0"
|
|
117
|
+
"webpack": "^4.0.0 || ^5.0.0"
|
|
118
118
|
},
|
|
119
119
|
"author": "Tobias Koppers @sokra",
|
|
120
120
|
"bugs": "https://github.com/webpack/webpack-dev-server/issues",
|