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

Function readBatchSteps

src/cli.ts:471–487  ·  view source on GitHub ↗
(flags: ReturnType<typeof resolveCliOptions>['flags'])

Source from the content-addressed store, hash-verified

469}
470
471function readBatchSteps(flags: ReturnType<typeof resolveCliOptions>['flags']): BatchStep[] {
472 let raw = '';
473 if (flags.steps) {
474 raw = flags.steps;
475 } else if (flags.stepsFile) {
476 try {
477 raw = fs.readFileSync(flags.stepsFile, 'utf8');
478 } catch (error) {
479 const message = error instanceof Error ? error.message : String(error);
480 throw new AppError(
481 'INVALID_ARGS',
482 `Failed to read --steps-file ${flags.stepsFile}: ${message}`,
483 );
484 }
485 }
486 return readCliBatchStepsJson(raw);
487}
488
489function isDaemonStartupFailure(error: AppError): boolean {
490 if (error.code !== 'COMMAND_FAILED') return false;

Callers 1

runCliFunction · 0.70

Calls 1

readCliBatchStepsJsonFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…