Download packages/tui/test/fixture/fixture.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/tui/test/fixture/fixture.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/tui/test/fixture/fixture.ts
-
curl -L -o fixture.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/tui/test/fixture/fixture.ts
382 Bytes
| import { mkdtemp, realpath, rm } from "node:fs/promises" | |
| import path from "node:path" | |
| import os from "node:os" | |
| export async function tmpdir() { | |
| const directory = await realpath(await mkdtemp(path.join(os.tmpdir(), "opencode-tui-test-"))) | |
| return { | |
| path: directory, | |
| async [Symbol.asyncDispose]() { | |
| await rm(directory, { recursive: true, force: true }) | |
| }, | |
| } | |
| } | |