MCPcopy Index your code
hub / github.com/anomalyco/opencode / tempEntrypoint

Function tempEntrypoint

packages/core/test/plugin/provider-dynamic.test.ts:37–47  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

35})
36
37function 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
49describe("DynamicProviderPlugin", () => {
50 it.effect("creates an SDK from a provider factory export", () =>

Callers 1

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected