@wrongstack/cli 0.300.0 → 0.302.0
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/{acp-IDNS2YVE.js → acp-DATHHPNT.js} +34 -15
- package/dist/acp-server-agent.d.ts +1 -1
- package/dist/{audit-2ZSFGNIF.js → audit-QRCLEHHW.js} +5 -1
- package/dist/{auth-6T6ZOT2R.js → auth-PJD3JRH2.js} +150 -37
- package/dist/boot/dispatch-webui.d.ts +3 -16
- package/dist/boot/launch-menu.d.ts +2 -4
- package/dist/boot/tool-registry.d.ts +3 -0
- package/dist/boot/webui-session-child.d.ts +91 -0
- package/dist/chimera-reviewer-policy.d.ts +10 -3
- package/dist/chimera-work-registry.d.ts +19 -0
- package/dist/{chronicle-QQEQFSSE.js → chronicle-63MFCZN6.js} +26 -5
- package/dist/{chunk-YWUPHRGB.js → chunk-263G3FMB.js} +33 -10
- package/dist/{chunk-GYDQABMA.js → chunk-2KDOFTTM.js} +44 -32
- package/dist/{chunk-V76R7DC5.js → chunk-3MOUBRKZ.js} +311 -309
- package/dist/chunk-CSAPOCBP.js +24 -0
- package/dist/{chunk-N7ULWBO5.js → chunk-ETOEGL3V.js} +3 -7
- package/dist/{chunk-3MWUZMOL.js → chunk-GUHQQG63.js} +14 -3
- package/dist/chunk-KE7E7DPX.js +38 -0
- package/dist/{chunk-PEMN4T5O.js → chunk-MT6FGXO3.js} +23 -4
- package/dist/chunk-PFVVUH5B.js +127 -0
- package/dist/{chunk-DPJZQCVP.js → chunk-YMXXOOFN.js} +1 -1
- package/dist/{chunk-4WJKVQJY.js → chunk-ZECLGUTF.js} +15 -3
- package/dist/cli-context.d.ts +2 -0
- package/dist/{cli-main-7B3G2YSG.js → cli-main-EOJ74CI4.js} +336 -99
- package/dist/execute-deps.d.ts +3 -0
- package/dist/{execution-SHGM7BVC.js → execution-CQ772VPS.js} +246 -97
- package/dist/execution-chimera-cascade.d.ts +3 -4
- package/dist/execution-chimera-review.d.ts +2 -3
- package/dist/execution-cleanup.d.ts +3 -2
- package/dist/execution.d.ts +1 -1
- package/dist/{export-TPORYVRZ.js → export-DOBGPY23.js} +12 -1
- package/dist/fleet/host-context.d.ts +1 -1
- package/dist/fleet/host-helpers.d.ts +14 -0
- package/dist/fleet/status-broadcast.d.ts +1 -1
- package/dist/{hq-DVDD4XPV.js → hq-LN5CJHCM.js} +2 -2
- package/dist/hq-server/routes.d.ts +10 -1
- package/dist/hq-server/ws.d.ts +17 -6
- package/dist/{hq-server-DQHLNHDL.js → hq-server-S7HZG3PA.js} +3 -2
- package/dist/index.js +142 -100
- package/dist/live-settings-input.d.ts +5 -0
- package/dist/{mcp-CYLPUEHC.js → mcp-OHPJH73U.js} +6 -2
- package/dist/{modeldiag-YOQZHBQV.js → modeldiag-3DOK4BWW.js} +2 -2
- package/dist/{plugin-usage-EOG4ET4S.js → plugin-usage-YEVLOR33.js} +7 -3
- package/dist/{plugins-56CMWMPR.js → plugins-K3BAUP4D.js} +3 -3
- package/dist/profile-config-path.d.ts +0 -2
- package/dist/provider-helpers.d.ts +0 -5
- package/dist/{providers-models-K6RT7ABI.js → providers-models-WEZ4EGLL.js} +6 -5
- package/dist/{replay-KCTXNMZQ.js → replay-FCBNHW3K.js} +5 -1
- package/dist/{rewind-EJMVFVLS.js → rewind-AOD3JIYX.js} +5 -1
- package/dist/{sessions-config-NLCMK3BY.js → sessions-config-XXN7267N.js} +8 -3
- package/dist/subcommands/flags.d.ts +23 -0
- package/dist/terminal-format.d.ts +15 -0
- package/dist/{webui-server-G3EKFXLL.js → webui-server-NFNRGNNT.js} +54 -29
- package/dist/webui-server-options.d.ts +7 -0
- package/dist/wiring/brain-and-orchestration.d.ts +1 -1
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts +3 -1
- package/dist/wiring/management-tools.d.ts +9 -1
- package/dist/wiring/pipeline.d.ts +5 -5
- package/dist/wiring/plugins.d.ts +2 -3
- package/dist/wiring/provider-utility-tools.d.ts +1 -0
- package/dist/wiring/tools.d.ts +4 -5
- package/package.json +23 -23
|
@@ -2,8 +2,12 @@ import "./chunk-7OCVIDC7.js";
|
|
|
2
2
|
|
|
3
3
|
// src/subcommands/handlers/chronicle.ts
|
|
4
4
|
import { statSync } from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
5
6
|
import {
|
|
6
|
-
|
|
7
|
+
chronicleProjectServerMetadataPath,
|
|
8
|
+
compactChronicleSqlite,
|
|
9
|
+
createChronicleProjectAccess,
|
|
10
|
+
resolveChronicleProjectServerOptions
|
|
7
11
|
} from "@wrongstack/core/chronicle";
|
|
8
12
|
var facets = /* @__PURE__ */ new Set([
|
|
9
13
|
"eventType",
|
|
@@ -26,6 +30,22 @@ var chronicleCmd = async (args, deps) => {
|
|
|
26
30
|
}
|
|
27
31
|
let access;
|
|
28
32
|
try {
|
|
33
|
+
if (operation === "compact") {
|
|
34
|
+
if (args.length !== 1) {
|
|
35
|
+
throw new Error("Usage: wstack chronicle compact (stop the Chronicle daemon first)");
|
|
36
|
+
}
|
|
37
|
+
const resolved = resolveChronicleProjectServerOptions({
|
|
38
|
+
projectRoot: deps.projectRoot,
|
|
39
|
+
userHome: deps.userHome
|
|
40
|
+
});
|
|
41
|
+
const result2 = compactChronicleSqlite({
|
|
42
|
+
dbPath: path.join(resolved.projectDir, "chronicle", "chronicle.sqlite"),
|
|
43
|
+
endpointMetadataPath: chronicleProjectServerMetadataPath(resolved.projectDir)
|
|
44
|
+
});
|
|
45
|
+
deps.renderer.write(`${JSON.stringify(result2, null, 2)}
|
|
46
|
+
`);
|
|
47
|
+
return 0;
|
|
48
|
+
}
|
|
29
49
|
access = createChronicleProjectAccess({
|
|
30
50
|
projectRoot: deps.projectRoot,
|
|
31
51
|
userHome: deps.userHome
|
|
@@ -60,9 +80,10 @@ var chronicleCmd = async (args, deps) => {
|
|
|
60
80
|
return 0;
|
|
61
81
|
}
|
|
62
82
|
if (operation === "prune") {
|
|
63
|
-
const
|
|
83
|
+
const flags = deps.flags ?? {};
|
|
84
|
+
const dryRun = args.includes("--dry-run") || args.includes("-n") || flags["dry-run"] === true || flags["dry-run"] === "true" || flags["n"] === true;
|
|
64
85
|
const daysIndex = args.indexOf("--days");
|
|
65
|
-
const rawDays = daysIndex >= 0 && daysIndex + 1 < args.length ? args[daysIndex + 1] : void 0;
|
|
86
|
+
const rawDays = daysIndex >= 0 && daysIndex + 1 < args.length ? args[daysIndex + 1] : typeof flags["days"] === "string" ? flags["days"] : void 0;
|
|
66
87
|
const days = rawDays ? parseInt(rawDays, 10) : 30;
|
|
67
88
|
if (!Number.isFinite(days) || days < 1) {
|
|
68
89
|
deps.renderer.writeError(
|
|
@@ -235,7 +256,7 @@ function parseValue(value) {
|
|
|
235
256
|
}
|
|
236
257
|
}
|
|
237
258
|
function usage() {
|
|
238
|
-
return "Usage:\n wstack chronicle query [field=value ...]\n wstack chronicle status\n wstack chronicle facet <field> [field=value ...]\n wstack chronicle metrics [providers|tasks|files|summary] [field=value ...]\n wstack chronicle prune [--days N] [--dry-run]\n\nExamples:\n wstack chronicle status\n wstack chronicle query path=src/app.ts line=42\n wstack chronicle query providerId=openai outcome=failure\n wstack chronicle query eventType=tool.executed sessionId=<id> limit=50\n wstack chronicle query attr.tool.name=read\n wstack chronicle facet modelId from=2026-07-01T00:00:00Z\n wstack chronicle metrics providers from=2026-07-01\n wstack chronicle metrics files path=src/app.ts\n wstack chronicle metrics tasks limit=20\n wstack chronicle prune --days 7 --dry-run\n wstack chronicle prune --days 30\n";
|
|
259
|
+
return "Usage:\n wstack chronicle query [field=value ...]\n wstack chronicle status\n wstack chronicle facet <field> [field=value ...]\n wstack chronicle metrics [providers|tasks|files|summary] [field=value ...]\n wstack chronicle prune [--days N] [--dry-run]\n wstack chronicle compact\n\nExamples:\n wstack chronicle status\n wstack chronicle query path=src/app.ts line=42\n wstack chronicle query providerId=openai outcome=failure\n wstack chronicle query eventType=tool.executed sessionId=<id> limit=50\n wstack chronicle query attr.tool.name=read\n wstack chronicle facet modelId from=2026-07-01T00:00:00Z\n wstack chronicle metrics providers from=2026-07-01\n wstack chronicle metrics files path=src/app.ts\n wstack chronicle metrics tasks limit=20\n wstack chronicle prune --days 7 --dry-run\n wstack chronicle prune --days 30\n wstack chronicle compact\n";
|
|
239
260
|
}
|
|
240
261
|
function formatBytes(bytes) {
|
|
241
262
|
if (bytes < 1024) return `${bytes} B`;
|
|
@@ -253,4 +274,4 @@ function tryStat(file) {
|
|
|
253
274
|
export {
|
|
254
275
|
chronicleCmd
|
|
255
276
|
};
|
|
256
|
-
//# sourceMappingURL=chronicle-
|
|
277
|
+
//# sourceMappingURL=chronicle-63MFCZN6.js.map
|
|
@@ -80,20 +80,40 @@ async function safeDelete(filePath) {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
var REDACTED = "[REDACTED]";
|
|
84
|
+
function maskValue(v) {
|
|
85
|
+
if (Array.isArray(v)) return v.map(maskValue);
|
|
86
|
+
if (typeof v === "object" && v !== null) return maskConfigSecrets(v);
|
|
87
|
+
return v;
|
|
88
|
+
}
|
|
83
89
|
function maskConfigSecrets(cfg) {
|
|
84
90
|
if (typeof cfg !== "object" || cfg === null) return {};
|
|
85
91
|
const out = {};
|
|
86
92
|
for (const [k, v] of Object.entries(cfg)) {
|
|
87
93
|
if (isSecretField(k)) {
|
|
88
|
-
out[k] =
|
|
89
|
-
} else if (typeof v === "object" && v !== null && !Array.isArray(v)) {
|
|
90
|
-
out[k] = maskConfigSecrets(v);
|
|
94
|
+
out[k] = REDACTED;
|
|
91
95
|
} else {
|
|
92
|
-
out[k] = v;
|
|
96
|
+
out[k] = maskValue(v);
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
return out;
|
|
96
100
|
}
|
|
101
|
+
function reviveSecrets(masked, current) {
|
|
102
|
+
if (masked === REDACTED) return current;
|
|
103
|
+
if (Array.isArray(masked)) {
|
|
104
|
+
const cur = Array.isArray(current) ? current : [];
|
|
105
|
+
return masked.map((item, i) => reviveSecrets(item, cur[i]));
|
|
106
|
+
}
|
|
107
|
+
if (typeof masked !== "object" || masked === null) return masked;
|
|
108
|
+
const curObj = typeof current === "object" && current !== null && !Array.isArray(current) ? current : {};
|
|
109
|
+
const out = {};
|
|
110
|
+
for (const [k, v] of Object.entries(masked)) {
|
|
111
|
+
const revived = reviveSecrets(v, curObj[k]);
|
|
112
|
+
if (revived === void 0) continue;
|
|
113
|
+
out[k] = revived;
|
|
114
|
+
}
|
|
115
|
+
return out;
|
|
116
|
+
}
|
|
97
117
|
function diffSummary(oldCfg, newCfg) {
|
|
98
118
|
const changes = [];
|
|
99
119
|
const allKeys = /* @__PURE__ */ new Set([...Object.keys(oldCfg), ...Object.keys(newCfg)]);
|
|
@@ -199,7 +219,7 @@ async function backupCurrent(homeFn = defaultHomeDir, targetConfigPath) {
|
|
|
199
219
|
}
|
|
200
220
|
if (content !== void 0) {
|
|
201
221
|
try {
|
|
202
|
-
await atomicWrite(last, content);
|
|
222
|
+
await atomicWrite(last, content, { mode: 384 });
|
|
203
223
|
} catch (err) {
|
|
204
224
|
writeErr(
|
|
205
225
|
`[config-history] .last backup failed: ${toErrorMessage(err)}`
|
|
@@ -209,7 +229,7 @@ async function backupCurrent(homeFn = defaultHomeDir, targetConfigPath) {
|
|
|
209
229
|
if (content !== void 0) {
|
|
210
230
|
try {
|
|
211
231
|
const bakPath = `${cfg}.${ts}.bak`;
|
|
212
|
-
await atomicWrite(bakPath, content);
|
|
232
|
+
await atomicWrite(bakPath, content, { mode: 384 });
|
|
213
233
|
} catch (err) {
|
|
214
234
|
writeErr(
|
|
215
235
|
`[config-history] timestamped backup failed: ${toErrorMessage(err)}`
|
|
@@ -244,7 +264,7 @@ async function appendHistory(oldCfg, newCfg, description, homeFn = defaultHomeDi
|
|
|
244
264
|
await fs.writeFile(
|
|
245
265
|
path.join(historyDir(homeFn, targetConfigPath), `${id}.json`),
|
|
246
266
|
JSON.stringify(entry, null, 2),
|
|
247
|
-
"utf8"
|
|
267
|
+
{ encoding: "utf8", mode: 384 }
|
|
248
268
|
);
|
|
249
269
|
} catch (err) {
|
|
250
270
|
throw new FsError({
|
|
@@ -292,14 +312,17 @@ async function restoreFromHistory(id, homeFn = defaultHomeDir, targetConfigPath)
|
|
|
292
312
|
oldCfg = JSON.parse(raw);
|
|
293
313
|
} catch {
|
|
294
314
|
}
|
|
315
|
+
const restored = reviveSecrets(entry.snapshotMasked, oldCfg);
|
|
295
316
|
try {
|
|
296
|
-
await atomicWrite(configPath(homeFn, targetConfigPath), JSON.stringify(
|
|
317
|
+
await atomicWrite(configPath(homeFn, targetConfigPath), JSON.stringify(restored, null, 2), {
|
|
318
|
+
mode: 384
|
|
319
|
+
});
|
|
297
320
|
} catch (err) {
|
|
298
321
|
return { ok: false, backupId: null, error: String(err) };
|
|
299
322
|
}
|
|
300
323
|
const backupId = await appendHistory(
|
|
301
324
|
oldCfg,
|
|
302
|
-
|
|
325
|
+
restored,
|
|
303
326
|
`Restored from history ${id}`,
|
|
304
327
|
homeFn,
|
|
305
328
|
targetConfigPath
|
|
@@ -343,4 +366,4 @@ export {
|
|
|
343
366
|
restoreFromHistory,
|
|
344
367
|
restoreLast
|
|
345
368
|
};
|
|
346
|
-
//# sourceMappingURL=chunk-
|
|
369
|
+
//# sourceMappingURL=chunk-263G3FMB.js.map
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
terminalLink,
|
|
3
|
+
terminalText
|
|
4
|
+
} from "./chunk-KE7E7DPX.js";
|
|
1
5
|
import {
|
|
2
6
|
resolveAuditActor
|
|
3
7
|
} from "./chunk-Q5GTM25S.js";
|
|
@@ -2539,12 +2543,12 @@ function createHqRouter(deps) {
|
|
|
2539
2543
|
} = deps;
|
|
2540
2544
|
return async (req, res) => {
|
|
2541
2545
|
try {
|
|
2542
|
-
const url = new URL(req.url ?? "/", `http://${host}:${listeningPort}`);
|
|
2546
|
+
const url = new URL(req.url ?? "/", `http://${host}:${listeningPort()}`);
|
|
2543
2547
|
setHqSecurityHeaders2(res);
|
|
2544
2548
|
if (!hasTrustedBrowserOrigin2(
|
|
2545
2549
|
req,
|
|
2546
2550
|
host,
|
|
2547
|
-
listeningPort,
|
|
2551
|
+
listeningPort(),
|
|
2548
2552
|
trustedPublicOrigins,
|
|
2549
2553
|
allowFileOrigin
|
|
2550
2554
|
)) {
|
|
@@ -3163,17 +3167,11 @@ async function handleMailboxAction(_req, res, match, mutableAuth, sessions, data
|
|
|
3163
3167
|
// src/hq-server/startup.ts
|
|
3164
3168
|
import * as fs4 from "node:fs/promises";
|
|
3165
3169
|
import * as path6 from "node:path";
|
|
3170
|
+
import { writeHqRuntimeFile } from "@wrongstack/core/hq";
|
|
3166
3171
|
var hqRuntimeMarkerPath2 = hqRuntimeMarkerPath;
|
|
3167
3172
|
async function writeHqRuntimeMarker(dataDir, url) {
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
{ url, pid: process.pid, updatedAt: (/* @__PURE__ */ new Date()).toISOString() },
|
|
3171
|
-
null,
|
|
3172
|
-
2
|
|
3173
|
-
);
|
|
3174
|
-
await fs4.mkdir(path6.dirname(file), { recursive: true });
|
|
3175
|
-
await fs4.writeFile(file, `${payload}
|
|
3176
|
-
`, { encoding: "utf8", mode: 384 });
|
|
3173
|
+
await fs4.mkdir(dataDir, { recursive: true });
|
|
3174
|
+
await writeHqRuntimeFile(dataDir, { url, pid: process.pid });
|
|
3177
3175
|
}
|
|
3178
3176
|
async function clearHqRuntimeMarker(dataDir, url) {
|
|
3179
3177
|
const file = hqRuntimeMarkerPath2(dataDir);
|
|
@@ -3188,19 +3186,23 @@ async function clearHqRuntimeMarker(dataDir, url) {
|
|
|
3188
3186
|
}
|
|
3189
3187
|
function writeHqStartupInfo(write, handle) {
|
|
3190
3188
|
const startup = handle.firstRunSetup;
|
|
3191
|
-
|
|
3192
|
-
|
|
3189
|
+
const browserUrl = buildHttpUrl(handle.host, handle.port);
|
|
3190
|
+
const clientUrl = buildClientWsUrl(handle.host, handle.port);
|
|
3191
|
+
write(
|
|
3192
|
+
`${terminalText("WrongStack HQ", "magenta")} ${terminalText("listening on", "green")} ${terminalLink(browserUrl)}
|
|
3193
|
+
`
|
|
3194
|
+
);
|
|
3193
3195
|
if (!startup) {
|
|
3194
|
-
write(
|
|
3196
|
+
write(`${terminalText("Browser endpoint:", "blue")} ${terminalLink(browserUrl)}
|
|
3195
3197
|
`);
|
|
3196
|
-
write(
|
|
3198
|
+
write(`${terminalText("Client endpoint:", "blue")} ${terminalLink(clientUrl)}
|
|
3197
3199
|
`);
|
|
3198
3200
|
writeHqLanEndpoints(write, handle, void 0);
|
|
3199
3201
|
return;
|
|
3200
3202
|
}
|
|
3201
|
-
write(
|
|
3203
|
+
write(`${terminalText("Browser endpoint:", "blue")} ${terminalLink(startup.browserUrl)}
|
|
3202
3204
|
`);
|
|
3203
|
-
write(
|
|
3205
|
+
write(`${terminalText("Client endpoint:", "blue")} ${terminalLink(startup.clientUrl)}
|
|
3204
3206
|
`);
|
|
3205
3207
|
if (startup.createdAuth) {
|
|
3206
3208
|
write(`
|
|
@@ -3226,13 +3228,23 @@ function writeHqLanEndpoints(write, handle, browserToken) {
|
|
|
3226
3228
|
if (handle.host !== "0.0.0.0" && handle.host !== "::") return;
|
|
3227
3229
|
const ips = lanIPv4Addresses();
|
|
3228
3230
|
if (ips.length === 0) return;
|
|
3229
|
-
write(
|
|
3231
|
+
write(
|
|
3232
|
+
`
|
|
3233
|
+
${terminalText("Reachable from other machines on your network:", "blue", { bold: true })}
|
|
3234
|
+
`
|
|
3235
|
+
);
|
|
3230
3236
|
for (const ip of ips) {
|
|
3231
|
-
|
|
3237
|
+
const url = buildHttpUrl(ip, handle.port, browserToken);
|
|
3238
|
+
write(` ${terminalLink(url)}
|
|
3232
3239
|
`);
|
|
3233
3240
|
}
|
|
3234
|
-
|
|
3235
|
-
|
|
3241
|
+
const firstIp = ips[0];
|
|
3242
|
+
if (firstIp === void 0) return;
|
|
3243
|
+
const clientUrl = buildHttpUrl(firstIp, handle.port);
|
|
3244
|
+
write(
|
|
3245
|
+
` ${terminalText("On another machine, set", "muted")} WRONGSTACK_HQ_URL=${terminalLink(clientUrl)}
|
|
3246
|
+
`
|
|
3247
|
+
);
|
|
3236
3248
|
}
|
|
3237
3249
|
|
|
3238
3250
|
// src/hq-server/ws.ts
|
|
@@ -3363,7 +3375,7 @@ function nextPeerEventSeq(eventLog) {
|
|
|
3363
3375
|
peerEventSeq += 1;
|
|
3364
3376
|
return peerEventSeq;
|
|
3365
3377
|
}
|
|
3366
|
-
function fanoutKanbanDelta(message, clients,
|
|
3378
|
+
function fanoutKanbanDelta(message, clients, _browsers, projectId) {
|
|
3367
3379
|
let clientsNotified = 0;
|
|
3368
3380
|
for (const peer of clients.values()) {
|
|
3369
3381
|
if (peer.projectId === projectId) {
|
|
@@ -3371,12 +3383,7 @@ function fanoutKanbanDelta(message, clients, browsers, projectId) {
|
|
|
3371
3383
|
clientsNotified++;
|
|
3372
3384
|
}
|
|
3373
3385
|
}
|
|
3374
|
-
|
|
3375
|
-
for (const browserWs of browsers) {
|
|
3376
|
-
sendGuarded(browserWs, message);
|
|
3377
|
-
browsersNotified++;
|
|
3378
|
-
}
|
|
3379
|
-
return { clientsNotified, browsersNotified };
|
|
3386
|
+
return { clientsNotified, browsersNotified: 0 };
|
|
3380
3387
|
}
|
|
3381
3388
|
function handleClientResume(ws, clients, eventLog, frame, snapshotBroadcaster) {
|
|
3382
3389
|
const client = clients.get(ws);
|
|
@@ -4275,7 +4282,7 @@ async function startHqServerWithAuth(options, host, port, dataDir, firstRunAuth)
|
|
|
4275
4282
|
const routerDeps = {
|
|
4276
4283
|
trustBoundary,
|
|
4277
4284
|
host,
|
|
4278
|
-
listeningPort,
|
|
4285
|
+
listeningPort: () => listeningPort,
|
|
4279
4286
|
trustedPublicOrigins,
|
|
4280
4287
|
allowFileOrigin: options.allowFileOrigin,
|
|
4281
4288
|
mutableAuth,
|
|
@@ -4545,8 +4552,13 @@ async function startHqServerWithAuth(options, host, port, dataDir, firstRunAuth)
|
|
|
4545
4552
|
snapshotBroadcaster.close();
|
|
4546
4553
|
bootstrapStore.clear();
|
|
4547
4554
|
persistence.timeseries.flush();
|
|
4548
|
-
for (const ws of browsers
|
|
4549
|
-
|
|
4555
|
+
for (const ws of [...browsers, ...clients.keys()]) {
|
|
4556
|
+
try {
|
|
4557
|
+
ws.close(1001, "HQ shutting down");
|
|
4558
|
+
ws.terminate();
|
|
4559
|
+
} catch {
|
|
4560
|
+
}
|
|
4561
|
+
}
|
|
4550
4562
|
wss.close();
|
|
4551
4563
|
for (const { router } of mailboxGateways.values()) router.close();
|
|
4552
4564
|
httpServer.close(() => {
|
|
@@ -4594,4 +4606,4 @@ export {
|
|
|
4594
4606
|
startHqServer,
|
|
4595
4607
|
HqInsecureExposureError2 as HqInsecureExposureError
|
|
4596
4608
|
};
|
|
4597
|
-
//# sourceMappingURL=chunk-
|
|
4609
|
+
//# sourceMappingURL=chunk-2KDOFTTM.js.map
|