def capture2

cswap-bend-cli@0.1.0.0 · store.bend:145

import cswap-bend-cli@0.1.0.0/store.bend as Store
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq

145# The credential of the live login: .credentials.json, else primaryApiKey.
146def capture2(+ex: Bool, +path: String, +cfg: Json.Json) -> Act.of(String):
147  match ex:
148    case True{}:
149      Fs.read_file(path)
150    case False{}:
151      Act.pure(String, SSeq.field_str(cfg, "primaryApiKey"))

Uses (7)

Used by (1)