@nx/web 17.2.0-beta.2 → 17.2.0-beta.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "17.2.0-beta.
|
|
3
|
+
"version": "17.2.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"detect-port": "^1.5.1",
|
|
35
35
|
"http-server": "^14.1.0",
|
|
36
36
|
"tslib": "^2.3.0",
|
|
37
|
-
"@nx/devkit": "17.2.0-beta.
|
|
38
|
-
"@nx/js": "17.2.0-beta.
|
|
39
|
-
"@nrwl/web": "17.2.0-beta.
|
|
37
|
+
"@nx/devkit": "17.2.0-beta.3",
|
|
38
|
+
"@nx/js": "17.2.0-beta.3",
|
|
39
|
+
"@nrwl/web": "17.2.0-beta.3"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -31,6 +31,7 @@ async function setupBundler(tree, options) {
|
|
|
31
31
|
if (options.bundler === 'webpack') {
|
|
32
32
|
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/webpack', versions_2.nxVersion);
|
|
33
33
|
await configurationGenerator(tree, {
|
|
34
|
+
target: 'web',
|
|
34
35
|
project: options.projectName,
|
|
35
36
|
main,
|
|
36
37
|
tsConfig,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.waitForPortOpen = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const net = require("net");
|
|
5
6
|
function waitForPortOpen(port, options = {}) {
|
|
6
|
-
const
|
|
7
|
+
const host = options.host ?? '127.0.0.1';
|
|
8
|
+
const allowedErrorCodes = ['ECONNREFUSED', 'ECONNRESET', 'ETIMEDOUT'];
|
|
7
9
|
return new Promise((resolve, reject) => {
|
|
8
10
|
const checkPort = (retries = options.retries ?? 120) => {
|
|
9
11
|
const client = new net.Socket();
|
|
@@ -20,6 +22,9 @@ function waitForPortOpen(port, options = {}) {
|
|
|
20
22
|
});
|
|
21
23
|
client.once('error', (err) => {
|
|
22
24
|
if (retries === 0 || !allowedErrorCodes.includes(err['code'])) {
|
|
25
|
+
if (process.env['NX_VERBOSE_LOGGING'] === 'true') {
|
|
26
|
+
devkit_1.logger.info(`Error connecting on ${host}:${port}: ${err['code'] || err}`);
|
|
27
|
+
}
|
|
23
28
|
cleanupClient();
|
|
24
29
|
reject(err);
|
|
25
30
|
}
|
|
@@ -29,7 +34,10 @@ function waitForPortOpen(port, options = {}) {
|
|
|
29
34
|
});
|
|
30
35
|
// Node will use IPv6 if it is available, but this can cause issues if the server is only listening on IPv4.
|
|
31
36
|
// Hard-coding to look on 127.0.0.1 to avoid using the IPv6 loopback address "::1".
|
|
32
|
-
|
|
37
|
+
if (process.env['NX_VERBOSE_LOGGING'] === 'true') {
|
|
38
|
+
devkit_1.logger.info(`Connecting on ${host}:${port}`);
|
|
39
|
+
}
|
|
40
|
+
client.connect({ port, host });
|
|
33
41
|
};
|
|
34
42
|
checkPort();
|
|
35
43
|
});
|