(file: string)
| 63 | ) |
| 64 | |
| 65 | const dumpFile = (file: string) => |
| 66 | Effect.gen(function*() { |
| 67 | const fs = yield* FileSystem |
| 68 | const path = yield* Path |
| 69 | const dump = yield* dumpAll |
| 70 | yield* fs.makeDirectory(path.dirname(file), { recursive: true }) |
| 71 | yield* fs.writeFileString(file, dump) |
| 72 | }).pipe( |
| 73 | Effect.mapError((error) => new Migrator.MigrationError({ reason: "failed", message: error.message })) |
| 74 | ) |
| 75 | |
| 76 | return dumpFile(path) |
| 77 | } |