@socketsecurity/cli-with-sentry 0.15.10 → 0.15.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/bin/cli.js +6 -6
  2. package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
  3. package/dist/cli.js +5731 -6607
  4. package/dist/cli.js.map +1 -1
  5. package/dist/constants.js +274 -305
  6. package/dist/constants.js.map +1 -1
  7. package/dist/instrument-with-sentry.js +28 -34
  8. package/dist/instrument-with-sentry.js.map +1 -1
  9. package/dist/shadow-bin.js +96 -123
  10. package/dist/shadow-bin.js.map +1 -1
  11. package/dist/shadow-inject.js +470 -580
  12. package/dist/shadow-inject.js.map +1 -1
  13. package/dist/socket-completion.bash +221 -0
  14. package/dist/types/cli.d.mts +2 -2
  15. package/dist/types/commands/analytics/cmd-analytics.d.mts +9 -15
  16. package/dist/types/commands/analytics/fetch-org-analytics.d.mts +4 -6
  17. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +4 -7
  18. package/dist/types/commands/analytics/handle-analytics.d.mts +9 -15
  19. package/dist/types/commands/analytics/handle-analytics.d.mts.map +1 -1
  20. package/dist/types/commands/analytics/output-analytics.d.mts +26 -46
  21. package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
  22. package/dist/types/commands/audit-log/cmd-audit-log.d.mts +9 -15
  23. package/dist/types/commands/audit-log/fetch-audit-log.d.mts +10 -16
  24. package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +1 -1
  25. package/dist/types/commands/audit-log/handle-audit-log.d.mts +9 -15
  26. package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +1 -1
  27. package/dist/types/commands/audit-log/output-audit-log.d.mts +22 -47
  28. package/dist/types/commands/audit-log/output-audit-log.d.mts.map +1 -1
  29. package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts +9 -15
  30. package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts.map +1 -1
  31. package/dist/types/commands/cdxgen/handle-cdxgen.d.mts +4 -0
  32. package/dist/types/commands/cdxgen/handle-cdxgen.d.mts.map +1 -0
  33. package/dist/types/commands/ci/cmd-ci.d.mts +9 -15
  34. package/dist/types/commands/ci/fetch-default-org-slug.d.mts +3 -3
  35. package/dist/types/commands/ci/handle-ci.d.mts +2 -2
  36. package/dist/types/commands/config/cmd-config-auto.d.mts +9 -15
  37. package/dist/types/commands/config/cmd-config-get.d.mts +9 -15
  38. package/dist/types/commands/config/cmd-config-list.d.mts +9 -15
  39. package/dist/types/commands/config/cmd-config-set.d.mts +9 -15
  40. package/dist/types/commands/config/cmd-config-unset.d.mts +9 -15
  41. package/dist/types/commands/config/cmd-config.d.mts +3 -3
  42. package/dist/types/commands/config/discover-config-value.d.mts +3 -5
  43. package/dist/types/commands/config/discover-config-value.d.mts.map +1 -1
  44. package/dist/types/commands/config/handle-config-auto.d.mts +7 -10
  45. package/dist/types/commands/config/handle-config-auto.d.mts.map +1 -1
  46. package/dist/types/commands/config/handle-config-get.d.mts +7 -10
  47. package/dist/types/commands/config/handle-config-get.d.mts.map +1 -1
  48. package/dist/types/commands/config/handle-config-set.d.mts +8 -12
  49. package/dist/types/commands/config/handle-config-set.d.mts.map +1 -1
  50. package/dist/types/commands/config/handle-config-unset.d.mts +7 -10
  51. package/dist/types/commands/config/handle-config-unset.d.mts.map +1 -1
  52. package/dist/types/commands/config/output-config-auto.d.mts +4 -8
  53. package/dist/types/commands/config/output-config-get.d.mts +4 -8
  54. package/dist/types/commands/config/output-config-list.d.mts +6 -9
  55. package/dist/types/commands/config/output-config-list.d.mts.map +1 -1
  56. package/dist/types/commands/config/output-config-set.d.mts +3 -6
  57. package/dist/types/commands/config/output-config-unset.d.mts +3 -6
  58. package/dist/types/commands/dependencies/cmd-dependencies.d.mts +9 -15
  59. package/dist/types/commands/dependencies/fetch-dependencies.d.mts +7 -10
  60. package/dist/types/commands/dependencies/fetch-dependencies.d.mts.map +1 -1
  61. package/dist/types/commands/dependencies/handle-dependencies.d.mts +7 -11
  62. package/dist/types/commands/dependencies/handle-dependencies.d.mts.map +1 -1
  63. package/dist/types/commands/dependencies/output-dependencies.d.mts +8 -15
  64. package/dist/types/commands/dependencies/output-dependencies.d.mts.map +1 -1
  65. package/dist/types/commands/diff-scan/cmd-diff-scan-get.d.mts +9 -15
  66. package/dist/types/commands/diff-scan/cmd-diff-scan.d.mts +3 -3
  67. package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts +8 -12
  68. package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts.map +1 -1
  69. package/dist/types/commands/diff-scan/handle-diff-scan.d.mts +10 -17
  70. package/dist/types/commands/diff-scan/handle-diff-scan.d.mts.map +1 -1
  71. package/dist/types/commands/diff-scan/output-diff-scan.d.mts +8 -15
  72. package/dist/types/commands/diff-scan/output-diff-scan.d.mts.map +1 -1
  73. package/dist/types/commands/fix/cmd-fix.d.mts +9 -15
  74. package/dist/types/commands/fix/git.d.mts +14 -49
  75. package/dist/types/commands/fix/npm-fix.d.mts +4 -16
  76. package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
  77. package/dist/types/commands/fix/open-pr.d.mts +20 -46
  78. package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
  79. package/dist/types/commands/fix/pnpm-fix.d.mts +4 -16
  80. package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
  81. package/dist/types/commands/fix/run-fix.d.mts +3 -3
  82. package/dist/types/commands/fix/shared.d.mts +9 -15
  83. package/dist/types/commands/fix/types.d.mts +16 -16
  84. package/dist/types/commands/info/cmd-info.d.mts +9 -15
  85. package/dist/types/commands/info/fetch-package-info.d.mts +3 -7
  86. package/dist/types/commands/info/handle-package-info.d.mts +15 -22
  87. package/dist/types/commands/info/handle-package-info.d.mts.map +1 -1
  88. package/dist/types/commands/info/output-package-info.d.mts +10 -18
  89. package/dist/types/commands/info/output-package-info.d.mts.map +1 -1
  90. package/dist/types/commands/install/cmd-install-completion.d.mts +10 -0
  91. package/dist/types/commands/install/cmd-install-completion.d.mts.map +1 -0
  92. package/dist/types/commands/install/cmd-install.d.mts +3 -0
  93. package/dist/types/commands/install/cmd-install.d.mts.map +1 -0
  94. package/dist/types/commands/install/handle-install-completion.d.mts +2 -0
  95. package/dist/types/commands/install/handle-install-completion.d.mts.map +1 -0
  96. package/dist/types/commands/install/output-install-completion.d.mts +12 -0
  97. package/dist/types/commands/install/output-install-completion.d.mts.map +1 -0
  98. package/dist/types/commands/install/setup-tab-completion.d.mts +13 -0
  99. package/dist/types/commands/install/setup-tab-completion.d.mts.map +1 -0
  100. package/dist/types/commands/login/apply-login.d.mts +2 -7
  101. package/dist/types/commands/login/attempt-login.d.mts +2 -5
  102. package/dist/types/commands/login/attempt-login.d.mts.map +1 -1
  103. package/dist/types/commands/login/cmd-login.d.mts +9 -15
  104. package/dist/types/commands/logout/apply-logout.d.mts +2 -2
  105. package/dist/types/commands/logout/attempt-logout.d.mts +2 -2
  106. package/dist/types/commands/logout/cmd-logout.d.mts +9 -15
  107. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +9 -15
  108. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +10 -0
  109. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +1 -0
  110. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +9 -15
  111. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +9 -15
  112. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +9 -15
  113. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +9 -15
  114. package/dist/types/commands/manifest/cmd-manifest.d.mts +9 -15
  115. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
  116. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +7 -15
  117. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +2 -8
  118. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +2 -8
  119. package/dist/types/commands/manifest/handle-manifest-conda.d.mts +3 -9
  120. package/dist/types/commands/manifest/output-requirements.d.mts +6 -10
  121. package/dist/types/commands/{cdxgen → manifest}/run-cdxgen.d.mts +2 -2
  122. package/dist/types/commands/manifest/run-cdxgen.d.mts.map +1 -0
  123. package/dist/types/commands/npm/cmd-npm.d.mts +9 -15
  124. package/dist/types/commands/npx/cmd-npx.d.mts +9 -15
  125. package/dist/types/commands/oops/cmd-oops.d.mts +9 -15
  126. package/dist/types/commands/optimize/add-overrides.d.mts +18 -22
  127. package/dist/types/commands/optimize/apply-optimization.d.mts +2 -6
  128. package/dist/types/commands/optimize/cmd-optimize.d.mts +9 -15
  129. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +4 -7
  130. package/dist/types/commands/optimize/get-dependency-entries.d.mts +3 -5
  131. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +8 -11
  132. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +3 -10
  133. package/dist/types/commands/optimize/ls-by-agent.d.mts +6 -13
  134. package/dist/types/commands/optimize/shared.d.mts +2 -2
  135. package/dist/types/commands/optimize/types.d.mts +7 -7
  136. package/dist/types/commands/optimize/update-lockfile.d.mts +9 -12
  137. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +5 -11
  138. package/dist/types/commands/organization/cmd-organization-list.d.mts +9 -15
  139. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +9 -15
  140. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +9 -15
  141. package/dist/types/commands/organization/cmd-organization-policy.d.mts +3 -3
  142. package/dist/types/commands/organization/cmd-organization-quota.d.mts +9 -15
  143. package/dist/types/commands/organization/cmd-organization.d.mts +3 -3
  144. package/dist/types/commands/organization/fetch-license-policy.d.mts +4 -6
  145. package/dist/types/commands/organization/fetch-organization-list.d.mts +4 -6
  146. package/dist/types/commands/organization/fetch-quota.d.mts +4 -6
  147. package/dist/types/commands/organization/fetch-security-policy.d.mts +4 -6
  148. package/dist/types/commands/organization/handle-license-policy.d.mts +3 -6
  149. package/dist/types/commands/organization/handle-organization-list.d.mts +3 -5
  150. package/dist/types/commands/organization/handle-quota.d.mts +3 -3
  151. package/dist/types/commands/organization/handle-security-policy.d.mts +3 -6
  152. package/dist/types/commands/organization/output-license-policy.d.mts +4 -7
  153. package/dist/types/commands/organization/output-organization-list.d.mts +4 -7
  154. package/dist/types/commands/organization/output-quota.d.mts +4 -7
  155. package/dist/types/commands/organization/output-security-policy.d.mts +4 -7
  156. package/dist/types/commands/package/cmd-package-score.d.mts +9 -15
  157. package/dist/types/commands/package/cmd-package-shallow.d.mts +16 -22
  158. package/dist/types/commands/package/cmd-package.d.mts +3 -3
  159. package/dist/types/commands/package/fetch-purl-deep-score.d.mts +49 -51
  160. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +4 -6
  161. package/dist/types/commands/package/handle-purl-deep-score.d.mts +3 -6
  162. package/dist/types/commands/package/handle-purls-shallow-score.d.mts +6 -9
  163. package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +1 -1
  164. package/dist/types/commands/package/output-purl-score.d.mts +4 -8
  165. package/dist/types/commands/package/output-purls-shallow-score.d.mts +4 -8
  166. package/dist/types/commands/package/parse-package-specifiers.d.mts +5 -8
  167. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +9 -15
  168. package/dist/types/commands/raw-npm/run-raw-npm.d.mts +2 -4
  169. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +9 -15
  170. package/dist/types/commands/raw-npx/run-raw-npx.d.mts +2 -4
  171. package/dist/types/commands/report/cmd-report-create.d.mts +9 -15
  172. package/dist/types/commands/report/cmd-report-view.d.mts +9 -15
  173. package/dist/types/commands/report/cmd-report.d.mts +3 -3
  174. package/dist/types/commands/repos/cmd-repos-create.d.mts +9 -15
  175. package/dist/types/commands/repos/cmd-repos-del.d.mts +9 -15
  176. package/dist/types/commands/repos/cmd-repos-list.d.mts +9 -15
  177. package/dist/types/commands/repos/cmd-repos-update.d.mts +9 -15
  178. package/dist/types/commands/repos/cmd-repos-view.d.mts +9 -15
  179. package/dist/types/commands/repos/cmd-repos.d.mts +3 -3
  180. package/dist/types/commands/repos/fetch-create-repo.d.mts +11 -18
  181. package/dist/types/commands/repos/fetch-create-repo.d.mts.map +1 -1
  182. package/dist/types/commands/repos/fetch-delete-repo.d.mts +4 -7
  183. package/dist/types/commands/repos/fetch-list-repos.d.mts +10 -16
  184. package/dist/types/commands/repos/fetch-list-repos.d.mts.map +1 -1
  185. package/dist/types/commands/repos/fetch-update-repo.d.mts +11 -18
  186. package/dist/types/commands/repos/fetch-update-repo.d.mts.map +1 -1
  187. package/dist/types/commands/repos/fetch-view-repo.d.mts +4 -7
  188. package/dist/types/commands/repos/handle-create-repo.d.mts +10 -20
  189. package/dist/types/commands/repos/handle-create-repo.d.mts.map +1 -1
  190. package/dist/types/commands/repos/handle-delete-repo.d.mts +3 -7
  191. package/dist/types/commands/repos/handle-list-repos.d.mts +10 -17
  192. package/dist/types/commands/repos/handle-list-repos.d.mts.map +1 -1
  193. package/dist/types/commands/repos/handle-update-repo.d.mts +10 -20
  194. package/dist/types/commands/repos/handle-update-repo.d.mts.map +1 -1
  195. package/dist/types/commands/repos/handle-view-repo.d.mts +3 -7
  196. package/dist/types/commands/repos/output-create-repo.d.mts +4 -8
  197. package/dist/types/commands/repos/output-delete-repo.d.mts +4 -8
  198. package/dist/types/commands/repos/output-list-repos.d.mts +4 -7
  199. package/dist/types/commands/repos/output-update-repo.d.mts +4 -8
  200. package/dist/types/commands/repos/output-view-repo.d.mts +4 -7
  201. package/dist/types/commands/scan/cmd-scan-create.d.mts +9 -15
  202. package/dist/types/commands/scan/cmd-scan-del.d.mts +9 -15
  203. package/dist/types/commands/scan/cmd-scan-diff.d.mts +9 -15
  204. package/dist/types/commands/scan/cmd-scan-list.d.mts +3 -3
  205. package/dist/types/commands/scan/cmd-scan-metadata.d.mts +3 -3
  206. package/dist/types/commands/scan/cmd-scan-report.d.mts +3 -3
  207. package/dist/types/commands/scan/cmd-scan-view.d.mts +3 -3
  208. package/dist/types/commands/scan/cmd-scan.d.mts +3 -3
  209. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +11 -26
  210. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
  211. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +4 -7
  212. package/dist/types/commands/scan/fetch-diff-scan.d.mts +8 -12
  213. package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +1 -1
  214. package/dist/types/commands/scan/fetch-list-scans.d.mts +13 -22
  215. package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
  216. package/dist/types/commands/scan/fetch-report-data.d.mts +8 -14
  217. package/dist/types/commands/scan/fetch-scan-metadata.d.mts +4 -7
  218. package/dist/types/commands/scan/fetch-scan.d.mts +4 -7
  219. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +4 -6
  220. package/dist/types/commands/scan/generate-report.d.mts +36 -50
  221. package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
  222. package/dist/types/commands/scan/handle-create-new-scan.d.mts +20 -37
  223. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
  224. package/dist/types/commands/scan/handle-delete-scan.d.mts +3 -7
  225. package/dist/types/commands/scan/handle-diff-scan.d.mts +10 -17
  226. package/dist/types/commands/scan/handle-diff-scan.d.mts.map +1 -1
  227. package/dist/types/commands/scan/handle-list-scans.d.mts +13 -23
  228. package/dist/types/commands/scan/handle-list-scans.d.mts.map +1 -1
  229. package/dist/types/commands/scan/handle-scan-metadata.d.mts +3 -7
  230. package/dist/types/commands/scan/handle-scan-report.d.mts +12 -21
  231. package/dist/types/commands/scan/handle-scan-report.d.mts.map +1 -1
  232. package/dist/types/commands/scan/handle-scan-view.d.mts +3 -8
  233. package/dist/types/commands/scan/output-create-new-scan.d.mts +4 -8
  234. package/dist/types/commands/scan/output-delete-scan.d.mts +4 -7
  235. package/dist/types/commands/scan/output-diff-scan.d.mts +8 -15
  236. package/dist/types/commands/scan/output-diff-scan.d.mts.map +1 -1
  237. package/dist/types/commands/scan/output-list-scans.d.mts +4 -7
  238. package/dist/types/commands/scan/output-scan-metadata.d.mts +4 -8
  239. package/dist/types/commands/scan/output-scan-report.d.mts +20 -38
  240. package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
  241. package/dist/types/commands/scan/output-scan-view.d.mts +4 -10
  242. package/dist/types/commands/scan/stream-scan.d.mts +2 -6
  243. package/dist/types/commands/scan/suggest-org-slug.d.mts +2 -2
  244. package/dist/types/commands/scan/suggest-repo-slug.d.mts +4 -4
  245. package/dist/types/commands/scan/suggest_branch_slug.d.mts +2 -4
  246. package/dist/types/commands/scan/suggest_target.d.mts +2 -2
  247. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +9 -15
  248. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +10 -16
  249. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +1 -1
  250. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +10 -17
  251. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +1 -1
  252. package/dist/types/commands/threat-feed/output-threat-feed.d.mts +4 -7
  253. package/dist/types/commands/threat-feed/types.d.mts +12 -12
  254. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +9 -0
  255. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +1 -0
  256. package/dist/types/commands/uninstall/cmd-uninstall.d.mts +3 -0
  257. package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +1 -0
  258. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +2 -0
  259. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +1 -0
  260. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +6 -0
  261. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +1 -0
  262. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +6 -0
  263. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +1 -0
  264. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +2 -2
  265. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +2 -2
  266. package/dist/types/commands/wrapper/cmd-wrapper.d.mts +9 -15
  267. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +2 -2
  268. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +1 -1
  269. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +2 -2
  270. package/dist/types/constants.d.mts +125 -135
  271. package/dist/types/constants.d.mts.map +1 -1
  272. package/dist/types/flags.d.mts +14 -17
  273. package/dist/types/flags.d.mts.map +1 -1
  274. package/dist/types/instrument-with-sentry.d.mts +2 -2
  275. package/dist/types/shadow/npm/arborist/index.d.mts +2 -2
  276. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +19 -24
  277. package/dist/types/shadow/npm/arborist/lib/arborist/types.d.mts +43 -71
  278. package/dist/types/shadow/npm/arborist/lib/dep-valid.d.mts +3 -8
  279. package/dist/types/shadow/npm/arborist/lib/edge.d.mts +58 -71
  280. package/dist/types/shadow/npm/arborist/lib/node.d.mts +55 -91
  281. package/dist/types/shadow/npm/arborist/lib/override-set.d.mts +26 -32
  282. package/dist/types/shadow/npm/arborist-helpers.d.mts +33 -66
  283. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
  284. package/dist/types/shadow/npm/bin.d.mts +2 -5
  285. package/dist/types/shadow/npm/inject.d.mts +2 -2
  286. package/dist/types/shadow/npm/install.d.mts +11 -16
  287. package/dist/types/shadow/npm/link.d.mts +2 -5
  288. package/dist/types/shadow/npm/paths.d.mts +7 -7
  289. package/dist/types/shadow/npm/proc-log/index.d.mts +3 -6
  290. package/dist/types/types.d.mts +15 -17
  291. package/dist/types/utils/agent.d.mts +11 -14
  292. package/dist/types/utils/alert/artifact.d.mts +32 -50
  293. package/dist/types/utils/alert/fix.d.mts +5 -5
  294. package/dist/types/utils/alert/severity.d.mts +12 -24
  295. package/dist/types/utils/alerts-map.d.mts +23 -36
  296. package/dist/types/utils/api.d.mts +11 -34
  297. package/dist/types/utils/check-input.d.mts +9 -12
  298. package/dist/types/utils/cmd.d.mts +4 -4
  299. package/dist/types/utils/color-or-markdown.d.mts +14 -23
  300. package/dist/types/utils/color-or-markdown.d.mts.map +1 -1
  301. package/dist/types/utils/completion.d.mts +11 -0
  302. package/dist/types/utils/completion.d.mts.map +1 -0
  303. package/dist/types/utils/config.d.mts +22 -31
  304. package/dist/types/utils/config.d.mts.map +1 -1
  305. package/dist/types/utils/determine-org-slug.d.mts +2 -7
  306. package/dist/types/utils/errors.d.mts +12 -21
  307. package/dist/types/utils/fail-msg-with-badge.d.mts +2 -5
  308. package/dist/types/utils/fs.d.mts +21 -52
  309. package/dist/types/utils/get-output-kind.d.mts +3 -6
  310. package/dist/types/utils/glob.d.mts +13 -24
  311. package/dist/types/utils/map-to-object.d.mts +4 -6
  312. package/dist/types/utils/markdown.d.mts +4 -15
  313. package/dist/types/utils/meow-with-subcommands.d.mts +34 -46
  314. package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
  315. package/dist/types/utils/npm-paths.d.mts +7 -7
  316. package/dist/types/utils/npm-paths.d.mts.map +1 -1
  317. package/dist/types/utils/objects.d.mts +3 -8
  318. package/dist/types/utils/output-formatting.d.mts +14 -24
  319. package/dist/types/utils/package-environment.d.mts +51 -72
  320. package/dist/types/utils/package-environment.d.mts.map +1 -1
  321. package/dist/types/utils/path-resolve.d.mts +9 -14
  322. package/dist/types/utils/pnpm.d.mts +9 -7
  323. package/dist/types/utils/pnpm.d.mts.map +1 -1
  324. package/dist/types/utils/sdk.d.mts +8 -12
  325. package/dist/types/utils/semver.d.mts +5 -17
  326. package/dist/types/utils/serialize-result-json.d.mts +3 -3
  327. package/dist/types/utils/socket-package-alert.d.mts +62 -81
  328. package/dist/types/utils/socket-url.d.mts +9 -15
  329. package/dist/types/utils/spec.d.mts +4 -7
  330. package/dist/types/utils/spec.d.mts.map +1 -1
  331. package/dist/types/utils/strings.d.mts +2 -5
  332. package/dist/types/utils/translations.d.mts +592 -592
  333. package/dist/types/utils/walk-nested-map.d.mts +7 -10
  334. package/dist/utils.js +1531 -1833
  335. package/dist/utils.js.map +1 -1
  336. package/dist/vendor.js +38333 -51605
  337. package/dist/vendor.js.map +1 -1
  338. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +5 -8
  339. package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +2 -4
  340. package/external/@socketsecurity/registry/external/cacache.js +1 -2
  341. package/external/@socketsecurity/registry/external/libnpmpack.js +36 -76
  342. package/external/@socketsecurity/registry/external/make-fetch-happen.js +31 -67
  343. package/external/@socketsecurity/registry/external/pacote.js +36 -76
  344. package/external/@socketsecurity/registry/external/tinyglobby.js +3 -6
  345. package/external/@socketsecurity/registry/external/which.js +2 -4
  346. package/external/@socketsecurity/registry/lib/logger.d.ts +4 -1
  347. package/external/@socketsecurity/registry/lib/logger.js +160 -73
  348. package/external/@socketsecurity/registry/lib/spinner.js +5 -1
  349. package/external/@socketsecurity/registry/package.json +2 -2
  350. package/external/blessed/lib/alias.js +475 -468
  351. package/external/blessed/lib/blessed.js +12 -12
  352. package/external/blessed/lib/colors.js +234 -194
  353. package/external/blessed/lib/events.js +64 -70
  354. package/external/blessed/lib/gpmclient.js +117 -141
  355. package/external/blessed/lib/helpers.js +89 -94
  356. package/external/blessed/lib/keys.js +169 -342
  357. package/external/blessed/lib/program.js +2130 -2365
  358. package/external/blessed/lib/tput.js +1183 -1276
  359. package/external/blessed/lib/unicode.js +400 -522
  360. package/external/blessed/lib/widget.js +14 -14
  361. package/external/blessed/lib/widgets/ansiimage.js +90 -96
  362. package/external/blessed/lib/widgets/bigtext.js +91 -102
  363. package/external/blessed/lib/widgets/box.js +8 -8
  364. package/external/blessed/lib/widgets/button.js +23 -23
  365. package/external/blessed/lib/widgets/checkbox.js +50 -54
  366. package/external/blessed/lib/widgets/element.js +1415 -1716
  367. package/external/blessed/lib/widgets/filemanager.js +107 -118
  368. package/external/blessed/lib/widgets/form.js +144 -178
  369. package/external/blessed/lib/widgets/image.js +26 -36
  370. package/external/blessed/lib/widgets/input.js +8 -8
  371. package/external/blessed/lib/widgets/layout.js +103 -119
  372. package/external/blessed/lib/widgets/line.js +17 -20
  373. package/external/blessed/lib/widgets/list.js +349 -402
  374. package/external/blessed/lib/widgets/listbar.js +265 -306
  375. package/external/blessed/lib/widgets/listtable.js +133 -146
  376. package/external/blessed/lib/widgets/loading.js +31 -31
  377. package/external/blessed/lib/widgets/log.js +41 -40
  378. package/external/blessed/lib/widgets/message.js +64 -86
  379. package/external/blessed/lib/widgets/node.js +175 -207
  380. package/external/blessed/lib/widgets/overlayimage.js +360 -437
  381. package/external/blessed/lib/widgets/progressbar.js +79 -88
  382. package/external/blessed/lib/widgets/prompt.js +54 -61
  383. package/external/blessed/lib/widgets/question.js +48 -61
  384. package/external/blessed/lib/widgets/radiobutton.js +26 -27
  385. package/external/blessed/lib/widgets/radioset.js +8 -8
  386. package/external/blessed/lib/widgets/screen.js +1186 -1375
  387. package/external/blessed/lib/widgets/scrollablebox.js +202 -228
  388. package/external/blessed/lib/widgets/scrollabletext.js +9 -9
  389. package/external/blessed/lib/widgets/table.js +187 -216
  390. package/external/blessed/lib/widgets/terminal.js +258 -298
  391. package/external/blessed/lib/widgets/text.js +9 -9
  392. package/external/blessed/lib/widgets/textarea.js +188 -222
  393. package/external/blessed/lib/widgets/textbox.js +34 -36
  394. package/external/blessed/lib/widgets/video.js +55 -59
  395. package/external/blessed/usr/fonts/ter-u14b.json +1 -1
  396. package/external/blessed/usr/fonts/ter-u14n.json +1 -1
  397. package/external/blessed/vendor/tng.js +1016 -1144
  398. package/external/blessed-contrib/lib/layout/grid.js +345 -377
  399. package/external/blessed-contrib/lib/widget/charts/bar.js +6612 -7139
  400. package/external/blessed-contrib/lib/widget/charts/line.js +16224 -23941
  401. package/external/blessed-contrib/lib/widget/table.js +78 -96
  402. package/package.json +9 -9
  403. package/dist/types/commands/cdxgen/run-cdxgen.d.mts.map +0 -1
