(text: string)
| 70 | } |
| 71 | |
| 72 | export function sourceFileSnapshotFromText(text: string): SourceFileSnapshot { |
| 73 | const bytes = Buffer.from(text, "utf8"); |
| 74 | return { |
| 75 | text, |
| 76 | hash: hashSourceBytes(bytes), |
| 77 | mtimeMs: 0, |
| 78 | size: bytes.byteLength, |
| 79 | eol: detectSourceEol(text), |
| 80 | }; |
| 81 | } |
| 82 | |
| 83 | export function resolveFolderSourceFile(filePath: string, folderPath: string): string | null { |
| 84 | if (!isSourceSaveFilePath(filePath)) return null; |
no test coverage detected