(file: string)
| 83 | ) |
| 84 | |
| 85 | const dumpFile = (file: string) => |
| 86 | Effect.gen(function*() { |
| 87 | const fs = yield* FileSystem |
| 88 | const path = yield* Path |
| 89 | const dump = yield* dumpAll |
| 90 | yield* fs.makeDirectory(path.dirname(file), { recursive: true }) |
| 91 | yield* fs.writeFileString(file, dump) |
| 92 | }).pipe( |
| 93 | Effect.mapError((error) => new Migrator.MigrationError({ reason: "failed", message: error.message })) |
| 94 | ) |
| 95 | |
| 96 | return dumpFile(path) |
| 97 | } |