webpack-dev-server 3.1.3 → 3.1.7

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/ssl/server.pem ADDED
@@ -0,0 +1,46 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEowIBAAKCAQEAr19R4H87sZonIp+VpwyTSrAhbq7jXy83Qz6DihCaiNTQnNRE
3
+ A9qoutlSubBLBlcvgDjBh8Jy9jA3oebzIdBFsGeuKL3zhT3wwZO05S9oQo48oz9b
4
+ OoqbOsUbFrU/MDkJKShnDAIoPUODpKkwLzBOL43S17G/Io/b3SPzElBoiOU3i4qe
5
+ UJut5dysih9grkNp/6My+ajv/8gU0RXLAwExOql4dz+QSVVa49Yc45Qj1CMzXmBd
6
+ MOS2O2a/dwqXnuBmMOu24uzQyfKSZgJc2af/VRtolCQsVN7JbSPOSXb46S/iww5Q
7
+ zSZMDm+ycNfWefFH/rMUv4VMNUJKdE+jlVxzWQIDAQABAoIBAHUM6/spMNCDkSdc
8
+ 2GfcztqE4Gudswiu3PW23dji6CH32R0z2AmygffkYYCqmAitXHj6aMGSGWUUHa2k
9
+ Fhc1ia4KJYXv8n+2LeEmExD9KVty0CoteViDdsQtFr17T6eCCgk8fDrZnb32OAFJ
10
+ I237kdPPlzB75JTO6/KXsf9BR+RF7QiedzJyiPK5XsXu+QjFPbxItpX0Ft8LvO4U
11
+ PgEntZDLe4IhxbObH/pIlefbRMaNIP7qPO4UypmkMleHwVFix0HTCBS81PafbNpH
12
+ aHm1qJ0sdxOHxdN0s9cOhXxT9IwOpjOOP1UOJmE0J97o01ImaQo8RLIrNJUY51HU
13
+ 3CgC7bkCgYEA6urWUtQbh+dOvwQUabP33QvoHPPtajvq3+GycijKxgFrMWMBuJL6
14
+ kPscAzzS5JnsfhvWmMpmI18uNt6T5+iUiksqMUjrWHV9SgoZAh3SoCq2WYZzK6Y7
15
+ Bf5FIPRFjlyjUSIeY3ofgAoVjrjfW1IC+zpJSvHkMjOMTh+dIiXAoUMCgYEAvxxz
16
+ 0ydTK24H65WrpTJHTHjWYIJUCKfKvIbhBe0PLfHrKJ/65BmPtZ230Q3tc/udrfeq
17
+ b851uIBAAF/Ykf+FsInkuCglWPy0GEDTHErwIKH0eopeOotkkn7zTFEZfG8mnefv
18
+ 5gBGdrb6m9c+B+QjGBpI/0TkYKUCo6ZEs3s/sTMCgYBmZCc4gPTi/oHHJisTi3qs
19
+ oSTxgaxokmckYAZcVcVUGogzRXkZjw6hpKGoE5nERAbdTJrzi7yLDFBjYA5NlYUw
20
+ 5eQlCShzLPqIC/CsiH0mjJdgXAbU7qZpTVOqMm4ix+PzWBCwwSj7sOmGhLPt5Mgh
21
+ 4lzRyq7w5qDv6D2gBZ55awKBgQCq12qLRkpJNrGJ3mB06v9l01gBKkCpBCZuZjze
22
+ qU66idrolCsaoecgOf/KuKKe3j3U+OO501zVNIECVKwrx7rhWEPIhMruQ+lTDRAr
23
+ 6KnE4kLFENCvkVC0zRv+Czm3TT2+R0rj1zcmhOh/S+k98KmWsFi1KgbmhlxXoxkj
24
+ QXhslQKBgEYAMmiC4Mt19ppQZsjaqopOyfdw7XvWXIWGUr2UnTyl6bR4qTmIaYfN
25
+ J7hF4GtrRqS0vDg5VCnSI3S3nRMTxz1udVhZ6WlLDCIpxHqkjctVrkXUwvASk/e5
26
+ FQDIdjNC+CVVC90hZzBdhfzDQfHeO1QxtpUt6qDJLrT+Nf5uDNHf
27
+ -----END RSA PRIVATE KEY-----
28
+ -----BEGIN CERTIFICATE-----
29
+ MIIDJjCCAg6gAwIBAgIJUsldyG+VEyP+MA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
30
+ BAMTCWxvY2FsaG9zdDAeFw0xODA4MjkxMjE5MjRaFw0xODA5MjgxMjE5MjRaMBQx
31
+ EjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
32
+ ggEBAK9fUeB/O7GaJyKflacMk0qwIW6u418vN0M+g4oQmojU0JzURAPaqLrZUrmw
33
+ SwZXL4A4wYfCcvYwN6Hm8yHQRbBnrii984U98MGTtOUvaEKOPKM/WzqKmzrFGxa1
34
+ PzA5CSkoZwwCKD1Dg6SpMC8wTi+N0texvyKP290j8xJQaIjlN4uKnlCbreXcrIof
35
+ YK5Daf+jMvmo7//IFNEVywMBMTqpeHc/kElVWuPWHOOUI9QjM15gXTDktjtmv3cK
36
+ l57gZjDrtuLs0MnykmYCXNmn/1UbaJQkLFTeyW0jzkl2+Okv4sMOUM0mTA5vsnDX
37
+ 1nnxR/6zFL+FTDVCSnRPo5Vcc1kCAwEAAaN7MHkwDAYDVR0TBAUwAwEB/zALBgNV
38
+ HQ8EBAMCAvQwXAYDVR0RBFUwU4IJbG9jYWxob3N0ghVsb2NhbGhvc3QubG9jYWxk
39
+ b21haW6CBmx2aC5tZYIIKi5sdmgubWWCBVs6OjFdhwR/AAABhxD+gAAAAAAAAAAA
40
+ AAAAAAABMA0GCSqGSIb3DQEBCwUAA4IBAQBTvsrR9VfOxUz/4IXvsrPZrBQ6Iepc
41
+ t1w+XgLfOZUCMUb60tC6iAAaWtvoCEJleQpwn5v2k5iZocq8KOVyA+Qy7Zi4Mksx
42
+ 4VNCZomc3YYRsDsQeHpYc+ONyiiK2FFwCPJiQ406WVPNl0Gv1zvoW4+vWL7DZnSn
43
+ uzgRrxMC+RJo3IzHyhMFVlxRsp9OQY6E3gX0VmGd+f/6CuNJGONeeEsSO2KlD/ZS
44
+ Asn+ni2H18RHbkgr4LhUjLWLpDjvFzMwxEga5Y1awkoDpHq3CxtBKqqnPTbszeuJ
45
+ reAuVoSWBxb253Vof9QxtGQyORcU8YFGrqmWZ0lWfsZc7JAfD834H5tC
46
+ -----END CERTIFICATE-----
@@ -1,152 +0,0 @@
1
- 'use strict';
2
-
3
- /* eslint no-param-reassign: 'off' */
4
-
5
- const optionsSchema = require('./optionsSchema.json');
6
-
7
- const indent = (str, prefix, firstLine) => {
8
- if (firstLine) {
9
- return prefix + str.replace(/\n(?!$)/g, `\n${prefix}`);
10
- }
11
- return str.replace(/\n(?!$)/g, `\n${prefix}`);
12
- };
13
-
14
- const getSchemaPart = (path, parents, additionalPath) => {
15
- parents = parents || 0;
16
- path = path.split('/');
17
- path = path.slice(0, path.length - parents);
18
- if (additionalPath) {
19
- additionalPath = additionalPath.split('/');
20
- path = path.concat(additionalPath);
21
- }
22
- let schemaPart = optionsSchema;
23
- for (let i = 1; i < path.length; i++) {
24
- const inner = schemaPart[path[i]];
25
- if (inner) { schemaPart = inner; }
26
- }
27
- return schemaPart;
28
- };
29
-
30
- const getSchemaPartText = (schemaPart, additionalPath) => {
31
- if (additionalPath) {
32
- for (let i = 0; i < additionalPath.length; i++) {
33
- const inner = schemaPart[additionalPath[i]];
34
- if (inner) { schemaPart = inner; }
35
- }
36
- }
37
- while (schemaPart.$ref) schemaPart = getSchemaPart(schemaPart.$ref);
38
- let schemaText = OptionsValidationError.formatSchema(schemaPart); // eslint-disable-line
39
- if (schemaPart.description) { schemaText += `\n${schemaPart.description}`; }
40
- return schemaText;
41
- };
42
-
43
- class OptionsValidationError extends Error {
44
- constructor(validationErrors) {
45
- super();
46
-
47
- if (Error.hasOwnProperty('captureStackTrace')) { // eslint-disable-line
48
- Error.captureStackTrace(this, this.constructor);
49
- }
50
- this.name = 'WebpackDevServerOptionsValidationError';
51
-
52
- this.message = `${'Invalid configuration object. ' +
53
- 'webpack-dev-server has been initialised using a configuration object that does not match the API schema.\n'}${
54
- validationErrors.map(err => ` - ${indent(OptionsValidationError.formatValidationError(err), ' ', false)}`).join('\n')}`;
55
- this.validationErrors = validationErrors;
56
- }
57
-
58
- static formatSchema(schema, prevSchemas) {
59
- prevSchemas = prevSchemas || [];
60
-
61
- const formatInnerSchema = (innerSchema, addSelf) => {
62
- if (!addSelf) return OptionsValidationError.formatSchema(innerSchema, prevSchemas);
63
- if (prevSchemas.indexOf(innerSchema) >= 0) return '(recursive)';
64
- return OptionsValidationError.formatSchema(innerSchema, prevSchemas.concat(schema));
65
- };
66
-
67
- if (schema.type === 'string') {
68
- if (schema.minLength === 1) { return 'non-empty string'; } else if (schema.minLength > 1) { return `string (min length ${schema.minLength})`; }
69
- return 'string';
70
- } else if (schema.type === 'boolean') {
71
- return 'boolean';
72
- } else if (schema.type === 'number') {
73
- return 'number';
74
- } else if (schema.type === 'object') {
75
- if (schema.properties) {
76
- const required = schema.required || [];
77
- return `object { ${Object.keys(schema.properties).map((property) => {
78
- if (required.indexOf(property) < 0) return `${property}?`;
79
- return property;
80
- }).concat(schema.additionalProperties ? ['...'] : []).join(', ')} }`;
81
- }
82
- if (schema.additionalProperties) {
83
- return `object { <key>: ${formatInnerSchema(schema.additionalProperties)} }`;
84
- }
85
- return 'object';
86
- } else if (schema.type === 'array') {
87
- return `[${formatInnerSchema(schema.items)}]`;
88
- }
89
-
90
- switch (schema.instanceof) {
91
- case 'Function':
92
- return 'function';
93
- case 'RegExp':
94
- return 'RegExp';
95
- default:
96
- }
97
-
98
- if (schema.$ref) return formatInnerSchema(getSchemaPart(schema.$ref), true);
99
- if (schema.allOf) return schema.allOf.map(formatInnerSchema).join(' & ');
100
- if (schema.oneOf) return schema.oneOf.map(formatInnerSchema).join(' | ');
101
- if (schema.anyOf) return schema.anyOf.map(formatInnerSchema).join(' | ');
102
- if (schema.enum) return schema.enum.map(item => JSON.stringify(item)).join(' | ');
103
- return JSON.stringify(schema, 0, 2);
104
- }
105
-
106
- static formatValidationError(err) {
107
- const dataPath = `configuration${err.dataPath}`;
108
- if (err.keyword === 'additionalProperties') {
109
- return `${dataPath} has an unknown property '${err.params.additionalProperty}'. These properties are valid:\n${getSchemaPartText(err.parentSchema)}`;
110
- } else if (err.keyword === 'oneOf' || err.keyword === 'anyOf') {
111
- if (err.children && err.children.length > 0) {
112
- return `${dataPath} should be one of these:\n${getSchemaPartText(err.parentSchema)}\n` +
113
- `Details:\n${err.children.map(e => ` * ${indent(OptionsValidationError.formatValidationError(e), ' ', false)}`).join('\n')}`;
114
- }
115
- return `${dataPath} should be one of these:\n${getSchemaPartText(err.parentSchema)}`;
116
- } else if (err.keyword === 'enum') {
117
- if (err.parentSchema && err.parentSchema.enum && err.parentSchema.enum.length === 1) {
118
- return `${dataPath} should be ${getSchemaPartText(err.parentSchema)}`;
119
- }
120
- return `${dataPath} should be one of these:\n${getSchemaPartText(err.parentSchema)}`;
121
- } else if (err.keyword === 'allOf') {
122
- return `${dataPath} should be:\n${getSchemaPartText(err.parentSchema)}`;
123
- } else if (err.keyword === 'type') {
124
- switch (err.params.type) {
125
- case 'object':
126
- return `${dataPath} should be an object.`;
127
- case 'string':
128
- return `${dataPath} should be a string.`;
129
- case 'boolean':
130
- return `${dataPath} should be a boolean.`;
131
- case 'number':
132
- return `${dataPath} should be a number.`;
133
- case 'array':
134
- return `${dataPath} should be an array:\n${getSchemaPartText(err.parentSchema)}`;
135
- default:
136
- }
137
- return `${dataPath} should be ${err.params.type}:\n${getSchemaPartText(err.parentSchema)}`;
138
- } else if (err.keyword === 'instanceof') {
139
- return `${dataPath} should be an instance of ${getSchemaPartText(err.parentSchema)}.`;
140
- } else if (err.keyword === 'required') {
141
- const missingProperty = err.params.missingProperty.replace(/^\./, '');
142
- return `${dataPath} misses the property '${missingProperty}'.\n${getSchemaPartText(err.parentSchema, ['properties', missingProperty])}`;
143
- } else if (err.keyword === 'minLength' || err.keyword === 'minItems') {
144
- if (err.params.limit === 1) { return `${dataPath} should not be empty.`; }
145
- return `${dataPath} ${err.message}`;
146
- }
147
- // eslint-disable-line no-fallthrough
148
- return `${dataPath} ${err.message} (${JSON.stringify(err, 0, 2)}).\n${getSchemaPartText(err.parentSchema)}`;
149
- }
150
- }
151
-
152
- module.exports = OptionsValidationError;
package/lib/createLog.js DELETED
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const weblog = require('webpack-log');
4
-
5
- module.exports = function createLog(options) {
6
- let logLevel = options.logLevel || 'info';
7
- if (options.quiet === true) {
8
- logLevel = 'silent';
9
- }
10
- if (options.noInfo === true) {
11
- logLevel = 'warn';
12
- }
13
-
14
- return weblog({
15
- level: logLevel,
16
- name: 'wds',
17
- timestamp: options.logTime
18
- });
19
- };
@@ -1,347 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "properties": {
4
- "hot": {
5
- "description": "Enables Hot Module Replacement.",
6
- "type": "boolean"
7
- },
8
- "hotOnly": {
9
- "description": "Enables Hot Module Replacement without page refresh as fallback.",
10
- "type": "boolean"
11
- },
12
- "lazy": {
13
- "description": "Disables watch mode and recompiles bundle only on a request.",
14
- "type": "boolean"
15
- },
16
- "bonjour": {
17
- "description": "Publishes the ZeroConf DNS service",
18
- "type": "boolean"
19
- },
20
- "host": {
21
- "description": "The host the server listens to.",
22
- "type": "string"
23
- },
24
- "allowedHosts": {
25
- "description": "Specifies which hosts are allowed to access the dev server.",
26
- "items": {
27
- "type": "string"
28
- },
29
- "type": "array"
30
- },
31
- "filename": {
32
- "description": "The filename that needs to be requested in order to trigger a recompile (only in lazy mode).",
33
- "anyOf": [
34
- {
35
- "instanceof": "RegExp"
36
- },
37
- {
38
- "type": "string"
39
- }
40
- ]
41
- },
42
- "publicPath": {
43
- "description": "URL path where the webpack files are served from.",
44
- "type": "string"
45
- },
46
- "port": {
47
- "description": "The port the server listens to.",
48
- "anyOf": [
49
- {
50
- "type": "number"
51
- },
52
- {
53
- "type": "string"
54
- }
55
- ]
56
- },
57
- "socket": {
58
- "description": "The Unix socket to listen to (instead of on a host).",
59
- "type": "string"
60
- },
61
- "watchOptions": {
62
- "description": "Options for changing the watch behavior.",
63
- "type": "object"
64
- },
65
- "headers": {
66
- "description": "Response headers that are added to each response.",
67
- "type": "object"
68
- },
69
- "logLevel": {
70
- "description": "Log level in the terminal/console (trace, debug, info, warn, error or none)",
71
- "enum": [
72
- "trace",
73
- "debug",
74
- "info",
75
- "warn",
76
- "error",
77
- "none"
78
- ]
79
- },
80
- "clientLogLevel": {
81
- "description": "Controls the log messages shown in the browser.",
82
- "enum": [
83
- "none",
84
- "info",
85
- "warning",
86
- "error"
87
- ]
88
- },
89
- "overlay": {
90
- "description": "Shows an error overlay in browser.",
91
- "anyOf": [
92
- {
93
- "type": "boolean"
94
- },
95
- {
96
- "type": "object",
97
- "properties": {
98
- "errors": {
99
- "type": "boolean"
100
- },
101
- "warnings": {
102
- "type": "boolean"
103
- }
104
- }
105
- }
106
- ]
107
- },
108
- "progress": {
109
- "description": "Shows compilation progress in browser console.",
110
- "type": "boolean"
111
- },
112
- "key": {
113
- "description": "The contents of a SSL key.",
114
- "anyOf": [
115
- {
116
- "type": "string"
117
- },
118
- {
119
- "instanceof": "Buffer"
120
- }
121
- ]
122
- },
123
- "cert": {
124
- "description": "The contents of a SSL certificate.",
125
- "anyOf": [
126
- {
127
- "type": "string"
128
- },
129
- {
130
- "instanceof": "Buffer"
131
- }
132
- ]
133
- },
134
- "ca": {
135
- "description": "The contents of a SSL CA certificate.",
136
- "anyOf": [
137
- {
138
- "type": "string"
139
- },
140
- {
141
- "instanceof": "Buffer"
142
- }
143
- ]
144
- },
145
- "pfx": {
146
- "description": "The contents of a SSL pfx file.",
147
- "anyOf": [
148
- {
149
- "type": "string"
150
- },
151
- {
152
- "instanceof": "Buffer"
153
- }
154
- ]
155
- },
156
- "pfxPassphrase": {
157
- "description": "The passphrase to a (SSL) PFX file.",
158
- "type": "string"
159
- },
160
- "requestCert": {
161
- "description": "Enables request for client certificate. This is passed directly to the https server.",
162
- "type": "boolean"
163
- },
164
- "inline": {
165
- "description": "Enable inline mode to include client scripts in bundle (CLI-only).",
166
- "type": "boolean"
167
- },
168
- "disableHostCheck": {
169
- "description": "Disable the Host header check (Security).",
170
- "type": "boolean"
171
- },
172
- "public": {
173
- "description": "The public hostname/ip address of the server.",
174
- "type": "string"
175
- },
176
- "https": {
177
- "description": "Enable HTTPS for server.",
178
- "anyOf": [
179
- {
180
- "type": "object"
181
- },
182
- {
183
- "type": "boolean"
184
- }
185
- ]
186
- },
187
- "contentBase": {
188
- "description": "A directory to serve files non-webpack files from.",
189
- "anyOf": [
190
- {
191
- "items": {
192
- "type": "string"
193
- },
194
- "minItems": 1,
195
- "type": "array"
196
- },
197
- {
198
- "enum": [
199
- false
200
- ]
201
- },
202
- {
203
- "type": "number"
204
- },
205
- {
206
- "type": "string"
207
- }
208
- ]
209
- },
210
- "watchContentBase": {
211
- "description": "Watches the contentBase directory for changes.",
212
- "type": "boolean"
213
- },
214
- "open": {
215
- "description": "Let the CLI open your browser with the URL.",
216
- "anyOf": [
217
- {
218
- "type": "string"
219
- },
220
- {
221
- "type": "boolean"
222
- }
223
- ]
224
- },
225
- "useLocalIp": {
226
- "description": "Let the browser open with your local IP.",
227
- "type": "boolean"
228
- },
229
- "openPage": {
230
- "description": "Let the CLI open your browser to a specific page on the site.",
231
- "type": "string"
232
- },
233
- "features": {
234
- "description": "The order of which the features will be triggered.",
235
- "items": {
236
- "type": "string"
237
- },
238
- "type": "array"
239
- },
240
- "compress": {
241
- "description": "Gzip compression for all requests.",
242
- "type": "boolean"
243
- },
244
- "proxy": {
245
- "description": "Proxy requests to another server.",
246
- "anyOf": [
247
- {
248
- "items": {
249
- "anyOf": [
250
- {
251
- "type": "object"
252
- },
253
- {
254
- "instanceof": "Function"
255
- }
256
- ]
257
- },
258
- "minItems": 1,
259
- "type": "array"
260
- },
261
- {
262
- "type": "object"
263
- }
264
- ]
265
- },
266
- "historyApiFallback": {
267
- "description": "404 fallback to a specified file.",
268
- "anyOf": [
269
- {
270
- "type": "boolean"
271
- },
272
- {
273
- "type": "object"
274
- }
275
- ]
276
- },
277
- "staticOptions": {
278
- "description": "Options for static files served with contentBase.",
279
- "type": "object"
280
- },
281
- "setup": {
282
- "description": "Exposes the Express server to add custom middleware or routes.",
283
- "instanceof": "Function"
284
- },
285
- "before": {
286
- "description": "Exposes the Express server to add custom middleware or routes before webpack-dev-middleware will be added.",
287
- "instanceof": "Function"
288
- },
289
- "after": {
290
- "description": "Exposes the Express server to add custom middleware or routes after webpack-dev-middleware got added.",
291
- "instanceof": "Function"
292
- },
293
- "stats": {
294
- "description": "Decides what bundle information is displayed.",
295
- "anyOf": [
296
- {
297
- "type": "object"
298
- },
299
- {
300
- "type": "boolean"
301
- },
302
- {
303
- "enum": [
304
- "none",
305
- "errors-only",
306
- "minimal",
307
- "normal",
308
- "verbose"
309
- ]
310
- }
311
- ]
312
- },
313
- "reporter": {
314
- "description": "Customize what the console displays when compiling.",
315
- "instanceof": "Function"
316
- },
317
- "logTime": {
318
- "description": "Report time before and after compiling in console displays.",
319
- "type": "boolean"
320
- },
321
- "noInfo": {
322
- "description": "Hide all info messages on console.",
323
- "type": "boolean"
324
- },
325
- "quiet": {
326
- "description": "Hide all messages on console.",
327
- "type": "boolean"
328
- },
329
- "serverSideRender": {
330
- "description": "Expose stats for server side rendering (experimental).",
331
- "type": "boolean"
332
- },
333
- "index": {
334
- "description": "The filename that is considered the index file.",
335
- "type": "string"
336
- },
337
- "log": {
338
- "description": "Customize info logs for webpack-dev-middleware.",
339
- "instanceof": "Function"
340
- },
341
- "warn": {
342
- "description": "Customize warn logs for webpack-dev-middleware.",
343
- "instanceof": "Function"
344
- }
345
- },
346
- "type": "object"
347
- }
package/lib/polyfills.js DELETED
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- /* polyfills for Node 4.8.x users */
4
-
5
- // internal-ip@2.x uses [].includes
6
- const includes = require('array-includes');
7
-
8
- includes.shim();
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- /* eslint no-param-reassign: 'off' */
4
-
5
- const createDomain = require('./createDomain');
6
-
7
- module.exports = function addDevServerEntrypoints(webpackOptions, devServerOptions, listeningApp) {
8
- if (devServerOptions.inline !== false) {
9
- // we're stubbing the app in this method as it's static and doesn't require
10
- // a listeningApp to be supplied. createDomain requires an app with the
11
- // address() signature.
12
- const app = listeningApp || {
13
- address() {
14
- return { port: devServerOptions.port };
15
- }
16
- };
17
- const domain = createDomain(devServerOptions, app);
18
- const devClient = [`${require.resolve('../../client/')}?${domain}`];
19
-
20
- if (devServerOptions.hotOnly) { devClient.push('webpack/hot/only-dev-server'); } else if (devServerOptions.hot) { devClient.push('webpack/hot/dev-server'); }
21
-
22
- const prependDevClient = (entry) => {
23
- if (typeof entry === 'function') {
24
- return () => Promise.resolve(entry()).then(prependDevClient);
25
- }
26
- if (typeof entry === 'object' && !Array.isArray(entry)) {
27
- const entryClone = {};
28
- Object.keys(entry).forEach((key) => {
29
- entryClone[key] = devClient.concat(entry[key]);
30
- });
31
- return entryClone;
32
- }
33
- return devClient.concat(entry);
34
- };
35
-
36
- [].concat(webpackOptions).forEach((wpOpt) => {
37
- wpOpt.entry = prependDevClient(wpOpt.entry || './src');
38
- });
39
- }
40
- };
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- const url = require('url');
4
- const internalIp = require('internal-ip');
5
-
6
-
7
- module.exports = function createDomain(options, listeningApp) {
8
- const protocol = options.https ? 'https' : 'http';
9
- const appPort = listeningApp ? listeningApp.address().port : 0;
10
- const port = options.socket ? 0 : appPort;
11
- const hostname = options.useLocalIp ? internalIp.v4() : options.host;
12
-
13
- // use explicitly defined public url (prefix with protocol if not explicitly given)
14
- if (options.public) {
15
- return /^[a-zA-Z]+:\/\//.test(options.public) ? `${options.public}` : `${protocol}://${options.public}`;
16
- }
17
- // the formatted domain (url without path) of the webpack server
18
- return url.format({
19
- protocol,
20
- hostname,
21
- port
22
- });
23
- };
package/ssl/.DS_Store DELETED
Binary file