@zixt/host 0.0.124 → 0.0.126
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/index.js +18 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import { homedir as homedir4 } from "node:os";
|
|
|
28
28
|
// package.json
|
|
29
29
|
var package_default = {
|
|
30
30
|
name: "@zixt/host",
|
|
31
|
-
version: "0.0.
|
|
31
|
+
version: "0.0.126",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -22010,7 +22010,7 @@ var SetupGuideReplyRequest = external_exports.object({
|
|
|
22010
22010
|
page: SetupGuidePageContext,
|
|
22011
22011
|
onboarding: SetupGuideOnboardingState,
|
|
22012
22012
|
actions: external_exports.array(SetupGuideAvailableAction).max(128),
|
|
22013
|
-
toolResults: external_exports.array(SetupGuideToolResult).max(
|
|
22013
|
+
toolResults: external_exports.array(SetupGuideToolResult).max(12).default([])
|
|
22014
22014
|
});
|
|
22015
22015
|
var SetupGuideProposedAction = external_exports.object({
|
|
22016
22016
|
actionId: external_exports.string().regex(/^[a-z][a-z0-9_.-]{0,79}$/),
|
|
@@ -24051,6 +24051,11 @@ var HostClient = class _HostClient {
|
|
|
24051
24051
|
if (inventoryRetryTimer) clearTimeout(inventoryRetryTimer);
|
|
24052
24052
|
void this.handleClose(ws, code, closeReason, frameTail, closeDetail(reason));
|
|
24053
24053
|
});
|
|
24054
|
+
ws.on("unexpected-response", (_request, response) => {
|
|
24055
|
+
if (response.statusCode === 401) closeReason = "unauthorized";
|
|
24056
|
+
response.resume();
|
|
24057
|
+
ws.terminate();
|
|
24058
|
+
});
|
|
24054
24059
|
ws.on("error", () => {
|
|
24055
24060
|
});
|
|
24056
24061
|
}
|
|
@@ -24103,7 +24108,9 @@ var HostClient = class _HostClient {
|
|
|
24103
24108
|
if (code === CLOSE_CODES.protocolError) {
|
|
24104
24109
|
this.opts.onStatus?.("rejected", detail);
|
|
24105
24110
|
} else {
|
|
24106
|
-
this.opts.onStatus?.(
|
|
24111
|
+
this.opts.onStatus?.(
|
|
24112
|
+
closeReason === "heartbeat_timeout" ? "unresponsive" : closeReason === "unauthorized" ? "unauthorized" : "disconnected"
|
|
24113
|
+
);
|
|
24107
24114
|
}
|
|
24108
24115
|
if (this.stopped) return;
|
|
24109
24116
|
await this.unwindAllRuns(
|
|
@@ -44516,6 +44523,14 @@ var client = new HostClient({
|
|
|
44516
44523
|
localCloudState = "connecting";
|
|
44517
44524
|
publishLocalStatus();
|
|
44518
44525
|
break;
|
|
44526
|
+
case "unauthorized":
|
|
44527
|
+
log.error("Zixt Cloud does not recognize this Machine pairing anymore", {
|
|
44528
|
+
...connectionContext,
|
|
44529
|
+
next: "Pair this Machine again from the desktop app, or re-run the setup command"
|
|
44530
|
+
});
|
|
44531
|
+
localCloudState = "unauthorized";
|
|
44532
|
+
publishLocalStatus();
|
|
44533
|
+
break;
|
|
44519
44534
|
case "unresponsive":
|
|
44520
44535
|
log.warn("Zixt Cloud stopped answering; Tasks unwound before reconnecting", {
|
|
44521
44536
|
...connectionContext,
|