@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 Element = require('./element')
13
+ var Node = require('./node');
14
+ var Element = require('./element');
15
15
 
16
16
  /**
17
17
  * Text
@@ -19,19 +19,19 @@ const Element = require('./element')
19
19
 
20
20
  function Text(options) {
21
21
  if (!(this instanceof Node)) {
22
- return new Text(options)
22
+ return new Text(options);
23
23
  }
24
- options = options || {}
25
- options.shrink = true
26
- Element.call(this, options)
24
+ options = options || {};
25
+ options.shrink = true;
26
+ Element.call(this, options);
27
27
  }
28
28
 
29
- Object.setPrototypeOf(Text.prototype, Element.prototype)
29
+ Object.setPrototypeOf(Text.prototype, Element.prototype);
30
30
 
31
- Text.prototype.type = 'text'
31
+ Text.prototype.type = 'text';
32
32
 
33
33
  /**
34
34
  * Expose
35
35
  */
36
36
 
37
- module.exports = Text
37
+ module.exports = Text;
@@ -10,369 +10,335 @@
10
10
  * Modules
11
11
  */
12
12
 
13
- const unicode = require('../unicode')
13
+ var unicode = require('../unicode');
14
14
 
15
- const nextTick = global.setImmediate || process.nextTick.bind(process)
15
+ var nextTick = global.setImmediate || process.nextTick.bind(process);
16
16
 
17
- const Node = require('./node')
18
- const Input = require('./input')
17
+ var Node = require('./node');
18
+ var Input = require('./input');
19
19
 
20
20
  /**
21
21
  * Textarea
22
22
  */
23
23
 
24
24
  function Textarea(options) {
25
- const self = this
25
+ var self = this;
26
26
 
27
27
  if (!(this instanceof Node)) {
28
- return new Textarea(options)
28
+ return new Textarea(options);
29
29
  }
30
30
 
31
- options = options || {}
31
+ options = options || {};
32
32
 
33
- options.scrollable = options.scrollable !== false
33
+ options.scrollable = options.scrollable !== false;
34
34
 
35
- Input.call(this, options)
35
+ Input.call(this, options);
36
36
 
37
- this.screen._listenKeys(this)
37
+ this.screen._listenKeys(this);
38
38
 
39
- this.value = options.value || ''
39
+ this.value = options.value || '';
40
40
 
41
- this.__updateCursor = this._updateCursor.bind(this)
42
- this.on('resize', this.__updateCursor)
43
- this.on('move', this.__updateCursor)
41
+ this.__updateCursor = this._updateCursor.bind(this);
42
+ this.on('resize', this.__updateCursor);
43
+ this.on('move', this.__updateCursor);
44
44
 
45
45
  if (options.inputOnFocus) {
46
- this.on('focus', this.readInput.bind(this, null))
46
+ this.on('focus', this.readInput.bind(this, null));
47
47
  }
48
48
 
49
49
  if (!options.inputOnFocus && options.keys) {
50
- this.on('keypress', function (ch, key) {
51
- if (self._reading) {
52
- return
53
- }
50
+ this.on('keypress', function(ch, key) {
51
+ if (self._reading) return;
54
52
  if (key.name === 'enter' || (options.vi && key.name === 'i')) {
55
- return self.readInput()
53
+ return self.readInput();
56
54
  }
57
55
  if (key.name === 'e') {
58
- return self.readEditor()
56
+ return self.readEditor();
59
57
  }
60
- })
58
+ });
61
59
  }
62
60
 
63
61
  if (options.mouse) {
64
- this.on('click', function (data) {
65
- if (self._reading) {
66
- return
67
- }
68
- if (data.button !== 'right') {
69
- return
70
- }
71
- self.readEditor()
72
- })
62
+ this.on('click', function(data) {
63
+ if (self._reading) return;
64
+ if (data.button !== 'right') return;
65
+ self.readEditor();
66
+ });
73
67
  }
74
68
  }
75
69
 
76
- Object.setPrototypeOf(Textarea.prototype, Input.prototype)
70
+ Object.setPrototypeOf(Textarea.prototype, Input.prototype);
77
71
 
78
- Textarea.prototype.type = 'textarea'
72
+ Textarea.prototype.type = 'textarea';
79
73
 
80
- Textarea.prototype._updateCursor = function (get) {
74
+ Textarea.prototype._updateCursor = function(get) {
81
75
  if (this.screen.focused !== this) {
82
- return
76
+ return;
83
77
  }
84
78
 
85
- const lpos = get ? this.lpos : this._getCoords()
86
- if (!lpos) {
87
- return
88
- }
79
+ var lpos = get ? this.lpos : this._getCoords();
80
+ if (!lpos) return;
89
81
 
90
- let last = this._clines[this._clines.length - 1],
91
- program = this.screen.program,
92
- line,
93
- cx,
94
- cy
82
+ var last = this._clines[this._clines.length - 1]
83
+ , program = this.screen.program
84
+ , line
85
+ , cx
86
+ , cy;
95
87
 
96
88
  // Stop a situation where the textarea begins scrolling
97
89
  // and the last cline appears to always be empty from the
98
90
  // _typeScroll `+ '\n'` thing.
99
91
  // Maybe not necessary anymore?
100
92
  if (last === '' && this.value[this.value.length - 1] !== '\n') {
101
- last = this._clines[this._clines.length - 2] || ''
93
+ last = this._clines[this._clines.length - 2] || '';
102
94
  }
103
95
 
104
96
  line = Math.min(
105
97
  this._clines.length - 1 - (this.childBase || 0),
106
- lpos.yl - lpos.yi - this.iheight - 1
107
- )
98
+ (lpos.yl - lpos.yi) - this.iheight - 1);
108
99
 
109
100
  // When calling clearValue() on a full textarea with a border, the first
110
101
  // argument in the above Math.min call ends up being -2. Make sure we stay
111
102
  // positive.
112
- line = Math.max(0, line)
103
+ line = Math.max(0, line);
113
104
 
114
- cy = lpos.yi + this.itop + line
115
- cx = lpos.xi + this.ileft + this.strWidth(last)
105
+ cy = lpos.yi + this.itop + line;
106
+ cx = lpos.xi + this.ileft + this.strWidth(last);
116
107
 
117
108
  // XXX Not sure, but this may still sometimes
118
109
  // cause problems when leaving editor.
119
110
  if (cy === program.y && cx === program.x) {
120
- return
111
+ return;
121
112
  }
122
113
 
123
114
  if (cy === program.y) {
124
115
  if (cx > program.x) {
125
- program.cuf(cx - program.x)
116
+ program.cuf(cx - program.x);
126
117
  } else if (cx < program.x) {
127
- program.cub(program.x - cx)
118
+ program.cub(program.x - cx);
128
119
  }
129
120
  } else if (cx === program.x) {
130
121
  if (cy > program.y) {
131
- program.cud(cy - program.y)
122
+ program.cud(cy - program.y);
132
123
  } else if (cy < program.y) {
133
- program.cuu(program.y - cy)
124
+ program.cuu(program.y - cy);
134
125
  }
135
126
  } else {
136
- program.cup(cy, cx)
127
+ program.cup(cy, cx);
137
128
  }
138
- }
129
+ };
139
130
 
140
131
  Textarea.prototype.input =
141
- Textarea.prototype.setInput =
142
- Textarea.prototype.readInput =
143
- function (callback) {
144
- const self = this,
145
- focused = this.screen.focused === this
146
-
147
- if (this._reading) {
148
- return
149
- }
150
- this._reading = true
132
+ Textarea.prototype.setInput =
133
+ Textarea.prototype.readInput = function(callback) {
134
+ var self = this
135
+ , focused = this.screen.focused === this;
151
136
 
152
- this._callback = callback
137
+ if (this._reading) return;
138
+ this._reading = true;
153
139
 
154
- if (!focused) {
155
- this.screen.saveFocus()
156
- this.focus()
157
- }
140
+ this._callback = callback;
158
141
 
159
- this.screen.grabKeys = true
142
+ if (!focused) {
143
+ this.screen.saveFocus();
144
+ this.focus();
145
+ }
160
146
 
161
- this._updateCursor()
162
- this.screen.program.showCursor()
163
- //this.screen.program.sgr('normal');
147
+ this.screen.grabKeys = true;
164
148
 
165
- this._done = function fn(err, value) {
166
- if (!self._reading) {
167
- return
168
- }
149
+ this._updateCursor();
150
+ this.screen.program.showCursor();
151
+ //this.screen.program.sgr('normal');
169
152
 
170
- if (fn.done) {
171
- return
172
- }
173
- fn.done = true
153
+ this._done = function fn(err, value) {
154
+ if (!self._reading) return;
174
155
 
175
- self._reading = false
156
+ if (fn.done) return;
157
+ fn.done = true;
176
158
 
177
- delete self._callback
178
- delete self._done
159
+ self._reading = false;
179
160
 
180
- self.removeListener('keypress', self.__listener)
181
- delete self.__listener
161
+ delete self._callback;
162
+ delete self._done;
182
163
 
183
- self.removeListener('blur', self.__done)
184
- delete self.__done
164
+ self.removeListener('keypress', self.__listener);
165
+ delete self.__listener;
185
166
 
186
- self.screen.program.hideCursor()
187
- self.screen.grabKeys = false
167
+ self.removeListener('blur', self.__done);
168
+ delete self.__done;
188
169
 
189
- if (!focused) {
190
- self.screen.restoreFocus()
191
- }
170
+ self.screen.program.hideCursor();
171
+ self.screen.grabKeys = false;
192
172
 
193
- if (self.options.inputOnFocus) {
194
- self.screen.rewindFocus()
195
- }
173
+ if (!focused) {
174
+ self.screen.restoreFocus();
175
+ }
196
176
 
197
- // Ugly
198
- if (err === 'stop') {
199
- return
200
- }
177
+ if (self.options.inputOnFocus) {
178
+ self.screen.rewindFocus();
179
+ }
201
180
 
202
- if (err) {
203
- self.emit('error', err)
204
- } else if (value != null) {
205
- self.emit('submit', value)
206
- } else {
207
- self.emit('cancel', value)
208
- }
209
- self.emit('action', value)
181
+ // Ugly
182
+ if (err === 'stop') return;
210
183
 
211
- if (!callback) {
212
- return
213
- }
184
+ if (err) {
185
+ self.emit('error', err);
186
+ } else if (value != null) {
187
+ self.emit('submit', value);
188
+ } else {
189
+ self.emit('cancel', value);
190
+ }
191
+ self.emit('action', value);
214
192
 
215
- return err ? callback(err) : callback(null, value)
216
- }
193
+ if (!callback) return;
217
194
 
218
- // Put this in a nextTick so the current
219
- // key event doesn't trigger any keys input.
220
- nextTick(function () {
221
- self.__listener = self._listener.bind(self)
222
- self.on('keypress', self.__listener)
223
- })
195
+ return err
196
+ ? callback(err)
197
+ : callback(null, value);
198
+ };
224
199
 
225
- this.__done = this._done.bind(this, null, null)
226
- this.on('blur', this.__done)
227
- }
200
+ // Put this in a nextTick so the current
201
+ // key event doesn't trigger any keys input.
202
+ nextTick(function() {
203
+ self.__listener = self._listener.bind(self);
204
+ self.on('keypress', self.__listener);
205
+ });
228
206
 
229
- Textarea.prototype._listener = function (ch, key) {
230
- const done = this._done,
231
- value = this.value
207
+ this.__done = this._done.bind(this, null, null);
208
+ this.on('blur', this.__done);
209
+ };
232
210
 
233
- if (key.name === 'return') {
234
- return
235
- }
211
+ Textarea.prototype._listener = function(ch, key) {
212
+ var done = this._done
213
+ , value = this.value;
214
+
215
+ if (key.name === 'return') return;
236
216
  if (key.name === 'enter') {
237
- ch = '\n'
217
+ ch = '\n';
238
218
  }
239
219
 
240
220
  // TODO: Handle directional keys.
241
- if (
242
- key.name === 'left' ||
243
- key.name === 'right' ||
244
- key.name === 'up' ||
245
- key.name === 'down'
246
- ) {
221
+ if (key.name === 'left' || key.name === 'right'
222
+ || key.name === 'up' || key.name === 'down') {
223
+ ;
247
224
  }
248
225
 
249
226
  if (this.options.keys && key.ctrl && key.name === 'e') {
250
- return this.readEditor()
227
+ return this.readEditor();
251
228
  }
252
229
 
253
230
  // TODO: Optimize typing by writing directly
254
231
  // to the screen and screen buffer here.
255
232
  if (key.name === 'escape') {
256
- done(null, null)
233
+ done(null, null);
257
234
  } else if (key.name === 'backspace') {
258
235
  if (this.value.length) {
259
236
  if (this.screen.fullUnicode) {
260
237
  if (unicode.isSurrogate(this.value, this.value.length - 2)) {
261
- // || unicode.isCombining(this.value, this.value.length - 1)) {
262
- this.value = this.value.slice(0, -2)
238
+ // || unicode.isCombining(this.value, this.value.length - 1)) {
239
+ this.value = this.value.slice(0, -2);
263
240
  } else {
264
- this.value = this.value.slice(0, -1)
241
+ this.value = this.value.slice(0, -1);
265
242
  }
266
243
  } else {
267
- this.value = this.value.slice(0, -1)
244
+ this.value = this.value.slice(0, -1);
268
245
  }
269
246
  }
270
247
  } else if (ch) {
271
248
  if (!/^[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]$/.test(ch)) {
272
- this.value += ch
249
+ this.value += ch;
273
250
  }
274
251
  }
275
252
 
276
253
  if (this.value !== value) {
277
- this.screen.render()
254
+ this.screen.render();
278
255
  }
279
- }
256
+ };
280
257
 
281
- Textarea.prototype._typeScroll = function () {
258
+ Textarea.prototype._typeScroll = function() {
282
259
  // XXX Workaround
283
- const height = this.height - this.iheight
260
+ var height = this.height - this.iheight;
284
261
  if (this._clines.length - this.childBase > height) {
285
- this.scroll(this._clines.length)
262
+ this.scroll(this._clines.length);
286
263
  }
287
- }
264
+ };
288
265
 
289
- Textarea.prototype.getValue = function () {
290
- return this.value
291
- }
266
+ Textarea.prototype.getValue = function() {
267
+ return this.value;
268
+ };
292
269
 
293
- Textarea.prototype.setValue = function (value) {
270
+ Textarea.prototype.setValue = function(value) {
294
271
  if (value == null) {
295
- value = this.value
272
+ value = this.value;
296
273
  }
297
274
  if (this._value !== value) {
298
- this.value = value
299
- this._value = value
300
- this.setContent(this.value)
301
- this._typeScroll()
302
- this._updateCursor()
275
+ this.value = value;
276
+ this._value = value;
277
+ this.setContent(this.value);
278
+ this._typeScroll();
279
+ this._updateCursor();
303
280
  }
304
- }
281
+ };
305
282
 
306
- Textarea.prototype.clearInput = Textarea.prototype.clearValue = function () {
307
- return this.setValue('')
308
- }
283
+ Textarea.prototype.clearInput =
284
+ Textarea.prototype.clearValue = function() {
285
+ return this.setValue('');
286
+ };
309
287
 
310
- Textarea.prototype.submit = function () {
311
- if (!this.__listener) {
312
- return
313
- }
314
- return this.__listener('\x1b', { name: 'escape' })
315
- }
288
+ Textarea.prototype.submit = function() {
289
+ if (!this.__listener) return;
290
+ return this.__listener('\x1b', { name: 'escape' });
291
+ };
316
292
 
317
- Textarea.prototype.cancel = function () {
318
- if (!this.__listener) {
319
- return
320
- }
321
- return this.__listener('\x1b', { name: 'escape' })
322
- }
293
+ Textarea.prototype.cancel = function() {
294
+ if (!this.__listener) return;
295
+ return this.__listener('\x1b', { name: 'escape' });
296
+ };
323
297
 
324
- Textarea.prototype.render = function () {
325
- this.setValue()
326
- return this._render()
327
- }
298
+ Textarea.prototype.render = function() {
299
+ this.setValue();
300
+ return this._render();
301
+ };
328
302
 
329
303
  Textarea.prototype.editor =
330
- Textarea.prototype.setEditor =
331
- Textarea.prototype.readEditor =
332
- function (callback) {
333
- const self = this
334
-
335
- if (this._reading) {
336
- const _cb = this._callback,
337
- cb = callback
338
-
339
- this._done('stop')
340
-
341
- callback = function (err, value) {
342
- if (_cb) {
343
- _cb(err, value)
344
- }
345
- if (cb) {
346
- cb(err, value)
347
- }
348
- }
349
- }
304
+ Textarea.prototype.setEditor =
305
+ Textarea.prototype.readEditor = function(callback) {
306
+ var self = this;
350
307
 
351
- if (!callback) {
352
- callback = function () {}
353
- }
308
+ if (this._reading) {
309
+ var _cb = this._callback
310
+ , cb = callback;
354
311
 
355
- return this.screen.readEditor(
356
- { value: this.value },
357
- function (err, value) {
358
- if (err) {
359
- if (err.message === 'Unsuccessful.') {
360
- self.screen.render()
361
- return self.readInput(callback)
362
- }
363
- self.screen.render()
364
- self.readInput(callback)
365
- return callback(err)
366
- }
367
- self.setValue(value)
368
- self.screen.render()
369
- return self.readInput(callback)
370
- }
371
- )
312
+ this._done('stop');
313
+
314
+ callback = function(err, value) {
315
+ if (_cb) _cb(err, value);
316
+ if (cb) cb(err, value);
317
+ };
318
+ }
319
+
320
+ if (!callback) {
321
+ callback = function() {};
322
+ }
323
+
324
+ return this.screen.readEditor({ value: this.value }, function(err, value) {
325
+ if (err) {
326
+ if (err.message === 'Unsuccessful.') {
327
+ self.screen.render();
328
+ return self.readInput(callback);
329
+ }
330
+ self.screen.render();
331
+ self.readInput(callback);
332
+ return callback(err);
372
333
  }
334
+ self.setValue(value);
335
+ self.screen.render();
336
+ return self.readInput(callback);
337
+ });
338
+ };
373
339
 
374
340
  /**
375
341
  * Expose
376
342
  */
377
343
 
378
- module.exports = Textarea
344
+ module.exports = Textarea;