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