domain/architecture/system/plan/type.bend

near-v-framework@0.4.0.0 · 35 lines · 5 definitions

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