@ghostlytools/cli 1.7.0 → 1.7.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 +15 -8
- package/dist/assets/{api-BIqr8SpM.js → api-CD9JbPuA.js} +99 -28
- package/dist/assets/api-CD9JbPuA.js.map +1 -0
- package/dist/assets/{api-BnCmJLiQ.js → api-CJM3R93b.js} +2 -2
- package/dist/assets/{apiKit-CWalYh1t.js → apiKit-BmnROpCN.js} +8 -4
- package/dist/assets/{apiKit-CWalYh1t.js.map → apiKit-BmnROpCN.js.map} +1 -1
- package/dist/assets/{apps-_hVUaHIT.js → apps-CJ2dvKSz.js} +1 -1
- package/dist/assets/{apps-Bx3tXbJ9.js → apps-DVA60Tg6.js} +34 -11
- package/dist/assets/apps-DVA60Tg6.js.map +1 -0
- package/dist/assets/{arkade-AxrcyS1C.js → arkade-CHqwEHFd.js} +2 -2
- package/dist/assets/{arkade-AxrcyS1C.js.map → arkade-CHqwEHFd.js.map} +1 -1
- package/dist/assets/{backup-Y1V1Yxqr.js → backup-B4dSNvzb.js} +5 -5
- package/dist/assets/{backup-Y1V1Yxqr.js.map → backup-B4dSNvzb.js.map} +1 -1
- package/dist/assets/{backup-d_XvXpEK.js → backup-C4CbTEcj.js} +1 -1
- package/dist/assets/{blobFiles-B6nf0gCG.js → blobFiles-Bckz9fjp.js} +2 -2
- package/dist/assets/{blobFiles-B6nf0gCG.js.map → blobFiles-Bckz9fjp.js.map} +1 -1
- package/dist/assets/buttons-BMVGYXpR.js +2 -0
- package/dist/assets/{buttons-BiQyQBb0.js → buttons-C13rK2mH.js} +3 -3
- package/dist/assets/{buttons-BiQyQBb0.js.map → buttons-C13rK2mH.js.map} +1 -1
- package/dist/assets/{daemonProof-ui8jtIw0.js → daemonProof-B41oSfon.js} +2 -2
- package/dist/assets/{daemonProof-ui8jtIw0.js.map → daemonProof-B41oSfon.js.map} +1 -1
- package/dist/assets/{envelope-D3oeVhv8.js → envelope-4TXDx3vD.js} +2 -2
- package/dist/assets/{envelope-D3oeVhv8.js.map → envelope-4TXDx3vD.js.map} +1 -1
- package/dist/assets/{fileBytes-BMEBas7S.js → fileBytes-BD0v3rRG.js} +10 -2
- package/dist/assets/{fileBytes-BMEBas7S.js.map → fileBytes-BD0v3rRG.js.map} +1 -1
- package/dist/assets/{fileBytes-CtwagJ8h.js → fileBytes-OolN5cSY.js} +1 -1
- package/dist/assets/{fileBytes-CFNrRfcl.js → fileBytes-_fd-2JRY.js} +2 -2
- package/dist/assets/{fileBytes-CFNrRfcl.js.map → fileBytes-_fd-2JRY.js.map} +1 -1
- package/dist/assets/fileBytesIdb-CsSQcSxD.js +2 -0
- package/dist/assets/{fileBytesIdb-BXAN7i-N.js → fileBytesIdb-NtA8r9EM.js} +2 -2
- package/dist/assets/{fileBytesIdb-BXAN7i-N.js.map → fileBytesIdb-NtA8r9EM.js.map} +1 -1
- package/dist/assets/{fileBytesOpfs-Do1Vpkis.js → fileBytesOpfs-B8fJwkwM.js} +3 -3
- package/dist/assets/{fileBytesOpfs-Do1Vpkis.js.map → fileBytesOpfs-B8fJwkwM.js.map} +1 -1
- package/dist/assets/{ghostly_iroh_web-BXCsSxxo.js → ghostly_iroh_web-CO0onry8.js} +33 -27
- package/dist/assets/ghostly_iroh_web-CO0onry8.js.map +1 -0
- package/dist/assets/ghostly_iroh_web_bg.wasm +0 -0
- package/dist/assets/{groupFiles-DU1wMGI9.js → groupFiles-ajZgZ6P8.js} +41 -25
- package/dist/assets/groupFiles-ajZgZ6P8.js.map +1 -0
- package/dist/assets/{host-DDMQfR7B.js → host-CVeNtA2_.js} +43 -20
- package/dist/assets/host-CVeNtA2_.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-B2v8eqRd.js → hyperdhtRelay-CI2ISE-g.js} +2 -2
- package/dist/assets/{hyperdhtRelay-B2v8eqRd.js.map → hyperdhtRelay-CI2ISE-g.js.map} +1 -1
- package/dist/assets/{irohWeb-9RVIbF_l.js → irohWeb-DcRJdhce.js} +3 -3
- package/dist/assets/{irohWeb-9RVIbF_l.js.map → irohWeb-DcRJdhce.js.map} +1 -1
- package/dist/assets/{main-BNwNEPEy.js → main-CjO0KGiF.js} +218 -70
- package/dist/assets/main-CjO0KGiF.js.map +1 -0
- package/dist/assets/{mainline-RXv5_Fby.js → mainline-WM-WItCV.js} +27 -8
- package/dist/assets/mainline-WM-WItCV.js.map +1 -0
- package/dist/assets/{networkReason-CIn4yN9h.js → networkReason-380j5yMs.js} +2 -2
- package/dist/assets/{networkReason-CIn4yN9h.js.map → networkReason-380j5yMs.js.map} +1 -1
- package/dist/assets/{nwc-BNPzuT-6.js → nwc-D5dkC1xg.js} +3 -3
- package/dist/assets/{nwc-BNPzuT-6.js.map → nwc-D5dkC1xg.js.map} +1 -1
- package/dist/assets/{nwcProvider-C9Y6PUNC.js → nwcProvider-p_rMwtDv.js} +2 -2
- package/dist/assets/{nwcProvider-C9Y6PUNC.js.map → nwcProvider-p_rMwtDv.js.map} +1 -1
- package/dist/assets/{profiles-CEnZfN78.js → profiles-BFd0tpCZ.js} +91 -19
- package/dist/assets/profiles-BFd0tpCZ.js.map +1 -0
- package/dist/assets/{registry-DOkDhUAu.js → registry-BKffx4ZU.js} +1 -1
- package/dist/assets/{registry-B9aYHNNf.js → registry-BfNcA6kF.js} +3 -3
- package/dist/assets/{registry-B9aYHNNf.js.map → registry-BfNcA6kF.js.map} +1 -1
- package/dist/assets/{resolve-imkCgogd.js → resolve-hUsgRkmm.js} +2 -2
- package/dist/assets/{resolve-imkCgogd.js.map → resolve-hUsgRkmm.js.map} +1 -1
- package/dist/assets/{server-CB9_JuWZ.js → server-C3tJZFnv.js} +422 -149
- package/dist/assets/server-C3tJZFnv.js.map +1 -0
- package/dist/assets/{src-BBG_NwMc.js → src-BMHgbkli.js} +219 -62
- package/dist/assets/src-BMHgbkli.js.map +1 -0
- package/dist/assets/{translate-BcP139SV.js → translate-DJUutSis.js} +2 -2
- package/dist/assets/{translate-BcP139SV.js.map → translate-DJUutSis.js.map} +1 -1
- package/dist/assets/types-C4_KafL_.js.map +1 -1
- package/dist/assets/{usdt-C5Gf9-IC.js → usdt-glkUxsDe.js} +3 -3
- package/dist/assets/{usdt-C5Gf9-IC.js.map → usdt-glkUxsDe.js.map} +1 -1
- package/dist/assets/{words-ZUiQo4yo.js → words-DyW9b27T.js} +2 -2
- package/dist/assets/{words-ZUiQo4yo.js.map → words-DyW9b27T.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-BIqr8SpM.js.map +0 -1
- package/dist/assets/apps-Bx3tXbJ9.js.map +0 -1
- package/dist/assets/buttons-LO3Ql1Hd.js +0 -2
- package/dist/assets/fileBytesIdb-C20oXDdr.js +0 -2
- package/dist/assets/ghostly_iroh_web-BXCsSxxo.js.map +0 -1
- package/dist/assets/groupFiles-DU1wMGI9.js.map +0 -1
- package/dist/assets/host-DDMQfR7B.js.map +0 -1
- package/dist/assets/main-BNwNEPEy.js.map +0 -1
- package/dist/assets/mainline-RXv5_Fby.js.map +0 -1
- package/dist/assets/profiles-CEnZfN78.js.map +0 -1
- package/dist/assets/server-CB9_JuWZ.js.map +0 -1
- package/dist/assets/src-BBG_NwMc.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles-BFd0tpCZ.js","names":[],"sources":["../../src/privateFolder.ts","../../src/profiles.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { chmodSync, lstatSync, mkdirSync, statSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { isAbsolute, join } from \"node:path\";\n\n/**\n * Where a socket goes when its path in the profile is longer than a Unix socket may be: `<base>/<prefix>-<hash of the\n * profile>/<leaf>`, in `$XDG_RUNTIME_DIR` or else the temp folder (macOS gives each user one) when that folder is the\n * user's alone, so no other user can make the folder first. When neither is, or the path would still be too long:\n * `/tmp/<prefix>-<uid>-<hash>/<leaf>`. Either way `privateFolder` checks the folder before use.\n */\nexport function runtimePath(prefix: string, profileDir: string, leaf: string): string {\n const hash = createHash(\"sha256\").update(profileDir).digest(\"hex\").slice(0, 24);\n for (const base of [process.env.XDG_RUNTIME_DIR, tmpdir()]) {\n if (!base || !isAbsolute(base) || !usersAlone(base)) continue;\n const path = join(base, `${prefix}-${hash}`, leaf);\n if (Buffer.byteLength(path) <= 100) return path;\n }\n return join(\"/tmp\", `${prefix}-${process.getuid?.() ?? 0}-${hash}`, leaf);\n}\n\nfunction usersAlone(path: string): boolean {\n try {\n const info = statSync(path);\n return info.isDirectory() && (!process.getuid || info.uid === process.getuid()) && (info.mode & 0o077) === 0;\n } catch {\n return false;\n }\n}\n\n/**\n * A folder for a socket outside the profile (when the profile's path is too long for one): made owner-only, and\n * refused when it is a link, someone else made it, or anyone else may enter it.\n */\nexport function privateFolder(path: string, what: string): void {\n mkdirSync(path, { recursive: true, mode: 0o700 });\n const info = lstatSync(path);\n if (!info.isDirectory() || (process.getuid && info.uid !== process.getuid()) || (info.mode & 0o077) !== 0) {\n throw new Error(`${path} is not a folder of this user's alone: ${what}`);\n }\n}\n\n/**\n * The profile's own folder, made owner-only again before the daemon's socket goes in it: a folder made by an older\n * release, or opened up by hand, is closed rather than trusted. Refused when it is a link or someone else's.\n */\nexport function ownFolder(path: string, what: string): void {\n const info = lstatSync(path);\n if (!info.isDirectory() || (process.getuid && info.uid !== process.getuid())) throw new Error(`${path} is not a folder of this user's: ${what}`);\n if ((info.mode & 0o077) !== 0) chmodSync(path, 0o700);\n}\n\n/** False when `path` is there but is not a socket of this user's: nothing to connect to. */\nexport function ownSocket(path: string): boolean {\n if (process.platform === \"win32\") return true;\n let info;\n try { info = lstatSync(path); } catch { return true; }\n return info.isSocket() && (!process.getuid || info.uid === process.getuid());\n}\n","import { closeSync, existsSync, linkSync, lstatSync, mkdirSync, openSync, readdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync, writeSync, type Stats } from \"node:fs\";\nimport { createHash } from \"node:crypto\";\nimport { homedir } from \"node:os\";\nimport { join, resolve } from \"node:path\";\nimport { CliError } from \"./errors\";\nimport { runtimePath } from \"./privateFolder\";\n\n/**\n * Profiles on disk (WISP 1100 § Profiles and files): `<home>/profiles/<name>/`, 0700, one engine store each.\n * `<home>/current` names the profile commands use when none is given.\n */\nexport const DEFAULT_PROFILE = \"default\";\nconst NAME = /^[a-z0-9][a-z0-9._-]{0,63}$/i;\n\n/**\n * An empty `--home` or `--profile` (an unset variable in a script) is a usage error: taken as not given, it ran the\n * command in the current folder, or as the current profile. An empty variable of the environment counts as unset.\n */\nexport function ghostlyHome(option?: string): string {\n if (option === \"\") throw new CliError(\"usage\", \"--home needs a folder\");\n return userPath(option ?? (process.env.GHOSTLY_HOME || join(homedir(), \".ghostly\")), true);\n}\n\n/**\n * A path the CLI was given, made absolute. A `~` the shell left alone (`--home=~/bots`, a quoted variable, a unit\n * file's `Environment=` line) is the user's home, as the shell reads it: it was a folder named `~` in the current one.\n * `~user/…` is a usage error, not a guess at another user's home, unless it is there under this folder. Any other name\n * that starts with `~` is a file here, as the shell and every other tool read it (`~notes.txt`, Office's\n * `~$report.docx`, a new `~cursor`): all of them were refused (agents#1604). `home`: the profiles' folder, where a bare\n * `~bob` that is not there is refused too, as a new profile would be made in a folder of that name.\n */\nexport function userPath(path: string, home = false): string {\n if (path === \"~\" || path.startsWith(\"~/\")) return join(homedir(), path.slice(1));\n if (path.startsWith(\"~\") && (home || path.includes(\"/\")) && !existsSync(resolve(path))) {\n throw new CliError(\"usage\", `${path}: ~user is not read here: write the ${home || path.endsWith(\"/\") ? \"folder\" : \"path\"} in full`);\n }\n return resolve(path);\n}\n\nexport function checkProfileName(name: string): string {\n if (!NAME.test(name) || name.includes(\"..\")) throw new CliError(\"usage\", `Not a profile name: ${JSON.stringify(name)} (letters, digits, \".\", \"_\" and \"-\", up to 64)`);\n return name;\n}\n\n/**\n * The name a profile shows its contacts, whichever command sets it (`--name`, `profile.set`, `settings set nick`):\n * trimmed, up to 64 characters on one line, as a group's name; empty is no name. `settings set nick` took any length\n * and every one took a line break, printed whole by `status`. `field` names it in the refusal.\n */\nexport function checkShownName(name: unknown, field = \"name\"): string {\n const shown = typeof name === \"string\" ? name.trim() : undefined;\n // Core's MAX_NICK_LENGTH: this file loads before any command, without the engine.\n if (shown === undefined || [...shown].length > 64 || /\\p{Cc}/u.test(shown)) {\n throw new CliError(\"bad_request\", `${field} must be up to 64 characters on one line`);\n }\n return shown;\n}\n\nexport function currentProfile(home: string, option?: string): string {\n if (option === \"\") throw new CliError(\"usage\", \"--profile needs a profile name\");\n if (option !== undefined) return checkProfileName(option);\n if (process.env.GHOSTLY_PROFILE) return checkProfileName(process.env.GHOSTLY_PROFILE);\n const file = join(home, \"current\");\n if (existsSync(file)) {\n const name = readFileSync(file, \"utf8\").trim();\n if (name) return checkProfileName(name);\n }\n return DEFAULT_PROFILE;\n}\n\nexport function profileDir(home: string, name: string): string {\n return join(home, \"profiles\", checkProfileName(name));\n}\n\nexport interface ProfilePaths { name: string; dir: string; db: string; socket: string; lock: string; events: string; files: string; log: string }\nexport function profilePaths(home: string, name: string): ProfilePaths {\n const dir = profileDir(home, name);\n return {\n name, dir, db: join(dir, \"db\"), socket: socketPath(dir), lock: lockPath(dir),\n events: join(dir, \"events.jsonl\"), files: join(dir, \"files\"), log: join(dir, \"daemon.log\"),\n };\n}\n\n/** The file that says which process holds the profile (`acquireLock`). */\nexport function lockPath(dir: string): string {\n return join(dir, \"daemon.lock\");\n}\n\n/**\n * The daemon's socket: in the profile's folder, unless that path is longer than a Unix socket may be (104 bytes on\n * macOS); then in a folder of the user's runtime folder named after the profile's (`runtimePath`), which the daemon\n * makes owner-only and checks before use (`privateFolder`), and whose socket a client connects to only when it is this\n * user's (`ownSocket`).\n */\nfunction socketPath(dir: string): string {\n const inside = join(dir, \"daemon.sock\");\n if (process.platform === \"win32\") return `\\\\\\\\.\\\\pipe\\\\ghostly-${createHash(\"sha256\").update(dir).digest(\"hex\").slice(0, 24)}`;\n if (Buffer.byteLength(inside) <= 100) return inside;\n return runtimePath(\"ghostly\", dir, \"daemon.sock\");\n}\n\nfunction ensureFolder(path: string): void {\n mkdirSync(path, { recursive: true, mode: 0o700 });\n}\n\n/** Makes the profile's folder; refused when it exists and `existing` is not allowed. */\nexport function createProfile(home: string, name: string, { existing = false } = {}): ProfilePaths {\n const paths = profilePaths(home, name);\n if (existsSync(paths.dir) && !existing) throw new CliError(\"refused\", `Profile ${name} exists`);\n ensureFolder(join(home, \"profiles\"));\n ensureFolder(paths.dir);\n return paths;\n}\n\n/**\n * A file in the folder of a profile a restore made, until its engine starts for the first time: the store came back\n * whole, as the backup held it, and the money in it is then treated as every restore treats it (WISP 05 § Restoring).\n */\nexport const RESTORED_MARK = \"restored\";\n\nexport function profileExists(home: string, name: string): boolean {\n return existsSync(profileDir(home, name));\n}\n\nexport function listProfiles(home: string): string[] {\n const root = join(home, \"profiles\");\n if (!existsSync(root)) return [];\n return readdirSync(root).filter((name) => NAME.test(name) && statSync(join(root, name)).isDirectory()).sort();\n}\n\nexport function selectProfile(home: string, name: string): void {\n if (!profileExists(home, name)) throw new CliError(\"not_found\", `No profile ${name}`);\n ensureFolder(home);\n writeFileSync(join(home, \"current\"), name + \"\\n\", { mode: 0o600 });\n}\n\n/**\n * One process per profile: the daemon or a one-shot command. The lock holds the owner's pid; a lock whose\n * process is gone is taken over.\n *\n * The lock is a link to a file that already holds the pid, so it never exists empty (agents#1642): one made by\n * `openSync` + `writeSync` was empty for a moment, and another process read that as nobody's and removed it under its\n * owner. An empty lock younger than `EMPTY_LOCK_GRACE_MS` is still an older release's being written: busy. A stale\n * lock is moved aside before it is removed, and only when what was moved is the file judged stale: one that vanished,\n * or that another process made since, is no longer removed.\n */\nexport function acquireLock(paths: ProfilePaths): () => void {\n const mine = String(process.pid);\n const draft = `${paths.lock}.${mine}`;\n writeFileSync(draft, mine, { mode: 0o600 });\n try {\n for (let attempt = 0; attempt < 3; attempt++) {\n if (placeLock(draft, paths.lock, mine)) {\n let released = false;\n return () => {\n if (released) return;\n released = true;\n try { if (readFileSync(paths.lock, \"utf8\").trim() === mine) rmSync(paths.lock, { force: true }); } catch { /* gone already */ }\n };\n }\n let seen: Stats;\n try { seen = lstatSync(paths.lock); } catch { continue; }\n const owner = lockOwner(paths);\n if (owner !== null) throw new CliError(\"busy\", `Profile ${paths.name} is in use by process ${owner}`, { pid: owner });\n if (seen.size === 0 && Date.now() - seen.mtimeMs < EMPTY_LOCK_GRACE_MS) break;\n removeStaleLock(paths.lock, seen);\n }\n } finally {\n rmSync(draft, { force: true });\n }\n throw new CliError(\"busy\", `Profile ${paths.name} is in use`);\n}\n\n/** How long an empty lock is taken for one an older release is still writing its pid into. */\nconst EMPTY_LOCK_GRACE_MS = 1_000;\n\n/**\n * Links `draft` (which holds `mine`) as the lock; false when there is a lock already. Where the file system has no\n * hard links, the lock is made in place, as before.\n */\nfunction placeLock(draft: string, lock: string, mine: string): boolean {\n try {\n linkSync(draft, lock);\n return true;\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n if (code === \"EEXIST\") return false;\n if (![\"EPERM\", \"ENOTSUP\", \"EOPNOTSUPP\", \"ENOSYS\"].includes(code ?? \"\")) throw error;\n }\n let fd: number;\n try { fd = openSync(lock, \"wx\", 0o600); } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"EEXIST\") return false;\n throw error;\n }\n writeSync(fd, mine);\n closeSync(fd);\n return true;\n}\n\n/**\n * Removes the lock judged stale (`seen`): it is moved aside first, and removed only when what was moved is that same\n * file and holds no live pid (a freed inode is soon reused). A lock another process made in the meantime is put back.\n */\nfunction removeStaleLock(lock: string, seen: Stats): void {\n const aside = `${lock}.stale.${process.pid}`;\n try { renameSync(lock, aside); } catch { return; }\n try {\n const moved = lstatSync(aside);\n if (moved.ino === seen.ino && moved.dev === seen.dev && holder(aside) === null && moved.size === seen.size) return;\n try { linkSync(aside, lock); } catch { /* another lock is there already */ }\n } finally {\n rmSync(aside, { force: true });\n }\n}\n\n/** The pid holding the profile, or null when nobody (or a process that is gone) does. */\nexport function lockOwner(paths: ProfilePaths): number | null {\n return holder(paths.lock);\n}\n\nfunction holder(file: string): number | null {\n let pid: number;\n try { pid = Number(readFileSync(file, \"utf8\").trim()); } catch { return null; }\n if (!Number.isInteger(pid) || pid <= 0) return null;\n try { process.kill(pid, 0); return pid; } catch (error) { return (error as NodeJS.ErrnoException).code === \"EPERM\" ? pid : null; }\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,YAAY,QAAgB,YAAoB,MAAsB;CACpF,MAAM,OAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;CAC9E,KAAK,MAAM,QAAQ,CAAC,QAAQ,IAAI,iBAAiB,OAAO,CAAC,GAAG;EAC1D,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,IAAI,GAAG;EACrD,MAAM,OAAO,KAAK,MAAM,GAAG,OAAO,GAAG,QAAQ,IAAI;EACjD,IAAI,OAAO,WAAW,IAAI,KAAK,KAAK,OAAO;CAC7C;CACA,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,QAAQ,SAAS,KAAK,EAAE,GAAG,QAAQ,IAAI;AAC1E;AAEA,SAAS,WAAW,MAAuB;CACzC,IAAI;EACF,MAAM,OAAO,SAAS,IAAI;EAC1B,OAAO,KAAK,YAAY,MAAM,CAAC,QAAQ,UAAU,KAAK,QAAQ,QAAQ,OAAO,OAAO,KAAK,OAAO,QAAW;CAC7G,QAAQ;EACN,OAAO;CACT;AACF;;;;;AAMA,SAAgB,cAAc,MAAc,MAAoB;CAC9D,UAAU,MAAM;EAAE,WAAW;EAAM,MAAM;CAAM,CAAC;CAChD,MAAM,OAAO,UAAU,IAAI;CAC3B,IAAI,CAAC,KAAK,YAAY,KAAM,QAAQ,UAAU,KAAK,QAAQ,QAAQ,OAAO,MAAO,KAAK,OAAO,QAA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AG,SAAS,OAAO;EACtD,IAAK,MAAgC,SAAS,UAAU,OAAO;EAC/D,MAAM;CACR;CACA,UAAU,IAAI,IAAI;CAClB,UAAU,EAAE;CACZ,OAAO;AACT;;;;;AAMA,SAAS,gBAAgB,MAAc,MAAmB;CACxD,MAAM,QAAQ,GAAG,KAAK,SAAS,QAAQ;CACvC,IAAI;EAAE,WAAW,MAAM,KAAK;CAAG,QAAQ;EAAE;CAAQ;CACjD,IAAI;EACF,MAAM,QAAQ,UAAU,KAAK;EAC7B,IAAI,MAAM,QAAQ,KAAK,OAAO,MAAM,QAAQ,KAAK,OAAO,OAAO,KAAK,MAAM,QAAQ,MAAM,SAAS,KAAK,MAAM;EAC5G,IAAI;GAAE,SAAS,OAAO,IAAI;EAAG,QAAQ,CAAsC;CAC7E,UAAU;EACR,OAAO,OAAO,EAAE,OAAO,KAAK,CAAC;CAC/B;AACF;;AAGA,SAAgB,UAAU,OAAoC;CAC5D,OAAO,OAAO,MAAM,IAAI;AAC1B;AAEA,SAAS,OAAO,MAA6B;CAC3C,IAAI;CACJ,IAAI;EAAE,MAAM,OAAO,aAAa,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC;CAAG,QAAQ;EAAE,OAAO;CAAM;CAC9E,IAAI,CAAC,OAAO,UAAU,GAAG,KAAK,OAAO,GAAG,OAAO;CAC/C,IAAI;EAAE,QAAQ,KAAK,KAAK,CAAC;EAAG,OAAO;CAAK,SAAS,OAAO;EAAE,OAAQ,MAAgC,SAAS,UAAU,MAAM;CAAM;AACnI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as identityProvider, r as identityProviders, t as IDENTITY_PROVIDERS } from "./registry-
|
|
1
|
+
import { n as identityProvider, r as identityProviders, t as IDENTITY_PROVIDERS } from "./registry-BfNcA6kF.js";
|
|
2
2
|
export { IDENTITY_PROVIDERS, identityProvider, identityProviders };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as parseSshPublicKey, At as didWebDocumentUrl, Bt as staticDidDocument, Cn as pubkyHomeserverOf, Dt as didGhostlyServiceEntry, Ei as normalizeDomain, Et as checkDidSignature, Ft as normalizeDid, It as parseDid, Kt as resolveDidDht, Lt as parseDidDocument, Mt as didWebFileNames, Nt as didWebFileUrl, Ot as didJwsAlg, Pt as didWebHost, Q as SshSigError, Rt as parseDidSignaturePaste, Si as domainWellKnownFile, Sn as homeserverWebEndpoint, St as DID_FILE_MAX_BYTES, Tt as checkDidJws, Vt as strictBase64Url, Z as SSHSIG_NAMESPACE, _n as newPubkyProofFolder, _u as
|
|
2
|
-
import { _ as reserveAdapterIds, a as DomainCheckError, b as testBuild, c as assertPublicHost, d as ownDid, i as verifiedAtprotoHandle, l as chosenResolver, m as registeredIdentityProviders, n as resolveAtprotoDid, o as assertDomainRecord, r as resolveAtprotoHandle, s as assertNip05, t as assertPublicServer, u as resolverById, v as boundedIdentityFetch } from "./resolve-
|
|
1
|
+
import { $ as parseSshPublicKey, At as didWebDocumentUrl, Bt as staticDidDocument, Cn as pubkyHomeserverOf, Cu as utf8Encode, Dt as didGhostlyServiceEntry, Ei as normalizeDomain, Et as checkDidSignature, Ft as normalizeDid, It as parseDid, Kt as resolveDidDht, Lt as parseDidDocument, Mt as didWebFileNames, Nt as didWebFileUrl, Ot as didJwsAlg, Pt as didWebHost, Q as SshSigError, Rt as parseDidSignaturePaste, Si as domainWellKnownFile, Sn as homeserverWebEndpoint, St as DID_FILE_MAX_BYTES, Su as utf8Decode, Tt as checkDidJws, Vt as strictBase64Url, Z as SSHSIG_NAMESPACE, _n as newPubkyProofFolder, _u as fromBase64Url, at as BitcoinAddressError, bi as dnsProofName, bn as pubkyProofFile, bt as verifyAtprotoRecordProof, bu as toBase64Url, ct as ATPROTO_FULL_SCOPE, et as parseSshSignature, ft as atprotoProofRecord, gn as isPubkyProofFolder, gt as normalizeAtprotoHandle, hn as isPubkyKey, ht as isAtprotoDid, it as verifyBitcoinMessage, ji as wellKnownUrl, jt as didWebFile, kt as didSignedMessages, lt as ATPROTO_PROOF_COLLECTION, mn as PUBKY_PROOF_MAX_BYTES, mt as checkAtprotoProofRecord, nt as sshSignCommand, ot as decodeAnyBitcoinAddress, ou as openRelayPayload, pt as atprotoProofRkey, rt as verifySshSignature, ru as RELAY_PAYLOAD_MAX_BYTES, st as ATPROTO_DECLARED_SCOPE, tt as sameSshKey, ut as ATPROTO_PROOF_SCOPE, vn as normalizePubkyKey, vt as shortAtprotoDid, wt as DidError, xi as domainTxtRecord, xn as pubkyProofPath, xt as DID_DOCUMENT_MAX_BYTES, yn as pubkyProofCapability, yt as AtprotoProofError, yu as randomBytes, zi as IdentityCheckUnavailable, zt as signingKeys } from "./src-BMHgbkli.js";
|
|
2
|
+
import { _ as reserveAdapterIds, a as DomainCheckError, b as testBuild, c as assertPublicHost, d as ownDid, i as verifiedAtprotoHandle, l as chosenResolver, m as registeredIdentityProviders, n as resolveAtprotoDid, o as assertDomainRecord, r as resolveAtprotoHandle, s as assertNip05, t as assertPublicServer, u as resolverById, v as boundedIdentityFetch } from "./resolve-hUsgRkmm.js";
|
|
3
3
|
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
4
4
|
import { sha256 } from "@noble/hashes/sha2.js";
|
|
5
5
|
import { schnorr } from "@noble/curves/secp256k1.js";
|
|
@@ -3775,4 +3775,4 @@ function identityProvider(id, providers = identityProviders()) {
|
|
|
3775
3775
|
//#endregion
|
|
3776
3776
|
export { identityProvider as n, identityProviders as r, IDENTITY_PROVIDERS as t };
|
|
3777
3777
|
|
|
3778
|
-
//# sourceMappingURL=registry-
|
|
3778
|
+
//# sourceMappingURL=registry-BfNcA6kF.js.map
|