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

Function toInstallFromSourceDaemonRequest

src/daemon/server/http-server.ts:335–356  ·  view source on GitHub ↗
(
  params: Record<string, unknown>,
  headers: IncomingHttpHeaders,
)

Source from the content-addressed store, hash-verified

333}
334
335function toInstallFromSourceDaemonRequest(
336 params: Record<string, unknown>,
337 headers: IncomingHttpHeaders,
338): DaemonRequest {
339 const platform = readStringParam(params, 'platform');
340 if (platform !== 'ios' && platform !== 'android') {
341 throw new AppError('INVALID_ARGS', 'Invalid params: platform must be "ios" or "android"');
342 }
343 return {
344 token: resolveToken(params, headers),
345 session: readStringParam(params, 'session') ?? 'default',
346 command: 'install_source',
347 positionals: [],
348 flags: { platform },
349 meta: {
350 requestId: readStringParam(params, 'requestId'),
351 installSource: parseInstallSource(params),
352 retainMaterializedPaths: readBooleanParam(params, 'retainPaths'),
353 materializedPathRetentionMs: readIntParam(params, 'retentionMs'),
354 },
355 };
356}
357
358function toReleaseMaterializedPathsDaemonRequest(
359 params: Record<string, unknown>,

Callers 1

methodToDaemonRequestFunction · 0.85

Calls 5

readStringParamFunction · 0.85
resolveTokenFunction · 0.85
parseInstallSourceFunction · 0.85
readBooleanParamFunction · 0.85
readIntParamFunction · 0.85

Tested by

no test coverage detected