@prismer/sdk 2.0.7 → 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 +59723 -8280
  4. package/dist/index.d.mts +724 -229
  5. package/dist/index.d.ts +724 -229
  6. package/dist/index.js +325 -23
  7. package/dist/index.mjs +324 -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,374 @@
1
+ # @clack/prompts
2
+
3
+ ## 0.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8093f3c: Adds `Error` support to the `validate` function
8
+ - 98925e3: Exports the `Option` type and improves JSDocannotations
9
+ - 1904e57: Replace custom utility for stripping ANSI control sequences with Node's built-in [`stripVTControlCharacters`](https://nodejs.org/docs/latest/api/util.html#utilstripvtcontrolcharactersstr) utility.
10
+ - Updated dependencies [8093f3c]
11
+ - Updated dependencies [e5ba09a]
12
+ - Updated dependencies [8cba8e3]
13
+ - @clack/core@0.4.1
14
+
15
+ ## 0.9.0
16
+
17
+ ### Minor Changes
18
+
19
+ - a83d2f8: Adds a new `updateSettings()` function to support new global keybindings.
20
+
21
+ `updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).
22
+
23
+ ```ts
24
+ import { updateSettings } from "@clack/prompts";
25
+
26
+ // Support custom keybindings
27
+ updateSettings({
28
+ aliases: {
29
+ w: "up",
30
+ a: "left",
31
+ s: "down",
32
+ d: "right",
33
+ },
34
+ });
35
+ ```
36
+
37
+ > [!WARNING]
38
+ > In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.
39
+
40
+ - 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller).
41
+
42
+ One example use case is automatically cancelling a prompt after a timeout.
43
+
44
+ ```ts
45
+ const shouldContinue = await confirm({
46
+ message: "This message will self destruct in 5 seconds",
47
+ signal: AbortSignal.timeout(5000),
48
+ });
49
+ ```
50
+
51
+ Another use case is racing a long running task with a manual prompt.
52
+
53
+ ```ts
54
+ const abortController = new AbortController();
55
+
56
+ const projectType = await Promise.race([
57
+ detectProjectType({
58
+ signal: abortController.signal,
59
+ }),
60
+ select({
61
+ message: "Pick a project type.",
62
+ options: [
63
+ { value: "ts", label: "TypeScript" },
64
+ { value: "js", label: "JavaScript" },
65
+ { value: "coffee", label: "CoffeeScript", hint: "oh no" },
66
+ ],
67
+ signal: abortController.signal,
68
+ }),
69
+ ]);
70
+
71
+ abortController.abort();
72
+ ```
73
+
74
+ - a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`).
75
+
76
+ | alias | action |
77
+ | ----- | ------ |
78
+ | `k` | up |
79
+ | `l` | right |
80
+ | `j` | down |
81
+ | `h` | left |
82
+ | `esc` | cancel |
83
+
84
+ ### Patch Changes
85
+
86
+ - f9f139d: Adapts `spinner` output for static CI environments
87
+ - Updated dependencies [a83d2f8]
88
+ - Updated dependencies [801246b]
89
+ - Updated dependencies [a83d2f8]
90
+ - Updated dependencies [51e12bc]
91
+ - @clack/core@0.4.0
92
+
93
+ ## 0.8.2
94
+
95
+ ### Patch Changes
96
+
97
+ - Updated dependencies [4845f4f]
98
+ - Updated dependencies [d7b2fb9]
99
+ - @clack/core@0.3.5
100
+
101
+ ## 0.8.1
102
+
103
+ ### Patch Changes
104
+
105
+ - 360afeb: feat: adaptative max items
106
+
107
+ ## 0.8.0
108
+
109
+ ### Minor Changes
110
+
111
+ - 9acccde: Add tasks function for executing tasks in spinners
112
+
113
+ ### Patch Changes
114
+
115
+ - b5c6b9b: Feat multiselect maxItems option
116
+ - 50ed94a: fix: clear `spinner` hooks on `spinner.stop`
117
+ - Updated dependencies [a04e418]
118
+ - Updated dependencies [4f6fcf5]
119
+ - @clack/core@0.3.4
120
+
121
+ ## 0.7.0
122
+
123
+ ### Minor Changes
124
+
125
+ - b27a701: add maxItems option to select prompt
126
+ - 89371be: added a new method called `spinner.message(msg: string)`
127
+
128
+ ### Patch Changes
129
+
130
+ - 52183c4: Fix `spinner` conflict with terminal on error between `spinner.start()` and `spinner.stop()`
131
+ - ab51d29: Fixes cases where the note title length was miscalculated due to ansi characters
132
+ - Updated dependencies [cd79076]
133
+ - @clack/core@0.3.3
134
+
135
+ ## 0.6.3
136
+
137
+ ### Patch Changes
138
+
139
+ - c96eda5: Enable hard line-wrapping behavior for long words without spaces
140
+ - Updated dependencies [c96eda5]
141
+ - @clack/core@0.3.2
142
+
143
+ ## 0.6.2
144
+
145
+ ### Patch Changes
146
+
147
+ - 58a1df1: Fix line duplication bug by automatically wrapping prompts to `process.stdout.columns`
148
+ - Updated dependencies [58a1df1]
149
+ - @clack/core@0.3.1
150
+
151
+ ## 0.6.1
152
+
153
+ ### Patch Changes
154
+
155
+ - ca08fb6: Support complex value types for `select`, `multiselect` and `groupMultiselect`.
156
+
157
+ ## 0.6.0
158
+
159
+ ### Minor Changes
160
+
161
+ - 8a4a12f: add `groupMultiselect` prompt
162
+ - 165a1b3: Add `log` APIs. Supports `log.info`, `log.success`, `log.warn`, and `log.error`. For low-level control, `log.message` is also exposed.
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [8a4a12f]
167
+ - Updated dependencies [8a4a12f]
168
+ - @clack/core@0.3.0
169
+
170
+ ## 0.5.1
171
+
172
+ ### Patch Changes
173
+
174
+ - cc11917: Update default `password` mask
175
+ - Updated dependencies [ec812b6]
176
+ - @clack/core@0.2.1
177
+
178
+ ## 0.5.0
179
+
180
+ ### Minor Changes
181
+
182
+ - d74dd05: Adds a `selectKey` prompt type
183
+ - 54c1bc3: **Breaking Change** `multiselect` has renamed `initialValue` to `initialValues`
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [d74dd05]
188
+ - Updated dependencies [54c1bc3]
189
+ - @clack/core@0.2.0
190
+
191
+ ## 0.4.5
192
+
193
+ ### Patch Changes
194
+
195
+ - 1251132: Multiselect: return `Value[]` instead of `Option[]`.
196
+ - 8994382: Add a password prompt to `@clack/prompts`
197
+ - Updated dependencies [1251132]
198
+ - Updated dependencies [8994382]
199
+ - @clack/core@0.1.9
200
+
201
+ ## 0.4.4
202
+
203
+ ### Patch Changes
204
+
205
+ - d96071c: Don't mutate `initialValue` in `multiselect`, fix parameter type for `validate()`.
206
+
207
+ Credits to @banjo for the bug report and initial PR!
208
+
209
+ - Updated dependencies [d96071c]
210
+ - @clack/core@0.1.8
211
+
212
+ ## 0.4.3
213
+
214
+ ### Patch Changes
215
+
216
+ - 83d890e: Fix text cancel display bug
217
+
218
+ ## 0.4.2
219
+
220
+ ### Patch Changes
221
+
222
+ - Update README
223
+
224
+ ## 0.4.1
225
+
226
+ ### Patch Changes
227
+
228
+ - 7fb5375: Adds a new `defaultValue` option to the text prompt, removes automatic usage of the placeholder value.
229
+ - Updated dependencies [7fb5375]
230
+ - @clack/core@0.1.6
231
+
232
+ ## 0.4.0
233
+
234
+ ### Minor Changes
235
+
236
+ - 61b88b6: Add `group` construct to group many prompts together
237
+
238
+ ### Patch Changes
239
+
240
+ - de1314e: Support `required` option for multi-select
241
+ - Updated dependencies [de1314e]
242
+ - @clack/core@0.1.5
243
+
244
+ ## 0.3.0
245
+
246
+ ### Minor Changes
247
+
248
+ - 493c592: Improve types for select/multiselect prompts. Numbers and booleans are now supported as the `value` option.
249
+ - 15558e3: Improved Windows/non-unicode support
250
+
251
+ ### Patch Changes
252
+
253
+ - ca77da1: Fix multiselect initial value logic
254
+ - Updated dependencies [ca77da1]
255
+ - Updated dependencies [8aed606]
256
+ - @clack/core@0.1.4
257
+
258
+ ## 0.2.2
259
+
260
+ ### Patch Changes
261
+
262
+ - 94b24d9: Fix CJS `ansi-regex` interop
263
+
264
+ ## 0.2.1
265
+
266
+ ### Patch Changes
267
+
268
+ - a99c458: Support `initialValue` option for text prompt
269
+ - Updated dependencies [a99c458]
270
+ - @clack/core@0.1.3
271
+
272
+ ## 0.2.0
273
+
274
+ ### Minor Changes
275
+
276
+ - Improved type safety
277
+ - b1341d6: Updated styles, new note component
278
+
279
+ ### Patch Changes
280
+
281
+ - Updated dependencies [7dcad8f]
282
+ - Updated dependencies [2242f13]
283
+ - Updated dependencies [b1341d6]
284
+ - @clack/core@0.1.2
285
+
286
+ ## 0.1.1
287
+
288
+ ### Patch Changes
289
+
290
+ - fa09bf5: Use circle for radio, square for checkbox
291
+ - Updated dependencies [4be7dbf]
292
+ - Updated dependencies [b480679]
293
+ - @clack/core@0.1.1
294
+
295
+ ## 0.1.0
296
+
297
+ ### Minor Changes
298
+
299
+ - 7015ec9: Create new prompt: multi-select
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [7015ec9]
304
+ - @clack/core@0.1.0
305
+
306
+ ## 0.0.10
307
+
308
+ ### Patch Changes
309
+
310
+ - e0b49e5: Update spinner so it actually spins
311
+
312
+ ## 0.0.9
313
+
314
+ ### Patch Changes
315
+
316
+ - Update README
317
+
318
+ ## 0.0.8
319
+
320
+ ### Patch Changes
321
+
322
+ - Updated dependencies [9d371c3]
323
+ - @clack/core@0.0.12
324
+
325
+ ## 0.0.7
326
+
327
+ ### Patch Changes
328
+
329
+ - Update README
330
+
331
+ ## 0.0.6
332
+
333
+ ### Patch Changes
334
+
335
+ - d20ef2a: Update keywords, URLs
336
+ - Updated dependencies [441d5b7]
337
+ - Updated dependencies [d20ef2a]
338
+ - Updated dependencies [fe13c2f]
339
+ - @clack/core@0.0.11
340
+
341
+ ## 0.0.5
342
+
343
+ ### Patch Changes
344
+
345
+ - Update README
346
+
347
+ ## 0.0.4
348
+
349
+ ### Patch Changes
350
+
351
+ - 80404ab: Update README
352
+
353
+ ## 0.0.3
354
+
355
+ ### Patch Changes
356
+
357
+ - a0cb382: Add `main` entrypoint
358
+ - Updated dependencies [a0cb382]
359
+ - @clack/core@0.0.10
360
+
361
+ ## 0.0.2
362
+
363
+ ### Patch Changes
364
+
365
+ - Updated dependencies
366
+ - @clack/core@0.0.9
367
+
368
+ ## 0.0.1
369
+
370
+ ### Patch Changes
371
+
372
+ - a4b5e13: Initial release
373
+ - Updated dependencies [a4b5e13]
374
+ - @clack/core@0.0.8
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Nate Moore
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,191 @@
1
+ # `@clack/prompts`
2
+
3
+ Effortlessly build beautiful command-line apps 🪄 [Try the demo](https://stackblitz.com/edit/clack-prompts?file=index.js)
4
+
5
+ ![clack-prompt](https://github.com/natemoo-re/clack/blob/main/.github/assets/clack-demo.gif)
6
+
7
+ ---
8
+
9
+ `@clack/prompts` is an opinionated, pre-styled wrapper around [`@clack/core`](https://www.npmjs.com/package/@clack/core).
10
+
11
+ - 🤏 80% smaller than other options
12
+ - 💎 Beautiful, minimal UI
13
+ - ✅ Simple API
14
+ - 🧱 Comes with `text`, `confirm`, `select`, `multiselect`, and `spinner` components
15
+
16
+ ## Basics
17
+
18
+ ### Setup
19
+
20
+ The `intro` and `outro` functions will print a message to begin or end a prompt session, respectively.
21
+
22
+ ```js
23
+ import { intro, outro } from '@clack/prompts';
24
+
25
+ intro(`create-my-app`);
26
+ // Do stuff
27
+ outro(`You're all set!`);
28
+ ```
29
+
30
+ ### Cancellation
31
+
32
+ The `isCancel` function is a guard that detects when a user cancels a question with `CTRL + C`. You should handle this situation for each prompt, optionally providing a nice cancellation message with the `cancel` utility.
33
+
34
+ ```js
35
+ import { isCancel, cancel, text } from '@clack/prompts';
36
+
37
+ const value = await text({
38
+ message: 'What is the meaning of life?',
39
+ });
40
+
41
+ if (isCancel(value)) {
42
+ cancel('Operation cancelled.');
43
+ process.exit(0);
44
+ }
45
+ ```
46
+
47
+ ## Components
48
+
49
+ ### Text
50
+
51
+ The text component accepts a single line of text.
52
+
53
+ ```js
54
+ import { text } from '@clack/prompts';
55
+
56
+ const meaning = await text({
57
+ message: 'What is the meaning of life?',
58
+ placeholder: 'Not sure',
59
+ initialValue: '42',
60
+ validate(value) {
61
+ if (value.length === 0) return `Value is required!`;
62
+ },
63
+ });
64
+ ```
65
+
66
+ ### Confirm
67
+
68
+ The confirm component accepts a yes or no answer. The result is a boolean value of `true` or `false`.
69
+
70
+ ```js
71
+ import { confirm } from '@clack/prompts';
72
+
73
+ const shouldContinue = await confirm({
74
+ message: 'Do you want to continue?',
75
+ });
76
+ ```
77
+
78
+ ### Select
79
+
80
+ The select component allows a user to choose one value from a list of options. The result is the `value` prop of a given option.
81
+
82
+ ```js
83
+ import { select } from '@clack/prompts';
84
+
85
+ const projectType = await select({
86
+ message: 'Pick a project type.',
87
+ options: [
88
+ { value: 'ts', label: 'TypeScript' },
89
+ { value: 'js', label: 'JavaScript' },
90
+ { value: 'coffee', label: 'CoffeeScript', hint: 'oh no' },
91
+ ],
92
+ });
93
+ ```
94
+
95
+ ### Multi-Select
96
+
97
+ The `multiselect` component allows a user to choose many values from a list of options. The result is an array with all selected `value` props.
98
+
99
+ ```js
100
+ import { multiselect } from '@clack/prompts';
101
+
102
+ const additionalTools = await multiselect({
103
+ message: 'Select additional tools.',
104
+ options: [
105
+ { value: 'eslint', label: 'ESLint', hint: 'recommended' },
106
+ { value: 'prettier', label: 'Prettier' },
107
+ { value: 'gh-action', label: 'GitHub Action' },
108
+ ],
109
+ required: false,
110
+ });
111
+ ```
112
+
113
+ ### Spinner
114
+
115
+ The spinner component surfaces a pending action, such as a long-running download or dependency installation.
116
+
117
+ ```js
118
+ import { spinner } from '@clack/prompts';
119
+
120
+ const s = spinner();
121
+ s.start('Installing via npm');
122
+ // Do installation here
123
+ s.stop('Installed via npm');
124
+ ```
125
+
126
+ ## Utilities
127
+
128
+ ### Grouping
129
+
130
+ Grouping prompts together is a great way to keep your code organized. This accepts a JSON object with a name that can be used to reference the group later. The second argument is an optional but has a `onCancel` callback that will be called if the user cancels one of the prompts in the group.
131
+
132
+ ```js
133
+ import * as p from '@clack/prompts';
134
+
135
+ const group = await p.group(
136
+ {
137
+ name: () => p.text({ message: 'What is your name?' }),
138
+ age: () => p.text({ message: 'What is your age?' }),
139
+ color: ({ results }) =>
140
+ p.multiselect({
141
+ message: `What is your favorite color ${results.name}?`,
142
+ options: [
143
+ { value: 'red', label: 'Red' },
144
+ { value: 'green', label: 'Green' },
145
+ { value: 'blue', label: 'Blue' },
146
+ ],
147
+ }),
148
+ },
149
+ {
150
+ // On Cancel callback that wraps the group
151
+ // So if the user cancels one of the prompts in the group this function will be called
152
+ onCancel: ({ results }) => {
153
+ p.cancel('Operation cancelled.');
154
+ process.exit(0);
155
+ },
156
+ }
157
+ );
158
+
159
+ console.log(group.name, group.age, group.color);
160
+ ```
161
+
162
+ ### Tasks
163
+
164
+ Execute multiple tasks in spinners.
165
+
166
+ ```js
167
+ await p.tasks([
168
+ {
169
+ title: 'Installing via npm',
170
+ task: async (message) => {
171
+ // Do installation here
172
+ return 'Installed via npm';
173
+ },
174
+ },
175
+ ]);
176
+ ```
177
+
178
+ ### Logs
179
+
180
+ ```js
181
+ import { log } from '@clack/prompts';
182
+
183
+ log.info('Info!');
184
+ log.success('Success!');
185
+ log.step('Step!');
186
+ log.warn('Warn!');
187
+ log.error('Error!');
188
+ log.message('Hello, World', { symbol: color.cyan('~') });
189
+ ```
190
+
191
+ [clack-log-prompts](https://github.com/natemoo-re/clack/blob/main/.github/assets/clack-logs.png)
@@ -0,0 +1,80 @@
1
+ "use strict";const node_util=require("node:util"),core=require("@clack/core"),process$1=require("node:process"),e=require("picocolors"),sisteransi=require("sisteransi");function _interopDefaultCompat(t){return t&&typeof t=="object"&&"default"in t?t.default:t}const process__default=_interopDefaultCompat(process$1),e__default=_interopDefaultCompat(e);function isUnicodeSupported(){return process__default.platform!=="win32"?process__default.env.TERM!=="linux":!!process__default.env.CI||!!process__default.env.WT_SESSION||!!process__default.env.TERMINUS_SUBLIME||process__default.env.ConEmuTask==="{cmd::Cmder}"||process__default.env.TERM_PROGRAM==="Terminus-Sublime"||process__default.env.TERM_PROGRAM==="vscode"||process__default.env.TERM==="xterm-256color"||process__default.env.TERM==="alacritty"||process__default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const P=isUnicodeSupported(),u=(t,n)=>P?t:n,z=u("\u25C6","*"),R=u("\u25A0","x"),A=u("\u25B2","x"),w=u("\u25C7","o"),Q=u("\u250C","T"),a=u("\u2502","|"),d=u("\u2514","\u2014"),O=u("\u25CF",">"),I=u("\u25CB"," "),_=u("\u25FB","[\u2022]"),x=u("\u25FC","[+]"),M=u("\u25FB","[ ]"),Z=u("\u25AA","\u2022"),k=u("\u2500","-"),ee=u("\u256E","+"),te=u("\u251C","+"),re=u("\u256F","+"),se=u("\u25CF","\u2022"),ne=u("\u25C6","*"),ie=u("\u25B2","!"),ae=u("\u25A0","x"),h=t=>{switch(t){case"initial":case"active":return e__default.cyan(z);case"cancel":return e__default.red(R);case"error":return e__default.yellow(A);case"submit":return e__default.green(w)}},C=t=>{const{cursor:n,options:s,style:i}=t,r=t.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,s.length-o),0):n<l+2&&(l=Math.max(n-2,0));const $=o<s.length&&l>0,p=o<s.length&&l+o<s.length;return s.slice(l,l+o).map((y,f,T)=>{const S=f===0&&$,b=f===T.length-1&&p;return S||b?e__default.dim("..."):i(y,f+l===n)})},text=t=>new core.TextPrompt({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,render(){const n=`${e__default.gray(a)}
2
+ ${h(this.state)} ${t.message}
3
+ `,s=t.placeholder?e__default.inverse(t.placeholder[0])+e__default.dim(t.placeholder.slice(1)):e__default.inverse(e__default.hidden("_")),i=this.value?this.valueWithCursor:s;switch(this.state){case"error":return`${n.trim()}
4
+ ${e__default.yellow(a)} ${i}
5
+ ${e__default.yellow(d)} ${e__default.yellow(this.error)}
6
+ `;case"submit":return`${n}${e__default.gray(a)} ${e__default.dim(this.value||t.placeholder)}`;case"cancel":return`${n}${e__default.gray(a)} ${e__default.strikethrough(e__default.dim(this.value??""))}${this.value?.trim()?`
7
+ ${e__default.gray(a)}`:""}`;default:return`${n}${e__default.cyan(a)} ${i}
8
+ ${e__default.cyan(d)}
9
+ `}}}).prompt(),password=t=>new core.PasswordPrompt({validate:t.validate,mask:t.mask??Z,render(){const n=`${e__default.gray(a)}
10
+ ${h(this.state)} ${t.message}
11
+ `,s=this.valueWithCursor,i=this.masked;switch(this.state){case"error":return`${n.trim()}
12
+ ${e__default.yellow(a)} ${i}
13
+ ${e__default.yellow(d)} ${e__default.yellow(this.error)}
14
+ `;case"submit":return`${n}${e__default.gray(a)} ${e__default.dim(i)}`;case"cancel":return`${n}${e__default.gray(a)} ${e__default.strikethrough(e__default.dim(i??""))}${i?`
15
+ ${e__default.gray(a)}`:""}`;default:return`${n}${e__default.cyan(a)} ${s}
16
+ ${e__default.cyan(d)}
17
+ `}}}).prompt(),confirm=t=>{const n=t.active??"Yes",s=t.inactive??"No";return new core.ConfirmPrompt({active:n,inactive:s,initialValue:t.initialValue??!0,render(){const i=`${e__default.gray(a)}
18
+ ${h(this.state)} ${t.message}
19
+ `,r=this.value?n:s;switch(this.state){case"submit":return`${i}${e__default.gray(a)} ${e__default.dim(r)}`;case"cancel":return`${i}${e__default.gray(a)} ${e__default.strikethrough(e__default.dim(r))}
20
+ ${e__default.gray(a)}`;default:return`${i}${e__default.cyan(a)} ${this.value?`${e__default.green(O)} ${n}`:`${e__default.dim(I)} ${e__default.dim(n)}`} ${e__default.dim("/")} ${this.value?`${e__default.dim(I)} ${e__default.dim(s)}`:`${e__default.green(O)} ${s}`}
21
+ ${e__default.cyan(d)}
22
+ `}}}).prompt()},select=t=>{const n=(s,i)=>{const r=s.label??String(s.value);switch(i){case"selected":return`${e__default.dim(r)}`;case"active":return`${e__default.green(O)} ${r} ${s.hint?e__default.dim(`(${s.hint})`):""}`;case"cancelled":return`${e__default.strikethrough(e__default.dim(r))}`;default:return`${e__default.dim(I)} ${e__default.dim(r)}`}};return new core.SelectPrompt({options:t.options,initialValue:t.initialValue,render(){const s=`${e__default.gray(a)}
23
+ ${h(this.state)} ${t.message}
24
+ `;switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${n(this.options[this.cursor],"selected")}`;case"cancel":return`${s}${e__default.gray(a)} ${n(this.options[this.cursor],"cancelled")}
25
+ ${e__default.gray(a)}`;default:return`${s}${e__default.cyan(a)} ${C({cursor:this.cursor,options:this.options,maxItems:t.maxItems,style:(i,r)=>n(i,r?"active":"inactive")}).join(`
26
+ ${e__default.cyan(a)} `)}
27
+ ${e__default.cyan(d)}
28
+ `}}}).prompt()},selectKey=t=>{const n=(s,i="inactive")=>{const r=s.label??String(s.value);return i==="selected"?`${e__default.dim(r)}`:i==="cancelled"?`${e__default.strikethrough(e__default.dim(r))}`:i==="active"?`${e__default.bgCyan(e__default.gray(` ${s.value} `))} ${r} ${s.hint?e__default.dim(`(${s.hint})`):""}`:`${e__default.gray(e__default.bgWhite(e__default.inverse(` ${s.value} `)))} ${r} ${s.hint?e__default.dim(`(${s.hint})`):""}`};return new core.SelectKeyPrompt({options:t.options,initialValue:t.initialValue,render(){const s=`${e__default.gray(a)}
29
+ ${h(this.state)} ${t.message}
30
+ `;switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${n(this.options.find(i=>i.value===this.value)??t.options[0],"selected")}`;case"cancel":return`${s}${e__default.gray(a)} ${n(this.options[0],"cancelled")}
31
+ ${e__default.gray(a)}`;default:return`${s}${e__default.cyan(a)} ${this.options.map((i,r)=>n(i,r===this.cursor?"active":"inactive")).join(`
32
+ ${e__default.cyan(a)} `)}
33
+ ${e__default.cyan(d)}
34
+ `}}}).prompt()},multiselect=t=>{const n=(s,i)=>{const r=s.label??String(s.value);return i==="active"?`${e__default.cyan(_)} ${r} ${s.hint?e__default.dim(`(${s.hint})`):""}`:i==="selected"?`${e__default.green(x)} ${e__default.dim(r)}`:i==="cancelled"?`${e__default.strikethrough(e__default.dim(r))}`:i==="active-selected"?`${e__default.green(x)} ${r} ${s.hint?e__default.dim(`(${s.hint})`):""}`:i==="submitted"?`${e__default.dim(r)}`:`${e__default.dim(M)} ${e__default.dim(r)}`};return new core.MultiSelectPrompt({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(s){if(this.required&&s.length===0)return`Please select at least one option.
35
+ ${e__default.reset(e__default.dim(`Press ${e__default.gray(e__default.bgWhite(e__default.inverse(" space ")))} to select, ${e__default.gray(e__default.bgWhite(e__default.inverse(" enter ")))} to submit`))}`},render(){const s=`${e__default.gray(a)}
36
+ ${h(this.state)} ${t.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`${s}${e__default.gray(a)} ${this.options.filter(({value:r})=>this.value.includes(r)).map(r=>n(r,"submitted")).join(e__default.dim(", "))||e__default.dim("none")}`;case"cancel":{const r=this.options.filter(({value:c})=>this.value.includes(c)).map(c=>n(c,"cancelled")).join(e__default.dim(", "));return`${s}${e__default.gray(a)} ${r.trim()?`${r}
38
+ ${e__default.gray(a)}`:""}`}case"error":{const r=this.error.split(`
39
+ `).map((c,o)=>o===0?`${e__default.yellow(d)} ${e__default.yellow(c)}`:` ${c}`).join(`
40
+ `);return`${s+e__default.yellow(a)} ${C({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:i}).join(`
41
+ ${e__default.yellow(a)} `)}
42
+ ${r}
43
+ `}default:return`${s}${e__default.cyan(a)} ${C({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:i}).join(`
44
+ ${e__default.cyan(a)} `)}
45
+ ${e__default.cyan(d)}
46
+ `}}}).prompt()},groupMultiselect=t=>{const n=(s,i,r=[])=>{const c=s.label??String(s.value),o=typeof s.group=="string",l=o&&(r[r.indexOf(s)+1]??{group:!0}),$=o&&l.group===!0,p=o?`${$?d:a} `:"";return i==="active"?`${e__default.dim(p)}${e__default.cyan(_)} ${c} ${s.hint?e__default.dim(`(${s.hint})`):""}`:i==="group-active"?`${p}${e__default.cyan(_)} ${e__default.dim(c)}`:i==="group-active-selected"?`${p}${e__default.green(x)} ${e__default.dim(c)}`:i==="selected"?`${e__default.dim(p)}${e__default.green(x)} ${e__default.dim(c)}`:i==="cancelled"?`${e__default.strikethrough(e__default.dim(c))}`:i==="active-selected"?`${e__default.dim(p)}${e__default.green(x)} ${c} ${s.hint?e__default.dim(`(${s.hint})`):""}`:i==="submitted"?`${e__default.dim(c)}`:`${e__default.dim(p)}${e__default.dim(M)} ${e__default.dim(c)}`};return new core.GroupMultiSelectPrompt({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(s){if(this.required&&s.length===0)return`Please select at least one option.
47
+ ${e__default.reset(e__default.dim(`Press ${e__default.gray(e__default.bgWhite(e__default.inverse(" space ")))} to select, ${e__default.gray(e__default.bgWhite(e__default.inverse(" enter ")))} to submit`))}`},render(){const s=`${e__default.gray(a)}
48
+ ${h(this.state)} ${t.message}
49
+ `;switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>n(i,"submitted")).join(e__default.dim(", "))}`;case"cancel":{const i=this.options.filter(({value:r})=>this.value.includes(r)).map(r=>n(r,"cancelled")).join(e__default.dim(", "));return`${s}${e__default.gray(a)} ${i.trim()?`${i}
50
+ ${e__default.gray(a)}`:""}`}case"error":{const i=this.error.split(`
51
+ `).map((r,c)=>c===0?`${e__default.yellow(d)} ${e__default.yellow(r)}`:` ${r}`).join(`
52
+ `);return`${s}${e__default.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__default.yellow(a)} `)}
54
+ ${i}
55
+ `}default:return`${s}${e__default.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__default.cyan(a)} `)}
57
+ ${e__default.cyan(d)}
58
+ `}}}).prompt()},note=(t="",n="")=>{const s=`
59
+ ${t}
60
+ `.split(`
61
+ `),i=node_util.stripVTControlCharacters(n).length,r=Math.max(s.reduce((o,l)=>{const $=node_util.stripVTControlCharacters(l);return $.length>o?$.length:o},0),i)+2,c=s.map(o=>`${e__default.gray(a)} ${e__default.dim(o)}${" ".repeat(r-node_util.stripVTControlCharacters(o).length)}${e__default.gray(a)}`).join(`
62
+ `);process.stdout.write(`${e__default.gray(a)}
63
+ ${e__default.green(w)} ${e__default.reset(n)} ${e__default.gray(k.repeat(Math.max(r-i-1,1))+ee)}
64
+ ${c}
65
+ ${e__default.gray(te+k.repeat(r+2)+re)}
66
+ `)},cancel=(t="")=>{process.stdout.write(`${e__default.gray(d)} ${e__default.red(t)}
67
+
68
+ `)},intro=(t="")=>{process.stdout.write(`${e__default.gray(Q)} ${t}
69
+ `)},outro=(t="")=>{process.stdout.write(`${e__default.gray(a)}
70
+ ${e__default.gray(d)} ${t}
71
+
72
+ `)},log={message:(t="",{symbol:n=e__default.gray(a)}={})=>{const s=[`${e__default.gray(a)}`];if(t){const[i,...r]=t.split(`
73
+ `);s.push(`${n} ${i}`,...r.map(c=>`${e__default.gray(a)} ${c}`))}process.stdout.write(`${s.join(`
74
+ `)}
75
+ `)},info:t=>{log.message(t,{symbol:e__default.blue(se)})},success:t=>{log.message(t,{symbol:e__default.green(ne)})},step:t=>{log.message(t,{symbol:e__default.green(w)})},warn:t=>{log.message(t,{symbol:e__default.yellow(ie)})},warning:t=>{log.warn(t)},error:t=>{log.message(t,{symbol:e__default.red(ae)})}},spinner=()=>{const t=P?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],n=P?80:120,s=process.env.CI==="true";let i,r,c=!1,o="",l;const $=m=>{const g=m>1?"Something went wrong":"Canceled";c&&V(g,m)},p=()=>$(2),y=()=>$(1),f=()=>{process.on("uncaughtExceptionMonitor",p),process.on("unhandledRejection",p),process.on("SIGINT",y),process.on("SIGTERM",y),process.on("exit",$)},T=()=>{process.removeListener("uncaughtExceptionMonitor",p),process.removeListener("unhandledRejection",p),process.removeListener("SIGINT",y),process.removeListener("SIGTERM",y),process.removeListener("exit",$)},S=()=>{if(l===void 0)return;s&&process.stdout.write(`
76
+ `);const m=l.split(`
77
+ `);process.stdout.write(sisteransi.cursor.move(-999,m.length-1)),process.stdout.write(sisteransi.erase.down(m.length))},b=m=>m.replace(/\.+$/,""),j=(m="")=>{c=!0,i=core.block(),o=b(m),process.stdout.write(`${e__default.gray(a)}
78
+ `);let g=0,v=0;f(),r=setInterval(()=>{if(s&&o===l)return;S(),l=o;const E=e__default.magenta(t[g]),q=s?"...":".".repeat(Math.floor(v)).slice(0,3);process.stdout.write(`${E} ${o}${q}`),g=g+1<t.length?g+1:0,v=v<t.length?v+.125:0},n)},V=(m="",g=0)=>{c=!1,clearInterval(r),S();const v=g===0?e__default.green(w):g===1?e__default.red(R):e__default.red(A);o=b(m??o),process.stdout.write(`${v} ${o}
79
+ `),T(),i()};return{start:j,stop:V,message:(m="")=>{o=b(m??o)}}},group=async(t,n)=>{const s={},i=Object.keys(t);for(const r of i){const c=t[r],o=await c({results:s})?.catch(l=>{throw l});if(typeof n?.onCancel=="function"&&core.isCancel(o)){s[r]="canceled",n.onCancel({results:s});continue}s[r]=o}return s},tasks=async t=>{for(const n of t){if(n.enabled===!1)continue;const s=spinner();s.start(n.title);const i=await n.task(s.message);s.stop(i||n.title)}};exports.isCancel=core.isCancel,exports.updateSettings=core.updateSettings,exports.cancel=cancel,exports.confirm=confirm,exports.group=group,exports.groupMultiselect=groupMultiselect,exports.intro=intro,exports.log=log,exports.multiselect=multiselect,exports.note=note,exports.outro=outro,exports.password=password,exports.select=select,exports.selectKey=selectKey,exports.spinner=spinner,exports.tasks=tasks,exports.text=text;
80
+ //# sourceMappingURL=index.cjs.map