@devkong/cli-nx 0.0.63 → 0.0.65

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkong/cli-nx",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -10,12 +10,12 @@ RUN microdnf install -y findutils
10
10
  # Copy Gradle wrapper and build configuration first (for better caching)
11
11
  COPY --chown=quarkus:quarkus gradlew /code/gradlew
12
12
  COPY --chown=quarkus:quarkus gradle /code/gradle
13
+ COPY --chown=quarkus:quarkus .editorconfig /code/
13
14
  COPY --chown=quarkus:quarkus build.gradle.kts /code/
14
15
  COPY --chown=quarkus:quarkus settings.gradle.kts /code/
15
16
  COPY --chown=quarkus:quarkus gradle.properties /code/
16
- COPY --chown=quarkus:quarkus .editorconfig /code/
17
17
 
18
- # Switch to quarkus user for security
18
+ # Switch user for security
19
19
  USER quarkus
20
20
  WORKDIR /code
21
21
 
@@ -23,10 +23,9 @@ WORKDIR /code
23
23
  RUN chmod +x gradlew && \
24
24
  ./gradlew dependencies --no-daemon --stacktrace
25
25
 
26
- # Copy source code (changes most frequently, so copy last)
27
- COPY --chown=quarkus:quarkus src /code/src
28
26
 
29
- # Build native executable with optimizations
27
+ # Build native executable
28
+ COPY --chown=quarkus:quarkus src /code/src
30
29
  RUN ./gradlew build \
31
30
  -Dquarkus.package.main-class=io.kong.sdk.function.template.QuarkusApp \
32
31
  -Dquarkus.native.enabled=true \
@@ -41,12 +40,15 @@ RUN ./gradlew build \
41
40
  # ==============================================
42
41
  FROM quay.io/quarkus/quarkus-micro-image:2.0
43
42
 
44
- # Copy native executable from build stage
45
- # Use specific pattern to avoid copying multiple files
46
43
  WORKDIR /work/
47
- COPY --from=build /code/build/*-runner /work/application
48
- RUN chmod 755 /work/application
49
44
 
50
- # Start the application
45
+ RUN chown 1001 /work \
46
+ && chmod "g+rwX" /work \
47
+ && chown 1001:root /work
48
+ COPY --chown=1001:root --from=build /code/build/*-runner /work/application
49
+
51
50
  EXPOSE 8080
52
- CMD ["./application", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=8080"]
51
+ USER 1001
52
+
53
+ CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
54
+
@@ -8,13 +8,11 @@ To have a better experience, open this file in preview mode of your IDE.
8
8
 
9
9
  Before you start, make sure you have the following installed depending on your OS:
10
10
 
11
- [▶ Windows Setup](#windows-setup)
11
+ [▶ Windows](#windows-setup)
12
12
 
13
- [▶ macOS Setup](#macos-setup)
13
+ [▶ Ubuntu](#ubuntu-setup)
14
14
 
15
- - Mac M2 users, see [Troubleshooting](#Troubleshooting)
16
-
17
- [▶ Ubuntu Linux Setup](#ubuntu-setup)
15
+ [▶ macOS](#macos-setup)
18
16
 
19
17
  To verify the installation and check the versions, run the following commands:
20
18
 
@@ -71,18 +69,10 @@ To install the latest version of the CLI, run:
71
69
  npm i -g @devkong/cli@latest
72
70
  ```
73
71
 
74
- ### Troubleshooting
75
-
76
- #### Mac M2 Users
77
-
78
- To emulate a Linux platform, you need to install Rosetta:
79
-
80
- ```shell script
81
- softwareupdate --install-rosetta
82
- ```
72
+ ### Setup
83
73
 
84
74
  <details id="windows-setup">
85
- <summary><strong>Windows Setup</strong></summary>
75
+ <summary><strong>Windows</strong></summary>
86
76
 
87
77
  ### Install Windows Subsystem for Linux (WSL2)
88
78
 
@@ -118,88 +108,10 @@ softwareupdate --install-rosetta
118
108
  npm -v
119
109
  ```
120
110
 
121
- ### Install Python on Windows Host
122
-
123
- 1. Download the Python installer for Windows from the [official Python website](https://www.python.org/downloads/windows/).
124
- 2. Run the installer, making sure to check "Add Python to PATH" during setup.
125
- 3. Verify installation by running:
126
- ```cmd
127
- python --version
128
- pip --version
129
- ```
130
-
131
- ### Install Poetry on Windows Host
132
-
133
- 1. Open Command Prompt or PowerShell.
134
- 2. Run the following command:
135
- ```powershell
136
- (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
137
- ```
138
- 3. Add Poetry to your PATH:
139
- ```powershell
140
- $env:Path += ";$env:USERPROFILE\.poetry\bin"
141
- ```
142
- 4. Verify installation:
143
- ```powershell
144
- poetry --version
145
- ```
146
-
147
- </details>
148
-
149
- <details id="macos-setup">
150
- <summary><strong>macOS Setup</strong></summary>
151
-
152
- ### Install Docker
153
-
154
- 1. Download and install Docker Desktop for Mac from [Docker's official website](https://www.docker.com/products/docker-desktop).
155
-
156
- ### Install Node.js and npm
157
-
158
- 1. Use Homebrew to install:
159
- ```bash
160
- brew install node
161
- ```
162
- 2. Verify installation:
163
- ```bash
164
- node -v
165
- npm -v
166
- ```
167
-
168
- ### Install Python
169
-
170
- 1. Use Homebrew to install:
171
- ```bash
172
- brew install python
173
- ```
174
- 2. Verify installation:
175
- ```bash
176
- python3 --version
177
- pip3 --version
178
- ```
179
-
180
- ### Install Poetry
181
-
182
- 1. Run the following command:
183
- ```bash
184
- curl -sSL https://install.python-poetry.org | python3 -
185
- ```
186
- 2. Add Poetry to your PATH:
187
- ```bash
188
- export PATH="$HOME/.local/bin:$PATH"
189
- ```
190
- 3. Reload the shell:
191
- ```bash
192
- source ~/.bashrc
193
- ```
194
- 4. Verify installation:
195
- ```bash
196
- poetry --version
197
- ```
198
-
199
111
  </details>
200
112
 
201
113
  <details id="ubuntu-setup">
202
- <summary><strong>Ubuntu Linux Setup</strong></summary>
114
+ <summary><strong>Ubuntu</strong></summary>
203
115
 
204
116
  ### Install Docker
205
117
 
@@ -223,36 +135,31 @@ softwareupdate --install-rosetta
223
135
  npm -v
224
136
  ```
225
137
 
226
- ### Install Python
138
+ </details>
227
139
 
228
- 1. Run the following commands:
229
- ```bash
230
- sudo apt update
231
- sudo apt install -y python3 python3-pip
232
- ```
233
- 2. Verify installation:
234
- ```bash
235
- python3 --version
236
- pip3 --version
237
- ```
140
+ <details id="macos-setup">
141
+ <summary><strong>macOS</strong></summary>
238
142
 
239
- ### Install Poetry
143
+ To emulate a Linux platform, you need to install Rosetta:
240
144
 
241
- 1. Run the following command:
242
- ```bash
243
- curl -sSL https://install.python-poetry.org | python3 -
244
- ```
245
- 2. Add Poetry to your PATH:
246
- ```bash
247
- export PATH="$HOME/.local/bin:$PATH"
248
- ```
249
- 3. Reload the shell:
145
+ ```shell script
146
+ softwareupdate --install-rosetta
147
+ ```
148
+
149
+ ### Install Docker
150
+
151
+ 1. Download and install Docker Desktop for Mac from [Docker's official website](https://www.docker.com/products/docker-desktop).
152
+
153
+ ### Install Node.js and npm
154
+
155
+ 1. Use Homebrew to install:
250
156
  ```bash
251
- source ~/.bashrc
157
+ brew install node
252
158
  ```
253
- 4. Verify installation:
159
+ 2. Verify installation:
254
160
  ```bash
255
- poetry --version
161
+ node -v
162
+ npm -v
256
163
  ```
257
164
 
258
165
  </details>
@@ -1,5 +1,4 @@
1
1
  val javaVersion: String by project
2
- val kongSdkVersion: String by project
3
2
  val kongVersion: String by project
4
3
  val kotlinxCoroutinesTestVersion: String by project
5
4
  val quarkusVersion: String by project
@@ -23,9 +22,9 @@ repositories {
23
22
  }
24
23
 
25
24
  dependencies {
26
- implementation("io.kong:kong-sdk-function-template:$kongSdkVersion")
27
- implementation("io.kong:kong-sdk-kotlin:$kongSdkVersion")
28
25
  implementation("io.kong:kong-common:$kongVersion")
26
+ implementation("io.kong:kong-sdk-kotlin:$kongVersion")
27
+ implementation("io.kong:kong-sdk-function-template:$kongVersion")
29
28
 
30
29
  implementation(enforcedPlatform("io.quarkus.platform:quarkus-bom:$quarkusVersion"))
31
30
  implementation("io.quarkus:quarkus-arc")
@@ -4,8 +4,7 @@ kotlin.code.style=official
4
4
  javaVersion=21
5
5
 
6
6
  # kong artifacts
7
- kongSdkVersion=0.0.21-SNAPSHOT
8
- kongVersion=0.0.1-SNAPSHOT
7
+ kongVersion=0.0.23-SNAPSHOT
9
8
 
10
9
  # https://mvnrepository.com/artifact/org.jlleitschuh.gradle/ktlint-gradle
11
10
  jlleitschuhGradlePluginVersion=14.0.1
@@ -8,13 +8,11 @@ To have a better experience, open this file in preview mode of your IDE.
8
8
 
9
9
  Before you start, make sure you have the following installed depending on your OS:
10
10
 
11
- [▶ Windows Setup](#windows-setup)
11
+ [▶ Windows](#windows-setup)
12
12
 
13
- [▶ macOS Setup](#macos-setup)
13
+ [▶ Ubuntu](#ubuntu-setup)
14
14
 
15
- [▶ Ubuntu Linux Setup](#ubuntu-setup)
16
-
17
- - Mac M2 users, see [Troubleshooting](#Troubleshooting)
15
+ [▶ macOS](#macos-setup)
18
16
 
19
17
  To verify the installation and check the versions, run the following commands:
20
18
 
@@ -46,31 +44,6 @@ To automatically tag your code with an incremented version number (e.g., 1, 2, 3
46
44
  kong publish-version --verbose
47
45
  ```
48
46
 
49
- **NOTE:** before publishing a new version, ensure that your extension JSON Schema includes the required `operation` field. This input field has `enum` type and defines the action to be performed by the extension.
50
-
51
- **Purpose:**
52
-
53
- - When an extension supports multiple usage variants or endpoints, this field identifies the specific operation to execute.
54
- - It enables routing and logic selection within the extension workflow.
55
- - If an extension has only one primary function, this `enum` contains a single value that uniquely identifies its operation.
56
-
57
- **Usage Example:**
58
-
59
- ```
60
- "$schema": "http://json-schema.org/draft-07/schema#",
61
- "title": "Input",
62
- "type": "object",
63
- "properties": {
64
- "operation": {
65
- "enum": ["score digital profile", ...],
66
- "examples": ["score digital profile"],
67
- "description": "Operation type."
68
- },
69
- ...
70
- "required": ["operation", ... ]
71
- }
72
- ```
73
-
74
47
  ### List Available Versions
75
48
 
76
49
  To see all available versions of your extension, run:
@@ -99,18 +72,10 @@ To install the latest version of the CLI, run:
99
72
  npm i -g @devkong/cli@latest
100
73
  ```
101
74
 
102
- ### Troubleshooting
103
-
104
- #### Mac M2 Users
105
-
106
- To emulate a Linux platform, you need to install Rosetta:
107
-
108
- ```shell script
109
- softwareupdate --install-rosetta
110
- ```
75
+ ### Setup
111
76
 
112
77
  <details id="windows-setup">
113
- <summary><strong>Windows Setup</strong></summary>
78
+ <summary><strong>Windows</strong></summary>
114
79
 
115
80
  ### Install Windows Subsystem for Linux (WSL2)
116
81
 
@@ -174,18 +139,24 @@ softwareupdate --install-rosetta
174
139
 
175
140
  </details>
176
141
 
177
- <details id="macos-setup">
178
- <summary><strong>macOS Setup</strong></summary>
142
+ <details id="ubuntu-setup">
143
+ <summary><strong>Ubuntu</strong></summary>
179
144
 
180
145
  ### Install Docker
181
146
 
182
- 1. Download and install Docker Desktop for Mac from [Docker's official website](https://www.docker.com/products/docker-desktop).
147
+ 1. Follow the installation instructions on [Docker's official website](https://docs.docker.com/engine/install/ubuntu/).
148
+ 2. Start Docker and enable it to start on boot:
149
+ ```bash
150
+ sudo systemctl start docker
151
+ sudo systemctl enable docker
152
+ ```
183
153
 
184
154
  ### Install Node.js and npm
185
155
 
186
- 1. Use Homebrew to install:
156
+ 1. Run the following commands:
187
157
  ```bash
188
- brew install node
158
+ sudo apt update
159
+ sudo apt install -y nodejs npm
189
160
  ```
190
161
  2. Verify installation:
191
162
  ```bash
@@ -195,9 +166,10 @@ softwareupdate --install-rosetta
195
166
 
196
167
  ### Install Python
197
168
 
198
- 1. Use Homebrew to install:
169
+ 1. Run the following commands:
199
170
  ```bash
200
- brew install python
171
+ sudo apt update
172
+ sudo apt install -y python3 python3-pip
201
173
  ```
202
174
  2. Verify installation:
203
175
  ```bash
@@ -226,24 +198,24 @@ softwareupdate --install-rosetta
226
198
 
227
199
  </details>
228
200
 
229
- <details id="ubuntu-setup">
230
- <summary><strong>Ubuntu Linux Setup</strong></summary>
201
+ <details id="macos-setup">
202
+ <summary><strong>macOS</strong></summary>
203
+
204
+ To emulate a Linux platform, you need to install Rosetta:
205
+
206
+ ```shell script
207
+ softwareupdate --install-rosetta
208
+ ```
231
209
 
232
210
  ### Install Docker
233
211
 
234
- 1. Follow the installation instructions on [Docker's official website](https://docs.docker.com/engine/install/ubuntu/).
235
- 2. Start Docker and enable it to start on boot:
236
- ```bash
237
- sudo systemctl start docker
238
- sudo systemctl enable docker
239
- ```
212
+ 1. Download and install Docker Desktop for Mac from [Docker's official website](https://www.docker.com/products/docker-desktop).
240
213
 
241
214
  ### Install Node.js and npm
242
215
 
243
- 1. Run the following commands:
216
+ 1. Use Homebrew to install:
244
217
  ```bash
245
- sudo apt update
246
- sudo apt install -y nodejs npm
218
+ brew install node
247
219
  ```
248
220
  2. Verify installation:
249
221
  ```bash
@@ -253,10 +225,9 @@ softwareupdate --install-rosetta
253
225
 
254
226
  ### Install Python
255
227
 
256
- 1. Run the following commands:
228
+ 1. Use Homebrew to install:
257
229
  ```bash
258
- sudo apt update
259
- sudo apt install -y python3 python3-pip
230
+ brew install python
260
231
  ```
261
232
  2. Verify installation:
262
233
  ```bash