@devkong/cli-nx 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/generators/preset/files/kotlin/Dockerfile +6 -0
- package/src/generators/preset/files/kotlin/build.gradle.kts.template +3 -4
- package/src/generators/preset/files/kotlin/gradle.properties +7 -9
- package/src/generators/preset/files/kotlin/src/main/kotlin/io/kong/extension/Main.kt +10 -3
- package/src/generators/preset/files/python/kong.json.template +6 -0
- package/src/generators/preset/files/kotlin/nx.json +0 -14
- /package/src/generators/preset/files/{python/kong.json → kotlin/kong.json.template} +0 -0
package/package.json
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
## Stage 1: Build native extension image
|
|
2
2
|
FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 AS build
|
|
3
|
+
|
|
3
4
|
USER root
|
|
4
5
|
RUN microdnf install findutils
|
|
6
|
+
|
|
5
7
|
COPY --chown=quarkus:quarkus gradlew /code/gradlew
|
|
6
8
|
COPY --chown=quarkus:quarkus gradle /code/gradle
|
|
7
9
|
COPY --chown=quarkus:quarkus build.gradle.kts /code/
|
|
8
10
|
COPY --chown=quarkus:quarkus settings.gradle.kts /code/
|
|
9
11
|
COPY --chown=quarkus:quarkus gradle.properties /code/
|
|
10
12
|
COPY --chown=quarkus:quarkus .editorconfig /code/
|
|
13
|
+
|
|
11
14
|
USER quarkus
|
|
12
15
|
WORKDIR /code
|
|
13
16
|
COPY src /code/src
|
|
17
|
+
|
|
14
18
|
RUN ./gradlew build -Dquarkus.package.main-class=io.kong.sdk.function.template.QuarkusApp -Dquarkus.native.enabled=true -Dquarkus.profile=prod -Dquarkus.package.jar.enabled=false
|
|
15
19
|
|
|
16
20
|
## Stage 2 : create the docker final image
|
|
17
21
|
FROM quay.io/quarkus/quarkus-micro-image:2.0
|
|
22
|
+
|
|
18
23
|
WORKDIR /work/
|
|
19
24
|
COPY --from=build /code/build/*-runner /work/application
|
|
20
25
|
RUN chmod 775 /work
|
|
26
|
+
|
|
21
27
|
EXPOSE 8080
|
|
22
28
|
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
|
|
@@ -59,10 +59,9 @@ allOpen {
|
|
|
59
59
|
|
|
60
60
|
kotlin {
|
|
61
61
|
compilerOptions {
|
|
62
|
-
jvmTarget
|
|
62
|
+
jvmTarget =
|
|
63
63
|
org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
javaParameters.set(true)
|
|
64
|
+
.fromTarget(javaVersion)
|
|
65
|
+
javaParameters = true
|
|
67
66
|
}
|
|
68
67
|
}
|
|
@@ -3,21 +3,19 @@ org.gradle.jvmargs=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfM
|
|
|
3
3
|
kotlin.code.style=official
|
|
4
4
|
javaVersion=21
|
|
5
5
|
|
|
6
|
+
# kong artifacts
|
|
7
|
+
kongSdkVersion=0.0.19-SNAPSHOT
|
|
8
|
+
kongVersion=0.0.1-SNAPSHOT
|
|
9
|
+
|
|
6
10
|
# https://mvnrepository.com/artifact/org.jlleitschuh.gradle/ktlint-gradle
|
|
7
|
-
jlleitschuhGradlePluginVersion=
|
|
11
|
+
jlleitschuhGradlePluginVersion=14.0.1
|
|
8
12
|
|
|
9
13
|
#https://mvnrepository.com/artifact/com.networknt/json-schema-validator
|
|
10
|
-
jsonSchemaValidatorVersion=
|
|
14
|
+
jsonSchemaValidatorVersion=3.0.0
|
|
11
15
|
|
|
12
16
|
# https://mvnrepository.com/artifact/io.github.khalilou88.jnxplus/jnxplus-gradle-plugin
|
|
13
17
|
jnxplusGradlePluginVersion=0.4.0
|
|
14
18
|
|
|
15
|
-
# Version of Kong SDK artifacts
|
|
16
|
-
kongSdkVersion=0.0.19-SNAPSHOT
|
|
17
|
-
|
|
18
|
-
# Version of Kong non-SDK artifacts
|
|
19
|
-
kongVersion=0.0.1-SNAPSHOT
|
|
20
|
-
|
|
21
19
|
# https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib
|
|
22
20
|
kotlinVersion=2.1.10
|
|
23
21
|
|
|
@@ -25,4 +23,4 @@ kotlinVersion=2.1.10
|
|
|
25
23
|
kotlinxCoroutinesTestVersion=1.10.2
|
|
26
24
|
|
|
27
25
|
# https://mvnrepository.com/artifact/io.quarkus/quarkus-core
|
|
28
|
-
quarkusVersion=3.
|
|
26
|
+
quarkusVersion=3.20.3
|
|
@@ -17,15 +17,22 @@ import jakarta.inject.Singleton
|
|
|
17
17
|
@RegisterForReflection
|
|
18
18
|
data class InputData(
|
|
19
19
|
// REPLACE BELLOW WITH YOUR FIELDS
|
|
20
|
-
|
|
21
|
-
@Field(description = "An integer number", examples = ["
|
|
20
|
+
|
|
21
|
+
@Field(description = "An integer number", examples = ["1"])
|
|
22
|
+
val a: Int,
|
|
23
|
+
|
|
24
|
+
@Field(description = "An integer number", examples = ["2"])
|
|
25
|
+
val b: Int,
|
|
22
26
|
)
|
|
23
27
|
|
|
24
28
|
@RegisterForReflection
|
|
25
29
|
data class OutputData(
|
|
26
30
|
// Define the structure of the output data that your extension will return.
|
|
27
31
|
// REPLACE BELLOW WITH YOUR FIELDS
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
@Field(description = "Result of a + b", examples = ["3"])
|
|
34
|
+
val sum_of: Int,
|
|
35
|
+
|
|
29
36
|
@Field(
|
|
30
37
|
description = "A string field",
|
|
31
38
|
examples = ["This example extension returns sum of a and b"],
|
|
File without changes
|