()
| 1089 | } |
| 1090 | |
| 1091 | function currentScreenSize() { |
| 1092 | const result = run( |
| 1093 | simdeckBin, |
| 1094 | ["describe", "--format", "agent", "--max-depth", "1", "-i"], |
| 1095 | { timeoutMs: 10000 }, |
| 1096 | ); |
| 1097 | const match = result.stdout.match( |
| 1098 | /Application:[^\n]*@\S+\s+([0-9.]+)x([0-9.]+)/, |
| 1099 | ); |
| 1100 | if (!match) { |
| 1101 | return { width: 402, height: 874 }; |
| 1102 | } |
| 1103 | return { width: Number(match[1]), height: Number(match[2]) }; |
| 1104 | } |
| 1105 | |
| 1106 | function readVersion(command, args) { |
| 1107 | const result = run(command, args, { timeoutMs: 5000, allowFailure: true }); |
no test coverage detected