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

Function makeService

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

Source from the content-addressed store, hash-verified

13// instead of one undifferentiated "user_store" bucket, and failures log which
14// query actually failed.
15const makeService = (store: RawStore) => ({
16 use: <A>(op: string, fn: (s: RawStore) => Promise<A>) =>
17 withServiceLogging(
18 `user_store.${op}`,
19 () => new UserStoreError(),
20 tryPromiseService(() => fn(store)),
21 ),
22});
23
24type UserStoreServiceType = ReturnType<typeof makeService>;
25

Callers 2

UserStoreServiceClass · 0.85
makeUserStoreLayerFunction · 0.85

Calls 2

withServiceLoggingFunction · 0.90
tryPromiseServiceFunction · 0.90

Tested by

no test coverage detected