@socketsecurity/cli-with-sentry 1.1.25 → 2.0.0

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.
Files changed (914) hide show
  1. package/CHANGELOG.md +51 -218
  2. package/README.md +41 -74
  3. package/dist/cli.js.bz +0 -0
  4. package/dist/cli.js.bz.sha256 +1 -0
  5. package/dist/index.js +2 -0
  6. package/package.json +31 -274
  7. package/bin/cli.js +0 -52
  8. package/bin/npm-cli.js +0 -29
  9. package/bin/npx-cli.js +0 -29
  10. package/bin/pnpm-cli.js +0 -29
  11. package/bin/yarn-cli.js +0 -29
  12. package/dist/cli.js +0 -14999
  13. package/dist/cli.js.map +0 -1
  14. package/dist/constants.js +0 -845
  15. package/dist/constants.js.map +0 -1
  16. package/dist/flags.js +0 -212
  17. package/dist/flags.js.map +0 -1
  18. package/dist/init.gradle +0 -250
  19. package/dist/instrument-with-sentry.js +0 -44
  20. package/dist/instrument-with-sentry.js.map +0 -1
  21. package/dist/npm-cli.js +0 -30
  22. package/dist/npm-cli.js.map +0 -1
  23. package/dist/npx-cli.js +0 -26
  24. package/dist/npx-cli.js.map +0 -1
  25. package/dist/pnpm-cli.js +0 -30
  26. package/dist/pnpm-cli.js.map +0 -1
  27. package/dist/shadow-npm-bin.js +0 -8
  28. package/dist/shadow-npm-bin.js.map +0 -1
  29. package/dist/shadow-npm-bin2.js +0 -102
  30. package/dist/shadow-npm-bin2.js.map +0 -1
  31. package/dist/shadow-npm-inject.js +0 -307
  32. package/dist/shadow-npm-inject.js.map +0 -1
  33. package/dist/shadow-npx-bin.js +0 -12
  34. package/dist/shadow-npx-bin.js.map +0 -1
  35. package/dist/shadow-pnpm-bin.js +0 -8
  36. package/dist/shadow-pnpm-bin.js.map +0 -1
  37. package/dist/shadow-pnpm-bin2.js +0 -300
  38. package/dist/shadow-pnpm-bin2.js.map +0 -1
  39. package/dist/shadow-yarn-bin.js +0 -96
  40. package/dist/shadow-yarn-bin.js.map +0 -1
  41. package/dist/tsconfig.dts.tsbuildinfo +0 -1
  42. package/dist/types/cli.d.mts +0 -3
  43. package/dist/types/cli.d.mts.map +0 -1
  44. package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
  45. package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
  46. package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
  47. package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
  48. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
  49. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
  50. package/dist/types/commands/analytics/handle-analytics.d.mts +0 -10
  51. package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
  52. package/dist/types/commands/analytics/output-analytics.d.mts +0 -29
  53. package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
  54. package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
  55. package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
  56. package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
  57. package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
  58. package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
  59. package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
  60. package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
  61. package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
  62. package/dist/types/commands/ci/cmd-ci.d.mts +0 -9
  63. package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
  64. package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
  65. package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
  66. package/dist/types/commands/ci/handle-ci.d.mts +0 -2
  67. package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
  68. package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
  69. package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
  70. package/dist/types/commands/config/cmd-config-get.d.mts +0 -9
  71. package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
  72. package/dist/types/commands/config/cmd-config-list.d.mts +0 -9
  73. package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
  74. package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
  75. package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
  76. package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
  77. package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
  78. package/dist/types/commands/config/cmd-config.d.mts +0 -3
  79. package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
  80. package/dist/types/commands/config/discover-config-value.d.mts +0 -3
  81. package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
  82. package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
  83. package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
  84. package/dist/types/commands/config/handle-config-get.d.mts +0 -7
  85. package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
  86. package/dist/types/commands/config/handle-config-set.d.mts +0 -8
  87. package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
  88. package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
  89. package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
  90. package/dist/types/commands/config/output-config-auto.d.mts +0 -4
  91. package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
  92. package/dist/types/commands/config/output-config-get.d.mts +0 -4
  93. package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
  94. package/dist/types/commands/config/output-config-list.d.mts +0 -6
  95. package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
  96. package/dist/types/commands/config/output-config-set.d.mts +0 -3
  97. package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
  98. package/dist/types/commands/config/output-config-unset.d.mts +0 -3
  99. package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
  100. package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
  101. package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
  102. package/dist/types/commands/fix/coana-fix.d.mts +0 -6
  103. package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
  104. package/dist/types/commands/fix/env-helpers.d.mts +0 -26
  105. package/dist/types/commands/fix/env-helpers.d.mts.map +0 -1
  106. package/dist/types/commands/fix/git.d.mts +0 -13
  107. package/dist/types/commands/fix/git.d.mts.map +0 -1
  108. package/dist/types/commands/fix/handle-fix.d.mts +0 -20
  109. package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
  110. package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
  111. package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
  112. package/dist/types/commands/fix/pull-request.d.mts +0 -31
  113. package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
  114. package/dist/types/commands/fix/types.d.mts +0 -21
  115. package/dist/types/commands/fix/types.d.mts.map +0 -1
  116. package/dist/types/commands/install/cmd-install-completion.d.mts +0 -9
  117. package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
  118. package/dist/types/commands/install/cmd-install.d.mts +0 -3
  119. package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
  120. package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
  121. package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
  122. package/dist/types/commands/install/output-install-completion.d.mts +0 -12
  123. package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
  124. package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
  125. package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
  126. package/dist/types/commands/json/cmd-json.d.mts +0 -9
  127. package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
  128. package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
  129. package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
  130. package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
  131. package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
  132. package/dist/types/commands/login/apply-login.d.mts +0 -2
  133. package/dist/types/commands/login/apply-login.d.mts.map +0 -1
  134. package/dist/types/commands/login/attempt-login.d.mts +0 -6
  135. package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
  136. package/dist/types/commands/login/cmd-login.d.mts +0 -10
  137. package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
  138. package/dist/types/commands/logout/apply-logout.d.mts +0 -2
  139. package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
  140. package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
  141. package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
  142. package/dist/types/commands/logout/cmd-logout.d.mts +0 -9
  143. package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
  144. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -9
  145. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
  146. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -9
  147. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
  148. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -9
  149. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
  150. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -9
  151. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
  152. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -9
  153. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
  154. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -9
  155. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
  156. package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -9
  157. package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
  158. package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -9
  159. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
  160. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
  161. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
  162. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
  163. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
  164. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
  165. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
  166. package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
  167. package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
  168. package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
  169. package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
  170. package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
  171. package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
  172. package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
  173. package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
  174. package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
  175. package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
  176. package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
  177. package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
  178. package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -6
  179. package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
  180. package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
  181. package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
  182. package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
  183. package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
  184. package/dist/types/commands/npx/cmd-npx.d.mts +0 -9
  185. package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
  186. package/dist/types/commands/oops/cmd-oops.d.mts +0 -9
  187. package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
  188. package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
  189. package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
  190. package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
  191. package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
  192. package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
  193. package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
  194. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
  195. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
  196. package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
  197. package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
  198. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
  199. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
  200. package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
  201. package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
  202. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
  203. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
  204. package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
  205. package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
  206. package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
  207. package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
  208. package/dist/types/commands/optimize/shared.d.mts +0 -2
  209. package/dist/types/commands/optimize/shared.d.mts.map +0 -1
  210. package/dist/types/commands/optimize/types.d.mts +0 -9
  211. package/dist/types/commands/optimize/types.d.mts.map +0 -1
  212. package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
  213. package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
  214. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
  215. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
  216. package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
  217. package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
  218. package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
  219. package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
  220. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
  221. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
  222. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
  223. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
  224. package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
  225. package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
  226. package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -9
  227. package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
  228. package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
  229. package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
  230. package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
  231. package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
  232. package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
  233. package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
  234. package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -20
  235. package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
  236. package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
  237. package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
  238. package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
  239. package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
  240. package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
  241. package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
  242. package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
  243. package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
  244. package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
  245. package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
  246. package/dist/types/commands/organization/handle-quota.d.mts +0 -3
  247. package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
  248. package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
  249. package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
  250. package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
  251. package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
  252. package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
  253. package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
  254. package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
  255. package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
  256. package/dist/types/commands/organization/output-quota.d.mts +0 -4
  257. package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
  258. package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
  259. package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
  260. package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
  261. package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
  262. package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
  263. package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
  264. package/dist/types/commands/package/cmd-package.d.mts +0 -3
  265. package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
  266. package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
  267. package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
  268. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
  269. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
  270. package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
  271. package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
  272. package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
  273. package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
  274. package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
  275. package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
  276. package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
  277. package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
  278. package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
  279. package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
  280. package/dist/types/commands/patch/cmd-patch.d.mts +0 -10
  281. package/dist/types/commands/patch/cmd-patch.d.mts.map +0 -1
  282. package/dist/types/commands/patch/handle-patch.d.mts +0 -12
  283. package/dist/types/commands/patch/handle-patch.d.mts.map +0 -1
  284. package/dist/types/commands/patch/manifest-schema.d.mts +0 -34
  285. package/dist/types/commands/patch/manifest-schema.d.mts.map +0 -1
  286. package/dist/types/commands/patch/output-patch-result.d.mts +0 -5
  287. package/dist/types/commands/patch/output-patch-result.d.mts.map +0 -1
  288. package/dist/types/commands/pnpm/cmd-pnpm.d.mts +0 -10
  289. package/dist/types/commands/pnpm/cmd-pnpm.d.mts.map +0 -1
  290. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -9
  291. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
  292. package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
  293. package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
  294. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -9
  295. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
  296. package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
  297. package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
  298. package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
  299. package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
  300. package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
  301. package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
  302. package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
  303. package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
  304. package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
  305. package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
  306. package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
  307. package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
  308. package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
  309. package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
  310. package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
  311. package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
  312. package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
  313. package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
  314. package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
  315. package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
  316. package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
  317. package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
  318. package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
  319. package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
  320. package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
  321. package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
  322. package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
  323. package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
  324. package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
  325. package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
  326. package/dist/types/commands/repository/handle-list-repos.d.mts +0 -12
  327. package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
  328. package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
  329. package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
  330. package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
  331. package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
  332. package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
  333. package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
  334. package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
  335. package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
  336. package/dist/types/commands/repository/output-list-repos.d.mts +0 -5
  337. package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
  338. package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
  339. package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
  340. package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
  341. package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
  342. package/dist/types/commands/repository/types.d.mts +0 -2
  343. package/dist/types/commands/repository/types.d.mts.map +0 -1
  344. package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
  345. package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
  346. package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
  347. package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
  348. package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
  349. package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
  350. package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
  351. package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
  352. package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -4
  353. package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
  354. package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -4
  355. package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
  356. package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
  357. package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
  358. package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -4
  359. package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
  360. package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -9
  361. package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
  362. package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -4
  363. package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
  364. package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
  365. package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
  366. package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
  367. package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
  368. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
  369. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
  370. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
  371. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
  372. package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
  373. package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
  374. package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
  375. package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
  376. package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
  377. package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
  378. package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
  379. package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
  380. package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
  381. package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
  382. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -10
  383. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
  384. package/dist/types/commands/scan/finalize-tier1-scan.d.mts +0 -12
  385. package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +0 -1
  386. package/dist/types/commands/scan/generate-report.d.mts +0 -44
  387. package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
  388. package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
  389. package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
  390. package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -29
  391. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
  392. package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
  393. package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
  394. package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
  395. package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
  396. package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
  397. package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
  398. package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
  399. package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
  400. package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
  401. package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
  402. package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -12
  403. package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
  404. package/dist/types/commands/scan/handle-scan-report.d.mts +0 -14
  405. package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
  406. package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
  407. package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
  408. package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -10
  409. package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
  410. package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
  411. package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
  412. package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
  413. package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
  414. package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
  415. package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
  416. package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
  417. package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
  418. package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
  419. package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
  420. package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
  421. package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
  422. package/dist/types/commands/scan/output-scan-reach.d.mts +0 -7
  423. package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
  424. package/dist/types/commands/scan/output-scan-report.d.mts +0 -22
  425. package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
  426. package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
  427. package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
  428. package/dist/types/commands/scan/perform-reachability-analysis.d.mts +0 -27
  429. package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +0 -1
  430. package/dist/types/commands/scan/reachability-flags.d.mts +0 -3
  431. package/dist/types/commands/scan/reachability-flags.d.mts.map +0 -1
  432. package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
  433. package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
  434. package/dist/types/commands/scan/stream-scan.d.mts +0 -7
  435. package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
  436. package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
  437. package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
  438. package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
  439. package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
  440. package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
  441. package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
  442. package/dist/types/commands/scan/suggest_target.d.mts +0 -2
  443. package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
  444. package/dist/types/commands/scan/types.d.mts +0 -3
  445. package/dist/types/commands/scan/types.d.mts.map +0 -1
  446. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
  447. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
  448. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
  449. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
  450. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
  451. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
  452. package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
  453. package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
  454. package/dist/types/commands/threat-feed/types.d.mts +0 -15
  455. package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
  456. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -8
  457. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
  458. package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
  459. package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
  460. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
  461. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
  462. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
  463. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
  464. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
  465. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
  466. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
  467. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
  468. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
  469. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
  470. package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -9
  471. package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
  472. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
  473. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
  474. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
  475. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
  476. package/dist/types/commands/yarn/cmd-yarn.d.mts +0 -10
  477. package/dist/types/commands/yarn/cmd-yarn.d.mts.map +0 -1
  478. package/dist/types/commands.d.mts +0 -203
  479. package/dist/types/commands.d.mts.map +0 -1
  480. package/dist/types/constants.d.mts +0 -299
  481. package/dist/types/constants.d.mts.map +0 -1
  482. package/dist/types/flags.d.mts +0 -18
  483. package/dist/types/flags.d.mts.map +0 -1
  484. package/dist/types/instrument-with-sentry.d.mts +0 -2
  485. package/dist/types/instrument-with-sentry.d.mts.map +0 -1
  486. package/dist/types/npm-cli.d.mts +0 -3
  487. package/dist/types/npm-cli.d.mts.map +0 -1
  488. package/dist/types/npx-cli.d.mts +0 -3
  489. package/dist/types/npx-cli.d.mts.map +0 -1
  490. package/dist/types/pnpm-cli.d.mts +0 -3
  491. package/dist/types/pnpm-cli.d.mts.map +0 -1
  492. package/dist/types/sea/bootstrap.d.mts +0 -2
  493. package/dist/types/sea/bootstrap.d.mts.map +0 -1
  494. package/dist/types/sea/build-sea.d.mts +0 -27
  495. package/dist/types/sea/build-sea.d.mts.map +0 -1
  496. package/dist/types/shadow/common.d.mts +0 -23
  497. package/dist/types/shadow/common.d.mts.map +0 -1
  498. package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
  499. package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
  500. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
  501. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
  502. package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
  503. package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
  504. package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -24
  505. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
  506. package/dist/types/shadow/npm/bin.d.mts +0 -5
  507. package/dist/types/shadow/npm/bin.d.mts.map +0 -1
  508. package/dist/types/shadow/npm/inject.d.mts +0 -2
  509. package/dist/types/shadow/npm/inject.d.mts.map +0 -1
  510. package/dist/types/shadow/npm/install.d.mts +0 -13
  511. package/dist/types/shadow/npm/install.d.mts.map +0 -1
  512. package/dist/types/shadow/npm/paths.d.mts +0 -6
  513. package/dist/types/shadow/npm/paths.d.mts.map +0 -1
  514. package/dist/types/shadow/npm-base.d.mts +0 -11
  515. package/dist/types/shadow/npm-base.d.mts.map +0 -1
  516. package/dist/types/shadow/npx/bin.d.mts +0 -5
  517. package/dist/types/shadow/npx/bin.d.mts.map +0 -1
  518. package/dist/types/shadow/pnpm/bin.d.mts +0 -10
  519. package/dist/types/shadow/pnpm/bin.d.mts.map +0 -1
  520. package/dist/types/shadow/stdio-ipc.d.mts +0 -7
  521. package/dist/types/shadow/stdio-ipc.d.mts.map +0 -1
  522. package/dist/types/shadow/yarn/bin.d.mts +0 -10
  523. package/dist/types/shadow/yarn/bin.d.mts.map +0 -1
  524. package/dist/types/test/json-output-validation.d.mts +0 -37
  525. package/dist/types/test/json-output-validation.d.mts.map +0 -1
  526. package/dist/types/test/mocks/socket-auth.d.mts +0 -88
  527. package/dist/types/test/mocks/socket-auth.d.mts.map +0 -1
  528. package/dist/types/types.d.mts +0 -29
  529. package/dist/types/types.d.mts.map +0 -1
  530. package/dist/types/utils/agent.d.mts +0 -12
  531. package/dist/types/utils/agent.d.mts.map +0 -1
  532. package/dist/types/utils/alert/artifact.d.mts +0 -21
  533. package/dist/types/utils/alert/artifact.d.mts.map +0 -1
  534. package/dist/types/utils/alert/fix.d.mts +0 -6
  535. package/dist/types/utils/alert/fix.d.mts.map +0 -1
  536. package/dist/types/utils/alert/severity.d.mts +0 -14
  537. package/dist/types/utils/alert/severity.d.mts.map +0 -1
  538. package/dist/types/utils/alerts-map.d.mts +0 -27
  539. package/dist/types/utils/alerts-map.d.mts.map +0 -1
  540. package/dist/types/utils/api.d.mts +0 -44
  541. package/dist/types/utils/api.d.mts.map +0 -1
  542. package/dist/types/utils/check-input.d.mts +0 -9
  543. package/dist/types/utils/check-input.d.mts.map +0 -1
  544. package/dist/types/utils/cmd.d.mts +0 -50
  545. package/dist/types/utils/cmd.d.mts.map +0 -1
  546. package/dist/types/utils/coana.d.mts +0 -2
  547. package/dist/types/utils/coana.d.mts.map +0 -1
  548. package/dist/types/utils/color-or-markdown.d.mts +0 -16
  549. package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
  550. package/dist/types/utils/completion.d.mts +0 -11
  551. package/dist/types/utils/completion.d.mts.map +0 -1
  552. package/dist/types/utils/config.d.mts +0 -34
  553. package/dist/types/utils/config.d.mts.map +0 -1
  554. package/dist/types/utils/cve-to-ghsa.d.mts +0 -6
  555. package/dist/types/utils/cve-to-ghsa.d.mts.map +0 -1
  556. package/dist/types/utils/debug.d.mts +0 -45
  557. package/dist/types/utils/debug.d.mts.map +0 -1
  558. package/dist/types/utils/determine-org-slug.d.mts +0 -2
  559. package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
  560. package/dist/types/utils/dlx-binary.d.mts +0 -58
  561. package/dist/types/utils/dlx-binary.d.mts.map +0 -1
  562. package/dist/types/utils/dlx-detection.d.mts +0 -29
  563. package/dist/types/utils/dlx-detection.d.mts.map +0 -1
  564. package/dist/types/utils/dlx.d.mts +0 -36
  565. package/dist/types/utils/dlx.d.mts.map +0 -1
  566. package/dist/types/utils/ecosystem.d.mts +0 -20
  567. package/dist/types/utils/ecosystem.d.mts.map +0 -1
  568. package/dist/types/utils/errors.d.mts +0 -62
  569. package/dist/types/utils/errors.d.mts.map +0 -1
  570. package/dist/types/utils/extract-names.d.mts +0 -15
  571. package/dist/types/utils/extract-names.d.mts.map +0 -1
  572. package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
  573. package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
  574. package/dist/types/utils/filter-config.d.mts +0 -5
  575. package/dist/types/utils/filter-config.d.mts.map +0 -1
  576. package/dist/types/utils/fs.d.mts +0 -8
  577. package/dist/types/utils/fs.d.mts.map +0 -1
  578. package/dist/types/utils/get-output-kind.d.mts +0 -3
  579. package/dist/types/utils/get-output-kind.d.mts.map +0 -1
  580. package/dist/types/utils/git.d.mts +0 -35
  581. package/dist/types/utils/git.d.mts.map +0 -1
  582. package/dist/types/utils/github.d.mts +0 -38
  583. package/dist/types/utils/github.d.mts.map +0 -1
  584. package/dist/types/utils/glob.d.mts +0 -15
  585. package/dist/types/utils/glob.d.mts.map +0 -1
  586. package/dist/types/utils/lockfile.d.mts +0 -2
  587. package/dist/types/utils/lockfile.d.mts.map +0 -1
  588. package/dist/types/utils/map-to-object.d.mts +0 -10
  589. package/dist/types/utils/map-to-object.d.mts.map +0 -1
  590. package/dist/types/utils/markdown.d.mts +0 -27
  591. package/dist/types/utils/markdown.d.mts.map +0 -1
  592. package/dist/types/utils/meow-with-subcommands.d.mts +0 -83
  593. package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
  594. package/dist/types/utils/ms-at-home.d.mts +0 -2
  595. package/dist/types/utils/ms-at-home.d.mts.map +0 -1
  596. package/dist/types/utils/npm-config.d.mts +0 -14
  597. package/dist/types/utils/npm-config.d.mts.map +0 -1
  598. package/dist/types/utils/npm-package-arg.d.mts +0 -8
  599. package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
  600. package/dist/types/utils/npm-paths.d.mts +0 -7
  601. package/dist/types/utils/npm-paths.d.mts.map +0 -1
  602. package/dist/types/utils/npm-spec.d.mts +0 -57
  603. package/dist/types/utils/npm-spec.d.mts.map +0 -1
  604. package/dist/types/utils/objects.d.mts +0 -3
  605. package/dist/types/utils/objects.d.mts.map +0 -1
  606. package/dist/types/utils/organization.d.mts +0 -5
  607. package/dist/types/utils/organization.d.mts.map +0 -1
  608. package/dist/types/utils/output-formatting.d.mts +0 -20
  609. package/dist/types/utils/output-formatting.d.mts.map +0 -1
  610. package/dist/types/utils/package-environment.d.mts +0 -57
  611. package/dist/types/utils/package-environment.d.mts.map +0 -1
  612. package/dist/types/utils/path-resolve.d.mts +0 -14
  613. package/dist/types/utils/path-resolve.d.mts.map +0 -1
  614. package/dist/types/utils/pnpm-paths.d.mts +0 -5
  615. package/dist/types/utils/pnpm-paths.d.mts.map +0 -1
  616. package/dist/types/utils/pnpm.d.mts +0 -11
  617. package/dist/types/utils/pnpm.d.mts.map +0 -1
  618. package/dist/types/utils/purl-to-ghsa.d.mts +0 -6
  619. package/dist/types/utils/purl-to-ghsa.d.mts.map +0 -1
  620. package/dist/types/utils/purl.d.mts +0 -71
  621. package/dist/types/utils/purl.d.mts.map +0 -1
  622. package/dist/types/utils/requirements.d.mts +0 -125
  623. package/dist/types/utils/requirements.d.mts.map +0 -1
  624. package/dist/types/utils/sdk.d.mts +0 -17
  625. package/dist/types/utils/sdk.d.mts.map +0 -1
  626. package/dist/types/utils/semver.d.mts +0 -7
  627. package/dist/types/utils/semver.d.mts.map +0 -1
  628. package/dist/types/utils/serialize-result-json.d.mts +0 -5
  629. package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
  630. package/dist/types/utils/shadow-links.d.mts +0 -5
  631. package/dist/types/utils/shadow-links.d.mts.map +0 -1
  632. package/dist/types/utils/socket-json.d.mts +0 -59
  633. package/dist/types/utils/socket-json.d.mts.map +0 -1
  634. package/dist/types/utils/socket-package-alert.d.mts +0 -80
  635. package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
  636. package/dist/types/utils/socket-url.d.mts +0 -8
  637. package/dist/types/utils/socket-url.d.mts.map +0 -1
  638. package/dist/types/utils/spec.d.mts +0 -5
  639. package/dist/types/utils/spec.d.mts.map +0 -1
  640. package/dist/types/utils/strings.d.mts +0 -14
  641. package/dist/types/utils/strings.d.mts.map +0 -1
  642. package/dist/types/utils/terminal-link.d.mts +0 -52
  643. package/dist/types/utils/terminal-link.d.mts.map +0 -1
  644. package/dist/types/utils/tildify.d.mts +0 -2
  645. package/dist/types/utils/tildify.d.mts.map +0 -1
  646. package/dist/types/utils/translations.d.mts +0 -617
  647. package/dist/types/utils/translations.d.mts.map +0 -1
  648. package/dist/types/utils/walk-nested-map.d.mts +0 -7
  649. package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
  650. package/dist/types/utils/yarn-paths.d.mts +0 -5
  651. package/dist/types/utils/yarn-paths.d.mts.map +0 -1
  652. package/dist/types/utils/yarn-version.d.mts +0 -2
  653. package/dist/types/utils/yarn-version.d.mts.map +0 -1
  654. package/dist/types/yarn-cli.d.mts +0 -3
  655. package/dist/types/yarn-cli.d.mts.map +0 -1
  656. package/dist/utils.js +0 -6146
  657. package/dist/utils.js.map +0 -1
  658. package/dist/vendor.js +0 -162074
  659. package/dist/yarn-cli.js +0 -30
  660. package/dist/yarn-cli.js.map +0 -1
  661. package/external/@socketsecurity/registry/LICENSE +0 -21
  662. package/external/@socketsecurity/registry/README.md +0 -9
  663. package/external/@socketsecurity/registry/extensions.json +0 -28
  664. package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -3165
  665. package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -3202
  666. package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -3307
  667. package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -3519
  668. package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -3655
  669. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -21406
  670. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -183
  671. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -274
  672. package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -704
  673. package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -54
  674. package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -4516
  675. package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -453
  676. package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1406
  677. package/external/@socketsecurity/registry/external/browserslist.js +0 -20496
  678. package/external/@socketsecurity/registry/external/cacache.js +0 -16208
  679. package/external/@socketsecurity/registry/external/debug.js +0 -1163
  680. package/external/@socketsecurity/registry/external/fast-glob.js +0 -7994
  681. package/external/@socketsecurity/registry/external/fast-sort.js +0 -181
  682. package/external/@socketsecurity/registry/external/libnpmpack.js +0 -106271
  683. package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -38997
  684. package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -5343
  685. package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -5773
  686. package/external/@socketsecurity/registry/external/pacote.js +0 -74109
  687. package/external/@socketsecurity/registry/external/picomatch.js +0 -2307
  688. package/external/@socketsecurity/registry/external/semver.js +0 -2618
  689. package/external/@socketsecurity/registry/external/signal-exit.js +0 -336
  690. package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1457
  691. package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1043
  692. package/external/@socketsecurity/registry/external/streaming-iterables.js +0 -326
  693. package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -108
  694. package/external/@socketsecurity/registry/external/which.js +0 -405
  695. package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -101
  696. package/external/@socketsecurity/registry/index.js +0 -31
  697. package/external/@socketsecurity/registry/lib/agent.js +0 -390
  698. package/external/@socketsecurity/registry/lib/arrays.js +0 -89
  699. package/external/@socketsecurity/registry/lib/bin.js +0 -650
  700. package/external/@socketsecurity/registry/lib/constants/abort-controller.js +0 -15
  701. package/external/@socketsecurity/registry/lib/constants/abort-signal.js +0 -27
  702. package/external/@socketsecurity/registry/lib/constants/at-latest.js +0 -3
  703. package/external/@socketsecurity/registry/lib/constants/biome-json.js +0 -3
  704. package/external/@socketsecurity/registry/lib/constants/bun-lock.js +0 -3
  705. package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +0 -3
  706. package/external/@socketsecurity/registry/lib/constants/bun.js +0 -3
  707. package/external/@socketsecurity/registry/lib/constants/ci.js +0 -3
  708. package/external/@socketsecurity/registry/lib/constants/column-limit.js +0 -3
  709. package/external/@socketsecurity/registry/lib/constants/copy-left-licenses.js +0 -27
  710. package/external/@socketsecurity/registry/lib/constants/darwin.js +0 -3
  711. package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +0 -3
  712. package/external/@socketsecurity/registry/lib/constants/dot-package-lock-json.js +0 -3
  713. package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +0 -3
  714. package/external/@socketsecurity/registry/lib/constants/empty-file.js +0 -3
  715. package/external/@socketsecurity/registry/lib/constants/empty-value.js +0 -3
  716. package/external/@socketsecurity/registry/lib/constants/env.js +0 -59
  717. package/external/@socketsecurity/registry/lib/constants/eslint-config-js.js +0 -3
  718. package/external/@socketsecurity/registry/lib/constants/esnext.js +0 -3
  719. package/external/@socketsecurity/registry/lib/constants/exec-path.js +0 -3
  720. package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +0 -3
  721. package/external/@socketsecurity/registry/lib/constants/ext-cmd.js +0 -3
  722. package/external/@socketsecurity/registry/lib/constants/ext-cts.js +0 -3
  723. package/external/@socketsecurity/registry/lib/constants/ext-dts.js +0 -3
  724. package/external/@socketsecurity/registry/lib/constants/ext-js.js +0 -3
  725. package/external/@socketsecurity/registry/lib/constants/ext-json.js +0 -3
  726. package/external/@socketsecurity/registry/lib/constants/ext-lock.js +0 -3
  727. package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +0 -3
  728. package/external/@socketsecurity/registry/lib/constants/ext-md.js +0 -3
  729. package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +0 -3
  730. package/external/@socketsecurity/registry/lib/constants/ext-mts.js +0 -3
  731. package/external/@socketsecurity/registry/lib/constants/ext-ps1.js +0 -3
  732. package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +0 -3
  733. package/external/@socketsecurity/registry/lib/constants/ext-yml.js +0 -3
  734. package/external/@socketsecurity/registry/lib/constants/extensions-json.js +0 -3
  735. package/external/@socketsecurity/registry/lib/constants/extensions.js +0 -3
  736. package/external/@socketsecurity/registry/lib/constants/get-ipc.js +0 -10
  737. package/external/@socketsecurity/registry/lib/constants/gitignore.js +0 -3
  738. package/external/@socketsecurity/registry/lib/constants/index.js +0 -139
  739. package/external/@socketsecurity/registry/lib/constants/ipc-handler.js +0 -19
  740. package/external/@socketsecurity/registry/lib/constants/ipc-object.js +0 -6
  741. package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +0 -47
  742. package/external/@socketsecurity/registry/lib/constants/ipc-target.js +0 -3
  743. package/external/@socketsecurity/registry/lib/constants/k-internals-symbol.js +0 -3
  744. package/external/@socketsecurity/registry/lib/constants/latest.js +0 -3
  745. package/external/@socketsecurity/registry/lib/constants/license-glob-recursive.js +0 -3
  746. package/external/@socketsecurity/registry/lib/constants/license-glob.js +0 -3
  747. package/external/@socketsecurity/registry/lib/constants/license-original-glob-recursive.js +0 -3
  748. package/external/@socketsecurity/registry/lib/constants/license-original-glob.js +0 -3
  749. package/external/@socketsecurity/registry/lib/constants/license-original.js +0 -3
  750. package/external/@socketsecurity/registry/lib/constants/license.js +0 -3
  751. package/external/@socketsecurity/registry/lib/constants/lifecycle-script-names.js +0 -18
  752. package/external/@socketsecurity/registry/lib/constants/loop-sentinel.js +0 -3
  753. package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +0 -47
  754. package/external/@socketsecurity/registry/lib/constants/manifest-json.js +0 -3
  755. package/external/@socketsecurity/registry/lib/constants/mit.js +0 -3
  756. package/external/@socketsecurity/registry/lib/constants/node-auth-token.js +0 -3
  757. package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +0 -9
  758. package/external/@socketsecurity/registry/lib/constants/node-env.js +0 -3
  759. package/external/@socketsecurity/registry/lib/constants/node-harden-flags.js +0 -29
  760. package/external/@socketsecurity/registry/lib/constants/node-modules-glob-recursive.js +0 -3
  761. package/external/@socketsecurity/registry/lib/constants/node-modules.js +0 -3
  762. package/external/@socketsecurity/registry/lib/constants/node-no-warnings-flags.js +0 -16
  763. package/external/@socketsecurity/registry/lib/constants/node-version.js +0 -3
  764. package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +0 -5
  765. package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +0 -6
  766. package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +0 -3
  767. package/external/@socketsecurity/registry/lib/constants/npm.js +0 -3
  768. package/external/@socketsecurity/registry/lib/constants/npx.js +0 -3
  769. package/external/@socketsecurity/registry/lib/constants/overrides.js +0 -3
  770. package/external/@socketsecurity/registry/lib/constants/package-default-node-range.js +0 -6
  771. package/external/@socketsecurity/registry/lib/constants/package-default-socket-categories.js +0 -3
  772. package/external/@socketsecurity/registry/lib/constants/package-default-version.js +0 -3
  773. package/external/@socketsecurity/registry/lib/constants/package-extensions.js +0 -47
  774. package/external/@socketsecurity/registry/lib/constants/package-json.js +0 -3
  775. package/external/@socketsecurity/registry/lib/constants/package-lock-json.js +0 -3
  776. package/external/@socketsecurity/registry/lib/constants/packument-cache.js +0 -3
  777. package/external/@socketsecurity/registry/lib/constants/pacote-cache-path.js +0 -9
  778. package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +0 -5
  779. package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +0 -3
  780. package/external/@socketsecurity/registry/lib/constants/pnpm.js +0 -3
  781. package/external/@socketsecurity/registry/lib/constants/pre-commit.js +0 -3
  782. package/external/@socketsecurity/registry/lib/constants/readme-glob-recursive.js +0 -3
  783. package/external/@socketsecurity/registry/lib/constants/readme-glob.js +0 -3
  784. package/external/@socketsecurity/registry/lib/constants/readme-md.js +0 -3
  785. package/external/@socketsecurity/registry/lib/constants/registry-scope-delimiter.js +0 -3
  786. package/external/@socketsecurity/registry/lib/constants/registry.js +0 -3
  787. package/external/@socketsecurity/registry/lib/constants/resolutions.js +0 -3
  788. package/external/@socketsecurity/registry/lib/constants/socket-github-org.js +0 -3
  789. package/external/@socketsecurity/registry/lib/constants/socket-ipc-handshake.js +0 -3
  790. package/external/@socketsecurity/registry/lib/constants/socket-override-scope.js +0 -3
  791. package/external/@socketsecurity/registry/lib/constants/socket-public-api-token.js +0 -3
  792. package/external/@socketsecurity/registry/lib/constants/socket-registry-npm-org.js +0 -3
  793. package/external/@socketsecurity/registry/lib/constants/socket-registry-package-name.js +0 -3
  794. package/external/@socketsecurity/registry/lib/constants/socket-registry-repo-name.js +0 -3
  795. package/external/@socketsecurity/registry/lib/constants/socket-registry-scope.js +0 -3
  796. package/external/@socketsecurity/registry/lib/constants/socket-security-scope.js +0 -3
  797. package/external/@socketsecurity/registry/lib/constants/spinner.js +0 -4
  798. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-api.js +0 -8
  799. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-env-var.js +0 -8
  800. package/external/@socketsecurity/registry/lib/constants/supports-node-disable-warning-flag.js +0 -8
  801. package/external/@socketsecurity/registry/lib/constants/supports-node-permission-flag.js +0 -8
  802. package/external/@socketsecurity/registry/lib/constants/supports-node-require-module.js +0 -3
  803. package/external/@socketsecurity/registry/lib/constants/supports-node-run.js +0 -8
  804. package/external/@socketsecurity/registry/lib/constants/supports-process-send.js +0 -5
  805. package/external/@socketsecurity/registry/lib/constants/ts-libs-available.js +0 -22
  806. package/external/@socketsecurity/registry/lib/constants/ts-types-available.js +0 -3
  807. package/external/@socketsecurity/registry/lib/constants/tsconfig-json.js +0 -3
  808. package/external/@socketsecurity/registry/lib/constants/undefined-token.js +0 -3
  809. package/external/@socketsecurity/registry/lib/constants/unknown-error.js +0 -3
  810. package/external/@socketsecurity/registry/lib/constants/unknown-value.js +0 -3
  811. package/external/@socketsecurity/registry/lib/constants/unlicenced.js +0 -3
  812. package/external/@socketsecurity/registry/lib/constants/unlicensed.js +0 -3
  813. package/external/@socketsecurity/registry/lib/constants/utf8.js +0 -3
  814. package/external/@socketsecurity/registry/lib/constants/vitest.js +0 -3
  815. package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +0 -3
  816. package/external/@socketsecurity/registry/lib/constants/vlt.js +0 -3
  817. package/external/@socketsecurity/registry/lib/constants/win32.js +0 -3
  818. package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +0 -3
  819. package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +0 -3
  820. package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +0 -5
  821. package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +0 -3
  822. package/external/@socketsecurity/registry/lib/constants/yarn.js +0 -3
  823. package/external/@socketsecurity/registry/lib/debug.js +0 -264
  824. package/external/@socketsecurity/registry/lib/env.js +0 -62
  825. package/external/@socketsecurity/registry/lib/fs.js +0 -556
  826. package/external/@socketsecurity/registry/lib/functions.js +0 -20
  827. package/external/@socketsecurity/registry/lib/globs.js +0 -145
  828. package/external/@socketsecurity/registry/lib/json.js +0 -69
  829. package/external/@socketsecurity/registry/lib/logger.js +0 -534
  830. package/external/@socketsecurity/registry/lib/objects.js +0 -422
  831. package/external/@socketsecurity/registry/lib/packages.js +0 -1376
  832. package/external/@socketsecurity/registry/lib/path.js +0 -231
  833. package/external/@socketsecurity/registry/lib/promises.js +0 -286
  834. package/external/@socketsecurity/registry/lib/prompts.js +0 -63
  835. package/external/@socketsecurity/registry/lib/regexps.js +0 -23
  836. package/external/@socketsecurity/registry/lib/sorts.js +0 -70
  837. package/external/@socketsecurity/registry/lib/spawn.js +0 -252
  838. package/external/@socketsecurity/registry/lib/spinner.js +0 -205
  839. package/external/@socketsecurity/registry/lib/streams.js +0 -84
  840. package/external/@socketsecurity/registry/lib/strings.js +0 -235
  841. package/external/@socketsecurity/registry/lib/url.js +0 -68
  842. package/external/@socketsecurity/registry/lib/words.js +0 -45
  843. package/external/@socketsecurity/registry/manifest.json +0 -1875
  844. package/external/blessed/LICENSE +0 -20
  845. package/external/blessed/README.md +0 -2421
  846. package/external/blessed/lib/alias.js +0 -528
  847. package/external/blessed/lib/blessed.js +0 -34
  848. package/external/blessed/lib/colors.js +0 -532
  849. package/external/blessed/lib/events.js +0 -191
  850. package/external/blessed/lib/gpmclient.js +0 -223
  851. package/external/blessed/lib/helpers.js +0 -167
  852. package/external/blessed/lib/keys.js +0 -341
  853. package/external/blessed/lib/program.js +0 -4297
  854. package/external/blessed/lib/tput.js +0 -3020
  855. package/external/blessed/lib/unicode.js +0 -792
  856. package/external/blessed/lib/widget.js +0 -62
  857. package/external/blessed/lib/widgets/ansiimage.js +0 -169
  858. package/external/blessed/lib/widgets/bigtext.js +0 -161
  859. package/external/blessed/lib/widgets/box.js +0 -36
  860. package/external/blessed/lib/widgets/button.js +0 -64
  861. package/external/blessed/lib/widgets/checkbox.js +0 -93
  862. package/external/blessed/lib/widgets/element.js +0 -2572
  863. package/external/blessed/lib/widgets/filemanager.js +0 -214
  864. package/external/blessed/lib/widgets/form.js +0 -269
  865. package/external/blessed/lib/widgets/image.js +0 -63
  866. package/external/blessed/lib/widgets/input.js +0 -36
  867. package/external/blessed/lib/widgets/layout.js +0 -235
  868. package/external/blessed/lib/widgets/line.js +0 -58
  869. package/external/blessed/lib/widgets/list.js +0 -601
  870. package/external/blessed/lib/widgets/listbar.js +0 -413
  871. package/external/blessed/lib/widgets/listtable.js +0 -254
  872. package/external/blessed/lib/widgets/loading.js +0 -90
  873. package/external/blessed/lib/widgets/log.js +0 -85
  874. package/external/blessed/lib/widgets/message.js +0 -125
  875. package/external/blessed/lib/widgets/node.js +0 -284
  876. package/external/blessed/lib/widgets/overlayimage.js +0 -719
  877. package/external/blessed/lib/widgets/progressbar.js +0 -159
  878. package/external/blessed/lib/widgets/prompt.js +0 -122
  879. package/external/blessed/lib/widgets/question.js +0 -118
  880. package/external/blessed/lib/widgets/radiobutton.js +0 -63
  881. package/external/blessed/lib/widgets/radioset.js +0 -38
  882. package/external/blessed/lib/widgets/screen.js +0 -2300
  883. package/external/blessed/lib/widgets/scrollablebox.js +0 -391
  884. package/external/blessed/lib/widgets/scrollabletext.js +0 -37
  885. package/external/blessed/lib/widgets/table.js +0 -356
  886. package/external/blessed/lib/widgets/terminal.js +0 -414
  887. package/external/blessed/lib/widgets/text.js +0 -37
  888. package/external/blessed/lib/widgets/textarea.js +0 -344
  889. package/external/blessed/lib/widgets/textbox.js +0 -79
  890. package/external/blessed/lib/widgets/video.js +0 -128
  891. package/external/blessed/usr/fonts/AUTHORS +0 -1
  892. package/external/blessed/usr/fonts/LICENSE +0 -94
  893. package/external/blessed/usr/fonts/README +0 -340
  894. package/external/blessed/usr/fonts/ter-u14b.json +0 -17826
  895. package/external/blessed/usr/fonts/ter-u14n.json +0 -17826
  896. package/external/blessed/usr/linux +0 -0
  897. package/external/blessed/usr/windows-ansi +0 -0
  898. package/external/blessed/usr/xterm +0 -0
  899. package/external/blessed/usr/xterm-256color +0 -0
  900. package/external/blessed/usr/xterm.termcap +0 -243
  901. package/external/blessed/usr/xterm.terminfo +0 -1977
  902. package/external/blessed/vendor/tng.js +0 -1757
  903. package/external/blessed-contrib/LICENSE.md +0 -21
  904. package/external/blessed-contrib/lib/layout/grid.js +0 -409
  905. package/external/blessed-contrib/lib/widget/charts/bar.js +0 -8370
  906. package/external/blessed-contrib/lib/widget/charts/line.js +0 -17924
  907. package/external/blessed-contrib/lib/widget/table.js +0 -187
  908. package/shadow-bin/npm +0 -27
  909. package/shadow-bin/npx +0 -27
  910. package/shadow-bin/pnpm +0 -27
  911. package/shadow-bin/yarn +0 -27
  912. /package/{translations.json → data/alert-translations.json} +0 -0
  913. /package/{requirements.json → data/command-api-requirements.json} +0 -0
  914. /package/{dist → data}/socket-completion.bash +0 -0
@@ -1,2618 +0,0 @@
1
- 'use strict'
2
-
3
- const re = { exports: {} }
4
-
5
- let constants
6
- let hasRequiredConstants
7
- function requireConstants() {
8
- if (hasRequiredConstants) {
9
- return constants
10
- }
11
- hasRequiredConstants = 1
12
-
13
- // Note: this is the semver.org version of the spec that it implements
14
- // Not necessarily the package version of this code.
15
- const SEMVER_SPEC_VERSION = '2.0.0'
16
- const MAX_LENGTH = 256
17
- const MAX_SAFE_INTEGER =
18
- Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991
19
-
20
- // Max safe segment length for coercion.
21
- const MAX_SAFE_COMPONENT_LENGTH = 16
22
-
23
- // Max safe length for a build identifier. The max length minus 6 characters for
24
- // the shortest version with a build 0.0.0+BUILD.
25
- const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
26
- const RELEASE_TYPES = [
27
- 'major',
28
- 'premajor',
29
- 'minor',
30
- 'preminor',
31
- 'patch',
32
- 'prepatch',
33
- 'prerelease'
34
- ]
35
- constants = {
36
- MAX_LENGTH,
37
- MAX_SAFE_COMPONENT_LENGTH,
38
- MAX_SAFE_BUILD_LENGTH,
39
- MAX_SAFE_INTEGER,
40
- RELEASE_TYPES,
41
- SEMVER_SPEC_VERSION,
42
- FLAG_INCLUDE_PRERELEASE: 0b001,
43
- FLAG_LOOSE: 0b010
44
- }
45
- return constants
46
- }
47
-
48
- let debug_1
49
- let hasRequiredDebug
50
- function requireDebug() {
51
- if (hasRequiredDebug) {
52
- return debug_1
53
- }
54
- hasRequiredDebug = 1
55
- const debug =
56
- typeof process === 'object' &&
57
- process.env &&
58
- process.env.NODE_DEBUG &&
59
- /\bsemver\b/i.test(process.env.NODE_DEBUG)
60
- ? (...args) => console.error('SEMVER', ...args)
61
- : () => {}
62
- debug_1 = debug
63
- return debug_1
64
- }
65
-
66
- let hasRequiredRe
67
- function requireRe() {
68
- if (hasRequiredRe) {
69
- return re.exports
70
- }
71
- hasRequiredRe = 1
72
- ;(function (module, exports) {
73
- const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } =
74
- requireConstants()
75
- const debug = requireDebug()
76
- exports = module.exports = {}
77
-
78
- // The actual regexps go on exports.re
79
- const re = (exports.re = [])
80
- const safeRe = (exports.safeRe = [])
81
- const src = (exports.src = [])
82
- const safeSrc = (exports.safeSrc = [])
83
- const t = (exports.t = {})
84
- let R = 0
85
- const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
86
-
87
- // Replace some greedy regex tokens to prevent regex dos issues. These regex are
88
- // used internally via the safeRe object since all inputs in this library get
89
- // normalized first to trim and collapse all extra whitespace. The original
90
- // regexes are exported for userland consumption and lower level usage. A
91
- // future breaking change could export the safer regex only with a note that
92
- // all input should have extra whitespace removed.
93
- const safeRegexReplacements = [
94
- ['\\s', 1],
95
- ['\\d', MAX_LENGTH],
96
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
97
- ]
98
- const makeSafeRegex = value => {
99
- for (const [token, max] of safeRegexReplacements) {
100
- value = value
101
- .split(`${token}*`)
102
- .join(`${token}{0,${max}}`)
103
- .split(`${token}+`)
104
- .join(`${token}{1,${max}}`)
105
- }
106
- return value
107
- }
108
- const createToken = (name, value, isGlobal) => {
109
- const safe = makeSafeRegex(value)
110
- const index = R++
111
- debug(name, index, value)
112
- t[name] = index
113
- src[index] = value
114
- safeSrc[index] = safe
115
- re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
116
- safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
117
- }
118
-
119
- // The following Regular Expressions can be used for tokenizing,
120
- // validating, and parsing SemVer version strings.
121
-
122
- // ## Numeric Identifier
123
- // A single `0`, or a non-zero digit followed by zero or more digits.
124
-
125
- createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
126
- createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
127
-
128
- // ## Non-numeric Identifier
129
- // Zero or more digits, followed by a letter or hyphen, and then zero or
130
- // more letters, digits, or hyphens.
131
-
132
- createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
133
-
134
- // ## Main Version
135
- // Three dot-separated numeric identifiers.
136
-
137
- createToken(
138
- 'MAINVERSION',
139
- `(${src[t.NUMERICIDENTIFIER]})\\.` +
140
- `(${src[t.NUMERICIDENTIFIER]})\\.` +
141
- `(${src[t.NUMERICIDENTIFIER]})`
142
- )
143
- createToken(
144
- 'MAINVERSIONLOOSE',
145
- `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
146
- `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
147
- `(${src[t.NUMERICIDENTIFIERLOOSE]})`
148
- )
149
-
150
- // ## Pre-release Version Identifier
151
- // A numeric identifier, or a non-numeric identifier.
152
- // Non-numberic identifiers include numberic identifiers but can be longer.
153
- // Therefore non-numberic identifiers must go first.
154
-
155
- createToken(
156
- 'PRERELEASEIDENTIFIER',
157
- `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`
158
- )
159
- createToken(
160
- 'PRERELEASEIDENTIFIERLOOSE',
161
- `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`
162
- )
163
-
164
- // ## Pre-release Version
165
- // Hyphen, followed by one or more dot-separated pre-release version
166
- // identifiers.
167
-
168
- createToken(
169
- 'PRERELEASE',
170
- `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`
171
- )
172
- createToken(
173
- 'PRERELEASELOOSE',
174
- `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`
175
- )
176
-
177
- // ## Build Metadata Identifier
178
- // Any combination of digits, letters, or hyphens.
179
-
180
- createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
181
-
182
- // ## Build Metadata
183
- // Plus sign, followed by one or more period-separated build metadata
184
- // identifiers.
185
-
186
- createToken(
187
- 'BUILD',
188
- `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`
189
- )
190
-
191
- // ## Full Version String
192
- // A main version, followed optionally by a pre-release version and
193
- // build metadata.
194
-
195
- // Note that the only major, minor, patch, and pre-release sections of
196
- // the version string are capturing groups. The build metadata is not a
197
- // capturing group, because it should not ever be used in version
198
- // comparison.
199
-
200
- createToken(
201
- 'FULLPLAIN',
202
- `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`
203
- )
204
- createToken('FULL', `^${src[t.FULLPLAIN]}$`)
205
-
206
- // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
207
- // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
208
- // common in the npm registry.
209
- createToken(
210
- 'LOOSEPLAIN',
211
- `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`
212
- )
213
- createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
214
- createToken('GTLT', '((?:<|>)?=?)')
215
-
216
- // Something like "2.*" or "1.2.x".
217
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
218
- // Only the first item is strictly required.
219
- createToken(
220
- 'XRANGEIDENTIFIERLOOSE',
221
- `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`
222
- )
223
- createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
224
- createToken(
225
- 'XRANGEPLAIN',
226
- `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
227
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
228
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
229
- `(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?` +
230
- `)?)?`
231
- )
232
- createToken(
233
- 'XRANGEPLAINLOOSE',
234
- `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
235
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
236
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
237
- `(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?` +
238
- `)?)?`
239
- )
240
- createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
241
- createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
242
-
243
- // Coercion.
244
- // Extract anything that could conceivably be a part of a valid semver
245
- createToken(
246
- 'COERCEPLAIN',
247
- `${'(^|[^\\d])' + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
248
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
249
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`
250
- )
251
- createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
252
- createToken(
253
- 'COERCEFULL',
254
- src[t.COERCEPLAIN] +
255
- `(?:${src[t.PRERELEASE]})?` +
256
- `(?:${src[t.BUILD]})?` +
257
- `(?:$|[^\\d])`
258
- )
259
- createToken('COERCERTL', src[t.COERCE], true)
260
- createToken('COERCERTLFULL', src[t.COERCEFULL], true)
261
-
262
- // Tilde ranges.
263
- // Meaning is "reasonably at or greater than"
264
- createToken('LONETILDE', '(?:~>?)')
265
- createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
266
- exports.tildeTrimReplace = '$1~'
267
- createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
268
- createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
269
-
270
- // Caret ranges.
271
- // Meaning is "at least and backwards compatible with"
272
- createToken('LONECARET', '(?:\\^)')
273
- createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
274
- exports.caretTrimReplace = '$1^'
275
- createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
276
- createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
277
-
278
- // A simple gt/lt/eq thing, or just "" to indicate "any version"
279
- createToken(
280
- 'COMPARATORLOOSE',
281
- `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`
282
- )
283
- createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
284
-
285
- // An expression to strip any whitespace between the gtlt and the thing
286
- // it modifies, so that `> 1.2.3` ==> `>1.2.3`
287
- createToken(
288
- 'COMPARATORTRIM',
289
- `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,
290
- true
291
- )
292
- exports.comparatorTrimReplace = '$1$2$3'
293
-
294
- // Something like `1.2.3 - 1.2.4`
295
- // Note that these all use the loose form, because they'll be
296
- // checked against either the strict or loose comparator form
297
- // later.
298
- createToken(
299
- 'HYPHENRANGE',
300
- `^\\s*(${src[t.XRANGEPLAIN]})` +
301
- `\\s+-\\s+` +
302
- `(${src[t.XRANGEPLAIN]})` +
303
- `\\s*$`
304
- )
305
- createToken(
306
- 'HYPHENRANGELOOSE',
307
- `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
308
- `\\s+-\\s+` +
309
- `(${src[t.XRANGEPLAINLOOSE]})` +
310
- `\\s*$`
311
- )
312
-
313
- // Star ranges basically just allow anything at all.
314
- createToken('STAR', '(<|>)?=?\\s*\\*')
315
- // >=0.0.0 is like a star
316
- createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
317
- createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
318
- })(re, re.exports)
319
- return re.exports
320
- }
321
-
322
- let parseOptions_1
323
- let hasRequiredParseOptions
324
- function requireParseOptions() {
325
- if (hasRequiredParseOptions) {
326
- return parseOptions_1
327
- }
328
- hasRequiredParseOptions = 1
329
-
330
- // parse out just the options we care about
331
- const looseOption = Object.freeze({
332
- loose: true
333
- })
334
- const emptyOpts = Object.freeze({})
335
- const parseOptions = options => {
336
- if (!options) {
337
- return emptyOpts
338
- }
339
- if (typeof options !== 'object') {
340
- return looseOption
341
- }
342
- return options
343
- }
344
- parseOptions_1 = parseOptions
345
- return parseOptions_1
346
- }
347
-
348
- let identifiers
349
- let hasRequiredIdentifiers
350
- function requireIdentifiers() {
351
- if (hasRequiredIdentifiers) {
352
- return identifiers
353
- }
354
- hasRequiredIdentifiers = 1
355
- const numeric = /^[0-9]+$/
356
- const compareIdentifiers = (a, b) => {
357
- const anum = numeric.test(a)
358
- const bnum = numeric.test(b)
359
- if (anum && bnum) {
360
- a = +a
361
- b = +b
362
- }
363
- return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1
364
- }
365
- const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
366
- identifiers = {
367
- compareIdentifiers,
368
- rcompareIdentifiers
369
- }
370
- return identifiers
371
- }
372
-
373
- let semver$1
374
- let hasRequiredSemver$1
375
- function requireSemver$1() {
376
- if (hasRequiredSemver$1) {
377
- return semver$1
378
- }
379
- hasRequiredSemver$1 = 1
380
- const debug = requireDebug()
381
- const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants()
382
- const { safeRe: re, t } = requireRe()
383
- const parseOptions = requireParseOptions()
384
- const { compareIdentifiers } = requireIdentifiers()
385
- class SemVer {
386
- constructor(version, options) {
387
- options = parseOptions(options)
388
- if (version instanceof SemVer) {
389
- if (
390
- version.loose === !!options.loose &&
391
- version.includePrerelease === !!options.includePrerelease
392
- ) {
393
- return version
394
- } else {
395
- version = version.version
396
- }
397
- } else if (typeof version !== 'string') {
398
- throw new TypeError(
399
- `Invalid version. Must be a string. Got type "${typeof version}".`
400
- )
401
- }
402
- if (version.length > MAX_LENGTH) {
403
- throw new TypeError(`version is longer than ${MAX_LENGTH} characters`)
404
- }
405
- debug('SemVer', version, options)
406
- this.options = options
407
- this.loose = !!options.loose
408
- // this isn't actually relevant for versions, but keep it so that we
409
- // don't run into trouble passing this.options around.
410
- this.includePrerelease = !!options.includePrerelease
411
- const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
412
- if (!m) {
413
- throw new TypeError(`Invalid Version: ${version}`)
414
- }
415
- this.raw = version
416
-
417
- // these are actually numbers
418
- this.major = +m[1]
419
- this.minor = +m[2]
420
- this.patch = +m[3]
421
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
422
- throw new TypeError('Invalid major version')
423
- }
424
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
425
- throw new TypeError('Invalid minor version')
426
- }
427
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
428
- throw new TypeError('Invalid patch version')
429
- }
430
-
431
- // numberify any prerelease numeric ids
432
- if (!m[4]) {
433
- this.prerelease = []
434
- } else {
435
- this.prerelease = m[4].split('.').map(id => {
436
- if (/^[0-9]+$/.test(id)) {
437
- const num = +id
438
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
439
- return num
440
- }
441
- }
442
- return id
443
- })
444
- }
445
- this.build = m[5] ? m[5].split('.') : []
446
- this.format()
447
- }
448
- format() {
449
- this.version = `${this.major}.${this.minor}.${this.patch}`
450
- if (this.prerelease.length) {
451
- this.version += `-${this.prerelease.join('.')}`
452
- }
453
- return this.version
454
- }
455
- toString() {
456
- return this.version
457
- }
458
- compare(other) {
459
- debug('SemVer.compare', this.version, this.options, other)
460
- if (!(other instanceof SemVer)) {
461
- if (typeof other === 'string' && other === this.version) {
462
- return 0
463
- }
464
- other = new SemVer(other, this.options)
465
- }
466
- if (other.version === this.version) {
467
- return 0
468
- }
469
- return this.compareMain(other) || this.comparePre(other)
470
- }
471
- compareMain(other) {
472
- if (!(other instanceof SemVer)) {
473
- other = new SemVer(other, this.options)
474
- }
475
- return (
476
- compareIdentifiers(this.major, other.major) ||
477
- compareIdentifiers(this.minor, other.minor) ||
478
- compareIdentifiers(this.patch, other.patch)
479
- )
480
- }
481
- comparePre(other) {
482
- if (!(other instanceof SemVer)) {
483
- other = new SemVer(other, this.options)
484
- }
485
-
486
- // NOT having a prerelease is > having one
487
- if (this.prerelease.length && !other.prerelease.length) {
488
- return -1
489
- } else if (!this.prerelease.length && other.prerelease.length) {
490
- return 1
491
- } else if (!this.prerelease.length && !other.prerelease.length) {
492
- return 0
493
- }
494
- let i = 0
495
- do {
496
- const a = this.prerelease[i]
497
- const b = other.prerelease[i]
498
- debug('prerelease compare', i, a, b)
499
- if (a === undefined && b === undefined) {
500
- return 0
501
- } else if (b === undefined) {
502
- return 1
503
- } else if (a === undefined) {
504
- return -1
505
- } else if (a === b) {
506
- continue
507
- } else {
508
- return compareIdentifiers(a, b)
509
- }
510
- } while (++i)
511
- }
512
- compareBuild(other) {
513
- if (!(other instanceof SemVer)) {
514
- other = new SemVer(other, this.options)
515
- }
516
- let i = 0
517
- do {
518
- const a = this.build[i]
519
- const b = other.build[i]
520
- debug('build compare', i, a, b)
521
- if (a === undefined && b === undefined) {
522
- return 0
523
- } else if (b === undefined) {
524
- return 1
525
- } else if (a === undefined) {
526
- return -1
527
- } else if (a === b) {
528
- continue
529
- } else {
530
- return compareIdentifiers(a, b)
531
- }
532
- } while (++i)
533
- }
534
-
535
- // preminor will bump the version up to the next minor release, and immediately
536
- // down to pre-release. premajor and prepatch work the same way.
537
- inc(release, identifier, identifierBase) {
538
- if (release.startsWith('pre')) {
539
- if (!identifier && identifierBase === false) {
540
- throw new Error('invalid increment argument: identifier is empty')
541
- }
542
- // Avoid an invalid semver results
543
- if (identifier) {
544
- const match = `-${identifier}`.match(
545
- this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]
546
- )
547
- if (!match || match[1] !== identifier) {
548
- throw new Error(`invalid identifier: ${identifier}`)
549
- }
550
- }
551
- }
552
- switch (release) {
553
- case 'premajor':
554
- this.prerelease.length = 0
555
- this.patch = 0
556
- this.minor = 0
557
- this.major++
558
- this.inc('pre', identifier, identifierBase)
559
- break
560
- case 'preminor':
561
- this.prerelease.length = 0
562
- this.patch = 0
563
- this.minor++
564
- this.inc('pre', identifier, identifierBase)
565
- break
566
- case 'prepatch':
567
- // If this is already a prerelease, it will bump to the next version
568
- // drop any prereleases that might already exist, since they are not
569
- // relevant at this point.
570
- this.prerelease.length = 0
571
- this.inc('patch', identifier, identifierBase)
572
- this.inc('pre', identifier, identifierBase)
573
- break
574
- // If the input is a non-prerelease version, this acts the same as
575
- // prepatch.
576
- case 'prerelease':
577
- if (this.prerelease.length === 0) {
578
- this.inc('patch', identifier, identifierBase)
579
- }
580
- this.inc('pre', identifier, identifierBase)
581
- break
582
- case 'release':
583
- if (this.prerelease.length === 0) {
584
- throw new Error(`version ${this.raw} is not a prerelease`)
585
- }
586
- this.prerelease.length = 0
587
- break
588
- case 'major':
589
- // If this is a pre-major version, bump up to the same major version.
590
- // Otherwise increment major.
591
- // 1.0.0-5 bumps to 1.0.0
592
- // 1.1.0 bumps to 2.0.0
593
- if (
594
- this.minor !== 0 ||
595
- this.patch !== 0 ||
596
- this.prerelease.length === 0
597
- ) {
598
- this.major++
599
- }
600
- this.minor = 0
601
- this.patch = 0
602
- this.prerelease = []
603
- break
604
- case 'minor':
605
- // If this is a pre-minor version, bump up to the same minor version.
606
- // Otherwise increment minor.
607
- // 1.2.0-5 bumps to 1.2.0
608
- // 1.2.1 bumps to 1.3.0
609
- if (this.patch !== 0 || this.prerelease.length === 0) {
610
- this.minor++
611
- }
612
- this.patch = 0
613
- this.prerelease = []
614
- break
615
- case 'patch':
616
- // If this is not a pre-release version, it will increment the patch.
617
- // If it is a pre-release it will bump up to the same patch version.
618
- // 1.2.0-5 patches to 1.2.0
619
- // 1.2.0 patches to 1.2.1
620
- if (this.prerelease.length === 0) {
621
- this.patch++
622
- }
623
- this.prerelease = []
624
- break
625
- // This probably shouldn't be used publicly.
626
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
627
- case 'pre': {
628
- const base = Number(identifierBase) ? 1 : 0
629
- if (this.prerelease.length === 0) {
630
- this.prerelease = [base]
631
- } else {
632
- let i = this.prerelease.length
633
- while (--i >= 0) {
634
- if (typeof this.prerelease[i] === 'number') {
635
- this.prerelease[i]++
636
- i = -2
637
- }
638
- }
639
- if (i === -1) {
640
- // didn't increment anything
641
- if (
642
- identifier === this.prerelease.join('.') &&
643
- identifierBase === false
644
- ) {
645
- throw new Error(
646
- 'invalid increment argument: identifier already exists'
647
- )
648
- }
649
- this.prerelease.push(base)
650
- }
651
- }
652
- if (identifier) {
653
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
654
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
655
- let prerelease = [identifier, base]
656
- if (identifierBase === false) {
657
- prerelease = [identifier]
658
- }
659
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
660
- if (isNaN(this.prerelease[1])) {
661
- this.prerelease = prerelease
662
- }
663
- } else {
664
- this.prerelease = prerelease
665
- }
666
- }
667
- break
668
- }
669
- default:
670
- throw new Error(`invalid increment argument: ${release}`)
671
- }
672
- this.raw = this.format()
673
- if (this.build.length) {
674
- this.raw += `+${this.build.join('.')}`
675
- }
676
- return this
677
- }
678
- }
679
- semver$1 = SemVer
680
- return semver$1
681
- }
682
-
683
- let parse_1
684
- let hasRequiredParse
685
- function requireParse() {
686
- if (hasRequiredParse) {
687
- return parse_1
688
- }
689
- hasRequiredParse = 1
690
- const SemVer = requireSemver$1()
691
- const parse = (version, options, throwErrors = false) => {
692
- if (version instanceof SemVer) {
693
- return version
694
- }
695
- try {
696
- return new SemVer(version, options)
697
- } catch (er) {
698
- if (!throwErrors) {
699
- return null
700
- }
701
- throw er
702
- }
703
- }
704
- parse_1 = parse
705
- return parse_1
706
- }
707
-
708
- let valid_1
709
- let hasRequiredValid$1
710
- function requireValid$1() {
711
- if (hasRequiredValid$1) {
712
- return valid_1
713
- }
714
- hasRequiredValid$1 = 1
715
- const parse = requireParse()
716
- const valid = (version, options) => {
717
- const v = parse(version, options)
718
- return v ? v.version : null
719
- }
720
- valid_1 = valid
721
- return valid_1
722
- }
723
-
724
- let clean_1
725
- let hasRequiredClean
726
- function requireClean() {
727
- if (hasRequiredClean) {
728
- return clean_1
729
- }
730
- hasRequiredClean = 1
731
- const parse = requireParse()
732
- const clean = (version, options) => {
733
- const s = parse(version.trim().replace(/^[=v]+/, ''), options)
734
- return s ? s.version : null
735
- }
736
- clean_1 = clean
737
- return clean_1
738
- }
739
-
740
- let inc_1
741
- let hasRequiredInc
742
- function requireInc() {
743
- if (hasRequiredInc) {
744
- return inc_1
745
- }
746
- hasRequiredInc = 1
747
- const SemVer = requireSemver$1()
748
- const inc = (version, release, options, identifier, identifierBase) => {
749
- if (typeof options === 'string') {
750
- identifierBase = identifier
751
- identifier = options
752
- options = undefined
753
- }
754
- try {
755
- return new SemVer(
756
- version instanceof SemVer ? version.version : version,
757
- options
758
- ).inc(release, identifier, identifierBase).version
759
- } catch (er) {
760
- return null
761
- }
762
- }
763
- inc_1 = inc
764
- return inc_1
765
- }
766
-
767
- let diff_1
768
- let hasRequiredDiff
769
- function requireDiff() {
770
- if (hasRequiredDiff) {
771
- return diff_1
772
- }
773
- hasRequiredDiff = 1
774
- const parse = requireParse()
775
- const diff = (version1, version2) => {
776
- const v1 = parse(version1, null, true)
777
- const v2 = parse(version2, null, true)
778
- const comparison = v1.compare(v2)
779
- if (comparison === 0) {
780
- return null
781
- }
782
- const v1Higher = comparison > 0
783
- const highVersion = v1Higher ? v1 : v2
784
- const lowVersion = v1Higher ? v2 : v1
785
- const highHasPre = !!highVersion.prerelease.length
786
- const lowHasPre = !!lowVersion.prerelease.length
787
- if (lowHasPre && !highHasPre) {
788
- // Going from prerelease -> no prerelease requires some special casing
789
-
790
- // If the low version has only a major, then it will always be a major
791
- // Some examples:
792
- // 1.0.0-1 -> 1.0.0
793
- // 1.0.0-1 -> 1.1.1
794
- // 1.0.0-1 -> 2.0.0
795
- if (!lowVersion.patch && !lowVersion.minor) {
796
- return 'major'
797
- }
798
-
799
- // If the main part has no difference
800
- if (lowVersion.compareMain(highVersion) === 0) {
801
- if (lowVersion.minor && !lowVersion.patch) {
802
- return 'minor'
803
- }
804
- return 'patch'
805
- }
806
- }
807
-
808
- // add the `pre` prefix if we are going to a prerelease version
809
- const prefix = highHasPre ? 'pre' : ''
810
- if (v1.major !== v2.major) {
811
- return prefix + 'major'
812
- }
813
- if (v1.minor !== v2.minor) {
814
- return prefix + 'minor'
815
- }
816
- if (v1.patch !== v2.patch) {
817
- return prefix + 'patch'
818
- }
819
-
820
- // high and low are preleases
821
- return 'prerelease'
822
- }
823
- diff_1 = diff
824
- return diff_1
825
- }
826
-
827
- let major_1
828
- let hasRequiredMajor
829
- function requireMajor() {
830
- if (hasRequiredMajor) {
831
- return major_1
832
- }
833
- hasRequiredMajor = 1
834
- const SemVer = requireSemver$1()
835
- const major = (a, loose) => new SemVer(a, loose).major
836
- major_1 = major
837
- return major_1
838
- }
839
-
840
- let minor_1
841
- let hasRequiredMinor
842
- function requireMinor() {
843
- if (hasRequiredMinor) {
844
- return minor_1
845
- }
846
- hasRequiredMinor = 1
847
- const SemVer = requireSemver$1()
848
- const minor = (a, loose) => new SemVer(a, loose).minor
849
- minor_1 = minor
850
- return minor_1
851
- }
852
-
853
- let patch_1
854
- let hasRequiredPatch
855
- function requirePatch() {
856
- if (hasRequiredPatch) {
857
- return patch_1
858
- }
859
- hasRequiredPatch = 1
860
- const SemVer = requireSemver$1()
861
- const patch = (a, loose) => new SemVer(a, loose).patch
862
- patch_1 = patch
863
- return patch_1
864
- }
865
-
866
- let prerelease_1
867
- let hasRequiredPrerelease
868
- function requirePrerelease() {
869
- if (hasRequiredPrerelease) {
870
- return prerelease_1
871
- }
872
- hasRequiredPrerelease = 1
873
- const parse = requireParse()
874
- const prerelease = (version, options) => {
875
- const parsed = parse(version, options)
876
- return parsed && parsed.prerelease.length ? parsed.prerelease : null
877
- }
878
- prerelease_1 = prerelease
879
- return prerelease_1
880
- }
881
-
882
- let compare_1
883
- let hasRequiredCompare
884
- function requireCompare() {
885
- if (hasRequiredCompare) {
886
- return compare_1
887
- }
888
- hasRequiredCompare = 1
889
- const SemVer = requireSemver$1()
890
- const compare = (a, b, loose) =>
891
- new SemVer(a, loose).compare(new SemVer(b, loose))
892
- compare_1 = compare
893
- return compare_1
894
- }
895
-
896
- let rcompare_1
897
- let hasRequiredRcompare
898
- function requireRcompare() {
899
- if (hasRequiredRcompare) {
900
- return rcompare_1
901
- }
902
- hasRequiredRcompare = 1
903
- const compare = requireCompare()
904
- const rcompare = (a, b, loose) => compare(b, a, loose)
905
- rcompare_1 = rcompare
906
- return rcompare_1
907
- }
908
-
909
- let compareLoose_1
910
- let hasRequiredCompareLoose
911
- function requireCompareLoose() {
912
- if (hasRequiredCompareLoose) {
913
- return compareLoose_1
914
- }
915
- hasRequiredCompareLoose = 1
916
- const compare = requireCompare()
917
- const compareLoose = (a, b) => compare(a, b, true)
918
- compareLoose_1 = compareLoose
919
- return compareLoose_1
920
- }
921
-
922
- let compareBuild_1
923
- let hasRequiredCompareBuild
924
- function requireCompareBuild() {
925
- if (hasRequiredCompareBuild) {
926
- return compareBuild_1
927
- }
928
- hasRequiredCompareBuild = 1
929
- const SemVer = requireSemver$1()
930
- const compareBuild = (a, b, loose) => {
931
- const versionA = new SemVer(a, loose)
932
- const versionB = new SemVer(b, loose)
933
- return versionA.compare(versionB) || versionA.compareBuild(versionB)
934
- }
935
- compareBuild_1 = compareBuild
936
- return compareBuild_1
937
- }
938
-
939
- let sort_1
940
- let hasRequiredSort
941
- function requireSort() {
942
- if (hasRequiredSort) {
943
- return sort_1
944
- }
945
- hasRequiredSort = 1
946
- const compareBuild = requireCompareBuild()
947
- const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
948
- sort_1 = sort
949
- return sort_1
950
- }
951
-
952
- let rsort_1
953
- let hasRequiredRsort
954
- function requireRsort() {
955
- if (hasRequiredRsort) {
956
- return rsort_1
957
- }
958
- hasRequiredRsort = 1
959
- const compareBuild = requireCompareBuild()
960
- const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
961
- rsort_1 = rsort
962
- return rsort_1
963
- }
964
-
965
- let gt_1
966
- let hasRequiredGt
967
- function requireGt() {
968
- if (hasRequiredGt) {
969
- return gt_1
970
- }
971
- hasRequiredGt = 1
972
- const compare = requireCompare()
973
- const gt = (a, b, loose) => compare(a, b, loose) > 0
974
- gt_1 = gt
975
- return gt_1
976
- }
977
-
978
- let lt_1
979
- let hasRequiredLt
980
- function requireLt() {
981
- if (hasRequiredLt) {
982
- return lt_1
983
- }
984
- hasRequiredLt = 1
985
- const compare = requireCompare()
986
- const lt = (a, b, loose) => compare(a, b, loose) < 0
987
- lt_1 = lt
988
- return lt_1
989
- }
990
-
991
- let eq_1
992
- let hasRequiredEq
993
- function requireEq() {
994
- if (hasRequiredEq) {
995
- return eq_1
996
- }
997
- hasRequiredEq = 1
998
- const compare = requireCompare()
999
- const eq = (a, b, loose) => compare(a, b, loose) === 0
1000
- eq_1 = eq
1001
- return eq_1
1002
- }
1003
-
1004
- let neq_1
1005
- let hasRequiredNeq
1006
- function requireNeq() {
1007
- if (hasRequiredNeq) {
1008
- return neq_1
1009
- }
1010
- hasRequiredNeq = 1
1011
- const compare = requireCompare()
1012
- const neq = (a, b, loose) => compare(a, b, loose) !== 0
1013
- neq_1 = neq
1014
- return neq_1
1015
- }
1016
-
1017
- let gte_1
1018
- let hasRequiredGte
1019
- function requireGte() {
1020
- if (hasRequiredGte) {
1021
- return gte_1
1022
- }
1023
- hasRequiredGte = 1
1024
- const compare = requireCompare()
1025
- const gte = (a, b, loose) => compare(a, b, loose) >= 0
1026
- gte_1 = gte
1027
- return gte_1
1028
- }
1029
-
1030
- let lte_1
1031
- let hasRequiredLte
1032
- function requireLte() {
1033
- if (hasRequiredLte) {
1034
- return lte_1
1035
- }
1036
- hasRequiredLte = 1
1037
- const compare = requireCompare()
1038
- const lte = (a, b, loose) => compare(a, b, loose) <= 0
1039
- lte_1 = lte
1040
- return lte_1
1041
- }
1042
-
1043
- let cmp_1
1044
- let hasRequiredCmp
1045
- function requireCmp() {
1046
- if (hasRequiredCmp) {
1047
- return cmp_1
1048
- }
1049
- hasRequiredCmp = 1
1050
- const eq = requireEq()
1051
- const neq = requireNeq()
1052
- const gt = requireGt()
1053
- const gte = requireGte()
1054
- const lt = requireLt()
1055
- const lte = requireLte()
1056
- const cmp = (a, op, b, loose) => {
1057
- switch (op) {
1058
- case '===':
1059
- if (typeof a === 'object') {
1060
- a = a.version
1061
- }
1062
- if (typeof b === 'object') {
1063
- b = b.version
1064
- }
1065
- return a === b
1066
- case '!==':
1067
- if (typeof a === 'object') {
1068
- a = a.version
1069
- }
1070
- if (typeof b === 'object') {
1071
- b = b.version
1072
- }
1073
- return a !== b
1074
- case '':
1075
- case '=':
1076
- case '==':
1077
- return eq(a, b, loose)
1078
- case '!=':
1079
- return neq(a, b, loose)
1080
- case '>':
1081
- return gt(a, b, loose)
1082
- case '>=':
1083
- return gte(a, b, loose)
1084
- case '<':
1085
- return lt(a, b, loose)
1086
- case '<=':
1087
- return lte(a, b, loose)
1088
- default:
1089
- throw new TypeError(`Invalid operator: ${op}`)
1090
- }
1091
- }
1092
- cmp_1 = cmp
1093
- return cmp_1
1094
- }
1095
-
1096
- let coerce_1
1097
- let hasRequiredCoerce
1098
- function requireCoerce() {
1099
- if (hasRequiredCoerce) {
1100
- return coerce_1
1101
- }
1102
- hasRequiredCoerce = 1
1103
- const SemVer = requireSemver$1()
1104
- const parse = requireParse()
1105
- const { safeRe: re, t } = requireRe()
1106
- const coerce = (version, options) => {
1107
- if (version instanceof SemVer) {
1108
- return version
1109
- }
1110
- if (typeof version === 'number') {
1111
- version = String(version)
1112
- }
1113
- if (typeof version !== 'string') {
1114
- return null
1115
- }
1116
- options = options || {}
1117
- let match = null
1118
- if (!options.rtl) {
1119
- match = version.match(
1120
- options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]
1121
- )
1122
- } else {
1123
- // Find the right-most coercible string that does not share
1124
- // a terminus with a more left-ward coercible string.
1125
- // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
1126
- // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
1127
- //
1128
- // Walk through the string checking with a /g regexp
1129
- // Manually set the index so as to pick up overlapping matches.
1130
- // Stop when we get a match that ends at the string end, since no
1131
- // coercible string can be more right-ward without the same terminus.
1132
- const coerceRtlRegex = options.includePrerelease
1133
- ? re[t.COERCERTLFULL]
1134
- : re[t.COERCERTL]
1135
- let next
1136
- while (
1137
- (next = coerceRtlRegex.exec(version)) &&
1138
- (!match || match.index + match[0].length !== version.length)
1139
- ) {
1140
- if (
1141
- !match ||
1142
- next.index + next[0].length !== match.index + match[0].length
1143
- ) {
1144
- match = next
1145
- }
1146
- coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
1147
- }
1148
- // leave it in a clean state
1149
- coerceRtlRegex.lastIndex = -1
1150
- }
1151
- if (match === null) {
1152
- return null
1153
- }
1154
- const major = match[2]
1155
- const minor = match[3] || '0'
1156
- const patch = match[4] || '0'
1157
- const prerelease =
1158
- options.includePrerelease && match[5] ? `-${match[5]}` : ''
1159
- const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
1160
- return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
1161
- }
1162
- coerce_1 = coerce
1163
- return coerce_1
1164
- }
1165
-
1166
- let lrucache
1167
- let hasRequiredLrucache
1168
- function requireLrucache() {
1169
- if (hasRequiredLrucache) {
1170
- return lrucache
1171
- }
1172
- hasRequiredLrucache = 1
1173
- class LRUCache {
1174
- constructor() {
1175
- this.max = 1000
1176
- this.map = new Map()
1177
- }
1178
- get(key) {
1179
- const value = this.map.get(key)
1180
- if (value === undefined) {
1181
- return undefined
1182
- } else {
1183
- // Remove the key from the map and add it to the end
1184
- this.map.delete(key)
1185
- this.map.set(key, value)
1186
- return value
1187
- }
1188
- }
1189
- delete(key) {
1190
- return this.map.delete(key)
1191
- }
1192
- set(key, value) {
1193
- const deleted = this.delete(key)
1194
- if (!deleted && value !== undefined) {
1195
- // If cache is full, delete the least recently used item
1196
- if (this.map.size >= this.max) {
1197
- const firstKey = this.map.keys().next().value
1198
- this.delete(firstKey)
1199
- }
1200
- this.map.set(key, value)
1201
- }
1202
- return this
1203
- }
1204
- }
1205
- lrucache = LRUCache
1206
- return lrucache
1207
- }
1208
-
1209
- let range
1210
- let hasRequiredRange
1211
- function requireRange() {
1212
- if (hasRequiredRange) {
1213
- return range
1214
- }
1215
- hasRequiredRange = 1
1216
- const SPACE_CHARACTERS = /\s+/g
1217
-
1218
- // hoisted class for cyclic dependency
1219
- class Range {
1220
- constructor(range, options) {
1221
- options = parseOptions(options)
1222
- if (range instanceof Range) {
1223
- if (
1224
- range.loose === !!options.loose &&
1225
- range.includePrerelease === !!options.includePrerelease
1226
- ) {
1227
- return range
1228
- } else {
1229
- return new Range(range.raw, options)
1230
- }
1231
- }
1232
- if (range instanceof Comparator) {
1233
- // just put it in the set and return
1234
- this.raw = range.value
1235
- this.set = [[range]]
1236
- this.formatted = undefined
1237
- return this
1238
- }
1239
- this.options = options
1240
- this.loose = !!options.loose
1241
- this.includePrerelease = !!options.includePrerelease
1242
-
1243
- // First reduce all whitespace as much as possible so we do not have to rely
1244
- // on potentially slow regexes like \s*. This is then stored and used for
1245
- // future error messages as well.
1246
- this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')
1247
-
1248
- // First, split on ||
1249
- this.set = this.raw
1250
- .split('||')
1251
- // map the range to a 2d array of comparators
1252
- .map(r => this.parseRange(r.trim()))
1253
- // throw out any comparator lists that are empty
1254
- // this generally means that it was not a valid range, which is allowed
1255
- // in loose mode, but will still throw if the WHOLE range is invalid.
1256
- .filter(c => c.length)
1257
- if (!this.set.length) {
1258
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
1259
- }
1260
-
1261
- // if we have any that are not the null set, throw out null sets.
1262
- if (this.set.length > 1) {
1263
- // keep the first one, in case they're all null sets
1264
- const first = this.set[0]
1265
- this.set = this.set.filter(c => !isNullSet(c[0]))
1266
- if (this.set.length === 0) {
1267
- this.set = [first]
1268
- } else if (this.set.length > 1) {
1269
- // if we have any that are *, then the range is just *
1270
- for (const c of this.set) {
1271
- if (c.length === 1 && isAny(c[0])) {
1272
- this.set = [c]
1273
- break
1274
- }
1275
- }
1276
- }
1277
- }
1278
- this.formatted = undefined
1279
- }
1280
- get range() {
1281
- if (this.formatted === undefined) {
1282
- this.formatted = ''
1283
- for (let i = 0; i < this.set.length; i++) {
1284
- if (i > 0) {
1285
- this.formatted += '||'
1286
- }
1287
- const comps = this.set[i]
1288
- for (let k = 0; k < comps.length; k++) {
1289
- if (k > 0) {
1290
- this.formatted += ' '
1291
- }
1292
- this.formatted += comps[k].toString().trim()
1293
- }
1294
- }
1295
- }
1296
- return this.formatted
1297
- }
1298
- format() {
1299
- return this.range
1300
- }
1301
- toString() {
1302
- return this.range
1303
- }
1304
- parseRange(range) {
1305
- // memoize range parsing for performance.
1306
- // this is a very hot path, and fully deterministic.
1307
- const memoOpts =
1308
- (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
1309
- (this.options.loose && FLAG_LOOSE)
1310
- const memoKey = memoOpts + ':' + range
1311
- const cached = cache.get(memoKey)
1312
- if (cached) {
1313
- return cached
1314
- }
1315
- const loose = this.options.loose
1316
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
1317
- const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
1318
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
1319
- debug('hyphen replace', range)
1320
-
1321
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
1322
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
1323
- debug('comparator trim', range)
1324
-
1325
- // `~ 1.2.3` => `~1.2.3`
1326
- range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
1327
- debug('tilde trim', range)
1328
-
1329
- // `^ 1.2.3` => `^1.2.3`
1330
- range = range.replace(re[t.CARETTRIM], caretTrimReplace)
1331
- debug('caret trim', range)
1332
-
1333
- // At this point, the range is completely trimmed and
1334
- // ready to be split into comparators.
1335
-
1336
- let rangeList = range
1337
- .split(' ')
1338
- .map(comp => parseComparator(comp, this.options))
1339
- .join(' ')
1340
- .split(/\s+/)
1341
- // >=0.0.0 is equivalent to *
1342
- .map(comp => replaceGTE0(comp, this.options))
1343
- if (loose) {
1344
- // in loose mode, throw out any that are not valid comparators
1345
- rangeList = rangeList.filter(comp => {
1346
- debug('loose invalid filter', comp, this.options)
1347
- return !!comp.match(re[t.COMPARATORLOOSE])
1348
- })
1349
- }
1350
- debug('range list', rangeList)
1351
-
1352
- // if any comparators are the null set, then replace with JUST null set
1353
- // if more than one comparator, remove any * comparators
1354
- // also, don't include the same comparator more than once
1355
- const rangeMap = new Map()
1356
- const comparators = rangeList.map(
1357
- comp => new Comparator(comp, this.options)
1358
- )
1359
- for (const comp of comparators) {
1360
- if (isNullSet(comp)) {
1361
- return [comp]
1362
- }
1363
- rangeMap.set(comp.value, comp)
1364
- }
1365
- if (rangeMap.size > 1 && rangeMap.has('')) {
1366
- rangeMap.delete('')
1367
- }
1368
- const result = [...rangeMap.values()]
1369
- cache.set(memoKey, result)
1370
- return result
1371
- }
1372
- intersects(range, options) {
1373
- if (!(range instanceof Range)) {
1374
- throw new TypeError('a Range is required')
1375
- }
1376
- return this.set.some(thisComparators => {
1377
- return (
1378
- isSatisfiable(thisComparators, options) &&
1379
- range.set.some(rangeComparators => {
1380
- return (
1381
- isSatisfiable(rangeComparators, options) &&
1382
- thisComparators.every(thisComparator => {
1383
- return rangeComparators.every(rangeComparator => {
1384
- return thisComparator.intersects(rangeComparator, options)
1385
- })
1386
- })
1387
- )
1388
- })
1389
- )
1390
- })
1391
- }
1392
-
1393
- // if ANY of the sets match ALL of its comparators, then pass
1394
- test(version) {
1395
- if (!version) {
1396
- return false
1397
- }
1398
- if (typeof version === 'string') {
1399
- try {
1400
- version = new SemVer(version, this.options)
1401
- } catch (er) {
1402
- return false
1403
- }
1404
- }
1405
- for (let i = 0; i < this.set.length; i++) {
1406
- if (testSet(this.set[i], version, this.options)) {
1407
- return true
1408
- }
1409
- }
1410
- return false
1411
- }
1412
- }
1413
- range = Range
1414
- const LRU = requireLrucache()
1415
- const cache = new LRU()
1416
- const parseOptions = requireParseOptions()
1417
- const Comparator = requireComparator()
1418
- const debug = requireDebug()
1419
- const SemVer = requireSemver$1()
1420
- const {
1421
- safeRe: re,
1422
- t,
1423
- comparatorTrimReplace,
1424
- tildeTrimReplace,
1425
- caretTrimReplace
1426
- } = requireRe()
1427
- const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants()
1428
- const isNullSet = c => c.value === '<0.0.0-0'
1429
- const isAny = c => c.value === ''
1430
-
1431
- // take a set of comparators and determine whether there
1432
- // exists a version which can satisfy it
1433
- const isSatisfiable = (comparators, options) => {
1434
- let result = true
1435
- const remainingComparators = comparators.slice()
1436
- let testComparator = remainingComparators.pop()
1437
- while (result && remainingComparators.length) {
1438
- result = remainingComparators.every(otherComparator => {
1439
- return testComparator.intersects(otherComparator, options)
1440
- })
1441
- testComparator = remainingComparators.pop()
1442
- }
1443
- return result
1444
- }
1445
-
1446
- // comprised of xranges, tildes, stars, and gtlt's at this point.
1447
- // already replaced the hyphen ranges
1448
- // turn into a set of JUST comparators.
1449
- const parseComparator = (comp, options) => {
1450
- debug('comp', comp, options)
1451
- comp = replaceCarets(comp, options)
1452
- debug('caret', comp)
1453
- comp = replaceTildes(comp, options)
1454
- debug('tildes', comp)
1455
- comp = replaceXRanges(comp, options)
1456
- debug('xrange', comp)
1457
- comp = replaceStars(comp, options)
1458
- debug('stars', comp)
1459
- return comp
1460
- }
1461
- const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
1462
-
1463
- // ~, ~> --> * (any, kinda silly)
1464
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
1465
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
1466
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
1467
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
1468
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
1469
- // ~0.0.1 --> >=0.0.1 <0.1.0-0
1470
- const replaceTildes = (comp, options) => {
1471
- return comp
1472
- .trim()
1473
- .split(/\s+/)
1474
- .map(c => replaceTilde(c, options))
1475
- .join(' ')
1476
- }
1477
- const replaceTilde = (comp, options) => {
1478
- const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
1479
- return comp.replace(r, (_, M, m, p, pr) => {
1480
- debug('tilde', comp, _, M, m, p, pr)
1481
- let ret
1482
- if (isX(M)) {
1483
- ret = ''
1484
- } else if (isX(m)) {
1485
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
1486
- } else if (isX(p)) {
1487
- // ~1.2 == >=1.2.0 <1.3.0-0
1488
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
1489
- } else if (pr) {
1490
- debug('replaceTilde pr', pr)
1491
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`
1492
- } else {
1493
- // ~1.2.3 == >=1.2.3 <1.3.0-0
1494
- ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`
1495
- }
1496
- debug('tilde return', ret)
1497
- return ret
1498
- })
1499
- }
1500
-
1501
- // ^ --> * (any, kinda silly)
1502
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
1503
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
1504
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
1505
- // ^1.2.3 --> >=1.2.3 <2.0.0-0
1506
- // ^1.2.0 --> >=1.2.0 <2.0.0-0
1507
- // ^0.0.1 --> >=0.0.1 <0.0.2-0
1508
- // ^0.1.0 --> >=0.1.0 <0.2.0-0
1509
- const replaceCarets = (comp, options) => {
1510
- return comp
1511
- .trim()
1512
- .split(/\s+/)
1513
- .map(c => replaceCaret(c, options))
1514
- .join(' ')
1515
- }
1516
- const replaceCaret = (comp, options) => {
1517
- debug('caret', comp, options)
1518
- const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
1519
- const z = options.includePrerelease ? '-0' : ''
1520
- return comp.replace(r, (_, M, m, p, pr) => {
1521
- debug('caret', comp, _, M, m, p, pr)
1522
- let ret
1523
- if (isX(M)) {
1524
- ret = ''
1525
- } else if (isX(m)) {
1526
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
1527
- } else if (isX(p)) {
1528
- if (M === '0') {
1529
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
1530
- } else {
1531
- ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
1532
- }
1533
- } else if (pr) {
1534
- debug('replaceCaret pr', pr)
1535
- if (M === '0') {
1536
- if (m === '0') {
1537
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`
1538
- } else {
1539
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`
1540
- }
1541
- } else {
1542
- ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`
1543
- }
1544
- } else {
1545
- debug('no pr')
1546
- if (M === '0') {
1547
- if (m === '0') {
1548
- ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`
1549
- } else {
1550
- ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`
1551
- }
1552
- } else {
1553
- ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`
1554
- }
1555
- }
1556
- debug('caret return', ret)
1557
- return ret
1558
- })
1559
- }
1560
- const replaceXRanges = (comp, options) => {
1561
- debug('replaceXRanges', comp, options)
1562
- return comp
1563
- .split(/\s+/)
1564
- .map(c => replaceXRange(c, options))
1565
- .join(' ')
1566
- }
1567
- const replaceXRange = (comp, options) => {
1568
- comp = comp.trim()
1569
- const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
1570
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
1571
- debug('xRange', comp, ret, gtlt, M, m, p, pr)
1572
- const xM = isX(M)
1573
- const xm = xM || isX(m)
1574
- const xp = xm || isX(p)
1575
- const anyX = xp
1576
- if (gtlt === '=' && anyX) {
1577
- gtlt = ''
1578
- }
1579
-
1580
- // if we're including prereleases in the match, then we need
1581
- // to fix this to -0, the lowest possible prerelease value
1582
- pr = options.includePrerelease ? '-0' : ''
1583
- if (xM) {
1584
- if (gtlt === '>' || gtlt === '<') {
1585
- // nothing is allowed
1586
- ret = '<0.0.0-0'
1587
- } else {
1588
- // nothing is forbidden
1589
- ret = '*'
1590
- }
1591
- } else if (gtlt && anyX) {
1592
- // we know patch is an x, because we have any x at all.
1593
- // replace X with 0
1594
- if (xm) {
1595
- m = 0
1596
- }
1597
- p = 0
1598
- if (gtlt === '>') {
1599
- // >1 => >=2.0.0
1600
- // >1.2 => >=1.3.0
1601
- gtlt = '>='
1602
- if (xm) {
1603
- M = +M + 1
1604
- m = 0
1605
- p = 0
1606
- } else {
1607
- m = +m + 1
1608
- p = 0
1609
- }
1610
- } else if (gtlt === '<=') {
1611
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
1612
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
1613
- gtlt = '<'
1614
- if (xm) {
1615
- M = +M + 1
1616
- } else {
1617
- m = +m + 1
1618
- }
1619
- }
1620
- if (gtlt === '<') {
1621
- pr = '-0'
1622
- }
1623
- ret = `${gtlt + M}.${m}.${p}${pr}`
1624
- } else if (xm) {
1625
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
1626
- } else if (xp) {
1627
- ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`
1628
- }
1629
- debug('xRange return', ret)
1630
- return ret
1631
- })
1632
- }
1633
-
1634
- // Because * is AND-ed with everything else in the comparator,
1635
- // and '' means "any version", just remove the *s entirely.
1636
- const replaceStars = (comp, options) => {
1637
- debug('replaceStars', comp, options)
1638
- // Looseness is ignored here. star is always as loose as it gets!
1639
- return comp.trim().replace(re[t.STAR], '')
1640
- }
1641
- const replaceGTE0 = (comp, options) => {
1642
- debug('replaceGTE0', comp, options)
1643
- return comp
1644
- .trim()
1645
- .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
1646
- }
1647
-
1648
- // This function is passed to string.replace(re[t.HYPHENRANGE])
1649
- // M, m, patch, prerelease, build
1650
- // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
1651
- // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
1652
- // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
1653
- // TODO build?
1654
- const hyphenReplace =
1655
- incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1656
- if (isX(fM)) {
1657
- from = ''
1658
- } else if (isX(fm)) {
1659
- from = `>=${fM}.0.0${incPr ? '-0' : ''}`
1660
- } else if (isX(fp)) {
1661
- from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
1662
- } else if (fpr) {
1663
- from = `>=${from}`
1664
- } else {
1665
- from = `>=${from}${incPr ? '-0' : ''}`
1666
- }
1667
- if (isX(tM)) {
1668
- to = ''
1669
- } else if (isX(tm)) {
1670
- to = `<${+tM + 1}.0.0-0`
1671
- } else if (isX(tp)) {
1672
- to = `<${tM}.${+tm + 1}.0-0`
1673
- } else if (tpr) {
1674
- to = `<=${tM}.${tm}.${tp}-${tpr}`
1675
- } else if (incPr) {
1676
- to = `<${tM}.${tm}.${+tp + 1}-0`
1677
- } else {
1678
- to = `<=${to}`
1679
- }
1680
- return `${from} ${to}`.trim()
1681
- }
1682
- const testSet = (set, version, options) => {
1683
- for (let i = 0; i < set.length; i++) {
1684
- if (!set[i].test(version)) {
1685
- return false
1686
- }
1687
- }
1688
- if (version.prerelease.length && !options.includePrerelease) {
1689
- // Find the set of versions that are allowed to have prereleases
1690
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
1691
- // That should allow `1.2.3-pr.2` to pass.
1692
- // However, `1.2.4-alpha.notready` should NOT be allowed,
1693
- // even though it's within the range set by the comparators.
1694
- for (let i = 0; i < set.length; i++) {
1695
- debug(set[i].semver)
1696
- if (set[i].semver === Comparator.ANY) {
1697
- continue
1698
- }
1699
- if (set[i].semver.prerelease.length > 0) {
1700
- const allowed = set[i].semver
1701
- if (
1702
- allowed.major === version.major &&
1703
- allowed.minor === version.minor &&
1704
- allowed.patch === version.patch
1705
- ) {
1706
- return true
1707
- }
1708
- }
1709
- }
1710
-
1711
- // Version has a -pre, but it's not one of the ones we like.
1712
- return false
1713
- }
1714
- return true
1715
- }
1716
- return range
1717
- }
1718
-
1719
- let comparator
1720
- let hasRequiredComparator
1721
- function requireComparator() {
1722
- if (hasRequiredComparator) {
1723
- return comparator
1724
- }
1725
- hasRequiredComparator = 1
1726
- const ANY = Symbol('SemVer ANY')
1727
- // hoisted class for cyclic dependency
1728
- class Comparator {
1729
- static get ANY() {
1730
- return ANY
1731
- }
1732
- constructor(comp, options) {
1733
- options = parseOptions(options)
1734
- if (comp instanceof Comparator) {
1735
- if (comp.loose === !!options.loose) {
1736
- return comp
1737
- } else {
1738
- comp = comp.value
1739
- }
1740
- }
1741
- comp = comp.trim().split(/\s+/).join(' ')
1742
- debug('comparator', comp, options)
1743
- this.options = options
1744
- this.loose = !!options.loose
1745
- this.parse(comp)
1746
- if (this.semver === ANY) {
1747
- this.value = ''
1748
- } else {
1749
- this.value = this.operator + this.semver.version
1750
- }
1751
- debug('comp', this)
1752
- }
1753
- parse(comp) {
1754
- const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
1755
- const m = comp.match(r)
1756
- if (!m) {
1757
- throw new TypeError(`Invalid comparator: ${comp}`)
1758
- }
1759
- this.operator = m[1] !== undefined ? m[1] : ''
1760
- if (this.operator === '=') {
1761
- this.operator = ''
1762
- }
1763
-
1764
- // if it literally is just '>' or '' then allow anything.
1765
- if (!m[2]) {
1766
- this.semver = ANY
1767
- } else {
1768
- this.semver = new SemVer(m[2], this.options.loose)
1769
- }
1770
- }
1771
- toString() {
1772
- return this.value
1773
- }
1774
- test(version) {
1775
- debug('Comparator.test', version, this.options.loose)
1776
- if (this.semver === ANY || version === ANY) {
1777
- return true
1778
- }
1779
- if (typeof version === 'string') {
1780
- try {
1781
- version = new SemVer(version, this.options)
1782
- } catch (er) {
1783
- return false
1784
- }
1785
- }
1786
- return cmp(version, this.operator, this.semver, this.options)
1787
- }
1788
- intersects(comp, options) {
1789
- if (!(comp instanceof Comparator)) {
1790
- throw new TypeError('a Comparator is required')
1791
- }
1792
- if (this.operator === '') {
1793
- if (this.value === '') {
1794
- return true
1795
- }
1796
- return new Range(comp.value, options).test(this.value)
1797
- } else if (comp.operator === '') {
1798
- if (comp.value === '') {
1799
- return true
1800
- }
1801
- return new Range(this.value, options).test(comp.semver)
1802
- }
1803
- options = parseOptions(options)
1804
-
1805
- // Special cases where nothing can possibly be lower
1806
- if (
1807
- options.includePrerelease &&
1808
- (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')
1809
- ) {
1810
- return false
1811
- }
1812
- if (
1813
- !options.includePrerelease &&
1814
- (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))
1815
- ) {
1816
- return false
1817
- }
1818
-
1819
- // Same direction increasing (> or >=)
1820
- if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
1821
- return true
1822
- }
1823
- // Same direction decreasing (< or <=)
1824
- if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
1825
- return true
1826
- }
1827
- // same SemVer and both sides are inclusive (<= or >=)
1828
- if (
1829
- this.semver.version === comp.semver.version &&
1830
- this.operator.includes('=') &&
1831
- comp.operator.includes('=')
1832
- ) {
1833
- return true
1834
- }
1835
- // opposite directions less than
1836
- if (
1837
- cmp(this.semver, '<', comp.semver, options) &&
1838
- this.operator.startsWith('>') &&
1839
- comp.operator.startsWith('<')
1840
- ) {
1841
- return true
1842
- }
1843
- // opposite directions greater than
1844
- if (
1845
- cmp(this.semver, '>', comp.semver, options) &&
1846
- this.operator.startsWith('<') &&
1847
- comp.operator.startsWith('>')
1848
- ) {
1849
- return true
1850
- }
1851
- return false
1852
- }
1853
- }
1854
- comparator = Comparator
1855
- const parseOptions = requireParseOptions()
1856
- const { safeRe: re, t } = requireRe()
1857
- const cmp = requireCmp()
1858
- const debug = requireDebug()
1859
- const SemVer = requireSemver$1()
1860
- const Range = requireRange()
1861
- return comparator
1862
- }
1863
-
1864
- let satisfies_1
1865
- let hasRequiredSatisfies
1866
- function requireSatisfies() {
1867
- if (hasRequiredSatisfies) {
1868
- return satisfies_1
1869
- }
1870
- hasRequiredSatisfies = 1
1871
- const Range = requireRange()
1872
- const satisfies = (version, range, options) => {
1873
- try {
1874
- range = new Range(range, options)
1875
- } catch (er) {
1876
- return false
1877
- }
1878
- return range.test(version)
1879
- }
1880
- satisfies_1 = satisfies
1881
- return satisfies_1
1882
- }
1883
-
1884
- let toComparators_1
1885
- let hasRequiredToComparators
1886
- function requireToComparators() {
1887
- if (hasRequiredToComparators) {
1888
- return toComparators_1
1889
- }
1890
- hasRequiredToComparators = 1
1891
- const Range = requireRange()
1892
-
1893
- // Mostly just for testing and legacy API reasons
1894
- const toComparators = (range, options) =>
1895
- new Range(range, options).set.map(comp =>
1896
- comp
1897
- .map(c => c.value)
1898
- .join(' ')
1899
- .trim()
1900
- .split(' ')
1901
- )
1902
- toComparators_1 = toComparators
1903
- return toComparators_1
1904
- }
1905
-
1906
- let maxSatisfying_1
1907
- let hasRequiredMaxSatisfying
1908
- function requireMaxSatisfying() {
1909
- if (hasRequiredMaxSatisfying) {
1910
- return maxSatisfying_1
1911
- }
1912
- hasRequiredMaxSatisfying = 1
1913
- const SemVer = requireSemver$1()
1914
- const Range = requireRange()
1915
- const maxSatisfying = (versions, range, options) => {
1916
- let max = null
1917
- let maxSV = null
1918
- let rangeObj = null
1919
- try {
1920
- rangeObj = new Range(range, options)
1921
- } catch (er) {
1922
- return null
1923
- }
1924
- versions.forEach(v => {
1925
- if (rangeObj.test(v)) {
1926
- // satisfies(v, range, options)
1927
- if (!max || maxSV.compare(v) === -1) {
1928
- // compare(max, v, true)
1929
- max = v
1930
- maxSV = new SemVer(max, options)
1931
- }
1932
- }
1933
- })
1934
- return max
1935
- }
1936
- maxSatisfying_1 = maxSatisfying
1937
- return maxSatisfying_1
1938
- }
1939
-
1940
- let minSatisfying_1
1941
- let hasRequiredMinSatisfying
1942
- function requireMinSatisfying() {
1943
- if (hasRequiredMinSatisfying) {
1944
- return minSatisfying_1
1945
- }
1946
- hasRequiredMinSatisfying = 1
1947
- const SemVer = requireSemver$1()
1948
- const Range = requireRange()
1949
- const minSatisfying = (versions, range, options) => {
1950
- let min = null
1951
- let minSV = null
1952
- let rangeObj = null
1953
- try {
1954
- rangeObj = new Range(range, options)
1955
- } catch (er) {
1956
- return null
1957
- }
1958
- versions.forEach(v => {
1959
- if (rangeObj.test(v)) {
1960
- // satisfies(v, range, options)
1961
- if (!min || minSV.compare(v) === 1) {
1962
- // compare(min, v, true)
1963
- min = v
1964
- minSV = new SemVer(min, options)
1965
- }
1966
- }
1967
- })
1968
- return min
1969
- }
1970
- minSatisfying_1 = minSatisfying
1971
- return minSatisfying_1
1972
- }
1973
-
1974
- let minVersion_1
1975
- let hasRequiredMinVersion
1976
- function requireMinVersion() {
1977
- if (hasRequiredMinVersion) {
1978
- return minVersion_1
1979
- }
1980
- hasRequiredMinVersion = 1
1981
- const SemVer = requireSemver$1()
1982
- const Range = requireRange()
1983
- const gt = requireGt()
1984
- const minVersion = (range, loose) => {
1985
- range = new Range(range, loose)
1986
- let minver = new SemVer('0.0.0')
1987
- if (range.test(minver)) {
1988
- return minver
1989
- }
1990
- minver = new SemVer('0.0.0-0')
1991
- if (range.test(minver)) {
1992
- return minver
1993
- }
1994
- minver = null
1995
- for (let i = 0; i < range.set.length; ++i) {
1996
- const comparators = range.set[i]
1997
- let setMin = null
1998
- comparators.forEach(comparator => {
1999
- // Clone to avoid manipulating the comparator's semver object.
2000
- const compver = new SemVer(comparator.semver.version)
2001
- switch (comparator.operator) {
2002
- case '>':
2003
- if (compver.prerelease.length === 0) {
2004
- compver.patch++
2005
- } else {
2006
- compver.prerelease.push(0)
2007
- }
2008
- compver.raw = compver.format()
2009
- /* fallthrough */
2010
- case '':
2011
- case '>=':
2012
- if (!setMin || gt(compver, setMin)) {
2013
- setMin = compver
2014
- }
2015
- break
2016
- case '<':
2017
- case '<=':
2018
- /* Ignore maximum versions */
2019
- break
2020
- /* istanbul ignore next */
2021
- default:
2022
- throw new Error(`Unexpected operation: ${comparator.operator}`)
2023
- }
2024
- })
2025
- if (setMin && (!minver || gt(minver, setMin))) {
2026
- minver = setMin
2027
- }
2028
- }
2029
- if (minver && range.test(minver)) {
2030
- return minver
2031
- }
2032
- return null
2033
- }
2034
- minVersion_1 = minVersion
2035
- return minVersion_1
2036
- }
2037
-
2038
- let valid
2039
- let hasRequiredValid
2040
- function requireValid() {
2041
- if (hasRequiredValid) {
2042
- return valid
2043
- }
2044
- hasRequiredValid = 1
2045
- const Range = requireRange()
2046
- const validRange = (range, options) => {
2047
- try {
2048
- // Return '*' instead of '' so that truthiness works.
2049
- // This will throw if it's invalid anyway
2050
- return new Range(range, options).range || '*'
2051
- } catch (er) {
2052
- return null
2053
- }
2054
- }
2055
- valid = validRange
2056
- return valid
2057
- }
2058
-
2059
- let outside_1
2060
- let hasRequiredOutside
2061
- function requireOutside() {
2062
- if (hasRequiredOutside) {
2063
- return outside_1
2064
- }
2065
- hasRequiredOutside = 1
2066
- const SemVer = requireSemver$1()
2067
- const Comparator = requireComparator()
2068
- const { ANY } = Comparator
2069
- const Range = requireRange()
2070
- const satisfies = requireSatisfies()
2071
- const gt = requireGt()
2072
- const lt = requireLt()
2073
- const lte = requireLte()
2074
- const gte = requireGte()
2075
- const outside = (version, range, hilo, options) => {
2076
- version = new SemVer(version, options)
2077
- range = new Range(range, options)
2078
- let gtfn, ltefn, ltfn, comp, ecomp
2079
- switch (hilo) {
2080
- case '>':
2081
- gtfn = gt
2082
- ltefn = lte
2083
- ltfn = lt
2084
- comp = '>'
2085
- ecomp = '>='
2086
- break
2087
- case '<':
2088
- gtfn = lt
2089
- ltefn = gte
2090
- ltfn = gt
2091
- comp = '<'
2092
- ecomp = '<='
2093
- break
2094
- default:
2095
- throw new TypeError('Must provide a hilo val of "<" or ">"')
2096
- }
2097
-
2098
- // If it satisfies the range it is not outside
2099
- if (satisfies(version, range, options)) {
2100
- return false
2101
- }
2102
-
2103
- // From now on, variable terms are as if we're in "gtr" mode.
2104
- // but note that everything is flipped for the "ltr" function.
2105
-
2106
- for (let i = 0; i < range.set.length; ++i) {
2107
- const comparators = range.set[i]
2108
- let high = null
2109
- let low = null
2110
- comparators.forEach(comparator => {
2111
- if (comparator.semver === ANY) {
2112
- comparator = new Comparator('>=0.0.0')
2113
- }
2114
- high = high || comparator
2115
- low = low || comparator
2116
- if (gtfn(comparator.semver, high.semver, options)) {
2117
- high = comparator
2118
- } else if (ltfn(comparator.semver, low.semver, options)) {
2119
- low = comparator
2120
- }
2121
- })
2122
-
2123
- // If the edge version comparator has a operator then our version
2124
- // isn't outside it
2125
- if (high.operator === comp || high.operator === ecomp) {
2126
- return false
2127
- }
2128
-
2129
- // If the lowest version comparator has an operator and our version
2130
- // is less than it then it isn't higher than the range
2131
- if (
2132
- (!low.operator || low.operator === comp) &&
2133
- ltefn(version, low.semver)
2134
- ) {
2135
- return false
2136
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
2137
- return false
2138
- }
2139
- }
2140
- return true
2141
- }
2142
- outside_1 = outside
2143
- return outside_1
2144
- }
2145
-
2146
- let gtr_1
2147
- let hasRequiredGtr
2148
- function requireGtr() {
2149
- if (hasRequiredGtr) {
2150
- return gtr_1
2151
- }
2152
- hasRequiredGtr = 1
2153
-
2154
- // Determine if version is greater than all the versions possible in the range.
2155
- const outside = requireOutside()
2156
- const gtr = (version, range, options) => outside(version, range, '>', options)
2157
- gtr_1 = gtr
2158
- return gtr_1
2159
- }
2160
-
2161
- let ltr_1
2162
- let hasRequiredLtr
2163
- function requireLtr() {
2164
- if (hasRequiredLtr) {
2165
- return ltr_1
2166
- }
2167
- hasRequiredLtr = 1
2168
- const outside = requireOutside()
2169
- // Determine if version is less than all the versions possible in the range
2170
- const ltr = (version, range, options) => outside(version, range, '<', options)
2171
- ltr_1 = ltr
2172
- return ltr_1
2173
- }
2174
-
2175
- let intersects_1
2176
- let hasRequiredIntersects
2177
- function requireIntersects() {
2178
- if (hasRequiredIntersects) {
2179
- return intersects_1
2180
- }
2181
- hasRequiredIntersects = 1
2182
- const Range = requireRange()
2183
- const intersects = (r1, r2, options) => {
2184
- r1 = new Range(r1, options)
2185
- r2 = new Range(r2, options)
2186
- return r1.intersects(r2, options)
2187
- }
2188
- intersects_1 = intersects
2189
- return intersects_1
2190
- }
2191
-
2192
- let simplify
2193
- let hasRequiredSimplify
2194
- function requireSimplify() {
2195
- if (hasRequiredSimplify) {
2196
- return simplify
2197
- }
2198
- hasRequiredSimplify = 1
2199
-
2200
- // given a set of versions and a range, create a "simplified" range
2201
- // that includes the same versions that the original range does
2202
- // If the original range is shorter than the simplified one, return that.
2203
- const satisfies = requireSatisfies()
2204
- const compare = requireCompare()
2205
- simplify = (versions, range, options) => {
2206
- const set = []
2207
- let first = null
2208
- let prev = null
2209
- const v = versions.sort((a, b) => compare(a, b, options))
2210
- for (const version of v) {
2211
- const included = satisfies(version, range, options)
2212
- if (included) {
2213
- prev = version
2214
- if (!first) {
2215
- first = version
2216
- }
2217
- } else {
2218
- if (prev) {
2219
- set.push([first, prev])
2220
- }
2221
- prev = null
2222
- first = null
2223
- }
2224
- }
2225
- if (first) {
2226
- set.push([first, null])
2227
- }
2228
- const ranges = []
2229
- for (const [min, max] of set) {
2230
- if (min === max) {
2231
- ranges.push(min)
2232
- } else if (!max && min === v[0]) {
2233
- ranges.push('*')
2234
- } else if (!max) {
2235
- ranges.push(`>=${min}`)
2236
- } else if (min === v[0]) {
2237
- ranges.push(`<=${max}`)
2238
- } else {
2239
- ranges.push(`${min} - ${max}`)
2240
- }
2241
- }
2242
- const simplified = ranges.join(' || ')
2243
- const original = typeof range.raw === 'string' ? range.raw : String(range)
2244
- return simplified.length < original.length ? simplified : range
2245
- }
2246
- return simplify
2247
- }
2248
-
2249
- let subset_1
2250
- let hasRequiredSubset
2251
- function requireSubset() {
2252
- if (hasRequiredSubset) {
2253
- return subset_1
2254
- }
2255
- hasRequiredSubset = 1
2256
- const Range = requireRange()
2257
- const Comparator = requireComparator()
2258
- const { ANY } = Comparator
2259
- const satisfies = requireSatisfies()
2260
- const compare = requireCompare()
2261
-
2262
- // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
2263
- // - Every simple range `r1, r2, ...` is a null set, OR
2264
- // - Every simple range `r1, r2, ...` which is not a null set is a subset of
2265
- // some `R1, R2, ...`
2266
- //
2267
- // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
2268
- // - If c is only the ANY comparator
2269
- // - If C is only the ANY comparator, return true
2270
- // - Else if in prerelease mode, return false
2271
- // - else replace c with `[>=0.0.0]`
2272
- // - If C is only the ANY comparator
2273
- // - if in prerelease mode, return true
2274
- // - else replace C with `[>=0.0.0]`
2275
- // - Let EQ be the set of = comparators in c
2276
- // - If EQ is more than one, return true (null set)
2277
- // - Let GT be the highest > or >= comparator in c
2278
- // - Let LT be the lowest < or <= comparator in c
2279
- // - If GT and LT, and GT.semver > LT.semver, return true (null set)
2280
- // - If any C is a = range, and GT or LT are set, return false
2281
- // - If EQ
2282
- // - If GT, and EQ does not satisfy GT, return true (null set)
2283
- // - If LT, and EQ does not satisfy LT, return true (null set)
2284
- // - If EQ satisfies every C, return true
2285
- // - Else return false
2286
- // - If GT
2287
- // - If GT.semver is lower than any > or >= comp in C, return false
2288
- // - If GT is >=, and GT.semver does not satisfy every C, return false
2289
- // - If GT.semver has a prerelease, and not in prerelease mode
2290
- // - If no C has a prerelease and the GT.semver tuple, return false
2291
- // - If LT
2292
- // - If LT.semver is greater than any < or <= comp in C, return false
2293
- // - If LT is <=, and LT.semver does not satisfy every C, return false
2294
- // - If GT.semver has a prerelease, and not in prerelease mode
2295
- // - If no C has a prerelease and the LT.semver tuple, return false
2296
- // - Else return true
2297
-
2298
- const subset = (sub, dom, options = {}) => {
2299
- if (sub === dom) {
2300
- return true
2301
- }
2302
- sub = new Range(sub, options)
2303
- dom = new Range(dom, options)
2304
- let sawNonNull = false
2305
- OUTER: for (const simpleSub of sub.set) {
2306
- for (const simpleDom of dom.set) {
2307
- const isSub = simpleSubset(simpleSub, simpleDom, options)
2308
- sawNonNull = sawNonNull || isSub !== null
2309
- if (isSub) {
2310
- continue OUTER
2311
- }
2312
- }
2313
- // the null set is a subset of everything, but null simple ranges in
2314
- // a complex range should be ignored. so if we saw a non-null range,
2315
- // then we know this isn't a subset, but if EVERY simple range was null,
2316
- // then it is a subset.
2317
- if (sawNonNull) {
2318
- return false
2319
- }
2320
- }
2321
- return true
2322
- }
2323
- const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
2324
- const minimumVersion = [new Comparator('>=0.0.0')]
2325
- const simpleSubset = (sub, dom, options) => {
2326
- if (sub === dom) {
2327
- return true
2328
- }
2329
- if (sub.length === 1 && sub[0].semver === ANY) {
2330
- if (dom.length === 1 && dom[0].semver === ANY) {
2331
- return true
2332
- } else if (options.includePrerelease) {
2333
- sub = minimumVersionWithPreRelease
2334
- } else {
2335
- sub = minimumVersion
2336
- }
2337
- }
2338
- if (dom.length === 1 && dom[0].semver === ANY) {
2339
- if (options.includePrerelease) {
2340
- return true
2341
- } else {
2342
- dom = minimumVersion
2343
- }
2344
- }
2345
- const eqSet = new Set()
2346
- let gt, lt
2347
- for (const c of sub) {
2348
- if (c.operator === '>' || c.operator === '>=') {
2349
- gt = higherGT(gt, c, options)
2350
- } else if (c.operator === '<' || c.operator === '<=') {
2351
- lt = lowerLT(lt, c, options)
2352
- } else {
2353
- eqSet.add(c.semver)
2354
- }
2355
- }
2356
- if (eqSet.size > 1) {
2357
- return null
2358
- }
2359
- let gtltComp
2360
- if (gt && lt) {
2361
- gtltComp = compare(gt.semver, lt.semver, options)
2362
- if (gtltComp > 0) {
2363
- return null
2364
- } else if (
2365
- gtltComp === 0 &&
2366
- (gt.operator !== '>=' || lt.operator !== '<=')
2367
- ) {
2368
- return null
2369
- }
2370
- }
2371
-
2372
- // will iterate one or zero times
2373
- for (const eq of eqSet) {
2374
- if (gt && !satisfies(eq, String(gt), options)) {
2375
- return null
2376
- }
2377
- if (lt && !satisfies(eq, String(lt), options)) {
2378
- return null
2379
- }
2380
- for (const c of dom) {
2381
- if (!satisfies(eq, String(c), options)) {
2382
- return false
2383
- }
2384
- }
2385
- return true
2386
- }
2387
- let higher, lower
2388
- let hasDomLT, hasDomGT
2389
- // if the subset has a prerelease, we need a comparator in the superset
2390
- // with the same tuple and a prerelease, or it's not a subset
2391
- let needDomLTPre =
2392
- lt && !options.includePrerelease && lt.semver.prerelease.length
2393
- ? lt.semver
2394
- : false
2395
- let needDomGTPre =
2396
- gt && !options.includePrerelease && gt.semver.prerelease.length
2397
- ? gt.semver
2398
- : false
2399
- // exception: <1.2.3-0 is the same as <1.2.3
2400
- if (
2401
- needDomLTPre &&
2402
- needDomLTPre.prerelease.length === 1 &&
2403
- lt.operator === '<' &&
2404
- needDomLTPre.prerelease[0] === 0
2405
- ) {
2406
- needDomLTPre = false
2407
- }
2408
- for (const c of dom) {
2409
- hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
2410
- hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
2411
- if (gt) {
2412
- if (needDomGTPre) {
2413
- if (
2414
- c.semver.prerelease &&
2415
- c.semver.prerelease.length &&
2416
- c.semver.major === needDomGTPre.major &&
2417
- c.semver.minor === needDomGTPre.minor &&
2418
- c.semver.patch === needDomGTPre.patch
2419
- ) {
2420
- needDomGTPre = false
2421
- }
2422
- }
2423
- if (c.operator === '>' || c.operator === '>=') {
2424
- higher = higherGT(gt, c, options)
2425
- if (higher === c && higher !== gt) {
2426
- return false
2427
- }
2428
- } else if (
2429
- gt.operator === '>=' &&
2430
- !satisfies(gt.semver, String(c), options)
2431
- ) {
2432
- return false
2433
- }
2434
- }
2435
- if (lt) {
2436
- if (needDomLTPre) {
2437
- if (
2438
- c.semver.prerelease &&
2439
- c.semver.prerelease.length &&
2440
- c.semver.major === needDomLTPre.major &&
2441
- c.semver.minor === needDomLTPre.minor &&
2442
- c.semver.patch === needDomLTPre.patch
2443
- ) {
2444
- needDomLTPre = false
2445
- }
2446
- }
2447
- if (c.operator === '<' || c.operator === '<=') {
2448
- lower = lowerLT(lt, c, options)
2449
- if (lower === c && lower !== lt) {
2450
- return false
2451
- }
2452
- } else if (
2453
- lt.operator === '<=' &&
2454
- !satisfies(lt.semver, String(c), options)
2455
- ) {
2456
- return false
2457
- }
2458
- }
2459
- if (!c.operator && (lt || gt) && gtltComp !== 0) {
2460
- return false
2461
- }
2462
- }
2463
-
2464
- // if there was a < or >, and nothing in the dom, then must be false
2465
- // UNLESS it was limited by another range in the other direction.
2466
- // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
2467
- if (gt && hasDomLT && !lt && gtltComp !== 0) {
2468
- return false
2469
- }
2470
- if (lt && hasDomGT && !gt && gtltComp !== 0) {
2471
- return false
2472
- }
2473
-
2474
- // we needed a prerelease range in a specific tuple, but didn't get one
2475
- // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
2476
- // because it includes prereleases in the 1.2.3 tuple
2477
- if (needDomGTPre || needDomLTPre) {
2478
- return false
2479
- }
2480
- return true
2481
- }
2482
-
2483
- // >=1.2.3 is lower than >1.2.3
2484
- const higherGT = (a, b, options) => {
2485
- if (!a) {
2486
- return b
2487
- }
2488
- const comp = compare(a.semver, b.semver, options)
2489
- return comp > 0
2490
- ? a
2491
- : comp < 0
2492
- ? b
2493
- : b.operator === '>' && a.operator === '>='
2494
- ? b
2495
- : a
2496
- }
2497
-
2498
- // <=1.2.3 is higher than <1.2.3
2499
- const lowerLT = (a, b, options) => {
2500
- if (!a) {
2501
- return b
2502
- }
2503
- const comp = compare(a.semver, b.semver, options)
2504
- return comp < 0
2505
- ? a
2506
- : comp > 0
2507
- ? b
2508
- : b.operator === '<' && a.operator === '<='
2509
- ? b
2510
- : a
2511
- }
2512
- subset_1 = subset
2513
- return subset_1
2514
- }
2515
-
2516
- let semver
2517
- let hasRequiredSemver
2518
- function requireSemver() {
2519
- if (hasRequiredSemver) {
2520
- return semver
2521
- }
2522
- hasRequiredSemver = 1
2523
-
2524
- // just pre-load all the stuff that index.js lazily exports
2525
- const internalRe = requireRe()
2526
- const constants = requireConstants()
2527
- const SemVer = requireSemver$1()
2528
- const identifiers = requireIdentifiers()
2529
- const parse = requireParse()
2530
- const valid = requireValid$1()
2531
- const clean = requireClean()
2532
- const inc = requireInc()
2533
- const diff = requireDiff()
2534
- const major = requireMajor()
2535
- const minor = requireMinor()
2536
- const patch = requirePatch()
2537
- const prerelease = requirePrerelease()
2538
- const compare = requireCompare()
2539
- const rcompare = requireRcompare()
2540
- const compareLoose = requireCompareLoose()
2541
- const compareBuild = requireCompareBuild()
2542
- const sort = requireSort()
2543
- const rsort = requireRsort()
2544
- const gt = requireGt()
2545
- const lt = requireLt()
2546
- const eq = requireEq()
2547
- const neq = requireNeq()
2548
- const gte = requireGte()
2549
- const lte = requireLte()
2550
- const cmp = requireCmp()
2551
- const coerce = requireCoerce()
2552
- const Comparator = requireComparator()
2553
- const Range = requireRange()
2554
- const satisfies = requireSatisfies()
2555
- const toComparators = requireToComparators()
2556
- const maxSatisfying = requireMaxSatisfying()
2557
- const minSatisfying = requireMinSatisfying()
2558
- const minVersion = requireMinVersion()
2559
- const validRange = requireValid()
2560
- const outside = requireOutside()
2561
- const gtr = requireGtr()
2562
- const ltr = requireLtr()
2563
- const intersects = requireIntersects()
2564
- const simplifyRange = requireSimplify()
2565
- const subset = requireSubset()
2566
- semver = {
2567
- parse,
2568
- valid,
2569
- clean,
2570
- inc,
2571
- diff,
2572
- major,
2573
- minor,
2574
- patch,
2575
- prerelease,
2576
- compare,
2577
- rcompare,
2578
- compareLoose,
2579
- compareBuild,
2580
- sort,
2581
- rsort,
2582
- gt,
2583
- lt,
2584
- eq,
2585
- neq,
2586
- gte,
2587
- lte,
2588
- cmp,
2589
- coerce,
2590
- Comparator,
2591
- Range,
2592
- satisfies,
2593
- toComparators,
2594
- maxSatisfying,
2595
- minSatisfying,
2596
- minVersion,
2597
- validRange,
2598
- outside,
2599
- gtr,
2600
- ltr,
2601
- intersects,
2602
- simplifyRange,
2603
- subset,
2604
- SemVer,
2605
- re: internalRe.re,
2606
- src: internalRe.src,
2607
- tokens: internalRe.t,
2608
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
2609
- RELEASE_TYPES: constants.RELEASE_TYPES,
2610
- compareIdentifiers: identifiers.compareIdentifiers,
2611
- rcompareIdentifiers: identifiers.rcompareIdentifiers
2612
- }
2613
- return semver
2614
- }
2615
-
2616
- const semverExports = requireSemver()
2617
-
2618
- module.exports = semverExports