Typed config parser for Proton moon.proton and moon.ext files.
Dependencies
justjavac/proton_config does not have a README file
pub(all) suberror ProjectConfigError {
FileRead(path~ : String, detail~ : String)
Syntax(name~ : String, diagnostics~ : String)
InvalidRoot
Validation(errors~ : Array[ProjectConfigError])
MissingField(path~ : String)
DuplicateField(path~ : String)
DuplicateValue(path~ : String, value~ : String)
UnknownField(path~ : String)
InvalidField(path~ : String, expectation~ : String)
UnsupportedField(path~ : String, reason~ : String)
UnsupportedValue(path~ : String, value~ : String)
} derive(Eq, Debug)pub(all) struct LoadedProjectConfig {
config : ProjectConfig
warnings : Array[String]
} derive(Eq, Debug)fn LoadedProjectConfig::new(config : ProjectConfig, warnings? : Array[String]) -> LoadedProjectConfigpub(all) struct ProjectAppWindowConfig {
id : String
window : ProjectWindowConfig
entry : ProjectEntry
open_on_start : Bool
} derive(Eq, Debug)fn ProjectAppWindowConfig::new(id : String, window : ProjectWindowConfig, entry : ProjectEntry, open_on_start? : Bool) -> ProjectAppWindowConfigfn ProjectBundleConfig::new(active? : Bool, targets? : Array[String], icon? : Array[String], resources? : Array[String], url_schemes? : Array[String], document_types? : Array[ProjectDocumentType], output? : String) -> ProjectBundleConfigpub(all) struct ProjectConfig {
base_dir : String
window : ProjectWindowConfig
entry : ProjectEntry
windows : Array[ProjectAppWindowConfig]
metadata : ProjectMetadata
backend : ProjectBackendConfig?
frontend : ProjectFrontendConfig?
bundle : ProjectBundleConfig?
permissions : Array[ProjectPermissionGrant]
debug : Int
single_instance : Bool
} derive(Eq, Debug)fn ProjectConfig::new(base_dir : String, window : ProjectWindowConfig, entry : ProjectEntry, metadata : ProjectMetadata, windows? : Array[ProjectAppWindowConfig], backend? : ProjectBackendConfig?, frontend? : ProjectFrontendConfig?, bundle? : ProjectBundleConfig?, permissions? : Array[ProjectPermissionGrant], debug? : Int, single_instance? : Bool) -> ProjectConfigfn ProjectDocumentType::new(name : String, extensions : Array[String], role? : String) -> ProjectDocumentTypefn ProjectFrontendConfig::new(dev_url? : String?, dist? : String?, before_dev? : String?, before_build? : String?, path? : String?) -> ProjectFrontendConfigfn ProjectMetadata::new(product_name : String, identifier? : String?, version? : String?, description? : String?, license? : String?) -> ProjectMetadatafn ProjectPermissionGrant::new(window : String, origin : String, extension : String, scope? : Json) -> ProjectPermissionGrantpub(all) struct ProjectWindowConfig {
title : String
width : Int
height : Int
size_hint : ProjectWindowSizeHint
titlebar_style : ProjectTitlebarStyle
} derive(Eq, Debug)fn ProjectWindowConfig::new(title : String, width : Int, height : Int, size_hint? : ProjectWindowSizeHint, titlebar_style? : ProjectTitlebarStyle) -> ProjectWindowConfigfn load_project_config_from_text(source : String, base_dir : String, name? : String) -> LoadedProjectConfig raise ProjectConfigErrorTyped config parser for Proton moon.proton and moon.ext files.
Dependencies