@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,326 +0,0 @@
1
- 'use strict'
2
-
3
- function getIterator(iterable) {
4
- if (typeof iterable.next === 'function') {
5
- return iterable
6
- }
7
- if (typeof iterable[Symbol.iterator] === 'function') {
8
- return iterable[Symbol.iterator]()
9
- }
10
- if (typeof iterable[Symbol.asyncIterator] === 'function') {
11
- return iterable[Symbol.asyncIterator]()
12
- }
13
- throw new TypeError(
14
- '"values" does not to conform to any of the iterator or iterable protocols'
15
- )
16
- }
17
- function defer() {
18
- let reject
19
- let resolve
20
- const promise = new Promise((resolveFunc, rejectFunc) => {
21
- resolve = resolveFunc
22
- reject = rejectFunc
23
- })
24
- return {
25
- promise,
26
- reject,
27
- resolve
28
- }
29
- }
30
- function _buffer(size, iterable) {
31
- const iterator = getIterator(iterable)
32
- const resultQueue = []
33
- const readQueue = []
34
- let reading = false
35
- let ended = false
36
- function fulfillReadQueue() {
37
- while (readQueue.length > 0 && resultQueue.length > 0) {
38
- const readDeferred = readQueue.shift()
39
- const { error, value } = resultQueue.shift()
40
- if (error) {
41
- readDeferred.reject(error)
42
- } else {
43
- readDeferred.resolve({
44
- done: false,
45
- value
46
- })
47
- }
48
- }
49
- while (readQueue.length > 0 && ended) {
50
- const { resolve } = readQueue.shift()
51
- resolve({
52
- done: true,
53
- value: undefined
54
- })
55
- }
56
- }
57
- async function fillQueue() {
58
- if (ended) {
59
- return
60
- }
61
- if (reading) {
62
- return
63
- }
64
- if (resultQueue.length >= size) {
65
- return
66
- }
67
- reading = true
68
- try {
69
- const { done, value } = await iterator.next()
70
- if (done) {
71
- ended = true
72
- } else {
73
- resultQueue.push({
74
- value
75
- })
76
- }
77
- } catch (error) {
78
- ended = true
79
- resultQueue.push({
80
- error
81
- })
82
- }
83
- fulfillReadQueue()
84
- reading = false
85
- fillQueue()
86
- }
87
- async function next() {
88
- if (resultQueue.length > 0) {
89
- const { error, value } = resultQueue.shift()
90
- if (error) {
91
- throw error
92
- }
93
- fillQueue()
94
- return {
95
- done: false,
96
- value
97
- }
98
- }
99
- if (ended) {
100
- return {
101
- done: true,
102
- value: undefined
103
- } // stupid ts
104
- }
105
- const deferred = defer()
106
- readQueue.push(deferred)
107
- fillQueue()
108
- return deferred.promise
109
- }
110
- const asyncIterableIterator = {
111
- next,
112
- [Symbol.asyncIterator]: () => asyncIterableIterator
113
- }
114
- return asyncIterableIterator
115
- }
116
- function* syncBuffer(size, iterable) {
117
- const valueQueue = []
118
- let e
119
- try {
120
- for (const value of iterable) {
121
- valueQueue.push(value)
122
- if (valueQueue.length <= size) {
123
- continue
124
- }
125
- yield valueQueue.shift()
126
- }
127
- } catch (error) {
128
- e = error
129
- }
130
- for (const value of valueQueue) {
131
- yield value
132
- }
133
- if (e) {
134
- throw e
135
- }
136
- }
137
- function buffer(size, iterable) {
138
- if (iterable === undefined) {
139
- return curriedIterable => buffer(size, curriedIterable)
140
- }
141
- if (size === 0) {
142
- return iterable
143
- }
144
- if (iterable[Symbol.asyncIterator]) {
145
- return _buffer(size, iterable)
146
- }
147
- return syncBuffer(size, iterable)
148
- }
149
- async function* _map(func, iterable) {
150
- for await (const val of iterable) {
151
- yield await func(val)
152
- }
153
- }
154
- function map(func, iterable) {
155
- if (iterable === undefined) {
156
- return curriedIterable => _map(func, curriedIterable)
157
- }
158
- return _map(func, iterable)
159
- }
160
- function pipeline(firstFn, ...fns) {
161
- let previousFn = firstFn()
162
- for (const func of fns) {
163
- previousFn = func(previousFn)
164
- }
165
- return previousFn
166
- }
167
- async function* _parallelMap(concurrency, func, iterable) {
168
- let transformError = null
169
- const wrapFunc = value => ({
170
- value: func(value)
171
- })
172
- const stopOnError = async function* (source) {
173
- for await (const value of source) {
174
- if (transformError) {
175
- return
176
- }
177
- yield value
178
- }
179
- }
180
- const output = pipeline(
181
- () => iterable,
182
- buffer(1),
183
- stopOnError,
184
- map(wrapFunc),
185
- buffer(concurrency - 1)
186
- )
187
- const itr = getIterator(output)
188
- while (true) {
189
- const { value, done } = await itr.next()
190
- if (done) {
191
- break
192
- }
193
- try {
194
- const val = await value.value
195
- if (!transformError) {
196
- yield val
197
- }
198
- } catch (error) {
199
- transformError = error
200
- }
201
- }
202
- if (transformError) {
203
- throw transformError
204
- }
205
- }
206
- function parallelMap(concurrency, func, iterable) {
207
- if (func === undefined) {
208
- return (curriedFunc, curriedIterable) =>
209
- parallelMap(concurrency, curriedFunc, curriedIterable)
210
- }
211
- if (iterable === undefined) {
212
- return curriedIterable => parallelMap(concurrency, func, curriedIterable)
213
- }
214
- if (concurrency === 1) {
215
- return map(func, iterable)
216
- }
217
- return _parallelMap(concurrency, func, iterable)
218
- }
219
- function _transform(concurrency, func, iterable) {
220
- const iterator = getIterator(iterable)
221
- const resultQueue = []
222
- const readQueue = []
223
- let ended = false
224
- let reading = false
225
- let inflightCount = 0
226
- let lastError = null
227
- function fulfillReadQueue() {
228
- while (readQueue.length > 0 && resultQueue.length > 0) {
229
- const { resolve } = readQueue.shift()
230
- const value = resultQueue.shift()
231
- resolve({
232
- done: false,
233
- value
234
- })
235
- }
236
- while (readQueue.length > 0 && inflightCount === 0 && ended) {
237
- const { resolve, reject } = readQueue.shift()
238
- if (lastError) {
239
- reject(lastError)
240
- lastError = null
241
- } else {
242
- resolve({
243
- done: true,
244
- value: undefined
245
- })
246
- }
247
- }
248
- }
249
- async function fillQueue() {
250
- if (ended) {
251
- fulfillReadQueue()
252
- return
253
- }
254
- if (reading) {
255
- return
256
- }
257
- if (inflightCount + resultQueue.length >= concurrency) {
258
- return
259
- }
260
- reading = true
261
- inflightCount++
262
- try {
263
- const { done, value } = await iterator.next()
264
- if (done) {
265
- ended = true
266
- inflightCount--
267
- fulfillReadQueue()
268
- } else {
269
- mapAndQueue(value)
270
- }
271
- } catch (error) {
272
- ended = true
273
- inflightCount--
274
- lastError = error
275
- fulfillReadQueue()
276
- }
277
- reading = false
278
- fillQueue()
279
- }
280
- async function mapAndQueue(itrValue) {
281
- try {
282
- const value = await func(itrValue)
283
- resultQueue.push(value)
284
- } catch (error) {
285
- ended = true
286
- lastError = error
287
- }
288
- inflightCount--
289
- fulfillReadQueue()
290
- fillQueue()
291
- }
292
- async function next() {
293
- if (resultQueue.length === 0) {
294
- const deferred = defer()
295
- readQueue.push(deferred)
296
- fillQueue()
297
- return deferred.promise
298
- }
299
- const value = resultQueue.shift()
300
- fillQueue()
301
- return {
302
- done: false,
303
- value
304
- }
305
- }
306
- const asyncIterableIterator = {
307
- next,
308
- [Symbol.asyncIterator]: () => asyncIterableIterator
309
- }
310
- return asyncIterableIterator
311
- }
312
- function transform(concurrency, func, iterable) {
313
- if (func === undefined) {
314
- return (curriedFunc, curriedIterable) =>
315
- curriedIterable
316
- ? transform(concurrency, curriedFunc, curriedIterable)
317
- : transform(concurrency, curriedFunc)
318
- }
319
- if (iterable === undefined) {
320
- return curriedIterable => transform(concurrency, func, curriedIterable)
321
- }
322
- return _transform(concurrency, func, iterable)
323
- }
324
-
325
- exports.parallelMap = parallelMap
326
- exports.transform = transform
@@ -1,108 +0,0 @@
1
- 'use strict'
2
-
3
- const require$$0 = require('module')
4
-
5
- let lib
6
- let hasRequiredLib
7
- function requireLib() {
8
- if (hasRequiredLib) {
9
- return lib
10
- }
11
- hasRequiredLib = 1
12
- const { builtinModules: builtins } = require$$0
13
- const scopedPackagePattern = new RegExp('^(?:@([^/]+?)[/])?([^/]+?)$')
14
- const exclusionList = ['node_modules', 'favicon.ico']
15
- function validate(name) {
16
- const warnings = []
17
- const errors = []
18
- if (name === null) {
19
- errors.push('name cannot be null')
20
- return done(warnings, errors)
21
- }
22
- if (name === undefined) {
23
- errors.push('name cannot be undefined')
24
- return done(warnings, errors)
25
- }
26
- if (typeof name !== 'string') {
27
- errors.push('name must be a string')
28
- return done(warnings, errors)
29
- }
30
- if (!name.length) {
31
- errors.push('name length must be greater than zero')
32
- }
33
- if (name.startsWith('.')) {
34
- errors.push('name cannot start with a period')
35
- }
36
- if (name.match(/^_/)) {
37
- errors.push('name cannot start with an underscore')
38
- }
39
- if (name.trim() !== name) {
40
- errors.push('name cannot contain leading or trailing spaces')
41
- }
42
-
43
- // No funny business
44
- exclusionList.forEach(function (excludedName) {
45
- if (name.toLowerCase() === excludedName) {
46
- errors.push(excludedName + ' is not a valid package name')
47
- }
48
- })
49
-
50
- // Generate warnings for stuff that used to be allowed
51
-
52
- // core module names like http, events, util, etc
53
- if (builtins.includes(name.toLowerCase())) {
54
- warnings.push(name + ' is a core module name')
55
- }
56
- if (name.length > 214) {
57
- warnings.push('name can no longer contain more than 214 characters')
58
- }
59
-
60
- // mIxeD CaSe nAMEs
61
- if (name.toLowerCase() !== name) {
62
- warnings.push('name can no longer contain capital letters')
63
- }
64
- if (/[~'!()*]/.test(name.split('/').slice(-1)[0])) {
65
- warnings.push('name can no longer contain special characters ("~\'!()*")')
66
- }
67
- if (encodeURIComponent(name) !== name) {
68
- // Maybe it's a scoped package name, like @user/package
69
- const nameMatch = name.match(scopedPackagePattern)
70
- if (nameMatch) {
71
- const user = nameMatch[1]
72
- const pkg = nameMatch[2]
73
- if (pkg.startsWith('.')) {
74
- errors.push('name cannot start with a period')
75
- }
76
- if (
77
- encodeURIComponent(user) === user &&
78
- encodeURIComponent(pkg) === pkg
79
- ) {
80
- return done(warnings, errors)
81
- }
82
- }
83
- errors.push('name can only contain URL-friendly characters')
84
- }
85
- return done(warnings, errors)
86
- }
87
- const done = function (warnings, errors) {
88
- const result = {
89
- validForNewPackages: errors.length === 0 && warnings.length === 0,
90
- validForOldPackages: errors.length === 0,
91
- warnings: warnings,
92
- errors: errors
93
- }
94
- if (!result.warnings.length) {
95
- delete result.warnings
96
- }
97
- if (!result.errors.length) {
98
- delete result.errors
99
- }
100
- return result
101
- }
102
- lib = validate
103
- return lib
104
- }
105
-
106
- const libExports = requireLib()
107
-
108
- module.exports = libExports