@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 @@
1
+ {"version":3,"file":"index.cjs","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":["process","unicode","isUnicodeSupported","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","opts","TextPrompt","title","placeholder","value","PasswordPrompt","masked","active","inactive","ConfirmPrompt","opt","label","SelectPrompt","item","SelectKeyPrompt","MultiSelectPrompt","selected","styleOption","footer","ln","isItem","next","isLast","prefix","GroupMultiSelectPrompt","message","lines","titleLen","strip","len","sum","line","msg","parts","firstLine","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","prompts","results","promptNames","name","prompt","result","e","isCancel","tasks","task"],"mappings":"+VAEe,SAAS,oBAAqB,CAC5C,OAAIA,iBAAQ,WAAa,QACjBA,iBAAQ,IAAI,OAAS,QAGtB,EAAQA,iBAAQ,IAAI,IACvB,EAAQA,iBAAQ,IAAI,YACpB,EAAQA,iBAAQ,IAAI,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,EACAX,EAAAA,CACD,EAMA,MAAO,CACN,MAAAgB,EACA,KAAAT,EACA,QAPe,CAACb,EAAM,KAAa,CACnCS,EAAWY,EAAarB,GAAOS,CAAQ,CACxC,CAMA,CACD,EA4Ba,MAAQ,MACpBoB,EACA7D,IACoD,CACpD,MAAM8D,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,OAAOnE,GAAM,UAAa,YAAcoE,KAAAA,SAASF,CAAM,EAAG,CAC7DJ,EAAQE,CAAI,EAAI,WAChBhE,EAAK,SAAS,CAAE,QAAA8D,CAAQ,CAAC,EACzB,QACD,CAEAA,EAAQE,CAAI,EAAIE,CACjB,CAEA,OAAOJ,CACR,EAqBa,MAAQ,MAAOO,GAAkB,CAC7C,UAAWC,KAAQD,EAAO,CACzB,GAAIC,EAAK,UAAY,GAAO,SAE5B,MAAMjH,EAAI,UACVA,EAAE,MAAMiH,EAAK,KAAK,EAClB,MAAMJ,EAAS,MAAMI,EAAK,KAAKjH,EAAE,OAAO,EACxCA,EAAE,KAAK6G,GAAUI,EAAK,KAAK,CAC5B,CACD","x_google_ignoreList":[0]}
@@ -0,0 +1,151 @@
1
+ export { ClackSettings, isCancel, updateSettings } from '@clack/core';
2
+
3
+ interface TextOptions {
4
+ message: string;
5
+ placeholder?: string;
6
+ defaultValue?: string;
7
+ initialValue?: string;
8
+ validate?: (value: string) => string | Error | undefined;
9
+ }
10
+ declare const text: (opts: TextOptions) => Promise<string | symbol>;
11
+ interface PasswordOptions {
12
+ message: string;
13
+ mask?: string;
14
+ validate?: (value: string) => string | Error | undefined;
15
+ }
16
+ declare const password: (opts: PasswordOptions) => Promise<string | symbol>;
17
+ interface ConfirmOptions {
18
+ message: string;
19
+ active?: string;
20
+ inactive?: string;
21
+ initialValue?: boolean;
22
+ }
23
+ declare const confirm: (opts: ConfirmOptions) => Promise<boolean | symbol>;
24
+ type Primitive = Readonly<string | boolean | number>;
25
+ type Option<Value> = Value extends Primitive ? {
26
+ /**
27
+ * Internal data for this option.
28
+ */
29
+ value: Value;
30
+ /**
31
+ * The optional, user-facing text for this option.
32
+ *
33
+ * By default, the `value` is converted to a string.
34
+ */
35
+ label?: string;
36
+ /**
37
+ * An optional hint to display to the user when
38
+ * this option might be selected.
39
+ *
40
+ * By default, no `hint` is displayed.
41
+ */
42
+ hint?: string;
43
+ } : {
44
+ /**
45
+ * Internal data for this option.
46
+ */
47
+ value: Value;
48
+ /**
49
+ * Required. The user-facing text for this option.
50
+ */
51
+ label: string;
52
+ /**
53
+ * An optional hint to display to the user when
54
+ * this option might be selected.
55
+ *
56
+ * By default, no `hint` is displayed.
57
+ */
58
+ hint?: string;
59
+ };
60
+ interface SelectOptions<Value> {
61
+ message: string;
62
+ options: Option<Value>[];
63
+ initialValue?: Value;
64
+ maxItems?: number;
65
+ }
66
+ declare const select: <Value>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
67
+ declare const selectKey: <Value extends string>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
68
+ interface MultiSelectOptions<Value> {
69
+ message: string;
70
+ options: Option<Value>[];
71
+ initialValues?: Value[];
72
+ maxItems?: number;
73
+ required?: boolean;
74
+ cursorAt?: Value;
75
+ }
76
+ declare const multiselect: <Value>(opts: MultiSelectOptions<Value>) => Promise<symbol | Value[]>;
77
+ interface GroupMultiSelectOptions<Value> {
78
+ message: string;
79
+ options: Record<string, Option<Value>[]>;
80
+ initialValues?: Value[];
81
+ required?: boolean;
82
+ cursorAt?: Value;
83
+ }
84
+ declare const groupMultiselect: <Value>(opts: GroupMultiSelectOptions<Value>) => Promise<symbol | Value[]>;
85
+ declare const note: (message?: string, title?: string) => void;
86
+ declare const cancel: (message?: string) => void;
87
+ declare const intro: (title?: string) => void;
88
+ declare const outro: (message?: string) => void;
89
+ type LogMessageOptions = {
90
+ symbol?: string;
91
+ };
92
+ declare const log: {
93
+ message: (message?: string, { symbol }?: LogMessageOptions) => void;
94
+ info: (message: string) => void;
95
+ success: (message: string) => void;
96
+ step: (message: string) => void;
97
+ warn: (message: string) => void;
98
+ /** alias for `log.warn()`. */
99
+ warning: (message: string) => void;
100
+ error: (message: string) => void;
101
+ };
102
+ declare const spinner: () => {
103
+ start: (msg?: string) => void;
104
+ stop: (msg?: string, code?: number) => void;
105
+ message: (msg?: string) => void;
106
+ };
107
+ type PromptGroupAwaitedReturn<T> = {
108
+ [P in keyof T]: Exclude<Awaited<T[P]>, symbol>;
109
+ };
110
+ interface PromptGroupOptions<T> {
111
+ /**
112
+ * Control how the group can be canceled
113
+ * if one of the prompts is canceled.
114
+ */
115
+ onCancel?: (opts: {
116
+ results: Prettify<Partial<PromptGroupAwaitedReturn<T>>>;
117
+ }) => void;
118
+ }
119
+ type Prettify<T> = {
120
+ [P in keyof T]: T[P];
121
+ } & {};
122
+ type PromptGroup<T> = {
123
+ [P in keyof T]: (opts: {
124
+ results: Prettify<Partial<PromptGroupAwaitedReturn<Omit<T, P>>>>;
125
+ }) => undefined | Promise<T[P] | undefined>;
126
+ };
127
+ /**
128
+ * Define a group of prompts to be displayed
129
+ * and return a results of objects within the group
130
+ */
131
+ declare const group: <T>(prompts: PromptGroup<T>, opts?: PromptGroupOptions<T> | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn<T>]: PromptGroupAwaitedReturn<T>[P]; }>;
132
+ type Task = {
133
+ /**
134
+ * Task title
135
+ */
136
+ title: string;
137
+ /**
138
+ * Task function
139
+ */
140
+ task: (message: (string: string) => void) => string | Promise<string> | void | Promise<void>;
141
+ /**
142
+ * If enabled === false the task will be skipped
143
+ */
144
+ enabled?: boolean;
145
+ };
146
+ /**
147
+ * Define a group of tasks to be executed
148
+ */
149
+ declare const tasks: (tasks: Task[]) => Promise<void>;
150
+
151
+ export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type Option, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, tasks, text };
@@ -0,0 +1,151 @@
1
+ export { ClackSettings, isCancel, updateSettings } from '@clack/core';
2
+
3
+ interface TextOptions {
4
+ message: string;
5
+ placeholder?: string;
6
+ defaultValue?: string;
7
+ initialValue?: string;
8
+ validate?: (value: string) => string | Error | undefined;
9
+ }
10
+ declare const text: (opts: TextOptions) => Promise<string | symbol>;
11
+ interface PasswordOptions {
12
+ message: string;
13
+ mask?: string;
14
+ validate?: (value: string) => string | Error | undefined;
15
+ }
16
+ declare const password: (opts: PasswordOptions) => Promise<string | symbol>;
17
+ interface ConfirmOptions {
18
+ message: string;
19
+ active?: string;
20
+ inactive?: string;
21
+ initialValue?: boolean;
22
+ }
23
+ declare const confirm: (opts: ConfirmOptions) => Promise<boolean | symbol>;
24
+ type Primitive = Readonly<string | boolean | number>;
25
+ type Option<Value> = Value extends Primitive ? {
26
+ /**
27
+ * Internal data for this option.
28
+ */
29
+ value: Value;
30
+ /**
31
+ * The optional, user-facing text for this option.
32
+ *
33
+ * By default, the `value` is converted to a string.
34
+ */
35
+ label?: string;
36
+ /**
37
+ * An optional hint to display to the user when
38
+ * this option might be selected.
39
+ *
40
+ * By default, no `hint` is displayed.
41
+ */
42
+ hint?: string;
43
+ } : {
44
+ /**
45
+ * Internal data for this option.
46
+ */
47
+ value: Value;
48
+ /**
49
+ * Required. The user-facing text for this option.
50
+ */
51
+ label: string;
52
+ /**
53
+ * An optional hint to display to the user when
54
+ * this option might be selected.
55
+ *
56
+ * By default, no `hint` is displayed.
57
+ */
58
+ hint?: string;
59
+ };
60
+ interface SelectOptions<Value> {
61
+ message: string;
62
+ options: Option<Value>[];
63
+ initialValue?: Value;
64
+ maxItems?: number;
65
+ }
66
+ declare const select: <Value>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
67
+ declare const selectKey: <Value extends string>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
68
+ interface MultiSelectOptions<Value> {
69
+ message: string;
70
+ options: Option<Value>[];
71
+ initialValues?: Value[];
72
+ maxItems?: number;
73
+ required?: boolean;
74
+ cursorAt?: Value;
75
+ }
76
+ declare const multiselect: <Value>(opts: MultiSelectOptions<Value>) => Promise<symbol | Value[]>;
77
+ interface GroupMultiSelectOptions<Value> {
78
+ message: string;
79
+ options: Record<string, Option<Value>[]>;
80
+ initialValues?: Value[];
81
+ required?: boolean;
82
+ cursorAt?: Value;
83
+ }
84
+ declare const groupMultiselect: <Value>(opts: GroupMultiSelectOptions<Value>) => Promise<symbol | Value[]>;
85
+ declare const note: (message?: string, title?: string) => void;
86
+ declare const cancel: (message?: string) => void;
87
+ declare const intro: (title?: string) => void;
88
+ declare const outro: (message?: string) => void;
89
+ type LogMessageOptions = {
90
+ symbol?: string;
91
+ };
92
+ declare const log: {
93
+ message: (message?: string, { symbol }?: LogMessageOptions) => void;
94
+ info: (message: string) => void;
95
+ success: (message: string) => void;
96
+ step: (message: string) => void;
97
+ warn: (message: string) => void;
98
+ /** alias for `log.warn()`. */
99
+ warning: (message: string) => void;
100
+ error: (message: string) => void;
101
+ };
102
+ declare const spinner: () => {
103
+ start: (msg?: string) => void;
104
+ stop: (msg?: string, code?: number) => void;
105
+ message: (msg?: string) => void;
106
+ };
107
+ type PromptGroupAwaitedReturn<T> = {
108
+ [P in keyof T]: Exclude<Awaited<T[P]>, symbol>;
109
+ };
110
+ interface PromptGroupOptions<T> {
111
+ /**
112
+ * Control how the group can be canceled
113
+ * if one of the prompts is canceled.
114
+ */
115
+ onCancel?: (opts: {
116
+ results: Prettify<Partial<PromptGroupAwaitedReturn<T>>>;
117
+ }) => void;
118
+ }
119
+ type Prettify<T> = {
120
+ [P in keyof T]: T[P];
121
+ } & {};
122
+ type PromptGroup<T> = {
123
+ [P in keyof T]: (opts: {
124
+ results: Prettify<Partial<PromptGroupAwaitedReturn<Omit<T, P>>>>;
125
+ }) => undefined | Promise<T[P] | undefined>;
126
+ };
127
+ /**
128
+ * Define a group of prompts to be displayed
129
+ * and return a results of objects within the group
130
+ */
131
+ declare const group: <T>(prompts: PromptGroup<T>, opts?: PromptGroupOptions<T> | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn<T>]: PromptGroupAwaitedReturn<T>[P]; }>;
132
+ type Task = {
133
+ /**
134
+ * Task title
135
+ */
136
+ title: string;
137
+ /**
138
+ * Task function
139
+ */
140
+ task: (message: (string: string) => void) => string | Promise<string> | void | Promise<void>;
141
+ /**
142
+ * If enabled === false the task will be skipped
143
+ */
144
+ enabled?: boolean;
145
+ };
146
+ /**
147
+ * Define a group of tasks to be executed
148
+ */
149
+ declare const tasks: (tasks: Task[]) => Promise<void>;
150
+
151
+ export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type Option, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, tasks, text };
@@ -0,0 +1,151 @@
1
+ export { ClackSettings, isCancel, updateSettings } from '@clack/core';
2
+
3
+ interface TextOptions {
4
+ message: string;
5
+ placeholder?: string;
6
+ defaultValue?: string;
7
+ initialValue?: string;
8
+ validate?: (value: string) => string | Error | undefined;
9
+ }
10
+ declare const text: (opts: TextOptions) => Promise<string | symbol>;
11
+ interface PasswordOptions {
12
+ message: string;
13
+ mask?: string;
14
+ validate?: (value: string) => string | Error | undefined;
15
+ }
16
+ declare const password: (opts: PasswordOptions) => Promise<string | symbol>;
17
+ interface ConfirmOptions {
18
+ message: string;
19
+ active?: string;
20
+ inactive?: string;
21
+ initialValue?: boolean;
22
+ }
23
+ declare const confirm: (opts: ConfirmOptions) => Promise<boolean | symbol>;
24
+ type Primitive = Readonly<string | boolean | number>;
25
+ type Option<Value> = Value extends Primitive ? {
26
+ /**
27
+ * Internal data for this option.
28
+ */
29
+ value: Value;
30
+ /**
31
+ * The optional, user-facing text for this option.
32
+ *
33
+ * By default, the `value` is converted to a string.
34
+ */
35
+ label?: string;
36
+ /**
37
+ * An optional hint to display to the user when
38
+ * this option might be selected.
39
+ *
40
+ * By default, no `hint` is displayed.
41
+ */
42
+ hint?: string;
43
+ } : {
44
+ /**
45
+ * Internal data for this option.
46
+ */
47
+ value: Value;
48
+ /**
49
+ * Required. The user-facing text for this option.
50
+ */
51
+ label: string;
52
+ /**
53
+ * An optional hint to display to the user when
54
+ * this option might be selected.
55
+ *
56
+ * By default, no `hint` is displayed.
57
+ */
58
+ hint?: string;
59
+ };
60
+ interface SelectOptions<Value> {
61
+ message: string;
62
+ options: Option<Value>[];
63
+ initialValue?: Value;
64
+ maxItems?: number;
65
+ }
66
+ declare const select: <Value>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
67
+ declare const selectKey: <Value extends string>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
68
+ interface MultiSelectOptions<Value> {
69
+ message: string;
70
+ options: Option<Value>[];
71
+ initialValues?: Value[];
72
+ maxItems?: number;
73
+ required?: boolean;
74
+ cursorAt?: Value;
75
+ }
76
+ declare const multiselect: <Value>(opts: MultiSelectOptions<Value>) => Promise<symbol | Value[]>;
77
+ interface GroupMultiSelectOptions<Value> {
78
+ message: string;
79
+ options: Record<string, Option<Value>[]>;
80
+ initialValues?: Value[];
81
+ required?: boolean;
82
+ cursorAt?: Value;
83
+ }
84
+ declare const groupMultiselect: <Value>(opts: GroupMultiSelectOptions<Value>) => Promise<symbol | Value[]>;
85
+ declare const note: (message?: string, title?: string) => void;
86
+ declare const cancel: (message?: string) => void;
87
+ declare const intro: (title?: string) => void;
88
+ declare const outro: (message?: string) => void;
89
+ type LogMessageOptions = {
90
+ symbol?: string;
91
+ };
92
+ declare const log: {
93
+ message: (message?: string, { symbol }?: LogMessageOptions) => void;
94
+ info: (message: string) => void;
95
+ success: (message: string) => void;
96
+ step: (message: string) => void;
97
+ warn: (message: string) => void;
98
+ /** alias for `log.warn()`. */
99
+ warning: (message: string) => void;
100
+ error: (message: string) => void;
101
+ };
102
+ declare const spinner: () => {
103
+ start: (msg?: string) => void;
104
+ stop: (msg?: string, code?: number) => void;
105
+ message: (msg?: string) => void;
106
+ };
107
+ type PromptGroupAwaitedReturn<T> = {
108
+ [P in keyof T]: Exclude<Awaited<T[P]>, symbol>;
109
+ };
110
+ interface PromptGroupOptions<T> {
111
+ /**
112
+ * Control how the group can be canceled
113
+ * if one of the prompts is canceled.
114
+ */
115
+ onCancel?: (opts: {
116
+ results: Prettify<Partial<PromptGroupAwaitedReturn<T>>>;
117
+ }) => void;
118
+ }
119
+ type Prettify<T> = {
120
+ [P in keyof T]: T[P];
121
+ } & {};
122
+ type PromptGroup<T> = {
123
+ [P in keyof T]: (opts: {
124
+ results: Prettify<Partial<PromptGroupAwaitedReturn<Omit<T, P>>>>;
125
+ }) => undefined | Promise<T[P] | undefined>;
126
+ };
127
+ /**
128
+ * Define a group of prompts to be displayed
129
+ * and return a results of objects within the group
130
+ */
131
+ declare const group: <T>(prompts: PromptGroup<T>, opts?: PromptGroupOptions<T> | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn<T>]: PromptGroupAwaitedReturn<T>[P]; }>;
132
+ type Task = {
133
+ /**
134
+ * Task title
135
+ */
136
+ title: string;
137
+ /**
138
+ * Task function
139
+ */
140
+ task: (message: (string: string) => void) => string | Promise<string> | void | Promise<void>;
141
+ /**
142
+ * If enabled === false the task will be skipped
143
+ */
144
+ enabled?: boolean;
145
+ };
146
+ /**
147
+ * Define a group of tasks to be executed
148
+ */
149
+ declare const tasks: (tasks: Task[]) => Promise<void>;
150
+
151
+ export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type Option, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, tasks, text };