(source: string)
| 35 | }) |
| 36 | |
| 37 | function tempEntrypoint(source: string) { |
| 38 | return Effect.acquireRelease( |
| 39 | Effect.promise(async () => { |
| 40 | const directory = await fs.mkdtemp(path.join(os.tmpdir(), "opencode-provider-dynamic-")) |
| 41 | const entrypoint = path.join(directory, "provider.mjs") |
| 42 | await Bun.write(entrypoint, source) |
| 43 | return { directory, entrypoint } |
| 44 | }), |
| 45 | (tmp) => Effect.promise(() => fs.rm(tmp.directory, { recursive: true, force: true })), |
| 46 | ) |
| 47 | } |
| 48 | |
| 49 | describe("DynamicProviderPlugin", () => { |
| 50 | it.effect("creates an SDK from a provider factory export", () => |
no test coverage detected