(
script: string,
flags: CommandFlags | undefined,
options: ReplayInputParseOptions = {},
)
| 45 | 'replay -u is not supported for compat flow input. Convert to .ad first, then update that replay file.'; |
| 46 | |
| 47 | export function parseReplayInput( |
| 48 | script: string, |
| 49 | flags: CommandFlags | undefined, |
| 50 | options: ReplayInputParseOptions = {}, |
| 51 | ): ParsedReplayInput { |
| 52 | const compatParser = readReplayCompatParser(flags); |
| 53 | if (compatParser) { |
| 54 | return { |
| 55 | ...compatParser.parse(script, { |
| 56 | ...options, |
| 57 | platform: flags?.platform, |
| 58 | env: readReplayCompatEnv(flags), |
| 59 | }), |
| 60 | updateUnsupportedMessage: COMPAT_UPDATE_UNSUPPORTED_MESSAGE, |
| 61 | }; |
| 62 | } |
| 63 | |
| 64 | return { |
| 65 | ...parseReplayScriptDetailed(script), |
| 66 | metadata: readReplayScriptMetadata(script), |
| 67 | }; |
| 68 | } |
| 69 | |
| 70 | function readReplayCompatEnv(flags: CommandFlags | undefined): Record<string, string> { |
| 71 | return { |
no test coverage detected