Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency DannyBen/bashly to v1.2.6 #31

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run: gem install bashly -v "${BASHLY_VERSION}"
env:
# renovate: datasource=github-releases depName=DannyBen/bashly
BASHLY_VERSION: 1.2.2
BASHLY_VERSION: 1.2.6
- name: 🚀 Run bashly
run: bashly generate --upgrade
- name: suggester / bashly
Expand Down
78 changes: 55 additions & 23 deletions keencli
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# This script was generated by bashly 1.2.2 (https://bashly.dannyb.co)
# This script was generated by bashly 1.2.6 (https://bashly.dannyb.co)
# Modifying it manually is not recommended

# :wrapper.bash3_bouncer
Expand Down Expand Up @@ -791,20 +791,29 @@ yellow() { print_in_color "\e[33m" "$*"; }
blue() { print_in_color "\e[34m" "$*"; }
magenta() { print_in_color "\e[35m" "$*"; }
cyan() { print_in_color "\e[36m" "$*"; }
black() { print_in_color "\e[30m" "$*"; }
white() { print_in_color "\e[37m" "$*"; }

bold() { print_in_color "\e[1m" "$*"; }
underlined() { print_in_color "\e[4m" "$*"; }

red_bold() { print_in_color "\e[1;31m" "$*"; }
green_bold() { print_in_color "\e[1;32m" "$*"; }
yellow_bold() { print_in_color "\e[1;33m" "$*"; }
blue_bold() { print_in_color "\e[1;34m" "$*"; }
magenta_bold() { print_in_color "\e[1;35m" "$*"; }
cyan_bold() { print_in_color "\e[1;36m" "$*"; }
black_bold() { print_in_color "\e[1;30m" "$*"; }
white_bold() { print_in_color "\e[1;37m" "$*"; }

red_underlined() { print_in_color "\e[4;31m" "$*"; }
green_underlined() { print_in_color "\e[4;32m" "$*"; }
yellow_underlined() { print_in_color "\e[4;33m" "$*"; }
blue_underlined() { print_in_color "\e[4;34m" "$*"; }
magenta_underlined() { print_in_color "\e[4;35m" "$*"; }
cyan_underlined() { print_in_color "\e[4;36m" "$*"; }
black_underlined() { print_in_color "\e[4;30m" "$*"; }
white_underlined() { print_in_color "\e[4;37m" "$*"; }

# src/lib/functions/calculate_hash.sh
function calculate_hash() {
Expand Down Expand Up @@ -1090,6 +1099,7 @@ validate_json() {
# :command.command_functions
# :command.function
keencli_request_command() {

# src/request_command.sh
# shellcheck disable=SC2154
http_command \
Expand All @@ -1103,6 +1113,7 @@ keencli_request_command() {

# :command.function
keencli_show_system_command() {

# src/show_system_command.sh
# shellcheck disable=SC2154
url_path="/rci/show/system"
Expand All @@ -1123,6 +1134,7 @@ keencli_show_system_command() {

# :command.function
keencli_show_interface_command() {

# src/show_interface_command.sh
# shellcheck disable=SC2154
url_path="/rci/show/interface"
Expand All @@ -1148,6 +1160,7 @@ keencli_show_interface_command() {

# :command.function
keencli_show_ip_hotspot_list_command() {

# src/show_ip_hotspot_list_command.sh
# shellcheck disable=SC2154
url_path="/rci/show/ip/hotspot"
Expand All @@ -1168,6 +1181,7 @@ keencli_show_ip_hotspot_list_command() {

# :command.function
keencli_show_ip_hotspot_summary_command() {

# src/show_ip_hotspot_summary_command.sh
# shellcheck disable=SC2154
metric_type="${args[--metric_type]}"
Expand All @@ -1187,6 +1201,7 @@ keencli_show_ip_hotspot_summary_command() {

# :command.function
keencli_show_internet_command() {

# src/show_internet_command.sh
# shellcheck disable=SC2154
url_path="/rci/show/internet/status"
Expand All @@ -1202,6 +1217,7 @@ keencli_show_internet_command() {

# :command.function
keencli_show_ntce_summary_command() {

# src/show_ntce_summary_command.sh
# shellcheck disable=SC2154
traffic_type="${args[--traffic_type]}"
Expand All @@ -1222,6 +1238,7 @@ keencli_show_ntce_summary_command() {

# :command.function
keencli_config_command() {

# src/config_command.sh
# shellcheck disable=SC2154
http_command \
Expand All @@ -1235,6 +1252,7 @@ keencli_config_command() {

# :command.function
keencli_log_command() {

# src/log_command.sh
# shellcheck disable=SC2154
url_path="/ci/log.txt"
Expand All @@ -1250,6 +1268,7 @@ keencli_log_command() {

# :command.function
keencli_self_test_command() {

# src/self_test_command.sh
# shellcheck disable=SC2154
url_path="/ci/self-test.txt"
Expand All @@ -1267,7 +1286,8 @@ keencli_self_test_command() {
parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--version | -v)
version_command
exit
Expand Down Expand Up @@ -1397,7 +1417,8 @@ parse_requirements() {
keencli_request_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_request_usage
Expand Down Expand Up @@ -1485,7 +1506,6 @@ keencli_request_parse_requirements() {

esac
done

# :command.required_args_filter
if [[ -z ${args['url_path']+x} ]]; then
printf "missing required argument: URL_PATH\nusage: keencli request URL_PATH [REQUEST_DATA] [OPTIONS]\n" >&2
Expand Down Expand Up @@ -1527,7 +1547,8 @@ keencli_request_parse_requirements() {
keencli_show_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_usage
Expand Down Expand Up @@ -1622,7 +1643,8 @@ keencli_show_parse_requirements() {
keencli_show_system_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_system_usage
Expand Down Expand Up @@ -1740,7 +1762,8 @@ keencli_show_system_parse_requirements() {
keencli_show_interface_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_interface_usage
Expand Down Expand Up @@ -1862,7 +1885,8 @@ keencli_show_interface_parse_requirements() {
keencli_show_ip_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_ip_usage
Expand Down Expand Up @@ -1929,7 +1953,8 @@ keencli_show_ip_parse_requirements() {
keencli_show_ip_hotspot_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_ip_hotspot_usage
Expand Down Expand Up @@ -2003,7 +2028,8 @@ keencli_show_ip_hotspot_parse_requirements() {
keencli_show_ip_hotspot_list_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_ip_hotspot_list_usage
Expand Down Expand Up @@ -2125,7 +2151,8 @@ keencli_show_ip_hotspot_list_parse_requirements() {
keencli_show_ip_hotspot_summary_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_ip_hotspot_summary_usage
Expand Down Expand Up @@ -2286,7 +2313,8 @@ keencli_show_ip_hotspot_summary_parse_requirements() {
keencli_show_internet_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_internet_usage
Expand Down Expand Up @@ -2394,7 +2422,8 @@ keencli_show_internet_parse_requirements() {
keencli_show_ntce_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_ntce_usage
Expand Down Expand Up @@ -2461,7 +2490,8 @@ keencli_show_ntce_parse_requirements() {
keencli_show_ntce_summary_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_show_ntce_summary_usage
Expand Down Expand Up @@ -2641,7 +2671,8 @@ keencli_show_ntce_summary_parse_requirements() {
keencli_config_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_config_usage
Expand Down Expand Up @@ -2711,7 +2742,6 @@ keencli_config_parse_requirements() {

esac
done

# :command.required_args_filter
if [[ -z ${args['configuration_file']+x} ]]; then
printf "missing required argument: CONFIGURATION_FILE\nusage: keencli config CONFIGURATION_FILE [OPTIONS]\n" >&2
Expand Down Expand Up @@ -2747,7 +2777,8 @@ keencli_config_parse_requirements() {
keencli_log_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_log_usage
Expand Down Expand Up @@ -2834,7 +2865,8 @@ keencli_log_parse_requirements() {
keencli_self_test_parse_requirements() {
# :command.fixed_flags_filter
while [[ $# -gt 0 ]]; do
case "${1:-}" in
key="$1"
case "$key" in
--help | -h)
long_usage=yes
keencli_self_test_usage
Expand Down Expand Up @@ -2927,11 +2959,11 @@ initialize() {

# :command.run
run() {
declare -A args=()
declare -A deps=()
declare -a other_args=()
declare -a env_var_names=()
declare -a input=()
declare -g -A args=()
declare -g -A deps=()
declare -g -a other_args=()
declare -g -a env_var_names=()
declare -g -a input=()
normalize_input "$@"
parse_requirements "${input[@]}"

Expand Down
9 changes: 9 additions & 0 deletions src/lib/colors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,26 @@ yellow() { print_in_color "\e[33m" "$*"; }
blue() { print_in_color "\e[34m" "$*"; }
magenta() { print_in_color "\e[35m" "$*"; }
cyan() { print_in_color "\e[36m" "$*"; }
black() { print_in_color "\e[30m" "$*"; }
white() { print_in_color "\e[37m" "$*"; }

bold() { print_in_color "\e[1m" "$*"; }
underlined() { print_in_color "\e[4m" "$*"; }

red_bold() { print_in_color "\e[1;31m" "$*"; }
green_bold() { print_in_color "\e[1;32m" "$*"; }
yellow_bold() { print_in_color "\e[1;33m" "$*"; }
blue_bold() { print_in_color "\e[1;34m" "$*"; }
magenta_bold() { print_in_color "\e[1;35m" "$*"; }
cyan_bold() { print_in_color "\e[1;36m" "$*"; }
black_bold() { print_in_color "\e[1;30m" "$*"; }
white_bold() { print_in_color "\e[1;37m" "$*"; }

red_underlined() { print_in_color "\e[4;31m" "$*"; }
green_underlined() { print_in_color "\e[4;32m" "$*"; }
yellow_underlined() { print_in_color "\e[4;33m" "$*"; }
blue_underlined() { print_in_color "\e[4;34m" "$*"; }
magenta_underlined() { print_in_color "\e[4;35m" "$*"; }
cyan_underlined() { print_in_color "\e[4;36m" "$*"; }
black_underlined() { print_in_color "\e[4;30m" "$*"; }
white_underlined() { print_in_color "\e[4;37m" "$*"; }
Loading