~/bend-docscommunity

domain/architecture/system/effects.bend relies on unsafe/foreign

raw source on the hub · import 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/effects.bend as Effects

24 imports
import Base
import bend-kit-files@0.1.0.0/files.bend as Fs
import bend-net-json@0.3.0.0/json.bend as Json
import ./effs/io.bend as X
import ../type.bend as A
import ../ops.bend as O
import ./container/effects.bend as CtE
import ./deployment/type.bend as D
import ./deployment/ops.bend as DO
import ./deployment/azure/effects.bend as AzE
import ./deployment/nix_darwin/type.bend as ND
import ./deployment/nix_darwin/ops.bend as NDO
import ./deployment/nix_darwin/effects.bend as NDE
import ./deployment/nix_darwin/setting/type.bend as St
import ./deployment/nix_darwin/setting/ops.bend as StO
import ./deployment/nix_darwin/brew/type.bend as Br
import ./deployment/nix_darwin/setting/effects.bend as StE
import ./deployment/nix_darwin/brew/effects.bend as BrE
import ./deployment/nix_darwin/service/ops.bend as SvO
import ./release/type.bend as Rl
import ./release/ops.bend as RlO
import ./plan/type.bend as P
import ./plan/ops.bend as PO
import ./ops.bend as SO

Definitions

def files source · line 31 · raw

@+root:String -> IO(List<&2, String>)

---- the repository's files ----

def second_word source · line 37 · raw

@+t:String -> String

---- what an entry reaches: it and every file it imports, followed in Bend ----

def unquote source · line 40 · raw

@+w:String -> String

def import_of source · line 44 · raw

@+line:String -> @+dir:String -> String

The file a line imports, relative to the repository, or "" when it imports none of the repository's.

def imports source · line 49 · raw

@ls:List<&2, String> -> @+dir:String -> List<&2, String>

def reach source · line 57 · raw

@fuel:Nat -> @+todo:List<&2, String> -> @+seen:List<&2, String> -> @+root:String -> IO(List<&2, String>)

Each step reads one file; the number of files squared bounds the walk.

def differing source · line 72 · raw

@fs:List<&2, String> -> @+local:String -> @+hub:String -> IO(String)

---- the Bend hub: has it published this package, with these exact files? ----

def hub_of source · line 82 · raw

@+published:String -> @+f:String -> 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Hub

def fetch_if source · line 87 · raw

@missing:Bool -> @+home:String -> @+n:String -> @+v:String -> @+e:String -> @+cached:String -> IO(String)

The package's hash, as Bend's local cache names it. A package not cached yet is fetched first by checking a file that imports it: the hub has it exactly when that succeeds.

def fetched source · line 97 · raw

@+home:String -> @+n:String -> @+v:String -> @+e:String -> @+cached:String -> IO(String)

def hub_state source · line 100 · raw

@+home:String -> @+root:String -> @p:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/release/type.Package -> IO(0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Hub)

def hub_states source · line 110 · raw

@+home:String -> @+root:String -> @ps:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/release/type.Package> -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Hub>)

def first_word source · line 121 · raw

@+t:String -> String

---- GitHub ----

def pushed source · line 124 · raw

@+root:String -> @+sha:String -> IO(Bool)

def remote source · line 127 · raw

@+root:String -> @r:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/release/type.Repository -> IO(0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Remote)

def plugin_dir source · line 141 · raw

@+root:String -> @+n:String -> String

---- a plugin: a fresh build of it, next to what its marketplace has tagged for its version ---- Built under .git/v-plugin/<name>, never committed: build/ is what a release would hold at plugins/<name>, tag/ is the marketplace at the tag, repo/ the marketplace a release writes.

def tag_of source · line 144 · raw

@+n:String -> @+v:String -> String

def last_segment source · line 147 · raw

@xs:List<&2, String> -> String

def owner_of source · line 150 · raw

@+r:String -> String

def str_of source · line 153 · raw

@m:Maybe<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val> -> String

def version_in source · line 160 · raw

@m:Maybe<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val> -> String

def obj.go source · line 167 · raw

@kvs:List<&2, Sigma<&2, &2, String, _ => 0x16458a2db4f36577294543ec2a6d420c/json.Val>> -> @m:Map<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val> -> Map<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val>

def obj source · line 174 · raw

@kvs:List<&2, Sigma<&2, &2, String, _ => 0x16458a2db4f36577294543ec2a6d420c/json.Val>> -> 0x16458a2db4f36577294543ec2a6d420c/json.Val

