()
| 122 | `${JSON.stringify(store, null, 2)}\n`; |
| 123 | |
| 124 | export const readCliServerConnectionStore = (): Effect.Effect< |
| 125 | CliServerConnectionStore, |
| 126 | never, |
| 127 | FileSystem.FileSystem | Path.Path |
| 128 | > => |
| 129 | Effect.gen(function* () { |
| 130 | const fs = yield* FileSystem.FileSystem; |
| 131 | const path = yield* Path.Path; |
| 132 | const raw = yield* fs |
| 133 | .readFileString(serverConnectionStorePath(path)) |
| 134 | .pipe(Effect.catchCause(() => Effect.succeed(null))); |
| 135 | if (raw === null) return emptyCliServerConnectionStore; |
| 136 | return parseCliServerConnectionStore(raw); |
| 137 | }); |
| 138 | |
| 139 | export const writeCliServerConnectionStore = ( |
| 140 | store: CliServerConnectionStore, |
no test coverage detected