@socketsecurity/cli-with-sentry 0.15.11 → 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 (402) 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 +3 -1
  347. package/external/@socketsecurity/registry/lib/logger.js +149 -69
  348. package/external/@socketsecurity/registry/package.json +2 -2
  349. package/external/blessed/lib/alias.js +475 -468
  350. package/external/blessed/lib/blessed.js +12 -12
  351. package/external/blessed/lib/colors.js +234 -194
  352. package/external/blessed/lib/events.js +64 -70
  353. package/external/blessed/lib/gpmclient.js +117 -141
  354. package/external/blessed/lib/helpers.js +89 -94
  355. package/external/blessed/lib/keys.js +169 -342
  356. package/external/blessed/lib/program.js +2130 -2365
  357. package/external/blessed/lib/tput.js +1183 -1276
  358. package/external/blessed/lib/unicode.js +400 -522
  359. package/external/blessed/lib/widget.js +14 -14
  360. package/external/blessed/lib/widgets/ansiimage.js +90 -96
  361. package/external/blessed/lib/widgets/bigtext.js +91 -102
  362. package/external/blessed/lib/widgets/box.js +8 -8
  363. package/external/blessed/lib/widgets/button.js +23 -23
  364. package/external/blessed/lib/widgets/checkbox.js +50 -54
  365. package/external/blessed/lib/widgets/element.js +1415 -1716
  366. package/external/blessed/lib/widgets/filemanager.js +107 -118
  367. package/external/blessed/lib/widgets/form.js +144 -178
  368. package/external/blessed/lib/widgets/image.js +26 -36
  369. package/external/blessed/lib/widgets/input.js +8 -8
  370. package/external/blessed/lib/widgets/layout.js +103 -119
  371. package/external/blessed/lib/widgets/line.js +17 -20
  372. package/external/blessed/lib/widgets/list.js +349 -402
  373. package/external/blessed/lib/widgets/listbar.js +265 -306
  374. package/external/blessed/lib/widgets/listtable.js +133 -146
  375. package/external/blessed/lib/widgets/loading.js +31 -31
  376. package/external/blessed/lib/widgets/log.js +41 -40
  377. package/external/blessed/lib/widgets/message.js +64 -86
  378. package/external/blessed/lib/widgets/node.js +175 -207
  379. package/external/blessed/lib/widgets/overlayimage.js +360 -437
  380. package/external/blessed/lib/widgets/progressbar.js +79 -88
  381. package/external/blessed/lib/widgets/prompt.js +54 -61
  382. package/external/blessed/lib/widgets/question.js +48 -61
  383. package/external/blessed/lib/widgets/radiobutton.js +26 -27
  384. package/external/blessed/lib/widgets/radioset.js +8 -8
  385. package/external/blessed/lib/widgets/screen.js +1186 -1375
  386. package/external/blessed/lib/widgets/scrollablebox.js +202 -228
  387. package/external/blessed/lib/widgets/scrollabletext.js +9 -9
  388. package/external/blessed/lib/widgets/table.js +187 -216
  389. package/external/blessed/lib/widgets/terminal.js +258 -298
  390. package/external/blessed/lib/widgets/text.js +9 -9
  391. package/external/blessed/lib/widgets/textarea.js +188 -222
  392. package/external/blessed/lib/widgets/textbox.js +34 -36
  393. package/external/blessed/lib/widgets/video.js +55 -59
  394. package/external/blessed/usr/fonts/ter-u14b.json +1 -1
  395. package/external/blessed/usr/fonts/ter-u14n.json +1 -1
  396. package/external/blessed/vendor/tng.js +1016 -1144
  397. package/external/blessed-contrib/lib/layout/grid.js +345 -377
  398. package/external/blessed-contrib/lib/widget/charts/bar.js +6612 -7139
  399. package/external/blessed-contrib/lib/widget/charts/line.js +16224 -23941
  400. package/external/blessed-contrib/lib/widget/table.js +78 -96
  401. package/package.json +8 -8
  402. package/dist/types/commands/cdxgen/run-cdxgen.d.mts.map +0 -1
@@ -10,13 +10,13 @@
10
10
  * Modules
11
11
  */
12
12
 
13
- const fs = require('fs'),
14
- cp = require('child_process')
13
+ var fs = require('fs')
14
+ , cp = require('child_process');
15
15
 
16
- const helpers = require('../helpers')
16
+ var helpers = require('../helpers');
17
17
 
18
- const Node = require('./node')
19
- const Box = require('./box')
18
+ var Node = require('./node');
19
+ var Box = require('./box');
20
20
 
21
21
  /**
22
22
  * OverlayImage
@@ -25,64 +25,59 @@ const Box = require('./box')
25
25
  */
26
26
 
