Effects.observe: def of near-v-framework@0.4.0.0
Import: import near-v-framework@0.4.0.0/domain/architecture/system/effects.bend as Effects
Lines 264-275 of near-v-framework@0.4.0.0/domain/architecture/system/effects.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&start_line=264&end_line=275
import Base
import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as X
import near-v-framework@0.4.0.0/domain/architecture/system/release/type.bend as Rl
import near-v-framework@0.4.0.0/domain/architecture/system/release/ops.bend as RlO
import near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend as P
# The files, what the packages' entries and the system's own entry reach, the hub, and GitHub.
def observe(+root: String, +entry: String, r: Rl.Release) -> IO(P.Observed):
match r:
case Rl.Release{repo, +ps, +gs}:
do IO
:
+h : String <- X.home()
+fs : List<&2, String> <- files(root)
reached : List<&2, String> <- reach(Nat.mul(1n+List.length(&2, String, fs), 1n+List.length(&2, String, fs)), entry <> List.append(&2, String, RlO.entries(ps), RlO.plugin_entries(gs)), [], root)
hs : List<&2, P.Hub> <- hub_states(h, root, ps)
rm : P.Remote <- remote(root, repo)
ts : List<&2, P.Tag> <- tag_states(h, root, gs)
return P.Observed{fs, reached, hs, rm, ts}
Uses (22):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=files
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=hub_states
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=reach
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=remote
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=tag_states
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend&name=home
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend&name=Hub
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend&name=Observed
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend&name=Remote
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend&name=Tag
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/release/ops.bend&name=entries
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/release/ops.bend&name=plugin_entries
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/release/type.bend&name=Release