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

Function validateReplayExportOptions

src/cli/commands/replay.ts:67–90  ·  view source on GitHub ↗
(
  positionals: ReplayCommandParams['positionals'],
  flags: ReplayCommandParams['flags'],
)

Source from the content-addressed store, hash-verified

65}
66
67function validateReplayExportOptions(
68 positionals: ReplayCommandParams['positionals'],
69 flags: ReplayCommandParams['flags'],
70): void {
71 if (positionals.length > 2) {
72 throw new AppError(
73 'INVALID_ARGS',
74 'replay export accepts exactly one input path: replay export <file.ad>',
75 );
76 }
77 if (flags.replayUpdate) {
78 throw new AppError('INVALID_ARGS', 'replay export does not support --update.');
79 }
80 if (flags.replayMaestro) {
81 throw new AppError('INVALID_ARGS', 'replay export reads .ad files; omit --maestro.');
82 }
83 if (flags.replayEnv?.length) {
84 throw new AppError('INVALID_ARGS', 'replay export does not evaluate --env substitutions.');
85 }
86 const format = flags.replayExportFormat ?? 'maestro';
87 if (format !== 'maestro') {
88 throw new AppError('INVALID_ARGS', `Unsupported replay export format: ${format}`);
89 }
90}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…