MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / withTmp

Function withTmp

apps/cli/src/tooling.test.ts:10–15  ·  view source on GitHub ↗
(body: (dir: string) => Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

8import { resolveToolInvocation, sanitizeCliOutputText, shellQuoteArg } from "./tooling";
9
10const withTmp = <A, E, R>(body: (dir: string) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
11 Effect.acquireUseRelease(
12 Effect.sync(() => mkdtempSync(join(tmpdir(), "exec-call-"))),
13 body,
14 (dir) => Effect.sync(() => rmSync(dir, { recursive: true, force: true })),
15 );
16
17describe("resolveToolInvocation", () => {
18 it.effect("reads the JSON arg from a file via @path", () =>

Callers 1

tooling.test.tsFile · 0.85

Calls 1

syncMethod · 0.65

Tested by

no test coverage detected