MCPcopy Index your code
hub / github.com/callstack/agent-device / completeInstallFromSource

Function completeInstallFromSource

src/daemon/handlers/install-source.ts:204–231  ·  view source on GitHub ↗
(
  params: CompleteInstallFromSourceParams,
)

Source from the content-addressed store, hash-verified

202}
203
204async function completeInstallFromSource(
205 params: CompleteInstallFromSourceParams,
206): Promise<DaemonResponse> {
207 let retained: RetainedMaterializedPaths | undefined;
208 try {
209 retained = await maybeRetainInstallArtifact(params);
210 const result = await params.buildResult(retained);
211 const data = withSuccessText(result, buildInstallFromSourceMessage(result));
212 recordInstallFromSourceAction({
213 session: params.session,
214 sessionStore: params.sessionStore,
215 req: params.req,
216 data,
217 });
218 return { ok: true, data };
219 } catch (error) {
220 if (retained) {
221 await cleanupRetainedMaterializedPaths(
222 retained.materializationId,
223 params.req.meta?.tenantId,
224 ).catch(() => {});
225 }
226 throw error;
227 } finally {
228 await params.prepared.cleanup();
229 params.resolvedSourceCleanup();
230 }
231}
232
233async function installPreparedIosArtifact(
234 device: SessionState['device'],

Callers 1

Tested by

no test coverage detected