(query: URLSearchParams)
| 330 | 'match them. The next sync picks it up.'; |
| 331 | |
| 332 | export function parseOnDrift(query: URLSearchParams): OnDrift { |
| 333 | const raw = query.get('ondrift'); |
| 334 | if (raw === null || raw === '' || raw === 'omit') return 'omit'; |
| 335 | if (raw === 'current') return 'current'; |
| 336 | throw badRequest( |
| 337 | `Parameter "ondrift" must be "omit" or "current" (got "${raw}").`, |
| 338 | 'Omit it to leave a drifted file unsliced; "current" serves the bytes on disk instead.' |
| 339 | ); |
| 340 | } |
| 341 | |
| 342 | export async function buildSource( |
| 343 | cg: CodeGraph, |
no test coverage detected