GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode/packages/plugin/src/gui/updater.ts at dev · yusha/opencode

Expand file tree

/

updater.ts

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
44 lines (41 loc) · 1.8 KB
/

updater.ts

Copy path

File metadata and controls

44 lines (41 loc) · 1.8 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Schema } from "effect"
import { Ipc } from "./core.js"
/**
* The updater's state, the same in every window.
* - `disabled`: this build does not update itself.
* - `idle`: no check has run yet.
* - `checking`: a check is running.
* - `downloading`: `version` is downloading.
* - `ready`: `version` is staged; `install` restarts into it.
* - `download-required`: `version` needs a manual download; `install` opens it.
* - `up-to-date`: the last check found nothing newer.
* - `installing`: `version` is installing.
* - `error`: the last check or download failed with `message`.
*/
export const UpdaterState = Schema.Union([
Schema.Struct({ status: Schema.Literal("disabled") }),
Schema.Struct({ status: Schema.Literal("idle") }),
Schema.Struct({ status: Schema.Literal("checking") }),
Schema.Struct({ status: Schema.Literal("downloading"), version: Schema.String }),
Schema.Struct({ status: Schema.Literal("ready"), version: Schema.String }),
Schema.Struct({ status: Schema.Literal("download-required"), version: Schema.String }),
Schema.Struct({ status: Schema.Literal("up-to-date") }),
Schema.Struct({ status: Schema.Literal("installing"), version: Schema.String }),
Schema.Struct({ status: Schema.Literal("error"), message: Schema.String }),
])
/** The updater's state; see `UpdaterState`. */
export type UpdaterState = typeof UpdaterState.Type
/** The desktop app updater. Its state is app-wide; every window receives the same value. */
export const Updater = Ipc.define({
id: "updater",
state: UpdaterState,
methods: {
check: { output: UpdaterState },
/** Restarts into a staged update, or opens the installer download. */
install: {},
},
events: {
/** The app menu asks the focused window to check with in-app feedback (beta builds). */
check: Schema.Null,
},
})
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.