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

Function parseReplayOpenFlags

src/replay/open-script.ts:21–41  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

19}
20
21export function parseReplayOpenFlags(args: string[]): {
22 positionals: string[];
23 flags: SessionAction['flags'];
24 runtime?: SessionAction['runtime'];
25} {
26 const argsWithoutRelaunch: string[] = [];
27 const flags: SessionAction['flags'] = {};
28 for (const token of args) {
29 if (token === '--relaunch') {
30 flags.relaunch = true;
31 continue;
32 }
33 argsWithoutRelaunch.push(token);
34 }
35 const parsedRuntime = parseReplayRuntimeFlags(argsWithoutRelaunch);
36 return {
37 positionals: parsedRuntime.positionals,
38 flags,
39 runtime: hasReplayOpenRuntimeHints(parsedRuntime.flags) ? parsedRuntime.flags : undefined,
40 };
41}
42
43function hasReplayOpenRuntimeHints(
44 flags: ReturnType<typeof parseReplayRuntimeFlags>['flags'],

Callers 1

parseReplayScriptLineFunction · 0.90

Calls 3

parseReplayRuntimeFlagsFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected