(service: "okta" | "mcp")
| 83 | * shipped in `@executor-js/emulate` 0.14.0, and the npm package is the version |
| 84 | * this checkout pins — a hosted instance is whatever was last deployed. */ |
| 85 | const emulator = (service: "okta" | "mcp") => |
| 86 | Effect.acquireRelease( |
| 87 | Effect.gen(function* () { |
| 88 | const port = yield* availablePort; |
| 89 | return yield* Effect.promise(() => createEmulator({ service, port })); |
| 90 | }), |
| 91 | (instance: Emulator) => Effect.promise(() => instance.close()).pipe(Effect.ignore), |
| 92 | ); |
| 93 | |
| 94 | const requireString = (value: string | undefined | null, what: string): string => { |
| 95 | if (!value) throw new Error(`emulator returned no ${what}`); |
no test coverage detected