From 2b2e610851b1c494c9bb786ce6a33267a00dcf50 Mon Sep 17 00:00:00 2001 From: Dokkae6949 Date: Mon, 15 Dec 2025 16:23:48 +0100 Subject: [PATCH] swap jte for htmlflow dependencies --- .gitignore | 1 - Dockerfile | 3 +- build.gradle.kts | 35 +--- .../jte/META-INF/main.kotlin_module | Bin 24 -> 0 bytes .../JteIndexGenerated$Companion.class | Bin 9947 -> 0 bytes .../precompiled/JteIndexGenerated.class | Bin 2254 -> 0 bytes .../precompiled/JteIndexGenerated.kt | 35 ---- .../JteMessageGenerated$Companion.class | Bin 5220 -> 0 bytes .../partials/JteMessageGenerated.class | Bin 2384 -> 0 bytes .../partials/JteMessageGenerated.kt | 46 ----- .../homepage/generated/jooq/DefaultCatalog.kt | 43 ---- .../dokkae/homepage/generated/jooq/Public.kt | 40 ---- .../homepage/generated/jooq/keys/Keys.kt | 21 -- .../homepage/generated/jooq/tables/Message.kt | 187 ------------------ .../generated/jooq/tables/pojos/Message.kt | 76 ------- .../jooq/tables/records/MessageRecord.kt | 73 ------- .../jooq/tables/references/Tables.kt | 15 -- gradle/libs.versions.toml | 9 +- jte-classes/META-INF/main.kotlin_module | Bin 24 -> 0 bytes .../generated/ondemand/JteIndexGenerated.kt | 35 ---- .../ondemand/partials/JteMessageGenerated.kt | 46 ----- 21 files changed, 6 insertions(+), 659 deletions(-) delete mode 100644 build/generated-resources/jte/META-INF/main.kotlin_module delete mode 100644 build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated$Companion.class delete mode 100644 build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated.class delete mode 100644 build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated.kt delete mode 100644 build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated$Companion.class delete mode 100644 build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.class delete mode 100644 build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/DefaultCatalog.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/Public.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/keys/Keys.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/Message.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/pojos/Message.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/records/MessageRecord.kt delete mode 100644 build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/references/Tables.kt delete mode 100644 jte-classes/META-INF/main.kotlin_module delete mode 100644 jte-classes/gg/jte/generated/ondemand/JteIndexGenerated.kt delete mode 100644 jte-classes/gg/jte/generated/ondemand/partials/JteMessageGenerated.kt diff --git a/.gitignore b/.gitignore index 1fee1ef..9db209f 100644 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,6 @@ gradle-app.setting # Allow generated code fragments for Docker builds !build/generated-src/** -!build/generated-resources/** ################### ### Environment ### diff --git a/Dockerfile b/Dockerfile index 8e2c09b..d0b9a2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,9 @@ COPY --chown=gradle:gradle src ./src # Copy pre-generated code fragments COPY --chown=gradle:gradle build/generated-src ./build/generated-src -COPY --chown=gradle:gradle build/generated-resources ./build/generated-resources # Build the fat jar without cleaning (preserves generated code) -RUN ./gradlew build -x clean -x cleanGenerated -x jooqCodegen -x flywayMigrate -x precompileJte --no-daemon +RUN ./gradlew build -x clean -x cleanGenerated -x jooqCodegen -x flywayMigrate --no-daemon # --- Stage 2: Run the app --- FROM eclipse-temurin:21-jdk-alpine diff --git a/build.gradle.kts b/build.gradle.kts index defbd59..a9ff681 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,8 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import io.github.klahap.dotenv.DotEnv import io.github.klahap.dotenv.DotEnvBuilder import org. gradle.api.JavaVersion.VERSION_21 import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile -import kotlin.io.path.Path // ==================================================================================================== // ENVIRONMENT CONFIGURATION @@ -33,7 +31,6 @@ plugins { alias(libs.plugins.kotlin.jvm) alias(libs.plugins.shadow) alias(libs.plugins.dotenv.plugin) - alias(libs.plugins.jte) alias(libs.plugins.tasktree) alias(libs.plugins.jooq.codegen.gradle) alias(libs.plugins.flyway) @@ -62,16 +59,12 @@ repositories { // GENERATED CODE DIRECTORIES // ==================================================================================================== -val generatedResourcesDir = layout.buildDirectory.dir("generated-resources") val generatedSourcesDir = layout.buildDirectory.dir("generated-src") val migrationSourceDir = layout.projectDirectory.dir("src/main/resources/db/migration") -val jtwSourceDir = layout.projectDirectory.dir("src/main/kte") -val jteOutputDir = generatedResourcesDir.get().dir("jte") val jooqOutputDir = generatedSourcesDir.get().dir("jooq") sourceSets { main { - resources.srcDir(jteOutputDir) kotlin.srcDir(jooqOutputDir) } } @@ -89,7 +82,7 @@ dependencies { implementation(libs.dotenv) // Templating - implementation(libs.jte.kotlin) + implementation(libs.htmlflow.kotlin) // Database implementation(libs.bundles.database) @@ -117,27 +110,6 @@ buildscript { } } -// ==================================================================================================== -// JTE TEMPLATE GENERATION -// ==================================================================================================== - -jte { - sourceDirectory.set(Path(jtwSourceDir.asFile.absolutePath)) - targetDirectory.set(Path(jteOutputDir.asFile.absolutePath)) - precompile() -} - -tasks.named("precompileJte") { - dependsOn("compileKotlin") -} - -tasks.register("genJte") { - group = "codegen" - description = "Precompile jte template into classes" - - dependsOn("precompileJte") -} - // ==================================================================================================== // JOOQ CODE GENERATION FROM SQL FILES // ==================================================================================================== @@ -263,9 +235,7 @@ tasks.named("shadowJar") { attributes("Main-Class" to "at.dokkae.homepage.HomepageKt") } - dependsOn("genJte", "genJooq") - - from(jteOutputDir) + dependsOn("genJooq") archiveFileName.set("app.jar") @@ -296,7 +266,6 @@ tasks.register("cleanGenerated") { description = "Clean all generated code" doLast { - delete(generatedResourcesDir) delete(generatedSourcesDir) logger.lifecycle("✓ Cleaned generated code directories") } diff --git a/build/generated-resources/jte/META-INF/main.kotlin_module b/build/generated-resources/jte/META-INF/main.kotlin_module deleted file mode 100644 index 9dbc290d21e8fd8815939343a7a5484dc57cfcde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24 ZcmZQzU|?ooU|?ckU|?i`0wo451^@wK08;<} diff --git a/build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated$Companion.class b/build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated$Companion.class deleted file mode 100644 index 448574bee4a2ab000f00a5d9b1766319b926f593..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9947 zcmX^0Z`VEs1_l#`IgAVz>FN4eC8_%9sd=eIi6yBi`UOR)$@#ejnK`K``d%feo_Q&$ z749%u73ciig2cSc{5*CBMn(pKti-ZJ{hY+SbbbG%tkmQZb_Qlf1~!|_yv!0iMh0dL z%`hGYRt7dM1{MZ(Mh2FWjLc$21}h(OEwyH3U@J<^OGzzaWXREg8Iw_xo1^bhlA9Bf znp=>QSd!{rT2fG2VvQm1nOBlpl$=^nl3!%)lUSmklAoQOn5v(VpPO2cn4YR%0@Yuv z5B4?8IBU%?Mh4C-n7ND$LRlrLAp4NaV`N~>%}+_qVPp{V$<8my$;{KwD$CXPD$5Nn zNi4}swq|5d_Q@|w*Uw5VNh(Ur%q!MU%*)FM$>rx2>-*)G_?715STi!H;8RtalarW~ zlWNVuz{|)Whh$GC$Y*(pIr^S?B}JKe#hJ;)>N~I-fx)w^vQhABFskTaGnW^Ok`9&p4 z3d#9-C8>EOwo2uhDJ2=UDXC?d$*Hq}m$7%qht%$w{?y0Y{{I zv4V3(Vu_7DM34*Oh~ng;%z_ey;-X|*rHqo2f?_Lu{p6H9y{zJt)SS$+BE7uS68*e_ zT>Xra+zP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ijl>M{m>#d77iu> zW{_$lMg|5(1`&)xOE0^GkwH4BG_NExH`Oz*EVDQ>DJRttktG=!Se)}yQb9qUnV0HU znwykb6avb8pzz2~PRt2QEXoA&p@Nc7v%;{Lqym+L+YAfF z#f%J`!I|lKi6x~)sf-Lfo_TqxMb0^i#l@+`j0{}C`K3k4scxA$sSJh;Objdx3=GT+ zlAsLDz{udpz`(%9z{nuTz`!60iY%xY7XuT6F#`isT%W-Ji#Q7dBdDlmU}SJ&U|`S( z#Q_5Y1FP0{29AxO*kN#n8V<6;g@J*Ahk+5KfPs^N3v3-X0}lfWShEKM3j-+TxHd6} zX=&?hV~|2Mfs;X&0c3&#L=^)sgERvOa53;P$be1dV&G?xWnf}(h1w~=z`)?fz`!8P z4D}r&gAfBKjzK*xq;OGGb@DB!%R~Q)X>}HUNWZcf6v6(?kNNY2Lo`CWmE^jSnW`8Xf zW`8YKW`8X<7Jn^vR(~xHc7H7aHW0xMBEVcu5Q|Gd$X`o<8%**DsQPOO@CsP@YYFfP zMEGk7@C(HHYY7MlB=~Cy2!cr=fkb~T0bwvHB9P>-B_IkW#RSs)wFJZka{RRfBm~O+ zwFD#u8Cv|c1f&ERCi!a#NDDG7^w$!Qfl#s#N)F@#c@UuhA{0S{61%_FW(FfrI5UFN z4JZL}GjK8pFmN$2Gk7vEFmN$2GDt8mF$gnAGI)W*)d3u?Rt$^`CJd|$rqK+{o(yK5 t4CbB;77Ui24CV}0o($FuHqi`>#SFF#cF_#1#SC1<4EDt!23s+MFaUWp6b%3X diff --git a/build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated.kt b/build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated.kt deleted file mode 100644 index 5b8c1dc..0000000 --- a/build/generated-resources/jte/gg/jte/generated/precompiled/JteIndexGenerated.kt +++ /dev/null @@ -1,35 +0,0 @@ -@file:Suppress("ktlint") -package gg.jte.generated.precompiled -import at.dokkae.homepage.templates.IndexTemplate -import at.dokkae.homepage.templates.MessageTemplate -import gg.jte.support.ForSupport -@Suppress("UNCHECKED_CAST", "UNUSED_PARAMETER") -class JteIndexGenerated { -companion object { - @JvmField val JTE_NAME = "Index.kte" - @JvmField val JTE_LINE_INFO = intArrayOf(0,0,0,1,2,4,4,4,4,4,18,18,37,58,88,93,96,96,97,97,98,98,102,108,119,132,146,161,161,161,4,4,4,4,4) - @JvmStatic fun render(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, model:IndexTemplate) { - jteOutput.writeContent("\n\n\n\n \n \n Dokkae's Chat\n\n \n \n \n\n \n\n\n
\n ") - jteOutput.writeContent("\n
\n

