@socketsecurity/cli-with-sentry 1.16.0 → 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 +19 -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 +2120 -4305
  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 -6
  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 +4481 -806
  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 +43 -36
  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
@@ -1,453 +0,0 @@
1
- 'use strict'
2
-
3
- const require$$0$1 = require('process')
4
- const require$$0 = require('tty')
5
- const require$$2 = require('util')
6
-
7
- let yoctocolorsCjs
8
- let hasRequiredYoctocolorsCjs
9
- function requireYoctocolorsCjs() {
10
- if (hasRequiredYoctocolorsCjs) {
11
- return yoctocolorsCjs
12
- }
13
- hasRequiredYoctocolorsCjs = 1
14
- const tty = require$$0 // eslint-disable-line unicorn/prefer-module
15
-
16
- // eslint-disable-next-line no-warning-comments
17
- // TODO: Use a better method when it's added to Node.js (https://github.com/nodejs/node/pull/40240)
18
- // Lots of optionals here to support Deno.
19
- const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false
20
- const format = (open, close) => {
21
- if (!hasColors) {
22
- return input => input
23
- }
24
- const openCode = `\u001B[${open}m`
25
- const closeCode = `\u001B[${close}m`
26
- return input => {
27
- const string = input + '' // eslint-disable-line no-implicit-coercion -- This is faster.
28
- let index = string.indexOf(closeCode)
29
- if (index === -1) {
30
- // Note: Intentionally not using string interpolation for performance reasons.
31
- return openCode + string + closeCode
32
- }
33
-
34
- // Handle nested colors.
35
-
36
- // We could have done this, but it's too slow (as of Node.js 22).
37
- // return openCode + string.replaceAll(closeCode, openCode) + closeCode;
38
-
39
- let result = openCode
40
- let lastIndex = 0
41
-
42
- // SGR 22 resets both bold (1) and dim (2). When we encounter a nested
43
- // close for styles that use 22, we need to re-open the outer style.
44
- const reopenOnNestedClose = close === 22
45
- const replaceCode = (reopenOnNestedClose ? closeCode : '') + openCode
46
- while (index !== -1) {
47
- result += string.slice(lastIndex, index) + replaceCode
48
- lastIndex = index + closeCode.length
49
- index = string.indexOf(closeCode, lastIndex)
50
- }
51
- result += string.slice(lastIndex) + closeCode
52
- return result
53
- }
54
- }
55
- const colors = {}
56
- colors.reset = format(0, 0)
57
- colors.bold = format(1, 22)
58
- colors.dim = format(2, 22)
59
- colors.italic = format(3, 23)
60
- colors.underline = format(4, 24)
61
- colors.overline = format(53, 55)
62
- colors.inverse = format(7, 27)
63
- colors.hidden = format(8, 28)
64
- colors.strikethrough = format(9, 29)
65
- colors.black = format(30, 39)
66
- colors.red = format(31, 39)
67
- colors.green = format(32, 39)
68
- colors.yellow = format(33, 39)
69
- colors.blue = format(34, 39)
70
- colors.magenta = format(35, 39)
71
- colors.cyan = format(36, 39)
72
- colors.white = format(37, 39)
73
- colors.gray = format(90, 39)
74
- colors.bgBlack = format(40, 49)
75
- colors.bgRed = format(41, 49)
76
- colors.bgGreen = format(42, 49)
77
- colors.bgYellow = format(43, 49)
78
- colors.bgBlue = format(44, 49)
79
- colors.bgMagenta = format(45, 49)
80
- colors.bgCyan = format(46, 49)
81
- colors.bgWhite = format(47, 49)
82
- colors.bgGray = format(100, 49)
83
- colors.redBright = format(91, 39)
84
- colors.greenBright = format(92, 39)
85
- colors.yellowBright = format(93, 39)
86
- colors.blueBright = format(94, 39)
87
- colors.magentaBright = format(95, 39)
88
- colors.cyanBright = format(96, 39)
89
- colors.whiteBright = format(97, 39)
90
- colors.bgRedBright = format(101, 49)
91
- colors.bgGreenBright = format(102, 49)
92
- colors.bgYellowBright = format(103, 49)
93
- colors.bgBlueBright = format(104, 49)
94
- colors.bgMagentaBright = format(105, 49)
95
- colors.bgCyanBright = format(106, 49)
96
- colors.bgWhiteBright = format(107, 49)
97
- yoctocolorsCjs = colors // eslint-disable-line unicorn/prefer-module
98
- return yoctocolorsCjs
99
- }
100
-
101
- let yoctoSpinner
102
- let hasRequiredYoctoSpinner
103
- function requireYoctoSpinner() {
104
- if (hasRequiredYoctoSpinner) {
105
- return yoctoSpinner
106
- }
107
- hasRequiredYoctoSpinner = 1
108
- const { defineProperty: ObjectDefineProperty } = Object
109
- const defaultTtyColumns = 80
110
- let _defaultSpinner
111
- function getDefaultSpinner() {
112
- if (_defaultSpinner === undefined) {
113
- _defaultSpinner = {
114
- frames: isUnicodeSupported()
115
- ? ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
116
- : ['-', '\\', '|', '/'],
117
- interval: 80
118
- }
119
- }
120
- return _defaultSpinner
121
- }
122
- let _logSymbols
123
- function getLogSymbols() {
124
- if (_logSymbols === undefined) {
125
- const supported = isUnicodeSupported()
126
- const colors = getYoctocolors()
127
- _logSymbols = {
128
- error: colors.red(supported ? '✖' : '×'),
129
- info: colors.blue(supported ? 'ℹ' : 'i'),
130
- success: colors.green(supported ? '✔' : '√'),
131
- warning: colors.yellow(supported ? '⚠' : '‼')
132
- }
133
- }
134
- return _logSymbols
135
- }
136
- let _process
137
- function getProcess() {
138
- if (_process === undefined) {
139
- // Use non-'node:' prefixed require to avoid Webpack errors.
140
- // eslint-disable-next-line n/prefer-node-protocol
141
- _process = require$$0$1
142
- }
143
- return _process
144
- }
145
- let _yoctocolors
146
- function getYoctocolors() {
147
- if (_yoctocolors === undefined) {
148
- _yoctocolors = {
149
- .../*@__PURE__*/ /*@__PURE__*/ requireYoctocolorsCjs()
150
- }
151
- }
152
- return _yoctocolors
153
- }
154
- let _processInteractive
155
- function isProcessInteractive() {
156
- if (_processInteractive === undefined) {
157
- const { env } = getProcess()
158
- _processInteractive = env.TERM !== 'dumb' && !('CI' in env)
159
- }
160
- return _processInteractive
161
- }
162
- let _unicodeSupported
163
- function isUnicodeSupported() {
164
- if (_unicodeSupported === undefined) {
165
- const process = getProcess()
166
- if (process.platform !== 'win32') {
167
- // Linux console (kernel).
168
- _unicodeSupported = process.env.TERM !== 'linux'
169
- return _unicodeSupported
170
- }
171
- const { env } = process
172
- if (
173
- // Windows Terminal.
174
- env.WT_SESSION ||
175
- // Terminus (<0.2.27).
176
- env.TERMINUS_SUBLIME ||
177
- // ConEmu and cmder.
178
- env.ConEmuTask === '{cmd::Cmder}'
179
- ) {
180
- _unicodeSupported = true
181
- return _unicodeSupported
182
- }
183
- const { TERM, TERM_PROGRAM } = env
184
- _unicodeSupported =
185
- TERM_PROGRAM === 'Terminus-Sublime' ||
186
- TERM_PROGRAM === 'vscode' ||
187
- TERM === 'xterm-256color' ||
188
- TERM === 'alacritty' ||
189
- TERM === 'rxvt-unicode' ||
190
- TERM === 'rxvt-unicode-256color' ||
191
- env.TERMINAL_EMULATOR === 'JetBrains-JediTerm'
192
- }
193
- return _unicodeSupported
194
- }
195
- let _stripVTControlCharacters
196
- function stripVTControlCharacters(string) {
197
- if (_stripVTControlCharacters === undefined) {
198
- // Use non-'node:' prefixed require to avoid Webpack errors.
199
- // eslint-disable-next-line n/prefer-node-protocol
200
- const nodeUtil = require$$2
201
- _stripVTControlCharacters = nodeUtil.stripVTControlCharacters
202
- }
203
- return _stripVTControlCharacters(string)
204
- }
205
- function getFrame(spinner, index) {
206
- const { frames } = spinner
207
- const length = frames?.length ?? 0
208
- return index > -1 && index < length ? frames[index].trim() : ''
209
- }
210
- function getFrameCount(spinner) {
211
- const { frames } = spinner
212
- const length = frames?.length ?? 0
213
- return length < 1 ? 1 : length
214
- }
215
- function normalizeText(value) {
216
- return typeof value === 'string' ? value.trimStart() : ''
217
- }
218
- class YoctoSpinner {
219
- #color
220
- #currentFrame = -1
221
- #exitHandlerBound
222
- #indention = ''
223
- #isInteractive
224
- #isSpinning = false
225
- #lastSpinnerFrameTime = 0
226
- #lines = 0
227
- #spinner
228
- #stream
229
- #text
230
- #timer
231
- static spinners = {
232
- get default() {
233
- return getDefaultSpinner()
234
- },
235
- set default(spinner) {
236
- ObjectDefineProperty(this, 'default', {
237
- __proto__: null,
238
- configurable: true,
239
- enumerable: true,
240
- value: spinner,
241
- writable: true
242
- })
243
- },
244
- ci: {
245
- frames: [''],
246
- // The delay argument is converted to a signed 32-bit integer. This effectively
247
- // limits delay to 2147483647 ms, roughly 24.8 days, since it's specified as a
248
- // signed integer in the IDL.
249
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval?utm_source=chatgpt.com#return_value
250
- interval: 2147483647
251
- }
252
- }
253
- constructor(options = {}) {
254
- const opts = {
255
- __proto__: null,
256
- ...options
257
- }
258
- const stream = opts.stream ?? getProcess().stderr
259
- this.#spinner =
260
- opts.spinner ?? YoctoSpinner.spinners.default ?? getDefaultSpinner()
261
- this.#text = normalizeText(options.text)
262
- this.#stream = stream ?? process.stderr
263
- this.#color = options.color ?? 'cyan'
264
- this.#isInteractive = !!stream.isTTY && isProcessInteractive()
265
- this.#exitHandlerBound = this.#exitHandler.bind(this)
266
- }
267
- #exitHandler(signal) {
268
- if (this.isSpinning) {
269
- this.stop()
270
- }
271
- // SIGINT: 128 + 2
272
- // SIGTERM: 128 + 15
273
- const exitCode =
274
- signal === 'SIGINT' ? 130 : signal === 'SIGTERM' ? 143 : 1
275
- // eslint-disable-next-line n/no-process-exit
276
- process.exit(exitCode)
277
- }
278
- #hideCursor() {
279
- if (this.#isInteractive) {
280
- this.#write('\u001B[?25l')
281
- }
282
- }
283
- #lineCount(text) {
284
- const width = this.#stream.columns ?? defaultTtyColumns
285
- const lines = stripVTControlCharacters(text).split('\n')
286
- let lineCount = 0
287
- for (const line of lines) {
288
- lineCount += Math.max(1, Math.ceil(line.length / width))
289
- }
290
- return lineCount
291
- }
292
- #render() {
293
- // Ensure we only update the spinner frame at the wanted interval,
294
- // even if the frame method is called more often.
295
- const now = Date.now()
296
- if (
297
- this.#currentFrame === -1 ||
298
- now - this.#lastSpinnerFrameTime >= this.#spinner.interval
299
- ) {
300
- this.#currentFrame = ++this.#currentFrame % getFrameCount(this.#spinner)
301
- this.#lastSpinnerFrameTime = now
302
- }
303
- const colors = getYoctocolors()
304
- const applyColor = colors[this.#color] ?? colors.cyan
305
- const frame = getFrame(this.#spinner, this.#currentFrame)
306
- let string = `${frame ? `${applyColor(frame)} ` : ''}${this.#text}`
307
- if (string) {
308
- if (this.#indention.length) {
309
- string = `${this.#indention}${string}`
310
- }
311
- if (!this.#isInteractive) {
312
- string += '\n'
313
- }
314
- }
315
- if (this.#isInteractive) {
316
- this.clear()
317
- }
318
- if (string) {
319
- this.#write(string)
320
- }
321
- if (this.#isInteractive) {
322
- this.#lines = this.#lineCount(string)
323
- }
324
- }
325
- #showCursor() {
326
- if (this.#isInteractive) {
327
- this.#write('\u001B[?25h')
328
- }
329
- }
330
- #subscribeToProcessEvents() {
331
- process.once('SIGINT', this.#exitHandlerBound)
332
- process.once('SIGTERM', this.#exitHandlerBound)
333
- }
334
- #symbolStop(symbolType, text) {
335
- const symbols = getLogSymbols()
336
- return this.stop(`${symbols[symbolType]} ${text ?? this.#text}`)
337
- }
338
- #write(text) {
339
- this.#stream.write(text)
340
- }
341
- #unsubscribeFromProcessEvents() {
342
- process.off('SIGINT', this.#exitHandlerBound)
343
- process.off('SIGTERM', this.#exitHandlerBound)
344
- }
345
- get color() {
346
- return this.#color
347
- }
348
- set color(value) {
349
- this.#color = value
350
- this.#render()
351
- }
352
- get isSpinning() {
353
- return this.#isSpinning
354
- }
355
- get spinner() {
356
- return this.#spinner
357
- }
358
- set spinner(spinner) {
359
- this.#spinner = spinner
360
- }
361
- get text() {
362
- return this.#text
363
- }
364
- set text(value) {
365
- this.#text = normalizeText(value)
366
- this.#render()
367
- }
368
- clear() {
369
- if (!this.#isInteractive) {
370
- return this
371
- }
372
- this.#stream.cursorTo(0)
373
- for (let index = 0; index < this.#lines; index += 1) {
374
- if (index > 0) {
375
- this.#stream.moveCursor(0, -1)
376
- }
377
- this.#stream.clearLine(1)
378
- }
379
- this.#lines = 0
380
- return this
381
- }
382
- dedent(spaces = 2) {
383
- this.#indention = this.#indention.slice(0, -spaces)
384
- return this
385
- }
386
- error(text) {
387
- return this.#symbolStop('error', text)
388
- }
389
- indent(spaces = 2) {
390
- this.#indention += ' '.repeat(spaces)
391
- return this
392
- }
393
- info(text) {
394
- return this.#symbolStop('info', text)
395
- }
396
- resetIndent() {
397
- this.#indention = ''
398
- return this
399
- }
400
- start(text) {
401
- const normalized = normalizeText(text)
402
- if (normalized) {
403
- this.#text = normalized
404
- }
405
- if (this.isSpinning) {
406
- return this
407
- }
408
- this.#isSpinning = true
409
- this.#hideCursor()
410
- this.#render()
411
- this.#subscribeToProcessEvents()
412
-
413
- // Only start the timer in interactive mode
414
- if (this.#isInteractive) {
415
- this.#timer = setInterval(() => {
416
- this.#render()
417
- }, this.#spinner.interval)
418
- }
419
- return this
420
- }
421
- stop(finalText) {
422
- if (!this.isSpinning) {
423
- return this
424
- }
425
- this.#isSpinning = false
426
- if (this.#timer) {
427
- clearInterval(this.#timer)
428
- this.#timer = undefined
429
- }
430
- this.#showCursor()
431
- this.clear()
432
- this.#unsubscribeFromProcessEvents()
433
- if (finalText) {
434
- this.#write(`${this.#indention}${finalText}\n`)
435
- }
436
- return this
437
- }
438
- success(text) {
439
- return this.#symbolStop('success', text)
440
- }
441
- warning(text) {
442
- return this.#symbolStop('warning', text)
443
- }
444
- }
445
- yoctoSpinner = function yoctoSpinner(options) {
446
- return new YoctoSpinner(options)
447
- }
448
- return yoctoSpinner
449
- }
450
-
451
- const yoctoSpinnerExports = /*@__PURE__*/ requireYoctoSpinner()
452
-
453
- module.exports = yoctoSpinnerExports