@nx/web 23.2.0-beta.4 → 23.2.0-beta.5
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.
|
@@ -8,9 +8,6 @@ const pc = tslib_1.__importStar(require("picocolors"));
|
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
-
const package_json_1 = require("nx/src/utils/package-json");
|
|
12
|
-
const client_1 = require("nx/src/daemon/client/client");
|
|
13
|
-
const utils_1 = require("nx/src/tasks-runner/utils");
|
|
14
11
|
const internal_2 = require("@nx/js/internal");
|
|
15
12
|
const detect_port_1 = tslib_1.__importDefault(require("detect-port"));
|
|
16
13
|
function getHttpServerArgs(options) {
|
|
@@ -79,7 +76,7 @@ function getBuildTargetOutputPath(options, context) {
|
|
|
79
76
|
const buildTarget = project.data.targets[target.target];
|
|
80
77
|
outputPath = buildTarget.outputs?.[0];
|
|
81
78
|
if (outputPath) {
|
|
82
|
-
outputPath = (0,
|
|
79
|
+
outputPath = (0, internal_1.interpolate)(outputPath, {
|
|
83
80
|
projectName: project.data.name,
|
|
84
81
|
projectRoot: project.data.root,
|
|
85
82
|
});
|
|
@@ -96,7 +93,7 @@ function getBuildTargetOutputPath(options, context) {
|
|
|
96
93
|
return outputPath;
|
|
97
94
|
}
|
|
98
95
|
function createFileWatcher(project, changeHandler) {
|
|
99
|
-
return
|
|
96
|
+
return internal_1.daemonClient.registerFileWatcher({
|
|
100
97
|
watchProjects: project ? [project] : 'all',
|
|
101
98
|
includeGlobalWorkspaceFiles: true,
|
|
102
99
|
includeDependencies: true,
|
|
@@ -159,12 +156,12 @@ async function* fileServerExecutor(options, context) {
|
|
|
159
156
|
}
|
|
160
157
|
}
|
|
161
158
|
};
|
|
162
|
-
if (!
|
|
159
|
+
if (!internal_1.daemonClient.enabled() && options.watch) {
|
|
163
160
|
devkit_1.output.warn({
|
|
164
161
|
title: 'Nx Daemon is not enabled. Static server is not watching for changes.',
|
|
165
162
|
});
|
|
166
163
|
}
|
|
167
|
-
if (
|
|
164
|
+
if (internal_1.daemonClient.enabled() && options.watch) {
|
|
168
165
|
disposeWatch = await createFileWatcher(context.projectName, run);
|
|
169
166
|
}
|
|
170
167
|
// perform initial run
|
|
@@ -182,7 +179,7 @@ async function* fileServerExecutor(options, context) {
|
|
|
182
179
|
options.proxyUrl ??= `http${options.ssl ? 's' : ''}://localhost:${port}?`;
|
|
183
180
|
}
|
|
184
181
|
const args = getHttpServerArgs(options);
|
|
185
|
-
const { path: pathToHttpServerPkgJson, packageJson } = (0,
|
|
182
|
+
const { path: pathToHttpServerPkgJson, packageJson } = (0, internal_1.readModulePackageJson)('http-server', module.paths);
|
|
186
183
|
const pathToHttpServerBin = packageJson.bin['http-server'];
|
|
187
184
|
const pathToHttpServer = (0, path_1.resolve)(pathToHttpServerPkgJson.replace('package.json', ''), pathToHttpServerBin);
|
|
188
185
|
// detect port as close to when used to prevent port being used by another process
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"http-server": "^14.1.0",
|
|
80
80
|
"picocolors": "^1.1.0",
|
|
81
81
|
"tslib": "^2.3.0",
|
|
82
|
-
"@nx/devkit": "23.2.0-beta.
|
|
83
|
-
"@nx/js": "23.2.0-beta.
|
|
82
|
+
"@nx/devkit": "23.2.0-beta.5",
|
|
83
|
+
"@nx/js": "23.2.0-beta.5"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"nx": "23.2.0-beta.
|
|
87
|
-
"
|
|
86
|
+
"@nx/vitest": "23.2.0-beta.5",
|
|
87
|
+
"nx": "23.2.0-beta.5"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@nx/cypress": "23.2.0-beta.
|
|
91
|
-
"@nx/
|
|
92
|
-
"@nx/
|
|
93
|
-
"@nx/
|
|
94
|
-
"@nx/webpack": "23.2.0-beta.
|
|
95
|
-
"@nx/eslint": "23.2.0-beta.
|
|
90
|
+
"@nx/cypress": "23.2.0-beta.5",
|
|
91
|
+
"@nx/jest": "23.2.0-beta.5",
|
|
92
|
+
"@nx/playwright": "23.2.0-beta.5",
|
|
93
|
+
"@nx/vite": "23.2.0-beta.5",
|
|
94
|
+
"@nx/webpack": "23.2.0-beta.5",
|
|
95
|
+
"@nx/eslint": "23.2.0-beta.5"
|
|
96
96
|
},
|
|
97
97
|
"peerDependenciesMeta": {
|
|
98
98
|
"@nx/cypress": {
|