Dokkae's Chat

\n
\n\n ") - jteOutput.writeContent("\n
\n
\n ") - for (message in model.messages) { - jteOutput.writeContent("\n ") - gg.jte.generated.precompiled.partials.JteMessageGenerated.render(jteOutput, jteHtmlInterceptor, MessageTemplate(message)); - jteOutput.writeContent("\n ") - } - jteOutput.writeContent("\n
\n
\n\n ") - jteOutput.writeContent("\n
\n
\n ") - jteOutput.writeContent("\n
\n
\n \n
\n
\n\n ") - jteOutput.writeContent("\n
\n
\n
\n \n
\n\n ") - jteOutput.writeContent("\n \n
\n
\n
\n
\n\n ") - jteOutput.writeContent("\n \n
\n\n\n") - } - @JvmStatic fun renderMap(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, params:Map) { - val model = params["model"] as IndexTemplate - render(jteOutput, jteHtmlInterceptor, model); - } -} -} diff --git a/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated$Companion.class b/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated$Companion.class deleted file mode 100644 index 356b8f657cff5bab3e447b0bd6e1a3312ebba154..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5220 zcmX^0Z`VEs1_l#`TZ|0O>FN4eC8_%9sd=eIi6yBi`UOR)$@#ejnK>YKVo^zEVotHX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8Aa11G%a%g7*xrDv>{4Qe1jnjQQ;nR%&xrMXF| zMIoRr8Y6>{PkwS@PFP}5CWsFelng4(0~J$YnZ=n&IjN3_E+8X=3RKQBuM8p!@2{aK z6Yxzf$;eNEOBORSa0X|l=Ovbu7Ns&W@Ob9sr4~7Z+R3TKj0{}C`K3k4scxA$sSJh; zObjdxAi%=F1nQ$RFfv?ZU|`S(r5pwZ23D=@3>+IlX^P497LwV?pv1%=q_TrS zYX^hDHU^VOA+sF}mR2lqDQk2oR+y9k+g=7+D|ShCW+D4vNp= z?qDdEWZTJ5!N^dslc9!*;Q)i}PKJ6W25q5GMu=*mMyUQ~DBTK`fEdyVRo;yzE6D

