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

Function captureExports

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

Source from the content-addressed store, hash-verified

116};
117
118const captureExports = async (
119 env: Record<string, string | undefined>,
120 options?: { readonly log?: boolean },
121): Promise<Array<Request>> => {
122 const seen: Array<Request> = [];
123 await Effect.runPromise(
124 Effect.gen(function* () {
125 if (options?.log) yield* Effect.logInfo("probe log");
126 }).pipe(
127 Effect.withSpan("probe"),
128 Effect.provide(
129 makeTelemetryLive(env).pipe(
130 Layer.provide(
131 stubFetch((request) => {
132 seen.push(request);
133 return new Response(null, { status: 200 });
134 }),
135 ),
136 ),
137 ),
138 Effect.scoped,
139 ),
140 );
141 return seen;
142};

Callers 3

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

Calls 3

makeTelemetryLiveFunction · 0.90
stubFetchFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected