MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / scopeKeyForPath

Function scopeKeyForPath

apps/cli/src/daemon-state.ts:80–81  ·  view source on GitHub ↗
(scopeId: string)

Source from the content-addressed store, hash-verified

78const sanitizeHostForPath = (hostname: string): string =>
79 hostname.replaceAll(/[^a-z0-9.-]+/gi, "_");
80const scopeKeyForPath = (scopeId: string): string =>
81 createHash("sha256").update(scopeId).digest("hex").slice(0, 24);
82
83const daemonRecordPath = (path: Path.Path, input: { hostname: string; port: number }): string => {
84 const host = sanitizeHostForPath(canonicalDaemonHost(input.hostname));

Callers 1

daemonPointerPathFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected