Download packages/app/src/updater.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 495 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/updater.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/src/updater.ts
-
curl -L -o updater.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/updater.ts
495 Bytes
| import type { Accessor } from "solid-js" | |
| export type UpdaterState = | |
| | { status: "disabled" } | |
| | { status: "idle" } | |
| | { status: "checking" } | |
| | { status: "downloading"; version: string; percent?: number } | |
| | { status: "ready"; version: string } | |
| | { status: "up-to-date" } | |
| | { status: "installing"; version: string } | |
| | { status: "error"; message: string } | |
| export type UpdaterPlatform = { | |
| state: Accessor<UpdaterState> | |
| check(): Promise<UpdaterState> | |
| install(): Promise<void> | |
| } | |