Repository navigation
Releases: vilia-fr/twx-cli
Release list
Support for the latest Git Bash on Windows
TWX CLI zipping functionality broke with the latest update of Git Bash on Windows. See https://www.msys2.org/news/:
Bash has recently been changed to report "$OSTYPE" as "cygwin" instead of "msys".
This release fixes this issue.
2.2.0
Streamlined Windows dependencies
Previous versions required installing zip on Windows, which sucked, since there's no easy and secure way to do this. This version gets rid of this dependency, replacing it with a less-known alternative: Windows/System32/tar.exe. Windows uses bsdtar, which unlike GNU tar, can create zip archives.
It means that the only Windows dependency you need to install manually is jq, which can be done as simple as running winget install -e --id jqlang.jq (see README for details).
2.1.0
Added secrets sanitation
If you pass secrets through parameters, you can sanitize them from the log like this:
twx -v=deployment.log call Things/MyDeploymentThing/InitializeDatabase \
-pusername="thingworx" \
-ppassword="$DB_PASSWORD" \
-secret="$DB_PASSWORD"This will replace $DB_PASSWORD in deployment.log with asterisks ********. Resulting log file:
Parameter 'username' = 'thingworx'
Parameter 'password' = '******* (redacted)'
Will call 'http://192.168.0.24:8080/Thingworx/Things/MyDeploymentThing/Services/InitializeDatabase'
It also works with substrings, thus it handles JSON parameters correctly. For example:
twx -v=deployment.log call Things/MyDeploymentThing/InitializeDatabase \
-pconfig="{\"username\": \"thingworx\", \"password\": \"$DB_PASSWORD\"}" \
-secret="$DB_PASSWORD"Resulting log file:
Parameter 'config' = '{"username": "thingworx", "password": "******* (redacted)"}'
Will call 'http://192.168.0.24:8080/Thingworx/Things/MyDeploymentThing/Services/InitializeDatabase'