@@ -10,8 +10,8 @@
10
10
  * Modules
11
11
  */
12
12
 
13
- const Node = require('./node')
14
- const Box = require('./box')
13
+ var Node = require('./node');
14
+ var Box = require('./box');
15
15
 
16
16
  /**
17
17
  * Message / Error
@@ -19,34 +19,29 @@ const Box = require('./box')
19
19
 
20
20
  function Message(options) {
21
21
  if (!(this instanceof Node)) {
22
- return new Message(options)
22
+ return new Message(options);
23
23
  }
24
24
 
25
- options = options || {}
26
- options.tags = true
25
+ options = options || {};
26
+ options.tags = true;
27
27
 
28
- Box.call(this, options)
28
+ Box.call(this, options);
29
29
  }
30
30
 
31
- Object.setPrototypeOf(Message.prototype, Box.prototype)
31
+ Object.setPrototypeOf(Message.prototype, Box.prototype);
32
32
 
33
- Message.prototype.type = 'message'
33
+ Message.prototype.type = 'message';
34
34
 
35
- Message.prototype.log = Message.prototype.display = function (
36
- text,
37
- time,
38
- callback
39
- ) {
40
- const self = this
35
+ Message.prototype.log =
36
+ Message.prototype.display = function(text, time, callback) {
37
+ var self = this;
41
38
 
42
39
  if (typeof time === 'function') {
43
- callback = time
44
- time = null
40
+ callback = time;
41
+ time = null;
45
42
  }
46
43
 
47
- if (time == null) {
48
- time = 3
49
- }
44
+ if (time == null) time = 3;
50
45
 
51
46
  // Keep above:
52
47
  // var parent = this.parent;
@@ -54,94 +49,77 @@ Message.prototype.log = Message.prototype.display = function (
54
49
  // parent.append(this);
55
50
 
56
51
  if (this.scrollable) {
57
- this.screen.saveFocus()
58
- this.focus()
59
- this.scrollTo(0)
52
+ this.screen.saveFocus();
53
+ this.focus();
54
+ this.scrollTo(0);
60
55
  }
61
56
 
62
- this.show()
63
- this.setContent(text)
64
- this.screen.render()
57
+ this.show();
58
+ this.setContent(text);
59
+ this.screen.render();
65
60
 
66
61
  if (time === Infinity || time === -1 || time === 0) {
67
- const end = function () {
68
- if (end.done) {
69
- return
70
- }
71
- end.done = true
62
+ var end = function() {
63
+ if (end.done) return;
64
+ end.done = true;
72
65
  if (self.scrollable) {
73
66
  try {
74
- self.screen.restoreFocus()
75
- } catch (e) {}
76
- }
77
- self.hide()
78
- self.screen.render()
79
- if (callback) {
80
- callback()
67
+ self.screen.restoreFocus();
68
+ } catch (e) {
69
+ ;
70
+ }
81
71
  }
82
- }
72
+ self.hide();
73
+ self.screen.render();
74
+ if (callback) callback();
75
+ };
83
76
 
84
- setTimeout(function () {
77
+ setTimeout(function() {
85
78
  self.onScreenEvent('keypress', function fn(ch, key) {
86
- if (key.name === 'mouse') {
87
- return
88
- }
79
+ if (key.name === 'mouse') return;
89
80
  if (self.scrollable) {
90
- if (
91
- key.name === 'up' ||
92
- (self.options.vi && key.name === 'k') ||
93
- key.name === 'down' ||
94
- (self.options.vi && key.name === 'j') ||
95
- (self.options.vi && key.name === 'u' && key.ctrl) ||
96
- (self.options.vi && key.name === 'd' && key.ctrl) ||
97
- (self.options.vi && key.name === 'b' && key.ctrl) ||
98
- (self.options.vi && key.name === 'f' && key.ctrl) ||
99
- (self.options.vi && key.name === 'g' && !key.shift) ||
100
- (self.options.vi && key.name === 'g' && key.shift)
101
- ) {
102
- return
81
+ if ((key.name === 'up' || (self.options.vi && key.name === 'k'))
82
+ || (key.name === 'down' || (self.options.vi && key.name === 'j'))
83
+ || (self.options.vi && key.name === 'u' && key.ctrl)
84
+ || (self.options.vi && key.name === 'd' && key.ctrl)
85
+ || (self.options.vi && key.name === 'b' && key.ctrl)
86
+ || (self.options.vi && key.name === 'f' && key.ctrl)
87
+ || (self.options.vi && key.name === 'g' && !key.shift)
88
+ || (self.options.vi && key.name === 'g' && key.shift)) {
89
+ return;
103
90
  }
104
91
  }
105
- if (
106
- self.options.ignoreKeys &&
107
- ~self.options.ignoreKeys.indexOf(key.name)
108
- ) {
109
- return
92
+ if (self.options.ignoreKeys && ~self.options.ignoreKeys.indexOf(key.name)) {
93
+ return;
110
94
  }
111
- self.removeScreenEvent('keypress', fn)
112
- end()
113
- })
95
+ self.removeScreenEvent('keypress', fn);
96
+ end();
97
+ });
114
98
  // XXX May be affected by new element.options.mouse option.
115
- if (!self.options.mouse) {
116
- return
117
- }
99
+ if (!self.options.mouse) return;
118
100
  self.onScreenEvent('mouse', function fn(data) {
119
- if (data.action === 'mousemove') {
120
- return
121
- }
122
- self.removeScreenEvent('mouse', fn)
123
- end()
124
- })
125
- }, 10)
101
+ if (data.action === 'mousemove') return;
102
+ self.removeScreenEvent('mouse', fn);
103
+ end();
104
+ });
105
+ }, 10);
126
106
 
127
- return
107
+ return;
128
108
  }
129
109
 
130
- setTimeout(function () {
131
- self.hide()
132
- self.screen.render()
133
- if (callback) {
134
- callback()
135
- }
136
- }, time * 1000)
137
- }
110
+ setTimeout(function() {
111
+ self.hide();
112
+ self.screen.render();
113
+ if (callback) callback();
114
+ }, time * 1000);
115
+ };
138
116
 
139
- Message.prototype.error = function (text, time, callback) {
140
- return this.display('{red-fg}Error: ' + text + '{/red-fg}', time, callback)
141
- }
117
+ Message.prototype.error = function(text, time, callback) {
118
+ return this.display('{red-fg}Error: ' + text + '{/red-fg}', time, callback);
119
+ };
142
120
 
143
121
  /**
144
122
  * Expose
145
123
  */
