MCPcopy Create free account
hub / github.com/callstack/agent-device / settle

Function settle

src/remote/daemon-artifacts.ts:354–363  ·  view source on GitHub ↗
(error?: Error)

Source from the content-addressed store, hash-verified

352 let settled = false;
353 const timeoutMs = params.timeoutMs ?? REMOTE_ARTIFACT_DOWNLOAD_TIMEOUT_MS;
354 const settle = (error?: Error) => {
355 if (settled) return;
356 settled = true;
357 clearTimeout(timeoutHandle);
358 if (error) {
359 void fs.promises.rm(params.destinationPath, { force: true }).finally(() => reject(error));
360 return;
361 }
362 resolve();
363 };
364 const request = transport.request(
365 {
366 protocol: artifactUrl.protocol,

Callers 1

downloadRemoteArtifactFunction · 0.70

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…