MCPcopy Index your code
hub / github.com/CapSoftware/Cap / runPromise

Function runPromise

apps/web/lib/server.ts:139–151  ·  view source on GitHub ↗
(
	effect: Effect.Effect<A, E, Layer.Layer.Success<typeof Dependencies>>,
)

Source from the content-addressed store, hash-verified

137const EffectRuntime = ManagedRuntime.make(Dependencies);
138
139export const runPromise = <A, E>(
140 effect: Effect.Effect<A, E, Layer.Layer.Success<typeof Dependencies>>,
141) =>
142 EffectRuntime.runPromiseExit(
143 effect.pipe(Effect.provide(CookiePasswordAttachmentLive)),
144 ).then((res) => {
145 if (Exit.isFailure(res)) {
146 if (Cause.isDieType(res.cause)) throw res.cause.defect;
147 throw res;
148 }
149
150 return res.value;
151 });
152
153export const runPromiseExit = <A, E>(
154 effect: Effect.Effect<A, E, Layer.Layer.Success<typeof Dependencies>>,

Callers 9

getVideoAnalyticsFunction · 0.90
invalidateVideoCacheFunction · 0.90
invalidateResultCacheFunction · 0.90
DashboardLayoutFunction · 0.90
getOrgAnalyticsDataFunction · 0.90
AppProvidersFunction · 0.90
GETFunction · 0.90
POSTFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected