()
| 726 | } |
| 727 | |
| 728 | async function loadCreatePatch(): Promise<CreatePatchFn> { |
| 729 | try { |
| 730 | const mod = await import("diff"); |
| 731 | return mod.createPatch; |
| 732 | } catch (cause) { |
| 733 | throw new Error("Failed to load @cloudflare/computer/git's bundled diff implementation.", { |
| 734 | cause, |
| 735 | }); |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | function readFileFrom(fs: IsomorphicGitFSClient): ReadFileFn { |
| 740 | // `fs.promises` is typed as `object` on the public surface; the |