@ghostlytools/cli 1.9.0 → 1.10.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/README.md +28 -20
- package/SKILL.md +5 -1
- package/dist/assets/{api-DFCgr6RH.js → api-BF_KwecF.js} +84 -38
- package/dist/assets/api-BF_KwecF.js.map +1 -0
- package/dist/assets/{api-raWw9j_m.js → api-DdrA86Ur.js} +2 -2
- package/dist/assets/{apiKit-CCavJJcl.js → apiKit-Du1u2l4x.js} +8 -8
- package/dist/assets/apiKit-Du1u2l4x.js.map +1 -0
- package/dist/assets/{apps-B7o2BPj6.js → apps-Bti9fDoW.js} +1 -1
- package/dist/assets/{apps-DmxEG147.js → apps-DwPfp54I.js} +5 -3
- package/dist/assets/apps-DwPfp54I.js.map +1 -0
- package/dist/assets/{arkade-DtYR9H0c.js → arkade-DOWpA2Kr.js} +2 -2
- package/dist/assets/{arkade-DtYR9H0c.js.map → arkade-DOWpA2Kr.js.map} +1 -1
- package/dist/assets/{backup-BserdrNk.js → backup-CeRckyl2.js} +1 -1
- package/dist/assets/{backup-YIB2XIES.js → backup-DZ_Q1eSu.js} +6 -6
- package/dist/assets/{backup-YIB2XIES.js.map → backup-DZ_Q1eSu.js.map} +1 -1
- package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
- package/dist/assets/{blobFiles-DOQDRdDI.js → blobFiles-BnjN_Vrz.js} +3 -3
- package/dist/assets/{blobFiles-DOQDRdDI.js.map → blobFiles-BnjN_Vrz.js.map} +1 -1
- package/dist/assets/buttons-BxIThdg9.js +332 -0
- package/dist/assets/buttons-BxIThdg9.js.map +1 -0
- package/dist/assets/buttons-D9QBHS9Y.js +2 -0
- package/dist/assets/client-D5E1RQYB.js +473 -0
- package/dist/assets/client-D5E1RQYB.js.map +1 -0
- package/dist/assets/{endpoint-BdaeBw2L.js → endpoint-DWHkXWVM.js} +101 -16
- package/dist/assets/endpoint-DWHkXWVM.js.map +1 -0
- package/dist/assets/{envelope-Dt75vrmY.js → envelope-CugS9qwQ.js} +2 -2
- package/dist/assets/{envelope-Dt75vrmY.js.map → envelope-CugS9qwQ.js.map} +1 -1
- package/dist/assets/fedimint_client_wasm_bg-BtHHlFpp.js.map +1 -1
- package/dist/assets/{fileBytes-BPDKufla.js → fileBytes-DMzrIdCu.js} +1 -1
- package/dist/assets/{fileBytes-DNgrRL0R.js → fileBytes-DjBYYyXT.js} +3 -3
- package/dist/assets/{fileBytes-DNgrRL0R.js.map → fileBytes-DjBYYyXT.js.map} +1 -1
- package/dist/assets/{fileBytes-Q3ehcEr8.js → fileBytes-Douk1yOp.js} +2 -2
- package/dist/assets/{fileBytes-Q3ehcEr8.js.map → fileBytes-Douk1yOp.js.map} +1 -1
- package/dist/assets/fileBytesIdb-CD5Uv490.js +2 -0
- package/dist/assets/{fileBytesIdb-Dm1EyEbT.js → fileBytesIdb-CkClu9YI.js} +3 -3
- package/dist/assets/{fileBytesIdb-Dm1EyEbT.js.map → fileBytesIdb-CkClu9YI.js.map} +1 -1
- package/dist/assets/{fileBytesOpfs-ZGD21c4Q.js → fileBytesOpfs-WryQuOgK.js} +3 -3
- package/dist/assets/{fileBytesOpfs-ZGD21c4Q.js.map → fileBytesOpfs-WryQuOgK.js.map} +1 -1
- package/dist/assets/{fixedHosts-B598JzbC.js → fixedHosts-B4E4VrYE.js} +4 -4
- package/dist/assets/{fixedHosts-B598JzbC.js.map → fixedHosts-B4E4VrYE.js.map} +1 -1
- package/dist/assets/{groupFiles-FXel6zIc.js → groupFiles-NonOYBKN.js} +378 -59
- package/dist/assets/groupFiles-NonOYBKN.js.map +1 -0
- package/dist/assets/{host-DIBeK_c_.js → host-DvcVt5YI.js} +79 -23
- package/dist/assets/{host-DIBeK_c_.js.map → host-DvcVt5YI.js.map} +1 -1
- package/dist/assets/{hyperdhtRelay-D185dETu.js → hyperdhtRelay-Ce42sR8x.js} +2 -2
- package/dist/assets/{hyperdhtRelay-D185dETu.js.map → hyperdhtRelay-Ce42sR8x.js.map} +1 -1
- package/dist/assets/{idb-BkOJES5_.js → idb-BHsAqENE.js} +37 -6
- package/dist/assets/idb-BHsAqENE.js.map +1 -0
- package/dist/assets/{irohWeb-BSv_BWyG.js → irohWeb-C9ChbD-c.js} +57 -3
- package/dist/assets/{irohWeb-BSv_BWyG.js.map → irohWeb-C9ChbD-c.js.map} +1 -1
- package/dist/assets/{main-BbhfMTt8.js → main-4qE381KM.js} +194 -276
- package/dist/assets/main-4qE381KM.js.map +1 -0
- package/dist/assets/{mainline-9Vc3c3SA.js → mainline-DOwZDHVy.js} +2 -2
- package/dist/assets/{mainline-9Vc3c3SA.js.map → mainline-DOwZDHVy.js.map} +1 -1
- package/dist/assets/{networkReason-BncJ9KSM.js → networkReason-MInk1Y63.js} +3 -3
- package/dist/assets/{networkReason-BncJ9KSM.js.map → networkReason-MInk1Y63.js.map} +1 -1
- package/dist/assets/{nwc-QX3Yt1Sb.js → nwc-CHLWFV1R.js} +3 -3
- package/dist/assets/{nwc-QX3Yt1Sb.js.map → nwc-CHLWFV1R.js.map} +1 -1
- package/dist/assets/{nwcProvider-CzX3xH47.js → nwcProvider-BlkPOJen.js} +2 -2
- package/dist/assets/{nwcProvider-CzX3xH47.js.map → nwcProvider-BlkPOJen.js.map} +1 -1
- package/dist/assets/{ownDid-D8z5gwGI.js → ownDid-yXtY_1B5.js} +3 -3
- package/dist/assets/ownDid-yXtY_1B5.js.map +1 -0
- package/dist/assets/{profiles-MFtCmJwK.js → profiles-vbXHs0Mq.js} +40 -3
- package/dist/assets/profiles-vbXHs0Mq.js.map +1 -0
- package/dist/assets/{registry-PTtBMaYZ.js → registry-BN9r2pR4.js} +1 -1
- package/dist/assets/{registry-B2Dtnibo.js → registry-chCD0KWS.js} +5 -5
- package/dist/assets/registry-chCD0KWS.js.map +1 -0
- package/dist/assets/{resolve-ZxVzwFNA.js → resolve-Dtzogt2W.js} +2 -2
- package/dist/assets/{resolve-ZxVzwFNA.js.map → resolve-Dtzogt2W.js.map} +1 -1
- package/dist/assets/{restoredRows-BCRCjhdF.js → restoredRows-CRYwIx3g.js} +2 -2
- package/dist/assets/{restoredRows-BCRCjhdF.js.map → restoredRows-CRYwIx3g.js.map} +1 -1
- package/dist/assets/{buttons-CuRfKnPI.js → secretGuard-CSVNxXVW.js} +80 -330
- package/dist/assets/secretGuard-CSVNxXVW.js.map +1 -0
- package/dist/assets/secretGuard-Q2BKq0q0.js +2 -0
- package/dist/assets/{server-Dw1o8z1o.js → server-BZnsm5X5.js} +1749 -335
- package/dist/assets/server-BZnsm5X5.js.map +1 -0
- package/dist/assets/{src-BD8RBVEp.js → src-DZagapGt.js} +1043 -197
- package/dist/assets/src-DZagapGt.js.map +1 -0
- package/dist/assets/{sshForges-DWrESWkK.js → sshForges-BkTgy5rx.js} +16 -9
- package/dist/assets/{sshForges-DWrESWkK.js.map → sshForges-BkTgy5rx.js.map} +1 -1
- package/dist/assets/{translate-D1uP0q32.js → translate-B9SMd6uf.js} +8 -7
- package/dist/assets/translate-B9SMd6uf.js.map +1 -0
- package/dist/assets/{usdt-DhVN8geQ.js → usdt-BU4ezonh.js} +3 -3
- package/dist/assets/{usdt-DhVN8geQ.js.map → usdt-BU4ezonh.js.map} +1 -1
- package/dist/assets/{words-DdXPkB3n.js → words-jYy7lTcb.js} +4 -2
- package/dist/assets/words-jYy7lTcb.js.map +1 -0
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-DFCgr6RH.js.map +0 -1
- package/dist/assets/apiKit-CCavJJcl.js.map +0 -1
- package/dist/assets/apps-DmxEG147.js.map +0 -1
- package/dist/assets/buttons-CuRfKnPI.js.map +0 -1
- package/dist/assets/buttons-De3LPdSG.js +0 -2
- package/dist/assets/daemonProof-DtrL5lE5.js +0 -236
- package/dist/assets/daemonProof-DtrL5lE5.js.map +0 -1
- package/dist/assets/endpoint-BdaeBw2L.js.map +0 -1
- package/dist/assets/fileBytesIdb-DZcESfTt.js +0 -2
- package/dist/assets/groupFiles-FXel6zIc.js.map +0 -1
- package/dist/assets/idb-BkOJES5_.js.map +0 -1
- package/dist/assets/main-BbhfMTt8.js.map +0 -1
- package/dist/assets/ownDid-D8z5gwGI.js.map +0 -1
- package/dist/assets/profiles-MFtCmJwK.js.map +0 -1
- package/dist/assets/registry-B2Dtnibo.js.map +0 -1
- package/dist/assets/server-Dw1o8z1o.js.map +0 -1
- package/dist/assets/src-BD8RBVEp.js.map +0 -1
- package/dist/assets/translate-D1uP0q32.js.map +0 -1
- package/dist/assets/words-DdXPkB3n.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-
|
|
1
|
+
import { Fi as isPublicAddress, Hu as fromBase64Url, Su as setLinkTraceSink, as as buildSdpFromSignal, ds as signalHasVideo, is as answersOffer, li as checkPushEndpoint, ls as extractParamsFromSdp, ns as CALL_SIGNAL_MAX_AGE_MS, os as callRtcConfig, rs as RTC_CONFIG, ss as callSignalHeardAt, us as parseCallSignal } from "./src-DZagapGt.js";
|
|
2
|
+
import { o as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-C9ChbD-c.js";
|
|
3
3
|
import { r as asCliError, t as CliError } from "./errors-R4S2SAEM.js";
|
|
4
|
-
import { l as findOwnNamedChat, o as findChat } from "./apiKit-
|
|
5
|
-
import { _ as flushCardUpdates, c as paymentJson, d as nodeLocalFetch, f as chatJson, g as resumeHolds, h as groupMessageJson, l as reportAppFrames, m as groupJson, p as chatMessageJson, r as callApi, u as servedApps } from "./api-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { l as findOwnNamedChat, o as findChat } from "./apiKit-Du1u2l4x.js";
|
|
5
|
+
import { _ as flushCardUpdates, c as paymentJson, d as nodeLocalFetch, f as chatJson, g as resumeHolds, h as groupMessageJson, l as reportAppFrames, m as groupJson, p as chatMessageJson, r as callApi, u as servedApps } from "./api-BF_KwecF.js";
|
|
6
|
+
import { S as runtimePath, g as startingPath, n as RESTORED_MARK, r as acquireLock, v as ownFolder, x as privateFolder, y as ownProfile } from "./profiles-vbXHs0Mq.js";
|
|
7
|
+
import { c as proof, d as DEFAULT_RATE, f as PlaybackQueue, g as isCallRate, h as frameSamples, l as removeDaemonSecret, m as frameBytes, o as greeting, p as bytesToMs, s as newDaemonSecret } from "./client-D5E1RQYB.js";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { appendFileSync, chmodSync, closeSync, existsSync, fstatSync, fsyncSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
10
10
|
import { readFile } from "node:fs/promises";
|
|
@@ -1689,7 +1689,10 @@ var SEEN_KEEP_MS = 2592e6;
|
|
|
1689
1689
|
var SWEEP_EVERY_MS = 216e5;
|
|
1690
1690
|
/** How long a `file.*` event waits for the message that carries its file. */
|
|
1691
1691
|
var FILE_MESSAGE_WAIT_MS = 2e3;
|
|
1692
|
-
/**
|
|
1692
|
+
/**
|
|
1693
|
+
* The notice an app sends when a chat first goes live (apps/ui/src/hooks/useChat.ts): shown as a line, not a message.
|
|
1694
|
+
* The contact's only on the row the engine took as their joined line (`StoredMessage.joinLine`).
|
|
1695
|
+
*/
|
|
1693
1696
|
var JOIN_NOTICE = /^👋 (?:(.+) )?joined$/;
|
|
1694
1697
|
/**
|
|
1695
1698
|
* Turns the engine's events into the stream, keeps the journal, and remembers which messages it already reported
|
|
@@ -1701,6 +1704,13 @@ var EventHub = class {
|
|
|
1701
1704
|
now;
|
|
1702
1705
|
seenDb;
|
|
1703
1706
|
seq = 0;
|
|
1707
|
+
/**
|
|
1708
|
+
* The last seq the journal dropped (a trim, a journal set aside), kept in `<journal>.dropped`: a replay from before it
|
|
1709
|
+
* starts with `events.gap`. What the person removed (`forget`) leaves holes after it, which are none.
|
|
1710
|
+
*/
|
|
1711
|
+
dropped = 0;
|
|
1712
|
+
/** Whether `<journal>.dropped` is written: before `forget` first takes a journal's first events, it must be. */
|
|
1713
|
+
marked = false;
|
|
1704
1714
|
journalLines = 0;
|
|
1705
1715
|
journalBytes = 0;
|
|
1706
1716
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -1740,13 +1750,16 @@ var EventHub = class {
|
|
|
1740
1750
|
/** Loads the journal's last seq and the seen set; call before `sink` is attached. */
|
|
1741
1751
|
async open() {
|
|
1742
1752
|
try {
|
|
1753
|
+
const dropped = readDropped(this.journalPath + ".dropped");
|
|
1743
1754
|
if (existsSync(this.journalPath)) {
|
|
1744
|
-
const { seq, lines, size } = journalEnd(this.journalPath);
|
|
1755
|
+
const { seq, first, lines, size } = journalEnd(this.journalPath);
|
|
1745
1756
|
this.journalLines = lines;
|
|
1746
1757
|
this.journalBytes = size;
|
|
1747
1758
|
this.seq = seq;
|
|
1759
|
+
this.dropped = dropped ?? (first === void 0 ? seq : first - 1);
|
|
1760
|
+
this.marked = dropped !== void 0;
|
|
1748
1761
|
if (size > 33554432 || lines > 2e4) this.trimJournal();
|
|
1749
|
-
}
|
|
1762
|
+
} else if (dropped !== void 0) rmSync(this.journalPath + ".dropped", { force: true });
|
|
1750
1763
|
} catch (error) {
|
|
1751
1764
|
process.stderr.write(`ghostly: the event journal could not be read, a new one begins: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1752
1765
|
try {
|
|
@@ -1754,6 +1767,7 @@ var EventHub = class {
|
|
|
1754
1767
|
} catch {}
|
|
1755
1768
|
this.journalLines = 0;
|
|
1756
1769
|
this.journalBytes = 0;
|
|
1770
|
+
this.markDropped(this.seq);
|
|
1757
1771
|
}
|
|
1758
1772
|
this.db = await new Promise((resolve, reject) => {
|
|
1759
1773
|
const request = indexedDB.open(this.seenDb, 1);
|
|
@@ -1874,7 +1888,10 @@ var EventHub = class {
|
|
|
1874
1888
|
this.appListeners.add(listener);
|
|
1875
1889
|
return () => this.appListeners.delete(listener);
|
|
1876
1890
|
}
|
|
1877
|
-
/**
|
|
1891
|
+
/**
|
|
1892
|
+
* Events after `since` still in the journal; a gap event first when older ones were dropped (`dropped`). The events of
|
|
1893
|
+
* what the person removed (`forget`) are no gap: they are not here on purpose.
|
|
1894
|
+
*/
|
|
1878
1895
|
replay(since) {
|
|
1879
1896
|
if (!existsSync(this.journalPath) || since >= this.seq) return [];
|
|
1880
1897
|
const out = [];
|
|
@@ -1882,16 +1899,29 @@ var EventHub = class {
|
|
|
1882
1899
|
const event = JSON.parse(line);
|
|
1883
1900
|
if (event.seq > since) out.push(event);
|
|
1884
1901
|
} catch {}
|
|
1885
|
-
if (out.length && out[0].seq > since + 1) out.unshift({
|
|
1902
|
+
if (out.length && out[0].seq > since + 1 && since < this.dropped) out.unshift({
|
|
1886
1903
|
seq: since,
|
|
1887
1904
|
id: `events.gap:${since}:${out[0].seq}`,
|
|
1888
1905
|
type: "events.gap",
|
|
1889
1906
|
at: this.now(),
|
|
1890
1907
|
from: since + 1,
|
|
1891
|
-
to: out[0].seq - 1
|
|
1908
|
+
to: Math.min(this.dropped, out[0].seq - 1)
|
|
1892
1909
|
});
|
|
1893
1910
|
return out;
|
|
1894
1911
|
}
|
|
1912
|
+
/**
|
|
1913
|
+
* Notes that the journal no longer holds the events up to `seq`. Written before the journal is: a stop in between
|
|
1914
|
+
* leaves the mark ahead of the journal (a gap said where none was), never behind it (a gap not said).
|
|
1915
|
+
*/
|
|
1916
|
+
markDropped(seq) {
|
|
1917
|
+
this.dropped = seq;
|
|
1918
|
+
try {
|
|
1919
|
+
writeFileSync(this.journalPath + ".dropped", String(seq), { mode: 384 });
|
|
1920
|
+
this.marked = true;
|
|
1921
|
+
} catch (error) {
|
|
1922
|
+
process.stderr.write(`ghostly: event journal error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1895
1925
|
get lastSeq() {
|
|
1896
1926
|
return this.seq;
|
|
1897
1927
|
}
|
|
@@ -1943,6 +1973,8 @@ var EventHub = class {
|
|
|
1943
1973
|
let start = lines.length, bytes = 0;
|
|
1944
1974
|
while (start > 0 && bytes + Buffer.byteLength(lines[start - 1]) + 1 <= 16777216) bytes += Buffer.byteLength(lines[--start]) + 1;
|
|
1945
1975
|
const kept = lines.slice(start);
|
|
1976
|
+
const first = firstSeq(kept);
|
|
1977
|
+
this.markDropped(Math.max(this.dropped, first === void 0 ? this.seq : first - 1));
|
|
1946
1978
|
writeFileSync(this.journalPath + ".tmp", kept.length ? kept.join("\n") + "\n" : "", { mode: 384 });
|
|
1947
1979
|
renameSync(this.journalPath + ".tmp", this.journalPath);
|
|
1948
1980
|
this.journalLines = kept.length;
|
|
@@ -1991,6 +2023,7 @@ var EventHub = class {
|
|
|
1991
2023
|
return [JSON.stringify(written)];
|
|
1992
2024
|
});
|
|
1993
2025
|
if (!changed) return;
|
|
2026
|
+
if (!this.marked) this.markDropped(this.dropped);
|
|
1994
2027
|
const tail = kept.length ? kept.join("\n") + "\n" : "";
|
|
1995
2028
|
writeFileSync(this.journalPath + ".tmp", Buffer.concat([bytes.subarray(start, from), Buffer.from(tail)]), { mode: 384 });
|
|
1996
2029
|
renameSync(this.journalPath + ".tmp", this.journalPath);
|
|
@@ -2342,7 +2375,7 @@ var EventHub = class {
|
|
|
2342
2375
|
message: json()
|
|
2343
2376
|
});
|
|
2344
2377
|
} else {
|
|
2345
|
-
const notice = JOIN_NOTICE.exec(message.text);
|
|
2378
|
+
const notice = message.sender === "me" || message.joinLine ? JOIN_NOTICE.exec(message.text) : null;
|
|
2346
2379
|
const type = notice ? message.sender === "peer" ? "chat.joined" : "chat.announced" : message.sender === "peer" ? "message.received" : "message.sent";
|
|
2347
2380
|
this.emit(type, `${type}:${chat}:${message.id}`, {
|
|
2348
2381
|
chat,
|
|
@@ -2606,6 +2639,13 @@ function journalEnd(path) {
|
|
|
2606
2639
|
if (stop > from) lines++;
|
|
2607
2640
|
from = stop + 1;
|
|
2608
2641
|
}
|
|
2642
|
+
let first;
|
|
2643
|
+
for (let from = start; from < bytes.length && first === void 0;) {
|
|
2644
|
+
const end = bytes.indexOf(10, from);
|
|
2645
|
+
const stop = end === -1 ? bytes.length : end;
|
|
2646
|
+
if (stop > from) first = firstSeq([bytes.toString("utf8", from, stop)]);
|
|
2647
|
+
from = stop + 1;
|
|
2648
|
+
}
|
|
2609
2649
|
let seq = 0;
|
|
2610
2650
|
for (let stop = bytes.length; stop > start;) {
|
|
2611
2651
|
const from = Math.max(start, bytes.lastIndexOf(10, stop - 1) + 1);
|
|
@@ -2617,10 +2657,27 @@ function journalEnd(path) {
|
|
|
2617
2657
|
}
|
|
2618
2658
|
return {
|
|
2619
2659
|
seq,
|
|
2660
|
+
first,
|
|
2620
2661
|
lines,
|
|
2621
2662
|
size
|
|
2622
2663
|
};
|
|
2623
2664
|
}
|
|
2665
|
+
/** The seq of the first of these lines that can be read. */
|
|
2666
|
+
function firstSeq(lines) {
|
|
2667
|
+
for (const line of lines) try {
|
|
2668
|
+
const { seq } = JSON.parse(line);
|
|
2669
|
+
if (typeof seq === "number") return seq;
|
|
2670
|
+
} catch {}
|
|
2671
|
+
}
|
|
2672
|
+
/** The journal's dropped mark (`EventHub.dropped`), or undefined when there is none (a journal from before it). */
|
|
2673
|
+
function readDropped(path) {
|
|
2674
|
+
try {
|
|
2675
|
+
const seq = Number(readFileSync(path, "utf8").trim());
|
|
2676
|
+
return Number.isSafeInteger(seq) && seq >= 0 ? seq : void 0;
|
|
2677
|
+
} catch {
|
|
2678
|
+
return;
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2624
2681
|
/** The bytes of the journal's last `JOURNAL_MAX_BYTES`, `start` where its first whole line begins in them, and its size. */
|
|
2625
2682
|
function journalWindow(path) {
|
|
2626
2683
|
const fd = openSync(path, "r");
|
|
@@ -4936,7 +4993,7 @@ async function startRuntime(paths, options = {}) {
|
|
|
4936
4993
|
const restored = join(paths.dir, RESTORED_MARK);
|
|
4937
4994
|
if (existsSync(restored)) {
|
|
4938
4995
|
try {
|
|
4939
|
-
const rows = await import("./restoredRows-
|
|
4996
|
+
const rows = await import("./restoredRows-CRYwIx3g.js");
|
|
4940
4997
|
await rows.markRestoredWallet();
|
|
4941
4998
|
await rows.markLeftOutFiles(leftOutIn(restored));
|
|
4942
4999
|
await rows.forgetRatchets();
|
|
@@ -4956,15 +5013,15 @@ async function startRuntime(paths, options = {}) {
|
|
|
4956
5013
|
await installEventSource();
|
|
4957
5014
|
await preloadWalletModules();
|
|
4958
5015
|
(await import("./ghostly_iroh_web-BzAXJUYH.js")).initSync({ module: irohWasmBytes() });
|
|
4959
|
-
const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-
|
|
5016
|
+
const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-DMzrIdCu.js"), import("./fileBytes-Douk1yOp.js")]);
|
|
4960
5017
|
registerFileBytes("native", async () => new NodeFileBytes(paths.files), true);
|
|
4961
|
-
if (await (await import("./blobFiles-
|
|
4962
|
-
const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-
|
|
4963
|
-
const mainline = dht.off ? null : new (await (import("./mainline-
|
|
5018
|
+
if (await (await import("./blobFiles-BnjN_Vrz.js")).moveBlobFiles()) await store.compact();
|
|
5019
|
+
const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-BZnsm5X5.js"), import("./endpoint-DWHkXWVM.js")]);
|
|
5020
|
+
const mainline = dht.off ? null : new (await (import("./mainline-DOwZDHVy.js"))).Mainline({
|
|
4964
5021
|
bootstrap: dht.bootstrap,
|
|
4965
5022
|
host: dht.host
|
|
4966
5023
|
});
|
|
4967
|
-
const transport = mainline || pinned ? new (await (import("./mainline-
|
|
5024
|
+
const transport = mainline || pinned ? new (await (import("./mainline-DOwZDHVy.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
|
|
4968
5025
|
const apps = servedApps(paths.dir).length > 0;
|
|
4969
5026
|
const server = new EngineServer({
|
|
4970
5027
|
...transport ? { transport } : {},
|
|
@@ -5011,8 +5068,6 @@ async function startRuntime(paths, options = {}) {
|
|
|
5011
5068
|
}
|
|
5012
5069
|
//#endregion
|
|
5013
5070
|
//#region src/host.ts
|
|
5014
|
-
/** The longest request line the daemon reads (WISP 1100 § Framing). */
|
|
5015
|
-
var MAX_LINE = 16777216;
|
|
5016
5071
|
/**
|
|
5017
5072
|
* The most a connection may leave unread (answers and events the daemon wrote that its client has not taken): past
|
|
5018
5073
|
* it, the connection ends. A `listen` stopped with Ctrl+Z, or a client that stops reading, kept every later event in
|
|
@@ -5032,6 +5087,7 @@ var BASELINE_NEWEST = 100;
|
|
|
5032
5087
|
* `deferGroups`: the groups' sessions would spend the relays' budget its message needs.
|
|
5033
5088
|
*/
|
|
5034
5089
|
async function openHost(paths, mode, version, options = {}) {
|
|
5090
|
+
ownProfile(paths.dir);
|
|
5035
5091
|
const locked = acquireLock(paths);
|
|
5036
5092
|
const unmark = mode === "daemon" ? markStarting(paths) : () => {};
|
|
5037
5093
|
const release = () => {
|
|
@@ -5322,6 +5378,6 @@ function connection(ctx, socket, secret) {
|
|
|
5322
5378
|
});
|
|
5323
5379
|
}
|
|
5324
5380
|
//#endregion
|
|
5325
|
-
export { BASELINE_NEWEST,
|
|
5381
|
+
export { BASELINE_NEWEST, MAX_UNREAD, keepServing, openHost, serve };
|
|
5326
5382
|
|
|
5327
|
-
//# sourceMappingURL=host-
|
|
5383
|
+
//# sourceMappingURL=host-DvcVt5YI.js.map
|