GeezerVison is showing github.com — fix(desktop-commander): type the promote helper for the vitest import · developing-today/code@bcf673f
File tree
Expand file treeCollapse file tree
Open diff view settings
pkgs/desktop-commander/worker
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +25Lines changed: 25 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Type surface for promote.mjs (a plain Node script; vitest tests import |
| 2 | +// its pure helper). deploymentStatus classifies the live deployment |
| 3 | +// against a provenance manifest: "already-promoted" when the manifest |
| 4 | +// version is already the sole 100% deployment, "at-baseline" when the |
| 5 | +// active version matches the manifest baseline, "drifted" otherwise. |
| 6 | +export type DeploymentStatus = "already-promoted" | "at-baseline" | "drifted"; |
| 7 | + |
| 8 | +export interface ManifestVersionEntry { |
| 9 | + version_id?: string; |
| 10 | + percentage?: number; |
| 11 | +} |
| 12 | + |
| 13 | +export interface ManifestDeployment { |
| 14 | + versions?: ManifestVersionEntry[]; |
| 15 | +} |
| 16 | + |
| 17 | +export interface PromotionManifest { |
| 18 | + versionId: string; |
| 19 | + baselineVersionId: string; |
| 20 | +} |
| 21 | + |
| 22 | +export function deploymentStatus( |
| 23 | + current: ManifestDeployment | undefined, |
| 24 | + manifest: PromotionManifest, |
| 25 | +): DeploymentStatus; |