@prismer/sdk 2.0.8 → 2.2.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/README.md +13 -7
  2. package/dist/chunk-R7POPVJR.mjs +35 -0
  3. package/dist/cli.js +59653 -8452
  4. package/dist/index.d.mts +716 -229
  5. package/dist/index.d.ts +716 -229
  6. package/dist/index.js +307 -23
  7. package/dist/index.mjs +306 -23
  8. package/dist/katex-OIP2Q473.mjs +14515 -0
  9. package/dist/pkf-schema.json +35 -0
  10. package/dist/pkf.d.mts +1 -0
  11. package/dist/pkf.d.ts +1 -0
  12. package/dist/pkf.js +48370 -0
  13. package/dist/pkf.mjs +33683 -0
  14. package/node_modules/@clack/core/CHANGELOG.md +249 -0
  15. package/node_modules/@clack/core/LICENSE +9 -0
  16. package/node_modules/@clack/core/README.md +22 -0
  17. package/node_modules/@clack/core/dist/index.cjs +15 -0
  18. package/node_modules/@clack/core/dist/index.cjs.map +1 -0
  19. package/node_modules/@clack/core/dist/index.d.cts +209 -0
  20. package/node_modules/@clack/core/dist/index.d.mts +209 -0
  21. package/node_modules/@clack/core/dist/index.d.ts +209 -0
  22. package/node_modules/@clack/core/dist/index.mjs +15 -0
  23. package/node_modules/@clack/core/dist/index.mjs.map +1 -0
  24. package/node_modules/@clack/core/package.json +62 -0
  25. package/node_modules/@clack/prompts/CHANGELOG.md +374 -0
  26. package/node_modules/@clack/prompts/LICENSE +9 -0
  27. package/node_modules/@clack/prompts/README.md +191 -0
  28. package/node_modules/@clack/prompts/dist/index.cjs +80 -0
  29. package/node_modules/@clack/prompts/dist/index.cjs.map +1 -0
  30. package/node_modules/@clack/prompts/dist/index.d.cts +151 -0
  31. package/node_modules/@clack/prompts/dist/index.d.mts +151 -0
  32. package/node_modules/@clack/prompts/dist/index.d.ts +151 -0
  33. package/node_modules/@clack/prompts/dist/index.mjs +80 -0
  34. package/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
  35. package/node_modules/@clack/prompts/package.json +61 -0
  36. package/node_modules/@iarna/toml/LICENSE +14 -0
  37. package/node_modules/@iarna/toml/README.md +301 -0
  38. package/node_modules/@iarna/toml/index.d.ts +57 -0
  39. package/node_modules/@iarna/toml/lib/create-date.js +23 -0
  40. package/node_modules/@iarna/toml/lib/create-datetime-float.js +24 -0
  41. package/node_modules/@iarna/toml/lib/create-datetime.js +10 -0
  42. package/node_modules/@iarna/toml/lib/create-time.js +22 -0
  43. package/node_modules/@iarna/toml/lib/format-num.js +6 -0
  44. package/node_modules/@iarna/toml/lib/parser-debug.js +60 -0
  45. package/node_modules/@iarna/toml/lib/parser.js +127 -0
  46. package/node_modules/@iarna/toml/lib/toml-parser.js +1379 -0
  47. package/node_modules/@iarna/toml/package.json +82 -0
  48. package/node_modules/@iarna/toml/parse-async.js +30 -0
  49. package/node_modules/@iarna/toml/parse-pretty-error.js +33 -0
  50. package/node_modules/@iarna/toml/parse-stream.js +80 -0
  51. package/node_modules/@iarna/toml/parse-string.js +18 -0
  52. package/node_modules/@iarna/toml/parse.js +5 -0
  53. package/node_modules/@iarna/toml/stringify.js +296 -0
  54. package/node_modules/@iarna/toml/toml.js +3 -0
  55. package/node_modules/@prismer/aip-sdk/README.md +36 -0
  56. package/node_modules/@prismer/aip-sdk/dist/cli/chunk-LIJDUCHB.js +104 -0
  57. package/node_modules/@prismer/aip-sdk/dist/cli/chunk-QUQXZ2LD.js +99 -0
  58. package/node_modules/@prismer/aip-sdk/dist/cli/credentials-5GGZEJFG.js +56 -0
  59. package/node_modules/@prismer/aip-sdk/dist/cli/delegation-3J35VGBZ.js +64 -0
  60. package/node_modules/@prismer/aip-sdk/dist/cli/identity-LXVWKSVB.js +7 -0
  61. package/node_modules/@prismer/aip-sdk/dist/cli/index.js +259 -0
  62. package/node_modules/@prismer/aip-sdk/dist/cli/resolver-TGOPKW52.js +26 -0
  63. package/node_modules/@prismer/aip-sdk/dist/index.cjs +368 -0
  64. package/node_modules/@prismer/aip-sdk/dist/index.d.cts +174 -0
  65. package/node_modules/@prismer/aip-sdk/dist/index.d.ts +174 -0
  66. package/node_modules/@prismer/aip-sdk/dist/index.js +322 -0
  67. package/node_modules/@prismer/aip-sdk/package.json +53 -0
  68. package/node_modules/ansi-regex/index.d.ts +37 -0
  69. package/node_modules/ansi-regex/index.js +10 -0
  70. package/node_modules/ansi-regex/license +9 -0
  71. package/node_modules/ansi-regex/package.json +55 -0
  72. package/node_modules/ansi-regex/readme.md +78 -0
  73. package/node_modules/camelcase/index.d.ts +63 -0
  74. package/node_modules/camelcase/index.js +76 -0
  75. package/node_modules/camelcase/license +9 -0
  76. package/node_modules/camelcase/package.json +43 -0
  77. package/node_modules/camelcase/readme.md +99 -0
  78. package/node_modules/cliui/LICENSE.txt +14 -0
  79. package/node_modules/cliui/README.md +115 -0
  80. package/node_modules/cliui/index.js +354 -0
  81. package/node_modules/cliui/package.json +65 -0
  82. package/node_modules/color-convert/LICENSE +21 -0
  83. package/node_modules/color-convert/README.md +68 -0
  84. package/node_modules/color-convert/conversions.js +839 -0
  85. package/node_modules/color-convert/index.js +81 -0
  86. package/node_modules/color-convert/package.json +48 -0
  87. package/node_modules/color-convert/route.js +97 -0
  88. package/node_modules/color-name/LICENSE +8 -0
  89. package/node_modules/color-name/README.md +11 -0
  90. package/node_modules/color-name/index.js +152 -0
  91. package/node_modules/color-name/package.json +28 -0
  92. package/node_modules/commander/LICENSE +22 -0
  93. package/node_modules/commander/Readme.md +1157 -0
  94. package/node_modules/commander/esm.mjs +16 -0
  95. package/node_modules/commander/index.js +24 -0
  96. package/node_modules/commander/lib/argument.js +149 -0
  97. package/node_modules/commander/lib/command.js +2509 -0
  98. package/node_modules/commander/lib/error.js +39 -0
  99. package/node_modules/commander/lib/help.js +520 -0
  100. package/node_modules/commander/lib/option.js +330 -0
  101. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  102. package/node_modules/commander/package-support.json +16 -0
  103. package/node_modules/commander/package.json +84 -0
  104. package/node_modules/commander/typings/esm.d.mts +3 -0
  105. package/node_modules/commander/typings/index.d.ts +969 -0
  106. package/node_modules/decamelize/index.js +13 -0
  107. package/node_modules/decamelize/license +21 -0
  108. package/node_modules/decamelize/package.json +38 -0
  109. package/node_modules/decamelize/readme.md +48 -0
  110. package/node_modules/dijkstrajs/.travis.yml +4 -0
  111. package/node_modules/dijkstrajs/CONTRIBUTING.md +8 -0
  112. package/node_modules/dijkstrajs/LICENSE.md +19 -0
  113. package/node_modules/dijkstrajs/README.md +18 -0
  114. package/node_modules/dijkstrajs/dijkstra.js +165 -0
  115. package/node_modules/dijkstrajs/package.json +60 -0
  116. package/node_modules/dijkstrajs/test/dijkstra.test.js +96 -0
  117. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  118. package/node_modules/emoji-regex/README.md +73 -0
  119. package/node_modules/emoji-regex/es2015/index.js +6 -0
  120. package/node_modules/emoji-regex/es2015/text.js +6 -0
  121. package/node_modules/emoji-regex/index.d.ts +23 -0
  122. package/node_modules/emoji-regex/index.js +6 -0
  123. package/node_modules/emoji-regex/package.json +50 -0
  124. package/node_modules/emoji-regex/text.js +6 -0
  125. package/node_modules/find-up/index.d.ts +137 -0
  126. package/node_modules/find-up/index.js +89 -0
  127. package/node_modules/find-up/license +9 -0
  128. package/node_modules/find-up/package.json +53 -0
  129. package/node_modules/find-up/readme.md +156 -0
  130. package/node_modules/get-caller-file/LICENSE.md +6 -0
  131. package/node_modules/get-caller-file/README.md +41 -0
  132. package/node_modules/get-caller-file/index.d.ts +2 -0
  133. package/node_modules/get-caller-file/index.js +22 -0
  134. package/node_modules/get-caller-file/index.js.map +1 -0
  135. package/node_modules/get-caller-file/package.json +42 -0
  136. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  137. package/node_modules/is-fullwidth-code-point/index.js +50 -0
  138. package/node_modules/is-fullwidth-code-point/license +9 -0
  139. package/node_modules/is-fullwidth-code-point/package.json +42 -0
  140. package/node_modules/is-fullwidth-code-point/readme.md +39 -0
  141. package/node_modules/locate-path/index.d.ts +83 -0
  142. package/node_modules/locate-path/index.js +65 -0
  143. package/node_modules/locate-path/license +9 -0
  144. package/node_modules/locate-path/package.json +45 -0
  145. package/node_modules/locate-path/readme.md +122 -0
  146. package/node_modules/p-locate/index.d.ts +64 -0
  147. package/node_modules/p-locate/index.js +52 -0
  148. package/node_modules/p-locate/license +9 -0
  149. package/node_modules/p-locate/node_modules/p-limit/index.d.ts +38 -0
  150. package/node_modules/p-locate/node_modules/p-limit/index.js +57 -0
  151. package/node_modules/p-locate/node_modules/p-limit/license +9 -0
  152. package/node_modules/p-locate/node_modules/p-limit/package.json +52 -0
  153. package/node_modules/p-locate/node_modules/p-limit/readme.md +101 -0
  154. package/node_modules/p-locate/package.json +53 -0
  155. package/node_modules/p-locate/readme.md +90 -0
  156. package/node_modules/p-try/index.d.ts +39 -0
  157. package/node_modules/p-try/index.js +9 -0
  158. package/node_modules/p-try/license +9 -0
  159. package/node_modules/p-try/package.json +42 -0
  160. package/node_modules/p-try/readme.md +58 -0
  161. package/node_modules/path-exists/index.d.ts +28 -0
  162. package/node_modules/path-exists/index.js +23 -0
  163. package/node_modules/path-exists/license +9 -0
  164. package/node_modules/path-exists/package.json +39 -0
  165. package/node_modules/path-exists/readme.md +52 -0
  166. package/node_modules/picocolors/LICENSE +15 -0
  167. package/node_modules/picocolors/README.md +21 -0
  168. package/node_modules/picocolors/package.json +25 -0
  169. package/node_modules/picocolors/picocolors.browser.js +4 -0
  170. package/node_modules/picocolors/picocolors.d.ts +5 -0
  171. package/node_modules/picocolors/picocolors.js +75 -0
  172. package/node_modules/picocolors/types.d.ts +51 -0
  173. package/node_modules/pngjs/.eslintignore +2 -0
  174. package/node_modules/pngjs/.eslintrc.json +19 -0
  175. package/node_modules/pngjs/.prettierignore +3 -0
  176. package/node_modules/pngjs/LICENSE +20 -0
  177. package/node_modules/pngjs/README.md +429 -0
  178. package/node_modules/pngjs/browser.js +16096 -0
  179. package/node_modules/pngjs/coverage/lcov-report/base.css +354 -0
  180. package/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +881 -0
  181. package/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +554 -0
  182. package/node_modules/pngjs/coverage/lcov-report/block-navigation.js +77 -0
  183. package/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +647 -0
  184. package/node_modules/pngjs/coverage/lcov-report/constants.js.html +176 -0
  185. package/node_modules/pngjs/coverage/lcov-report/crc.js.html +200 -0
  186. package/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
  187. package/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +593 -0
  188. package/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +152 -0
  189. package/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +143 -0
  190. package/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +611 -0
  191. package/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +359 -0
  192. package/node_modules/pngjs/coverage/lcov-report/index.html +426 -0
  193. package/node_modules/pngjs/coverage/lcov-report/interlace.js.html +365 -0
  194. package/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +230 -0
  195. package/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +248 -0
  196. package/node_modules/pngjs/coverage/lcov-report/packer.js.html +467 -0
  197. package/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +128 -0
  198. package/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +575 -0
  199. package/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +404 -0
  200. package/node_modules/pngjs/coverage/lcov-report/parser.js.html +950 -0
  201. package/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +116 -0
  202. package/node_modules/pngjs/coverage/lcov-report/png.js.html +662 -0
  203. package/node_modules/pngjs/coverage/lcov-report/prettify.css +101 -0
  204. package/node_modules/pngjs/coverage/lcov-report/prettify.js +1007 -0
  205. package/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  206. package/node_modules/pngjs/coverage/lcov-report/sorter.js +169 -0
  207. package/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +584 -0
  208. package/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +215 -0
  209. package/node_modules/pngjs/coverage/lcov.info +2177 -0
  210. package/node_modules/pngjs/lib/bitmapper.js +267 -0
  211. package/node_modules/pngjs/lib/bitpacker.js +158 -0
  212. package/node_modules/pngjs/lib/chunkstream.js +189 -0
  213. package/node_modules/pngjs/lib/constants.js +32 -0
  214. package/node_modules/pngjs/lib/crc.js +40 -0
  215. package/node_modules/pngjs/lib/filter-pack.js +171 -0
  216. package/node_modules/pngjs/lib/filter-parse-async.js +24 -0
  217. package/node_modules/pngjs/lib/filter-parse-sync.js +21 -0
  218. package/node_modules/pngjs/lib/filter-parse.js +177 -0
  219. package/node_modules/pngjs/lib/format-normaliser.js +93 -0
  220. package/node_modules/pngjs/lib/interlace.js +95 -0
  221. package/node_modules/pngjs/lib/packer-async.js +50 -0
  222. package/node_modules/pngjs/lib/packer-sync.js +56 -0
  223. package/node_modules/pngjs/lib/packer.js +129 -0
  224. package/node_modules/pngjs/lib/paeth-predictor.js +16 -0
  225. package/node_modules/pngjs/lib/parser-async.js +165 -0
  226. package/node_modules/pngjs/lib/parser-sync.js +108 -0
  227. package/node_modules/pngjs/lib/parser.js +290 -0
  228. package/node_modules/pngjs/lib/png-sync.js +12 -0
  229. package/node_modules/pngjs/lib/png.js +194 -0
  230. package/node_modules/pngjs/lib/sync-inflate.js +168 -0
  231. package/node_modules/pngjs/lib/sync-reader.js +45 -0
  232. package/node_modules/pngjs/package.json +73 -0
  233. package/node_modules/qrcode/README.md +770 -0
  234. package/node_modules/qrcode/bin/qrcode +159 -0
  235. package/node_modules/qrcode/helper/to-sjis-browser.js +2 -0
  236. package/node_modules/qrcode/helper/to-sjis.js +105 -0
  237. package/node_modules/qrcode/lib/browser.js +76 -0
  238. package/node_modules/qrcode/lib/can-promise.js +7 -0
  239. package/node_modules/qrcode/lib/core/alignment-pattern.js +83 -0
  240. package/node_modules/qrcode/lib/core/alphanumeric-data.js +59 -0
  241. package/node_modules/qrcode/lib/core/bit-buffer.js +37 -0
  242. package/node_modules/qrcode/lib/core/bit-matrix.js +65 -0
  243. package/node_modules/qrcode/lib/core/byte-data.js +30 -0
  244. package/node_modules/qrcode/lib/core/error-correction-code.js +135 -0
  245. package/node_modules/qrcode/lib/core/error-correction-level.js +50 -0
  246. package/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
  247. package/node_modules/qrcode/lib/core/format-info.js +29 -0
  248. package/node_modules/qrcode/lib/core/galois-field.js +69 -0
  249. package/node_modules/qrcode/lib/core/kanji-data.js +54 -0
  250. package/node_modules/qrcode/lib/core/mask-pattern.js +234 -0
  251. package/node_modules/qrcode/lib/core/mode.js +167 -0
  252. package/node_modules/qrcode/lib/core/numeric-data.js +43 -0
  253. package/node_modules/qrcode/lib/core/polynomial.js +62 -0
  254. package/node_modules/qrcode/lib/core/qrcode.js +495 -0
  255. package/node_modules/qrcode/lib/core/reed-solomon-encoder.js +56 -0
  256. package/node_modules/qrcode/lib/core/regex.js +31 -0
  257. package/node_modules/qrcode/lib/core/segments.js +330 -0
  258. package/node_modules/qrcode/lib/core/utils.js +63 -0
  259. package/node_modules/qrcode/lib/core/version-check.js +9 -0
  260. package/node_modules/qrcode/lib/core/version.js +163 -0
  261. package/node_modules/qrcode/lib/index.js +12 -0
  262. package/node_modules/qrcode/lib/renderer/canvas.js +63 -0
  263. package/node_modules/qrcode/lib/renderer/png.js +78 -0
  264. package/node_modules/qrcode/lib/renderer/svg-tag.js +81 -0
  265. package/node_modules/qrcode/lib/renderer/svg.js +19 -0
  266. package/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +85 -0
  267. package/node_modules/qrcode/lib/renderer/terminal/terminal.js +49 -0
  268. package/node_modules/qrcode/lib/renderer/terminal.js +9 -0
  269. package/node_modules/qrcode/lib/renderer/utf8.js +71 -0
  270. package/node_modules/qrcode/lib/renderer/utils.js +99 -0
  271. package/node_modules/qrcode/lib/server.js +138 -0
  272. package/node_modules/qrcode/license +10 -0
  273. package/node_modules/qrcode/package.json +77 -0
  274. package/node_modules/require-directory/.jshintrc +67 -0
  275. package/node_modules/require-directory/.npmignore +1 -0
  276. package/node_modules/require-directory/.travis.yml +3 -0
  277. package/node_modules/require-directory/LICENSE +22 -0
  278. package/node_modules/require-directory/README.markdown +184 -0
  279. package/node_modules/require-directory/index.js +86 -0
  280. package/node_modules/require-directory/package.json +40 -0
  281. package/node_modules/require-main-filename/LICENSE.txt +14 -0
  282. package/node_modules/require-main-filename/README.md +26 -0
  283. package/node_modules/require-main-filename/index.js +18 -0
  284. package/node_modules/require-main-filename/package.json +35 -0
  285. package/node_modules/set-blocking/LICENSE.txt +14 -0
  286. package/node_modules/set-blocking/README.md +31 -0
  287. package/node_modules/set-blocking/index.js +7 -0
  288. package/node_modules/set-blocking/package.json +42 -0
  289. package/node_modules/sisteransi/license +21 -0
  290. package/node_modules/sisteransi/package.json +34 -0
  291. package/node_modules/sisteransi/readme.md +113 -0
  292. package/node_modules/sisteransi/src/index.js +58 -0
  293. package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  294. package/node_modules/string-width/index.d.ts +29 -0
  295. package/node_modules/string-width/index.js +47 -0
  296. package/node_modules/string-width/license +9 -0
  297. package/node_modules/string-width/package.json +56 -0
  298. package/node_modules/string-width/readme.md +50 -0
  299. package/node_modules/strip-ansi/index.d.ts +17 -0
  300. package/node_modules/strip-ansi/index.js +4 -0
  301. package/node_modules/strip-ansi/license +9 -0
  302. package/node_modules/strip-ansi/package.json +54 -0
  303. package/node_modules/strip-ansi/readme.md +46 -0
  304. package/node_modules/which-module/LICENSE +13 -0
  305. package/node_modules/which-module/README.md +58 -0
  306. package/node_modules/which-module/index.js +9 -0
  307. package/node_modules/which-module/package.json +41 -0
  308. package/node_modules/wrap-ansi/index.js +186 -0
  309. package/node_modules/wrap-ansi/license +9 -0
  310. package/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts +345 -0
  311. package/node_modules/wrap-ansi/node_modules/ansi-styles/index.js +163 -0
  312. package/node_modules/wrap-ansi/node_modules/ansi-styles/license +9 -0
  313. package/node_modules/wrap-ansi/node_modules/ansi-styles/package.json +56 -0
  314. package/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md +152 -0
  315. package/node_modules/wrap-ansi/package.json +61 -0
  316. package/node_modules/wrap-ansi/readme.md +97 -0
  317. package/node_modules/y18n/LICENSE +13 -0
  318. package/node_modules/y18n/README.md +109 -0
  319. package/node_modules/y18n/index.js +188 -0
  320. package/node_modules/y18n/package.json +39 -0
  321. package/node_modules/yargs/LICENSE +21 -0
  322. package/node_modules/yargs/README.md +140 -0
  323. package/node_modules/yargs/build/lib/apply-extends.d.ts +2 -0
  324. package/node_modules/yargs/build/lib/apply-extends.js +65 -0
  325. package/node_modules/yargs/build/lib/argsert.d.ts +2 -0
  326. package/node_modules/yargs/build/lib/argsert.js +65 -0
  327. package/node_modules/yargs/build/lib/command.d.ts +64 -0
  328. package/node_modules/yargs/build/lib/command.js +416 -0
  329. package/node_modules/yargs/build/lib/common-types.d.ts +36 -0
  330. package/node_modules/yargs/build/lib/common-types.js +25 -0
  331. package/node_modules/yargs/build/lib/completion-templates.d.ts +2 -0
  332. package/node_modules/yargs/build/lib/completion-templates.js +50 -0
  333. package/node_modules/yargs/build/lib/completion.d.ts +21 -0
  334. package/node_modules/yargs/build/lib/completion.js +135 -0
  335. package/node_modules/yargs/build/lib/is-promise.d.ts +1 -0
  336. package/node_modules/yargs/build/lib/is-promise.js +9 -0
  337. package/node_modules/yargs/build/lib/levenshtein.d.ts +1 -0
  338. package/node_modules/yargs/build/lib/levenshtein.js +58 -0
  339. package/node_modules/yargs/build/lib/middleware.d.ts +10 -0
  340. package/node_modules/yargs/build/lib/middleware.js +57 -0
  341. package/node_modules/yargs/build/lib/obj-filter.d.ts +1 -0
  342. package/node_modules/yargs/build/lib/obj-filter.js +14 -0
  343. package/node_modules/yargs/build/lib/parse-command.d.ts +11 -0
  344. package/node_modules/yargs/build/lib/parse-command.js +36 -0
  345. package/node_modules/yargs/build/lib/process-argv.d.ts +2 -0
  346. package/node_modules/yargs/build/lib/process-argv.js +31 -0
  347. package/node_modules/yargs/build/lib/usage.d.ts +49 -0
  348. package/node_modules/yargs/build/lib/usage.js +540 -0
  349. package/node_modules/yargs/build/lib/validation.d.ts +34 -0
  350. package/node_modules/yargs/build/lib/validation.js +330 -0
  351. package/node_modules/yargs/build/lib/yargs.d.ts +274 -0
  352. package/node_modules/yargs/build/lib/yargs.js +1190 -0
  353. package/node_modules/yargs/build/lib/yerror.d.ts +4 -0
  354. package/node_modules/yargs/build/lib/yerror.js +11 -0
  355. package/node_modules/yargs/index.js +40 -0
  356. package/node_modules/yargs/locales/be.json +46 -0
  357. package/node_modules/yargs/locales/de.json +46 -0
  358. package/node_modules/yargs/locales/en.json +51 -0
  359. package/node_modules/yargs/locales/es.json +46 -0
  360. package/node_modules/yargs/locales/fi.json +49 -0
  361. package/node_modules/yargs/locales/fr.json +53 -0
  362. package/node_modules/yargs/locales/hi.json +49 -0
  363. package/node_modules/yargs/locales/hu.json +46 -0
  364. package/node_modules/yargs/locales/id.json +50 -0
  365. package/node_modules/yargs/locales/it.json +46 -0
  366. package/node_modules/yargs/locales/ja.json +51 -0
  367. package/node_modules/yargs/locales/ko.json +49 -0
  368. package/node_modules/yargs/locales/nb.json +44 -0
  369. package/node_modules/yargs/locales/nl.json +49 -0
  370. package/node_modules/yargs/locales/nn.json +44 -0
  371. package/node_modules/yargs/locales/pirate.json +13 -0
  372. package/node_modules/yargs/locales/pl.json +49 -0
  373. package/node_modules/yargs/locales/pt.json +45 -0
  374. package/node_modules/yargs/locales/pt_BR.json +48 -0
  375. package/node_modules/yargs/locales/ru.json +46 -0
  376. package/node_modules/yargs/locales/th.json +46 -0
  377. package/node_modules/yargs/locales/tr.json +48 -0
  378. package/node_modules/yargs/locales/zh_CN.json +48 -0
  379. package/node_modules/yargs/locales/zh_TW.json +47 -0
  380. package/node_modules/yargs/package.json +92 -0
  381. package/node_modules/yargs/yargs.js +14 -0
  382. package/node_modules/yargs-parser/LICENSE.txt +14 -0
  383. package/node_modules/yargs-parser/README.md +449 -0
  384. package/node_modules/yargs-parser/index.js +1032 -0
  385. package/node_modules/yargs-parser/lib/tokenize-arg-string.js +40 -0
  386. package/node_modules/yargs-parser/package.json +46 -0
  387. package/package.json +28 -5
@@ -0,0 +1,80 @@
1
+ import{stripVTControlCharacters as T}from"node:util";import{TextPrompt as F,PasswordPrompt as q,ConfirmPrompt as D,SelectPrompt as U,SelectKeyPrompt as J,MultiSelectPrompt as K,GroupMultiSelectPrompt as Y,isCancel as z,block as Q}from"@clack/core";export{isCancel,updateSettings}from"@clack/core";import p from"node:process";import e from"picocolors";import{cursor as Z,erase as H}from"sisteransi";function X(){return p.platform!=="win32"?p.env.TERM!=="linux":!!p.env.CI||!!p.env.WT_SESSION||!!p.env.TERMINUS_SUBLIME||p.env.ConEmuTask==="{cmd::Cmder}"||p.env.TERM_PROGRAM==="Terminus-Sublime"||p.env.TERM_PROGRAM==="vscode"||p.env.TERM==="xterm-256color"||p.env.TERM==="alacritty"||p.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const E=X(),u=(s,n)=>E?s:n,ee=u("\u25C6","*"),A=u("\u25A0","x"),B=u("\u25B2","x"),S=u("\u25C7","o"),te=u("\u250C","T"),a=u("\u2502","|"),m=u("\u2514","\u2014"),j=u("\u25CF",">"),R=u("\u25CB"," "),V=u("\u25FB","[\u2022]"),M=u("\u25FC","[+]"),G=u("\u25FB","[ ]"),se=u("\u25AA","\u2022"),N=u("\u2500","-"),re=u("\u256E","+"),ie=u("\u251C","+"),ne=u("\u256F","+"),ae=u("\u25CF","\u2022"),oe=u("\u25C6","*"),ce=u("\u25B2","!"),le=u("\u25A0","x"),y=s=>{switch(s){case"initial":case"active":return e.cyan(ee);case"cancel":return e.red(A);case"error":return e.yellow(B);case"submit":return e.green(S)}},k=s=>{const{cursor:n,options:t,style:i}=s,r=s.maxItems??Number.POSITIVE_INFINITY,c=Math.max(process.stdout.rows-4,0),o=Math.min(c,Math.max(r,5));let l=0;n>=l+o-3?l=Math.max(Math.min(n-o+3,t.length-o),0):n<l+2&&(l=Math.max(n-2,0));const $=o<t.length&&l>0,d=o<t.length&&l+o<t.length;return t.slice(l,l+o).map((w,b,C)=>{const I=b===0&&$,x=b===C.length-1&&d;return I||x?e.dim("..."):i(w,b+l===n)})},ue=s=>new F({validate:s.validate,placeholder:s.placeholder,defaultValue:s.defaultValue,initialValue:s.initialValue,render(){const n=`${e.gray(a)}
2
+ ${y(this.state)} ${s.message}
3
+ `,t=s.placeholder?e.inverse(s.placeholder[0])+e.dim(s.placeholder.slice(1)):e.inverse(e.hidden("_")),i=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${n.trim()}
4
+ ${e.yellow(a)} ${i}
5
+ ${e.yellow(m)} ${e.yellow(this.error)}
6
+ `;case"submit":return`${n}${e.gray(a)} ${e.dim(this.value||s.placeholder)}`;case"cancel":return`${n}${e.gray(a)} ${e.strikethrough(e.dim(this.value??""))}${this.value?.trim()?`
7
+ ${e.gray(a)}`:""}`;default:return`${n}${e.cyan(a)} ${i}
8
+ ${e.cyan(m)}
9
+ `}}}).prompt(),$e=s=>new q({validate:s.validate,mask:s.mask??se,render(){const n=`${e.gray(a)}
10
+ ${y(this.state)} ${s.message}
11
+ `,t=this.valueWithCursor,i=this.masked;switch(this.state){case"error":return`${n.trim()}
12
+ ${e.yellow(a)} ${i}
13
+ ${e.yellow(m)} ${e.yellow(this.error)}
14
+ `;case"submit":return`${n}${e.gray(a)} ${e.dim(i)}`;case"cancel":return`${n}${e.gray(a)} ${e.strikethrough(e.dim(i??""))}${i?`
15
+ ${e.gray(a)}`:""}`;default:return`${n}${e.cyan(a)} ${t}
16
+ ${e.cyan(m)}
17
+ `}}}).prompt(),me=s=>{const n=s.active??"Yes",t=s.inactive??"No";return new D({active:n,inactive:t,initialValue:s.initialValue??!0,render(){const i=`${e.gray(a)}
18
+ ${y(this.state)} ${s.message}
19
+ `,r=this.value?n:t;switch(this.state){case"submit":return`${i}${e.gray(a)} ${e.dim(r)}`;case"cancel":return`${i}${e.gray(a)} ${e.strikethrough(e.dim(r))}
20
+ ${e.gray(a)}`;default:return`${i}${e.cyan(a)} ${this.value?`${e.green(j)} ${n}`:`${e.dim(R)} ${e.dim(n)}`} ${e.dim("/")} ${this.value?`${e.dim(R)} ${e.dim(t)}`:`${e.green(j)} ${t}`}
21
+ ${e.cyan(m)}
22
+ `}}}).prompt()},de=s=>{const n=(t,i)=>{const r=t.label??String(t.value);switch(i){case"selected":return`${e.dim(r)}`;case"active":return`${e.green(j)} ${r} ${t.hint?e.dim(`(${t.hint})`):""}`;case"cancelled":return`${e.strikethrough(e.dim(r))}`;default:return`${e.dim(R)} ${e.dim(r)}`}};return new U({options:s.options,initialValue:s.initialValue,render(){const t=`${e.gray(a)}
23
+ ${y(this.state)} ${s.message}
24
+ `;switch(this.state){case"submit":return`${t}${e.gray(a)} ${n(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${e.gray(a)} ${n(this.options[this.cursor],"cancelled")}
25
+ ${e.gray(a)}`;default:return`${t}${e.cyan(a)} ${k({cursor:this.cursor,options:this.options,maxItems:s.maxItems,style:(i,r)=>n(i,r?"active":"inactive")}).join(`
26
+ ${e.cyan(a)} `)}
27
+ ${e.cyan(m)}
28
+ `}}}).prompt()},he=s=>{const n=(t,i="inactive")=>{const r=t.label??String(t.value);return i==="selected"?`${e.dim(r)}`:i==="cancelled"?`${e.strikethrough(e.dim(r))}`:i==="active"?`${e.bgCyan(e.gray(` ${t.value} `))} ${r} ${t.hint?e.dim(`(${t.hint})`):""}`:`${e.gray(e.bgWhite(e.inverse(` ${t.value} `)))} ${r} ${t.hint?e.dim(`(${t.hint})`):""}`};return new J({options:s.options,initialValue:s.initialValue,render(){const t=`${e.gray(a)}
29
+ ${y(this.state)} ${s.message}
30
+ `;switch(this.state){case"submit":return`${t}${e.gray(a)} ${n(this.options.find(i=>i.value===this.value)??s.options[0],"selected")}`;case"cancel":return`${t}${e.gray(a)} ${n(this.options[0],"cancelled")}
31
+ ${e.gray(a)}`;default:return`${t}${e.cyan(a)} ${this.options.map((i,r)=>n(i,r===this.cursor?"active":"inactive")).join(`
32
+ ${e.cyan(a)} `)}
33
+ ${e.cyan(m)}
34
+ `}}}).prompt()},pe=s=>{const n=(t,i)=>{const r=t.label??String(t.value);return i==="active"?`${e.cyan(V)} ${r} ${t.hint?e.dim(`(${t.hint})`):""}`:i==="selected"?`${e.green(M)} ${e.dim(r)}`:i==="cancelled"?`${e.strikethrough(e.dim(r))}`:i==="active-selected"?`${e.green(M)} ${r} ${t.hint?e.dim(`(${t.hint})`):""}`:i==="submitted"?`${e.dim(r)}`:`${e.dim(G)} ${e.dim(r)}`};return new K({options:s.options,initialValues:s.initialValues,required:s.required??!0,cursorAt:s.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
35
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){const t=`${e.gray(a)}
36
+ ${y(this.state)} ${s.message}
37
+ `,i=(r,c)=>{const o=this.value.includes(r.value);return c&&o?n(r,"active-selected"):o?n(r,"selected"):n(r,c?"active":"inactive")};switch(this.state){case"submit":return`${t}${e.gray(a)} ${this.options.filter(({value:r})=>this.value.includes(r)).map(r=>n(r,"submitted")).join(e.dim(", "))||e.dim("none")}`;case"cancel":{const r=this.options.filter(({value:c})=>this.value.includes(c)).map(c=>n(c,"cancelled")).join(e.dim(", "));return`${t}${e.gray(a)} ${r.trim()?`${r}
38
+ ${e.gray(a)}`:""}`}case"error":{const r=this.error.split(`
39
+ `).map((c,o)=>o===0?`${e.yellow(m)} ${e.yellow(c)}`:` ${c}`).join(`
40
+ `);return`${t+e.yellow(a)} ${k({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:i}).join(`
41
+ ${e.yellow(a)} `)}
42
+ ${r}
43
+ `}default:return`${t}${e.cyan(a)} ${k({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:i}).join(`
44
+ ${e.cyan(a)} `)}
45
+ ${e.cyan(m)}
46
+ `}}}).prompt()},ge=s=>{const n=(t,i,r=[])=>{const c=t.label??String(t.value),o=typeof t.group=="string",l=o&&(r[r.indexOf(t)+1]??{group:!0}),$=o&&l.group===!0,d=o?`${$?m:a} `:"";return i==="active"?`${e.dim(d)}${e.cyan(V)} ${c} ${t.hint?e.dim(`(${t.hint})`):""}`:i==="group-active"?`${d}${e.cyan(V)} ${e.dim(c)}`:i==="group-active-selected"?`${d}${e.green(M)} ${e.dim(c)}`:i==="selected"?`${e.dim(d)}${e.green(M)} ${e.dim(c)}`:i==="cancelled"?`${e.strikethrough(e.dim(c))}`:i==="active-selected"?`${e.dim(d)}${e.green(M)} ${c} ${t.hint?e.dim(`(${t.hint})`):""}`:i==="submitted"?`${e.dim(c)}`:`${e.dim(d)}${e.dim(G)} ${e.dim(c)}`};return new Y({options:s.options,initialValues:s.initialValues,required:s.required??!0,cursorAt:s.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
47
+ ${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){const t=`${e.gray(a)}
48
+ ${y(this.state)} ${s.message}
49
+ `;switch(this.state){case"submit":return`${t}${e.gray(a)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>n(i,"submitted")).join(e.dim(", "))}`;case"cancel":{const i=this.options.filter(({value:r})=>this.value.includes(r)).map(r=>n(r,"cancelled")).join(e.dim(", "));return`${t}${e.gray(a)} ${i.trim()?`${i}
50
+ ${e.gray(a)}`:""}`}case"error":{const i=this.error.split(`
51
+ `).map((r,c)=>c===0?`${e.yellow(m)} ${e.yellow(r)}`:` ${r}`).join(`
52
+ `);return`${t}${e.yellow(a)} ${this.options.map((r,c,o)=>{const l=this.value.includes(r.value)||r.group===!0&&this.isGroupSelected(`${r.value}`),$=c===this.cursor;return!$&&typeof r.group=="string"&&this.options[this.cursor].value===r.group?n(r,l?"group-active-selected":"group-active",o):$&&l?n(r,"active-selected",o):l?n(r,"selected",o):n(r,$?"active":"inactive",o)}).join(`
53
+ ${e.yellow(a)} `)}
54
+ ${i}
55
+ `}default:return`${t}${e.cyan(a)} ${this.options.map((i,r,c)=>{const o=this.value.includes(i.value)||i.group===!0&&this.isGroupSelected(`${i.value}`),l=r===this.cursor;return!l&&typeof i.group=="string"&&this.options[this.cursor].value===i.group?n(i,o?"group-active-selected":"group-active",c):l&&o?n(i,"active-selected",c):o?n(i,"selected",c):n(i,l?"active":"inactive",c)}).join(`
56
+ ${e.cyan(a)} `)}
57
+ ${e.cyan(m)}
58
+ `}}}).prompt()},ye=(s="",n="")=>{const t=`
59
+ ${s}
60
+ `.split(`
61
+ `),i=T(n).length,r=Math.max(t.reduce((o,l)=>{const $=T(l);return $.length>o?$.length:o},0),i)+2,c=t.map(o=>`${e.gray(a)} ${e.dim(o)}${" ".repeat(r-T(o).length)}${e.gray(a)}`).join(`
62
+ `);process.stdout.write(`${e.gray(a)}
63
+ ${e.green(S)} ${e.reset(n)} ${e.gray(N.repeat(Math.max(r-i-1,1))+re)}
64
+ ${c}
65
+ ${e.gray(ie+N.repeat(r+2)+ne)}
66
+ `)},ve=(s="")=>{process.stdout.write(`${e.gray(m)} ${e.red(s)}
67
+
68
+ `)},we=(s="")=>{process.stdout.write(`${e.gray(te)} ${s}
69
+ `)},fe=(s="")=>{process.stdout.write(`${e.gray(a)}
70
+ ${e.gray(m)} ${s}
71
+
72
+ `)},v={message:(s="",{symbol:n=e.gray(a)}={})=>{const t=[`${e.gray(a)}`];if(s){const[i,...r]=s.split(`
73
+ `);t.push(`${n} ${i}`,...r.map(c=>`${e.gray(a)} ${c}`))}process.stdout.write(`${t.join(`
74
+ `)}
75
+ `)},info:s=>{v.message(s,{symbol:e.blue(ae)})},success:s=>{v.message(s,{symbol:e.green(oe)})},step:s=>{v.message(s,{symbol:e.green(S)})},warn:s=>{v.message(s,{symbol:e.yellow(ce)})},warning:s=>{v.warn(s)},error:s=>{v.message(s,{symbol:e.red(le)})}},L=()=>{const s=E?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],n=E?80:120,t=process.env.CI==="true";let i,r,c=!1,o="",l;const $=h=>{const g=h>1?"Something went wrong":"Canceled";c&&P(g,h)},d=()=>$(2),w=()=>$(1),b=()=>{process.on("uncaughtExceptionMonitor",d),process.on("unhandledRejection",d),process.on("SIGINT",w),process.on("SIGTERM",w),process.on("exit",$)},C=()=>{process.removeListener("uncaughtExceptionMonitor",d),process.removeListener("unhandledRejection",d),process.removeListener("SIGINT",w),process.removeListener("SIGTERM",w),process.removeListener("exit",$)},I=()=>{if(l===void 0)return;t&&process.stdout.write(`
76
+ `);const h=l.split(`
77
+ `);process.stdout.write(Z.move(-999,h.length-1)),process.stdout.write(H.down(h.length))},x=h=>h.replace(/\.+$/,""),O=(h="")=>{c=!0,i=Q(),o=x(h),process.stdout.write(`${e.gray(a)}
78
+ `);let g=0,f=0;b(),r=setInterval(()=>{if(t&&o===l)return;I(),l=o;const W=e.magenta(s[g]),_=t?"...":".".repeat(Math.floor(f)).slice(0,3);process.stdout.write(`${W} ${o}${_}`),g=g+1<s.length?g+1:0,f=f<s.length?f+.125:0},n)},P=(h="",g=0)=>{c=!1,clearInterval(r),I();const f=g===0?e.green(S):g===1?e.red(A):e.red(B);o=x(h??o),process.stdout.write(`${f} ${o}
79
+ `),C(),i()};return{start:O,stop:P,message:(h="")=>{o=x(h??o)}}},be=async(s,n)=>{const t={},i=Object.keys(s);for(const r of i){const c=s[r],o=await c({results:t})?.catch(l=>{throw l});if(typeof n?.onCancel=="function"&&z(o)){t[r]="canceled",n.onCancel({results:t});continue}t[r]=o}return t},xe=async s=>{for(const n of s){if(n.enabled===!1)continue;const t=L();t.start(n.title);const i=await n.task(t.message);t.stop(i||n.title)}};export{ve as cancel,me as confirm,be as group,ge as groupMultiselect,we as intro,v as log,pe as multiselect,ye as note,fe as outro,$e as password,de as select,he as selectKey,L as spinner,xe as tasks,ue as text};
80
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tif (process.platform !== 'win32') {\n\t\treturn process.env.TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(process.env.CI)\n\t\t|| Boolean(process.env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| process.env.TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| process.env.TERM_PROGRAM === 'vscode'\n\t\t|| process.env.TERM === 'xterm-256color'\n\t\t|| process.env.TERM === 'alacritty'\n\t\t|| process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import { stripVTControlCharacters as strip } from 'node:util';\nimport {\n\tConfirmPrompt,\n\tGroupMultiSelectPrompt,\n\tMultiSelectPrompt,\n\tPasswordPrompt,\n\tSelectKeyPrompt,\n\tSelectPrompt,\n\ttype State,\n\tTextPrompt,\n\tblock,\n\tisCancel,\n} from '@clack/core';\nimport isUnicodeSupported from 'is-unicode-supported';\nimport color from 'picocolors';\nimport { cursor, erase } from 'sisteransi';\n\nexport { isCancel } from '@clack/core';\nexport { updateSettings, type ClackSettings } from '@clack/core';\n\nconst unicode = isUnicodeSupported();\nconst s = (c: string, fallback: string) => (unicode ? c : fallback);\nconst S_STEP_ACTIVE = s('◆', '*');\nconst S_STEP_CANCEL = s('■', 'x');\nconst S_STEP_ERROR = s('▲', 'x');\nconst S_STEP_SUBMIT = s('◇', 'o');\n\nconst S_BAR_START = s('┌', 'T');\nconst S_BAR = s('│', '|');\nconst S_BAR_END = s('└', '—');\n\nconst S_RADIO_ACTIVE = s('●', '>');\nconst S_RADIO_INACTIVE = s('○', ' ');\nconst S_CHECKBOX_ACTIVE = s('◻', '[•]');\nconst S_CHECKBOX_SELECTED = s('◼', '[+]');\nconst S_CHECKBOX_INACTIVE = s('◻', '[ ]');\nconst S_PASSWORD_MASK = s('▪', '•');\n\nconst S_BAR_H = s('─', '-');\nconst S_CORNER_TOP_RIGHT = s('╮', '+');\nconst S_CONNECT_LEFT = s('├', '+');\nconst S_CORNER_BOTTOM_RIGHT = s('╯', '+');\n\nconst S_INFO = s('●', '•');\nconst S_SUCCESS = s('◆', '*');\nconst S_WARN = s('▲', '!');\nconst S_ERROR = s('■', 'x');\n\nconst symbol = (state: State) => {\n\tswitch (state) {\n\t\tcase 'initial':\n\t\tcase 'active':\n\t\t\treturn color.cyan(S_STEP_ACTIVE);\n\t\tcase 'cancel':\n\t\t\treturn color.red(S_STEP_CANCEL);\n\t\tcase 'error':\n\t\t\treturn color.yellow(S_STEP_ERROR);\n\t\tcase 'submit':\n\t\t\treturn color.green(S_STEP_SUBMIT);\n\t}\n};\n\ninterface LimitOptionsParams<TOption> {\n\toptions: TOption[];\n\tmaxItems: number | undefined;\n\tcursor: number;\n\tstyle: (option: TOption, active: boolean) => string;\n}\n\nconst limitOptions = <TOption>(params: LimitOptionsParams<TOption>): string[] => {\n\tconst { cursor, options, style } = params;\n\n\tconst paramMaxItems = params.maxItems ?? Number.POSITIVE_INFINITY;\n\tconst outputMaxItems = Math.max(process.stdout.rows - 4, 0);\n\t// We clamp to minimum 5 because anything less doesn't make sense UX wise\n\tconst maxItems = Math.min(outputMaxItems, Math.max(paramMaxItems, 5));\n\tlet slidingWindowLocation = 0;\n\n\tif (cursor >= slidingWindowLocation + maxItems - 3) {\n\t\tslidingWindowLocation = Math.max(Math.min(cursor - maxItems + 3, options.length - maxItems), 0);\n\t} else if (cursor < slidingWindowLocation + 2) {\n\t\tslidingWindowLocation = Math.max(cursor - 2, 0);\n\t}\n\n\tconst shouldRenderTopEllipsis = maxItems < options.length && slidingWindowLocation > 0;\n\tconst shouldRenderBottomEllipsis =\n\t\tmaxItems < options.length && slidingWindowLocation + maxItems < options.length;\n\n\treturn options\n\t\t.slice(slidingWindowLocation, slidingWindowLocation + maxItems)\n\t\t.map((option, i, arr) => {\n\t\t\tconst isTopLimit = i === 0 && shouldRenderTopEllipsis;\n\t\t\tconst isBottomLimit = i === arr.length - 1 && shouldRenderBottomEllipsis;\n\t\t\treturn isTopLimit || isBottomLimit\n\t\t\t\t? color.dim('...')\n\t\t\t\t: style(option, i + slidingWindowLocation === cursor);\n\t\t});\n};\n\nexport interface TextOptions {\n\tmessage: string;\n\tplaceholder?: string;\n\tdefaultValue?: string;\n\tinitialValue?: string;\n\tvalidate?: (value: string) => string | Error | undefined;\n}\nexport const text = (opts: TextOptions) => {\n\treturn new TextPrompt({\n\t\tvalidate: opts.validate,\n\t\tplaceholder: opts.placeholder,\n\t\tdefaultValue: opts.defaultValue,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst placeholder = opts.placeholder\n\t\t\t\t? color.inverse(opts.placeholder[0]) + color.dim(opts.placeholder.slice(1))\n\t\t\t\t: color.inverse(color.hidden('_'));\n\t\t\tconst value = !this.value ? placeholder : this.valueWithCursor;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'error':\n\t\t\t\t\treturn `${title.trim()}\\n${color.yellow(S_BAR)} ${value}\\n${color.yellow(\n\t\t\t\t\t\tS_BAR_END\n\t\t\t\t\t)} ${color.yellow(this.error)}\\n`;\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(this.value || opts.placeholder)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(\n\t\t\t\t\t\tcolor.dim(this.value ?? '')\n\t\t\t\t\t)}${this.value?.trim() ? `\\n${color.gray(S_BAR)}` : ''}`;\n\t\t\t\tdefault:\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${value}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<string | symbol>;\n};\n\nexport interface PasswordOptions {\n\tmessage: string;\n\tmask?: string;\n\tvalidate?: (value: string) => string | Error | undefined;\n}\nexport const password = (opts: PasswordOptions) => {\n\treturn new PasswordPrompt({\n\t\tvalidate: opts.validate,\n\t\tmask: opts.mask ?? S_PASSWORD_MASK,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst value = this.valueWithCursor;\n\t\t\tconst masked = this.masked;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'error':\n\t\t\t\t\treturn `${title.trim()}\\n${color.yellow(S_BAR)} ${masked}\\n${color.yellow(\n\t\t\t\t\t\tS_BAR_END\n\t\t\t\t\t)} ${color.yellow(this.error)}\\n`;\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(masked)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(color.dim(masked ?? ''))}${\n\t\t\t\t\t\tmasked ? `\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\tdefault:\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${value}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<string | symbol>;\n};\n\nexport interface ConfirmOptions {\n\tmessage: string;\n\tactive?: string;\n\tinactive?: string;\n\tinitialValue?: boolean;\n}\nexport const confirm = (opts: ConfirmOptions) => {\n\tconst active = opts.active ?? 'Yes';\n\tconst inactive = opts.inactive ?? 'No';\n\treturn new ConfirmPrompt({\n\t\tactive,\n\t\tinactive,\n\t\tinitialValue: opts.initialValue ?? true,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst value = this.value ? active : inactive;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(value)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(\n\t\t\t\t\t\tcolor.dim(value)\n\t\t\t\t\t)}\\n${color.gray(S_BAR)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${\n\t\t\t\t\t\tthis.value\n\t\t\t\t\t\t\t? `${color.green(S_RADIO_ACTIVE)} ${active}`\n\t\t\t\t\t\t\t: `${color.dim(S_RADIO_INACTIVE)} ${color.dim(active)}`\n\t\t\t\t\t} ${color.dim('/')} ${\n\t\t\t\t\t\t!this.value\n\t\t\t\t\t\t\t? `${color.green(S_RADIO_ACTIVE)} ${inactive}`\n\t\t\t\t\t\t\t: `${color.dim(S_RADIO_INACTIVE)} ${color.dim(inactive)}`\n\t\t\t\t\t}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<boolean | symbol>;\n};\n\ntype Primitive = Readonly<string | boolean | number>;\n\nexport type Option<Value> = Value extends Primitive\n\t? {\n\t\t\t/**\n\t\t\t * Internal data for this option.\n\t\t\t */\n\t\t\tvalue: Value;\n\t\t\t/**\n\t\t\t * The optional, user-facing text for this option.\n\t\t\t *\n\t\t\t * By default, the `value` is converted to a string.\n\t\t\t */\n\t\t\tlabel?: string;\n\t\t\t/**\n\t\t\t * An optional hint to display to the user when\n\t\t\t * this option might be selected.\n\t\t\t *\n\t\t\t * By default, no `hint` is displayed.\n\t\t\t */\n\t\t\thint?: string;\n\t\t}\n\t: {\n\t\t\t/**\n\t\t\t * Internal data for this option.\n\t\t\t */\n\t\t\tvalue: Value;\n\t\t\t/**\n\t\t\t * Required. The user-facing text for this option.\n\t\t\t */\n\t\t\tlabel: string;\n\t\t\t/**\n\t\t\t * An optional hint to display to the user when\n\t\t\t * this option might be selected.\n\t\t\t *\n\t\t\t * By default, no `hint` is displayed.\n\t\t\t */\n\t\t\thint?: string;\n\t\t};\n\nexport interface SelectOptions<Value> {\n\tmessage: string;\n\toptions: Option<Value>[];\n\tinitialValue?: Value;\n\tmaxItems?: number;\n}\n\nexport const select = <Value>(opts: SelectOptions<Value>) => {\n\tconst opt = (option: Option<Value>, state: 'inactive' | 'active' | 'selected' | 'cancelled') => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tswitch (state) {\n\t\t\tcase 'selected':\n\t\t\t\treturn `${color.dim(label)}`;\n\t\t\tcase 'active':\n\t\t\t\treturn `${color.green(S_RADIO_ACTIVE)} ${label} ${\n\t\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t\t}`;\n\t\t\tcase 'cancelled':\n\t\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t\tdefault:\n\t\t\t\treturn `${color.dim(S_RADIO_INACTIVE)} ${color.dim(label)}`;\n\t\t}\n\t};\n\n\treturn new SelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(this.options[this.cursor], 'selected')}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(\n\t\t\t\t\t\tthis.options[this.cursor],\n\t\t\t\t\t\t'cancelled'\n\t\t\t\t\t)}\\n${color.gray(S_BAR)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${limitOptions({\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: (item, active) => opt(item, active ? 'active' : 'inactive'),\n\t\t\t\t\t}).join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<Value | symbol>;\n};\n\nexport const selectKey = <Value extends string>(opts: SelectOptions<Value>) => {\n\tconst opt = (\n\t\toption: Option<Value>,\n\t\tstate: 'inactive' | 'active' | 'selected' | 'cancelled' = 'inactive'\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active') {\n\t\t\treturn `${color.bgCyan(color.gray(` ${option.value} `))} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\treturn `${color.gray(color.bgWhite(color.inverse(` ${option.value} `)))} ${label} ${\n\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t}`;\n\t};\n\n\treturn new SelectKeyPrompt({\n\t\toptions: opts.options,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(\n\t\t\t\t\t\tthis.options.find((opt) => opt.value === this.value) ?? opts.options[0],\n\t\t\t\t\t\t'selected'\n\t\t\t\t\t)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(this.options[0], 'cancelled')}\\n${color.gray(\n\t\t\t\t\t\tS_BAR\n\t\t\t\t\t)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i) => opt(option, i === this.cursor ? 'active' : 'inactive'))\n\t\t\t\t\t\t.join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<Value | symbol>;\n};\n\nexport interface MultiSelectOptions<Value> {\n\tmessage: string;\n\toptions: Option<Value>[];\n\tinitialValues?: Value[];\n\tmaxItems?: number;\n\trequired?: boolean;\n\tcursorAt?: Value;\n}\nexport const multiselect = <Value>(opts: MultiSelectOptions<Value>) => {\n\tconst opt = (\n\t\toption: Option<Value>,\n\t\tstate: 'inactive' | 'active' | 'selected' | 'active-selected' | 'submitted' | 'cancelled'\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tif (state === 'active') {\n\t\t\treturn `${color.cyan(S_CHECKBOX_ACTIVE)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active-selected') {\n\t\t\treturn `${color.green(S_CHECKBOX_SELECTED)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'submitted') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\treturn `${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;\n\t};\n\n\treturn new MultiSelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValues: opts.initialValues,\n\t\trequired: opts.required ?? true,\n\t\tcursorAt: opts.cursorAt,\n\t\tvalidate(selected: Value[]) {\n\t\t\tif (this.required && selected.length === 0)\n\t\t\t\treturn `Please select at least one option.\\n${color.reset(\n\t\t\t\t\tcolor.dim(\n\t\t\t\t\t\t`Press ${color.gray(color.bgWhite(color.inverse(' space ')))} to select, ${color.gray(\n\t\t\t\t\t\t\tcolor.bgWhite(color.inverse(' enter '))\n\t\t\t\t\t\t)} to submit`\n\t\t\t\t\t)\n\t\t\t\t)}`;\n\t\t},\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tconst styleOption = (option: Option<Value>, active: boolean) => {\n\t\t\t\tconst selected = this.value.includes(option.value);\n\t\t\t\tif (active && selected) {\n\t\t\t\t\treturn opt(option, 'active-selected');\n\t\t\t\t}\n\t\t\t\tif (selected) {\n\t\t\t\t\treturn opt(option, 'selected');\n\t\t\t\t}\n\t\t\t\treturn opt(option, active ? 'active' : 'inactive');\n\t\t\t};\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tthis.options\n\t\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t\t.map((option) => opt(option, 'submitted'))\n\t\t\t\t\t\t\t.join(color.dim(', ')) || color.dim('none')\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'cancel': {\n\t\t\t\t\tconst label = this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'cancelled'))\n\t\t\t\t\t\t.join(color.dim(', '));\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tlabel.trim() ? `${label}\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'error': {\n\t\t\t\t\tconst footer = this.error\n\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t.map((ln, i) =>\n\t\t\t\t\t\t\ti === 0 ? `${color.yellow(S_BAR_END)} ${color.yellow(ln)}` : ` ${ln}`\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join('\\n');\n\t\t\t\t\treturn `${title + color.yellow(S_BAR)} ${limitOptions({\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: styleOption,\n\t\t\t\t\t}).join(`\\n${color.yellow(S_BAR)} `)}\\n${footer}\\n`;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${limitOptions({\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: styleOption,\n\t\t\t\t\t}).join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<Value[] | symbol>;\n};\n\nexport interface GroupMultiSelectOptions<Value> {\n\tmessage: string;\n\toptions: Record<string, Option<Value>[]>;\n\tinitialValues?: Value[];\n\trequired?: boolean;\n\tcursorAt?: Value;\n}\nexport const groupMultiselect = <Value>(opts: GroupMultiSelectOptions<Value>) => {\n\tconst opt = (\n\t\toption: Option<Value>,\n\t\tstate:\n\t\t\t| 'inactive'\n\t\t\t| 'active'\n\t\t\t| 'selected'\n\t\t\t| 'active-selected'\n\t\t\t| 'group-active'\n\t\t\t| 'group-active-selected'\n\t\t\t| 'submitted'\n\t\t\t| 'cancelled',\n\t\toptions: Option<Value>[] = []\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tconst isItem = typeof (option as any).group === 'string';\n\t\tconst next = isItem && (options[options.indexOf(option) + 1] ?? { group: true });\n\t\tconst isLast = isItem && (next as any).group === true;\n\t\tconst prefix = isItem ? `${isLast ? S_BAR_END : S_BAR} ` : '';\n\n\t\tif (state === 'active') {\n\t\t\treturn `${color.dim(prefix)}${color.cyan(S_CHECKBOX_ACTIVE)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'group-active') {\n\t\t\treturn `${prefix}${color.cyan(S_CHECKBOX_ACTIVE)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'group-active-selected') {\n\t\t\treturn `${prefix}${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.dim(prefix)}${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active-selected') {\n\t\t\treturn `${color.dim(prefix)}${color.green(S_CHECKBOX_SELECTED)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'submitted') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\treturn `${color.dim(prefix)}${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;\n\t};\n\n\treturn new GroupMultiSelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValues: opts.initialValues,\n\t\trequired: opts.required ?? true,\n\t\tcursorAt: opts.cursorAt,\n\t\tvalidate(selected: Value[]) {\n\t\t\tif (this.required && selected.length === 0)\n\t\t\t\treturn `Please select at least one option.\\n${color.reset(\n\t\t\t\t\tcolor.dim(\n\t\t\t\t\t\t`Press ${color.gray(color.bgWhite(color.inverse(' space ')))} to select, ${color.gray(\n\t\t\t\t\t\t\tcolor.bgWhite(color.inverse(' enter '))\n\t\t\t\t\t\t)} to submit`\n\t\t\t\t\t)\n\t\t\t\t)}`;\n\t\t},\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'submitted'))\n\t\t\t\t\t\t.join(color.dim(', '))}`;\n\t\t\t\t}\n\t\t\t\tcase 'cancel': {\n\t\t\t\t\tconst label = this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'cancelled'))\n\t\t\t\t\t\t.join(color.dim(', '));\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tlabel.trim() ? `${label}\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'error': {\n\t\t\t\t\tconst footer = this.error\n\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t.map((ln, i) =>\n\t\t\t\t\t\t\ti === 0 ? `${color.yellow(S_BAR_END)} ${color.yellow(ln)}` : ` ${ln}`\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join('\\n');\n\t\t\t\t\treturn `${title}${color.yellow(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i, options) => {\n\t\t\t\t\t\t\tconst selected =\n\t\t\t\t\t\t\t\tthis.value.includes(option.value) ||\n\t\t\t\t\t\t\t\t(option.group === true && this.isGroupSelected(`${option.value}`));\n\t\t\t\t\t\t\tconst active = i === this.cursor;\n\t\t\t\t\t\t\tconst groupActive =\n\t\t\t\t\t\t\t\t!active &&\n\t\t\t\t\t\t\t\ttypeof option.group === 'string' &&\n\t\t\t\t\t\t\t\tthis.options[this.cursor].value === option.group;\n\t\t\t\t\t\t\tif (groupActive) {\n\t\t\t\t\t\t\t\treturn opt(option, selected ? 'group-active-selected' : 'group-active', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (active && selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'active-selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn opt(option, active ? 'active' : 'inactive', options);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(`\\n${color.yellow(S_BAR)} `)}\\n${footer}\\n`;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i, options) => {\n\t\t\t\t\t\t\tconst selected =\n\t\t\t\t\t\t\t\tthis.value.includes(option.value) ||\n\t\t\t\t\t\t\t\t(option.group === true && this.isGroupSelected(`${option.value}`));\n\t\t\t\t\t\t\tconst active = i === this.cursor;\n\t\t\t\t\t\t\tconst groupActive =\n\t\t\t\t\t\t\t\t!active &&\n\t\t\t\t\t\t\t\ttypeof option.group === 'string' &&\n\t\t\t\t\t\t\t\tthis.options[this.cursor].value === option.group;\n\t\t\t\t\t\t\tif (groupActive) {\n\t\t\t\t\t\t\t\treturn opt(option, selected ? 'group-active-selected' : 'group-active', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (active && selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'active-selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn opt(option, active ? 'active' : 'inactive', options);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise<Value[] | symbol>;\n};\n\nexport const note = (message = '', title = '') => {\n\tconst lines = `\\n${message}\\n`.split('\\n');\n\tconst titleLen = strip(title).length;\n\tconst len =\n\t\tMath.max(\n\t\t\tlines.reduce((sum, ln) => {\n\t\t\t\tconst line = strip(ln);\n\t\t\t\treturn line.length > sum ? line.length : sum;\n\t\t\t}, 0),\n\t\t\ttitleLen\n\t\t) + 2;\n\tconst msg = lines\n\t\t.map(\n\t\t\t(ln) =>\n\t\t\t\t`${color.gray(S_BAR)} ${color.dim(ln)}${' '.repeat(len - strip(ln).length)}${color.gray(\n\t\t\t\t\tS_BAR\n\t\t\t\t)}`\n\t\t)\n\t\t.join('\\n');\n\tprocess.stdout.write(\n\t\t`${color.gray(S_BAR)}\\n${color.green(S_STEP_SUBMIT)} ${color.reset(title)} ${color.gray(\n\t\t\tS_BAR_H.repeat(Math.max(len - titleLen - 1, 1)) + S_CORNER_TOP_RIGHT\n\t\t)}\\n${msg}\\n${color.gray(S_CONNECT_LEFT + S_BAR_H.repeat(len + 2) + S_CORNER_BOTTOM_RIGHT)}\\n`\n\t);\n};\n\nexport const cancel = (message = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR_END)} ${color.red(message)}\\n\\n`);\n};\n\nexport const intro = (title = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR_START)} ${title}\\n`);\n};\n\nexport const outro = (message = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR)}\\n${color.gray(S_BAR_END)} ${message}\\n\\n`);\n};\n\nexport type LogMessageOptions = {\n\tsymbol?: string;\n};\nexport const log = {\n\tmessage: (message = '', { symbol = color.gray(S_BAR) }: LogMessageOptions = {}) => {\n\t\tconst parts = [`${color.gray(S_BAR)}`];\n\t\tif (message) {\n\t\t\tconst [firstLine, ...lines] = message.split('\\n');\n\t\t\tparts.push(`${symbol} ${firstLine}`, ...lines.map((ln) => `${color.gray(S_BAR)} ${ln}`));\n\t\t}\n\t\tprocess.stdout.write(`${parts.join('\\n')}\\n`);\n\t},\n\tinfo: (message: string) => {\n\t\tlog.message(message, { symbol: color.blue(S_INFO) });\n\t},\n\tsuccess: (message: string) => {\n\t\tlog.message(message, { symbol: color.green(S_SUCCESS) });\n\t},\n\tstep: (message: string) => {\n\t\tlog.message(message, { symbol: color.green(S_STEP_SUBMIT) });\n\t},\n\twarn: (message: string) => {\n\t\tlog.message(message, { symbol: color.yellow(S_WARN) });\n\t},\n\t/** alias for `log.warn()`. */\n\twarning: (message: string) => {\n\t\tlog.warn(message);\n\t},\n\terror: (message: string) => {\n\t\tlog.message(message, { symbol: color.red(S_ERROR) });\n\t},\n};\n\nexport const spinner = () => {\n\tconst frames = unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];\n\tconst delay = unicode ? 80 : 120;\n\tconst isCI = process.env.CI === 'true';\n\n\tlet unblock: () => void;\n\tlet loop: NodeJS.Timeout;\n\tlet isSpinnerActive = false;\n\tlet _message = '';\n\tlet _prevMessage: string | undefined = undefined;\n\n\tconst handleExit = (code: number) => {\n\t\tconst msg = code > 1 ? 'Something went wrong' : 'Canceled';\n\t\tif (isSpinnerActive) stop(msg, code);\n\t};\n\n\tconst errorEventHandler = () => handleExit(2);\n\tconst signalEventHandler = () => handleExit(1);\n\n\tconst registerHooks = () => {\n\t\t// Reference: https://nodejs.org/api/process.html#event-uncaughtexception\n\t\tprocess.on('uncaughtExceptionMonitor', errorEventHandler);\n\t\t// Reference: https://nodejs.org/api/process.html#event-unhandledrejection\n\t\tprocess.on('unhandledRejection', errorEventHandler);\n\t\t// Reference Signal Events: https://nodejs.org/api/process.html#signal-events\n\t\tprocess.on('SIGINT', signalEventHandler);\n\t\tprocess.on('SIGTERM', signalEventHandler);\n\t\tprocess.on('exit', handleExit);\n\t};\n\n\tconst clearHooks = () => {\n\t\tprocess.removeListener('uncaughtExceptionMonitor', errorEventHandler);\n\t\tprocess.removeListener('unhandledRejection', errorEventHandler);\n\t\tprocess.removeListener('SIGINT', signalEventHandler);\n\t\tprocess.removeListener('SIGTERM', signalEventHandler);\n\t\tprocess.removeListener('exit', handleExit);\n\t};\n\n\tconst clearPrevMessage = () => {\n\t\tif (_prevMessage === undefined) return;\n\t\tif (isCI) process.stdout.write('\\n');\n\t\tconst prevLines = _prevMessage.split('\\n');\n\t\tprocess.stdout.write(cursor.move(-999, prevLines.length - 1));\n\t\tprocess.stdout.write(erase.down(prevLines.length));\n\t};\n\n\tconst parseMessage = (msg: string): string => {\n\t\treturn msg.replace(/\\.+$/, '');\n\t};\n\n\tconst start = (msg = ''): void => {\n\t\tisSpinnerActive = true;\n\t\tunblock = block();\n\t\t_message = parseMessage(msg);\n\t\tprocess.stdout.write(`${color.gray(S_BAR)}\\n`);\n\t\tlet frameIndex = 0;\n\t\tlet dotsTimer = 0;\n\t\tregisterHooks();\n\t\tloop = setInterval(() => {\n\t\t\tif (isCI && _message === _prevMessage) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tclearPrevMessage();\n\t\t\t_prevMessage = _message;\n\t\t\tconst frame = color.magenta(frames[frameIndex]);\n\t\t\tconst loadingDots = isCI ? '...' : '.'.repeat(Math.floor(dotsTimer)).slice(0, 3);\n\t\t\tprocess.stdout.write(`${frame} ${_message}${loadingDots}`);\n\t\t\tframeIndex = frameIndex + 1 < frames.length ? frameIndex + 1 : 0;\n\t\t\tdotsTimer = dotsTimer < frames.length ? dotsTimer + 0.125 : 0;\n\t\t}, delay);\n\t};\n\n\tconst stop = (msg = '', code = 0): void => {\n\t\tisSpinnerActive = false;\n\t\tclearInterval(loop);\n\t\tclearPrevMessage();\n\t\tconst step =\n\t\t\tcode === 0\n\t\t\t\t? color.green(S_STEP_SUBMIT)\n\t\t\t\t: code === 1\n\t\t\t\t\t? color.red(S_STEP_CANCEL)\n\t\t\t\t\t: color.red(S_STEP_ERROR);\n\t\t_message = parseMessage(msg ?? _message);\n\t\tprocess.stdout.write(`${step} ${_message}\\n`);\n\t\tclearHooks();\n\t\tunblock();\n\t};\n\n\tconst message = (msg = ''): void => {\n\t\t_message = parseMessage(msg ?? _message);\n\t};\n\n\treturn {\n\t\tstart,\n\t\tstop,\n\t\tmessage,\n\t};\n};\n\nexport type PromptGroupAwaitedReturn<T> = {\n\t[P in keyof T]: Exclude<Awaited<T[P]>, symbol>;\n};\n\nexport interface PromptGroupOptions<T> {\n\t/**\n\t * Control how the group can be canceled\n\t * if one of the prompts is canceled.\n\t */\n\tonCancel?: (opts: { results: Prettify<Partial<PromptGroupAwaitedReturn<T>>> }) => void;\n}\n\ntype Prettify<T> = {\n\t[P in keyof T]: T[P];\n} & {};\n\nexport type PromptGroup<T> = {\n\t[P in keyof T]: (opts: {\n\t\tresults: Prettify<Partial<PromptGroupAwaitedReturn<Omit<T, P>>>>;\n\t}) => undefined | Promise<T[P] | undefined>;\n};\n\n/**\n * Define a group of prompts to be displayed\n * and return a results of objects within the group\n */\nexport const group = async <T>(\n\tprompts: PromptGroup<T>,\n\topts?: PromptGroupOptions<T>\n): Promise<Prettify<PromptGroupAwaitedReturn<T>>> => {\n\tconst results = {} as any;\n\tconst promptNames = Object.keys(prompts);\n\n\tfor (const name of promptNames) {\n\t\tconst prompt = prompts[name as keyof T];\n\t\tconst result = await prompt({ results })?.catch((e) => {\n\t\t\tthrow e;\n\t\t});\n\n\t\t// Pass the results to the onCancel function\n\t\t// so the user can decide what to do with the results\n\t\t// TODO: Switch to callback within core to avoid isCancel Fn\n\t\tif (typeof opts?.onCancel === 'function' && isCancel(result)) {\n\t\t\tresults[name] = 'canceled';\n\t\t\topts.onCancel({ results });\n\t\t\tcontinue;\n\t\t}\n\n\t\tresults[name] = result;\n\t}\n\n\treturn results;\n};\n\nexport type Task = {\n\t/**\n\t * Task title\n\t */\n\ttitle: string;\n\t/**\n\t * Task function\n\t */\n\ttask: (message: (string: string) => void) => string | Promise<string> | void | Promise<void>;\n\n\t/**\n\t * If enabled === false the task will be skipped\n\t */\n\tenabled?: boolean;\n};\n\n/**\n * Define a group of tasks to be executed\n */\nexport const tasks = async (tasks: Task[]) => {\n\tfor (const task of tasks) {\n\t\tif (task.enabled === false) continue;\n\n\t\tconst s = spinner();\n\t\ts.start(task.title);\n\t\tconst result = await task.task(s.message);\n\t\ts.stop(result || task.title);\n\t}\n};\n"],"names":["isUnicodeSupported","process","unicode","s","c","fallback","S_STEP_ACTIVE","S_STEP_CANCEL","S_STEP_ERROR","S_STEP_SUBMIT","S_BAR_START","S_BAR","S_BAR_END","S_RADIO_ACTIVE","S_RADIO_INACTIVE","S_CHECKBOX_ACTIVE","S_CHECKBOX_SELECTED","S_CHECKBOX_INACTIVE","S_PASSWORD_MASK","S_BAR_H","S_CORNER_TOP_RIGHT","S_CONNECT_LEFT","S_CORNER_BOTTOM_RIGHT","S_INFO","S_SUCCESS","S_WARN","S_ERROR","symbol","state","color","limitOptions","params","cursor","options","style","paramMaxItems","outputMaxItems","maxItems","slidingWindowLocation","shouldRenderTopEllipsis","shouldRenderBottomEllipsis","option","i","arr","isTopLimit","isBottomLimit","text","opts","TextPrompt","title","placeholder","value","password","PasswordPrompt","masked","confirm","active","inactive","ConfirmPrompt","select","opt","label","SelectPrompt","item","selectKey","SelectKeyPrompt","multiselect","MultiSelectPrompt","selected","styleOption","footer","ln","groupMultiselect","isItem","next","isLast","prefix","GroupMultiSelectPrompt","note","message","lines","titleLen","strip","len","sum","line","msg","cancel","intro","outro","log","parts","firstLine","spinner","frames","delay","isCI","unblock","loop","isSpinnerActive","_message","_prevMessage","handleExit","code","stop","errorEventHandler","signalEventHandler","registerHooks","clearHooks","clearPrevMessage","prevLines","erase","parseMessage","start","block","frameIndex","dotsTimer","frame","loadingDots","step","group","prompts","results","promptNames","name","prompt","result","e","isCancel","tasks","task"],"mappings":"8YAEe,SAASA,GAAqB,CAC5C,OAAIC,EAAQ,WAAa,QACjBA,EAAQ,IAAI,OAAS,QAGtB,EAAQA,EAAQ,IAAI,IACvB,EAAQA,EAAQ,IAAI,YACpB,EAAQA,EAAQ,IAAI,kBACpBA,EAAQ,IAAI,aAAe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ClB,EAAM,KAAa,CACnCc,EAAWY,EAAa1B,GAAOc,CAAQ,CACxC,CAMA,CACD,EA4BaoB,GAAQ,MACpBC,EACA1E,IACoD,CACpD,MAAM2E,EAAU,CACVC,EAAAA,EAAc,OAAO,KAAKF,CAAO,EAEvC,UAAWG,KAAQD,EAAa,CAC/B,MAAME,EAASJ,EAAQG,CAAe,EAChCE,EAAS,MAAMD,EAAO,CAAE,QAAAH,CAAQ,CAAC,GAAG,MAAOK,GAAM,CACtD,MAAMA,CACP,CAAC,EAKD,GAAI,OAAOhF,GAAM,UAAa,YAAciF,EAASF,CAAM,EAAG,CAC7DJ,EAAQE,CAAI,EAAI,WAChB7E,EAAK,SAAS,CAAE,QAAA2E,CAAQ,CAAC,EACzB,QACD,CAEAA,EAAQE,CAAI,EAAIE,CACjB,CAEA,OAAOJ,CACR,EAqBaO,GAAQ,MAAOA,GAAkB,CAC7C,UAAWC,KAAQD,EAAO,CACzB,GAAIC,EAAK,UAAY,GAAO,SAE5B,MAAM/H,EAAI0F,IACV1F,EAAE,MAAM+H,EAAK,KAAK,EAClB,MAAMJ,EAAS,MAAMI,EAAK,KAAK/H,EAAE,OAAO,EACxCA,EAAE,KAAK2H,GAAUI,EAAK,KAAK,CAC5B,CACD","x_google_ignoreList":[0]}
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@clack/prompts",
3
+ "version": "0.9.1",
4
+ "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "types": "./dist/index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/natemoo-re/clack",
19
+ "directory": "packages/prompts"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/natemoo-re/clack/issues"
23
+ },
24
+ "homepage": "https://github.com/natemoo-re/clack/tree/main/packages/prompts#readme",
25
+ "files": [
26
+ "dist",
27
+ "CHANGELOG.md"
28
+ ],
29
+ "author": {
30
+ "name": "Nate Moore",
31
+ "email": "nate@natemoo.re",
32
+ "url": "https://twitter.com/n_moore"
33
+ },
34
+ "license": "MIT",
35
+ "keywords": [
36
+ "ask",
37
+ "clack",
38
+ "cli",
39
+ "command-line",
40
+ "command",
41
+ "input",
42
+ "interact",
43
+ "interface",
44
+ "menu",
45
+ "prompt",
46
+ "prompts",
47
+ "stdin",
48
+ "ui"
49
+ ],
50
+ "dependencies": {
51
+ "picocolors": "^1.0.0",
52
+ "sisteransi": "^1.0.5",
53
+ "@clack/core": "0.4.1"
54
+ },
55
+ "devDependencies": {
56
+ "is-unicode-supported": "^1.3.0"
57
+ },
58
+ "scripts": {
59
+ "build": "unbuild"
60
+ }
61
+ }
@@ -0,0 +1,14 @@
1
+ Copyright (c) 2016, Rebecca Turner <me@re-becca.org>
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any
4
+ purpose with or without fee is hereby granted, provided that the above
5
+ copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
+
@@ -0,0 +1,301 @@
1
+ # @iarna/toml
2
+
3
+ Better TOML parsing and stringifying all in that familiar JSON interface.
4
+
5
+ [![Coverage Status](https://coveralls.io/repos/github/iarna/iarna-toml/badge.svg)](https://coveralls.io/github/iarna/iarna-toml)
6
+
7
+ # ** TOML 0.5.0 **
8
+
9
+ ### TOML Spec Support
10
+
11
+ The most recent version as of 2018-07-26: [v0.5.0](https://github.com/mojombo/toml/blob/master/versions/en/toml-v0.5.0.md)
12
+
13
+ ### Example
14
+
15
+ ```js
16
+ const TOML = require('@iarna/toml')
17
+ const obj = TOML.parse(`[abc]
18
+ foo = 123
19
+ bar = [1,2,3]`)
20
+ /* obj =
21
+ {abc: {foo: 123, bar: [1,2,3]}}
22
+ */
23
+ const str = TOML.stringify(obj)
24
+ /* str =
25
+ [abc]
26
+ foo = 123
27
+ bar = [ 1, 2, 3 ]
28
+ */
29
+ ```
30
+
31
+ Visit the project github [for more examples](https://github.com/iarna/iarna-toml/tree/latest/examples)!
32
+
33
+
34
+ ## Why @iarna/toml
35
+
36
+ * See [TOML-SPEC-SUPPORT](https://shared.by.re-becca.org/misc/TOML-SPEC-SUPPORT.html)
37
+ for a comparison of which TOML features are supported by the various
38
+ Node.js TOML parsers.
39
+ * BigInt support on Node 10!
40
+ * 100% test coverage.
41
+ * Fast parsing. It's as much as 100 times
42
+ faster than `toml` and 3 times faster than `toml-j0.4`. However a recent
43
+ newcomer [`@ltd/j-toml`](https://www.npmjs.com/package/@ltd/j-toml) has
44
+ appeared with 0.5 support and astoundingly fast parsing speeds for large
45
+ text blocks. All I can say is you'll have to test your specific work loads
46
+ if you want to know which of @iarna/toml and @ltd/j-toml is faster for
47
+ you, as we currently excell in different areas.
48
+ * Careful adherence to spec. Tests go beyond simple coverage.
49
+ * Smallest parser bundle (if you use `@iarna/toml/parse-string`).
50
+ * No deps.
51
+ * Detailed and easy to read error messages‼
52
+
53
+ ```console
54
+ > TOML.parse(src)
55
+ Error: Unexpected character, expecting string, number, datetime, boolean, inline array or inline table at row 6, col 5, pos 87:
56
+ 5: "abc\"" = { abc=123,def="abc" }
57
+ 6> foo=sdkfj
58
+ ^
59
+ 7:
60
+ ```
61
+
62
+ ## TOML.parse(str) → Object [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse.js)
63
+
64
+ Also available with: `require('@iarna/toml/parse-string')`
65
+
66
+ Synchronously parse a TOML string and return an object.
67
+
68
+
69
+ ## TOML.stringify(obj) → String [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/stringify.js)
70
+
71
+ Also available with: `require('@iarna/toml/stringify)`
72
+
73
+ Serialize an object as TOML.
74
+
75
+ ## [your-object].toJSON
76
+
77
+ If an object `TOML.stringify` is serializing has a `toJSON` method then it
78
+ will call it to transform the object before serializing it. This matches
79
+ the behavior of `JSON.stringify`.
80
+
81
+ The one exception to this is that `toJSON` is not called for `Date` objects
82
+ because `JSON` represents dates as strings and TOML can represent them natively.
83
+
84
+ [`moment`](https://www.npmjs.com/package/moment) objects are treated the
85
+ same as native `Date` objects, in this respect.
86
+
87
+ ## TOML.stringify.value(obj) -> String
88
+
89
+ Also available with: `require('@iarna/toml/stringify').value`
90
+
91
+ Serialize a value as TOML would. This is a fragment and not a complete
92
+ valid TOML document.
93
+
94
+ ## Promises and Streaming
95
+
96
+ The parser provides alternative async and streaming interfaces, for times
97
+ that you're working with really absurdly big TOML files and don't want to
98
+ tie-up the event loop while it parses.
99
+
100
+ ### TOML.parse.async(str[, opts]) → Promise(Object) [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-async.js)
101
+
102
+ Also available with: `require('@iarna/toml/parse-async')`
103
+
104
+ `opts.blocksize` is the amount text to parser per pass through the event loop. Defaults to 40kb.
105
+
106
+ Asynchronously parse a TOML string and return a promise of the resulting object.
107
+
108
+ ### TOML.parse.stream(readable) → Promise(Object) [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-stream-readable.js)
109
+
110
+ Also available with: `require('@iarna/toml/parse-stream')`
111
+
112
+ Given a readable stream, parse it as it feeds us data. Return a promise of the resulting object.
113
+
114
+ ### readable.pipe(TOML.parse.stream()) → Transform [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-stream-through.js)
115
+
116
+ Also available with: `require('@iarna/toml/parse-stream')`
117
+
118
+ Returns a transform stream in object mode. When it completes, emit the
119
+ resulting object. Only one object will ever be emitted.
120
+
121
+ ## Lowlevel Interface [(example)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-lowlevel.js) [(example w/ parser debugging)](https://github.com/iarna/iarna-toml/blob/latest/examples/parse-lowlevel-debug.js)
122
+
123
+ You construct a parser object, per TOML file you want to process:
124
+
125
+ ```js
126
+ const TOMLParser = require('@iarna/toml/lib/toml-parser.js')
127
+ const parser = new TOMLParser()
128
+ ```
129
+
130
+ Then you call the `parse` method for each chunk as you read them, or in a
131
+ single call:
132
+
133
+ ```js
134
+ parser.parse(`hello = 'world'`)
135
+ ```
136
+
137
+ And finally, you call the `finish` method to complete parsing and retrieve
138
+ the resulting object.
139
+
140
+ ```js
141
+ const data = parser.finish()
142
+ ```
143
+
144
+ Both the `parse` method and `finish` method will throw if they find a
145
+ problem with the string they were given. Error objects thrown from the
146
+ parser have `pos`, `line` and `col` attributes. `TOML.parse` adds a visual
147
+ summary of where in the source string there were issues using
148
+ `parse-pretty-error` and you can too:
149
+
150
+ ```js
151
+ const prettyError = require('./parse-pretty-error.js')
152
+ const newErr = prettyError(err, sourceString)
153
+ ```
154
+
155
+ ## What's Different
156
+
157
+ Version 2 of this module supports TOML 0.5.0. Other modules currently
158
+ published to the npm registry support 0.4.0. 0.5.0 is mostly backwards
159
+ compatible with 0.4.0, but if you have need, you can install @iarna/toml@1
160
+ to get a version of this module that supports 0.4.0. Please see the
161
+ [CHANGELOG](CHANGELOG.md#2.0.0) for details on exactly whats changed.
162
+
163
+ ## TOML we can't do
164
+
165
+ * `-nan` is a valid TOML value and is converted into `NaN`. There is no way to
166
+ produce `-nan` when stringifying. Stringification will produce positive `nan`.
167
+ * Detecting and erroring on invalid utf8 documents: This is because Node's
168
+ UTF8 processing converts invalid sequences into the placeholder character
169
+ and does not have facilities for reporting these as errors instead. We
170
+ _can_ detect the placeholder character, but it's valid to intentionally
171
+ include them in documents, so erroring on them is not great.
172
+ * On versions of Node < 10, very large Integer values will lose precision.
173
+ On Node >=10, bigints are used.
174
+ * Floating/local dates and times are still represented by JavaScript Date
175
+ objects, which don't actually support these concepts. The objects
176
+ returned have been modified so that you can determine what kind of thing
177
+ they are (with `isFloating`, `isDate`, `isTime` properties) and that
178
+ their ISO representation (via `toISOString`) is representative of their
179
+ TOML value. They will correctly round trip if you pass them to
180
+ `TOML.stringify`.
181
+ * Binary, hexadecimal and octal values are converted to ordinary integers and
182
+ will be decimal if you stringify them.
183
+
184
+ ## Changes
185
+
186
+ I write a by hand, honest-to-god,
187
+ [CHANGELOG](https://github.com/iarna/iarna-toml/blob/latest/CHANGELOG.md)
188
+ for this project. It's a description of what went into a release that you
189
+ the consumer of the module could care about, not a list of git commits, so
190
+ please check it out!
191
+
192
+ ## Benchmarks
193
+
194
+ You can run them yourself with:
195
+
196
+ ```console
197
+ $ npm run benchmark
198
+ ```
199
+
200
+ The results below are from my desktop using Node 13.13.0. The library
201
+ versions tested were `@iarna/toml@2.2.4`, `toml-j0.4@1.1.1`, `toml@3.0.0`,
202
+ `@sgarciac/bombadil@2.3.0`, `@ltd/j-toml@0.5.107`, and `fast-toml@0.5.4`. The speed value is
203
+ megabytes-per-second that the parser can process of that document type.
204
+ Bigger is better. The percentage after average results is the margin of error.
205
+
206
+ New here is fast-toml. fast-toml is very fast, for some datatypes, but it
207
+ also is missing most error checking demanded by the spec. For 0.4, it is
208
+ complete except for detail of multiline strings caught by the compliance
209
+ tests. Its support for 0.5 is incomplete. Check out the
210
+ [spec compliance](https://shared.by.re-becca.org/misc/TOML-SPEC-SUPPORT.html) doc
211
+ for details.
212
+
213
+ As this table is getting a little wide, with how npm and github display it,
214
+ you can also view it seperately in the
215
+ [BENCHMARK](https://shared.by.re-becca.org/misc/BENCHMARK.html) document.
216
+
217
+ | | @iarna/<wbr>toml | toml-j0.4 | toml | @sgarciac/<wbr>bombadil | @ltd/<wbr>j-toml | fast-toml |
218
+ | - | :---------: | :-------: | :--: | :----------------: | :---------: | :-------: |
219
+ | **Overall** | 28MB/sec<br><small>0.35%</small> | 6.5MB/sec<br><small>0.25%</small> | 0.2MB/sec<br><small>0.70%</small> | - | 35MB/sec<br><small>0.23%</small> | - |
220
+ | **Spec Example: v0.4.0** | 26MB/sec<br><small>0.37%</small> | 10MB/sec<br><small>0.27%</small> | 1MB/sec<br><small>0.42%</small> | 1.2MB/sec<br><small>0.95%</small> | 28MB/sec<br><small>0.31%</small> | - |
221
+ | **Spec Example: Hard Unicode** | 64MB/sec<br><small>0.59%</small> | 18MB/sec<br><small>0.12%</small> | 2MB/sec<br><small>0.20%</small> | 0.6MB/sec<br><small>0.53%</small> | 68MB/sec<br><small>0.31%</small> | 78MB/sec<br><small>0.28%</small> |
222
+ | **Types: Array, Inline** | 7.3MB/sec<br><small>0.60%</small> | 4MB/sec<br><small>0.16%</small> | 0.1MB/sec<br><small>0.91%</small> | 1.3MB/sec<br><small>0.81%</small> | 10MB/sec<br><small>0.35%</small> | 9MB/sec<br><small>0.16%</small> |
223
+ | **Types: Array** | 6.8MB/sec<br><small>0.19%</small> | 6.7MB/sec<br><small>0.15%</small> | 0.2MB/sec<br><small>0.79%</small> | 1.2MB/sec<br><small>0.93%</small> | 8.8MB/sec<br><small>0.47%</small> | 27MB/sec<br><small>0.21%</small> |
224
+ | **Types: Boolean,** | 21MB/sec<br><small>0.20%</small> | 9.4MB/sec<br><small>0.17%</small> | 0.2MB/sec<br><small>0.96%</small> | 1.8MB/sec<br><small>0.70%</small> | 16MB/sec<br><small>0.20%</small> | 8.4MB/sec<br><small>0.22%</small> |
225
+ | **Types: Datetime** | 18MB/sec<br><small>0.14%</small> | 11MB/sec<br><small>0.15%</small> | 0.3MB/sec<br><small>0.85%</small> | 1.6MB/sec<br><small>0.45%</small> | 9.8MB/sec<br><small>0.48%</small> | 6.5MB/sec<br><small>0.23%</small> |
226
+ | **Types: Float** | 8.8MB/sec<br><small>0.09%</small> | 5.9MB/sec<br><small>0.14%</small> | 0.2MB/sec<br><small>0.51%</small> | 2.1MB/sec<br><small>0.82%</small> | 14MB/sec<br><small>0.15%</small> | 7.9MB/sec<br><small>0.14%</small> |
227
+ | **Types: Int** | 5.9MB/sec<br><small>0.11%</small> | 4.5MB/sec<br><small>0.28%</small> | 0.1MB/sec<br><small>0.78%</small> | 1.5MB/sec<br><small>0.64%</small> | 10MB/sec<br><small>0.14%</small> | 8MB/sec<br><small>0.17%</small> |
228
+ | **Types: Literal String, 7 char** | 26MB/sec<br><small>0.29%</small> | 8.5MB/sec<br><small>0.32%</small> | 0.3MB/sec<br><small>0.84%</small> | 2.3MB/sec<br><small>1.02%</small> | 23MB/sec<br><small>0.15%</small> | 13MB/sec<br><small>0.15%</small> |
229
+ | **Types: Literal String, 92 char** | 46MB/sec<br><small>0.19%</small> | 11MB/sec<br><small>0.20%</small> | 0.3MB/sec<br><small>0.56%</small> | 12MB/sec<br><small>0.92%</small> | 101MB/sec<br><small>0.17%</small> | 75MB/sec<br><small>0.29%</small> |
230
+ | **Types: Literal String, Multiline, 1079 char** | 22MB/sec<br><small>0.42%</small> | 6.7MB/sec<br><small>0.55%</small> | 0.9MB/sec<br><small>0.78%</small> | 44MB/sec<br><small>1.00%</small> | 350MB/sec<br><small>0.16%</small> | 636MB/sec<br><small>0.16%</small> |
231
+ | **Types: Basic String, 7 char** | 25MB/sec<br><small>0.15%</small> | 7.3MB/sec<br><small>0.18%</small> | 0.2MB/sec<br><small>0.96%</small> | 2.2MB/sec<br><small>1.09%</small> | 14MB/sec<br><small>0.16%</small> | 12MB/sec<br><small>0.22%</small> |
232
+ | **Types: Basic String, 92 char** | 43MB/sec<br><small>0.30%</small> | 7.2MB/sec<br><small>0.16%</small> | 0.1MB/sec<br><small>4.04%</small> | 12MB/sec<br><small>1.33%</small> | 71MB/sec<br><small>0.19%</small> | 70MB/sec<br><small>0.23%</small> |
233
+ | **Types: Basic String, 1079 char** | 24MB/sec<br><small>0.45%</small> | 5.8MB/sec<br><small>0.17%</small> | 0.1MB/sec<br><small>3.64%</small> | 44MB/sec<br><small>1.05%</small> | 93MB/sec<br><small>0.29%</small> | 635MB/sec<br><small>0.28%</small> |
234
+ | **Types: Table, Inline** | 9.7MB/sec<br><small>0.10%</small> | 5.5MB/sec<br><small>0.22%</small> | 0.1MB/sec<br><small>0.87%</small> | 1.4MB/sec<br><small>1.18%</small> | 8.7MB/sec<br><small>0.60%</small> | 8.7MB/sec<br><small>0.22%</small> |
235
+ | **Types: Table** | 7.1MB/sec<br><small>0.14%</small> | 5.6MB/sec<br><small>0.42%</small> | 0.1MB/sec<br><small>0.65%</small> | 1.4MB/sec<br><small>1.11%</small> | 7.4MB/sec<br><small>0.70%</small> | 18MB/sec<br><small>0.20%</small> |
236
+ | **Scaling: Array, Inline, 1000 elements** | 40MB/sec<br><small>0.21%</small> | 2.4MB/sec<br><small>0.19%</small> | 0.1MB/sec<br><small>0.35%</small> | 1.6MB/sec<br><small>1.02%</small> | 17MB/sec<br><small>0.15%</small> | 32MB/sec<br><small>0.16%</small> |
237
+ | **Scaling: Array, Nested, 1000 deep** | 2MB/sec<br><small>0.15%</small> | 1.7MB/sec<br><small>0.26%</small> | 0.3MB/sec<br><small>0.58%</small> | - | 1.8MB/sec<br><small>0.74%</small> | 13MB/sec<br><small>0.20%</small> |
238
+ | **Scaling: Literal String, 40kb** | 61MB/sec<br><small>0.18%</small> | 10MB/sec<br><small>0.15%</small> | 3MB/sec<br><small>0.84%</small> | 12MB/sec<br><small>0.51%</small> | 551MB/sec<br><small>0.44%</small> | 19kMB/sec<br><small>0.19%</small> |
239
+ | **Scaling: Literal String, Multiline, 40kb** | 62MB/sec<br><small>0.16%</small> | 5MB/sec<br><small>0.45%</small> | 0.2MB/sec<br><small>1.70%</small> | 11MB/sec<br><small>0.74%</small> | 291MB/sec<br><small>0.24%</small> | 21kMB/sec<br><small>0.22%</small> |
240
+ | **Scaling: Basic String, Multiline, 40kb** | 62MB/sec<br><small>0.18%</small> | 5.8MB/sec<br><small>0.38%</small> | 2.9MB/sec<br><small>0.86%</small> | 11MB/sec<br><small>0.41%</small> | 949MB/sec<br><small>0.44%</small> | 26kMB/sec<br><small>0.16%</small> |
241
+ | **Scaling: Basic String, 40kb** | 59MB/sec<br><small>0.20%</small> | 6.3MB/sec<br><small>0.17%</small> | 0.2MB/sec<br><small>1.95%</small> | 12MB/sec<br><small>0.44%</small> | 508MB/sec<br><small>0.35%</small> | 18kMB/sec<br><small>0.15%</small> |
242
+ | **Scaling: Table, Inline, 1000 elements** | 28MB/sec<br><small>0.12%</small> | 8.2MB/sec<br><small>0.19%</small> | 0.3MB/sec<br><small>0.89%</small> | 2.3MB/sec<br><small>1.14%</small> | 5.3MB/sec<br><small>0.24%</small> | 13MB/sec<br><small>0.20%</small> |
243
+ | **Scaling: Table, Inline, Nested, 1000 deep** | 7.8MB/sec<br><small>0.28%</small> | 5MB/sec<br><small>0.20%</small> | 0.1MB/sec<br><small>0.84%</small> | - | 3.2MB/sec<br><small>0.52%</small> | 10MB/sec<br><small>0.23%</small> |
244
+
245
+ ## Tests
246
+
247
+ The test suite is maintained at 100% coverage: [![Coverage Status](https://coveralls.io/repos/github/iarna/iarna-toml/badge.svg)](https://coveralls.io/github/iarna/iarna-toml)
248
+
249
+ The spec was carefully hand converted into a series of test framework
250
+ independent (and mostly language independent) assertions, as pairs of TOML
251
+ and YAML files. You can find those files here:
252
+ [spec-test](https://github.com/iarna/iarna-toml/blob/latest/test/spec-test/).
253
+ A number of examples of invalid Unicode were also written, but are difficult
254
+ to make use of in Node.js where Unicode errors are silently hidden. You can
255
+ find those here: [spec-test-disabled](https://github.com/iarna/iarna-toml/blob/latest/test/spec-test-disabled/).
256
+
257
+ Further tests were written to increase coverage to 100%, these may be more
258
+ implementation specific, but they can be found in [coverage](https://github.com/iarna/iarna-toml/blob/latest/test/coverage.js) and
259
+ [coverage-error](https://github.com/iarna/iarna-toml/blob/latest/test/coverage-error.js).
260
+
261
+ I've also written some quality assurance style tests, which don't contribute
262
+ to coverage but do cover scenarios that could easily be problematic for some
263
+ implementations can be found in:
264
+ [test/qa.js](https://github.com/iarna/iarna-toml/blob/latest/test/qa.js) and
265
+ [test/qa-error.js](https://github.com/iarna/iarna-toml/blob/latest/test/qa-error.js).
266
+
267
+ All of the official example files from the TOML spec are run through this
268
+ parser and compared to the official YAML files when available. These files are from the TOML spec as of:
269
+ [357a4ba6](https://github.com/toml-lang/toml/tree/357a4ba6782e48ff26e646780bab11c90ed0a7bc)
270
+ and specifically are:
271
+
272
+ * [github.com/toml-lang/toml/tree/357a4ba6/examples](https://github.com/toml-lang/toml/tree/357a4ba6782e48ff26e646780bab11c90ed0a7bc/examples)
273
+ * [github.com/toml-lang/toml/tree/357a4ba6/tests](https://github.com/toml-lang/toml/tree/357a4ba6782e48ff26e646780bab11c90ed0a7bc/tests)
274
+
275
+ The stringifier is tested by round-tripping these same files, asserting that
276
+ `TOML.parse(sourcefile)` deepEqual
277
+ `TOML.parse(TOML.stringify(TOML.parse(sourcefile))`. This is done in
278
+ [test/roundtrip-examples.js](https://github.com/iarna/iarna-toml/blob/latest/test/round-tripping.js)
279
+ There are also some tests written to complete coverage from stringification in:
280
+ [test/stringify.js](https://github.com/iarna/iarna-toml/blob/latest/test/stringify.js)
281
+
282
+ Tests for the async and streaming interfaces are in [test/async.js](https://github.com/iarna/iarna-toml/blob/latest/test/async.js) and [test/stream.js](https://github.com/iarna/iarna-toml/blob/latest/test/stream.js) respectively.
283
+
284
+ Tests for the parsers debugging mode live in [test/devel.js](https://github.com/iarna/iarna-toml/blob/latest/test/devel.js).
285
+
286
+ And finally, many more stringification tests were borrowed from [@othiym23](https://github.com/othiym23)'s
287
+ [toml-stream](https://npmjs.com/package/toml-stream) module. They were fetched as of
288
+ [b6f1e26b572d49742d49fa6a6d11524d003441fa](https://github.com/othiym23/toml-stream/tree/b6f1e26b572d49742d49fa6a6d11524d003441fa/test) and live in
289
+ [test/toml-stream](https://github.com/iarna/iarna-toml/blob/latest/test/toml-stream/).
290
+
291
+ ## Improvements to make
292
+
293
+ * In stringify:
294
+ * Any way to produce comments. As a JSON stand-in I'm not too worried
295
+ about this. That said, a document orientated fork is something I'd like
296
+ to look at eventually…
297
+ * Stringification could use some work on its error reporting. It reports
298
+ _what's_ wrong, but not where in your data structure it was.
299
+ * Further optimize the parser:
300
+ * There are some debugging assertions left in the main parser, these should be moved to a subclass.
301
+ * Make the whole debugging parser thing work as a mixin instead of as a superclass.