MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / registry

Function registry

cli/src/pkg.rs:48–56  ·  view source on GitHub ↗

Resolve a bare name against the official registry; user manifest overrides go through `resolve`.

(name: &str)

Source from the content-addressed store, hash-verified

46
47/// Resolve a bare name against the official registry; user manifest overrides go through `resolve`.
48pub fn registry(name: &str) -> Option<(Kind, String)> {
49 if STD.contains(&name) {
50 Some((Kind::Std, std_url(name)))
51 } else if HOST.contains(&name) {
52 Some((Kind::Host, format!("https://cdn.edgepython.com/host/{name}/index.js")))
53 } else {
54 None
55 }
56}
57
58/// CDN url for a std package. Most ship as `.wasm`; `test` is pure Edge Python, served as `.py`. Mirrors runtime/src/defaults.js.
59fn std_url(name: &str) -> String {

Callers 2

resolveFunction · 0.85
addFunction · 0.85

Calls 2

std_urlFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected