This commit is contained in:
cutemeli
2025-12-22 10:35:30 +00:00
parent 0bfc6c8425
commit 5ce7ca2c5d
38927 changed files with 0 additions and 4594700 deletions

View File

@@ -1,126 +0,0 @@
#!/usr/bin/env bash
set -e
if [ "$1" = "--debug" ]; then
export NODENV_DEBUG=1
shift
fi
if [ -n "$NODENV_DEBUG" ]; then
export PS4='+ [${BASH_SOURCE##*/}:${LINENO}] '
set -x
fi
abort() {
{ if [ "$#" -eq 0 ]; then cat -
else echo "nodenv: $*"
fi
} >&2
exit 1
}
if enable -f "${BASH_SOURCE%/*}"/../libexec/nodenv-realpath.dylib realpath 2>/dev/null; then
abs_dirname() {
local path
path="$(realpath "$1")"
echo "${path%/*}"
}
else
READLINK=$(type -p greadlink readlink 2>/dev/null | head -1)
[ -n "$READLINK" ] || abort "cannot find readlink - are you missing GNU coreutils?"
resolve_link() {
$READLINK "$1"
}
abs_dirname() {
local cwd="$PWD"
local path="$1"
while [ -n "$path" ]; do
cd "${path%/*}"
local name="${path##*/}"
path="$(resolve_link "$name" || true)"
done
pwd
cd "$cwd"
}
fi
if [ -z "${NODENV_ROOT}" ]; then
NODENV_ROOT="${HOME}/.nodenv"
else
NODENV_ROOT="${NODENV_ROOT%/}"
fi
export NODENV_ROOT
if [ -z "${NODENV_DIR}" ]; then
NODENV_DIR="$PWD"
else
[[ $NODENV_DIR == /* ]] || NODENV_DIR="$PWD/$NODENV_DIR"
cd "$NODENV_DIR" 2>/dev/null || abort "cannot change working directory to \`$NODENV_DIR'"
NODENV_DIR="$PWD"
cd "$OLDPWD"
fi
export NODENV_DIR
shopt -s nullglob
bin_path="$(abs_dirname "$0")"
for plugin_bin in "${NODENV_ROOT}/plugins/"*/bin; do
PATH="${plugin_bin}:${PATH}"
done
export PATH="${bin_path}:${PATH}"
NODENV_HOOK_PATH="${NODENV_HOOK_PATH}:${NODENV_ROOT}/nodenv.d"
if [ "${bin_path%/*}" != "$NODENV_ROOT" ]; then
# Add nodenv's own `nodenv.d` unless nodenv was cloned to NODENV_ROOT
NODENV_HOOK_PATH="${NODENV_HOOK_PATH}:${bin_path%/*}/nodenv.d"
fi
NODENV_HOOK_PATH="${NODENV_HOOK_PATH}:/usr/local/etc/nodenv.d:/etc/nodenv.d:/usr/lib/nodenv/hooks"
for plugin_hook in "${NODENV_ROOT}/plugins/"*/etc/nodenv.d; do
NODENV_HOOK_PATH="${NODENV_HOOK_PATH}:${plugin_hook}"
done
NODENV_HOOK_PATH="${NODENV_HOOK_PATH#:}"
export NODENV_HOOK_PATH
shopt -u nullglob
command="$1"
case "$command" in
"" )
{ nodenv---version
nodenv-help
} | abort
;;
-v | --version )
exec nodenv---version
;;
-h | --help )
exec nodenv-help
;;
* )
command_path="$(command -v "nodenv-$command" || true)"
if [ -z "$command_path" ]; then
if [ "$command" == "shell" ]; then
abort "shell integration not enabled. Run \`nodenv init' for instructions."
else
abort "no such command \`$command'"
fi
fi
shift 1
if [ "$1" = --help ]; then
if [[ "$command" == "sh-"* ]]; then
echo "nodenv help \"$command\""
else
exec nodenv-help "$command"
fi
else
exec "$command_path" "$@"
fi
;;
esac

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Summary: Display the version of nodenv
#
# Displays the version number of this nodenv release, including the
# current revision from git, if available.
#
# The format of the git revision is:
# <version>+<num_commits>.<git_sha>
# where `num_commits` is the number of commits since `version` was
# tagged.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
cd "${BASH_SOURCE%/*}" 2>/dev/null
version=1.4.0
semver_compliant() {
sed -E 's/-([[:digit:]]+)-g([[:alnum:]]+)/+\1.\2/'
}
if git remote -v 2>/dev/null | grep -q nodenv; then
git_revision="$(git describe --tags HEAD 2>/dev/null | semver_compliant || true)"
git_revision="${git_revision#v}"
fi
echo "nodenv ${git_revision:-$version}"

View File

@@ -1,43 +0,0 @@
#!/usr/bin/env bash
# Summary: List all available nodenv commands
# Usage: nodenv commands [--sh|--no-sh]
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --sh
echo --no-sh
exit
fi
if [ "$1" = "--sh" ]; then
sh=1
shift
elif [ "$1" = "--no-sh" ]; then
nosh=1
shift
fi
IFS=: paths=($PATH)
shopt -s nullglob
{ for path in "${paths[@]}"; do
for command in "${path}/nodenv-"*; do
command="${command##*nodenv-}"
if [ -n "$sh" ]; then
if [ "${command:0:3}" = "sh-" ]; then
echo "${command##sh-}"
fi
elif [ -n "$nosh" ]; then
if [ "${command:0:3}" != "sh-" ]; then
echo "${command##sh-}"
fi
else
echo "${command##sh-}"
fi
done
done
} | sort | uniq

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Usage: nodenv completions <command> [arg1 arg2...]
set -e
[ -n "$NODENV_DEBUG" ] && set -x
COMMAND="$1"
if [ -z "$COMMAND" ]; then
nodenv-help --usage completions >&2
exit 1
fi
# Provide nodenv completions
if [ "$COMMAND" = "--complete" ]; then
exec nodenv-commands
fi
COMMAND_PATH="$(command -v "nodenv-$COMMAND" || command -v "nodenv-sh-$COMMAND")"
# --help is provided automatically
echo --help
if grep -iE "^([#%]|--|//) provide nodenv completions" "$COMMAND_PATH" >/dev/null; then
shift
exec "$COMMAND_PATH" --complete "$@"
fi

View File

@@ -1,47 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Run an executable with the selected Node version
#
# Usage: nodenv exec <command> [arg1 arg2...]
#
# Runs an executable by first preparing PATH so that the selected Node
# version's `bin' directory is at the front.
#
# For example, if the currently selected Node version is 0.10.26:
# nodenv exec bundle install
#
# is equivalent to:
# PATH="$NODENV_ROOT/versions/0.10.26/bin:$PATH" bundle install
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
exec nodenv-shims --short
fi
NODENV_VERSION="$(nodenv-version-name)"
NODENV_COMMAND="$1"
if [ -z "$NODENV_COMMAND" ]; then
nodenv-help --usage exec >&2
exit 1
fi
export NODENV_VERSION
NODENV_COMMAND_PATH="$(nodenv-which "$NODENV_COMMAND")"
NODENV_BIN_PATH="${NODENV_COMMAND_PATH%/*}"
OLDIFS="$IFS"
IFS=$'\n' scripts=(`nodenv-hooks exec`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done
shift 1
if [ "$NODENV_VERSION" != "system" ]; then
export PATH="${NODENV_BIN_PATH}:${PATH}"
fi
exec -a "$NODENV_COMMAND" "$NODENV_COMMAND_PATH" "$@"

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Set or show the global Node version
#
# Usage: nodenv global <version>
#
# Sets the global Node version. You can override the global version at
# any time by setting a directory-specific version with `nodenv local'
# or by setting the `NODENV_VERSION' environment variable.
#
# <version> should be a string matching a Node version known to nodenv.
# The special version string `system' will use your default system Node.
# Run `nodenv versions' for a list of available Node versions.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --unset
echo system
exec nodenv-versions --bare
fi
NODENV_VERSION="$1"
NODENV_VERSION_FILE="${NODENV_ROOT:?}/version"
if [ "$1" = "--unset" ]; then
exec rm -f "$NODENV_VERSION_FILE"
fi
if [ -n "$NODENV_VERSION" ]; then
nodenv-version-file-write "$NODENV_VERSION_FILE" "$NODENV_VERSION"
else
nodenv-version-file-read "$NODENV_VERSION_FILE" || echo system
fi

View File

@@ -1,177 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Display help for a command
#
# Usage: nodenv help [--usage] COMMAND
#
# Parses and displays help contents from a command's source file.
#
# A command is considered documented if it starts with a comment block
# that has a `Summary:' or `Usage:' section. Usage instructions can
# span multiple lines as long as subsequent lines are indented.
# The remainder of the comment block is displayed as extended
# documentation.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --usage
exec nodenv-commands
fi
command_path() {
local command="$1"
command -v nodenv-"$command" || command -v nodenv-sh-"$command" || true
}
extract_initial_comment_block() {
sed -ne "
/^#/ !{
q
}
s/^#$/# /
/^# / {
s/^# //
p
}
"
}
collect_documentation() {
local awk
awk="$(type -p gawk awk 2>/dev/null | head -1)"
if [ -z "$awk" ]; then
echo "nodenv: cannot find awk" >&2
return 1
fi
# shellcheck disable=SC2016
"$awk" '
/^Summary:/ {
summary = substr($0, 10)
next
}
/^Usage:/ {
reading_usage = 1
usage = usage "\n" $0
next
}
/^( *$| )/ && reading_usage {
usage = usage "\n" $0
next
}
{
reading_usage = 0
help = help "\n" $0
}
function escape(str) {
gsub(/[`\\$"]/, "\\\\&", str)
return str
}
function trim(str) {
sub(/^\n*/, "", str)
sub(/\n*$/, "", str)
return str
}
END {
if (usage || summary) {
print "summary=\"" escape(summary) "\""
print "usage=\"" escape(trim(usage)) "\""
print "help=\"" escape(trim(help)) "\""
}
}
'
}
documentation_for() {
local filename
filename="$(command_path "$1")"
if [ -n "$filename" ]; then
extract_initial_comment_block < "$filename" | collect_documentation
fi
}
print_summary() {
local command="$1"
local summary usage help
eval "$(documentation_for "$command")"
if [ -n "$summary" ]; then
printf " %-9s %s\n" "$command" "$summary"
fi
}
print_summaries() {
for command; do
print_summary "$command"
done
}
print_help() {
local command="$1"
local summary usage help
eval "$(documentation_for "$command")"
[ -n "$help" ] || help="$summary"
if [ -n "$usage" ] || [ -n "$summary" ]; then
if [ -n "$usage" ]; then
echo "$usage"
else
echo "Usage: nodenv ${command}"
fi
if [ -n "$help" ]; then
echo
echo "$help"
echo
fi
else
echo "Sorry, this command isn't documented yet." >&2
return 1
fi
}
print_usage() {
local command="$1"
local summary usage help
eval "$(documentation_for "$command")"
[ -z "$usage" ] || echo "$usage"
}
unset usage
if [ "$1" = "--usage" ]; then
usage="1"
shift
fi
if [ -z "$1" ] || [ "$1" == "nodenv" ]; then
echo "Usage: nodenv <command> [<args>]"
[ -z "$usage" ] || exit
echo
echo "Some useful nodenv commands are:"
print_summaries commands local global shell install uninstall rehash version versions which whence
echo
echo "See \`nodenv help <command>' for information on a specific command."
echo "For full documentation, see: https://github.com/nodenv/nodenv#readme"
else
command="$1"
if [ -n "$(command_path "$command")" ]; then
if [ -n "$usage" ]; then
print_usage "$command"
else
print_help "$command"
fi
else
echo "nodenv: no such command \`$command'" >&2
exit 1
fi
fi

View File

@@ -1,59 +0,0 @@
#!/usr/bin/env bash
# Summary: List hook scripts for a given nodenv command
# Usage: nodenv hooks <command>
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo exec
echo rehash
echo version-name
echo version-origin
echo which
exit
fi
NODENV_COMMAND="$1"
if [ -z "$NODENV_COMMAND" ]; then
nodenv-help --usage hooks >&2
exit 1
fi
if ! enable -f "${BASH_SOURCE%/*}"/nodenv-realpath.dylib realpath 2>/dev/null; then
READLINK=$(type -p greadlink readlink 2>/dev/null | head -1)
if [ -z "$READLINK" ]; then
echo "nodenv: cannot find readlink - are you missing GNU coreutils?" >&2
exit 1
fi
resolve_link() {
$READLINK "$1"
}
realpath() {
local cwd="$PWD"
local path="$1"
local name
while [ -n "$path" ]; do
name="${path##*/}"
[ "$name" = "$path" ] || cd "${path%/*}"
path="$(resolve_link "$name" || true)"
done
echo "${PWD}/$name"
cd "$cwd"
}
fi
IFS=: hook_paths=($NODENV_HOOK_PATH)
shopt -s nullglob
for path in "${hook_paths[@]}"; do
for script in "$path/$NODENV_COMMAND"/*.bash; do
realpath "$script"
done
done
shopt -u nullglob

View File

@@ -1,154 +0,0 @@
#!/usr/bin/env bash
# Summary: Configure the shell environment for nodenv
# Usage: eval "$(nodenv init - [--no-rehash] [<shell>])"
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo -
echo --no-rehash
echo bash
echo fish
echo ksh
echo zsh
exit
fi
print=""
no_rehash=""
for args in "$@"
do
if [ "$args" = "-" ]; then
print=1
shift
fi
if [ "$args" = "--no-rehash" ]; then
no_rehash=1
shift
fi
done
shell="$1"
if [ -z "$shell" ]; then
shell="$(ps -p "$PPID" -o 'args=' 2>/dev/null || true)"
shell="${shell%% *}"
shell="${shell##-}"
shell="${shell:-$SHELL}"
shell="${shell##*/}"
fi
root="${0%/*}/.."
if [ -z "$print" ]; then
case "$shell" in
bash )
if [ -f "${HOME}/.bashrc" ] && [ ! -f "${HOME}/.bash_profile" ]; then
profile='~/.bashrc'
else
profile='~/.bash_profile'
fi
;;
zsh )
profile='~/.zshrc'
;;
ksh )
profile='~/.profile'
;;
fish )
profile='~/.config/fish/config.fish'
;;
* )
profile='your profile'
;;
esac
{ echo "# Load nodenv automatically by appending"
echo "# the following to ${profile}:"
echo
case "$shell" in
fish )
echo 'status --is-interactive; and source (nodenv init -|psub)'
;;
* )
echo 'eval "$(nodenv init -)"'
;;
esac
echo
} >&2
exit 1
fi
mkdir -p "${NODENV_ROOT}/"{shims,versions}
case "$shell" in
fish )
echo "set -gx PATH '${NODENV_ROOT}/shims' \$PATH"
echo "set -gx NODENV_SHELL $shell"
;;
* )
echo 'export PATH="'${NODENV_ROOT}'/shims:${PATH}"'
echo "export NODENV_SHELL=$shell"
;;
esac
completion="${root}/completions/nodenv.${shell}"
if [ -r "$completion" ]; then
echo "source '$completion'"
fi
if [ -z "$no_rehash" ]; then
echo 'command nodenv rehash 2>/dev/null'
fi
commands=(`nodenv-commands --sh`)
case "$shell" in
fish )
cat <<EOS
function nodenv
set command \$argv[1]
set -e argv[1]
switch "\$command"
case ${commands[*]}
source (nodenv "sh-\$command" \$argv|psub)
case '*'
command nodenv "\$command" \$argv
end
end
EOS
;;
ksh )
cat <<EOS
function nodenv {
typeset command
EOS
;;
* )
cat <<EOS
nodenv() {
local command
EOS
;;
esac
if [ "$shell" != "fish" ]; then
IFS="|"
cat <<EOS
command="\${1:-}"
if [ "\$#" -gt 0 ]; then
shift
fi
case "\$command" in
${commands[*]})
eval "\$(nodenv "sh-\$command" "\$@")";;
*)
command nodenv "\$command" "\$@";;
esac
}
EOS
fi

View File

@@ -1,11 +0,0 @@
#!/bin/sh
# Prepare .nodenv enviroment and inject shims into PATH for psacln members
if id -Gn | grep -q '\bpsacln\b'; then
if [ ! -e ~/.nodenv ] ; then
mkdir -p ~/.nodenv
ln -snfT "/opt/plesk/node" ~/.nodenv/versions
fi
eval "$(nodenv init -)"
fi

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Set or show the local application-specific Node version
#
# Usage: nodenv local <version>
# nodenv local --unset
#
# Sets the local application-specific Node version by writing the
# version name to a file named `.node-version'.
#
# When you run a Node command, nodenv will look for a `.node-version'
# file in the current directory and each parent directory. If no such
# file is found in the tree, nodenv will use the global Node version
# specified with `nodenv global'. A version specified with the
# `NODENV_VERSION' environment variable takes precedence over local
# and global versions.
#
# <version> should be a string matching a Node version known to nodenv.
# The special version string `system' will use your default system Node.
# Run `nodenv versions' for a list of available Node versions.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --unset
echo system
exec nodenv-versions --bare
fi
NODENV_VERSION="$1"
if [ "$NODENV_VERSION" = "--unset" ]; then
rm -f .node-version
elif [ -n "$NODENV_VERSION" ]; then
nodenv-version-file-write .node-version "$NODENV_VERSION"
else
if version_file="$(nodenv-version-file "$PWD")"; then
nodenv-version-file-read "$version_file"
else
echo "nodenv: no local version configured for this directory" >&2
exit 1
fi
fi

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
# Summary: Display prefix for a Node version
# Usage: nodenv prefix [<version>]
#
# Displays the directory where a Node version is installed. If no
# version is given, `nodenv prefix' displays the location of the
# currently selected version.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo system
exec nodenv-versions --bare
fi
if [ -n "$1" ]; then
export NODENV_VERSION="$1"
elif [ -z "$NODENV_VERSION" ]; then
NODENV_VERSION="$(nodenv-version-name)"
fi
if [ "$NODENV_VERSION" = "system" ]; then
if NODE_PATH="$(nodenv-which node)"; then
NODE_PATH="${NODE_PATH%/*}"
NODENV_PREFIX_PATH="${NODE_PATH%/bin}"
echo "${NODENV_PREFIX_PATH:-/}"
exit
else
echo "nodenv: system version not found in PATH" >&2
exit 1
fi
fi
NODENV_PREFIX_PATH="${NODENV_ROOT}/versions/${NODENV_VERSION}"
if [ ! -d "$NODENV_PREFIX_PATH" ]; then
echo "nodenv: version \`${NODENV_VERSION}' not installed" >&2
exit 1
fi
echo "$NODENV_PREFIX_PATH"

View File

@@ -1,153 +0,0 @@
#!/usr/bin/env bash
# Summary: Rehash nodenv shims (run this after installing executables)
set -e
[ -n "$NODENV_DEBUG" ] && set -x
SHIM_PATH="${NODENV_ROOT}/shims"
PROTOTYPE_SHIM_PATH="${SHIM_PATH}/.nodenv-shim"
# Create the shims directory if it doesn't already exist.
mkdir -p "$SHIM_PATH"
# Ensure only one instance of nodenv-rehash is running at a time by
# setting the shell's `noclobber` option and attempting to write to
# the prototype shim file. If the file already exists, print a warning
# to stderr and exit with a non-zero status.
set -o noclobber
{ echo > "$PROTOTYPE_SHIM_PATH"
} 2>| /dev/null ||
{ if [ -w "$SHIM_PATH" ]; then
echo "nodenv: cannot rehash: $PROTOTYPE_SHIM_PATH exists"
else
echo "nodenv: cannot rehash: $SHIM_PATH isn't writable"
fi
exit 1
} >&2
set +o noclobber
# If we were able to obtain a lock, register a trap to clean up the
# prototype shim when the process exits.
trap remove_prototype_shim EXIT
remove_prototype_shim() {
rm -f "$PROTOTYPE_SHIM_PATH"
}
# The prototype shim file is a script that re-execs itself, passing
# its filename and any arguments to `nodenv exec`. This file is
# hard-linked for every executable and then removed. The linking
# technique is fast, uses less disk space than unique files, and also
# serves as a locking mechanism.
create_prototype_shim() {
cat > "$PROTOTYPE_SHIM_PATH" <<SH
#!/usr/bin/env bash
set -e
[ -n "\$NODENV_DEBUG" ] && set -x
program="\${0##*/}"
if [ "\$program" = "node" ]; then
for arg; do
case "\$arg" in
-e* | -- ) break ;;
*/* )
if [ -f "\$arg" ]; then
export NODENV_DIR="\${arg%/*}"
break
fi
;;
esac
done
fi
export NODENV_ROOT="$NODENV_ROOT"
exec "$(command -v nodenv)" exec "\$program" "\$@"
SH
chmod +x "$PROTOTYPE_SHIM_PATH"
}
# If the contents of the prototype shim file differ from the contents
# of the first shim in the shims directory, assume nodenv has been
# upgraded and the existing shims need to be removed.
remove_outdated_shims() {
local shim
for shim in "$SHIM_PATH"/*; do
if ! diff "$PROTOTYPE_SHIM_PATH" "$shim" >/dev/null 2>&1; then
rm -f "$SHIM_PATH"/*
fi
break
done
}
# List basenames of executables for every Node version
list_executable_names() {
local version file
nodenv-versions --bare --skip-aliases | \
while read -r version; do
for file in "${NODENV_ROOT}/versions/${version}/bin/"*; do
echo "${file##*/}"
done
done
}
# The basename of each argument passed to `make_shims` will be
# registered for installation as a shim. In this way, plugins may call
# `make_shims` with a glob to register many shims at once.
make_shims() {
local file shim
for file; do
shim="${file##*/}"
register_shim "$shim"
done
}
registered_shims=" "
# Registers the name of a shim to be generated.
register_shim() {
registered_shims="${registered_shims}${1} "
}
# Install all the shims registered via `make_shims` or `register_shim` directly.
install_registered_shims() {
local shim file
for shim in $registered_shims; do
file="${SHIM_PATH}/${shim}"
[ -e "$file" ] || cp "$PROTOTYPE_SHIM_PATH" "$file"
done
}
# Once the registered shims have been installed, we make a second pass
# over the contents of the shims directory. Any file that is present
# in the directory but has not been registered as a shim should be
# removed.
remove_stale_shims() {
local shim
for shim in "$SHIM_PATH"/*; do
if [[ "$registered_shims" != *" ${shim##*/} "* ]]; then
rm -f "$shim"
fi
done
}
shopt -s nullglob
# Create the prototype shim, then register shims for all known
# executables.
create_prototype_shim
remove_outdated_shims
# shellcheck disable=SC2046
make_shims $(list_executable_names | sort -u)
# Allow plugins to register shims.
OLDIFS="$IFS"
IFS=$'\n' scripts=(`nodenv-hooks rehash`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done
install_registered_shims
remove_stale_shims

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
# Summary: Display the root directory where versions and shims are kept
echo "$NODENV_ROOT"

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
exec nodenv-rehash --complete
fi
shell="$(basename "${NODENV_SHELL:-$SHELL}")"
# When nodenv shell integration is enabled, delegate to nodenv-rehash,
# then tell the shell to empty its command lookup cache.
nodenv-rehash
case "$shell" in
fish )
# no rehash support
;;
* )
echo "hash -r 2>/dev/null || true"
;;
esac

