(scriptName: string)
| 11 | } from '../core/recording-export-quality.ts'; |
| 12 | |
| 13 | function resolveScriptPath(scriptName: string): string { |
| 14 | const moduleDir = path.dirname(fileURLToPath(import.meta.url)); |
| 15 | const scriptCandidates = [ |
| 16 | fileURLToPath(new URL(`./${scriptName}`, import.meta.url)), |
| 17 | path.resolve(moduleDir, `../../apple-runner/AgentDeviceRunner/RecordingScripts/${scriptName}`), |
| 18 | path.resolve( |
| 19 | moduleDir, |
| 20 | `../../../apple-runner/AgentDeviceRunner/RecordingScripts/${scriptName}`, |
| 21 | ), |
| 22 | path.resolve(process.cwd(), `apple-runner/AgentDeviceRunner/RecordingScripts/${scriptName}`), |
| 23 | ]; |
| 24 | |
| 25 | for (const candidate of scriptCandidates) { |
| 26 | if (fs.existsSync(candidate)) { |
| 27 | return candidate; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | throw new AppError('COMMAND_FAILED', `Missing recording helper script: ${scriptName}`, { |
| 32 | hint: 'Ensure apple-runner/AgentDeviceRunner/RecordingScripts is present in this checkout or bundled with the package.', |
| 33 | scriptName, |
| 34 | searchedPaths: scriptCandidates, |
| 35 | }); |
| 36 | } |
| 37 | |
| 38 | let overlayScriptPath: string | undefined; |
| 39 | let trimScriptPath: string | undefined; |
no outgoing calls
no test coverage detected
searching dependent graphs…