@ghostlytools/cli 1.3.9 → 1.4.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 +13 -4
- package/SKILL.md +7 -4
- package/dist/assets/{api-Cp9GxjUO.js → api-BqLfti32.js} +2 -2
- package/dist/assets/{api-BCrwJ57L.js → api-JMkEO0RR.js} +130 -50
- package/dist/assets/api-JMkEO0RR.js.map +1 -0
- package/dist/assets/{apiKit-B4qhnLQT.js → apiKit-BpIUCwa-.js} +3 -3
- package/dist/assets/{apiKit-B4qhnLQT.js.map → apiKit-BpIUCwa-.js.map} +1 -1
- package/dist/assets/{apps-CpxENMgl.js → apps-BdfyGVZ1.js} +1 -1
- package/dist/assets/{apps-DOH1P_S0.js → apps-Bettj7WQ.js} +6 -6
- package/dist/assets/apps-Bettj7WQ.js.map +1 -0
- package/dist/assets/{arkade-Cyf5MGxG.js → arkade-CP4HvKaa.js} +2 -2
- package/dist/assets/{arkade-Cyf5MGxG.js.map → arkade-CP4HvKaa.js.map} +1 -1
- package/dist/assets/{backup-CqM-0-2v.js → backup-BbO2zLjx.js} +1 -1
- package/dist/assets/{backup-CTpFFQ-4.js → backup-BmBtta66.js} +7 -7
- package/dist/assets/{backup-CTpFFQ-4.js.map → backup-BmBtta66.js.map} +1 -1
- package/dist/assets/blobFiles-B0rNnHlO.js +35 -0
- package/dist/assets/blobFiles-B0rNnHlO.js.map +1 -0
- package/dist/assets/{buttons-BtxwyM2l.js → buttons-YgijrprJ.js} +4 -4
- package/dist/assets/{buttons-BtxwyM2l.js.map → buttons-YgijrprJ.js.map} +1 -1
- package/dist/assets/buttons-_GBlxAti.js +2 -0
- package/dist/assets/{endpoint-BOTFMpfS.js → endpoint-Cl3cgAYl.js} +3 -2
- package/dist/assets/endpoint-Cl3cgAYl.js.map +1 -0
- package/dist/assets/{envelope-DW8TWKPD.js → envelope-C7vnmsJN.js} +2 -2
- package/dist/assets/{envelope-DW8TWKPD.js.map → envelope-C7vnmsJN.js.map} +1 -1
- package/dist/assets/{errors-B-zMxbcd.js → errors-BLSPp0tK.js} +3 -1
- package/dist/assets/errors-BLSPp0tK.js.map +1 -0
- package/dist/assets/{fileBytes-Di7VZtmU.js → fileBytes-B-fqGdEd.js} +3 -3
- package/dist/assets/{fileBytes-Di7VZtmU.js.map → fileBytes-B-fqGdEd.js.map} +1 -1
- package/dist/assets/{fileBytes-CgbibpbV.js → fileBytes-C2jycN_7.js} +1 -1
- package/dist/assets/{fileBytes-CfSXjTFa.js → fileBytes-D6fqFQEX.js} +6 -3
- package/dist/assets/fileBytes-D6fqFQEX.js.map +1 -0
- package/dist/assets/fileBytesIdb-DOxm_BKt.js +2 -0
- package/dist/assets/{fileBytesIdb-D5u6H8X_.js → fileBytesIdb-_HnxdacI.js} +3 -3
- package/dist/assets/{fileBytesIdb-D5u6H8X_.js.map → fileBytesIdb-_HnxdacI.js.map} +1 -1
- package/dist/assets/{fileBytesOpfs-Dd1N4ERH.js → fileBytesOpfs-p_CANncD.js} +3 -3
- package/dist/assets/{fileBytesOpfs-Dd1N4ERH.js.map → fileBytesOpfs-p_CANncD.js.map} +1 -1
- package/dist/assets/{groupFiles-uxa0U9_n.js → groupFiles-sIdGq4AV.js} +5 -5
- package/dist/assets/groupFiles-sIdGq4AV.js.map +1 -0
- package/dist/assets/{host-DPy0eaH9.js → host-Drd-c4VO.js} +147 -25
- package/dist/assets/host-Drd-c4VO.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-De5FT7Am.js → hyperdhtRelay-13aQ4KOf.js} +2 -2
- package/dist/assets/{hyperdhtRelay-De5FT7Am.js.map → hyperdhtRelay-13aQ4KOf.js.map} +1 -1
- package/dist/assets/{idb-B5L8wuOm.js → idb-CMVgtn2k.js} +59 -6
- package/dist/assets/idb-CMVgtn2k.js.map +1 -0
- package/dist/assets/{irohWeb-z5QDDWa-.js → irohWeb-DHCxSvHF.js} +2 -2
- package/dist/assets/{irohWeb-z5QDDWa-.js.map → irohWeb-DHCxSvHF.js.map} +1 -1
- package/dist/assets/{main-Dt7xrqtb.js → main-BWAwKY4f.js} +476 -141
- package/dist/assets/main-BWAwKY4f.js.map +1 -0
- package/dist/assets/{mainline-Cld-bKeC.js → mainline-CsG-DdJ5.js} +2 -2
- package/dist/assets/{mainline-Cld-bKeC.js.map → mainline-CsG-DdJ5.js.map} +1 -1
- package/dist/assets/{networkReason-vUHo6A_C.js → networkReason-B91upMCb.js} +3 -3
- package/dist/assets/{networkReason-vUHo6A_C.js.map → networkReason-B91upMCb.js.map} +1 -1
- package/dist/assets/{nwc-zXpmd2FN.js → nwc-BFv67iSz.js} +3 -3
- package/dist/assets/{nwc-zXpmd2FN.js.map → nwc-BFv67iSz.js.map} +1 -1
- package/dist/assets/{nwcProvider-D482SQ1a.js → nwcProvider-BKNFdH9v.js} +2 -2
- package/dist/assets/{nwcProvider-D482SQ1a.js.map → nwcProvider-BKNFdH9v.js.map} +1 -1
- package/dist/assets/{profiles-gPCjLOQq.js → profiles-DSxPYdlU.js} +13 -3
- package/dist/assets/profiles-DSxPYdlU.js.map +1 -0
- package/dist/assets/{registry-CxsDR3c6.js → registry-CHPd_hf7.js} +1 -1
- package/dist/assets/{registry-OVx2kY3d.js → registry-qbnWmwCE.js} +3 -3
- package/dist/assets/registry-qbnWmwCE.js.map +1 -0
- package/dist/assets/{resolve-CPTAnu-9.js → resolve-B63_uSu7.js} +2 -2
- package/dist/assets/{resolve-CPTAnu-9.js.map → resolve-B63_uSu7.js.map} +1 -1
- package/dist/assets/{restoredRows-Db3oUTko.js → restoredRows-DeBImGRd.js} +2 -2
- package/dist/assets/{restoredRows-Db3oUTko.js.map → restoredRows-DeBImGRd.js.map} +1 -1
- package/dist/assets/{server-p5DJnN7T.js → server-Cd1dLOB8.js} +1485 -240
- package/dist/assets/server-Cd1dLOB8.js.map +1 -0
- package/dist/assets/{src-Dg1bvMNv.js → src-DzXL-GYu.js} +7277 -5975
- package/dist/assets/src-DzXL-GYu.js.map +1 -0
- package/dist/assets/turnRefs-BCtM10d3.js +357 -0
- package/dist/assets/turnRefs-BCtM10d3.js.map +1 -0
- package/dist/assets/{usdt-BY5OIIvG.js → usdt-B7JWDhQV.js} +3 -3
- package/dist/assets/{usdt-BY5OIIvG.js.map → usdt-B7JWDhQV.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/package.json +7 -6
- package/skills/ghostly/README.md +41 -0
- package/skills/ghostly/SKILL.md +79 -0
- package/skills/ghostly/scripts/listen +67 -0
- package/skills/ghostly/scripts/react +25 -0
- package/skills/ghostly/scripts/say +44 -0
- package/skills/ghostly/scripts/status +27 -0
- package/dist/assets/api-BCrwJ57L.js.map +0 -1
- package/dist/assets/apps-DOH1P_S0.js.map +0 -1
- package/dist/assets/buttons-CJqNkG-Q.js +0 -2
- package/dist/assets/endpoint-BOTFMpfS.js.map +0 -1
- package/dist/assets/errors-B-zMxbcd.js.map +0 -1
- package/dist/assets/fileBytes-CfSXjTFa.js.map +0 -1
- package/dist/assets/fileBytesIdb-CFP-DSkZ.js +0 -2
- package/dist/assets/groupFiles-uxa0U9_n.js.map +0 -1
- package/dist/assets/host-DPy0eaH9.js.map +0 -1
- package/dist/assets/idb-B5L8wuOm.js.map +0 -1
- package/dist/assets/main-Dt7xrqtb.js.map +0 -1
- package/dist/assets/profiles-gPCjLOQq.js.map +0 -1
- package/dist/assets/registry-OVx2kY3d.js.map +0 -1
- package/dist/assets/server-p5DJnN7T.js.map +0 -1
- package/dist/assets/src-Dg1bvMNv.js.map +0 -1
- package/dist/assets/turnRefs-WnggXm2T.js +0 -323
- package/dist/assets/turnRefs-WnggXm2T.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-
|
|
3
|
-
import { r as asCliError, t as CliError } from "./errors-
|
|
4
|
-
import { a 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 { n as RESTORED_MARK, r as acquireLock } from "./profiles-
|
|
1
|
+
import { Ao as signalHasVideo, Co as RTC_CONFIG, Do as callSignalHeardAt, Eo as callRtcConfig, Oo as extractParamsFromSdp, So as CALL_SIGNAL_MAX_AGE_MS, To as buildSdpFromSignal, Xr as checkPushEndpoint, Zl as fromBase64Url, bi as isPublicAddress, jl as setLinkTraceSink, ko as parseCallSignal, wo as answersOffer } from "./src-DzXL-GYu.js";
|
|
2
|
+
import { a as fedimintSdkOn, r as irohRelayProblem } from "./irohWeb-DHCxSvHF.js";
|
|
3
|
+
import { r as asCliError, t as CliError } from "./errors-BLSPp0tK.js";
|
|
4
|
+
import { a as findChat } from "./apiKit-BpIUCwa-.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-JMkEO0RR.js";
|
|
6
|
+
import { n as RESTORED_MARK, r as acquireLock } from "./profiles-DSxPYdlU.js";
|
|
7
7
|
import { i as proof, l as privateFolder, n as newDaemonSecret, s as ownFolder } from "./daemonProof-B53VnZ1Z.js";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { appendFileSync, chmodSync, closeSync, existsSync, fstatSync, fsyncSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
|
|
@@ -313,7 +313,7 @@ var RtpWriter = class {
|
|
|
313
313
|
return Buffer.concat([header, payload]);
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
/** The most
|
|
316
|
+
/** The most frames a gap in the packets becomes (concealed by the decoder, see CallAudio). */
|
|
317
317
|
var MAX_LOST_FRAMES = 3;
|
|
318
318
|
/** Sequence numbers compared across the 16-bit wrap: positive when `a` comes after `b`. */
|
|
319
319
|
function sequenceDelta(a, b) {
|
|
@@ -322,7 +322,7 @@ function sequenceDelta(a, b) {
|
|
|
322
322
|
}
|
|
323
323
|
/**
|
|
324
324
|
* Puts packets back in order, holding at most `depth` of them for one that is late: a lost packet costs one frame
|
|
325
|
-
*
|
|
325
|
+
* the decoder conceals (40 ms of waiting at most), a duplicate or a packet that came too late is dropped, and a new stream (its
|
|
326
326
|
* SSRC changed, or its sequence jumped) starts over.
|
|
327
327
|
*/
|
|
328
328
|
var ReorderBuffer = class {
|
|
@@ -380,6 +380,8 @@ var CallAudio = class {
|
|
|
380
380
|
samples;
|
|
381
381
|
silence;
|
|
382
382
|
pending = Buffer.alloc(0);
|
|
383
|
+
/** What the decoder concealed for the current gap and is not handed on yet (see `conceal`). */
|
|
384
|
+
concealed = null;
|
|
383
385
|
timer = null;
|
|
384
386
|
startedAt = 0;
|
|
385
387
|
ticks = 0;
|
|
@@ -474,15 +476,34 @@ var CallAudio = class {
|
|
|
474
476
|
if (!rtp || rtp.payloadType !== this.options.payloadType) return;
|
|
475
477
|
for (const item of this.reorder.push(rtp)) {
|
|
476
478
|
let pcm;
|
|
477
|
-
if ("lost" in item) pcm = this.
|
|
478
|
-
else
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
479
|
+
if ("lost" in item) pcm = this.conceal();
|
|
480
|
+
else {
|
|
481
|
+
this.concealed = null;
|
|
482
|
+
try {
|
|
483
|
+
pcm = this.options.decoder.decode(item.payload);
|
|
484
|
+
} catch {
|
|
485
|
+
pcm = this.silence;
|
|
486
|
+
}
|
|
482
487
|
}
|
|
483
488
|
this.emit(pcm);
|
|
484
489
|
}
|
|
485
490
|
}
|
|
491
|
+
/**
|
|
492
|
+
* A frame for one that never came: the decoder's loss concealment (libopus PLC, what an empty packet decodes to), as
|
|
493
|
+
* the apps' WebRTC stacks do, not a frame of silence (a click). opusscript conceals 60 ms at a time (its largest
|
|
494
|
+
* frame), so one run of it serves the frames of a gap in turn (ReorderBuffer gives MAX_LOST_FRAMES at most).
|
|
495
|
+
*/
|
|
496
|
+
conceal() {
|
|
497
|
+
if (!this.concealed || this.concealed.length < this.frame) try {
|
|
498
|
+
this.concealed = Buffer.from(this.options.decoder.decode(Buffer.alloc(0)));
|
|
499
|
+
} catch {
|
|
500
|
+
this.concealed = null;
|
|
501
|
+
}
|
|
502
|
+
if (!this.concealed || this.concealed.length < this.frame) return this.silence;
|
|
503
|
+
const pcm = this.concealed.subarray(0, this.frame);
|
|
504
|
+
this.concealed = this.concealed.subarray(this.frame);
|
|
505
|
+
return pcm;
|
|
506
|
+
}
|
|
486
507
|
/** Hands decoded audio on in 20 ms frames, whatever the contact's packet length (10, 20, 40 or 60 ms). */
|
|
487
508
|
emit(pcm) {
|
|
488
509
|
let data = this.pending.length ? Buffer.concat([this.pending, pcm]) : pcm;
|
|
@@ -3397,6 +3418,7 @@ async function openPersistentIndexedDb(dir, options = {}) {
|
|
|
3397
3418
|
const classes = await probeClasses(factory);
|
|
3398
3419
|
dropIndexEntriesByRecord(classes, (a, b) => factory.cmp(a, b));
|
|
3399
3420
|
readWithoutCopy(classes);
|
|
3421
|
+
startInOnePass(classes);
|
|
3400
3422
|
const order = keyOrder((a, b) => factory.cmp(a, b));
|
|
3401
3423
|
const rowsPath = join(dir, ROWS);
|
|
3402
3424
|
const rowsFound = existsSync(rowsPath);
|
|
@@ -3568,11 +3590,7 @@ async function openPersistentIndexedDb(dir, options = {}) {
|
|
|
3568
3590
|
trees?.abort(this._rollbackLog);
|
|
3569
3591
|
}
|
|
3570
3592
|
const dispatched = dispatch.call(this, event);
|
|
3571
|
-
if ((event.type === "complete" || event.type === "abort") && this._state === "finished")
|
|
3572
|
-
const list = this.db._rawDatabase.transactions;
|
|
3573
|
-
const at = list.indexOf(this);
|
|
3574
|
-
if (at >= 0) list.splice(at, 1);
|
|
3575
|
-
}
|
|
3593
|
+
if ((event.type === "complete" || event.type === "abort") && this._state === "finished") dropEnded(this.db._rawDatabase, this);
|
|
3576
3594
|
return dispatched;
|
|
3577
3595
|
};
|
|
3578
3596
|
const deleteDatabase = factory.deleteDatabase.bind(factory);
|
|
@@ -3918,6 +3936,7 @@ async function probeClasses(factory) {
|
|
|
3918
3936
|
ObjectStore: rawStore.constructor,
|
|
3919
3937
|
Index: rawStore.rawIndexes.get("i").constructor,
|
|
3920
3938
|
RecordStore: rawStore.records.constructor,
|
|
3939
|
+
Connection: db.constructor,
|
|
3921
3940
|
constraintError: Error
|
|
3922
3941
|
};
|
|
3923
3942
|
const probe = new classes.RecordStore(true);
|
|
@@ -4029,6 +4048,107 @@ function readWithoutCopy(classes) {
|
|
|
4029
4048
|
return values;
|
|
4030
4049
|
};
|
|
4031
4050
|
}
|
|
4051
|
+
/** Transactions whose last event is out, by database, and dropped from its list at the next turn: all at once. */
|
|
4052
|
+
var ended = /* @__PURE__ */ new WeakMap();
|
|
4053
|
+
/** A finished transaction's place in its database's list, given back: one walk of the list for all that ended in a turn. */
|
|
4054
|
+
function dropEnded(db, transaction) {
|
|
4055
|
+
let gone = ended.get(db);
|
|
4056
|
+
if (gone) {
|
|
4057
|
+
gone.add(transaction);
|
|
4058
|
+
return;
|
|
4059
|
+
}
|
|
4060
|
+
ended.set(db, gone = /* @__PURE__ */ new Set([transaction]));
|
|
4061
|
+
setImmediate(() => {
|
|
4062
|
+
ended.delete(db);
|
|
4063
|
+
const list = db.transactions;
|
|
4064
|
+
let kept = 0;
|
|
4065
|
+
for (const held of list) if (!gone.has(held)) list[kept++] = held;
|
|
4066
|
+
list.length = kept;
|
|
4067
|
+
});
|
|
4068
|
+
}
|
|
4069
|
+
/** The classes whose scheduler starts every transaction it can in one pass: shared by every store opened. */
|
|
4070
|
+
var onePass = /* @__PURE__ */ new WeakSet();
|
|
4071
|
+
/**
|
|
4072
|
+
* fake-indexeddb's scheduler runs at every transaction's start and end, checks each waiting transaction against every
|
|
4073
|
+
* running one and every one waiting before it, and starts one per pass; and each transaction made looks through every
|
|
4074
|
+
* other one for an upgrade running. A burst of reads (a look at each queued text) cost the square of their number, the
|
|
4075
|
+
* cube with a write waiting among them, and held the event loop all along (2,000 reads around a write: 19 s).
|
|
4076
|
+
*
|
|
4077
|
+
* A pass here walks the transactions once, in order, and starts each one that may run: a write once no running
|
|
4078
|
+
* transaction shares a store with it, a read once no running write does, neither behind a waiting one that shares a
|
|
4079
|
+
* store with it (the order IndexedDB keeps). The passes asked for before one runs are that one, and a transaction's end
|
|
4080
|
+
* asks for none while nothing waits. A transaction made while no upgrade of its database runs skips the look for one.
|
|
4081
|
+
* Databases made before this (the probe's) keep fake-indexeddb's scheduler: each binds the one it is made with.
|
|
4082
|
+
*/
|
|
4083
|
+
function startInOnePass(classes) {
|
|
4084
|
+
const proto = classes.Database.prototype;
|
|
4085
|
+
if (onePass.has(proto)) return;
|
|
4086
|
+
onePass.add(proto);
|
|
4087
|
+
const scheduling = /* @__PURE__ */ new WeakMap();
|
|
4088
|
+
proto.processTransactions = function(event) {
|
|
4089
|
+
let state = scheduling.get(this);
|
|
4090
|
+
if (!state) scheduling.set(this, state = {
|
|
4091
|
+
asked: false,
|
|
4092
|
+
blocked: 0
|
|
4093
|
+
});
|
|
4094
|
+
if (state.asked || event !== void 0 && !state.blocked) return;
|
|
4095
|
+
state.asked = true;
|
|
4096
|
+
setImmediate(() => {
|
|
4097
|
+
state.asked = false;
|
|
4098
|
+
startRunnable(this, state);
|
|
4099
|
+
});
|
|
4100
|
+
};
|
|
4101
|
+
const connection = classes.Connection.prototype;
|
|
4102
|
+
const { transaction } = connection;
|
|
4103
|
+
const upgrades = /* @__PURE__ */ new WeakMap();
|
|
4104
|
+
connection.transaction = function(names, mode, options) {
|
|
4105
|
+
const raw = this._rawDatabase;
|
|
4106
|
+
if (mode === "versionchange") {
|
|
4107
|
+
const made = transaction.call(this, names, mode, options);
|
|
4108
|
+
upgrades.set(raw, (upgrades.get(raw) ?? 0) + 1);
|
|
4109
|
+
const done = () => {
|
|
4110
|
+
upgrades.set(raw, upgrades.get(raw) - 1);
|
|
4111
|
+
};
|
|
4112
|
+
made.addEventListener("complete", done);
|
|
4113
|
+
made.addEventListener("abort", done);
|
|
4114
|
+
return made;
|
|
4115
|
+
}
|
|
4116
|
+
if (upgrades.get(raw)) return transaction.call(this, names, mode, options);
|
|
4117
|
+
const list = raw.transactions;
|
|
4118
|
+
raw.transactions = [];
|
|
4119
|
+
try {
|
|
4120
|
+
return transaction.call(this, names, mode, options);
|
|
4121
|
+
} finally {
|
|
4122
|
+
list.push(...raw.transactions);
|
|
4123
|
+
raw.transactions = list;
|
|
4124
|
+
}
|
|
4125
|
+
};
|
|
4126
|
+
}
|
|
4127
|
+
function startRunnable(db, state) {
|
|
4128
|
+
state.blocked = 0;
|
|
4129
|
+
const writing = /* @__PURE__ */ new Set(), reading = /* @__PURE__ */ new Set(), blocked = /* @__PURE__ */ new Set();
|
|
4130
|
+
const holds = (scope, stores) => {
|
|
4131
|
+
for (const store of scope) if (stores.has(store)) return true;
|
|
4132
|
+
return false;
|
|
4133
|
+
};
|
|
4134
|
+
const take = (transaction) => {
|
|
4135
|
+
for (const store of transaction._scope) (transaction.mode === "readonly" ? reading : writing).add(store);
|
|
4136
|
+
};
|
|
4137
|
+
const list = db.transactions.filter((transaction) => transaction._state !== "finished");
|
|
4138
|
+
for (const transaction of list) if (transaction._started) take(transaction);
|
|
4139
|
+
for (const transaction of list) {
|
|
4140
|
+
if (transaction._started || transaction._state === "finished") continue;
|
|
4141
|
+
if (!(!holds(transaction._scope, blocked) && !holds(transaction._scope, writing) && (transaction.mode === "readonly" || !holds(transaction._scope, reading)))) {
|
|
4142
|
+
for (const store of transaction._scope) blocked.add(store);
|
|
4143
|
+
state.blocked++;
|
|
4144
|
+
continue;
|
|
4145
|
+
}
|
|
4146
|
+
take(transaction);
|
|
4147
|
+
transaction.addEventListener("complete", db.processTransactions);
|
|
4148
|
+
transaction.addEventListener("abort", db.processTransactions);
|
|
4149
|
+
transaction._start();
|
|
4150
|
+
}
|
|
4151
|
+
}
|
|
4032
4152
|
/** Drops from an index the entries of records that left its store, and gives back the ones it dropped. */
|
|
4033
4153
|
function dropEntries(index, records, cmp) {
|
|
4034
4154
|
const dropped = [];
|
|
@@ -4580,7 +4700,7 @@ async function startRuntime(paths, options = {}) {
|
|
|
4580
4700
|
const restored = join(paths.dir, RESTORED_MARK);
|
|
4581
4701
|
if (existsSync(restored)) {
|
|
4582
4702
|
try {
|
|
4583
|
-
const rows = await import("./restoredRows-
|
|
4703
|
+
const rows = await import("./restoredRows-DeBImGRd.js");
|
|
4584
4704
|
await rows.markRestoredWallet();
|
|
4585
4705
|
await rows.markLeftOutFiles(leftOutIn(restored));
|
|
4586
4706
|
await store.compact();
|
|
@@ -4599,16 +4719,17 @@ async function startRuntime(paths, options = {}) {
|
|
|
4599
4719
|
await installEventSource();
|
|
4600
4720
|
await preloadWalletModules();
|
|
4601
4721
|
(await import("./ghostly_iroh_web-BsAEFIjl.js")).initSync({ module: irohWasmBytes() });
|
|
4602
|
-
const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-
|
|
4722
|
+
const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-C2jycN_7.js"), import("./fileBytes-D6fqFQEX.js")]);
|
|
4603
4723
|
registerFileBytes("native", async () => new NodeFileBytes(paths.files), true);
|
|
4604
|
-
|
|
4724
|
+
if (await (await import("./blobFiles-B0rNnHlO.js")).moveBlobFiles()) await store.compact();
|
|
4725
|
+
const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-Cd1dLOB8.js"), import("./endpoint-Cl3cgAYl.js")]);
|
|
4605
4726
|
const network = hyperdhtNetwork();
|
|
4606
4727
|
const dht = mainlineNetwork();
|
|
4607
|
-
const mainline = dht.off ? null : new (await (import("./mainline-
|
|
4728
|
+
const mainline = dht.off ? null : new (await (import("./mainline-CsG-DdJ5.js"))).Mainline({
|
|
4608
4729
|
bootstrap: dht.bootstrap,
|
|
4609
4730
|
host: dht.host
|
|
4610
4731
|
});
|
|
4611
|
-
const transport = mainline || pinned ? new (await (import("./mainline-
|
|
4732
|
+
const transport = mainline || pinned ? new (await (import("./mainline-CsG-DdJ5.js"))).RelaysAndDht(mainline, pinned ? { relays: pinned } : {}, !!pinned) : null;
|
|
4612
4733
|
const apps = servedApps(paths.dir).length > 0;
|
|
4613
4734
|
const server = new EngineServer({
|
|
4614
4735
|
...transport ? { transport } : {},
|
|
@@ -4645,7 +4766,7 @@ async function startRuntime(paths, options = {}) {
|
|
|
4645
4766
|
callsUnavailable,
|
|
4646
4767
|
apps,
|
|
4647
4768
|
close: () => closing ??= (async () => {
|
|
4648
|
-
await server.node.shutdown().catch(() => {});
|
|
4769
|
+
await server.node.shutdown({ quitting: true }).catch(() => {});
|
|
4649
4770
|
await mainline?.destroy().catch(() => {});
|
|
4650
4771
|
await store.close();
|
|
4651
4772
|
})()
|
|
@@ -4849,6 +4970,7 @@ function connection(ctx, socket, secret) {
|
|
|
4849
4970
|
input: socket,
|
|
4850
4971
|
crlfDelay: Infinity
|
|
4851
4972
|
});
|
|
4973
|
+
lines.on("error", () => {});
|
|
4852
4974
|
let buffered = 0;
|
|
4853
4975
|
socket.on("data", (chunk) => {
|
|
4854
4976
|
buffered += chunk.length;
|
|
@@ -4945,4 +5067,4 @@ function connection(ctx, socket, secret) {
|
|
|
4945
5067
|
//#endregion
|
|
4946
5068
|
export { BASELINE_NEWEST, MAX_LINE, MAX_UNREAD, keepServing, openHost, serve };
|
|
4947
5069
|
|
|
4948
|
-
//# sourceMappingURL=host-
|
|
5070
|
+
//# sourceMappingURL=host-Drd-c4VO.js.map
|