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

Function appendRecordActionScriptArgs

src/replay/script-utils.ts:128–148  ·  view source on GitHub ↗
(parts: string[], action: SessionAction)

Source from the content-addressed store, hash-verified

126}
127
128export function appendRecordActionScriptArgs(parts: string[], action: SessionAction): void {
129 const [subcommand, ...rest] = action.positionals ?? [];
130 if (subcommand) {
131 parts.push(formatScriptArgQuoteIfNeeded(subcommand));
132 }
133 for (const positional of rest) {
134 parts.push(formatScriptArg(positional));
135 }
136 if (typeof action.flags?.fps === 'number') {
137 parts.push('--fps', String(action.flags.fps));
138 }
139 if (typeof action.flags?.screenshotMaxSize === 'number') {
140 parts.push('--max-size', String(action.flags.screenshotMaxSize));
141 }
142 if (typeof action.flags?.quality === 'number' || typeof action.flags?.quality === 'string') {
143 parts.push('--quality', String(action.flags.quality));
144 }
145 if (action.flags?.hideTouches) {
146 parts.push('--hide-touches');
147 }
148}
149
150export function appendSnapshotActionScriptArgs(parts: string[], action: SessionAction): void {
151 if (action.flags?.snapshotInteractiveOnly) parts.push('-i');

Callers 1

formatPortableActionLineFunction · 0.90

Calls 3

formatScriptArgFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected