(
env: Record<string, string | undefined>,
options?: { readonly log?: boolean },
)
| 211 | }; |
| 212 | |
| 213 | const 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 | }; |
no test coverage detected