netcron 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of netcron might be problematic. Click here for more details.
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.config/configstore/update-notifier-npm.json +4 -0
- package/.config/configstore/update-notifier-npm.json.1735545094 +4 -0
- package/.config/nvm/.dockerignore +16 -0
- package/.config/nvm/.editorconfig +28 -0
- package/.config/nvm/.gitattributes +1 -0
- package/.config/nvm/.github/FUNDING.yml +12 -0
- package/.config/nvm/.github/ISSUE_TEMPLATE.md +44 -0
- package/.config/nvm/.github/SECURITY.md +3 -0
- package/.config/nvm/.github/workflows/latest-npm.yml +81 -0
- package/.config/nvm/.github/workflows/lint.yml +77 -0
- package/.config/nvm/.github/workflows/rebase.yml +23 -0
- package/.config/nvm/.github/workflows/release.yml +32 -0
- package/.config/nvm/.github/workflows/require-allow-edits.yml +21 -0
- package/.config/nvm/.github/workflows/shellcheck.yml +58 -0
- package/.config/nvm/.github/workflows/tests.yml +56 -0
- package/.config/nvm/.github/workflows/toc.yml +37 -0
- package/.config/nvm/.github/workflows/windows-npm.yml +134 -0
- package/.config/nvm/.mailmap +1 -0
- package/.config/nvm/.travis.yml +100 -0
- package/.config/nvm/CODE_OF_CONDUCT.md +125 -0
- package/.config/nvm/CONTRIBUTING.md +115 -0
- package/.config/nvm/Dockerfile +111 -0
- package/.config/nvm/GOVERNANCE.md +10 -0
- package/.config/nvm/LICENSE.md +22 -0
- package/.config/nvm/Makefile +85 -0
- package/.config/nvm/PROJECT_CHARTER.md +49 -0
- package/.config/nvm/README.md +1047 -0
- package/.config/nvm/ROADMAP.md +9 -0
- package/.config/nvm/bash_completion +99 -0
- package/.config/nvm/install.sh +479 -0
- package/.config/nvm/nvm-exec +17 -0
- package/.config/nvm/nvm.sh +4417 -0
- package/.config/nvm/package.json +51 -0
- package/.config/nvm/rename_test.sh +52 -0
- package/.config/nvm/test/common.sh +103 -0
- package/.config/nvm/test/fast/Aliases/'nvm alias' should not accept aliases with slashes +26 -0
- package/.config/nvm/test/fast/Aliases/'nvm unalias' should accept aliases when they shadow a built-in alias +17 -0
- package/.config/nvm/test/fast/Aliases/'nvm unalias' should not accept aliases with names equal to built-in alias +25 -0
- package/.config/nvm/test/fast/Aliases/'nvm unalias' should not accept aliases with slashes +26 -0
- package/.config/nvm/test/fast/Aliases/Running 'nvm alias /313/202aliasname/313/203 /313/202target/313/203' again should change the target" +24 -0
- package/.config/nvm/test/fast/Aliases/Running 'nvm alias /313/202aliasname/313/203' should list but one alias" +4 -0
- package/.config/nvm/test/fast/Aliases/Running 'nvm alias' lists implicit aliases when they do not exist +26 -0
- package/.config/nvm/test/fast/Aliases/Running 'nvm alias' lists manual aliases instead of implicit aliases when present +49 -0
- package/.config/nvm/test/fast/Aliases/Running 'nvm alias' should list all aliases +48 -0
- package/.config/nvm/test/fast/Aliases/circular/nvm_resolve_alias +36 -0
- package/.config/nvm/test/fast/Aliases/circular/nvm_resolve_local_alias +36 -0
- package/.config/nvm/test/fast/Aliases/circular/setup +9 -0
- package/.config/nvm/test/fast/Aliases/circular/teardown +9 -0
- package/.config/nvm/test/fast/Aliases/lts/'nvm alias' should ensure LTS alias dir exists +18 -0
- package/.config/nvm/test/fast/Aliases/lts/setup_dir +10 -0
- package/.config/nvm/test/fast/Aliases/lts/teardown_dir +10 -0
- package/.config/nvm/test/fast/Aliases/nvm_ensure_default_set +20 -0
- package/.config/nvm/test/fast/Aliases/nvm_list_aliases calls nvm_get_colors +22 -0
- package/.config/nvm/test/fast/Aliases/nvm_list_aliases works with LTS aliases +31 -0
- package/.config/nvm/test/fast/Aliases/nvm_list_aliases works with no LTS aliases present +21 -0
- package/.config/nvm/test/fast/Aliases/nvm_print_alias_path calls nvm_get_colors +28 -0
- package/.config/nvm/test/fast/Aliases/nvm_print_formatted_alias calls nvm_get_colors +21 -0
- package/.config/nvm/test/fast/Aliases/nvm_resolve_alias +33 -0
- package/.config/nvm/test/fast/Aliases/nvm_resolve_local_alias +35 -0
- package/.config/nvm/test/fast/Aliases/setup +16 -0
- package/.config/nvm/test/fast/Aliases/teardown +17 -0
- package/.config/nvm/test/fast/Listing paths/Running 'nvm which 0.0.2' should display only version 0.0.2 +27 -0
- package/.config/nvm/test/fast/Listing paths/Running 'nvm which foo' should return a nonzero exit code when not found +6 -0
- package/.config/nvm/test/fast/Listing paths/teardown +3 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls --no-alias' does not call into nvm_alias +34 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls --no-alias' with a pattern errors +15 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls 0.0.2' should display only version 0.0.2 +21 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls 0.2' should display only 0.2.x versions +42 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls foo' should return a nonzero exit code when not found +6 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls io' should return NA +6 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls node_' should return a nonzero exit code when not found +6 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls stable' and 'nvm ls unstable' should return the appropriate implicit alias +29 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls system' should include 'system' when appropriate +21 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' calls into nvm_alias +35 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should display all installed versions +44 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should filter out '.nvm' +10 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should filter out 'versions' +10 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should include 'system' when appropriate +21 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should list versions in the 'versions' directory +12 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should not show a trailing slash +42 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' with node-like versioning vx.x.x should only list a matched version +11 -0
- package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' with nounset should not fail +23 -0
- package/.config/nvm/test/fast/Listing versions/Using a nonstandard IFS should not break +19 -0
- package/.config/nvm/test/fast/Listing versions/teardown +16 -0
- package/.config/nvm/test/fast/Running 'nvm alias' should create a file in the alias directory +11 -0
- package/.config/nvm/test/fast/Running 'nvm current' should display current nvm environment +13 -0
- package/.config/nvm/test/fast/Running 'nvm deactivate' should unset the nvm environment variables +25 -0
- package/.config/nvm/test/fast/Running 'nvm install' with '--reinstall-packages-from' requires a valid version +59 -0
- package/.config/nvm/test/fast/Running 'nvm install' with an invalid version fails nicely +15 -0
- package/.config/nvm/test/fast/Running 'nvm unalias' should remove the alias file +13 -0
- package/.config/nvm/test/fast/Running 'nvm uninstall' should remove the appropriate directory +12 -0
- package/.config/nvm/test/fast/Running 'nvm uninstall' with incorrect file permissions fails nicely +14 -0
- package/.config/nvm/test/fast/Running 'nvm unload' should unset all function and variables +30 -0
- package/.config/nvm/test/fast/Running 'nvm use foo' where 'foo' is circular aborts +39 -0
- package/.config/nvm/test/fast/Running 'nvm use iojs' uses latest io.js version +37 -0
- package/.config/nvm/test/fast/Running 'nvm use system' should work as expected +44 -0
- package/.config/nvm/test/fast/Running 'nvm use x' should create and change the 'current' symlink +36 -0
- package/.config/nvm/test/fast/Running 'nvm use x' should not create the 'current' symlink if $NVM_SYMLINK_CURRENT is false +86 -0
- package/.config/nvm/test/fast/Running 'nvm use' should drop CR char automatically +33 -0
- package/.config/nvm/test/fast/Set Colors/nvm_echo_with_colors +21 -0
- package/.config/nvm/test/fast/Set Colors/nvm_err_with_colors +19 -0
- package/.config/nvm/test/fast/Set Colors/nvm_print_default_alias calls nvm_get_colors +24 -0
- package/.config/nvm/test/fast/Set Colors/nvm_print_versions calls nvm_get_colors +52 -0
- package/.config/nvm/test/fast/Sourcing nvm.sh should make the nvm command available +7 -0
- package/.config/nvm/test/fast/Sourcing nvm.sh should not modify parameters of caller +7 -0
- package/.config/nvm/test/fast/Unit tests/mocks/LTS_names.txt +8 -0
- package/.config/nvm/test/fast/Unit tests/mocks/iojs.org-dist-index.tab +42 -0
- package/.config/nvm/test/fast/Unit tests/mocks/lts-star.txt +1 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab +671 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab +2915 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote iojs.txt +41 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote lts.txt +194 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote node.txt +670 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote.txt +711 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS argon.txt +36 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS nightly argon.txt +1 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS nightly.txt +26 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt +194 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt +150 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt +1 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt +1 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote.txt +670 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote_iojs.txt +41 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt +9 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt +1 -0
- package/.config/nvm/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt +1 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-both/a/b/c/d/.gitkeep +0 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-both/package.json +0 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-n_m/a/b/c/d/.gitkeep +0 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-pkg/a/b/c/d/.gitkeep +0 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-pkg/package.json +0 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/no-nesting-both/package.json +0 -0
- package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/no-nesting-pkg/package.json +0 -0
- package/.config/nvm/test/fast/Unit tests/nvm ls-remote +73 -0
- package/.config/nvm/test/fast/Unit tests/nvm set_colors +52 -0
- package/.config/nvm/test/fast/Unit tests/nvm version-remote +51 -0
- package/.config/nvm/test/fast/Unit tests/nvm_add_iojs_prefix +9 -0
- package/.config/nvm/test/fast/Unit tests/nvm_alias +32 -0
- package/.config/nvm/test/fast/Unit tests/nvm_alias LTS-N +36 -0
- package/.config/nvm/test/fast/Unit tests/nvm_alias_path +7 -0
- package/.config/nvm/test/fast/Unit tests/nvm_change_path +57 -0
- package/.config/nvm/test/fast/Unit tests/nvm_check_for_help +9 -0
- package/.config/nvm/test/fast/Unit tests/nvm_clang_version +62 -0
- package/.config/nvm/test/fast/Unit tests/nvm_command_info +58 -0
- package/.config/nvm/test/fast/Unit tests/nvm_compare_checksum +72 -0
- package/.config/nvm/test/fast/Unit tests/nvm_compute_checksum +23 -0
- package/.config/nvm/test/fast/Unit tests/nvm_curl_libz_support +39 -0
- package/.config/nvm/test/fast/Unit tests/nvm_curl_use_compression +38 -0
- package/.config/nvm/test/fast/Unit tests/nvm_curl_version +32 -0
- package/.config/nvm/test/fast/Unit tests/nvm_die_on_prefix +192 -0
- package/.config/nvm/test/fast/Unit tests/nvm_download +18 -0
- package/.config/nvm/test/fast/Unit tests/nvm_download_artifact +55 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ensure_default_set +15 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ensure_version_installed +72 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ensure_version_prefix +12 -0
- package/.config/nvm/test/fast/Unit tests/nvm_extract_tarball +12 -0
- package/.config/nvm/test/fast/Unit tests/nvm_find_project_dir +36 -0
- package/.config/nvm/test/fast/Unit tests/nvm_find_up +26 -0
- package/.config/nvm/test/fast/Unit tests/nvm_format_version +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_arch +85 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_artifact_compression +22 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_checksum +45 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_checksum_alg +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_checksum_binary +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_colors +79 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_default_packages +92 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_download_slug +111 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_latest missing curl or wget +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_minor_version +45 -0
- package/.config/nvm/test/fast/Unit tests/nvm_get_mirror +32 -0
- package/.config/nvm/test/fast/Unit tests/nvm_has +11 -0
- package/.config/nvm/test/fast/Unit tests/nvm_has_non_aliased +24 -0
- package/.config/nvm/test/fast/Unit tests/nvm_has_solaris_binary +32 -0
- package/.config/nvm/test/fast/Unit tests/nvm_has_system_iojs +27 -0
- package/.config/nvm/test/fast/Unit tests/nvm_has_system_node +27 -0
- package/.config/nvm/test/fast/Unit tests/nvm_install_binary_extract +59 -0
- package/.config/nvm/test/fast/Unit tests/nvm_install_binary_nosource +30 -0
- package/.config/nvm/test/fast/Unit tests/nvm_install_latest_npm +58 -0
- package/.config/nvm/test/fast/Unit tests/nvm_install_no_progress_bar +43 -0
- package/.config/nvm/test/fast/Unit tests/nvm_iojs_prefix +7 -0
- package/.config/nvm/test/fast/Unit tests/nvm_iojs_version_has_solaris_binary +17 -0
- package/.config/nvm/test/fast/Unit tests/nvm_is_alias +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_is_iojs_version +10 -0
- package/.config/nvm/test/fast/Unit tests/nvm_is_merged_node_version +10 -0
- package/.config/nvm/test/fast/Unit tests/nvm_is_natural_num +17 -0
- package/.config/nvm/test/fast/Unit tests/nvm_is_valid_version +13 -0
- package/.config/nvm/test/fast/Unit tests/nvm_is_version_installed +54 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ls_current +39 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ls_remote +86 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ls_remote LTS aliases +49 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ls_remote nightly +65 -0
- package/.config/nvm/test/fast/Unit tests/nvm_ls_remote_iojs +37 -0
- package/.config/nvm/test/fast/Unit tests/nvm_make_alias +19 -0
- package/.config/nvm/test/fast/Unit tests/nvm_node_prefix +7 -0
- package/.config/nvm/test/fast/Unit tests/nvm_node_version_has_solaris_binary +33 -0
- package/.config/nvm/test/fast/Unit tests/nvm_normalize_lts +38 -0
- package/.config/nvm/test/fast/Unit tests/nvm_num_version_groups +24 -0
- package/.config/nvm/test/fast/Unit tests/nvm_print_alias_path +44 -0
- package/.config/nvm/test/fast/Unit tests/nvm_print_color_code +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_print_default_alias +38 -0
- package/.config/nvm/test/fast/Unit tests/nvm_print_implicit_alias errors +25 -0
- package/.config/nvm/test/fast/Unit tests/nvm_print_implicit_alias success +106 -0
- package/.config/nvm/test/fast/Unit tests/nvm_print_npm_version +28 -0
- package/.config/nvm/test/fast/Unit tests/nvm_remote_version +78 -0
- package/.config/nvm/test/fast/Unit tests/nvm_remote_versions +77 -0
- package/.config/nvm/test/fast/Unit tests/nvm_stdout_is_terminal +32 -0
- package/.config/nvm/test/fast/Unit tests/nvm_strip_iojs_prefix +10 -0
- package/.config/nvm/test/fast/Unit tests/nvm_strip_path +24 -0
- package/.config/nvm/test/fast/Unit tests/nvm_supports_xz +42 -0
- package/.config/nvm/test/fast/Unit tests/nvm_tree_contains_path +31 -0
- package/.config/nvm/test/fast/Unit tests/nvm_use_if_needed +24 -0
- package/.config/nvm/test/fast/Unit tests/nvm_validate_implicit_alias +20 -0
- package/.config/nvm/test/fast/Unit tests/nvm_version +48 -0
- package/.config/nvm/test/fast/Unit tests/nvm_version_dir +11 -0
- package/.config/nvm/test/fast/Unit tests/nvm_version_greater +15 -0
- package/.config/nvm/test/fast/Unit tests/nvm_version_path +14 -0
- package/.config/nvm/test/fast/Unit tests/nvm_wrap_with_color_code +1 -0
- package/.config/nvm/test/fast/nvm should remove the last trailing slash in $NVM_DIR +18 -0
- package/.config/nvm/test/fast/setup +14 -0
- package/.config/nvm/test/fast/setup_dir +18 -0
- package/.config/nvm/test/fast/teardown +12 -0
- package/.config/nvm/test/fast/teardown_dir +15 -0
- package/.config/nvm/test/install_script/install_nvm_from_git +129 -0
- package/.config/nvm/test/install_script/nvm_check_global_modules +65 -0
- package/.config/nvm/test/install_script/nvm_detect_profile +126 -0
- package/.config/nvm/test/install_script/nvm_do_install +18 -0
- package/.config/nvm/test/install_script/nvm_download +18 -0
- package/.config/nvm/test/install_script/nvm_install_dir +25 -0
- package/.config/nvm/test/install_script/nvm_install_with_aliased_dot +24 -0
- package/.config/nvm/test/install_script/nvm_install_with_node_version +12 -0
- package/.config/nvm/test/install_script/nvm_profile_is_bash_or_zsh +14 -0
- package/.config/nvm/test/install_script/nvm_reset +38 -0
- package/.config/nvm/test/install_script/nvm_source +43 -0
- package/.config/nvm/test/installation_iojs/install already installed uses it +25 -0
- package/.config/nvm/test/installation_iojs/install from binary +22 -0
- package/.config/nvm/test/installation_iojs/install from source +22 -0
- package/.config/nvm/test/installation_iojs/install two versions and use the latest one +25 -0
- package/.config/nvm/test/installation_iojs/install version specified in .nvmrc from binary +22 -0
- package/.config/nvm/test/installation_iojs/install version specified in .nvmrc from source +23 -0
- package/.config/nvm/test/installation_iojs/install while reinstalling packages +31 -0
- package/.config/nvm/test/installation_iojs/nvm install v1 works +19 -0
- package/.config/nvm/test/installation_iojs/setup_dir +5 -0
- package/.config/nvm/test/installation_iojs/teardown_dir +16 -0
- package/.config/nvm/test/installation_node/default-packages +123 -0
- package/.config/nvm/test/installation_node/install LTS +29 -0
- package/.config/nvm/test/installation_node/install already installed uses it +23 -0
- package/.config/nvm/test/installation_node/install from binary +23 -0
- package/.config/nvm/test/installation_node/install from binary with binary flag set +37 -0
- package/.config/nvm/test/installation_node/install from source +29 -0
- package/.config/nvm/test/installation_node/install from source with thread parameter +33 -0
- package/.config/nvm/test/installation_node/install from source without V8 snapshot for ARM +25 -0
- package/.config/nvm/test/installation_node/install hook +45 -0
- package/.config/nvm/test/installation_node/install latest npm +51 -0
- package/.config/nvm/test/installation_node/install on bash with ERR trap and set -E +50 -0
- package/.config/nvm/test/installation_node/install two versions and use the latest one +24 -0
- package/.config/nvm/test/installation_node/install version specified in .nvmrc from binary +20 -0
- package/.config/nvm/test/installation_node/install while reinstalling packages +46 -0
- package/.config/nvm/test/installation_node/install with --alias +11 -0
- package/.config/nvm/test/installation_node/install with --default +11 -0
- package/.config/nvm/test/installation_node/install with --latest-npm +12 -0
- package/.config/nvm/test/installation_node/setup_dir +5 -0
- package/.config/nvm/test/installation_node/teardown_dir +18 -0
- package/.config/nvm/test/mocks/isainfo_amd64 +5 -0
- package/.config/nvm/test/mocks/isainfo_x86 +5 -0
- package/.config/nvm/test/mocks/pkg_info_amd64 +4 -0
- package/.config/nvm/test/mocks/pkg_info_fail +1 -0
- package/.config/nvm/test/mocks/pkg_info_x86 +1 -0
- package/.config/nvm/test/mocks/uname_linux_armv8l +5 -0
- package/.config/nvm/test/mocks/uname_osx_amd64 +5 -0
- package/.config/nvm/test/mocks/uname_osx_x86 +5 -0
- package/.config/nvm/test/mocks/uname_smartos_amd64 +5 -0
- package/.config/nvm/test/mocks/uname_smartos_x86 +5 -0
- package/.config/nvm/test/slow/Running 'nvm current' should display current nvm environment +9 -0
- package/.config/nvm/test/slow/nvm exec/Preamble works and respects 'silent' flag +30 -0
- package/.config/nvm/test/slow/nvm exec/Running 'nvm exec --lts' should work +18 -0
- package/.config/nvm/test/slow/nvm exec/Running 'nvm exec 0.x' should work +15 -0
- package/.config/nvm/test/slow/nvm exec/Running 'nvm exec' should pick up .nvmrc version +16 -0
- package/.config/nvm/test/slow/nvm exec/Running 'nvm exec' with help should not parse +9 -0
- package/.config/nvm/test/slow/nvm exec/setup_dir +10 -0
- package/.config/nvm/test/slow/nvm exec/teardown_dir +13 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/Running 'nvm copy-packages $(nvm ls current)' should error out +17 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/setup_dir +11 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/should work as expected +31 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/teardown_dir +13 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/test-npmlink/index.js +2 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/test-npmlink/package.json +10 -0
- package/.config/nvm/test/slow/nvm reinstall-packages/works with no installs +18 -0
- package/.config/nvm/test/slow/nvm run/Running 'nvm run --harmony --version' should work +8 -0
- package/.config/nvm/test/slow/nvm run/Running 'nvm run --lts' should work +15 -0
- package/.config/nvm/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed +16 -0
- package/.config/nvm/test/slow/nvm run/Running 'nvm run 0.x' should work +8 -0
- package/.config/nvm/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version +25 -0
- package/.config/nvm/test/slow/nvm run/setup_dir +11 -0
- package/.config/nvm/test/slow/nvm run/teardown_dir +14 -0
- package/.config/nvm/test/slow/nvm uninstall/Running 'nvm uninstall 0.12.6' uninstalls v0.12.6 +33 -0
- package/.config/nvm/test/slow/nvm uninstall/Running 'nvm uninstall' with incorrect file permissions fails nicely +30 -0
- package/.config/nvm/test/slow/nvm uninstall/setup_dir +4 -0
- package/.config/nvm/test/slow/nvm uninstall/teardown_dir +5 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use --lts' uses latest LTS version +22 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use --lts=foo' uses latest 'foo' LTS version +22 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use iojs' uses latest io.js version +20 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use node --silent' doesn't print anything +13 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use node' uses latest stable node version +20 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use v1.0.0' uses iojs-v1.0.0 iojs version +20 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use' calls 'nvm_die_on_prefix' +22 -0
- package/.config/nvm/test/slow/nvm use/Running 'nvm use' with nvmrc containing not intalled version +28 -0
- package/.config/nvm/test/slow/nvm use/setup_dir +23 -0
- package/.config/nvm/test/slow/nvm use/teardown_dir +22 -0
- package/.config/nvm/test/slow/nvm_get_latest/nvm_get_latest +101 -0
- package/.config/nvm/test/slow/nvm_get_latest/nvm_get_latest failed redirect +25 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh global alias bug +30 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh should keep version if one is active +20 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded +28 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it +27 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh with --install should install the default +32 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh with --no-use should not use anything +31 -0
- package/.config/nvm/test/sourcing/Sourcing nvm.sh with no default should return 0 +11 -0
- package/.config/nvm/test/sourcing/setup +14 -0
- package/.config/nvm/test/sourcing/teardown +7 -0
- package/.config/nvm/test/xenial/install from source +29 -0
- package/.config/nvm/test/xenial/install from source implicitly +23 -0
- package/.config/nvm/test/xenial/install from source with thread parameter +33 -0
- package/.config/nvm/test/xenial/install from source without V8 snapshot for ARM +25 -0
- package/.config/nvm/test/xenial/install hook +45 -0
- package/.config/nvm/test/xenial/install version specified in .nvmrc from source +20 -0
- package/.config/nvm/test/xenial/node 0.6.21 should install 0.6.21-pre +11 -0
- package/.config/nvm/update_test_mocks.sh +59 -0
- package/.gitattributes +2 -0
- package/.replit +84 -0
- package/.upm/store.json +1 -0
- package/Extra/Database/index.js +470 -0
- package/Extra/ExtraAddons.js +82 -0
- package/Extra/ExtraFindUID.js +62 -0
- package/Extra/ExtraGetThread.js +340 -0
- package/Extra/ExtraScreenShot.js +430 -0
- package/Extra/ExtraUptimeRobot.js +38 -0
- package/Extra/Html/Classic/script.js +833 -0
- package/Extra/Html/Classic/style.css +1222 -0
- package/Extra/Security/Index.js +173 -0
- package/Extra/Security/Step_1.js +6 -0
- package/Extra/Security/Step_2.js +22 -0
- package/Extra/Security/Step_3.js +22 -0
- package/Extra/Src/Change_Environment.js +24 -0
- package/Extra/Src/Check_Update.js +66 -0
- package/Extra/Src/History.js +115 -0
- package/Extra/Src/Instant_Update.js +64 -0
- package/Extra/Src/Last-Run.js +65 -0
- package/Extra/Src/Release_Memory.js +41 -0
- package/Extra/Src/image/checkmate.jpg +0 -0
- package/Extra/Src/uuid.js +137 -0
- package/Func/AcceptAgreement.js +31 -0
- package/Func/ClearCache.js +64 -0
- package/Func/ReportV1.js +54 -0
- package/Index.js +378 -0
- package/LICENSE +21 -0
- package/Language/index.json +224 -0
- package/Main.js +1110 -0
- package/README.md +144 -0
- package/broadcast.js +40 -0
- package/logger.js +66 -0
- package/package.json +231 -0
- package/replit.nix +8 -0
- package/src/Dev_Horizon_Data.js +125 -0
- package/src/Premium.js +25 -0
- package/src/Screenshot.js +83 -0
- package/src/addExternalModule.js +16 -0
- package/src/addUserToGroup.js +79 -0
- package/src/changeAdminStatus.js +79 -0
- package/src/changeArchivedStatus.js +41 -0
- package/src/changeAvt.js +85 -0
- package/src/changeBio.js +65 -0
- package/src/changeBlockedStatus.js +36 -0
- package/src/changeGroupImage.js +106 -0
- package/src/changeNickname.js +45 -0
- package/src/changeThreadColor.js +62 -0
- package/src/changeThreadEmoji.js +42 -0
- package/src/createNewGroup.js +70 -0
- package/src/createPoll.js +60 -0
- package/src/deleteMessage.js +45 -0
- package/src/deleteThread.js +43 -0
- package/src/forwardAttachment.js +48 -0
- package/src/getAccessToken.js +28 -0
- package/src/getCurrentUserID.js +7 -0
- package/src/getEmojiUrl.js +27 -0
- package/src/getFriendsList.js +73 -0
- package/src/getMessage.js +80 -0
- package/src/getThreadHistory.js +537 -0
- package/src/getThreadInfo.js +425 -0
- package/src/getThreadList.js +213 -0
- package/src/getThreadMain.js +220 -0
- package/src/getThreadPictures.js +59 -0
- package/src/getUID.js +59 -0
- package/src/getUserID.js +62 -0
- package/src/getUserInfo.js +113 -0
- package/src/getUserInfoMain.js +65 -0
- package/src/getUserInfoV2.js +32 -0
- package/src/getUserInfoV3.js +63 -0
- package/src/getUserInfoV4.js +55 -0
- package/src/getUserInfoV5.js +61 -0
- package/src/handleFriendRequest.js +46 -0
- package/src/handleMessageRequest.js +49 -0
- package/src/httpGet.js +49 -0
- package/src/httpPost.js +48 -0
- package/src/httpPostFormData.js +41 -0
- package/src/listenMqtt.js +786 -0
- package/src/logout.js +68 -0
- package/src/markAsDelivered.js +48 -0
- package/src/markAsRead.js +70 -0
- package/src/markAsReadAll.js +43 -0
- package/src/markAsSeen.js +51 -0
- package/src/muteThread.js +47 -0
- package/src/removeUserFromGroup.js +49 -0
- package/src/resolvePhotoUrl.js +37 -0
- package/src/searchForThread.js +43 -0
- package/src/sendMessage.js +379 -0
- package/src/sendTypingIndicator.js +80 -0
- package/src/setMessageReaction.js +109 -0
- package/src/setPostReaction.js +102 -0
- package/src/setTitle.js +74 -0
- package/src/threadColors.js +39 -0
- package/src/unfriend.js +43 -0
- package/src/unsendMessage.js +40 -0
- package/utils.js +1684 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
# nvm Road Map
|
2
|
+
|
3
|
+
This is a list of the primary features planned for `nvm`:
|
4
|
+
|
5
|
+
- [x] Rewriting installation code paths to support installing `io.js` and `node` `v4+` [from source](https://github.com/nvm-sh/nvm/issues/1188).
|
6
|
+
- This will include [reusing previously downloaded tarballs](https://github.com/nvm-sh/nvm/issues/1193) that match checksums, which is a nice performance and bandwidth bonus.
|
7
|
+
- [ ] Adding opt-in environment variable support to list, download, and install `node` [release candidates](https://github.com/nvm-sh/nvm/issues/779), and [nightly builds](https://github.com/nvm-sh/nvm/issues/1053).
|
8
|
+
- [ ] [`nvm update`](https://github.com/nvm-sh/nvm/issues/400): the ability to autoupdate `nvm` itself
|
9
|
+
- [ ] [v1.0.0](https://github.com/nvm-sh/nvm/milestone/1), including updating the [nvm on npm](https://github.com/nvm-sh/nvm/issues/304) to auto-install nvm properly
|
@@ -0,0 +1,99 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# bash completion for Node Version Manager (NVM)
|
4
|
+
|
5
|
+
if ! command -v nvm &> /dev/null; then
|
6
|
+
return
|
7
|
+
fi
|
8
|
+
|
9
|
+
__nvm_generate_completion() {
|
10
|
+
declare current_word
|
11
|
+
current_word="${COMP_WORDS[COMP_CWORD]}"
|
12
|
+
# shellcheck disable=SC2207
|
13
|
+
COMPREPLY=($(compgen -W "$1" -- "${current_word}"))
|
14
|
+
return 0
|
15
|
+
}
|
16
|
+
|
17
|
+
__nvm_commands() {
|
18
|
+
declare current_word
|
19
|
+
declare command
|
20
|
+
|
21
|
+
current_word="${COMP_WORDS[COMP_CWORD]}"
|
22
|
+
|
23
|
+
COMMANDS='
|
24
|
+
help install uninstall use run exec
|
25
|
+
alias unalias reinstall-packages
|
26
|
+
current list ls list-remote ls-remote
|
27
|
+
install-latest-npm
|
28
|
+
cache deactivate unload
|
29
|
+
version version-remote which'
|
30
|
+
|
31
|
+
if [ ${#COMP_WORDS[@]} == 4 ]; then
|
32
|
+
|
33
|
+
command="${COMP_WORDS[COMP_CWORD - 2]}"
|
34
|
+
case "${command}" in
|
35
|
+
alias) __nvm_installed_nodes ;;
|
36
|
+
esac
|
37
|
+
|
38
|
+
else
|
39
|
+
|
40
|
+
case "${current_word}" in
|
41
|
+
-*) __nvm_options ;;
|
42
|
+
*) __nvm_generate_completion "${COMMANDS}" ;;
|
43
|
+
esac
|
44
|
+
|
45
|
+
fi
|
46
|
+
}
|
47
|
+
|
48
|
+
__nvm_options() {
|
49
|
+
OPTIONS=''
|
50
|
+
__nvm_generate_completion "${OPTIONS}"
|
51
|
+
}
|
52
|
+
|
53
|
+
__nvm_installed_nodes() {
|
54
|
+
__nvm_generate_completion "$(nvm_ls) $(__nvm_aliases)"
|
55
|
+
}
|
56
|
+
|
57
|
+
__nvm_aliases() {
|
58
|
+
declare aliases
|
59
|
+
aliases=""
|
60
|
+
if [ -d "${NVM_DIR}/alias" ]; then
|
61
|
+
aliases="$(command cd "${NVM_DIR}/alias" && command find "${PWD}" -type f | command sed "s:${PWD}/::")"
|
62
|
+
fi
|
63
|
+
echo "${aliases} node stable unstable iojs"
|
64
|
+
}
|
65
|
+
|
66
|
+
__nvm_alias() {
|
67
|
+
__nvm_generate_completion "$(__nvm_aliases)"
|
68
|
+
}
|
69
|
+
|
70
|
+
__nvm() {
|
71
|
+
declare previous_word
|
72
|
+
previous_word="${COMP_WORDS[COMP_CWORD - 1]}"
|
73
|
+
|
74
|
+
case "${previous_word}" in
|
75
|
+
use | run | exec | ls | list | uninstall) __nvm_installed_nodes ;;
|
76
|
+
alias | unalias) __nvm_alias ;;
|
77
|
+
*) __nvm_commands ;;
|
78
|
+
esac
|
79
|
+
|
80
|
+
return 0
|
81
|
+
}
|
82
|
+
|
83
|
+
# complete is a bash builtin, but recent versions of ZSH come with a function
|
84
|
+
# called bashcompinit that will create a complete in ZSH. If the user is in
|
85
|
+
# ZSH, load and run bashcompinit before calling the complete function.
|
86
|
+
if [[ -n ${ZSH_VERSION-} ]]; then
|
87
|
+
# First calling compinit (only if not called yet!)
|
88
|
+
# and then bashcompinit as mentioned by zsh man page.
|
89
|
+
if ! command -v compinit > /dev/null; then
|
90
|
+
autoload -U +X compinit && if [[ ${ZSH_DISABLE_COMPFIX-} = true ]]; then
|
91
|
+
compinit -u
|
92
|
+
else
|
93
|
+
compinit
|
94
|
+
fi
|
95
|
+
fi
|
96
|
+
autoload -U +X bashcompinit && bashcompinit
|
97
|
+
fi
|
98
|
+
|
99
|
+
complete -o default -F __nvm nvm
|
@@ -0,0 +1,479 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
{ # this ensures the entire script is downloaded #
|
4
|
+
|
5
|
+
nvm_has() {
|
6
|
+
type "$1" > /dev/null 2>&1
|
7
|
+
}
|
8
|
+
|
9
|
+
nvm_echo() {
|
10
|
+
command printf %s\\n "$*" 2>/dev/null
|
11
|
+
}
|
12
|
+
|
13
|
+
if [ -z "${BASH_VERSION}" ] || [ -n "${ZSH_VERSION}" ]; then
|
14
|
+
# shellcheck disable=SC2016
|
15
|
+
nvm_echo >&2 'Error: the install instructions explicitly say to pipe the install script to `bash`; please follow them'
|
16
|
+
exit 1
|
17
|
+
fi
|
18
|
+
|
19
|
+
nvm_grep() {
|
20
|
+
GREP_OPTIONS='' command grep "$@"
|
21
|
+
}
|
22
|
+
|
23
|
+
nvm_default_install_dir() {
|
24
|
+
[ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm"
|
25
|
+
}
|
26
|
+
|
27
|
+
nvm_install_dir() {
|
28
|
+
if [ -n "$NVM_DIR" ]; then
|
29
|
+
printf %s "${NVM_DIR}"
|
30
|
+
else
|
31
|
+
nvm_default_install_dir
|
32
|
+
fi
|
33
|
+
}
|
34
|
+
|
35
|
+
nvm_latest_version() {
|
36
|
+
nvm_echo "v0.39.5"
|
37
|
+
}
|
38
|
+
|
39
|
+
nvm_profile_is_bash_or_zsh() {
|
40
|
+
local TEST_PROFILE
|
41
|
+
TEST_PROFILE="${1-}"
|
42
|
+
case "${TEST_PROFILE-}" in
|
43
|
+
*"/.bashrc" | *"/.bash_profile" | *"/.zshrc" | *"/.zprofile")
|
44
|
+
return
|
45
|
+
;;
|
46
|
+
*)
|
47
|
+
return 1
|
48
|
+
;;
|
49
|
+
esac
|
50
|
+
}
|
51
|
+
|
52
|
+
#
|
53
|
+
# Outputs the location to NVM depending on:
|
54
|
+
# * The availability of $NVM_SOURCE
|
55
|
+
# * The method used ("script" or "git" in the script, defaults to "git")
|
56
|
+
# NVM_SOURCE always takes precedence unless the method is "script-nvm-exec"
|
57
|
+
#
|
58
|
+
nvm_source() {
|
59
|
+
local NVM_GITHUB_REPO
|
60
|
+
NVM_GITHUB_REPO="${NVM_INSTALL_GITHUB_REPO:-nvm-sh/nvm}"
|
61
|
+
local NVM_VERSION
|
62
|
+
NVM_VERSION="${NVM_INSTALL_VERSION:-$(nvm_latest_version)}"
|
63
|
+
local NVM_METHOD
|
64
|
+
NVM_METHOD="$1"
|
65
|
+
local NVM_SOURCE_URL
|
66
|
+
NVM_SOURCE_URL="$NVM_SOURCE"
|
67
|
+
if [ "_$NVM_METHOD" = "_script-nvm-exec" ]; then
|
68
|
+
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/nvm-exec"
|
69
|
+
elif [ "_$NVM_METHOD" = "_script-nvm-bash-completion" ]; then
|
70
|
+
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/bash_completion"
|
71
|
+
elif [ -z "$NVM_SOURCE_URL" ]; then
|
72
|
+
if [ "_$NVM_METHOD" = "_script" ]; then
|
73
|
+
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/nvm.sh"
|
74
|
+
elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then
|
75
|
+
NVM_SOURCE_URL="https://github.com/${NVM_GITHUB_REPO}.git"
|
76
|
+
else
|
77
|
+
nvm_echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD"
|
78
|
+
return 1
|
79
|
+
fi
|
80
|
+
fi
|
81
|
+
nvm_echo "$NVM_SOURCE_URL"
|
82
|
+
}
|
83
|
+
|
84
|
+
#
|
85
|
+
# Node.js version to install
|
86
|
+
#
|
87
|
+
nvm_node_version() {
|
88
|
+
nvm_echo "$NODE_VERSION"
|
89
|
+
}
|
90
|
+
|
91
|
+
nvm_download() {
|
92
|
+
if nvm_has "curl"; then
|
93
|
+
curl --fail --compressed -q "$@"
|
94
|
+
elif nvm_has "wget"; then
|
95
|
+
# Emulate curl with wget
|
96
|
+
ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \
|
97
|
+
-e 's/--compressed //' \
|
98
|
+
-e 's/--fail //' \
|
99
|
+
-e 's/-L //' \
|
100
|
+
-e 's/-I /--server-response /' \
|
101
|
+
-e 's/-s /-q /' \
|
102
|
+
-e 's/-sS /-nv /' \
|
103
|
+
-e 's/-o /-O /' \
|
104
|
+
-e 's/-C - /-c /')
|
105
|
+
# shellcheck disable=SC2086
|
106
|
+
eval wget $ARGS
|
107
|
+
fi
|
108
|
+
}
|
109
|
+
|
110
|
+
install_nvm_from_git() {
|
111
|
+
local INSTALL_DIR
|
112
|
+
INSTALL_DIR="$(nvm_install_dir)"
|
113
|
+
local NVM_VERSION
|
114
|
+
NVM_VERSION="${NVM_INSTALL_VERSION:-$(nvm_latest_version)}"
|
115
|
+
if [ -n "${NVM_INSTALL_VERSION:-}" ]; then
|
116
|
+
# Check if version is an existing ref
|
117
|
+
if command git ls-remote "$(nvm_source "git")" "$NVM_VERSION" | nvm_grep -q "$NVM_VERSION" ; then
|
118
|
+
:
|
119
|
+
# Check if version is an existing changeset
|
120
|
+
elif ! nvm_download -o /dev/null "$(nvm_source "script-nvm-exec")"; then
|
121
|
+
nvm_echo >&2 "Failed to find '$NVM_VERSION' version."
|
122
|
+
exit 1
|
123
|
+
fi
|
124
|
+
fi
|
125
|
+
|
126
|
+
local fetch_error
|
127
|
+
if [ -d "$INSTALL_DIR/.git" ]; then
|
128
|
+
# Updating repo
|
129
|
+
nvm_echo "=> nvm is already installed in $INSTALL_DIR, trying to update using git"
|
130
|
+
command printf '\r=> '
|
131
|
+
fetch_error="Failed to update nvm with $NVM_VERSION, run 'git fetch' in $INSTALL_DIR yourself."
|
132
|
+
else
|
133
|
+
fetch_error="Failed to fetch origin with $NVM_VERSION. Please report this!"
|
134
|
+
nvm_echo "=> Downloading nvm from git to '$INSTALL_DIR'"
|
135
|
+
command printf '\r=> '
|
136
|
+
mkdir -p "${INSTALL_DIR}"
|
137
|
+
if [ "$(ls -A "${INSTALL_DIR}")" ]; then
|
138
|
+
# Initializing repo
|
139
|
+
command git init "${INSTALL_DIR}" || {
|
140
|
+
nvm_echo >&2 'Failed to initialize nvm repo. Please report this!'
|
141
|
+
exit 2
|
142
|
+
}
|
143
|
+
command git --git-dir="${INSTALL_DIR}/.git" remote add origin "$(nvm_source)" 2> /dev/null \
|
144
|
+
|| command git --git-dir="${INSTALL_DIR}/.git" remote set-url origin "$(nvm_source)" || {
|
145
|
+
nvm_echo >&2 'Failed to add remote "origin" (or set the URL). Please report this!'
|
146
|
+
exit 2
|
147
|
+
}
|
148
|
+
else
|
149
|
+
# Cloning repo
|
150
|
+
command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
|
151
|
+
nvm_echo >&2 'Failed to clone nvm repo. Please report this!'
|
152
|
+
exit 2
|
153
|
+
}
|
154
|
+
fi
|
155
|
+
fi
|
156
|
+
# Try to fetch tag
|
157
|
+
if command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch origin tag "$NVM_VERSION" --depth=1 2>/dev/null; then
|
158
|
+
:
|
159
|
+
# Fetch given version
|
160
|
+
elif ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch origin "$NVM_VERSION" --depth=1; then
|
161
|
+
nvm_echo >&2 "$fetch_error"
|
162
|
+
exit 1
|
163
|
+
fi
|
164
|
+
command git -c advice.detachedHead=false --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" checkout -f --quiet FETCH_HEAD || {
|
165
|
+
nvm_echo >&2 "Failed to checkout the given version $NVM_VERSION. Please report this!"
|
166
|
+
exit 2
|
167
|
+
}
|
168
|
+
if [ -n "$(command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" show-ref refs/heads/master)" ]; then
|
169
|
+
if command git --no-pager --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet 2>/dev/null; then
|
170
|
+
command git --no-pager --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet -D master >/dev/null 2>&1
|
171
|
+
else
|
172
|
+
nvm_echo >&2 "Your version of git is out of date. Please update it!"
|
173
|
+
command git --no-pager --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1
|
174
|
+
fi
|
175
|
+
fi
|
176
|
+
|
177
|
+
nvm_echo "=> Compressing and cleaning up git repository"
|
178
|
+
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" reflog expire --expire=now --all; then
|
179
|
+
nvm_echo >&2 "Your version of git is out of date. Please update it!"
|
180
|
+
fi
|
181
|
+
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --auto --aggressive --prune=now ; then
|
182
|
+
nvm_echo >&2 "Your version of git is out of date. Please update it!"
|
183
|
+
fi
|
184
|
+
return
|
185
|
+
}
|
186
|
+
|
187
|
+
#
|
188
|
+
# Automatically install Node.js
|
189
|
+
#
|
190
|
+
nvm_install_node() {
|
191
|
+
local NODE_VERSION_LOCAL
|
192
|
+
NODE_VERSION_LOCAL="$(nvm_node_version)"
|
193
|
+
|
194
|
+
if [ -z "$NODE_VERSION_LOCAL" ]; then
|
195
|
+
return 0
|
196
|
+
fi
|
197
|
+
|
198
|
+
nvm_echo "=> Installing Node.js version $NODE_VERSION_LOCAL"
|
199
|
+
nvm install "$NODE_VERSION_LOCAL"
|
200
|
+
local CURRENT_NVM_NODE
|
201
|
+
|
202
|
+
CURRENT_NVM_NODE="$(nvm_version current)"
|
203
|
+
if [ "$(nvm_version "$NODE_VERSION_LOCAL")" == "$CURRENT_NVM_NODE" ]; then
|
204
|
+
nvm_echo "=> Node.js version $NODE_VERSION_LOCAL has been successfully installed"
|
205
|
+
else
|
206
|
+
nvm_echo >&2 "Failed to install Node.js $NODE_VERSION_LOCAL"
|
207
|
+
fi
|
208
|
+
}
|
209
|
+
|
210
|
+
install_nvm_as_script() {
|
211
|
+
local INSTALL_DIR
|
212
|
+
INSTALL_DIR="$(nvm_install_dir)"
|
213
|
+
local NVM_SOURCE_LOCAL
|
214
|
+
NVM_SOURCE_LOCAL="$(nvm_source script)"
|
215
|
+
local NVM_EXEC_SOURCE
|
216
|
+
NVM_EXEC_SOURCE="$(nvm_source script-nvm-exec)"
|
217
|
+
local NVM_BASH_COMPLETION_SOURCE
|
218
|
+
NVM_BASH_COMPLETION_SOURCE="$(nvm_source script-nvm-bash-completion)"
|
219
|
+
|
220
|
+
# Downloading to $INSTALL_DIR
|
221
|
+
mkdir -p "$INSTALL_DIR"
|
222
|
+
if [ -f "$INSTALL_DIR/nvm.sh" ]; then
|
223
|
+
nvm_echo "=> nvm is already installed in $INSTALL_DIR, trying to update the script"
|
224
|
+
else
|
225
|
+
nvm_echo "=> Downloading nvm as script to '$INSTALL_DIR'"
|
226
|
+
fi
|
227
|
+
nvm_download -s "$NVM_SOURCE_LOCAL" -o "$INSTALL_DIR/nvm.sh" || {
|
228
|
+
nvm_echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'"
|
229
|
+
return 1
|
230
|
+
} &
|
231
|
+
nvm_download -s "$NVM_EXEC_SOURCE" -o "$INSTALL_DIR/nvm-exec" || {
|
232
|
+
nvm_echo >&2 "Failed to download '$NVM_EXEC_SOURCE'"
|
233
|
+
return 2
|
234
|
+
} &
|
235
|
+
nvm_download -s "$NVM_BASH_COMPLETION_SOURCE" -o "$INSTALL_DIR/bash_completion" || {
|
236
|
+
nvm_echo >&2 "Failed to download '$NVM_BASH_COMPLETION_SOURCE'"
|
237
|
+
return 2
|
238
|
+
} &
|
239
|
+
for job in $(jobs -p | command sort)
|
240
|
+
do
|
241
|
+
wait "$job" || return $?
|
242
|
+
done
|
243
|
+
chmod a+x "$INSTALL_DIR/nvm-exec" || {
|
244
|
+
nvm_echo >&2 "Failed to mark '$INSTALL_DIR/nvm-exec' as executable"
|
245
|
+
return 3
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
nvm_try_profile() {
|
250
|
+
if [ -z "${1-}" ] || [ ! -f "${1}" ]; then
|
251
|
+
return 1
|
252
|
+
fi
|
253
|
+
nvm_echo "${1}"
|
254
|
+
}
|
255
|
+
|
256
|
+
#
|
257
|
+
# Detect profile file if not specified as environment variable
|
258
|
+
# (eg: PROFILE=~/.myprofile)
|
259
|
+
# The echo'ed path is guaranteed to be an existing file
|
260
|
+
# Otherwise, an empty string is returned
|
261
|
+
#
|
262
|
+
nvm_detect_profile() {
|
263
|
+
if [ "${PROFILE-}" = '/dev/null' ]; then
|
264
|
+
# the user has specifically requested NOT to have nvm touch their profile
|
265
|
+
return
|
266
|
+
fi
|
267
|
+
|
268
|
+
if [ -n "${PROFILE}" ] && [ -f "${PROFILE}" ]; then
|
269
|
+
nvm_echo "${PROFILE}"
|
270
|
+
return
|
271
|
+
fi
|
272
|
+
|
273
|
+
local DETECTED_PROFILE
|
274
|
+
DETECTED_PROFILE=''
|
275
|
+
|
276
|
+
if [ "${SHELL#*bash}" != "$SHELL" ]; then
|
277
|
+
if [ -f "$HOME/.bashrc" ]; then
|
278
|
+
DETECTED_PROFILE="$HOME/.bashrc"
|
279
|
+
elif [ -f "$HOME/.bash_profile" ]; then
|
280
|
+
DETECTED_PROFILE="$HOME/.bash_profile"
|
281
|
+
fi
|
282
|
+
elif [ "${SHELL#*zsh}" != "$SHELL" ]; then
|
283
|
+
if [ -f "$HOME/.zshrc" ]; then
|
284
|
+
DETECTED_PROFILE="$HOME/.zshrc"
|
285
|
+
elif [ -f "$HOME/.zprofile" ]; then
|
286
|
+
DETECTED_PROFILE="$HOME/.zprofile"
|
287
|
+
fi
|
288
|
+
fi
|
289
|
+
|
290
|
+
if [ -z "$DETECTED_PROFILE" ]; then
|
291
|
+
for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc"
|
292
|
+
do
|
293
|
+
if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then
|
294
|
+
break
|
295
|
+
fi
|
296
|
+
done
|
297
|
+
fi
|
298
|
+
|
299
|
+
if [ -n "$DETECTED_PROFILE" ]; then
|
300
|
+
nvm_echo "$DETECTED_PROFILE"
|
301
|
+
fi
|
302
|
+
}
|
303
|
+
|
304
|
+
#
|
305
|
+
# Check whether the user has any globally-installed npm modules in their system
|
306
|
+
# Node, and warn them if so.
|
307
|
+
#
|
308
|
+
nvm_check_global_modules() {
|
309
|
+
local NPM_COMMAND
|
310
|
+
NPM_COMMAND="$(command -v npm 2>/dev/null)" || return 0
|
311
|
+
[ -n "${NVM_DIR}" ] && [ -z "${NPM_COMMAND%%"$NVM_DIR"/*}" ] && return 0
|
312
|
+
|
313
|
+
local NPM_VERSION
|
314
|
+
NPM_VERSION="$(npm --version)"
|
315
|
+
NPM_VERSION="${NPM_VERSION:--1}"
|
316
|
+
[ "${NPM_VERSION%%[!-0-9]*}" -gt 0 ] || return 0
|
317
|
+
|
318
|
+
local NPM_GLOBAL_MODULES
|
319
|
+
NPM_GLOBAL_MODULES="$(
|
320
|
+
npm list -g --depth=0 |
|
321
|
+
command sed -e '/ npm@/d' -e '/ (empty)$/d'
|
322
|
+
)"
|
323
|
+
|
324
|
+
local MODULE_COUNT
|
325
|
+
MODULE_COUNT="$(
|
326
|
+
command printf %s\\n "$NPM_GLOBAL_MODULES" |
|
327
|
+
command sed -ne '1!p' | # Remove the first line
|
328
|
+
wc -l | command tr -d ' ' # Count entries
|
329
|
+
)"
|
330
|
+
|
331
|
+
if [ "${MODULE_COUNT}" != '0' ]; then
|
332
|
+
# shellcheck disable=SC2016
|
333
|
+
nvm_echo '=> You currently have modules installed globally with `npm`. These will no'
|
334
|
+
# shellcheck disable=SC2016
|
335
|
+
nvm_echo '=> longer be linked to the active version of Node when you install a new node'
|
336
|
+
# shellcheck disable=SC2016
|
337
|
+
nvm_echo '=> with `nvm`; and they may (depending on how you construct your `$PATH`)'
|
338
|
+
# shellcheck disable=SC2016
|
339
|
+
nvm_echo '=> override the binaries of modules installed with `nvm`:'
|
340
|
+
nvm_echo
|
341
|
+
|
342
|
+
command printf %s\\n "$NPM_GLOBAL_MODULES"
|
343
|
+
nvm_echo '=> If you wish to uninstall them at a later point (or re-install them under your'
|
344
|
+
# shellcheck disable=SC2016
|
345
|
+
nvm_echo '=> `nvm` Nodes), you can remove them from the system Node as follows:'
|
346
|
+
nvm_echo
|
347
|
+
nvm_echo ' $ nvm use system'
|
348
|
+
nvm_echo ' $ npm uninstall -g a_module'
|
349
|
+
nvm_echo
|
350
|
+
fi
|
351
|
+
}
|
352
|
+
|
353
|
+
nvm_do_install() {
|
354
|
+
if [ -n "${NVM_DIR-}" ] && ! [ -d "${NVM_DIR}" ]; then
|
355
|
+
if [ -e "${NVM_DIR}" ]; then
|
356
|
+
nvm_echo >&2 "File \"${NVM_DIR}\" has the same name as installation directory."
|
357
|
+
exit 1
|
358
|
+
fi
|
359
|
+
|
360
|
+
if [ "${NVM_DIR}" = "$(nvm_default_install_dir)" ]; then
|
361
|
+
mkdir "${NVM_DIR}"
|
362
|
+
else
|
363
|
+
nvm_echo >&2 "You have \$NVM_DIR set to \"${NVM_DIR}\", but that directory does not exist. Check your profile files and environment."
|
364
|
+
exit 1
|
365
|
+
fi
|
366
|
+
fi
|
367
|
+
# Disable the optional which check, https://www.shellcheck.net/wiki/SC2230
|
368
|
+
# shellcheck disable=SC2230
|
369
|
+
if nvm_has xcode-select && [ "$(xcode-select -p >/dev/null 2>/dev/null ; echo $?)" = '2' ] && [ "$(which git)" = '/usr/bin/git' ] && [ "$(which curl)" = '/usr/bin/curl' ]; then
|
370
|
+
nvm_echo >&2 'You may be on a Mac, and need to install the Xcode Command Line Developer Tools.'
|
371
|
+
# shellcheck disable=SC2016
|
372
|
+
nvm_echo >&2 'If so, run `xcode-select --install` and try again. If not, please report this!'
|
373
|
+
exit 1
|
374
|
+
fi
|
375
|
+
if [ -z "${METHOD}" ]; then
|
376
|
+
# Autodetect install method
|
377
|
+
if nvm_has git; then
|
378
|
+
install_nvm_from_git
|
379
|
+
elif nvm_has curl || nvm_has wget; then
|
380
|
+
install_nvm_as_script
|
381
|
+
else
|
382
|
+
nvm_echo >&2 'You need git, curl, or wget to install nvm'
|
383
|
+
exit 1
|
384
|
+
fi
|
385
|
+
elif [ "${METHOD}" = 'git' ]; then
|
386
|
+
if ! nvm_has git; then
|
387
|
+
nvm_echo >&2 "You need git to install nvm"
|
388
|
+
exit 1
|
389
|
+
fi
|
390
|
+
install_nvm_from_git
|
391
|
+
elif [ "${METHOD}" = 'script' ]; then
|
392
|
+
if ! nvm_has curl && ! nvm_has wget; then
|
393
|
+
nvm_echo >&2 "You need curl or wget to install nvm"
|
394
|
+
exit 1
|
395
|
+
fi
|
396
|
+
install_nvm_as_script
|
397
|
+
else
|
398
|
+
nvm_echo >&2 "The environment variable \$METHOD is set to \"${METHOD}\", which is not recognized as a valid installation method."
|
399
|
+
exit 1
|
400
|
+
fi
|
401
|
+
|
402
|
+
nvm_echo
|
403
|
+
|
404
|
+
local NVM_PROFILE
|
405
|
+
NVM_PROFILE="$(nvm_detect_profile)"
|
406
|
+
local PROFILE_INSTALL_DIR
|
407
|
+
PROFILE_INSTALL_DIR="$(nvm_install_dir | command sed "s:^$HOME:\$HOME:")"
|
408
|
+
|
409
|
+
SOURCE_STR="\\nexport NVM_DIR=\"${PROFILE_INSTALL_DIR}\"\\n[ -s \"\$NVM_DIR/nvm.sh\" ] && \\. \"\$NVM_DIR/nvm.sh\" # This loads nvm\\n"
|
410
|
+
|
411
|
+
# shellcheck disable=SC2016
|
412
|
+
COMPLETION_STR='[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion\n'
|
413
|
+
BASH_OR_ZSH=false
|
414
|
+
|
415
|
+
if [ -z "${NVM_PROFILE-}" ] ; then
|
416
|
+
local TRIED_PROFILE
|
417
|
+
if [ -n "${PROFILE}" ]; then
|
418
|
+
TRIED_PROFILE="${NVM_PROFILE} (as defined in \$PROFILE), "
|
419
|
+
fi
|
420
|
+
nvm_echo "=> Profile not found. Tried ${TRIED_PROFILE-}~/.bashrc, ~/.bash_profile, ~/.zprofile, ~/.zshrc, and ~/.profile."
|
421
|
+
nvm_echo "=> Create one of them and run this script again"
|
422
|
+
nvm_echo " OR"
|
423
|
+
nvm_echo "=> Append the following lines to the correct file yourself:"
|
424
|
+
command printf "${SOURCE_STR}"
|
425
|
+
nvm_echo
|
426
|
+
else
|
427
|
+
if nvm_profile_is_bash_or_zsh "${NVM_PROFILE-}"; then
|
428
|
+
BASH_OR_ZSH=true
|
429
|
+
fi
|
430
|
+
if ! command grep -qc '/nvm.sh' "$NVM_PROFILE"; then
|
431
|
+
nvm_echo "=> Appending nvm source string to $NVM_PROFILE"
|
432
|
+
command printf "${SOURCE_STR}" >> "$NVM_PROFILE"
|
433
|
+
else
|
434
|
+
nvm_echo "=> nvm source string already in ${NVM_PROFILE}"
|
435
|
+
fi
|
436
|
+
# shellcheck disable=SC2016
|
437
|
+
if ${BASH_OR_ZSH} && ! command grep -qc '$NVM_DIR/bash_completion' "$NVM_PROFILE"; then
|
438
|
+
nvm_echo "=> Appending bash_completion source string to $NVM_PROFILE"
|
439
|
+
command printf "$COMPLETION_STR" >> "$NVM_PROFILE"
|
440
|
+
else
|
441
|
+
nvm_echo "=> bash_completion source string already in ${NVM_PROFILE}"
|
442
|
+
fi
|
443
|
+
fi
|
444
|
+
if ${BASH_OR_ZSH} && [ -z "${NVM_PROFILE-}" ] ; then
|
445
|
+
nvm_echo "=> Please also append the following lines to the if you are using bash/zsh shell:"
|
446
|
+
command printf "${COMPLETION_STR}"
|
447
|
+
fi
|
448
|
+
|
449
|
+
# Source nvm
|
450
|
+
# shellcheck source=/dev/null
|
451
|
+
\. "$(nvm_install_dir)/nvm.sh"
|
452
|
+
|
453
|
+
nvm_check_global_modules
|
454
|
+
|
455
|
+
nvm_install_node
|
456
|
+
|
457
|
+
nvm_reset
|
458
|
+
|
459
|
+
nvm_echo "=> Close and reopen your terminal to start using nvm or run the following to use it now:"
|
460
|
+
command printf "${SOURCE_STR}"
|
461
|
+
if ${BASH_OR_ZSH} ; then
|
462
|
+
command printf "${COMPLETION_STR}"
|
463
|
+
fi
|
464
|
+
}
|
465
|
+
|
466
|
+
#
|
467
|
+
# Unsets the various functions defined
|
468
|
+
# during the execution of the install script
|
469
|
+
#
|
470
|
+
nvm_reset() {
|
471
|
+
unset -f nvm_has nvm_install_dir nvm_latest_version nvm_profile_is_bash_or_zsh \
|
472
|
+
nvm_source nvm_node_version nvm_download install_nvm_from_git nvm_install_node \
|
473
|
+
install_nvm_as_script nvm_try_profile nvm_detect_profile nvm_check_global_modules \
|
474
|
+
nvm_do_install nvm_reset nvm_default_install_dir nvm_grep
|
475
|
+
}
|
476
|
+
|
477
|
+
[ "_$NVM_ENV" = "_testing" ] || nvm_do_install
|
478
|
+
|
479
|
+
} # this ensures the entire script is downloaded #
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
4
|
+
|
5
|
+
unset NVM_CD_FLAGS
|
6
|
+
|
7
|
+
# shellcheck disable=SC1090,SC1091
|
8
|
+
\. "$DIR/nvm.sh" --no-use
|
9
|
+
|
10
|
+
if [ -n "$NODE_VERSION" ]; then
|
11
|
+
nvm use "$NODE_VERSION" > /dev/null || exit 127
|
12
|
+
elif ! nvm use >/dev/null 2>&1; then
|
13
|
+
echo "No NODE_VERSION provided; no .nvmrc file found" >&2
|
14
|
+
exit 127
|
15
|
+
fi
|
16
|
+
|
17
|
+
exec "$@"
|