Sign in

    mission-control-contracts

    Shared Mission Control commands for the CLI, the web UI and the desktop shell

    mission-control
    contract
    cli
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    1 hour ago
    Downloads
    37

    No dependencies

    #moonrockz/mission-control-contracts

    Shared commands for the Mission Control CLI, the Rabbita web UI and the Proton desktop shell.

    moon add moonrockz/mission-control-contracts

    version() gives the workspace version as a Version value (three integer parts; Version::Version(text) raises VersionError for any other text). Command::Command(name) reads help or version, or an alias such as --version, and raises CommandError::UnknownCommand with the name for any other text. Each command gives its CLI name (name()), its Proton command ID (proton_id(), such as mission-control.version) and its help line (description()). commands lists every command.

    CommandError

    pub(all) suberror CommandError {
    UnknownCommand(String)
    } derive(Eq,
    Debug
    )

    Raised when a text names no command.

    CommandError::equal

    CommandError::not_equal

    fn CommandError::not_equal(x : CommandError, y : CommandError) -> Bool

    VersionError

    pub(all) suberror VersionError {
    InvalidVersion(String)
    } derive(Eq,
    Debug
    )

    Raised when a text is not a version.

    VersionError::equal

    VersionError::not_equal

    fn VersionError::not_equal(x : VersionError, y : VersionError) -> Bool

    Command

    pub(all) enum Command {
    Help
    Version
    } derive(Eq,
    Debug
    )

    A command the CLI, the web UI and the desktop shell all understand.

    Command::Command

    fn Command::Command(name : String) -> Command raise CommandError

    Reads a command name. --help, -h, --version and -V are accepted.

    Command::description

    fn Command::description(self : Command) -> String

    One line that describes the command in the help text.

    Command::equal

    fn Command::equal(Command, Command) -> Bool

    Command::name

    fn Command::name(self : Command) -> String

    The name of the command on the command line.

    Command::not_equal

    fn Command::not_equal(x : Command, y : Command) -> Bool

    Command::proton_id

    fn Command::proton_id(self : Command) -> String

    The ID of the Proton command that the desktop shell exposes.

    Command::to_repr

    Version

    A version such as 0.0.2: three non-negative integer parts.
    impl Show for Version

    Version::Version

    fn Version::Version(text : String) -> Version raise VersionError

    Parses X.Y.Z. Each part is a non-negative integer with at most nine digits and no leading zero.

    Version::compare

    fn Version::compare(Version, Version) -> Int

    Version::current

    fn Version::current() -> Version

    The version of this module. It matches the workspace version.

    Version::equal

    fn Version::equal(Version, Version) -> Bool

    Version::hash

    fn Version::hash(self : Version) -> Int

    Version::hash_combine

    fn Version::hash_combine(Version, Hasher) -> Unit

    Version::major

    fn Version::major(self : Version) -> Int

    Version::minor

    fn Version::minor(self : Version) -> Int

    Version::not_equal

    fn Version::not_equal(x : Version, y : Version) -> Bool

    Version::op_ge

    fn Version::op_ge(x : Version, y : Version) -> Bool

    Version::op_gt

    fn Version::op_gt(x : Version, y : Version) -> Bool

    Version::op_le

    fn Version::op_le(x : Version, y : Version) -> Bool

    Version::op_lt

    fn Version::op_lt(x : Version, y : Version) -> Bool

    Version::output

    fn Version::output(self : Version, logger : &Logger) -> Unit

    Version::patch

    fn Version::patch(self : Version) -> Int

    Version::to_repr

    Version::to_string

    fn Version::to_string(self : Version) -> String

    commands

    let commands : ReadOnlyArray[Command]

    Every command, in the order that the help text lists them.

    version

    fn version() -> Version

    The version of this module. It matches the workspace version.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io