| 311 | { parseText = true, branch = this.branch, head = '' } = {}, |
| 312 | ): Promise<string | Blob> => { |
| 313 | const fetchContent = async () => { |
| 314 | const node = head ? head : await this.branchCommitSha(branch); |
| 315 | const content = await this.request({ |
| 316 | url: `${this.repoURL}/src/${node}/${path}`, |
| 317 | cache: 'no-store', |
| 318 | }).then<string | Blob>(parseText ? this.responseToText : this.responseToBlob); |
| 319 | return content; |
| 320 | }; |
| 321 | const content = await readFile(sha, fetchContent, localForage, parseText); |
| 322 | return content; |
| 323 | }; |