Sign in

    proton_config

    Typed application configuration shared by Proton and its CLI.

    Download zip
    Version
    0.4.0
    License
    Apache-2.0
    Last updated
    5 days ago
    Downloads
    21K

    Dependencies

    moonbit-community/proton_config does not have a README file

    AppConfigError

    pub(all) suberror AppConfigError {
    FileRead(path~ : String, detail~ : String)
    Syntax(name~ : String, diagnostics~ : String)
    InvalidRoot
    Validation(errors~ : Array[AppConfigError])
    MissingField(path~ : String)
    DuplicateValue(path~ : String, value~ : String)
    UnknownField(path~ : String)
    InvalidField(path~ : String, expectation~ : String)
    UnsupportedValue(path~ : String, value~ : String)
    } derive(Eq,
    Debug
    )

    Failures produced while loading and validating proton.project.json.

    AppConfigError::equal

    AppConfigError::message

    fn AppConfigError::message(self : AppConfigError) -> String

    AppConfigError::not_equal

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

    AppConfigError::output

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

    AppConfigError::to_string

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

    AppConfig

    pub(all) struct AppConfig {
    identifier : String
    backend : BackendConfig?
    frontend : FrontendConfig?
    package_config : PackageConfig?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Project description shared by Proton tooling and managed applications.

    AppConfig::AppConfig

    fn AppConfig::AppConfig(identifier : String, backend? : BackendConfig?, frontend? : FrontendConfig?, package_config? : PackageConfig?) -> AppConfig

    AppConfig::copy

    fn AppConfig::copy(self : AppConfig) -> AppConfig

    Returns an independent configuration snapshot.

    AppConfig::decode

    fn AppConfig::decode(json : Json) -> AppConfig raise AppConfigError

    Decodes a complete configuration. Relative paths remain relative.

    AppConfig::equal

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

    AppConfig::load

    fn AppConfig::load(path : String) -> AppConfig raise AppConfigError

    Reads a complete application configuration without resolving its paths.

    AppConfig::not_equal

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

    AppConfig::parse

    fn AppConfig::parse(source : String, name? : String) -> AppConfig raise AppConfigError

    Decodes the project JSON format, applying defaults and semantic validation.

    AppConfig::to_json

    fn AppConfig::to_json(AppConfig) -> Json

    AppConfig::validate

    fn AppConfig::validate(self : AppConfig) -> Unit raise AppConfigError

    Checks semantic constraints independently of JSON decoding.

    BackendConfig

    pub(all) struct BackendConfig {
    path : String
    app_package : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    The MoonBit backend that proton_cli builds and launches.

    BackendConfig::BackendConfig

    fn BackendConfig::BackendConfig(path : String, app_package : String) -> BackendConfig

    BackendConfig::equal

    BackendConfig::not_equal

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

    BackendConfig::to_json

    DocumentType

    pub(all) struct DocumentType {
    name : String
    extensions : Array[String]
    role : String
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    DocumentType::DocumentType

    fn DocumentType::DocumentType(name : String, extensions : Array[String], role? : String) -> DocumentType

    DocumentType::equal

    DocumentType::not_equal

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

    DocumentType::to_json

    FrontendConfig

    pub(all) struct FrontendConfig {
    dev_url : String?
    dist : String?
    before_dev : String?
    before_build : String?
    path : String?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Frontend commands and paths needed before the application can run.

    FrontendConfig::FrontendConfig

    fn FrontendConfig::FrontendConfig(dev_url? : String?, dist? : String?, before_dev? : String?, before_build? : String?, path? : String?) -> FrontendConfig

    FrontendConfig::equal

    FrontendConfig::not_equal

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

    FrontendConfig::to_json

    PackageConfig

    pub(all) struct PackageConfig {
    product_name : String
    version : String
    formats : Array[String]
    icons : Array[String]
    prepare : String?
    resources : Array[String]
    sign : SignConfig?
    url_schemes : Array[String]
    document_types : Array[DocumentType]
    output : String
    platforms : PackagePlatforms
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Package metadata, input preparation, and payloads consumed by proton_cli package.

    PackageConfig::PackageConfig

    fn PackageConfig::PackageConfig(product_name : String, version : String, formats? : Array[String], icons? : Array[String], prepare? : String?, resources? : Array[String], sign? : SignConfig?, url_schemes? : Array[String], document_types? : Array[DocumentType], output? : String, platforms? : PackagePlatforms) -> PackageConfig

    PackageConfig::equal

    PackageConfig::not_equal

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

    PackageConfig::to_json

    PackagePlatforms

    Optional package overrides for each supported desktop platform.

    PackagePlatforms::PackagePlatforms

    PackagePlatforms::equal

    PackagePlatforms::not_equal

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

    PackagePlatforms::to_json

    PlatformPackageConfig

    pub(all) struct PlatformPackageConfig {
    formats : Array[String]?
    resources : Array[String]
    sign : SignConfig?
    minimum_system_version : String?
    nsis_install_mode : String?
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    Package inputs that apply only to one desktop platform. minimum_system_version is macOS-only and changes package metadata, not compiler deployment targets.

    PlatformPackageConfig::PlatformPackageConfig

    fn PlatformPackageConfig::PlatformPackageConfig(formats? : Array[String], resources? : Array[String], sign? : SignConfig, minimum_system_version? : String, nsis_install_mode? : String) -> PlatformPackageConfig

    PlatformPackageConfig::equal

    PlatformPackageConfig::not_equal

    PlatformPackageConfig::to_json

    SignConfig

    pub(all) struct SignConfig {
    binaries : Array[String]
    } derive(Eq, ToJson,
    Debug
    ,
    FromJson
    )

    SignConfig::SignConfig

    fn SignConfig::SignConfig(binaries? : Array[String]) -> SignConfig

    SignConfig::equal

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

    SignConfig::not_equal

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

    SignConfig::to_json

    fn SignConfig::to_json(SignConfig) -> Json

    validate_application_identifier

    fn validate_application_identifier(value : String) -> String raise AppConfigError

    Validates and trims a canonical reverse-DNS application identifier.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io