Skip to content

Commit 47dcc0c

Browse files
committed
chore: rebase
2 parents a26a790 + 1997a6e commit 47dcc0c

File tree

6 files changed

+51
-17
lines changed

6 files changed

+51
-17
lines changed

lib/Server.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,11 @@ class Server {
735735
}
736736

737737
if (this.options.bonjour) {
738+
const protocol =
739+
this.options.bonjour.type || this.options.https ? 'https' : 'http';
740+
738741
this.logger.info(
739-
'Broadcasting "http" with subtype of "webpack" via ZeroConf DNS (Bonjour)'
742+
`Broadcasting "${protocol}" with subtype of "webpack" via ZeroConf DNS (Bonjour)`
740743
);
741744
}
742745

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@
7171
"@commitlint/cli": "^12.1.1",
7272
"@commitlint/config-conventional": "^12.1.1",
7373
"@jest/test-sequencer": "^26.6.3",
74-
"acorn": "^8.1.1",
74+
"acorn": "^8.2.0",
7575
"babel-jest": "^26.6.3",
7676
"babel-loader": "^8.2.2",
7777
"body-parser": "^1.19.0",
7878
"core-js": "^3.11.0",
7979
"css-loader": "^5.2.4",
80-
"eslint": "^7.24.0",
80+
"eslint": "^7.25.0",
8181
"eslint-config-prettier": "^8.2.0",
8282
"eslint-config-webpack": "^1.2.5",
8383
"eslint-plugin-import": "^2.22.1",

test/cli/__snapshots__/cli.test.js.snap.webpack4

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ exports[`CLI --bonjour 1`] = `
99
<i> [webpack-dev-server] Broadcasting \\"http\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
1010
`;
1111

12+
exports[`CLI --bonjour and --https 1`] = `
13+
"<i> [webpack-dev-server] Project is running at:
14+
<i> [webpack-dev-server] Loopback: https://localhost:<port>/
15+
<i> [webpack-dev-server] On Your Network (IPv4): https://<network-ip-v4>:<port>/
16+
<i> [webpack-dev-server] On Your Network (IPv6): https://[<network-ip-v6>]:<port>/
17+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory
18+
<i> [webpack-dev-server] Broadcasting \\"https\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
19+
`;
20+
1221
exports[`CLI --history-api-fallback 1`] = `
1322
"<i> [webpack-dev-server] Project is running at:
1423
<i> [webpack-dev-server] Loopback: http://localhost:<port>/

test/cli/__snapshots__/cli.test.js.snap.webpack5

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ exports[`CLI --bonjour 1`] = `
99
<i> [webpack-dev-server] Broadcasting \\"http\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
1010
`;
1111

12+
exports[`CLI --bonjour and --https 1`] = `
13+
"<i> [webpack-dev-server] Project is running at:
14+
<i> [webpack-dev-server] Loopback: https://localhost:<port>/
15+
<i> [webpack-dev-server] On Your Network (IPv4): https://<network-ip-v4>:<port>/
16+
<i> [webpack-dev-server] On Your Network (IPv6): https://[<network-ip-v6>]:<port>/
17+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory
18+
<i> [webpack-dev-server] Broadcasting \\"https\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
19+
`;
20+
1221
exports[`CLI --history-api-fallback 1`] = `
1322
"<i> [webpack-dev-server] Project is running at:
1423
<i> [webpack-dev-server] Loopback: http://localhost:<port>/

test/cli/cli.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ describe('CLI', () => {
5656
.catch(done);
5757
});
5858

59+
it('--bonjour and --https', (done) => {
60+
testBin('--bonjour --https')
61+
.then((output) => {
62+
expect(output.exitCode).toEqual(0);
63+
expect(
64+
normalizeStderr(output.stderr, { ipv6: true, https: true })
65+
).toMatchSnapshot();
66+
67+
done();
68+
})
69+
.catch(done);
70+
});
71+
5972
it('--no-bonjour', (done) => {
6073
testBin('--no-bonjour')
6174
.then((output) => {

0 commit comments

Comments
 (0)