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

Function makeService

apps/cloud/src/auth/context.ts:17–24  ·  view source on GitHub ↗
(store: RawStore)

Source from the content-addressed store, hash-verified

15// public error alongside the classified driver reason — an error report is
16// diagnosable without the trace.
17const makeService = (store: RawStore) => ({
18 use: <A>(op: string, fn: (s: RawStore) => Promise<A>) =>
19 withServiceLogging(
20 `user_store.${op}`,
21 (failure) => userStoreErrorFromFailure(op, failure),
22 tryPromiseService(() => fn(store)),
23 ),
24});
25
26type UserStoreServiceType = ReturnType<typeof makeService>;
27

Callers 2

UserStoreServiceClass · 0.85
makeUserStoreLayerFunction · 0.85

Calls 3

withServiceLoggingFunction · 0.90
tryPromiseServiceFunction · 0.90

Tested by

no test coverage detected