(configPath: string)
| 173 | } |
| 174 | |
| 175 | export function hashRemoteConfigFile(configPath: string): string { |
| 176 | try { |
| 177 | return crypto.createHash('sha256').update(fs.readFileSync(configPath)).digest('hex'); |
| 178 | } catch (error) { |
| 179 | throw new AppError('INVALID_ARGS', `Remote config file not found: ${configPath}`, { |
| 180 | cause: error instanceof Error ? error.message : String(error), |
| 181 | }); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | function remoteConnectionStatePath(options: { stateDir: string; session: string }): string { |
| 186 | return path.join( |