(absolutePath: string)
| 111 | } |
| 112 | |
| 113 | const inferCompressedFormat = (absolutePath: string): ImportFileFormat | undefined => { |
| 114 | const normalized = absolutePath.toLowerCase() |
| 115 | |
| 116 | if (normalized.endsWith('.jsonl.gz') || normalized.endsWith('.jsonl.xz')) { |
| 117 | return 'jsonl' |
| 118 | } |
| 119 | |
| 120 | if (normalized.endsWith('.json.gz') || normalized.endsWith('.json.xz')) { |
| 121 | return 'json' |
| 122 | } |
| 123 | |
| 124 | return undefined |
| 125 | } |
| 126 | |
| 127 | const ensureValidInputFile = async (filePath: string): Promise<InputFileSpec> => { |
| 128 | const absolutePath = resolve(process.cwd(), filePath) |
no outgoing calls
no test coverage detected