@socketsecurity/cli-with-sentry 1.0.85 → 1.0.87

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 (562) hide show
  1. package/README.md +41 -52
  2. package/dist/cli.js +323 -327
  3. package/dist/cli.js.map +1 -1
  4. package/dist/constants.js +20 -48
  5. package/dist/constants.js.map +1 -1
  6. package/dist/flags.js +5 -4
  7. package/dist/flags.js.map +1 -1
  8. package/dist/socket-completion.bash +0 -2
  9. package/dist/utils.js +122 -119
  10. package/dist/utils.js.map +1 -1
  11. package/dist/vendor.js +381 -381
  12. package/external/@coana-tech/cli/cli.mjs +25295 -30074
  13. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +39 -1
  14. package/external/@socketsecurity/registry/external/browserslist.js +7 -1
  15. package/external/@socketsecurity/registry/external/libnpmpack.js +93488 -97365
  16. package/external/@socketsecurity/registry/external/make-fetch-happen.js +4689 -7729
  17. package/external/@socketsecurity/registry/external/pacote.js +51922 -72554
  18. package/external/@socketsecurity/registry/lib/constants/env.js +4 -4
  19. package/external/@socketsecurity/registry/lib/npm.js +2 -4
  20. package/external/@socketsecurity/registry/lib/path.js +17 -0
  21. package/package.json +13 -13
  22. package/dist/tsconfig.dts.tsbuildinfo +0 -1
  23. package/dist/types/cli.d.mts +0 -3
  24. package/dist/types/cli.d.mts.map +0 -1
  25. package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
  26. package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
  27. package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
  28. package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
  29. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
  30. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
  31. package/dist/types/commands/analytics/handle-analytics.d.mts +0 -9
  32. package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
  33. package/dist/types/commands/analytics/output-analytics.d.mts +0 -28
  34. package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
  35. package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
  36. package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
  37. package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
  38. package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
  39. package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
  40. package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
  41. package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
  42. package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
  43. package/dist/types/commands/ci/cmd-ci.d.mts +0 -10
  44. package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
  45. package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
  46. package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
  47. package/dist/types/commands/ci/handle-ci.d.mts +0 -2
  48. package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
  49. package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
  50. package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
  51. package/dist/types/commands/config/cmd-config-get.d.mts +0 -10
  52. package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
  53. package/dist/types/commands/config/cmd-config-list.d.mts +0 -10
  54. package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
  55. package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
  56. package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
  57. package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
  58. package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
  59. package/dist/types/commands/config/cmd-config.d.mts +0 -3
  60. package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
  61. package/dist/types/commands/config/discover-config-value.d.mts +0 -3
  62. package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
  63. package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
  64. package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
  65. package/dist/types/commands/config/handle-config-get.d.mts +0 -7
  66. package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
  67. package/dist/types/commands/config/handle-config-set.d.mts +0 -8
  68. package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
  69. package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
  70. package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
  71. package/dist/types/commands/config/output-config-auto.d.mts +0 -4
  72. package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
  73. package/dist/types/commands/config/output-config-get.d.mts +0 -4
  74. package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
  75. package/dist/types/commands/config/output-config-list.d.mts +0 -6
  76. package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
  77. package/dist/types/commands/config/output-config-set.d.mts +0 -3
  78. package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
  79. package/dist/types/commands/config/output-config-unset.d.mts +0 -3
  80. package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
  81. package/dist/types/commands/fix/agent-fix.d.mts +0 -42
  82. package/dist/types/commands/fix/agent-fix.d.mts.map +0 -1
  83. package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
  84. package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
  85. package/dist/types/commands/fix/coana-fix.d.mts +0 -6
  86. package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
  87. package/dist/types/commands/fix/fix-branch-helpers.d.mts +0 -4
  88. package/dist/types/commands/fix/fix-branch-helpers.d.mts.map +0 -1
  89. package/dist/types/commands/fix/fix-env-helpers.d.mts +0 -13
  90. package/dist/types/commands/fix/fix-env-helpers.d.mts.map +0 -1
  91. package/dist/types/commands/fix/get-actual-tree.d.mts +0 -3
  92. package/dist/types/commands/fix/get-actual-tree.d.mts.map +0 -1
  93. package/dist/types/commands/fix/handle-fix.d.mts +0 -11
  94. package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
  95. package/dist/types/commands/fix/npm-fix.d.mts +0 -7
  96. package/dist/types/commands/fix/npm-fix.d.mts.map +0 -1
  97. package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
  98. package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
  99. package/dist/types/commands/fix/pnpm-fix.d.mts +0 -7
  100. package/dist/types/commands/fix/pnpm-fix.d.mts.map +0 -1
  101. package/dist/types/commands/fix/pull-request.d.mts +0 -47
  102. package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
  103. package/dist/types/commands/fix/shared.d.mts +0 -8
  104. package/dist/types/commands/fix/shared.d.mts.map +0 -1
  105. package/dist/types/commands/fix/socket-git.d.mts +0 -32
  106. package/dist/types/commands/fix/socket-git.d.mts.map +0 -1
  107. package/dist/types/commands/install/cmd-install-completion.d.mts +0 -10
  108. package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
  109. package/dist/types/commands/install/cmd-install.d.mts +0 -3
  110. package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
  111. package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
  112. package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
  113. package/dist/types/commands/install/output-install-completion.d.mts +0 -12
  114. package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
  115. package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
  116. package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
  117. package/dist/types/commands/json/cmd-json.d.mts +0 -10
  118. package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
  119. package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
  120. package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
  121. package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
  122. package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
  123. package/dist/types/commands/login/apply-login.d.mts +0 -2
  124. package/dist/types/commands/login/apply-login.d.mts.map +0 -1
  125. package/dist/types/commands/login/attempt-login.d.mts +0 -6
  126. package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
  127. package/dist/types/commands/login/cmd-login.d.mts +0 -10
  128. package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
  129. package/dist/types/commands/logout/apply-logout.d.mts +0 -2
  130. package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
  131. package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
  132. package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
  133. package/dist/types/commands/logout/cmd-logout.d.mts +0 -10
  134. package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
  135. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -10
  136. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
  137. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -10
  138. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
  139. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -10
  140. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
  141. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -10
  142. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
  143. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -10
  144. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
  145. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -10
  146. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
  147. package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -10
  148. package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
  149. package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -10
  150. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
  151. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
  152. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
  153. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
  154. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
  155. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
  156. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
  157. package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
  158. package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
  159. package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
  160. package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
  161. package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
  162. package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
  163. package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
  164. package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
  165. package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
  166. package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
  167. package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
  168. package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
  169. package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -2
  170. package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
  171. package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
  172. package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
  173. package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
  174. package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
  175. package/dist/types/commands/npx/cmd-npx.d.mts +0 -10
  176. package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
  177. package/dist/types/commands/oops/cmd-oops.d.mts +0 -10
  178. package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
  179. package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
  180. package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
  181. package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
  182. package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
  183. package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
  184. package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
  185. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
  186. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
  187. package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
  188. package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
  189. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
  190. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
  191. package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
  192. package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
  193. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
  194. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
  195. package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
  196. package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
  197. package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
  198. package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
  199. package/dist/types/commands/optimize/shared.d.mts +0 -2
  200. package/dist/types/commands/optimize/shared.d.mts.map +0 -1
  201. package/dist/types/commands/optimize/types.d.mts +0 -9
  202. package/dist/types/commands/optimize/types.d.mts.map +0 -1
  203. package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
  204. package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
  205. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
  206. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
  207. package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
  208. package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
  209. package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
  210. package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
  211. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
  212. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
  213. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
  214. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
  215. package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
  216. package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
  217. package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -10
  218. package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
  219. package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
  220. package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
  221. package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
  222. package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
  223. package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
  224. package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
  225. package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -8
  226. package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
  227. package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
  228. package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
  229. package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
  230. package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
  231. package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
  232. package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
  233. package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
  234. package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
  235. package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
  236. package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
  237. package/dist/types/commands/organization/handle-quota.d.mts +0 -3
  238. package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
  239. package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
  240. package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
  241. package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
  242. package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
  243. package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
  244. package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
  245. package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
  246. package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
  247. package/dist/types/commands/organization/output-quota.d.mts +0 -4
  248. package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
  249. package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
  250. package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
  251. package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
  252. package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
  253. package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
  254. package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
  255. package/dist/types/commands/package/cmd-package.d.mts +0 -3
  256. package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
  257. package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
  258. package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
  259. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
  260. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
  261. package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
  262. package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
  263. package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
  264. package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
  265. package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
  266. package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
  267. package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
  268. package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
  269. package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
  270. package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
  271. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -10
  272. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
  273. package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
  274. package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
  275. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -10
  276. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
  277. package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
  278. package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
  279. package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
  280. package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
  281. package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
  282. package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
  283. package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
  284. package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
  285. package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
  286. package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
  287. package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
  288. package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
  289. package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
  290. package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
  291. package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
  292. package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
  293. package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
  294. package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
  295. package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
  296. package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
  297. package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
  298. package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
  299. package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
  300. package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
  301. package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
  302. package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
  303. package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
  304. package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
  305. package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
  306. package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
  307. package/dist/types/commands/repository/handle-list-repos.d.mts +0 -11
  308. package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
  309. package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
  310. package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
  311. package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
  312. package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
  313. package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
  314. package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
  315. package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
  316. package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
  317. package/dist/types/commands/repository/output-list-repos.d.mts +0 -4
  318. package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
  319. package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
  320. package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
  321. package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
  322. package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
  323. package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
  324. package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
  325. package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
  326. package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
  327. package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
  328. package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
  329. package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
  330. package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
  331. package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -3
  332. package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
  333. package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -3
  334. package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
  335. package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
  336. package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
  337. package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -3
  338. package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
  339. package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -10
  340. package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
  341. package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -3
  342. package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
  343. package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
  344. package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
  345. package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
  346. package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
  347. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
  348. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
  349. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
  350. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
  351. package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
  352. package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
  353. package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
  354. package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
  355. package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
  356. package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
  357. package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
  358. package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
  359. package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
  360. package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
  361. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -8
  362. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
  363. package/dist/types/commands/scan/generate-report.d.mts +0 -43
  364. package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
  365. package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
  366. package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
  367. package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -21
  368. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
  369. package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
  370. package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
  371. package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
  372. package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
  373. package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
  374. package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
  375. package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
  376. package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
  377. package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
  378. package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
  379. package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -8
  380. package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
  381. package/dist/types/commands/scan/handle-scan-report.d.mts +0 -12
  382. package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
  383. package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
  384. package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
  385. package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -4
  386. package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
  387. package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
  388. package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
  389. package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
  390. package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
  391. package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
  392. package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
  393. package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
  394. package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
  395. package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
  396. package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
  397. package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
  398. package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
  399. package/dist/types/commands/scan/output-scan-reach.d.mts +0 -3
  400. package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
  401. package/dist/types/commands/scan/output-scan-report.d.mts +0 -20
  402. package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
  403. package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
  404. package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
  405. package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
  406. package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
  407. package/dist/types/commands/scan/stream-scan.d.mts +0 -7
  408. package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
  409. package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
  410. package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
  411. package/dist/types/commands/scan/suggest-repo-slug.d.mts +0 -9
  412. package/dist/types/commands/scan/suggest-repo-slug.d.mts.map +0 -1
  413. package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
  414. package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
  415. package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
  416. package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
  417. package/dist/types/commands/scan/suggest_target.d.mts +0 -2
  418. package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
  419. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
  420. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
  421. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
  422. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
  423. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
  424. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
  425. package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
  426. package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
  427. package/dist/types/commands/threat-feed/types.d.mts +0 -15
  428. package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
  429. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -9
  430. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
  431. package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
  432. package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
  433. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
  434. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
  435. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
  436. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
  437. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
  438. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
  439. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
  440. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
  441. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
  442. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
  443. package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -10
  444. package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
  445. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
  446. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
  447. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
  448. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
  449. package/dist/types/constants.d.mts +0 -149
  450. package/dist/types/constants.d.mts.map +0 -1
  451. package/dist/types/flags.d.mts +0 -17
  452. package/dist/types/flags.d.mts.map +0 -1
  453. package/dist/types/instrument-with-sentry.d.mts +0 -2
  454. package/dist/types/instrument-with-sentry.d.mts.map +0 -1
  455. package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
  456. package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
  457. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
  458. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
  459. package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
  460. package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
  461. package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -39
  462. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
  463. package/dist/types/shadow/npm/bin.d.mts +0 -2
  464. package/dist/types/shadow/npm/bin.d.mts.map +0 -1
  465. package/dist/types/shadow/npm/inject.d.mts +0 -2
  466. package/dist/types/shadow/npm/inject.d.mts.map +0 -1
  467. package/dist/types/shadow/npm/install.d.mts +0 -13
  468. package/dist/types/shadow/npm/install.d.mts.map +0 -1
  469. package/dist/types/shadow/npm/link.d.mts +0 -2
  470. package/dist/types/shadow/npm/link.d.mts.map +0 -1
  471. package/dist/types/shadow/npm/paths.d.mts +0 -7
  472. package/dist/types/shadow/npm/paths.d.mts.map +0 -1
  473. package/dist/types/types.d.mts +0 -29
  474. package/dist/types/types.d.mts.map +0 -1
  475. package/dist/types/utils/agent.d.mts +0 -12
  476. package/dist/types/utils/agent.d.mts.map +0 -1
  477. package/dist/types/utils/alert/artifact.d.mts +0 -35
  478. package/dist/types/utils/alert/artifact.d.mts.map +0 -1
  479. package/dist/types/utils/alert/fix.d.mts +0 -6
  480. package/dist/types/utils/alert/fix.d.mts.map +0 -1
  481. package/dist/types/utils/alert/severity.d.mts +0 -14
  482. package/dist/types/utils/alert/severity.d.mts.map +0 -1
  483. package/dist/types/utils/alerts-map.d.mts +0 -24
  484. package/dist/types/utils/alerts-map.d.mts.map +0 -1
  485. package/dist/types/utils/api.d.mts +0 -18
  486. package/dist/types/utils/api.d.mts.map +0 -1
  487. package/dist/types/utils/check-input.d.mts +0 -9
  488. package/dist/types/utils/check-input.d.mts.map +0 -1
  489. package/dist/types/utils/cmd.d.mts +0 -5
  490. package/dist/types/utils/cmd.d.mts.map +0 -1
  491. package/dist/types/utils/coana.d.mts +0 -4
  492. package/dist/types/utils/coana.d.mts.map +0 -1
  493. package/dist/types/utils/color-or-markdown.d.mts +0 -16
  494. package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
  495. package/dist/types/utils/completion.d.mts +0 -11
  496. package/dist/types/utils/completion.d.mts.map +0 -1
  497. package/dist/types/utils/config.d.mts +0 -32
  498. package/dist/types/utils/config.d.mts.map +0 -1
  499. package/dist/types/utils/determine-org-slug.d.mts +0 -2
  500. package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
  501. package/dist/types/utils/errors.d.mts +0 -14
  502. package/dist/types/utils/errors.d.mts.map +0 -1
  503. package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
  504. package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
  505. package/dist/types/utils/fs.d.mts +0 -9
  506. package/dist/types/utils/fs.d.mts.map +0 -1
  507. package/dist/types/utils/get-output-kind.d.mts +0 -3
  508. package/dist/types/utils/get-output-kind.d.mts.map +0 -1
  509. package/dist/types/utils/git.d.mts +0 -29
  510. package/dist/types/utils/git.d.mts.map +0 -1
  511. package/dist/types/utils/glob.d.mts +0 -16
  512. package/dist/types/utils/glob.d.mts.map +0 -1
  513. package/dist/types/utils/lockfile.d.mts +0 -2
  514. package/dist/types/utils/lockfile.d.mts.map +0 -1
  515. package/dist/types/utils/map-to-object.d.mts +0 -10
  516. package/dist/types/utils/map-to-object.d.mts.map +0 -1
  517. package/dist/types/utils/markdown.d.mts +0 -10
  518. package/dist/types/utils/markdown.d.mts.map +0 -1
  519. package/dist/types/utils/meow-with-subcommands.d.mts +0 -47
  520. package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
  521. package/dist/types/utils/ms-at-home.d.mts +0 -2
  522. package/dist/types/utils/ms-at-home.d.mts.map +0 -1
  523. package/dist/types/utils/npm-config.d.mts +0 -14
  524. package/dist/types/utils/npm-config.d.mts.map +0 -1
  525. package/dist/types/utils/npm-package-arg.d.mts +0 -4
  526. package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
  527. package/dist/types/utils/npm-paths.d.mts +0 -7
  528. package/dist/types/utils/npm-paths.d.mts.map +0 -1
  529. package/dist/types/utils/objects.d.mts +0 -3
  530. package/dist/types/utils/objects.d.mts.map +0 -1
  531. package/dist/types/utils/output-formatting.d.mts +0 -16
  532. package/dist/types/utils/output-formatting.d.mts.map +0 -1
  533. package/dist/types/utils/package-environment.d.mts +0 -57
  534. package/dist/types/utils/package-environment.d.mts.map +0 -1
  535. package/dist/types/utils/path-resolve.d.mts +0 -14
  536. package/dist/types/utils/path-resolve.d.mts.map +0 -1
  537. package/dist/types/utils/pnpm.d.mts +0 -11
  538. package/dist/types/utils/pnpm.d.mts.map +0 -1
  539. package/dist/types/utils/purl.d.mts +0 -15
  540. package/dist/types/utils/purl.d.mts.map +0 -1
  541. package/dist/types/utils/sdk.d.mts +0 -13
  542. package/dist/types/utils/sdk.d.mts.map +0 -1
  543. package/dist/types/utils/semver.d.mts +0 -8
  544. package/dist/types/utils/semver.d.mts.map +0 -1
  545. package/dist/types/utils/serialize-result-json.d.mts +0 -5
  546. package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
  547. package/dist/types/utils/socket-package-alert.d.mts +0 -77
  548. package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
  549. package/dist/types/utils/socket-url.d.mts +0 -7
  550. package/dist/types/utils/socket-url.d.mts.map +0 -1
  551. package/dist/types/utils/socketjson.d.mts +0 -56
  552. package/dist/types/utils/socketjson.d.mts.map +0 -1
  553. package/dist/types/utils/spec.d.mts +0 -5
  554. package/dist/types/utils/spec.d.mts.map +0 -1
  555. package/dist/types/utils/strings.d.mts +0 -2
  556. package/dist/types/utils/strings.d.mts.map +0 -1
  557. package/dist/types/utils/tildify.d.mts +0 -4
  558. package/dist/types/utils/tildify.d.mts.map +0 -1
  559. package/dist/types/utils/translations.d.mts +0 -593
  560. package/dist/types/utils/translations.d.mts.map +0 -1
  561. package/dist/types/utils/walk-nested-map.d.mts +0 -7
  562. package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
package/dist/constants.js CHANGED
@@ -39,26 +39,13 @@ const NPM_BUGGY_OVERRIDES_PATCHED_VERSION = '11.2.0';
39
39
  const NPM_REGISTRY_URL = 'https://registry.npmjs.org';
40
40
  const PNPM = 'pnpm';
41
41
  const REDACTED = '<redacted>';
42
- const SHADOW_NPM_BIN = 'shadow-npm-bin';
43
- const SHADOW_NPM_INJECT = 'shadow-npm-inject';
44
- const SOCKET = 'socket';
45
42
  const SOCKET_CLI_ACCEPT_RISKS = 'SOCKET_CLI_ACCEPT_RISKS';
46
43
  const SOCKET_CLI_BIN_NAME = 'socket';
47
- const SOCKET_CLI_BIN_NAME_ALIAS = 'cli';
48
44
  const SOCKET_CLI_FIX = 'SOCKET_CLI_FIX';
49
45
  const SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues';
50
- const SOCKET_CLI_LEGACY_PACKAGE_NAME = '@socketsecurity/cli';
51
46
  const SOCKET_CLI_OPTIMIZE = 'SOCKET_CLI_OPTIMIZE';
52
- const SOCKET_CLI_NPM_BIN_NAME = 'socket-npm';
53
- const SOCKET_CLI_NPX_BIN_NAME = 'socket-npx';
54
- const SOCKET_CLI_PACKAGE_NAME = 'socket';
55
47
  const SOCKET_CLI_SAFE_BIN = 'SOCKET_CLI_SAFE_BIN';
56
48
  const SOCKET_CLI_SAFE_PROGRESS = 'SOCKET_CLI_SAFE_PROGRESS';
57
- const SOCKET_CLI_SENTRY_BIN_NAME = 'socket-with-sentry';
58
- const SOCKET_CLI_SENTRY_BIN_NAME_ALIAS = 'cli-with-sentry';
59
- const SOCKET_CLI_SENTRY_NPM_BIN_NAME = 'socket-npm-with-sentry';
60
- const SOCKET_CLI_SENTRY_NPX_BIN_NAME = 'socket-npx-with-sentry';
61
- const SOCKET_CLI_SENTRY_PACKAGE_NAME = '@socketsecurity/cli-with-sentry';
62
49
  const SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS';
63
50
  const SOCKET_DEFAULT_BRANCH = 'socket-default-branch';
64
51
  const SOCKET_DEFAULT_REPOSITORY = 'socket-default-repository';
