Skip to content

Commit 9de1af8

Browse files
authored
Merge pull request #30 from SoftwareAG/develop
2024.11.0
2 parents 2282b4c + ab54a69 commit 9de1af8

File tree

6 files changed

+512
-78
lines changed

6 files changed

+512
-78
lines changed

EndtoEndTests.sh

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ cleanup_function() {
229229

230230
#---------------------------------------------------------------------------------------------------
231231

232-
233-
234232
printf "\n${COLOR_CYAN}* Projects\n${COLOR_RESET}"
235233
# Project Functions
236234
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' project" "grep -c CLITestProject" "1" "Project List"
@@ -246,6 +244,7 @@ run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PAS
246244

247245
#Import project
248246
run_test "node --no-deprecation wmiocli.js -d ${PROD_TENANT} -u ${USER} -p '${PASS}' project-import project.zip newnameproject" "grep 'IMPORT_SUCCESS' | wc -l" "1" "Import Project"
247+
rm project.zip
249248

250249
#Delete Imported Project
251250
run_test "node --no-deprecation wmiocli.js -d ${PROD_TENANT} -u ${USER} -p '${PASS}' project-delete $projectUid" "grep 'Project deleted successfully' | wc -l" "1" "Delete Imported Project"
@@ -260,8 +259,6 @@ run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PAS
260259
#Update Project
261260
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' project-update $projectUid changed" "grep 'changed' | wc -l" "1" "Update Project Name"
262261

263-
264-
265262
#---------------------------------------------------------------------------------------------------
266263

267264
#Triggers
@@ -277,7 +274,7 @@ run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PAS
277274
#Delete Project
278275
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' project-delete $projectUid" "grep 'Project deleted successfully' | wc -l" "1" "Delete Project"
279276

280-
#---------------------------------------------------------------------------------------------------
277+
# ---------------------------------------------------------------------------------------------------
281278

282279
printf "\n${COLOR_CYAN}* Publish/Deploy${COLOR_RESET}\n"
283280
#Deploy & Publish
@@ -363,6 +360,7 @@ run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PAS
363360
#---------------------------------------------------------------------------------------------------
364361

365362
#Workflows
363+
366364
printf "\n${COLOR_CYAN}* Worlkflows${COLOR_RESET}\n"
367365
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' workflow-export CLITestProject fl835fe9b99489cc5c3dbdc8 wf.zip" "grep 'success' | wc -l" "1" "Export workflow"
368366
run_test_return_value "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' workflow-import CLITestProject wf.zip" "grep uid | wc -l" "1" "jq -r .output.uid" "Import Workflow"
@@ -387,19 +385,27 @@ rm fs.zip
387385

388386
#---------------------------------------------------------------------------------------------------
389387

388+
389+
390390
printf "\n${COLOR_CYAN}* Theme${COLOR_RESET}\n"
391-
run_test_return_value "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme" \
392-
"grep 'settings' | wc -l" \
393-
"1" \
394-
"jq -r '.output[] | select(.name == \"ThemeRed\") | .uid'" \
395-
"List Themes"
396-
themeId=`echo $result`
391+
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme ${themeId}" "grep 'settings' | wc -l" "1" "List Themes"
392+
393+
394+
node --no-deprecation wmiocli.js -d "${DEV_TENANT}" -u "${USER}" -p "${PASS}" theme > theme.json
395+
themeId=`jq -r '.output[] | select(.name == "ThemeRed") | .uid' theme.json`
396+
themeText=`jq -r '.output[] | select(.name == "ThemeRed")' theme.json`
397+
397398

399+
#run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme ${themeId}" "grep 'settings' | wc -l" "1" "Get Individual Theme"
398400
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme ${themeId}" "grep 'settings' | wc -l" "1" "Get Individual Theme"
399-
run_test_return_value "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme ${themeId}" "grep 'settings' | wc -l" "1" "cat" "Get Individual Theme"
400-
themeText=$result
401-
run_test_return_value "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme-create TestTheme 'Test Theme3' '$themeText'" "grep primaryColor | wc -l" "1" "jq -r .output.uid" "Theme create"
402-
themeId=`echo $result`
401+
402+
403+
#run_test_return_value "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme-create TestTheme 'Test Theme3' '$themeText'" "grep primaryColor | wc -l" "1" "jq -r .output.uid" "Theme create"
404+
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme-create TestTheme 'Test Theme3' '$themeText'" "grep primaryColor | wc -l" "1" "Theme create"
405+
node --no-deprecation wmiocli.js -d "${DEV_TENANT}" -u "${USER}" -p "${PASS}" theme > theme.json
406+
themeId=`jq -r '.output[] | select(.name == "TestTheme") | .uid' theme.json`
407+
rm theme.json
408+
403409
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme-update ${themeId} TestTheme 'Test Theme3' '$themeText'" "grep primaryColor | wc -l" "1" "Theme Update"
404410

405411
run_test "node --no-deprecation wmiocli.js -d ${DEV_TENANT} -u ${USER} -p '${PASS}' theme-activate ${themeId}" "grep '\"active\":true' | wc -l" "1" "Theme activate"

README.md

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,14 @@ This requires you to provide your tenant domain name, along with a user and pass
44
The --help parameter provides further information on how to use this along with some examples of its usage.
55

66
This CLI tool has been tested against
7-
* webMethods.io Integration v11.0.6
7+
* webMethods.io Integration v11.0.3
88

99
# License
1010
This project is licensed under the Apache 2.0 License - see the LICENSE file for details
1111
These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.
1212

1313
Contact us via the TECHcommunity (https://techcommunity.softwareag.com/) if you have any questions.
14-
15-
# IMPORTANT
16-
Due to a deprecated NPM library in a dependency of tough-cookie, if you're using a later version of node, you may see a deprecation notice for 'punycode'.
17-
This has been resolved in tough-cookie but hasn't been released (only a release candidate is available). One this is released, this will be updated to resovle this.
18-
In the meantime if you use this in scripts, you might want to suppress the deprecation notice as it may affect any parsing of results.
19-
20-
To do this run the cli tool as folows:
21-
```
22-
node --no-deprecation wmiocli.js ....
23-
```
24-
14+
2515
# Installation
2616
```
2717
git clone https://github.com/SoftwareAG/webmethods-io-integration-apicli.git
@@ -33,7 +23,7 @@ node wmiocli.js --help
3323
# Usage
3424

3525
```
36-
──────────────────────────────────────────────────────────────────────────────┐
26+
──────────────────────────────────────────────────────────────────────────────┐
3727
│ webMethods.io Integration API CLI tool │
3828
│ This tool provides command line access to the webMethods.io Integration APIs │
3929
│ Intended to aid usage within DevOps Scenarios for asset deployment │
@@ -57,7 +47,7 @@ Options:
5747
--proxy <proxyURL> URL for proxy server if required
5848
--caCert <path-to-cert> Path to a CACert PEM file if required
5949
--ignoreTLSErrors Ignore TLS errors
60-
--experimentalCommands Provide help information on experimental commands
50+
--experimental Provide help information on experimental commands
6151
-h, --help display help for command
6252
6353
Commands:
@@ -179,20 +169,6 @@ $ node wmiocli.js
179169
-p password
180170
project-delete fl65d3aa87fc1783ea5cf8c8
181171
182-
Export Project:
183-
$ node wmiocli.js
184-
-d tenant.int-aws-us.webmethods.io
185-
-u user
186-
-p password
187-
project-export fl65d3aa87fc1783ea5cf8c8 myproject.zip
188-
189-
Import Project:
190-
$ node wmiocli.js
191-
-d tenant.int-aws-us.webmethods.io
192-
-u user
193-
-p password
194-
project-export myproject.zip MyNewProjectName
195-
196172
Get Project Assets:
197173
$ node wmiocli.js
198174
-d tenant.int-aws-us.webmethods.io
@@ -613,4 +589,5 @@ $ node wmiocli.js
613589
-p password
614590
idm-user-unlock <userid>
615591
where userid is the unique ID returned from the idm-user call
592+
616593
```

package-lock.json

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
},
2525
"homepage": "https://github.com/dpembo/wmiocli#readme",
2626
"devDependencies": {
27-
"commander": "^8.3.0"
27+
"commander": "^12.1.0"
2828
},
2929
"dependencies": {
3030
"formdata-node": "^6.0.3",
31-
"https-proxy-agent": "^7.0.4",
31+
"https-proxy-agent": "^7.0.5",
3232
"log4js": "^6.9.1",
3333
"node-fetch": "^3.3.2",
3434
"readline-sync": "^1.4.10",

0 commit comments

Comments
 (0)