@socketsecurity/cli-with-sentry 0.15.10 → 0.15.12

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 (403) hide show
  1. package/bin/cli.js +6 -6
  2. package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
  3. package/dist/cli.js +5731 -6607
  4. package/dist/cli.js.map +1 -1
  5. package/dist/constants.js +274 -305
  6. package/dist/constants.js.map +1 -1
  7. package/dist/instrument-with-sentry.js +28 -34
  8. package/dist/instrument-with-sentry.js.map +1 -1
  9. package/dist/shadow-bin.js +96 -123
  10. package/dist/shadow-bin.js.map +1 -1
  11. package/dist/shadow-inject.js +470 -580
  12. package/dist/shadow-inject.js.map +1 -1
  13. package/dist/socket-completion.bash +221 -0
  14. package/dist/types/cli.d.mts +2 -2
  15. package/dist/types/commands/analytics/cmd-analytics.d.mts +9 -15
  16. package/dist/types/commands/analytics/fetch-org-analytics.d.mts +4 -6
  17. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +4 -7
  18. package/dist/types/commands/analytics/handle-analytics.d.mts +9 -15
  19. package/dist/types/commands/analytics/handle-analytics.d.mts.map +1 -1
  20. package/dist/types/commands/analytics/output-analytics.d.mts +26 -46
  21. package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
  22. package/dist/types/commands/audit-log/cmd-audit-log.d.mts +9 -15
  23. package/dist/types/commands/audit-log/fetch-audit-log.d.mts +10 -16
  24. package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +1 -1
  25. package/dist/types/commands/audit-log/handle-audit-log.d.mts +9 -15
  26. package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +1 -1
  27. package/dist/types/commands/audit-log/output-audit-log.d.mts +22 -47
  28. package/dist/types/commands/audit-log/output-audit-log.d.mts.map +1 -1
  29. package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts +9 -15
  30. package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts.map +1 -1
  31. package/dist/types/commands/cdxgen/handle-cdxgen.d.mts +4 -0
  32. package/dist/types/commands/cdxgen/handle-cdxgen.d.mts.map +1 -0
  33. package/dist/types/commands/ci/cmd-ci.d.mts +9 -15
  34. package/dist/types/commands/ci/fetch-default-org-slug.d.mts +3 -3
  35. package/dist/types/commands/ci/handle-ci.d.mts +2 -2
  36. package/dist/types/commands/config/cmd-config-auto.d.mts +9 -15
  37. package/dist/types/commands/config/cmd-config-get.d.mts +9 -15
  38. package/dist/types/commands/config/cmd-config-list.d.mts +9 -15
  39. package/dist/types/commands/config/cmd-config-set.d.mts +9 -15
  40. package/dist/types/commands/config/cmd-config-unset.d.mts +9 -15
  41. package/dist/types/commands/config/cmd-config.d.mts +3 -3
  42. package/dist/types/commands/config/discover-config-value.d.mts +3 -5
  43. package/dist/types/commands/config/discover-config-value.d.mts.map +1 -1
  44. package/dist/types/commands/config/handle-config-auto.d.mts +7 -10
  45. package/dist/types/commands/config/handle-config-auto.d.mts.map +1 -1
  46. package/dist/types/commands/config/handle-config-get.d.mts +7 -10
  47. package/dist/types/commands/config/handle-config-get.d.mts.map +1 -1
  48. package/dist/types/commands/config/handle-config-set.d.mts +8 -12
  49. package/dist/types/commands/config/handle-config-set.d.mts.map +1 -1
  50. package/dist/types/commands/config/handle-config-unset.d.mts +7 -10
  51. package/dist/types/commands/config/handle-config-unset.d.mts.map +1 -1
  52. package/dist/types/commands/config/output-config-auto.d.mts +4 -8
  53. package/dist/types/commands/config/output-config-get.d.mts +4 -8
  54. package/dist/types/commands/config/output-config-list.d.mts +6 -9
  55. package/dist/types/commands/config/output-config-list.d.mts.map +1 -1
  56. package/dist/types/commands/config/output-config-set.d.mts +3 -6
  57. package/dist/types/commands/config/output-config-unset.d.mts +3 -6
  58. package/dist/types/commands/dependencies/cmd-dependencies.d.mts +9 -15
  59. package/dist/types/commands/dependencies/fetch-dependencies.d.mts +7 -10
  60. package/dist/types/commands/dependencies/fetch-dependencies.d.mts.map +1 -1
  61. package/dist/types/commands/dependencies/handle-dependencies.d.mts +7 -11
  62. package/dist/types/commands/dependencies/handle-dependencies.d.mts.map +1 -1
  63. package/dist/types/commands/dependencies/output-dependencies.d.mts +8 -15
  64. package/dist/types/commands/dependencies/output-dependencies.d.mts.map +1 -1
  65. package/dist/types/commands/diff-scan/cmd-diff-scan-get.d.mts +9 -15
  66. package/dist/types/commands/diff-scan/cmd-diff-scan.d.mts +3 -3
  67. package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts +8 -12
  68. package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts.map +1 -1
  69. package/dist/types/commands/diff-scan/handle-diff-scan.d.mts +10 -17
  70. package/dist/types/commands/diff-scan/handle-diff-scan.d.mts.map +1 -1
  71. package/dist/types/commands/diff-scan/output-diff-scan.d.mts +8 -15
  72. package/dist/types/commands/diff-scan/output-diff-scan.d.mts.map +1 -1
  73. package/dist/types/commands/fix/cmd-fix.d.mts +9 -15
  74. package/dist/types/commands/fix/git.d.mts +14 -49
  75. package/dist/types/commands/fix/npm-fix.d.mts +4 -16
  76. package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
  77. package/dist/types/commands/fix/open-pr.d.mts +20 -46
  78. package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
  79. package/dist/types/commands/fix/pnpm-fix.d.mts +4 -16
  80. package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
  81. package/dist/types/commands/fix/run-fix.d.mts +3 -3
  82. package/dist/types/commands/fix/shared.d.mts +9 -15
  83. package/dist/types/commands/fix/types.d.mts +16 -16
  84. package/dist/types/commands/info/cmd-info.d.mts +9 -15
  85. package/dist/types/commands/info/fetch-package-info.d.mts +3 -7
  86. package/dist/types/commands/info/handle-package-info.d.mts +15 -22
  87. package/dist/types/commands/info/handle-package-info.d.mts.map +1 -1
  88. package/dist/types/commands/info/output-package-info.d.mts +10 -18
  89. package/dist/types/commands/info/output-package-info.d.mts.map +1 -1
  90. package/dist/types/commands/install/cmd-install-completion.d.mts +10 -0
  91. package/dist/types/commands/install/cmd-install-completion.d.mts.map +1 -0
  92. package/dist/types/commands/install/cmd-install.d.mts +3 -0
  93. package/dist/types/commands/install/cmd-install.d.mts.map +1 -0
  94. package/dist/types/commands/install/handle-install-completion.d.mts +2 -0
  95. package/dist/types/commands/install/handle-install-completion.d.mts.map +1 -0
  96. package/dist/types/commands/install/output-install-completion.d.mts +12 -0
  97. package/dist/types/commands/install/output-install-completion.d.mts.map +1 -0
  98. package/dist/types/commands/install/setup-tab-completion.d.mts +13 -0
  99. package/dist/types/commands/install/setup-tab-completion.d.mts.map +1 -0
  100. package/dist/types/commands/login/apply-login.d.mts +2 -7
  101. package/dist/types/commands/login/attempt-login.d.mts +2 -5
  102. package/dist/types/commands/login/attempt-login.d.mts.map +1 -1
  103. package/dist/types/commands/login/cmd-login.d.mts +9 -15
  104. package/dist/types/commands/logout/apply-logout.d.mts +2 -2
  105. package/dist/types/commands/logout/attempt-logout.d.mts +2 -2
  106. package/dist/types/commands/logout/cmd-logout.d.mts +9 -15
  107. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +9 -15
  108. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +10 -0
  109. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +1 -0
  110. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +9 -15
  111. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +9 -15
  112. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +9 -15
  113. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +9 -15
  114. package/dist/types/commands/manifest/cmd-manifest.d.mts +9 -15
  115. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
  116. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +7 -15
  117. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +2 -8
  118. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +2 -8
  119. package/dist/types/commands/manifest/handle-manifest-conda.d.mts +3 -9
  120. package/dist/types/commands/manifest/output-requirements.d.mts +6 -10
  121. package/dist/types/commands/{cdxgen → manifest}/run-cdxgen.d.mts +2 -2
  122. package/dist/types/commands/manifest/run-cdxgen.d.mts.map +1 -0
  123. package/dist/types/commands/npm/cmd-npm.d.mts +9 -15
  124. package/dist/types/commands/npx/cmd-npx.d.mts +9 -15
  125. package/dist/types/commands/oops/cmd-oops.d.mts +9 -15
  126. package/dist/types/commands/optimize/add-overrides.d.mts +18 -22
  127. package/dist/types/commands/optimize/apply-optimization.d.mts +2 -6
  128. package/dist/types/commands/optimize/cmd-optimize.d.mts +9 -15
  129. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +4 -7
  130. package/dist/types/commands/optimize/get-dependency-entries.d.mts +3 -5
  131. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +8 -11
  132. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +3 -10
  133. package/dist/types/commands/optimize/ls-by-agent.d.mts +6 -13
  134. package/dist/types/commands/optimize/shared.d.mts +2 -2
  135. package/dist/types/commands/optimize/types.d.mts +7 -7
  136. package/dist/types/commands/optimize/update-lockfile.d.mts +9 -12
  137. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +5 -11
  138. package/dist/types/commands/organization/cmd-organization-list.d.mts +9 -15
  139. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +9 -15
  140. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +9 -15
  141. package/dist/types/commands/organization/cmd-organization-policy.d.mts +3 -3
  142. package/dist/types/commands/organization/cmd-organization-quota.d.mts +9 -15
  143. package/dist/types/commands/organization/cmd-organization.d.mts +3 -3
  144. package/dist/types/commands/organization/fetch-license-policy.d.mts +4 -6
  145. package/dist/types/commands/organization/fetch-organization-list.d.mts +4 -6
  146. package/dist/types/commands/organization/fetch-quota.d.mts +4 -6
  147. package/dist/types/commands/organization/fetch-security-policy.d.mts +4 -6
  148. package/dist/types/commands/organization/handle-license-policy.d.mts +3 -6
  149. package/dist/types/commands/organization/handle-organization-list.d.mts +3 -5
  150. package/dist/types/commands/organization/handle-quota.d.mts +3 -3
  151. package/dist/types/commands/organization/handle-security-policy.d.mts +3 -6
  152. package/dist/types/commands/organization/output-license-policy.d.mts +4 -7
  153. package/dist/types/commands/organization/output-organization-list.d.mts +4 -7
  154. package/dist/types/commands/organization/output-quota.d.mts +4 -7
  155. package/dist/types/commands/organization/output-security-policy.d.mts +4 -7
  156. package/dist/types/commands/package/cmd-package-score.d.mts +9 -15
  157. package/dist/types/commands/package/cmd-package-shallow.d.mts +16 -22
  158. package/dist/types/commands/package/cmd-package.d.mts +3 -3
  159. package/dist/types/commands/package/fetch-purl-deep-score.d.mts +49 -51
  160. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +4 -6
  161. package/dist/types/commands/package/handle-purl-deep-score.d.mts +3 -6
  162. package/dist/types/commands/package/handle-purls-shallow-score.d.mts +6 -9
  163. package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +1 -1
  164. package/dist/types/commands/package/output-purl-score.d.mts +4 -8
  165. package/dist/types/commands/package/output-purls-shallow-score.d.mts +4 -8
  166. package/dist/types/commands/package/parse-package-specifiers.d.mts +5 -8
  167. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +9 -15
  168. package/dist/types/commands/raw-npm/run-raw-npm.d.mts +2 -4
  169. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +9 -15
  170. package/dist/types/commands/raw-npx/run-raw-npx.d.mts +2 -4
  171. package/dist/types/commands/report/cmd-report-create.d.mts +9 -15
  172. package/dist/types/commands/report/cmd-report-view.d.mts +9 -15
  173. package/dist/types/commands/report/cmd-report.d.mts +3 -3
  174. package/dist/types/commands/repos/cmd-repos-create.d.mts +9 -15
  175. package/dist/types/commands/repos/cmd-repos-del.d.mts +9 -15
  176. package/dist/types/commands/repos/cmd-repos-list.d.mts +9 -15
  177. package/dist/types/commands/repos/cmd-repos-update.d.mts +9 -15
  178. package/dist/types/commands/repos/cmd-repos-view.d.mts +9 -15
  179. package/dist/types/commands/repos/cmd-repos.d.mts +3 -3
  180. package/dist/types/commands/repos/fetch-create-repo.d.mts +11 -18
  181. package/dist/types/commands/repos/fetch-create-repo.d.mts.map +1 -1
  182. package/dist/types/commands/repos/fetch-delete-repo.d.mts +4 -7
  183. package/dist/types/commands/repos/fetch-list-repos.d.mts +10 -16
  184. package/dist/types/commands/repos/fetch-list-repos.d.mts.map +1 -1
  185. package/dist/types/commands/repos/fetch-update-repo.d.mts +11 -18
  186. package/dist/types/commands/repos/fetch-update-repo.d.mts.map +1 -1
  187. package/dist/types/commands/repos/fetch-view-repo.d.mts +4 -7
  188. package/dist/types/commands/repos/handle-create-repo.d.mts +10 -20
  189. package/dist/types/commands/repos/handle-create-repo.d.mts.map +1 -1
  190. package/dist/types/commands/repos/handle-delete-repo.d.mts +3 -7
  191. package/dist/types/commands/repos/handle-list-repos.d.mts +10 -17
  192. package/dist/types/commands/repos/handle-list-repos.d.mts.map +1 -1
  193. package/dist/types/commands/repos/handle-update-repo.d.mts +10 -20
  194. package/dist/types/commands/repos/handle-update-repo.d.mts.map +1 -1
  195. package/dist/types/commands/repos/handle-view-repo.d.mts +3 -7
  196. package/dist/types/commands/repos/output-create-repo.d.mts +4 -8
  197. package/dist/types/commands/repos/output-delete-repo.d.mts +4 -8
  198. package/dist/types/commands/repos/output-list-repos.d.mts +4 -7
  199. package/dist/types/commands/repos/output-update-repo.d.mts +4 -8
  200. package/dist/types/commands/repos/output-view-repo.d.mts +4 -7
  201. package/dist/types/commands/scan/cmd-scan-create.d.mts +9 -15
  202. package/dist/types/commands/scan/cmd-scan-del.d.mts +9 -15
  203. package/dist/types/commands/scan/cmd-scan-diff.d.mts +9 -15
  204. package/dist/types/commands/scan/cmd-scan-list.d.mts +3 -3
  205. package/dist/types/commands/scan/cmd-scan-metadata.d.mts +3 -3
  206. package/dist/types/commands/scan/cmd-scan-report.d.mts +3 -3
  207. package/dist/types/commands/scan/cmd-scan-view.d.mts +3 -3
  208. package/dist/types/commands/scan/cmd-scan.d.mts +3 -3
  209. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +11 -26
  210. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
  211. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +4 -7
  212. package/dist/types/commands/scan/fetch-diff-scan.d.mts +8 -12
  213. package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +1 -1
  214. package/dist/types/commands/scan/fetch-list-scans.d.mts +13 -22
  215. package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
  216. package/dist/types/commands/scan/fetch-report-data.d.mts +8 -14
  217. package/dist/types/commands/scan/fetch-scan-metadata.d.mts +4 -7
  218. package/dist/types/commands/scan/fetch-scan.d.mts +4 -7
  219. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +4 -6
  220. package/dist/types/commands/scan/generate-report.d.mts +36 -50
  221. package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
  222. package/dist/types/commands/scan/handle-create-new-scan.d.mts +20 -37
  223. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
  224. package/dist/types/commands/scan/handle-delete-scan.d.mts +3 -7
  225. package/dist/types/commands/scan/handle-diff-scan.d.mts +10 -17
  226. package/dist/types/commands/scan/handle-diff-scan.d.mts.map +1 -1
  227. package/dist/types/commands/scan/handle-list-scans.d.mts +13 -23
  228. package/dist/types/commands/scan/handle-list-scans.d.mts.map +1 -1
  229. package/dist/types/commands/scan/handle-scan-metadata.d.mts +3 -7
  230. package/dist/types/commands/scan/handle-scan-report.d.mts +12 -21
  231. package/dist/types/commands/scan/handle-scan-report.d.mts.map +1 -1
  232. package/dist/types/commands/scan/handle-scan-view.d.mts +3 -8
  233. package/dist/types/commands/scan/output-create-new-scan.d.mts +4 -8
  234. package/dist/types/commands/scan/output-delete-scan.d.mts +4 -7
  235. package/dist/types/commands/scan/output-diff-scan.d.mts +8 -15
  236. package/dist/types/commands/scan/output-diff-scan.d.mts.map +1 -1
  237. package/dist/types/commands/scan/output-list-scans.d.mts +4 -7
  238. package/dist/types/commands/scan/output-scan-metadata.d.mts +4 -8
  239. package/dist/types/commands/scan/output-scan-report.d.mts +20 -38
  240. package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
  241. package/dist/types/commands/scan/output-scan-view.d.mts +4 -10
  242. package/dist/types/commands/scan/stream-scan.d.mts +2 -6
  243. package/dist/types/commands/scan/suggest-org-slug.d.mts +2 -2
  244. package/dist/types/commands/scan/suggest-repo-slug.d.mts +4 -4
  245. package/dist/types/commands/scan/suggest_branch_slug.d.mts +2 -4
  246. package/dist/types/commands/scan/suggest_target.d.mts +2 -2
  247. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +9 -15
  248. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +10 -16
  249. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +1 -1
  250. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +10 -17
  251. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +1 -1
  252. package/dist/types/commands/threat-feed/output-threat-feed.d.mts +4 -7
  253. package/dist/types/commands/threat-feed/types.d.mts +12 -12
  254. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +9 -0
  255. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +1 -0
  256. package/dist/types/commands/uninstall/cmd-uninstall.d.mts +3 -0
  257. package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +1 -0
  258. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +2 -0
  259. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +1 -0
  260. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +6 -0
  261. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +1 -0
  262. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +6 -0
  263. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +1 -0
  264. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +2 -2
  265. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +2 -2
  266. package/dist/types/commands/wrapper/cmd-wrapper.d.mts +9 -15
  267. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +2 -2
  268. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +1 -1
  269. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +2 -2
  270. package/dist/types/constants.d.mts +125 -135
  271. package/dist/types/constants.d.mts.map +1 -1
  272. package/dist/types/flags.d.mts +14 -17
  273. package/dist/types/flags.d.mts.map +1 -1
  274. package/dist/types/instrument-with-sentry.d.mts +2 -2
  275. package/dist/types/shadow/npm/arborist/index.d.mts +2 -2
  276. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +19 -24
  277. package/dist/types/shadow/npm/arborist/lib/arborist/types.d.mts +43 -71
  278. package/dist/types/shadow/npm/arborist/lib/dep-valid.d.mts +3 -8
  279. package/dist/types/shadow/npm/arborist/lib/edge.d.mts +58 -71
  280. package/dist/types/shadow/npm/arborist/lib/node.d.mts +55 -91
  281. package/dist/types/shadow/npm/arborist/lib/override-set.d.mts +26 -32
  282. package/dist/types/shadow/npm/arborist-helpers.d.mts +33 -66
  283. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
  284. package/dist/types/shadow/npm/bin.d.mts +2 -5
  285. package/dist/types/shadow/npm/inject.d.mts +2 -2
  286. package/dist/types/shadow/npm/install.d.mts +11 -16
  287. package/dist/types/shadow/npm/link.d.mts +2 -5
  288. package/dist/types/shadow/npm/paths.d.mts +7 -7
  289. package/dist/types/shadow/npm/proc-log/index.d.mts +3 -6
  290. package/dist/types/types.d.mts +15 -17
  291. package/dist/types/utils/agent.d.mts +11 -14
  292. package/dist/types/utils/alert/artifact.d.mts +32 -50
  293. package/dist/types/utils/alert/fix.d.mts +5 -5
  294. package/dist/types/utils/alert/severity.d.mts +12 -24
  295. package/dist/types/utils/alerts-map.d.mts +23 -36
  296. package/dist/types/utils/api.d.mts +11 -34
  297. package/dist/types/utils/check-input.d.mts +9 -12
  298. package/dist/types/utils/cmd.d.mts +4 -4
  299. package/dist/types/utils/color-or-markdown.d.mts +14 -23
  300. package/dist/types/utils/color-or-markdown.d.mts.map +1 -1
  301. package/dist/types/utils/completion.d.mts +11 -0
  302. package/dist/types/utils/completion.d.mts.map +1 -0
  303. package/dist/types/utils/config.d.mts +22 -31
  304. package/dist/types/utils/config.d.mts.map +1 -1
  305. package/dist/types/utils/determine-org-slug.d.mts +2 -7
  306. package/dist/types/utils/errors.d.mts +12 -21
  307. package/dist/types/utils/fail-msg-with-badge.d.mts +2 -5
  308. package/dist/types/utils/fs.d.mts +21 -52
  309. package/dist/types/utils/get-output-kind.d.mts +3 -6
  310. package/dist/types/utils/glob.d.mts +13 -24
  311. package/dist/types/utils/map-to-object.d.mts +4 -6
  312. package/dist/types/utils/markdown.d.mts +4 -15
  313. package/dist/types/utils/meow-with-subcommands.d.mts +34 -46
  314. package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
  315. package/dist/types/utils/npm-paths.d.mts +7 -7
  316. package/dist/types/utils/npm-paths.d.mts.map +1 -1
  317. package/dist/types/utils/objects.d.mts +3 -8
  318. package/dist/types/utils/output-formatting.d.mts +14 -24
  319. package/dist/types/utils/package-environment.d.mts +51 -72
  320. package/dist/types/utils/package-environment.d.mts.map +1 -1
  321. package/dist/types/utils/path-resolve.d.mts +9 -14
  322. package/dist/types/utils/pnpm.d.mts +9 -7
  323. package/dist/types/utils/pnpm.d.mts.map +1 -1
  324. package/dist/types/utils/sdk.d.mts +8 -12
  325. package/dist/types/utils/semver.d.mts +5 -17
  326. package/dist/types/utils/serialize-result-json.d.mts +3 -3
  327. package/dist/types/utils/socket-package-alert.d.mts +62 -81
  328. package/dist/types/utils/socket-url.d.mts +9 -15
  329. package/dist/types/utils/spec.d.mts +4 -7
  330. package/dist/types/utils/spec.d.mts.map +1 -1
  331. package/dist/types/utils/strings.d.mts +2 -5
  332. package/dist/types/utils/translations.d.mts +592 -592
  333. package/dist/types/utils/walk-nested-map.d.mts +7 -10
  334. package/dist/utils.js +1531 -1833
  335. package/dist/utils.js.map +1 -1
  336. package/dist/vendor.js +38333 -51605
  337. package/dist/vendor.js.map +1 -1
  338. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +5 -8
  339. package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +2 -4
  340. package/external/@socketsecurity/registry/external/cacache.js +1 -2
  341. package/external/@socketsecurity/registry/external/libnpmpack.js +36 -76
  342. package/external/@socketsecurity/registry/external/make-fetch-happen.js +31 -67
  343. package/external/@socketsecurity/registry/external/pacote.js +36 -76
  344. package/external/@socketsecurity/registry/external/tinyglobby.js +3 -6
  345. package/external/@socketsecurity/registry/external/which.js +2 -4
  346. package/external/@socketsecurity/registry/lib/logger.d.ts +4 -1
  347. package/external/@socketsecurity/registry/lib/logger.js +160 -73
  348. package/external/@socketsecurity/registry/lib/spinner.js +5 -1
  349. package/external/@socketsecurity/registry/package.json +2 -2
  350. package/external/blessed/lib/alias.js +475 -468
  351. package/external/blessed/lib/blessed.js +12 -12
  352. package/external/blessed/lib/colors.js +234 -194
  353. package/external/blessed/lib/events.js +64 -70
  354. package/external/blessed/lib/gpmclient.js +117 -141
  355. package/external/blessed/lib/helpers.js +89 -94
  356. package/external/blessed/lib/keys.js +169 -342
  357. package/external/blessed/lib/program.js +2130 -2365
  358. package/external/blessed/lib/tput.js +1183 -1276
  359. package/external/blessed/lib/unicode.js +400 -522
  360. package/external/blessed/lib/widget.js +14 -14
  361. package/external/blessed/lib/widgets/ansiimage.js +90 -96
  362. package/external/blessed/lib/widgets/bigtext.js +91 -102
  363. package/external/blessed/lib/widgets/box.js +8 -8
  364. package/external/blessed/lib/widgets/button.js +23 -23
  365. package/external/blessed/lib/widgets/checkbox.js +50 -54
  366. package/external/blessed/lib/widgets/element.js +1415 -1716
  367. package/external/blessed/lib/widgets/filemanager.js +107 -118
  368. package/external/blessed/lib/widgets/form.js +144 -178
  369. package/external/blessed/lib/widgets/image.js +26 -36
  370. package/external/blessed/lib/widgets/input.js +8 -8
  371. package/external/blessed/lib/widgets/layout.js +103 -119
  372. package/external/blessed/lib/widgets/line.js +17 -20
  373. package/external/blessed/lib/widgets/list.js +349 -402
  374. package/external/blessed/lib/widgets/listbar.js +265 -306
  375. package/external/blessed/lib/widgets/listtable.js +133 -146
  376. package/external/blessed/lib/widgets/loading.js +31 -31
  377. package/external/blessed/lib/widgets/log.js +41 -40
  378. package/external/blessed/lib/widgets/message.js +64 -86
  379. package/external/blessed/lib/widgets/node.js +175 -207
  380. package/external/blessed/lib/widgets/overlayimage.js +360 -437
  381. package/external/blessed/lib/widgets/progressbar.js +79 -88
  382. package/external/blessed/lib/widgets/prompt.js +54 -61
  383. package/external/blessed/lib/widgets/question.js +48 -61
  384. package/external/blessed/lib/widgets/radiobutton.js +26 -27
  385. package/external/blessed/lib/widgets/radioset.js +8 -8
  386. package/external/blessed/lib/widgets/screen.js +1186 -1375
  387. package/external/blessed/lib/widgets/scrollablebox.js +202 -228
  388. package/external/blessed/lib/widgets/scrollabletext.js +9 -9
  389. package/external/blessed/lib/widgets/table.js +187 -216
  390. package/external/blessed/lib/widgets/terminal.js +258 -298
  391. package/external/blessed/lib/widgets/text.js +9 -9
  392. package/external/blessed/lib/widgets/textarea.js +188 -222
  393. package/external/blessed/lib/widgets/textbox.js +34 -36
  394. package/external/blessed/lib/widgets/video.js +55 -59
  395. package/external/blessed/usr/fonts/ter-u14b.json +1 -1
  396. package/external/blessed/usr/fonts/ter-u14n.json +1 -1
  397. package/external/blessed/vendor/tng.js +1016 -1144
  398. package/external/blessed-contrib/lib/layout/grid.js +345 -377
  399. package/external/blessed-contrib/lib/widget/charts/bar.js +6612 -7139
  400. package/external/blessed-contrib/lib/widget/charts/line.js +16224 -23941
  401. package/external/blessed-contrib/lib/widget/table.js +78 -96
  402. package/package.json +9 -9
  403. package/dist/types/commands/cdxgen/run-cdxgen.d.mts.map +0 -1
package/dist/constants.js CHANGED
@@ -1,26 +1,16 @@
1
- 'use strict'
1
+ 'use strict';
2
2
 
3
- const fs = require('node:fs')
4
- const Module = require('node:module')
5
- const os = require('node:os')
6
- const path = require('node:path')
7
- const require$$0 = require('node:url')
8
- const registryConstants = require('../external/@socketsecurity/registry/lib/constants')
3
+ var fs = require('node:fs');
4
+ var Module = require('node:module');
5
+ var os = require('node:os');
6
+ var path = require('node:path');
7
+ var require$$0 = require('node:url');
8
+ var registryConstants = require('../external/@socketsecurity/registry/lib/constants');
9
9
 
10
- const _documentCurrentScript =
11
- typeof document !== 'undefined' ? document.currentScript : null
12
- const require$1 = Module.createRequire(
13
- require$$0.pathToFileURL(__filename).href
14
- )
15
- const __filename$1 = require$$0.fileURLToPath(
16
- typeof document === 'undefined'
17
- ? require$$0.pathToFileURL(__filename).href
18
- : (_documentCurrentScript &&
19
- _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' &&
20
- _documentCurrentScript.src) ||
21
- new URL('constants.js', document.baseURI).href
22
- )
23
- const __dirname$1 = path.dirname(__filename$1)
10
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
11
+ const require$1 =Module.createRequire(require$$0.pathToFileURL(__filename).href)
12
+ const __filename$1 = require$$0.fileURLToPath((typeof document === 'undefined' ? require$$0.pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('constants.js', document.baseURI).href)));
13
+ const __dirname$1 = path.dirname(__filename$1);
24
14
  const {
25
15
  kInternalsSymbol,
26
16
  [kInternalsSymbol]: {
@@ -28,60 +18,62 @@ const {
28
18
  createConstantsObject,
29
19
  getIpc
30
20
  }
31
- } = registryConstants
32
- const ALERT_TYPE_CRITICAL_CVE = 'criticalCVE'
33
- const ALERT_TYPE_CVE = 'cve'
34
- const ALERT_TYPE_MEDIUM_CVE = 'mediumCVE'
35
- const ALERT_TYPE_MILD_CVE = 'mildCVE'
36
- const API_V0_URL = 'https://api.socket.dev/v0/'
37
- const BINARY_LOCK_EXT = '.lockb'
38
- const BUN = 'bun'
39
- const CLI = 'cli'
40
- const CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER =
41
- 'firstPatchedVersionIdentifier'
42
- const DRY_RUN_LABEL = '[DryRun]'
43
- const DRY_RUN_BAILING_NOW = `${DRY_RUN_LABEL}: Bailing now`
44
- const DRY_RUN_NOT_SAVING = `${DRY_RUN_LABEL}: Not saving`
45
- const LOCALAPPDATA = 'LOCALAPPDATA'
46
- const LOCK_EXT = '.lock'
47
- const NPM_BUGGY_OVERRIDES_PATCHED_VERSION = '11.2.0'
48
- const NPM_REGISTRY_URL = 'https://registry.npmjs.org'
49
- const PNPM = 'pnpm'
50
- const REDACTED = '<redacted>'
51
- const SHADOW_BIN = 'shadow-bin'
52
- const SHADOW_INJECT = 'shadow-inject'
53
- const SOCKET = 'socket'
54
- const SOCKET_CLI_ACCEPT_RISKS = 'SOCKET_CLI_ACCEPT_RISKS'
55
- const SOCKET_CLI_BIN_NAME = 'socket'
56
- const SOCKET_CLI_BIN_NAME_ALIAS = 'cli'
57
- const SOCKET_CLI_FIX = 'SOCKET_CLI_FIX'
58
- const SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues'
59
- const SOCKET_CLI_LEGACY_PACKAGE_NAME = '@socketsecurity/cli'
60
- const SOCKET_CLI_OPTIMIZE = 'SOCKET_CLI_OPTIMIZE'
61
- const SOCKET_CLI_NPM_BIN_NAME = 'socket-npm'
62
- const SOCKET_CLI_NPX_BIN_NAME = 'socket-npx'
63
- const SOCKET_CLI_PACKAGE_NAME = 'socket'
64
- const SOCKET_CLI_SAFE_BIN = 'SOCKET_CLI_SAFE_BIN'
65
- const SOCKET_CLI_SAFE_PROGRESS = 'SOCKET_CLI_SAFE_PROGRESS'
66
- const SOCKET_CLI_SENTRY_BIN_NAME = 'socket-with-sentry'
67
- const SOCKET_CLI_SENTRY_BIN_NAME_ALIAS = 'cli-with-sentry'
68
- const SOCKET_CLI_SENTRY_NPM_BIN_NAME = 'socket-npm-with-sentry'
69
- const SOCKET_CLI_SENTRY_NPX_BIN_NAME = 'socket-npx-with-sentry'
70
- const SOCKET_CLI_SENTRY_PACKAGE_NAME = '@socketsecurity/cli-with-sentry'
71
- const SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS'
72
- const SOCKET_WEBSITE_URL = 'https://socket.dev'
73
- const VLT = 'vlt'
74
- const WITH_SENTRY = 'with-sentry'
75
- const YARN = 'yarn'
76
- const YARN_BERRY = 'yarn/berry'
77
- const YARN_CLASSIC = 'yarn/classic'
78
- const YARN_LOCK = 'yarn.lock'
79
- let _Sentry
21
+ } = registryConstants;
22
+ const ALERT_TYPE_CRITICAL_CVE = 'criticalCVE';
23
+ const ALERT_TYPE_CVE = 'cve';
24
+ const ALERT_TYPE_MEDIUM_CVE = 'mediumCVE';
25
+ const ALERT_TYPE_MILD_CVE = 'mildCVE';
26
+ const API_V0_URL = 'https://api.socket.dev/v0/';
27
+ const BINARY_LOCK_EXT = '.lockb';
28
+ const BUN = 'bun';
29
+ const CLI = 'cli';
30
+ const CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER = 'firstPatchedVersionIdentifier';
31
+ const DRY_RUN_LABEL = '[DryRun]';
32
+ const DRY_RUN_BAILING_NOW = `${DRY_RUN_LABEL}: Bailing now`;
33
+ const DRY_RUN_NOT_SAVING = `${DRY_RUN_LABEL}: Not saving`;
34
+ const LOCALAPPDATA = 'LOCALAPPDATA';
35
+ const LOCK_EXT = '.lock';
36
+ const NPM_BUGGY_OVERRIDES_PATCHED_VERSION = '11.2.0';
37
+ const NPM_REGISTRY_URL = 'https://registry.npmjs.org';
38
+ const PNPM = 'pnpm';
39
+ const REDACTED = '<redacted>';
40
+ const SHADOW_BIN = 'shadow-bin';
41
+ const SHADOW_INJECT = 'shadow-inject';
42
+ const SOCKET = 'socket';
43
+ const SOCKET_CLI_ACCEPT_RISKS = 'SOCKET_CLI_ACCEPT_RISKS';
44
+ const SOCKET_CLI_BIN_NAME = 'socket';
45
+ const SOCKET_CLI_BIN_NAME_ALIAS = 'cli';
46
+ const SOCKET_CLI_FIX = 'SOCKET_CLI_FIX';
47
+ const SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues';
48
+ const SOCKET_CLI_LEGACY_PACKAGE_NAME = '@socketsecurity/cli';
49
+ const SOCKET_CLI_OPTIMIZE = 'SOCKET_CLI_OPTIMIZE';
50
+ const SOCKET_CLI_NPM_BIN_NAME = 'socket-npm';
51
+ const SOCKET_CLI_NPX_BIN_NAME = 'socket-npx';
52
+ const SOCKET_CLI_PACKAGE_NAME = 'socket';
53
+ const SOCKET_CLI_SAFE_BIN = 'SOCKET_CLI_SAFE_BIN';
54
+ const SOCKET_CLI_SAFE_PROGRESS = 'SOCKET_CLI_SAFE_PROGRESS';
55
+ const SOCKET_CLI_SENTRY_BIN_NAME = 'socket-with-sentry';
56
+ const SOCKET_CLI_SENTRY_BIN_NAME_ALIAS = 'cli-with-sentry';
57
+ const SOCKET_CLI_SENTRY_NPM_BIN_NAME = 'socket-npm-with-sentry';
58
+ const SOCKET_CLI_SENTRY_NPX_BIN_NAME = 'socket-npx-with-sentry';
59
+ const SOCKET_CLI_SENTRY_PACKAGE_NAME = '@socketsecurity/cli-with-sentry';
60
+ const SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS';
61
+ const SOCKET_WEBSITE_URL = 'https://socket.dev';
62
+ const VLT = 'vlt';
63
+ const WITH_SENTRY = 'with-sentry';
64
+ const YARN = 'yarn';
65
+ const YARN_BERRY = 'yarn/berry';
66
+ const YARN_CLASSIC = 'yarn/classic';
67
+ const YARN_LOCK = 'yarn.lock';
68
+ let _Sentry;
80
69
  const LAZY_ENV = () => {
81
- const { envAsBoolean, envAsString } = require$1(
82
- '../external/@socketsecurity/registry/lib/env'
83
- )
84
- const { env } = process
70
+ const {
71
+ envAsBoolean,
72
+ envAsString
73
+ } = require$1('../external/@socketsecurity/registry/lib/env');
74
+ const {
75
+ env
76
+ } = process;
85
77
  // We inline some environment values so that they CANNOT be influenced by user
86
78
  // provided environment variables.
87
79
  return Object.freeze({
@@ -112,18 +104,16 @@ const LAZY_ENV = () => {
112
104
  GITHUB_TOKEN: envAsString(env['GITHUB_TOKEN']),
113
105
  // Comp-time inlined @cyclonedx/cdxgen package version.
114
106
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_CYCLONEDX_CDXGEN_VERSION']".
115
- INLINED_CYCLONEDX_CDXGEN_VERSION: envAsString('11.3.1'),
107
+ INLINED_CYCLONEDX_CDXGEN_VERSION: envAsString("11.3.1"),
116
108
  // Comp-time inlined Socket package homepage.
117
109
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_HOMEPAGE']".
118
- INLINED_SOCKET_CLI_HOMEPAGE: envAsString(
119
- 'https://github.com/SocketDev/socket-cli'
120
- ),
110
+ INLINED_SOCKET_CLI_HOMEPAGE: envAsString("https://github.com/SocketDev/socket-cli"),
121
111
  // Comp-time inlined flag to determine if this is the Legacy build.
122
112
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_LEGACY_BUILD']".
123
113
  INLINED_SOCKET_CLI_LEGACY_BUILD: envAsBoolean(false),
124
114
  // Comp-time inlined Socket package name.
125
115
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_NAME']".
126
- INLINED_SOCKET_CLI_NAME: envAsString('@socketsecurity/cli'),
116
+ INLINED_SOCKET_CLI_NAME: envAsString("@socketsecurity/cli"),
127
117
  // Comp-time inlined flag to determine if this is a published build.
128
118
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']".
129
119
  INLINED_SOCKET_CLI_PUBLISHED_BUILD: envAsBoolean(true),
@@ -132,15 +122,13 @@ const LAZY_ENV = () => {
132
122
  INLINED_SOCKET_CLI_SENTRY_BUILD: envAsBoolean(true),
133
123
  // Comp-time inlined Socket package version.
134
124
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
135
- INLINED_SOCKET_CLI_VERSION: envAsString('0.15.10'),
125
+ INLINED_SOCKET_CLI_VERSION: envAsString("0.15.12"),
136
126
  // Comp-time inlined Socket package version hash.
137
127
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
138
- INLINED_SOCKET_CLI_VERSION_HASH: envAsString(
139
- '0.15.10:f606e82:6456caea:pub'
140
- ),
128
+ INLINED_SOCKET_CLI_VERSION_HASH: envAsString("0.15.12:e1d6f18:c57760a1:pub"),
141
129
  // Comp-time inlined synp package version.
142
130
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SYNP_VERSION']".
143
- INLINED_SYNP_VERSION: envAsString('1.9.14'),
131
+ INLINED_SYNP_VERSION: envAsString("1.9.14"),
144
132
  // The location of the %localappdata% folder on Windows used to store user-specific,
145
133
  // non-roaming application data, like temporary files, cached data, and program
146
134
  // settings, that are specific to the current machine and user.
@@ -148,11 +136,10 @@ const LAZY_ENV = () => {
148
136
  // Flag to enable the module compile cache for the Node.js instance.
149
137
  // https://nodejs.org/api/cli.html#node_compile_cachedir
150
138
  NODE_COMPILE_CACHE:
151
- // Lazily access constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR.
152
- constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR
153
- ? // Lazily access constants.socketCachePath.
154
- constants.socketCachePath
155
- : '',
139
+ // Lazily access constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR.
140
+ constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR ?
141
+ // Lazily access constants.socketCachePath.
142
+ constants.socketCachePath : '',
156
143
  // PATH is an environment variable that lists directories where executable
157
144
  // programs are located. When a command is run, the system searches these
158
145
  // directories to find the executable.
@@ -169,30 +156,26 @@ const LAZY_ENV = () => {
169
156
  SOCKET_CLI_VIEW_ALL_RISKS: envAsBoolean(env[SOCKET_CLI_VIEW_ALL_RISKS]),
170
157
  // Flag to change the base URL for all API-calls.
171
158
  // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development
172
- SOCKET_SECURITY_API_BASE_URL:
173
- envAsString(env['SOCKET_SECURITY_API_BASE_URL']) ||
174
- // For consistency; allow socket_cli prefix too
175
- envAsString(env['SOCKET_CLI_API_BASE_URL']),
159
+ SOCKET_SECURITY_API_BASE_URL: envAsString(env['SOCKET_SECURITY_API_BASE_URL']) ||
160
+ // For consistency; allow socket_cli prefix too
161
+ envAsString(env['SOCKET_CLI_API_BASE_URL']),
176
162
  // Flag to set the proxy all requests are routed through.
177
163
  // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development
178
- SOCKET_SECURITY_API_PROXY:
179
- envAsString(env['SOCKET_SECURITY_API_PROXY']) ||
180
- // For consistency; allow socket_cli prefix too
181
- envAsString(env['SOCKET_CLI_API_BASE_URL']),
164
+ SOCKET_SECURITY_API_PROXY: envAsString(env['SOCKET_SECURITY_API_PROXY']) ||
165
+ // For consistency; allow socket_cli prefix too
166
+ envAsString(env['SOCKET_CLI_API_BASE_URL']),
182
167
  // Flag to set the API token.
183
168
  // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables
184
169
  SOCKET_SECURITY_API_TOKEN:
185
- // Note: These are SOCKET_SECURITY prefixed because they're not specific
186
- // to the CLI. For the sake of consistency we'll also support the env
187
- // keys that do have the SOCKET_CLI prefix, it's an easy mistake.
188
- // In case multiple are supplied, the tokens supersede the keys and the
189
- // security prefix supersedes the cli prefix. "Adventure mode" ;)
190
- envAsString(env['SOCKET_SECURITY_API_TOKEN']) ||
191
- // Keep 'SOCKET_SECURITY_API_KEY' alias.
192
- // TODO: Remove 'SOCKET_SECURITY_API_KEY' alias.
193
- envAsString(env['SOCKET_SECURITY_API_KEY']) ||
194
- envAsString(env['SOCKET_CLI_API_TOKEN']) ||
195
- envAsString(env['SOCKET_CLI_API_KEY']),
170
+ // Note: These are SOCKET_SECURITY prefixed because they're not specific
171
+ // to the CLI. For the sake of consistency we'll also support the env
172
+ // keys that do have the SOCKET_CLI prefix, it's an easy mistake.
173
+ // In case multiple are supplied, the tokens supersede the keys and the
174
+ // security prefix supersedes the cli prefix. "Adventure mode" ;)
175
+ envAsString(env['SOCKET_SECURITY_API_TOKEN']) ||
176
+ // Keep 'SOCKET_SECURITY_API_KEY' alias.
177
+ // TODO: Remove 'SOCKET_SECURITY_API_KEY' alias.
178
+ envAsString(env['SOCKET_SECURITY_API_KEY']) || envAsString(env['SOCKET_CLI_API_TOKEN']) || envAsString(env['SOCKET_CLI_API_KEY']),
196
179
  // A classic GitHub personal access token with the "repo" scope or a fine-grained
197
180
  // access token with read/write permissions set for "Contents" and "Pull Request".
198
181
  // https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
@@ -202,88 +185,78 @@ const LAZY_ENV = () => {
202
185
  // The location of the base directory on Linux and MacOS used to store
203
186
  // user-specific data files, defaulting to $HOME/.local/share if not set or empty.
204
187
  XDG_DATA_HOME: envAsString(env['XDG_DATA_HOME'])
205
- })
206
- }
188
+ });
189
+ };
207
190
  const lazyBashRcPath = () =>
208
- // Lazily access constants.homePath.
209
- path.join(constants.homePath, '.bashrc')
210
- const lazyBlessedOptions = () =>
211
- Object.freeze({
212
- smartCSR: true,
213
- // Lazily access constants.WIN32.
214
- term: constants.WIN32 ? 'windows-ansi' : 'xterm',
215
- useBCE: true
216
- })
191
+ // Lazily access constants.homePath.
192
+ path.join(constants.homePath, '.bashrc');
193
+ const lazyBlessedOptions = () => Object.freeze({
194
+ smartCSR: true,
195
+ // Lazily access constants.WIN32.
196
+ term: constants.WIN32 ? 'windows-ansi' : 'xterm',
197
+ useBCE: true
198
+ });
217
199
  const lazyDistCliPath = () =>
218
- // Lazily access constants.distPath.
219
- path.join(constants.distPath, 'cli.js')
200
+ // Lazily access constants.distPath.
201
+ path.join(constants.distPath, 'cli.js');
220
202
  const lazyDistInstrumentWithSentryPath = () =>
221
- // Lazily access constants.distPath.
222
- path.join(constants.distPath, 'instrument-with-sentry.js')
203
+ // Lazily access constants.distPath.
204
+ path.join(constants.distPath, 'instrument-with-sentry.js');
223
205
  const lazyDistShadowBinPath = () =>
224
- // Lazily access constants.distPath.
225
- path.join(constants.distPath, `${SHADOW_BIN}.js`)
206
+ // Lazily access constants.distPath.
207
+ path.join(constants.distPath, `${SHADOW_BIN}.js`);
226
208
  const lazyDistShadowInjectPath = () =>
227
- // Lazily access constants.distPath.
228
- path.join(constants.distPath, `${SHADOW_INJECT}.js`)
209
+ // Lazily access constants.distPath.
210
+ path.join(constants.distPath, `${SHADOW_INJECT}.js`);
229
211
  const lazyGithubCachePath = () =>
230
- // Lazily access constants.socketCachePath.
231
- path.join(constants.socketCachePath, 'github')
232
- const lazyHomePath = () => os.homedir()
233
- const lazyMinimumVersionByAgent = () =>
234
- new Map([
235
- // Bun >=1.1.39 supports the text-based lockfile.
236
- // https://bun.sh/blog/bun-lock-text-lockfile
237
- [BUN, '1.1.39'],
238
- // The npm version bundled with Node 18.
239
- // https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch
240
- ['npm', '10.8.2'],
241
- // 8.x is the earliest version to support Node 18.
242
- // https://pnpm.io/installation#compatibility
243
- // https://www.npmjs.com/package/pnpm?activeTab=versions
244
- [PNPM, '8.15.7'],
245
- // 4.x supports >= Node 18.12.0
246
- // https://github.com/yarnpkg/berry/blob/%40yarnpkg/core/4.1.0/CHANGELOG.md#400
247
- [YARN_BERRY, '4.0.0'],
248
- // Latest 1.x.
249
- // https://www.npmjs.com/package/yarn?activeTab=versions
250
- [YARN_CLASSIC, '1.22.22'],
251
- // vlt does not support overrides so we don't gate on it.
252
- [VLT, '*']
253
- ])
212
+ // Lazily access constants.socketCachePath.
213
+ path.join(constants.socketCachePath, 'github');
214
+ const lazyHomePath = () => os.homedir();
215
+ const lazyMinimumVersionByAgent = () => new Map([
216
+ // Bun >=1.1.39 supports the text-based lockfile.
217
+ // https://bun.sh/blog/bun-lock-text-lockfile
218
+ [BUN, '1.1.39'],
219
+ // The npm version bundled with Node 18.
220
+ // https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch
221
+ ['npm', '10.8.2'],
222
+ // 8.x is the earliest version to support Node 18.
223
+ // https://pnpm.io/installation#compatibility
224
+ // https://www.npmjs.com/package/pnpm?activeTab=versions
225
+ [PNPM, '8.15.7'],
226
+ // 4.x supports >= Node 18.12.0
227
+ // https://github.com/yarnpkg/berry/blob/%40yarnpkg/core/4.1.0/CHANGELOG.md#400
228
+ [YARN_BERRY, '4.0.0'],
229
+ // Latest 1.x.
230
+ // https://www.npmjs.com/package/yarn?activeTab=versions
231
+ [YARN_CLASSIC, '1.22.22'],
232
+ // vlt does not support overrides so we don't gate on it.
233
+ [VLT, '*']]);
254
234
  const lazyNmBinPath = () =>
255
- // Lazily access constants.rootPath.
256
- path.join(constants.rootPath, 'node_modules/.bin')
235
+ // Lazily access constants.rootPath.
236
+ path.join(constants.rootPath, 'node_modules/.bin');
257
237
 
258
238
  // Redefine registryConstants.nodeHardenFlags to account for the
259
239
  // INLINED_SOCKET_CLI_SENTRY_BUILD environment variable.
260
- const lazyNodeHardenFlags = () =>
261
- Object.freeze(
262
- // Lazily access constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD.
263
- constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD ||
264
- // Lazily access constants.WIN32.
265
- constants.WIN32
266
- ? []
267
- : // Harden Node security.
268
- // https://nodejs.org/en/learn/getting-started/security-best-practices
269
- [
270
- '--disable-proto',
271
- 'throw',
272
- // We have contributed the following patches to our dependencies to make
273
- // Node's --frozen-intrinsics workable.
274
- // √ https://github.com/SBoudrias/Inquirer.js/pull/1683
275
- // √ https://github.com/pnpm/components/pull/23
276
- '--frozen-intrinsics',
277
- '--no-deprecation'
278
- ]
279
- )
240
+ const lazyNodeHardenFlags = () => Object.freeze(
241
+ // Lazily access constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD.
242
+ constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD ||
243
+ // Lazily access constants.WIN32.
244
+ constants.WIN32 ? [] :
245
+ // Harden Node security.
246
+ // https://nodejs.org/en/learn/getting-started/security-best-practices
247
+ ['--disable-proto', 'throw',
248
+ // We have contributed the following patches to our dependencies to make
249
+ // Node's --frozen-intrinsics workable.
250
+ // √ https://github.com/SBoudrias/Inquirer.js/pull/1683
251
+ // √ https://github.com/pnpm/components/pull/23
252
+ '--frozen-intrinsics', '--no-deprecation']);
280
253
  const lazyRootBinPath = () =>
281
- // Lazily access constants.rootPath.
282
- path.join(constants.rootPath, 'bin')
254
+ // Lazily access constants.rootPath.
255
+ path.join(constants.rootPath, 'bin');
283
256
  const lazyDistPath = () =>
284
- // Lazily access constants.rootPath.
285
- path.join(constants.rootPath, 'dist')
286
- const lazyRootPath = () => path.join(fs.realpathSync.native(__dirname$1), '..')
257
+ // Lazily access constants.rootPath.
258
+ path.join(constants.rootPath, 'dist');
259
+ const lazyRootPath = () => path.join(fs.realpathSync.native(__dirname$1), '..');
287
260
  const lazySocketAppDataPath = () => {
288
261
  // Get the OS app data folder:
289
262
  // - Win: %LOCALAPPDATA% or fail?
@@ -298,146 +271,142 @@ const lazySocketAppDataPath = () => {
298
271
  // - Linux: %XDG_DATA_HOME%/socket/settings or "~/.local/share/socket/settings"
299
272
 
300
273
  // Lazily access constants.WIN32.
301
- const { WIN32 } = constants
302
- let dataHome = WIN32
303
- ? // Lazily access constants.ENV.LOCALAPPDATA
304
- constants.ENV.LOCALAPPDATA
305
- : // Lazily access constants.ENV.XDG_DATA_HOME
306
- constants.ENV.XDG_DATA_HOME
274
+ const {
275
+ WIN32
276
+ } = constants;
277
+ let dataHome = WIN32 ?
278
+ // Lazily access constants.ENV.LOCALAPPDATA
279
+ constants.ENV.LOCALAPPDATA :
280
+ // Lazily access constants.ENV.XDG_DATA_HOME
281
+ constants.ENV.XDG_DATA_HOME;
307
282
  if (!dataHome) {
308
283
  if (WIN32) {
309
- const logger = require$1(
310
- '../external/@socketsecurity/registry/lib/logger'
311
- )
312
- logger.warn(`Missing %${LOCALAPPDATA}%`)
284
+ const logger = require$1('../external/@socketsecurity/registry/lib/logger');
285
+ logger.warn(`Missing %${LOCALAPPDATA}%`);
313
286
  } else {
314
287
  dataHome = path.join(
315
- // Lazily access constants.homePath.
316
- constants.homePath,
317
- // Lazily access constants.DARWIN.
318
- constants.DARWIN ? 'Library/Application Support' : '.local/share'
319
- )
288
+ // Lazily access constants.homePath.
289
+ constants.homePath,
290
+ // Lazily access constants.DARWIN.
291
+ constants.DARWIN ? 'Library/Application Support' : '.local/share');
320
292
  }
321
293
  }
322
- return dataHome ? path.join(dataHome, 'socket/settings') : undefined
323
- }
294
+ return dataHome ? path.join(dataHome, 'socket/settings') : undefined;
295
+ };
324
296
  const lazySocketCachePath = () =>
325
- // Lazily access constants.rootPath.
326
- path.join(constants.rootPath, '.cache')
297
+ // Lazily access constants.rootPath.
298
+ path.join(constants.rootPath, '.cache');
327
299
  const lazyShadowBinPath = () =>
328
- // Lazily access constants.rootPath.
329
- path.join(constants.rootPath, SHADOW_BIN)
300
+ // Lazily access constants.rootPath.
301
+ path.join(constants.rootPath, SHADOW_BIN);
330
302
  const lazyZshRcPath = () =>
331
- // Lazily access constants.homePath.
332
- path.join(constants.homePath, '.zshrc')
333
- const constants = createConstantsObject(
334
- {
335
- ...registryConstantsAttribs.props,
336
- ALERT_TYPE_CRITICAL_CVE,
337
- ALERT_TYPE_CVE,
338
- ALERT_TYPE_MEDIUM_CVE,
339
- ALERT_TYPE_MILD_CVE,
340
- API_V0_URL,
341
- BINARY_LOCK_EXT,
342
- BUN,
343
- CLI,
344
- CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER,
345
- DRY_RUN_LABEL,
346
- DRY_RUN_BAILING_NOW,
347
- DRY_RUN_NOT_SAVING,
348
- ENV: undefined,
349
- LOCK_EXT,
350
- NPM_BUGGY_OVERRIDES_PATCHED_VERSION,
351
- NPM_REGISTRY_URL,
352
- PNPM,
353
- REDACTED,
354
- SHADOW_BIN,
355
- SHADOW_INJECT,
356
- SOCKET,
357
- SOCKET_CLI_ACCEPT_RISKS,
358
- SOCKET_CLI_BIN_NAME,
359
- SOCKET_CLI_BIN_NAME_ALIAS,
360
- SOCKET_CLI_FIX,
361
- SOCKET_CLI_ISSUES_URL,
362
- SOCKET_CLI_SENTRY_BIN_NAME_ALIAS,
363
- SOCKET_CLI_LEGACY_PACKAGE_NAME,
364
- SOCKET_CLI_NPM_BIN_NAME,
365
- SOCKET_CLI_NPX_BIN_NAME,
366
- SOCKET_CLI_OPTIMIZE,
367
- SOCKET_CLI_PACKAGE_NAME,
368
- SOCKET_CLI_SAFE_BIN,
369
- SOCKET_CLI_SAFE_PROGRESS,
370
- SOCKET_CLI_SENTRY_BIN_NAME,
371
- SOCKET_CLI_SENTRY_NPM_BIN_NAME,
372
- SOCKET_CLI_SENTRY_NPX_BIN_NAME,
373
- SOCKET_CLI_SENTRY_PACKAGE_NAME,
374
- SOCKET_CLI_VIEW_ALL_RISKS,
375
- SOCKET_WEBSITE_URL,
376
- VLT,
377
- WITH_SENTRY,
378
- YARN,
379
- YARN_BERRY,
380
- YARN_CLASSIC,
381
- YARN_LOCK,
382
- bashRcPath: undefined,
383
- blessedOptions: undefined,
384
- distCliPath: undefined,
385
- distInstrumentWithSentryPath: undefined,
386
- distPath: undefined,
387
- distShadowBinPath: undefined,
388
- distShadowInjectPath: undefined,
389
- githubCachePath: undefined,
390
- homePath: undefined,
391
- minimumVersionByAgent: undefined,
392
- nmBinPath: undefined,
393
- nodeHardenFlags: undefined,
394
- rootBinPath: undefined,
395
- rootPath: undefined,
396
- shadowBinPath: undefined,
397
- socketAppPath: undefined,
398
- socketCachePath: undefined,
399
- zshRcPath: undefined
303
+ // Lazily access constants.homePath.
304
+ path.join(constants.homePath, '.zshrc');
305
+ const constants = createConstantsObject({
306
+ ...registryConstantsAttribs.props,
307
+ ALERT_TYPE_CRITICAL_CVE,
308
+ ALERT_TYPE_CVE,
309
+ ALERT_TYPE_MEDIUM_CVE,
310
+ ALERT_TYPE_MILD_CVE,
311
+ API_V0_URL,
312
+ BINARY_LOCK_EXT,
313
+ BUN,
314
+ CLI,
315
+ CVE_ALERT_PROPS_FIRST_PATCHED_VERSION_IDENTIFIER,
316
+ DRY_RUN_LABEL,
317
+ DRY_RUN_BAILING_NOW,
318
+ DRY_RUN_NOT_SAVING,
319
+ ENV: undefined,
320
+ LOCK_EXT,
321
+ NPM_BUGGY_OVERRIDES_PATCHED_VERSION,
322
+ NPM_REGISTRY_URL,
323
+ PNPM,
324
+ REDACTED,
325
+ SHADOW_BIN,
326
+ SHADOW_INJECT,
327
+ SOCKET,
328
+ SOCKET_CLI_ACCEPT_RISKS,
329
+ SOCKET_CLI_BIN_NAME,
330
+ SOCKET_CLI_BIN_NAME_ALIAS,
331
+ SOCKET_CLI_FIX,
332
+ SOCKET_CLI_ISSUES_URL,
333
+ SOCKET_CLI_SENTRY_BIN_NAME_ALIAS,
334
+ SOCKET_CLI_LEGACY_PACKAGE_NAME,
335
+ SOCKET_CLI_NPM_BIN_NAME,
336
+ SOCKET_CLI_NPX_BIN_NAME,
337
+ SOCKET_CLI_OPTIMIZE,
338
+ SOCKET_CLI_PACKAGE_NAME,
339
+ SOCKET_CLI_SAFE_BIN,
340
+ SOCKET_CLI_SAFE_PROGRESS,
341
+ SOCKET_CLI_SENTRY_BIN_NAME,
342
+ SOCKET_CLI_SENTRY_NPM_BIN_NAME,
343
+ SOCKET_CLI_SENTRY_NPX_BIN_NAME,
344
+ SOCKET_CLI_SENTRY_PACKAGE_NAME,
345
+ SOCKET_CLI_VIEW_ALL_RISKS,
346
+ SOCKET_WEBSITE_URL,
347
+ VLT,
348
+ WITH_SENTRY,
349
+ YARN,
350
+ YARN_BERRY,
351
+ YARN_CLASSIC,
352
+ YARN_LOCK,
353
+ bashRcPath: undefined,
354
+ blessedOptions: undefined,
355
+ distCliPath: undefined,
356
+ distInstrumentWithSentryPath: undefined,
357
+ distPath: undefined,
358
+ distShadowBinPath: undefined,
359
+ distShadowInjectPath: undefined,
360
+ githubCachePath: undefined,
361
+ homePath: undefined,
362
+ minimumVersionByAgent: undefined,
363
+ nmBinPath: undefined,
364
+ nodeHardenFlags: undefined,
365
+ rootBinPath: undefined,
366
+ rootPath: undefined,
367
+ shadowBinPath: undefined,
368
+ socketAppDataPath: undefined,
369
+ socketCachePath: undefined,
370
+ zshRcPath: undefined
371
+ }, {
372
+ getters: {
373
+ ...registryConstantsAttribs.getters,
374
+ ENV: LAZY_ENV,
375
+ bashRcPath: lazyBashRcPath,
376
+ blessedOptions: lazyBlessedOptions,
377
+ distCliPath: lazyDistCliPath,
378
+ distInstrumentWithSentryPath: lazyDistInstrumentWithSentryPath,
379
+ distPath: lazyDistPath,
380
+ distShadowBinPath: lazyDistShadowBinPath,
381
+ distShadowInjectPath: lazyDistShadowInjectPath,
382
+ githubCachePath: lazyGithubCachePath,
383
+ homePath: lazyHomePath,
384
+ minimumVersionByAgent: lazyMinimumVersionByAgent,
385
+ nmBinPath: lazyNmBinPath,
386
+ nodeHardenFlags: lazyNodeHardenFlags,
387
+ rootBinPath: lazyRootBinPath,
388
+ rootPath: lazyRootPath,
389
+ shadowBinPath: lazyShadowBinPath,
390
+ socketAppDataPath: lazySocketAppDataPath,
391
+ socketCachePath: lazySocketCachePath,
392
+ zshRcPath: lazyZshRcPath
400
393
  },
401
- {
402
- getters: {
403
- ...registryConstantsAttribs.getters,
404
- ENV: LAZY_ENV,
405
- bashRcPath: lazyBashRcPath,
406
- blessedOptions: lazyBlessedOptions,
407
- distCliPath: lazyDistCliPath,
408
- distInstrumentWithSentryPath: lazyDistInstrumentWithSentryPath,
409
- distPath: lazyDistPath,
410
- distShadowBinPath: lazyDistShadowBinPath,
411
- distShadowInjectPath: lazyDistShadowInjectPath,
412
- githubCachePath: lazyGithubCachePath,
413
- homePath: lazyHomePath,
414
- minimumVersionByAgent: lazyMinimumVersionByAgent,
415
- nmBinPath: lazyNmBinPath,
416
- nodeHardenFlags: lazyNodeHardenFlags,
417
- rootBinPath: lazyRootBinPath,
418
- rootPath: lazyRootPath,
419
- shadowBinPath: lazyShadowBinPath,
420
- socketAppPath: lazySocketAppDataPath,
421
- socketCachePath: lazySocketCachePath,
422
- zshRcPath: lazyZshRcPath
394
+ internals: {
395
+ ...registryConstantsAttribs.internals,
396
+ getIpc,
397
+ getSentry() {
398
+ return _Sentry;
423
399
  },
424
- internals: {
425
- ...registryConstantsAttribs.internals,
426
- getIpc,
427
- getSentry() {
428
- return _Sentry
429
- },
430
- setSentry(Sentry) {
431
- if (_Sentry === undefined) {
432
- _Sentry = Sentry
433
- return true
434
- }
435
- return false
400
+ setSentry(Sentry) {
401
+ if (_Sentry === undefined) {
402
+ _Sentry = Sentry;
403
+ return true;
436
404
  }
405
+ return false;
437
406
  }
438
407
  }
439
- )
408
+ });
440
409
 
441
- module.exports = constants
442
- //# debugId=a5e2a51f-0fad-4a3a-a6fb-76d25c5de501
410
+ module.exports = constants;
411
+ //# debugId=9f873df4-e24f-4e0f-bd94-5c873d017913
443
412
  //# sourceMappingURL=constants.js.map