@cypress/webpack-dev-server 6.1.0 → 6.1.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/dist/devServer.js +16 -19
- package/package.json +2 -2
package/dist/devServer.js
CHANGED
|
@@ -17,26 +17,23 @@ const debug = (0, debug_1.default)('cypress:webpack-dev-server:devServer');
|
|
|
17
17
|
*
|
|
18
18
|
* @param config
|
|
19
19
|
*/
|
|
20
|
-
function devServer(devServerConfig) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
debug('closed dev server');
|
|
35
|
-
});
|
|
36
|
-
},
|
|
20
|
+
async function devServer(devServerConfig) {
|
|
21
|
+
const result = await devServer.create(devServerConfig);
|
|
22
|
+
await result.server.start();
|
|
23
|
+
if (!result.server.options.port) {
|
|
24
|
+
throw new Error(`Expected port ${result.server.options.port} to be a number`);
|
|
25
|
+
}
|
|
26
|
+
debug(`Component testing webpack server ${result.version} started on port %s`, result.server.options.port);
|
|
27
|
+
return {
|
|
28
|
+
port: result.server.options.port,
|
|
29
|
+
// Close is for unit testing only. We kill this child process which will handle the closing of the server
|
|
30
|
+
close: async (done) => {
|
|
31
|
+
debug('closing dev server');
|
|
32
|
+
result.server.stop().then(() => done?.()).catch(done).finally(() => {
|
|
33
|
+
debug('closed dev server');
|
|
37
34
|
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
35
|
+
},
|
|
36
|
+
};
|
|
40
37
|
}
|
|
41
38
|
exports.devServer = devServer;
|
|
42
39
|
const thirdPartyDefinitionPrefixes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/webpack-dev-server",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Launches Webpack Dev Server for Component Testing",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
|
48
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
48
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/cypress-io/cypress/tree/develop/npm/webpack-dev-server#readme",
|
|
51
51
|
"bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
|