@@ -100,7 +87,7 @@ const LAZY_ENV = () => {
100
87
  __proto__: null,
101
88
  // Lazily access registryConstants.ENV.
102
89
  ...registryConstants.ENV,
103
- // Variable to disable using GitHub's workflow actions/cache.
90
+ // Disable using GitHub's workflow actions/cache.
104
91
  // https://github.com/actions/cache
105
92
  DISABLE_GITHUB_CACHE: envAsBoolean(env['DISABLE_GITHUB_CACHE']),
106
93
  // The API URL. For example, https://api.github.com.
@@ -153,24 +140,24 @@ const LAZY_ENV = () => {
153
140
  INLINED_SOCKET_CLI_SYNP_VERSION: envAsString("1.9.14"),
154
141
  // Comp-time inlined Socket package version.
155
142
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
156
- INLINED_SOCKET_CLI_VERSION: envAsString("1.0.85"),
143
+ INLINED_SOCKET_CLI_VERSION: envAsString("1.0.87"),
157
144
  // Comp-time inlined Socket package version hash.
158
145
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
159
- INLINED_SOCKET_CLI_VERSION_HASH: envAsString("1.0.85:d35cc5b:4cca222f:pub"),
146
+ INLINED_SOCKET_CLI_VERSION_HASH: envAsString("1.0.87:848284c:581d6f3a:pub"),
160
147
  // The absolute location of the %localappdata% folder on Windows used to store
161
148
  // user-specific, non-roaming application data, like temporary files, cached
162
149
  // data, and program settings, that are specific to the current machine and user.
163
150
  LOCALAPPDATA: envAsString(env[LOCALAPPDATA]),
164
- // Variable to enable the module compile cache for the Node.js instance.
151
+ // Enable the module compile cache for the Node.js instance.
165
152
  // https://nodejs.org/api/cli.html#node_compile_cachedir
166
153
  NODE_COMPILE_CACHE:
167
154
  // Lazily access constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR.
168
155
  constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR ?
169
156
  // Lazily access constants.socketCachePath.
170
157
  constants.socketCachePath : '',
171
- // When set, the well known "root" CAs (like VeriSign) will be extended with
172
- // the extra certificates in file. The file should consist of one or more
173
- // trusted certificates in PEM format.
158
+ // Well known "root" CAs (like VeriSign) will be extended with the extra
159
+ // certificates in file. The file should consist of one or more trusted
160
+ // certificates in PEM format.
174
161
  // https://nodejs.org/api/cli.html#node_extra_ca_certsfile
175
162
  NODE_EXTRA_CA_CERTS: envAsString(env['NODE_EXTRA_CA_CERTS']) ||
176
163
  // Commonly used environment variable to specify the path to a single
@@ -180,24 +167,22 @@ const LAZY_ENV = () => {
180
167
  // programs are located. When a command is run, the system searches these
181
168
  // directories to find the executable.
182
169
  PATH: envAsString(env['PATH']),
183
- // Variable to accepts risks of safe-npm and safe-npx run.
170
+ // Accept risks of a Socket wrapped npm/npx run.
184
171
  SOCKET_CLI_ACCEPT_RISKS: envAsBoolean(env[SOCKET_CLI_ACCEPT_RISKS]),
185
- // Variable to change the base URL for all API-calls.
172
+ // Change the base URL for all API-calls.
186
173
  // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development
187
174
  SOCKET_CLI_API_BASE_URL: envAsString(env['SOCKET_CLI_API_BASE_URL']) || envAsString(env['SOCKET_SECURITY_API_BASE_URL']) || getConfigValueOrUndef('apiBaseUrl') || 'https://api.socket.dev/v0/',
188
- // Variable to set the proxy all requests are routed through.
175
+ // Set the proxy that all requests are routed through.
189
176
  // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development
190
177
  SOCKET_CLI_API_PROXY: envAsString(env['SOCKET_CLI_API_PROXY']) || envAsString(env['SOCKET_SECURITY_API_PROXY']) ||
191
178
  // Commonly used environment variables to specify routing requests through
192
179
  // a proxy server.
193
180
  envAsString(env['HTTPS_PROXY']) || envAsString(env['https_proxy']) || envAsString(env['HTTP_PROXY']) || envAsString(env['http_proxy']),
194
- // Variable to set the Socket API token.
181
+ // Set the Socket API token.
195
182
  // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables
196
183
  SOCKET_CLI_API_TOKEN: envAsString(env['SOCKET_CLI_API_TOKEN']) || envAsString(env['SOCKET_CLI_API_KEY']) || envAsString(env['SOCKET_SECURITY_API_TOKEN']) || envAsString(env['SOCKET_SECURITY_API_KEY']),
197
- // Variable containing a JSON stringified Socket configuration object.
184
+ // A JSON stringified Socket configuration object.
198
185
  SOCKET_CLI_CONFIG: envAsString(env['SOCKET_CLI_CONFIG']),
199
- // Variable to help debug Socket CLI.
200
- SOCKET_CLI_DEBUG: envAsBoolean(env['SOCKET_CLI_DEBUG']),
201
186
  // The git config user.email used by Socket CLI.
202
187
  SOCKET_CLI_GIT_USER_EMAIL: envAsString(env['SOCKET_CLI_GIT_USER_EMAIL']) || 'github-actions[bot]@users.noreply.github.com',
203
188
  // The git config user.name used by Socket CLI.
@@ -207,15 +192,15 @@ const LAZY_ENV = () => {
207
192
  // "Contents" and "Pull Request".
208
193
  // https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
209
194
  SOCKET_CLI_GITHUB_TOKEN: envAsString(env['SOCKET_CLI_GITHUB_TOKEN']) || envAsString(env['SOCKET_SECURITY_GITHUB_PAT']) || GITHUB_TOKEN,
210
- // Variable to make the default API token `undefined`.
195
+ // Make the default API token `undefined`.
211
196
  SOCKET_CLI_NO_API_TOKEN: envAsBoolean(env['SOCKET_CLI_NO_API_TOKEN']),
212
- // The absolute location of the npm bin file.
197
+ // The absolute location of the npm directory.
213
198
  SOCKET_CLI_NPM_PATH: envAsString(env['SOCKET_CLI_NPM_PATH']),
214
- // Variable to specify the Socket organization slug.
199
+ // Specify the Socket organization slug.
215
200
  SOCKET_CLI_ORG_SLUG: envAsString(env['SOCKET_CLI_ORG_SLUG']) ||
216
201
  // Coana CLI accepts the SOCKET_ORG_SLUG environment variable.
217
202
  envAsString(env['SOCKET_ORG_SLUG']),
218
- // Variable to view all risks of safe-npm and safe-npx run.
203
+ // View all risks of a Socket wrapped npm/npx run.
219
204
  SOCKET_CLI_VIEW_ALL_RISKS: envAsBoolean(env[SOCKET_CLI_VIEW_ALL_RISKS]),
220
205
  // Specifies the type of terminal or terminal emulator being used by the process.
221
206
  TERM: envAsString(env['TERM']),
@@ -358,12 +343,12 @@ const lazyShadowBinPath = () =>
358
343
  path.join(constants.rootPath, 'shadow-npm-bin');
359
344
  const lazyShadowNpmBinPath = () =>
360
345
  // Lazily access constants.distPath.
361
- path.join(constants.distPath, `${SHADOW_NPM_BIN}.js`);
346
+ path.join(constants.distPath, 'shadow-npm-bin.js');
362
347
  const lazyShadowNpmInjectPath = () =>
363
348
  // Lazily access constants.distPath.
364
- path.join(constants.distPath, `${SHADOW_NPM_INJECT}.js`);
349
+ path.join(constants.distPath, 'shadow-npm-inject.js');
365
350
  const lazySocketAppDataPath = () => {
366
- // Get the OS app data folder:
351
+ // Get the OS app data directory:
367
352
  // - Win: %LOCALAPPDATA% or fail?
368
353
  // - Mac: %XDG_DATA_HOME% or fallback to "~/Library/Application Support/"
369
354
  // - Linux: %XDG_DATA_HOME% or fallback to "~/.local/share/"
@@ -426,26 +411,13 @@ const constants = createConstantsObject({
426
411
  NPM_REGISTRY_URL,
427
412
  PNPM,
428
413
  REDACTED,
429
- SHADOW_NPM_BIN,
430
- SHADOW_NPM_INJECT,
431
- SOCKET,
432
414
  SOCKET_CLI_ACCEPT_RISKS,
433
415
  SOCKET_CLI_BIN_NAME,
434
- SOCKET_CLI_BIN_NAME_ALIAS,
435
416
  SOCKET_CLI_FIX,
436
417
  SOCKET_CLI_ISSUES_URL,
437
- SOCKET_CLI_SENTRY_BIN_NAME_ALIAS,
438
- SOCKET_CLI_LEGACY_PACKAGE_NAME,
439
- SOCKET_CLI_NPM_BIN_NAME,
440
- SOCKET_CLI_NPX_BIN_NAME,
441
418
  SOCKET_CLI_OPTIMIZE,
442
- SOCKET_CLI_PACKAGE_NAME,
443
419
  SOCKET_CLI_SAFE_BIN,
444
420
  SOCKET_CLI_SAFE_PROGRESS,
445
- SOCKET_CLI_SENTRY_BIN_NAME,
446
- SOCKET_CLI_SENTRY_NPM_BIN_NAME,
447
- SOCKET_CLI_SENTRY_NPX_BIN_NAME,
448
- SOCKET_CLI_SENTRY_PACKAGE_NAME,
449
421
  SOCKET_CLI_VIEW_ALL_RISKS,
450
422
  SOCKET_DEFAULT_BRANCH,
451
423
  SOCKET_DEFAULT_REPOSITORY,
@@ -537,5 +509,5 @@ const constants = createConstantsObject({
537
509
  });
538
510
 
539
511
  module.exports = constants;
540
- //# debugId=5afc7378-bb47-480b-a6ad-6081997e9db3
512
+ //# debugId=3671fe5b-04dc-47f0-a223-21d1f9db2046
541
513
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../src/constants.mts"],"sourcesContent":["import { realpathSync } from 'node:fs'\nimport { createRequire } from 'node:module'\nimport os from 'node:os'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nimport registryConstants from '@socketsecurity/registry/lib/constants'\n\nimport type { Agent } from './utils/package-environment.mts'\nimport type { Remap } from '@socketsecurity/registry/lib/objects'\nimport type { SpawnOptions } from '@socketsecurity/registry/lib/spawn'\n\nconst require = createRequire(import.meta.url)\nconst __filename = fileURLToPath(import.meta.url)\n// Using `path.dirname(__filename)` to resolve `__dirname` works for both 'dist'\n// AND 'src' directories because constants.js and constants.mts respectively are\n// in the root of each.\nconst __dirname = path.dirname(__filename)\n\nconst {\n kInternalsSymbol,\n [kInternalsSymbol as unknown as 'Symbol(kInternalsSymbol)']: {\n attributes: registryConstantsAttribs,\n createConstantsObject,\n getIpc,\n },\n} = registryConstants\n\ntype RegistryEnv = typeof registryConstants.ENV\n\ntype RegistryInternals = (typeof registryConstants)['Symbol(kInternalsSymbol)']\n\ntype Sentry = any\n\ntype Internals = Remap<\n Omit<RegistryInternals, 'getIpc'> &\n Readonly<{\n getIpc: {\n (): Promise<IPC>\n <K extends keyof IPC | undefined>(\n key?: K | undefined,\n ): Promise<K extends keyof IPC ? IPC[K] : IPC>\n }\n getSentry: () => Sentry\n setSentry(Sentry: Sentry): boolean\n }>\n>\n\ntype ENV = Remap<\n RegistryEnv &\n Readonly<{\n DISABLE_GITHUB_CACHE: boolean\n GITHUB_API_URL: string\n GITHUB_BASE_REF: string\n GITHUB_REF_NAME: string\n GITHUB_REF_TYPE: string\n GITHUB_REPOSITORY: string\n GITHUB_SERVER_URL: string\n GITHUB_TOKEN: string\n INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION: string\n INLINED_SOCKET_CLI_HOMEPAGE: string\n INLINED_SOCKET_CLI_LEGACY_BUILD: string\n INLINED_SOCKET_CLI_NAME: string\n INLINED_SOCKET_CLI_PUBLISHED_BUILD: string\n INLINED_SOCKET_CLI_SENTRY_BUILD: string\n INLINED_SOCKET_CLI_VERSION: string\n INLINED_SOCKET_CLI_VERSION_HASH: string\n INLINED_SOCKET_CLI_SYNP_VERSION: string\n LOCALAPPDATA: string\n NODE_COMPILE_CACHE: string\n NODE_EXTRA_CA_CERTS: string\n PATH: string\n SOCKET_CLI_ACCEPT_RISKS: boolean\n SOCKET_CLI_API_BASE_URL: string\n SOCKET_CLI_API_PROXY: string\n SOCKET_CLI_API_TOKEN: string\n SOCKET_CLI_CONFIG: string\n SOCKET_CLI_DEBUG: boolean\n SOCKET_CLI_GIT_USER_EMAIL: string\n SOCKET_CLI_GIT_USER_NAME: string\n SOCKET_CLI_GITHUB_TOKEN: string\n SOCKET_CLI_NO_API_TOKEN: boolean\n SOCKET_CLI_NPM_PATH: string\n SOCKET_CLI_ORG_SLUG: string\n SOCKET_CLI_VIEW_ALL_RISKS: boolean\n TERM: string\n XDG_DATA_HOME: string\n }>\n>\n\ntype ProcessEnv = {\n [K in keyof ENV]?: string\n}\n\ntype IPC = Readonly<{\n SOCKET_CLI_FIX?: string | undefined\n SOCKET_CLI_OPTIMIZE?: boolean | undefined\n SOCKET_CLI_SAFE_BIN?: string | undefined\n SOCKET_CLI_SAFE_PROGRESS?: boolean | undefined\n}>\n\ntype Constants = Remap<\n Omit<typeof registryConstants, 'Symbol(kInternalsSymbol)' | 'ENV' | 'IPC'> & {\n readonly 'Symbol(kInternalsSymbol)': Internals\n readonly ALERT_TYPE_CRITICAL_CVE: 'criticalCVE'\n readonly ALERT_TYPE_CVE: 'cve'\n readonly ALERT_TYPE_MEDIUM_CVE: 'mediumCVE'\n readonly ALERT_TYPE_MILD_CVE: 'mildCVE'\n readonly API_V0_URL: 'https://api.socket.dev/v0/'\n readonly BINARY_LOCK_EXT: '.lockb'\n readonly BUN: 'bun'\n readonly ENV: ENV\n readonly DOT_SOCKET_DOT_FACTS_JSON: '.socket.facts.json'\n readonly DRY_RUN_LABEL: '[DryRun]'\n readonly DRY_RUN_BAILING_NOW: '[DryRun] Bailing now'\n readonly DRY_RUN_NOT_SAVING: '[DryRun] Not saving'\n readonly IPC: IPC\n readonly LOCK_EXT: '.lock'\n readonly NPM_BUGGY_OVERRIDES_PATCHED_VERSION: '11.2.0'\n readonly NPM_REGISTRY_URL: 'https://registry.npmjs.org'\n readonly PNPM: 'pnpm'\n readonly REDACTED: '<redacted>'\n readonly SHADOW_NPM_BIN: 'shadow-npm-bin'\n readonly SHADOW_NPM_INJECT: 'shadow-npm-inject'\n readonly SOCKET: 'socket'\n readonly SOCKET_CLI_ACCEPT_RISKS: 'SOCKET_CLI_ACCEPT_RISKS'\n readonly SOCKET_CLI_BIN_NAME: 'socket'\n readonly SOCKET_CLI_BIN_NAME_ALIAS: 'cli'\n readonly SOCKET_CLI_CONFIG: 'SOCKET_CLI_CONFIG'\n readonly SOCKET_CLI_FIX: 'SOCKET_CLI_FIX'\n readonly SOCKET_CLI_ISSUES_URL: 'https://github.com/SocketDev/socket-cli/issues'\n readonly SOCKET_CLI_SENTRY_BIN_NAME_ALIAS: 'cli-with-sentry'\n readonly SOCKET_CLI_LEGACY_PACKAGE_NAME: '@socketsecurity/cli'\n readonly SOCKET_CLI_NPM_BIN_NAME: 'socket-npm'\n readonly SOCKET_CLI_NPX_BIN_NAME: 'socket-npx'\n readonly SOCKET_CLI_OPTIMIZE: 'SOCKET_CLI_OPTIMIZE'\n readonly SOCKET_CLI_PACKAGE_NAME: 'socket'\n readonly SOCKET_CLI_SAFE_BIN: 'SOCKET_CLI_SAFE_BIN'\n readonly SOCKET_CLI_SAFE_PROGRESS: 'SOCKET_CLI_SAFE_PROGRESS'\n readonly SOCKET_CLI_SENTRY_BIN_NAME: 'socket-with-sentry'\n readonly SOCKET_CLI_SENTRY_NPM_BIN_NAME: 'socket-npm-with-sentry'\n readonly SOCKET_CLI_SENTRY_NPX_BIN_NAME: 'socket-npx-with-sentry'\n readonly SOCKET_CLI_SENTRY_PACKAGE_NAME: '@socketsecurity/cli-with-sentry'\n readonly SOCKET_CLI_VIEW_ALL_RISKS: 'SOCKET_CLI_VIEW_ALL_RISKS'\n readonly SOCKET_DEFAULT_BRANCH: 'socket-default-branch'\n readonly SOCKET_DEFAULT_REPOSITORY: 'socket-default-repository'\n readonly SOCKET_WEBSITE_URL: 'https://socket.dev'\n readonly VLT: 'vlt'\n readonly YARN: 'yarn'\n readonly YARN_BERRY: 'yarn/berry'\n readonly YARN_CLASSIC: 'yarn/classic'\n readonly YARN_LOCK: 'yarn.lock'\n readonly bashRcPath: string\n readonly binCliPath: string\n readonly binPath: string\n readonly blessedContribPath: string\n readonly blessedOptions: {\n smartCSR: boolean\n term: string\n useBCE: boolean\n }\n readonly blessedPath: string\n readonly coanaBinPath: string\n readonly coanaPath: string\n readonly distCliPath: string\n readonly distPath: string\n readonly externalPath: string\n readonly githubCachePath: string\n readonly homePath: string\n readonly instrumentWithSentryPath: string\n readonly minimumVersionByAgent: Map<Agent, string>\n readonly nmBinPath: string\n readonly nodeHardenFlags: string[]\n readonly nodeMemoryFlags: string[]\n readonly npmCachePath: string\n readonly npmGlobalPrefix: string\n readonly npmNmNodeGypPath: string\n readonly processEnv: ProcessEnv\n readonly rootPath: string\n readonly shadowBinPath: string\n readonly shadowNpmBinPath: string\n readonly shadowNpmInjectPath: string\n readonly socketAppDataPath: string\n readonly socketCachePath: string\n readonly socketRegistryPath: string\n readonly zshRcPath: string\n }\n>\n\nconst ALERT_TYPE_CRITICAL_CVE = 'criticalCVE'\nconst ALERT_TYPE_CVE = 'cve'\nconst ALERT_TYPE_MEDIUM_CVE = 'mediumCVE'\nconst ALERT_TYPE_MILD_CVE = 'mildCVE'\nconst API_V0_URL = 'https://api.socket.dev/v0/'\nconst BINARY_LOCK_EXT = '.lockb'\nconst BUN = 'bun'\nconst DOT_SOCKET_DOT_FACTS_JSON = '.socket.facts.json'\nconst DRY_RUN_LABEL = '[DryRun]'\nconst DRY_RUN_BAILING_NOW = `${DRY_RUN_LABEL}: Bailing now`\nconst DRY_RUN_NOT_SAVING = `${DRY_RUN_LABEL}: Not saving`\nconst LOCALAPPDATA = 'LOCALAPPDATA'\nconst LOCK_EXT = '.lock'\nconst NPM_BUGGY_OVERRIDES_PATCHED_VERSION = '11.2.0'\nconst NPM_REGISTRY_URL = 'https://registry.npmjs.org'\nconst PNPM = 'pnpm'\nconst REDACTED = '<redacted>'\nconst SHADOW_NPM_BIN = 'shadow-npm-bin'\nconst SHADOW_NPM_INJECT = 'shadow-npm-inject'\nconst SOCKET = 'socket'\nconst SOCKET_CLI_ACCEPT_RISKS = 'SOCKET_CLI_ACCEPT_RISKS'\nconst SOCKET_CLI_BIN_NAME = 'socket'\nconst SOCKET_CLI_BIN_NAME_ALIAS = 'cli'\nconst SOCKET_CLI_FIX = 'SOCKET_CLI_FIX'\nconst SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues'\nconst SOCKET_CLI_LEGACY_PACKAGE_NAME = '@socketsecurity/cli'\nconst SOCKET_CLI_OPTIMIZE = 'SOCKET_CLI_OPTIMIZE'\nconst SOCKET_CLI_NPM_BIN_NAME = 'socket-npm'\nconst SOCKET_CLI_NPX_BIN_NAME = 'socket-npx'\nconst SOCKET_CLI_PACKAGE_NAME = 'socket'\nconst SOCKET_CLI_SAFE_BIN = 'SOCKET_CLI_SAFE_BIN'\nconst SOCKET_CLI_SAFE_PROGRESS = 'SOCKET_CLI_SAFE_PROGRESS'\nconst SOCKET_CLI_SENTRY_BIN_NAME = 'socket-with-sentry'\nconst SOCKET_CLI_SENTRY_BIN_NAME_ALIAS = 'cli-with-sentry'\nconst SOCKET_CLI_SENTRY_NPM_BIN_NAME = 'socket-npm-with-sentry'\nconst SOCKET_CLI_SENTRY_NPX_BIN_NAME = 'socket-npx-with-sentry'\nconst SOCKET_CLI_SENTRY_PACKAGE_NAME = '@socketsecurity/cli-with-sentry'\nconst SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS'\nconst SOCKET_DEFAULT_BRANCH = 'socket-default-branch'\nconst SOCKET_DEFAULT_REPOSITORY = 'socket-default-repository'\nconst SOCKET_WEBSITE_URL = 'https://socket.dev'\nconst VLT = 'vlt'\nconst YARN = 'yarn'\nconst YARN_BERRY = 'yarn/berry'\nconst YARN_CLASSIC = 'yarn/classic'\nconst YARN_LOCK = 'yarn.lock'\n\nlet _Sentry: any\n\nlet _npmStdioPipeOptions: SpawnOptions | undefined\nfunction getNpmStdioPipeOptions() {\n if (_npmStdioPipeOptions === undefined) {\n _npmStdioPipeOptions = {\n cwd: process.cwd(),\n // Lazily access constants.WIN32.\n shell: constants.WIN32,\n }\n }\n return _npmStdioPipeOptions\n}\n\nconst LAZY_ENV = () => {\n const { env } = process\n const {\n envAsBoolean,\n envAsString,\n } = /*@__PURE__*/ require('@socketsecurity/registry/lib/env')\n const { getConfigValueOrUndef } = /*@__PURE__*/ require(\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'dist/utils.js'),\n )\n const GITHUB_TOKEN = envAsString(env['GITHUB_TOKEN'])\n // We inline some environment values so that they CANNOT be influenced by user\n // provided environment variables.\n return Object.freeze({\n __proto__: null,\n // Lazily access registryConstants.ENV.\n ...registryConstants.ENV,\n // Variable to disable using GitHub's workflow actions/cache.\n // https://github.com/actions/cache\n DISABLE_GITHUB_CACHE: envAsBoolean(env['DISABLE_GITHUB_CACHE']),\n // The API URL. For example, https://api.github.com.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_API_URL:\n envAsString(env['GITHUB_API_URL']) || 'https://api.github.com',\n // The name of the base ref or target branch of the pull request in a workflow\n // run. This is only set when the event that triggers a workflow run is either\n // pull_request or pull_request_target. For example, main.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_BASE_REF: envAsString(env['GITHUB_BASE_REF']),\n // The short ref name of the branch or tag that triggered the GitHub workflow\n // run. This value matches the branch or tag name shown on GitHub. For example,\n // feature-branch-1. For pull requests, the format is <pr_number>/merge.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_REF_NAME: envAsString(env['GITHUB_REF_NAME']),\n // The type of ref that triggered the workflow run. Valid values are branch or tag.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_REF_TYPE: envAsString(env['GITHUB_REF_TYPE']),\n // The owner and repository name. For example, octocat/Hello-World.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_REPOSITORY: envAsString(env['GITHUB_REPOSITORY']),\n // The URL of the GitHub server. For example, https://github.com.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_SERVER_URL:\n envAsString(env['GITHUB_SERVER_URL']) || 'https://github.com',\n // The GITHUB_TOKEN secret is a GitHub App installation access token.\n // The token's permissions are limited to the repository that contains the\n // workflow.\n // https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#about-the-github_token-secret\n GITHUB_TOKEN,\n // Comp-time inlined @cyclonedx/cdxgen package version.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION']\".\n INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION: envAsString(\n process.env['INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION'],\n ),\n // Comp-time inlined Socket package homepage.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_HOMEPAGE']\".\n INLINED_SOCKET_CLI_HOMEPAGE: envAsString(\n process.env['INLINED_SOCKET_CLI_HOMEPAGE'],\n ),\n // Comp-time inlined flag to determine if this is the Legacy build.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_LEGACY_BUILD']\".\n INLINED_SOCKET_CLI_LEGACY_BUILD: envAsBoolean(\n process.env['INLINED_SOCKET_CLI_LEGACY_BUILD'],\n ),\n // Comp-time inlined Socket package name.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_NAME']\".\n INLINED_SOCKET_CLI_NAME: envAsString(\n process.env['INLINED_SOCKET_CLI_NAME'],\n ),\n // Comp-time inlined flag to determine if this is a published build.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\".\n INLINED_SOCKET_CLI_PUBLISHED_BUILD: envAsBoolean(\n process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD'],\n ),\n // Comp-time inlined flag to determine if this is the Sentry build.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']\".\n INLINED_SOCKET_CLI_SENTRY_BUILD: envAsBoolean(\n process.env['INLINED_SOCKET_CLI_SENTRY_BUILD'],\n ),\n // Comp-time inlined synp package version.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SYNP_VERSION']\".\n INLINED_SOCKET_CLI_SYNP_VERSION: envAsString(\n process.env['INLINED_SOCKET_CLI_SYNP_VERSION'],\n ),\n // Comp-time inlined Socket package version.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION']\".\n INLINED_SOCKET_CLI_VERSION: envAsString(\n process.env['INLINED_SOCKET_CLI_VERSION'],\n ),\n // Comp-time inlined Socket package version hash.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION_HASH']\".\n INLINED_SOCKET_CLI_VERSION_HASH: envAsString(\n process.env['INLINED_SOCKET_CLI_VERSION_HASH'],\n ),\n // The absolute location of the %localappdata% folder on Windows used to store\n // user-specific, non-roaming application data, like temporary files, cached\n // data, and program settings, that are specific to the current machine and user.\n LOCALAPPDATA: envAsString(env[LOCALAPPDATA]),\n // Variable to enable the module compile cache for the Node.js instance.\n // https://nodejs.org/api/cli.html#node_compile_cachedir\n NODE_COMPILE_CACHE:\n // Lazily access constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR.\n constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR\n ? // Lazily access constants.socketCachePath.\n constants.socketCachePath\n : '',\n // When set, the well known \"root\" CAs (like VeriSign) will be extended with\n // the extra certificates in file. The file should consist of one or more\n // trusted certificates in PEM format.\n // https://nodejs.org/api/cli.html#node_extra_ca_certsfile\n NODE_EXTRA_CA_CERTS:\n envAsString(env['NODE_EXTRA_CA_CERTS']) ||\n // Commonly used environment variable to specify the path to a single\n // PEM-encoded certificate file.\n envAsString(env['SSL_CERT_FILE']),\n // PATH is an environment variable that lists directories where executable\n // programs are located. When a command is run, the system searches these\n // directories to find the executable.\n PATH: envAsString(env['PATH']),\n // Variable to accepts risks of safe-npm and safe-npx run.\n SOCKET_CLI_ACCEPT_RISKS: envAsBoolean(env[SOCKET_CLI_ACCEPT_RISKS]),\n // Variable to change the base URL for all API-calls.\n // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development\n SOCKET_CLI_API_BASE_URL:\n envAsString(env['SOCKET_CLI_API_BASE_URL']) ||\n envAsString(env['SOCKET_SECURITY_API_BASE_URL']) ||\n getConfigValueOrUndef('apiBaseUrl') ||\n 'https://api.socket.dev/v0/',\n // Variable to set the proxy all requests are routed through.\n // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development\n SOCKET_CLI_API_PROXY:\n envAsString(env['SOCKET_CLI_API_PROXY']) ||\n envAsString(env['SOCKET_SECURITY_API_PROXY']) ||\n // Commonly used environment variables to specify routing requests through\n // a proxy server.\n envAsString(env['HTTPS_PROXY']) ||\n envAsString(env['https_proxy']) ||\n envAsString(env['HTTP_PROXY']) ||\n envAsString(env['http_proxy']),\n // Variable to set the Socket API token.\n // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables\n SOCKET_CLI_API_TOKEN:\n envAsString(env['SOCKET_CLI_API_TOKEN']) ||\n envAsString(env['SOCKET_CLI_API_KEY']) ||\n envAsString(env['SOCKET_SECURITY_API_TOKEN']) ||\n envAsString(env['SOCKET_SECURITY_API_KEY']),\n // Variable containing a JSON stringified Socket configuration object.\n SOCKET_CLI_CONFIG: envAsString(env['SOCKET_CLI_CONFIG']),\n // Variable to help debug Socket CLI.\n SOCKET_CLI_DEBUG: envAsBoolean(env['SOCKET_CLI_DEBUG']),\n // The git config user.email used by Socket CLI.\n SOCKET_CLI_GIT_USER_EMAIL:\n envAsString(env['SOCKET_CLI_GIT_USER_EMAIL']) ||\n 'github-actions[bot]@users.noreply.github.com',\n // The git config user.name used by Socket CLI.\n SOCKET_CLI_GIT_USER_NAME:\n envAsString(env['SOCKET_CLI_GIT_USER_NAME']) ||\n envAsString(env['SOCKET_CLI_GIT_USERNAME']) ||\n 'github-actions[bot]',\n // A classic GitHub personal access token with the \"repo\" scope or a\n // fine-grained access token with at least read/write permissions set for\n // \"Contents\" and \"Pull Request\".\n // https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\n SOCKET_CLI_GITHUB_TOKEN:\n envAsString(env['SOCKET_CLI_GITHUB_TOKEN']) ||\n envAsString(env['SOCKET_SECURITY_GITHUB_PAT']) ||\n GITHUB_TOKEN,\n // Variable to make the default API token `undefined`.\n SOCKET_CLI_NO_API_TOKEN: envAsBoolean(env['SOCKET_CLI_NO_API_TOKEN']),\n // The absolute location of the npm bin file.\n SOCKET_CLI_NPM_PATH: envAsString(env['SOCKET_CLI_NPM_PATH']),\n // Variable to specify the Socket organization slug.\n SOCKET_CLI_ORG_SLUG:\n envAsString(env['SOCKET_CLI_ORG_SLUG']) ||\n // Coana CLI accepts the SOCKET_ORG_SLUG environment variable.\n envAsString(env['SOCKET_ORG_SLUG']),\n // Variable to view all risks of safe-npm and safe-npx run.\n SOCKET_CLI_VIEW_ALL_RISKS: envAsBoolean(env[SOCKET_CLI_VIEW_ALL_RISKS]),\n // Specifies the type of terminal or terminal emulator being used by the process.\n TERM: envAsString(env['TERM']),\n // The location of the base directory on Linux and MacOS used to store\n // user-specific data files, defaulting to $HOME/.local/share if not set or empty.\n XDG_DATA_HOME: envAsString(env['XDG_DATA_HOME']),\n })\n}\n\nconst lazyBashRcPath = () =>\n // Lazily access constants.homePath.\n path.join(constants.homePath, '.bashrc')\n\nconst lazyBinPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'bin')\n\nconst lazyBinCliPath = () =>\n // Lazily access constants.binPath.\n path.join(constants.binPath, 'cli.js')\n\nconst lazyBlessedContribPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, 'blessed-contrib')\n\nconst lazyBlessedOptions = () =>\n Object.freeze({\n smartCSR: true,\n // Lazily access constants.WIN32.\n term: constants.WIN32 ? 'windows-ansi' : 'xterm',\n useBCE: true,\n })\n\nconst lazyBlessedPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, 'blessed')\n\nconst lazyCoanaBinPath = () =>\n // Lazily access constants.coanaPath.\n path.join(constants.coanaPath, 'cli.mjs')\n\nconst lazyCoanaPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, '@coana-tech/cli')\n\nconst lazyDistCliPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, 'cli.js')\n\nconst lazyDistPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'dist')\n\nconst lazyExternalPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'external')\n\nconst lazyGithubCachePath = () =>\n // Lazily access constants.socketCachePath.\n path.join(constants.socketCachePath, 'github')\n\nconst lazyHomePath = () => os.homedir()\n\nconst lazyInstrumentWithSentryPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, 'instrument-with-sentry.js')\n\nconst lazyMinimumVersionByAgent = () =>\n new Map([\n // Bun >=1.1.39 supports the text-based lockfile.\n // https://bun.sh/blog/bun-lock-text-lockfile\n [BUN, '1.1.39'],\n // The npm version bundled with Node 18.\n // https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch\n ['npm', '10.8.2'],\n // 8.x is the earliest version to support Node 18.\n // https://pnpm.io/installation#compatibility\n // https://www.npmjs.com/package/pnpm?activeTab=versions\n [PNPM, '8.15.7'],\n // 4.x supports >= Node 18.12.0\n // https://github.com/yarnpkg/berry/blob/%40yarnpkg/core/4.1.0/CHANGELOG.md#400\n [YARN_BERRY, '4.0.0'],\n // Latest 1.x.\n // https://www.npmjs.com/package/yarn?activeTab=versions\n [YARN_CLASSIC, '1.22.22'],\n // vlt does not support overrides so we don't gate on it.\n [VLT, '*'],\n ])\n\nconst lazyNmBinPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'node_modules/.bin')\n\n// Redefine registryConstants.nodeHardenFlags to account for the\n// INLINED_SOCKET_CLI_SENTRY_BUILD environment variable.\nconst lazyNodeHardenFlags = () =>\n Object.freeze(\n // Lazily access constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD.\n constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD ||\n // Lazily access constants.WIN32.\n constants.WIN32\n ? []\n : // Harden Node security.\n // https://nodejs.org/en/learn/getting-started/security-best-practices\n [\n '--disable-proto',\n 'throw',\n // We have contributed the following patches to our dependencies to make\n // Node's --frozen-intrinsics workable.\n // √ https://github.com/SBoudrias/Inquirer.js/pull/1683\n // √ https://github.com/pnpm/components/pull/23\n '--frozen-intrinsics',\n '--no-deprecation',\n ],\n )\n\nconst lazyNodeMemoryFlags = () => {\n const {\n getMaxOldSpaceSizeFlag,\n getMaxSemiSpaceSizeFlag,\n } = /*@__PURE__*/ require(\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'dist/flags.js'),\n )\n return Object.freeze([\n `--max-old-space-size=${getMaxOldSpaceSizeFlag()}`,\n `--max-semi-space-size=${getMaxSemiSpaceSizeFlag()}`,\n ])\n}\n\nconst lazyNpmCachePath = () => {\n const {\n spawnSync,\n } = /*@__PURE__*/ require('@socketsecurity/registry/lib/spawn')\n return spawnSync(\n // Lazily access constants.npmExecPath.\n constants.npmExecPath,\n ['config', 'get', 'cache'],\n getNpmStdioPipeOptions(),\n ).stdout\n}\n\nconst lazyNpmGlobalPrefix = () => {\n const {\n spawnSync,\n } = /*@__PURE__*/ require('@socketsecurity/registry/lib/spawn')\n return spawnSync(\n // Lazily access constants.npmExecPath.\n constants.npmExecPath,\n ['prefix', '-g'],\n getNpmStdioPipeOptions(),\n ).stdout\n}\n\nconst lazyNpmNmNodeGypPath = () =>\n path.join(\n // Lazily access constants.npmRealExecPath.\n constants.npmRealExecPath,\n '../../node_modules/node-gyp/bin/node-gyp.js',\n )\n\nconst lazyProcessEnv = () =>\n // Lazily access constants.ENV.\n Object.setPrototypeOf(\n Object.fromEntries(\n Object.entries(constants.ENV).reduce(\n (entries, entry) => {\n const { 0: key, 1: value } = entry\n if (key.startsWith('INLINED_SOCKET_CLI_')) {\n return entries\n }\n if (typeof value === 'string') {\n if (value) {\n entries.push(entry as [string, string])\n }\n } else if (typeof value === 'boolean' && value) {\n entries.push([key, '1'])\n }\n return entries\n },\n [] as Array<[string, string]>,\n ),\n ),\n null,\n )\n\nconst lazyRootPath = () => path.join(realpathSync.native(__dirname), '..')\n\nconst lazyShadowBinPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'shadow-npm-bin')\n\nconst lazyShadowNpmBinPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, `${SHADOW_NPM_BIN}.js`)\n\nconst lazyShadowNpmInjectPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, `${SHADOW_NPM_INJECT}.js`)\n\nconst lazySocketAppDataPath = (): string | undefined => {\n // Get the OS app data folder:\n // - Win: %LOCALAPPDATA% or fail?\n // - Mac: %XDG_DATA_HOME% or fallback to \"~/Library/Application Support/\"\n // - Linux: %XDG_DATA_HOME% or fallback to \"~/.local/share/\"\n // Note: LOCALAPPDATA is typically: C:\\Users\\USERNAME\\AppData\n // Note: XDG stands for \"X Desktop Group\", nowadays \"freedesktop.org\"\n // On most systems that path is: $HOME/.local/share\n // Then append `socket/settings`, so:\n // - Win: %LOCALAPPDATA%\\socket\\settings or return undefined\n // - Mac: %XDG_DATA_HOME%/socket/settings or \"~/Library/Application Support/socket/settings\"\n // - Linux: %XDG_DATA_HOME%/socket/settings or \"~/.local/share/socket/settings\"\n\n // Lazily access constants.WIN32.\n const { WIN32 } = constants\n let dataHome: string | undefined = WIN32\n ? // Lazily access constants.ENV.LOCALAPPDATA\n constants.ENV.LOCALAPPDATA\n : // Lazily access constants.ENV.XDG_DATA_HOME\n constants.ENV.XDG_DATA_HOME\n if (!dataHome) {\n if (WIN32) {\n const logger = /*@__PURE__*/ require('@socketsecurity/registry/lib/logger')\n logger.warn(`Missing %${LOCALAPPDATA}%`)\n } else {\n dataHome = path.join(\n // Lazily access constants.homePath.\n constants.homePath,\n // Lazily access constants.DARWIN.\n constants.DARWIN ? 'Library/Application Support' : '.local/share',\n )\n }\n }\n return dataHome ? path.join(dataHome, 'socket/settings') : undefined\n}\n\nconst lazySocketCachePath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, '.cache')\n\nconst lazySocketRegistryPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, '@socketsecurity/registry')\n\nconst lazyZshRcPath = () =>\n // Lazily access constants.homePath.\n path.join(constants.homePath, '.zshrc')\n\nconst constants: Constants = createConstantsObject(\n {\n ...registryConstantsAttribs.props,\n ALERT_TYPE_CRITICAL_CVE,\n ALERT_TYPE_CVE,\n ALERT_TYPE_MEDIUM_CVE,\n ALERT_TYPE_MILD_CVE,\n API_V0_URL,\n BINARY_LOCK_EXT,\n BUN,\n DOT_SOCKET_DOT_FACTS_JSON,\n DRY_RUN_LABEL,\n DRY_RUN_BAILING_NOW,\n DRY_RUN_NOT_SAVING,\n ENV: undefined,\n LOCK_EXT,\n NPM_BUGGY_OVERRIDES_PATCHED_VERSION,\n NPM_REGISTRY_URL,\n PNPM,\n REDACTED,\n SHADOW_NPM_BIN,\n SHADOW_NPM_INJECT,\n SOCKET,\n SOCKET_CLI_ACCEPT_RISKS,\n SOCKET_CLI_BIN_NAME,\n SOCKET_CLI_BIN_NAME_ALIAS,\n SOCKET_CLI_FIX,\n SOCKET_CLI_ISSUES_URL,\n SOCKET_CLI_SENTRY_BIN_NAME_ALIAS,\n SOCKET_CLI_LEGACY_PACKAGE_NAME,\n SOCKET_CLI_NPM_BIN_NAME,\n SOCKET_CLI_NPX_BIN_NAME,\n SOCKET_CLI_OPTIMIZE,\n SOCKET_CLI_PACKAGE_NAME,\n SOCKET_CLI_SAFE_BIN,\n SOCKET_CLI_SAFE_PROGRESS,\n SOCKET_CLI_SENTRY_BIN_NAME,\n SOCKET_CLI_SENTRY_NPM_BIN_NAME,\n SOCKET_CLI_SENTRY_NPX_BIN_NAME,\n SOCKET_CLI_SENTRY_PACKAGE_NAME,\n SOCKET_CLI_VIEW_ALL_RISKS,\n SOCKET_DEFAULT_BRANCH,\n SOCKET_DEFAULT_REPOSITORY,\n SOCKET_WEBSITE_URL,\n VLT,\n YARN,\n YARN_BERRY,\n YARN_CLASSIC,\n YARN_LOCK,\n bashRcPath: undefined,\n binPath: undefined,\n binCliPath: undefined,\n blessedContribPath: undefined,\n blessedOptions: undefined,\n blessedPath: undefined,\n coanaBinPath: undefined,\n coanaPath: undefined,\n distCliPath: undefined,\n distPath: undefined,\n externalPath: undefined,\n githubCachePath: undefined,\n homePath: undefined,\n instrumentWithSentryPath: undefined,\n minimumVersionByAgent: undefined,\n nmBinPath: undefined,\n nodeHardenFlags: undefined,\n nodeMemoryFlags: undefined,\n npmCachePath: undefined,\n npmGlobalPrefix: undefined,\n npmNmNodeGypPath: undefined,\n processEnv: undefined,\n rootPath: undefined,\n shadowBinPath: undefined,\n shadowNpmInjectPath: undefined,\n shadowNpmBinPath: undefined,\n socketAppDataPath: undefined,\n socketCachePath: undefined,\n socketRegistryPath: undefined,\n zshRcPath: undefined,\n },\n {\n getters: {\n ...registryConstantsAttribs.getters,\n ENV: LAZY_ENV,\n bashRcPath: lazyBashRcPath,\n binCliPath: lazyBinCliPath,\n binPath: lazyBinPath,\n blessedContribPath: lazyBlessedContribPath,\n blessedOptions: lazyBlessedOptions,\n blessedPath: lazyBlessedPath,\n coanaBinPath: lazyCoanaBinPath,\n coanaPath: lazyCoanaPath,\n distCliPath: lazyDistCliPath,\n distPath: lazyDistPath,\n externalPath: lazyExternalPath,\n githubCachePath: lazyGithubCachePath,\n homePath: lazyHomePath,\n instrumentWithSentryPath: lazyInstrumentWithSentryPath,\n minimumVersionByAgent: lazyMinimumVersionByAgent,\n nmBinPath: lazyNmBinPath,\n nodeHardenFlags: lazyNodeHardenFlags,\n nodeMemoryFlags: lazyNodeMemoryFlags,\n npmCachePath: lazyNpmCachePath,\n npmGlobalPrefix: lazyNpmGlobalPrefix,\n npmNmNodeGypPath: lazyNpmNmNodeGypPath,\n processEnv: lazyProcessEnv,\n rootPath: lazyRootPath,\n shadowBinPath: lazyShadowBinPath,\n shadowNpmBinPath: lazyShadowNpmBinPath,\n shadowNpmInjectPath: lazyShadowNpmInjectPath,\n socketAppDataPath: lazySocketAppDataPath,\n socketCachePath: lazySocketCachePath,\n socketRegistryPath: lazySocketRegistryPath,\n zshRcPath: lazyZshRcPath,\n },\n internals: {\n ...registryConstantsAttribs.internals,\n getIpc,\n getSentry() {\n return _Sentry\n },\n setSentry(Sentry: Sentry): boolean {\n if (_Sentry === undefined) {\n _Sentry = Sentry\n return true\n }\n return false\n },\n },\n },\n) as Constants\n\nexport default constants\n"],"names":["attributes","getIpc","_npmStdioPipeOptions","cwd","env","envAsString","getConfigValueOrUndef","__proto__","DISABLE_GITHUB_CACHE","GITHUB_BASE_REF","GITHUB_REF_NAME","GITHUB_REF_TYPE","GITHUB_REPOSITORY","LOCALAPPDATA","constants","NODE_EXTRA_CA_CERTS","PATH","SOCKET_CLI_ACCEPT_RISKS","SOCKET_CLI_API_PROXY","SOCKET_CLI_API_TOKEN","SOCKET_CLI_CONFIG","SOCKET_CLI_DEBUG","SOCKET_CLI_GIT_USER_NAME","SOCKET_CLI_GITHUB_TOKEN","SOCKET_CLI_NO_API_TOKEN","SOCKET_CLI_NPM_PATH","SOCKET_CLI_ORG_SLUG","SOCKET_CLI_VIEW_ALL_RISKS","TERM","XDG_DATA_HOME","path","smartCSR","term","useBCE","getMaxSemiSpaceSizeFlag","spawnSync","Object","entries","WIN32","logger","ENV","bashRcPath","binPath","binCliPath","blessedContribPath","blessedOptions","blessedPath","coanaBinPath","coanaPath","distCliPath","distPath","externalPath","githubCachePath","homePath","instrumentWithSentryPath","minimumVersionByAgent","nmBinPath","nodeHardenFlags","nodeMemoryFlags","npmCachePath","npmGlobalPrefix","npmNmNodeGypPath","processEnv","rootPath","shadowBinPath","shadowNpmInjectPath","shadowNpmBinPath","socketAppDataPath","socketCachePath","socketRegistryPath","zshRcPath","getters","internals","getSentry","_Sentry"],"mappings":";;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEE;AACEA;;AAEAC;AACF;AACF;AAmKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;;AAEIC;AACEC;AACA;;;AAGJ;AACA;AACF;AAEA;;AACUC;AAAI;;;AAGVC;AACF;;AACQC;;AACN;;;AAIF;AACA;;AAEEC;AACA;;AAEA;AACA;AACAC;AACA;AACA;;AAGA;AACA;AACA;AACA;AACAC;AACA;AACA;AACA;AACA;AACAC;AACA;AACA;AACAC;AACA;AACA;AACAC;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;AACA;AACAC;AACA;AACA;;AAEE;AACAC;AACI;;AAGN;AACA;AACA;AACA;AACAC;AAEE;AACA;AACAV;AACF;AACA;AACA;AACAW;AACA;AACAC;AACA;AACA;;AAMA;AACA;AACAC;AAGE;AACA;AACAb;AAIF;AACA;AACAc;AAKA;AACAC;AACA;AACAC;AACA;;AAIA;AACAC;AAIA;AACA;AACA;AACA;AACAC;AAIA;AACAC;AACA;AACAC;AACA;AACAC;AAEE;AACArB;AACF;AACAsB;AACA;AACAC;AACA;AACA;AACAC;AACF;AACF;AAEA;AACE;AACAC;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AAEIC;AACA;AACAC;AACAC;AACF;AAEF;AACE;AACAH;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AAEA;AACE;AACAA;AAEF;AAEI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGJ;AACE;AACAA;;AAEF;AACA;AACA;AAEI;AACAhB;AACE;AACAA;AAEE;AACA;AACA;AAGE;AACA;AACA;AACA;AACA;AAKV;;;AAGIoB;;AAEA;;AAGF;AAIF;AAEA;;AAEIC;AACF;AACA;AACE;AACArB;AAIJ;AAEA;;AAEIqB;AACF;AACA;AACE;AACArB;AAIJ;AAEA;AAEI;AACAA;AAIJ;AACE;AACAsB;;AAIgB;AAAQ;AAAS;AACzB;AACE;AACF;AACA;AACE;AACEC;AACF;;;AAGF;AACA;AACF;AAOR;AAEA;AACE;AACAP;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AACQQ;AAAM;;AAEV;;AAEA;;;AAGF;AACE;AACAC;AACF;;AAEI;AACAzB;AACA;AACAA;AAEJ;AACF;;AAEF;AAEA;AACE;AACAgB;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;;;;;;;;;;;;;AAcIU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACF;AAEEC;;AAEE/B;AACAC;AACAE;AACAD;AACAE;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAE;AACAD;AACAE;AACAC;AACAC;AACAC;;AAEFE;;;AAGEC;AACE;;;;AAIEC;AACA;AACF;AACA;AACF;AACF;AACF;;","debugId":"5afc7378-bb47-480b-a6ad-6081997e9db3"}
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.mts"],"sourcesContent":["import { realpathSync } from 'node:fs'\nimport { createRequire } from 'node:module'\nimport os from 'node:os'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nimport registryConstants from '@socketsecurity/registry/lib/constants'\n\nimport type { Agent } from './utils/package-environment.mts'\nimport type { Remap } from '@socketsecurity/registry/lib/objects'\nimport type { SpawnOptions } from '@socketsecurity/registry/lib/spawn'\n\nconst require = createRequire(import.meta.url)\nconst __filename = fileURLToPath(import.meta.url)\n// Using `path.dirname(__filename)` to resolve `__dirname` works for both 'dist'\n// AND 'src' directories because constants.js and constants.mts respectively are\n// in the root of each.\nconst __dirname = path.dirname(__filename)\n\nconst {\n kInternalsSymbol,\n [kInternalsSymbol as unknown as 'Symbol(kInternalsSymbol)']: {\n attributes: registryConstantsAttribs,\n createConstantsObject,\n getIpc,\n },\n} = registryConstants\n\ntype RegistryEnv = typeof registryConstants.ENV\n\ntype RegistryInternals = (typeof registryConstants)['Symbol(kInternalsSymbol)']\n\ntype Sentry = any\n\ntype Internals = Remap<\n Omit<RegistryInternals, 'getIpc'> &\n Readonly<{\n getIpc: {\n (): Promise<IPC>\n <K extends keyof IPC | undefined>(\n key?: K | undefined,\n ): Promise<K extends keyof IPC ? IPC[K] : IPC>\n }\n getSentry: () => Sentry\n setSentry(Sentry: Sentry): boolean\n }>\n>\n\ntype ENV = Remap<\n RegistryEnv &\n Readonly<{\n DISABLE_GITHUB_CACHE: boolean\n GITHUB_API_URL: string\n GITHUB_BASE_REF: string\n GITHUB_REF_NAME: string\n GITHUB_REF_TYPE: string\n GITHUB_REPOSITORY: string\n GITHUB_SERVER_URL: string\n GITHUB_TOKEN: string\n INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION: string\n INLINED_SOCKET_CLI_HOMEPAGE: string\n INLINED_SOCKET_CLI_LEGACY_BUILD: string\n INLINED_SOCKET_CLI_NAME: string\n INLINED_SOCKET_CLI_PUBLISHED_BUILD: string\n INLINED_SOCKET_CLI_SENTRY_BUILD: string\n INLINED_SOCKET_CLI_VERSION: string\n INLINED_SOCKET_CLI_VERSION_HASH: string\n INLINED_SOCKET_CLI_SYNP_VERSION: string\n LOCALAPPDATA: string\n NODE_COMPILE_CACHE: string\n NODE_EXTRA_CA_CERTS: string\n PATH: string\n SOCKET_CLI_ACCEPT_RISKS: boolean\n SOCKET_CLI_API_BASE_URL: string\n SOCKET_CLI_API_PROXY: string\n SOCKET_CLI_API_TOKEN: string\n SOCKET_CLI_CONFIG: string\n SOCKET_CLI_GIT_USER_EMAIL: string\n SOCKET_CLI_GIT_USER_NAME: string\n SOCKET_CLI_GITHUB_TOKEN: string\n SOCKET_CLI_NO_API_TOKEN: boolean\n SOCKET_CLI_NPM_PATH: string\n SOCKET_CLI_ORG_SLUG: string\n SOCKET_CLI_VIEW_ALL_RISKS: boolean\n TERM: string\n XDG_DATA_HOME: string\n }>\n>\n\ntype ProcessEnv = {\n [K in keyof ENV]?: string\n}\n\ntype IPC = Readonly<{\n SOCKET_CLI_FIX?: string | undefined\n SOCKET_CLI_OPTIMIZE?: boolean | undefined\n SOCKET_CLI_SAFE_BIN?: string | undefined\n SOCKET_CLI_SAFE_PROGRESS?: boolean | undefined\n}>\n\ntype Constants = Remap<\n Omit<typeof registryConstants, 'Symbol(kInternalsSymbol)' | 'ENV' | 'IPC'> & {\n readonly 'Symbol(kInternalsSymbol)': Internals\n readonly ALERT_TYPE_CRITICAL_CVE: 'criticalCVE'\n readonly ALERT_TYPE_CVE: 'cve'\n readonly ALERT_TYPE_MEDIUM_CVE: 'mediumCVE'\n readonly ALERT_TYPE_MILD_CVE: 'mildCVE'\n readonly API_V0_URL: 'https://api.socket.dev/v0/'\n readonly BINARY_LOCK_EXT: '.lockb'\n readonly BUN: 'bun'\n readonly ENV: ENV\n readonly DOT_SOCKET_DOT_FACTS_JSON: '.socket.facts.json'\n readonly DRY_RUN_LABEL: '[DryRun]'\n readonly DRY_RUN_BAILING_NOW: '[DryRun] Bailing now'\n readonly DRY_RUN_NOT_SAVING: '[DryRun] Not saving'\n readonly IPC: IPC\n readonly LOCK_EXT: '.lock'\n readonly NPM_BUGGY_OVERRIDES_PATCHED_VERSION: '11.2.0'\n readonly NPM_REGISTRY_URL: 'https://registry.npmjs.org'\n readonly PNPM: 'pnpm'\n readonly REDACTED: '<redacted>'\n readonly SOCKET_CLI_ACCEPT_RISKS: 'SOCKET_CLI_ACCEPT_RISKS'\n readonly SOCKET_CLI_BIN_NAME: 'socket'\n readonly SOCKET_CLI_CONFIG: 'SOCKET_CLI_CONFIG'\n readonly SOCKET_CLI_FIX: 'SOCKET_CLI_FIX'\n readonly SOCKET_CLI_ISSUES_URL: 'https://github.com/SocketDev/socket-cli/issues'\n readonly SOCKET_CLI_OPTIMIZE: 'SOCKET_CLI_OPTIMIZE'\n readonly SOCKET_CLI_SAFE_BIN: 'SOCKET_CLI_SAFE_BIN'\n readonly SOCKET_CLI_SAFE_PROGRESS: 'SOCKET_CLI_SAFE_PROGRESS'\n readonly SOCKET_CLI_VIEW_ALL_RISKS: 'SOCKET_CLI_VIEW_ALL_RISKS'\n readonly SOCKET_DEFAULT_BRANCH: 'socket-default-branch'\n readonly SOCKET_DEFAULT_REPOSITORY: 'socket-default-repository'\n readonly SOCKET_WEBSITE_URL: 'https://socket.dev'\n readonly VLT: 'vlt'\n readonly YARN: 'yarn'\n readonly YARN_BERRY: 'yarn/berry'\n readonly YARN_CLASSIC: 'yarn/classic'\n readonly YARN_LOCK: 'yarn.lock'\n readonly bashRcPath: string\n readonly binCliPath: string\n readonly binPath: string\n readonly blessedContribPath: string\n readonly blessedOptions: {\n smartCSR: boolean\n term: string\n useBCE: boolean\n }\n readonly blessedPath: string\n readonly coanaBinPath: string\n readonly coanaPath: string\n readonly distCliPath: string\n readonly distPath: string\n readonly externalPath: string\n readonly githubCachePath: string\n readonly homePath: string\n readonly instrumentWithSentryPath: string\n readonly minimumVersionByAgent: Map<Agent, string>\n readonly nmBinPath: string\n readonly nodeHardenFlags: string[]\n readonly nodeMemoryFlags: string[]\n readonly npmCachePath: string\n readonly npmGlobalPrefix: string\n readonly npmNmNodeGypPath: string\n readonly processEnv: ProcessEnv\n readonly rootPath: string\n readonly shadowBinPath: string\n readonly shadowNpmBinPath: string\n readonly shadowNpmInjectPath: string\n readonly socketAppDataPath: string\n readonly socketCachePath: string\n readonly socketRegistryPath: string\n readonly zshRcPath: string\n }\n>\n\nconst ALERT_TYPE_CRITICAL_CVE = 'criticalCVE'\nconst ALERT_TYPE_CVE = 'cve'\nconst ALERT_TYPE_MEDIUM_CVE = 'mediumCVE'\nconst ALERT_TYPE_MILD_CVE = 'mildCVE'\nconst API_V0_URL = 'https://api.socket.dev/v0/'\nconst BINARY_LOCK_EXT = '.lockb'\nconst BUN = 'bun'\nconst DOT_SOCKET_DOT_FACTS_JSON = '.socket.facts.json'\nconst DRY_RUN_LABEL = '[DryRun]'\nconst DRY_RUN_BAILING_NOW = `${DRY_RUN_LABEL}: Bailing now`\nconst DRY_RUN_NOT_SAVING = `${DRY_RUN_LABEL}: Not saving`\nconst LOCALAPPDATA = 'LOCALAPPDATA'\nconst LOCK_EXT = '.lock'\nconst NPM_BUGGY_OVERRIDES_PATCHED_VERSION = '11.2.0'\nconst NPM_REGISTRY_URL = 'https://registry.npmjs.org'\nconst PNPM = 'pnpm'\nconst REDACTED = '<redacted>'\nconst SOCKET_CLI_ACCEPT_RISKS = 'SOCKET_CLI_ACCEPT_RISKS'\nconst SOCKET_CLI_BIN_NAME = 'socket'\nconst SOCKET_CLI_FIX = 'SOCKET_CLI_FIX'\nconst SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues'\nconst SOCKET_CLI_OPTIMIZE = 'SOCKET_CLI_OPTIMIZE'\nconst SOCKET_CLI_SAFE_BIN = 'SOCKET_CLI_SAFE_BIN'\nconst SOCKET_CLI_SAFE_PROGRESS = 'SOCKET_CLI_SAFE_PROGRESS'\nconst SOCKET_CLI_VIEW_ALL_RISKS = 'SOCKET_CLI_VIEW_ALL_RISKS'\nconst SOCKET_DEFAULT_BRANCH = 'socket-default-branch'\nconst SOCKET_DEFAULT_REPOSITORY = 'socket-default-repository'\nconst SOCKET_WEBSITE_URL = 'https://socket.dev'\nconst VLT = 'vlt'\nconst YARN = 'yarn'\nconst YARN_BERRY = 'yarn/berry'\nconst YARN_CLASSIC = 'yarn/classic'\nconst YARN_LOCK = 'yarn.lock'\n\nlet _Sentry: any\n\nlet _npmStdioPipeOptions: SpawnOptions | undefined\nfunction getNpmStdioPipeOptions() {\n if (_npmStdioPipeOptions === undefined) {\n _npmStdioPipeOptions = {\n cwd: process.cwd(),\n // Lazily access constants.WIN32.\n shell: constants.WIN32,\n }\n }\n return _npmStdioPipeOptions\n}\n\nconst LAZY_ENV = () => {\n const { env } = process\n const {\n envAsBoolean,\n envAsString,\n } = /*@__PURE__*/ require('@socketsecurity/registry/lib/env')\n const { getConfigValueOrUndef } = /*@__PURE__*/ require(\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'dist/utils.js'),\n )\n const GITHUB_TOKEN = envAsString(env['GITHUB_TOKEN'])\n // We inline some environment values so that they CANNOT be influenced by user\n // provided environment variables.\n return Object.freeze({\n __proto__: null,\n // Lazily access registryConstants.ENV.\n ...registryConstants.ENV,\n // Disable using GitHub's workflow actions/cache.\n // https://github.com/actions/cache\n DISABLE_GITHUB_CACHE: envAsBoolean(env['DISABLE_GITHUB_CACHE']),\n // The API URL. For example, https://api.github.com.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_API_URL:\n envAsString(env['GITHUB_API_URL']) || 'https://api.github.com',\n // The name of the base ref or target branch of the pull request in a workflow\n // run. This is only set when the event that triggers a workflow run is either\n // pull_request or pull_request_target. For example, main.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_BASE_REF: envAsString(env['GITHUB_BASE_REF']),\n // The short ref name of the branch or tag that triggered the GitHub workflow\n // run. This value matches the branch or tag name shown on GitHub. For example,\n // feature-branch-1. For pull requests, the format is <pr_number>/merge.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_REF_NAME: envAsString(env['GITHUB_REF_NAME']),\n // The type of ref that triggered the workflow run. Valid values are branch or tag.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_REF_TYPE: envAsString(env['GITHUB_REF_TYPE']),\n // The owner and repository name. For example, octocat/Hello-World.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_REPOSITORY: envAsString(env['GITHUB_REPOSITORY']),\n // The URL of the GitHub server. For example, https://github.com.\n // https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace#list-of-default-environment-variables\n GITHUB_SERVER_URL:\n envAsString(env['GITHUB_SERVER_URL']) || 'https://github.com',\n // The GITHUB_TOKEN secret is a GitHub App installation access token.\n // The token's permissions are limited to the repository that contains the\n // workflow.\n // https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#about-the-github_token-secret\n GITHUB_TOKEN,\n // Comp-time inlined @cyclonedx/cdxgen package version.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION']\".\n INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION: envAsString(\n process.env['INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION'],\n ),\n // Comp-time inlined Socket package homepage.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_HOMEPAGE']\".\n INLINED_SOCKET_CLI_HOMEPAGE: envAsString(\n process.env['INLINED_SOCKET_CLI_HOMEPAGE'],\n ),\n // Comp-time inlined flag to determine if this is the Legacy build.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_LEGACY_BUILD']\".\n INLINED_SOCKET_CLI_LEGACY_BUILD: envAsBoolean(\n process.env['INLINED_SOCKET_CLI_LEGACY_BUILD'],\n ),\n // Comp-time inlined Socket package name.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_NAME']\".\n INLINED_SOCKET_CLI_NAME: envAsString(\n process.env['INLINED_SOCKET_CLI_NAME'],\n ),\n // Comp-time inlined flag to determine if this is a published build.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\".\n INLINED_SOCKET_CLI_PUBLISHED_BUILD: envAsBoolean(\n process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD'],\n ),\n // Comp-time inlined flag to determine if this is the Sentry build.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']\".\n INLINED_SOCKET_CLI_SENTRY_BUILD: envAsBoolean(\n process.env['INLINED_SOCKET_CLI_SENTRY_BUILD'],\n ),\n // Comp-time inlined synp package version.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SYNP_VERSION']\".\n INLINED_SOCKET_CLI_SYNP_VERSION: envAsString(\n process.env['INLINED_SOCKET_CLI_SYNP_VERSION'],\n ),\n // Comp-time inlined Socket package version.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION']\".\n INLINED_SOCKET_CLI_VERSION: envAsString(\n process.env['INLINED_SOCKET_CLI_VERSION'],\n ),\n // Comp-time inlined Socket package version hash.\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION_HASH']\".\n INLINED_SOCKET_CLI_VERSION_HASH: envAsString(\n process.env['INLINED_SOCKET_CLI_VERSION_HASH'],\n ),\n // The absolute location of the %localappdata% folder on Windows used to store\n // user-specific, non-roaming application data, like temporary files, cached\n // data, and program settings, that are specific to the current machine and user.\n LOCALAPPDATA: envAsString(env[LOCALAPPDATA]),\n // Enable the module compile cache for the Node.js instance.\n // https://nodejs.org/api/cli.html#node_compile_cachedir\n NODE_COMPILE_CACHE:\n // Lazily access constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR.\n constants.SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR\n ? // Lazily access constants.socketCachePath.\n constants.socketCachePath\n : '',\n // Well known \"root\" CAs (like VeriSign) will be extended with the extra\n // certificates in file. The file should consist of one or more trusted\n // certificates in PEM format.\n // https://nodejs.org/api/cli.html#node_extra_ca_certsfile\n NODE_EXTRA_CA_CERTS:\n envAsString(env['NODE_EXTRA_CA_CERTS']) ||\n // Commonly used environment variable to specify the path to a single\n // PEM-encoded certificate file.\n envAsString(env['SSL_CERT_FILE']),\n // PATH is an environment variable that lists directories where executable\n // programs are located. When a command is run, the system searches these\n // directories to find the executable.\n PATH: envAsString(env['PATH']),\n // Accept risks of a Socket wrapped npm/npx run.\n SOCKET_CLI_ACCEPT_RISKS: envAsBoolean(env[SOCKET_CLI_ACCEPT_RISKS]),\n // Change the base URL for all API-calls.\n // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development\n SOCKET_CLI_API_BASE_URL:\n envAsString(env['SOCKET_CLI_API_BASE_URL']) ||\n envAsString(env['SOCKET_SECURITY_API_BASE_URL']) ||\n getConfigValueOrUndef('apiBaseUrl') ||\n 'https://api.socket.dev/v0/',\n // Set the proxy that all requests are routed through.\n // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables-for-development\n SOCKET_CLI_API_PROXY:\n envAsString(env['SOCKET_CLI_API_PROXY']) ||\n envAsString(env['SOCKET_SECURITY_API_PROXY']) ||\n // Commonly used environment variables to specify routing requests through\n // a proxy server.\n envAsString(env['HTTPS_PROXY']) ||\n envAsString(env['https_proxy']) ||\n envAsString(env['HTTP_PROXY']) ||\n envAsString(env['http_proxy']),\n // Set the Socket API token.\n // https://github.com/SocketDev/socket-cli?tab=readme-ov-file#environment-variables\n SOCKET_CLI_API_TOKEN:\n envAsString(env['SOCKET_CLI_API_TOKEN']) ||\n envAsString(env['SOCKET_CLI_API_KEY']) ||\n envAsString(env['SOCKET_SECURITY_API_TOKEN']) ||\n envAsString(env['SOCKET_SECURITY_API_KEY']),\n // A JSON stringified Socket configuration object.\n SOCKET_CLI_CONFIG: envAsString(env['SOCKET_CLI_CONFIG']),\n // The git config user.email used by Socket CLI.\n SOCKET_CLI_GIT_USER_EMAIL:\n envAsString(env['SOCKET_CLI_GIT_USER_EMAIL']) ||\n 'github-actions[bot]@users.noreply.github.com',\n // The git config user.name used by Socket CLI.\n SOCKET_CLI_GIT_USER_NAME:\n envAsString(env['SOCKET_CLI_GIT_USER_NAME']) ||\n envAsString(env['SOCKET_CLI_GIT_USERNAME']) ||\n 'github-actions[bot]',\n // A classic GitHub personal access token with the \"repo\" scope or a\n // fine-grained access token with at least read/write permissions set for\n // \"Contents\" and \"Pull Request\".\n // https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\n SOCKET_CLI_GITHUB_TOKEN:\n envAsString(env['SOCKET_CLI_GITHUB_TOKEN']) ||\n envAsString(env['SOCKET_SECURITY_GITHUB_PAT']) ||\n GITHUB_TOKEN,\n // Make the default API token `undefined`.\n SOCKET_CLI_NO_API_TOKEN: envAsBoolean(env['SOCKET_CLI_NO_API_TOKEN']),\n // The absolute location of the npm directory.\n SOCKET_CLI_NPM_PATH: envAsString(env['SOCKET_CLI_NPM_PATH']),\n // Specify the Socket organization slug.\n SOCKET_CLI_ORG_SLUG:\n envAsString(env['SOCKET_CLI_ORG_SLUG']) ||\n // Coana CLI accepts the SOCKET_ORG_SLUG environment variable.\n envAsString(env['SOCKET_ORG_SLUG']),\n // View all risks of a Socket wrapped npm/npx run.\n SOCKET_CLI_VIEW_ALL_RISKS: envAsBoolean(env[SOCKET_CLI_VIEW_ALL_RISKS]),\n // Specifies the type of terminal or terminal emulator being used by the process.\n TERM: envAsString(env['TERM']),\n // The location of the base directory on Linux and MacOS used to store\n // user-specific data files, defaulting to $HOME/.local/share if not set or empty.\n XDG_DATA_HOME: envAsString(env['XDG_DATA_HOME']),\n })\n}\n\nconst lazyBashRcPath = () =>\n // Lazily access constants.homePath.\n path.join(constants.homePath, '.bashrc')\n\nconst lazyBinPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'bin')\n\nconst lazyBinCliPath = () =>\n // Lazily access constants.binPath.\n path.join(constants.binPath, 'cli.js')\n\nconst lazyBlessedContribPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, 'blessed-contrib')\n\nconst lazyBlessedOptions = () =>\n Object.freeze({\n smartCSR: true,\n // Lazily access constants.WIN32.\n term: constants.WIN32 ? 'windows-ansi' : 'xterm',\n useBCE: true,\n })\n\nconst lazyBlessedPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, 'blessed')\n\nconst lazyCoanaBinPath = () =>\n // Lazily access constants.coanaPath.\n path.join(constants.coanaPath, 'cli.mjs')\n\nconst lazyCoanaPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, '@coana-tech/cli')\n\nconst lazyDistCliPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, 'cli.js')\n\nconst lazyDistPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'dist')\n\nconst lazyExternalPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'external')\n\nconst lazyGithubCachePath = () =>\n // Lazily access constants.socketCachePath.\n path.join(constants.socketCachePath, 'github')\n\nconst lazyHomePath = () => os.homedir()\n\nconst lazyInstrumentWithSentryPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, 'instrument-with-sentry.js')\n\nconst lazyMinimumVersionByAgent = () =>\n new Map([\n // Bun >=1.1.39 supports the text-based lockfile.\n // https://bun.sh/blog/bun-lock-text-lockfile\n [BUN, '1.1.39'],\n // The npm version bundled with Node 18.\n // https://nodejs.org/en/about/previous-releases#looking-for-the-latest-release-of-a-version-branch\n ['npm', '10.8.2'],\n // 8.x is the earliest version to support Node 18.\n // https://pnpm.io/installation#compatibility\n // https://www.npmjs.com/package/pnpm?activeTab=versions\n [PNPM, '8.15.7'],\n // 4.x supports >= Node 18.12.0\n // https://github.com/yarnpkg/berry/blob/%40yarnpkg/core/4.1.0/CHANGELOG.md#400\n [YARN_BERRY, '4.0.0'],\n // Latest 1.x.\n // https://www.npmjs.com/package/yarn?activeTab=versions\n [YARN_CLASSIC, '1.22.22'],\n // vlt does not support overrides so we don't gate on it.\n [VLT, '*'],\n ])\n\nconst lazyNmBinPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'node_modules/.bin')\n\n// Redefine registryConstants.nodeHardenFlags to account for the\n// INLINED_SOCKET_CLI_SENTRY_BUILD environment variable.\nconst lazyNodeHardenFlags = () =>\n Object.freeze(\n // Lazily access constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD.\n constants.ENV.INLINED_SOCKET_CLI_SENTRY_BUILD ||\n // Lazily access constants.WIN32.\n constants.WIN32\n ? []\n : // Harden Node security.\n // https://nodejs.org/en/learn/getting-started/security-best-practices\n [\n '--disable-proto',\n 'throw',\n // We have contributed the following patches to our dependencies to make\n // Node's --frozen-intrinsics workable.\n // √ https://github.com/SBoudrias/Inquirer.js/pull/1683\n // √ https://github.com/pnpm/components/pull/23\n '--frozen-intrinsics',\n '--no-deprecation',\n ],\n )\n\nconst lazyNodeMemoryFlags = () => {\n const {\n getMaxOldSpaceSizeFlag,\n getMaxSemiSpaceSizeFlag,\n } = /*@__PURE__*/ require(\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'dist/flags.js'),\n )\n return Object.freeze([\n `--max-old-space-size=${getMaxOldSpaceSizeFlag()}`,\n `--max-semi-space-size=${getMaxSemiSpaceSizeFlag()}`,\n ])\n}\n\nconst lazyNpmCachePath = () => {\n const {\n spawnSync,\n } = /*@__PURE__*/ require('@socketsecurity/registry/lib/spawn')\n return spawnSync(\n // Lazily access constants.npmExecPath.\n constants.npmExecPath,\n ['config', 'get', 'cache'],\n getNpmStdioPipeOptions(),\n ).stdout\n}\n\nconst lazyNpmGlobalPrefix = () => {\n const {\n spawnSync,\n } = /*@__PURE__*/ require('@socketsecurity/registry/lib/spawn')\n return spawnSync(\n // Lazily access constants.npmExecPath.\n constants.npmExecPath,\n ['prefix', '-g'],\n getNpmStdioPipeOptions(),\n ).stdout\n}\n\nconst lazyNpmNmNodeGypPath = () =>\n path.join(\n // Lazily access constants.npmRealExecPath.\n constants.npmRealExecPath,\n '../../node_modules/node-gyp/bin/node-gyp.js',\n )\n\nconst lazyProcessEnv = () =>\n // Lazily access constants.ENV.\n Object.setPrototypeOf(\n Object.fromEntries(\n Object.entries(constants.ENV).reduce(\n (entries, entry) => {\n const { 0: key, 1: value } = entry\n if (key.startsWith('INLINED_SOCKET_CLI_')) {\n return entries\n }\n if (typeof value === 'string') {\n if (value) {\n entries.push(entry as [string, string])\n }\n } else if (typeof value === 'boolean' && value) {\n entries.push([key, '1'])\n }\n return entries\n },\n [] as Array<[string, string]>,\n ),\n ),\n null,\n )\n\nconst lazyRootPath = () => path.join(realpathSync.native(__dirname), '..')\n\nconst lazyShadowBinPath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, 'shadow-npm-bin')\n\nconst lazyShadowNpmBinPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, 'shadow-npm-bin.js')\n\nconst lazyShadowNpmInjectPath = () =>\n // Lazily access constants.distPath.\n path.join(constants.distPath, 'shadow-npm-inject.js')\n\nconst lazySocketAppDataPath = (): string | undefined => {\n // Get the OS app data directory:\n // - Win: %LOCALAPPDATA% or fail?\n // - Mac: %XDG_DATA_HOME% or fallback to \"~/Library/Application Support/\"\n // - Linux: %XDG_DATA_HOME% or fallback to \"~/.local/share/\"\n // Note: LOCALAPPDATA is typically: C:\\Users\\USERNAME\\AppData\n // Note: XDG stands for \"X Desktop Group\", nowadays \"freedesktop.org\"\n // On most systems that path is: $HOME/.local/share\n // Then append `socket/settings`, so:\n // - Win: %LOCALAPPDATA%\\socket\\settings or return undefined\n // - Mac: %XDG_DATA_HOME%/socket/settings or \"~/Library/Application Support/socket/settings\"\n // - Linux: %XDG_DATA_HOME%/socket/settings or \"~/.local/share/socket/settings\"\n\n // Lazily access constants.WIN32.\n const { WIN32 } = constants\n let dataHome: string | undefined = WIN32\n ? // Lazily access constants.ENV.LOCALAPPDATA\n constants.ENV.LOCALAPPDATA\n : // Lazily access constants.ENV.XDG_DATA_HOME\n constants.ENV.XDG_DATA_HOME\n if (!dataHome) {\n if (WIN32) {\n const logger = /*@__PURE__*/ require('@socketsecurity/registry/lib/logger')\n logger.warn(`Missing %${LOCALAPPDATA}%`)\n } else {\n dataHome = path.join(\n // Lazily access constants.homePath.\n constants.homePath,\n // Lazily access constants.DARWIN.\n constants.DARWIN ? 'Library/Application Support' : '.local/share',\n )\n }\n }\n return dataHome ? path.join(dataHome, 'socket/settings') : undefined\n}\n\nconst lazySocketCachePath = () =>\n // Lazily access constants.rootPath.\n path.join(constants.rootPath, '.cache')\n\nconst lazySocketRegistryPath = () =>\n // Lazily access constants.externalPath.\n path.join(constants.externalPath, '@socketsecurity/registry')\n\nconst lazyZshRcPath = () =>\n // Lazily access constants.homePath.\n path.join(constants.homePath, '.zshrc')\n\nconst constants: Constants = createConstantsObject(\n {\n ...registryConstantsAttribs.props,\n ALERT_TYPE_CRITICAL_CVE,\n ALERT_TYPE_CVE,\n ALERT_TYPE_MEDIUM_CVE,\n ALERT_TYPE_MILD_CVE,\n API_V0_URL,\n BINARY_LOCK_EXT,\n BUN,\n DOT_SOCKET_DOT_FACTS_JSON,\n DRY_RUN_LABEL,\n DRY_RUN_BAILING_NOW,\n DRY_RUN_NOT_SAVING,\n ENV: undefined,\n LOCK_EXT,\n NPM_BUGGY_OVERRIDES_PATCHED_VERSION,\n NPM_REGISTRY_URL,\n PNPM,\n REDACTED,\n SOCKET_CLI_ACCEPT_RISKS,\n SOCKET_CLI_BIN_NAME,\n SOCKET_CLI_FIX,\n SOCKET_CLI_ISSUES_URL,\n SOCKET_CLI_OPTIMIZE,\n SOCKET_CLI_SAFE_BIN,\n SOCKET_CLI_SAFE_PROGRESS,\n SOCKET_CLI_VIEW_ALL_RISKS,\n SOCKET_DEFAULT_BRANCH,\n SOCKET_DEFAULT_REPOSITORY,\n SOCKET_WEBSITE_URL,\n VLT,\n YARN,\n YARN_BERRY,\n YARN_CLASSIC,\n YARN_LOCK,\n bashRcPath: undefined,\n binPath: undefined,\n binCliPath: undefined,\n blessedContribPath: undefined,\n blessedOptions: undefined,\n blessedPath: undefined,\n coanaBinPath: undefined,\n coanaPath: undefined,\n distCliPath: undefined,\n distPath: undefined,\n externalPath: undefined,\n githubCachePath: undefined,\n homePath: undefined,\n instrumentWithSentryPath: undefined,\n minimumVersionByAgent: undefined,\n nmBinPath: undefined,\n nodeHardenFlags: undefined,\n nodeMemoryFlags: undefined,\n npmCachePath: undefined,\n npmGlobalPrefix: undefined,\n npmNmNodeGypPath: undefined,\n processEnv: undefined,\n rootPath: undefined,\n shadowBinPath: undefined,\n shadowNpmInjectPath: undefined,\n shadowNpmBinPath: undefined,\n socketAppDataPath: undefined,\n socketCachePath: undefined,\n socketRegistryPath: undefined,\n zshRcPath: undefined,\n },\n {\n getters: {\n ...registryConstantsAttribs.getters,\n ENV: LAZY_ENV,\n bashRcPath: lazyBashRcPath,\n binCliPath: lazyBinCliPath,\n binPath: lazyBinPath,\n blessedContribPath: lazyBlessedContribPath,\n blessedOptions: lazyBlessedOptions,\n blessedPath: lazyBlessedPath,\n coanaBinPath: lazyCoanaBinPath,\n coanaPath: lazyCoanaPath,\n distCliPath: lazyDistCliPath,\n distPath: lazyDistPath,\n externalPath: lazyExternalPath,\n githubCachePath: lazyGithubCachePath,\n homePath: lazyHomePath,\n instrumentWithSentryPath: lazyInstrumentWithSentryPath,\n minimumVersionByAgent: lazyMinimumVersionByAgent,\n nmBinPath: lazyNmBinPath,\n nodeHardenFlags: lazyNodeHardenFlags,\n nodeMemoryFlags: lazyNodeMemoryFlags,\n npmCachePath: lazyNpmCachePath,\n npmGlobalPrefix: lazyNpmGlobalPrefix,\n npmNmNodeGypPath: lazyNpmNmNodeGypPath,\n processEnv: lazyProcessEnv,\n rootPath: lazyRootPath,\n shadowBinPath: lazyShadowBinPath,\n shadowNpmBinPath: lazyShadowNpmBinPath,\n shadowNpmInjectPath: lazyShadowNpmInjectPath,\n socketAppDataPath: lazySocketAppDataPath,\n socketCachePath: lazySocketCachePath,\n socketRegistryPath: lazySocketRegistryPath,\n zshRcPath: lazyZshRcPath,\n },\n internals: {\n ...registryConstantsAttribs.internals,\n getIpc,\n getSentry() {\n return _Sentry\n },\n setSentry(Sentry: Sentry): boolean {\n if (_Sentry === undefined) {\n _Sentry = Sentry\n return true\n }\n return false\n },\n },\n },\n) as Constants\n\nexport default constants\n"],"names":["attributes","getIpc","_npmStdioPipeOptions","cwd","env","envAsString","getConfigValueOrUndef","__proto__","DISABLE_GITHUB_CACHE","GITHUB_BASE_REF","GITHUB_REF_NAME","GITHUB_REF_TYPE","GITHUB_REPOSITORY","LOCALAPPDATA","constants","NODE_EXTRA_CA_CERTS","PATH","SOCKET_CLI_ACCEPT_RISKS","SOCKET_CLI_API_PROXY","SOCKET_CLI_API_TOKEN","SOCKET_CLI_CONFIG","SOCKET_CLI_GIT_USER_NAME","SOCKET_CLI_GITHUB_TOKEN","SOCKET_CLI_NO_API_TOKEN","SOCKET_CLI_NPM_PATH","SOCKET_CLI_ORG_SLUG","SOCKET_CLI_VIEW_ALL_RISKS","TERM","XDG_DATA_HOME","path","smartCSR","term","useBCE","getMaxSemiSpaceSizeFlag","spawnSync","Object","entries","WIN32","logger","ENV","bashRcPath","binPath","binCliPath","blessedContribPath","blessedOptions","blessedPath","coanaBinPath","coanaPath","distCliPath","distPath","externalPath","githubCachePath","homePath","instrumentWithSentryPath","minimumVersionByAgent","nmBinPath","nodeHardenFlags","nodeMemoryFlags","npmCachePath","npmGlobalPrefix","npmNmNodeGypPath","processEnv","rootPath","shadowBinPath","shadowNpmInjectPath","shadowNpmBinPath","socketAppDataPath","socketCachePath","socketRegistryPath","zshRcPath","getters","internals","getSentry","_Sentry"],"mappings":";;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEE;AACEA;;AAEAC;AACF;AACF;AAqJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;;AAEIC;AACEC;AACA;;;AAGJ;AACA;AACF;AAEA;;AACUC;AAAI;;;AAGVC;AACF;;AACQC;;AACN;;;AAIF;AACA;;AAEEC;AACA;;AAEA;AACA;AACAC;AACA;AACA;;AAGA;AACA;AACA;AACA;AACAC;AACA;AACA;AACA;AACA;AACAC;AACA;AACA;AACAC;AACA;AACA;AACAC;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;;AAIA;AACA;AACA;AACAC;AACA;AACA;;AAEE;AACAC;AACI;;AAGN;AACA;AACA;AACA;AACAC;AAEE;AACA;AACAV;AACF;AACA;AACA;AACAW;AACA;AACAC;AACA;AACA;;AAMA;AACA;AACAC;AAGE;AACA;AACAb;AAIF;AACA;AACAc;AAKA;AACAC;AACA;;AAIA;AACAC;AAIA;AACA;AACA;AACA;AACAC;AAIA;AACAC;AACA;AACAC;AACA;AACAC;AAEE;AACApB;AACF;AACAqB;AACA;AACAC;AACA;AACA;AACAC;AACF;AACF;AAEA;AACE;AACAC;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AAEIC;AACA;AACAC;AACAC;AACF;AAEF;AACE;AACAH;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AAEA;AACE;AACAA;AAEF;AAEI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGJ;AACE;AACAA;;AAEF;AACA;AACA;AAEI;AACAf;AACE;AACAA;AAEE;AACA;AACA;AAGE;AACA;AACA;AACA;AACA;AAKV;;;AAGImB;;AAEA;;AAGF;AAIF;AAEA;;AAEIC;AACF;AACA;AACE;AACApB;AAIJ;AAEA;;AAEIoB;AACF;AACA;AACE;AACApB;AAIJ;AAEA;AAEI;AACAA;AAIJ;AACE;AACAqB;;AAIgB;AAAQ;AAAS;AACzB;AACE;AACF;AACA;AACE;AACEC;AACF;;;AAGF;AACA;AACF;AAOR;AAEA;AACE;AACAP;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AACQQ;AAAM;;AAEV;;AAEA;;;AAGF;AACE;AACAC;AACF;;AAEI;AACAxB;AACA;AACAA;AAEJ;AACF;;AAEF;AAEA;AACE;AACAe;AAEF;AACE;AACAA;AAEF;AACE;AACAA;AAEF;;;;;;;;;;;;;AAcIU;;;;;;;;;;;;;;;;;;;;;;AAsBAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACF;AAEEC;;AAEE/B;AACAC;AACAE;AACAD;AACAE;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAC;AACAE;AACAD;AACAE;AACAC;AACAC;AACAC;;AAEFE;;;AAGEC;AACE;;;;AAIEC;AACA;AACF;AACA;AACF;AACF;AACF;;","debugId":"3671fe5b-04dc-47f0-a223-21d1f9db2046"}
package/dist/flags.js CHANGED
@@ -10,8 +10,9 @@ var constants = require('./constants.js');
10
10
  let _rawSpaceSizeFlags;
11
11
  function getRawSpaceSizeFlags() {
12
12
  if (_rawSpaceSizeFlags === undefined) {
13
- const cli = vendor.meow(``, {
13
+ const cli = vendor.meow({
14
14
  argv: process.argv.slice(2),
15
+ // Prevent meow from potentially exiting early.
15
16
  autoHelp: false,
16
17
  autoVersion: false,
17
18
  flags: {
@@ -145,7 +146,7 @@ const commonFlags = {
145
146
  return getMaxOldSpaceSizeFlag();
146
147
  },
147
148
  hidden: true,
148
- description: "Sets the max memory size of V8's old memory section in megabytes"
149
+ description: `Set Node's V8 ${vendor.terminalLinkExports('--max-old-space-size', 'https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib')} option`
149
150
  },
150
151
  maxSemiSpaceSize: {
151
152
  type: 'number',
@@ -153,7 +154,7 @@ const commonFlags = {
153
154
  return getMaxSemiSpaceSizeFlag();
154
155
  },
155
156
  hidden: true,
156
- description: "Sets the maximum semi-space size for V8's scavenge garbage collector in megabytes"
157
+ description: `Set Node's V8 ${vendor.terminalLinkExports('--max-semi-space-size', 'https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib')} option`
157
158
  },
158
159
  nobanner: {
159
160
  // I know this would be `--no-banner` but that doesn't work with cdxgen.
@@ -181,5 +182,5 @@ const outputFlags = {
181
182
 
182
183
  exports.commonFlags = commonFlags;
183
184
  exports.outputFlags = outputFlags;
184
- //# debugId=6a3063c2-5d32-4a96-b789-41efeb4974b6
185
+ //# debugId=d1ab63b3-90e9-483a-8a9b-da2b76c058a7
185
186
  //# sourceMappingURL=flags.js.map
package/dist/flags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"flags.js","sources":["../src/flags.mts"],"sourcesContent":["import os from 'node:os'\nimport { pathToFileURL } from 'node:url'\n\nimport meow from 'meow'\n\nimport constants from './constants.mts'\n\nimport type { Flag } from 'meow'\n\n// TODO: not sure if I'm missing something but meow doesn't seem to expose this?\nexport type StringFlag = Flag<'string', string> | Flag<'string', string[], true>\nexport type BooleanFlag =\n | Flag<'boolean', boolean>\n | Flag<'boolean', boolean[], true>\nexport type NumberFlag = Flag<'number', number> | Flag<'number', number[], true>\nexport type AnyFlag = StringFlag | BooleanFlag | NumberFlag\n\ntype RawSpaceSizeFlags = {\n maxOldSpaceSize: number\n maxSemiSpaceSize: number\n}\n\nlet _rawSpaceSizeFlags: RawSpaceSizeFlags | undefined\nfunction getRawSpaceSizeFlags(): RawSpaceSizeFlags {\n if (_rawSpaceSizeFlags === undefined) {\n const cli = meow(``, {\n argv: process.argv.slice(2),\n autoHelp: false,\n autoVersion: false,\n flags: {\n maxOldSpaceSize: {\n type: 'number',\n default: 0,\n },\n maxSemiSpaceSize: {\n type: 'number',\n default: 0,\n },\n },\n importMeta: { url: `${pathToFileURL(__filename)}` } as ImportMeta,\n })\n _rawSpaceSizeFlags = {\n maxOldSpaceSize: cli.flags['maxOldSpaceSize'],\n maxSemiSpaceSize: cli.flags['maxSemiSpaceSize'],\n }\n }\n return _rawSpaceSizeFlags\n}\n\nlet _maxOldSpaceSizeFlag: number | undefined\nexport function getMaxOldSpaceSizeFlag(): number {\n if (_maxOldSpaceSizeFlag === undefined) {\n _maxOldSpaceSizeFlag = getRawSpaceSizeFlags().maxOldSpaceSize\n if (!_maxOldSpaceSizeFlag) {\n const match = /(?<=--max-old-space-size=)\\d+/.exec(\n // Lazily access constants.ENV.\n constants.ENV.NODE_OPTIONS,\n )?.[0]\n _maxOldSpaceSizeFlag = match ? Number(match) : 0\n }\n if (!_maxOldSpaceSizeFlag) {\n // Default value determined by available system memory.\n _maxOldSpaceSizeFlag = Math.floor(\n // Total system memory in MiB.\n (os.totalmem() / 1024 / 1024) *\n // Set 75% of total memory (safe buffer to avoid system pressure).\n 0.75,\n )\n }\n }\n return _maxOldSpaceSizeFlag\n}\n// Ensure export because dist/flags.js is required in src/constants.mts.\n// eslint-disable-next-line n/exports-style\nexports.getMaxOldSpaceSizeFlag = getMaxOldSpaceSizeFlag\n\nlet _maxSemiSpaceSizeFlag: number | undefined\nexport function getMaxSemiSpaceSizeFlag(): number {\n if (_maxSemiSpaceSizeFlag === undefined) {\n _maxSemiSpaceSizeFlag = getRawSpaceSizeFlags().maxSemiSpaceSize\n if (!_maxSemiSpaceSizeFlag) {\n const match = /(?<=--max-semi-space-size=)\\d+/.exec(\n // Lazily access constants.ENV.\n constants.ENV.NODE_OPTIONS,\n )?.[0]\n _maxSemiSpaceSizeFlag = match ? Number(match) : 0\n }\n if (!_maxSemiSpaceSizeFlag) {\n const maxOldSpaceSize = getMaxOldSpaceSizeFlag()\n // Dynamically scale semi-space size based on max-old-space-size.\n // https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib\n if (maxOldSpaceSize <= 8192) {\n // Use tiered values for smaller heaps to avoid excessive young\n // generation size. This helps stay within safe memory limits on\n // constrained systems or CI.\n if (maxOldSpaceSize <= 512) {\n _maxSemiSpaceSizeFlag = 4\n } else if (maxOldSpaceSize <= 1024) {\n _maxSemiSpaceSizeFlag = 8\n } else if (maxOldSpaceSize <= 2048) {\n _maxSemiSpaceSizeFlag = 16\n } else if (maxOldSpaceSize <= 4096) {\n _maxSemiSpaceSizeFlag = 32\n } else {\n _maxSemiSpaceSizeFlag = 64\n }\n } else {\n // For large heaps (> 8 GiB), compute semi-space size using a log-scaled\n // function.\n //\n // The idea:\n // - log2(16384 MiB) = 14 → semi = 14 * 8 = 112\n // - log2(32768 MiB) = 15 → semi = 15 * 8 = 120\n // - Scales gradually as heap increases, avoiding overly large jumps\n //\n // Each 1 MiB of semi-space adds ~3 MiB to the total young generation\n // (V8 uses 3 spaces). So this keeps semi-space proportional, without\n // over committing.\n //\n // Also note: V8 won’t benefit much from >256 MiB semi-space unless\n // you’re allocating large short-lived objects very frequently\n // (e.g. large arrays, buffers).\n const log2OldSpace = Math.log2(maxOldSpaceSize)\n const scaledSemiSpace = Math.floor(log2OldSpace) * 8\n _maxSemiSpaceSizeFlag = scaledSemiSpace\n }\n }\n }\n return _maxSemiSpaceSizeFlag\n}\n// Ensure export because dist/flags.js is required in src/constants.mts.\n// eslint-disable-next-line n/exports-style\nexports.getMaxSemiSpaceSizeFlag = getMaxSemiSpaceSizeFlag\n\n// Note: we use this description in getFlagListOutput, meow doesn't care\nexport type MeowFlags = Record<\n string,\n AnyFlag & { description: string; hidden?: boolean }\n>\n\nexport const commonFlags: MeowFlags = {\n config: {\n type: 'string',\n default: '',\n hidden: true,\n description: 'Override the local config with this JSON',\n },\n dryRun: {\n type: 'boolean',\n default: false,\n hidden: true, // Only show in root command\n description:\n 'Do input validation for a command and exit 0 when input is ok',\n },\n help: {\n type: 'boolean',\n default: false,\n shortFlag: 'h',\n hidden: true,\n description: 'Print this help',\n },\n maxOldSpaceSize: {\n type: 'number',\n get default() {\n return getMaxOldSpaceSizeFlag()\n },\n hidden: true,\n description:\n \"Sets the max memory size of V8's old memory section in megabytes\",\n },\n maxSemiSpaceSize: {\n type: 'number',\n get default() {\n return getMaxSemiSpaceSizeFlag()\n },\n hidden: true,\n description:\n \"Sets the maximum semi-space size for V8's scavenge garbage collector in megabytes\",\n },\n nobanner: {\n // I know this would be `--no-banner` but that doesn't work with cdxgen.\n // Mostly for internal usage anyways.\n type: 'boolean',\n default: false,\n hidden: true,\n description: 'Hide the Socket banner',\n },\n}\n\nexport const outputFlags: MeowFlags = {\n json: {\n type: 'boolean',\n shortFlag: 'j',\n default: false,\n description: 'Output result as json',\n },\n markdown: {\n type: 'boolean',\n shortFlag: 'm',\n default: false,\n description: 'Output result as markdown',\n },\n}\n\nexport const validationFlags: MeowFlags = {\n all: {\n type: 'boolean',\n default: false,\n description: 'Include all issues',\n },\n strict: {\n type: 'boolean',\n default: false,\n description: 'Exits with an error code if any matching issues are found',\n },\n}\n"],"names":["autoHelp","autoVersion","flags","maxOldSpaceSize","type","default","maxSemiSpaceSize","importMeta","url","_rawSpaceSizeFlags","_maxOldSpaceSizeFlag","constants","os","exports","_maxSemiSpaceSizeFlag","config","hidden","description","dryRun","help","shortFlag","nobanner","json","markdown"],"mappings":";;;;;;;AASA;;AAaA;AACA;;AAEI;;AAEEA;AACAC;AACAC;AACEC;AACEC;AACAC;;AAEFC;AACEF;AACAC;AACF;;AAEFE;AAAcC;AAAoC;AACpD;AACAC;AACEN;AACAG;;AAEJ;AACA;AACF;AAEA;AACO;;AAEHI;;AAEE;AACE;AACAC;;AAGJ;;AAEE;;AAEE;AACCC;AACC;AACA;AAEN;AACF;AACA;AACF;AACA;AACA;AACAC;AAEA;AACO;;AAEHC;;AAEE;AACE;AACAH;;AAGJ;;AAEE;AACA;AACA;;AAEE;AACA;AACA;;AAEEG;AACF;AACEA;AACF;AACEA;AACF;AACEA;AACF;AACEA;AACF;AACF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA;AACF;AACF;AACF;AACA;AACF;AACA;AACA;AACAD;;AAEA;;AAMO;AACLE;AACEX;AACAC;AACAW;AACAC;;AAEFC;AACEd;AACAC;AACAW;AAAc;AACdC;;AAGFE;AACEf;AACAC;AACAe;AACAJ;AACAC;;AAEFd;AACEC;;;;AAIAY;AACAC;;AAGFX;AACEF;;;;AAIAY;AACAC;;AAGFI;AACE;AACA;AACAjB;AACAC;AACAW;AACAC;AACF;AACF;AAEO;AACLK;AACElB;AACAgB;AACAf;AACAY;;AAEFM;AACEnB;AACAgB;AACAf;AACAY;AACF;AACF;;;","debugId":"6a3063c2-5d32-4a96-b789-41efeb4974b6"}
1
+ {"version":3,"file":"flags.js","sources":["../src/flags.mts"],"sourcesContent":["import os from 'node:os'\nimport { pathToFileURL } from 'node:url'\n\nimport meow from 'meow'\nimport terminalLink from 'terminal-link'\n\nimport constants from './constants.mts'\n\nimport type { Flag } from 'meow'\n\n// TODO: not sure if I'm missing something but meow doesn't seem to expose this?\nexport type StringFlag = Flag<'string', string> | Flag<'string', string[], true>\nexport type BooleanFlag =\n | Flag<'boolean', boolean>\n | Flag<'boolean', boolean[], true>\nexport type NumberFlag = Flag<'number', number> | Flag<'number', number[], true>\nexport type AnyFlag = StringFlag | BooleanFlag | NumberFlag\n\ntype RawSpaceSizeFlags = {\n maxOldSpaceSize: number\n maxSemiSpaceSize: number\n}\n\nlet _rawSpaceSizeFlags: RawSpaceSizeFlags | undefined\nfunction getRawSpaceSizeFlags(): RawSpaceSizeFlags {\n if (_rawSpaceSizeFlags === undefined) {\n const cli = meow({\n argv: process.argv.slice(2),\n // Prevent meow from potentially exiting early.\n autoHelp: false,\n autoVersion: false,\n flags: {\n maxOldSpaceSize: {\n type: 'number',\n default: 0,\n },\n maxSemiSpaceSize: {\n type: 'number',\n default: 0,\n },\n },\n importMeta: { url: `${pathToFileURL(__filename)}` } as ImportMeta,\n })\n _rawSpaceSizeFlags = {\n maxOldSpaceSize: cli.flags['maxOldSpaceSize'],\n maxSemiSpaceSize: cli.flags['maxSemiSpaceSize'],\n }\n }\n return _rawSpaceSizeFlags\n}\n\nlet _maxOldSpaceSizeFlag: number | undefined\nexport function getMaxOldSpaceSizeFlag(): number {\n if (_maxOldSpaceSizeFlag === undefined) {\n _maxOldSpaceSizeFlag = getRawSpaceSizeFlags().maxOldSpaceSize\n if (!_maxOldSpaceSizeFlag) {\n const match = /(?<=--max-old-space-size=)\\d+/.exec(\n // Lazily access constants.ENV.\n constants.ENV.NODE_OPTIONS,\n )?.[0]\n _maxOldSpaceSizeFlag = match ? Number(match) : 0\n }\n if (!_maxOldSpaceSizeFlag) {\n // Default value determined by available system memory.\n _maxOldSpaceSizeFlag = Math.floor(\n // Total system memory in MiB.\n (os.totalmem() / 1024 / 1024) *\n // Set 75% of total memory (safe buffer to avoid system pressure).\n 0.75,\n )\n }\n }\n return _maxOldSpaceSizeFlag\n}\n// Ensure export because dist/flags.js is required in src/constants.mts.\n// eslint-disable-next-line n/exports-style\nexports.getMaxOldSpaceSizeFlag = getMaxOldSpaceSizeFlag\n\nlet _maxSemiSpaceSizeFlag: number | undefined\nexport function getMaxSemiSpaceSizeFlag(): number {\n if (_maxSemiSpaceSizeFlag === undefined) {\n _maxSemiSpaceSizeFlag = getRawSpaceSizeFlags().maxSemiSpaceSize\n if (!_maxSemiSpaceSizeFlag) {\n const match = /(?<=--max-semi-space-size=)\\d+/.exec(\n // Lazily access constants.ENV.\n constants.ENV.NODE_OPTIONS,\n )?.[0]\n _maxSemiSpaceSizeFlag = match ? Number(match) : 0\n }\n if (!_maxSemiSpaceSizeFlag) {\n const maxOldSpaceSize = getMaxOldSpaceSizeFlag()\n // Dynamically scale semi-space size based on max-old-space-size.\n // https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib\n if (maxOldSpaceSize <= 8192) {\n // Use tiered values for smaller heaps to avoid excessive young\n // generation size. This helps stay within safe memory limits on\n // constrained systems or CI.\n if (maxOldSpaceSize <= 512) {\n _maxSemiSpaceSizeFlag = 4\n } else if (maxOldSpaceSize <= 1024) {\n _maxSemiSpaceSizeFlag = 8\n } else if (maxOldSpaceSize <= 2048) {\n _maxSemiSpaceSizeFlag = 16\n } else if (maxOldSpaceSize <= 4096) {\n _maxSemiSpaceSizeFlag = 32\n } else {\n _maxSemiSpaceSizeFlag = 64\n }\n } else {\n // For large heaps (> 8 GiB), compute semi-space size using a log-scaled\n // function.\n //\n // The idea:\n // - log2(16384 MiB) = 14 → semi = 14 * 8 = 112\n // - log2(32768 MiB) = 15 → semi = 15 * 8 = 120\n // - Scales gradually as heap increases, avoiding overly large jumps\n //\n // Each 1 MiB of semi-space adds ~3 MiB to the total young generation\n // (V8 uses 3 spaces). So this keeps semi-space proportional, without\n // over committing.\n //\n // Also note: V8 won’t benefit much from >256 MiB semi-space unless\n // you’re allocating large short-lived objects very frequently\n // (e.g. large arrays, buffers).\n const log2OldSpace = Math.log2(maxOldSpaceSize)\n const scaledSemiSpace = Math.floor(log2OldSpace) * 8\n _maxSemiSpaceSizeFlag = scaledSemiSpace\n }\n }\n }\n return _maxSemiSpaceSizeFlag\n}\n// Ensure export because dist/flags.js is required in src/constants.mts.\n// eslint-disable-next-line n/exports-style\nexports.getMaxSemiSpaceSizeFlag = getMaxSemiSpaceSizeFlag\n\n// Note: we use this description in getFlagListOutput, meow doesn't care\nexport type MeowFlags = Record<\n string,\n AnyFlag & { description: string; hidden?: boolean }\n>\n\nexport const commonFlags: MeowFlags = {\n config: {\n type: 'string',\n default: '',\n hidden: true,\n description: 'Override the local config with this JSON',\n },\n dryRun: {\n type: 'boolean',\n default: false,\n hidden: true, // Only show in root command\n description:\n 'Do input validation for a command and exit 0 when input is ok',\n },\n help: {\n type: 'boolean',\n default: false,\n shortFlag: 'h',\n hidden: true,\n description: 'Print this help',\n },\n maxOldSpaceSize: {\n type: 'number',\n get default() {\n return getMaxOldSpaceSizeFlag()\n },\n hidden: true,\n description: `Set Node's V8 ${terminalLink('--max-old-space-size', 'https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib')} option`,\n },\n maxSemiSpaceSize: {\n type: 'number',\n get default() {\n return getMaxSemiSpaceSizeFlag()\n },\n hidden: true,\n description: `Set Node's V8 ${terminalLink('--max-semi-space-size', 'https://nodejs.org/api/cli.html#--max-semi-space-sizesize-in-mib')} option`,\n },\n nobanner: {\n // I know this would be `--no-banner` but that doesn't work with cdxgen.\n // Mostly for internal usage anyways.\n type: 'boolean',\n default: false,\n hidden: true,\n description: 'Hide the Socket banner',\n },\n}\n\nexport const outputFlags: MeowFlags = {\n json: {\n type: 'boolean',\n shortFlag: 'j',\n default: false,\n description: 'Output result as json',\n },\n markdown: {\n type: 'boolean',\n shortFlag: 'm',\n default: false,\n description: 'Output result as markdown',\n },\n}\n\nexport const validationFlags: MeowFlags = {\n all: {\n type: 'boolean',\n default: false,\n description: 'Include all issues',\n },\n strict: {\n type: 'boolean',\n default: false,\n description: 'Exits with an error code if any matching issues are found',\n },\n}\n"],"names":["autoHelp","autoVersion","flags","maxOldSpaceSize","type","default","maxSemiSpaceSize","importMeta","url","_rawSpaceSizeFlags","_maxOldSpaceSizeFlag","constants","os","exports","_maxSemiSpaceSizeFlag","config","hidden","description","dryRun","help","shortFlag","nobanner","json","markdown"],"mappings":";;;;;;;AAUA;;AAaA;AACA;;;;AAIM;AACAA;AACAC;AACAC;AACEC;AACEC;AACAC;;AAEFC;AACEF;AACAC;AACF;;AAEFE;AAAcC;AAAoC;AACpD;AACAC;AACEN;AACAG;;AAEJ;AACA;AACF;AAEA;AACO;;AAEHI;;AAEE;AACE;AACAC;;AAGJ;;AAEE;;AAEE;AACCC;AACC;AACA;AAEN;AACF;AACA;AACF;AACA;AACA;AACAC;AAEA;AACO;;AAEHC;;AAEE;AACE;AACAH;;AAGJ;;AAEE;AACA;AACA;;AAEE;AACA;AACA;;AAEEG;AACF;AACEA;AACF;AACEA;AACF;AACEA;AACF;AACEA;AACF;AACF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAA;AACF;AACF;AACF;AACA;AACF;AACA;AACA;AACAD;;AAEA;;AAMO;AACLE;AACEX;AACAC;AACAW;AACAC;;AAEFC;AACEd;AACAC;AACAW;AAAc;AACdC;;AAGFE;AACEf;AACAC;AACAe;AACAJ;AACAC;;AAEFd;AACEC;;;;AAIAY;AACAC;;AAEFX;AACEF;;;;AAIAY;AACAC;;AAEFI;AACE;AACA;AACAjB;AACAC;AACAW;AACAC;AACF;AACF;AAEO;AACLK;AACElB;AACAgB;AACAf;AACAY;;AAEFM;AACEnB;AACAgB;AACAf;AACAY;AACF;AACF;;;","debugId":"d1ab63b3-90e9-483a-8a9b-da2b76c058a7"}
@@ -20,7 +20,6 @@ COMMANDS=(
20
20
  [diff-scan]="get"
21
21
  [diff-scan get]=""
22
22
  [fix]=""
23
- [info]=""
24
23
  [install]="completion"
25
24
  [install completion]=""
26
25
  [login]=""
@@ -89,7 +88,6 @@ FLAGS=(
89
88
  [diff-scan]=""
90
89
  [diff-scan get]="--after --before --depth --file --json"
91
90
  [fix]="--autoMerge --autopilot --ghsa --limit --purl --rangeStyle --test --testScript"
92
- [info]="--all --strict"
93
91
  [install]=""
94
92
  [install completion]=""
95
93
  [login]="--apiBaseUrl --apiProxy"