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

Function readBatchDaemonStep

src/commands/batch/projection.ts:52–68  ·  view source on GitHub ↗
(
  step: unknown,
  stepNumber: number,
  prepareDaemonCommandRequest: PrepareDaemonCommandRequest,
)

Source from the content-addressed store, hash-verified

50}
51
52function readBatchDaemonStep(
53 step: unknown,
54 stepNumber: number,
55 prepareDaemonCommandRequest: PrepareDaemonCommandRequest,
56): DaemonBatchStep {
57 const record = readBatchStepRecord(step, stepNumber);
58 const command = readBatchStepCommand(record, stepNumber);
59 const input = readBatchStepInputObject(record, stepNumber) as CommandInput;
60 const runtime = parseBatchStepRuntime(record.runtime, stepNumber);
61 const prepared = prepareDaemonCommandRequest(command, input, stepNumber);
62 return {
63 command: prepared.command,
64 positionals: prepared.positionals,
65 flags: buildRequestFlags(prepared.options, prepared.metadataFlags),
66 runtime: runtime ?? prepared.options.runtime,
67 };
68}
69
70function readBatchStepCommand(
71 record: Record<string, unknown>,

Callers 1

readBatchDaemonStepsFunction · 0.85

Calls 6

readBatchStepRecordFunction · 0.90
readBatchStepInputObjectFunction · 0.90
parseBatchStepRuntimeFunction · 0.90
buildRequestFlagsFunction · 0.90
readBatchStepCommandFunction · 0.70

Tested by

no test coverage detected