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