(
path: string,
sha?: string | null,
{
branch = this.branch,
repoURL = this.repoURL,
parseText = true,
}: {
branch?: string;
repoURL?: string;
parseText?: boolean;
} = {},
)
| 244 | } |
| 245 | |
| 246 | async readFile( |
| 247 | path: string, |
| 248 | sha?: string | null, |
| 249 | { |
| 250 | branch = this.branch, |
| 251 | repoURL = this.repoURL, |
| 252 | parseText = true, |
| 253 | }: { |
| 254 | branch?: string; |
| 255 | repoURL?: string; |
| 256 | parseText?: boolean; |
| 257 | } = {}, |
| 258 | ) { |
| 259 | if (!sha) { |
| 260 | sha = await this.getFileSha(path, { repoURL, branch }); |
| 261 | } |
| 262 | const fetchContent = () => this.fetchBlobContent({ sha: sha as string, repoURL, parseText }); |
| 263 | const content = await readFile(sha, fetchContent, localForage, parseText); |
| 264 | return content; |
| 265 | } |
| 266 | |
| 267 | async fetchBlobContent({ sha, repoURL, parseText }: BlobArgs) { |
| 268 | if (!parseText) { |
nothing calls this directly
no test coverage detected