Compare commits

..

No commits in common. "bd7ea0ccba89965ce97b14cbd3003ec5f8ced302" and "f4a4a30f2439edc700a35d9cd6db0bbf29b97c8c" have entirely different histories.

3 changed files with 4 additions and 18 deletions

View file

@ -3,8 +3,7 @@
[orchestra.core :refer [defn-spec]]
[clojure.spec.alpha :as s]
[dda.backup.cred-rot.domain :as domain]
[dda.backup.infrastructure :as i]
[cheshire.core :as cc]))
[dda.backup.infrastructure :as i]))
(s/def ::new-password-file string?)
@ -20,13 +19,9 @@
(if (not (nil? new-password-file))
(i/execute! (domain/add-password-command config) config))))
(defn-spec list-passwords! map?
(defn-spec list-passwords! nil?
[config ::cred-rot]
(i/execute-out! (domain/list-passwords-command config) config))
(defn-spec parse-passwords! nil?
[config ::cred-rot]
(println (cc/parse-string (list-passwords! config))))
(i/execute! (domain/list-passwords-command config) config))
(defn-spec replace-old-password! nil?
[]

View file

@ -57,7 +57,7 @@
(defn-spec list-passwords-command ::cd/command
[config ::config]
(base-command config ["key" "list" "--json"]))
[(base-command config ["key" "list" "--json"])])
(defn-spec add-password-command ::cd/command
[config ::config]

View file

@ -12,12 +12,3 @@
(println c))
(when-not dry-run
(apply t/shell c)))))
(defn-spec execute-out! string?
[command ::core/command
config ::core/execution]
(let [{:keys [dry-run debug]} config]
(when debug
(println command))
(when-not dry-run
(:out (t/shell {:out :string} (clojure.string/join " " command))))))