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.

Files changed (425) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -0
  2. package/.cache/replit/nix/env.json +1 -0
  3. package/.config/configstore/update-notifier-npm.json +4 -0
  4. package/.config/configstore/update-notifier-npm.json.1735545094 +4 -0
  5. package/.config/nvm/.dockerignore +16 -0
  6. package/.config/nvm/.editorconfig +28 -0
  7. package/.config/nvm/.gitattributes +1 -0
  8. package/.config/nvm/.github/FUNDING.yml +12 -0
  9. package/.config/nvm/.github/ISSUE_TEMPLATE.md +44 -0
  10. package/.config/nvm/.github/SECURITY.md +3 -0
  11. package/.config/nvm/.github/workflows/latest-npm.yml +81 -0
  12. package/.config/nvm/.github/workflows/lint.yml +77 -0
  13. package/.config/nvm/.github/workflows/rebase.yml +23 -0
  14. package/.config/nvm/.github/workflows/release.yml +32 -0
  15. package/.config/nvm/.github/workflows/require-allow-edits.yml +21 -0
  16. package/.config/nvm/.github/workflows/shellcheck.yml +58 -0
  17. package/.config/nvm/.github/workflows/tests.yml +56 -0
  18. package/.config/nvm/.github/workflows/toc.yml +37 -0
  19. package/.config/nvm/.github/workflows/windows-npm.yml +134 -0
  20. package/.config/nvm/.mailmap +1 -0
  21. package/.config/nvm/.travis.yml +100 -0
  22. package/.config/nvm/CODE_OF_CONDUCT.md +125 -0
  23. package/.config/nvm/CONTRIBUTING.md +115 -0
  24. package/.config/nvm/Dockerfile +111 -0
  25. package/.config/nvm/GOVERNANCE.md +10 -0
  26. package/.config/nvm/LICENSE.md +22 -0
  27. package/.config/nvm/Makefile +85 -0
  28. package/.config/nvm/PROJECT_CHARTER.md +49 -0
  29. package/.config/nvm/README.md +1047 -0
  30. package/.config/nvm/ROADMAP.md +9 -0
  31. package/.config/nvm/bash_completion +99 -0
  32. package/.config/nvm/install.sh +479 -0
  33. package/.config/nvm/nvm-exec +17 -0
  34. package/.config/nvm/nvm.sh +4417 -0
  35. package/.config/nvm/package.json +51 -0
  36. package/.config/nvm/rename_test.sh +52 -0
  37. package/.config/nvm/test/common.sh +103 -0
  38. package/.config/nvm/test/fast/Aliases/'nvm alias' should not accept aliases with slashes +26 -0
  39. package/.config/nvm/test/fast/Aliases/'nvm unalias' should accept aliases when they shadow a built-in alias +17 -0
  40. package/.config/nvm/test/fast/Aliases/'nvm unalias' should not accept aliases with names equal to built-in alias +25 -0
  41. package/.config/nvm/test/fast/Aliases/'nvm unalias' should not accept aliases with slashes +26 -0
  42. package/.config/nvm/test/fast/Aliases/Running 'nvm alias /313/202aliasname/313/203 /313/202target/313/203' again should change the target" +24 -0
  43. package/.config/nvm/test/fast/Aliases/Running 'nvm alias /313/202aliasname/313/203' should list but one alias" +4 -0
  44. package/.config/nvm/test/fast/Aliases/Running 'nvm alias' lists implicit aliases when they do not exist +26 -0
  45. package/.config/nvm/test/fast/Aliases/Running 'nvm alias' lists manual aliases instead of implicit aliases when present +49 -0
  46. package/.config/nvm/test/fast/Aliases/Running 'nvm alias' should list all aliases +48 -0
  47. package/.config/nvm/test/fast/Aliases/circular/nvm_resolve_alias +36 -0
  48. package/.config/nvm/test/fast/Aliases/circular/nvm_resolve_local_alias +36 -0
  49. package/.config/nvm/test/fast/Aliases/circular/setup +9 -0
  50. package/.config/nvm/test/fast/Aliases/circular/teardown +9 -0
  51. package/.config/nvm/test/fast/Aliases/lts/'nvm alias' should ensure LTS alias dir exists +18 -0
  52. package/.config/nvm/test/fast/Aliases/lts/setup_dir +10 -0
  53. package/.config/nvm/test/fast/Aliases/lts/teardown_dir +10 -0
  54. package/.config/nvm/test/fast/Aliases/nvm_ensure_default_set +20 -0
  55. package/.config/nvm/test/fast/Aliases/nvm_list_aliases calls nvm_get_colors +22 -0
  56. package/.config/nvm/test/fast/Aliases/nvm_list_aliases works with LTS aliases +31 -0
  57. package/.config/nvm/test/fast/Aliases/nvm_list_aliases works with no LTS aliases present +21 -0
  58. package/.config/nvm/test/fast/Aliases/nvm_print_alias_path calls nvm_get_colors +28 -0
  59. package/.config/nvm/test/fast/Aliases/nvm_print_formatted_alias calls nvm_get_colors +21 -0
  60. package/.config/nvm/test/fast/Aliases/nvm_resolve_alias +33 -0
  61. package/.config/nvm/test/fast/Aliases/nvm_resolve_local_alias +35 -0
  62. package/.config/nvm/test/fast/Aliases/setup +16 -0
  63. package/.config/nvm/test/fast/Aliases/teardown +17 -0
  64. package/.config/nvm/test/fast/Listing paths/Running 'nvm which 0.0.2' should display only version 0.0.2 +27 -0
  65. package/.config/nvm/test/fast/Listing paths/Running 'nvm which foo' should return a nonzero exit code when not found +6 -0
  66. package/.config/nvm/test/fast/Listing paths/teardown +3 -0
  67. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls --no-alias' does not call into nvm_alias +34 -0
  68. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls --no-alias' with a pattern errors +15 -0
  69. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls 0.0.2' should display only version 0.0.2 +21 -0
  70. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls 0.2' should display only 0.2.x versions +42 -0
  71. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls foo' should return a nonzero exit code when not found +6 -0
  72. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls io' should return NA +6 -0
  73. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls node_' should return a nonzero exit code when not found +6 -0
  74. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls stable' and 'nvm ls unstable' should return the appropriate implicit alias +29 -0
  75. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls system' should include 'system' when appropriate +21 -0
  76. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' calls into nvm_alias +35 -0
  77. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should display all installed versions +44 -0
  78. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should filter out '.nvm' +10 -0
  79. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should filter out 'versions' +10 -0
  80. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should include 'system' when appropriate +21 -0
  81. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should list versions in the 'versions' directory +12 -0
  82. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' should not show a trailing slash +42 -0
  83. 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
  84. package/.config/nvm/test/fast/Listing versions/Running 'nvm ls' with nounset should not fail +23 -0
  85. package/.config/nvm/test/fast/Listing versions/Using a nonstandard IFS should not break +19 -0
  86. package/.config/nvm/test/fast/Listing versions/teardown +16 -0
  87. package/.config/nvm/test/fast/Running 'nvm alias' should create a file in the alias directory +11 -0
  88. package/.config/nvm/test/fast/Running 'nvm current' should display current nvm environment +13 -0
  89. package/.config/nvm/test/fast/Running 'nvm deactivate' should unset the nvm environment variables +25 -0
  90. package/.config/nvm/test/fast/Running 'nvm install' with '--reinstall-packages-from' requires a valid version +59 -0
  91. package/.config/nvm/test/fast/Running 'nvm install' with an invalid version fails nicely +15 -0
  92. package/.config/nvm/test/fast/Running 'nvm unalias' should remove the alias file +13 -0
  93. package/.config/nvm/test/fast/Running 'nvm uninstall' should remove the appropriate directory +12 -0
  94. package/.config/nvm/test/fast/Running 'nvm uninstall' with incorrect file permissions fails nicely +14 -0
  95. package/.config/nvm/test/fast/Running 'nvm unload' should unset all function and variables +30 -0
  96. package/.config/nvm/test/fast/Running 'nvm use foo' where 'foo' is circular aborts +39 -0
  97. package/.config/nvm/test/fast/Running 'nvm use iojs' uses latest io.js version +37 -0
  98. package/.config/nvm/test/fast/Running 'nvm use system' should work as expected +44 -0
  99. package/.config/nvm/test/fast/Running 'nvm use x' should create and change the 'current' symlink +36 -0
  100. package/.config/nvm/test/fast/Running 'nvm use x' should not create the 'current' symlink if $NVM_SYMLINK_CURRENT is false +86 -0
  101. package/.config/nvm/test/fast/Running 'nvm use' should drop CR char automatically +33 -0
  102. package/.config/nvm/test/fast/Set Colors/nvm_echo_with_colors +21 -0
  103. package/.config/nvm/test/fast/Set Colors/nvm_err_with_colors +19 -0
  104. package/.config/nvm/test/fast/Set Colors/nvm_print_default_alias calls nvm_get_colors +24 -0
  105. package/.config/nvm/test/fast/Set Colors/nvm_print_versions calls nvm_get_colors +52 -0
  106. package/.config/nvm/test/fast/Sourcing nvm.sh should make the nvm command available +7 -0
  107. package/.config/nvm/test/fast/Sourcing nvm.sh should not modify parameters of caller +7 -0
  108. package/.config/nvm/test/fast/Unit tests/mocks/LTS_names.txt +8 -0
  109. package/.config/nvm/test/fast/Unit tests/mocks/iojs.org-dist-index.tab +42 -0
  110. package/.config/nvm/test/fast/Unit tests/mocks/lts-star.txt +1 -0
  111. package/.config/nvm/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab +671 -0
  112. package/.config/nvm/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab +2915 -0
  113. package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote iojs.txt +41 -0
  114. package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote lts.txt +194 -0
  115. package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote node.txt +670 -0
  116. package/.config/nvm/test/fast/Unit tests/mocks/nvm ls-remote.txt +711 -0
  117. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS argon.txt +36 -0
  118. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS nightly argon.txt +1 -0
  119. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS nightly.txt +26 -0
  120. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt +194 -0
  121. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt +150 -0
  122. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt +1 -0
  123. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt +1 -0
  124. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote.txt +670 -0
  125. package/.config/nvm/test/fast/Unit tests/mocks/nvm_ls_remote_iojs.txt +41 -0
  126. package/.config/nvm/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt +9 -0
  127. package/.config/nvm/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt +1 -0
  128. package/.config/nvm/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt +1 -0
  129. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-both/a/b/c/d/.gitkeep +0 -0
  130. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-both/package.json +0 -0
  131. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-n_m/a/b/c/d/.gitkeep +0 -0
  132. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-pkg/a/b/c/d/.gitkeep +0 -0
  133. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/nested-pkg/package.json +0 -0
  134. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/no-nesting-both/package.json +0 -0
  135. package/.config/nvm/test/fast/Unit tests/mocks/project_dirs/no-nesting-pkg/package.json +0 -0
  136. package/.config/nvm/test/fast/Unit tests/nvm ls-remote +73 -0
  137. package/.config/nvm/test/fast/Unit tests/nvm set_colors +52 -0
  138. package/.config/nvm/test/fast/Unit tests/nvm version-remote +51 -0
  139. package/.config/nvm/test/fast/Unit tests/nvm_add_iojs_prefix +9 -0
  140. package/.config/nvm/test/fast/Unit tests/nvm_alias +32 -0
  141. package/.config/nvm/test/fast/Unit tests/nvm_alias LTS-N +36 -0
  142. package/.config/nvm/test/fast/Unit tests/nvm_alias_path +7 -0
  143. package/.config/nvm/test/fast/Unit tests/nvm_change_path +57 -0
  144. package/.config/nvm/test/fast/Unit tests/nvm_check_for_help +9 -0
  145. package/.config/nvm/test/fast/Unit tests/nvm_clang_version +62 -0
  146. package/.config/nvm/test/fast/Unit tests/nvm_command_info +58 -0
  147. package/.config/nvm/test/fast/Unit tests/nvm_compare_checksum +72 -0
  148. package/.config/nvm/test/fast/Unit tests/nvm_compute_checksum +23 -0
  149. package/.config/nvm/test/fast/Unit tests/nvm_curl_libz_support +39 -0
  150. package/.config/nvm/test/fast/Unit tests/nvm_curl_use_compression +38 -0
  151. package/.config/nvm/test/fast/Unit tests/nvm_curl_version +32 -0
  152. package/.config/nvm/test/fast/Unit tests/nvm_die_on_prefix +192 -0
  153. package/.config/nvm/test/fast/Unit tests/nvm_download +18 -0
  154. package/.config/nvm/test/fast/Unit tests/nvm_download_artifact +55 -0
  155. package/.config/nvm/test/fast/Unit tests/nvm_ensure_default_set +15 -0
  156. package/.config/nvm/test/fast/Unit tests/nvm_ensure_version_installed +72 -0
  157. package/.config/nvm/test/fast/Unit tests/nvm_ensure_version_prefix +12 -0
  158. package/.config/nvm/test/fast/Unit tests/nvm_extract_tarball +12 -0
  159. package/.config/nvm/test/fast/Unit tests/nvm_find_project_dir +36 -0
  160. package/.config/nvm/test/fast/Unit tests/nvm_find_up +26 -0
  161. package/.config/nvm/test/fast/Unit tests/nvm_format_version +20 -0
  162. package/.config/nvm/test/fast/Unit tests/nvm_get_arch +85 -0
  163. package/.config/nvm/test/fast/Unit tests/nvm_get_artifact_compression +22 -0
  164. package/.config/nvm/test/fast/Unit tests/nvm_get_checksum +45 -0
  165. package/.config/nvm/test/fast/Unit tests/nvm_get_checksum_alg +20 -0
  166. package/.config/nvm/test/fast/Unit tests/nvm_get_checksum_binary +20 -0
  167. package/.config/nvm/test/fast/Unit tests/nvm_get_colors +79 -0
  168. package/.config/nvm/test/fast/Unit tests/nvm_get_default_packages +92 -0
  169. package/.config/nvm/test/fast/Unit tests/nvm_get_download_slug +111 -0
  170. package/.config/nvm/test/fast/Unit tests/nvm_get_latest missing curl or wget +20 -0
  171. package/.config/nvm/test/fast/Unit tests/nvm_get_minor_version +45 -0
  172. package/.config/nvm/test/fast/Unit tests/nvm_get_mirror +32 -0
  173. package/.config/nvm/test/fast/Unit tests/nvm_has +11 -0
  174. package/.config/nvm/test/fast/Unit tests/nvm_has_non_aliased +24 -0
  175. package/.config/nvm/test/fast/Unit tests/nvm_has_solaris_binary +32 -0
  176. package/.config/nvm/test/fast/Unit tests/nvm_has_system_iojs +27 -0
  177. package/.config/nvm/test/fast/Unit tests/nvm_has_system_node +27 -0
  178. package/.config/nvm/test/fast/Unit tests/nvm_install_binary_extract +59 -0
  179. package/.config/nvm/test/fast/Unit tests/nvm_install_binary_nosource +30 -0
  180. package/.config/nvm/test/fast/Unit tests/nvm_install_latest_npm +58 -0
  181. package/.config/nvm/test/fast/Unit tests/nvm_install_no_progress_bar +43 -0
  182. package/.config/nvm/test/fast/Unit tests/nvm_iojs_prefix +7 -0
  183. package/.config/nvm/test/fast/Unit tests/nvm_iojs_version_has_solaris_binary +17 -0
  184. package/.config/nvm/test/fast/Unit tests/nvm_is_alias +20 -0
  185. package/.config/nvm/test/fast/Unit tests/nvm_is_iojs_version +10 -0
  186. package/.config/nvm/test/fast/Unit tests/nvm_is_merged_node_version +10 -0
  187. package/.config/nvm/test/fast/Unit tests/nvm_is_natural_num +17 -0
  188. package/.config/nvm/test/fast/Unit tests/nvm_is_valid_version +13 -0
  189. package/.config/nvm/test/fast/Unit tests/nvm_is_version_installed +54 -0
  190. package/.config/nvm/test/fast/Unit tests/nvm_ls_current +39 -0
  191. package/.config/nvm/test/fast/Unit tests/nvm_ls_remote +86 -0
  192. package/.config/nvm/test/fast/Unit tests/nvm_ls_remote LTS aliases +49 -0
  193. package/.config/nvm/test/fast/Unit tests/nvm_ls_remote nightly +65 -0
  194. package/.config/nvm/test/fast/Unit tests/nvm_ls_remote_iojs +37 -0
  195. package/.config/nvm/test/fast/Unit tests/nvm_make_alias +19 -0
  196. package/.config/nvm/test/fast/Unit tests/nvm_node_prefix +7 -0
  197. package/.config/nvm/test/fast/Unit tests/nvm_node_version_has_solaris_binary +33 -0
  198. package/.config/nvm/test/fast/Unit tests/nvm_normalize_lts +38 -0
  199. package/.config/nvm/test/fast/Unit tests/nvm_num_version_groups +24 -0
  200. package/.config/nvm/test/fast/Unit tests/nvm_print_alias_path +44 -0
  201. package/.config/nvm/test/fast/Unit tests/nvm_print_color_code +20 -0
  202. package/.config/nvm/test/fast/Unit tests/nvm_print_default_alias +38 -0
  203. package/.config/nvm/test/fast/Unit tests/nvm_print_implicit_alias errors +25 -0
  204. package/.config/nvm/test/fast/Unit tests/nvm_print_implicit_alias success +106 -0
  205. package/.config/nvm/test/fast/Unit tests/nvm_print_npm_version +28 -0
  206. package/.config/nvm/test/fast/Unit tests/nvm_remote_version +78 -0
  207. package/.config/nvm/test/fast/Unit tests/nvm_remote_versions +77 -0
  208. package/.config/nvm/test/fast/Unit tests/nvm_stdout_is_terminal +32 -0
  209. package/.config/nvm/test/fast/Unit tests/nvm_strip_iojs_prefix +10 -0
  210. package/.config/nvm/test/fast/Unit tests/nvm_strip_path +24 -0
  211. package/.config/nvm/test/fast/Unit tests/nvm_supports_xz +42 -0
  212. package/.config/nvm/test/fast/Unit tests/nvm_tree_contains_path +31 -0
  213. package/.config/nvm/test/fast/Unit tests/nvm_use_if_needed +24 -0
  214. package/.config/nvm/test/fast/Unit tests/nvm_validate_implicit_alias +20 -0
  215. package/.config/nvm/test/fast/Unit tests/nvm_version +48 -0
  216. package/.config/nvm/test/fast/Unit tests/nvm_version_dir +11 -0
  217. package/.config/nvm/test/fast/Unit tests/nvm_version_greater +15 -0
  218. package/.config/nvm/test/fast/Unit tests/nvm_version_path +14 -0
  219. package/.config/nvm/test/fast/Unit tests/nvm_wrap_with_color_code +1 -0
  220. package/.config/nvm/test/fast/nvm should remove the last trailing slash in $NVM_DIR +18 -0
  221. package/.config/nvm/test/fast/setup +14 -0
  222. package/.config/nvm/test/fast/setup_dir +18 -0
  223. package/.config/nvm/test/fast/teardown +12 -0
  224. package/.config/nvm/test/fast/teardown_dir +15 -0
  225. package/.config/nvm/test/install_script/install_nvm_from_git +129 -0
  226. package/.config/nvm/test/install_script/nvm_check_global_modules +65 -0
  227. package/.config/nvm/test/install_script/nvm_detect_profile +126 -0
  228. package/.config/nvm/test/install_script/nvm_do_install +18 -0
  229. package/.config/nvm/test/install_script/nvm_download +18 -0
  230. package/.config/nvm/test/install_script/nvm_install_dir +25 -0
  231. package/.config/nvm/test/install_script/nvm_install_with_aliased_dot +24 -0
  232. package/.config/nvm/test/install_script/nvm_install_with_node_version +12 -0
  233. package/.config/nvm/test/install_script/nvm_profile_is_bash_or_zsh +14 -0
  234. package/.config/nvm/test/install_script/nvm_reset +38 -0
  235. package/.config/nvm/test/install_script/nvm_source +43 -0
  236. package/.config/nvm/test/installation_iojs/install already installed uses it +25 -0
  237. package/.config/nvm/test/installation_iojs/install from binary +22 -0
  238. package/.config/nvm/test/installation_iojs/install from source +22 -0
  239. package/.config/nvm/test/installation_iojs/install two versions and use the latest one +25 -0
  240. package/.config/nvm/test/installation_iojs/install version specified in .nvmrc from binary +22 -0
  241. package/.config/nvm/test/installation_iojs/install version specified in .nvmrc from source +23 -0
  242. package/.config/nvm/test/installation_iojs/install while reinstalling packages +31 -0
  243. package/.config/nvm/test/installation_iojs/nvm install v1 works +19 -0
  244. package/.config/nvm/test/installation_iojs/setup_dir +5 -0
  245. package/.config/nvm/test/installation_iojs/teardown_dir +16 -0
  246. package/.config/nvm/test/installation_node/default-packages +123 -0
  247. package/.config/nvm/test/installation_node/install LTS +29 -0
  248. package/.config/nvm/test/installation_node/install already installed uses it +23 -0
  249. package/.config/nvm/test/installation_node/install from binary +23 -0
  250. package/.config/nvm/test/installation_node/install from binary with binary flag set +37 -0
  251. package/.config/nvm/test/installation_node/install from source +29 -0
  252. package/.config/nvm/test/installation_node/install from source with thread parameter +33 -0
  253. package/.config/nvm/test/installation_node/install from source without V8 snapshot for ARM +25 -0
  254. package/.config/nvm/test/installation_node/install hook +45 -0
  255. package/.config/nvm/test/installation_node/install latest npm +51 -0
  256. package/.config/nvm/test/installation_node/install on bash with ERR trap and set -E +50 -0
  257. package/.config/nvm/test/installation_node/install two versions and use the latest one +24 -0
  258. package/.config/nvm/test/installation_node/install version specified in .nvmrc from binary +20 -0
  259. package/.config/nvm/test/installation_node/install while reinstalling packages +46 -0
  260. package/.config/nvm/test/installation_node/install with --alias +11 -0
  261. package/.config/nvm/test/installation_node/install with --default +11 -0
  262. package/.config/nvm/test/installation_node/install with --latest-npm +12 -0
  263. package/.config/nvm/test/installation_node/setup_dir +5 -0
  264. package/.config/nvm/test/installation_node/teardown_dir +18 -0
  265. package/.config/nvm/test/mocks/isainfo_amd64 +5 -0
  266. package/.config/nvm/test/mocks/isainfo_x86 +5 -0
  267. package/.config/nvm/test/mocks/pkg_info_amd64 +4 -0
  268. package/.config/nvm/test/mocks/pkg_info_fail +1 -0
  269. package/.config/nvm/test/mocks/pkg_info_x86 +1 -0
  270. package/.config/nvm/test/mocks/uname_linux_armv8l +5 -0
  271. package/.config/nvm/test/mocks/uname_osx_amd64 +5 -0
  272. package/.config/nvm/test/mocks/uname_osx_x86 +5 -0
  273. package/.config/nvm/test/mocks/uname_smartos_amd64 +5 -0
  274. package/.config/nvm/test/mocks/uname_smartos_x86 +5 -0
  275. package/.config/nvm/test/slow/Running 'nvm current' should display current nvm environment +9 -0
  276. package/.config/nvm/test/slow/nvm exec/Preamble works and respects 'silent' flag +30 -0
  277. package/.config/nvm/test/slow/nvm exec/Running 'nvm exec --lts' should work +18 -0
  278. package/.config/nvm/test/slow/nvm exec/Running 'nvm exec 0.x' should work +15 -0
  279. package/.config/nvm/test/slow/nvm exec/Running 'nvm exec' should pick up .nvmrc version +16 -0
  280. package/.config/nvm/test/slow/nvm exec/Running 'nvm exec' with help should not parse +9 -0
  281. package/.config/nvm/test/slow/nvm exec/setup_dir +10 -0
  282. package/.config/nvm/test/slow/nvm exec/teardown_dir +13 -0
  283. package/.config/nvm/test/slow/nvm reinstall-packages/Running 'nvm copy-packages $(nvm ls current)' should error out +17 -0
  284. package/.config/nvm/test/slow/nvm reinstall-packages/setup_dir +11 -0
  285. package/.config/nvm/test/slow/nvm reinstall-packages/should work as expected +31 -0
  286. package/.config/nvm/test/slow/nvm reinstall-packages/teardown_dir +13 -0
  287. package/.config/nvm/test/slow/nvm reinstall-packages/test-npmlink/index.js +2 -0
  288. package/.config/nvm/test/slow/nvm reinstall-packages/test-npmlink/package.json +10 -0
  289. package/.config/nvm/test/slow/nvm reinstall-packages/works with no installs +18 -0
  290. package/.config/nvm/test/slow/nvm run/Running 'nvm run --harmony --version' should work +8 -0
  291. package/.config/nvm/test/slow/nvm run/Running 'nvm run --lts' should work +15 -0
  292. package/.config/nvm/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed +16 -0
  293. package/.config/nvm/test/slow/nvm run/Running 'nvm run 0.x' should work +8 -0
  294. package/.config/nvm/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version +25 -0
  295. package/.config/nvm/test/slow/nvm run/setup_dir +11 -0
  296. package/.config/nvm/test/slow/nvm run/teardown_dir +14 -0
  297. package/.config/nvm/test/slow/nvm uninstall/Running 'nvm uninstall 0.12.6' uninstalls v0.12.6 +33 -0
  298. package/.config/nvm/test/slow/nvm uninstall/Running 'nvm uninstall' with incorrect file permissions fails nicely +30 -0
  299. package/.config/nvm/test/slow/nvm uninstall/setup_dir +4 -0
  300. package/.config/nvm/test/slow/nvm uninstall/teardown_dir +5 -0
  301. package/.config/nvm/test/slow/nvm use/Running 'nvm use --lts' uses latest LTS version +22 -0
  302. package/.config/nvm/test/slow/nvm use/Running 'nvm use --lts=foo' uses latest 'foo' LTS version +22 -0
  303. package/.config/nvm/test/slow/nvm use/Running 'nvm use iojs' uses latest io.js version +20 -0
  304. package/.config/nvm/test/slow/nvm use/Running 'nvm use node --silent' doesn't print anything +13 -0
  305. package/.config/nvm/test/slow/nvm use/Running 'nvm use node' uses latest stable node version +20 -0
  306. package/.config/nvm/test/slow/nvm use/Running 'nvm use v1.0.0' uses iojs-v1.0.0 iojs version +20 -0
  307. package/.config/nvm/test/slow/nvm use/Running 'nvm use' calls 'nvm_die_on_prefix' +22 -0
  308. package/.config/nvm/test/slow/nvm use/Running 'nvm use' with nvmrc containing not intalled version +28 -0
  309. package/.config/nvm/test/slow/nvm use/setup_dir +23 -0
  310. package/.config/nvm/test/slow/nvm use/teardown_dir +22 -0
  311. package/.config/nvm/test/slow/nvm_get_latest/nvm_get_latest +101 -0
  312. package/.config/nvm/test/slow/nvm_get_latest/nvm_get_latest failed redirect +25 -0
  313. package/.config/nvm/test/sourcing/Sourcing nvm.sh global alias bug +30 -0
  314. package/.config/nvm/test/sourcing/Sourcing nvm.sh should keep version if one is active +20 -0
  315. package/.config/nvm/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded +28 -0
  316. package/.config/nvm/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it +27 -0
  317. package/.config/nvm/test/sourcing/Sourcing nvm.sh with --install should install the default +32 -0
  318. package/.config/nvm/test/sourcing/Sourcing nvm.sh with --no-use should not use anything +31 -0
  319. package/.config/nvm/test/sourcing/Sourcing nvm.sh with no default should return 0 +11 -0
  320. package/.config/nvm/test/sourcing/setup +14 -0
  321. package/.config/nvm/test/sourcing/teardown +7 -0
  322. package/.config/nvm/test/xenial/install from source +29 -0
  323. package/.config/nvm/test/xenial/install from source implicitly +23 -0
  324. package/.config/nvm/test/xenial/install from source with thread parameter +33 -0
  325. package/.config/nvm/test/xenial/install from source without V8 snapshot for ARM +25 -0
  326. package/.config/nvm/test/xenial/install hook +45 -0
  327. package/.config/nvm/test/xenial/install version specified in .nvmrc from source +20 -0
  328. package/.config/nvm/test/xenial/node 0.6.21 should install 0.6.21-pre +11 -0
  329. package/.config/nvm/update_test_mocks.sh +59 -0
  330. package/.gitattributes +2 -0
  331. package/.replit +84 -0
  332. package/.upm/store.json +1 -0
  333. package/Extra/Database/index.js +470 -0
  334. package/Extra/ExtraAddons.js +82 -0
  335. package/Extra/ExtraFindUID.js +62 -0
  336. package/Extra/ExtraGetThread.js +340 -0
  337. package/Extra/ExtraScreenShot.js +430 -0
  338. package/Extra/ExtraUptimeRobot.js +38 -0
  339. package/Extra/Html/Classic/script.js +833 -0
  340. package/Extra/Html/Classic/style.css +1222 -0
  341. package/Extra/Security/Index.js +173 -0
  342. package/Extra/Security/Step_1.js +6 -0
  343. package/Extra/Security/Step_2.js +22 -0
  344. package/Extra/Security/Step_3.js +22 -0
  345. package/Extra/Src/Change_Environment.js +24 -0
  346. package/Extra/Src/Check_Update.js +66 -0
  347. package/Extra/Src/History.js +115 -0
  348. package/Extra/Src/Instant_Update.js +64 -0
  349. package/Extra/Src/Last-Run.js +65 -0
  350. package/Extra/Src/Release_Memory.js +41 -0
  351. package/Extra/Src/image/checkmate.jpg +0 -0
  352. package/Extra/Src/uuid.js +137 -0
  353. package/Func/AcceptAgreement.js +31 -0
  354. package/Func/ClearCache.js +64 -0
  355. package/Func/ReportV1.js +54 -0
  356. package/Index.js +378 -0
  357. package/LICENSE +21 -0
  358. package/Language/index.json +224 -0
  359. package/Main.js +1110 -0
  360. package/README.md +144 -0
  361. package/broadcast.js +40 -0
  362. package/logger.js +66 -0
  363. package/package.json +231 -0
  364. package/replit.nix +8 -0
  365. package/src/Dev_Horizon_Data.js +125 -0
  366. package/src/Premium.js +25 -0
  367. package/src/Screenshot.js +83 -0
  368. package/src/addExternalModule.js +16 -0
  369. package/src/addUserToGroup.js +79 -0
  370. package/src/changeAdminStatus.js +79 -0
  371. package/src/changeArchivedStatus.js +41 -0
  372. package/src/changeAvt.js +85 -0
  373. package/src/changeBio.js +65 -0
  374. package/src/changeBlockedStatus.js +36 -0
  375. package/src/changeGroupImage.js +106 -0
  376. package/src/changeNickname.js +45 -0
  377. package/src/changeThreadColor.js +62 -0
  378. package/src/changeThreadEmoji.js +42 -0
  379. package/src/createNewGroup.js +70 -0
  380. package/src/createPoll.js +60 -0
  381. package/src/deleteMessage.js +45 -0
  382. package/src/deleteThread.js +43 -0
  383. package/src/forwardAttachment.js +48 -0
  384. package/src/getAccessToken.js +28 -0
  385. package/src/getCurrentUserID.js +7 -0
  386. package/src/getEmojiUrl.js +27 -0
  387. package/src/getFriendsList.js +73 -0
  388. package/src/getMessage.js +80 -0
  389. package/src/getThreadHistory.js +537 -0
  390. package/src/getThreadInfo.js +425 -0
  391. package/src/getThreadList.js +213 -0
  392. package/src/getThreadMain.js +220 -0
  393. package/src/getThreadPictures.js +59 -0
  394. package/src/getUID.js +59 -0
  395. package/src/getUserID.js +62 -0
  396. package/src/getUserInfo.js +113 -0
  397. package/src/getUserInfoMain.js +65 -0
  398. package/src/getUserInfoV2.js +32 -0
  399. package/src/getUserInfoV3.js +63 -0
  400. package/src/getUserInfoV4.js +55 -0
  401. package/src/getUserInfoV5.js +61 -0
  402. package/src/handleFriendRequest.js +46 -0
  403. package/src/handleMessageRequest.js +49 -0
  404. package/src/httpGet.js +49 -0
  405. package/src/httpPost.js +48 -0
  406. package/src/httpPostFormData.js +41 -0
  407. package/src/listenMqtt.js +786 -0
  408. package/src/logout.js +68 -0
  409. package/src/markAsDelivered.js +48 -0
  410. package/src/markAsRead.js +70 -0
  411. package/src/markAsReadAll.js +43 -0
  412. package/src/markAsSeen.js +51 -0
  413. package/src/muteThread.js +47 -0
  414. package/src/removeUserFromGroup.js +49 -0
  415. package/src/resolvePhotoUrl.js +37 -0
  416. package/src/searchForThread.js +43 -0
  417. package/src/sendMessage.js +379 -0
  418. package/src/sendTypingIndicator.js +80 -0
  419. package/src/setMessageReaction.js +109 -0
  420. package/src/setPostReaction.js +102 -0
  421. package/src/setTitle.js +74 -0
  422. package/src/threadColors.js +39 -0
  423. package/src/unfriend.js +43 -0
  424. package/src/unsendMessage.js +40 -0
  425. 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 "$@"