MCPcopy Create free account
hub / github.com/cloudflare/computer / runPostPull

Function runPostPull

packages/computer/src/shell.ts:430–448  ·  view source on GitHub ↗
(sync: Sync)

Source from the content-addressed store, hash-verified

428}
429
430async function runPostPull(sync: Sync): Promise<PostPullOutcome> {
431 try {
432 const result = await sync.pull();
433 return {
434 applied: result.applied,
435 skipped: result.skipped,
436 sync: { status: "complete", applied: result.applied, skipped: result.skipped },
437 };
438 } catch (error) {
439 try {
440 await sync.onPullPending?.(error);
441 } catch {}
442 return {
443 applied: 0,
444 skipped: [],
445 sync: { status: "pending", applied: 0, skipped: [], error: safeErrorMessage(error) },
446 };
447 }
448}
449
450async function drainToResult<E extends ExecEncoding>(
451 stream: ReadableStream<WorkspaceExecEvent<E>>,

Callers 1

pullFunction · 0.85

Calls 3

safeErrorMessageFunction · 0.85
onPullPendingMethod · 0.80
pullMethod · 0.65

Tested by

no test coverage detected