MCPcopy Create free account
hub / github.com/CodeForBreakfast/eventsourcing / checkAndReadChangesets

Function checkAndReadChangesets

scripts/validate-changesets.ts:243–250  ·  view source on GitHub ↗
(fs: FileSystem.FileSystem, path: Path.Path, changesetsDir: string)

Source from the content-addressed store, hash-verified

241
242const checkAndReadChangesets =
243 (fs: FileSystem.FileSystem, path: Path.Path, changesetsDir: string) => (exists: boolean) =>
244 pipe(
245 exists,
246 Match.value,
247 Match.when(true, () => readChangesetDirectory(fs, path, changesetsDir)),
248 Match.when(false, () => Effect.succeed([])),
249 Match.exhaustive
250 );
251
252const readChangesetsFromDirectory = ([fs, path, rootDir]: readonly [
253 FileSystem.FileSystem,

Callers 1

Calls 1

readChangesetDirectoryFunction · 0.85

Tested by

no test coverage detected