1 import Base 2 3 # What the Bend hub has for one declared package. 4 type Hub is Data: 5 Unpublished{} 6 Same{} 7 Differs{file: String} 8 9 # What GitHub and the working tree say about the repository. 10 type Remote is Data: 11 Remote{origin: String, visibility: String, clean: Bool, pushed: Bool} 12 13 # What the world looks like now, as far as a release is concerned. 14 type Observed is Data: 15 Observed{files: List<&2, String>, reached: List<&2, String>, package_reached: List<&2, String>, hubs: List<&2, Hub>, remote: Remote} 16 17 # One step of a plan. Publish, Push, Rebuild and ServePort change the world; Current and Change do not 18 # (a Change is what a Rebuild would change, shown by a dry run); Blocked stops the deploy. 19 # Rebuild: write a nix-darwin node's flake and darwin-rebuild switch it. ServePort: serve a tailnet 20 # HTTPS port from a local target, with the given Tailscale command. 21 type Step is Data: 22 Current{what: String} 23 Publish{name: String, version: String, entry: String} 24 Push{repository: String} 25 Rebuild{host: String, flake: String, mac: String} 26 ServePort{https: U32, target: String, tailscale: String} 27 Change{what: String, now: String, want: String} 28 Blocked{what: String, why: String}