(filePath: string)
| 94 | } |
| 95 | |
| 96 | async function getParsedFileSize(filePath: string) { |
| 97 | const sizeInBytes = await getFileSize(filePath); |
| 98 | |
| 99 | let message = `Size in bytes: ${sizeInBytes}`; |
| 100 | |
| 101 | if (sizeInBytes > 1024 * 1024) { |
| 102 | const sizeInMB = (sizeInBytes / 1024 / 1024).toFixed(2); |
| 103 | message = `Size in MB (rounded): ${sizeInMB}`; |
| 104 | } else if (sizeInBytes > 1024) { |
| 105 | const sizeInKB = (sizeInBytes / 1024).toFixed(2); |
| 106 | message = `Size in KB (rounded): ${sizeInKB}`; |
| 107 | } |
| 108 | |
| 109 | return { |
| 110 | path: filePath, |
| 111 | sizeInBytes, |
| 112 | message, |
| 113 | }; |
| 114 | } |
| 115 | |
| 116 | class Checkpointer { |
| 117 | #initialized = false; |
no test coverage detected
searching dependent graphs…