Download packages/migration-legacy/src/report.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 625 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/migration-legacy/src/report.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/migration-legacy/src/report.ts
-
curl -L -o report.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/migration-legacy/src/report.ts
625 Bytes
| import { mkdir } from 'node:fs/promises'; | |
| import { atomicWrite } from './atomic-write.js'; | |
| import { migrationReportFile } from './paths.js'; | |
| import type { MigrationReport } from './types.js'; | |
| /** | |
| * Writes the migration report as pretty-printed JSON to | |
| * `<targetHome>/migration-report.json`. Creates the target directory with | |
| * mode 0700 if it does not yet exist. | |
| */ | |
| export async function writeReport( | |
| targetHome: string, | |
| report: MigrationReport, | |
| ): Promise<void> { | |
| await mkdir(targetHome, { recursive: true, mode: 0o700 }); | |
| await atomicWrite(migrationReportFile(targetHome), JSON.stringify(report, null, 2)); | |
| } | |