MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / read

Function read

apps/cloud/src/auth/member-directory.ts:45–53  ·  view source on GitHub ↗
(op: string, fn: () => Promise<A>)

Source from the content-addressed store, hash-verified

43
44const makeService = (db: DrizzleDb): MemberDirectoryShape => {
45 const read = <A>(op: string, fn: () => Promise<A>) =>
46 withServiceLogging(
47 `member_directory.${op}`,
48 () =>
49 new MemberDirectoryError({
50 message: `Failed to read the member directory (${op})`,
51 }),
52 tryPromiseService(fn),
53 );
54
55 // One projection for every read, so the seam's row shape is built in exactly
56 // one place. `membershipId` is non-null by the `known` predicate below.

Callers 2

membersFunction · 0.70
makeServiceFunction · 0.70

Calls 2

withServiceLoggingFunction · 0.90
tryPromiseServiceFunction · 0.90

Tested by

no test coverage detected