(options: LocalExecutorOptions = {})
| 249 | }; |
| 250 | |
| 251 | export const createExecutorHandle = async (options: LocalExecutorOptions = {}) => { |
| 252 | const layer = createLocalExecutorLayer(options); |
| 253 | const runtime = ManagedRuntime.make(layer); |
| 254 | const bundle = await runtime.runPromise(LocalExecutorTag.asEffect()); |
| 255 | |
| 256 | return { |
| 257 | executor: bundle.executor, |
| 258 | plugins: bundle.plugins, |
| 259 | webBaseUrl: bundle.webBaseUrl, |
| 260 | dispose: async () => { |
| 261 | await Effect.runPromise(Effect.ignore(bundle.executor.close())); |
| 262 | await ignorePromiseFailure("disposeRuntime", () => runtime.dispose()); |
| 263 | }, |
| 264 | }; |
| 265 | }; |
| 266 | |
| 267 | class SharedHandleCreateError extends Data.TaggedError("SharedHandleCreateError")<{ |
| 268 | readonly cause: unknown; |
no test coverage detected