27
27
  function OverlayImage(options) {
28
- const self = this
28
+ var self = this;
29
29
 
30
30
  if (!(this instanceof Node)) {
31
- return new OverlayImage(options)
31
+ return new OverlayImage(options);
32
32
  }
33
33
 
34
- options = options || {}
34
+ options = options || {};
35
35
 
36
- Box.call(this, options)
36
+ Box.call(this, options);
37
37
 
38
38
  if (options.w3m) {
39
- OverlayImage.w3mdisplay = options.w3m
39
+ OverlayImage.w3mdisplay = options.w3m;
40
40
  }
41
41
 
42
42
  if (OverlayImage.hasW3MDisplay == null) {
43
43
  if (fs.existsSync(OverlayImage.w3mdisplay)) {
44
- OverlayImage.hasW3MDisplay = true
44
+ OverlayImage.hasW3MDisplay = true;
45
45
  } else if (options.search !== false) {
46
- const file =
47
- helpers.findFile('/usr', 'w3mimgdisplay') ||
48
- helpers.findFile('/lib', 'w3mimgdisplay') ||
49
- helpers.findFile('/bin', 'w3mimgdisplay')
46
+ var file = helpers.findFile('/usr', 'w3mimgdisplay')
47
+ || helpers.findFile('/lib', 'w3mimgdisplay')
48
+ || helpers.findFile('/bin', 'w3mimgdisplay');
50
49
  if (file) {
51
- OverlayImage.hasW3MDisplay = true
52
- OverlayImage.w3mdisplay = file
50
+ OverlayImage.hasW3MDisplay = true;
51
+ OverlayImage.w3mdisplay = file;
53
52
  } else {
54
- OverlayImage.hasW3MDisplay = false
53
+ OverlayImage.hasW3MDisplay = false;
55
54
  }
56
55
  }
57
56
  }
58
57
 
59
- this.on('hide', function () {
60
- self._lastFile = self.file
61
- self.clearImage()
62
- })
58
+ this.on('hide', function() {
59
+ self._lastFile = self.file;
60
+ self.clearImage();
61
+ });
63
62
 
64
- this.on('show', function () {
65
- if (!self._lastFile) {
66
- return
67
- }
68
- self.setImage(self._lastFile)
69
- })
63
+ this.on('show', function() {
64
+ if (!self._lastFile) return;
65
+ self.setImage(self._lastFile);
66
+ });
70
67
 
71
- this.on('detach', function () {
72
- self._lastFile = self.file
73
- self.clearImage()
74
- })
68
+ this.on('detach', function() {
69
+ self._lastFile = self.file;
70
+ self.clearImage();
71
+ });
75
72
 
76
- this.on('attach', function () {
77
- if (!self._lastFile) {
78
- return
79
- }
80
- self.setImage(self._lastFile)
81
- })
73
+ this.on('attach', function() {
74
+ if (!self._lastFile) return;
75
+ self.setImage(self._lastFile);
76
+ });
82
77
 
83
- this.onScreenEvent('resize', function () {
84
- self._needsRatio = true
85
- })
78
+ this.onScreenEvent('resize', function() {
79
+ self._needsRatio = true;
80
+ });
86
81
 
87
82
  // Get images to overlap properly. Maybe not worth it:
88
83
  // this.onScreenEvent('render', function() {
@@ -111,133 +106,113 @@ function OverlayImage(options) {
111
106
  // recurse(self.screen);
112
107
  // });
113
108
 
114
- this.onScreenEvent('render', function () {
115
- self.screen.program.flush()
109
+ this.onScreenEvent('render', function() {
110
+ self.screen.program.flush();
116
111
  if (!self._noImage) {
117
- self.setImage(self.file)
112
+ self.setImage(self.file);
118
113
  }
119
- })
114
+ });
120
115
 
121
116
  if (this.options.file || this.options.img) {
122
- this.setImage(this.options.file || this.options.img)
117
+ this.setImage(this.options.file || this.options.img);
123
118
  }
124
119
  }
125
120
 
126
- Object.setPrototypeOf(OverlayImage.prototype, Box.prototype)
121
+ Object.setPrototypeOf(OverlayImage.prototype, Box.prototype);
127
122
 
128
- OverlayImage.prototype.type = 'overlayimage'
123
+ OverlayImage.prototype.type = 'overlayimage';
129
124
 
130
- OverlayImage.w3mdisplay = '/usr/lib/w3m/w3mimgdisplay'
125
+ OverlayImage.w3mdisplay = '/usr/lib/w3m/w3mimgdisplay';
131
126
 
132
- OverlayImage.prototype.spawn = function (file, args, opt, callback) {
133
- let spawn = require('child_process').spawn,
134
- ps
127
+ OverlayImage.prototype.spawn = function(file, args, opt, callback) {
128
+ var spawn = require('child_process').spawn
129
+ , ps;
135
130
 
136
- opt = opt || {}
137
- ps = spawn(file, args, opt)
131
+ opt = opt || {};
132
+ ps = spawn(file, args, opt);
138
133
 
139
- ps.on('error', function (err) {
140
- if (!callback) {
141
- return
142
- }
143
- return callback(err)
144
- })
134
+ ps.on('error', function(err) {
135
+ if (!callback) return;
136
+ return callback(err);
137
+ });
145
138
 
146
- ps.on('exit', function (code) {
147
- if (!callback) {
148
- return
149
- }
150
- if (code !== 0) {
151
- return callback(new Error('Exit Code: ' + code))
152
- }
153
- return callback(null, code === 0)
154
- })
139
+ ps.on('exit', function(code) {
140
+ if (!callback) return;
141
+ if (code !== 0) return callback(new Error('Exit Code: ' + code));
142
+ return callback(null, code === 0);
143
+ });
155
144
 
156
- return ps
157
- }
145
+ return ps;
146
+ };
158
147
 
159
- OverlayImage.prototype.setImage = function (img, callback) {
160
- const self = this
148
+ OverlayImage.prototype.setImage = function(img, callback) {
149
+ var self = this;
161
150
 
162
151
  if (this._settingImage) {
163
- this._queue = this._queue || []
164
- this._queue.push([img, callback])
165
- return
152
+ this._queue = this._queue || [];
153
+ this._queue.push([img, callback]);
154
+ return;
166
155
  }
167
- this._settingImage = true
156
+ this._settingImage = true;
168
157
 
169
- const reset = function () {
170
- self._settingImage = false
171
- self._queue = self._queue || []
172
- const item = self._queue.shift()
158
+ var reset = function() {
159
+ self._settingImage = false;
160
+ self._queue = self._queue || [];
161
+ var item = self._queue.shift();
173
162
  if (item) {
174
- self.setImage(item[0], item[1])
163
+ self.setImage(item[0], item[1]);
175
164
  }
176
- }
165
+ };
177
166
 
178
167
  if (OverlayImage.hasW3MDisplay === false) {
179
- reset()
180
- if (!callback) {
181
- return
182
- }
183
- return callback(new Error('W3M Image Display not available.'))
168
+ reset();
169
+ if (!callback) return;
170
+ return callback(new Error('W3M Image Display not available.'));
184
171
  }
185
172
 
186
173
  if (!img) {
187
- reset()
188
- if (!callback) {
189
- return
190
- }
191
- return callback(new Error('No image.'))
174
+ reset();
175
+ if (!callback) return;
176
+ return callback(new Error('No image.'));
192
177
  }
193
178
 
194
- this.file = img
179
+ this.file = img;
195
180
 
196
- return this.getPixelRatio(function (err, ratio) {
181
+ return this.getPixelRatio(function(err, ratio) {
197
182
  if (err) {
198
- reset()
199
- if (!callback) {
200
- return
201
- }
202
- return callback(err)
183
+ reset();
184
+ if (!callback) return;
185
+ return callback(err);
203
186
  }
204
187
 
205
- return self.renderImage(img, ratio, function (err, success) {
188
+ return self.renderImage(img, ratio, function(err, success) {
206
189
  if (err) {
207
- reset()
208
- if (!callback) {
209
- return
210
- }
211
- return callback(err)
190
+ reset();
191
+ if (!callback) return;
192
+ return callback(err);
212
193
  }
213
194
 
214
195
  if (self.shrink || self.options.autofit) {
215
- delete self.shrink
216
- delete self.options.shrink
217
- self.options.autofit = true
218
- return self.imageSize(function (err, size) {
196
+ delete self.shrink;
197
+ delete self.options.shrink;
198
+ self.options.autofit = true;
199
+ return self.imageSize(function(err, size) {
219
200
  if (err) {
220
- reset()
221
- if (!callback) {
222
- return
223
- }
224
- return callback(err)
201
+ reset();
202
+ if (!callback) return;
203
+ return callback(err);
225
204
  }
226
205
 
227
- if (
228
- self._lastSize &&
229
- ratio.tw === self._lastSize.tw &&
230
- ratio.th === self._lastSize.th &&
231
- size.width === self._lastSize.width &&
232
- size.height === self._lastSize.height &&
233
- self.aleft === self._lastSize.aleft &&
234
- self.atop === self._lastSize.atop
235
- ) {
236
- reset()
237
- if (!callback) {
238
- return
239
- }
240
- return callback(null, success)
206
+ if (self._lastSize
207
+ && ratio.tw === self._lastSize.tw
208
+ && ratio.th === self._lastSize.th
209
+ && size.width === self._lastSize.width
210
+ && size.height === self._lastSize.height
211
+ && self.aleft === self._lastSize.aleft
212
+ && self.atop === self._lastSize.atop) {
213
+ reset();
214
+ if (!callback) return;
215
+ return callback(null, success);
241
216
  }
242
217
 
243
218
  self._lastSize = {
@@ -247,407 +222,343 @@ OverlayImage.prototype.setImage = function (img, callback) {
247
222
  height: size.height,
248
223
  aleft: self.aleft,
249
224
  atop: self.atop
250
- }
225
+ };
251
226
 
252
- self.position.width = (size.width / ratio.tw) | 0
253
- self.position.height = (size.height / ratio.th) | 0
227
+ self.position.width = size.width / ratio.tw | 0;
228
+ self.position.height = size.height / ratio.th | 0;
254
229
 
255
- self._noImage = true
256
- self.screen.render()
257
- self._noImage = false
230
+ self._noImage = true;
231
+ self.screen.render();
232
+ self._noImage = false;
258
233
 
259
- reset()
260
- return self.renderImage(img, ratio, callback)
261
- })
234
+ reset();
235
+ return self.renderImage(img, ratio, callback);
236
+ });
262
237
  }
263
238
 
264
- reset()
265
- if (!callback) {
266
- return
267
- }
268
- return callback(null, success)
269
- })
270
- })
271
- }
239
+ reset();
240
+ if (!callback) return;
241
+ return callback(null, success);
242
+ });
243
+ });
244
+ };
272
245
 
273
- OverlayImage.prototype.renderImage = function (img, ratio, callback) {
274
- const self = this
246
+ OverlayImage.prototype.renderImage = function(img, ratio, callback) {
247
+ var self = this;
275
248
 
276
249
  if (cp.execSync) {
277
- callback =
278
- callback ||
279
- function (err, result) {
280
- return result
281
- }
250
+ callback = callback || function(err, result) { return result; };
282
251
  try {
283
- return callback(null, this.renderImageSync(img, ratio))
252
+ return callback(null, this.renderImageSync(img, ratio));
284
253
  } catch (e) {
285
- return callback(e)
254
+ return callback(e);
286
255
  }
287
256
  }
288
257
 
289
258
  if (OverlayImage.hasW3MDisplay === false) {
290
- if (!callback) {
291
- return
292
- }
293
- return callback(new Error('W3M Image Display not available.'))
259
+ if (!callback) return;
260
+ return callback(new Error('W3M Image Display not available.'));
294
261
  }
295
262
 
296
263
  if (!ratio) {
297
- if (!callback) {
298
- return
299
- }
300
- return callback(new Error('No ratio.'))
264
+ if (!callback) return;
265
+ return callback(new Error('No ratio.'));
301
266
  }
302
267
 
303
268
  // clearImage unsets these:
304
- const _file = self.file
305
- const _lastSize = self._lastSize
306
- return self.clearImage(function (err) {
307
- if (err) {
308
- return callback(err)
309
- }
269
+ var _file = self.file;
270
+ var _lastSize = self._lastSize;
271
+ return self.clearImage(function(err) {
272
+ if (err) return callback(err);
310
273
 
311
- self.file = _file
312
- self._lastSize = _lastSize
274
+ self.file = _file;
275
+ self._lastSize = _lastSize;
313
276
 
314
- const opt = {
277
+ var opt = {
315
278
  stdio: 'pipe',
316
279
  env: process.env,
317
280
  cwd: process.env.HOME
318
- }
319
-
320
- const ps = self.spawn(
321
- OverlayImage.w3mdisplay,
322
- [],
323
- opt,
324
- function (err, success) {
325
- if (!callback) {
326
- return
327
- }
328
- return err ? callback(err) : callback(null, success)
329
- }
330
- )
331
-
332
- const width = (self.width * ratio.tw) | 0,
333
- height = (self.height * ratio.th) | 0,
334
- aleft = (self.aleft * ratio.tw) | 0,
335
- atop = (self.atop * ratio.th) | 0
336
-
337
- const input =
338
- '0;1;' +
339
- aleft +
340
- ';' +
341
- atop +
342
- ';' +
343
- width +
344
- ';' +
345
- height +
346
- ';;;;;' +
347
- img +
348
- '\n4;\n3;\n'
281
+ };
282
+
283
+ var ps = self.spawn(OverlayImage.w3mdisplay, [], opt, function(err, success) {
284
+ if (!callback) return;
285
+ return err
286
+ ? callback(err)
287
+ : callback(null, success);
288
+ });
289
+
290
+ var width = self.width * ratio.tw | 0
291
+ , height = self.height * ratio.th | 0
292
+ , aleft = self.aleft * ratio.tw | 0
293
+ , atop = self.atop * ratio.th | 0;
294
+
295
+ var input = '0;1;'
296
+ + aleft + ';'
297
+ + atop + ';'
298
+ + width + ';'
299
+ + height + ';;;;;'
300
+ + img
301
+ + '\n4;\n3;\n';
349
302
 
350
303
  self._props = {
351
304
  aleft: aleft,
352
305
  atop: atop,
353
306
  width: width,
354
307
  height: height
355
- }
308
+ };
356
309
 
357
- ps.stdin.write(input)
358
- ps.stdin.end()
359
- })
360
- }
310
+ ps.stdin.write(input);
311
+ ps.stdin.end();
312
+ });
313
+ };
361
314
 
362
- OverlayImage.prototype.clearImage = function (callback) {
315
+ OverlayImage.prototype.clearImage = function(callback) {
363
316
  if (cp.execSync) {
364
- callback =
365
- callback ||
366
- function (err, result) {
367
- return result
368
- }
317
+ callback = callback || function(err, result) { return result; };
369
318
  try {
370
- return callback(null, this.clearImageSync())
319
+ return callback(null, this.clearImageSync());
371
320
  } catch (e) {
372
- return callback(e)
321
+ return callback(e);
373
322
  }
374
323
  }
375
324
 
376
325
  if (OverlayImage.hasW3MDisplay === false) {
377
- if (!callback) {
378
- return
379
- }
380
- return callback(new Error('W3M Image Display not available.'))
326
+ if (!callback) return;
327
+ return callback(new Error('W3M Image Display not available.'));
381
328
  }
382
329
 
383
330
  if (!this._props) {
384
- if (!callback) {
385
- return
386
- }
387
- return callback(null)
331
+ if (!callback) return;
332
+ return callback(null);
388
333
  }
389
334
 
390
- const opt = {
335
+ var opt = {
391
336
  stdio: 'pipe',
392
337
  env: process.env,
393
338
  cwd: process.env.HOME
394
- }
339
+ };
395
340
 
396
- const ps = this.spawn(
397
- OverlayImage.w3mdisplay,
398
- [],
399
- opt,
400
- function (err, success) {
401
- if (!callback) {
402
- return
403
- }
404
- return err ? callback(err) : callback(null, success)
405
- }
406
- )
341
+ var ps = this.spawn(OverlayImage.w3mdisplay, [], opt, function(err, success) {
342
+ if (!callback) return;
343
+ return err
344
+ ? callback(err)
345
+ : callback(null, success);
346
+ });
407
347
 
408
- let width = this._props.width + 2,
409
- height = this._props.height + 2,
410
- aleft = this._props.aleft,
411
- atop = this._props.atop
348
+ var width = this._props.width + 2
349
+ , height = this._props.height + 2
350
+ , aleft = this._props.aleft
351
+ , atop = this._props.atop;
412
352
 
413
353
  if (this._drag) {
414
- aleft -= 10
415
- atop -= 10
416
- width += 10
417
- height += 10
354
+ aleft -= 10;
355
+ atop -= 10;
356
+ width += 10;
357
+ height += 10;
418
358
  }
419
359
 
420
- const input =
421
- '6;' + aleft + ';' + atop + ';' + width + ';' + height + '\n4;\n3;\n'
360
+ var input = '6;'
361
+ + aleft + ';'
362
+ + atop + ';'
363
+ + width + ';'
364
+ + height
365
+ + '\n4;\n3;\n';
422
366
 
423
- delete this.file
424
- delete this._props
425
- delete this._lastSize
367
+ delete this.file;
368
+ delete this._props;
369
+ delete this._lastSize;
426
370
 
427
- ps.stdin.write(input)
428
- ps.stdin.end()
429
- }
371
+ ps.stdin.write(input);
372
+ ps.stdin.end();
373
+ };
430
374
 
431
- OverlayImage.prototype.imageSize = function (callback) {
432
- const img = this.file
375
+ OverlayImage.prototype.imageSize = function(callback) {
376
+ var img = this.file;
433
377
 
434
378
  if (cp.execSync) {
435
- callback =
436
- callback ||
437
- function (err, result) {
438
- return result
439
- }
379
+ callback = callback || function(err, result) { return result; };
440
380
  try {
441
- return callback(null, this.imageSizeSync())
381
+ return callback(null, this.imageSizeSync());
442
382
  } catch (e) {
443
- return callback(e)
383
+ return callback(e);
444
384
  }
445
385
  }
446
386
 
447
387
  if (OverlayImage.hasW3MDisplay === false) {
448
- if (!callback) {
449
- return
450
- }
451
- return callback(new Error('W3M Image Display not available.'))
388
+ if (!callback) return;
389
+ return callback(new Error('W3M Image Display not available.'));
452
390
  }
453
391
 
454
392
  if (!img) {
455
- if (!callback) {
456
- return
457
- }
458
- return callback(new Error('No image.'))
393
+ if (!callback) return;
394
+ return callback(new Error('No image.'));
459
395
  }
460
396
 
461
- const opt = {
397
+ var opt = {
462
398
  stdio: 'pipe',
463
399
  env: process.env,
464
400
  cwd: process.env.HOME
465
- }
401
+ };
466
402
 
467
- const ps = this.spawn(OverlayImage.w3mdisplay, [], opt)
403
+ var ps = this.spawn(OverlayImage.w3mdisplay, [], opt);
468
404
 
469
- let buf = ''
405
+ var buf = '';
470
406
 
471
- ps.stdout.setEncoding('utf8')
407
+ ps.stdout.setEncoding('utf8');
472
408
 
473
- ps.stdout.on('data', function (data) {
474
- buf += data
475
- })
409
+ ps.stdout.on('data', function(data) {
410
+ buf += data;
411
+ });
476
412
 
477
- ps.on('error', function (err) {
478
- if (!callback) {
479
- return
480
- }
481
- return callback(err)
482
- })
413
+ ps.on('error', function(err) {
414
+ if (!callback) return;
415
+ return callback(err);
416
+ });
483
417
 
484
- ps.on('exit', function () {
485
- if (!callback) {
486
- return
487
- }
488
- const size = buf.trim().split(/\s+/)
418
+ ps.on('exit', function() {
419
+ if (!callback) return;
420
+ var size = buf.trim().split(/\s+/);
489
421
  return callback(null, {
490
422
  raw: buf.trim(),
491
423
  width: +size[0],
492
424
  height: +size[1]
493
- })
494
- })
425
+ });
426
+ });
495
427
 
496
- const input = '5;' + img + '\n'
428
+ var input = '5;' + img + '\n';
497
429
 
498
- ps.stdin.write(input)
499
- ps.stdin.end()
500
- }
430
+ ps.stdin.write(input);
431
+ ps.stdin.end();
432
+ };
501
433
 