146
124
 
147
- module.exports = Message
125
+ module.exports = Message;
@@ -10,306 +10,274 @@
10
10
  * Modules
11
11
  */
12
12
 
13
- const EventEmitter = require('../events').EventEmitter
13
+ var EventEmitter = require('../events').EventEmitter;
14
14
 
15
15
  /**
16
16
  * Node
17
17
  */
18
18
 
19
19
  function Node(options) {
20
- const self = this
20
+ var self = this;
21
21
  if (!(this instanceof Node)) {
22
- return new Node(options)
22
+ return new Node(options);
23
23
  }
24
24
 
25
- EventEmitter.call(this)
25
+ EventEmitter.call(this);
26
26
 
27
- options = options || {}
28
- this.options = options
27
+ options = options || {};
28
+ this.options = options;
29
29
 
30
- this.screen = this.screen || options.screen
30
+ this.screen = this.screen || options.screen;
31
31
 
32
32
  if (!this.screen) {
33
- const Screen = require('./screen')
33
+ var Screen = require('./screen');
34
34
  if (this.type === 'screen') {
35
- this.screen = this
35
+ this.screen = this;
36
36
  } else if (Screen.total === 1) {
37
- this.screen = Screen.global
37
+ this.screen = Screen.global;
38
38
  } else if (options.parent) {
39
- this.screen = options.parent
39
+ this.screen = options.parent;
40
40
  while (this.screen && this.screen.type !== 'screen') {
41
- this.screen = this.screen.parent
41
+ this.screen = this.screen.parent;
42
42
  }
43
43
  } else if (Screen.total) {
44
44
  // This _should_ work in most cases as long as the element is appended
45
45
  // synchronously after the screen's creation. Throw error if not.
46
- this.screen = Screen.instances[Screen.instances.length - 1]
47
- process.nextTick(function () {
46
+ this.screen = Screen.instances[Screen.instances.length - 1];
47
+ process.nextTick(function() {
48
48
  if (!self.parent) {
49
- throw new Error(
50
- 'Element (' +
51
- self.type +
52
- ')' +
53
- ' was not appended synchronously after the' +
54
- " screen's creation. Please set a `parent`" +
55
- " or `screen` option in the element's constructor" +
56
- ' if you are going to use multiple screens and' +
57
- ' append the element later.'
58
- )
49
+ throw new Error('Element (' + self.type + ')'
50
+ + ' was not appended synchronously after the'
51
+ + ' screen\'s creation. Please set a `parent`'
52
+ + ' or `screen` option in the element\'s constructor'
53
+ + ' if you are going to use multiple screens and'
54
+ + ' append the element later.');
59
55
  }
60
- })
56
+ });
61
57
  } else {
62
- throw new Error('No active screen.')
58
+ throw new Error('No active screen.');
63
59
  }
64
60
  }
65
61
 
66
- this.parent = options.parent || null
67
- this.children = []
68
- this.$ = this._ = this.data = {}
69
- this.uid = Node.uid++
70
- this.index = this.index != null ? this.index : -1
62
+ this.parent = options.parent || null;
63
+ this.children = [];
64
+ this.$ = this._ = this.data = {};
65
+ this.uid = Node.uid++;
66
+ this.index = this.index != null ? this.index : -1;
71
67
 
72
68
  if (this.type !== 'screen') {
73
- this.detached = true
69
+ this.detached = true;
74
70
  }
75
71
 
76
72
  if (this.parent) {
77
- this.parent.append(this)
73
+ this.parent.append(this);
78
74
  }
79
75
 
80
- ;(options.children || []).forEach(this.append.bind(this))
76
+ (options.children || []).forEach(this.append.bind(this));
81
77
  }
82
78
 
83
- Node.uid = 0
79
+ Node.uid = 0;
84
80
 
85
- Object.setPrototypeOf(Node.prototype, EventEmitter.prototype)
81
+ Object.setPrototypeOf(Node.prototype, EventEmitter.prototype);
86
82
 
87
- Node.prototype.type = 'node'
83
+ Node.prototype.type = 'node';
88
84
 
89
- Node.prototype.insert = function (element, i) {
90
- const self = this
85
+ Node.prototype.insert = function(element, i) {
86
+ var self = this;
91
87
 
92
88
  if (element.screen && element.screen !== this.screen) {
93
- throw new Error("Cannot switch a node's screen.")
89
+ throw new Error('Cannot switch a node\'s screen.');
94
90
  }
95
91
 
96
- element.detach()
97
- element.parent = this
98
- element.screen = this.screen
92
+ element.detach();
93
+ element.parent = this;
94
+ element.screen = this.screen;
99
95
 
100
96
  if (i === 0) {
101
- this.children.unshift(element)
97
+ this.children.unshift(element);
102
98
  } else if (i === this.children.length) {
103
- this.children.push(element)
99
+ this.children.push(element);
104
100
  } else {
105
- this.children.splice(i, 0, element)
101
+ this.children.splice(i, 0, element);
106
102
  }
107
103
 
108
- element.emit('reparent', this)
109
- this.emit('adopt', element)
104
+ element.emit('reparent', this);
105
+ this.emit('adopt', element);
110
106
 
111
- ;(function emit(el) {
112
- const n = el.detached !== self.detached
113
- el.detached = self.detached
114
- if (n) {
115
- el.emit('attach')
116
- }
117
- el.children.forEach(emit)
118
- })(element)
107
+ (function emit(el) {
108
+ var n = el.detached !== self.detached;
109
+ el.detached = self.detached;
110
+ if (n) el.emit('attach');
111
+ el.children.forEach(emit);
112
+ })(element);
119
113
 
120
114
  if (!this.screen.focused) {
121
- this.screen.focused = element
115
+ this.screen.focused = element;
122
116
  }
123
- }
117
+ };
124
118
 
