Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

maintenance.ts

33 lines1.2 KB

1import type { ProviderDriverKind } from "@t3tools/contracts";
2​
3export interface ProviderMaintenanceCapabilities {
4 readonly provider: ProviderDriverKind;
5 readonly packageName: string | null;
6 readonly update: ProviderMaintenanceCommandAction | null;
7 /**
8 * `undefined` means the installer has no channel of its own and the npm
9 * registry entry for `packageName` is authoritative; `null` means the
10 * installer was asked and did not know.
11 */
12 readonly latestVersion?: string | null;
13 readonly compareVersions?: (current: string, latest: string) => number;
14 /**
15 * The executable T3 Code runs, symlinks followed, when no update command is
16 * proven for it. The version advisory names it so the user knows which
17 * install to update.
18 */
19 readonly installPath?: string;
21​
22export interface ProviderMaintenanceCommandAction {
23 readonly command: string;
24 readonly executable: string;
25 readonly args: ReadonlyArray<string>;
26 readonly lockKey: string;
27 /**
28 * A native updater finds its install through the same variables the
29 * provider runs with (e.g. `CODEX_HOME`), so an instance with a custom home
30 * must update that home and not the default one.
31 */
32 readonly env?: NodeJS.ProcessEnv;