diff --git a/scripts/_common.sh b/scripts/_common.sh index 36ecbcb..fbf21c5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="" -nodejs_version="14.19.3" +nodejs_version="14.21.3" #================================================= # PERSONAL HELPERS diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index c2ad66a..f359004 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -10,8 +10,8 @@ YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} # example: ynh_mongo_exec --command='db.getMongo().getDBNames().indexOf("wekan")' # example: ynh_mongo_exec --command="db.getMongo().getDBNames().indexOf(\"wekan\")" # -# usage: ynh_mongo_exec [--user=user] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval] -# | arg: -u, --user= - The user name to connect as +# usage: ynh_mongo_exec [--username=username] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval] +# | arg: -u, --username= - The user name to connect as # | arg: -p, --password= - The user password # | arg: -d, --authenticationdatabase= - The authenticationdatabase to connect to # | arg: -d, --database= - The database to connect to @@ -24,8 +24,8 @@ YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} ynh_mongo_exec() { # Declare an array to define the options of this helper. local legacy_args=upadhPce - local -A args_array=( [u]=user= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) - local user + local -A args_array=( [u]=username= [p]=password= [a]=authenticationdatabase= [d]=database= [h]=host= [P]=port= [c]=command= [e]=eval ) + local username local password local authenticationdatabase local database @@ -35,7 +35,7 @@ ynh_mongo_exec() { local eval # Manage arguments with getopts ynh_handle_getopts_args "$@" - user="${user:-}" + username="${username:-}" password="${password:-}" authenticationdatabase="${authenticationdatabase:-}" database="${database:-}" @@ -43,10 +43,10 @@ ynh_mongo_exec() { port="${port:-}" eval=${eval:-0} - # If user is provided - if [ -n "$user" ] + # If username is provided + if [ -n "$username" ] then - user="--username=$user" + username="--username=$username" # If password is provided if [ -n "$password" ] @@ -89,7 +89,7 @@ ynh_mongo_exec() { database="" fi - mongosh --quiet --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port <