nx 22.7.8 → 22.7.9
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/src/command-line/reset/reset.js +6 -1
- package/dist/src/daemon/client/client.d.ts +45 -3
- package/dist/src/daemon/client/client.js +138 -42
- package/dist/src/daemon/client/daemon-socket-messenger.js +4 -0
- package/dist/src/daemon/message-types/daemon-message.d.ts +33 -0
- package/dist/src/daemon/message-types/daemon-message.js +48 -0
- package/dist/src/daemon/server/server.js +22 -0
- package/dist/src/daemon/server/shutdown-utils.d.ts +5 -0
- package/dist/src/daemon/server/shutdown-utils.js +11 -4
- package/dist/src/daemon/socket-utils.d.ts +1 -0
- package/dist/src/daemon/socket-utils.js +24 -3
- package/dist/src/daemon/tmp-dir.d.ts +43 -3
- package/dist/src/daemon/tmp-dir.js +437 -15
- package/dist/src/devkit-internals.d.ts +1 -0
- package/dist/src/devkit-internals.js +4 -1
- package/dist/src/native/index.js +71 -28
- package/dist/src/native/native-file-cache-location.d.ts +17 -1
- package/dist/src/native/native-file-cache-location.js +86 -12
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +18 -1
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +16 -3
- package/dist/src/project-graph/plugins/isolation/messaging.js +3 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +58 -8
- package/dist/src/project-graph/project-graph.js +20 -0
- package/dist/src/utils/nx-tmp-dir.d.ts +18 -0
- package/dist/src/utils/nx-tmp-dir.js +40 -0
- package/dist/src/utils/owned-private-dir.d.ts +132 -0
- package/dist/src/utils/owned-private-dir.js +323 -0
- package/dist/src/utils/safe-spawn.d.ts +24 -0
- package/dist/src/utils/safe-spawn.js +104 -0
- package/dist/src/utils/shell-quoting.d.ts +15 -0
- package/dist/src/utils/shell-quoting.js +35 -0
- package/dist/src/utils/wait-for-socket-connection.d.ts +11 -0
- package/dist/src/utils/wait-for-socket-connection.js +14 -8
- package/package.json +11 -11
|
@@ -26,9 +26,15 @@ async function waitForSocketConnection(socketPath, options) {
|
|
|
26
26
|
return null;
|
|
27
27
|
const path = typeof socketPath === 'function' ? socketPath() : socketPath;
|
|
28
28
|
if (path) {
|
|
29
|
-
const
|
|
30
|
-
if (socket) {
|
|
31
|
-
return socket;
|
|
29
|
+
const result = await tryConnect(path);
|
|
30
|
+
if (result.socket) {
|
|
31
|
+
return result.socket;
|
|
32
|
+
}
|
|
33
|
+
// The caller may need the errno this attempt produced — a refused
|
|
34
|
+
// connection is reported very differently from a socket that is not
|
|
35
|
+
// there yet, and polling past it only delays the same answer.
|
|
36
|
+
if (result.error && options?.onConnectError?.(result.error, path)) {
|
|
37
|
+
return null;
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
attempts++;
|
|
@@ -39,15 +45,15 @@ function tryConnect(socketPath) {
|
|
|
39
45
|
return new Promise((resolve) => {
|
|
40
46
|
try {
|
|
41
47
|
const socket = (0, net_1.connect)(socketPath, () => {
|
|
42
|
-
resolve(socket);
|
|
48
|
+
resolve({ socket });
|
|
43
49
|
});
|
|
44
|
-
socket.once('error', () => {
|
|
50
|
+
socket.once('error', (error) => {
|
|
45
51
|
socket.destroy();
|
|
46
|
-
resolve(
|
|
52
|
+
resolve({ error });
|
|
47
53
|
});
|
|
48
54
|
}
|
|
49
|
-
catch {
|
|
50
|
-
resolve(
|
|
55
|
+
catch (error) {
|
|
56
|
+
resolve({ error: error });
|
|
51
57
|
}
|
|
52
58
|
});
|
|
53
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "22.7.
|
|
3
|
+
"version": "22.7.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
@@ -175,16 +175,16 @@
|
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
"optionalDependencies": {
|
|
178
|
-
"@nx/nx-darwin-arm64": "22.7.
|
|
179
|
-
"@nx/nx-darwin-x64": "22.7.
|
|
180
|
-
"@nx/nx-freebsd-x64": "22.7.
|
|
181
|
-
"@nx/nx-linux-arm-gnueabihf": "22.7.
|
|
182
|
-
"@nx/nx-linux-arm64-gnu": "22.7.
|
|
183
|
-
"@nx/nx-linux-arm64-musl": "22.7.
|
|
184
|
-
"@nx/nx-linux-x64-gnu": "22.7.
|
|
185
|
-
"@nx/nx-linux-x64-musl": "22.7.
|
|
186
|
-
"@nx/nx-win32-arm64-msvc": "22.7.
|
|
187
|
-
"@nx/nx-win32-x64-msvc": "22.7.
|
|
178
|
+
"@nx/nx-darwin-arm64": "22.7.9",
|
|
179
|
+
"@nx/nx-darwin-x64": "22.7.9",
|
|
180
|
+
"@nx/nx-freebsd-x64": "22.7.9",
|
|
181
|
+
"@nx/nx-linux-arm-gnueabihf": "22.7.9",
|
|
182
|
+
"@nx/nx-linux-arm64-gnu": "22.7.9",
|
|
183
|
+
"@nx/nx-linux-arm64-musl": "22.7.9",
|
|
184
|
+
"@nx/nx-linux-x64-gnu": "22.7.9",
|
|
185
|
+
"@nx/nx-linux-x64-musl": "22.7.9",
|
|
186
|
+
"@nx/nx-win32-arm64-msvc": "22.7.9",
|
|
187
|
+
"@nx/nx-win32-x64-msvc": "22.7.9"
|
|
188
188
|
},
|
|
189
189
|
"nx-migrations": {
|
|
190
190
|
"migrations": "./migrations.json",
|