~/bend-docscommunity

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

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

26 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/launchd/effects.bend as LdE
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 ./release/plugin/ops.bend as PlO
import ./plan/type.bend as P
import ./plan/ops.bend as PO
import ./ops.bend as SO

Definitions

def files source · line 33 · raw

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

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

def second_word source · line 39 · raw

@+t:String -> String

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

def unquote source · line 42 · raw

@+w:String -> String

def import_of source · line 46 · 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 51 · raw

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

def reach source · line 59 · 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 74 · 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 84 · raw

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

def fetch_if source · line 89 · 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 99 · raw

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

def hub_state source · line 102 · raw

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

def hub_states source · line 112 · raw

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

def first_word source · line 123 · raw

@+t:String -> String

---- GitHub ----

def pushed source · line 126 · raw

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

def remote source · line 129 · raw

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

def plugin_dir source · line 143 · 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 146 · raw

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

def last_segment source · line 149 · raw

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

def owner_of source · line 152 · raw

@+r:String -> String

def str_of source · line 155 · raw

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

def version_in source · line 162 · raw

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

def obj.go source · line 169 · 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 176 · raw

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

def others source · line 180 · 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 188 · raw

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

def marketplace source · line 196 · 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 204 · raw

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

def tag_differs source · line 213 · raw

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

def tag_state source · line 223 · raw

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

def tag_states source · line 236 · raw

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

def codex_marketplace source · line 248 · raw

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

Codex's listing of the same marketplace (.agents/plugins/marketplace.json), with this plugin available and every other plugin as it was.

def release_plugin source · line 259 · raw

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

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

def root source · line 277 · raw

IO(String)

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

def observe source · line 283 · raw

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

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

def bootstrap_after source · line 298 · raw

@fuel:Nat -> @ok:Bool -> @+domain:String -> @+path:String -> IO(Bool)

---- a deploy: carry out a plan with nothing blocked ---- Loading a launch agent: launchctl bootout returns before the old job is gone, and loading it again fails until it is, so this tries every quarter second, up to fuel times.

def bootstrap source · line 312 · raw

@fuel:Nat -> @+domain:String -> @+path:String -> IO(Bool)

def apply source · line 317 · raw

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

def apply_all source · line 361 · raw

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

def deploy_if source · line 370 · raw

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

def deploy source · line 379 · raw

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

def has_change source · line 384 · raw

@ss:List<&2, 0x61eb9b926b7147b74881eab60781316b/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 395 · raw

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

def host_of source · line 400 · raw

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

def rebuild_if source · line 405 · raw

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

def differs source · line 413 · 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 419 · raw

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

def platform_steps source · line 431 · raw

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

def node_steps source · line 442 · raw

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

def deployed_path source · line 455 · raw

@+root:String -> String

def breaks_step source · line 458 · raw

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

def deployed_steps source · line 463 · raw

@+root:String -> @+d:0x61eb9b926b7147b74881eab60781316b/domain/architecture/system/deployment/type.Deployment -> IO(List<&2, 0x61eb9b926b7147b74881eab60781316b/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 468 · raw

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

def deploy_all source · line 477 · raw

@+root:String -> @+entry:String -> @+a:0x61eb9b926b7147b74881eab60781316b/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 484 · raw

@p:0x61eb9b926b7147b74881eab60781316b/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 497 · raw

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

def import_all source · line 509 · raw

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