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

Function writeDaemonRegistryEntry

src/daemon/daemon-registry.ts:271–286  ·  view source on GitHub ↗
(
  entry: DaemonRegistryEntry,
  options: WriteDaemonRegistryEntryOptions = {},
)

Source from the content-addressed store, hash-verified

269 * Creates the daemon metadata directory if it doesn't exist.
270 */
271export function writeDaemonRegistryEntry(
272 entry: DaemonRegistryEntry,
273 options: WriteDaemonRegistryEntryOptions = {},
274): void {
275 const result = withDaemonRegistryMutationLock(
276 entry.workspaceKey,
277 () => {
278 const registryPath = registryPathForWorkspaceKey(entry.workspaceKey);
279 writeFileAtomicSync(registryPath, `${JSON.stringify(entry, null, 2)}\n`);
280 },
281 options.lock,
282 );
283 if (result === null) {
284 throw new Error(`Unable to acquire daemon registry lock for ${entry.workspaceKey}`);
285 }
286}
287
288/**
289 * Read a daemon registry entry by workspace key.

Callers 4

mainFunction · 0.90

Calls 3

writeFileAtomicSyncFunction · 0.85

Tested by

no test coverage detected