Effects.hub_state: 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 100-108 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=100&end_line=108
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/plan/type.bend as P
def hub_state(+home: String, +root: String, p: Rl.Package) -> IO(P.Hub):
match p:
case Rl.Package{+n, +v, +e, _}:
do IO
:
cached : String <- X.read(home ++ "/.bend/lib/names/" ++ n ++ "@" ++ v)
+hash : String <- fetched(home, n, v, e, cached)
+files : List<&2, String> <- reach(1000n, [e], [], root)
f : String <- differing(files, root, home ++ "/.bend/lib/" ++ String.trim(hash))
return hub_of(String.trim(hash), f)
Uses (14):
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=String
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.trim
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=differing
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=fetched
https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/effects.bend&name=hub_of
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/effs/io.bend&name=read
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/release/type.bend&name=Package