@ghostlytools/cli 1.11.0 → 1.11.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/dist/assets/{api-B-52sVYp.js → api-D89ubgas.js} +2 -2
- package/dist/assets/{api-CTqIcdu7.js → api-DL0Uazf6.js} +23 -19
- package/dist/assets/api-DL0Uazf6.js.map +1 -0
- package/dist/assets/{apiKit-CZq4Lq4f.js → apiKit-D78MXTrk.js} +2 -2
- package/dist/assets/{apiKit-CZq4Lq4f.js.map → apiKit-D78MXTrk.js.map} +1 -1
- package/dist/assets/{apps-C_X0zgSG.js → apps--pAqmfgQ.js} +3 -3
- package/dist/assets/{apps-C_X0zgSG.js.map → apps--pAqmfgQ.js.map} +1 -1
- package/dist/assets/{apps-kRsY9S2S.js → apps-BlSl1nGn.js} +1 -1
- package/dist/assets/{arkade-_aaB7VbW.js → arkade-DxB-MR43.js} +2 -2
- package/dist/assets/{arkade-_aaB7VbW.js.map → arkade-DxB-MR43.js.map} +1 -1
- package/dist/assets/{backup-OTvrmk-w.js → backup-B3JJd75o.js} +6 -6
- package/dist/assets/{backup-OTvrmk-w.js.map → backup-B3JJd75o.js.map} +1 -1
- package/dist/assets/{backup-DBg388Ke.js → backup-T7gFpU80.js} +1 -1
- package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js.map +1 -1
- package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
- package/dist/assets/{buttons-DUu7hxxT.js → buttons-C1VbDihe.js} +3 -3
- package/dist/assets/{buttons-DUu7hxxT.js.map → buttons-C1VbDihe.js.map} +1 -1
- package/dist/assets/buttons-DwWuK_uN.js +2 -0
- package/dist/assets/{client-DDpZP1R1.js → client-CGLuWFRV.js} +2 -2
- package/dist/assets/{client-DDpZP1R1.js.map → client-CGLuWFRV.js.map} +1 -1
- package/dist/assets/{codec-DrryGcPT.js → codec-YGJDr7uH.js} +2 -2
- package/dist/assets/{codec-DrryGcPT.js.map → codec-YGJDr7uH.js.map} +1 -1
- package/dist/assets/{envelope-Q_rMgoE9.js → envelope-Dwq8EN8x.js} +2 -2
- package/dist/assets/{envelope-Q_rMgoE9.js.map → envelope-Dwq8EN8x.js.map} +1 -1
- package/dist/assets/{fixedHosts-BV5GDiTU.js → fixedHosts-CINXidpd.js} +3 -3
- package/dist/assets/{fixedHosts-BV5GDiTU.js.map → fixedHosts-CINXidpd.js.map} +1 -1
- package/dist/assets/{host-BlUzZgQL.js → host-CGlHkiQv.js} +10 -10
- package/dist/assets/{host-BlUzZgQL.js.map → host-CGlHkiQv.js.map} +1 -1
- package/dist/assets/{hyperdhtRelay-BvI_uNZO.js → hyperdhtRelay-Bj5jJT5w.js} +2 -2
- package/dist/assets/{hyperdhtRelay-BvI_uNZO.js.map → hyperdhtRelay-Bj5jJT5w.js.map} +1 -1
- package/dist/assets/{irohWeb-CqPN8VPY.js → irohWeb-CYn0uB_A.js} +9 -9
- package/dist/assets/irohWeb-CYn0uB_A.js.map +1 -0
- package/dist/assets/{main-vQjlgEnt.js → main-CgLW_Gyx.js} +19 -19
- package/dist/assets/{main-vQjlgEnt.js.map → main-CgLW_Gyx.js.map} +1 -1
- package/dist/assets/{mainline-p6HOW7sb.js → mainline-B0h8RchD.js} +2 -2
- package/dist/assets/{mainline-p6HOW7sb.js.map → mainline-B0h8RchD.js.map} +1 -1
- package/dist/assets/{networkReason-DMffkiJ6.js → networkReason-BBosp2KG.js} +3 -3
- package/dist/assets/{networkReason-DMffkiJ6.js.map → networkReason-BBosp2KG.js.map} +1 -1
- package/dist/assets/{nwc-2vH18oNy.js → nwc-SSNS1aJ-.js} +3 -3
- package/dist/assets/{nwc-2vH18oNy.js.map → nwc-SSNS1aJ-.js.map} +1 -1
- package/dist/assets/{nwcProvider-DpeDy0bV.js → nwcProvider-BXqJmM98.js} +2 -2
- package/dist/assets/{nwcProvider-DpeDy0bV.js.map → nwcProvider-BXqJmM98.js.map} +1 -1
- package/dist/assets/{ownDid-iKz8u_fM.js → ownDid--DtH_Jdi.js} +2 -2
- package/dist/assets/{ownDid-iKz8u_fM.js.map → ownDid--DtH_Jdi.js.map} +1 -1
- package/dist/assets/{ownStatus-BlRKnM5F.js → ownStatus-CQPGjCUR.js} +3 -3
- package/dist/assets/{ownStatus-BlRKnM5F.js.map → ownStatus-CQPGjCUR.js.map} +1 -1
- package/dist/assets/{profiles-B5e0TyvS.js → profiles-4UQ1Hsds.js} +3 -3
- package/dist/assets/{profiles-B5e0TyvS.js.map → profiles-4UQ1Hsds.js.map} +1 -1
- package/dist/assets/{registry-Cc_PQb3k.js → registry-B6BXKv6Q.js} +1 -1
- package/dist/assets/{registry-CnFO2Pp5.js → registry-BKCFTEYp.js} +5 -5
- package/dist/assets/{registry-CnFO2Pp5.js.map → registry-BKCFTEYp.js.map} +1 -1
- package/dist/assets/{resolve-DI8uAM_Y.js → resolve-MFeFljsN.js} +2 -2
- package/dist/assets/{resolve-DI8uAM_Y.js.map → resolve-MFeFljsN.js.map} +1 -1
- package/dist/assets/{server-DdtPxkqI.js → server-rHKhnog1.js} +55 -42
- package/dist/assets/server-rHKhnog1.js.map +1 -0
- package/dist/assets/{src-BnpEQqzk.js → src-BzsyAvPf.js} +795 -165
- package/dist/assets/src-BzsyAvPf.js.map +1 -0
- package/dist/assets/{sshForges-cdIAraDw.js → sshForges-qITn-RoV.js} +2 -2
- package/dist/assets/{sshForges-cdIAraDw.js.map → sshForges-qITn-RoV.js.map} +1 -1
- package/dist/assets/{translate-kNopA04L.js → translate-Bkr_iDgp.js} +9 -7
- package/dist/assets/translate-Bkr_iDgp.js.map +1 -0
- package/dist/assets/{usdt-CDaLhEYh.js → usdt-Bp7T2iqt.js} +3 -3
- package/dist/assets/{usdt-CDaLhEYh.js.map → usdt-Bp7T2iqt.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-CTqIcdu7.js.map +0 -1
- package/dist/assets/buttons-4EKtQl-7.js +0 -2
- package/dist/assets/irohWeb-CqPN8VPY.js.map +0 -1
- package/dist/assets/server-DdtPxkqI.js.map +0 -1
- package/dist/assets/src-BnpEQqzk.js.map +0 -1
- package/dist/assets/translate-kNopA04L.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { M as startNamedChats, l as findGroup, s as findChat } from "./apiKit-
|
|
2
|
-
import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-
|
|
1
|
+
import { M as startNamedChats, l as findGroup, s as findChat } from "./apiKit-D78MXTrk.js";
|
|
2
|
+
import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-DL0Uazf6.js";
|
|
3
3
|
export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, mentionsFor, redactSettings, settingsInEffect, startNamedChats };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ba as PLAYABLE_AUDIO, Bo as MESSAGE_CLOCK_SKEW_MS, Di as APP_DATA_MAX_BYTES, Gu as relayUrlProblem, Ha as VOICE_METER, Hn as withoutVideoMetadata, Ho as claimedTime, Io as checkStatusCard, Ja as voiceLevel, Ka as parseVoiceMeta, Kl as readImageMeta, Kn as stripPictureMetadata, Ml as appRef, Mo as appCardUrl, Po as cardLine, Ra as sanitizeFileName, Rl as isAppRef, Ro as statusCardBytes, Ua as baseMime, Un as NO_PICTURE_METADATA, Va as VOICE_LIMITS, Wa as downsamplePeaks, Wu as normalizeRelayUrl, Yi as identityStatement, _d as randomBytes$1, _s as parseLocalTarget, ar as GROUP_FILE_LIMITS, bo as replySnippet, cu as ownInviteRefusal, hs as GhostlyHttpError, ii as sanitizeTypingStatus, jo as appCardId, ko as STATUS_CARD_LIMITS, ld as MAX_AVATAR_LENGTH, ni as TYPING_REFRESH_MS, ou as inviteLink, qa as voiceDownloadName, qn as withoutPictureMetadata, ss as AWAITING_PEER_MS, ti as TYPING_KINDS, ud as sanitizeAvatar, vd as toBase64Url, wl as isAppUrl, yl as APP_PERMISSIONS, ys as LIMITS, za as sanitizeMime, zn as withoutAudioMetadata } from "./src-BzsyAvPf.js";
|
|
2
2
|
import { p as fileStore } from "./idb-CEuoNsTv.js";
|
|
3
3
|
import { f as FILE_BYTES_STEP, o as fileBytes, s as fileBytesOf } from "./fileBytes-BLPZq9YU.js";
|
|
4
|
-
import { $ as iceServerProblem, M as waitingGroupFile, N as IDENTITY_DRAFT_TTL_MS, S as paymentNetwork, c as groupOfFile, et as iceServerSetting, k as removeStored, o as groupFileId, p as replyRef, t as DEFAULT_IROH_RELAYS } from "./irohWeb-
|
|
5
|
-
import { t as IDENTITY_PROVIDERS } from "./registry-
|
|
4
|
+
import { $ as iceServerProblem, M as waitingGroupFile, N as IDENTITY_DRAFT_TTL_MS, S as paymentNetwork, c as groupOfFile, et as iceServerSetting, k as removeStored, o as groupFileId, p as replyRef, t as DEFAULT_IROH_RELAYS } from "./irohWeb-CYn0uB_A.js";
|
|
5
|
+
import { t as IDENTITY_PROVIDERS } from "./registry-BKCFTEYp.js";
|
|
6
6
|
import { n as secretWords, r as findSecret, t as guardText } from "./secretGuard-B7Hj0Kvz.js";
|
|
7
7
|
import { i as localFileError, r as asCliError, t as CliError } from "./errors-Dt-ZnyOX.js";
|
|
8
|
-
import { a as PAY_METHODS, d as ENGINE_METHODS, f as ENGINE_PARAMS, g as engineParamsProblem, i as CHAT_METHODS, l as withStoredIds, m as READ_PARAMS, n as statusJson, o as TRANSPORT_NAMES, p as ENGINE_READS, r as ADDRESS_TYPES, s as WALLET_TYPES, t as checkOwnStatus, u as DESTRUCTIVE_CALLS } from "./ownStatus-
|
|
9
|
-
import { A as sinceSeq, D as oneShotWaits, E as oneOf, F as transportOffered, I as waitForState, N as state, O as sentAt, P as str, S as nobodyJoined, T as num, _ as messageOf, b as noFile, c as findChatOrGroup, d as groupNameOf, f as groupOf, g as list, h as keptForJoin, i as chatOrGroup, j as somebodyJoined, k as shownName, l as findGroup, m as inviteTaken, n as bool, o as dhtOnly, p as groupPrefixed, r as chatOf, s as findChat, u as findOwnNamedChat, w as node, x as noMessage } from "./apiKit-
|
|
8
|
+
import { a as PAY_METHODS, d as ENGINE_METHODS, f as ENGINE_PARAMS, g as engineParamsProblem, i as CHAT_METHODS, l as withStoredIds, m as READ_PARAMS, n as statusJson, o as TRANSPORT_NAMES, p as ENGINE_READS, r as ADDRESS_TYPES, s as WALLET_TYPES, t as checkOwnStatus, u as DESTRUCTIVE_CALLS } from "./ownStatus-CQPGjCUR.js";
|
|
9
|
+
import { A as sinceSeq, D as oneShotWaits, E as oneOf, F as transportOffered, I as waitForState, N as state, O as sentAt, P as str, S as nobodyJoined, T as num, _ as messageOf, b as noFile, c as findChatOrGroup, d as groupNameOf, f as groupOf, g as list, h as keptForJoin, i as chatOrGroup, j as somebodyJoined, k as shownName, l as findGroup, m as inviteTaken, n as bool, o as dhtOnly, p as groupPrefixed, r as chatOf, s as findChat, u as findOwnNamedChat, w as node, x as noMessage } from "./apiKit-D78MXTrk.js";
|
|
10
10
|
import { t as childEnv } from "./childEnv-BVOQK9EA.js";
|
|
11
11
|
import { t as chatState } from "./waitNotice-Cn0WJ-He.js";
|
|
12
|
-
import { a as goesOn, c as waitForGroupFrame, i as pressable, l as waitForMessage, n as buttonsCard, o as waitForConfirmed, s as waitForEdit, t as BUTTON_METHODS, u as waitForRemoval } from "./buttons-
|
|
13
|
-
import { a as checkShownName } from "./profiles-
|
|
14
|
-
import { t as BACKUP_METHODS } from "./backup-
|
|
15
|
-
import { o as checkedBundle } from "./apps
|
|
12
|
+
import { a as goesOn, c as waitForGroupFrame, i as pressable, l as waitForMessage, n as buttonsCard, o as waitForConfirmed, s as waitForEdit, t as BUTTON_METHODS, u as waitForRemoval } from "./buttons-C1VbDihe.js";
|
|
13
|
+
import { a as checkShownName } from "./profiles-4UQ1Hsds.js";
|
|
14
|
+
import { t as BACKUP_METHODS } from "./backup-B3JJd75o.js";
|
|
15
|
+
import { o as checkedBundle } from "./apps--pAqmfgQ.js";
|
|
16
16
|
import { generateMnemonic } from "@scure/bip39";
|
|
17
17
|
import { wordlist } from "@scure/bip39/wordlists/english.js";
|
|
18
18
|
import { execFile, spawn } from "node:child_process";
|
|
@@ -848,17 +848,21 @@ async function voiceOf(params, path, mime, size) {
|
|
|
848
848
|
throw new CliError("bad_request", `A voice note's waveform is 1 to ${VOICE_LIMITS.maxBars} peaks from 0 to 255`);
|
|
849
849
|
}
|
|
850
850
|
/**
|
|
851
|
-
* The file at `path` as it is sent, as the apps send it (platform/services.ts `sendable`): a picture
|
|
852
|
-
* QuickTime video without its metadata (where it was taken or recorded, the device, the time
|
|
853
|
-
* and its digest computed. One whose metadata cannot be removed is
|
|
851
|
+
* The file at `path` as it is sent, as the apps send it (platform/services.ts `sendable`): a picture, an MP4 or
|
|
852
|
+
* QuickTime video or an audio file without its metadata (where it was taken or recorded, the device, the time, an
|
|
853
|
+
* audio file's tags), before its size is read and its digest computed. One whose metadata cannot be removed is
|
|
854
|
+
* refused, never sent as it was. A voice note is a file made anywhere, so its tags go too.
|
|
854
855
|
*/
|
|
855
|
-
async function sendable(path, mime
|
|
856
|
+
async function sendable(path, mime) {
|
|
856
857
|
const source = await openAsBlob(path, { type: mime });
|
|
857
|
-
if (voice) return source;
|
|
858
858
|
try {
|
|
859
|
-
return await withoutPictureMetadata(source, mime) ?? await withoutVideoMetadata(source, mime) ?? source;
|
|
859
|
+
return await withoutPictureMetadata(source, mime) ?? await withoutVideoMetadata(source, mime) ?? await withoutAudioMetadata(source, mime) ?? source;
|
|
860
860
|
} catch (error) {
|
|
861
|
-
if (error instanceof Error &&
|
|
861
|
+
if (error instanceof Error && [
|
|
862
|
+
"This picture cannot be sent: Ghostly could not remove the details saved in it, like where it was taken",
|
|
863
|
+
"This video cannot be sent: Ghostly could not remove the details saved in it, like where it was recorded",
|
|
864
|
+
"This audio cannot be sent: Ghostly could not remove the details saved in it, like where it was recorded"
|
|
865
|
+
].includes(error.message)) throw new CliError("refused", error.message);
|
|
862
866
|
throw error;
|
|
863
867
|
}
|
|
864
868
|
}
|
|
@@ -897,7 +901,7 @@ async function sendToGroup(ctx, params, group, path, picked) {
|
|
|
897
901
|
const check = await node(ctx).groupFileCheck({ groupId: group.id });
|
|
898
902
|
if (check.error) throw check.refused ? new CliError("refused", check.error) : groupSendRefused(check.error);
|
|
899
903
|
const { voice, warning } = await voiceOf(params, path, mime, picked);
|
|
900
|
-
const source = await whileUnchanged(path, () => sendable(path, mime
|
|
904
|
+
const source = await whileUnchanged(path, () => sendable(path, mime));
|
|
901
905
|
const size = source.size;
|
|
902
906
|
const image = voice ? void 0 : await whileUnchanged(path, () => readImageMeta(source, mime));
|
|
903
907
|
const fileId = groupFileId(group.id, "out");
|
|
@@ -1109,7 +1113,7 @@ var FILE_METHODS = {
|
|
|
1109
1113
|
}, { tail: ", or it cannot be replied to" });
|
|
1110
1114
|
}
|
|
1111
1115
|
const { voice, warning } = await voiceOf(params, path, mime, info.size);
|
|
1112
|
-
const source = await whileUnchanged(path, () => sendable(path, mime
|
|
1116
|
+
const source = await whileUnchanged(path, () => sendable(path, mime));
|
|
1113
1117
|
const image = voice ? void 0 : await whileUnchanged(path, () => readImageMeta(source, mime));
|
|
1114
1118
|
const wireId = toBase64Url(randomBytes$1(12));
|
|
1115
1119
|
const file = {
|
|
@@ -5511,4 +5515,4 @@ async function callApi(ctx, method, params = {}) {
|
|
|
5511
5515
|
//#endregion
|
|
5512
5516
|
export { resumeHolds as _, hideStateSecrets as a, settingsInEffect as c, servedApps as d, nodeLocalFetch as f, groupMessageJson as g, groupJson as h, groupSendRefused as i, paymentJson as l, chatMessageJson as m, SETTABLE as n, mentionsFor as o, chatJson as p, callApi as r, redactSettings as s, API_METHODS as t, reportAppFrames as u, flushCardUpdates as v };
|
|
5513
5517
|
|
|
5514
|
-
//# sourceMappingURL=api-
|
|
5518
|
+
//# sourceMappingURL=api-DL0Uazf6.js.map
|