diff --git a/project.clj b/project.clj index 7bfde58..bf8c494 100644 --- a/project.clj +++ b/project.clj @@ -5,7 +5,7 @@ :url "https://www.apache.org/licenses/LICENSE-2.0.html"} :dependencies [[org.clojure/clojure "1.11.1"] [org.clojure/tools.reader "1.3.6"] - [org.domaindrivenarchitecture/c4k-common-clj "6.0.3"] + [org.domaindrivenarchitecture/c4k-common-clj "6.1.0"] [hickory "0.7.1" :exclusions [viebel/codox-klipse-theme]]] :target-path "target/%s/" :source-paths ["src/main/cljc" diff --git a/shadow-cljs.edn b/shadow-cljs.edn index 1c7058c..02a193d 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -4,7 +4,7 @@ "src/test/cljc" "src/test/cljs" "src/test/resources"] - :dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "6.0.3"] + :dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "6.1.0"] [hickory "0.7.1"]] :builds {:frontend {:target :browser :modules {:main {:init-fn dda.c4k-jitsi.browser/init}} diff --git a/src/main/cljc/dda/c4k_jitsi/jitsi.cljc b/src/main/cljc/dda/c4k_jitsi/jitsi.cljc index f7112a5..956da0e 100644 --- a/src/main/cljc/dda/c4k_jitsi/jitsi.cljc +++ b/src/main/cljc/dda/c4k_jitsi/jitsi.cljc @@ -1,14 +1,14 @@ (ns dda.c4k-jitsi.jitsi - (:require - [clojure.spec.alpha :as s] - #?(:cljs [shadow.resource :as rc]) - #?(:clj [orchestra.core :refer [defn-spec]] - :cljs [orchestra.core :refer-macros [defn-spec]]) - [dda.c4k-common.yaml :as yaml] - [dda.c4k-common.common :as cm] - [dda.c4k-common.ingress :as ing] - [dda.c4k-common.base64 :as b64] - [dda.c4k-common.predicate :as cp])) + (:require + [clojure.spec.alpha :as s] + #?(:clj [orchestra.core :refer [defn-spec]] + :cljs [orchestra.core :refer-macros [defn-spec]]) + [dda.c4k-common.yaml :as yaml] + [dda.c4k-common.common :as cm] + [dda.c4k-common.ingress :as ing] + [dda.c4k-common.base64 :as b64] + [dda.c4k-common.predicate :as cp] + #?(:cljs [dda.c4k-common.macros :refer-macros [inline-resources]]))) (s/def ::fqdn cp/fqdn-string?) (s/def ::issuer cp/letsencrypt-issuer?) @@ -22,18 +22,9 @@ (def auth? (s/keys :req-un [::jvb-auth-password ::jicofo-auth-password ::jicofo-component-secret])) - -#?(:cljs +#?(:cljs (defmethod yaml/load-resource :jitsi [resource-name] - (case resource-name - "jitsi/deployment.yaml" (rc/inline "jitsi/deployment.yaml") - "jitsi/etherpad-service.yaml" (rc/inline "jitsi/etherpad-service.yaml") - "jitsi/jvb-service.yaml" (rc/inline "jitsi/jvb-service.yaml") - "jitsi/excalidraw-backend-service.yaml" (rc/inline "jitsi/excalidraw-backend-service.yaml") - "jitsi/excalidraw-deployment.yaml" (rc/inline "jitsi/excalidraw-deployment.yaml") - "jitsi/secret.yaml" (rc/inline "jitsi/secret.yaml") - "jitsi/web-service.yaml" (rc/inline "jitsi/web-service.yaml") - (throw (js/Error. "Undefined Resource!"))))) + (get (inline-resources "jitsi") resource-name))) (defn-spec generate-ingress-web cp/map-or-seq? [config config?]