MCPcopy Index your code
hub / github.com/Effect-TS/effect / dumpFile

Function dumpFile

packages/sql-sqlite-bun/src/SqliteMigrator.ts:65–74  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

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 }

Callers 1

dumpSchemaFunction · 0.70

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected