def source.at

ezx@1.11.0.0 · src/ws/joint.bend:51

import ezx@1.11.0.0/src/ws/joint.bend as Joint
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/pkg/path.bend as P

51# a source read from a member's directory: a relative path joined to it, and
52# a URL or an absolute path as it is (`P.anchor`, EZ-LED-8)
53def source.at(+dir: String, src: M.Source) -> M.Source:
54  match src:
55    case M.Hub{nv}:
56      M.Hub{nv}
57    case M.Git{url, rev, tag, root, nar, vend}:
58      M.Git{P.anchor(dir, url), rev, tag, root, nar, vend}
59    case M.Member{path, named}:
60      M.Member{path, named}

Uses (3)

Used by (2)