(parts: string[], action: SessionAction)
| 126 | } |
| 127 | |
| 128 | export 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 | |
| 150 | export function appendSnapshotActionScriptArgs(parts: string[], action: SessionAction): void { |
| 151 | if (action.flags?.snapshotInteractiveOnly) parts.push('-i'); |
no test coverage detected