@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 +10 -3
- package/assets/python-install.bat +27 -0
- package/assets/python-install.sh +23 -0
- package/index.js +6216 -4484
- package/package.json +1 -1
- package/packages/kong-cli/src/commands/generateCommand.d.ts +2 -0
- package/packages/kong-cli/src/commands/installCommand.d.ts +2 -0
- package/packages/kong-cli/src/commands/listExtensionSnapshotCommand.d.ts +2 -1
- package/packages/kong-cli/src/commands/publishCommand.d.ts +2 -1
- package/packages/kong-cli/src/common/cli.d.ts +0 -6
- package/packages/kong-cli/src/common/listrTaskLogger.d.ts +20 -0
- package/packages/kong-cli/src/common/utils.d.ts +7 -1
- package/packages/kong-spec/src/lib/kongSpecDoc.d.ts +12 -0
- package/packages/kong-ts-contract/src/index.d.ts +1 -1
- package/packages/kong-ts-contract/src/lib/appDevRequest.d.ts +8 -0
- package/packages/kong-ts-contract/src/lib/appProcessTest.d.ts +0 -6
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
|
-
|
|
10
|
-
|
|
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
|