def others source · line 178 · raw

@vs:List<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val> -> @+n:String -> List<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val>

The marketplace's other plugins, as listed now.

def listed source · line 186 · raw

@m:Maybe<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val> -> List<&2, 0x16458a2db4f36577294543ec2a6d420c/json.Val>

def marketplace source · line 194 · raw

@+now:String -> @+n:String -> @+v:String -> @+r:String -> String

The marketplace's listing with this plugin at this version, every other plugin as it was.

def build_plugin source · line 202 · raw

@+root:String -> @+bend:String -> @+n:String -> @+e:String -> IO(String)

def tag_differs source · line 211 · raw

@tagged:Bool -> @+root:String -> @+n:String -> @+v:String -> @+r:String -> IO(Bool)

def tag_state source · line 221 · raw

@+home:String -> @+root:String -> @g:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/release/type.Plugin -> IO(0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Tag)

def tag_states source · line 232 · raw

@+home:String -> @+root:String -> @gs:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/release/type.Plugin> -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Tag>)

def release_plugin source · line 243 · raw

@+root:String -> @+n:String -> @+v:String -> @+r:String -> @create:Bool -> IO(Bool)

A release: the build into plugins/<name>, the listing updated, committed, tagged and pushed.

def root source · line 259 · raw

IO(String)

---- a snapshot: everything a plan needs ----

def observe source · line 265 · raw

@+root:String -> @+entry:String -> @r:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/release/type.Release -> IO(0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Observed)

The files, what the packages' entries and the system's own entry reach, the hub, and GitHub.

def apply source · line 278 · raw

@+root:String -> @+bend:String -> @s:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step -> IO(Unit)

---- a deploy: carry out a plan with nothing blocked ----

def apply_all source · line 310 · raw

@+root:String -> @+bend:String -> @ss:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step> -> IO(Unit)

def deploy_if source · line 319 · raw

@blocked:Bool -> @+root:String -> @+ss:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step> -> IO(Unit)

def deploy source · line 328 · raw

@+root:String -> @+ss:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step> -> IO(Unit)

def has_change source · line 333 · raw

@ss:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step> -> Bool

---- the whole plan: the release, the stack, each deployment node, and what the deploy would break ---- ---- a nix-darwin node: its checks, what a rebuild would change, and the rebuild when anything would ----

def mac_of source · line 344 · raw

@nd:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/nix_darwin/type.NixDarwin -> String

def host_of source · line 349 · raw

@nd:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/nix_darwin/type.NixDarwin -> String

def rebuild_if source · line 354 · raw

@c:Bool -> @+h:String -> @+fl:String -> @+mac:String -> List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>

def differs source · line 362 · raw

@+path:String -> @+text:String -> IO(Bool)

Whether a generated file differs from the one in the repository (compared by cmp, not in memory).

def darwin_steps source · line 368 · raw

@+root:String -> @+k:String -> @+nd:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/nix_darwin/type.NixDarwin -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>)

def platform_steps source · line 380 · raw

@p:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Platform -> @+root:String -> @+k:String -> @+a:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/type.Architecture -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>)

def node_steps source · line 389 · raw

@ns:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Node> -> @+root:String -> @+a:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/type.Architecture -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>)

def deployed_path source · line 402 · raw

@+root:String -> String

def breaks_step source · line 405 · raw

@+bs:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Break> -> @+d:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Deployment -> List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>

def deployed_steps source · line 410 · raw

@+root:String -> @+d:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Deployment -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>)

What the deploy would break, against what this repository last deployed (recorded in .git, never committed).

def plan_all source · line 415 · raw

@+root:String -> @+entry:String -> @+a:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/type.Architecture -> IO(List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/plan/type.Step>)

def deploy_all source · line 424 · raw

@+root:String -> @+entry:String -> @+a:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/type.Architecture -> IO(Unit)

A deploy of the whole plan; afterwards it records the deployment, so the next plan compares against it.

def import_node source · line 431 · raw

@p:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Platform -> @+root:String -> IO(Unit)

---- import: each nix-darwin node's Mac as it is now, as Bend to declare it with ----

def import_nodes source · line 444 · raw

@ns:List<&2, 0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/system/deployment/type.Node> -> @+root:String -> IO(Unit)

def import_all source · line 456 · raw

@+root:String -> @a:0xc4f31b1cf377fad1ed5191443ddd1c20/domain/architecture/type.Architecture -> IO(Unit)