()
| 15 | import { hashRunnerCliApiToken, isRunnerStateCompatibleWithIdentity } from './runnerIdentity'; |
| 16 | |
| 17 | export function getInstalledCliMtimeMs(): number | undefined { |
| 18 | if (isBunCompiled()) { |
| 19 | try { |
| 20 | return statSync(process.execPath).mtimeMs; |
| 21 | } catch { |
| 22 | return undefined; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | const packageJsonPath = join(projectPath(), 'package.json'); |
| 27 | if (!existsSync(packageJsonPath)) { |
| 28 | return undefined; |
| 29 | } |
| 30 | |
| 31 | try { |
| 32 | return statSync(packageJsonPath).mtimeMs; |
| 33 | } catch { |
| 34 | return undefined; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | async function runnerPost(path: string, body?: any): Promise<{ error?: string } | any> { |
| 39 | const state = await readRunnerState(); |
no test coverage detected