Skip to content

Commit dd189d8

Browse files
author
Yogthos
committed
bump up template version
1 parent c0ac3cd commit dd189d8

File tree

4 files changed

+46
-51
lines changed

4 files changed

+46
-51
lines changed

libs/deps-template/resources/io/github/kit_clj/kit/resources/system.edn

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
{
2-
:system/env
1+
{:system/env
32
#profile {:dev :dev
43
:test :test
54
:prod :prod}
6-
<% if metrics? %>
5+
<% if metrics? %>
76
:metrics/prometheus
8-
{}<% endif %>
9-
<% if repl? %>
7+
{} <% endif %>
8+
<% if repl? %>
109
:repl/server
1110
{:port #long #or [#env REPL_PORT 7200]
12-
:host #or [#env REPL_HOST "127.0.0.1"]}<% endif %>
13-
<% if nrepl? %>
11+
:host #or [#env REPL_HOST "127.0.0.1"]} <% endif %>
12+
<% if nrepl? %>
1413
:nrepl/server
1514
{:port #long #or [#env NREPL_PORT 7000]
16-
:bind #or [#env NREPL_HOST "127.0.0.1"]}<% endif %>
17-
<% if redis? %>
15+
:bind #or [#env NREPL_HOST "127.0.0.1"]} <% endif %>
16+
<% if redis? %>
1817
:cache/redis
1918
{:ttl 3600
2019
:conn {:pool {}
21-
:spec {:uri #env REDIS_URI}}}<% endif %>
20+
:spec {:uri #env REDIS_URI}}} <% endif %>
2221

2322
:server/http
2423
{:port #long #or [#env PORT 3000]
@@ -49,28 +48,26 @@
4948
:responses {:not-modified-responses true
5049
:absolute-redirects true
5150
:content-types true
52-
:default-charset "utf-8"}}
53-
}
51+
:default-charset "utf-8"}}}
5452

5553
:reitit.routes/api
5654
{:base-path "/api"
5755
:env #ig/ref :system/env<% if metrics? %>
5856
:metrics #ig/ref :metrics/prometheus<% endif %><% if conman? %>
59-
:query-fn #ig/ref :db.sql/query-fn<% endif %>
60-
}
57+
:query-fn #ig/ref :db.sql/query-fn<% endif %>}
6158

6259
:router/routes
6360
{:routes #ig/refset :reitit/routes}
6461

6562
:router/core
6663
{:routes #ig/ref :router/routes
67-
:env #ig/ref :system/env}<% if quartz? %>
64+
:env #ig/ref :system/env} <% if quartz? %>
6865

6966
:cronut/scheduler
70-
{:schedule []}<% endif %><% if selmer? %>
67+
{:schedule []} <% endif %><% if selmer? %>
7168

7269
:templating/selmer
73-
{}<% endif %><% if xtdb? %>
70+
{} <% endif %><% if xtdb? %>
7471

7572
;; https://docs.xtdb.com/administration/configuring/
7673
:db.xtdb/node
@@ -85,7 +82,7 @@
8582
:db-dir "data/dev/index-store"
8683
:sync? true}}}
8784
:test {}
88-
:prod {}}<% endif %><% if hikari? %>
85+
:prod {}} <% endif %><% if hikari? %>
8986

9087
:db.sql/hikari-connection
9188
#profile {:dev {:jdbc-url "jdbc:mysql://127.0.0.1:3306/<<name>>?characterEncoding=utf8"}
@@ -103,7 +100,7 @@
103100
:password "123456"
104101
:jdbc-url #env JDBC_URL
105102
:driver-class-name "com.mysql.jdbc.Driver"
106-
:register-mbeans false}}<% endif %><% if conman? %>
103+
:register-mbeans false}} <% endif %><% if conman? %>
107104

