(input: {
hostname: string;
port: number;
})
| 212 | }; |
| 213 | |
| 214 | export const readDaemonRecord = (input: { |
| 215 | hostname: string; |
| 216 | port: number; |
| 217 | }): Effect.Effect<DaemonRecord | null, never, FileSystem.FileSystem | Path.Path> => |
| 218 | Effect.gen(function* () { |
| 219 | const fs = yield* FileSystem.FileSystem; |
| 220 | const path = yield* Path.Path; |
| 221 | const raw = yield* fs |
| 222 | .readFileString(daemonRecordPath(path, input)) |
| 223 | .pipe(Effect.catchCause(() => Effect.succeed(null))); |
| 224 | if (raw === null) return null; |
| 225 | return parseRecord(raw); |
| 226 | }); |
| 227 | |
| 228 | export const removeDaemonRecord = (input: { |
| 229 | hostname: string; |
no test coverage detected