Small helper layer for Posoco extension authors
Dependencies
pub struct EventBus {
subscribers : Array[&BusSubscriber]
pending : Array[BusEvent]
dispatching : Bool
}test "publish with no subscribers completes silently" {
let bus = @devkit.EventBus::EventBus()
bus.publish({
source: "posoco_ext_scrum",
topic: "status",
data: Json::null(),
})
inspect(bus.subscriber_count(), content="0")
}fn ExtContext::debug(self : ExtContext, source~ : String, code~ : String, message~ : String, data? : Json?) -> Unitfn ExtContext::error(self : ExtContext, source~ : String, code~ : String, message~ : String, data? : Json?) -> Unitfn ExtContext::info(self : ExtContext, source~ : String, code~ : String, message~ : String, data? : Json?) -> Unitfn ExtContext::warn(self : ExtContext, source~ : String, code~ : String, message~ : String, data? : Json?) -> Unitfn FreshnessGuard::check(self : FreshnessGuard, path : String, current : FileStamp?) -> FreshnessVerdict#as_free_fn(freshness_hint, deprecated="use `FreshnessVerdict::hint` instead", visibility="pub")
fn FreshnessVerdict::hint(self : FreshnessVerdict) -> Stringimpl Logger for MemoryLogger @devkit.WorkspaceAnchor::WorkspaceAnchor("/tmp/proj/").root,test {
let anchor = @devkit.WorkspaceAnchor::WorkspaceAnchor("/tmp/proj")
inspect(anchor.resolve("src/a/../b"), content="/tmp/proj/src/b")
inspect(anchor.resolve("../sibling"), content="/tmp/sibling")
}#alias(render_context_envelope, deprecated="renamed to context_envelope")
fn context_envelope(ns~ : String, kind~ : String, trust~ : Bool, source? : String, attrs? : Array[(String, String)], content~ : String) -> Stringfn glob_match(pattern : String, path : String) -> Boolfn has_hidden_segment(path : String) -> Boolfn home_dir() -> String?fn home_dir_from_env(windows~ : Bool, home~ : String?, userprofile~ : String?, homedrive~ : String?, homepath~ : String?) -> String?fn is_status_color_role(role : String) -> Boolfn metrics_registry_unregister(id : String) -> Unitfn pricing_registry_unregister(id : String) -> Unitfn publish_status_register(bus : EventBus, source~ : String, segment~ : String, label? : String, priority? : Int, value? : String, color? : String) -> Unitfn publish_status_update(bus : EventBus, source~ : String, segment~ : String, value~ : String) -> Unitfn quota_registry_unregister(id : String) -> Unitfn relative_to_base(base : String, sub : String) -> Stringfn sanitize_label(label : String, limit? : Int) -> Stringfn sanitize_path(path : String, limit? : Int) -> Stringfn strip_dot_prefix(path : String) -> Stringfn truncate_chars(s : String, cap : Int) -> StringInstall
Download zipSmall helper layer for Posoco extension authors
Dependencies