({
filePath,
content,
}: {
filePath: string
content: JsonValue
})
| 111 | ) |
| 112 | |
| 113 | const writeFileJson = ({ |
| 114 | filePath, |
| 115 | content, |
| 116 | }: { |
| 117 | filePath: string |
| 118 | content: JsonValue |
| 119 | }): T.Effect<OT.HasTracer, WriteFileError | JsonStringifyError, void> => |
| 120 | pipe( |
| 121 | T.tryCatch( |
| 122 | () => JSON.stringify(content, null, 2) + '\n', |
| 123 | (error) => new JsonStringifyError({ error }), |
| 124 | ), |
| 125 | T.chain((contentStr) => writeFile(filePath, contentStr)), |
| 126 | ) |
| 127 | |
| 128 | const mkdirp = <T extends string>(dirPath: T): T.Effect<OT.HasTracer, MkdirError, void> => |
| 129 | OT.withSpan('mkdirp', { attributes: { dirPath } })( |
nothing calls this directly
no test coverage detected
searching dependent graphs…