refactor: extract shared sandbox and gateway plumbing

This commit is contained in:
Peter Steinberger
2026-03-02 23:16:02 +00:00
parent 350d041eaf
commit 7066d5e192
21 changed files with 870 additions and 675 deletions

View File

@@ -0,0 +1,15 @@
export function findDockerArgsCall(calls: unknown[][], command: string): string[] | undefined {
return calls.find((call) => Array.isArray(call[0]) && call[0][0] === command)?.[0] as
| string[]
| undefined;
}
export function collectDockerFlagValues(args: string[], flag: string): string[] {
const values: string[] = [];
for (let i = 0; i < args.length; i += 1) {
if (args[i] === flag && typeof args[i + 1] === "string") {
values.push(args[i + 1]);
}
}
return values;
}