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

maintenance.ts

27 lines1.1 KB

1import type { ProviderDriverKind } from "@t3tools/contracts";
2import type * as Effect from "effect/Effect";
3​
4export interface ProviderMaintenanceCapabilities {
5 readonly provider: ProviderDriverKind;
6 readonly packageName: string | null;
7 readonly update: ProviderMaintenanceCommandAction | null;
8 /** undefined defers to npm; null means the installer could not determine the latest version. */
9 readonly latestVersion?: string | null;
10 /**
11 * Deferred until update checks are enabled; `null` falls back to
12 * `latestVersion`, then npm.
13 */
14 readonly lookupLatestVersion?: Effect.Effect<string | null>;
15 readonly compareVersions?: (current: string, latest: string) => number;
16 /** Resolved executable path for advisories when no update command is proven. */
17 readonly installPath?: string;
19​
20export interface ProviderMaintenanceCommandAction {
21 readonly command: string;
22 readonly executable: string;
23 readonly args: ReadonlyArray<string>;
24 readonly lockKey: string;
25 /** Native updaters must use the instance's custom home (e.g. `CODEX_HOME`). */
26 readonly env?: NodeJS.ProcessEnv;