def outcome.of

ezx@1.11.0.0 · src/add/hub.bend:269

import ezx@1.11.0.0/src/add/hub.bend as Hub
import Base
import ezx@1.11.0.0/src/add/world.bend as A
import ezx@1.11.0.0/src/lock/plan.bend as P
import ezx@1.11.0.0/src/ledger/render.bend as Rend
import ezx@1.11.0.0/src/pkg/pkg.bend as K
import ezx@1.11.0.0/src/pkg/path.bend as Path

269# how an add ends once the package is in hand
270def outcome.of(+hash: String, +fs: List<&2, K.Item>, +world: A.World) -> P.Outcome:
271  outcome.entry(Bool.or(String.is_empty(asked(world)), holds(fs, Path.norm(asked(world)))),
272    Rend.renderable(Rend.add.keep(A.manifest.of(A.read(world)), dep.of(hash, fs, world))),
273    asked(world), world)

Uses (16)

Used by (1)