@zixt/host 0.0.126 → 0.0.128
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 +23 -8
- 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.128",
|
|
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,
|
|
@@ -42629,6 +42638,7 @@ import { homedir as homedir12, userInfo as userInfo2 } from "node:os";
|
|
|
42629
42638
|
import { basename as basename5, dirname as dirname12, join as join23, relative as relative10, resolve as resolve14, sep as sep7 } from "node:path";
|
|
42630
42639
|
var LAUNCH_AGENT_LABEL = "ai.zixt.host";
|
|
42631
42640
|
var SERVICE_STABILITY_DELAY_MS2 = 2e3;
|
|
42641
|
+
var STATUS_WAIT_MS = 2e4;
|
|
42632
42642
|
var COMMAND_TIMEOUT_MS2 = 7e4;
|
|
42633
42643
|
var COMMAND_OUTPUT_LIMIT2 = 64 * 1024;
|
|
42634
42644
|
function oneLine2(value, name) {
|
|
@@ -42842,13 +42852,18 @@ async function installMacosService(options) {
|
|
|
42842
42852
|
const observe = async () => {
|
|
42843
42853
|
const result = await run3(launchctl, ["print", target]);
|
|
42844
42854
|
if (result.code !== 0) throw commandFailure2("Checking Zixt startup", result);
|
|
42845
|
-
|
|
42846
|
-
if (!status) throw new Error("Zixt started but did not reach a running process state.");
|
|
42847
|
-
return status;
|
|
42855
|
+
return parseLaunchdStatus(result.stdout);
|
|
42848
42856
|
};
|
|
42849
|
-
const
|
|
42857
|
+
const deadline = Date.now() + (options.statusWaitMs ?? STATUS_WAIT_MS);
|
|
42858
|
+
let first = await observe();
|
|
42859
|
+
while (!first && Date.now() < deadline) {
|
|
42860
|
+
await delay4(250);
|
|
42861
|
+
first = await observe();
|
|
42862
|
+
}
|
|
42863
|
+
if (!first) throw new Error("Zixt started but did not reach a running process state.");
|
|
42850
42864
|
await delay4(options.serviceStabilityDelayMs ?? SERVICE_STABILITY_DELAY_MS2);
|
|
42851
42865
|
const second = await observe();
|
|
42866
|
+
if (!second) throw new Error("Zixt started but did not reach a running process state.");
|
|
42852
42867
|
if (first.pid !== second.pid || first.runs !== second.runs) {
|
|
42853
42868
|
throw new Error("Zixt started but restarted during its readiness check.");
|
|
42854
42869
|
}
|
|
@@ -42872,7 +42887,7 @@ import { basename as basename6, dirname as dirname13, isAbsolute as isAbsolute18
|
|
|
42872
42887
|
var TASK_NAME = "Zixt Host";
|
|
42873
42888
|
var COMMAND_TIMEOUT_MS3 = 7e4;
|
|
42874
42889
|
var SERVICE_STABILITY_DELAY_MS3 = 2e3;
|
|
42875
|
-
var
|
|
42890
|
+
var STATUS_WAIT_MS2 = 2e4;
|
|
42876
42891
|
var SAFE_SID = /^S-1-(?:\d+-){1,14}\d+$/;
|
|
42877
42892
|
function oneLine3(value, name) {
|
|
42878
42893
|
if (!value || /[\0\r\n]/.test(value)) throw new Error(`${name} is not a valid one-line value`);
|
|
@@ -43208,7 +43223,7 @@ async function installWindowsService(options) {
|
|
|
43208
43223
|
if (create.code !== 0) throw commandFailure3("Installing Zixt at sign-in", create);
|
|
43209
43224
|
const start = await run3(schtasks, ["/Run", "/TN", TASK_NAME]);
|
|
43210
43225
|
if (start.code !== 0) throw commandFailure3("Starting Zixt", start);
|
|
43211
|
-
const deadline = Date.now() + (options.statusWaitMs ??
|
|
43226
|
+
const deadline = Date.now() + (options.statusWaitMs ?? STATUS_WAIT_MS2);
|
|
43212
43227
|
let first = null;
|
|
43213
43228
|
do {
|
|
43214
43229
|
first = await observe(statusPath, generation);
|