@socketsecurity/cli-with-sentry 1.16.1 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +87 -0
  3. package/README.md +13 -13
  4. package/bin/cli.js +9 -9
  5. package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
  6. package/dist/cli.js +2114 -4292
  7. package/dist/cli.js.map +1 -1
  8. package/dist/constants.js +71 -87
  9. package/dist/constants.js.map +1 -1
  10. package/dist/env-helpers.js +63 -0
  11. package/dist/env-helpers.js.map +1 -0
  12. package/dist/instrument-with-sentry.js +7 -7
  13. package/dist/instrument-with-sentry.js.map +1 -1
  14. package/dist/manifest-scripts/dotnet-tool/Microsoft.Build.Locator.dll +0 -0
  15. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.deps.json +2 -2
  16. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.dll +0 -0
  17. package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
  18. package/dist/runtime-constants.js +345 -0
  19. package/dist/runtime-constants.js.map +1 -0
  20. package/dist/shadow-npm-bin2.js +9 -13
  21. package/dist/shadow-npm-bin2.js.map +1 -1
  22. package/dist/shadow-npm-inject.js +10 -15
  23. package/dist/shadow-npm-inject.js.map +1 -1
  24. package/dist/shadow-npx-bin.js.map +1 -1
  25. package/dist/shadow-pnpm-bin2.js +21 -25
  26. package/dist/shadow-pnpm-bin2.js.map +1 -1
  27. package/dist/shadow-yarn-bin.js +4 -6
  28. package/dist/shadow-yarn-bin.js.map +1 -1
  29. package/dist/socket-completion.bash +0 -0
  30. package/dist/spawn-sync.js +47 -0
  31. package/dist/spawn-sync.js.map +1 -0
  32. package/dist/spinner.js +182 -0
  33. package/dist/spinner.js.map +1 -0
  34. package/dist/types/commands/fix/generated-socket-facts.d.mts +5 -2
  35. package/dist/types/commands/fix/handle-fix.d.mts +1 -1
  36. package/dist/types/commands/fix/types.d.mts +1 -1
  37. package/dist/types/commands/manifest/bazel/process.d.mts +2 -2
  38. package/dist/types/commands/manifest/convert-dotnet-to-facts.d.mts +3 -6
  39. package/dist/types/commands/manifest/discover-manifest-roots.d.mts +10 -11
  40. package/dist/types/commands/manifest/generate-recursive-manifests.d.mts +16 -30
  41. package/dist/types/commands/manifest/generate_auto_manifest.d.mts +6 -11
  42. package/dist/types/commands/manifest/load-build.d.mts +3 -11
  43. package/dist/types/commands/manifest/run-manifest-facts.d.mts +88 -29
  44. package/dist/types/commands/manifest/scripts/build-tool.d.mts +2 -0
  45. package/dist/types/commands/optimize/add-overrides.d.mts +2 -2
  46. package/dist/types/commands/optimize/get-dependency-entries.d.mts +1 -1
  47. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +16 -7
  48. package/dist/types/commands/optimize/update-lockfile.d.mts +2 -2
  49. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +4 -2
  50. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +2 -2
  51. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +1 -1
  52. package/dist/types/commands/scan/generate-report.d.mts +1 -1
  53. package/dist/types/commands/scan/handle-create-new-scan.d.mts +5 -1
  54. package/dist/types/commands/scan/output-create-new-scan.d.mts +1 -1
  55. package/dist/types/commands/scan/output-diff-scan.d.mts +4 -2
  56. package/dist/types/commands/scan/perform-reachability-analysis.d.mts +4 -5
  57. package/dist/types/commands/scan/run-dynamic-sbom-inference.d.mts +7 -15
  58. package/dist/types/constants/runtime.d.mts +417 -0
  59. package/dist/types/constants.d.mts +9 -10
  60. package/dist/types/paths/coana.d.mts +5 -0
  61. package/dist/types/paths/uv.d.mts +2 -0
  62. package/dist/types/sea/adapters/cdxgen-worker.d.mts +1 -0
  63. package/dist/types/sea/adapters/synp-worker.d.mts +1 -0
  64. package/dist/types/sea/build/cdxgen-fixture.d.mts +4 -0
  65. package/dist/types/sea/build/smoke-test.d.mts +2 -0
  66. package/dist/types/sea/build-sea.d.mts +4 -2
  67. package/dist/types/sea/download-bytes.d.mts +0 -1
  68. package/dist/types/sea/paths/archive.d.mts +3 -0
  69. package/dist/types/sea/paths/coana-cache.d.mts +1 -0
  70. package/dist/types/sea/paths/native-tools.d.mts +13 -0
  71. package/dist/types/sea/pnpm-lock.d.mts +22 -0
  72. package/dist/types/sea/rollup-workers.d.mts +1 -0
  73. package/dist/types/sea/runtime.d.mts +4 -3
  74. package/dist/types/sea/vfs-digest.d.mts +2 -0
  75. package/dist/types/shadow/common.d.mts +1 -1
  76. package/dist/types/shadow/npm/arborist-helpers.d.mts +1 -1
  77. package/dist/types/shadow/npm/bin.d.mts +1 -1
  78. package/dist/types/shadow/npm/install.d.mts +3 -3
  79. package/dist/types/shadow/npm-base.d.mts +1 -1
  80. package/dist/types/shadow/npx/bin.d.mts +1 -1
  81. package/dist/types/shadow/pnpm/bin.d.mts +1 -1
  82. package/dist/types/shadow/yarn/bin.d.mts +1 -1
  83. package/dist/types/test/mocks/socket-auth.d.mts +40 -39
  84. package/dist/types/utils/agent.d.mts +6 -1
  85. package/dist/types/utils/alert/artifact.d.mts +1 -1
  86. package/dist/types/utils/alerts-map.d.mts +1 -1
  87. package/dist/types/utils/api.d.mts +1 -1
  88. package/dist/types/utils/arrays.d.mts +6 -0
  89. package/dist/types/utils/bin.d.mts +26 -0
  90. package/dist/types/utils/{coana-release.d.mts → coana/release.d.mts} +5 -3
  91. package/dist/types/utils/debug.d.mts +23 -49
  92. package/dist/types/utils/dlx.d.mts +1 -1
  93. package/dist/types/utils/ecosystem.d.mts +1 -9
  94. package/dist/types/utils/env.d.mts +24 -0
  95. package/dist/types/utils/errors.d.mts +2 -2
  96. package/dist/types/utils/escape-regexp.d.mts +6 -0
  97. package/dist/types/utils/fs.d.mts +33 -0
  98. package/dist/types/utils/github.d.mts +1 -1
  99. package/dist/types/utils/globs.d.mts +1 -0
  100. package/dist/types/utils/logger.d.mts +51 -0
  101. package/dist/types/utils/objects.d.mts +11 -0
  102. package/dist/types/utils/package-environment.d.mts +3 -3
  103. package/dist/types/utils/packages.d.mts +65 -0
  104. package/dist/types/utils/path.d.mts +3 -0
  105. package/dist/types/utils/promises.d.mts +23 -0
  106. package/dist/types/utils/prompts.d.mts +25 -0
  107. package/dist/types/utils/purl.d.mts +4 -1
  108. package/dist/types/utils/socket-package-alert.d.mts +1 -1
  109. package/dist/types/utils/socket-url.d.mts +1 -1
  110. package/dist/types/utils/sorts.d.mts +1 -0
  111. package/dist/types/utils/spawn-sync.d.mts +3 -0
  112. package/dist/types/utils/spawn.d.mts +67 -0
  113. package/dist/types/utils/spec.d.mts +1 -1
  114. package/dist/types/utils/spinner.d.mts +46 -0
  115. package/dist/types/utils/streams.d.mts +3 -0
  116. package/dist/types/utils/strings.d.mts +6 -0
  117. package/dist/types/utils/url.d.mts +2 -0
  118. package/dist/types/utils/words.d.mts +1 -0
  119. package/dist/utils.js +4475 -803
  120. package/dist/utils.js.map +1 -1
  121. package/dist/vendor.js +39737 -41318
  122. package/external/blessed-contrib/lib/widget/charts/line.js +172 -149
  123. package/package.json +41 -37
  124. package/shadow-bin/npm +0 -0
  125. package/shadow-bin/npx +0 -0
  126. package/shadow-bin/pnpm +0 -0
  127. package/shadow-bin/yarn +0 -0
  128. package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts +0 -19
  129. package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +0 -19
  130. package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts +0 -22
  131. package/dist/types/commands/manifest/enumerate-workspaces.d.mts +0 -22
  132. package/dist/types/commands/manifest/expand-env-var-refs.d.mts +0 -9
  133. package/dist/types/sea/archive-paths.d.mts +0 -6
  134. package/external/@socketsecurity/registry/LICENSE +0 -21
  135. package/external/@socketsecurity/registry/README.md +0 -9
  136. package/external/@socketsecurity/registry/extensions.json +0 -28
  137. package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -3165
  138. package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -3202
  139. package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -3307
  140. package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -3519
  141. package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -3655
  142. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -21406
  143. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -183
  144. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -274
  145. package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -704
  146. package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -54
  147. package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -4516
  148. package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -453
  149. package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1406
  150. package/external/@socketsecurity/registry/external/browserslist.js +0 -20496
  151. package/external/@socketsecurity/registry/external/cacache.js +0 -16208
  152. package/external/@socketsecurity/registry/external/debug.js +0 -1163
  153. package/external/@socketsecurity/registry/external/fast-glob.js +0 -7994
  154. package/external/@socketsecurity/registry/external/fast-sort.js +0 -181
  155. package/external/@socketsecurity/registry/external/libnpmpack.js +0 -106271
  156. package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -38997
  157. package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -5343
  158. package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -5773
  159. package/external/@socketsecurity/registry/external/pacote.js +0 -74109
  160. package/external/@socketsecurity/registry/external/picomatch.js +0 -2307
  161. package/external/@socketsecurity/registry/external/semver.js +0 -2618
  162. package/external/@socketsecurity/registry/external/signal-exit.js +0 -336
  163. package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1457
  164. package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1043
  165. package/external/@socketsecurity/registry/external/streaming-iterables.js +0 -326
  166. package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -108
  167. package/external/@socketsecurity/registry/external/which.js +0 -405
  168. package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -101
  169. package/external/@socketsecurity/registry/index.js +0 -31
  170. package/external/@socketsecurity/registry/lib/agent.js +0 -390
  171. package/external/@socketsecurity/registry/lib/arrays.js +0 -89
  172. package/external/@socketsecurity/registry/lib/bin.js +0 -650
  173. package/external/@socketsecurity/registry/lib/constants/abort-controller.js +0 -15
  174. package/external/@socketsecurity/registry/lib/constants/abort-signal.js +0 -27
  175. package/external/@socketsecurity/registry/lib/constants/at-latest.js +0 -3
  176. package/external/@socketsecurity/registry/lib/constants/biome-json.js +0 -3
  177. package/external/@socketsecurity/registry/lib/constants/bun-lock.js +0 -3
  178. package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +0 -3
  179. package/external/@socketsecurity/registry/lib/constants/bun.js +0 -3
  180. package/external/@socketsecurity/registry/lib/constants/ci.js +0 -3
  181. package/external/@socketsecurity/registry/lib/constants/column-limit.js +0 -3
  182. package/external/@socketsecurity/registry/lib/constants/copy-left-licenses.js +0 -27
  183. package/external/@socketsecurity/registry/lib/constants/darwin.js +0 -3
  184. package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +0 -3
  185. package/external/@socketsecurity/registry/lib/constants/dot-package-lock-json.js +0 -3
  186. package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +0 -3
  187. package/external/@socketsecurity/registry/lib/constants/empty-file.js +0 -3
  188. package/external/@socketsecurity/registry/lib/constants/empty-value.js +0 -3
  189. package/external/@socketsecurity/registry/lib/constants/env.js +0 -59
  190. package/external/@socketsecurity/registry/lib/constants/eslint-config-js.js +0 -3
  191. package/external/@socketsecurity/registry/lib/constants/esnext.js +0 -3
  192. package/external/@socketsecurity/registry/lib/constants/exec-path.js +0 -3
  193. package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +0 -3
  194. package/external/@socketsecurity/registry/lib/constants/ext-cmd.js +0 -3
  195. package/external/@socketsecurity/registry/lib/constants/ext-cts.js +0 -3
  196. package/external/@socketsecurity/registry/lib/constants/ext-dts.js +0 -3
  197. package/external/@socketsecurity/registry/lib/constants/ext-js.js +0 -3
  198. package/external/@socketsecurity/registry/lib/constants/ext-json.js +0 -3
  199. package/external/@socketsecurity/registry/lib/constants/ext-lock.js +0 -3
  200. package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +0 -3
  201. package/external/@socketsecurity/registry/lib/constants/ext-md.js +0 -3
  202. package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +0 -3
  203. package/external/@socketsecurity/registry/lib/constants/ext-mts.js +0 -3
  204. package/external/@socketsecurity/registry/lib/constants/ext-ps1.js +0 -3
  205. package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +0 -3
  206. package/external/@socketsecurity/registry/lib/constants/ext-yml.js +0 -3
  207. package/external/@socketsecurity/registry/lib/constants/extensions-json.js +0 -3
  208. package/external/@socketsecurity/registry/lib/constants/extensions.js +0 -3
  209. package/external/@socketsecurity/registry/lib/constants/get-ipc.js +0 -10
  210. package/external/@socketsecurity/registry/lib/constants/gitignore.js +0 -3
  211. package/external/@socketsecurity/registry/lib/constants/index.js +0 -139
  212. package/external/@socketsecurity/registry/lib/constants/ipc-handler.js +0 -19
  213. package/external/@socketsecurity/registry/lib/constants/ipc-object.js +0 -6
  214. package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +0 -47
  215. package/external/@socketsecurity/registry/lib/constants/ipc-target.js +0 -3
  216. package/external/@socketsecurity/registry/lib/constants/k-internals-symbol.js +0 -3
  217. package/external/@socketsecurity/registry/lib/constants/latest.js +0 -3
  218. package/external/@socketsecurity/registry/lib/constants/license-glob-recursive.js +0 -3
  219. package/external/@socketsecurity/registry/lib/constants/license-glob.js +0 -3
  220. package/external/@socketsecurity/registry/lib/constants/license-original-glob-recursive.js +0 -3
  221. package/external/@socketsecurity/registry/lib/constants/license-original-glob.js +0 -3
  222. package/external/@socketsecurity/registry/lib/constants/license-original.js +0 -3
  223. package/external/@socketsecurity/registry/lib/constants/license.js +0 -3
  224. package/external/@socketsecurity/registry/lib/constants/lifecycle-script-names.js +0 -18
  225. package/external/@socketsecurity/registry/lib/constants/loop-sentinel.js +0 -3
  226. package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +0 -47
  227. package/external/@socketsecurity/registry/lib/constants/manifest-json.js +0 -3
  228. package/external/@socketsecurity/registry/lib/constants/mit.js +0 -3
  229. package/external/@socketsecurity/registry/lib/constants/node-auth-token.js +0 -3
  230. package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +0 -9
  231. package/external/@socketsecurity/registry/lib/constants/node-env.js +0 -3
  232. package/external/@socketsecurity/registry/lib/constants/node-harden-flags.js +0 -29
  233. package/external/@socketsecurity/registry/lib/constants/node-modules-glob-recursive.js +0 -3
  234. package/external/@socketsecurity/registry/lib/constants/node-modules.js +0 -3
  235. package/external/@socketsecurity/registry/lib/constants/node-no-warnings-flags.js +0 -16
  236. package/external/@socketsecurity/registry/lib/constants/node-version.js +0 -3
  237. package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +0 -5
  238. package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +0 -6
  239. package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +0 -3
  240. package/external/@socketsecurity/registry/lib/constants/npm.js +0 -3
  241. package/external/@socketsecurity/registry/lib/constants/npx.js +0 -3
  242. package/external/@socketsecurity/registry/lib/constants/overrides.js +0 -3
  243. package/external/@socketsecurity/registry/lib/constants/package-default-node-range.js +0 -6
  244. package/external/@socketsecurity/registry/lib/constants/package-default-socket-categories.js +0 -3
  245. package/external/@socketsecurity/registry/lib/constants/package-default-version.js +0 -3
  246. package/external/@socketsecurity/registry/lib/constants/package-extensions.js +0 -47
  247. package/external/@socketsecurity/registry/lib/constants/package-json.js +0 -3
  248. package/external/@socketsecurity/registry/lib/constants/package-lock-json.js +0 -3
  249. package/external/@socketsecurity/registry/lib/constants/packument-cache.js +0 -3
  250. package/external/@socketsecurity/registry/lib/constants/pacote-cache-path.js +0 -9
  251. package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +0 -5
  252. package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +0 -3
  253. package/external/@socketsecurity/registry/lib/constants/pnpm.js +0 -3
  254. package/external/@socketsecurity/registry/lib/constants/pre-commit.js +0 -3
  255. package/external/@socketsecurity/registry/lib/constants/readme-glob-recursive.js +0 -3
  256. package/external/@socketsecurity/registry/lib/constants/readme-glob.js +0 -3
  257. package/external/@socketsecurity/registry/lib/constants/readme-md.js +0 -3
  258. package/external/@socketsecurity/registry/lib/constants/registry-scope-delimiter.js +0 -3
  259. package/external/@socketsecurity/registry/lib/constants/registry.js +0 -3
  260. package/external/@socketsecurity/registry/lib/constants/resolutions.js +0 -3
  261. package/external/@socketsecurity/registry/lib/constants/socket-github-org.js +0 -3
  262. package/external/@socketsecurity/registry/lib/constants/socket-ipc-handshake.js +0 -3
  263. package/external/@socketsecurity/registry/lib/constants/socket-override-scope.js +0 -3
  264. package/external/@socketsecurity/registry/lib/constants/socket-public-api-token.js +0 -3
  265. package/external/@socketsecurity/registry/lib/constants/socket-registry-npm-org.js +0 -3
  266. package/external/@socketsecurity/registry/lib/constants/socket-registry-package-name.js +0 -3
  267. package/external/@socketsecurity/registry/lib/constants/socket-registry-repo-name.js +0 -3
  268. package/external/@socketsecurity/registry/lib/constants/socket-registry-scope.js +0 -3
  269. package/external/@socketsecurity/registry/lib/constants/socket-security-scope.js +0 -3
  270. package/external/@socketsecurity/registry/lib/constants/spinner.js +0 -4
  271. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-api.js +0 -8
  272. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-env-var.js +0 -8
  273. package/external/@socketsecurity/registry/lib/constants/supports-node-disable-warning-flag.js +0 -8
  274. package/external/@socketsecurity/registry/lib/constants/supports-node-permission-flag.js +0 -8
  275. package/external/@socketsecurity/registry/lib/constants/supports-node-require-module.js +0 -3
  276. package/external/@socketsecurity/registry/lib/constants/supports-node-run.js +0 -8
  277. package/external/@socketsecurity/registry/lib/constants/supports-process-send.js +0 -5
  278. package/external/@socketsecurity/registry/lib/constants/ts-libs-available.js +0 -22
  279. package/external/@socketsecurity/registry/lib/constants/ts-types-available.js +0 -3
  280. package/external/@socketsecurity/registry/lib/constants/tsconfig-json.js +0 -3
  281. package/external/@socketsecurity/registry/lib/constants/undefined-token.js +0 -3
  282. package/external/@socketsecurity/registry/lib/constants/unknown-error.js +0 -3
  283. package/external/@socketsecurity/registry/lib/constants/unknown-value.js +0 -3
  284. package/external/@socketsecurity/registry/lib/constants/unlicenced.js +0 -3
  285. package/external/@socketsecurity/registry/lib/constants/unlicensed.js +0 -3
  286. package/external/@socketsecurity/registry/lib/constants/utf8.js +0 -3
  287. package/external/@socketsecurity/registry/lib/constants/vitest.js +0 -3
  288. package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +0 -3
  289. package/external/@socketsecurity/registry/lib/constants/vlt.js +0 -3
  290. package/external/@socketsecurity/registry/lib/constants/win32.js +0 -3
  291. package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +0 -3
  292. package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +0 -3
  293. package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +0 -5
  294. package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +0 -3
  295. package/external/@socketsecurity/registry/lib/constants/yarn.js +0 -3
  296. package/external/@socketsecurity/registry/lib/debug.js +0 -264
  297. package/external/@socketsecurity/registry/lib/env.js +0 -62
  298. package/external/@socketsecurity/registry/lib/fs.js +0 -556
  299. package/external/@socketsecurity/registry/lib/functions.js +0 -20
  300. package/external/@socketsecurity/registry/lib/globs.js +0 -145
  301. package/external/@socketsecurity/registry/lib/json.js +0 -69
  302. package/external/@socketsecurity/registry/lib/logger.js +0 -534
  303. package/external/@socketsecurity/registry/lib/objects.js +0 -422
  304. package/external/@socketsecurity/registry/lib/packages.js +0 -1379
  305. package/external/@socketsecurity/registry/lib/path.js +0 -231
  306. package/external/@socketsecurity/registry/lib/promises.js +0 -286
  307. package/external/@socketsecurity/registry/lib/prompts.js +0 -63
  308. package/external/@socketsecurity/registry/lib/regexps.js +0 -23
  309. package/external/@socketsecurity/registry/lib/sorts.js +0 -70
  310. package/external/@socketsecurity/registry/lib/spawn.js +0 -252
  311. package/external/@socketsecurity/registry/lib/spinner.js +0 -205
  312. package/external/@socketsecurity/registry/lib/streams.js +0 -84
  313. package/external/@socketsecurity/registry/lib/strings.js +0 -235
  314. package/external/@socketsecurity/registry/lib/url.js +0 -68
  315. package/external/@socketsecurity/registry/lib/words.js +0 -45
  316. package/external/@socketsecurity/registry/manifest.json +0 -1875
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Escape regular-expression syntax characters in a literal string.
3
+ *
4
+ * Escape hyphens too so this remains compatible with Unicode RegExp modes.
5
+ */
6
+ export declare function escapeRegExp(value: string): string;
@@ -1,3 +1,35 @@
1
+ export type JsonContent = Record<string, unknown>;
2
+ type ReadFileOptions = {
3
+ encoding?: BufferEncoding | null | undefined;
4
+ flag?: string | undefined;
5
+ signal?: AbortSignal | undefined;
6
+ };
7
+ type ReadJsonOptions = {
8
+ encoding?: BufferEncoding;
9
+ flag?: string;
10
+ signal?: AbortSignal;
11
+ throws?: boolean;
12
+ reviver?: Parameters<typeof JSON.parse>[1];
13
+ };
14
+ type WriteJsonOptions = {
15
+ EOL?: string;
16
+ finalEOL?: boolean;
17
+ replacer?: Parameters<typeof JSON.stringify>[1];
18
+ spaces?: Parameters<typeof JSON.stringify>[2];
19
+ encoding?: BufferEncoding;
20
+ flag?: string;
21
+ mode?: number | string;
22
+ signal?: AbortSignal;
23
+ };
24
+ export declare function readJson(filepath: string, options?: ReadJsonOptions | BufferEncoding): Promise<JsonContent | null>;
25
+ export declare function readJsonSync(filepath: string, options?: ReadJsonOptions | BufferEncoding): JsonContent | null;
26
+ export declare function safeStatsSync(filepath: import('node:fs').PathLike, options?: import('node:fs').StatSyncOptions): import('node:fs').Stats | import('node:fs').BigIntStats | undefined;
27
+ export declare function writeJson(filepath: string, jsonContent: JsonContent, options?: WriteJsonOptions | BufferEncoding): Promise<void>;
28
+ export declare function readFileBinary(filepath: string, options?: ReadFileOptions): Promise<Buffer>;
29
+ export declare function readFileUtf8(filepath: string, options?: ReadFileOptions): Promise<string>;
30
+ export declare function safeReadFile(filepath: string, options?: ReadFileOptions | string): Promise<string | Buffer | undefined>;
31
+ export declare function safeReadFileSync(filepath: import('node:fs').PathOrFileDescriptor, options?: ReadFileOptions | string): string | Buffer | undefined;
32
+ export declare function isDirSync(filepath: import('node:fs').PathLike): boolean;
1
33
  export type FindUpOptions = {
2
34
  cwd?: string | undefined;
3
35
  onlyDirectories?: boolean | undefined;
@@ -10,3 +42,4 @@ export declare function withTmpDir<T>(prefix: string, fn: (tmpDir: string) => Pr
10
42
  // /tmp -> /private/tmp); falls back to a plain resolve so a not-yet-existing
11
43
  // path still gets a usable absolute value instead of throwing.
12
44
  export declare function realpathOrResolved(target: string): Promise<string>;
45
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { graphql as OctokitGraphql } from '@octokit/graphql';
2
2
  import { Octokit } from '@octokit/rest';
3
+ import type { JsonContent } from './fs.mts';
3
4
  import type { components } from '@octokit/openapi-types';
4
- import type { JsonContent } from '@socketsecurity/registry/lib/fs';
5
5
  export type Pr = components['schemas']['pull-request'];
6
6
  export declare function writeCache(key: string, data: JsonContent): Promise<void>;
7
7
  export declare function cacheFetch<T>(key: string, fetcher: () => Promise<T>, ttlMs?: number | undefined): Promise<T>;
@@ -0,0 +1 @@
1
+ export declare const defaultIgnore: readonly string[];
@@ -0,0 +1,51 @@
1
+ import { Console } from 'node:console';
2
+ import { Writable } from 'node:stream';
3
+ // These getters defer reading the shared bundle until a symbol is actually
4
+ // requested, avoiding partial exports during the bundled utils/logger cycle.
5
+ export declare const LOG_SYMBOLS: Readonly<{
6
+ readonly fail: string;
7
+ readonly info: string;
8
+ readonly success: string;
9
+ readonly warn: string;
10
+ }>;
11
+ export declare class Logger extends Console {
12
+ #private;
13
+ static LOG_SYMBOLS: Readonly<{
14
+ readonly fail: string;
15
+ readonly info: string;
16
+ readonly success: string;
17
+ readonly warn: string;
18
+ }>;
19
+ constructor(stdout?: Writable, stderr?: Writable, ignoreErrors?: boolean);
20
+ get logCallCount(): number;
21
+ assert(value: unknown, ...message: unknown[]): this;
22
+ clear(): this;
23
+ count(label?: string): this;
24
+ countReset(label?: string): this;
25
+ debug(...args: unknown[]): this;
26
+ dir(item?: unknown, options?: object): this;
27
+ dirxml(...data: unknown[]): this;
28
+ error(...args: unknown[]): this;
29
+ info(...args: unknown[]): this;
30
+ log(...args: unknown[]): this;
31
+ table(tabularData?: unknown, properties?: string[]): this;
32
+ time(label?: string): this;
33
+ timeEnd(label?: string): this;
34
+ timeLog(label?: string, ...data: unknown[]): this;
35
+ trace(...args: unknown[]): this;
36
+ warn(...args: unknown[]): this;
37
+ fail(...args: unknown[]): this;
38
+ success(...args: unknown[]): this;
39
+ indent(spaces?: number): this;
40
+ dedent(spaces?: number): this;
41
+ resetIndent(): this;
42
+ logNewline(): this;
43
+ errorNewline(): this;
44
+ group(...label: unknown[]): this;
45
+ groupCollapsed(...label: unknown[]): this;
46
+ groupEnd(): this;
47
+ createTask(name: string): {
48
+ run<T>(fn: () => T): T;
49
+ };
50
+ }
51
+ export declare const logger: Logger;
@@ -1,2 +1,13 @@
1
+ export type Remap<T> = {
2
+ [K in keyof T]: T[K];
3
+ } extends infer O ? {
4
+ [K in keyof O]: O[K];
5
+ } : never;
6
+ export declare function getOwn(obj: any, propKey: string | symbol): any;
7
+ export declare function hasKeys(obj: any): boolean;
8
+ export declare function hasOwn(obj: any, propKey: string | symbol): boolean;
9
+ export declare function isObject(value: any): value is object;
10
+ export declare function isRecord(value: unknown): value is Record<PropertyKey, unknown>;
11
+ export declare function toSortedObject<T extends Record<string, any>>(obj: T): Record<PropertyKey, T[keyof T]>;
1
12
  export declare function createEnum<const T extends Record<string, any>>(obj: T): Readonly<T>;
2
13
  export declare function pick<T extends Record<string, any>, K extends keyof T>(input: T, keys: K[] | readonly K[]): Pick<T, K>;
@@ -1,7 +1,7 @@
1
- import { Logger } from '@socketsecurity/registry/lib/logger';
1
+ import { Logger } from './logger.mts';
2
2
  import type { CResult } from '../types.mts';
3
- import type { Remap } from '@socketsecurity/registry/lib/objects';
4
- import type { EditablePackageJson } from '@socketsecurity/registry/lib/packages';
3
+ import type { Remap } from './objects.mts';
4
+ import type { EditablePackageJson } from './packages.mts';
5
5
  import type { SemVer } from 'semver';
6
6
  export declare const AGENTS: readonly ["bun", "npm", "pnpm", "yarn/berry", "yarn/classic", "vlt"];
7
7
  export type Agent = (typeof AGENTS)[number];
@@ -0,0 +1,65 @@
1
+ export type PackageJson = {
2
+ name?: string | undefined;
3
+ version?: string | undefined;
4
+ dependencies?: Record<string, string> | undefined;
5
+ devDependencies?: Record<string, string> | undefined;
6
+ optionalDependencies?: Record<string, string> | undefined;
7
+ peerDependencies?: Record<string, string> | undefined;
8
+ workspaces?: unknown;
9
+ [key: string]: unknown;
10
+ };
11
+ /** Structural surface consumed from @npmcli/package-json's editable instance. */
12
+ export type EditablePackageJson = {
13
+ content: PackageJson;
14
+ update(data: Partial<PackageJson>): EditablePackageJson;
15
+ fromJSON(data: string | PackageJson): EditablePackageJson;
16
+ willSave(options?: {
17
+ ignoreWhitespace?: boolean;
18
+ sort?: boolean;
19
+ }): boolean;
20
+ save(options?: {
21
+ ignoreWhitespace?: boolean;
22
+ sort?: boolean;
23
+ }): Promise<boolean>;
24
+ saveSync(options?: {
25
+ ignoreWhitespace?: boolean;
26
+ sort?: boolean;
27
+ }): boolean;
28
+ };
29
+ export type ToEditablePackageJsonOptions = {
30
+ path: string;
31
+ };
32
+ type ReadOptions = {
33
+ throws?: boolean | undefined;
34
+ editable?: boolean | undefined;
35
+ };
36
+ export declare function readPackageJson(filepath: string, options: ReadOptions & {
37
+ editable: true;
38
+ }): Promise<EditablePackageJson | undefined>;
39
+ export declare function readPackageJson(filepath: string, options?: ReadOptions & {
40
+ editable?: false | undefined;
41
+ }): Promise<PackageJson | null>;
42
+ export declare function toEditablePackageJson(content: PackageJson, options: ToEditablePackageJsonOptions): Promise<EditablePackageJson>;
43
+ export declare function resolvePackageName(purlObj: {
44
+ name: string;
45
+ namespace?: string | undefined;
46
+ }, delimiter?: string): string;
47
+ export type RegistryManifestData = {
48
+ name: string;
49
+ package: string;
50
+ version: string;
51
+ [key: string]: unknown;
52
+ };
53
+ export type RegistryManifestEntry = readonly [
54
+ purl: string,
55
+ data: RegistryManifestData
56
+ ];
57
+ /**
58
+ * Returns Socket registry metadata for an ecosystem or package name.
59
+ *
60
+ * Refresh the data by reviewing changes to the upstream manifest.
61
+ */
62
+ export declare function getManifestData(ecosystem: string): readonly RegistryManifestEntry[] | undefined;
63
+ export declare function getManifestData(ecosystem: string, sockRegPkgName: string): RegistryManifestData | undefined;
64
+ export declare function getManifestData(): Record<string, readonly RegistryManifestEntry[]>;
65
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Buffer } from 'node:buffer';
2
+ export declare function isPath(pathLike: unknown): boolean;
3
+ export declare function normalizePath(pathLike: string | Buffer | URL): string;
@@ -0,0 +1,23 @@
1
+ /** Execute callbacks in bounded, sequential chunks. */
2
+ /* eslint-disable no-await-in-loop -- Sequential promise helpers guarantee ordered settlement. */
3
+ export declare function pEach<T>(values: readonly T[], callback: (value: T) => unknown | Promise<unknown>, options?: {
4
+ concurrency?: number | undefined;
5
+ }): Promise<void>;
6
+ export type RetryOptions = {
7
+ args?: readonly unknown[];
8
+ backoffFactor?: number;
9
+ baseDelayMs?: number;
10
+ jitter?: boolean;
11
+ maxDelayMs?: number;
12
+ onRetry?: (attempt: number, error: unknown, delayMs: number) => unknown;
13
+ onRetryCancelOnFalse?: boolean;
14
+ onRetryRethrow?: boolean;
15
+ retries?: number;
16
+ signal?: AbortSignal;
17
+ };
18
+ export declare function pRetry<T>(callback: (...args: any[]) => Promise<T> | T, options?: RetryOptions & {
19
+ signal?: undefined;
20
+ }): Promise<T>;
21
+ export declare function pRetry<T>(callback: (...args: any[]) => Promise<T> | T, options: RetryOptions & {
22
+ signal: AbortSignal;
23
+ }): Promise<T | undefined>;
@@ -0,0 +1,25 @@
1
+ import { Separator as InquirerSeparator } from '@inquirer/select';
2
+ import spinner from './spinner.mts';
3
+ type PromptContext = {
4
+ signal?: AbortSignal;
5
+ spinner?: typeof spinner;
6
+ };
7
+ type PromptSeparator = InstanceType<typeof InquirerSeparator>;
8
+ type PromptOptions<Value = unknown> = {
9
+ message?: string;
10
+ choices?: ReadonlyArray<string | Choice<Value> | PromptSeparator>;
11
+ [key: string]: unknown;
12
+ };
13
+ export type Choice<Value> = {
14
+ value: Value;
15
+ disabled?: boolean | string;
16
+ description?: string;
17
+ name?: string;
18
+ short?: string;
19
+ type?: never;
20
+ };
21
+ export declare const confirm: (config: PromptOptions<boolean>, context?: PromptContext | undefined) => Promise<boolean | undefined>;
22
+ export declare const input: (config: PromptOptions<string>, context?: PromptContext | undefined) => Promise<string | undefined>;
23
+ export declare const password: (config: PromptOptions<string>, context?: PromptContext | undefined) => Promise<string | undefined>;
24
+ export declare const select: <Value = string>(config: PromptOptions<Value>, context?: PromptContext | undefined) => Promise<Value | undefined>;
25
+ export { InquirerSeparator as Separator };
@@ -22,12 +22,15 @@
22
22
  *
23
23
  * See: https://github.com/package-url/purl-spec
24
24
  */
25
- import { PackageURL, type PurlQualifiers } from '@socketregistry/packageurl-js';
25
+ import { PackageURL } from '@socketregistry/packageurl-js';
26
26
  import type { SocketArtifact } from './alert/artifact.mts';
27
27
  import type { PURL_Type } from './ecosystem.mts';
28
+ export { PackageURL } from '@socketregistry/packageurl-js';
28
29
  export type PurlObject<T> = T & {
30
+ name: string;
29
31
  type: PURL_Type;
30
32
  };
33
+ export type PurlQualifiers = Record<string, string>;
31
34
  export type PurlLike = string | PackageURL | SocketArtifact;
32
35
  export type CreatePurlObjectOptions = {
33
36
  type?: string | undefined;
@@ -1,8 +1,8 @@
1
1
  import { ALERT_SEVERITY } from './alert/severity.mts';
2
2
  import type { ALERT_ACTION, CompactSocketArtifact, CompactSocketArtifactAlert } from './alert/artifact.mts';
3
3
  import type { PURL_Type } from './ecosystem.mts';
4
+ import type { Spinner } from './spinner.mts';
4
5
  import type { SocketYml } from '@socketsecurity/config';
5
- import type { Spinner } from '@socketsecurity/registry/lib/spinner';
6
6
  export declare const ALERT_SEVERITY_COLOR: Readonly<{
7
7
  readonly critical: "magenta";
8
8
  readonly high: "red";
@@ -1,6 +1,6 @@
1
1
  import type { SocketArtifact } from './alert/artifact.mts';
2
2
  import type { PURL_Type } from './ecosystem.mts';
3
- import type { PackageURL } from '@socketregistry/packageurl-js';
3
+ import type { PackageURL } from './purl.mts';
4
4
  export declare function getPkgFullNameFromPurl(purl: string | PackageURL | SocketArtifact): string;
5
5
  export declare function getSocketDevAlertUrl(alertType: string): string;
6
6
  export declare function getSocketDevPackageOverviewUrlFromPurl(purl: string | PackageURL | SocketArtifact): string;
@@ -0,0 +1 @@
1
+ export declare function naturalCompare(a: string, b: string): number;
@@ -0,0 +1,3 @@
1
+ import childProcess from 'node:child_process';
2
+ import type { SpawnSyncOptions } from './spawn.mts';
3
+ export declare function spawnSync(command: string, args?: string[] | readonly string[], options?: SpawnSyncOptions): childProcess.SpawnSyncReturns<string | Buffer>;
@@ -0,0 +1,67 @@
1
+ import Stream from 'node:stream';
2
+ import { spawnSync } from './spawn-sync.mts';
3
+ import type { Remap } from './objects.mts';
4
+ import type { Spinner } from './spinner.mts';
5
+ import type { SpawnOptions as BaseSpawnOptions, ChildProcess, IOType, StdioOptions } from 'node:child_process';
6
+ export type SpawnError = {
7
+ args: string[] | readonly string[];
8
+ cmd: string;
9
+ code: number;
10
+ name: 'Error';
11
+ message: 'command failed';
12
+ signal: AbortSignal | null;
13
+ stack: string;
14
+ stderr: string | Buffer;
15
+ stdout: string | Buffer;
16
+ };
17
+ export type SpawnErrorWithOutputString = Omit<SpawnError, 'stderr' | 'stdout'> & {
18
+ stdout: string;
19
+ stderr: string;
20
+ };
21
+ export type SpawnErrorWithOutputBuffer = Omit<SpawnError, 'stderr' | 'stdout'> & {
22
+ stdout: Buffer;
23
+ stderr: Buffer;
24
+ };
25
+ export type SpawnExtra = Record<any, any>;
26
+ export type SpawnStdioResult<Output = string, Extra = undefined> = {
27
+ cmd: string;
28
+ args: string[] | readonly string[];
29
+ code: number;
30
+ signal: AbortSignal | null;
31
+ stdout: Output;
32
+ stderr: Output;
33
+ } & Extra;
34
+ export type SpawnResult<Output = string, Extra = undefined> = Promise<SpawnStdioResult<Output, Extra>> & {
35
+ process: ChildProcess;
36
+ stdin: Stream.Writable | null;
37
+ };
38
+ export type SpawnOptions = Remap<BaseSpawnOptions & {
39
+ spinner?: Spinner | undefined;
40
+ stdioString?: boolean | undefined;
41
+ stripAnsi?: boolean | undefined;
42
+ }>;
43
+ export type SpawnSyncOptions = Omit<SpawnOptions, 'spinner'> & {
44
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
45
+ };
46
+ export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
47
+ encoding: BufferEncoding;
48
+ }
49
+ export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
50
+ encoding?: 'buffer' | null | undefined;
51
+ }
52
+ export interface SpawnSyncReturns<T> {
53
+ pid: number;
54
+ output: Array<T | null>;
55
+ stdout: T;
56
+ stderr: T;
57
+ status: number | null;
58
+ signal: NodeJS.Signals | null;
59
+ error?: Error | undefined;
60
+ }
61
+ export type StdioType = IOType | 'ipc' | Array<IOType | 'ipc'>;
62
+ declare function isSpawnError(value: unknown): value is SpawnError;
63
+ declare function isStdioType(stdio: StdioOptions | undefined, type: StdioType): boolean;
64
+ declare function spawn<O extends SpawnOptions = SpawnOptions>(cmd: string, args: string[] | readonly string[], options?: O, extra?: SpawnExtra): SpawnResult<O extends {
65
+ stdioString: false;
66
+ } ? Buffer : string, typeof extra>;
67
+ export { isSpawnError, isStdioType, spawn, spawnSync };
@@ -1,4 +1,4 @@
1
- import type { PackageURL } from '@socketregistry/packageurl-js';
1
+ import type { PackageURL } from './purl.mts';
2
2
  export declare function idToNpmPurl(id: string): string;
3
3
  export declare function idToPurl(id: string, type: string): string;
4
4
  export declare function resolvePackageVersion(purlObj: PackageURL): string;
@@ -0,0 +1,46 @@
1
+ export type SpinnerStyle = {
2
+ frames: string[];
3
+ interval?: number | undefined;
4
+ };
5
+ export type SpinnerOptions = {
6
+ color?: string | undefined;
7
+ spinner?: SpinnerStyle | undefined;
8
+ signal?: AbortSignal | undefined;
9
+ stream?: NodeJS.WriteStream | undefined;
10
+ text?: string | undefined;
11
+ };
12
+ export declare function getCliSpinners(styleName?: string): SpinnerStyle | undefined;
13
+ export declare class Spinner {
14
+ #private;
15
+ color: string;
16
+ text: string;
17
+ spinner: SpinnerStyle;
18
+ constructor(options?: SpinnerOptions);
19
+ get isSpinning(): boolean;
20
+ getText(): string;
21
+ setText(text?: string): this;
22
+ clear(): this;
23
+ indent(spaces?: number): this;
24
+ dedent(spaces?: number): this;
25
+ resetIndent(): this;
26
+ start(text?: string): this;
27
+ stop(finalText?: string): this;
28
+ info(text?: string): this;
29
+ infoAndStop(text?: string): this;
30
+ success(text?: string): this;
31
+ successAndStop(text?: string): this;
32
+ fail(text?: string): this;
33
+ failAndStop(text?: string): this;
34
+ error(text?: string): this;
35
+ errorAndStop(text?: string): this;
36
+ warn(text?: string): this;
37
+ warnAndStop(text?: string): this;
38
+ warning(text?: string): this;
39
+ warningAndStop(text?: string): this;
40
+ log(text?: string): this;
41
+ logAndStop(text?: string): this;
42
+ debug(text?: string): this;
43
+ debugAndStop(text?: string): this;
44
+ }
45
+ declare const defaultSpinner: Spinner;
46
+ export default defaultSpinner;
@@ -0,0 +1,3 @@
1
+ export declare function transform<T, R>(iterable: AsyncIterable<T> | NodeJS.ReadableStream, mapper: (value: T) => Promise<R> | R, options?: {
2
+ concurrency?: number;
3
+ }): AsyncGenerator<R>;
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * Key Functions:
6
6
  * - camelToKebab: Convert camelCase to kebab-case
7
+ * - indentString, isNonEmptyString, stripAnsi, stripBom, trimNewlines: string helpers
7
8
  *
8
9
  * Usage:
9
10
  * - Command name transformations
@@ -11,3 +12,8 @@
11
12
  * - Consistent string formatting
12
13
  */
13
14
  export declare function camelToKebab(str: string): string;
15
+ export declare function indentString(str: string, count?: number): string;
16
+ export declare function isNonEmptyString(value: unknown): value is string;
17
+ export declare function stripAnsi(str: string): string;
18
+ export declare function stripBom(str: string): string;
19
+ export declare function trimNewlines(str: string): string;
@@ -0,0 +1,2 @@
1
+ export declare function parseUrl(value: string | URL): URL | null;
2
+ export declare function isUrl(value: unknown): value is string | URL;
@@ -0,0 +1 @@
1
+ export declare function pluralize(word: string, count?: number): string;