502
- OverlayImage.prototype.termSize = function (callback) {
503
- const self = this
434
+ OverlayImage.prototype.termSize = function(callback) {
435
+ var self = this;
504
436
 
505
437
  if (cp.execSync) {
506
- callback =
507
- callback ||
508
- function (err, result) {
509
- return result
510
- }
438
+ callback = callback || function(err, result) { return result; };
511
439
  try {
512
- return callback(null, this.termSizeSync())
440
+ return callback(null, this.termSizeSync());
513
441
  } catch (e) {
514
- return callback(e)
442
+ return callback(e);
515
443
  }
516
444
  }
517
445
 
518
446
  if (OverlayImage.hasW3MDisplay === false) {
519
- if (!callback) {
520
- return
521
- }
522
- return callback(new Error('W3M Image Display not available.'))
447
+ if (!callback) return;
448
+ return callback(new Error('W3M Image Display not available.'));
523
449
  }
524
450
 
525
- const opt = {
451
+ var opt = {
526
452
  stdio: 'pipe',
527
453
  env: process.env,
528
454
  cwd: process.env.HOME
529
- }
455
+ };
530
456
 
531
- const ps = this.spawn(OverlayImage.w3mdisplay, ['-test'], opt)
457
+ var ps = this.spawn(OverlayImage.w3mdisplay, ['-test'], opt);
532
458
 
533
- let buf = ''
459
+ var buf = '';
534
460
 
535
- ps.stdout.setEncoding('utf8')
461
+ ps.stdout.setEncoding('utf8');
536
462
 
537
- ps.stdout.on('data', function (data) {
538
- buf += data
539
- })
463
+ ps.stdout.on('data', function(data) {
464
+ buf += data;
465
+ });
540
466
 
541
- ps.on('error', function (err) {
542
- if (!callback) {
543
- return
544
- }
545
- return callback(err)
546
- })
467
+ ps.on('error', function(err) {
468
+ if (!callback) return;
469
+ return callback(err);
470
+ });
547
471
 
548
- ps.on('exit', function () {
549
- if (!callback) {
550
- return
551
- }
472
+ ps.on('exit', function() {
473
+ if (!callback) return;
552
474
 
553
475
  if (!buf.trim()) {
554
476
  // Bug: w3mimgdisplay will sometimes
555
477
  // output nothing. Try again:
556
- return self.termSize(callback)
478
+ return self.termSize(callback);
557
479
  }
558
480
 
559
- const size = buf.trim().split(/\s+/)
481
+ var size = buf.trim().split(/\s+/);
560
482
 
561
483
  return callback(null, {
562
484
  raw: buf.trim(),
563
485
  width: +size[0],
564
486
  height: +size[1]
565
- })
566
- })
487
+ });
488
+ });
567
489
 
