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,14 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
die () { echo "$@" ; exit 1; }
|
4
|
+
|
5
|
+
\. ../../../nvm.sh
|
6
|
+
|
7
|
+
OUTPUT="$(nvm_version_path foo)"
|
8
|
+
EXPECTED_OUTPUT="$NVM_DIR/foo"
|
9
|
+
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_version_path foo' did not return correct location; expected '$EXPECTED_OUTPUT', got '$OUTPUT'"
|
10
|
+
|
11
|
+
[ "$(nvm_version_path 2>&1)" = "version is required" ] || die '"nvm_version_path" did not error out'
|
12
|
+
[ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'
|
13
|
+
[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'
|
14
|
+
[ "$(nvm_version_path iojs-v0.12.0)" = "$NVM_DIR/versions/io.js/v0.12.0" ] || die 'iojs version has the wrong path'
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
set -ex
|
4
|
+
|
5
|
+
die () { echo "$@" ; exit 1; }
|
6
|
+
|
7
|
+
export NVM_DIR_BASE="/tmp"
|
8
|
+
export NVM_DIR="${NVM_DIR_BASE}/"
|
9
|
+
|
10
|
+
\. ../../nvm.sh
|
11
|
+
|
12
|
+
[ "${NVM_DIR}" = "${NVM_DIR_BASE}" ] || die 'nvm should remove the last trailing slash in "$NVM_DIR"'
|
13
|
+
|
14
|
+
export NVM_DIR="${NVM_DIR_BASE}//"
|
15
|
+
|
16
|
+
\. ../../nvm.sh
|
17
|
+
|
18
|
+
[ "${NVM_DIR}" = "${NVM_DIR_BASE}" ] || die 'nvm should remove all the last trailing slashes in "$NVM_DIR"'
|
@@ -0,0 +1,129 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
SAVE_NVM_DIR="$NVM_DIR"
|
4
|
+
SAVE_NVM_INSTALL_VERSION="$NVM_INSTALL_VERSION"
|
5
|
+
|
6
|
+
cleanup () {
|
7
|
+
NVM_DIR="$SAVE_NVM_DIR"
|
8
|
+
NVM_INSTALL_VERSION="$SAVE_NVM_INSTALL_VERSION"
|
9
|
+
unset SAVE_NVM_DIR SAVE_NVM_INSTALL_VERSION
|
10
|
+
unset -f die cleanup test_step get_head_ref get_head_changeset get_fetch_head_changeset \
|
11
|
+
step_to_previous_changeset test_install_data test_install
|
12
|
+
}
|
13
|
+
|
14
|
+
die () { echo -e "$@" ; cleanup ; exit 1; }
|
15
|
+
|
16
|
+
NVM_ENV=testing \. ../../install.sh
|
17
|
+
|
18
|
+
set -ex
|
19
|
+
|
20
|
+
# nvm_do_install is available
|
21
|
+
type install_nvm_from_git > /dev/null 2>&1 || die 'install_nvm_from_git is not available'
|
22
|
+
|
23
|
+
test_step() {
|
24
|
+
echo -e "\e[33m$*\e[0m"
|
25
|
+
}
|
26
|
+
|
27
|
+
get_head_ref(){
|
28
|
+
git --git-dir "$NVM_DIR"/.git --no-pager log --pretty=format:'%d' -1
|
29
|
+
}
|
30
|
+
|
31
|
+
get_head_changeset() {
|
32
|
+
git --git-dir "$NVM_DIR"/.git rev-parse --verify HEAD
|
33
|
+
}
|
34
|
+
|
35
|
+
get_fetch_head_changeset() {
|
36
|
+
git --git-dir "$NVM_DIR"/.git rev-parse --verify FETCH_HEAD
|
37
|
+
}
|
38
|
+
|
39
|
+
step_to_previous_changeset() {
|
40
|
+
git --git-dir "$NVM_DIR"/.git fetch origin +"$(get_head_changeset)" --depth=2
|
41
|
+
git --git-dir "$NVM_DIR"/.git reset --hard HEAD~1
|
42
|
+
}
|
43
|
+
|
44
|
+
# args:
|
45
|
+
# - 1: current ref
|
46
|
+
# - 2: current changeset
|
47
|
+
# - 3: error message
|
48
|
+
# - 4: ref to check ("" if none)
|
49
|
+
# - 5: changeset to check ("" if none)
|
50
|
+
# - 6: ref to avoid ("" if none)
|
51
|
+
test_install_data() {
|
52
|
+
local current_ref="$1"
|
53
|
+
local current_changeset="$2"
|
54
|
+
local message="$3"
|
55
|
+
local ref="$4"
|
56
|
+
local changeset="$5"
|
57
|
+
local avoid_ref="$6"
|
58
|
+
|
59
|
+
if [ -n "$ref" ]; then
|
60
|
+
echo "$current_ref" | grep -q "$ref" || die "install_nvm_from_git ${message} did not clone with ref ${ref}"
|
61
|
+
fi
|
62
|
+
|
63
|
+
local head_ref="$(git for-each-ref --points-at HEAD --format='%(refname:short)' 'refs/tags/')"
|
64
|
+
if [ -n "${avoid_ref}" ] && [ "${head_ref}" != "${avoid_ref}"]; then
|
65
|
+
echo "${current_ref}" | grep -q "$avoid_ref" && die "install_nvm_from_git ${message} did clone with unwanted ref ${avoid_ref}"
|
66
|
+
fi
|
67
|
+
|
68
|
+
if [ -n "$changeset" ]; then
|
69
|
+
echo "${current_changeset}" | grep -q "${changeset}" || die "install_nvm_from_git ${message} did not clone with changeset ${changeset}"
|
70
|
+
fi
|
71
|
+
}
|
72
|
+
|
73
|
+
# args:
|
74
|
+
# - 1: version to install ("" for latest, tag, ref or changeset)
|
75
|
+
# - 2: error message
|
76
|
+
# - 3: ref to check ("" if none)
|
77
|
+
# - 4: changeset to check ("" if none)
|
78
|
+
# - 5: ref to avoid ("" if none)
|
79
|
+
test_install() {
|
80
|
+
if [ -n "${1-}" ]; then
|
81
|
+
export NVM_INSTALL_VERSION="$1"
|
82
|
+
else
|
83
|
+
unset NVM_INSTALL_VERSION
|
84
|
+
fi
|
85
|
+
local message="$2"
|
86
|
+
local ref="$3"
|
87
|
+
local changeset="$4"
|
88
|
+
local avoid_ref="$5"
|
89
|
+
|
90
|
+
NVM_DIR=$(mktemp -d) || die 'Unable to create temporary directory'
|
91
|
+
NVM_DIR="$NVM_DIR/clone"
|
92
|
+
|
93
|
+
# Ensure it clones the repository for non existing directory
|
94
|
+
test_step "Clones repo $message"
|
95
|
+
install_nvm_from_git
|
96
|
+
test_install_data "$(get_head_ref)" "$(get_head_changeset)" "$message" "$ref" "$changeset" "$avoid_ref"
|
97
|
+
rm -rf "$NVM_DIR"
|
98
|
+
|
99
|
+
# Ensure it initializes the repository for an empty existing repository
|
100
|
+
mkdir -p "$NVM_DIR" || die 'Unable to create directory'
|
101
|
+
test_step "Initialize repo $message"
|
102
|
+
install_nvm_from_git
|
103
|
+
test_install_data "$(get_head_ref)" "$(get_head_changeset)" "$message" "$ref" "$changeset" "$avoid_ref"
|
104
|
+
rm -rf "$NVM_DIR"
|
105
|
+
|
106
|
+
# Ensure it updates the repository for an existing git repository
|
107
|
+
git clone "$(nvm_source "git")" -b "v0.36.0" --depth=2 "$NVM_DIR" || die 'Unable to clone repository'
|
108
|
+
step_to_previous_changeset
|
109
|
+
test_step "Updates repo $message"
|
110
|
+
install_nvm_from_git
|
111
|
+
test_install_data "$(get_head_ref)" "$(get_head_changeset)" "$message" "$ref" "$changeset" "$avoid_ref"
|
112
|
+
rm -rf "$NVM_DIR"
|
113
|
+
}
|
114
|
+
|
115
|
+
# Handle latest version
|
116
|
+
test_install "" "latest version" "$(nvm_latest_version)"
|
117
|
+
|
118
|
+
# Handle given changeset
|
119
|
+
changeset="3abb98124e8d30c9652976c9d34a7380036083b5"
|
120
|
+
test_install "$changeset" "with changeset $changeset" "" "$changeset" "$(nvm_latest_version)"
|
121
|
+
|
122
|
+
# Handle given tag
|
123
|
+
test_install "v0.37.0" "version v0.37.0" "v0.37.0" "4054bd70cedb9998015c2d8cc468c818c7d2f57d" "$(nvm_latest_version)"
|
124
|
+
|
125
|
+
# Handle given ref
|
126
|
+
test_install "refs/pull/2397/head" "with refs/pull/2397/head" "" "9849bf494d50e74aa810451fb1f83208b0092dd6" "$(nvm_latest_version)"
|
127
|
+
test_install "master" "master" "" "" "$(nvm_latest_version)"
|
128
|
+
|
129
|
+
cleanup
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
cleanup () {
|
4
|
+
rm -rf "$npm_config_prefix/lib" >/dev/null 2>&1
|
5
|
+
unset npm_config_prefix
|
6
|
+
|
7
|
+
rm -f npm
|
8
|
+
PATH="$ORIGINAL_PATH"
|
9
|
+
NVM_DIR="$ORIGINAL_NVM_DIR"
|
10
|
+
|
11
|
+
unset -f setup cleanup die
|
12
|
+
unset message ORIGINAL_PATH ORIGINAL_NVM_DIR
|
13
|
+
}
|
14
|
+
die () { echo "$@" ; cleanup ; exit 1; }
|
15
|
+
|
16
|
+
NVM_ENV=testing \. ../../install.sh
|
17
|
+
|
18
|
+
setup () {
|
19
|
+
ORIGINAL_PATH="$PATH"
|
20
|
+
ORIGINAL_NVM_DIR="$NVM_DIR"
|
21
|
+
|
22
|
+
# Pretend we're not using NVM
|
23
|
+
unset NVM_DIR
|
24
|
+
|
25
|
+
npm_config_prefix="$(pwd)"
|
26
|
+
export npm_config_prefix
|
27
|
+
mkdir -p "$npm_config_prefix/lib"
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
setup
|
32
|
+
|
33
|
+
npm install -g nop >/dev/null || die 'nvm_check_global_modules cannot be tested because `npm` cannot install the `nop` package'
|
34
|
+
message=$(nvm_check_global_modules)
|
35
|
+
[ ! -z "$message" ] || die "nvm_check_global_modules should have printed a notice when npm had global modules installed; got:\n${message}"
|
36
|
+
|
37
|
+
if [ -n "${ORIGINAL_NVM_DIR}" ]; then
|
38
|
+
# Admit we're using NVM, just for this one test
|
39
|
+
message=$(NVM_DIR="${ORIGINAL_NVM_DIR}" nvm_check_global_modules)
|
40
|
+
[ -z "$message" ] || die "nvm_check_global_modules should not have printed a notice when npm is managed by nvm; got:\n${message}"
|
41
|
+
fi
|
42
|
+
|
43
|
+
npm uninstall -g nop >/dev/null
|
44
|
+
message=$(nvm_check_global_modules)
|
45
|
+
[ -z "$message" ] || die "nvm_check_global_modules should not have printed a notice when npm had no global modules installed; got:\n${message}"
|
46
|
+
|
47
|
+
# Faking an installation of npm
|
48
|
+
mkdir -p "$npm_config_prefix/lib/node_modules/npm"
|
49
|
+
cat <<'JSON' >"$npm_config_prefix/lib/node_modules/npm/package.json"
|
50
|
+
{ "name": "npm", "version": "0.0.1fake" }
|
51
|
+
JSON
|
52
|
+
|
53
|
+
message=$(nvm_check_global_modules)
|
54
|
+
[ -z "$message" ] || die "nvm_check_global_modules should have not printed a notice when npm had only itself installed as a global module; got:\n${message}"
|
55
|
+
|
56
|
+
# Faking the absence of npm
|
57
|
+
PATH=".:$PATH"
|
58
|
+
touch npm
|
59
|
+
chmod +x npm
|
60
|
+
|
61
|
+
message=$(nvm_check_global_modules)
|
62
|
+
[ -z "$message" ] || die "nvm_check_global_modules should have not printed a notice when npm was unavailable; got:\n${message}"
|
63
|
+
|
64
|
+
|
65
|
+
cleanup
|
@@ -0,0 +1,126 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
setup () {
|
4
|
+
HOME="."
|
5
|
+
NVM_ENV=testing \. ../../install.sh
|
6
|
+
touch ".bashrc"
|
7
|
+
touch ".bash_profile"
|
8
|
+
touch ".zprofile"
|
9
|
+
touch ".zshrc"
|
10
|
+
touch ".profile"
|
11
|
+
touch "test_profile"
|
12
|
+
}
|
13
|
+
|
14
|
+
cleanup () {
|
15
|
+
unset HOME
|
16
|
+
unset NVM_ENV
|
17
|
+
unset NVM_DETECT_PROFILE
|
18
|
+
unset SHELL
|
19
|
+
unset -f setup cleanup die
|
20
|
+
rm -f ".bashrc" ".bash_profile" ".zprofile" ".zshrc" ".profile" "test_profile" > "/dev/null" 2>&1
|
21
|
+
}
|
22
|
+
|
23
|
+
die () { echo "$@" '$NVM_DETECT_PROFILE:' "$NVM_DETECT_PROFILE"; cleanup; exit 1; }
|
24
|
+
|
25
|
+
setup
|
26
|
+
|
27
|
+
#
|
28
|
+
# Confirm profile detection via $SHELL works and that $PROFILE overrides profile detection
|
29
|
+
#
|
30
|
+
|
31
|
+
# setting $PROFILE to /dev/null should return no detected profile
|
32
|
+
NVM_DETECT_PROFILE="$(PROFILE='/dev/null'; nvm_detect_profile)"
|
33
|
+
if [ -n "$NVM_DETECT_PROFILE" ]; then
|
34
|
+
die "nvm_detect_profile still detected a profile even though PROFILE=/dev/null"
|
35
|
+
fi
|
36
|
+
|
37
|
+
# .bashrc should be detected for bash
|
38
|
+
NVM_DETECT_PROFILE="$(SHELL="/bin/bash"; unset PROFILE; nvm_detect_profile)"
|
39
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.bashrc" ]; then
|
40
|
+
die "nvm_detect_profile didn't pick \$HOME/.bashrc for bash"
|
41
|
+
fi
|
42
|
+
|
43
|
+
# $PROFILE should override .bashrc profile detection
|
44
|
+
NVM_DETECT_PROFILE="$(SHELL="/bin/bash"; PROFILE="test_profile"; nvm_detect_profile)"
|
45
|
+
if [ "$NVM_DETECT_PROFILE" != "test_profile" ]; then
|
46
|
+
die "nvm_detect_profile ignored \$PROFILE"
|
47
|
+
fi
|
48
|
+
|
49
|
+
# .zshrc should be detected for zsh
|
50
|
+
NVM_DETECT_PROFILE="$(SHELL="/bin/zsh"; unset PROFILE; nvm_detect_profile)"
|
51
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zshrc" ]; then
|
52
|
+
die "nvm_detect_profile didn't pick \$HOME/.zshrc for zsh"
|
53
|
+
fi
|
54
|
+
|
55
|
+
# $PROFILE should override .zshrc profile detection
|
56
|
+
NVM_DETECT_PROFILE="$(SHELL="/usr/bin/zsh"; PROFILE="test_profile"; nvm_detect_profile)"
|
57
|
+
if [ "$NVM_DETECT_PROFILE" != "test_profile" ]; then
|
58
|
+
die "nvm_detect_profile ignored \$PROFILE"
|
59
|
+
fi
|
60
|
+
|
61
|
+
|
62
|
+
#
|
63
|
+
# Confirm $PROFILE is only returned when it points to a valid file
|
64
|
+
#
|
65
|
+
|
66
|
+
# $PROFILE is a valid file
|
67
|
+
NVM_DETECT_PROFILE="$(PROFILE="test_profile"; unset SHELL; nvm_detect_profile)"
|
68
|
+
if [ "$NVM_DETECT_PROFILE" != "test_profile" ]; then
|
69
|
+
die "nvm_detect_profile didn't pick \$PROFILE when it was a valid file"
|
70
|
+
fi
|
71
|
+
|
72
|
+
# $PROFILE is not a valid file
|
73
|
+
rm "test_profile"
|
74
|
+
NVM_DETECT_PROFILE="$(PROFILE="test_profile"; nvm_detect_profile)"
|
75
|
+
if [ "$NVM_DETECT_PROFILE" = "test_profile" ]; then
|
76
|
+
die "nvm_detect_profile picked \$PROFILE when it was an invalid file"
|
77
|
+
fi
|
78
|
+
|
79
|
+
#
|
80
|
+
# When profile detection fails via both $PROFILE and $SHELL, profile detection should select based on the existence of
|
81
|
+
# one of the following files is the following order: .profile, .bashrc, .bash_profile, .zprofile, .zshrc and
|
82
|
+
# return an empty value if everything fails
|
83
|
+
#
|
84
|
+
|
85
|
+
# It should favor .profile if file exists
|
86
|
+
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
|
87
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.profile" ]; then
|
88
|
+
die "nvm_detect_profile should have selected .profile"
|
89
|
+
fi
|
90
|
+
|
91
|
+
# Otherwise, it should favor .bashrc if file exists
|
92
|
+
rm ".profile"
|
93
|
+
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
|
94
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.bashrc" ]; then
|
95
|
+
die "nvm_detect_profile should have selected .bashrc"
|
96
|
+
fi
|
97
|
+
|
98
|
+
# Otherwise, it should favor .bash_profile if file exists
|
99
|
+
rm ".bashrc"
|
100
|
+
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
|
101
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.bash_profile" ]; then
|
102
|
+
die "nvm_detect_profile should have selected .bash_profile"
|
103
|
+
fi
|
104
|
+
|
105
|
+
# Otherwise, it should favor .zprofile if file exists
|
106
|
+
rm ".bash_profile"
|
107
|
+
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
|
108
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zprofile" ]; then
|
109
|
+
die "nvm_detect_profile should have selected .zprofile"
|
110
|
+
fi
|
111
|
+
|
112
|
+
# Otherwise, it should favor .zshrc if file exists
|
113
|
+
rm ".zprofile"
|
114
|
+
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
|
115
|
+
if [ "$NVM_DETECT_PROFILE" != "$HOME/.zshrc" ]; then
|
116
|
+
die "nvm_detect_profile should have selected .zshrc"
|
117
|
+
fi
|
118
|
+
|
119
|
+
# It should be empty if none is found
|
120
|
+
rm ".zshrc"
|
121
|
+
NVM_DETECT_PROFILE="$(unset SHELL; nvm_detect_profile)"
|
122
|
+
if [ ! -z "$NVM_DETECT_PROFILE" ]; then
|
123
|
+
die "nvm_detect_profile should have returned an empty value"
|
124
|
+
fi
|
125
|
+
|
126
|
+
cleanup
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
die () { echo "$@" ; exit 1; }
|
4
|
+
|
5
|
+
NVM_ENV=testing \. ../../install.sh
|
6
|
+
|
7
|
+
#nvm_do_install is available
|
8
|
+
type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'
|
9
|
+
|
10
|
+
FILE_PATH="$(pwd)/nvm_do_install"
|
11
|
+
echo $FILE_PATH
|
12
|
+
$(NVM_DIR="${FILE_PATH}" nvm_do_install >/dev/null 2>&1)
|
13
|
+
EXIT_CODE=$(echo $?)
|
14
|
+
[ "${EXIT_CODE}" = '1' ] || die "nvm_do_install should fail if NVM_DIR is a file: expected 1, got <${EXIT_CODE}>"
|
15
|
+
|
16
|
+
ACTUAL="$(NVM_DIR="${FILE_PATH}" nvm_do_install 2>&1)"
|
17
|
+
EXPECTED="File \"${FILE_PATH}\" has the same name as installation directory."
|
18
|
+
[ "${ACTUAL}" = "${EXPECTED}" ] || die "got <${ACTUAL}>, expected <${EXPECTED}>"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
cleanup () {
|
4
|
+
unset -f die cleanup
|
5
|
+
}
|
6
|
+
die () { echo "$@" ; cleanup ; exit 1; }
|
7
|
+
|
8
|
+
NVM_ENV=testing \. ../../install.sh
|
9
|
+
|
10
|
+
# nvm_download install.sh
|
11
|
+
nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/HEAD/install.sh" >/dev/null || die "nvm_download unable to download install.sh"
|
12
|
+
|
13
|
+
# nvm_download should fail to download wrong_install.sh
|
14
|
+
if nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/HEAD/wrong_install.sh" &>/dev/null; then
|
15
|
+
die "nvm_download should fail to download no existing file"
|
16
|
+
fi
|
17
|
+
|
18
|
+
cleanup
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
cleanup () {
|
4
|
+
unset -f die cleanup
|
5
|
+
unset install_dir
|
6
|
+
}
|
7
|
+
die () { echo "$@" ; cleanup ; exit 1; }
|
8
|
+
|
9
|
+
NVM_ENV=testing \. ../../install.sh
|
10
|
+
HOME="__home__"
|
11
|
+
|
12
|
+
|
13
|
+
# NVM_DIR is set
|
14
|
+
NVM_DIR="some_dir"
|
15
|
+
install_dir=$(nvm_install_dir)
|
16
|
+
[ "_$install_dir" = "_$NVM_DIR" ] || die "nvm_install_dir should use \$NVM_DIR if it exists. Current output: $install_dir"
|
17
|
+
|
18
|
+
unset NVM_DIR
|
19
|
+
# NVM_DIR is not set
|
20
|
+
install_dir=$(nvm_install_dir)
|
21
|
+
fallback_dir=""
|
22
|
+
[ ! -z "$XDG_CONFIG_HOME" ] && fallback_dir="$XDG_CONFIG_HOME/nvm" || fallback_dir="$HOME/.nvm"
|
23
|
+
[ "_$install_dir" = "_$fallback_dir" ] || die "nvm_install_dir should default to \$XDG_CONFIG_DIR/.nvm. Current output: $install_dir"
|
24
|
+
|
25
|
+
cleanup
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
setup() {
|
4
|
+
# Needed to avoid to checkout the repo to the latest nvm version, losing the commits of the current PR
|
5
|
+
unset NVM_DIR
|
6
|
+
shopt -s expand_aliases
|
7
|
+
alias .=':'
|
8
|
+
NVM_ENV=testing \. ../../install.sh > /dev/null
|
9
|
+
}
|
10
|
+
|
11
|
+
cleanup () {
|
12
|
+
unset -f setup cleanup die
|
13
|
+
unalias .
|
14
|
+
shopt -u expand_aliases
|
15
|
+
}
|
16
|
+
|
17
|
+
die () { echo "$@"; cleanup; exit 1; }
|
18
|
+
|
19
|
+
setup
|
20
|
+
|
21
|
+
nvm_do_install > /dev/null 2>&1
|
22
|
+
command -v nvm || die 'nvm could not be loaded'
|
23
|
+
|
24
|
+
cleanup
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
die () { echo "$@" ; exit 1; }
|
4
|
+
|
5
|
+
# Needed to avoid to checkout the repo to the latest nvm version, losing the commits of the current PR
|
6
|
+
unset NVM_DIR
|
7
|
+
NODE_VERSION=8 \. ../../install.sh
|
8
|
+
|
9
|
+
. "${NVM_DIR}/nvm.sh"
|
10
|
+
|
11
|
+
# nvm installed node 8
|
12
|
+
nvm ls 8 > /dev/null 2>&1 || die "nvm didn't install node 8"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
die () { echo "$@" ; exit 1; }
|
4
|
+
|
5
|
+
NVM_ENV=testing \. ../../install.sh
|
6
|
+
|
7
|
+
#nvm_profile_is_bash_or_zsh is available
|
8
|
+
type nvm_profile_is_bash_or_zsh > /dev/null 2>&1 || die 'nvm_profile_is_bash_or_zsh is not available'
|
9
|
+
nvm_profile_is_bash_or_zsh "/home/nvm/.bashrc" || die '/home/nvm/.bashrc is bash profile'
|
10
|
+
nvm_profile_is_bash_or_zsh "/home/nvm/.bash_profile" || die '/home/nvm/.bash_profile is bash profile'
|
11
|
+
nvm_profile_is_bash_or_zsh "/home/nvm/.zshrc" || die '/home/nvm/.zshrc is zsh profile'
|
12
|
+
nvm_profile_is_bash_or_zsh "/home/nvm/.zprofile" || die '/home/nvm/.zprofile is zsh profile'
|
13
|
+
if nvm_profile_is_bash_or_zsh "/home/nvm/.bash"; then die '/home/nvm/.bash is not bash nor zsh profile'; fi
|
14
|
+
if nvm_profile_is_bash_or_zsh "/home/nvm/.zsh" ; then die '/home/nvm/.zsh is not bash nor zsh profile'; fi
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
cleanup () {
|
4
|
+
unset -f safe_type die cleanup
|
5
|
+
}
|
6
|
+
die () { echo "$@" ; cleanup ; exit 1; }
|
7
|
+
|
8
|
+
safe_type() {
|
9
|
+
type "$1"
|
10
|
+
}
|
11
|
+
|
12
|
+
# precondition: the names should be unset
|
13
|
+
! safe_type nvm_do_install || die 'nvm_do_install is still available'
|
14
|
+
! safe_type nvm_has || die 'nvm_has is still available'
|
15
|
+
! safe_type nvm_download || die 'nvm_download is still available'
|
16
|
+
! safe_type install_nvm_as_script || die 'install_nvm_as_script is still available'
|
17
|
+
! safe_type install_nvm_from_git || die 'install_nvm_from_git is still available'
|
18
|
+
! safe_type nvm_reset || die 'nvm_reset is still available'
|
19
|
+
! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'
|
20
|
+
|
21
|
+
NVM_ENV=testing \. ../../install.sh
|
22
|
+
|
23
|
+
# Check nvm_reset exists
|
24
|
+
safe_type nvm_reset || die 'nvm_reset is not available'
|
25
|
+
|
26
|
+
# Apply nvm_reset
|
27
|
+
nvm_reset || die 'nvm_reset failed'
|
28
|
+
|
29
|
+
# The names should be unset
|
30
|
+
! safe_type nvm_do_install || die 'nvm_do_install is still available'
|
31
|
+
! safe_type nvm_has || die 'nvm_has is still available'
|
32
|
+
! safe_type nvm_download || die 'nvm_download is still available'
|
33
|
+
! safe_type install_nvm_as_script || die 'install_nvm_as_script is still available'
|
34
|
+
! safe_type install_nvm_from_git || die 'install_nvm_from_git is still available'
|
35
|
+
! safe_type nvm_reset || die 'nvm_reset is still available'
|
36
|
+
! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'
|
37
|
+
|
38
|
+
cleanup
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
cleanup () {
|
4
|
+
unset -f die cleanup
|
5
|
+
unset NVM_SOURCE out
|
6
|
+
}
|
7
|
+
die () { echo "$@" ; cleanup ; exit 1; }
|
8
|
+
|
9
|
+
NVM_ENV=testing \. ../../install.sh
|
10
|
+
|
11
|
+
# nvm_source with no parameter returns the git endpoint
|
12
|
+
[ "$(nvm_source)" = "https://github.com/nvm-sh/nvm.git" ] || die "nvm_source without arguments should return the location of the git repo"
|
13
|
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" nvm_source | grep "https://github.com/other-user/other-nvm.git$" > /dev/null || die "NVM_INSTALL_GITHUB_REPO=... nvm_source without arguments should return the location of the given git repo"
|
14
|
+
|
15
|
+
# nvm_source with git parameter returns the location of the nvm repo
|
16
|
+
[ "$(nvm_source "git")" = "https://github.com/nvm-sh/nvm.git" ] || die "nvm_source \"git\" should return the location of the git repo"
|
17
|
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" nvm_source "git" | grep "https://github.com/other-user/other-nvm.git$" > /dev/null || die "NVM_INSTALL_GITHUB_REPO=... nvm_source \"git\" should return the location of the given git repo"
|
18
|
+
|
19
|
+
# nvm_source with script parameter returns the location of nvm.sh
|
20
|
+
[ "$(nvm_source "script")" = "https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm.sh" ] || die "nvm_source \"script\" should return the location of nvm.sh"
|
21
|
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" NVM_INSTALL_VERSION="v0.37.0" nvm_source "script" | grep "https://raw.githubusercontent.com/other-user/other-nvm/v0.37.0/nvm.sh$" > /dev/null || die "NVM_INSTALL_GITHUB_REPO=... NVM_INSTALL_VERSION=... nvm_source \"script\" should return the location of nvm.sh"
|
22
|
+
|
23
|
+
# nvm_source with script-nvm-exec parameter returns the location of nvm-exec
|
24
|
+
[ "$(nvm_source "script-nvm-exec")" = "https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm-exec" ] || die "nvm_source \"script-nvm-exec\" should return the location of nvm.sh"
|
25
|
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" NVM_INSTALL_VERSION="v0.37.0" nvm_source "script-nvm-exec" | grep "https://raw.githubusercontent.com/other-user/other-nvm/v0.37.0/nvm-exec$" > /dev/null || die "NVM_INSTALL_GITHUB_REPO=... NVM_INSTALL_VERSION=... nvm_source \"script-nvm-exec\" should return the location of nvm.sh"
|
26
|
+
|
27
|
+
# nvm_source with any other parameter errors out and exits
|
28
|
+
nvm_source "anything" 2> /dev/null && die "nvm_source with invalid parameter should exit"
|
29
|
+
out=$(nvm_source "anything" 2>&1 >/dev/null) || : #Saving the process here
|
30
|
+
[ -z "$out" ] && die "nvm_source with invalid parameter should error out"
|
31
|
+
|
32
|
+
#nvm_source should always return NVM_SOURCE no matter the parameters
|
33
|
+
NVM_SOURCE="my_location"
|
34
|
+
out=$(nvm_source)
|
35
|
+
[ "_$out" = "_my_location" ] || die "nvm_source without arguments should have returned \$NVM_SOURCE. Got \"$out\""
|
36
|
+
out=$(nvm_source "git")
|
37
|
+
[ "_$out" = "_my_location" ] || die "nvm_source git should have returned \$NVM_SOURCE. Got \"$out\""
|
38
|
+
out=$(nvm_source "script")
|
39
|
+
[ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""
|
40
|
+
out=$(nvm_source "anything")
|
41
|
+
[ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""
|
42
|
+
|
43
|
+
cleanup
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
die () { echo "$@" ; exit 1; }
|
4
|
+
|
5
|
+
\. ../../nvm.sh
|
6
|
+
|
7
|
+
[ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"
|
8
|
+
|
9
|
+
# Remove the stuff we're clobbering.
|
10
|
+
[ -e "${NVM_DIR}/versions/io.js/v1.0.0" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.0"
|
11
|
+
[ -e "${NVM_DIR}/versions/io.js/v1.0.1" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.1"
|
12
|
+
|
13
|
+
# Install from binary
|
14
|
+
nvm install iojs-v1.0.0
|
15
|
+
nvm install iojs-v1.0.1
|
16
|
+
|
17
|
+
nvm use iojs-v1.0.0
|
18
|
+
|
19
|
+
node --version | grep v1.0.0 || die "precondition failed: iojs node doesn't start at v1.0.0"
|
20
|
+
iojs --version | grep v1.0.0 || die "precondition failed: iojs binary doesn't start at v1.0.0"
|
21
|
+
|
22
|
+
nvm install iojs-v1.0.1
|
23
|
+
|
24
|
+
node --version | grep v1.0.1 || die "nvm install on already installed version doesn't use it (node binary)"
|
25
|
+
iojs --version | grep v1.0.1 || die "nvm install on already installed version doesn't use it (iojs binary)"
|