@ghostlytools/cli 1.12.0 → 1.12.1
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 +5 -5
- package/dist/assets/{api-DLzCtePC.js → api-BwEgbvvK.js} +49 -23
- package/dist/assets/api-BwEgbvvK.js.map +1 -0
- package/dist/assets/{api-DYMKyb1k.js → api-jRUXnBdX.js} +2 -2
- package/dist/assets/{apiKit-CVaEzKWQ.js → apiKit-BlsNk-Cx.js} +2 -2
- package/dist/assets/{apiKit-CVaEzKWQ.js.map → apiKit-BlsNk-Cx.js.map} +1 -1
- package/dist/assets/{appFetch-D56GsYuq.js → appFetch-CW9fJPHh.js} +2 -2
- package/dist/assets/{appFetch-D56GsYuq.js.map → appFetch-CW9fJPHh.js.map} +1 -1
- package/dist/assets/{apps-BPFW19Wc.js → apps-BcG4u6SM.js} +1 -1
- package/dist/assets/{apps-XnZ8VEuj.js → apps-CL8TXHhu.js} +6 -6
- package/dist/assets/{apps-XnZ8VEuj.js.map → apps-CL8TXHhu.js.map} +1 -1
- package/dist/assets/{backup-DpyvT9Z6.js → backup-BA41EDvh.js} +47 -8
- package/dist/assets/backup-BA41EDvh.js.map +1 -0
- package/dist/assets/{backup-COX6j1_W.js → backup-xZfV-ytw.js} +1 -1
- package/dist/assets/{bitcoind-DTsrd7TF.js → bitcoind-Dh7n9amb.js} +2 -2
- package/dist/assets/{bitcoind-DTsrd7TF.js.map → bitcoind-Dh7n9amb.js.map} +1 -1
- package/dist/assets/buttons-CsGdQNnR.js +1 -0
- package/dist/assets/{buttons-BvWqHJeh.js → buttons-SH1tNRh7.js} +6 -6
- package/dist/assets/buttons-SH1tNRh7.js.map +1 -0
- package/dist/assets/{client-kGZ3ZdUW.js → client-DGS-atRu.js} +2 -2
- package/dist/assets/{client-kGZ3ZdUW.js.map → client-DGS-atRu.js.map} +1 -1
- package/dist/assets/{endpoint-B0vE5ojY.js → endpoint-Cvu-taMs.js} +42 -5
- package/dist/assets/{endpoint-B0vE5ojY.js.map → endpoint-Cvu-taMs.js.map} +1 -1
- package/dist/assets/{groupMeta-DTQAJG50.js → groupMeta-DxuJzko_.js} +49 -28
- package/dist/assets/groupMeta-DxuJzko_.js.map +1 -0
- package/dist/assets/{host-z0FAHP9Z.js → host-BxM-HMr0.js} +62 -9
- package/dist/assets/host-BxM-HMr0.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-CvsAfQRQ.js → hyperdhtRelay-DLUiwfnt.js} +32 -4
- package/dist/assets/hyperdhtRelay-DLUiwfnt.js.map +1 -0
- package/dist/assets/{irohWeb-CLBx5MIv.js → irohWeb-CbnGtUo6.js} +175 -6
- package/dist/assets/irohWeb-CbnGtUo6.js.map +1 -0
- package/dist/assets/{main-CVqkvuIo.js → main-CwTaepxR.js} +48 -31
- package/dist/assets/main-CwTaepxR.js.map +1 -0
- package/dist/assets/{ownStatus-DMEhrpkd.js → ownStatus-DtzIllg2.js} +4 -3
- package/dist/assets/ownStatus-DtzIllg2.js.map +1 -0
- package/dist/assets/{profiles-BFSGqDFC.js → profiles-BOYGlmu2.js} +2 -2
- package/dist/assets/{profiles-BFSGqDFC.js.map → profiles-BOYGlmu2.js.map} +1 -1
- package/dist/assets/{registry-B15Yg_1C.js → registry-4W1LGlCF.js} +1 -1
- package/dist/assets/{registry-rXgaZeNn.js → registry-Bep4umOM.js} +36 -28
- package/dist/assets/registry-Bep4umOM.js.map +1 -0
- package/dist/assets/secretGuard-Bm6nci0I.js +1 -0
- package/dist/assets/{secretGuard-B4-LlMjv.js → secretGuard-BrATm_gl.js} +33 -9
- package/dist/assets/{secretGuard-B4-LlMjv.js.map → secretGuard-BrATm_gl.js.map} +1 -1
- package/dist/assets/{server-CQR7NLCz.js → server-D4gf-LnD.js} +257 -43
- package/dist/assets/server-D4gf-LnD.js.map +1 -0
- package/dist/assets/{waitNotice-BGM0QOS2.js → waitNotice-DQvZgz2T.js} +2 -2
- package/dist/assets/{waitNotice-BGM0QOS2.js.map → waitNotice-DQvZgz2T.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/assets/api-DLzCtePC.js.map +0 -1
- package/dist/assets/backup-DpyvT9Z6.js.map +0 -1
- package/dist/assets/buttons-Bq7pTXqF.js +0 -1
- package/dist/assets/buttons-BvWqHJeh.js.map +0 -1
- package/dist/assets/groupMeta-DTQAJG50.js.map +0 -1
- package/dist/assets/host-z0FAHP9Z.js.map +0 -1
- package/dist/assets/hyperdhtRelay-CvsAfQRQ.js.map +0 -1
- package/dist/assets/irohWeb-CLBx5MIv.js.map +0 -1
- package/dist/assets/main-CVqkvuIo.js.map +0 -1
- package/dist/assets/ownStatus-DMEhrpkd.js.map +0 -1
- package/dist/assets/registry-rXgaZeNn.js.map +0 -1
- package/dist/assets/secretGuard-BmmnEbYf.js +0 -1
- package/dist/assets/server-CQR7NLCz.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { p as fileStore } from "./idb-ewvbqyDI.js";
|
|
2
|
-
import { _ as groupPayTwins, d as servedApps, f as nodeLocalFetch, g as groupMessageJson, h as groupJson, l as paymentJson, m as chatMessageJson, p as chatJson, r as callApi, u as reportAppFrames, v as resumeHolds, y as flushCardUpdates } from "./api-
|
|
3
|
-
import { N as sinceSeq, s as findChat, u as findOwnNamedChat } from "./apiKit-
|
|
2
|
+
import { _ as groupPayTwins, d as servedApps, f as nodeLocalFetch, g as groupMessageJson, h as groupJson, l as paymentJson, m as chatMessageJson, p as chatJson, r as callApi, u as reportAppFrames, v as resumeHolds, y as flushCardUpdates } from "./api-BwEgbvvK.js";
|
|
3
|
+
import { N as sinceSeq, s as findChat, u as findOwnNamedChat } from "./apiKit-BlsNk-Cx.js";
|
|
4
4
|
import { r as asCliError, t as CliError } from "./errors-DDLFO4Gf.js";
|
|
5
|
-
import { C as ownFolder, D as runtimePath, E as privateFolder, n as RESTORED_MARK, r as acquireLock, w as ownProfile, x as startingPath } from "./profiles-
|
|
6
|
-
import { _ as frameBytes, b as monotonic, d as proof, f as removeDaemonSecret, g as bytesToMs, h as PlaybackQueue, l as greeting, m as DEFAULT_RATE, u as newDaemonSecret, v as frameSamples, y as isCallRate } from "./client-
|
|
7
|
-
import { Bi as
|
|
8
|
-
import { d as parsePayLink, r as irohRelayProblem } from "./irohWeb-
|
|
5
|
+
import { C as ownFolder, D as runtimePath, E as privateFolder, n as RESTORED_MARK, r as acquireLock, w as ownProfile, x as startingPath } from "./profiles-BOYGlmu2.js";
|
|
6
|
+
import { _ as frameBytes, b as monotonic, d as proof, f as removeDaemonSecret, g as bytesToMs, h as PlaybackQueue, l as greeting, m as DEFAULT_RATE, u as newDaemonSecret, v as frameSamples, y as isCallRate } from "./client-DGS-atRu.js";
|
|
7
|
+
import { Bi as buildSdpFromSignal, Gi as parseCallSignal, Hi as callSignalHeardAt, Ii as CALL_SIGNAL_MAX_AGE_MS, Ki as signalHasVideo, Ri as RTC_CONFIG, Vi as callRtcConfig, Wi as extractParamsFromSdp, Zt as checkPushEndpoint, bi as DAEMON_WATCH_PEER_IDLE_MS, gn as ACTIVE_DHT_POLL_MS, xt as STATUS_IDLE_AFTER_MS, zi as answersOffer } from "./groupMeta-DxuJzko_.js";
|
|
8
|
+
import { d as parsePayLink, r as irohRelayProblem } from "./irohWeb-CbnGtUo6.js";
|
|
9
9
|
import { i as fromBase64Url } from "./bytes-C1DNGY18.js";
|
|
10
10
|
import { u as setLinkTraceSink } from "./relay-Cjfmdec0.js";
|
|
11
11
|
import { b as setPublicKeyFastPath } from "./pkarr-BQo4PcCg.js";
|
|
12
|
-
import { p as nativePublicKey } from "./apps-
|
|
12
|
+
import { p as nativePublicKey } from "./apps-CL8TXHhu.js";
|
|
13
13
|
import { n as fedimintSdkOn } from "./fedimintSdk-D-6H9Pe7.js";
|
|
14
14
|
import { s as isPublicAddress } from "./domainProofs-BDNP1dIy.js";
|
|
15
15
|
import { createRequire } from "node:module";
|
|
@@ -4037,6 +4037,58 @@ function nodeHoldFetch(lookup = publicOnlyLookup) {
|
|
|
4037
4037
|
req.end();
|
|
4038
4038
|
});
|
|
4039
4039
|
}
|
|
4040
|
+
// src/runtime/publicFetch.ts
|
|
4041
|
+
var MAX_REDIRECTS = 5;
|
|
4042
|
+
/**
|
|
4043
|
+
* How the CLI reads an identity's proof and public data (WISP 300, PUBLIC-PROFILES.md) at the address a contact named:
|
|
4044
|
+
* HTTPS GET only at a public address, or at a name whose every address is public, checked when the connection is made
|
|
4045
|
+
* (so a name that changes its answer after the engine's own check is refused too). No proxy. A redirect is refused
|
|
4046
|
+
* unless asked for, and each hop is checked the same way. The engine bounds the size and time (`boundedIdentityFetch`).
|
|
4047
|
+
*/
|
|
4048
|
+
function nodePublicFetch(lookup = publicOnlyLookup) {
|
|
4049
|
+
const get = (url, headers, signal) => new Promise((resolve, reject) => {
|
|
4050
|
+
if (url.protocol !== "https:") return reject(/* @__PURE__ */ new TypeError("Only HTTPS is read"));
|
|
4051
|
+
const host = url.hostname.replace(/^\[|\]$/g, "");
|
|
4052
|
+
if (isIP(host) && !isPublicIp(host)) return reject(/* @__PURE__ */ new TypeError(`${host} is not a public address`));
|
|
4053
|
+
const req = request(url, {
|
|
4054
|
+
method: "GET",
|
|
4055
|
+
headers: Object.fromEntries(headers),
|
|
4056
|
+
lookup,
|
|
4057
|
+
agent: false,
|
|
4058
|
+
signal
|
|
4059
|
+
}, (res) => {
|
|
4060
|
+
const out = new Headers();
|
|
4061
|
+
for (const [name, value] of Object.entries(res.headers)) if (typeof value === "string") out.set(name, value);
|
|
4062
|
+
const status = res.statusCode ?? 0;
|
|
4063
|
+
resolve(new Response(status === 204 || status === 304 ? null : Readable.toWeb(res), {
|
|
4064
|
+
status,
|
|
4065
|
+
headers: out
|
|
4066
|
+
}));
|
|
4067
|
+
});
|
|
4068
|
+
req.on("error", reject);
|
|
4069
|
+
req.end();
|
|
4070
|
+
});
|
|
4071
|
+
return async (input, init) => {
|
|
4072
|
+
let url = new URL(typeof input === "string" ? input : input instanceof URL ? input.href : input.url);
|
|
4073
|
+
if ((init?.method ?? "GET").toUpperCase() !== "GET") throw new TypeError("Only GET is sent");
|
|
4074
|
+
const headers = new Headers(init?.headers);
|
|
4075
|
+
const signal = init?.signal ?? void 0;
|
|
4076
|
+
for (let hops = 0;; hops++) {
|
|
4077
|
+
const response = await get(url, headers, signal);
|
|
4078
|
+
const location = response.headers.get("location");
|
|
4079
|
+
if (response.status < 300 || response.status > 399 || !location || init?.redirect === "manual") {
|
|
4080
|
+
if (hops) Object.defineProperties(response, {
|
|
4081
|
+
url: { value: url.href },
|
|
4082
|
+
redirected: { value: true }
|
|
4083
|
+
});
|
|
4084
|
+
return response;
|
|
4085
|
+
}
|
|
4086
|
+
await response.body?.cancel();
|
|
4087
|
+
if (init?.redirect !== "follow" || hops >= MAX_REDIRECTS) throw new TypeError("Redirect refused");
|
|
4088
|
+
url = new URL(location, url);
|
|
4089
|
+
}
|
|
4090
|
+
};
|
|
4091
|
+
}
|
|
4040
4092
|
// src/runtime/irohRelay.ts
|
|
4041
4093
|
/**
|
|
4042
4094
|
* Whether the CLI's Iroh may dial a contact through the relay its descriptor names (irohWeb.ts `publicRelay`): at a
|
|
@@ -6513,7 +6565,7 @@ async function startRuntime(paths, options = {}) {
|
|
|
6513
6565
|
const [{ registerFileBytes }, { NodeFileBytes }] = await Promise.all([import("./fileBytes-CCKbwqG_.js"), import("./fileBytes-tj6-VZcB.js")]);
|
|
6514
6566
|
registerFileBytes("native", async () => new NodeFileBytes(paths.files), true);
|
|
6515
6567
|
if (await (await import("./blobFiles-DDs34n0r.js")).moveBlobFiles()) await store.compact();
|
|
6516
|
-
const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-
|
|
6568
|
+
const [{ EngineServer }, { createHyperEndpoint }] = await Promise.all([import("./server-D4gf-LnD.js"), import("./endpoint-Cvu-taMs.js")]);
|
|
6517
6569
|
const mainline = dht.off ? null : new (await (import("./mainline-CVrd0C1n.js"))).Mainline({
|
|
6518
6570
|
bootstrap: dht.bootstrap,
|
|
6519
6571
|
host: dht.host
|
|
@@ -6541,6 +6593,7 @@ async function startRuntime(paths, options = {}) {
|
|
|
6541
6593
|
localFetch: nodeLocalFetch,
|
|
6542
6594
|
pushSend: (request) => nodePushSend(request),
|
|
6543
6595
|
holdFetch: nodeHoldFetch(),
|
|
6596
|
+
identityFetch: nodePublicFetch(),
|
|
6544
6597
|
webrtcIgnoresRelayOnly: true,
|
|
6545
6598
|
callsSupport: callsUnavailable === null,
|
|
6546
6599
|
...callsUnavailable ? { callsUnavailable } : {},
|
|
@@ -6981,4 +7034,4 @@ function connection(ctx, socket, secret, answering) {
|
|
|
6981
7034
|
}
|
|
6982
7035
|
export { BASELINE_NEWEST, MAX_UNREAD, STOP_ANSWERS_MS, keepServing, openHost, serve };
|
|
6983
7036
|
|
|
6984
|
-
//# sourceMappingURL=host-
|
|
7037
|
+
//# sourceMappingURL=host-BxM-HMr0.js.map
|