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

Function readPackagesWhenExists

scripts/validate-changesets.ts:98–102  ·  view source on GitHub ↗
(fs: FileSystem.FileSystem, path: Path.Path, packagesDir: string)

Source from the content-addressed store, hash-verified

96
97const readPackagesWhenExists =
98 (fs: FileSystem.FileSystem, path: Path.Path, packagesDir: string) => (exists: boolean) =>
99 Effect.if(exists, {
100 onTrue: () => readDirectoryPackages(fs, path, packagesDir),
101 onFalse: () => Effect.succeed([]),
102 });
103
104const readPackagesDir = (
105 directoryName: string,

Callers 1

readPackagesDirFunction · 0.85

Calls 1

readDirectoryPackagesFunction · 0.85

Tested by

no test coverage detected