7-SfD82A`O82A~~83Y*g z83Y-e7=#$S7=#&W7(^Ia7(^L*7{nN+F^DrPV-RQ9%^<;Wgh7(w41*NI6$WXBy9_c6 zuNY(*J~7BK{AQ466kt$blweR~RAf+MG-FU^v|~_VbYoCu^k-0GjA2k`OkvOfCj<`$ zb_R7uJBEb}ix^lKoEViE7BehjU}dObc*(GYVJQO}C@Dab2?Jv)124leP|{&cW#D62 z&cFng*-GB7akF)%Rj zgA?CMhE)u#pv1?}#K6M9%D}*&0ZV*qAxUs2!zLz%NTDq|7`7i^h_zzT($Jdq9q51UpO&A_#X5E5lxfeGH5Y%nUcc zITWPn9K(4ANrszX$6NqACWV2KVLt;a!+~f9W>1ELo(zXP84fcX@nkr}aMY9G7{l>s z2F7BB6AUM#8H9@&xQZE06*I6FGq4pioCdScfJtsJ$y>~@teAnXm|=M_1Aj5YieiS9 L#SCkT8BPHJSB7vl diff --git a/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.class b/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.class deleted file mode 100644 index a51102d1763b658a8b4118c8465ce17c824cab4a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2384 zcmX^0Z`VEs1_l!bZ$<{o^mP5Kl2rZl)V$Q9#FEq${eq&@(fmuT{ zjE8}hfsKoSg@K)sfu$rPvzU>=+J|ggtr;2Eic<4ZQi~WF@-$%PWR&FQ=zEmp=7gl? z7UU$Br23bZ6qJ_0?SadC=9Q!tC8rjYD^NRHo^YZdRa`}11`hNK(ex*4%){G1)_*9kVfPVc=%q z;bM?rkYr>~fH@K#AF$ws#up=lEQS)K0Jdgi&?7C@7#TPrsl_+3fRVwU!UO|O?4>1{ zIr_ed1>h7>MoklKe83ifb5n3hQD$DcwKkFvB!gMofh}e$NGwXsE#_g6V~_`ht`Z{y zKSV9ueT)noHpw~AoM@V7*pKXd9tLd&9Z-7GWn|z5 zsr2#mbB*`(bMt3pV2bwSVbEtV07)A%GKl)1W*N84)SMJ+Mg~EcxNmAnVoG93qBSD} zQ*IeE0|NsSh+qT}42%qn*^CTK6`3HO0V4xbiXkI|+JOchE+z>kE+&Bk4O~nd%n}D0 z6j+Ry3>d8#S)AApEn;KgU=m;ksWxI{U|?hr!&1!YWtT8ANC%bXm1O3odghg77H1~q zq&gzV3J>e(_c$K089!BaQSNq2!Tmq0X}~%0TBUye=Pw~FewHm z#lfV6fRMkIfTVz^zm|X$n3M*SG6E9*S^~0QQVvYYgGmK2sR$;O1Z4cR1e68j{IvvB zz@#deR1;A0*Ah?%lNw-B6YOR!FsThDb-<)9h}_Iz1d1$1aN+}{Vr~X*1_1^h24)6N z1_lN$21W)61||k!21y1laO60EBgcw?k->z4mBBQcf!UM6%#*>~lfi<)(v!iQ!OD}t fn!zTTfw7pumccHXfwh={tC+#Q7{p*JW)KDdbto== diff --git a/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.kt b/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.kt deleted file mode 100644 index f00a90c..0000000 --- a/build/generated-resources/jte/gg/jte/generated/precompiled/partials/JteMessageGenerated.kt +++ /dev/null @@ -1,46 +0,0 @@ -@file:Suppress("ktlint") -package gg.jte.generated.precompiled.partials -import at.dokkae.homepage.templates.MessageTemplate -import java.time.Instant -import java.time.ZoneId -import java.time.format.DateTimeFormatter -import kotlin.math.absoluteValue -@Suppress("UNCHECKED_CAST", "UNUSED_PARAMETER") -class JteMessageGenerated { -companion object { - @JvmField val JTE_NAME = "partials/Message.kte" - @JvmField val JTE_LINE_INFO = intArrayOf(0,0,0,1,2,3,4,6,6,6,6,6,8,8,8,9,9,10,10,14,15,15,15,15,18,21,21,21,24,24,24,24,24,24,28,30,30,30,34,34,34,6,6,6,6,6) - @JvmStatic fun render(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, model:MessageTemplate) { - jteOutput.writeContent("\n") - val dateFormatter: DateTimeFormatter = DateTimeFormatter.ofPattern("dd.MM.yyyy").withZone(ZoneId.systemDefault()) - jteOutput.writeContent("\n") - val timeFormatter: DateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm").withZone(ZoneId.systemDefault()) - jteOutput.writeContent("\n") - val borderColors = listOf("red", "orange", "yellow", "green", "blue", "pink" ) - jteOutput.writeContent("\n\n

\n
\n ") - jteOutput.writeContent("\n
\n\n
\n ") - jteOutput.writeContent("\n
\n \n ") - jteOutput.setContext("span", null) - jteOutput.writeUserContent(model.message.author) - jteOutput.writeContent("\n \n \n ") - jteOutput.setContext("span", null) - jteOutput.writeUserContent(dateFormatter.format(model.message.createdAt)) - jteOutput.writeContent(" • ") - jteOutput.setContext("span", null) - jteOutput.writeUserContent(timeFormatter.format(model.message.createdAt)) - jteOutput.writeContent("\n \n
\n\n ") - jteOutput.writeContent("\n
\n ") - jteOutput.setContext("div", null) - jteOutput.writeUserContent(model.message.content) - jteOutput.writeContent("\n
\n
\n
\n
") - } - @JvmStatic fun renderMap(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, params:Map) { - val model = params["model"] as MessageTemplate - render(jteOutput, jteHtmlInterceptor, model); - } -} -} diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/DefaultCatalog.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/DefaultCatalog.kt deleted file mode 100644 index 034f3de..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/DefaultCatalog.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq - - -import kotlin.collections.List - -import org.jooq.Constants -import org.jooq.Schema -import org.jooq.impl.CatalogImpl - - -/** - * This class is generated by jOOQ. - */ -@Suppress("warnings") -open class DefaultCatalog : CatalogImpl("") { - companion object { - - /** - * The reference instance of DEFAULT_CATALOG - */ - val DEFAULT_CATALOG: DefaultCatalog = DefaultCatalog() - } - - /** - * standard public schema - */ - val PUBLIC: Public get(): Public = Public.PUBLIC - - override fun getSchemas(): List = listOf( - Public.PUBLIC - ) - - /** - * A reference to the 3.20 minor release of the code generator. If this - * doesn't compile, it's because the runtime library uses an older minor - * release, namely: 3.20. You can turn off the generation of this reference - * by specifying /configuration/generator/generate/jooqVersionReference - */ - private val REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_20 -} diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/Public.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/Public.kt deleted file mode 100644 index 772d0e4..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/Public.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq - - -import at.dokkae.homepage.generated.jooq.tables.Message - -import kotlin.collections.List - -import org.jooq.Catalog -import org.jooq.Table -import org.jooq.impl.DSL -import org.jooq.impl.SchemaImpl - - -/** - * standard public schema - */ -@Suppress("warnings") -open class Public : SchemaImpl(DSL.name("public"), DefaultCatalog.DEFAULT_CATALOG, DSL.comment("standard public schema")) { - companion object { - - /** - * The reference instance of public - */ - val PUBLIC: Public = Public() - } - - /** - * The table public.message. - */ - val MESSAGE: Message get() = Message.MESSAGE - - override fun getCatalog(): Catalog = DefaultCatalog.DEFAULT_CATALOG - - override fun getTables(): List> = listOf( - Message.MESSAGE - ) -} diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/keys/Keys.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/keys/Keys.kt deleted file mode 100644 index f59d310..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/keys/Keys.kt +++ /dev/null @@ -1,21 +0,0 @@ -@file:Suppress("warnings") -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq.keys - - -import at.dokkae.homepage.generated.jooq.tables.Message -import at.dokkae.homepage.generated.jooq.tables.records.MessageRecord - -import org.jooq.UniqueKey -import org.jooq.impl.DSL -import org.jooq.impl.Internal - - - -// ------------------------------------------------------------------------- -// UNIQUE and PRIMARY KEY definitions -// ------------------------------------------------------------------------- - -val MESSAGE_PKEY: UniqueKey = Internal.createUniqueKey(Message.MESSAGE, DSL.name("message_pkey"), arrayOf(Message.MESSAGE.ID), true) diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/Message.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/Message.kt deleted file mode 100644 index 4801187..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/Message.kt +++ /dev/null @@ -1,187 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq.tables - - -import at.dokkae.homepage.generated.jooq.Public -import at.dokkae.homepage.generated.jooq.keys.MESSAGE_PKEY -import at.dokkae.homepage.generated.jooq.tables.records.MessageRecord - -import java.time.OffsetDateTime -import java.util.UUID - -import kotlin.collections.Collection - -import org.jooq.Condition -import org.jooq.Field -import org.jooq.ForeignKey -import org.jooq.InverseForeignKey -import org.jooq.Name -import org.jooq.PlainSQL -import org.jooq.QueryPart -import org.jooq.Record -import org.jooq.SQL -import org.jooq.Schema -import org.jooq.Select -import org.jooq.Stringly -import org.jooq.Table -import org.jooq.TableField -import org.jooq.TableOptions -import org.jooq.UniqueKey -import org.jooq.impl.DSL -import org.jooq.impl.SQLDataType -import org.jooq.impl.TableImpl - - -/** - * This class is generated by jOOQ. - */ -@Suppress("warnings") -open class Message( - alias: Name, - path: Table?, - childPath: ForeignKey?, - parentPath: InverseForeignKey?, - aliased: Table?, - parameters: Array?>?, - where: Condition? -): TableImpl( - alias, - Public.PUBLIC, - path, - childPath, - parentPath, - aliased, - parameters, - DSL.comment(""), - TableOptions.table(), - where, -) { - companion object { - - /** - * The reference instance of public.message - */ - val MESSAGE: Message = Message() - } - - /** - * The class holding records for this type - */ - override fun getRecordType(): Class = MessageRecord::class.java - - /** - * The column public.message.id. - */ - val ID: TableField = createField(DSL.name("id"), SQLDataType.UUID.nullable(false), this, "") - - /** - * The column public.message.author. - */ - val AUTHOR: TableField = createField(DSL.name("author"), SQLDataType.VARCHAR(31).nullable(false), this, "") - - /** - * The column public.message.content. - */ - val CONTENT: TableField = createField(DSL.name("content"), SQLDataType.VARCHAR(255).nullable(false), this, "") - - /** - * The column public.message.created_at. - */ - val CREATED_AT: TableField = createField(DSL.name("created_at"), SQLDataType.TIMESTAMPWITHTIMEZONE(6).nullable(false).defaultValue(DSL.field(DSL.raw("CURRENT_TIMESTAMP"), SQLDataType.TIMESTAMPWITHTIMEZONE)), this, "") - - /** - * The column public.message.updated_at. - */ - val UPDATED_AT: TableField = createField(DSL.name("updated_at"), SQLDataType.TIMESTAMPWITHTIMEZONE(6), this, "") - - private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) - private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) - - /** - * Create an aliased public.message table reference - */ - constructor(alias: String): this(DSL.name(alias)) - - /** - * Create an aliased public.message table reference - */ - constructor(alias: Name): this(alias, null) - - /** - * Create a public.message table reference - */ - constructor(): this(DSL.name("message"), null) - override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC - override fun getPrimaryKey(): UniqueKey = MESSAGE_PKEY - override fun `as`(alias: String): Message = Message(DSL.name(alias), this) - override fun `as`(alias: Name): Message = Message(alias, this) - override fun `as`(alias: Table<*>): Message = Message(alias.qualifiedName, this) - - /** - * Rename this table - */ - override fun rename(name: String): Message = Message(DSL.name(name), null) - - /** - * Rename this table - */ - override fun rename(name: Name): Message = Message(name, null) - - /** - * Rename this table - */ - override fun rename(name: Table<*>): Message = Message(name.qualifiedName, null) - - /** - * Create an inline derived table from this table - */ - override fun where(condition: Condition?): Message = Message(qualifiedName, if (aliased()) this else null, condition) - - /** - * Create an inline derived table from this table - */ - override fun where(conditions: Collection): Message = where(DSL.and(conditions)) - - /** - * Create an inline derived table from this table - */ - override fun where(vararg conditions: Condition?): Message = where(DSL.and(*conditions)) - - /** - * Create an inline derived table from this table - */ - override fun where(condition: Field?): Message = where(DSL.condition(condition)) - - /** - * Create an inline derived table from this table - */ - @PlainSQL override fun where(condition: SQL): Message = where(DSL.condition(condition)) - - /** - * Create an inline derived table from this table - */ - @PlainSQL override fun where(@Stringly.SQL condition: String): Message = where(DSL.condition(condition)) - - /** - * Create an inline derived table from this table - */ - @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Message = where(DSL.condition(condition, *binds)) - - /** - * Create an inline derived table from this table - */ - @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Message = where(DSL.condition(condition, *parts)) - - /** - * Create an inline derived table from this table - */ - override fun whereExists(select: Select<*>): Message = where(DSL.exists(select)) - - /** - * Create an inline derived table from this table - */ - override fun whereNotExists(select: Select<*>): Message = where(DSL.notExists(select)) -} diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/pojos/Message.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/pojos/Message.kt deleted file mode 100644 index 7976170..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/pojos/Message.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq.tables.pojos - - -import java.io.Serializable -import java.time.OffsetDateTime -import java.util.UUID - - -/** - * This class is generated by jOOQ. - */ -@Suppress("warnings") -data class Message( - val id: UUID, - val author: String, - val content: String, - val createdAt: OffsetDateTime? = null, - val updatedAt: OffsetDateTime? = null -): Serializable { - - override fun equals(other: Any?): Boolean { - if (this === other) - return true - if (other == null) - return false - if (this::class != other::class) - return false - val o: Message = other as Message - if (this.id != o.id) - return false - if (this.author != o.author) - return false - if (this.content != o.content) - return false - if (this.createdAt == null) { - if (o.createdAt != null) - return false - } - else if (this.createdAt != o.createdAt) - return false - if (this.updatedAt == null) { - if (o.updatedAt != null) - return false - } - else if (this.updatedAt != o.updatedAt) - return false - return true - } - - override fun hashCode(): Int { - val prime = 31 - var result = 1 - result = prime * result + this.id.hashCode() - result = prime * result + this.author.hashCode() - result = prime * result + this.content.hashCode() - result = prime * result + (if (this.createdAt == null) 0 else this.createdAt.hashCode()) - result = prime * result + (if (this.updatedAt == null) 0 else this.updatedAt.hashCode()) - return result - } - - override fun toString(): String { - val sb = StringBuilder("Message (") - - sb.append(id) - sb.append(", ").append(author) - sb.append(", ").append(content) - sb.append(", ").append(createdAt) - sb.append(", ").append(updatedAt) - - sb.append(")") - return sb.toString() - } -} diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/records/MessageRecord.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/records/MessageRecord.kt deleted file mode 100644 index fb107a6..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/records/MessageRecord.kt +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq.tables.records - - -import at.dokkae.homepage.generated.jooq.tables.Message - -import java.time.OffsetDateTime -import java.util.UUID - -import org.jooq.Record1 -import org.jooq.impl.UpdatableRecordImpl - - -/** - * This class is generated by jOOQ. - */ -@Suppress("warnings") -open class MessageRecord private constructor() : UpdatableRecordImpl(Message.MESSAGE) { - - open var id: UUID - set(value): Unit = set(0, value) - get(): UUID = get(0) as UUID - - open var author: String - set(value): Unit = set(1, value) - get(): String = get(1) as String - - open var content: String - set(value): Unit = set(2, value) - get(): String = get(2) as String - - open var createdAt: OffsetDateTime? - set(value): Unit = set(3, value) - get(): OffsetDateTime? = get(3) as OffsetDateTime? - - open var updatedAt: OffsetDateTime? - set(value): Unit = set(4, value) - get(): OffsetDateTime? = get(4) as OffsetDateTime? - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - override fun key(): Record1 = super.key() as Record1 - - /** - * Create a detached, initialised MessageRecord - */ - constructor(id: UUID, author: String, content: String, createdAt: OffsetDateTime? = null, updatedAt: OffsetDateTime? = null): this() { - this.id = id - this.author = author - this.content = content - this.createdAt = createdAt - this.updatedAt = updatedAt - resetTouchedOnNotNull() - } - - /** - * Create a detached, initialised MessageRecord - */ - constructor(value: at.dokkae.homepage.generated.jooq.tables.pojos.Message?): this() { - if (value != null) { - this.id = value.id - this.author = value.author - this.content = value.content - this.createdAt = value.createdAt - this.updatedAt = value.updatedAt - resetTouchedOnNotNull() - } - } -} diff --git a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/references/Tables.kt b/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/references/Tables.kt deleted file mode 100644 index 4feda24..0000000 --- a/build/generated-src/jooq/at/dokkae/homepage/generated/jooq/tables/references/Tables.kt +++ /dev/null @@ -1,15 +0,0 @@ -@file:Suppress("warnings") -/* - * This file is generated by jOOQ. - */ -package at.dokkae.homepage.generated.jooq.tables.references - - -import at.dokkae.homepage.generated.jooq.tables.Message - - - -/** - * The table public.message. - */ -val MESSAGE: Message = Message.MESSAGE diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d58e295..f8d692f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ shadow = "9.3.0" dotenv-plugin = "1.1.3" dotenv = "6.5.1" http4k = "6.23.1.0" -jte = "3.2.1" +htmlflow = "5.0.1" flyway = "11.19.0" jooq = "3.20.10" junit = "6.0.0" @@ -15,7 +15,6 @@ tasktree = "4.0.1" kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } shadow = { id = "com.gradleup.shadow", version.ref = "shadow" } dotenv-plugin = { id = "io.github.klahap.dotenv", version.ref = "dotenv-plugin" } -jte = { id = "gg.jte.gradle", version.ref = "jte" } jooq-codegen-gradle = { id = "org.jooq.jooq-codegen-gradle", version.ref = "jooq" } tasktree = { id = "com.dorongold.task-tree", version.ref = "tasktree" } flyway = { id = "org.flywaydb.flyway", version.ref = "flyway" } @@ -25,7 +24,6 @@ http4k = [ "http4k-client-okhttp", "http4k-core", "http4k-server-jetty", - "http4k-template-jte", "http4k-web-htmx" ] @@ -54,11 +52,10 @@ http4k-bom = { module = "org.http4k:http4k-bom", version.ref = "http4k" } http4k-client-okhttp = { module = "org.http4k:http4k-client-okhttp" } http4k-core = { module = "org.http4k:http4k-core" } http4k-server-jetty = { module = "org.http4k:http4k-server-jetty" } -http4k-template-jte = { module = "org.http4k:http4k-template-jte" } http4k-web-htmx = { module = "org.http4k:http4k-web-htmx" } -# JTE Templating -jte-kotlin = { module = "gg.jte:jte-kotlin", version.ref = "jte" } +# HTML Templating +htmlflow-kotlin = { module = "com.github.xmlet:htmlflow-kotlin", version.ref = "htmlflow" } # Database Driver postgresql = { module = "org.postgresql:postgresql", version.ref = "postgresql" } diff --git a/jte-classes/META-INF/main.kotlin_module b/jte-classes/META-INF/main.kotlin_module deleted file mode 100644 index 9dbc290d21e8fd8815939343a7a5484dc57cfcde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24 ZcmZQzU|?ooU|?ckU|?i`0wo451^@wK08;<} diff --git a/jte-classes/gg/jte/generated/ondemand/JteIndexGenerated.kt b/jte-classes/gg/jte/generated/ondemand/JteIndexGenerated.kt deleted file mode 100644 index a762a23..0000000 --- a/jte-classes/gg/jte/generated/ondemand/JteIndexGenerated.kt +++ /dev/null @@ -1,35 +0,0 @@ -@file:Suppress("ktlint") -package gg.jte.generated.ondemand -import at.dokkae.homepage.templates.IndexTemplate -import at.dokkae.homepage.templates.MessageTemplate -import gg.jte.support.ForSupport -@Suppress("UNCHECKED_CAST", "UNUSED_PARAMETER") -class JteIndexGenerated { -companion object { - @JvmField val JTE_NAME = "Index.kte" - @JvmField val JTE_LINE_INFO = intArrayOf(0,0,0,1,2,4,4,4,4,4,18,18,37,58,88,93,96,96,97,97,98,98,102,108,119,132,146,161,161,161,4,4,4,4,4) - @JvmStatic fun render(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, model:IndexTemplate) { - jteOutput.writeContent("\n\n\n\n \n \n Dokkae's Chat\n\n \n \n \n\n \n\n\n
\n ") - jteOutput.writeContent("\n
\n

Dokkae's Chat

\n
\n\n ") - jteOutput.writeContent("\n
\n
\n ") - for (message in model.messages) { - jteOutput.writeContent("\n ") - gg.jte.generated.ondemand.partials.JteMessageGenerated.render(jteOutput, jteHtmlInterceptor, MessageTemplate(message)); - jteOutput.writeContent("\n ") - } - jteOutput.writeContent("\n
\n
\n\n ") - jteOutput.writeContent("\n
\n
\n ") - jteOutput.writeContent("\n
\n
\n \n
\n
\n\n ") - jteOutput.writeContent("\n
\n
\n
\n \n
\n\n ") - jteOutput.writeContent("\n \n
\n
\n
\n
\n\n ") - jteOutput.writeContent("\n \n
\n\n\n") - } - @JvmStatic fun renderMap(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, params:Map) { - val model = params["model"] as IndexTemplate - render(jteOutput, jteHtmlInterceptor, model); - } -} -} diff --git a/jte-classes/gg/jte/generated/ondemand/partials/JteMessageGenerated.kt b/jte-classes/gg/jte/generated/ondemand/partials/JteMessageGenerated.kt deleted file mode 100644 index 06f028d..0000000 --- a/jte-classes/gg/jte/generated/ondemand/partials/JteMessageGenerated.kt +++ /dev/null @@ -1,46 +0,0 @@ -@file:Suppress("ktlint") -package gg.jte.generated.ondemand.partials -import at.dokkae.homepage.templates.MessageTemplate -import java.time.Instant -import java.time.ZoneId -import java.time.format.DateTimeFormatter -import kotlin.math.absoluteValue -@Suppress("UNCHECKED_CAST", "UNUSED_PARAMETER") -class JteMessageGenerated { -companion object { - @JvmField val JTE_NAME = "partials/Message.kte" - @JvmField val JTE_LINE_INFO = intArrayOf(0,0,0,1,2,3,4,6,6,6,6,6,8,8,8,9,9,10,10,14,15,15,15,15,18,21,21,21,24,24,24,24,24,24,28,30,30,30,34,34,34,6,6,6,6,6) - @JvmStatic fun render(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, model:MessageTemplate) { - jteOutput.writeContent("\n") - val dateFormatter: DateTimeFormatter = DateTimeFormatter.ofPattern("dd.MM.yyyy").withZone(ZoneId.systemDefault()) - jteOutput.writeContent("\n") - val timeFormatter: DateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm").withZone(ZoneId.systemDefault()) - jteOutput.writeContent("\n") - val borderColors = listOf("red", "orange", "yellow", "green", "blue", "pink" ) - jteOutput.writeContent("\n\n
\n
\n ") - jteOutput.writeContent("\n
\n\n
\n ") - jteOutput.writeContent("\n
\n \n ") - jteOutput.setContext("span", null) - jteOutput.writeUserContent(model.message.author) - jteOutput.writeContent("\n \n \n ") - jteOutput.setContext("span", null) - jteOutput.writeUserContent(dateFormatter.format(model.message.createdAt)) - jteOutput.writeContent(" • ") - jteOutput.setContext("span", null) - jteOutput.writeUserContent(timeFormatter.format(model.message.createdAt)) - jteOutput.writeContent("\n \n
\n\n ") - jteOutput.writeContent("\n
\n ") - jteOutput.setContext("div", null) - jteOutput.writeUserContent(model.message.content) - jteOutput.writeContent("\n
\n
\n
\n
") - } - @JvmStatic fun renderMap(jteOutput:gg.jte.html.HtmlTemplateOutput, jteHtmlInterceptor:gg.jte.html.HtmlInterceptor?, params:Map) { - val model = params["model"] as MessageTemplate - render(jteOutput, jteHtmlInterceptor, model); - } -} -}