568
- ps.stdin.end()
569
- }
490
+ ps.stdin.end();
491
+ };
570
492
 
571
- OverlayImage.prototype.getPixelRatio = function (callback) {
572
- const self = this
493
+ OverlayImage.prototype.getPixelRatio = function(callback) {
494
+ var self = this;
573
495
 
574
496
  if (cp.execSync) {
575
- callback =
576
- callback ||
577
- function (err, result) {
578
- return result
579
- }
497
+ callback = callback || function(err, result) { return result; };
580
498
  try {
581
- return callback(null, this.getPixelRatioSync())
499
+ return callback(null, this.getPixelRatioSync());
582
500
  } catch (e) {
583
- return callback(e)
501
+ return callback(e);
584
502
  }
585
503
  }
586
504
 
587
505
  // XXX We could cache this, but sometimes it's better
588
506
  // to recalculate to be pixel perfect.
589
507
  if (this._ratio && !this._needsRatio) {
590
- return callback(null, this._ratio)
508
+ return callback(null, this._ratio);
591
509
  }
592
510
 
593
- return this.termSize(function (err, dimensions) {
594
- if (err) {
595
- return callback(err)
596
- }
511
+ return this.termSize(function(err, dimensions) {
512
+ if (err) return callback(err);
597
513
 
598
514
  self._ratio = {
599
515
  tw: dimensions.width / self.screen.width,
600
516
  th: dimensions.height / self.screen.height
601
- }
517
+ };
602
518
 
603
- self._needsRatio = false
519
+ self._needsRatio = false;
604
520
 
605
- return callback(null, self._ratio)
606
- })
607
- }
521
+ return callback(null, self._ratio);
522
+ });
523
+ };
608
524
 
609
- OverlayImage.prototype.renderImageSync = function (img, ratio) {
525
+ OverlayImage.prototype.renderImageSync = function(img, ratio) {
610
526
  if (OverlayImage.hasW3MDisplay === false) {
611
- throw new Error('W3M Image Display not available.')
527
+ throw new Error('W3M Image Display not available.');
612
528
  }
613
529
 
614
530
  if (!ratio) {
615
- throw new Error('No ratio.')
531
+ throw new Error('No ratio.');
616
532
  }
617
533
 
618
534
  // clearImage unsets these:
619
- const _file = this.file
620
- const _lastSize = this._lastSize
621
-
622
- this.clearImageSync()
623
-
624
- this.file = _file
625
- this._lastSize = _lastSize
626
-
627
- const width = (this.width * ratio.tw) | 0,
628
- height = (this.height * ratio.th) | 0,
629
- aleft = (this.aleft * ratio.tw) | 0,
630
- atop = (this.atop * ratio.th) | 0
631
-
632
- const input =
633
- '0;1;' +
634
- aleft +
635
- ';' +
636
- atop +
637
- ';' +
638
- width +
639
- ';' +
640
- height +
641
- ';;;;;' +
642
- img +
643
- '\n4;\n3;\n'
535
+ var _file = this.file;
536
+ var _lastSize = this._lastSize;
537
+
538
+ this.clearImageSync();
539
+
540
+ this.file = _file;
541
+ this._lastSize = _lastSize;
542
+
543
+ var width = this.width * ratio.tw | 0
544
+ , height = this.height * ratio.th | 0
545
+ , aleft = this.aleft * ratio.tw | 0
546
+ , atop = this.atop * ratio.th | 0;
547
+
548
+ var input = '0;1;'
549
+ + aleft + ';'
550
+ + atop + ';'
551
+ + width + ';'
552
+ + height + ';;;;;'
553
+ + img
554
+ + '\n4;\n3;\n';
644
555
 
645
556
  this._props = {
646
557
  aleft: aleft,
647
558
  atop: atop,
648
559
  width: width,
649
560
  height: height
650
- }
561
+ };
651
562
 
652
563
  try {
653
564
  cp.execFileSync(OverlayImage.w3mdisplay, [], {
@@ -655,39 +566,45 @@ OverlayImage.prototype.renderImageSync = function (img, ratio) {
655
566
  encoding: 'utf8',
656
567
  input: input,
657
568
  timeout: 1000
658
- })
659
- } catch (e) {}
569
+ });
570
+ } catch (e) {
571
+ ;
572
+ }
660
573
 
661
- return true
662
- }
574
+ return true;
575
+ };
663
576
 
664
- OverlayImage.prototype.clearImageSync = function () {
577
+ OverlayImage.prototype.clearImageSync = function() {
665
578
  if (OverlayImage.hasW3MDisplay === false) {
666
- throw new Error('W3M Image Display not available.')
579
+ throw new Error('W3M Image Display not available.');
667
580
  }
668
581
 
669
582
  if (!this._props) {
670
- return false
583
+ return false;
671
584
  }
672
585
 
673
- let width = this._props.width + 2,
674
- height = this._props.height + 2,
675
- aleft = this._props.aleft,
676
- atop = this._props.atop
586
+ var width = this._props.width + 2
587
+ , height = this._props.height + 2
588
+ , aleft = this._props.aleft
589
+ , atop = this._props.atop;
677
590
 
678
591
  if (this._drag) {
679
- aleft -= 10
680
- atop -= 10
681
- width += 10
682
- height += 10
592
+ aleft -= 10;
593
+ atop -= 10;
594
+ width += 10;
595
+ height += 10;
683
596
  }
684
597
 
685
- const input =
686
- '6;' + aleft + ';' + atop + ';' + width + ';' + height + '\n4;\n3;\n'
598
+ var input = '6;'
599
+ + aleft + ';'
600
+ + atop + ';'
601
+ + width + ';'
602
+ + height
603
+ + '\n4;\n3;\n';
687
604
 
688
- delete this.file
689
- delete this._props
690
- delete this._lastSize
605
+ delete this.file;
606
+ delete this._props;
607
+ delete this._lastSize;
691
608
 
692
609
  try {
693
610
  cp.execFileSync(OverlayImage.w3mdisplay, [], {
@@ -695,25 +612,27 @@ OverlayImage.prototype.clearImageSync = function () {
695
612
  encoding: 'utf8',
696
613
  input: input,
697
614
  timeout: 1000
698
- })
699
- } catch (e) {}
615
+ });
616
+ } catch (e) {
617
+ ;
618
+ }
700
619
 
701
- return true
702
- }
620
+ return true;
621
+ };
703
622
 
704
- OverlayImage.prototype.imageSizeSync = function () {
705
- const img = this.file
623
+ OverlayImage.prototype.imageSizeSync = function() {
624
+ var img = this.file;
706
625
 
707
626
  if (OverlayImage.hasW3MDisplay === false) {
708
- throw new Error('W3M Image Display not available.')
627
+ throw new Error('W3M Image Display not available.');
709
628
  }
710
629
 
711
630
  if (!img) {
712
- throw new Error('No image.')
631
+ throw new Error('No image.');
713
632
  }
714
633
 
715
- let buf = ''
716
- const input = '5;' + img + '\n'
634
+ var buf = '';
635
+ var input = '5;' + img + '\n';
717
636
 
718
637
  try {
719
638
  buf = cp.execFileSync(OverlayImage.w3mdisplay, [], {
@@ -721,76 +640,80 @@ OverlayImage.prototype.imageSizeSync = function () {
721
640
  encoding: 'utf8',
722
641
  input: input,
723
642
  timeout: 1000
724
- })
725
- } catch (e) {}
643
+ });
644
+ } catch (e) {
645
+ ;
646
+ }
726
647
 
727
- const size = buf.trim().split(/\s+/)
648
+ var size = buf.trim().split(/\s+/);
728
649
 
729
650
  return {
730
651
  raw: buf.trim(),
731
652
  width: +size[0],
732
653
  height: +size[1]
733
- }
734
- }
654
+ };
655
+ };
735
656
 
736
- OverlayImage.prototype.termSizeSync = function (_, recurse) {
657
+ OverlayImage.prototype.termSizeSync = function(_, recurse) {
737
658
  if (OverlayImage.hasW3MDisplay === false) {
738
- throw new Error('W3M Image Display not available.')
659
+ throw new Error('W3M Image Display not available.');
739
660
  }
740
661
 
741
- let buf = ''
662
+ var buf = '';
742
663
 
743
664
  try {
744
665
  buf = cp.execFileSync(OverlayImage.w3mdisplay, ['-test'], {
745
666
  env: process.env,
746
667
  encoding: 'utf8',
747
668
  timeout: 1000
748
- })
749
- } catch (e) {}
669
+ });
670
+ } catch (e) {
671
+ ;
672
+ }
750
673
 
751
674
  if (!buf.trim()) {
752
675
  // Bug: w3mimgdisplay will sometimes
753
676
  // output nothing. Try again:
754
- recurse = recurse || 0
677
+ recurse = recurse || 0;
755
678
  if (++recurse === 5) {
756
- throw new Error('Term size not determined.')
679
+ throw new Error('Term size not determined.');
757
680
  }
758
- return this.termSizeSync(_, recurse)
681
+ return this.termSizeSync(_, recurse);
759
682
  }
760
683
 
761
- const size = buf.trim().split(/\s+/)
684
+ var size = buf.trim().split(/\s+/);
762
685
 
763
686
  return {
764
687
  raw: buf.trim(),
765
688
  width: +size[0],
766
689
  height: +size[1]
767
- }
768
- }
690
+ };
691
+ };
769
692
 
770
- OverlayImage.prototype.getPixelRatioSync = function () {
693
+ OverlayImage.prototype.getPixelRatioSync = function() {
771
694
  // XXX We could cache this, but sometimes it's better
772
695
  // to recalculate to be pixel perfect.
773
696
  if (this._ratio && !this._needsRatio) {
774
- return this._ratio
697
+ return this._ratio;
775
698
  }
776
- this._needsRatio = false
699
+ this._needsRatio = false;
777
700
 
778
- const dimensions = this.termSizeSync()
701
+ var dimensions = this.termSizeSync();
779
702
 
780
703
  this._ratio = {
781
704
  tw: dimensions.width / this.screen.width,
782
705
  th: dimensions.height / this.screen.height
783
- }
706
+ };
784
707
 
785
- return this._ratio
786
- }
708
+ return this._ratio;
709
+ };
787
710
 
788
- OverlayImage.prototype.displayImage = function (callback) {
789
- return this.screen.displayImage(this.file, callback)
790
- }
711
+ OverlayImage.prototype.displayImage = function(callback) {
712
+ return this.screen.displayImage(this.file, callback);
713
+ };
791
714
 
792
715
  /**
793
716
  * Expose
794
717
  */
795
718
 
796
- module.exports = OverlayImage
719
+ module.exports = OverlayImage;