125
- Node.prototype.prepend = function (element) {
126
- this.insert(element, 0)
127
- }
119
+ Node.prototype.prepend = function(element) {
120
+ this.insert(element, 0);
121
+ };
128
122
 
129
- Node.prototype.append = function (element) {
130
- this.insert(element, this.children.length)
131
- }
123
+ Node.prototype.append = function(element) {
124
+ this.insert(element, this.children.length);
125
+ };
132
126
 
133
- Node.prototype.insertBefore = function (element, other) {
134
- const i = this.children.indexOf(other)
135
- if (~i) {
136
- this.insert(element, i)
137
- }
138
- }
127
+ Node.prototype.insertBefore = function(element, other) {
128
+ var i = this.children.indexOf(other);
129
+ if (~i) this.insert(element, i);
130
+ };
139
131
 
140
- Node.prototype.insertAfter = function (element, other) {
141
- const i = this.children.indexOf(other)
142
- if (~i) {
143
- this.insert(element, i + 1)
144
- }
145
- }
132
+ Node.prototype.insertAfter = function(element, other) {
133
+ var i = this.children.indexOf(other);
134
+ if (~i) this.insert(element, i + 1);
135
+ };
146
136
 
147
- Node.prototype.remove = function (element) {
148
- if (element.parent !== this) {
149
- return
150
- }
137
+ Node.prototype.remove = function(element) {
138
+ if (element.parent !== this) return;
151
139
 
152
- let i = this.children.indexOf(element)
153
- if (!~i) {
154
- return
155
- }
140
+ var i = this.children.indexOf(element);
141
+ if (!~i) return;
156
142
 
157
- element.clearPos()
143
+ element.clearPos();
158
144
 
159
- element.parent = null
145
+ element.parent = null;
160
146
 
161
- this.children.splice(i, 1)
147
+ this.children.splice(i, 1);
162
148
 
163
- i = this.screen.clickable.indexOf(element)
164
- if (~i) {
165
- this.screen.clickable.splice(i, 1)
166
- }
167
- i = this.screen.keyable.indexOf(element)
168
- if (~i) {
169
- this.screen.keyable.splice(i, 1)
170
- }
149
+ i = this.screen.clickable.indexOf(element);
150
+ if (~i) this.screen.clickable.splice(i, 1);
151
+ i = this.screen.keyable.indexOf(element);
152
+ if (~i) this.screen.keyable.splice(i, 1);
171
153
 
172
- element.emit('reparent', null)
173
- this.emit('remove', element)
154
+ element.emit('reparent', null);
155
+ this.emit('remove', element);
174
156
 
175
- ;(function emit(el) {
176
- const n = el.detached !== true
177
- el.detached = true
178
- if (n) {
179
- el.emit('detach')
180
- }
181
- el.children.forEach(emit)
182
- })(element)
157
+ (function emit(el) {
158
+ var n = el.detached !== true;
159
+ el.detached = true;
160
+ if (n) el.emit('detach');
161
+ el.children.forEach(emit);
162
+ })(element);
183
163
 
184
164
  if (this.screen.focused === element) {
185
- this.screen.rewindFocus()
186
- }
187
- }
188
-
189
- Node.prototype.detach = function () {
190
- if (this.parent) {
191
- this.parent.remove(this)
192
- }
193
- }
194
-
195
- Node.prototype.free = function () {
196
- return
197
- }
198
-
199
- Node.prototype.destroy = function () {
200
- this.detach()
201
- this.forDescendants(function (el) {
202
- el.free()
203
- el.destroyed = true
204
- el.emit('destroy')
205
- }, this)
206
- }
207
-
208
- Node.prototype.forDescendants = function (iter, s) {
209
- if (s) {
210
- iter(this)
165
+ this.screen.rewindFocus();
211
166
  }
167
+ };
168
+
169
+ Node.prototype.detach = function() {
170
+ if (this.parent) this.parent.remove(this);
171
+ };
172
+
173
+ Node.prototype.free = function() {
174
+ return;
175
+ };
176
+
177
+ Node.prototype.destroy = function() {
178
+ this.detach();
179
+ this.forDescendants(function(el) {
180
+ el.free();
181
+ el.destroyed = true;
182
+ el.emit('destroy');
183
+ }, this);
184
+ };
185
+
186
+ Node.prototype.forDescendants = function(iter, s) {
187
+ if (s) iter(this);
212
188
  this.children.forEach(function emit(el) {
213
- iter(el)
214
- el.children.forEach(emit)
215
- })
216
- }
217
-
218
- Node.prototype.forAncestors = function (iter, s) {
219
- let el = this
220
- if (s) {
221
- iter(this)
222
- }
223
- while ((el = el.parent)) {
224
- iter(el)
189
+ iter(el);
190
+ el.children.forEach(emit);
191
+ });
192
+ };
193
+
194
+ Node.prototype.forAncestors = function(iter, s) {
195
+ var el = this;
196
+ if (s) iter(this);
197
+ while (el = el.parent) {
198
+ iter(el);
225
199
  }
226
- }
227
-
228
- Node.prototype.collectDescendants = function (s) {
229
- const out = []
230
- this.forDescendants(function (el) {
231
- out.push(el)
232
- }, s)
233
- return out
234
- }
235
-
236
- Node.prototype.collectAncestors = function (s) {
237
- const out = []
238
- this.forAncestors(function (el) {
239
- out.push(el)
240
- }, s)
241
- return out
242
- }
243
-
244
- Node.prototype.emitDescendants = function () {
245
- let args = Array.prototype.slice(arguments),
246
- iter
200
+ };
201
+
202
+ Node.prototype.collectDescendants = function(s) {
203
+ var out = [];
204
+ this.forDescendants(function(el) {
205
+ out.push(el);
206
+ }, s);
207
+ return out;
208
+ };
209
+
210
+ Node.prototype.collectAncestors = function(s) {
211
+ var out = [];
212
+ this.forAncestors(function(el) {
213
+ out.push(el);
214
+ }, s);
215
+ return out;
216
+ };
217
+
218
+ Node.prototype.emitDescendants = function() {
219
+ var args = Array.prototype.slice(arguments)
220
+ , iter;
247
221
 
248
222
  if (typeof args[args.length - 1] === 'function') {
249
- iter = args.pop()
223
+ iter = args.pop();
250
224
  }
251
225
 
252
- return this.forDescendants(function (el) {
253
- if (iter) {
254
- iter(el)
255
- }
256
- el.emit.apply(el, args)
257
- }, true)
258
- }
226
+ return this.forDescendants(function(el) {
227
+ if (iter) iter(el);
228
+ el.emit.apply(el, args);
229
+ }, true);
230
+ };
259
231
 
260
- Node.prototype.emitAncestors = function () {
261
- let args = Array.prototype.slice(arguments),
262
- iter
232
+ Node.prototype.emitAncestors = function() {
233
+ var args = Array.prototype.slice(arguments)
234
+ , iter;
263
235
 
264
236
  if (typeof args[args.length - 1] === 'function') {
265
- iter = args.pop()
237
+ iter = args.pop();
266
238
  }
267
239
 
268
- return this.forAncestors(function (el) {
269
- if (iter) {
270
- iter(el)
271
- }
272
- el.emit.apply(el, args)
273
- }, true)
274
- }
240
+ return this.forAncestors(function(el) {
241
+ if (iter) iter(el);
242
+ el.emit.apply(el, args);
243
+ }, true);
244
+ };
275
245
 
276
- Node.prototype.hasDescendant = function (target) {
246
+ Node.prototype.hasDescendant = function(target) {
277
247
  return (function find(el) {
278
- for (let i = 0; i < el.children.length; i++) {
248
+ for (var i = 0; i < el.children.length; i++) {
279
249
  if (el.children[i] === target) {
280
- return true
250
+ return true;
281
251
  }
282
252
  if (find(el.children[i]) === true) {
283
- return true
253
+ return true;
284
254
  }
285
255
  }
286
- return false
287
- })(this)
288
- }
289
-
290
- Node.prototype.hasAncestor = function (target) {
291
- let el = this
292
- while ((el = el.parent)) {
293
- if (el === target) {
294
- return true
295
- }
256
+ return false;
257
+ })(this);
258
+ };
259
+
260
+ Node.prototype.hasAncestor = function(target) {
261
+ var el = this;
262
+ while (el = el.parent) {
263
+ if (el === target) return true;
296
264
  }
297
- return false
298
- }
265
+ return false;
266
+ };
299
267
 
300
- Node.prototype.get = function (name, value) {
268
+ Node.prototype.get = function(name, value) {
301
269
  if (this.data.hasOwnProperty(name)) {
302
- return this.data[name]
270
+ return this.data[name];
303
271
  }
304
- return value
305
- }
272
+ return value;
273
+ };
306
274
 
307
- Node.prototype.set = function (name, value) {
308
- return (this.data[name] = value)
309
- }
275
+ Node.prototype.set = function(name, value) {
276
+ return this.data[name] = value;
277
+ };
310
278
 
311
279
  /**
312
280
  * Expose
313
281
  */
314
282
 
315
- module.exports = Node
283
+ module.exports = Node;