( scan: FeedbackCodebaseScanResult, archivePath: string, )
| 19 | * Pack the scanned codebase into a zip, with files placed at the zip root. |
| 20 | */ |
| 21 | export async function packageCodebase( |
| 22 | scan: FeedbackCodebaseScanResult, |
| 23 | archivePath: string, |
| 24 | ): Promise<FeedbackArchive> { |
| 25 | const entries: PackageEntry[] = scan.files.map((file) => ({ |
| 26 | absolutePath: file.absolutePath, |
| 27 | archivePath: file.path, |
| 28 | size: file.size, |
| 29 | mtimeMs: file.mtimeMs, |
| 30 | })); |
| 31 | return packageEntries(entries, archivePath); |
| 32 | } |
| 33 | |
| 34 | async function packageEntries( |
| 35 | entries: readonly PackageEntry[], |
no test coverage detected