View File

@@ -1,118 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Set or show the shell-specific Node version
#
# Usage: nodenv shell <version>
# nodenv shell -
# nodenv shell --unset
#
# Sets a shell-specific Node version by setting the `NODENV_VERSION'
# environment variable in your shell. This version overrides local
# application-specific versions and the global version.
#
# <version> should be a string matching a Node version known to nodenv.
# The special version string `system' will use your default system Node.
# Run `nodenv versions' for a list of available Node versions.
#
# When `-` is passed instead of the version string, the previously set
# version will be restored. With `--unset`, the `NODENV_VERSION`
# environment variable gets unset, restoring the environment to the
# state before the first `nodenv shell` call.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --unset
echo system
exec nodenv-versions --bare
fi
version="$1"
shell="$(basename "${NODENV_SHELL:-$SHELL}")"
if [ -z "$version" ]; then
if [ -z "$NODENV_VERSION" ]; then
echo "nodenv: no shell-specific version configured" >&2
exit 1
else
echo 'echo "$NODENV_VERSION"'
exit
fi
fi
if [ "$version" = "--unset" ]; then
case "$shell" in
fish )
echo 'set -gu NODENV_VERSION_OLD "$NODENV_VERSION"'
echo "set -e NODENV_VERSION"
;;
* )
echo 'NODENV_VERSION_OLD="$NODENV_VERSION"'
echo "unset NODENV_VERSION"
;;
esac
exit
fi
if [ "$version" = "-" ]; then
case "$shell" in
fish )
cat <<EOS
if set -q NODENV_VERSION_OLD
if [ -n "\$NODENV_VERSION_OLD" ]
set NODENV_VERSION_OLD_ "\$NODENV_VERSION"
set -gx NODENV_VERSION "\$NODENV_VERSION_OLD"
set -gu NODENV_VERSION_OLD "\$NODENV_VERSION_OLD_"
set -e NODENV_VERSION_OLD_
else
set -gu NODENV_VERSION_OLD "\$NODENV_VERSION"
set -e NODENV_VERSION
end
else
echo "nodenv: NODENV_VERSION_OLD is not set" >&2
false
end
EOS
;;
* )
cat <<EOS
if [ -n "\${NODENV_VERSION_OLD+x}" ]; then
if [ -n "\$NODENV_VERSION_OLD" ]; then
NODENV_VERSION_OLD_="\$NODENV_VERSION"
export NODENV_VERSION="\$NODENV_VERSION_OLD"
NODENV_VERSION_OLD="\$NODENV_VERSION_OLD_"
unset NODENV_VERSION_OLD_
else
NODENV_VERSION_OLD="\$NODENV_VERSION"
unset NODENV_VERSION
fi
else
echo "nodenv: NODENV_VERSION_OLD is not set" >&2
false
fi
EOS
;;
esac
exit
fi
# Make sure the specified version is installed.
if nodenv-prefix "$version" >/dev/null; then
if [ "$version" != "$NODENV_VERSION" ]; then
case "$shell" in
fish )
echo 'set -gu NODENV_VERSION_OLD "$NODENV_VERSION"'
echo "set -gx NODENV_VERSION \"$version\""
;;
* )
echo 'NODENV_VERSION_OLD="$NODENV_VERSION"'
echo "export NODENV_VERSION=\"$version\""
;;
esac
fi
else
echo "false"
exit 1
fi

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
# Summary: List existing nodenv shims
# Usage: nodenv shims [--short]
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --short
exit
fi
shopt -s nullglob
for command in "${NODENV_ROOT}/shims/"*; do
if [ "$1" = "--short" ]; then
echo "${command##*/}"
else
echo "$command"
fi
done | sort

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
# Summary: Show the current Node version and its origin
#
# Shows the currently selected Node version and how it was
# selected. To obtain only the version string, use `nodenv
# version-name'.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
VERSION_NAME="$(nodenv-version-name)"
VERSION_PATH="$(nodenv-prefix "$VERSION_NAME" 2>/dev/null || true)"
while [ -L "$VERSION_PATH" ]; do
READLINK=$(type -p greadlink readlink | head -1)
[ -n "$READLINK" ] || break
VERSION_PATH=$($READLINK "$VERSION_PATH")
ALIAS=$(basename "$VERSION_PATH")
done
echo "$VERSION_NAME ${ALIAS+=> $ALIAS }(set by $(nodenv-version-origin))"

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Usage: nodenv version-file [<dir>]
# Summary: Detect the file that sets the current nodenv version
set -e
[ -n "$NODENV_DEBUG" ] && set -x
target_dir="$1"
find_local_version_file() {
local root="$1"
while ! [[ "$root" =~ ^//[^/]*$ ]]; do
if [ -s "${root}/.node-version" ]; then
echo "${root}/.node-version"
return 0
fi
[ -n "$root" ] || break
root="${root%/*}"
done
return 1
}
if [ -n "$target_dir" ]; then
find_local_version_file "$target_dir"
else
find_local_version_file "$NODENV_DIR" || {
[ "$NODENV_DIR" != "$PWD" ] && find_local_version_file "$PWD"
} || echo "${NODENV_ROOT}/version"
fi

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
# Usage: nodenv version-file-read <file>
set -e
[ -n "$NODENV_DEBUG" ] && set -x
VERSION_FILE="$1"
if [ -e "$VERSION_FILE" ]; then
# Read the first word from the specified version file. Avoid reading it whole.
IFS="${IFS}"$'\r'
words=( $(cut -b 1-1024 "$VERSION_FILE") )
version="${words[0]}"
if [[ $version == *..* ]]; then
echo "nodenv: invalid version in \`$VERSION_FILE'" >&2
elif [ -n "$version" ]; then
echo "$version"
exit
fi
fi
exit 1

View File

@@ -1,19 +0,0 @@
#!/usr/bin/env bash
# Usage: nodenv version-file-write <file> <version>
set -e
[ -n "$NODENV_DEBUG" ] && set -x
NODENV_VERSION_FILE="$1"
NODENV_VERSION="$2"
if [ -z "$NODENV_VERSION" ] || [ -z "$NODENV_VERSION_FILE" ]; then
nodenv-help --usage version-file-write >&2
exit 1
fi
# Make sure the specified version is installed.
nodenv-prefix "$NODENV_VERSION" >/dev/null
# Write the version out to disk.
echo "$NODENV_VERSION" > "$NODENV_VERSION_FILE"

View File

@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Summary: Show the current Node version
set -e
[ -n "$NODENV_DEBUG" ] && set -x
if [ -z "$NODENV_VERSION" ]; then
NODENV_VERSION_FILE="$(nodenv-version-file)"
NODENV_VERSION="$(nodenv-version-file-read "$NODENV_VERSION_FILE" || true)"
fi
OLDIFS="$IFS"
IFS=$'\n' scripts=(`nodenv-hooks version-name`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done
if [ -z "$NODENV_VERSION" ] || [ "$NODENV_VERSION" = "system" ]; then
echo "system"
exit
fi
version_exists() {
local version="$1"
[ -d "${NODENV_ROOT}/versions/${version}" ]
}
if version_exists "$NODENV_VERSION"; then
echo "$NODENV_VERSION"
elif version_exists "${NODENV_VERSION/v/}"; then
echo "${NODENV_VERSION/v/}"
elif version_exists "${NODENV_VERSION#node-}"; then
echo "${NODENV_VERSION#node-}"
elif version_exists "${NODENV_VERSION#node-v}"; then
echo "${NODENV_VERSION#node-v}"
else
echo "nodenv: version \`$NODENV_VERSION' is not installed (set by $(nodenv-version-origin))" >&2
exit 1
fi

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Summary: Explain how the current Node version is set
set -e
[ -n "$NODENV_DEBUG" ] && set -x
unset NODENV_VERSION_ORIGIN
OLDIFS="$IFS"
IFS=$'\n' scripts=(`nodenv-hooks version-origin`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done
if [ -n "$NODENV_VERSION_ORIGIN" ]; then
echo "$NODENV_VERSION_ORIGIN"
elif [ -n "$NODENV_VERSION" ]; then
echo "NODENV_VERSION environment variable"
else
nodenv-version-file
fi

View File

@@ -1,119 +0,0 @@
#!/usr/bin/env bash
# Summary: List installed Node versions
# Usage: nodenv versions [--bare] [--skip-aliases]
#
# Lists all Node versions found in `$NODENV_ROOT/versions/*'.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
unset bare
unset skip_aliases
# Provide nodenv completions
for arg; do
case "$arg" in
--complete )
echo --bare
echo --skip-aliases
exit ;;
--bare ) bare=1 ;;
--skip-aliases ) skip_aliases=1 ;;
* )
nodenv-help --usage versions >&2
exit 1
;;
esac
done
versions_dir="${NODENV_ROOT}/versions"
if ! enable -f "${BASH_SOURCE%/*}"/nodenv-realpath.dylib realpath 2>/dev/null; then
READLINK=$(type -p greadlink readlink 2>/dev/null | head -1)
if [ -z "$READLINK" ]; then
echo "nodenv: cannot find readlink - are you missing GNU coreutils?" >&2
exit 1
fi
resolve_link() {
$READLINK "$1"
}
realpath() {
local cwd="$PWD"
local path="$1"
local name
while [ -n "$path" ]; do
name="${path##*/}"
[ "$name" = "$path" ] || cd "${path%/*}"
path="$(resolve_link "$name" || true)"
done
echo "${PWD}/$name"
cd "$cwd"
}
fi
if [ -d "$versions_dir" ]; then
versions_dir="$(realpath "$versions_dir")"
fi
if [ -n "$bare" ]; then
hit_prefix=""
miss_prefix=""
current_version=""
include_system=""
else
hit_prefix="* "
miss_prefix=" "
current_version="$(nodenv-version-name || true)"
include_system="1"
fi
num_versions=0
print_version() {
if [ "$1" == "$current_version" ]; then
echo "${hit_prefix}$(nodenv-version 2>/dev/null)"
else
echo "${miss_prefix}$1"
fi
num_versions=$((num_versions + 1))
}
sort_versions() {
sed -E 'h; s/[~^<>=[:space:]]//g; s/^([[:digit:]])/a.\1/g; s/[+-]/./g; s/$/.0.0.0.0/; G; s/\n/ /' \
| LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n \
| cut -d' ' -f 2-
}
# Include "system" in the non-bare output, if it exists
if [ -n "$include_system" ] && NODENV_VERSION=system nodenv-which node >/dev/null 2>&1; then
print_version system
fi
while read -r version; do
print_version "$version"
done < <(
{
shopt -s nullglob
for path in "$versions_dir"/* "$versions_dir"/lts/*; do
if [ -d "$path" ]; then
if [ ! -d "$path/bin" ]; then continue; fi
if [ -n "$skip_aliases" ] && [ -L "$path" ]; then
target="$(realpath "$path")"
[ "${target%/*}" != "$versions_dir" ] || continue
fi
echo "${path#"${versions_dir}/"}"
fi
done
shopt -u nullglob
} \
| sort_versions
)
if [ "$num_versions" -eq 0 ] && [ -n "$include_system" ]; then
echo "Warning: no Node detected on the system" >&2
exit 1
fi

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Summary: List all Node versions that contain the given executable
# Usage: nodenv whence [--path] <command>
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
echo --path
exec nodenv-shims --short
fi
if [ "$1" = "--path" ]; then
print_paths="1"
shift
else
print_paths=""
fi
whence() {
local command="$1"
nodenv-versions --bare | while read -r version; do
path="$(nodenv-prefix "$version")/bin/${command}"
if [ -x "$path" ]; then
[ "$print_paths" ] && echo "$path" || echo "$version"
fi
done
}
NODENV_COMMAND="$1"
if [ -z "$NODENV_COMMAND" ]; then
nodenv-help --usage whence >&2
exit 1
fi
result="$(whence "$NODENV_COMMAND")"
[ -n "$result" ] && echo "$result"

View File

@@ -1,71 +0,0 @@
#!/usr/bin/env bash
#
# Summary: Display the full path to an executable
#
# Usage: nodenv which <command>
#
# Displays the full path to the executable that nodenv will invoke when
# you run the given command.
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
exec nodenv-shims --short
fi
remove_from_path() {
local path_to_remove="$1"
local path_before
local result=":${PATH//\~/$HOME}:"
while [ "$path_before" != "$result" ]; do
path_before="$result"
result="${result//:$path_to_remove:/:}"
done
result="${result%:}"
echo "${result#:}"
}
NODENV_COMMAND="$1"
if [ -z "$NODENV_COMMAND" ]; then
nodenv-help --usage which >&2
exit 1
fi
NODENV_VERSION="${NODENV_VERSION:-$(nodenv-version-name)}"
if [ "$NODENV_VERSION" = "system" ]; then
PATH="$(remove_from_path "${NODENV_ROOT}/shims")" \
NODENV_COMMAND_PATH="$(command -v "$NODENV_COMMAND" || true)"
else
NODENV_COMMAND_PATH="${NODENV_ROOT}/versions/${NODENV_VERSION}/bin/${NODENV_COMMAND}"
fi
OLDIFS="$IFS"
IFS=$'\n' scripts=(`nodenv-hooks which`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done
if [ -x "$NODENV_COMMAND_PATH" ]; then
echo "$NODENV_COMMAND_PATH"
elif [ "$NODENV_VERSION" != "system" ] && [ ! -d "${NODENV_ROOT}/versions/${NODENV_VERSION}" ]; then
echo "nodenv: version \`$NODENV_VERSION' is not installed (set by $(nodenv-version-origin))" >&2
exit 1
else
echo "nodenv: $NODENV_COMMAND: command not found" >&2
versions="$(nodenv-whence "$NODENV_COMMAND" || true)"
if [ -n "$versions" ]; then
{ echo
echo "The \`$1' command exists in these Node versions:"
echo "$versions" | sed 's/^/ /g'
echo
} >&2
fi
exit 127
fi

View File

@@ -1,12 +0,0 @@
<?php
die("The file {$_SERVER['SCRIPT_FILENAME']} is part of Plesk distribution. It cannot be run outside of Plesk environment.\n");
__sw_loader_pragma__('PLESK_18');
?>
pU?P<>_<EFBFBD>C|<7C>
<EFBFBD>3H<EFBFBD>5T0>Ltz'<>[(<28><><EFBFBD><EFBFBD>X<03>U0<55>f<EFBFBD><66>=?<1C><><15><><17><><EFBFBD>sx'<10>ܧ<EFBFBD><DCA7><EFBFBD><EFBFBD><EFBFBD> <20><>0<EFBFBD>WG<57><47>T<EFBFBD><54><EFBFBD>Ri <20><><1D>p<0F><>}Rq=Ӛ<><15>r<EFBFBD><72>b<EFBFBD><62><EFBFBD>vZ<76>W<>b:YЀ&<26><><EFBFBD>!<21><>)\x<16><><EFBFBD>J<EFBFBD><4A>hf4<>M~<7E><>XO<58>_<EFBFBD>ܸsteR<65><52><EFBFBD>oyzB䊦<1C>l'<27><><EFBFBD><EFBFBD>ה<>J<EFBFBD>{Y<10>/<2F>uh<75><68><04>!mX늩<58>P<EFBFBD>W<EFBFBD> <20><>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'.<2E><><EFBFBD><EFBFBD>=<04><>
<EFBFBD>mn)=<3D><>W.l<>!:%<25>{II<18><>v<1D><><18>6!<21><><18><><EFBFBD><EFBFBD>H<EFBFBD>d<EFBFBD><64><EFBFBD><EFBFBD>P4h<34><68>*䇃<>v<1A>=<3D><><EFBFBD><EFBFBD>"<03><>I<EFBFBD>)<29><><EFBFBD><EFBFBD>Z?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><>Ir<10><>!Og<1D>4<EFBFBD>j<EFBFBD>()<29><><EFBFBD><EFBFBD>K<EFBFBD><4B>0ћ-u<><75>%on<6F><6E>/C<>;<12>6<EFBFBD>a00<30>I+<2B><><EFBFBD><14>SM<06>M<EFBFBD><4D><EFBFBD><EFBFBD>q\6Q<36>"<22>l<EFBFBD><6C>v+S(<28><><EFBFBD>]o@`t<>{<7B>ׯ>p<><70>џWP<08><><EFBFBD>M<EFBFBD><<3C>^<5E>NˉO<CB89>"<22>{]<5D><67>M<EFBFBD>Ө<EFBFBD>5<EFBFBD><35><EFBFBD>^7<>4<EFBFBD>sD<73><44><EFBFBD>BE3<45>Q<>s<EFBFBD>L<EFBFBD>_<EFBFBD>Zn<5A><6E><EFBFBD>W<EFBFBD><57><EFBFBD><EFBFBD><EFBFBD>h{t<>t*x<>| ˙o<<16> <0B>H7<48>0<>X
<EFBFBD><EFBFBD><1F><><EFBFBD><EFBFBD>i<>Ŋ<EFBFBD><C58A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><0F><><06><>  <0C>S\+<2B><><EFBFBD>x<01><><EFBFBD>uB<75><12>%'<27><><EFBFBD><07><><EFBFBD><EFBFBD>%<25><><EFBFBD><EFBFBD><EFBFBD>m%!<11>R<EFBFBD>n^ri[9<><39><EFBFBD>,<2C><>h?n?<3F>{QIn8B\W%<25>!<21>(7QWͬ}<7D>ަ<19><><19><><EFBFBD><EFBFBD>5<EFBFBD>*<2A>p<EFBFBD><70>Y<EFBFBD>m<EFBFBD><6D>/<2F>D`
X<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>Ҋ?<1B><>T<EFBFBD><13><6E><C489><02>2Lp@<40>ih<69>D<EFBFBD>Z<EFBFBD><5A>ZYi,}+k<>r <0B>j<EFBFBD><6A>m<EFBFBD><08><><EFBFBD>Ǎ <20><>MG<4D><47><EFBFBD><EFBFBD><<3C>7w%<25><><4A><D3BA><EFBFBD><EFBFBD>0/)!4 w<>)<29><15><><EFBFBD>X!<21>C<EFBFBD>N<EFBFBD><02>f <09><>z<1A><>X'<27>tw(<28>ѐ<EFBFBD><D190>FH<46>s^<5E>m\<5C><><EFBFBD>L<EFBFBD><4C>v<EFBFBD><76>/|Q<> x}.<2E>RNԎ<4E><D48E><EFBFBD>I\.vWx<57><78><EFBFBD><01><14>K<EFBFBD><4B><EFBFBD>*<2A><03><>RY-${ON<4F>
d<EFBFBD><EFBFBD>5oe<EFBFBD><EFBFBD><EFBFBD>j<10><>X<EFBFBD><58>a_x<5F>N<EFBFBD>"23<32><33>jYl<59><6C>{<7B>KD<4B><17><>7<>J<EFBFBD><4A><EFBFBD><0E><>Σ<EFBFBD>*4<>ir<69><72><11>x+H<>4<EFBFBD><10>M<EFBFBD>;]pV<16><>R<EFBFBD><52>| $!N<>_<><5F>:<3A><>H<EFBFBD>"<22><>X<EFBFBD>l<EFBFBD>

View File

@@ -1,9 +0,0 @@
<?php
die("The file {$_SERVER['SCRIPT_FILENAME']} is part of Plesk distribution. It cannot be run outside of Plesk environment.\n");
__sw_loader_pragma__('PLESK_18');
?>
4<EFBFBD><14>C<EFBFBD>+x<>%Y<>G<EFBFBD><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.<2E>,<2C>l1Zv<5A><76>\+<2B>ޤ<EFBFBD>/fx2@<40><>E<EFBFBD>BקPy~<7E><><EFBFBD>0<EFBFBD><30>s|<12><07><>!<21>gd<67><64><EFBFBD>oIR_<52><5F><EFBFBD>i<18><><EFBFBD><EFBFBD><EFBFBD>$E<>q!<21>+<2B><>Շ<EFBFBD><D587>*<12><>^tңh+1<>W<EFBFBD><57>#U<>'<1E><><EFBFBD><EFBFBD><EFBFBD>[)
<EFBFBD><EFBFBD>KbW<62><57><EFBFBD>T3<54><33>"n<>ʖ<18>><3E>Bn!Y.>'<1F><><EFBFBD>1ワ<31>!j<><6A><EFBFBD>%~&<26> <0B>ؗF<D897>S<EFBFBD>
<EFBFBD>օ<EFBFBD>M<EFBFBD><EFBFBD>A`He~;<<3C><><EFBFBD><EFBFBD>G<EFBFBD>a<EFBFBD>k[<5B><>oX<6F><58><EFBFBD>/b<><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2%<25><04><>><3E>5<EFBFBD>I~<7E><><11><08>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD>C<EFBFBD>ъ2P<32>Q<EFBFBD>
՘GJ<47><4A><EFBFBD><EFBFBD>K |@B<><42>z{l<>j<>?ӶC?<3F>P<EFBFBD><50>P<1B>IEl<02><><12>@<07><>q
9&AKS<4B>(C<><43>d<EFBFBD><64><14><19><><EFBFBD>I<EFBFBD>'<27>å<EFBFBD>+8j<38>r<EFBFBD>gDP<44><><C7BE>ouH<75><48>s<EFBFBD>x#.<2E><>{<7B>ߩ<EFBFBD>D<EFBFBD>Bb<42><62><EFBFBD>R<EFBFBD>9(&<26>%<25><><EFBFBD><EFBFBD>Q<EFBFBD> <0B>%˵W<CBB5>+<2B>LB<4C>{S<><1A><>,<2C><EFBFBD><7F><EFBFBD>8M<38>̅+):<3A><><EFBFBD><EFBFBD>so<73>

Some files were not shown because too many files have changed in this diff Show More