108105
:db.sql/connection
109106
#profile {:dev {:jdbc-url "jdbc:postgresql://localhost/<<name>>?user=<<name>>&password=<<name>>"}
@@ -118,10 +115,9 @@
118115
{:conn #ig/ref :db.sql/connection
119116
:options {}
120117
:filename "queries.sql"
121-
:env #ig/ref :system/env}<% endif %><% if migratus? %>
118+
:env #ig/ref :system/env} <% endif %><% if migratus? %>
122119

123120
:db.sql/migrations
124121
{:store :database
125122
:db {:datasource #ig/ref :db.sql/connection}
126-
:migrate-on-init? true}<% endif %>
127-
}
123+
:migrate-on-init? true} <% endif %>}
Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
11
(ns <<ns-name>>.core
22
(:require
3-
[clojure.tools.logging :as log]
4-
[integrant.core :as ig]
5-
[<<ns-name>>.config :as config]
6-
[<<ns-name>>.env :refer [defaults]]
3+
[clojure.tools.logging :as log]
4+
[integrant.core :as ig]
5+
[<<ns-name>>.config :as config]
6+
[<<ns-name>>.env :refer [defaults]]
77

88
;; Edges<% if redis? %>
9-
[kit.edge.cache.redis]<% endif %><% if xtdb? %>
10-
[kit.edge.db.xtdb]<% endif %><% if hikari? %>
11-
[kit.edge.db.sql.hikari]<% endif %><% if conman? %>
12-
[kit.edge.db.sql.conman]<% endif %><% if migratus? %>
13-
[kit.edge.db.sql.migratus]<% endif %><% if postgres? %>
14-
[kit.edge.db.postgres]<% endif %><% if mysql? %>
15-
[kit.edge.db.mysql]<% endif %><% if hato? %>
16-
[kit.edge.http.hato]<% endif %><% if quartz? %>
17-
[kit.edge.scheduling.quartz]<% endif %><% if selmer? %>
18-
[kit.edge.templating.selmer]<% endif %><% if metrics? %>
19-
[kit.edge.utils.metrics]<% endif %><% if repl? %>
20-
[kit.edge.utils.repl]<% endif %><% if nrepl? %>
21-
[kit.edge.utils.nrepl]<% endif %>
22-
[kit.edge.server.undertow]
23-
[<<ns-name>>.web.handler]
9+
[kit.edge.cache.redis] <% endif %><% if xtdb? %>
10+
[kit.edge.db.xtdb] <% endif %><% if hikari? %>
11+
[kit.edge.db.sql.hikari] <% endif %><% if conman? %>
12+
[kit.edge.db.sql.conman] <% endif %><% if migratus? %>
13+
[kit.edge.db.sql.migratus] <% endif %><% if postgres? %>
14+
[kit.edge.db.postgres] <% endif %><% if mysql? %>
15+
[kit.edge.db.mysql] <% endif %><% if hato? %>
16+
[kit.edge.http.hato] <% endif %><% if quartz? %>
17+
[kit.edge.scheduling.quartz] <% endif %><% if selmer? %>
18+
[kit.edge.templating.selmer] <% endif %><% if metrics? %>
19+
[kit.edge.utils.metrics] <% endif %><% if repl? %>
20+
[kit.edge.utils.repl] <% endif %><% if nrepl? %>
21+
[kit.edge.utils.nrepl] <% endif %>
22+
[kit.edge.server.undertow]
23+
[<<ns-name>>.web.handler]
2424

2525
;; Routes
26-
[<<ns-name>>.web.routes.api]
27-
)
26+
[<<ns-name>>.web.routes.api])
2827
(:gen-class))
2928

3029
;; log uncaught exceptions in threads
3130
(Thread/setDefaultUncaughtExceptionHandler
32-
(fn [thread ex]
33-
(log/error {:what :uncaught-exception
34-
:exception ex
35-
:where (str "Uncaught exception on" (.getName thread))})))
31+
(fn [thread ex]
32+
(log/error {:what :uncaught-exception
33+
:exception ex
34+
:where (str "Uncaught exception on" (.getName thread))})))
3635

3736
(defonce system (atom nil))
3837

@@ -50,4 +49,4 @@
5049
(defn -main [& _]
5150
(start-app)
5251
(.addShutdownHook (Runtime/getRuntime) (Thread. stop-app))
53-
(.addShutdownHook (Runtime/getRuntime) (Thread. shutdown-agents)))
52+
(.addShutdownHook (Runtime/getRuntime) (Thread. shutdown-agents)))

libs/deps-template/resources/io/github/kit_clj/kit/versions.edn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
"kit-sql-hikari" "1.0.6"
1919
"kit-sql" "1.1.4"
2020
"kit-undertow" "1.0.8"
21-
"lein-template" "0.1.71"
22-
"deps-template" "0.1.71"}
21+
"lein-template" "0.1.72"
22+
"deps-template" "0.1.72"}

libs/lein-template/deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{:paths ["src"]
22
:deps {selmer/selmer {:mvn/version "1.12.59"}
33
com.github.seancorfield/clj-new {:mvn/version "1.2.381"}
4-
io.github.kit-clj/deps-template {:mvn/version "0.1.71"}}}
4+
io.github.kit-clj/deps-template {:mvn/version "0.1.72"}}}

0 commit comments

Comments
 (0)