@devkong/cli 0.0.1 → 0.0.3

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/README.md CHANGED
@@ -5,9 +5,16 @@
5
5
  3. Build kong-cli: `npx nx run-many -t build -p kong-cli kong-cli-nx`
6
6
  4. Publish kong-cli: `npx nx release publish --git-commit=false`
7
7
  5. Install kong-cli: `npm i -g @devkong/cli@latest --registry="http://localhost:4873/"`
8
- 6. Generate test template: `kong generate my-extension`.
9
- 7. Optionally add `--sdk <platform>` where platform is python or kotlin
10
- 8. Configure: `kong configure`
8
+ 6. Generate test template: `kong generate my-extension`
9
+
10
+ ## Publish to the @devkong
11
+
12
+ 1. Login as kong-admin user: `npm login`
13
+ 2. Update versions: `npx nx release version --git-commit=false --stage-changes=false`
14
+ 3. Build kong-cli: `npx nx run-many -t build -p kong-cli kong-cli-nx`
15
+ 4. Publish kong-cli: `npx nx release publish --git-commit=false --access=public`
16
+ 5. Install kong-cli: `npm i -g @devkong/cli@latest`
17
+ 6. Generate test template: `kong generate my-extension`
11
18
 
12
19
  ## Publish to the Nexus
13
20
 
@@ -0,0 +1,27 @@
1
+ @echo off
2
+
3
+ set EXTENSION_DIR=%1
4
+ echo %EXTENSION_DIR%
5
+
6
+ where python >nul 2>&1
7
+ if %errorlevel% equ 0 (
8
+ set PYTHON_CMD=python
9
+ ) else (
10
+ set PYTHON_CMD=python3
11
+ )
12
+
13
+ where pip >nul 2>&1
14
+ if %errorlevel% equ 0 (
15
+ set PIP_CMD=pip
16
+ ) else (
17
+ set PIP_CMD=pip3
18
+ )
19
+
20
+ cd %EXTENSION_DIR%
21
+
22
+ %PYTHON_CMD% -m venv .venv
23
+
24
+ call .venv\Scripts\activate.bat
25
+
26
+ %PIP_CMD% install -r requirements.txt
27
+ %PIP_CMD% install -r requirements-dev.txt
@@ -0,0 +1,23 @@
1
+ #!/bin/bash
2
+
3
+ EXTENSION_DIR=$1
4
+
5
+ if [ -x "$(command -v python)" ]; then
6
+ PYTHON_CMD="python"
7
+ else
8
+ PYTHON_CMD="python3"
9
+ fi
10
+
11
+ if [ -x "$(command -v python)" ]; then
12
+ PIP_CMD="pip"
13
+ else
14
+ PIP_CMD="pip3"
15
+ fi
16
+
17
+ cd "$EXTENSION_DIR" || exit
18
+
19
+ $PYTHON_CMD -m venv .venv
20
+
21
+ source activate
22
+
23
+ $PIP_CMD install --user -r requirements-dev.txt -r requirements.txt