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

Function captureExports

apps/host-selfhost/src/telemetry.test.ts:213–237  ·  view source on GitHub ↗
(
  env: Record<string, string | undefined>,
  options?: { readonly log?: boolean },
)

Source from the content-addressed store, hash-verified

211};
212
213const captureExports = async (
214 env: Record<string, string | undefined>,
215 options?: { readonly log?: boolean },
216): Promise<Array<Request>> => {
217 const seen: Array<Request> = [];
218 await Effect.runPromise(
219 Effect.gen(function* () {
220 if (options?.log) yield* Effect.logInfo("probe log");
221 }).pipe(
222 Effect.withSpan("probe"),
223 Effect.provide(
224 makeTelemetryLive(env).pipe(
225 Layer.provide(
226 stubFetch((request) => {
227 seen.push(request);
228 return new Response(null, { status: 200 });
229 }),
230 ),
231 ),
232 ),
233 Effect.scoped,
234 ),
235 );
236 return seen;
237};

Callers 3

telemetry.test.tsFile · 0.85
captureExportUrlsFunction · 0.85
captureExportHeadersFunction · 0.85

Calls 3

makeTelemetryLiveFunction · 0.90
pushMethod · 0.80
stubFetchFunction · 0.70

Tested by

no test coverage detected