starling-devex 0.1.2

Starling: a local dev orchestrator with a central daemon, shared named-URL proxy, and a k9s-style TUI (a Rust port of Tilt + portless)
1
2
3
4
5
6
7
8
9
10
import type { ObjectMeta } from "./types"

// get annotations from an api object w/ a reasonable type
//
// (our codegen generates the `annotations` field with type `object`, which is not very useful)
export function annotations(obj: { metadata?: ObjectMeta }): {
  [name: string]: string
} {
  return (obj.metadata?.annotations ?? {}) as { [name: string]: string }
}