@devkong/cli-nx 0.0.19 → 0.0.21
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 +2 -2
- package/README.md +0 -11
- package/generators.json +0 -10
- package/src/generators/preset/files/kotlin/.dockerignore +0 -6
- package/src/generators/preset/files/kotlin/.editorconfig +0 -24
- package/src/generators/preset/files/kotlin/.vscode/extensions.json +0 -18
- package/src/generators/preset/files/kotlin/.vscode/launch.json +0 -16
- package/src/generators/preset/files/kotlin/.vscode/settings.json +0 -7
- package/src/generators/preset/files/kotlin/.vscode/tasks.json +0 -81
- package/src/generators/preset/files/kotlin/Dockerfile +0 -22
- package/src/generators/preset/files/kotlin/README.md +0 -77
- package/src/generators/preset/files/kotlin/build.gradle.kts.template +0 -64
- package/src/generators/preset/files/kotlin/extension.http +0 -83
- package/src/generators/preset/files/kotlin/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/generators/preset/files/kotlin/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/src/generators/preset/files/kotlin/gradle.properties +0 -19
- package/src/generators/preset/files/kotlin/gradlew +0 -245
- package/src/generators/preset/files/kotlin/gradlew.bat +0 -92
- package/src/generators/preset/files/kotlin/kong.json +0 -7
- package/src/generators/preset/files/kotlin/nx.json +0 -14
- package/src/generators/preset/files/kotlin/package-lock.json +0 -1577
- package/src/generators/preset/files/kotlin/package.json +0 -15
- package/src/generators/preset/files/kotlin/project.json.template +0 -50
- package/src/generators/preset/files/kotlin/settings.gradle.kts +0 -14
- package/src/generators/preset/files/kotlin/src/main/kotlin/io/kong/extension/Main.kt +0 -43
- package/src/generators/preset/files/kotlin/src/main/resources/META-INF/resources/index.html +0 -362
- package/src/generators/preset/files/kotlin/src/main/resources/application.properties.template +0 -13
- package/src/generators/preset/files/kotlin/src/native-test/kotlin/io/kong/extension/.gitkeep +0 -0
- package/src/generators/preset/files/kotlin/src/test/kotlin/io/kong/extension/.gitkeep +0 -0
- package/src/generators/preset/files/python/.dockerignore +0 -5
- package/src/generators/preset/files/python/.editorconfig +0 -16
- package/src/generators/preset/files/python/.gitattributes +0 -25
- package/src/generators/preset/files/python/.gitignore.template +0 -69
- package/src/generators/preset/files/python/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/src/generators/preset/files/python/.idea/inspectionProfiles/profiles_settings.xml +0 -6
- package/src/generators/preset/files/python/.idea/kong-cli-python-template.iml +0 -10
- package/src/generators/preset/files/python/.pylintrc +0 -547
- package/src/generators/preset/files/python/.vscode/extensions.json +0 -14
- package/src/generators/preset/files/python/.vscode/launch.json +0 -18
- package/src/generators/preset/files/python/.vscode/settings.json +0 -62
- package/src/generators/preset/files/python/Dockerfile +0 -13
- package/src/generators/preset/files/python/README.md +0 -115
- package/src/generators/preset/files/python/kong.json +0 -7
- package/src/generators/preset/files/python/project.json.template +0 -8
- package/src/generators/preset/files/python/pyproject.toml +0 -3
- package/src/generators/preset/files/python/requirements-dev.txt +0 -10
- package/src/generators/preset/files/python/requirements.txt +0 -3
- package/src/generators/preset/files/python/src/__init__.py +0 -0
- package/src/generators/preset/files/python/src/main.py +0 -67
- package/src/generators/preset/files/python/src/main_test.py +0 -18
- package/src/generators/preset/schema.d.ts +0 -5
- package/src/generators/preset/schema.json +0 -27
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kotlin-extension/source",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"scripts": {},
|
|
6
|
-
"private": true,
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@devkong/cli-nx": "0.0.19"
|
|
9
|
-
},
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"@nx/workspace": "20.2.1",
|
|
12
|
-
"nx": "20.2.1",
|
|
13
|
-
"@jnxplus/nx-gradle": "1.16.0"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "<%=name%>",
|
|
3
|
-
"$schema": "./node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"projectType": "application",
|
|
5
|
-
"sourceRoot": "./src",
|
|
6
|
-
"targets": {
|
|
7
|
-
"build": {
|
|
8
|
-
"executor": "@jnxplus/nx-gradle:run-task",
|
|
9
|
-
"outputs": ["{workspaceRoot}/build"],
|
|
10
|
-
"options": {
|
|
11
|
-
"task": "quarkusBuild"
|
|
12
|
-
},
|
|
13
|
-
"configurations": {
|
|
14
|
-
"production": {
|
|
15
|
-
"task": "quarkusBuild -Dquarkus.package.jar.enabled=false -Dquarkus.native.enabled=true -Dquarkus.profile=prod"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"build-image": {
|
|
20
|
-
"dependsOn": ["build"],
|
|
21
|
-
"executor": "@jnxplus/nx-gradle:quarkus-build-image"
|
|
22
|
-
},
|
|
23
|
-
"serve": {
|
|
24
|
-
"executor": "@jnxplus/nx-gradle:run-task",
|
|
25
|
-
"options": {
|
|
26
|
-
"task": "quarkusDev",
|
|
27
|
-
"keepItRunning": true
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"lint": {
|
|
31
|
-
"executor": "@jnxplus/nx-gradle:run-task",
|
|
32
|
-
"options": {
|
|
33
|
-
"task": "ktlintCheck"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"test": {
|
|
37
|
-
"executor": "@jnxplus/nx-gradle:run-task",
|
|
38
|
-
"options": {
|
|
39
|
-
"task": "test"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"integration-test": {
|
|
43
|
-
"executor": "@jnxplus/nx-gradle:run-task",
|
|
44
|
-
"options": {
|
|
45
|
-
"task": "quarkusIntTest"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"tags": []
|
|
50
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
pluginManagement {
|
|
2
|
-
val quarkusVersion: String by settings
|
|
3
|
-
val kotlinVersion: String by settings
|
|
4
|
-
val jnxplusGradlePluginVersion: String by settings
|
|
5
|
-
val jlleitschuhGradlePluginVersion: String by settings
|
|
6
|
-
|
|
7
|
-
plugins {
|
|
8
|
-
id("org.jetbrains.kotlin.jvm") version kotlinVersion
|
|
9
|
-
id("org.jetbrains.kotlin.plugin.allopen") version kotlinVersion
|
|
10
|
-
id("io.github.khalilou88.jnxplus") version jnxplusGradlePluginVersion
|
|
11
|
-
id("org.jlleitschuh.gradle.ktlint") version jlleitschuhGradlePluginVersion
|
|
12
|
-
id("io.quarkus") version quarkusVersion
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
package io.kong.extensionapicall
|
|
2
|
-
|
|
3
|
-
import com.fasterxml.jackson.databind.JsonNode
|
|
4
|
-
import com.fasterxml.jackson.databind.ObjectMapper
|
|
5
|
-
import io.kong.common.AppLogger
|
|
6
|
-
import io.kong.sdkkotlin.Field
|
|
7
|
-
import io.kong.sdkkotlin.KongFunction
|
|
8
|
-
import jakarta.inject.Singleton
|
|
9
|
-
|
|
10
|
-
// This is the main entry point for developing an extension for Kong.
|
|
11
|
-
// For more details, please refer to the README.md file.
|
|
12
|
-
|
|
13
|
-
// Define the structure of the input data that your extension will accept.
|
|
14
|
-
// Be sure to include example values for each field. These examples help generate
|
|
15
|
-
// sample objects in the UI, making it easier to work with the models.
|
|
16
|
-
data class InputData(
|
|
17
|
-
// REPLACE BELLOW WITH YOUR FIELDS
|
|
18
|
-
@Field(description = "An integer number", examples = ["1"]) val a: Int,
|
|
19
|
-
@Field(description = "An integer number", examples = ["2"]) val b: Int,
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
data class OutputData(
|
|
23
|
-
// Define the structure of the output data that your extension will return.
|
|
24
|
-
// REPLACE BELLOW WITH YOUR FIELDS
|
|
25
|
-
@Field(description = "Result of a + b", examples = ["3"]) val sum_of: Int,
|
|
26
|
-
@Field(
|
|
27
|
-
description = "A string field",
|
|
28
|
-
examples = ["This example extension returns sum of a and b"],
|
|
29
|
-
default = "null",
|
|
30
|
-
)
|
|
31
|
-
val comment: String? = null,
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
val objectMapper = ObjectMapper()
|
|
35
|
-
|
|
36
|
-
@Singleton
|
|
37
|
-
class MyExtension : KongFunction<InputData>(InputData::class.java) {
|
|
38
|
-
private val logger = AppLogger(MyExtension::class.simpleName)
|
|
39
|
-
|
|
40
|
-
override suspend fun handle(data: InputData): JsonNode? {
|
|
41
|
-
return objectMapper.valueToTree(OutputData(sum_of = data.a + data.b))
|
|
42
|
-
}
|
|
43
|
-
}
|