Swlive.restore: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/swlive.bend as Swlive Lines 200-205 of cswap-bend-cli@0.1.0.0/swlive.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&start_line=200&end_line=205 import Base import cswap-bend-cli@0.1.0.0/act.bend as Act import cswap-bend-cli@0.1.0.0/store/base.bend as SBase import cswap-bend-cli@0.1.0.0/store/io.bend as SIo # Undo a half-done switch: the three files go back to their old text. def restore(+ctx: SBase.Ctx, +root: String, +creds: Maybe<&2, String>, +cfg: Maybe<&2, String>, +seq_text: String) -> Act.of(Unit): do ActM: restore_text(SBase.live_creds_path(ctx), creds) restore_text(SBase.global_config_path(ctx), cfg) SIo.write_secret(SBase.seq_path(root), seq_text) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=Ctx https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=global_config_path https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=live_creds_path https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=seq_path https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/io.bend&name=write_secret https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=ActM.bind https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=restore_text