@zixt/host 0.0.125 → 0.0.127
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 +27 -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.127",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -20604,7 +20604,16 @@ var RevokeHostRequest = external_exports.object({
|
|
|
20604
20604
|
* response replays the recorded outcome instead of reporting the Machine
|
|
20605
20605
|
* missing.
|
|
20606
20606
|
*/
|
|
20607
|
-
requestId: external_exports.string().min(8).max(120).optional()
|
|
20607
|
+
requestId: external_exports.string().min(8).max(120).optional(),
|
|
20608
|
+
/**
|
|
20609
|
+
* Explicit Admin decision for a Machine that can never reconnect
|
|
20610
|
+
* (uninstalled, wiped, lost): finish a pending removal without its
|
|
20611
|
+
* cleanup evidence. The row and its custody records are removed while
|
|
20612
|
+
* the confirmation and Audit state plainly that the saved website
|
|
20613
|
+
* sign-ins on that machine were NOT erased. Refused unless removal is
|
|
20614
|
+
* already pending, so the ordinary impact-aware flow always runs first.
|
|
20615
|
+
*/
|
|
20616
|
+
abandonCleanup: external_exports.boolean().optional()
|
|
20608
20617
|
}).strict();
|
|
20609
20618
|
var HostRemovalOutcome = external_exports.object({
|
|
20610
20619
|
hostId: HostId,
|
|
@@ -24051,6 +24060,11 @@ var HostClient = class _HostClient {
|
|
|
24051
24060
|
if (inventoryRetryTimer) clearTimeout(inventoryRetryTimer);
|
|
24052
24061
|
void this.handleClose(ws, code, closeReason, frameTail, closeDetail(reason));
|
|
24053
24062
|
});
|
|
24063
|
+
ws.on("unexpected-response", (_request, response) => {
|
|
24064
|
+
if (response.statusCode === 401) closeReason = "unauthorized";
|
|
24065
|
+
response.resume();
|
|
24066
|
+
ws.terminate();
|
|
24067
|
+
});
|
|
24054
24068
|
ws.on("error", () => {
|
|
24055
24069
|
});
|
|
24056
24070
|
}
|
|
@@ -24103,7 +24117,9 @@ var HostClient = class _HostClient {
|
|
|
24103
24117
|
if (code === CLOSE_CODES.protocolError) {
|
|
24104
24118
|
this.opts.onStatus?.("rejected", detail);
|
|
24105
24119
|
} else {
|
|
24106
|
-
this.opts.onStatus?.(
|
|
24120
|
+
this.opts.onStatus?.(
|
|
24121
|
+
closeReason === "heartbeat_timeout" ? "unresponsive" : closeReason === "unauthorized" ? "unauthorized" : "disconnected"
|
|
24122
|
+
);
|
|
24107
24123
|
}
|
|
24108
24124
|
if (this.stopped) return;
|
|
24109
24125
|
await this.unwindAllRuns(
|
|
@@ -44516,6 +44532,14 @@ var client = new HostClient({
|
|
|
44516
44532
|
localCloudState = "connecting";
|
|
44517
44533
|
publishLocalStatus();
|
|
44518
44534
|
break;
|
|
44535
|
+
case "unauthorized":
|
|
44536
|
+
log.error("Zixt Cloud does not recognize this Machine pairing anymore", {
|
|
44537
|
+
...connectionContext,
|
|
44538
|
+
next: "Pair this Machine again from the desktop app, or re-run the setup command"
|
|
44539
|
+
});
|
|
44540
|
+
localCloudState = "unauthorized";
|
|
44541
|
+
publishLocalStatus();
|
|
44542
|
+
break;
|
|
44519
44543
|
case "unresponsive":
|
|
44520
44544
|
log.warn("Zixt Cloud stopped answering; Tasks unwound before reconnecting", {
|
|
44521
44545
|
...connectionContext,
|