MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / isDaemonRegistryEntry

Function isDaemonRegistryEntry

src/daemon/daemon-registry.ts:88–110  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

86}
87
88function isDaemonRegistryEntry(value: unknown): value is DaemonRegistryEntry {
89 if (typeof value !== 'object' || value === null) {
90 return false;
91 }
92
93 const entry = value as Partial<DaemonRegistryEntry>;
94 return (
95 typeof entry.workspaceKey === 'string' &&
96 entry.workspaceKey.length > 0 &&
97 typeof entry.workspaceRoot === 'string' &&
98 typeof entry.socketPath === 'string' &&
99 (entry.logPath === undefined || typeof entry.logPath === 'string') &&
100 typeof entry.pid === 'number' &&
101 Number.isInteger(entry.pid) &&
102 entry.pid > 0 &&
103 typeof entry.startedAt === 'string' &&
104 Array.isArray(entry.enabledWorkflows) &&
105 entry.enabledWorkflows.every((workflow) => typeof workflow === 'string') &&
106 typeof entry.version === 'string' &&
107 (entry.instanceId === undefined ||
108 (typeof entry.instanceId === 'string' && entry.instanceId.length > 0))
109 );
110}
111
112type RegistryReadResult =
113 | { status: 'missing' }

Callers 1

readRegistryEntryAtPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected