immosquare-cleaner 0.1.42 → 0.1.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (807) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/node_modules/.bin/ncu +1 -1
  4. data/node_modules/.bin/npm-check-updates +1 -1
  5. data/node_modules/.bin/rimraf +1 -1
  6. data/node_modules/@eslint/config-array/dist/cjs/index.cjs +5 -0
  7. data/node_modules/@eslint/config-array/dist/esm/index.js +5 -0
  8. data/node_modules/@eslint/config-array/package.json +1 -1
  9. data/node_modules/@eslint/js/package.json +1 -1
  10. data/node_modules/ansi-regex/index.d.ts +13 -9
  11. data/node_modules/ansi-regex/index.js +5 -3
  12. data/node_modules/ansi-regex/license +1 -1
  13. data/node_modules/ansi-regex/package.json +6 -9
  14. data/node_modules/ansi-regex/readme.md +8 -2
  15. data/node_modules/brace-expansion/README.md +0 -6
  16. data/node_modules/brace-expansion/index.js +84 -86
  17. data/node_modules/brace-expansion/package.json +4 -3
  18. data/node_modules/chalk/license +1 -1
  19. data/node_modules/chalk/package.json +23 -38
  20. data/node_modules/chalk/readme.md +85 -69
  21. data/node_modules/chalk/source/index.js +84 -80
  22. data/node_modules/eslint/lib/cli.js +0 -20
  23. data/node_modules/eslint/lib/languages/js/source-code/source-code.js +19 -0
  24. data/node_modules/eslint/lib/linter/apply-disable-directives.js +24 -12
  25. data/node_modules/eslint/lib/linter/linter.js +44 -20
  26. data/node_modules/eslint/lib/linter/report-translator.js +10 -10
  27. data/node_modules/eslint/lib/linter/rule-fixer.js +38 -15
  28. data/node_modules/eslint/lib/shared/flags.js +2 -2
  29. data/node_modules/eslint/package.json +5 -4
  30. data/node_modules/glob/LICENSE +7 -1
  31. data/node_modules/glob/README.md +284 -1120
  32. data/node_modules/glob/common.js +238 -0
  33. data/node_modules/glob/glob.js +790 -0
  34. data/node_modules/glob/package.json +34 -76
  35. data/node_modules/glob/sync.js +486 -0
  36. data/node_modules/lru-cache/LICENSE +1 -1
  37. data/node_modules/lru-cache/README.md +104 -1055
  38. data/node_modules/lru-cache/index.js +246 -1139
  39. data/node_modules/lru-cache/package.json +11 -75
  40. data/node_modules/minimatch/LICENSE +1 -1
  41. data/node_modules/minimatch/README.md +65 -289
  42. data/node_modules/minimatch/package.json +14 -67
  43. data/node_modules/npm-check-updates/README.md +9 -12
  44. data/node_modules/npm-check-updates/build/cli.js +21 -21
  45. data/node_modules/npm-check-updates/build/cli.js.map +1 -1
  46. data/node_modules/npm-check-updates/build/index-CWktU8PK.js +58 -0
  47. data/node_modules/npm-check-updates/build/index-CWktU8PK.js.map +1 -0
  48. data/node_modules/npm-check-updates/build/index.d.ts +1 -3
  49. data/node_modules/npm-check-updates/build/index.js +207 -223
  50. data/node_modules/npm-check-updates/build/index.js.map +1 -1
  51. data/node_modules/npm-check-updates/package.json +101 -105
  52. data/node_modules/rimraf/LICENSE +1 -1
  53. data/node_modules/rimraf/README.md +70 -188
  54. data/node_modules/rimraf/bin.js +50 -0
  55. data/node_modules/rimraf/package.json +16 -74
  56. data/node_modules/rimraf/rimraf.js +364 -0
  57. data/node_modules/semver/README.md +27 -221
  58. data/node_modules/semver/bin/semver.js +84 -107
  59. data/node_modules/semver/package.json +14 -63
  60. data/node_modules/semver/semver.js +1643 -0
  61. data/node_modules/strip-ansi/index.d.ts +4 -2
  62. data/node_modules/strip-ansi/index.js +3 -13
  63. data/node_modules/strip-ansi/license +1 -1
  64. data/node_modules/strip-ansi/package.json +7 -10
  65. data/node_modules/strip-ansi/readme.md +7 -2
  66. data/node_modules/strip-json-comments/index.d.ts +13 -18
  67. data/node_modules/strip-json-comments/index.js +38 -68
  68. data/node_modules/strip-json-comments/package.json +5 -13
  69. data/node_modules/strip-json-comments/readme.md +18 -15
  70. data/node_modules/yallist/package.json +1 -1
  71. data/node_modules/yallist/yallist.js +3 -3
  72. data/package.json +3 -3
  73. metadata +14 -736
  74. data/node_modules/@eslint/config-array/node_modules/minimatch/LICENSE +0 -15
  75. data/node_modules/@eslint/config-array/node_modules/minimatch/README.md +0 -230
  76. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  77. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  78. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  79. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  80. data/node_modules/@eslint/config-array/node_modules/minimatch/package.json +0 -33
  81. data/node_modules/chalk/source/index.d.ts +0 -320
  82. data/node_modules/chalk/source/utilities.js +0 -33
  83. data/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
  84. data/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
  85. data/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  86. data/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
  87. data/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  88. data/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
  89. data/node_modules/eslint/node_modules/chalk/license +0 -9
  90. data/node_modules/eslint/node_modules/chalk/package.json +0 -68
  91. data/node_modules/eslint/node_modules/chalk/readme.md +0 -341
  92. data/node_modules/eslint/node_modules/chalk/source/index.js +0 -229
  93. data/node_modules/eslint/node_modules/minimatch/LICENSE +0 -15
  94. data/node_modules/eslint/node_modules/minimatch/README.md +0 -230
  95. data/node_modules/eslint/node_modules/minimatch/minimatch.js +0 -947
  96. data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  97. data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  98. data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  99. data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  100. data/node_modules/eslint/node_modules/minimatch/package.json +0 -33
  101. data/node_modules/eslint/node_modules/strip-ansi/index.d.ts +0 -17
  102. data/node_modules/eslint/node_modules/strip-ansi/index.js +0 -4
  103. data/node_modules/eslint/node_modules/strip-ansi/license +0 -9
  104. data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts +0 -37
  105. data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js +0 -10
  106. data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license +0 -9
  107. data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json +0 -55
  108. data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +0 -78
  109. data/node_modules/eslint/node_modules/strip-ansi/package.json +0 -54
  110. data/node_modules/eslint/node_modules/strip-ansi/readme.md +0 -46
  111. data/node_modules/glob/dist/commonjs/glob.d.ts +0 -344
  112. data/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
  113. data/node_modules/glob/dist/commonjs/glob.js +0 -243
  114. data/node_modules/glob/dist/commonjs/glob.js.map +0 -1
  115. data/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
  116. data/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
  117. data/node_modules/glob/dist/commonjs/has-magic.js +0 -27
  118. data/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
  119. data/node_modules/glob/dist/commonjs/ignore.d.ts +0 -20
  120. data/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
  121. data/node_modules/glob/dist/commonjs/ignore.js +0 -108
  122. data/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
  123. data/node_modules/glob/dist/commonjs/index.d.ts +0 -96
  124. data/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
  125. data/node_modules/glob/dist/commonjs/index.js +0 -68
  126. data/node_modules/glob/dist/commonjs/index.js.map +0 -1
  127. data/node_modules/glob/dist/commonjs/package.json +0 -1
  128. data/node_modules/glob/dist/commonjs/pattern.d.ts +0 -77
  129. data/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
  130. data/node_modules/glob/dist/commonjs/pattern.js +0 -219
  131. data/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
  132. data/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
  133. data/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
  134. data/node_modules/glob/dist/commonjs/processor.js +0 -302
  135. data/node_modules/glob/dist/commonjs/processor.js.map +0 -1
  136. data/node_modules/glob/dist/commonjs/walker.d.ts +0 -96
  137. data/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
  138. data/node_modules/glob/dist/commonjs/walker.js +0 -358
  139. data/node_modules/glob/dist/commonjs/walker.js.map +0 -1
  140. data/node_modules/glob/dist/esm/bin.d.mts +0 -3
  141. data/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
  142. data/node_modules/glob/dist/esm/bin.mjs +0 -275
  143. data/node_modules/glob/dist/esm/bin.mjs.map +0 -1
  144. data/node_modules/glob/dist/esm/glob.d.ts +0 -344
  145. data/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
  146. data/node_modules/glob/dist/esm/glob.js +0 -239
  147. data/node_modules/glob/dist/esm/glob.js.map +0 -1
  148. data/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
  149. data/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
  150. data/node_modules/glob/dist/esm/has-magic.js +0 -23
  151. data/node_modules/glob/dist/esm/has-magic.js.map +0 -1
  152. data/node_modules/glob/dist/esm/ignore.d.ts +0 -20
  153. data/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
  154. data/node_modules/glob/dist/esm/ignore.js +0 -104
  155. data/node_modules/glob/dist/esm/ignore.js.map +0 -1
  156. data/node_modules/glob/dist/esm/index.d.ts +0 -96
  157. data/node_modules/glob/dist/esm/index.d.ts.map +0 -1
  158. data/node_modules/glob/dist/esm/index.js +0 -56
  159. data/node_modules/glob/dist/esm/index.js.map +0 -1
  160. data/node_modules/glob/dist/esm/package.json +0 -1
  161. data/node_modules/glob/dist/esm/pattern.d.ts +0 -77
  162. data/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
  163. data/node_modules/glob/dist/esm/pattern.js +0 -215
  164. data/node_modules/glob/dist/esm/pattern.js.map +0 -1
  165. data/node_modules/glob/dist/esm/processor.d.ts +0 -59
  166. data/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
  167. data/node_modules/glob/dist/esm/processor.js +0 -295
  168. data/node_modules/glob/dist/esm/processor.js.map +0 -1
  169. data/node_modules/glob/dist/esm/walker.d.ts +0 -96
  170. data/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
  171. data/node_modules/glob/dist/esm/walker.js +0 -352
  172. data/node_modules/glob/dist/esm/walker.js.map +0 -1
  173. data/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
  174. data/node_modules/glob/node_modules/minimatch/README.md +0 -454
  175. data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
  176. data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
  177. data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
  178. data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
  179. data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
  180. data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
  181. data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js +0 -589
  182. data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
  183. data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
  184. data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
  185. data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
  186. data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
  187. data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
  188. data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
  189. data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.js +0 -22
  190. data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
  191. data/node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
  192. data/node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
  193. data/node_modules/glob/node_modules/minimatch/dist/cjs/index.js +0 -1011
  194. data/node_modules/glob/node_modules/minimatch/dist/cjs/index.js.map +0 -1
  195. data/node_modules/glob/node_modules/minimatch/dist/cjs/package.json +0 -3
  196. data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
  197. data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
  198. data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js +0 -24
  199. data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
  200. data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
  201. data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
  202. data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
  203. data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
  204. data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
  205. data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
  206. data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.js +0 -585
  207. data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
  208. data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
  209. data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
  210. data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
  211. data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
  212. data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
  213. data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
  214. data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.js +0 -18
  215. data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
  216. data/node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
  217. data/node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
  218. data/node_modules/glob/node_modules/minimatch/dist/mjs/index.js +0 -995
  219. data/node_modules/glob/node_modules/minimatch/dist/mjs/index.js.map +0 -1
  220. data/node_modules/glob/node_modules/minimatch/dist/mjs/package.json +0 -3
  221. data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
  222. data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
  223. data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js +0 -20
  224. data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
  225. data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  226. data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -135
  227. data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -203
  228. data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -46
  229. data/node_modules/glob/node_modules/minimatch/package.json +0 -86
  230. data/node_modules/glob/node_modules/minipass/LICENSE +0 -15
  231. data/node_modules/glob/node_modules/minipass/README.md +0 -825
  232. data/node_modules/glob/node_modules/minipass/dist/commonjs/index.d.ts +0 -549
  233. data/node_modules/glob/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
  234. data/node_modules/glob/node_modules/minipass/dist/commonjs/index.js +0 -1028
  235. data/node_modules/glob/node_modules/minipass/dist/commonjs/index.js.map +0 -1
  236. data/node_modules/glob/node_modules/minipass/dist/commonjs/package.json +0 -1
  237. data/node_modules/glob/node_modules/minipass/dist/esm/index.d.ts +0 -549
  238. data/node_modules/glob/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
  239. data/node_modules/glob/node_modules/minipass/dist/esm/index.js +0 -1018
  240. data/node_modules/glob/node_modules/minipass/dist/esm/index.js.map +0 -1
  241. data/node_modules/glob/node_modules/minipass/dist/esm/package.json +0 -1
  242. data/node_modules/glob/node_modules/minipass/package.json +0 -82
  243. data/node_modules/lru-cache/index.d.ts +0 -869
  244. data/node_modules/lru-cache/index.mjs +0 -1227
  245. data/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
  246. data/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
  247. data/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
  248. data/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
  249. data/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
  250. data/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
  251. data/node_modules/minimatch/dist/cjs/ast.js +0 -589
  252. data/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
  253. data/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
  254. data/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
  255. data/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
  256. data/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
  257. data/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
  258. data/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
  259. data/node_modules/minimatch/dist/cjs/escape.js +0 -22
  260. data/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
  261. data/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
  262. data/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
  263. data/node_modules/minimatch/dist/cjs/index.js +0 -1011
  264. data/node_modules/minimatch/dist/cjs/index.js.map +0 -1
  265. data/node_modules/minimatch/dist/cjs/package.json +0 -3
  266. data/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
  267. data/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
  268. data/node_modules/minimatch/dist/cjs/unescape.js +0 -24
  269. data/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
  270. data/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
  271. data/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
  272. data/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
  273. data/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
  274. data/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
  275. data/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
  276. data/node_modules/minimatch/dist/mjs/ast.js +0 -585
  277. data/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
  278. data/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
  279. data/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
  280. data/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
  281. data/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
  282. data/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
  283. data/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
  284. data/node_modules/minimatch/dist/mjs/escape.js +0 -18
  285. data/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
  286. data/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
  287. data/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
  288. data/node_modules/minimatch/dist/mjs/index.js +0 -995
  289. data/node_modules/minimatch/dist/mjs/index.js.map +0 -1
  290. data/node_modules/minimatch/dist/mjs/package.json +0 -3
  291. data/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
  292. data/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
  293. data/node_modules/minimatch/dist/mjs/unescape.js +0 -20
  294. data/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
  295. data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +0 -66
  296. data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +0 -1
  297. data/node_modules/npm-check-updates/build/package.json +0 -183
  298. data/node_modules/npm-check-updates/build/src/bin/cli.d.ts +0 -2
  299. data/node_modules/npm-check-updates/build/src/bin/cli.js +0 -182
  300. data/node_modules/npm-check-updates/build/src/bin/cli.js.map +0 -1
  301. data/node_modules/npm-check-updates/build/src/cli-options.d.ts +0 -9
  302. data/node_modules/npm-check-updates/build/src/cli-options.js +0 -795
  303. data/node_modules/npm-check-updates/build/src/cli-options.js.map +0 -1
  304. data/node_modules/npm-check-updates/build/src/index.d.ts +0 -17
  305. data/node_modules/npm-check-updates/build/src/index.js +0 -316
  306. data/node_modules/npm-check-updates/build/src/index.js.map +0 -1
  307. data/node_modules/npm-check-updates/build/src/lib/cache.d.ts +0 -17
  308. data/node_modules/npm-check-updates/build/src/lib/cache.js +0 -105
  309. data/node_modules/npm-check-updates/build/src/lib/cache.js.map +0 -1
  310. data/node_modules/npm-check-updates/build/src/lib/chalk.d.ts +0 -7
  311. data/node_modules/npm-check-updates/build/src/lib/chalk.js +0 -66
  312. data/node_modules/npm-check-updates/build/src/lib/chalk.js.map +0 -1
  313. data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.d.ts +0 -8
  314. data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.js +0 -32
  315. data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.js.map +0 -1
  316. data/node_modules/npm-check-updates/build/src/lib/doctor.d.ts +0 -8
  317. data/node_modules/npm-check-updates/build/src/lib/doctor.js +0 -290
  318. data/node_modules/npm-check-updates/build/src/lib/doctor.js.map +0 -1
  319. data/node_modules/npm-check-updates/build/src/lib/exists.d.ts +0 -3
  320. data/node_modules/npm-check-updates/build/src/lib/exists.js +0 -10
  321. data/node_modules/npm-check-updates/build/src/lib/exists.js.map +0 -1
  322. data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.d.ts +0 -2
  323. data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.js +0 -112
  324. data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.js.map +0 -1
  325. data/node_modules/npm-check-updates/build/src/lib/filterAndReject.d.ts +0 -12
  326. data/node_modules/npm-check-updates/build/src/lib/filterAndReject.js +0 -80
  327. data/node_modules/npm-check-updates/build/src/lib/filterAndReject.js.map +0 -1
  328. data/node_modules/npm-check-updates/build/src/lib/filterObject.d.ts +0 -4
  329. data/node_modules/npm-check-updates/build/src/lib/filterObject.js +0 -10
  330. data/node_modules/npm-check-updates/build/src/lib/filterObject.js.map +0 -1
  331. data/node_modules/npm-check-updates/build/src/lib/findLockfile.d.ts +0 -12
  332. data/node_modules/npm-check-updates/build/src/lib/findLockfile.js +0 -54
  333. data/node_modules/npm-check-updates/build/src/lib/findLockfile.js.map +0 -1
  334. data/node_modules/npm-check-updates/build/src/lib/findPackage.d.ts +0 -16
  335. data/node_modules/npm-check-updates/build/src/lib/findPackage.js +0 -78
  336. data/node_modules/npm-check-updates/build/src/lib/findPackage.js.map +0 -1
  337. data/node_modules/npm-check-updates/build/src/lib/getAllPackages.d.ts +0 -10
  338. data/node_modules/npm-check-updates/build/src/lib/getAllPackages.js +0 -126
  339. data/node_modules/npm-check-updates/build/src/lib/getAllPackages.js.map +0 -1
  340. data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.d.ts +0 -15
  341. data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.js +0 -76
  342. data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.js.map +0 -1
  343. data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.d.ts +0 -8
  344. data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.js +0 -37
  345. data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.js.map +0 -1
  346. data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.d.ts +0 -12
  347. data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.js +0 -35
  348. data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.js.map +0 -1
  349. data/node_modules/npm-check-updates/build/src/lib/getNcuRc.d.ts +0 -22
  350. data/node_modules/npm-check-updates/build/src/lib/getNcuRc.js +0 -60
  351. data/node_modules/npm-check-updates/build/src/lib/getNcuRc.js.map +0 -1
  352. data/node_modules/npm-check-updates/build/src/lib/getPackageManager.d.ts +0 -13
  353. data/node_modules/npm-check-updates/build/src/lib/getPackageManager.js +0 -30
  354. data/node_modules/npm-check-updates/build/src/lib/getPackageManager.js.map +0 -1
  355. data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.d.ts +0 -6
  356. data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.js +0 -31
  357. data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.js.map +0 -1
  358. data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.d.ts +0 -12
  359. data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.js +0 -35
  360. data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.js.map +0 -1
  361. data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.d.ts +0 -10
  362. data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.js +0 -30
  363. data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.js.map +0 -1
  364. data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.d.ts +0 -11
  365. data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.js +0 -81
  366. data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.js.map +0 -1
  367. data/node_modules/npm-check-updates/build/src/lib/initOptions.d.ts +0 -7
  368. data/node_modules/npm-check-updates/build/src/lib/initOptions.js +0 -207
  369. data/node_modules/npm-check-updates/build/src/lib/initOptions.js.map +0 -1
  370. data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.d.ts +0 -14
  371. data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.js +0 -68
  372. data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.js.map +0 -1
  373. data/node_modules/npm-check-updates/build/src/lib/keyValueBy.d.ts +0 -6
  374. data/node_modules/npm-check-updates/build/src/lib/keyValueBy.js +0 -23
  375. data/node_modules/npm-check-updates/build/src/lib/keyValueBy.js.map +0 -1
  376. data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.d.ts +0 -3
  377. data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +0 -108
  378. data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +0 -1
  379. data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.d.ts +0 -5
  380. data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.js +0 -27
  381. data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.js.map +0 -1
  382. data/node_modules/npm-check-updates/build/src/lib/logging.d.ts +0 -77
  383. data/node_modules/npm-check-updates/build/src/lib/logging.js +0 -287
  384. data/node_modules/npm-check-updates/build/src/lib/logging.js.map +0 -1
  385. data/node_modules/npm-check-updates/build/src/lib/mergeOptions.d.ts +0 -69
  386. data/node_modules/npm-check-updates/build/src/lib/mergeOptions.js +0 -23
  387. data/node_modules/npm-check-updates/build/src/lib/mergeOptions.js.map +0 -1
  388. data/node_modules/npm-check-updates/build/src/lib/programError.d.ts +0 -6
  389. data/node_modules/npm-check-updates/build/src/lib/programError.js +0 -19
  390. data/node_modules/npm-check-updates/build/src/lib/programError.js.map +0 -1
  391. data/node_modules/npm-check-updates/build/src/lib/queryVersions.d.ts +0 -13
  392. data/node_modules/npm-check-updates/build/src/lib/queryVersions.js +0 -118
  393. data/node_modules/npm-check-updates/build/src/lib/queryVersions.js.map +0 -1
  394. data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.d.ts +0 -4
  395. data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.js +0 -20
  396. data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.js.map +0 -1
  397. data/node_modules/npm-check-updates/build/src/lib/runGlobal.d.ts +0 -5
  398. data/node_modules/npm-check-updates/build/src/lib/runGlobal.js +0 -76
  399. data/node_modules/npm-check-updates/build/src/lib/runGlobal.js.map +0 -1
  400. data/node_modules/npm-check-updates/build/src/lib/runLocal.d.ts +0 -18
  401. data/node_modules/npm-check-updates/build/src/lib/runLocal.js +0 -239
  402. data/node_modules/npm-check-updates/build/src/lib/runLocal.js.map +0 -1
  403. data/node_modules/npm-check-updates/build/src/lib/table.d.ts +0 -7
  404. data/node_modules/npm-check-updates/build/src/lib/table.js +0 -27
  405. data/node_modules/npm-check-updates/build/src/lib/table.js.map +0 -1
  406. data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.d.ts +0 -14
  407. data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.js +0 -103
  408. data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.js.map +0 -1
  409. data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.d.ts +0 -14
  410. data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.js +0 -50
  411. data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.js.map +0 -1
  412. data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.d.ts +0 -13
  413. data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js +0 -58
  414. data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js.map +0 -1
  415. data/node_modules/npm-check-updates/build/src/lib/version-util.d.ts +0 -180
  416. data/node_modules/npm-check-updates/build/src/lib/version-util.js +0 -518
  417. data/node_modules/npm-check-updates/build/src/lib/version-util.js.map +0 -1
  418. data/node_modules/npm-check-updates/build/src/lib/wrap.d.ts +0 -3
  419. data/node_modules/npm-check-updates/build/src/lib/wrap.js +0 -45
  420. data/node_modules/npm-check-updates/build/src/lib/wrap.js.map +0 -1
  421. data/node_modules/npm-check-updates/build/src/package-managers/bun.d.ts +0 -18
  422. data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -89
  423. data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +0 -1
  424. data/node_modules/npm-check-updates/build/src/package-managers/filters.d.ts +0 -35
  425. data/node_modules/npm-check-updates/build/src/package-managers/filters.js +0 -96
  426. data/node_modules/npm-check-updates/build/src/package-managers/filters.js.map +0 -1
  427. data/node_modules/npm-check-updates/build/src/package-managers/gitTags.d.ts +0 -16
  428. data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js +0 -112
  429. data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js.map +0 -1
  430. data/node_modules/npm-check-updates/build/src/package-managers/index.d.ts +0 -4
  431. data/node_modules/npm-check-updates/build/src/package-managers/index.js +0 -40
  432. data/node_modules/npm-check-updates/build/src/package-managers/index.js.map +0 -1
  433. data/node_modules/npm-check-updates/build/src/package-managers/npm.d.ts +0 -147
  434. data/node_modules/npm-check-updates/build/src/package-managers/npm.js +0 -688
  435. data/node_modules/npm-check-updates/build/src/package-managers/npm.js.map +0 -1
  436. data/node_modules/npm-check-updates/build/src/package-managers/pnpm.d.ts +0 -25
  437. data/node_modules/npm-check-updates/build/src/package-managers/pnpm.js +0 -103
  438. data/node_modules/npm-check-updates/build/src/package-managers/pnpm.js.map +0 -1
  439. data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.d.ts +0 -10
  440. data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.js +0 -52
  441. data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.js.map +0 -1
  442. data/node_modules/npm-check-updates/build/src/package-managers/yarn.d.ts +0 -60
  443. data/node_modules/npm-check-updates/build/src/package-managers/yarn.js +0 -248
  444. data/node_modules/npm-check-updates/build/src/package-managers/yarn.js.map +0 -1
  445. data/node_modules/npm-check-updates/build/src/scripts/build-options.d.ts +0 -1
  446. data/node_modules/npm-check-updates/build/src/scripts/build-options.js +0 -121
  447. data/node_modules/npm-check-updates/build/src/scripts/build-options.js.map +0 -1
  448. data/node_modules/npm-check-updates/build/src/types/CLIOption.d.ts +0 -16
  449. data/node_modules/npm-check-updates/build/src/types/CLIOption.js +0 -3
  450. data/node_modules/npm-check-updates/build/src/types/CLIOption.js.map +0 -1
  451. data/node_modules/npm-check-updates/build/src/types/Cacher.d.ts +0 -10
  452. data/node_modules/npm-check-updates/build/src/types/Cacher.js +0 -3
  453. data/node_modules/npm-check-updates/build/src/types/Cacher.js.map +0 -1
  454. data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.d.ts +0 -5
  455. data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.js +0 -3
  456. data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.js.map +0 -1
  457. data/node_modules/npm-check-updates/build/src/types/FilterFunction.d.ts +0 -3
  458. data/node_modules/npm-check-updates/build/src/types/FilterFunction.js +0 -3
  459. data/node_modules/npm-check-updates/build/src/types/FilterFunction.js.map +0 -1
  460. data/node_modules/npm-check-updates/build/src/types/FilterPattern.d.ts +0 -3
  461. data/node_modules/npm-check-updates/build/src/types/FilterPattern.js +0 -3
  462. data/node_modules/npm-check-updates/build/src/types/FilterPattern.js.map +0 -1
  463. data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.d.ts +0 -9
  464. data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.js +0 -3
  465. data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.js.map +0 -1
  466. data/node_modules/npm-check-updates/build/src/types/GetVersion.d.ts +0 -6
  467. data/node_modules/npm-check-updates/build/src/types/GetVersion.js +0 -3
  468. data/node_modules/npm-check-updates/build/src/types/GetVersion.js.map +0 -1
  469. data/node_modules/npm-check-updates/build/src/types/GroupFunction.d.ts +0 -4
  470. data/node_modules/npm-check-updates/build/src/types/GroupFunction.js +0 -3
  471. data/node_modules/npm-check-updates/build/src/types/GroupFunction.js.map +0 -1
  472. data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.d.ts +0 -8
  473. data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.js +0 -3
  474. data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.js.map +0 -1
  475. data/node_modules/npm-check-updates/build/src/types/IndexType.d.ts +0 -4
  476. data/node_modules/npm-check-updates/build/src/types/IndexType.js +0 -4
  477. data/node_modules/npm-check-updates/build/src/types/IndexType.js.map +0 -1
  478. data/node_modules/npm-check-updates/build/src/types/Maybe.d.ts +0 -2
  479. data/node_modules/npm-check-updates/build/src/types/Maybe.js +0 -3
  480. data/node_modules/npm-check-updates/build/src/types/Maybe.js.map +0 -1
  481. data/node_modules/npm-check-updates/build/src/types/MockedVersions.d.ts +0 -5
  482. data/node_modules/npm-check-updates/build/src/types/MockedVersions.js +0 -3
  483. data/node_modules/npm-check-updates/build/src/types/MockedVersions.js.map +0 -1
  484. data/node_modules/npm-check-updates/build/src/types/NpmConfig.d.ts +0 -4
  485. data/node_modules/npm-check-updates/build/src/types/NpmConfig.js +0 -3
  486. data/node_modules/npm-check-updates/build/src/types/NpmConfig.js.map +0 -1
  487. data/node_modules/npm-check-updates/build/src/types/NpmOptions.d.ts +0 -6
  488. data/node_modules/npm-check-updates/build/src/types/NpmOptions.js +0 -3
  489. data/node_modules/npm-check-updates/build/src/types/NpmOptions.js.map +0 -1
  490. data/node_modules/npm-check-updates/build/src/types/Options.d.ts +0 -17
  491. data/node_modules/npm-check-updates/build/src/types/Options.js +0 -3
  492. data/node_modules/npm-check-updates/build/src/types/Options.js.map +0 -1
  493. data/node_modules/npm-check-updates/build/src/types/PackageFile.d.ts +0 -24
  494. data/node_modules/npm-check-updates/build/src/types/PackageFile.js +0 -3
  495. data/node_modules/npm-check-updates/build/src/types/PackageFile.js.map +0 -1
  496. data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.d.ts +0 -5
  497. data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.js +0 -3
  498. data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.js.map +0 -1
  499. data/node_modules/npm-check-updates/build/src/types/PackageInfo.d.ts +0 -8
  500. data/node_modules/npm-check-updates/build/src/types/PackageInfo.js +0 -3
  501. data/node_modules/npm-check-updates/build/src/types/PackageInfo.js.map +0 -1
  502. data/node_modules/npm-check-updates/build/src/types/PackageManager.d.ts +0 -18
  503. data/node_modules/npm-check-updates/build/src/types/PackageManager.js +0 -3
  504. data/node_modules/npm-check-updates/build/src/types/PackageManager.js.map +0 -1
  505. data/node_modules/npm-check-updates/build/src/types/PackageManagerName.d.ts +0 -2
  506. data/node_modules/npm-check-updates/build/src/types/PackageManagerName.js +0 -3
  507. data/node_modules/npm-check-updates/build/src/types/PackageManagerName.js.map +0 -1
  508. data/node_modules/npm-check-updates/build/src/types/Packument.d.ts +0 -13
  509. data/node_modules/npm-check-updates/build/src/types/Packument.js +0 -3
  510. data/node_modules/npm-check-updates/build/src/types/Packument.js.map +0 -1
  511. data/node_modules/npm-check-updates/build/src/types/RunOptions.d.ts +0 -137
  512. data/node_modules/npm-check-updates/build/src/types/RunOptions.js +0 -3
  513. data/node_modules/npm-check-updates/build/src/types/RunOptions.js.map +0 -1
  514. data/node_modules/npm-check-updates/build/src/types/SpawnOptions.d.ts +0 -6
  515. data/node_modules/npm-check-updates/build/src/types/SpawnOptions.js +0 -3
  516. data/node_modules/npm-check-updates/build/src/types/SpawnOptions.js.map +0 -1
  517. data/node_modules/npm-check-updates/build/src/types/StaticRegistry.d.ts +0 -4
  518. data/node_modules/npm-check-updates/build/src/types/StaticRegistry.js +0 -3
  519. data/node_modules/npm-check-updates/build/src/types/StaticRegistry.js.map +0 -1
  520. data/node_modules/npm-check-updates/build/src/types/Target.d.ts +0 -9
  521. data/node_modules/npm-check-updates/build/src/types/Target.js +0 -6
  522. data/node_modules/npm-check-updates/build/src/types/Target.js.map +0 -1
  523. data/node_modules/npm-check-updates/build/src/types/TargetFunction.d.ts +0 -3
  524. data/node_modules/npm-check-updates/build/src/types/TargetFunction.js +0 -3
  525. data/node_modules/npm-check-updates/build/src/types/TargetFunction.js.map +0 -1
  526. data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.d.ts +0 -1
  527. data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.js +0 -3
  528. data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.js.map +0 -1
  529. data/node_modules/npm-check-updates/build/src/types/Version.d.ts +0 -2
  530. data/node_modules/npm-check-updates/build/src/types/Version.js +0 -3
  531. data/node_modules/npm-check-updates/build/src/types/Version.js.map +0 -1
  532. data/node_modules/npm-check-updates/build/src/types/VersionLevel.d.ts +0 -2
  533. data/node_modules/npm-check-updates/build/src/types/VersionLevel.js +0 -3
  534. data/node_modules/npm-check-updates/build/src/types/VersionLevel.js.map +0 -1
  535. data/node_modules/npm-check-updates/build/src/types/VersionResult.d.ts +0 -7
  536. data/node_modules/npm-check-updates/build/src/types/VersionResult.js +0 -3
  537. data/node_modules/npm-check-updates/build/src/types/VersionResult.js.map +0 -1
  538. data/node_modules/npm-check-updates/build/src/types/VersionSpec.d.ts +0 -2
  539. data/node_modules/npm-check-updates/build/src/types/VersionSpec.js +0 -3
  540. data/node_modules/npm-check-updates/build/src/types/VersionSpec.js.map +0 -1
  541. data/node_modules/npm-check-updates/node_modules/chalk/license +0 -9
  542. data/node_modules/npm-check-updates/node_modules/chalk/package.json +0 -83
  543. data/node_modules/npm-check-updates/node_modules/chalk/readme.md +0 -325
  544. data/node_modules/npm-check-updates/node_modules/chalk/source/index.d.ts +0 -320
  545. data/node_modules/npm-check-updates/node_modules/chalk/source/index.js +0 -225
  546. data/node_modules/npm-check-updates/node_modules/chalk/source/utilities.js +0 -33
  547. data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
  548. data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
  549. data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  550. data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
  551. data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  552. data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
  553. data/node_modules/npm-check-updates/node_modules/minimatch/LICENSE +0 -15
  554. data/node_modules/npm-check-updates/node_modules/minimatch/README.md +0 -454
  555. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
  556. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
  557. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
  558. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
  559. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
  560. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
  561. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.js +0 -589
  562. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
  563. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
  564. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
  565. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
  566. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
  567. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
  568. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
  569. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.js +0 -22
  570. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
  571. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
  572. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
  573. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.js +0 -1011
  574. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.js.map +0 -1
  575. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/package.json +0 -3
  576. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
  577. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
  578. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.js +0 -24
  579. data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
  580. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
  581. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
  582. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
  583. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
  584. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
  585. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
  586. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.js +0 -585
  587. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
  588. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
  589. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
  590. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
  591. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
  592. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
  593. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
  594. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.js +0 -18
  595. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
  596. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
  597. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
  598. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.js +0 -995
  599. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.js.map +0 -1
  600. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/package.json +0 -3
  601. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
  602. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
  603. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js +0 -20
  604. data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
  605. data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  606. data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -135
  607. data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -203
  608. data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -46
  609. data/node_modules/npm-check-updates/node_modules/minimatch/package.json +0 -86
  610. data/node_modules/npm-check-updates/node_modules/strip-ansi/index.d.ts +0 -15
  611. data/node_modules/npm-check-updates/node_modules/strip-ansi/index.js +0 -14
  612. data/node_modules/npm-check-updates/node_modules/strip-ansi/license +0 -9
  613. data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts +0 -33
  614. data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/index.js +0 -8
  615. data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/license +0 -9
  616. data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/package.json +0 -58
  617. data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +0 -72
  618. data/node_modules/npm-check-updates/node_modules/strip-ansi/package.json +0 -57
  619. data/node_modules/npm-check-updates/node_modules/strip-ansi/readme.md +0 -41
  620. data/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +0 -3
  621. data/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +0 -1
  622. data/node_modules/rimraf/dist/commonjs/default-tmp.js +0 -61
  623. data/node_modules/rimraf/dist/commonjs/default-tmp.js.map +0 -1
  624. data/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +0 -3
  625. data/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +0 -1
  626. data/node_modules/rimraf/dist/commonjs/fix-eperm.js +0 -58
  627. data/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +0 -1
  628. data/node_modules/rimraf/dist/commonjs/fs.d.ts +0 -17
  629. data/node_modules/rimraf/dist/commonjs/fs.d.ts.map +0 -1
  630. data/node_modules/rimraf/dist/commonjs/fs.js +0 -46
  631. data/node_modules/rimraf/dist/commonjs/fs.js.map +0 -1
  632. data/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +0 -3
  633. data/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +0 -1
  634. data/node_modules/rimraf/dist/commonjs/ignore-enoent.js +0 -21
  635. data/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +0 -1
  636. data/node_modules/rimraf/dist/commonjs/index.d.ts +0 -50
  637. data/node_modules/rimraf/dist/commonjs/index.d.ts.map +0 -1
  638. data/node_modules/rimraf/dist/commonjs/index.js +0 -76
  639. data/node_modules/rimraf/dist/commonjs/index.js.map +0 -1
  640. data/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +0 -35
  641. data/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +0 -1
  642. data/node_modules/rimraf/dist/commonjs/opt-arg.js +0 -53
  643. data/node_modules/rimraf/dist/commonjs/opt-arg.js.map +0 -1
  644. data/node_modules/rimraf/dist/commonjs/package.json +0 -1
  645. data/node_modules/rimraf/dist/commonjs/path-arg.d.ts +0 -4
  646. data/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +0 -1
  647. data/node_modules/rimraf/dist/commonjs/path-arg.js +0 -54
  648. data/node_modules/rimraf/dist/commonjs/path-arg.js.map +0 -1
  649. data/node_modules/rimraf/dist/commonjs/platform.d.ts +0 -3
  650. data/node_modules/rimraf/dist/commonjs/platform.d.ts.map +0 -1
  651. data/node_modules/rimraf/dist/commonjs/platform.js +0 -4
  652. data/node_modules/rimraf/dist/commonjs/platform.js.map +0 -1
  653. data/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +0 -5
  654. data/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +0 -1
  655. data/node_modules/rimraf/dist/commonjs/readdir-or-error.js +0 -19
  656. data/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +0 -1
  657. data/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +0 -8
  658. data/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +0 -1
  659. data/node_modules/rimraf/dist/commonjs/retry-busy.js +0 -68
  660. data/node_modules/rimraf/dist/commonjs/retry-busy.js.map +0 -1
  661. data/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +0 -3
  662. data/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +0 -1
  663. data/node_modules/rimraf/dist/commonjs/rimraf-manual.js +0 -12
  664. data/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +0 -1
  665. data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +0 -4
  666. data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +0 -1
  667. data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +0 -192
  668. data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +0 -1
  669. data/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +0 -4
  670. data/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +0 -1
  671. data/node_modules/rimraf/dist/commonjs/rimraf-native.js +0 -24
  672. data/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +0 -1
  673. data/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +0 -4
  674. data/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +0 -1
  675. data/node_modules/rimraf/dist/commonjs/rimraf-posix.js +0 -123
  676. data/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +0 -1
  677. data/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +0 -4
  678. data/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +0 -1
  679. data/node_modules/rimraf/dist/commonjs/rimraf-windows.js +0 -182
  680. data/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +0 -1
  681. data/node_modules/rimraf/dist/commonjs/use-native.d.ts +0 -4
  682. data/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +0 -1
  683. data/node_modules/rimraf/dist/commonjs/use-native.js +0 -22
  684. data/node_modules/rimraf/dist/commonjs/use-native.js.map +0 -1
  685. data/node_modules/rimraf/dist/esm/bin.d.mts +0 -8
  686. data/node_modules/rimraf/dist/esm/bin.d.mts.map +0 -1
  687. data/node_modules/rimraf/dist/esm/bin.mjs +0 -256
  688. data/node_modules/rimraf/dist/esm/bin.mjs.map +0 -1
  689. data/node_modules/rimraf/dist/esm/default-tmp.d.ts +0 -3
  690. data/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +0 -1
  691. data/node_modules/rimraf/dist/esm/default-tmp.js +0 -55
  692. data/node_modules/rimraf/dist/esm/default-tmp.js.map +0 -1
  693. data/node_modules/rimraf/dist/esm/fix-eperm.d.ts +0 -3
  694. data/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +0 -1
  695. data/node_modules/rimraf/dist/esm/fix-eperm.js +0 -53
  696. data/node_modules/rimraf/dist/esm/fix-eperm.js.map +0 -1
  697. data/node_modules/rimraf/dist/esm/fs.d.ts +0 -17
  698. data/node_modules/rimraf/dist/esm/fs.d.ts.map +0 -1
  699. data/node_modules/rimraf/dist/esm/fs.js +0 -31
  700. data/node_modules/rimraf/dist/esm/fs.js.map +0 -1
  701. data/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +0 -3
  702. data/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +0 -1
  703. data/node_modules/rimraf/dist/esm/ignore-enoent.js +0 -16
  704. data/node_modules/rimraf/dist/esm/ignore-enoent.js.map +0 -1
  705. data/node_modules/rimraf/dist/esm/index.d.ts +0 -50
  706. data/node_modules/rimraf/dist/esm/index.d.ts.map +0 -1
  707. data/node_modules/rimraf/dist/esm/index.js +0 -68
  708. data/node_modules/rimraf/dist/esm/index.js.map +0 -1
  709. data/node_modules/rimraf/dist/esm/opt-arg.d.ts +0 -35
  710. data/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +0 -1
  711. data/node_modules/rimraf/dist/esm/opt-arg.js +0 -46
  712. data/node_modules/rimraf/dist/esm/opt-arg.js.map +0 -1
  713. data/node_modules/rimraf/dist/esm/package.json +0 -1
  714. data/node_modules/rimraf/dist/esm/path-arg.d.ts +0 -4
  715. data/node_modules/rimraf/dist/esm/path-arg.d.ts.map +0 -1
  716. data/node_modules/rimraf/dist/esm/path-arg.js +0 -49
  717. data/node_modules/rimraf/dist/esm/path-arg.js.map +0 -1
  718. data/node_modules/rimraf/dist/esm/platform.d.ts +0 -3
  719. data/node_modules/rimraf/dist/esm/platform.d.ts.map +0 -1
  720. data/node_modules/rimraf/dist/esm/platform.js +0 -2
  721. data/node_modules/rimraf/dist/esm/platform.js.map +0 -1
  722. data/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +0 -5
  723. data/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +0 -1
  724. data/node_modules/rimraf/dist/esm/readdir-or-error.js +0 -14
  725. data/node_modules/rimraf/dist/esm/readdir-or-error.js.map +0 -1
  726. data/node_modules/rimraf/dist/esm/retry-busy.d.ts +0 -8
  727. data/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +0 -1
  728. data/node_modules/rimraf/dist/esm/retry-busy.js +0 -63
  729. data/node_modules/rimraf/dist/esm/retry-busy.js.map +0 -1
  730. data/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +0 -3
  731. data/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +0 -1
  732. data/node_modules/rimraf/dist/esm/rimraf-manual.js +0 -6
  733. data/node_modules/rimraf/dist/esm/rimraf-manual.js.map +0 -1
  734. data/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +0 -4
  735. data/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +0 -1
  736. data/node_modules/rimraf/dist/esm/rimraf-move-remove.js +0 -187
  737. data/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +0 -1
  738. data/node_modules/rimraf/dist/esm/rimraf-native.d.ts +0 -4
  739. data/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +0 -1
  740. data/node_modules/rimraf/dist/esm/rimraf-native.js +0 -19
  741. data/node_modules/rimraf/dist/esm/rimraf-native.js.map +0 -1
  742. data/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +0 -4
  743. data/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +0 -1
  744. data/node_modules/rimraf/dist/esm/rimraf-posix.js +0 -118
  745. data/node_modules/rimraf/dist/esm/rimraf-posix.js.map +0 -1
  746. data/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +0 -4
  747. data/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +0 -1
  748. data/node_modules/rimraf/dist/esm/rimraf-windows.js +0 -177
  749. data/node_modules/rimraf/dist/esm/rimraf-windows.js.map +0 -1
  750. data/node_modules/rimraf/dist/esm/use-native.d.ts +0 -4
  751. data/node_modules/rimraf/dist/esm/use-native.d.ts.map +0 -1
  752. data/node_modules/rimraf/dist/esm/use-native.js +0 -16
  753. data/node_modules/rimraf/dist/esm/use-native.js.map +0 -1
  754. data/node_modules/semver/classes/comparator.js +0 -141
  755. data/node_modules/semver/classes/index.js +0 -5
  756. data/node_modules/semver/classes/range.js +0 -539
  757. data/node_modules/semver/classes/semver.js +0 -302
  758. data/node_modules/semver/functions/clean.js +0 -6
  759. data/node_modules/semver/functions/cmp.js +0 -52
  760. data/node_modules/semver/functions/coerce.js +0 -52
  761. data/node_modules/semver/functions/compare-build.js +0 -7
  762. data/node_modules/semver/functions/compare-loose.js +0 -3
  763. data/node_modules/semver/functions/compare.js +0 -5
  764. data/node_modules/semver/functions/diff.js +0 -65
  765. data/node_modules/semver/functions/eq.js +0 -3
  766. data/node_modules/semver/functions/gt.js +0 -3
  767. data/node_modules/semver/functions/gte.js +0 -3
  768. data/node_modules/semver/functions/inc.js +0 -19
  769. data/node_modules/semver/functions/lt.js +0 -3
  770. data/node_modules/semver/functions/lte.js +0 -3
  771. data/node_modules/semver/functions/major.js +0 -3
  772. data/node_modules/semver/functions/minor.js +0 -3
  773. data/node_modules/semver/functions/neq.js +0 -3
  774. data/node_modules/semver/functions/parse.js +0 -16
  775. data/node_modules/semver/functions/patch.js +0 -3
  776. data/node_modules/semver/functions/prerelease.js +0 -6
  777. data/node_modules/semver/functions/rcompare.js +0 -3
  778. data/node_modules/semver/functions/rsort.js +0 -3
  779. data/node_modules/semver/functions/satisfies.js +0 -10
  780. data/node_modules/semver/functions/sort.js +0 -3
  781. data/node_modules/semver/functions/valid.js +0 -6
  782. data/node_modules/semver/index.js +0 -89
  783. data/node_modules/semver/internal/constants.js +0 -35
  784. data/node_modules/semver/internal/debug.js +0 -9
  785. data/node_modules/semver/internal/identifiers.js +0 -23
  786. data/node_modules/semver/internal/parse-options.js +0 -15
  787. data/node_modules/semver/internal/re.js +0 -212
  788. data/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
  789. data/node_modules/semver/node_modules/lru-cache/README.md +0 -166
  790. data/node_modules/semver/node_modules/lru-cache/index.js +0 -334
  791. data/node_modules/semver/node_modules/lru-cache/package.json +0 -34
  792. data/node_modules/semver/preload.js +0 -2
  793. data/node_modules/semver/ranges/gtr.js +0 -4
  794. data/node_modules/semver/ranges/intersects.js +0 -7
  795. data/node_modules/semver/ranges/ltr.js +0 -4
  796. data/node_modules/semver/ranges/max-satisfying.js +0 -25
  797. data/node_modules/semver/ranges/min-satisfying.js +0 -24
  798. data/node_modules/semver/ranges/min-version.js +0 -61
  799. data/node_modules/semver/ranges/outside.js +0 -80
  800. data/node_modules/semver/ranges/simplify.js +0 -47
  801. data/node_modules/semver/ranges/subset.js +0 -247
  802. data/node_modules/semver/ranges/to-comparators.js +0 -8
  803. data/node_modules/semver/ranges/valid.js +0 -11
  804. /data/node_modules/{eslint/node_modules/chalk → chalk}/index.d.ts +0 -0
  805. /data/node_modules/{eslint/node_modules/chalk → chalk}/source/templates.js +0 -0
  806. /data/node_modules/{eslint/node_modules/chalk → chalk}/source/util.js +0 -0
  807. /data/node_modules/{@eslint/config-array/node_modules/minimatch → minimatch}/minimatch.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sources":["../node_modules/commander/lib/error.js","../node_modules/commander/lib/argument.js","../node_modules/commander/lib/help.js","../node_modules/commander/lib/option.js","../node_modules/commander/lib/suggestSimilar.js","../node_modules/commander/lib/command.js","../node_modules/commander/index.js","../node_modules/commander/esm.mjs","../node_modules/lodash/_copyObject.js","../node_modules/lodash/_baseAssign.js","../node_modules/lodash/_baseAssignIn.js","../node_modules/lodash/_cloneBuffer.js","../node_modules/lodash/_copySymbols.js","../node_modules/lodash/_copySymbolsIn.js","../node_modules/lodash/_initCloneArray.js","../node_modules/lodash/_cloneArrayBuffer.js","../node_modules/lodash/_cloneDataView.js","../node_modules/lodash/_cloneRegExp.js","../node_modules/lodash/_cloneSymbol.js","../node_modules/lodash/_cloneTypedArray.js","../node_modules/lodash/_initCloneByTag.js","../node_modules/lodash/_initCloneObject.js","../node_modules/lodash/_baseIsMap.js","../node_modules/lodash/isMap.js","../node_modules/lodash/_baseIsSet.js","../node_modules/lodash/isSet.js","../node_modules/lodash/_baseClone.js","../node_modules/lodash/cloneDeep.js","../src/bin/cli.ts"],"sourcesContent":["/**\n * CommanderError class\n * @class\n */\nclass CommanderError extends Error {\n /**\n * Constructs the CommanderError class\n * @param {number} exitCode suggested exit code which could be used with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @constructor\n */\n constructor(exitCode, code, message) {\n super(message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n this.code = code;\n this.exitCode = exitCode;\n this.nestedError = undefined;\n }\n}\n\n/**\n * InvalidArgumentError class\n * @class\n */\nclass InvalidArgumentError extends CommanderError {\n /**\n * Constructs the InvalidArgumentError class\n * @param {string} [message] explanation of why argument is invalid\n * @constructor\n */\n constructor(message) {\n super(1, 'commander.invalidArgument', message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n }\n}\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass Argument {\n /**\n * Initialize a new command argument with the given name and description.\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @param {string} name\n * @param {string} [description]\n */\n\n constructor(name, description) {\n this.description = description || '';\n this.variadic = false;\n this.parseArg = undefined;\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.argChoices = undefined;\n\n switch (name[0]) {\n case '<': // e.g. <required>\n this.required = true;\n this._name = name.slice(1, -1);\n break;\n case '[': // e.g. [optional]\n this.required = false;\n this._name = name.slice(1, -1);\n break;\n default:\n this.required = true;\n this._name = name;\n break;\n }\n\n if (this._name.length > 3 && this._name.slice(-3) === '...') {\n this.variadic = true;\n this._name = this._name.slice(0, -3);\n }\n }\n\n /**\n * Return argument name.\n *\n * @return {string}\n */\n\n name() {\n return this._name;\n }\n\n /**\n * @package internal use only\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Argument}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI command arguments into argument values.\n *\n * @param {Function} [fn]\n * @return {Argument}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Only allow argument value to be one of choices.\n *\n * @param {string[]} values\n * @return {Argument}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(', ')}.`);\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Make argument required.\n */\n argRequired() {\n this.required = true;\n return this;\n }\n\n /**\n * Make argument optional.\n */\n argOptional() {\n this.required = false;\n return this;\n }\n}\n\n/**\n * Takes an argument and returns its human readable equivalent for help usage.\n *\n * @param {Argument} arg\n * @return {string}\n * @private\n */\n\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required\n ? '<' + nameOutput + '>'\n : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n","const { humanReadableArgName } = require('./argument.js');\n\n/**\n * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`\n * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types\n * @typedef { import(\"./argument.js\").Argument } Argument\n * @typedef { import(\"./command.js\").Command } Command\n * @typedef { import(\"./option.js\").Option } Option\n */\n\n// Although this is a class, methods are static in style to allow override using subclass or just functions.\nclass Help {\n constructor() {\n this.helpWidth = undefined;\n this.sortSubcommands = false;\n this.sortOptions = false;\n this.showGlobalOptions = false;\n }\n\n /**\n * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n *\n * @param {Command} cmd\n * @returns {Command[]}\n */\n\n visibleCommands(cmd) {\n const visibleCommands = cmd.commands.filter(cmd => !cmd._hidden);\n const helpCommand = cmd._getHelpCommand();\n if (helpCommand && !helpCommand._hidden) {\n visibleCommands.push(helpCommand);\n }\n if (this.sortSubcommands) {\n visibleCommands.sort((a, b) => {\n // @ts-ignore: overloaded return type\n return a.name().localeCompare(b.name());\n });\n }\n return visibleCommands;\n }\n\n /**\n * Compare options for sort.\n *\n * @param {Option} a\n * @param {Option} b\n * @returns number\n */\n compareOptions(a, b) {\n const getSortKey = (option) => {\n // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated.\n return option.short ? option.short.replace(/^-/, '') : option.long.replace(/^--/, '');\n };\n return getSortKey(a).localeCompare(getSortKey(b));\n }\n\n /**\n * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleOptions(cmd) {\n const visibleOptions = cmd.options.filter((option) => !option.hidden);\n // Built-in help option.\n const helpOption = cmd._getHelpOption();\n if (helpOption && !helpOption.hidden) {\n // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs.\n const removeShort = helpOption.short && cmd._findOption(helpOption.short);\n const removeLong = helpOption.long && cmd._findOption(helpOption.long);\n if (!removeShort && !removeLong) {\n visibleOptions.push(helpOption); // no changes needed\n } else if (helpOption.long && !removeLong) {\n visibleOptions.push(cmd.createOption(helpOption.long, helpOption.description));\n } else if (helpOption.short && !removeShort) {\n visibleOptions.push(cmd.createOption(helpOption.short, helpOption.description));\n }\n }\n if (this.sortOptions) {\n visibleOptions.sort(this.compareOptions);\n }\n return visibleOptions;\n }\n\n /**\n * Get an array of the visible global options. (Not including help.)\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleGlobalOptions(cmd) {\n if (!this.showGlobalOptions) return [];\n\n const globalOptions = [];\n for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) {\n const visibleOptions = ancestorCmd.options.filter((option) => !option.hidden);\n globalOptions.push(...visibleOptions);\n }\n if (this.sortOptions) {\n globalOptions.sort(this.compareOptions);\n }\n return globalOptions;\n }\n\n /**\n * Get an array of the arguments if any have a description.\n *\n * @param {Command} cmd\n * @returns {Argument[]}\n */\n\n visibleArguments(cmd) {\n // Side effect! Apply the legacy descriptions before the arguments are displayed.\n if (cmd._argsDescription) {\n cmd.registeredArguments.forEach(argument => {\n argument.description = argument.description || cmd._argsDescription[argument.name()] || '';\n });\n }\n\n // If there are any arguments with a description then return all the arguments.\n if (cmd.registeredArguments.find(argument => argument.description)) {\n return cmd.registeredArguments;\n }\n return [];\n }\n\n /**\n * Get the command term to show in the list of subcommands.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandTerm(cmd) {\n // Legacy. Ignores custom usage string, and nested commands.\n const args = cmd.registeredArguments.map(arg => humanReadableArgName(arg)).join(' ');\n return cmd._name +\n (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +\n (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option\n (args ? ' ' + args : '');\n }\n\n /**\n * Get the option term to show in the list of options.\n *\n * @param {Option} option\n * @returns {string}\n */\n\n optionTerm(option) {\n return option.flags;\n }\n\n /**\n * Get the argument term to show in the list of arguments.\n *\n * @param {Argument} argument\n * @returns {string}\n */\n\n argumentTerm(argument) {\n return argument.name();\n }\n\n /**\n * Get the longest command term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestSubcommandTermLength(cmd, helper) {\n return helper.visibleCommands(cmd).reduce((max, command) => {\n return Math.max(max, helper.subcommandTerm(command).length);\n }, 0);\n }\n\n /**\n * Get the longest option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestOptionTermLength(cmd, helper) {\n return helper.visibleOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest global option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestGlobalOptionTermLength(cmd, helper) {\n return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest argument term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestArgumentTermLength(cmd, helper) {\n return helper.visibleArguments(cmd).reduce((max, argument) => {\n return Math.max(max, helper.argumentTerm(argument).length);\n }, 0);\n }\n\n /**\n * Get the command usage to be displayed at the top of the built-in help.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandUsage(cmd) {\n // Usage\n let cmdName = cmd._name;\n if (cmd._aliases[0]) {\n cmdName = cmdName + '|' + cmd._aliases[0];\n }\n let ancestorCmdNames = '';\n for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) {\n ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames;\n }\n return ancestorCmdNames + cmdName + ' ' + cmd.usage();\n }\n\n /**\n * Get the description for the command.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandDescription(cmd) {\n // @ts-ignore: overloaded return type\n return cmd.description();\n }\n\n /**\n * Get the subcommand summary to show in the list of subcommands.\n * (Fallback to description for backwards compatibility.)\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandDescription(cmd) {\n // @ts-ignore: overloaded return type\n return cmd.summary() || cmd.description();\n }\n\n /**\n * Get the option description to show in the list of options.\n *\n * @param {Option} option\n * @return {string}\n */\n\n optionDescription(option) {\n const extraInfo = [];\n\n if (option.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`);\n }\n if (option.defaultValue !== undefined) {\n // default for boolean and negated more for programmer than end user,\n // but show true/false for boolean option as may be for hand-rolled env or config processing.\n const showDefault = option.required || option.optional ||\n (option.isBoolean() && typeof option.defaultValue === 'boolean');\n if (showDefault) {\n extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`);\n }\n }\n // preset for boolean and negated are more for programmer than end user\n if (option.presetArg !== undefined && option.optional) {\n extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);\n }\n if (option.envVar !== undefined) {\n extraInfo.push(`env: ${option.envVar}`);\n }\n if (extraInfo.length > 0) {\n return `${option.description} (${extraInfo.join(', ')})`;\n }\n\n return option.description;\n }\n\n /**\n * Get the argument description to show in the list of arguments.\n *\n * @param {Argument} argument\n * @return {string}\n */\n\n argumentDescription(argument) {\n const extraInfo = [];\n if (argument.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`);\n }\n if (argument.defaultValue !== undefined) {\n extraInfo.push(`default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`);\n }\n if (extraInfo.length > 0) {\n const extraDescripton = `(${extraInfo.join(', ')})`;\n if (argument.description) {\n return `${argument.description} ${extraDescripton}`;\n }\n return extraDescripton;\n }\n return argument.description;\n }\n\n /**\n * Generate the built-in help text.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {string}\n */\n\n formatHelp(cmd, helper) {\n const termWidth = helper.padWidth(cmd, helper);\n const helpWidth = helper.helpWidth || 80;\n const itemIndentWidth = 2;\n const itemSeparatorWidth = 2; // between term and description\n function formatItem(term, description) {\n if (description) {\n const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;\n return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth);\n }\n return term;\n }\n function formatList(textArray) {\n return textArray.join('\\n').replace(/^/gm, ' '.repeat(itemIndentWidth));\n }\n\n // Usage\n let output = [`Usage: ${helper.commandUsage(cmd)}`, ''];\n\n // Description\n const commandDescription = helper.commandDescription(cmd);\n if (commandDescription.length > 0) {\n output = output.concat([helper.wrap(commandDescription, helpWidth, 0), '']);\n }\n\n // Arguments\n const argumentList = helper.visibleArguments(cmd).map((argument) => {\n return formatItem(helper.argumentTerm(argument), helper.argumentDescription(argument));\n });\n if (argumentList.length > 0) {\n output = output.concat(['Arguments:', formatList(argumentList), '']);\n }\n\n // Options\n const optionList = helper.visibleOptions(cmd).map((option) => {\n return formatItem(helper.optionTerm(option), helper.optionDescription(option));\n });\n if (optionList.length > 0) {\n output = output.concat(['Options:', formatList(optionList), '']);\n }\n\n if (this.showGlobalOptions) {\n const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {\n return formatItem(helper.optionTerm(option), helper.optionDescription(option));\n });\n if (globalOptionList.length > 0) {\n output = output.concat(['Global Options:', formatList(globalOptionList), '']);\n }\n }\n\n // Commands\n const commandList = helper.visibleCommands(cmd).map((cmd) => {\n return formatItem(helper.subcommandTerm(cmd), helper.subcommandDescription(cmd));\n });\n if (commandList.length > 0) {\n output = output.concat(['Commands:', formatList(commandList), '']);\n }\n\n return output.join('\\n');\n }\n\n /**\n * Calculate the pad width from the maximum term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n padWidth(cmd, helper) {\n return Math.max(\n helper.longestOptionTermLength(cmd, helper),\n helper.longestGlobalOptionTermLength(cmd, helper),\n helper.longestSubcommandTermLength(cmd, helper),\n helper.longestArgumentTermLength(cmd, helper)\n );\n }\n\n /**\n * Wrap the given string to width characters per line, with lines after the first indented.\n * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.\n *\n * @param {string} str\n * @param {number} width\n * @param {number} indent\n * @param {number} [minColumnWidth=40]\n * @return {string}\n *\n */\n\n wrap(str, width, indent, minColumnWidth = 40) {\n // Full \\s characters, minus the linefeeds.\n const indents = ' \\\\f\\\\t\\\\v\\u00a0\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff';\n // Detect manually wrapped and indented strings by searching for line break followed by spaces.\n const manualIndent = new RegExp(`[\\\\n][${indents}]+`);\n if (str.match(manualIndent)) return str;\n // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line).\n const columnWidth = width - indent;\n if (columnWidth < minColumnWidth) return str;\n\n const leadingStr = str.slice(0, indent);\n const columnText = str.slice(indent).replace('\\r\\n', '\\n');\n const indentString = ' '.repeat(indent);\n const zeroWidthSpace = '\\u200B';\n const breaks = `\\\\s${zeroWidthSpace}`;\n // Match line end (so empty lines don't collapse),\n // or as much text as will fit in column, or excess text up to first break.\n const regex = new RegExp(`\\n|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, 'g');\n const lines = columnText.match(regex) || [];\n return leadingStr + lines.map((line, i) => {\n if (line === '\\n') return ''; // preserve empty lines\n return ((i > 0) ? indentString : '') + line.trimEnd();\n }).join('\\n');\n }\n}\n\nexports.Help = Help;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass Option {\n /**\n * Initialize a new `Option` with the given `flags` and `description`.\n *\n * @param {string} flags\n * @param {string} [description]\n */\n\n constructor(flags, description) {\n this.flags = flags;\n this.description = description || '';\n\n this.required = flags.includes('<'); // A value must be supplied when the option is specified.\n this.optional = flags.includes('['); // A value is optional when the option is specified.\n // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument\n this.variadic = /\\w\\.\\.\\.[>\\]]$/.test(flags); // The option can take multiple values.\n this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.\n const optionFlags = splitOptionFlags(flags);\n this.short = optionFlags.shortFlag;\n this.long = optionFlags.longFlag;\n this.negate = false;\n if (this.long) {\n this.negate = this.long.startsWith('--no-');\n }\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.presetArg = undefined;\n this.envVar = undefined;\n this.parseArg = undefined;\n this.hidden = false;\n this.argChoices = undefined;\n this.conflictsWith = [];\n this.implied = undefined;\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Option}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Preset to use when option used without option-argument, especially optional but also boolean and negated.\n * The custom processing (parseArg) is called.\n *\n * @example\n * new Option('--color').default('GREYSCALE').preset('RGB');\n * new Option('--donate [amount]').preset('20').argParser(parseFloat);\n *\n * @param {*} arg\n * @return {Option}\n */\n\n preset(arg) {\n this.presetArg = arg;\n return this;\n }\n\n /**\n * Add option name(s) that conflict with this option.\n * An error will be displayed if conflicting options are found during parsing.\n *\n * @example\n * new Option('--rgb').conflicts('cmyk');\n * new Option('--js').conflicts(['ts', 'jsx']);\n *\n * @param {(string | string[])} names\n * @return {Option}\n */\n\n conflicts(names) {\n this.conflictsWith = this.conflictsWith.concat(names);\n return this;\n }\n\n /**\n * Specify implied option values for when this option is set and the implied options are not.\n *\n * The custom processing (parseArg) is not called on the implied values.\n *\n * @example\n * program\n * .addOption(new Option('--log', 'write logging information to file'))\n * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));\n *\n * @param {Object} impliedOptionValues\n * @return {Option}\n */\n implies(impliedOptionValues) {\n let newImplied = impliedOptionValues;\n if (typeof impliedOptionValues === 'string') {\n // string is not documented, but easy mistake and we can do what user probably intended.\n newImplied = { [impliedOptionValues]: true };\n }\n this.implied = Object.assign(this.implied || {}, newImplied);\n return this;\n }\n\n /**\n * Set environment variable to check for option value.\n *\n * An environment variable is only used if when processed the current option value is\n * undefined, or the source of the current value is 'default' or 'config' or 'env'.\n *\n * @param {string} name\n * @return {Option}\n */\n\n env(name) {\n this.envVar = name;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI option arguments into option values.\n *\n * @param {Function} [fn]\n * @return {Option}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Whether the option is mandatory and must have a value after parsing.\n *\n * @param {boolean} [mandatory=true]\n * @return {Option}\n */\n\n makeOptionMandatory(mandatory = true) {\n this.mandatory = !!mandatory;\n return this;\n }\n\n /**\n * Hide option in help.\n *\n * @param {boolean} [hide=true]\n * @return {Option}\n */\n\n hideHelp(hide = true) {\n this.hidden = !!hide;\n return this;\n }\n\n /**\n * @package internal use only\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Only allow option value to be one of choices.\n *\n * @param {string[]} values\n * @return {Option}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(', ')}.`);\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Return option name.\n *\n * @return {string}\n */\n\n name() {\n if (this.long) {\n return this.long.replace(/^--/, '');\n }\n return this.short.replace(/^-/, '');\n }\n\n /**\n * Return option name, in a camelcase format that can be used\n * as a object attribute key.\n *\n * @return {string}\n */\n\n attributeName() {\n return camelcase(this.name().replace(/^no-/, ''));\n }\n\n /**\n * Check if `arg` matches the short or long flag.\n *\n * @param {string} arg\n * @return {boolean}\n * @package internal use only\n */\n\n is(arg) {\n return this.short === arg || this.long === arg;\n }\n\n /**\n * Return whether a boolean option.\n *\n * Options are one of boolean, negated, required argument, or optional argument.\n *\n * @return {boolean}\n * @package internal use only\n */\n\n isBoolean() {\n return !this.required && !this.optional && !this.negate;\n }\n}\n\n/**\n * This class is to make it easier to work with dual options, without changing the existing\n * implementation. We support separate dual options for separate positive and negative options,\n * like `--build` and `--no-build`, which share a single option value. This works nicely for some\n * use cases, but is tricky for others where we want separate behaviours despite\n * the single shared option value.\n */\nclass DualOptions {\n /**\n * @param {Option[]} options\n */\n constructor(options) {\n this.positiveOptions = new Map();\n this.negativeOptions = new Map();\n this.dualOptions = new Set();\n options.forEach(option => {\n if (option.negate) {\n this.negativeOptions.set(option.attributeName(), option);\n } else {\n this.positiveOptions.set(option.attributeName(), option);\n }\n });\n this.negativeOptions.forEach((value, key) => {\n if (this.positiveOptions.has(key)) {\n this.dualOptions.add(key);\n }\n });\n }\n\n /**\n * Did the value come from the option, and not from possible matching dual option?\n *\n * @param {*} value\n * @param {Option} option\n * @returns {boolean}\n */\n valueFromOption(value, option) {\n const optionKey = option.attributeName();\n if (!this.dualOptions.has(optionKey)) return true;\n\n // Use the value to deduce if (probably) came from the option.\n const preset = this.negativeOptions.get(optionKey).presetArg;\n const negativeValue = (preset !== undefined) ? preset : false;\n return option.negate === (negativeValue === value);\n }\n}\n\n/**\n * Convert string from kebab-case to camelCase.\n *\n * @param {string} str\n * @return {string}\n * @private\n */\n\nfunction camelcase(str) {\n return str.split('-').reduce((str, word) => {\n return str + word[0].toUpperCase() + word.slice(1);\n });\n}\n\n/**\n * Split the short and long flag out of something like '-m,--mixed <value>'\n *\n * @private\n */\n\nfunction splitOptionFlags(flags) {\n let shortFlag;\n let longFlag;\n // Use original very loose parsing to maintain backwards compatibility for now,\n // which allowed for example unintended `-sw, --short-word` [sic].\n const flagParts = flags.split(/[ |,]+/);\n if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) shortFlag = flagParts.shift();\n longFlag = flagParts.shift();\n // Add support for lone short flag without significantly changing parsing!\n if (!shortFlag && /^-[^-]$/.test(longFlag)) {\n shortFlag = longFlag;\n longFlag = undefined;\n }\n return { shortFlag, longFlag };\n}\n\nexports.Option = Option;\nexports.DualOptions = DualOptions;\n","const maxDistance = 3;\n\nfunction editDistance(a, b) {\n // https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance\n // Calculating optimal string alignment distance, no substring is edited more than once.\n // (Simple implementation.)\n\n // Quick early exit, return worst case.\n if (Math.abs(a.length - b.length) > maxDistance) return Math.max(a.length, b.length);\n\n // distance between prefix substrings of a and b\n const d = [];\n\n // pure deletions turn a into empty string\n for (let i = 0; i <= a.length; i++) {\n d[i] = [i];\n }\n // pure insertions turn empty string into b\n for (let j = 0; j <= b.length; j++) {\n d[0][j] = j;\n }\n\n // fill matrix\n for (let j = 1; j <= b.length; j++) {\n for (let i = 1; i <= a.length; i++) {\n let cost = 1;\n if (a[i - 1] === b[j - 1]) {\n cost = 0;\n } else {\n cost = 1;\n }\n d[i][j] = Math.min(\n d[i - 1][j] + 1, // deletion\n d[i][j - 1] + 1, // insertion\n d[i - 1][j - 1] + cost // substitution\n );\n // transposition\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n }\n }\n }\n\n return d[a.length][b.length];\n}\n\n/**\n * Find close matches, restricted to same number of edits.\n *\n * @param {string} word\n * @param {string[]} candidates\n * @returns {string}\n */\n\nfunction suggestSimilar(word, candidates) {\n if (!candidates || candidates.length === 0) return '';\n // remove possible duplicates\n candidates = Array.from(new Set(candidates));\n\n const searchingOptions = word.startsWith('--');\n if (searchingOptions) {\n word = word.slice(2);\n candidates = candidates.map(candidate => candidate.slice(2));\n }\n\n let similar = [];\n let bestDistance = maxDistance;\n const minSimilarity = 0.4;\n candidates.forEach((candidate) => {\n if (candidate.length <= 1) return; // no one character guesses\n\n const distance = editDistance(word, candidate);\n const length = Math.max(word.length, candidate.length);\n const similarity = (length - distance) / length;\n if (similarity > minSimilarity) {\n if (distance < bestDistance) {\n // better edit distance, throw away previous worse matches\n bestDistance = distance;\n similar = [candidate];\n } else if (distance === bestDistance) {\n similar.push(candidate);\n }\n }\n });\n\n similar.sort((a, b) => a.localeCompare(b));\n if (searchingOptions) {\n similar = similar.map(candidate => `--${candidate}`);\n }\n\n if (similar.length > 1) {\n return `\\n(Did you mean one of ${similar.join(', ')}?)`;\n }\n if (similar.length === 1) {\n return `\\n(Did you mean ${similar[0]}?)`;\n }\n return '';\n}\n\nexports.suggestSimilar = suggestSimilar;\n","const EventEmitter = require('events').EventEmitter;\nconst childProcess = require('child_process');\nconst path = require('path');\nconst fs = require('fs');\nconst process = require('process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help } = require('./help.js');\nconst { Option, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass Command extends EventEmitter {\n /**\n * Initialize a new `Command`.\n *\n * @param {string} [name]\n */\n\n constructor(name) {\n super();\n /** @type {Command[]} */\n this.commands = [];\n /** @type {Option[]} */\n this.options = [];\n this.parent = null;\n this._allowUnknownOption = false;\n this._allowExcessArguments = true;\n /** @type {Argument[]} */\n this.registeredArguments = [];\n this._args = this.registeredArguments; // deprecated old name\n /** @type {string[]} */\n this.args = []; // cli args with options removed\n this.rawArgs = [];\n this.processedArgs = []; // like .args but after custom processing and collecting variadic\n this._scriptPath = null;\n this._name = name || '';\n this._optionValues = {};\n this._optionValueSources = {}; // default, env, cli etc\n this._storeOptionsAsProperties = false;\n this._actionHandler = null;\n this._executableHandler = false;\n this._executableFile = null; // custom name for executable\n this._executableDir = null; // custom search directory for subcommands\n this._defaultCommandName = null;\n this._exitCallback = null;\n this._aliases = [];\n this._combineFlagAndOptionalValue = true;\n this._description = '';\n this._summary = '';\n this._argsDescription = undefined; // legacy\n this._enablePositionalOptions = false;\n this._passThroughOptions = false;\n this._lifeCycleHooks = {}; // a hash of arrays\n /** @type {(boolean | string)} */\n this._showHelpAfterError = false;\n this._showSuggestionAfterError = true;\n\n // see .configureOutput() for docs\n this._outputConfiguration = {\n writeOut: (str) => process.stdout.write(str),\n writeErr: (str) => process.stderr.write(str),\n getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : undefined,\n getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : undefined,\n outputError: (str, write) => write(str)\n };\n\n this._hidden = false;\n /** @type {(Option | null | undefined)} */\n this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.\n this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited\n /** @type {Command} */\n this._helpCommand = undefined; // lazy initialised, inherited\n this._helpConfiguration = {};\n }\n\n /**\n * Copy settings that are useful to have in common across root command and subcommands.\n *\n * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n *\n * @param {Command} sourceCommand\n * @return {Command} `this` command for chaining\n */\n copyInheritedSettings(sourceCommand) {\n this._outputConfiguration = sourceCommand._outputConfiguration;\n this._helpOption = sourceCommand._helpOption;\n this._helpCommand = sourceCommand._helpCommand;\n this._helpConfiguration = sourceCommand._helpConfiguration;\n this._exitCallback = sourceCommand._exitCallback;\n this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue;\n this._allowExcessArguments = sourceCommand._allowExcessArguments;\n this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n this._showHelpAfterError = sourceCommand._showHelpAfterError;\n this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n\n return this;\n }\n\n /**\n * @returns {Command[]}\n * @private\n */\n\n _getCommandAndAncestors() {\n const result = [];\n for (let command = this; command; command = command.parent) {\n result.push(command);\n }\n return result;\n }\n\n /**\n * Define a command.\n *\n * There are two styles of command: pay attention to where to put the description.\n *\n * @example\n * // Command implemented using action handler (description is supplied separately to `.command`)\n * program\n * .command('clone <source> [destination]')\n * .description('clone a repository into a newly created directory')\n * .action((source, destination) => {\n * console.log('clone command called');\n * });\n *\n * // Command implemented using separate executable file (description is second parameter to `.command`)\n * program\n * .command('start <service>', 'start named service')\n * .command('stop [service]', 'stop named service, or all if no name supplied');\n *\n * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n * @param {(Object|string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n * @param {Object} [execOpts] - configuration options (for executable)\n * @return {Command} returns new command for action handler, or `this` for executable command\n */\n\n command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n let desc = actionOptsOrExecDesc;\n let opts = execOpts;\n if (typeof desc === 'object' && desc !== null) {\n opts = desc;\n desc = null;\n }\n opts = opts || {};\n const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n\n const cmd = this.createCommand(name);\n if (desc) {\n cmd.description(desc);\n cmd._executableHandler = true;\n }\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden\n cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor\n if (args) cmd.arguments(args);\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd.copyInheritedSettings(this);\n\n if (desc) return this;\n return cmd;\n }\n\n /**\n * Factory routine to create a new unattached command.\n *\n * See .command() for creating an attached subcommand, which uses this routine to\n * create the command. You can override createCommand to customise subcommands.\n *\n * @param {string} [name]\n * @return {Command} new command\n */\n\n createCommand(name) {\n return new Command(name);\n }\n\n /**\n * You can customise the help with a subclass of Help by overriding createHelp,\n * or by overriding Help properties using configureHelp().\n *\n * @return {Help}\n */\n\n createHelp() {\n return Object.assign(new Help(), this.configureHelp());\n }\n\n /**\n * You can customise the help by overriding Help properties using configureHelp(),\n * or with a subclass of Help by overriding createHelp().\n *\n * @param {Object} [configuration] - configuration options\n * @return {(Command|Object)} `this` command for chaining, or stored configuration\n */\n\n configureHelp(configuration) {\n if (configuration === undefined) return this._helpConfiguration;\n\n this._helpConfiguration = configuration;\n return this;\n }\n\n /**\n * The default output goes to stdout and stderr. You can customise this for special\n * applications. You can also customise the display of errors by overriding outputError.\n *\n * The configuration properties are all functions:\n *\n * // functions to change where being written, stdout and stderr\n * writeOut(str)\n * writeErr(str)\n * // matching functions to specify width for wrapping help\n * getOutHelpWidth()\n * getErrHelpWidth()\n * // functions based on what is being written out\n * outputError(str, write) // used for displaying errors, and not used for displaying help\n *\n * @param {Object} [configuration] - configuration options\n * @return {(Command|Object)} `this` command for chaining, or stored configuration\n */\n\n configureOutput(configuration) {\n if (configuration === undefined) return this._outputConfiguration;\n\n Object.assign(this._outputConfiguration, configuration);\n return this;\n }\n\n /**\n * Display the help or a custom message after an error occurs.\n *\n * @param {(boolean|string)} [displayHelp]\n * @return {Command} `this` command for chaining\n */\n showHelpAfterError(displayHelp = true) {\n if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;\n this._showHelpAfterError = displayHelp;\n return this;\n }\n\n /**\n * Display suggestion of similar commands for unknown commands, or options for unknown options.\n *\n * @param {boolean} [displaySuggestion]\n * @return {Command} `this` command for chaining\n */\n showSuggestionAfterError(displaySuggestion = true) {\n this._showSuggestionAfterError = !!displaySuggestion;\n return this;\n }\n\n /**\n * Add a prepared subcommand.\n *\n * See .command() for creating an attached subcommand which inherits settings from its parent.\n *\n * @param {Command} cmd - new subcommand\n * @param {Object} [opts] - configuration options\n * @return {Command} `this` command for chaining\n */\n\n addCommand(cmd, opts) {\n if (!cmd._name) {\n throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n }\n\n opts = opts || {};\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation\n\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd._checkForBrokenPassThrough();\n\n return this;\n }\n\n /**\n * Factory routine to create a new unattached argument.\n *\n * See .argument() for creating an attached argument, which uses this routine to\n * create the argument. You can override createArgument to return a custom argument.\n *\n * @param {string} name\n * @param {string} [description]\n * @return {Argument} new argument\n */\n\n createArgument(name, description) {\n return new Argument(name, description);\n }\n\n /**\n * Define argument syntax for command.\n *\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @example\n * program.argument('<input-file>');\n * program.argument('[output-file]');\n *\n * @param {string} name\n * @param {string} [description]\n * @param {(Function|*)} [fn] - custom argument processing function\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n argument(name, description, fn, defaultValue) {\n const argument = this.createArgument(name, description);\n if (typeof fn === 'function') {\n argument.default(defaultValue).argParser(fn);\n } else {\n argument.default(fn);\n }\n this.addArgument(argument);\n return this;\n }\n\n /**\n * Define argument syntax for command, adding multiple at once (without descriptions).\n *\n * See also .argument().\n *\n * @example\n * program.arguments('<cmd> [env]');\n *\n * @param {string} names\n * @return {Command} `this` command for chaining\n */\n\n arguments(names) {\n names.trim().split(/ +/).forEach((detail) => {\n this.argument(detail);\n });\n return this;\n }\n\n /**\n * Define argument syntax for command, adding a prepared argument.\n *\n * @param {Argument} argument\n * @return {Command} `this` command for chaining\n */\n addArgument(argument) {\n const previousArgument = this.registeredArguments.slice(-1)[0];\n if (previousArgument && previousArgument.variadic) {\n throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);\n }\n if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {\n throw new Error(`a default value for a required argument is never used: '${argument.name()}'`);\n }\n this.registeredArguments.push(argument);\n return this;\n }\n\n /**\n * Customise or override default help command. By default a help command is automatically added if your command has subcommands.\n *\n * program.helpCommand('help [cmd]');\n * program.helpCommand('help [cmd]', 'show help');\n * program.helpCommand(false); // suppress default help command\n * program.helpCommand(true); // add help command even if no subcommands\n *\n * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added\n * @param {string} [description] - custom description\n * @return {Command} `this` command for chaining\n */\n\n helpCommand(enableOrNameAndArgs, description) {\n if (typeof enableOrNameAndArgs === 'boolean') {\n this._addImplicitHelpCommand = enableOrNameAndArgs;\n return this;\n }\n\n enableOrNameAndArgs = enableOrNameAndArgs ?? 'help [command]';\n const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);\n const helpDescription = description ?? 'display help for command';\n\n const helpCommand = this.createCommand(helpName);\n helpCommand.helpOption(false);\n if (helpArgs) helpCommand.arguments(helpArgs);\n if (helpDescription) helpCommand.description(helpDescription);\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n\n return this;\n }\n\n /**\n * Add prepared custom help command.\n *\n * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`\n * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only\n * @return {Command} `this` command for chaining\n */\n addHelpCommand(helpCommand, deprecatedDescription) {\n // If not passed an object, call through to helpCommand for backwards compatibility,\n // as addHelpCommand was originally used like helpCommand is now.\n if (typeof helpCommand !== 'object') {\n this.helpCommand(helpCommand, deprecatedDescription);\n return this;\n }\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n return this;\n }\n\n /**\n * Lazy create help command.\n *\n * @return {(Command|null)}\n * @package\n */\n _getHelpCommand() {\n const hasImplicitHelpCommand = this._addImplicitHelpCommand ??\n (this.commands.length && !this._actionHandler && !this._findCommand('help'));\n\n if (hasImplicitHelpCommand) {\n if (this._helpCommand === undefined) {\n this.helpCommand(undefined, undefined); // use default name and description\n }\n return this._helpCommand;\n }\n return null;\n }\n\n /**\n * Add hook for life cycle event.\n *\n * @param {string} event\n * @param {Function} listener\n * @return {Command} `this` command for chaining\n */\n\n hook(event, listener) {\n const allowedValues = ['preSubcommand', 'preAction', 'postAction'];\n if (!allowedValues.includes(event)) {\n throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n if (this._lifeCycleHooks[event]) {\n this._lifeCycleHooks[event].push(listener);\n } else {\n this._lifeCycleHooks[event] = [listener];\n }\n return this;\n }\n\n /**\n * Register callback to use as replacement for calling process.exit.\n *\n * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n * @return {Command} `this` command for chaining\n */\n\n exitOverride(fn) {\n if (fn) {\n this._exitCallback = fn;\n } else {\n this._exitCallback = (err) => {\n if (err.code !== 'commander.executeSubCommandAsync') {\n throw err;\n } else {\n // Async callback from spawn events, not useful to throw.\n }\n };\n }\n return this;\n }\n\n /**\n * Call process.exit, and _exitCallback if defined.\n *\n * @param {number} exitCode exit code for using with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @return never\n * @private\n */\n\n _exit(exitCode, code, message) {\n if (this._exitCallback) {\n this._exitCallback(new CommanderError(exitCode, code, message));\n // Expecting this line is not reached.\n }\n process.exit(exitCode);\n }\n\n /**\n * Register callback `fn` for the command.\n *\n * @example\n * program\n * .command('serve')\n * .description('start service')\n * .action(function() {\n * // do work here\n * });\n *\n * @param {Function} fn\n * @return {Command} `this` command for chaining\n */\n\n action(fn) {\n const listener = (args) => {\n // The .action callback takes an extra parameter which is the command or options.\n const expectedArgsCount = this.registeredArguments.length;\n const actionArgs = args.slice(0, expectedArgsCount);\n if (this._storeOptionsAsProperties) {\n actionArgs[expectedArgsCount] = this; // backwards compatible \"options\"\n } else {\n actionArgs[expectedArgsCount] = this.opts();\n }\n actionArgs.push(this);\n\n return fn.apply(this, actionArgs);\n };\n this._actionHandler = listener;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached option.\n *\n * See .option() for creating an attached option, which uses this routine to\n * create the option. You can override createOption to return a custom option.\n *\n * @param {string} flags\n * @param {string} [description]\n * @return {Option} new option\n */\n\n createOption(flags, description) {\n return new Option(flags, description);\n }\n\n /**\n * Wrap parseArgs to catch 'commander.invalidArgument'.\n *\n * @param {(Option | Argument)} target\n * @param {string} value\n * @param {*} previous\n * @param {string} invalidArgumentMessage\n * @private\n */\n\n _callParseArg(target, value, previous, invalidArgumentMessage) {\n try {\n return target.parseArg(value, previous);\n } catch (err) {\n if (err.code === 'commander.invalidArgument') {\n const message = `${invalidArgumentMessage} ${err.message}`;\n this.error(message, { exitCode: err.exitCode, code: err.code });\n }\n throw err;\n }\n }\n\n /**\n * Check for option flag conflicts.\n * Register option if no conflicts found, or throw on conflict.\n *\n * @param {Option} option\n * @api private\n */\n\n _registerOption(option) {\n const matchingOption = (option.short && this._findOption(option.short)) ||\n (option.long && this._findOption(option.long));\n if (matchingOption) {\n const matchingFlag = (option.long && this._findOption(option.long)) ? option.long : option.short;\n throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'\n- already used by option '${matchingOption.flags}'`);\n }\n\n this.options.push(option);\n }\n\n /**\n * Check for command name and alias conflicts with existing commands.\n * Register command if no conflicts found, or throw on conflict.\n *\n * @param {Command} command\n * @api private\n */\n\n _registerCommand(command) {\n const knownBy = (cmd) => {\n return [cmd.name()].concat(cmd.aliases());\n };\n\n const alreadyUsed = knownBy(command).find((name) => this._findCommand(name));\n if (alreadyUsed) {\n const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');\n const newCmd = knownBy(command).join('|');\n throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);\n }\n\n this.commands.push(command);\n }\n\n /**\n * Add an option.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addOption(option) {\n this._registerOption(option);\n\n const oname = option.name();\n const name = option.attributeName();\n\n // store default value\n if (option.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(name, option.defaultValue === undefined ? true : option.defaultValue, 'default');\n }\n } else if (option.defaultValue !== undefined) {\n this.setOptionValueWithSource(name, option.defaultValue, 'default');\n }\n\n // handler for cli and env supplied values\n const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n // val is null for optional option used without an optional-argument.\n // val is undefined for boolean and negated option.\n if (val == null && option.presetArg !== undefined) {\n val = option.presetArg;\n }\n\n // custom processing\n const oldValue = this.getOptionValue(name);\n if (val !== null && option.parseArg) {\n val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n } else if (val !== null && option.variadic) {\n val = option._concatValue(val, oldValue);\n }\n\n // Fill-in appropriate missing values. Long winded but easy to follow.\n if (val == null) {\n if (option.negate) {\n val = false;\n } else if (option.isBoolean() || option.optional) {\n val = true;\n } else {\n val = ''; // not normal, parseArg might have failed or be a mock function for testing\n }\n }\n this.setOptionValueWithSource(name, val, valueSource);\n };\n\n this.on('option:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'cli');\n });\n\n if (option.envVar) {\n this.on('optionEnv:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'env');\n });\n }\n\n return this;\n }\n\n /**\n * Internal implementation shared by .option() and .requiredOption()\n *\n * @private\n */\n _optionEx(config, flags, description, fn, defaultValue) {\n if (typeof flags === 'object' && flags instanceof Option) {\n throw new Error('To add an Option object use addOption() instead of option() or requiredOption()');\n }\n const option = this.createOption(flags, description);\n option.makeOptionMandatory(!!config.mandatory);\n if (typeof fn === 'function') {\n option.default(defaultValue).argParser(fn);\n } else if (fn instanceof RegExp) {\n // deprecated\n const regex = fn;\n fn = (val, def) => {\n const m = regex.exec(val);\n return m ? m[0] : def;\n };\n option.default(defaultValue).argParser(fn);\n } else {\n option.default(fn);\n }\n\n return this.addOption(option);\n }\n\n /**\n * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n *\n * See the README for more details, and see also addOption() and requiredOption().\n *\n * @example\n * program\n * .option('-p, --pepper', 'add pepper')\n * .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n option(flags, description, parseArg, defaultValue) {\n return this._optionEx({}, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Add a required option which must have a value after parsing. This usually means\n * the option must be specified on the command line. (Otherwise the same as .option().)\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n requiredOption(flags, description, parseArg, defaultValue) {\n return this._optionEx({ mandatory: true }, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Alter parsing of short flags with optional values.\n *\n * @example\n * // for `.option('-f,--flag [value]'):\n * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour\n * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n *\n * @param {boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag.\n */\n combineFlagAndOptionalValue(combine = true) {\n this._combineFlagAndOptionalValue = !!combine;\n return this;\n }\n\n /**\n * Allow unknown options on the command line.\n *\n * @param {boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown\n * for unknown options.\n */\n allowUnknownOption(allowUnknown = true) {\n this._allowUnknownOption = !!allowUnknown;\n return this;\n }\n\n /**\n * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n *\n * @param {boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown\n * for excess arguments.\n */\n allowExcessArguments(allowExcess = true) {\n this._allowExcessArguments = !!allowExcess;\n return this;\n }\n\n /**\n * Enable positional options. Positional means global options are specified before subcommands which lets\n * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n * The default behaviour is non-positional and global options may appear anywhere on the command line.\n *\n * @param {boolean} [positional=true]\n */\n enablePositionalOptions(positional = true) {\n this._enablePositionalOptions = !!positional;\n return this;\n }\n\n /**\n * Pass through options that come after command-arguments rather than treat them as command-options,\n * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n * positional options to have been enabled on the program (parent commands).\n * The default behaviour is non-positional and options may appear before or after command-arguments.\n *\n * @param {boolean} [passThrough=true]\n * for unknown options.\n */\n passThroughOptions(passThrough = true) {\n this._passThroughOptions = !!passThrough;\n this._checkForBrokenPassThrough();\n return this;\n }\n\n /**\n * @private\n */\n\n _checkForBrokenPassThrough() {\n if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) {\n throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`);\n }\n }\n\n /**\n * Whether to store option values as properties on command object,\n * or store separately (specify false). In both cases the option values can be accessed using .opts().\n *\n * @param {boolean} [storeAsProperties=true]\n * @return {Command} `this` command for chaining\n */\n\n storeOptionsAsProperties(storeAsProperties = true) {\n if (this.options.length) {\n throw new Error('call .storeOptionsAsProperties() before adding options');\n }\n if (Object.keys(this._optionValues).length) {\n throw new Error('call .storeOptionsAsProperties() before setting option values');\n }\n this._storeOptionsAsProperties = !!storeAsProperties;\n return this;\n }\n\n /**\n * Retrieve option value.\n *\n * @param {string} key\n * @return {Object} value\n */\n\n getOptionValue(key) {\n if (this._storeOptionsAsProperties) {\n return this[key];\n }\n return this._optionValues[key];\n }\n\n /**\n * Store option value.\n *\n * @param {string} key\n * @param {Object} value\n * @return {Command} `this` command for chaining\n */\n\n setOptionValue(key, value) {\n return this.setOptionValueWithSource(key, value, undefined);\n }\n\n /**\n * Store option value and where the value came from.\n *\n * @param {string} key\n * @param {Object} value\n * @param {string} source - expected values are default/config/env/cli/implied\n * @return {Command} `this` command for chaining\n */\n\n setOptionValueWithSource(key, value, source) {\n if (this._storeOptionsAsProperties) {\n this[key] = value;\n } else {\n this._optionValues[key] = value;\n }\n this._optionValueSources[key] = source;\n return this;\n }\n\n /**\n * Get source of option value.\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSource(key) {\n return this._optionValueSources[key];\n }\n\n /**\n * Get source of option value. See also .optsWithGlobals().\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSourceWithGlobals(key) {\n // global overwrites local, like optsWithGlobals\n let source;\n this._getCommandAndAncestors().forEach((cmd) => {\n if (cmd.getOptionValueSource(key) !== undefined) {\n source = cmd.getOptionValueSource(key);\n }\n });\n return source;\n }\n\n /**\n * Get user arguments from implied or explicit arguments.\n * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n *\n * @private\n */\n\n _prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // Default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n // @ts-ignore: unknown property\n if (process.versions && process.versions.electron) {\n parseOptions.from = 'electron';\n }\n }\n this.rawArgs = argv.slice();\n\n // make it a little easier for callers by supporting various argv conventions\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n default:\n throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);\n }\n\n // Find default name for program from arguments.\n if (!this._name && this._scriptPath) this.nameFromFilename(this._scriptPath);\n this._name = this._name || 'program';\n\n return userArgs;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * The default expectation is that the arguments are from node and have the application as argv[0]\n * and the script being run in argv[1], with user parameters after that.\n *\n * @example\n * program.parse(process.argv);\n * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions\n * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv] - optional, defaults to process.argv\n * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron\n * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n * @return {Command} `this` command for chaining\n */\n\n parse(argv, parseOptions) {\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.\n *\n * The default expectation is that the arguments are from node and have the application as argv[0]\n * and the script being run in argv[1], with user parameters after that.\n *\n * @example\n * await program.parseAsync(process.argv);\n * await program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions\n * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv]\n * @param {Object} [parseOptions]\n * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n * @return {Promise}\n */\n\n async parseAsync(argv, parseOptions) {\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n await this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Execute a sub-command executable.\n *\n * @private\n */\n\n _executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n function findFile(baseDir, baseName) {\n // Look for specified file\n const localBin = path.resolve(baseDir, baseName);\n if (fs.existsSync(localBin)) return localBin;\n\n // Stop looking if candidate already has an expected extension.\n if (sourceExt.includes(path.extname(baseName))) return undefined;\n\n // Try all the extensions.\n const foundExt = sourceExt.find(ext => fs.existsSync(`${localBin}${ext}`));\n if (foundExt) return `${localBin}${foundExt}`;\n\n return undefined;\n }\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // executableFile and executableDir might be full path, or just a name\n let executableFile = subcommand._executableFile || `${this._name}-${subcommand._name}`;\n let executableDir = this._executableDir || '';\n if (this._scriptPath) {\n let resolvedScriptPath; // resolve possible symlink for installed npm binary\n try {\n resolvedScriptPath = fs.realpathSync(this._scriptPath);\n } catch (err) {\n resolvedScriptPath = this._scriptPath;\n }\n executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);\n }\n\n // Look for a local file in preference to a command in PATH.\n if (executableDir) {\n let localFile = findFile(executableDir, executableFile);\n\n // Legacy search using prefix of script name instead of command name\n if (!localFile && !subcommand._executableFile && this._scriptPath) {\n const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));\n if (legacyName !== this._name) {\n localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);\n }\n }\n executableFile = localFile || executableFile;\n }\n\n launchWithNode = sourceExt.includes(path.extname(executableFile));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n if (!proc.killed) { // testing mainly to avoid leak warnings during unit tests with mocked spawn\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n // @ts-ignore\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n proc.kill(signal);\n }\n });\n });\n }\n\n // By default terminate process when spawned process terminates.\n const exitCallback = this._exitCallback;\n proc.on('close', (code, _signal) => {\n code = code ?? 1; // code is null if spawned process terminated due to a signal\n if (!exitCallback) {\n process.exit(code);\n } else {\n exitCallback(new CommanderError(code, 'commander.executeSubCommandAsync', '(close)'));\n }\n });\n proc.on('error', (err) => {\n // @ts-ignore\n if (err.code === 'ENOENT') {\n const executableDirMessage = executableDir\n ? `searched for local subcommand relative to directory '${executableDir}'`\n : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';\n const executableMissing = `'${executableFile}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n throw new Error(executableMissing);\n // @ts-ignore\n } else if (err.code === 'EACCES') {\n throw new Error(`'${executableFile}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }\n\n /**\n * @private\n */\n\n _dispatchSubcommand(commandName, operands, unknown) {\n const subCommand = this._findCommand(commandName);\n if (!subCommand) this.help({ error: true });\n\n let promiseChain;\n promiseChain = this._chainOrCallSubCommandHook(promiseChain, subCommand, 'preSubcommand');\n promiseChain = this._chainOrCall(promiseChain, () => {\n if (subCommand._executableHandler) {\n this._executeSubCommand(subCommand, operands.concat(unknown));\n } else {\n return subCommand._parseCommand(operands, unknown);\n }\n });\n return promiseChain;\n }\n\n /**\n * Invoke help directly if possible, or dispatch if necessary.\n * e.g. help foo\n *\n * @private\n */\n\n _dispatchHelpCommand(subcommandName) {\n if (!subcommandName) {\n this.help();\n }\n const subCommand = this._findCommand(subcommandName);\n if (subCommand && !subCommand._executableHandler) {\n subCommand.help();\n }\n\n // Fallback to parsing the help flag to invoke the help.\n return this._dispatchSubcommand(subcommandName, [], [\n this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'\n ]);\n }\n\n /**\n * Check this.args against expected this.registeredArguments.\n *\n * @private\n */\n\n _checkNumberOfArguments() {\n // too few\n this.registeredArguments.forEach((arg, i) => {\n if (arg.required && this.args[i] == null) {\n this.missingArgument(arg.name());\n }\n });\n // too many\n if (this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) {\n return;\n }\n if (this.args.length > this.registeredArguments.length) {\n this._excessArguments(this.args);\n }\n }\n\n /**\n * Process this.args using this.registeredArguments and save as this.processedArgs!\n *\n * @private\n */\n\n _processArguments() {\n const myParseArg = (argument, value, previous) => {\n // Extra processing for nice error message on parsing failure.\n let parsedValue = value;\n if (value !== null && argument.parseArg) {\n const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n parsedValue = this._callParseArg(argument, value, previous, invalidValueMessage);\n }\n return parsedValue;\n };\n\n this._checkNumberOfArguments();\n\n const processedArgs = [];\n this.registeredArguments.forEach((declaredArg, index) => {\n let value = declaredArg.defaultValue;\n if (declaredArg.variadic) {\n // Collect together remaining arguments for passing together as an array.\n if (index < this.args.length) {\n value = this.args.slice(index);\n if (declaredArg.parseArg) {\n value = value.reduce((processed, v) => {\n return myParseArg(declaredArg, v, processed);\n }, declaredArg.defaultValue);\n }\n } else if (value === undefined) {\n value = [];\n }\n } else if (index < this.args.length) {\n value = this.args[index];\n if (declaredArg.parseArg) {\n value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n }\n }\n processedArgs[index] = value;\n });\n this.processedArgs = processedArgs;\n }\n\n /**\n * Once we have a promise we chain, but call synchronously until then.\n *\n * @param {(Promise|undefined)} promise\n * @param {Function} fn\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCall(promise, fn) {\n // thenable\n if (promise && promise.then && typeof promise.then === 'function') {\n // already have a promise, chain callback\n return promise.then(() => fn());\n }\n // callback might return a promise\n return fn();\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallHooks(promise, event) {\n let result = promise;\n const hooks = [];\n this._getCommandAndAncestors()\n .reverse()\n .filter(cmd => cmd._lifeCycleHooks[event] !== undefined)\n .forEach(hookedCommand => {\n hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n hooks.push({ hookedCommand, callback });\n });\n });\n if (event === 'postAction') {\n hooks.reverse();\n }\n\n hooks.forEach((hookDetail) => {\n result = this._chainOrCall(result, () => {\n return hookDetail.callback(hookDetail.hookedCommand, this);\n });\n });\n return result;\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {Command} subCommand\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallSubCommandHook(promise, subCommand, event) {\n let result = promise;\n if (this._lifeCycleHooks[event] !== undefined) {\n this._lifeCycleHooks[event].forEach((hook) => {\n result = this._chainOrCall(result, () => {\n return hook(this, subCommand);\n });\n });\n }\n return result;\n }\n\n /**\n * Process arguments in context of this command.\n * Returns action result, in case it is a promise.\n *\n * @private\n */\n\n _parseCommand(operands, unknown) {\n const parsed = this.parseOptions(unknown);\n this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env\n this._parseOptionsImplied();\n operands = operands.concat(parsed.operands);\n unknown = parsed.unknown;\n this.args = operands.concat(unknown);\n\n if (operands && this._findCommand(operands[0])) {\n return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n }\n if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {\n return this._dispatchHelpCommand(operands[1]);\n }\n if (this._defaultCommandName) {\n this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command\n return this._dispatchSubcommand(this._defaultCommandName, operands, unknown);\n }\n if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {\n // probably missing subcommand and no handler, user needs help (and exit)\n this.help({ error: true });\n }\n\n this._outputHelpIfRequested(parsed.unknown);\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // We do not always call this check to avoid masking a \"better\" error, like unknown command.\n const checkForUnknownOptions = () => {\n if (parsed.unknown.length > 0) {\n this.unknownOption(parsed.unknown[0]);\n }\n };\n\n const commandEvent = `command:${this.name()}`;\n if (this._actionHandler) {\n checkForUnknownOptions();\n this._processArguments();\n\n let promiseChain;\n promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');\n promiseChain = this._chainOrCall(promiseChain, () => this._actionHandler(this.processedArgs));\n if (this.parent) {\n promiseChain = this._chainOrCall(promiseChain, () => {\n this.parent.emit(commandEvent, operands, unknown); // legacy\n });\n }\n promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');\n return promiseChain;\n }\n if (this.parent && this.parent.listenerCount(commandEvent)) {\n checkForUnknownOptions();\n this._processArguments();\n this.parent.emit(commandEvent, operands, unknown); // legacy\n } else if (operands.length) {\n if (this._findCommand('*')) { // legacy default command\n return this._dispatchSubcommand('*', operands, unknown);\n }\n if (this.listenerCount('command:*')) {\n // skip option check, emit event for possible misspelling suggestion\n this.emit('command:*', operands, unknown);\n } else if (this.commands.length) {\n this.unknownCommand();\n } else {\n checkForUnknownOptions();\n this._processArguments();\n }\n } else if (this.commands.length) {\n checkForUnknownOptions();\n // This command has subcommands and nothing hooked up at this level, so display help (and exit).\n this.help({ error: true });\n } else {\n checkForUnknownOptions();\n this._processArguments();\n // fall through for caller to handle after calling .parse()\n }\n }\n\n /**\n * Find matching command.\n *\n * @private\n */\n _findCommand(name) {\n if (!name) return undefined;\n return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name));\n }\n\n /**\n * Return an option matching `arg` if any.\n *\n * @param {string} arg\n * @return {Option}\n * @package internal use only\n */\n\n _findOption(arg) {\n return this.options.find(option => option.is(arg));\n }\n\n /**\n * Display an error message if a mandatory option does not have a value.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n\n _checkForMissingMandatoryOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd.options.forEach((anOption) => {\n if (anOption.mandatory && (cmd.getOptionValue(anOption.attributeName()) === undefined)) {\n cmd.missingMandatoryOptionValue(anOption);\n }\n });\n });\n }\n\n /**\n * Display an error message if conflicting options are used together in this.\n *\n * @private\n */\n _checkForConflictingLocalOptions() {\n const definedNonDefaultOptions = this.options.filter(\n (option) => {\n const optionKey = option.attributeName();\n if (this.getOptionValue(optionKey) === undefined) {\n return false;\n }\n return this.getOptionValueSource(optionKey) !== 'default';\n }\n );\n\n const optionsWithConflicting = definedNonDefaultOptions.filter(\n (option) => option.conflictsWith.length > 0\n );\n\n optionsWithConflicting.forEach((option) => {\n const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>\n option.conflictsWith.includes(defined.attributeName())\n );\n if (conflictingAndDefined) {\n this._conflictingOption(option, conflictingAndDefined);\n }\n });\n }\n\n /**\n * Display an error message if conflicting options are used together.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n _checkForConflictingOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd._checkForConflictingLocalOptions();\n });\n }\n\n /**\n * Parse options from `argv` removing known options,\n * and return argv split into operands and unknown arguments.\n *\n * Examples:\n *\n * argv => operands, unknown\n * --known kkk op => [op], []\n * op --known kkk => [op], []\n * sub --unknown uuu op => [sub], [--unknown uuu op]\n * sub -- --unknown uuu op => [sub --unknown uuu op], []\n *\n * @param {string[]} argv\n * @return {{operands: string[], unknown: string[]}}\n */\n\n parseOptions(argv) {\n const operands = []; // operands, not options or values\n const unknown = []; // first unknown option and remaining unknown args\n let dest = operands;\n const args = argv.slice();\n\n function maybeOption(arg) {\n return arg.length > 1 && arg[0] === '-';\n }\n\n // parse options\n let activeVariadicOption = null;\n while (args.length) {\n const arg = args.shift();\n\n // literal\n if (arg === '--') {\n if (dest === unknown) dest.push(arg);\n dest.push(...args);\n break;\n }\n\n if (activeVariadicOption && !maybeOption(arg)) {\n this.emit(`option:${activeVariadicOption.name()}`, arg);\n continue;\n }\n activeVariadicOption = null;\n\n if (maybeOption(arg)) {\n const option = this._findOption(arg);\n // recognised option, call listener to assign value with possible custom processing\n if (option) {\n if (option.required) {\n const value = args.shift();\n if (value === undefined) this.optionMissingArgument(option);\n this.emit(`option:${option.name()}`, value);\n } else if (option.optional) {\n let value = null;\n // historical behaviour is optional value is following arg unless an option\n if (args.length > 0 && !maybeOption(args[0])) {\n value = args.shift();\n }\n this.emit(`option:${option.name()}`, value);\n } else { // boolean flag\n this.emit(`option:${option.name()}`);\n }\n activeVariadicOption = option.variadic ? option : null;\n continue;\n }\n }\n\n // Look for combo options following single dash, eat first one if known.\n if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {\n const option = this._findOption(`-${arg[1]}`);\n if (option) {\n if (option.required || (option.optional && this._combineFlagAndOptionalValue)) {\n // option with value following in same argument\n this.emit(`option:${option.name()}`, arg.slice(2));\n } else {\n // boolean option, emit and put back remainder of arg for further processing\n this.emit(`option:${option.name()}`);\n args.unshift(`-${arg.slice(2)}`);\n }\n continue;\n }\n }\n\n // Look for known long flag with value, like --foo=bar\n if (/^--[^=]+=/.test(arg)) {\n const index = arg.indexOf('=');\n const option = this._findOption(arg.slice(0, index));\n if (option && (option.required || option.optional)) {\n this.emit(`option:${option.name()}`, arg.slice(index + 1));\n continue;\n }\n }\n\n // Not a recognised option by this command.\n // Might be a command-argument, or subcommand option, or unknown option, or help command or option.\n\n // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.\n if (maybeOption(arg)) {\n dest = unknown;\n }\n\n // If using positionalOptions, stop processing our options at subcommand.\n if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {\n if (this._findCommand(arg)) {\n operands.push(arg);\n if (args.length > 0) unknown.push(...args);\n break;\n } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {\n operands.push(arg);\n if (args.length > 0) operands.push(...args);\n break;\n } else if (this._defaultCommandName) {\n unknown.push(arg);\n if (args.length > 0) unknown.push(...args);\n break;\n }\n }\n\n // If using passThroughOptions, stop processing options at first command-argument.\n if (this._passThroughOptions) {\n dest.push(arg);\n if (args.length > 0) dest.push(...args);\n break;\n }\n\n // add arg\n dest.push(arg);\n }\n\n return { operands, unknown };\n }\n\n /**\n * Return an object containing local option values as key-value pairs.\n *\n * @return {Object}\n */\n opts() {\n if (this._storeOptionsAsProperties) {\n // Preserve original behaviour so backwards compatible when still using properties\n const result = {};\n const len = this.options.length;\n\n for (let i = 0; i < len; i++) {\n const key = this.options[i].attributeName();\n result[key] = key === this._versionOptionName ? this._version : this[key];\n }\n return result;\n }\n\n return this._optionValues;\n }\n\n /**\n * Return an object containing merged local and global option values as key-value pairs.\n *\n * @return {Object}\n */\n optsWithGlobals() {\n // globals overwrite locals\n return this._getCommandAndAncestors().reduce(\n (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n {}\n );\n }\n\n /**\n * Display error message and exit (or call exitOverride).\n *\n * @param {string} message\n * @param {Object} [errorOptions]\n * @param {string} [errorOptions.code] - an id string representing the error\n * @param {number} [errorOptions.exitCode] - used with process.exit\n */\n error(message, errorOptions) {\n // output handling\n this._outputConfiguration.outputError(`${message}\\n`, this._outputConfiguration.writeErr);\n if (typeof this._showHelpAfterError === 'string') {\n this._outputConfiguration.writeErr(`${this._showHelpAfterError}\\n`);\n } else if (this._showHelpAfterError) {\n this._outputConfiguration.writeErr('\\n');\n this.outputHelp({ error: true });\n }\n\n // exit handling\n const config = errorOptions || {};\n const exitCode = config.exitCode || 1;\n const code = config.code || 'commander.error';\n this._exit(exitCode, code, message);\n }\n\n /**\n * Apply any option related environment variables, if option does\n * not have a value from cli or client code.\n *\n * @private\n */\n _parseOptionsEnv() {\n this.options.forEach((option) => {\n if (option.envVar && option.envVar in process.env) {\n const optionKey = option.attributeName();\n // Priority check. Do not overwrite cli or options from unknown source (client-code).\n if (this.getOptionValue(optionKey) === undefined || ['default', 'config', 'env'].includes(this.getOptionValueSource(optionKey))) {\n if (option.required || option.optional) { // option can take a value\n // keep very simple, optional always takes value\n this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);\n } else { // boolean\n // keep very simple, only care that envVar defined and not the value\n this.emit(`optionEnv:${option.name()}`);\n }\n }\n }\n });\n }\n\n /**\n * Apply any implied option values, if option is undefined or default value.\n *\n * @private\n */\n _parseOptionsImplied() {\n const dualHelper = new DualOptions(this.options);\n const hasCustomOptionValue = (optionKey) => {\n return this.getOptionValue(optionKey) !== undefined && !['default', 'implied'].includes(this.getOptionValueSource(optionKey));\n };\n this.options\n .filter(option => (option.implied !== undefined) &&\n hasCustomOptionValue(option.attributeName()) &&\n dualHelper.valueFromOption(this.getOptionValue(option.attributeName()), option))\n .forEach((option) => {\n Object.keys(option.implied)\n .filter(impliedKey => !hasCustomOptionValue(impliedKey))\n .forEach(impliedKey => {\n this.setOptionValueWithSource(impliedKey, option.implied[impliedKey], 'implied');\n });\n });\n }\n\n /**\n * Argument `name` is missing.\n *\n * @param {string} name\n * @private\n */\n\n missingArgument(name) {\n const message = `error: missing required argument '${name}'`;\n this.error(message, { code: 'commander.missingArgument' });\n }\n\n /**\n * `Option` is missing an argument.\n *\n * @param {Option} option\n * @private\n */\n\n optionMissingArgument(option) {\n const message = `error: option '${option.flags}' argument missing`;\n this.error(message, { code: 'commander.optionMissingArgument' });\n }\n\n /**\n * `Option` does not have a value, and is a mandatory option.\n *\n * @param {Option} option\n * @private\n */\n\n missingMandatoryOptionValue(option) {\n const message = `error: required option '${option.flags}' not specified`;\n this.error(message, { code: 'commander.missingMandatoryOptionValue' });\n }\n\n /**\n * `Option` conflicts with another option.\n *\n * @param {Option} option\n * @param {Option} conflictingOption\n * @private\n */\n _conflictingOption(option, conflictingOption) {\n // The calling code does not know whether a negated option is the source of the\n // value, so do some work to take an educated guess.\n const findBestOptionFromValue = (option) => {\n const optionKey = option.attributeName();\n const optionValue = this.getOptionValue(optionKey);\n const negativeOption = this.options.find(target => target.negate && optionKey === target.attributeName());\n const positiveOption = this.options.find(target => !target.negate && optionKey === target.attributeName());\n if (negativeOption && (\n (negativeOption.presetArg === undefined && optionValue === false) ||\n (negativeOption.presetArg !== undefined && optionValue === negativeOption.presetArg)\n )) {\n return negativeOption;\n }\n return positiveOption || option;\n };\n\n const getErrorMessage = (option) => {\n const bestOption = findBestOptionFromValue(option);\n const optionKey = bestOption.attributeName();\n const source = this.getOptionValueSource(optionKey);\n if (source === 'env') {\n return `environment variable '${bestOption.envVar}'`;\n }\n return `option '${bestOption.flags}'`;\n };\n\n const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n this.error(message, { code: 'commander.conflictingOption' });\n }\n\n /**\n * Unknown option `flag`.\n *\n * @param {string} flag\n * @private\n */\n\n unknownOption(flag) {\n if (this._allowUnknownOption) return;\n let suggestion = '';\n\n if (flag.startsWith('--') && this._showSuggestionAfterError) {\n // Looping to pick up the global options too\n let candidateFlags = [];\n let command = this;\n do {\n const moreFlags = command.createHelp().visibleOptions(command)\n .filter(option => option.long)\n .map(option => option.long);\n candidateFlags = candidateFlags.concat(moreFlags);\n command = command.parent;\n } while (command && !command._enablePositionalOptions);\n suggestion = suggestSimilar(flag, candidateFlags);\n }\n\n const message = `error: unknown option '${flag}'${suggestion}`;\n this.error(message, { code: 'commander.unknownOption' });\n }\n\n /**\n * Excess arguments, more than expected.\n *\n * @param {string[]} receivedArgs\n * @private\n */\n\n _excessArguments(receivedArgs) {\n if (this._allowExcessArguments) return;\n\n const expected = this.registeredArguments.length;\n const s = (expected === 1) ? '' : 's';\n const forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\n this.error(message, { code: 'commander.excessArguments' });\n }\n\n /**\n * Unknown command.\n *\n * @private\n */\n\n unknownCommand() {\n const unknownName = this.args[0];\n let suggestion = '';\n\n if (this._showSuggestionAfterError) {\n const candidateNames = [];\n this.createHelp().visibleCommands(this).forEach((command) => {\n candidateNames.push(command.name());\n // just visible alias\n if (command.alias()) candidateNames.push(command.alias());\n });\n suggestion = suggestSimilar(unknownName, candidateNames);\n }\n\n const message = `error: unknown command '${unknownName}'${suggestion}`;\n this.error(message, { code: 'commander.unknownCommand' });\n }\n\n /**\n * Get or set the program version.\n *\n * This method auto-registers the \"-V, --version\" option which will print the version number.\n *\n * You can optionally supply the flags and description to override the defaults.\n *\n * @param {string} [str]\n * @param {string} [flags]\n * @param {string} [description]\n * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments\n */\n\n version(str, flags, description) {\n if (str === undefined) return this._version;\n this._version = str;\n flags = flags || '-V, --version';\n description = description || 'output the version number';\n const versionOption = this.createOption(flags, description);\n this._versionOptionName = versionOption.attributeName();\n this._registerOption(versionOption);\n\n this.on('option:' + versionOption.name(), () => {\n this._outputConfiguration.writeOut(`${str}\\n`);\n this._exit(0, 'commander.version', str);\n });\n return this;\n }\n\n /**\n * Set the description.\n *\n * @param {string} [str]\n * @param {Object} [argsDescription]\n * @return {(string|Command)}\n */\n description(str, argsDescription) {\n if (str === undefined && argsDescription === undefined) return this._description;\n this._description = str;\n if (argsDescription) {\n this._argsDescription = argsDescription;\n }\n return this;\n }\n\n /**\n * Set the summary. Used when listed as subcommand of parent.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n summary(str) {\n if (str === undefined) return this._summary;\n this._summary = str;\n return this;\n }\n\n /**\n * Set an alias for the command.\n *\n * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n *\n * @param {string} [alias]\n * @return {(string|Command)}\n */\n\n alias(alias) {\n if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility\n\n /** @type {Command} */\n let command = this;\n if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {\n // assume adding alias for last added executable subcommand, rather than this\n command = this.commands[this.commands.length - 1];\n }\n\n if (alias === command._name) throw new Error('Command alias can\\'t be the same as its name');\n const matchingCommand = this.parent?._findCommand(alias);\n if (matchingCommand) {\n // c.f. _registerCommand\n const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join('|');\n throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);\n }\n\n command._aliases.push(alias);\n return this;\n }\n\n /**\n * Set aliases for the command.\n *\n * Only the first alias is shown in the auto-generated help.\n *\n * @param {string[]} [aliases]\n * @return {(string[]|Command)}\n */\n\n aliases(aliases) {\n // Getter for the array of aliases is the main reason for having aliases() in addition to alias().\n if (aliases === undefined) return this._aliases;\n\n aliases.forEach((alias) => this.alias(alias));\n return this;\n }\n\n /**\n * Set / get the command usage `str`.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n usage(str) {\n if (str === undefined) {\n if (this._usage) return this._usage;\n\n const args = this.registeredArguments.map((arg) => {\n return humanReadableArgName(arg);\n });\n return [].concat(\n (this.options.length || (this._helpOption !== null) ? '[options]' : []),\n (this.commands.length ? '[command]' : []),\n (this.registeredArguments.length ? args : [])\n ).join(' ');\n }\n\n this._usage = str;\n return this;\n }\n\n /**\n * Get or set the name of the command.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n name(str) {\n if (str === undefined) return this._name;\n this._name = str;\n return this;\n }\n\n /**\n * Set the name of the command from script filename, such as process.argv[1],\n * or require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.filename);\n *\n * @param {string} filename\n * @return {Command}\n */\n\n nameFromFilename(filename) {\n this._name = path.basename(filename, path.extname(filename));\n\n return this;\n }\n\n /**\n * Get or set the directory for searching for executable subcommands of this command.\n *\n * @example\n * program.executableDir(__dirname);\n * // or\n * program.executableDir('subcommands');\n *\n * @param {string} [path]\n * @return {(string|null|Command)}\n */\n\n executableDir(path) {\n if (path === undefined) return this._executableDir;\n this._executableDir = path;\n return this;\n }\n\n /**\n * Return program help documentation.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n * @return {string}\n */\n\n helpInformation(contextOptions) {\n const helper = this.createHelp();\n if (helper.helpWidth === undefined) {\n helper.helpWidth = (contextOptions && contextOptions.error) ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();\n }\n return helper.formatHelp(this, helper);\n }\n\n /**\n * @private\n */\n\n _getHelpContext(contextOptions) {\n contextOptions = contextOptions || {};\n const context = { error: !!contextOptions.error };\n let write;\n if (context.error) {\n write = (arg) => this._outputConfiguration.writeErr(arg);\n } else {\n write = (arg) => this._outputConfiguration.writeOut(arg);\n }\n context.write = contextOptions.write || write;\n context.command = this;\n return context;\n }\n\n /**\n * Output help information for this command.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n outputHelp(contextOptions) {\n let deprecatedCallback;\n if (typeof contextOptions === 'function') {\n deprecatedCallback = contextOptions;\n contextOptions = undefined;\n }\n const context = this._getHelpContext(contextOptions);\n\n this._getCommandAndAncestors().reverse().forEach(command => command.emit('beforeAllHelp', context));\n this.emit('beforeHelp', context);\n\n let helpInformation = this.helpInformation(context);\n if (deprecatedCallback) {\n helpInformation = deprecatedCallback(helpInformation);\n if (typeof helpInformation !== 'string' && !Buffer.isBuffer(helpInformation)) {\n throw new Error('outputHelp callback must return a string or a Buffer');\n }\n }\n context.write(helpInformation);\n\n if (this._getHelpOption()?.long) {\n this.emit(this._getHelpOption().long); // deprecated\n }\n this.emit('afterHelp', context);\n this._getCommandAndAncestors().forEach(command => command.emit('afterAllHelp', context));\n }\n\n /**\n * You can pass in flags and a description to customise the built-in help option.\n * Pass in false to disable the built-in help option.\n *\n * @example\n * program.helpOption('-?, --help' 'show help'); // customise\n * program.helpOption(false); // disable\n *\n * @param {(string | boolean)} flags\n * @param {string} [description]\n * @return {Command} `this` command for chaining\n */\n\n helpOption(flags, description) {\n // Support disabling built-in help option.\n if (typeof flags === 'boolean') {\n if (flags) {\n this._helpOption = this._helpOption ?? undefined; // preserve existing option\n } else {\n this._helpOption = null; // disable\n }\n return this;\n }\n\n // Customise flags and description.\n flags = flags ?? '-h, --help';\n description = description ?? 'display help for command';\n this._helpOption = this.createOption(flags, description);\n\n return this;\n }\n\n /**\n * Lazy create help option.\n * Returns null if has been disabled with .helpOption(false).\n *\n * @returns {(Option | null)} the help option\n * @package internal use only\n */\n _getHelpOption() {\n // Lazy create help option on demand.\n if (this._helpOption === undefined) {\n this.helpOption(undefined, undefined);\n }\n return this._helpOption;\n }\n\n /**\n * Supply your own option to use for the built-in help option.\n * This is an alternative to using helpOption() to customise the flags and description etc.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addHelpOption(option) {\n this._helpOption = option;\n return this;\n }\n\n /**\n * Output help information and exit.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n help(contextOptions) {\n this.outputHelp(contextOptions);\n let exitCode = process.exitCode || 0;\n if (exitCode === 0 && contextOptions && typeof contextOptions !== 'function' && contextOptions.error) {\n exitCode = 1;\n }\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(exitCode, 'commander.help', '(outputHelp)');\n }\n\n /**\n * Add additional text to be displayed with the built-in help.\n *\n * Position is 'before' or 'after' to affect just this command,\n * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n *\n * @param {string} position - before or after built-in help\n * @param {(string | Function)} text - string to add, or a function returning a string\n * @return {Command} `this` command for chaining\n */\n addHelpText(position, text) {\n const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];\n if (!allowedValues.includes(position)) {\n throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n const helpEvent = `${position}Help`;\n this.on(helpEvent, (context) => {\n let helpStr;\n if (typeof text === 'function') {\n helpStr = text({ error: context.error, command: context.command });\n } else {\n helpStr = text;\n }\n // Ignore falsy value when nothing to output.\n if (helpStr) {\n context.write(`${helpStr}\\n`);\n }\n });\n return this;\n }\n\n /**\n * Output help information if help flags specified\n *\n * @param {Array} args - array of options to search for help flags\n * @private\n */\n\n _outputHelpIfRequested(args) {\n const helpOption = this._getHelpOption();\n const helpRequested = helpOption && args.find(arg => helpOption.is(arg));\n if (helpRequested) {\n this.outputHelp();\n // (Do not have all displayed text available so only passing placeholder.)\n this._exit(0, 'commander.helpDisplayed', '(outputHelp)');\n }\n }\n}\n\n/**\n * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).\n *\n * @param {string[]} args - array of arguments from node.execArgv\n * @returns {string[]}\n * @private\n */\n\nfunction incrementNodeInspectorPort(args) {\n // Testing for these options:\n // --inspect[=[host:]port]\n // --inspect-brk[=[host:]port]\n // --inspect-port=[host:]port\n return args.map((arg) => {\n if (!arg.startsWith('--inspect')) {\n return arg;\n }\n let debugOption;\n let debugHost = '127.0.0.1';\n let debugPort = '9229';\n let match;\n if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n // e.g. --inspect\n debugOption = match[1];\n } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {\n debugOption = match[1];\n if (/^\\d+$/.test(match[3])) {\n // e.g. --inspect=1234\n debugPort = match[3];\n } else {\n // e.g. --inspect=localhost\n debugHost = match[3];\n }\n } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null) {\n // e.g. --inspect=localhost:1234\n debugOption = match[1];\n debugHost = match[3];\n debugPort = match[4];\n }\n\n if (debugOption && debugPort !== '0') {\n return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n }\n return arg;\n });\n}\n\nexports.Command = Command;\n","const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\nexports.program = new Command();\n\nexports.createCommand = (name) => new Command(name);\nexports.createOption = (flags, description) => new Option(flags, description);\nexports.createArgument = (name, description) => new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n","import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help\n} = commander;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","#!/usr/bin/env node\nimport { Help, Option, program } from 'commander'\nimport cloneDeep from 'lodash/cloneDeep'\nimport pickBy from 'lodash/pickBy'\nimport semver from 'semver'\nimport pkg from '../../package.json'\nimport cliOptions, { renderExtendedHelp } from '../cli-options'\nimport ncu from '../index'\nimport { chalkInit } from '../lib/chalk'\n// async global contexts are only available in esm modules -> function\nimport getNcuRc from '../lib/getNcuRc'\n\nconst optionVersionDescription = 'Output the version number of npm-check-updates.'\n\n/** Removes inline code ticks. */\nconst uncode = (s: string) => s.replace(/`/g, '')\n\n;(async () => {\n // importing update-notifier dynamically as esm modules are only allowed to be dynamically imported inside of cjs modules\n const { default: updateNotifier } = await import('update-notifier')\n\n // check if a new version of ncu is available and print an update notification\n //\n // For testing from specific versions, use:\n //\n // updateNotifier({\n // pkg: {\n // name: 'npm-check-updates',\n // version: x.y.z\n // },\n // updateCheckInterval: 0\n // })\n\n const notifier = updateNotifier({ pkg })\n if (notifier.update && notifier.update.latest !== pkg.version) {\n const { default: chalk } = await import('chalk')\n\n // generate release urls for all the major versions from the current version up to the latest\n const currentMajor = semver.parse(notifier.update.current)?.major\n const latestMajor = semver.parse(notifier.update.latest)?.major\n const majorVersions =\n // Greater than or equal to (>=) will always return false if either operant is NaN or undefined.\n // Without this condition, it can result in a RangeError: Invalid array length.\n // See: https://github.com/raineorshine/npm-check-updates/issues/1200\n currentMajor && latestMajor && latestMajor >= currentMajor\n ? new Array(latestMajor - currentMajor).fill(0).map((x, i) => currentMajor + i + 1)\n : []\n const releaseUrls = majorVersions.map(majorVersion => `${pkg.homepage ?? ''}/releases/tag/v${majorVersion}.0.0`)\n\n // for non-major updates, generate a URL to view all commits since the current version\n const compareUrl = `${pkg.homepage ?? ''}/compare/v${notifier.update.current}...v${notifier.update.latest}`\n\n notifier.notify({\n defer: false,\n isGlobal: true,\n message: `Update available ${chalk.dim('{currentVersion}')}${chalk.reset(' → ')}${\n notifier.update.type === 'major'\n ? chalk.red('{latestVersion}')\n : notifier.update.type === 'minor'\n ? chalk.yellow('{latestVersion}')\n : chalk.green('{latestVersion}')\n }\nRun ${chalk.cyan('{updateCommand}')} to update\n${chalk.dim.underline(\n notifier.update.type === 'major' ? releaseUrls.map(url => chalk.dim.underline(url)).join('\\n') : compareUrl,\n)}`,\n })\n }\n\n // manually detect option-specific help\n // https://github.com/raineorshine/npm-check-updates/issues/787\n const rawArgs = process.argv.slice(2)\n const indexHelp = rawArgs.findIndex(arg => arg === '--help' || arg === '-h')\n if (indexHelp !== -1 && rawArgs[indexHelp + 1]) {\n const helpOption = rawArgs[indexHelp + 1].replace(/^-*/, '')\n if (helpOption === 'help' || helpOption === 'h') {\n console.info('Would you like some help with your help?')\n } else {\n await chalkInit()\n const nonHelpArgs = [...rawArgs.slice(0, indexHelp), ...rawArgs.slice(indexHelp + 1)]\n nonHelpArgs.forEach(arg => {\n // match option by long or short\n const query = arg.replace(/^-*/, '')\n const option = cliOptions.find(\n option =>\n query === option.long ||\n query === option.short ||\n (query === `no-${option.long}` && option.type === 'boolean'),\n )\n if (option) {\n console.info(renderExtendedHelp(option) + '\\n')\n } else if (query === 'version' || query === 'v' || query === 'V') {\n console.info(\n renderExtendedHelp({\n long: 'version',\n short: 'v',\n description: optionVersionDescription,\n // do not pass boolean or it will print --no-version\n type: 'string',\n }) + '\\n',\n )\n } else {\n console.info(`Unknown option: ${arg}`)\n }\n })\n }\n process.exit(0)\n }\n\n // a set of options that only work in an rc config file, not on the command line\n const noCli = new Set(cliOptions.filter(option => option.cli === false).map(option => `--${option.long}`))\n\n // start commander program\n program\n .description('[filter] is a list or regex of package names to check (all others will be ignored).')\n .usage('[options] [filter]')\n // See: boolean optional arg below\n .configureHelp({\n optionTerm: option =>\n option.long && noCli.has(option.long)\n ? option.long.replace('--', '') + '*'\n : option.long === '--version'\n ? // add -v to version help to cover the alias added below\n '-v, -V, --version'\n : option.flags.replace('[bool]', ''),\n optionDescription: option =>\n option.long === '--version'\n ? optionVersionDescription\n : option.long === '--help'\n ? `You're lookin' at it. Run \"ncu --help <option>\" for a specific option.`\n : Help.prototype.optionDescription(option),\n })\n // add hidden -v alias for --V/--version\n .addOption(new Option('-v, --versionAlias').hideHelp())\n .on('option:versionAlias', () => {\n console.info(pkg.version)\n process.exit(0)\n })\n\n // add cli options\n cliOptions.forEach(({ long, short, arg, description, default: defaultValue, help, parse, type }) => {\n const flags = `${short ? `-${short}, ` : ''}--${long}${arg ? ` <${arg}>` : ''}`\n // format description for cli by removing inline code ticks\n // point to help in description if extended help text is available\n const descriptionFormatted = `${uncode(description)}${help ? ` Run \"ncu --help ${long}\" for details.` : ''}`\n\n // handle 3rd/4th argument polymorphism\n program.option(flags, descriptionFormatted, parse || defaultValue, parse ? defaultValue : undefined)\n\n // add --no- prefixed boolean options\n // necessary for overriding booleans set to true in the ncurc\n if (type === 'boolean') {\n program.addOption(new Option(`--no-${long}`).default(false).hideHelp())\n }\n })\n\n // set version option at the end\n program.version(pkg.version)\n\n // commander mutates its optionValues with program.parse\n // In order to call program.parse again and parse the rc file options, we need to clear commander's internal optionValues\n // Otherwise array options will be duplicated\n const defaultOptionValues = cloneDeep((program as any)._optionValues)\n program.parse(process.argv)\n\n const programOpts = program.opts()\n const programArgs = process.argv.slice(2)\n\n const { color, configFileName, configFilePath, global, packageFile, mergeConfig } = programOpts\n\n // Force color on all chalk instances.\n // See: /src/lib/chalk.ts\n await chalkInit(color)\n\n // load .ncurc\n // Do not load when tests are running (can be overridden if configFilePath is set explicitly, or --mergeConfig option specified)\n const rcResult =\n !process.env.NCU_TESTS || configFilePath || mergeConfig\n ? await getNcuRc({\n configFileName,\n configFilePath,\n global,\n packageFile,\n options: { ...programOpts, cli: true },\n })\n : null\n\n // override rc args with program args\n const rcArgs = (rcResult?.args || []).filter(\n (arg, i, args) =>\n (typeof arg !== 'string' || !arg.startsWith('-') || !programArgs.includes(arg)) &&\n (typeof args[i - 1] !== 'string' || !args[i - 1].startsWith('-') || !programArgs.includes(args[i - 1])),\n )\n\n // insert config arguments into command line arguments so they can all be parsed by commander\n const combinedArguments = [...process.argv.slice(0, 2), ...rcArgs, ...programArgs]\n\n // See defaultOptionValues comment above\n ;(program as any)._optionValues = defaultOptionValues\n program.parse(combinedArguments)\n const combinedProgramOpts = program.opts()\n\n // filter out undefined program options and combine cli options with config file options\n const options = {\n ...(rcResult && Object.keys(rcResult.config).length > 0 ? { rcConfigPath: rcResult.filePath } : null),\n ...pickBy(program.opts(), value => value !== undefined),\n args: program.args,\n ...(combinedProgramOpts.filter ? { filter: combinedProgramOpts.filter } : null),\n ...(combinedProgramOpts.reject ? { reject: combinedProgramOpts.reject } : null),\n }\n\n // NOTE: Options handling and defaults go in initOptions in index.js\n\n ncu(options, { cli: true })\n})()\n"],"names":["exitCode","code","message","CommanderError","error","InvalidArgumentError","require$$0","Argument$3","name","description","value","previous","fn","values","arg","humanReadableArgName","nameOutput","argument","Argument","Help$3","cmd","visibleCommands","helpCommand","a","b","getSortKey","option","visibleOptions","helpOption","removeShort","removeLong","globalOptions","ancestorCmd","args","helper","max","command","cmdName","ancestorCmdNames","extraInfo","choice","extraDescripton","termWidth","helpWidth","itemIndentWidth","itemSeparatorWidth","formatItem","term","fullText","formatList","textArray","output","commandDescription","argumentList","optionList","globalOptionList","commandList","str","width","indent","minColumnWidth","indents","manualIndent","columnWidth","leadingStr","columnText","indentString","breaks","regex","lines","line","i","help","Help","Option$3","flags","optionFlags","splitOptionFlags","names","impliedOptionValues","newImplied","mandatory","hide","camelcase","DualOptions$1","options","key","optionKey","preset","negativeValue","word","shortFlag","longFlag","flagParts","Option","DualOptions","maxDistance","editDistance","d","j","cost","suggestSimilar","candidates","searchingOptions","candidate","similar","bestDistance","minSimilarity","distance","length","suggestSimilar_1","EventEmitter","childProcess","require$$1","path","require$$2","fs","require$$3","process","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","Command","write","sourceCommand","result","nameAndArgs","actionOptsOrExecDesc","execOpts","desc","opts","configuration","displayHelp","displaySuggestion","defaultValue","detail","previousArgument","enableOrNameAndArgs","helpName","helpArgs","helpDescription","deprecatedDescription","event","listener","allowedValues","err","expectedArgsCount","actionArgs","target","invalidArgumentMessage","matchingOption","matchingFlag","knownBy","alreadyUsed","existingCmd","newCmd","oname","positiveLongFlag","handleOptionValue","val","invalidValueMessage","valueSource","oldValue","config","def","m","parseArg","combine","allowUnknown","allowExcess","positional","passThrough","storeAsProperties","source","argv","parseOptions","userArgs","subcommand","launchWithNode","sourceExt","findFile","baseDir","baseName","localBin","foundExt","ext","executableFile","executableDir","resolvedScriptPath","localFile","legacyName","proc","incrementNodeInspectorPort","signal","exitCallback","_signal","executableDirMessage","executableMissing","wrappedError","commandName","operands","unknown","subCommand","promiseChain","subcommandName","myParseArg","parsedValue","processedArgs","declaredArg","index","processed","v","promise","hooks","hookedCommand","callback","hookDetail","hook","parsed","checkForUnknownOptions","commandEvent","anOption","definedNonDefaultOptions","conflictingAndDefined","defined","dest","maybeOption","activeVariadicOption","len","combinedOptions","errorOptions","dualHelper","hasCustomOptionValue","impliedKey","conflictingOption","findBestOptionFromValue","optionValue","negativeOption","positiveOption","getErrorMessage","bestOption","flag","suggestion","candidateFlags","moreFlags","receivedArgs","expected","s","unknownName","candidateNames","versionOption","argsDescription","alias","matchingCommand","aliases","filename","contextOptions","context","deprecatedCallback","helpInformation","position","text","helpEvent","helpStr","debugOption","debugHost","debugPort","match","commander","program","createCommand","createArgument","createOption","InvalidOptionArgumentError","assignValue","baseAssignValue","copyObject","props","object","customizer","isNew","newValue","_copyObject","keys","baseAssign","_baseAssign","keysIn","baseAssignIn","_baseAssignIn","root","freeExports","exports","freeModule","module","moduleExports","Buffer","allocUnsafe","cloneBuffer","buffer","isDeep","getSymbols","copySymbols","_copySymbols","getSymbolsIn","copySymbolsIn","_copySymbolsIn","objectProto","hasOwnProperty","initCloneArray","array","_initCloneArray","Uint8Array","cloneArrayBuffer","arrayBuffer","_cloneArrayBuffer","cloneDataView","dataView","_cloneDataView","reFlags","cloneRegExp","regexp","_cloneRegExp","Symbol","symbolProto","symbolValueOf","cloneSymbol","symbol","_cloneSymbol","cloneTypedArray","typedArray","_cloneTypedArray","boolTag","dateTag","mapTag","numberTag","regexpTag","setTag","stringTag","symbolTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","initCloneByTag","tag","Ctor","_initCloneByTag","baseCreate","getPrototype","isPrototype","initCloneObject","_initCloneObject","getTag","isObjectLike","baseIsMap","_baseIsMap","baseUnary","nodeUtil","nodeIsMap","isMap","isMap_1","baseIsSet","_baseIsSet","nodeIsSet","isSet","isSet_1","Stack","arrayEach","copyArray","getAllKeys","getAllKeysIn","require$$10","require$$11","require$$12","require$$13","require$$14","isArray","require$$15","isBuffer","require$$16","require$$17","isObject","require$$18","require$$19","require$$20","require$$21","CLONE_DEEP_FLAG","CLONE_FLAT_FLAG","CLONE_SYMBOLS_FLAG","argsTag","arrayTag","errorTag","funcTag","genTag","objectTag","weakMapTag","cloneableTags","baseClone","bitmask","stack","isFlat","isFull","isArr","isFunc","stacked","subValue","keysFunc","_baseClone","cloneDeep","cloneDeep_1","optionVersionDescription","uncode","updateNotifier","notifier","pkg","chalk","currentMajor","semver","latestMajor","releaseUrls","x","majorVersion","compareUrl","url","rawArgs","indexHelp","chalkInit","query","cliOptions","renderExtendedHelp","noCli","long","short","parse","type","descriptionFormatted","defaultOptionValues","programOpts","programArgs","color","configFileName","configFilePath","global","packageFile","mergeConfig","rcResult","getNcuRc","rcArgs","combinedArguments","combinedProgramOpts","pickBy","ncu"],"mappings":";yMAIA,cAA6B,KAAM,CAQjC,YAAYA,EAAUC,EAAMC,EAAS,CACnC,MAAMA,CAAO,EAEb,MAAM,kBAAkB,KAAM,KAAK,WAAW,EAC9C,KAAK,KAAO,KAAK,YAAY,KAC7B,KAAK,KAAOD,EACZ,KAAK,SAAWD,EAChB,KAAK,YAAc,MACpB,CACH,KAMA,cAAmCG,EAAe,CAMhD,YAAYD,EAAS,CACnB,MAAM,EAAG,4BAA6BA,CAAO,EAE7C,MAAM,kBAAkB,KAAM,KAAK,WAAW,EAC9C,KAAK,KAAO,KAAK,YAAY,IAC9B,CACH,EAEsBE,EAAA,eAAGD,GACzBC,EAAA,qBAA+BC,GC1C/B,KAAM,CAAEA,qBAAAA,EAAsB,EAAGC,EAEjC,IAAAC,GAAA,KAAe,CAUb,YAAYC,EAAMC,EAAa,CAQ7B,OAPA,KAAK,YAAcA,GAAe,GAClC,KAAK,SAAW,GAChB,KAAK,SAAW,OAChB,KAAK,aAAe,OACpB,KAAK,wBAA0B,OAC/B,KAAK,WAAa,OAEVD,EAAK,CAAC,EAAC,CACb,IAAK,IACH,KAAK,SAAW,GAChB,KAAK,MAAQA,EAAK,MAAM,EAAG,EAAE,EAC7B,MACF,IAAK,IACH,KAAK,SAAW,GAChB,KAAK,MAAQA,EAAK,MAAM,EAAG,EAAE,EAC7B,MACF,QACE,KAAK,SAAW,GAChB,KAAK,MAAQA,EACb,KACH,CAEG,KAAK,MAAM,OAAS,GAAK,KAAK,MAAM,MAAM,EAAE,IAAM,QACp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BG,EACxC,MAAME,WAAS,CACb,eAAAN,EACA,eAAAC,EACA,OAAAC,EACA,YAAAC,EACA,QAAS,CAAE,GAAGN,EAAa,IAAK,EAAK,CACtC,CAAA,EACD,KAGAU,GAAUF,GAAU,MAAQ,CAAI,GAAA,OACpC,CAACzb,EAAKyD,EAAGtC,KACN,OAAOnB,GAAQ,UAAY,CAACA,EAAI,WAAW,GAAG,GAAK,CAACkb,EAAY,SAASlb,CAAG,KAC5E,OAAOmB,EAAKsC,EAAI,CAAC,GAAM,UAAY,CAACtC,EAAKsC,EAAI,CAAC,EAAE,WAAW,GAAG,GAAK,CAACyX,EAAY,SAAS/Z,EAAKsC,EAAI,CAAC,CAAC,EAAA,EAInGmY,EAAoB,CAAC,GAAG,QAAQ,KAAK,MAAM,EAAG,CAAC,EAAG,GAAGD,EAAQ,GAAGT,CAAW,EAG/EhL,EAAgB,cAAgB8K,EAClC9K,EAAQ,MAAM0L,CAAiB,EACzB,MAAAC,EAAsB3L,EAAQ,OAG9B3L,GAAU,CACd,GAAIkX,GAAY,OAAO,KAAKA,EAAS,MAAM,EAAE,OAAS,EAAI,CAAE,aAAcA,EAAS,QAAa,EAAA,KAChG,GAAGK,EAAAA,OAAO5L,EAAQ,OAAQtQ,GAASA,IAAU,MAAS,EACtD,KAAMsQ,EAAQ,KACd,GAAI2L,EAAoB,OAAS,CAAE,OAAQA,EAAoB,QAAW,KAC1E,GAAIA,EAAoB,OAAS,CAAE,OAAQA,EAAoB,QAAW,IAAA,EAK5EE,EAAAA,IAAIxX,GAAS,CAAE,IAAK,EAAM,CAAA,CAC5B,GAAG","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]}
1
+ {"version":3,"file":"cli.js","sources":["../node_modules/commander/lib/error.js","../node_modules/commander/lib/argument.js","../node_modules/commander/lib/help.js","../node_modules/commander/lib/option.js","../node_modules/commander/lib/suggestSimilar.js","../node_modules/commander/lib/command.js","../node_modules/commander/index.js","../node_modules/commander/esm.mjs","../node_modules/rfdc/index.js","../src/bin/cli.ts"],"sourcesContent":["/**\n * CommanderError class\n */\nclass CommanderError extends Error {\n /**\n * Constructs the CommanderError class\n * @param {number} exitCode suggested exit code which could be used with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n */\n constructor(exitCode, code, message) {\n super(message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n this.code = code;\n this.exitCode = exitCode;\n this.nestedError = undefined;\n }\n}\n\n/**\n * InvalidArgumentError class\n */\nclass InvalidArgumentError extends CommanderError {\n /**\n * Constructs the InvalidArgumentError class\n * @param {string} [message] explanation of why argument is invalid\n */\n constructor(message) {\n super(1, 'commander.invalidArgument', message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n }\n}\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass Argument {\n /**\n * Initialize a new command argument with the given name and description.\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @param {string} name\n * @param {string} [description]\n */\n\n constructor(name, description) {\n this.description = description || '';\n this.variadic = false;\n this.parseArg = undefined;\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.argChoices = undefined;\n\n switch (name[0]) {\n case '<': // e.g. <required>\n this.required = true;\n this._name = name.slice(1, -1);\n break;\n case '[': // e.g. [optional]\n this.required = false;\n this._name = name.slice(1, -1);\n break;\n default:\n this.required = true;\n this._name = name;\n break;\n }\n\n if (this._name.length > 3 && this._name.slice(-3) === '...') {\n this.variadic = true;\n this._name = this._name.slice(0, -3);\n }\n }\n\n /**\n * Return argument name.\n *\n * @return {string}\n */\n\n name() {\n return this._name;\n }\n\n /**\n * @package\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Argument}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI command arguments into argument values.\n *\n * @param {Function} [fn]\n * @return {Argument}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Only allow argument value to be one of choices.\n *\n * @param {string[]} values\n * @return {Argument}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Make argument required.\n *\n * @returns {Argument}\n */\n argRequired() {\n this.required = true;\n return this;\n }\n\n /**\n * Make argument optional.\n *\n * @returns {Argument}\n */\n argOptional() {\n this.required = false;\n return this;\n }\n}\n\n/**\n * Takes an argument and returns its human readable equivalent for help usage.\n *\n * @param {Argument} arg\n * @return {string}\n * @private\n */\n\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n","const { humanReadableArgName } = require('./argument.js');\n\n/**\n * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`\n * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types\n * @typedef { import(\"./argument.js\").Argument } Argument\n * @typedef { import(\"./command.js\").Command } Command\n * @typedef { import(\"./option.js\").Option } Option\n */\n\n// Although this is a class, methods are static in style to allow override using subclass or just functions.\nclass Help {\n constructor() {\n this.helpWidth = undefined;\n this.sortSubcommands = false;\n this.sortOptions = false;\n this.showGlobalOptions = false;\n }\n\n /**\n * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n *\n * @param {Command} cmd\n * @returns {Command[]}\n */\n\n visibleCommands(cmd) {\n const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden);\n const helpCommand = cmd._getHelpCommand();\n if (helpCommand && !helpCommand._hidden) {\n visibleCommands.push(helpCommand);\n }\n if (this.sortSubcommands) {\n visibleCommands.sort((a, b) => {\n // @ts-ignore: because overloaded return type\n return a.name().localeCompare(b.name());\n });\n }\n return visibleCommands;\n }\n\n /**\n * Compare options for sort.\n *\n * @param {Option} a\n * @param {Option} b\n * @returns {number}\n */\n compareOptions(a, b) {\n const getSortKey = (option) => {\n // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated.\n return option.short\n ? option.short.replace(/^-/, '')\n : option.long.replace(/^--/, '');\n };\n return getSortKey(a).localeCompare(getSortKey(b));\n }\n\n /**\n * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleOptions(cmd) {\n const visibleOptions = cmd.options.filter((option) => !option.hidden);\n // Built-in help option.\n const helpOption = cmd._getHelpOption();\n if (helpOption && !helpOption.hidden) {\n // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs.\n const removeShort = helpOption.short && cmd._findOption(helpOption.short);\n const removeLong = helpOption.long && cmd._findOption(helpOption.long);\n if (!removeShort && !removeLong) {\n visibleOptions.push(helpOption); // no changes needed\n } else if (helpOption.long && !removeLong) {\n visibleOptions.push(\n cmd.createOption(helpOption.long, helpOption.description),\n );\n } else if (helpOption.short && !removeShort) {\n visibleOptions.push(\n cmd.createOption(helpOption.short, helpOption.description),\n );\n }\n }\n if (this.sortOptions) {\n visibleOptions.sort(this.compareOptions);\n }\n return visibleOptions;\n }\n\n /**\n * Get an array of the visible global options. (Not including help.)\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleGlobalOptions(cmd) {\n if (!this.showGlobalOptions) return [];\n\n const globalOptions = [];\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n const visibleOptions = ancestorCmd.options.filter(\n (option) => !option.hidden,\n );\n globalOptions.push(...visibleOptions);\n }\n if (this.sortOptions) {\n globalOptions.sort(this.compareOptions);\n }\n return globalOptions;\n }\n\n /**\n * Get an array of the arguments if any have a description.\n *\n * @param {Command} cmd\n * @returns {Argument[]}\n */\n\n visibleArguments(cmd) {\n // Side effect! Apply the legacy descriptions before the arguments are displayed.\n if (cmd._argsDescription) {\n cmd.registeredArguments.forEach((argument) => {\n argument.description =\n argument.description || cmd._argsDescription[argument.name()] || '';\n });\n }\n\n // If there are any arguments with a description then return all the arguments.\n if (cmd.registeredArguments.find((argument) => argument.description)) {\n return cmd.registeredArguments;\n }\n return [];\n }\n\n /**\n * Get the command term to show in the list of subcommands.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandTerm(cmd) {\n // Legacy. Ignores custom usage string, and nested commands.\n const args = cmd.registeredArguments\n .map((arg) => humanReadableArgName(arg))\n .join(' ');\n return (\n cmd._name +\n (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +\n (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option\n (args ? ' ' + args : '')\n );\n }\n\n /**\n * Get the option term to show in the list of options.\n *\n * @param {Option} option\n * @returns {string}\n */\n\n optionTerm(option) {\n return option.flags;\n }\n\n /**\n * Get the argument term to show in the list of arguments.\n *\n * @param {Argument} argument\n * @returns {string}\n */\n\n argumentTerm(argument) {\n return argument.name();\n }\n\n /**\n * Get the longest command term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestSubcommandTermLength(cmd, helper) {\n return helper.visibleCommands(cmd).reduce((max, command) => {\n return Math.max(max, helper.subcommandTerm(command).length);\n }, 0);\n }\n\n /**\n * Get the longest option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestOptionTermLength(cmd, helper) {\n return helper.visibleOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest global option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestGlobalOptionTermLength(cmd, helper) {\n return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest argument term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestArgumentTermLength(cmd, helper) {\n return helper.visibleArguments(cmd).reduce((max, argument) => {\n return Math.max(max, helper.argumentTerm(argument).length);\n }, 0);\n }\n\n /**\n * Get the command usage to be displayed at the top of the built-in help.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandUsage(cmd) {\n // Usage\n let cmdName = cmd._name;\n if (cmd._aliases[0]) {\n cmdName = cmdName + '|' + cmd._aliases[0];\n }\n let ancestorCmdNames = '';\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames;\n }\n return ancestorCmdNames + cmdName + ' ' + cmd.usage();\n }\n\n /**\n * Get the description for the command.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n return cmd.description();\n }\n\n /**\n * Get the subcommand summary to show in the list of subcommands.\n * (Fallback to description for backwards compatibility.)\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n return cmd.summary() || cmd.description();\n }\n\n /**\n * Get the option description to show in the list of options.\n *\n * @param {Option} option\n * @return {string}\n */\n\n optionDescription(option) {\n const extraInfo = [];\n\n if (option.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`,\n );\n }\n if (option.defaultValue !== undefined) {\n // default for boolean and negated more for programmer than end user,\n // but show true/false for boolean option as may be for hand-rolled env or config processing.\n const showDefault =\n option.required ||\n option.optional ||\n (option.isBoolean() && typeof option.defaultValue === 'boolean');\n if (showDefault) {\n extraInfo.push(\n `default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`,\n );\n }\n }\n // preset for boolean and negated are more for programmer than end user\n if (option.presetArg !== undefined && option.optional) {\n extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);\n }\n if (option.envVar !== undefined) {\n extraInfo.push(`env: ${option.envVar}`);\n }\n if (extraInfo.length > 0) {\n return `${option.description} (${extraInfo.join(', ')})`;\n }\n\n return option.description;\n }\n\n /**\n * Get the argument description to show in the list of arguments.\n *\n * @param {Argument} argument\n * @return {string}\n */\n\n argumentDescription(argument) {\n const extraInfo = [];\n if (argument.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`,\n );\n }\n if (argument.defaultValue !== undefined) {\n extraInfo.push(\n `default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`,\n );\n }\n if (extraInfo.length > 0) {\n const extraDescripton = `(${extraInfo.join(', ')})`;\n if (argument.description) {\n return `${argument.description} ${extraDescripton}`;\n }\n return extraDescripton;\n }\n return argument.description;\n }\n\n /**\n * Generate the built-in help text.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {string}\n */\n\n formatHelp(cmd, helper) {\n const termWidth = helper.padWidth(cmd, helper);\n const helpWidth = helper.helpWidth || 80;\n const itemIndentWidth = 2;\n const itemSeparatorWidth = 2; // between term and description\n function formatItem(term, description) {\n if (description) {\n const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;\n return helper.wrap(\n fullText,\n helpWidth - itemIndentWidth,\n termWidth + itemSeparatorWidth,\n );\n }\n return term;\n }\n function formatList(textArray) {\n return textArray.join('\\n').replace(/^/gm, ' '.repeat(itemIndentWidth));\n }\n\n // Usage\n let output = [`Usage: ${helper.commandUsage(cmd)}`, ''];\n\n // Description\n const commandDescription = helper.commandDescription(cmd);\n if (commandDescription.length > 0) {\n output = output.concat([\n helper.wrap(commandDescription, helpWidth, 0),\n '',\n ]);\n }\n\n // Arguments\n const argumentList = helper.visibleArguments(cmd).map((argument) => {\n return formatItem(\n helper.argumentTerm(argument),\n helper.argumentDescription(argument),\n );\n });\n if (argumentList.length > 0) {\n output = output.concat(['Arguments:', formatList(argumentList), '']);\n }\n\n // Options\n const optionList = helper.visibleOptions(cmd).map((option) => {\n return formatItem(\n helper.optionTerm(option),\n helper.optionDescription(option),\n );\n });\n if (optionList.length > 0) {\n output = output.concat(['Options:', formatList(optionList), '']);\n }\n\n if (this.showGlobalOptions) {\n const globalOptionList = helper\n .visibleGlobalOptions(cmd)\n .map((option) => {\n return formatItem(\n helper.optionTerm(option),\n helper.optionDescription(option),\n );\n });\n if (globalOptionList.length > 0) {\n output = output.concat([\n 'Global Options:',\n formatList(globalOptionList),\n '',\n ]);\n }\n }\n\n // Commands\n const commandList = helper.visibleCommands(cmd).map((cmd) => {\n return formatItem(\n helper.subcommandTerm(cmd),\n helper.subcommandDescription(cmd),\n );\n });\n if (commandList.length > 0) {\n output = output.concat(['Commands:', formatList(commandList), '']);\n }\n\n return output.join('\\n');\n }\n\n /**\n * Calculate the pad width from the maximum term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n padWidth(cmd, helper) {\n return Math.max(\n helper.longestOptionTermLength(cmd, helper),\n helper.longestGlobalOptionTermLength(cmd, helper),\n helper.longestSubcommandTermLength(cmd, helper),\n helper.longestArgumentTermLength(cmd, helper),\n );\n }\n\n /**\n * Wrap the given string to width characters per line, with lines after the first indented.\n * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.\n *\n * @param {string} str\n * @param {number} width\n * @param {number} indent\n * @param {number} [minColumnWidth=40]\n * @return {string}\n *\n */\n\n wrap(str, width, indent, minColumnWidth = 40) {\n // Full \\s characters, minus the linefeeds.\n const indents =\n ' \\\\f\\\\t\\\\v\\u00a0\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff';\n // Detect manually wrapped and indented strings by searching for line break followed by spaces.\n const manualIndent = new RegExp(`[\\\\n][${indents}]+`);\n if (str.match(manualIndent)) return str;\n // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line).\n const columnWidth = width - indent;\n if (columnWidth < minColumnWidth) return str;\n\n const leadingStr = str.slice(0, indent);\n const columnText = str.slice(indent).replace('\\r\\n', '\\n');\n const indentString = ' '.repeat(indent);\n const zeroWidthSpace = '\\u200B';\n const breaks = `\\\\s${zeroWidthSpace}`;\n // Match line end (so empty lines don't collapse),\n // or as much text as will fit in column, or excess text up to first break.\n const regex = new RegExp(\n `\\n|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`,\n 'g',\n );\n const lines = columnText.match(regex) || [];\n return (\n leadingStr +\n lines\n .map((line, i) => {\n if (line === '\\n') return ''; // preserve empty lines\n return (i > 0 ? indentString : '') + line.trimEnd();\n })\n .join('\\n')\n );\n }\n}\n\nexports.Help = Help;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass Option {\n /**\n * Initialize a new `Option` with the given `flags` and `description`.\n *\n * @param {string} flags\n * @param {string} [description]\n */\n\n constructor(flags, description) {\n this.flags = flags;\n this.description = description || '';\n\n this.required = flags.includes('<'); // A value must be supplied when the option is specified.\n this.optional = flags.includes('['); // A value is optional when the option is specified.\n // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument\n this.variadic = /\\w\\.\\.\\.[>\\]]$/.test(flags); // The option can take multiple values.\n this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.\n const optionFlags = splitOptionFlags(flags);\n this.short = optionFlags.shortFlag;\n this.long = optionFlags.longFlag;\n this.negate = false;\n if (this.long) {\n this.negate = this.long.startsWith('--no-');\n }\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.presetArg = undefined;\n this.envVar = undefined;\n this.parseArg = undefined;\n this.hidden = false;\n this.argChoices = undefined;\n this.conflictsWith = [];\n this.implied = undefined;\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Option}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Preset to use when option used without option-argument, especially optional but also boolean and negated.\n * The custom processing (parseArg) is called.\n *\n * @example\n * new Option('--color').default('GREYSCALE').preset('RGB');\n * new Option('--donate [amount]').preset('20').argParser(parseFloat);\n *\n * @param {*} arg\n * @return {Option}\n */\n\n preset(arg) {\n this.presetArg = arg;\n return this;\n }\n\n /**\n * Add option name(s) that conflict with this option.\n * An error will be displayed if conflicting options are found during parsing.\n *\n * @example\n * new Option('--rgb').conflicts('cmyk');\n * new Option('--js').conflicts(['ts', 'jsx']);\n *\n * @param {(string | string[])} names\n * @return {Option}\n */\n\n conflicts(names) {\n this.conflictsWith = this.conflictsWith.concat(names);\n return this;\n }\n\n /**\n * Specify implied option values for when this option is set and the implied options are not.\n *\n * The custom processing (parseArg) is not called on the implied values.\n *\n * @example\n * program\n * .addOption(new Option('--log', 'write logging information to file'))\n * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));\n *\n * @param {object} impliedOptionValues\n * @return {Option}\n */\n implies(impliedOptionValues) {\n let newImplied = impliedOptionValues;\n if (typeof impliedOptionValues === 'string') {\n // string is not documented, but easy mistake and we can do what user probably intended.\n newImplied = { [impliedOptionValues]: true };\n }\n this.implied = Object.assign(this.implied || {}, newImplied);\n return this;\n }\n\n /**\n * Set environment variable to check for option value.\n *\n * An environment variable is only used if when processed the current option value is\n * undefined, or the source of the current value is 'default' or 'config' or 'env'.\n *\n * @param {string} name\n * @return {Option}\n */\n\n env(name) {\n this.envVar = name;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI option arguments into option values.\n *\n * @param {Function} [fn]\n * @return {Option}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Whether the option is mandatory and must have a value after parsing.\n *\n * @param {boolean} [mandatory=true]\n * @return {Option}\n */\n\n makeOptionMandatory(mandatory = true) {\n this.mandatory = !!mandatory;\n return this;\n }\n\n /**\n * Hide option in help.\n *\n * @param {boolean} [hide=true]\n * @return {Option}\n */\n\n hideHelp(hide = true) {\n this.hidden = !!hide;\n return this;\n }\n\n /**\n * @package\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Only allow option value to be one of choices.\n *\n * @param {string[]} values\n * @return {Option}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Return option name.\n *\n * @return {string}\n */\n\n name() {\n if (this.long) {\n return this.long.replace(/^--/, '');\n }\n return this.short.replace(/^-/, '');\n }\n\n /**\n * Return option name, in a camelcase format that can be used\n * as a object attribute key.\n *\n * @return {string}\n */\n\n attributeName() {\n return camelcase(this.name().replace(/^no-/, ''));\n }\n\n /**\n * Check if `arg` matches the short or long flag.\n *\n * @param {string} arg\n * @return {boolean}\n * @package\n */\n\n is(arg) {\n return this.short === arg || this.long === arg;\n }\n\n /**\n * Return whether a boolean option.\n *\n * Options are one of boolean, negated, required argument, or optional argument.\n *\n * @return {boolean}\n * @package\n */\n\n isBoolean() {\n return !this.required && !this.optional && !this.negate;\n }\n}\n\n/**\n * This class is to make it easier to work with dual options, without changing the existing\n * implementation. We support separate dual options for separate positive and negative options,\n * like `--build` and `--no-build`, which share a single option value. This works nicely for some\n * use cases, but is tricky for others where we want separate behaviours despite\n * the single shared option value.\n */\nclass DualOptions {\n /**\n * @param {Option[]} options\n */\n constructor(options) {\n this.positiveOptions = new Map();\n this.negativeOptions = new Map();\n this.dualOptions = new Set();\n options.forEach((option) => {\n if (option.negate) {\n this.negativeOptions.set(option.attributeName(), option);\n } else {\n this.positiveOptions.set(option.attributeName(), option);\n }\n });\n this.negativeOptions.forEach((value, key) => {\n if (this.positiveOptions.has(key)) {\n this.dualOptions.add(key);\n }\n });\n }\n\n /**\n * Did the value come from the option, and not from possible matching dual option?\n *\n * @param {*} value\n * @param {Option} option\n * @returns {boolean}\n */\n valueFromOption(value, option) {\n const optionKey = option.attributeName();\n if (!this.dualOptions.has(optionKey)) return true;\n\n // Use the value to deduce if (probably) came from the option.\n const preset = this.negativeOptions.get(optionKey).presetArg;\n const negativeValue = preset !== undefined ? preset : false;\n return option.negate === (negativeValue === value);\n }\n}\n\n/**\n * Convert string from kebab-case to camelCase.\n *\n * @param {string} str\n * @return {string}\n * @private\n */\n\nfunction camelcase(str) {\n return str.split('-').reduce((str, word) => {\n return str + word[0].toUpperCase() + word.slice(1);\n });\n}\n\n/**\n * Split the short and long flag out of something like '-m,--mixed <value>'\n *\n * @private\n */\n\nfunction splitOptionFlags(flags) {\n let shortFlag;\n let longFlag;\n // Use original very loose parsing to maintain backwards compatibility for now,\n // which allowed for example unintended `-sw, --short-word` [sic].\n const flagParts = flags.split(/[ |,]+/);\n if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))\n shortFlag = flagParts.shift();\n longFlag = flagParts.shift();\n // Add support for lone short flag without significantly changing parsing!\n if (!shortFlag && /^-[^-]$/.test(longFlag)) {\n shortFlag = longFlag;\n longFlag = undefined;\n }\n return { shortFlag, longFlag };\n}\n\nexports.Option = Option;\nexports.DualOptions = DualOptions;\n","const maxDistance = 3;\n\nfunction editDistance(a, b) {\n // https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance\n // Calculating optimal string alignment distance, no substring is edited more than once.\n // (Simple implementation.)\n\n // Quick early exit, return worst case.\n if (Math.abs(a.length - b.length) > maxDistance)\n return Math.max(a.length, b.length);\n\n // distance between prefix substrings of a and b\n const d = [];\n\n // pure deletions turn a into empty string\n for (let i = 0; i <= a.length; i++) {\n d[i] = [i];\n }\n // pure insertions turn empty string into b\n for (let j = 0; j <= b.length; j++) {\n d[0][j] = j;\n }\n\n // fill matrix\n for (let j = 1; j <= b.length; j++) {\n for (let i = 1; i <= a.length; i++) {\n let cost = 1;\n if (a[i - 1] === b[j - 1]) {\n cost = 0;\n } else {\n cost = 1;\n }\n d[i][j] = Math.min(\n d[i - 1][j] + 1, // deletion\n d[i][j - 1] + 1, // insertion\n d[i - 1][j - 1] + cost, // substitution\n );\n // transposition\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n }\n }\n }\n\n return d[a.length][b.length];\n}\n\n/**\n * Find close matches, restricted to same number of edits.\n *\n * @param {string} word\n * @param {string[]} candidates\n * @returns {string}\n */\n\nfunction suggestSimilar(word, candidates) {\n if (!candidates || candidates.length === 0) return '';\n // remove possible duplicates\n candidates = Array.from(new Set(candidates));\n\n const searchingOptions = word.startsWith('--');\n if (searchingOptions) {\n word = word.slice(2);\n candidates = candidates.map((candidate) => candidate.slice(2));\n }\n\n let similar = [];\n let bestDistance = maxDistance;\n const minSimilarity = 0.4;\n candidates.forEach((candidate) => {\n if (candidate.length <= 1) return; // no one character guesses\n\n const distance = editDistance(word, candidate);\n const length = Math.max(word.length, candidate.length);\n const similarity = (length - distance) / length;\n if (similarity > minSimilarity) {\n if (distance < bestDistance) {\n // better edit distance, throw away previous worse matches\n bestDistance = distance;\n similar = [candidate];\n } else if (distance === bestDistance) {\n similar.push(candidate);\n }\n }\n });\n\n similar.sort((a, b) => a.localeCompare(b));\n if (searchingOptions) {\n similar = similar.map((candidate) => `--${candidate}`);\n }\n\n if (similar.length > 1) {\n return `\\n(Did you mean one of ${similar.join(', ')}?)`;\n }\n if (similar.length === 1) {\n return `\\n(Did you mean ${similar[0]}?)`;\n }\n return '';\n}\n\nexports.suggestSimilar = suggestSimilar;\n","const EventEmitter = require('node:events').EventEmitter;\nconst childProcess = require('node:child_process');\nconst path = require('node:path');\nconst fs = require('node:fs');\nconst process = require('node:process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help } = require('./help.js');\nconst { Option, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass Command extends EventEmitter {\n /**\n * Initialize a new `Command`.\n *\n * @param {string} [name]\n */\n\n constructor(name) {\n super();\n /** @type {Command[]} */\n this.commands = [];\n /** @type {Option[]} */\n this.options = [];\n this.parent = null;\n this._allowUnknownOption = false;\n this._allowExcessArguments = true;\n /** @type {Argument[]} */\n this.registeredArguments = [];\n this._args = this.registeredArguments; // deprecated old name\n /** @type {string[]} */\n this.args = []; // cli args with options removed\n this.rawArgs = [];\n this.processedArgs = []; // like .args but after custom processing and collecting variadic\n this._scriptPath = null;\n this._name = name || '';\n this._optionValues = {};\n this._optionValueSources = {}; // default, env, cli etc\n this._storeOptionsAsProperties = false;\n this._actionHandler = null;\n this._executableHandler = false;\n this._executableFile = null; // custom name for executable\n this._executableDir = null; // custom search directory for subcommands\n this._defaultCommandName = null;\n this._exitCallback = null;\n this._aliases = [];\n this._combineFlagAndOptionalValue = true;\n this._description = '';\n this._summary = '';\n this._argsDescription = undefined; // legacy\n this._enablePositionalOptions = false;\n this._passThroughOptions = false;\n this._lifeCycleHooks = {}; // a hash of arrays\n /** @type {(boolean | string)} */\n this._showHelpAfterError = false;\n this._showSuggestionAfterError = true;\n\n // see .configureOutput() for docs\n this._outputConfiguration = {\n writeOut: (str) => process.stdout.write(str),\n writeErr: (str) => process.stderr.write(str),\n getOutHelpWidth: () =>\n process.stdout.isTTY ? process.stdout.columns : undefined,\n getErrHelpWidth: () =>\n process.stderr.isTTY ? process.stderr.columns : undefined,\n outputError: (str, write) => write(str),\n };\n\n this._hidden = false;\n /** @type {(Option | null | undefined)} */\n this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.\n this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited\n /** @type {Command} */\n this._helpCommand = undefined; // lazy initialised, inherited\n this._helpConfiguration = {};\n }\n\n /**\n * Copy settings that are useful to have in common across root command and subcommands.\n *\n * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n *\n * @param {Command} sourceCommand\n * @return {Command} `this` command for chaining\n */\n copyInheritedSettings(sourceCommand) {\n this._outputConfiguration = sourceCommand._outputConfiguration;\n this._helpOption = sourceCommand._helpOption;\n this._helpCommand = sourceCommand._helpCommand;\n this._helpConfiguration = sourceCommand._helpConfiguration;\n this._exitCallback = sourceCommand._exitCallback;\n this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n this._combineFlagAndOptionalValue =\n sourceCommand._combineFlagAndOptionalValue;\n this._allowExcessArguments = sourceCommand._allowExcessArguments;\n this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n this._showHelpAfterError = sourceCommand._showHelpAfterError;\n this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n\n return this;\n }\n\n /**\n * @returns {Command[]}\n * @private\n */\n\n _getCommandAndAncestors() {\n const result = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let command = this; command; command = command.parent) {\n result.push(command);\n }\n return result;\n }\n\n /**\n * Define a command.\n *\n * There are two styles of command: pay attention to where to put the description.\n *\n * @example\n * // Command implemented using action handler (description is supplied separately to `.command`)\n * program\n * .command('clone <source> [destination]')\n * .description('clone a repository into a newly created directory')\n * .action((source, destination) => {\n * console.log('clone command called');\n * });\n *\n * // Command implemented using separate executable file (description is second parameter to `.command`)\n * program\n * .command('start <service>', 'start named service')\n * .command('stop [service]', 'stop named service, or all if no name supplied');\n *\n * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n * @param {object} [execOpts] - configuration options (for executable)\n * @return {Command} returns new command for action handler, or `this` for executable command\n */\n\n command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n let desc = actionOptsOrExecDesc;\n let opts = execOpts;\n if (typeof desc === 'object' && desc !== null) {\n opts = desc;\n desc = null;\n }\n opts = opts || {};\n const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n\n const cmd = this.createCommand(name);\n if (desc) {\n cmd.description(desc);\n cmd._executableHandler = true;\n }\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden\n cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor\n if (args) cmd.arguments(args);\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd.copyInheritedSettings(this);\n\n if (desc) return this;\n return cmd;\n }\n\n /**\n * Factory routine to create a new unattached command.\n *\n * See .command() for creating an attached subcommand, which uses this routine to\n * create the command. You can override createCommand to customise subcommands.\n *\n * @param {string} [name]\n * @return {Command} new command\n */\n\n createCommand(name) {\n return new Command(name);\n }\n\n /**\n * You can customise the help with a subclass of Help by overriding createHelp,\n * or by overriding Help properties using configureHelp().\n *\n * @return {Help}\n */\n\n createHelp() {\n return Object.assign(new Help(), this.configureHelp());\n }\n\n /**\n * You can customise the help by overriding Help properties using configureHelp(),\n * or with a subclass of Help by overriding createHelp().\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureHelp(configuration) {\n if (configuration === undefined) return this._helpConfiguration;\n\n this._helpConfiguration = configuration;\n return this;\n }\n\n /**\n * The default output goes to stdout and stderr. You can customise this for special\n * applications. You can also customise the display of errors by overriding outputError.\n *\n * The configuration properties are all functions:\n *\n * // functions to change where being written, stdout and stderr\n * writeOut(str)\n * writeErr(str)\n * // matching functions to specify width for wrapping help\n * getOutHelpWidth()\n * getErrHelpWidth()\n * // functions based on what is being written out\n * outputError(str, write) // used for displaying errors, and not used for displaying help\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureOutput(configuration) {\n if (configuration === undefined) return this._outputConfiguration;\n\n Object.assign(this._outputConfiguration, configuration);\n return this;\n }\n\n /**\n * Display the help or a custom message after an error occurs.\n *\n * @param {(boolean|string)} [displayHelp]\n * @return {Command} `this` command for chaining\n */\n showHelpAfterError(displayHelp = true) {\n if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;\n this._showHelpAfterError = displayHelp;\n return this;\n }\n\n /**\n * Display suggestion of similar commands for unknown commands, or options for unknown options.\n *\n * @param {boolean} [displaySuggestion]\n * @return {Command} `this` command for chaining\n */\n showSuggestionAfterError(displaySuggestion = true) {\n this._showSuggestionAfterError = !!displaySuggestion;\n return this;\n }\n\n /**\n * Add a prepared subcommand.\n *\n * See .command() for creating an attached subcommand which inherits settings from its parent.\n *\n * @param {Command} cmd - new subcommand\n * @param {object} [opts] - configuration options\n * @return {Command} `this` command for chaining\n */\n\n addCommand(cmd, opts) {\n if (!cmd._name) {\n throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n }\n\n opts = opts || {};\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation\n\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd._checkForBrokenPassThrough();\n\n return this;\n }\n\n /**\n * Factory routine to create a new unattached argument.\n *\n * See .argument() for creating an attached argument, which uses this routine to\n * create the argument. You can override createArgument to return a custom argument.\n *\n * @param {string} name\n * @param {string} [description]\n * @return {Argument} new argument\n */\n\n createArgument(name, description) {\n return new Argument(name, description);\n }\n\n /**\n * Define argument syntax for command.\n *\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @example\n * program.argument('<input-file>');\n * program.argument('[output-file]');\n *\n * @param {string} name\n * @param {string} [description]\n * @param {(Function|*)} [fn] - custom argument processing function\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n argument(name, description, fn, defaultValue) {\n const argument = this.createArgument(name, description);\n if (typeof fn === 'function') {\n argument.default(defaultValue).argParser(fn);\n } else {\n argument.default(fn);\n }\n this.addArgument(argument);\n return this;\n }\n\n /**\n * Define argument syntax for command, adding multiple at once (without descriptions).\n *\n * See also .argument().\n *\n * @example\n * program.arguments('<cmd> [env]');\n *\n * @param {string} names\n * @return {Command} `this` command for chaining\n */\n\n arguments(names) {\n names\n .trim()\n .split(/ +/)\n .forEach((detail) => {\n this.argument(detail);\n });\n return this;\n }\n\n /**\n * Define argument syntax for command, adding a prepared argument.\n *\n * @param {Argument} argument\n * @return {Command} `this` command for chaining\n */\n addArgument(argument) {\n const previousArgument = this.registeredArguments.slice(-1)[0];\n if (previousArgument && previousArgument.variadic) {\n throw new Error(\n `only the last argument can be variadic '${previousArgument.name()}'`,\n );\n }\n if (\n argument.required &&\n argument.defaultValue !== undefined &&\n argument.parseArg === undefined\n ) {\n throw new Error(\n `a default value for a required argument is never used: '${argument.name()}'`,\n );\n }\n this.registeredArguments.push(argument);\n return this;\n }\n\n /**\n * Customise or override default help command. By default a help command is automatically added if your command has subcommands.\n *\n * @example\n * program.helpCommand('help [cmd]');\n * program.helpCommand('help [cmd]', 'show help');\n * program.helpCommand(false); // suppress default help command\n * program.helpCommand(true); // add help command even if no subcommands\n *\n * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added\n * @param {string} [description] - custom description\n * @return {Command} `this` command for chaining\n */\n\n helpCommand(enableOrNameAndArgs, description) {\n if (typeof enableOrNameAndArgs === 'boolean') {\n this._addImplicitHelpCommand = enableOrNameAndArgs;\n return this;\n }\n\n enableOrNameAndArgs = enableOrNameAndArgs ?? 'help [command]';\n const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);\n const helpDescription = description ?? 'display help for command';\n\n const helpCommand = this.createCommand(helpName);\n helpCommand.helpOption(false);\n if (helpArgs) helpCommand.arguments(helpArgs);\n if (helpDescription) helpCommand.description(helpDescription);\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n\n return this;\n }\n\n /**\n * Add prepared custom help command.\n *\n * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`\n * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only\n * @return {Command} `this` command for chaining\n */\n addHelpCommand(helpCommand, deprecatedDescription) {\n // If not passed an object, call through to helpCommand for backwards compatibility,\n // as addHelpCommand was originally used like helpCommand is now.\n if (typeof helpCommand !== 'object') {\n this.helpCommand(helpCommand, deprecatedDescription);\n return this;\n }\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n return this;\n }\n\n /**\n * Lazy create help command.\n *\n * @return {(Command|null)}\n * @package\n */\n _getHelpCommand() {\n const hasImplicitHelpCommand =\n this._addImplicitHelpCommand ??\n (this.commands.length &&\n !this._actionHandler &&\n !this._findCommand('help'));\n\n if (hasImplicitHelpCommand) {\n if (this._helpCommand === undefined) {\n this.helpCommand(undefined, undefined); // use default name and description\n }\n return this._helpCommand;\n }\n return null;\n }\n\n /**\n * Add hook for life cycle event.\n *\n * @param {string} event\n * @param {Function} listener\n * @return {Command} `this` command for chaining\n */\n\n hook(event, listener) {\n const allowedValues = ['preSubcommand', 'preAction', 'postAction'];\n if (!allowedValues.includes(event)) {\n throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n if (this._lifeCycleHooks[event]) {\n this._lifeCycleHooks[event].push(listener);\n } else {\n this._lifeCycleHooks[event] = [listener];\n }\n return this;\n }\n\n /**\n * Register callback to use as replacement for calling process.exit.\n *\n * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n * @return {Command} `this` command for chaining\n */\n\n exitOverride(fn) {\n if (fn) {\n this._exitCallback = fn;\n } else {\n this._exitCallback = (err) => {\n if (err.code !== 'commander.executeSubCommandAsync') {\n throw err;\n } else {\n // Async callback from spawn events, not useful to throw.\n }\n };\n }\n return this;\n }\n\n /**\n * Call process.exit, and _exitCallback if defined.\n *\n * @param {number} exitCode exit code for using with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @return never\n * @private\n */\n\n _exit(exitCode, code, message) {\n if (this._exitCallback) {\n this._exitCallback(new CommanderError(exitCode, code, message));\n // Expecting this line is not reached.\n }\n process.exit(exitCode);\n }\n\n /**\n * Register callback `fn` for the command.\n *\n * @example\n * program\n * .command('serve')\n * .description('start service')\n * .action(function() {\n * // do work here\n * });\n *\n * @param {Function} fn\n * @return {Command} `this` command for chaining\n */\n\n action(fn) {\n const listener = (args) => {\n // The .action callback takes an extra parameter which is the command or options.\n const expectedArgsCount = this.registeredArguments.length;\n const actionArgs = args.slice(0, expectedArgsCount);\n if (this._storeOptionsAsProperties) {\n actionArgs[expectedArgsCount] = this; // backwards compatible \"options\"\n } else {\n actionArgs[expectedArgsCount] = this.opts();\n }\n actionArgs.push(this);\n\n return fn.apply(this, actionArgs);\n };\n this._actionHandler = listener;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached option.\n *\n * See .option() for creating an attached option, which uses this routine to\n * create the option. You can override createOption to return a custom option.\n *\n * @param {string} flags\n * @param {string} [description]\n * @return {Option} new option\n */\n\n createOption(flags, description) {\n return new Option(flags, description);\n }\n\n /**\n * Wrap parseArgs to catch 'commander.invalidArgument'.\n *\n * @param {(Option | Argument)} target\n * @param {string} value\n * @param {*} previous\n * @param {string} invalidArgumentMessage\n * @private\n */\n\n _callParseArg(target, value, previous, invalidArgumentMessage) {\n try {\n return target.parseArg(value, previous);\n } catch (err) {\n if (err.code === 'commander.invalidArgument') {\n const message = `${invalidArgumentMessage} ${err.message}`;\n this.error(message, { exitCode: err.exitCode, code: err.code });\n }\n throw err;\n }\n }\n\n /**\n * Check for option flag conflicts.\n * Register option if no conflicts found, or throw on conflict.\n *\n * @param {Option} option\n * @private\n */\n\n _registerOption(option) {\n const matchingOption =\n (option.short && this._findOption(option.short)) ||\n (option.long && this._findOption(option.long));\n if (matchingOption) {\n const matchingFlag =\n option.long && this._findOption(option.long)\n ? option.long\n : option.short;\n throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'\n- already used by option '${matchingOption.flags}'`);\n }\n\n this.options.push(option);\n }\n\n /**\n * Check for command name and alias conflicts with existing commands.\n * Register command if no conflicts found, or throw on conflict.\n *\n * @param {Command} command\n * @private\n */\n\n _registerCommand(command) {\n const knownBy = (cmd) => {\n return [cmd.name()].concat(cmd.aliases());\n };\n\n const alreadyUsed = knownBy(command).find((name) =>\n this._findCommand(name),\n );\n if (alreadyUsed) {\n const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');\n const newCmd = knownBy(command).join('|');\n throw new Error(\n `cannot add command '${newCmd}' as already have command '${existingCmd}'`,\n );\n }\n\n this.commands.push(command);\n }\n\n /**\n * Add an option.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addOption(option) {\n this._registerOption(option);\n\n const oname = option.name();\n const name = option.attributeName();\n\n // store default value\n if (option.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(\n name,\n option.defaultValue === undefined ? true : option.defaultValue,\n 'default',\n );\n }\n } else if (option.defaultValue !== undefined) {\n this.setOptionValueWithSource(name, option.defaultValue, 'default');\n }\n\n // handler for cli and env supplied values\n const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n // val is null for optional option used without an optional-argument.\n // val is undefined for boolean and negated option.\n if (val == null && option.presetArg !== undefined) {\n val = option.presetArg;\n }\n\n // custom processing\n const oldValue = this.getOptionValue(name);\n if (val !== null && option.parseArg) {\n val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n } else if (val !== null && option.variadic) {\n val = option._concatValue(val, oldValue);\n }\n\n // Fill-in appropriate missing values. Long winded but easy to follow.\n if (val == null) {\n if (option.negate) {\n val = false;\n } else if (option.isBoolean() || option.optional) {\n val = true;\n } else {\n val = ''; // not normal, parseArg might have failed or be a mock function for testing\n }\n }\n this.setOptionValueWithSource(name, val, valueSource);\n };\n\n this.on('option:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'cli');\n });\n\n if (option.envVar) {\n this.on('optionEnv:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'env');\n });\n }\n\n return this;\n }\n\n /**\n * Internal implementation shared by .option() and .requiredOption()\n *\n * @return {Command} `this` command for chaining\n * @private\n */\n _optionEx(config, flags, description, fn, defaultValue) {\n if (typeof flags === 'object' && flags instanceof Option) {\n throw new Error(\n 'To add an Option object use addOption() instead of option() or requiredOption()',\n );\n }\n const option = this.createOption(flags, description);\n option.makeOptionMandatory(!!config.mandatory);\n if (typeof fn === 'function') {\n option.default(defaultValue).argParser(fn);\n } else if (fn instanceof RegExp) {\n // deprecated\n const regex = fn;\n fn = (val, def) => {\n const m = regex.exec(val);\n return m ? m[0] : def;\n };\n option.default(defaultValue).argParser(fn);\n } else {\n option.default(fn);\n }\n\n return this.addOption(option);\n }\n\n /**\n * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n *\n * See the README for more details, and see also addOption() and requiredOption().\n *\n * @example\n * program\n * .option('-p, --pepper', 'add pepper')\n * .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n option(flags, description, parseArg, defaultValue) {\n return this._optionEx({}, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Add a required option which must have a value after parsing. This usually means\n * the option must be specified on the command line. (Otherwise the same as .option().)\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n requiredOption(flags, description, parseArg, defaultValue) {\n return this._optionEx(\n { mandatory: true },\n flags,\n description,\n parseArg,\n defaultValue,\n );\n }\n\n /**\n * Alter parsing of short flags with optional values.\n *\n * @example\n * // for `.option('-f,--flag [value]'):\n * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour\n * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n *\n * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag.\n * @return {Command} `this` command for chaining\n */\n combineFlagAndOptionalValue(combine = true) {\n this._combineFlagAndOptionalValue = !!combine;\n return this;\n }\n\n /**\n * Allow unknown options on the command line.\n *\n * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options.\n * @return {Command} `this` command for chaining\n */\n allowUnknownOption(allowUnknown = true) {\n this._allowUnknownOption = !!allowUnknown;\n return this;\n }\n\n /**\n * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n *\n * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments.\n * @return {Command} `this` command for chaining\n */\n allowExcessArguments(allowExcess = true) {\n this._allowExcessArguments = !!allowExcess;\n return this;\n }\n\n /**\n * Enable positional options. Positional means global options are specified before subcommands which lets\n * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n * The default behaviour is non-positional and global options may appear anywhere on the command line.\n *\n * @param {boolean} [positional]\n * @return {Command} `this` command for chaining\n */\n enablePositionalOptions(positional = true) {\n this._enablePositionalOptions = !!positional;\n return this;\n }\n\n /**\n * Pass through options that come after command-arguments rather than treat them as command-options,\n * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n * positional options to have been enabled on the program (parent commands).\n * The default behaviour is non-positional and options may appear before or after command-arguments.\n *\n * @param {boolean} [passThrough] for unknown options.\n * @return {Command} `this` command for chaining\n */\n passThroughOptions(passThrough = true) {\n this._passThroughOptions = !!passThrough;\n this._checkForBrokenPassThrough();\n return this;\n }\n\n /**\n * @private\n */\n\n _checkForBrokenPassThrough() {\n if (\n this.parent &&\n this._passThroughOptions &&\n !this.parent._enablePositionalOptions\n ) {\n throw new Error(\n `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`,\n );\n }\n }\n\n /**\n * Whether to store option values as properties on command object,\n * or store separately (specify false). In both cases the option values can be accessed using .opts().\n *\n * @param {boolean} [storeAsProperties=true]\n * @return {Command} `this` command for chaining\n */\n\n storeOptionsAsProperties(storeAsProperties = true) {\n if (this.options.length) {\n throw new Error('call .storeOptionsAsProperties() before adding options');\n }\n if (Object.keys(this._optionValues).length) {\n throw new Error(\n 'call .storeOptionsAsProperties() before setting option values',\n );\n }\n this._storeOptionsAsProperties = !!storeAsProperties;\n return this;\n }\n\n /**\n * Retrieve option value.\n *\n * @param {string} key\n * @return {object} value\n */\n\n getOptionValue(key) {\n if (this._storeOptionsAsProperties) {\n return this[key];\n }\n return this._optionValues[key];\n }\n\n /**\n * Store option value.\n *\n * @param {string} key\n * @param {object} value\n * @return {Command} `this` command for chaining\n */\n\n setOptionValue(key, value) {\n return this.setOptionValueWithSource(key, value, undefined);\n }\n\n /**\n * Store option value and where the value came from.\n *\n * @param {string} key\n * @param {object} value\n * @param {string} source - expected values are default/config/env/cli/implied\n * @return {Command} `this` command for chaining\n */\n\n setOptionValueWithSource(key, value, source) {\n if (this._storeOptionsAsProperties) {\n this[key] = value;\n } else {\n this._optionValues[key] = value;\n }\n this._optionValueSources[key] = source;\n return this;\n }\n\n /**\n * Get source of option value.\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSource(key) {\n return this._optionValueSources[key];\n }\n\n /**\n * Get source of option value. See also .optsWithGlobals().\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSourceWithGlobals(key) {\n // global overwrites local, like optsWithGlobals\n let source;\n this._getCommandAndAncestors().forEach((cmd) => {\n if (cmd.getOptionValueSource(key) !== undefined) {\n source = cmd.getOptionValueSource(key);\n }\n });\n return source;\n }\n\n /**\n * Get user arguments from implied or explicit arguments.\n * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n *\n * @private\n */\n\n _prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // auto-detect argument conventions if nothing supplied\n if (argv === undefined && parseOptions.from === undefined) {\n if (process.versions?.electron) {\n parseOptions.from = 'electron';\n }\n // check node specific options for scenarios where user CLI args follow executable without scriptname\n const execArgv = process.execArgv ?? [];\n if (\n execArgv.includes('-e') ||\n execArgv.includes('--eval') ||\n execArgv.includes('-p') ||\n execArgv.includes('--print')\n ) {\n parseOptions.from = 'eval'; // internal usage, not documented\n }\n }\n\n // default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n }\n this.rawArgs = argv.slice();\n\n // extract the user args and scriptPath\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: because defaultApp is an unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n case 'eval':\n userArgs = argv.slice(1);\n break;\n default:\n throw new Error(\n `unexpected parse option { from: '${parseOptions.from}' }`,\n );\n }\n\n // Find default name for program from arguments.\n if (!this._name && this._scriptPath)\n this.nameFromFilename(this._scriptPath);\n this._name = this._name || 'program';\n\n return userArgs;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Use parseAsync instead of parse if any of your action handlers are async.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * program.parse(); // parse process.argv and auto-detect electron and special node flags\n * program.parse(process.argv); // assume argv[0] is app and argv[1] is script\n * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv] - optional, defaults to process.argv\n * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron\n * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n * @return {Command} `this` command for chaining\n */\n\n parse(argv, parseOptions) {\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags\n * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script\n * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv]\n * @param {object} [parseOptions]\n * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n * @return {Promise}\n */\n\n async parseAsync(argv, parseOptions) {\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n await this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Execute a sub-command executable.\n *\n * @private\n */\n\n _executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n function findFile(baseDir, baseName) {\n // Look for specified file\n const localBin = path.resolve(baseDir, baseName);\n if (fs.existsSync(localBin)) return localBin;\n\n // Stop looking if candidate already has an expected extension.\n if (sourceExt.includes(path.extname(baseName))) return undefined;\n\n // Try all the extensions.\n const foundExt = sourceExt.find((ext) =>\n fs.existsSync(`${localBin}${ext}`),\n );\n if (foundExt) return `${localBin}${foundExt}`;\n\n return undefined;\n }\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // executableFile and executableDir might be full path, or just a name\n let executableFile =\n subcommand._executableFile || `${this._name}-${subcommand._name}`;\n let executableDir = this._executableDir || '';\n if (this._scriptPath) {\n let resolvedScriptPath; // resolve possible symlink for installed npm binary\n try {\n resolvedScriptPath = fs.realpathSync(this._scriptPath);\n } catch (err) {\n resolvedScriptPath = this._scriptPath;\n }\n executableDir = path.resolve(\n path.dirname(resolvedScriptPath),\n executableDir,\n );\n }\n\n // Look for a local file in preference to a command in PATH.\n if (executableDir) {\n let localFile = findFile(executableDir, executableFile);\n\n // Legacy search using prefix of script name instead of command name\n if (!localFile && !subcommand._executableFile && this._scriptPath) {\n const legacyName = path.basename(\n this._scriptPath,\n path.extname(this._scriptPath),\n );\n if (legacyName !== this._name) {\n localFile = findFile(\n executableDir,\n `${legacyName}-${subcommand._name}`,\n );\n }\n }\n executableFile = localFile || executableFile;\n }\n\n launchWithNode = sourceExt.includes(path.extname(executableFile));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n if (!proc.killed) {\n // testing mainly to avoid leak warnings during unit tests with mocked spawn\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n // @ts-ignore because signals not typed to known strings\n proc.kill(signal);\n }\n });\n });\n }\n\n // By default terminate process when spawned process terminates.\n const exitCallback = this._exitCallback;\n proc.on('close', (code) => {\n code = code ?? 1; // code is null if spawned process terminated due to a signal\n if (!exitCallback) {\n process.exit(code);\n } else {\n exitCallback(\n new CommanderError(\n code,\n 'commander.executeSubCommandAsync',\n '(close)',\n ),\n );\n }\n });\n proc.on('error', (err) => {\n // @ts-ignore: because err.code is an unknown property\n if (err.code === 'ENOENT') {\n const executableDirMessage = executableDir\n ? `searched for local subcommand relative to directory '${executableDir}'`\n : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';\n const executableMissing = `'${executableFile}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n throw new Error(executableMissing);\n // @ts-ignore: because err.code is an unknown property\n } else if (err.code === 'EACCES') {\n throw new Error(`'${executableFile}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(\n 1,\n 'commander.executeSubCommandAsync',\n '(error)',\n );\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }\n\n /**\n * @private\n */\n\n _dispatchSubcommand(commandName, operands, unknown) {\n const subCommand = this._findCommand(commandName);\n if (!subCommand) this.help({ error: true });\n\n let promiseChain;\n promiseChain = this._chainOrCallSubCommandHook(\n promiseChain,\n subCommand,\n 'preSubcommand',\n );\n promiseChain = this._chainOrCall(promiseChain, () => {\n if (subCommand._executableHandler) {\n this._executeSubCommand(subCommand, operands.concat(unknown));\n } else {\n return subCommand._parseCommand(operands, unknown);\n }\n });\n return promiseChain;\n }\n\n /**\n * Invoke help directly if possible, or dispatch if necessary.\n * e.g. help foo\n *\n * @private\n */\n\n _dispatchHelpCommand(subcommandName) {\n if (!subcommandName) {\n this.help();\n }\n const subCommand = this._findCommand(subcommandName);\n if (subCommand && !subCommand._executableHandler) {\n subCommand.help();\n }\n\n // Fallback to parsing the help flag to invoke the help.\n return this._dispatchSubcommand(\n subcommandName,\n [],\n [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'],\n );\n }\n\n /**\n * Check this.args against expected this.registeredArguments.\n *\n * @private\n */\n\n _checkNumberOfArguments() {\n // too few\n this.registeredArguments.forEach((arg, i) => {\n if (arg.required && this.args[i] == null) {\n this.missingArgument(arg.name());\n }\n });\n // too many\n if (\n this.registeredArguments.length > 0 &&\n this.registeredArguments[this.registeredArguments.length - 1].variadic\n ) {\n return;\n }\n if (this.args.length > this.registeredArguments.length) {\n this._excessArguments(this.args);\n }\n }\n\n /**\n * Process this.args using this.registeredArguments and save as this.processedArgs!\n *\n * @private\n */\n\n _processArguments() {\n const myParseArg = (argument, value, previous) => {\n // Extra processing for nice error message on parsing failure.\n let parsedValue = value;\n if (value !== null && argument.parseArg) {\n const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n parsedValue = this._callParseArg(\n argument,\n value,\n previous,\n invalidValueMessage,\n );\n }\n return parsedValue;\n };\n\n this._checkNumberOfArguments();\n\n const processedArgs = [];\n this.registeredArguments.forEach((declaredArg, index) => {\n let value = declaredArg.defaultValue;\n if (declaredArg.variadic) {\n // Collect together remaining arguments for passing together as an array.\n if (index < this.args.length) {\n value = this.args.slice(index);\n if (declaredArg.parseArg) {\n value = value.reduce((processed, v) => {\n return myParseArg(declaredArg, v, processed);\n }, declaredArg.defaultValue);\n }\n } else if (value === undefined) {\n value = [];\n }\n } else if (index < this.args.length) {\n value = this.args[index];\n if (declaredArg.parseArg) {\n value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n }\n }\n processedArgs[index] = value;\n });\n this.processedArgs = processedArgs;\n }\n\n /**\n * Once we have a promise we chain, but call synchronously until then.\n *\n * @param {(Promise|undefined)} promise\n * @param {Function} fn\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCall(promise, fn) {\n // thenable\n if (promise && promise.then && typeof promise.then === 'function') {\n // already have a promise, chain callback\n return promise.then(() => fn());\n }\n // callback might return a promise\n return fn();\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallHooks(promise, event) {\n let result = promise;\n const hooks = [];\n this._getCommandAndAncestors()\n .reverse()\n .filter((cmd) => cmd._lifeCycleHooks[event] !== undefined)\n .forEach((hookedCommand) => {\n hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n hooks.push({ hookedCommand, callback });\n });\n });\n if (event === 'postAction') {\n hooks.reverse();\n }\n\n hooks.forEach((hookDetail) => {\n result = this._chainOrCall(result, () => {\n return hookDetail.callback(hookDetail.hookedCommand, this);\n });\n });\n return result;\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {Command} subCommand\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallSubCommandHook(promise, subCommand, event) {\n let result = promise;\n if (this._lifeCycleHooks[event] !== undefined) {\n this._lifeCycleHooks[event].forEach((hook) => {\n result = this._chainOrCall(result, () => {\n return hook(this, subCommand);\n });\n });\n }\n return result;\n }\n\n /**\n * Process arguments in context of this command.\n * Returns action result, in case it is a promise.\n *\n * @private\n */\n\n _parseCommand(operands, unknown) {\n const parsed = this.parseOptions(unknown);\n this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env\n this._parseOptionsImplied();\n operands = operands.concat(parsed.operands);\n unknown = parsed.unknown;\n this.args = operands.concat(unknown);\n\n if (operands && this._findCommand(operands[0])) {\n return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n }\n if (\n this._getHelpCommand() &&\n operands[0] === this._getHelpCommand().name()\n ) {\n return this._dispatchHelpCommand(operands[1]);\n }\n if (this._defaultCommandName) {\n this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command\n return this._dispatchSubcommand(\n this._defaultCommandName,\n operands,\n unknown,\n );\n }\n if (\n this.commands.length &&\n this.args.length === 0 &&\n !this._actionHandler &&\n !this._defaultCommandName\n ) {\n // probably missing subcommand and no handler, user needs help (and exit)\n this.help({ error: true });\n }\n\n this._outputHelpIfRequested(parsed.unknown);\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // We do not always call this check to avoid masking a \"better\" error, like unknown command.\n const checkForUnknownOptions = () => {\n if (parsed.unknown.length > 0) {\n this.unknownOption(parsed.unknown[0]);\n }\n };\n\n const commandEvent = `command:${this.name()}`;\n if (this._actionHandler) {\n checkForUnknownOptions();\n this._processArguments();\n\n let promiseChain;\n promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');\n promiseChain = this._chainOrCall(promiseChain, () =>\n this._actionHandler(this.processedArgs),\n );\n if (this.parent) {\n promiseChain = this._chainOrCall(promiseChain, () => {\n this.parent.emit(commandEvent, operands, unknown); // legacy\n });\n }\n promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');\n return promiseChain;\n }\n if (this.parent && this.parent.listenerCount(commandEvent)) {\n checkForUnknownOptions();\n this._processArguments();\n this.parent.emit(commandEvent, operands, unknown); // legacy\n } else if (operands.length) {\n if (this._findCommand('*')) {\n // legacy default command\n return this._dispatchSubcommand('*', operands, unknown);\n }\n if (this.listenerCount('command:*')) {\n // skip option check, emit event for possible misspelling suggestion\n this.emit('command:*', operands, unknown);\n } else if (this.commands.length) {\n this.unknownCommand();\n } else {\n checkForUnknownOptions();\n this._processArguments();\n }\n } else if (this.commands.length) {\n checkForUnknownOptions();\n // This command has subcommands and nothing hooked up at this level, so display help (and exit).\n this.help({ error: true });\n } else {\n checkForUnknownOptions();\n this._processArguments();\n // fall through for caller to handle after calling .parse()\n }\n }\n\n /**\n * Find matching command.\n *\n * @private\n * @return {Command | undefined}\n */\n _findCommand(name) {\n if (!name) return undefined;\n return this.commands.find(\n (cmd) => cmd._name === name || cmd._aliases.includes(name),\n );\n }\n\n /**\n * Return an option matching `arg` if any.\n *\n * @param {string} arg\n * @return {Option}\n * @package\n */\n\n _findOption(arg) {\n return this.options.find((option) => option.is(arg));\n }\n\n /**\n * Display an error message if a mandatory option does not have a value.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n\n _checkForMissingMandatoryOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd.options.forEach((anOption) => {\n if (\n anOption.mandatory &&\n cmd.getOptionValue(anOption.attributeName()) === undefined\n ) {\n cmd.missingMandatoryOptionValue(anOption);\n }\n });\n });\n }\n\n /**\n * Display an error message if conflicting options are used together in this.\n *\n * @private\n */\n _checkForConflictingLocalOptions() {\n const definedNonDefaultOptions = this.options.filter((option) => {\n const optionKey = option.attributeName();\n if (this.getOptionValue(optionKey) === undefined) {\n return false;\n }\n return this.getOptionValueSource(optionKey) !== 'default';\n });\n\n const optionsWithConflicting = definedNonDefaultOptions.filter(\n (option) => option.conflictsWith.length > 0,\n );\n\n optionsWithConflicting.forEach((option) => {\n const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>\n option.conflictsWith.includes(defined.attributeName()),\n );\n if (conflictingAndDefined) {\n this._conflictingOption(option, conflictingAndDefined);\n }\n });\n }\n\n /**\n * Display an error message if conflicting options are used together.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n _checkForConflictingOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd._checkForConflictingLocalOptions();\n });\n }\n\n /**\n * Parse options from `argv` removing known options,\n * and return argv split into operands and unknown arguments.\n *\n * Examples:\n *\n * argv => operands, unknown\n * --known kkk op => [op], []\n * op --known kkk => [op], []\n * sub --unknown uuu op => [sub], [--unknown uuu op]\n * sub -- --unknown uuu op => [sub --unknown uuu op], []\n *\n * @param {string[]} argv\n * @return {{operands: string[], unknown: string[]}}\n */\n\n parseOptions(argv) {\n const operands = []; // operands, not options or values\n const unknown = []; // first unknown option and remaining unknown args\n let dest = operands;\n const args = argv.slice();\n\n function maybeOption(arg) {\n return arg.length > 1 && arg[0] === '-';\n }\n\n // parse options\n let activeVariadicOption = null;\n while (args.length) {\n const arg = args.shift();\n\n // literal\n if (arg === '--') {\n if (dest === unknown) dest.push(arg);\n dest.push(...args);\n break;\n }\n\n if (activeVariadicOption && !maybeOption(arg)) {\n this.emit(`option:${activeVariadicOption.name()}`, arg);\n continue;\n }\n activeVariadicOption = null;\n\n if (maybeOption(arg)) {\n const option = this._findOption(arg);\n // recognised option, call listener to assign value with possible custom processing\n if (option) {\n if (option.required) {\n const value = args.shift();\n if (value === undefined) this.optionMissingArgument(option);\n this.emit(`option:${option.name()}`, value);\n } else if (option.optional) {\n let value = null;\n // historical behaviour is optional value is following arg unless an option\n if (args.length > 0 && !maybeOption(args[0])) {\n value = args.shift();\n }\n this.emit(`option:${option.name()}`, value);\n } else {\n // boolean flag\n this.emit(`option:${option.name()}`);\n }\n activeVariadicOption = option.variadic ? option : null;\n continue;\n }\n }\n\n // Look for combo options following single dash, eat first one if known.\n if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {\n const option = this._findOption(`-${arg[1]}`);\n if (option) {\n if (\n option.required ||\n (option.optional && this._combineFlagAndOptionalValue)\n ) {\n // option with value following in same argument\n this.emit(`option:${option.name()}`, arg.slice(2));\n } else {\n // boolean option, emit and put back remainder of arg for further processing\n this.emit(`option:${option.name()}`);\n args.unshift(`-${arg.slice(2)}`);\n }\n continue;\n }\n }\n\n // Look for known long flag with value, like --foo=bar\n if (/^--[^=]+=/.test(arg)) {\n const index = arg.indexOf('=');\n const option = this._findOption(arg.slice(0, index));\n if (option && (option.required || option.optional)) {\n this.emit(`option:${option.name()}`, arg.slice(index + 1));\n continue;\n }\n }\n\n // Not a recognised option by this command.\n // Might be a command-argument, or subcommand option, or unknown option, or help command or option.\n\n // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.\n if (maybeOption(arg)) {\n dest = unknown;\n }\n\n // If using positionalOptions, stop processing our options at subcommand.\n if (\n (this._enablePositionalOptions || this._passThroughOptions) &&\n operands.length === 0 &&\n unknown.length === 0\n ) {\n if (this._findCommand(arg)) {\n operands.push(arg);\n if (args.length > 0) unknown.push(...args);\n break;\n } else if (\n this._getHelpCommand() &&\n arg === this._getHelpCommand().name()\n ) {\n operands.push(arg);\n if (args.length > 0) operands.push(...args);\n break;\n } else if (this._defaultCommandName) {\n unknown.push(arg);\n if (args.length > 0) unknown.push(...args);\n break;\n }\n }\n\n // If using passThroughOptions, stop processing options at first command-argument.\n if (this._passThroughOptions) {\n dest.push(arg);\n if (args.length > 0) dest.push(...args);\n break;\n }\n\n // add arg\n dest.push(arg);\n }\n\n return { operands, unknown };\n }\n\n /**\n * Return an object containing local option values as key-value pairs.\n *\n * @return {object}\n */\n opts() {\n if (this._storeOptionsAsProperties) {\n // Preserve original behaviour so backwards compatible when still using properties\n const result = {};\n const len = this.options.length;\n\n for (let i = 0; i < len; i++) {\n const key = this.options[i].attributeName();\n result[key] =\n key === this._versionOptionName ? this._version : this[key];\n }\n return result;\n }\n\n return this._optionValues;\n }\n\n /**\n * Return an object containing merged local and global option values as key-value pairs.\n *\n * @return {object}\n */\n optsWithGlobals() {\n // globals overwrite locals\n return this._getCommandAndAncestors().reduce(\n (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n {},\n );\n }\n\n /**\n * Display error message and exit (or call exitOverride).\n *\n * @param {string} message\n * @param {object} [errorOptions]\n * @param {string} [errorOptions.code] - an id string representing the error\n * @param {number} [errorOptions.exitCode] - used with process.exit\n */\n error(message, errorOptions) {\n // output handling\n this._outputConfiguration.outputError(\n `${message}\\n`,\n this._outputConfiguration.writeErr,\n );\n if (typeof this._showHelpAfterError === 'string') {\n this._outputConfiguration.writeErr(`${this._showHelpAfterError}\\n`);\n } else if (this._showHelpAfterError) {\n this._outputConfiguration.writeErr('\\n');\n this.outputHelp({ error: true });\n }\n\n // exit handling\n const config = errorOptions || {};\n const exitCode = config.exitCode || 1;\n const code = config.code || 'commander.error';\n this._exit(exitCode, code, message);\n }\n\n /**\n * Apply any option related environment variables, if option does\n * not have a value from cli or client code.\n *\n * @private\n */\n _parseOptionsEnv() {\n this.options.forEach((option) => {\n if (option.envVar && option.envVar in process.env) {\n const optionKey = option.attributeName();\n // Priority check. Do not overwrite cli or options from unknown source (client-code).\n if (\n this.getOptionValue(optionKey) === undefined ||\n ['default', 'config', 'env'].includes(\n this.getOptionValueSource(optionKey),\n )\n ) {\n if (option.required || option.optional) {\n // option can take a value\n // keep very simple, optional always takes value\n this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);\n } else {\n // boolean\n // keep very simple, only care that envVar defined and not the value\n this.emit(`optionEnv:${option.name()}`);\n }\n }\n }\n });\n }\n\n /**\n * Apply any implied option values, if option is undefined or default value.\n *\n * @private\n */\n _parseOptionsImplied() {\n const dualHelper = new DualOptions(this.options);\n const hasCustomOptionValue = (optionKey) => {\n return (\n this.getOptionValue(optionKey) !== undefined &&\n !['default', 'implied'].includes(this.getOptionValueSource(optionKey))\n );\n };\n this.options\n .filter(\n (option) =>\n option.implied !== undefined &&\n hasCustomOptionValue(option.attributeName()) &&\n dualHelper.valueFromOption(\n this.getOptionValue(option.attributeName()),\n option,\n ),\n )\n .forEach((option) => {\n Object.keys(option.implied)\n .filter((impliedKey) => !hasCustomOptionValue(impliedKey))\n .forEach((impliedKey) => {\n this.setOptionValueWithSource(\n impliedKey,\n option.implied[impliedKey],\n 'implied',\n );\n });\n });\n }\n\n /**\n * Argument `name` is missing.\n *\n * @param {string} name\n * @private\n */\n\n missingArgument(name) {\n const message = `error: missing required argument '${name}'`;\n this.error(message, { code: 'commander.missingArgument' });\n }\n\n /**\n * `Option` is missing an argument.\n *\n * @param {Option} option\n * @private\n */\n\n optionMissingArgument(option) {\n const message = `error: option '${option.flags}' argument missing`;\n this.error(message, { code: 'commander.optionMissingArgument' });\n }\n\n /**\n * `Option` does not have a value, and is a mandatory option.\n *\n * @param {Option} option\n * @private\n */\n\n missingMandatoryOptionValue(option) {\n const message = `error: required option '${option.flags}' not specified`;\n this.error(message, { code: 'commander.missingMandatoryOptionValue' });\n }\n\n /**\n * `Option` conflicts with another option.\n *\n * @param {Option} option\n * @param {Option} conflictingOption\n * @private\n */\n _conflictingOption(option, conflictingOption) {\n // The calling code does not know whether a negated option is the source of the\n // value, so do some work to take an educated guess.\n const findBestOptionFromValue = (option) => {\n const optionKey = option.attributeName();\n const optionValue = this.getOptionValue(optionKey);\n const negativeOption = this.options.find(\n (target) => target.negate && optionKey === target.attributeName(),\n );\n const positiveOption = this.options.find(\n (target) => !target.negate && optionKey === target.attributeName(),\n );\n if (\n negativeOption &&\n ((negativeOption.presetArg === undefined && optionValue === false) ||\n (negativeOption.presetArg !== undefined &&\n optionValue === negativeOption.presetArg))\n ) {\n return negativeOption;\n }\n return positiveOption || option;\n };\n\n const getErrorMessage = (option) => {\n const bestOption = findBestOptionFromValue(option);\n const optionKey = bestOption.attributeName();\n const source = this.getOptionValueSource(optionKey);\n if (source === 'env') {\n return `environment variable '${bestOption.envVar}'`;\n }\n return `option '${bestOption.flags}'`;\n };\n\n const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n this.error(message, { code: 'commander.conflictingOption' });\n }\n\n /**\n * Unknown option `flag`.\n *\n * @param {string} flag\n * @private\n */\n\n unknownOption(flag) {\n if (this._allowUnknownOption) return;\n let suggestion = '';\n\n if (flag.startsWith('--') && this._showSuggestionAfterError) {\n // Looping to pick up the global options too\n let candidateFlags = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n do {\n const moreFlags = command\n .createHelp()\n .visibleOptions(command)\n .filter((option) => option.long)\n .map((option) => option.long);\n candidateFlags = candidateFlags.concat(moreFlags);\n command = command.parent;\n } while (command && !command._enablePositionalOptions);\n suggestion = suggestSimilar(flag, candidateFlags);\n }\n\n const message = `error: unknown option '${flag}'${suggestion}`;\n this.error(message, { code: 'commander.unknownOption' });\n }\n\n /**\n * Excess arguments, more than expected.\n *\n * @param {string[]} receivedArgs\n * @private\n */\n\n _excessArguments(receivedArgs) {\n if (this._allowExcessArguments) return;\n\n const expected = this.registeredArguments.length;\n const s = expected === 1 ? '' : 's';\n const forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\n this.error(message, { code: 'commander.excessArguments' });\n }\n\n /**\n * Unknown command.\n *\n * @private\n */\n\n unknownCommand() {\n const unknownName = this.args[0];\n let suggestion = '';\n\n if (this._showSuggestionAfterError) {\n const candidateNames = [];\n this.createHelp()\n .visibleCommands(this)\n .forEach((command) => {\n candidateNames.push(command.name());\n // just visible alias\n if (command.alias()) candidateNames.push(command.alias());\n });\n suggestion = suggestSimilar(unknownName, candidateNames);\n }\n\n const message = `error: unknown command '${unknownName}'${suggestion}`;\n this.error(message, { code: 'commander.unknownCommand' });\n }\n\n /**\n * Get or set the program version.\n *\n * This method auto-registers the \"-V, --version\" option which will print the version number.\n *\n * You can optionally supply the flags and description to override the defaults.\n *\n * @param {string} [str]\n * @param {string} [flags]\n * @param {string} [description]\n * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments\n */\n\n version(str, flags, description) {\n if (str === undefined) return this._version;\n this._version = str;\n flags = flags || '-V, --version';\n description = description || 'output the version number';\n const versionOption = this.createOption(flags, description);\n this._versionOptionName = versionOption.attributeName();\n this._registerOption(versionOption);\n\n this.on('option:' + versionOption.name(), () => {\n this._outputConfiguration.writeOut(`${str}\\n`);\n this._exit(0, 'commander.version', str);\n });\n return this;\n }\n\n /**\n * Set the description.\n *\n * @param {string} [str]\n * @param {object} [argsDescription]\n * @return {(string|Command)}\n */\n description(str, argsDescription) {\n if (str === undefined && argsDescription === undefined)\n return this._description;\n this._description = str;\n if (argsDescription) {\n this._argsDescription = argsDescription;\n }\n return this;\n }\n\n /**\n * Set the summary. Used when listed as subcommand of parent.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n summary(str) {\n if (str === undefined) return this._summary;\n this._summary = str;\n return this;\n }\n\n /**\n * Set an alias for the command.\n *\n * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n *\n * @param {string} [alias]\n * @return {(string|Command)}\n */\n\n alias(alias) {\n if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility\n\n /** @type {Command} */\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n if (\n this.commands.length !== 0 &&\n this.commands[this.commands.length - 1]._executableHandler\n ) {\n // assume adding alias for last added executable subcommand, rather than this\n command = this.commands[this.commands.length - 1];\n }\n\n if (alias === command._name)\n throw new Error(\"Command alias can't be the same as its name\");\n const matchingCommand = this.parent?._findCommand(alias);\n if (matchingCommand) {\n // c.f. _registerCommand\n const existingCmd = [matchingCommand.name()]\n .concat(matchingCommand.aliases())\n .join('|');\n throw new Error(\n `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`,\n );\n }\n\n command._aliases.push(alias);\n return this;\n }\n\n /**\n * Set aliases for the command.\n *\n * Only the first alias is shown in the auto-generated help.\n *\n * @param {string[]} [aliases]\n * @return {(string[]|Command)}\n */\n\n aliases(aliases) {\n // Getter for the array of aliases is the main reason for having aliases() in addition to alias().\n if (aliases === undefined) return this._aliases;\n\n aliases.forEach((alias) => this.alias(alias));\n return this;\n }\n\n /**\n * Set / get the command usage `str`.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n usage(str) {\n if (str === undefined) {\n if (this._usage) return this._usage;\n\n const args = this.registeredArguments.map((arg) => {\n return humanReadableArgName(arg);\n });\n return []\n .concat(\n this.options.length || this._helpOption !== null ? '[options]' : [],\n this.commands.length ? '[command]' : [],\n this.registeredArguments.length ? args : [],\n )\n .join(' ');\n }\n\n this._usage = str;\n return this;\n }\n\n /**\n * Get or set the name of the command.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n name(str) {\n if (str === undefined) return this._name;\n this._name = str;\n return this;\n }\n\n /**\n * Set the name of the command from script filename, such as process.argv[1],\n * or require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.filename);\n *\n * @param {string} filename\n * @return {Command}\n */\n\n nameFromFilename(filename) {\n this._name = path.basename(filename, path.extname(filename));\n\n return this;\n }\n\n /**\n * Get or set the directory for searching for executable subcommands of this command.\n *\n * @example\n * program.executableDir(__dirname);\n * // or\n * program.executableDir('subcommands');\n *\n * @param {string} [path]\n * @return {(string|null|Command)}\n */\n\n executableDir(path) {\n if (path === undefined) return this._executableDir;\n this._executableDir = path;\n return this;\n }\n\n /**\n * Return program help documentation.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n * @return {string}\n */\n\n helpInformation(contextOptions) {\n const helper = this.createHelp();\n if (helper.helpWidth === undefined) {\n helper.helpWidth =\n contextOptions && contextOptions.error\n ? this._outputConfiguration.getErrHelpWidth()\n : this._outputConfiguration.getOutHelpWidth();\n }\n return helper.formatHelp(this, helper);\n }\n\n /**\n * @private\n */\n\n _getHelpContext(contextOptions) {\n contextOptions = contextOptions || {};\n const context = { error: !!contextOptions.error };\n let write;\n if (context.error) {\n write = (arg) => this._outputConfiguration.writeErr(arg);\n } else {\n write = (arg) => this._outputConfiguration.writeOut(arg);\n }\n context.write = contextOptions.write || write;\n context.command = this;\n return context;\n }\n\n /**\n * Output help information for this command.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n outputHelp(contextOptions) {\n let deprecatedCallback;\n if (typeof contextOptions === 'function') {\n deprecatedCallback = contextOptions;\n contextOptions = undefined;\n }\n const context = this._getHelpContext(contextOptions);\n\n this._getCommandAndAncestors()\n .reverse()\n .forEach((command) => command.emit('beforeAllHelp', context));\n this.emit('beforeHelp', context);\n\n let helpInformation = this.helpInformation(context);\n if (deprecatedCallback) {\n helpInformation = deprecatedCallback(helpInformation);\n if (\n typeof helpInformation !== 'string' &&\n !Buffer.isBuffer(helpInformation)\n ) {\n throw new Error('outputHelp callback must return a string or a Buffer');\n }\n }\n context.write(helpInformation);\n\n if (this._getHelpOption()?.long) {\n this.emit(this._getHelpOption().long); // deprecated\n }\n this.emit('afterHelp', context);\n this._getCommandAndAncestors().forEach((command) =>\n command.emit('afterAllHelp', context),\n );\n }\n\n /**\n * You can pass in flags and a description to customise the built-in help option.\n * Pass in false to disable the built-in help option.\n *\n * @example\n * program.helpOption('-?, --help' 'show help'); // customise\n * program.helpOption(false); // disable\n *\n * @param {(string | boolean)} flags\n * @param {string} [description]\n * @return {Command} `this` command for chaining\n */\n\n helpOption(flags, description) {\n // Support disabling built-in help option.\n if (typeof flags === 'boolean') {\n if (flags) {\n this._helpOption = this._helpOption ?? undefined; // preserve existing option\n } else {\n this._helpOption = null; // disable\n }\n return this;\n }\n\n // Customise flags and description.\n flags = flags ?? '-h, --help';\n description = description ?? 'display help for command';\n this._helpOption = this.createOption(flags, description);\n\n return this;\n }\n\n /**\n * Lazy create help option.\n * Returns null if has been disabled with .helpOption(false).\n *\n * @returns {(Option | null)} the help option\n * @package\n */\n _getHelpOption() {\n // Lazy create help option on demand.\n if (this._helpOption === undefined) {\n this.helpOption(undefined, undefined);\n }\n return this._helpOption;\n }\n\n /**\n * Supply your own option to use for the built-in help option.\n * This is an alternative to using helpOption() to customise the flags and description etc.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addHelpOption(option) {\n this._helpOption = option;\n return this;\n }\n\n /**\n * Output help information and exit.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n help(contextOptions) {\n this.outputHelp(contextOptions);\n let exitCode = process.exitCode || 0;\n if (\n exitCode === 0 &&\n contextOptions &&\n typeof contextOptions !== 'function' &&\n contextOptions.error\n ) {\n exitCode = 1;\n }\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(exitCode, 'commander.help', '(outputHelp)');\n }\n\n /**\n * Add additional text to be displayed with the built-in help.\n *\n * Position is 'before' or 'after' to affect just this command,\n * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n *\n * @param {string} position - before or after built-in help\n * @param {(string | Function)} text - string to add, or a function returning a string\n * @return {Command} `this` command for chaining\n */\n addHelpText(position, text) {\n const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];\n if (!allowedValues.includes(position)) {\n throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n const helpEvent = `${position}Help`;\n this.on(helpEvent, (context) => {\n let helpStr;\n if (typeof text === 'function') {\n helpStr = text({ error: context.error, command: context.command });\n } else {\n helpStr = text;\n }\n // Ignore falsy value when nothing to output.\n if (helpStr) {\n context.write(`${helpStr}\\n`);\n }\n });\n return this;\n }\n\n /**\n * Output help information if help flags specified\n *\n * @param {Array} args - array of options to search for help flags\n * @private\n */\n\n _outputHelpIfRequested(args) {\n const helpOption = this._getHelpOption();\n const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));\n if (helpRequested) {\n this.outputHelp();\n // (Do not have all displayed text available so only passing placeholder.)\n this._exit(0, 'commander.helpDisplayed', '(outputHelp)');\n }\n }\n}\n\n/**\n * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).\n *\n * @param {string[]} args - array of arguments from node.execArgv\n * @returns {string[]}\n * @private\n */\n\nfunction incrementNodeInspectorPort(args) {\n // Testing for these options:\n // --inspect[=[host:]port]\n // --inspect-brk[=[host:]port]\n // --inspect-port=[host:]port\n return args.map((arg) => {\n if (!arg.startsWith('--inspect')) {\n return arg;\n }\n let debugOption;\n let debugHost = '127.0.0.1';\n let debugPort = '9229';\n let match;\n if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n // e.g. --inspect\n debugOption = match[1];\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null\n ) {\n debugOption = match[1];\n if (/^\\d+$/.test(match[3])) {\n // e.g. --inspect=1234\n debugPort = match[3];\n } else {\n // e.g. --inspect=localhost\n debugHost = match[3];\n }\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null\n ) {\n // e.g. --inspect=localhost:1234\n debugOption = match[1];\n debugHost = match[3];\n debugPort = match[4];\n }\n\n if (debugOption && debugPort !== '0') {\n return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n }\n return arg;\n });\n}\n\nexports.Command = Command;\n","const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\nexports.program = new Command();\n\nexports.createCommand = (name) => new Command(name);\nexports.createOption = (flags, description) => new Option(flags, description);\nexports.createArgument = (name, description) => new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n","import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help,\n} = commander;\n","'use strict'\nmodule.exports = rfdc\n\nfunction copyBuffer (cur) {\n if (cur instanceof Buffer) {\n return Buffer.from(cur)\n }\n\n return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length)\n}\n\nfunction rfdc (opts) {\n opts = opts || {}\n if (opts.circles) return rfdcCircles(opts)\n\n const constructorHandlers = new Map()\n constructorHandlers.set(Date, (o) => new Date(o))\n constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)))\n constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)))\n if (opts.constructorHandlers) {\n for (const handler of opts.constructorHandlers) {\n constructorHandlers.set(handler[0], handler[1])\n }\n }\n\n let handler = null\n\n return opts.proto ? cloneProto : clone\n\n function cloneArray (a, fn) {\n const keys = Object.keys(a)\n const a2 = new Array(keys.length)\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i]\n const cur = a[k]\n if (typeof cur !== 'object' || cur === null) {\n a2[k] = cur\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n a2[k] = handler(cur, fn)\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur)\n } else {\n a2[k] = fn(cur)\n }\n }\n return a2\n }\n\n function clone (o) {\n if (typeof o !== 'object' || o === null) return o\n if (Array.isArray(o)) return cloneArray(o, clone)\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, clone)\n }\n const o2 = {}\n for (const k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue\n const cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, clone)\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n o2[k] = clone(cur)\n }\n }\n return o2\n }\n\n function cloneProto (o) {\n if (typeof o !== 'object' || o === null) return o\n if (Array.isArray(o)) return cloneArray(o, cloneProto)\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, cloneProto)\n }\n const o2 = {}\n for (const k in o) {\n const cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, cloneProto)\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n o2[k] = cloneProto(cur)\n }\n }\n return o2\n }\n}\n\nfunction rfdcCircles (opts) {\n const refs = []\n const refsNew = []\n\n const constructorHandlers = new Map()\n constructorHandlers.set(Date, (o) => new Date(o))\n constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)))\n constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)))\n if (opts.constructorHandlers) {\n for (const handler of opts.constructorHandlers) {\n constructorHandlers.set(handler[0], handler[1])\n }\n }\n\n let handler = null\n return opts.proto ? cloneProto : clone\n\n function cloneArray (a, fn) {\n const keys = Object.keys(a)\n const a2 = new Array(keys.length)\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i]\n const cur = a[k]\n if (typeof cur !== 'object' || cur === null) {\n a2[k] = cur\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n a2[k] = handler(cur, fn)\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur)\n } else {\n const index = refs.indexOf(cur)\n if (index !== -1) {\n a2[k] = refsNew[index]\n } else {\n a2[k] = fn(cur)\n }\n }\n }\n return a2\n }\n\n function clone (o) {\n if (typeof o !== 'object' || o === null) return o\n if (Array.isArray(o)) return cloneArray(o, clone)\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, clone)\n }\n const o2 = {}\n refs.push(o)\n refsNew.push(o2)\n for (const k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue\n const cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, clone)\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n const i = refs.indexOf(cur)\n if (i !== -1) {\n o2[k] = refsNew[i]\n } else {\n o2[k] = clone(cur)\n }\n }\n }\n refs.pop()\n refsNew.pop()\n return o2\n }\n\n function cloneProto (o) {\n if (typeof o !== 'object' || o === null) return o\n if (Array.isArray(o)) return cloneArray(o, cloneProto)\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, cloneProto)\n }\n const o2 = {}\n refs.push(o)\n refsNew.push(o2)\n for (const k in o) {\n const cur = o[k]\n if (typeof cur !== 'object' || cur === null) {\n o2[k] = cur\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, cloneProto)\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur)\n } else {\n const i = refs.indexOf(cur)\n if (i !== -1) {\n o2[k] = refsNew[i]\n } else {\n o2[k] = cloneProto(cur)\n }\n }\n }\n refs.pop()\n refsNew.pop()\n return o2\n }\n}\n","#!/usr/bin/env node\nimport { Help, Option, program } from 'commander'\nimport createCloneDeep from 'rfdc'\nimport semver from 'semver'\nimport pkg from '../../package.json'\nimport cliOptions, { renderExtendedHelp } from '../cli-options'\nimport ncu from '../index'\nimport { chalkInit } from '../lib/chalk'\n// async global contexts are only available in esm modules -> function\nimport getNcuRc from '../lib/getNcuRc'\nimport { pickBy } from '../lib/pick'\n\nconst optionVersionDescription = 'Output the version number of npm-check-updates.'\n\n/** Removes inline code ticks. */\nconst uncode = (s: string) => s.replace(/`/g, '')\n\nconst cloneDeep = createCloneDeep()\n\n;(async () => {\n // importing update-notifier dynamically as esm modules are only allowed to be dynamically imported inside of cjs modules\n const { default: updateNotifier } = await import('update-notifier')\n\n // check if a new version of ncu is available and print an update notification\n //\n // For testing from specific versions, use:\n //\n // updateNotifier({\n // pkg: {\n // name: 'npm-check-updates',\n // version: x.y.z\n // },\n // updateCheckInterval: 0\n // })\n\n const notifier = updateNotifier({ pkg })\n if (notifier.update && notifier.update.latest !== pkg.version) {\n const { default: chalk } = await import('chalk')\n\n // generate release urls for all the major versions from the current version up to the latest\n const currentMajor = semver.parse(notifier.update.current)?.major\n const latestMajor = semver.parse(notifier.update.latest)?.major\n const majorVersions =\n // Greater than or equal to (>=) will always return false if either operant is NaN or undefined.\n // Without this condition, it can result in a RangeError: Invalid array length.\n // See: https://github.com/raineorshine/npm-check-updates/issues/1200\n currentMajor && latestMajor && latestMajor >= currentMajor\n ? new Array(latestMajor - currentMajor).fill(0).map((x, i) => currentMajor + i + 1)\n : []\n const releaseUrls = majorVersions.map(majorVersion => `${pkg.homepage ?? ''}/releases/tag/v${majorVersion}.0.0`)\n\n // for non-major updates, generate a URL to view all commits since the current version\n const compareUrl = `${pkg.homepage ?? ''}/compare/v${notifier.update.current}...v${notifier.update.latest}`\n\n notifier.notify({\n defer: false,\n isGlobal: true,\n message: `Update available ${chalk.dim('{currentVersion}')}${chalk.reset(' → ')}${\n notifier.update.type === 'major'\n ? chalk.red('{latestVersion}')\n : notifier.update.type === 'minor'\n ? chalk.yellow('{latestVersion}')\n : chalk.green('{latestVersion}')\n }\nRun ${chalk.cyan('{updateCommand}')} to update\n${chalk.dim.underline(\n notifier.update.type === 'major' ? releaseUrls.map(url => chalk.dim.underline(url)).join('\\n') : compareUrl,\n)}`,\n })\n }\n\n // manually detect option-specific help\n // https://github.com/raineorshine/npm-check-updates/issues/787\n const rawArgs = process.argv.slice(2)\n const indexHelp = rawArgs.findIndex(arg => arg === '--help' || arg === '-h')\n if (indexHelp !== -1 && rawArgs[indexHelp + 1]) {\n const helpOption = rawArgs[indexHelp + 1].replace(/^-*/, '')\n if (helpOption === 'help' || helpOption === 'h') {\n console.info('Would you like some help with your help?')\n } else {\n await chalkInit()\n const nonHelpArgs = [...rawArgs.slice(0, indexHelp), ...rawArgs.slice(indexHelp + 1)]\n nonHelpArgs.forEach(arg => {\n // match option by long or short\n const query = arg.replace(/^-*/, '')\n const option = cliOptions.find(\n option =>\n query === option.long ||\n query === option.short ||\n (query === `no-${option.long}` && option.type === 'boolean'),\n )\n if (option) {\n console.info(renderExtendedHelp(option) + '\\n')\n } else if (query === 'version' || query === 'v' || query === 'V') {\n console.info(\n renderExtendedHelp({\n long: 'version',\n short: 'v',\n description: optionVersionDescription,\n // do not pass boolean or it will print --no-version\n type: 'string',\n }) + '\\n',\n )\n } else {\n console.info(`Unknown option: ${arg}`)\n }\n })\n }\n process.exit(0)\n }\n\n // a set of options that only work in an rc config file, not on the command line\n const noCli = new Set(cliOptions.filter(option => option.cli === false).map(option => `--${option.long}`))\n\n // start commander program\n program\n .description('[filter] is a list or regex of package names to check (all others will be ignored).')\n .usage('[options] [filter]')\n // See: boolean optional arg below\n .configureHelp({\n optionTerm: option =>\n option.long && noCli.has(option.long)\n ? option.long.replace('--', '') + '*'\n : option.long === '--version'\n ? // add -v to version help to cover the alias added below\n '-v, -V, --version'\n : option.flags.replace('[bool]', ''),\n optionDescription: option =>\n option.long === '--version'\n ? optionVersionDescription\n : option.long === '--help'\n ? `You're lookin' at it. Run \"ncu --help <option>\" for a specific option.`\n : Help.prototype.optionDescription(option),\n })\n // add hidden -v alias for --V/--version\n .addOption(new Option('-v, --versionAlias').hideHelp())\n .on('option:versionAlias', () => {\n console.info(pkg.version)\n process.exit(0)\n })\n\n // add cli options\n cliOptions.forEach(({ long, short, arg, description, default: defaultValue, help, parse, type }) => {\n const flags = `${short ? `-${short}, ` : ''}--${long}${arg ? ` <${arg}>` : ''}`\n // format description for cli by removing inline code ticks\n // point to help in description if extended help text is available\n const descriptionFormatted = `${uncode(description)}${help ? ` Run \"ncu --help ${long}\" for details.` : ''}`\n\n // handle 3rd/4th argument polymorphism\n program.option(flags, descriptionFormatted, parse || defaultValue, parse ? defaultValue : undefined)\n\n // add --no- prefixed boolean options\n // necessary for overriding booleans set to true in the ncurc\n if (type === 'boolean') {\n program.addOption(new Option(`--no-${long}`).default(false).hideHelp())\n }\n })\n\n // set version option at the end\n program.version(pkg.version)\n\n // commander mutates its optionValues with program.parse\n // In order to call program.parse again and parse the rc file options, we need to clear commander's internal optionValues\n // Otherwise array options will be duplicated\n const defaultOptionValues = cloneDeep((program as any)._optionValues)\n program.parse(process.argv)\n\n const programOpts = program.opts()\n const programArgs = process.argv.slice(2)\n\n const { color, configFileName, configFilePath, global, packageFile, mergeConfig } = programOpts\n\n // Force color on all chalk instances.\n // See: /src/lib/chalk.ts\n await chalkInit(color)\n\n // load .ncurc\n // Do not load when tests are running (can be overridden if configFilePath is set explicitly, or --mergeConfig option specified)\n const rcResult =\n !process.env.NCU_TESTS || configFilePath || mergeConfig\n ? await getNcuRc({\n configFileName,\n configFilePath,\n global,\n packageFile,\n options: { ...programOpts, cli: true },\n })\n : null\n\n // override rc args with program args\n const rcArgs = (rcResult?.args || []).filter(\n (arg, i, args) =>\n (typeof arg !== 'string' || !arg.startsWith('-') || !programArgs.includes(arg)) &&\n (typeof args[i - 1] !== 'string' || !args[i - 1].startsWith('-') || !programArgs.includes(args[i - 1])),\n )\n\n // insert config arguments into command line arguments so they can all be parsed by commander\n const combinedArguments = [...process.argv.slice(0, 2), ...rcArgs, ...programArgs]\n\n // See defaultOptionValues comment above\n ;(program as any)._optionValues = defaultOptionValues\n program.parse(combinedArguments)\n const combinedProgramOpts = program.opts()\n\n // filter out undefined program options and combine cli options with config file options\n const options = {\n ...(rcResult && Object.keys(rcResult.config).length > 0 ? { rcConfigPath: rcResult.filePath } : null),\n ...pickBy(program.opts(), (value: unknown) => value !== undefined),\n args: program.args,\n ...(combinedProgramOpts.filter ? { filter: combinedProgramOpts.filter } : null),\n ...(combinedProgramOpts.reject ? { reject: combinedProgramOpts.reject } : null),\n }\n\n // NOTE: Options handling and defaults go in initOptions in index.js\n\n ncu(options, { cli: true })\n})()\n"],"names":["exitCode","code","message","CommanderError","error","InvalidArgumentError","require$$0","Argument$3","name","description","value","previous","fn","values","arg","humanReadableArgName","nameOutput","argument","Argument","Help$3","cmd","visibleCommands","helpCommand","a","b","getSortKey","option","visibleOptions","helpOption","removeShort","removeLong","globalOptions","ancestorCmd","args","helper","max","command","cmdName","ancestorCmdNames","extraInfo","choice","extraDescripton","termWidth","helpWidth","itemIndentWidth","itemSeparatorWidth","formatItem","term","fullText","formatList","textArray","output","commandDescription","argumentList","optionList","globalOptionList","commandList","str","width","indent","minColumnWidth","indents","manualIndent","columnWidth","leadingStr","columnText","indentString","breaks","regex","lines","line","i","help","Help","Option$3","flags","optionFlags","splitOptionFlags","names","impliedOptionValues","newImplied","mandatory","hide","camelcase","DualOptions$1","options","key","optionKey","preset","negativeValue","word","shortFlag","longFlag","flagParts","Option","DualOptions","maxDistance","editDistance","d","j","cost","suggestSimilar","candidates","searchingOptions","candidate","similar","bestDistance","minSimilarity","distance","length","suggestSimilar_1","EventEmitter","childProcess","require$$1","path","require$$2","fs","require$$3","process","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","Command","write","sourceCommand","result","nameAndArgs","actionOptsOrExecDesc","execOpts","desc","opts","configuration","displayHelp","displaySuggestion","defaultValue","detail","previousArgument","enableOrNameAndArgs","helpName","helpArgs","helpDescription","deprecatedDescription","event","listener","allowedValues","err","expectedArgsCount","actionArgs","target","invalidArgumentMessage","matchingOption","matchingFlag","knownBy","alreadyUsed","existingCmd","newCmd","oname","positiveLongFlag","handleOptionValue","val","invalidValueMessage","valueSource","oldValue","config","def","m","parseArg","combine","allowUnknown","allowExcess","positional","passThrough","storeAsProperties","source","argv","parseOptions","execArgv","userArgs","subcommand","launchWithNode","sourceExt","findFile","baseDir","baseName","localBin","foundExt","ext","executableFile","executableDir","resolvedScriptPath","localFile","legacyName","proc","incrementNodeInspectorPort","signal","exitCallback","executableDirMessage","executableMissing","wrappedError","commandName","operands","unknown","subCommand","promiseChain","subcommandName","myParseArg","parsedValue","processedArgs","declaredArg","index","processed","v","promise","hooks","hookedCommand","callback","hookDetail","hook","parsed","checkForUnknownOptions","commandEvent","anOption","definedNonDefaultOptions","conflictingAndDefined","defined","dest","maybeOption","activeVariadicOption","len","combinedOptions","errorOptions","dualHelper","hasCustomOptionValue","impliedKey","conflictingOption","findBestOptionFromValue","optionValue","negativeOption","positiveOption","getErrorMessage","bestOption","flag","suggestion","candidateFlags","moreFlags","receivedArgs","expected","s","unknownName","candidateNames","versionOption","argsDescription","alias","matchingCommand","aliases","filename","contextOptions","context","deprecatedCallback","helpInformation","position","text","helpEvent","helpStr","debugOption","debugHost","debugPort","match","commander","program","createCommand","createArgument","createOption","InvalidOptionArgumentError","rfdc_1","rfdc","copyBuffer","cur","rfdcCircles","constructorHandlers","o","cloneArray","handler","cloneProto","clone","keys","a2","k","o2","refs","refsNew","optionVersionDescription","uncode","cloneDeep","createCloneDeep","updateNotifier","notifier","pkg","chalk","currentMajor","semver","latestMajor","releaseUrls","majorVersion","compareUrl","url","rawArgs","indexHelp","chalkInit","query","cliOptions","renderExtendedHelp","noCli","long","short","parse","type","descriptionFormatted","defaultOptionValues","programOpts","programArgs","color","configFileName","configFilePath","global","packageFile","mergeConfig","rcResult","getNcuRc","rcArgs","combinedArguments","combinedProgramOpts","pickBy","ncu"],"mappings":";wMAGA,cAA6B,KAAM,CAOjC,YAAYA,EAAUC,EAAMC,EAAS,CACnC,MAAMA,CAAO,EAEb,MAAM,kBAAkB,KAAM,KAAK,WAAW,EAC9C,KAAK,KA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