@nshiab/setup-data-project 1.0.7

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 (541) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/esm/_dnt.shims.d.ts +6 -0
  4. package/esm/_dnt.shims.d.ts.map +1 -0
  5. package/esm/_dnt.shims.js +61 -0
  6. package/esm/helpers/createFolderStructure.d.ts +2 -0
  7. package/esm/helpers/createFolderStructure.d.ts.map +1 -0
  8. package/esm/helpers/createFolderStructure.js +49 -0
  9. package/esm/helpers/ensureAgents.d.ts +2 -0
  10. package/esm/helpers/ensureAgents.d.ts.map +1 -0
  11. package/esm/helpers/ensureAgents.js +92 -0
  12. package/esm/helpers/ensureEnvFile.d.ts +2 -0
  13. package/esm/helpers/ensureEnvFile.d.ts.map +1 -0
  14. package/esm/helpers/ensureEnvFile.js +14 -0
  15. package/esm/helpers/ensureGitignore.d.ts +2 -0
  16. package/esm/helpers/ensureGitignore.d.ts.map +1 -0
  17. package/esm/helpers/ensureGitignore.js +29 -0
  18. package/esm/helpers/ensureReadme.d.ts +2 -0
  19. package/esm/helpers/ensureReadme.d.ts.map +1 -0
  20. package/esm/helpers/ensureReadme.js +37 -0
  21. package/esm/helpers/getInstalledPackages.d.ts +2 -0
  22. package/esm/helpers/getInstalledPackages.d.ts.map +1 -0
  23. package/esm/helpers/getInstalledPackages.js +29 -0
  24. package/esm/helpers/getProjectTasks.d.ts +5 -0
  25. package/esm/helpers/getProjectTasks.d.ts.map +1 -0
  26. package/esm/helpers/getProjectTasks.js +12 -0
  27. package/esm/helpers/getRuntime.d.ts +5 -0
  28. package/esm/helpers/getRuntime.d.ts.map +1 -0
  29. package/esm/helpers/getRuntime.js +17 -0
  30. package/esm/helpers/gitignoreEntries.d.ts +2 -0
  31. package/esm/helpers/gitignoreEntries.d.ts.map +1 -0
  32. package/esm/helpers/gitignoreEntries.js +9 -0
  33. package/esm/helpers/handleFileConflict.d.ts +5 -0
  34. package/esm/helpers/handleFileConflict.d.ts.map +1 -0
  35. package/esm/helpers/handleFileConflict.js +51 -0
  36. package/esm/helpers/installPackagesAndFetchDocs.d.ts +8 -0
  37. package/esm/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
  38. package/esm/helpers/installPackagesAndFetchDocs.js +61 -0
  39. package/esm/helpers/packageOptions.d.ts +5 -0
  40. package/esm/helpers/packageOptions.d.ts.map +1 -0
  41. package/esm/helpers/packageOptions.js +5 -0
  42. package/esm/helpers/packageRegistry.d.ts +7 -0
  43. package/esm/helpers/packageRegistry.d.ts.map +1 -0
  44. package/esm/helpers/packageRegistry.js +62 -0
  45. package/esm/helpers/updateProjectConfig.d.ts +2 -0
  46. package/esm/helpers/updateProjectConfig.d.ts.map +1 -0
  47. package/esm/helpers/updateProjectConfig.js +36 -0
  48. package/esm/main.d.ts +3 -0
  49. package/esm/main.d.ts.map +1 -0
  50. package/esm/main.js +93 -0
  51. package/esm/package.json +3 -0
  52. package/npm/LICENSE +21 -0
  53. package/npm/README.md +25 -0
  54. package/npm/esm/_dnt.shims.d.ts +8 -0
  55. package/npm/esm/_dnt.shims.d.ts.map +1 -0
  56. package/npm/esm/_dnt.shims.js +62 -0
  57. package/npm/esm/_dnt_2.shims.d.ts +6 -0
  58. package/npm/esm/_dnt_2.shims.d.ts.map +1 -0
  59. package/npm/esm/_dnt_2.shims.js +61 -0
  60. package/npm/esm/helpers/createFolderStructure.d.ts +2 -0
  61. package/npm/esm/helpers/createFolderStructure.d.ts.map +1 -0
  62. package/npm/esm/helpers/createFolderStructure.js +49 -0
  63. package/npm/esm/helpers/ensureAgents.d.ts +2 -0
  64. package/npm/esm/helpers/ensureAgents.d.ts.map +1 -0
  65. package/npm/esm/helpers/ensureAgents.js +92 -0
  66. package/npm/esm/helpers/ensureEnvFile.d.ts +2 -0
  67. package/npm/esm/helpers/ensureEnvFile.d.ts.map +1 -0
  68. package/npm/esm/helpers/ensureEnvFile.js +14 -0
  69. package/npm/esm/helpers/ensureGitignore.d.ts +2 -0
  70. package/npm/esm/helpers/ensureGitignore.d.ts.map +1 -0
  71. package/npm/esm/helpers/ensureGitignore.js +29 -0
  72. package/npm/esm/helpers/ensureReadme.d.ts +2 -0
  73. package/npm/esm/helpers/ensureReadme.d.ts.map +1 -0
  74. package/npm/esm/helpers/ensureReadme.js +37 -0
  75. package/npm/esm/helpers/getInstalledPackages.d.ts +2 -0
  76. package/npm/esm/helpers/getInstalledPackages.d.ts.map +1 -0
  77. package/npm/esm/helpers/getInstalledPackages.js +29 -0
  78. package/npm/esm/helpers/getProjectTasks.d.ts +5 -0
  79. package/npm/esm/helpers/getProjectTasks.d.ts.map +1 -0
  80. package/npm/esm/helpers/getProjectTasks.js +12 -0
  81. package/npm/esm/helpers/getRuntime.d.ts +5 -0
  82. package/npm/esm/helpers/getRuntime.d.ts.map +1 -0
  83. package/npm/esm/helpers/getRuntime.js +17 -0
  84. package/npm/esm/helpers/gitignoreEntries.d.ts +2 -0
  85. package/npm/esm/helpers/gitignoreEntries.d.ts.map +1 -0
  86. package/npm/esm/helpers/gitignoreEntries.js +9 -0
  87. package/npm/esm/helpers/handleFileConflict.d.ts +5 -0
  88. package/npm/esm/helpers/handleFileConflict.d.ts.map +1 -0
  89. package/npm/esm/helpers/handleFileConflict.js +51 -0
  90. package/npm/esm/helpers/installPackagesAndFetchDocs.d.ts +8 -0
  91. package/npm/esm/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
  92. package/npm/esm/helpers/installPackagesAndFetchDocs.js +61 -0
  93. package/npm/esm/helpers/packageOptions.d.ts +5 -0
  94. package/npm/esm/helpers/packageOptions.d.ts.map +1 -0
  95. package/npm/esm/helpers/packageOptions.js +5 -0
  96. package/npm/esm/helpers/packageRegistry.d.ts +7 -0
  97. package/npm/esm/helpers/packageRegistry.d.ts.map +1 -0
  98. package/npm/esm/helpers/packageRegistry.js +62 -0
  99. package/npm/esm/helpers/updateProjectConfig.d.ts +2 -0
  100. package/npm/esm/helpers/updateProjectConfig.d.ts.map +1 -0
  101. package/npm/esm/helpers/updateProjectConfig.js +36 -0
  102. package/npm/esm/main.d.ts +3 -0
  103. package/npm/esm/main.d.ts.map +1 -0
  104. package/npm/esm/main.js +93 -0
  105. package/npm/esm/package.json +3 -0
  106. package/npm/node_modules/.package-lock.json +123 -0
  107. package/npm/node_modules/@clack/core/CHANGELOG.md +348 -0
  108. package/npm/node_modules/@clack/core/LICENSE +9 -0
  109. package/npm/node_modules/@clack/core/README.md +22 -0
  110. package/npm/node_modules/@clack/core/dist/index.d.mts +363 -0
  111. package/npm/node_modules/@clack/core/dist/index.mjs +17 -0
  112. package/npm/node_modules/@clack/core/dist/index.mjs.map +1 -0
  113. package/npm/node_modules/@clack/core/package.json +63 -0
  114. package/npm/node_modules/@clack/prompts/CHANGELOG.md +591 -0
  115. package/npm/node_modules/@clack/prompts/LICENSE +9 -0
  116. package/npm/node_modules/@clack/prompts/README.md +375 -0
  117. package/npm/node_modules/@clack/prompts/dist/index.d.mts +396 -0
  118. package/npm/node_modules/@clack/prompts/dist/index.mjs +144 -0
  119. package/npm/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
  120. package/npm/node_modules/@clack/prompts/package.json +68 -0
  121. package/npm/node_modules/@deno/shim-deno/LICENSE +20 -0
  122. package/npm/node_modules/@deno/shim-deno/README.md +30 -0
  123. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js +56 -0
  124. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js +92 -0
  125. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/consts.js +4 -0
  126. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js +44 -0
  127. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js +91 -0
  128. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js +37 -0
  129. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js +8 -0
  130. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/streams.js +122 -0
  131. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/test.d.ts +1 -0
  132. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/test.js +5 -0
  133. package/npm/node_modules/@deno/shim-deno/dist/deno/internal/version.js +5 -0
  134. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js +143 -0
  135. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js +19 -0
  136. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js +26 -0
  137. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/classes.js +10 -0
  138. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js +9 -0
  139. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/enums.js +5 -0
  140. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/addSignalListener.js +18 -0
  141. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js +22 -0
  142. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js +29 -0
  143. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js +29 -0
  144. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js +30 -0
  145. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js +30 -0
  146. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js +29 -0
  147. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js +37 -0
  148. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js +31 -0
  149. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/consoleSize.js +17 -0
  150. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js +27 -0
  151. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js +45 -0
  152. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js +45 -0
  153. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js +9 -0
  154. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js +14 -0
  155. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js +5 -0
  156. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js +10 -0
  157. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js +8 -0
  158. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js +8 -0
  159. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js +6 -0
  160. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js +44 -0
  161. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js +19 -0
  162. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js +10 -0
  163. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js +9 -0
  164. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js +8 -0
  165. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js +6 -0
  166. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/gid.js +10 -0
  167. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/hostname.js +32 -0
  168. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js +30 -0
  169. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js +16 -0
  170. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js +29 -0
  171. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js +29 -0
  172. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js +51 -0
  173. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js +49 -0
  174. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/loadavg.js +32 -0
  175. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js +42 -0
  176. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js +42 -0
  177. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js +11 -0
  178. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js +11 -0
  179. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js +14 -0
  180. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js +14 -0
  181. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js +5 -0
  182. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js +22 -0
  183. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js +45 -0
  184. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js +33 -0
  185. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js +31 -0
  186. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osRelease.js +9 -0
  187. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osUptime.js +9 -0
  188. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js +19 -0
  189. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js +26 -0
  190. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js +26 -0
  191. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js +19 -0
  192. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js +19 -0
  193. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js +29 -0
  194. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js +29 -0
  195. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js +34 -0
  196. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js +18 -0
  197. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js +41 -0
  198. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js +29 -0
  199. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js +29 -0
  200. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js +22 -0
  201. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSignalListener.js +12 -0
  202. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js +45 -0
  203. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js +9 -0
  204. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js +29 -0
  205. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js +41 -0
  206. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js +276 -0
  207. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js +9 -0
  208. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js +68 -0
  209. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js +42 -0
  210. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js +30 -0
  211. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js +30 -0
  212. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js +5 -0
  213. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js +45 -0
  214. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js +45 -0
  215. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/uid.js +10 -0
  216. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js +27 -0
  217. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js +35 -0
  218. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js +46 -0
  219. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js +45 -0
  220. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js +29 -0
  221. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js +52 -0
  222. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js +44 -0
  223. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/functions.js +234 -0
  224. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/main.js +21 -0
  225. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/types.js +3 -0
  226. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js +5 -0
  227. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js +38 -0
  228. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js +4 -0
  229. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js +47 -0
  230. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js +63 -0
  231. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js +8 -0
  232. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js +21 -0
  233. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js +5 -0
  234. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js +6 -0
  235. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js +5 -0
  236. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js +5 -0
  237. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js +12 -0
  238. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js +132 -0
  239. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js +10 -0
  240. package/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables.js +53 -0
  241. package/npm/node_modules/@deno/shim-deno/dist/deno/unstable/main.js +62 -0
  242. package/npm/node_modules/@deno/shim-deno/dist/deno.js +17 -0
  243. package/npm/node_modules/@deno/shim-deno/dist/index.d.ts +4762 -0
  244. package/npm/node_modules/@deno/shim-deno/dist/index.js +27 -0
  245. package/npm/node_modules/@deno/shim-deno/package.json +50 -0
  246. package/npm/node_modules/@deno/shim-deno-test/LICENSE +20 -0
  247. package/npm/node_modules/@deno/shim-deno-test/README.md +28 -0
  248. package/npm/node_modules/@deno/shim-deno-test/dist/definitions.d.ts +3 -0
  249. package/npm/node_modules/@deno/shim-deno-test/dist/definitions.js +5 -0
  250. package/npm/node_modules/@deno/shim-deno-test/dist/deno.types.gen.d.ts +626 -0
  251. package/npm/node_modules/@deno/shim-deno-test/dist/deno.types.gen.js +2 -0
  252. package/npm/node_modules/@deno/shim-deno-test/dist/index.d.ts +3 -0
  253. package/npm/node_modules/@deno/shim-deno-test/dist/index.js +21 -0
  254. package/npm/node_modules/@deno/shim-deno-test/dist/test.d.ts +3 -0
  255. package/npm/node_modules/@deno/shim-deno-test/dist/test.js +87 -0
  256. package/npm/node_modules/@deno/shim-deno-test/package.json +34 -0
  257. package/npm/node_modules/@types/node/LICENSE +21 -0
  258. package/npm/node_modules/@types/node/README.md +15 -0
  259. package/npm/node_modules/@types/node/assert/strict.d.ts +8 -0
  260. package/npm/node_modules/@types/node/assert.d.ts +1062 -0
  261. package/npm/node_modules/@types/node/async_hooks.d.ts +605 -0
  262. package/npm/node_modules/@types/node/buffer.buffer.d.ts +471 -0
  263. package/npm/node_modules/@types/node/buffer.d.ts +1936 -0
  264. package/npm/node_modules/@types/node/child_process.d.ts +1475 -0
  265. package/npm/node_modules/@types/node/cluster.d.ts +577 -0
  266. package/npm/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  267. package/npm/node_modules/@types/node/compatibility/index.d.ts +9 -0
  268. package/npm/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  269. package/npm/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  270. package/npm/node_modules/@types/node/console.d.ts +452 -0
  271. package/npm/node_modules/@types/node/constants.d.ts +21 -0
  272. package/npm/node_modules/@types/node/crypto.d.ts +4590 -0
  273. package/npm/node_modules/@types/node/dgram.d.ts +597 -0
  274. package/npm/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
  275. package/npm/node_modules/@types/node/dns/promises.d.ts +479 -0
  276. package/npm/node_modules/@types/node/dns.d.ts +871 -0
  277. package/npm/node_modules/@types/node/domain.d.ts +170 -0
  278. package/npm/node_modules/@types/node/events.d.ts +977 -0
  279. package/npm/node_modules/@types/node/fs/promises.d.ts +1270 -0
  280. package/npm/node_modules/@types/node/fs.d.ts +4375 -0
  281. package/npm/node_modules/@types/node/globals.d.ts +172 -0
  282. package/npm/node_modules/@types/node/globals.typedarray.d.ts +38 -0
  283. package/npm/node_modules/@types/node/http.d.ts +2049 -0
  284. package/npm/node_modules/@types/node/http2.d.ts +2631 -0
  285. package/npm/node_modules/@types/node/https.d.ts +578 -0
  286. package/npm/node_modules/@types/node/index.d.ts +93 -0
  287. package/npm/node_modules/@types/node/inspector.generated.d.ts +3966 -0
  288. package/npm/node_modules/@types/node/module.d.ts +539 -0
  289. package/npm/node_modules/@types/node/net.d.ts +1031 -0
  290. package/npm/node_modules/@types/node/os.d.ts +506 -0
  291. package/npm/node_modules/@types/node/package.json +140 -0
  292. package/npm/node_modules/@types/node/path.d.ts +200 -0
  293. package/npm/node_modules/@types/node/perf_hooks.d.ts +961 -0
  294. package/npm/node_modules/@types/node/process.d.ts +1961 -0
  295. package/npm/node_modules/@types/node/punycode.d.ts +117 -0
  296. package/npm/node_modules/@types/node/querystring.d.ts +152 -0
  297. package/npm/node_modules/@types/node/readline/promises.d.ts +162 -0
  298. package/npm/node_modules/@types/node/readline.d.ts +589 -0
  299. package/npm/node_modules/@types/node/repl.d.ts +430 -0
  300. package/npm/node_modules/@types/node/sea.d.ts +153 -0
  301. package/npm/node_modules/@types/node/stream/consumers.d.ts +38 -0
  302. package/npm/node_modules/@types/node/stream/promises.d.ts +90 -0
  303. package/npm/node_modules/@types/node/stream/web.d.ts +533 -0
  304. package/npm/node_modules/@types/node/stream.d.ts +1698 -0
  305. package/npm/node_modules/@types/node/string_decoder.d.ts +67 -0
  306. package/npm/node_modules/@types/node/test.d.ts +1787 -0
  307. package/npm/node_modules/@types/node/timers/promises.d.ts +108 -0
  308. package/npm/node_modules/@types/node/timers.d.ts +286 -0
  309. package/npm/node_modules/@types/node/tls.d.ts +1259 -0
  310. package/npm/node_modules/@types/node/trace_events.d.ts +197 -0
  311. package/npm/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  312. package/npm/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
  313. package/npm/node_modules/@types/node/ts5.6/index.d.ts +93 -0
  314. package/npm/node_modules/@types/node/tty.d.ts +208 -0
  315. package/npm/node_modules/@types/node/url.d.ts +964 -0
  316. package/npm/node_modules/@types/node/util.d.ts +2331 -0
  317. package/npm/node_modules/@types/node/v8.d.ts +809 -0
  318. package/npm/node_modules/@types/node/vm.d.ts +1001 -0
  319. package/npm/node_modules/@types/node/wasi.d.ts +181 -0
  320. package/npm/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  321. package/npm/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  322. package/npm/node_modules/@types/node/web-globals/events.d.ts +97 -0
  323. package/npm/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
  324. package/npm/node_modules/@types/node/worker_threads.d.ts +715 -0
  325. package/npm/node_modules/@types/node/zlib.d.ts +598 -0
  326. package/npm/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
  327. package/npm/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  328. package/npm/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
  329. package/npm/node_modules/fast-string-truncated-width/dist/types.js +2 -0
  330. package/npm/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
  331. package/npm/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  332. package/npm/node_modules/fast-string-truncated-width/license +21 -0
  333. package/npm/node_modules/fast-string-truncated-width/package.json +35 -0
  334. package/npm/node_modules/fast-string-truncated-width/readme.md +59 -0
  335. package/npm/node_modules/fast-string-width/dist/index.d.ts +4 -0
  336. package/npm/node_modules/fast-string-width/dist/index.js +14 -0
  337. package/npm/node_modules/fast-string-width/license +21 -0
  338. package/npm/node_modules/fast-string-width/package.json +34 -0
  339. package/npm/node_modules/fast-string-width/readme.md +42 -0
  340. package/npm/node_modules/fast-wrap-ansi/LICENSE +23 -0
  341. package/npm/node_modules/fast-wrap-ansi/README.md +26 -0
  342. package/npm/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
  343. package/npm/node_modules/fast-wrap-ansi/lib/main.js +219 -0
  344. package/npm/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
  345. package/npm/node_modules/fast-wrap-ansi/package.json +51 -0
  346. package/npm/node_modules/isexe/LICENSE.md +55 -0
  347. package/npm/node_modules/isexe/README.md +80 -0
  348. package/npm/node_modules/isexe/dist/commonjs/index.d.ts +14 -0
  349. package/npm/node_modules/isexe/dist/commonjs/index.d.ts.map +1 -0
  350. package/npm/node_modules/isexe/dist/commonjs/index.js +56 -0
  351. package/npm/node_modules/isexe/dist/commonjs/index.js.map +1 -0
  352. package/npm/node_modules/isexe/dist/commonjs/index.min.js +2 -0
  353. package/npm/node_modules/isexe/dist/commonjs/index.min.js.map +7 -0
  354. package/npm/node_modules/isexe/dist/commonjs/options.d.ts +32 -0
  355. package/npm/node_modules/isexe/dist/commonjs/options.d.ts.map +1 -0
  356. package/npm/node_modules/isexe/dist/commonjs/options.js +3 -0
  357. package/npm/node_modules/isexe/dist/commonjs/options.js.map +1 -0
  358. package/npm/node_modules/isexe/dist/commonjs/package.json +3 -0
  359. package/npm/node_modules/isexe/dist/commonjs/posix.d.ts +18 -0
  360. package/npm/node_modules/isexe/dist/commonjs/posix.d.ts.map +1 -0
  361. package/npm/node_modules/isexe/dist/commonjs/posix.js +67 -0
  362. package/npm/node_modules/isexe/dist/commonjs/posix.js.map +1 -0
  363. package/npm/node_modules/isexe/dist/commonjs/win32.d.ts +18 -0
  364. package/npm/node_modules/isexe/dist/commonjs/win32.d.ts.map +1 -0
  365. package/npm/node_modules/isexe/dist/commonjs/win32.js +63 -0
  366. package/npm/node_modules/isexe/dist/commonjs/win32.js.map +1 -0
  367. package/npm/node_modules/isexe/dist/esm/index.d.ts +14 -0
  368. package/npm/node_modules/isexe/dist/esm/index.d.ts.map +1 -0
  369. package/npm/node_modules/isexe/dist/esm/index.js +16 -0
  370. package/npm/node_modules/isexe/dist/esm/index.js.map +1 -0
  371. package/npm/node_modules/isexe/dist/esm/index.min.js +2 -0
  372. package/npm/node_modules/isexe/dist/esm/index.min.js.map +7 -0
  373. package/npm/node_modules/isexe/dist/esm/options.d.ts +32 -0
  374. package/npm/node_modules/isexe/dist/esm/options.d.ts.map +1 -0
  375. package/npm/node_modules/isexe/dist/esm/options.js +2 -0
  376. package/npm/node_modules/isexe/dist/esm/options.js.map +1 -0
  377. package/npm/node_modules/isexe/dist/esm/package.json +3 -0
  378. package/npm/node_modules/isexe/dist/esm/posix.d.ts +18 -0
  379. package/npm/node_modules/isexe/dist/esm/posix.d.ts.map +1 -0
  380. package/npm/node_modules/isexe/dist/esm/posix.js +62 -0
  381. package/npm/node_modules/isexe/dist/esm/posix.js.map +1 -0
  382. package/npm/node_modules/isexe/dist/esm/win32.d.ts +18 -0
  383. package/npm/node_modules/isexe/dist/esm/win32.d.ts.map +1 -0
  384. package/npm/node_modules/isexe/dist/esm/win32.js +58 -0
  385. package/npm/node_modules/isexe/dist/esm/win32.js.map +1 -0
  386. package/npm/node_modules/isexe/package.json +78 -0
  387. package/npm/node_modules/sisteransi/license +21 -0
  388. package/npm/node_modules/sisteransi/package.json +34 -0
  389. package/npm/node_modules/sisteransi/readme.md +113 -0
  390. package/npm/node_modules/sisteransi/src/index.js +58 -0
  391. package/npm/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  392. package/npm/node_modules/undici-types/LICENSE +21 -0
  393. package/npm/node_modules/undici-types/README.md +6 -0
  394. package/npm/node_modules/undici-types/agent.d.ts +31 -0
  395. package/npm/node_modules/undici-types/api.d.ts +43 -0
  396. package/npm/node_modules/undici-types/balanced-pool.d.ts +29 -0
  397. package/npm/node_modules/undici-types/cache.d.ts +36 -0
  398. package/npm/node_modules/undici-types/client.d.ts +108 -0
  399. package/npm/node_modules/undici-types/connector.d.ts +34 -0
  400. package/npm/node_modules/undici-types/content-type.d.ts +21 -0
  401. package/npm/node_modules/undici-types/cookies.d.ts +28 -0
  402. package/npm/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  403. package/npm/node_modules/undici-types/dispatcher.d.ts +256 -0
  404. package/npm/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  405. package/npm/node_modules/undici-types/errors.d.ts +149 -0
  406. package/npm/node_modules/undici-types/eventsource.d.ts +61 -0
  407. package/npm/node_modules/undici-types/fetch.d.ts +209 -0
  408. package/npm/node_modules/undici-types/file.d.ts +39 -0
  409. package/npm/node_modules/undici-types/filereader.d.ts +54 -0
  410. package/npm/node_modules/undici-types/formdata.d.ts +108 -0
  411. package/npm/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  412. package/npm/node_modules/undici-types/global-origin.d.ts +7 -0
  413. package/npm/node_modules/undici-types/handlers.d.ts +15 -0
  414. package/npm/node_modules/undici-types/header.d.ts +4 -0
  415. package/npm/node_modules/undici-types/index.d.ts +71 -0
  416. package/npm/node_modules/undici-types/interceptors.d.ts +17 -0
  417. package/npm/node_modules/undici-types/mock-agent.d.ts +50 -0
  418. package/npm/node_modules/undici-types/mock-client.d.ts +25 -0
  419. package/npm/node_modules/undici-types/mock-errors.d.ts +12 -0
  420. package/npm/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  421. package/npm/node_modules/undici-types/mock-pool.d.ts +25 -0
  422. package/npm/node_modules/undici-types/package.json +55 -0
  423. package/npm/node_modules/undici-types/patch.d.ts +33 -0
  424. package/npm/node_modules/undici-types/pool-stats.d.ts +19 -0
  425. package/npm/node_modules/undici-types/pool.d.ts +39 -0
  426. package/npm/node_modules/undici-types/proxy-agent.d.ts +28 -0
  427. package/npm/node_modules/undici-types/readable.d.ts +65 -0
  428. package/npm/node_modules/undici-types/retry-agent.d.ts +8 -0
  429. package/npm/node_modules/undici-types/retry-handler.d.ts +116 -0
  430. package/npm/node_modules/undici-types/util.d.ts +18 -0
  431. package/npm/node_modules/undici-types/webidl.d.ts +228 -0
  432. package/npm/node_modules/undici-types/websocket.d.ts +150 -0
  433. package/npm/node_modules/which/LICENSE +15 -0
  434. package/npm/node_modules/which/README.md +51 -0
  435. package/npm/node_modules/which/bin/which.js +52 -0
  436. package/npm/node_modules/which/lib/index.js +111 -0
  437. package/npm/node_modules/which/package.json +57 -0
  438. package/npm/package-lock.json +135 -0
  439. package/npm/package.json +30 -0
  440. package/npm/script/_dnt.shims.d.ts +8 -0
  441. package/npm/script/_dnt.shims.d.ts.map +1 -0
  442. package/npm/script/_dnt.shims.js +99 -0
  443. package/npm/script/_dnt_2.shims.d.ts +6 -0
  444. package/npm/script/_dnt_2.shims.d.ts.map +1 -0
  445. package/npm/script/_dnt_2.shims.js +65 -0
  446. package/npm/script/helpers/createFolderStructure.d.ts +2 -0
  447. package/npm/script/helpers/createFolderStructure.d.ts.map +1 -0
  448. package/npm/script/helpers/createFolderStructure.js +52 -0
  449. package/npm/script/helpers/ensureAgents.d.ts +2 -0
  450. package/npm/script/helpers/ensureAgents.d.ts.map +1 -0
  451. package/npm/script/helpers/ensureAgents.js +95 -0
  452. package/npm/script/helpers/ensureEnvFile.d.ts +2 -0
  453. package/npm/script/helpers/ensureEnvFile.d.ts.map +1 -0
  454. package/npm/script/helpers/ensureEnvFile.js +17 -0
  455. package/npm/script/helpers/ensureGitignore.d.ts +2 -0
  456. package/npm/script/helpers/ensureGitignore.d.ts.map +1 -0
  457. package/npm/script/helpers/ensureGitignore.js +32 -0
  458. package/npm/script/helpers/ensureReadme.d.ts +2 -0
  459. package/npm/script/helpers/ensureReadme.d.ts.map +1 -0
  460. package/npm/script/helpers/ensureReadme.js +40 -0
  461. package/npm/script/helpers/getInstalledPackages.d.ts +2 -0
  462. package/npm/script/helpers/getInstalledPackages.d.ts.map +1 -0
  463. package/npm/script/helpers/getInstalledPackages.js +32 -0
  464. package/npm/script/helpers/getProjectTasks.d.ts +5 -0
  465. package/npm/script/helpers/getProjectTasks.d.ts.map +1 -0
  466. package/npm/script/helpers/getProjectTasks.js +15 -0
  467. package/npm/script/helpers/getRuntime.d.ts +5 -0
  468. package/npm/script/helpers/getRuntime.d.ts.map +1 -0
  469. package/npm/script/helpers/getRuntime.js +57 -0
  470. package/npm/script/helpers/gitignoreEntries.d.ts +2 -0
  471. package/npm/script/helpers/gitignoreEntries.d.ts.map +1 -0
  472. package/npm/script/helpers/gitignoreEntries.js +12 -0
  473. package/npm/script/helpers/handleFileConflict.d.ts +5 -0
  474. package/npm/script/helpers/handleFileConflict.d.ts.map +1 -0
  475. package/npm/script/helpers/handleFileConflict.js +91 -0
  476. package/npm/script/helpers/installPackagesAndFetchDocs.d.ts +8 -0
  477. package/npm/script/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
  478. package/npm/script/helpers/installPackagesAndFetchDocs.js +98 -0
  479. package/npm/script/helpers/packageOptions.d.ts +5 -0
  480. package/npm/script/helpers/packageOptions.d.ts.map +1 -0
  481. package/npm/script/helpers/packageOptions.js +8 -0
  482. package/npm/script/helpers/packageRegistry.d.ts +7 -0
  483. package/npm/script/helpers/packageRegistry.d.ts.map +1 -0
  484. package/npm/script/helpers/packageRegistry.js +65 -0
  485. package/npm/script/helpers/updateProjectConfig.d.ts +2 -0
  486. package/npm/script/helpers/updateProjectConfig.d.ts.map +1 -0
  487. package/npm/script/helpers/updateProjectConfig.js +39 -0
  488. package/npm/script/main.d.ts +3 -0
  489. package/npm/script/main.d.ts.map +1 -0
  490. package/npm/script/main.js +98 -0
  491. package/npm/script/package.json +3 -0
  492. package/package.json +27 -0
  493. package/script/_dnt.shims.d.ts +6 -0
  494. package/script/_dnt.shims.d.ts.map +1 -0
  495. package/script/_dnt.shims.js +65 -0
  496. package/script/helpers/createFolderStructure.d.ts +2 -0
  497. package/script/helpers/createFolderStructure.d.ts.map +1 -0
  498. package/script/helpers/createFolderStructure.js +52 -0
  499. package/script/helpers/ensureAgents.d.ts +2 -0
  500. package/script/helpers/ensureAgents.d.ts.map +1 -0
  501. package/script/helpers/ensureAgents.js +95 -0
  502. package/script/helpers/ensureEnvFile.d.ts +2 -0
  503. package/script/helpers/ensureEnvFile.d.ts.map +1 -0
  504. package/script/helpers/ensureEnvFile.js +17 -0
  505. package/script/helpers/ensureGitignore.d.ts +2 -0
  506. package/script/helpers/ensureGitignore.d.ts.map +1 -0
  507. package/script/helpers/ensureGitignore.js +32 -0
  508. package/script/helpers/ensureReadme.d.ts +2 -0
  509. package/script/helpers/ensureReadme.d.ts.map +1 -0
  510. package/script/helpers/ensureReadme.js +40 -0
  511. package/script/helpers/getInstalledPackages.d.ts +2 -0
  512. package/script/helpers/getInstalledPackages.d.ts.map +1 -0
  513. package/script/helpers/getInstalledPackages.js +32 -0
  514. package/script/helpers/getProjectTasks.d.ts +5 -0
  515. package/script/helpers/getProjectTasks.d.ts.map +1 -0
  516. package/script/helpers/getProjectTasks.js +15 -0
  517. package/script/helpers/getRuntime.d.ts +5 -0
  518. package/script/helpers/getRuntime.d.ts.map +1 -0
  519. package/script/helpers/getRuntime.js +57 -0
  520. package/script/helpers/gitignoreEntries.d.ts +2 -0
  521. package/script/helpers/gitignoreEntries.d.ts.map +1 -0
  522. package/script/helpers/gitignoreEntries.js +12 -0
  523. package/script/helpers/handleFileConflict.d.ts +5 -0
  524. package/script/helpers/handleFileConflict.d.ts.map +1 -0
  525. package/script/helpers/handleFileConflict.js +91 -0
  526. package/script/helpers/installPackagesAndFetchDocs.d.ts +8 -0
  527. package/script/helpers/installPackagesAndFetchDocs.d.ts.map +1 -0
  528. package/script/helpers/installPackagesAndFetchDocs.js +98 -0
  529. package/script/helpers/packageOptions.d.ts +5 -0
  530. package/script/helpers/packageOptions.d.ts.map +1 -0
  531. package/script/helpers/packageOptions.js +8 -0
  532. package/script/helpers/packageRegistry.d.ts +7 -0
  533. package/script/helpers/packageRegistry.d.ts.map +1 -0
  534. package/script/helpers/packageRegistry.js +65 -0
  535. package/script/helpers/updateProjectConfig.d.ts +2 -0
  536. package/script/helpers/updateProjectConfig.d.ts.map +1 -0
  537. package/script/helpers/updateProjectConfig.js +39 -0
  538. package/script/main.d.ts +3 -0
  539. package/script/main.d.ts.map +1 -0
  540. package/script/main.js +98 -0
  541. package/script/package.json +3 -0
@@ -0,0 +1,396 @@
1
+ import { State, AutocompletePrompt, DateFormat } from '@clack/core';
2
+ export { ClackSettings, DateFormat, isCancel, settings, updateSettings } from '@clack/core';
3
+ import { Readable, Writable } from 'node:stream';
4
+
5
+ declare const unicode: boolean;
6
+ declare const isCI: () => boolean;
7
+ declare const isTTY: (output: Writable) => boolean;
8
+ declare const unicodeOr: (c: string, fallback: string) => string;
9
+ declare const S_STEP_ACTIVE: string;
10
+ declare const S_STEP_CANCEL: string;
11
+ declare const S_STEP_ERROR: string;
12
+ declare const S_STEP_SUBMIT: string;
13
+ declare const S_BAR_START: string;
14
+ declare const S_BAR: string;
15
+ declare const S_BAR_END: string;
16
+ declare const S_BAR_START_RIGHT: string;
17
+ declare const S_BAR_END_RIGHT: string;
18
+ declare const S_RADIO_ACTIVE: string;
19
+ declare const S_RADIO_INACTIVE: string;
20
+ declare const S_CHECKBOX_ACTIVE: string;
21
+ declare const S_CHECKBOX_SELECTED: string;
22
+ declare const S_CHECKBOX_INACTIVE: string;
23
+ declare const S_PASSWORD_MASK: string;
24
+ declare const S_BAR_H: string;
25
+ declare const S_CORNER_TOP_RIGHT: string;
26
+ declare const S_CONNECT_LEFT: string;
27
+ declare const S_CORNER_BOTTOM_RIGHT: string;
28
+ declare const S_CORNER_BOTTOM_LEFT: string;
29
+ declare const S_CORNER_TOP_LEFT: string;
30
+ declare const S_INFO: string;
31
+ declare const S_SUCCESS: string;
32
+ declare const S_WARN: string;
33
+ declare const S_ERROR: string;
34
+ declare const symbol: (state: State) => string;
35
+ declare const symbolBar: (state: State) => string;
36
+ interface CommonOptions {
37
+ input?: Readable;
38
+ output?: Writable;
39
+ signal?: AbortSignal;
40
+ withGuide?: boolean;
41
+ }
42
+
43
+ type Primitive = Readonly<string | boolean | number>;
44
+ type Option<Value> = Value extends Primitive ? {
45
+ /**
46
+ * Internal data for this option.
47
+ */
48
+ value: Value;
49
+ /**
50
+ * The optional, user-facing text for this option.
51
+ *
52
+ * By default, the `value` is converted to a string.
53
+ */
54
+ label?: string;
55
+ /**
56
+ * An optional hint to display to the user when
57
+ * this option might be selected.
58
+ *
59
+ * By default, no `hint` is displayed.
60
+ */
61
+ hint?: string;
62
+ /**
63
+ * Whether this option is disabled.
64
+ * Disabled options are visible but cannot be selected.
65
+ *
66
+ * By default, options are not disabled.
67
+ */
68
+ disabled?: boolean;
69
+ } : {
70
+ /**
71
+ * Internal data for this option.
72
+ */
73
+ value: Value;
74
+ /**
75
+ * Required. The user-facing text for this option.
76
+ */
77
+ label: string;
78
+ /**
79
+ * An optional hint to display to the user when
80
+ * this option might be selected.
81
+ *
82
+ * By default, no `hint` is displayed.
83
+ */
84
+ hint?: string;
85
+ /**
86
+ * Whether this option is disabled.
87
+ * Disabled options are visible but cannot be selected.
88
+ *
89
+ * By default, options are not disabled.
90
+ */
91
+ disabled?: boolean;
92
+ };
93
+ interface SelectOptions<Value> extends CommonOptions {
94
+ message: string;
95
+ options: Option<Value>[];
96
+ initialValue?: Value;
97
+ maxItems?: number;
98
+ }
99
+ declare const select: <Value>(opts: SelectOptions<Value>) => Promise<Value | symbol>;
100
+
101
+ interface AutocompleteSharedOptions<Value> extends CommonOptions {
102
+ /**
103
+ * The message to display to the user.
104
+ */
105
+ message: string;
106
+ /**
107
+ * Available options for the autocomplete prompt.
108
+ */
109
+ options: Option<Value>[] | ((this: AutocompletePrompt<Option<Value>>) => Option<Value>[]);
110
+ /**
111
+ * Maximum number of items to display at once.
112
+ */
113
+ maxItems?: number;
114
+ /**
115
+ * Placeholder text to display when no input is provided.
116
+ */
117
+ placeholder?: string;
118
+ /**
119
+ * Validates the value
120
+ */
121
+ validate?: (value: Value | Value[] | undefined) => string | Error | undefined;
122
+ /**
123
+ * Custom filter function to match options against search input.
124
+ * If not provided, a default filter that matches label, hint, and value is used.
125
+ */
126
+ filter?: (search: string, option: Option<Value>) => boolean;
127
+ }
128
+ interface AutocompleteOptions<Value> extends AutocompleteSharedOptions<Value> {
129
+ /**
130
+ * The initial selected value.
131
+ */
132
+ initialValue?: Value;
133
+ /**
134
+ * The initial user input
135
+ */
136
+ initialUserInput?: string;
137
+ }
138
+ declare const autocomplete: <Value>(opts: AutocompleteOptions<Value>) => Promise<Value | symbol>;
139
+ interface AutocompleteMultiSelectOptions<Value> extends AutocompleteSharedOptions<Value> {
140
+ /**
141
+ * The initial selected values
142
+ */
143
+ initialValues?: Value[];
144
+ /**
145
+ * If true, at least one option must be selected
146
+ */
147
+ required?: boolean;
148
+ }
149
+ /**
150
+ * Integrated autocomplete multiselect - combines type-ahead filtering with multiselect in one UI
151
+ */
152
+ declare const autocompleteMultiselect: <Value>(opts: AutocompleteMultiSelectOptions<Value>) => Promise<Value[] | symbol>;
153
+
154
+ type BoxAlignment = 'left' | 'center' | 'right';
155
+ interface BoxOptions extends CommonOptions {
156
+ contentAlign?: BoxAlignment;
157
+ titleAlign?: BoxAlignment;
158
+ width?: number | 'auto';
159
+ titlePadding?: number;
160
+ contentPadding?: number;
161
+ rounded?: boolean;
162
+ formatBorder?: (text: string) => string;
163
+ }
164
+ declare const box: (message?: string, title?: string, opts?: BoxOptions) => void;
165
+
166
+ interface ConfirmOptions extends CommonOptions {
167
+ message: string;
168
+ active?: string;
169
+ inactive?: string;
170
+ initialValue?: boolean;
171
+ vertical?: boolean;
172
+ }
173
+ declare const confirm: (opts: ConfirmOptions) => Promise<boolean | symbol>;
174
+
175
+ interface DateOptions extends CommonOptions {
176
+ message: string;
177
+ format?: DateFormat;
178
+ locale?: string;
179
+ defaultValue?: Date;
180
+ initialValue?: Date;
181
+ minDate?: Date;
182
+ maxDate?: Date;
183
+ validate?: (value: Date | undefined) => string | Error | undefined;
184
+ }
185
+ declare const date: (opts: DateOptions) => Promise<Date | symbol>;
186
+
187
+ type Prettify<T> = {
188
+ [P in keyof T]: T[P];
189
+ } & {};
190
+ type PromptGroupAwaitedReturn<T> = {
191
+ [P in keyof T]: Exclude<Awaited<T[P]>, symbol>;
192
+ };
193
+ interface PromptGroupOptions<T> {
194
+ /**
195
+ * Control how the group can be canceled
196
+ * if one of the prompts is canceled.
197
+ */
198
+ onCancel?: (opts: {
199
+ results: Prettify<Partial<PromptGroupAwaitedReturn<T>>>;
200
+ }) => void;
201
+ }
202
+ type PromptGroup<T> = {
203
+ [P in keyof T]: (opts: {
204
+ results: Prettify<Partial<PromptGroupAwaitedReturn<Omit<T, P>>>>;
205
+ }) => undefined | Promise<T[P] | undefined>;
206
+ };
207
+ /**
208
+ * Define a group of prompts to be displayed
209
+ * and return a results of objects within the group
210
+ */
211
+ declare const group: <T>(prompts: PromptGroup<T>, opts?: PromptGroupOptions<T>) => Promise<Prettify<PromptGroupAwaitedReturn<T>>>;
212
+
213
+ interface GroupMultiSelectOptions<Value> extends CommonOptions {
214
+ message: string;
215
+ options: Record<string, Option<Value>[]>;
216
+ initialValues?: Value[];
217
+ required?: boolean;
218
+ cursorAt?: Value;
219
+ selectableGroups?: boolean;
220
+ groupSpacing?: number;
221
+ }
222
+ declare const groupMultiselect: <Value>(opts: GroupMultiSelectOptions<Value>) => Promise<Value[] | symbol>;
223
+
224
+ interface LimitOptionsParams<TOption> extends CommonOptions {
225
+ options: TOption[];
226
+ cursor: number;
227
+ style: (option: TOption, active: boolean) => string;
228
+ maxItems?: number;
229
+ columnPadding?: number;
230
+ rowPadding?: number;
231
+ }
232
+ declare const limitOptions: <TOption>({ cursor, options, style, output, maxItems, columnPadding, rowPadding, }: LimitOptionsParams<TOption>) => string[];
233
+
234
+ interface LogMessageOptions extends CommonOptions {
235
+ symbol?: string;
236
+ spacing?: number;
237
+ secondarySymbol?: string;
238
+ }
239
+ declare const log: {
240
+ message: (message?: string | string[], { symbol, secondarySymbol, output, spacing, withGuide, }?: LogMessageOptions) => void;
241
+ info: (message: string, opts?: LogMessageOptions) => void;
242
+ success: (message: string, opts?: LogMessageOptions) => void;
243
+ step: (message: string, opts?: LogMessageOptions) => void;
244
+ warn: (message: string, opts?: LogMessageOptions) => void;
245
+ /** alias for `log.warn()`. */
246
+ warning: (message: string, opts?: LogMessageOptions) => void;
247
+ error: (message: string, opts?: LogMessageOptions) => void;
248
+ };
249
+
250
+ declare const cancel: (message?: string, opts?: CommonOptions) => void;
251
+ declare const intro: (title?: string, opts?: CommonOptions) => void;
252
+ declare const outro: (message?: string, opts?: CommonOptions) => void;
253
+
254
+ interface TextOptions extends CommonOptions {
255
+ message: string;
256
+ placeholder?: string;
257
+ defaultValue?: string;
258
+ initialValue?: string;
259
+ validate?: (value: string | undefined) => string | Error | undefined;
260
+ }
261
+ declare const text: (opts: TextOptions) => Promise<string | symbol>;
262
+
263
+ interface MultiLineOptions extends TextOptions {
264
+ showSubmit?: boolean;
265
+ }
266
+ declare const multiline: (opts: MultiLineOptions) => Promise<string | symbol>;
267
+
268
+ interface MultiSelectOptions<Value> extends CommonOptions {
269
+ message: string;
270
+ options: Option<Value>[];
271
+ initialValues?: Value[];
272
+ maxItems?: number;
273
+ required?: boolean;
274
+ cursorAt?: Value;
275
+ }
276
+ declare const multiselect: <Value>(opts: MultiSelectOptions<Value>) => Promise<Value[] | symbol>;
277
+
278
+ type FormatFn = (line: string) => string;
279
+ interface NoteOptions extends CommonOptions {
280
+ format?: FormatFn;
281
+ }
282
+ declare const note: (message?: string, title?: string, opts?: NoteOptions) => void;
283
+
284
+ interface PasswordOptions extends CommonOptions {
285
+ message: string;
286
+ mask?: string;
287
+ validate?: (value: string | undefined) => string | Error | undefined;
288
+ clearOnError?: boolean;
289
+ }
290
+ declare const password: (opts: PasswordOptions) => Promise<string | symbol>;
291
+
292
+ interface PathOptions extends CommonOptions {
293
+ root?: string;
294
+ directory?: boolean;
295
+ initialValue?: string;
296
+ message: string;
297
+ validate?: (value: string | undefined) => string | Error | undefined;
298
+ }
299
+ declare const path: (opts: PathOptions) => Promise<string | symbol>;
300
+
301
+ interface SpinnerOptions extends CommonOptions {
302
+ indicator?: 'dots' | 'timer';
303
+ onCancel?: () => void;
304
+ cancelMessage?: string;
305
+ errorMessage?: string;
306
+ frames?: string[];
307
+ delay?: number;
308
+ styleFrame?: (frame: string) => string;
309
+ }
310
+ interface SpinnerResult {
311
+ start(msg?: string): void;
312
+ stop(msg?: string): void;
313
+ cancel(msg?: string): void;
314
+ error(msg?: string): void;
315
+ message(msg?: string): void;
316
+ clear(): void;
317
+ readonly isCancelled: boolean;
318
+ }
319
+ declare const spinner: ({ indicator, onCancel, output, cancelMessage, errorMessage, frames, delay, signal, ...opts }?: SpinnerOptions) => SpinnerResult;
320
+
321
+ interface ProgressOptions extends SpinnerOptions {
322
+ style?: 'light' | 'heavy' | 'block';
323
+ max?: number;
324
+ size?: number;
325
+ }
326
+ interface ProgressResult extends SpinnerResult {
327
+ advance(step?: number, msg?: string): void;
328
+ }
329
+ declare function progress({ style, max: userMax, size: userSize, ...spinnerOptions }?: ProgressOptions): ProgressResult;
330
+
331
+ interface SelectKeyOptions<Value extends string> extends CommonOptions {
332
+ message: string;
333
+ options: Option<Value>[];
334
+ initialValue?: Value;
335
+ caseSensitive?: boolean;
336
+ }
337
+ declare const selectKey: <Value extends string>(opts: SelectKeyOptions<Value>) => Promise<Value | symbol>;
338
+
339
+ declare const stream: {
340
+ message: (iterable: Iterable<string> | AsyncIterable<string>, { symbol }?: LogMessageOptions) => Promise<void>;
341
+ info: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
342
+ success: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
343
+ step: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
344
+ warn: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
345
+ /** alias for `log.warn()`. */
346
+ warning: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
347
+ error: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
348
+ };
349
+
350
+ type Task = {
351
+ /**
352
+ * Task title
353
+ */
354
+ title: string;
355
+ /**
356
+ * Task function
357
+ */
358
+ task: (message: (string: string) => void) => string | Promise<string> | void | Promise<void>;
359
+ /**
360
+ * If enabled === false the task will be skipped
361
+ */
362
+ enabled?: boolean;
363
+ };
364
+ /**
365
+ * Define a group of tasks to be executed
366
+ */
367
+ declare const tasks: (tasks: Task[], opts?: CommonOptions) => Promise<void>;
368
+
369
+ interface TaskLogOptions extends CommonOptions {
370
+ title: string;
371
+ limit?: number;
372
+ spacing?: number;
373
+ retainLog?: boolean;
374
+ }
375
+ interface TaskLogMessageOptions {
376
+ raw?: boolean;
377
+ }
378
+ interface TaskLogCompletionOptions {
379
+ showLog?: boolean;
380
+ }
381
+ /**
382
+ * Renders a log which clears on success and remains on failure
383
+ */
384
+ declare const taskLog: (opts: TaskLogOptions) => {
385
+ message(msg: string, mopts?: TaskLogMessageOptions): void;
386
+ group(name: string): {
387
+ message(msg: string, mopts?: TaskLogMessageOptions): void;
388
+ error(message: string): void;
389
+ success(message: string): void;
390
+ };
391
+ error(message: string, opts?: TaskLogCompletionOptions): void;
392
+ success(message: string, opts?: TaskLogCompletionOptions): void;
393
+ };
394
+
395
+ export { S_BAR, S_BAR_END, S_BAR_END_RIGHT, S_BAR_H, S_BAR_START, S_BAR_START_RIGHT, S_CHECKBOX_ACTIVE, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED, S_CONNECT_LEFT, S_CORNER_BOTTOM_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_TOP_LEFT, S_CORNER_TOP_RIGHT, S_ERROR, S_INFO, S_PASSWORD_MASK, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_SUCCESS, S_WARN, autocomplete, autocompleteMultiselect, box, cancel, confirm, date, group, groupMultiselect, intro, isCI, isTTY, limitOptions, log, multiline, multiselect, note, outro, password, path, progress, select, selectKey, spinner, stream, symbol, symbolBar, taskLog, tasks, text, unicode, unicodeOr };
396
+ export type { AutocompleteMultiSelectOptions, AutocompleteOptions, BoxAlignment, BoxOptions, CommonOptions, ConfirmOptions, DateOptions, GroupMultiSelectOptions, LimitOptionsParams, LogMessageOptions, MultiLineOptions, MultiSelectOptions, NoteOptions, Option, PasswordOptions, PathOptions, ProgressOptions, ProgressResult, PromptGroup, PromptGroupAwaitedReturn, PromptGroupOptions, SelectKeyOptions, SelectOptions, SpinnerOptions, SpinnerResult, Task, TaskLogCompletionOptions, TaskLogMessageOptions, TaskLogOptions, TextOptions };
@@ -0,0 +1,144 @@
1
+ import{getColumns as X,getRows as Bt,AutocompletePrompt as vt,settings as _,ConfirmPrompt as Lt,wrapTextWithPrefix as O,DatePrompt as Dt,isCancel as Wt,GroupMultiSelectPrompt as Ft,MultiLinePrompt as Ht,MultiSelectPrompt as Ut,PasswordPrompt as Kt,block as qt,SelectPrompt as Jt,SelectKeyPrompt as Yt,TextPrompt as Xt}from"@clack/core";export{isCancel,settings,updateSettings}from"@clack/core";import{styleText as e,stripVTControlCharacters as nt}from"node:util";import j from"node:process";import{wrapAnsi as q}from"fast-wrap-ansi";import k from"fast-string-width";import{existsSync as zt,lstatSync as wt,readdirSync as Qt}from"node:fs";import{dirname as bt,join as Zt}from"node:path";import{cursor as St,erase as Ct}from"sisteransi";function te(){return j.platform!=="win32"?j.env.TERM!=="linux":!!j.env.CI||!!j.env.WT_SESSION||!!j.env.TERMINUS_SUBLIME||j.env.ConEmuTask==="{cmd::Cmder}"||j.env.TERM_PROGRAM==="Terminus-Sublime"||j.env.TERM_PROGRAM==="vscode"||j.env.TERM==="xterm-256color"||j.env.TERM==="alacritty"||j.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const tt=te(),at=()=>process.env.CI==="true",Tt=t=>t.isTTY===!0,w=(t,r)=>tt?t:r,_t=w("\u25C6","*"),ot=w("\u25A0","x"),ut=w("\u25B2","x"),F=w("\u25C7","o"),lt=w("\u250C","T"),$=w("\u2502","|"),E=w("\u2514","\u2014"),It=w("\u2510","T"),Et=w("\u2518","\u2014"),z=w("\u25CF",">"),H=w("\u25CB"," "),et=w("\u25FB","[\u2022]"),U=w("\u25FC","[+]"),J=w("\u25FB","[ ]"),Gt=w("\u25AA","\u2022"),st=w("\u2500","-"),ct=w("\u256E","+"),xt=w("\u251C","+"),$t=w("\u256F","+"),dt=w("\u2570","+"),Ot=w("\u256D","+"),ht=w("\u25CF","\u2022"),pt=w("\u25C6","*"),mt=w("\u25B2","!"),gt=w("\u25A0","x"),M=t=>{switch(t){case"initial":case"active":return e("cyan",_t);case"cancel":return e("red",ot);case"error":return e("yellow",ut);case"submit":return e("green",F)}},yt=t=>{switch(t){case"initial":case"active":return e("cyan",$);case"cancel":return e("red",$);case"error":return e("yellow",$);case"submit":return e("green",$)}},ee=(t,r,s,i,u)=>{let n=r,o=0;for(let c=s;c<i;c++){const a=t[c];if(n=n-a.length,o++,n<=u)break}return{lineCount:n,removals:o}},Y=({cursor:t,options:r,style:s,output:i=process.stdout,maxItems:u=Number.POSITIVE_INFINITY,columnPadding:n=0,rowPadding:o=4})=>{const c=X(i)-n,a=Bt(i),l=e("dim","..."),d=Math.max(a-o,0),y=Math.max(Math.min(u,d),5);let p=0;t>=y-3&&(p=Math.max(Math.min(t-y+3,r.length-y),0));let m=y<r.length&&p>0,g=y<r.length&&p+y<r.length;const S=Math.min(p+y,r.length),h=[];let f=0;m&&f++,g&&f++;const v=p+(m?1:0),T=S-(g?1:0);for(let b=v;b<T;b++){const G=q(s(r[b],b===t),c,{hard:!0,trim:!1}).split(`
2
+ `);h.push(G),f+=G.length}if(f>d){let b=0,G=0,x=f;const A=t-v,P=(N,D)=>ee(h,x,N,D,d);m?({lineCount:x,removals:b}=P(0,A),x>d&&({lineCount:x,removals:G}=P(A+1,h.length))):({lineCount:x,removals:G}=P(A+1,h.length),x>d&&({lineCount:x,removals:b}=P(0,A))),b>0&&(m=!0,h.splice(0,b)),G>0&&(g=!0,h.splice(h.length-G,G))}const C=[];m&&C.push(l);for(const b of h)for(const G of b)C.push(G);return g&&C.push(l),C};function Mt(t){return t.label??String(t.value??"")}function Rt(t,r){if(!t)return!0;const s=(r.label??String(r.value??"")).toLowerCase(),i=(r.hint??"").toLowerCase(),u=String(r.value).toLowerCase(),n=t.toLowerCase();return s.includes(n)||i.includes(n)||u.includes(n)}function se(t,r){const s=[];for(const i of r)t.includes(i.value)&&s.push(i);return s}const At=t=>new vt({options:t.options,initialValue:t.initialValue?[t.initialValue]:void 0,initialUserInput:t.initialUserInput,placeholder:t.placeholder,filter:t.filter??((r,s)=>Rt(r,s)),signal:t.signal,input:t.input,output:t.output,validate:t.validate,render(){const r=t.withGuide??_.withGuide,s=r?[`${e("gray",$)}`,`${M(this.state)} ${t.message}`]:[`${M(this.state)} ${t.message}`],i=this.userInput,u=this.options,n=t.placeholder,o=i===""&&n!==void 0,c=(a,l)=>{const d=Mt(a),y=a.hint&&a.value===this.focusedValue?e("dim",` (${a.hint})`):"";switch(l){case"active":return`${e("green",z)} ${d}${y}`;case"inactive":return`${e("dim",H)} ${e("dim",d)}`;case"disabled":return`${e("gray",H)} ${e(["strikethrough","gray"],d)}`}};switch(this.state){case"submit":{const a=se(this.selectedValues,u),l=a.length>0?` ${e("dim",a.map(Mt).join(", "))}`:"",d=r?e("gray",$):"";return`${s.join(`
3
+ `)}
4
+ ${d}${l}`}case"cancel":{const a=i?` ${e(["strikethrough","dim"],i)}`:"",l=r?e("gray",$):"";return`${s.join(`
5
+ `)}
6
+ ${l}${a}`}default:{const a=this.state==="error"?"yellow":"cyan",l=r?`${e(a,$)} `:"",d=r?e(a,E):"";let y="";if(this.isNavigating||o){const v=o?n:i;y=v!==""?` ${e("dim",v)}`:""}else y=` ${this.userInputWithCursor}`;const p=this.filteredOptions.length!==u.length?e("dim",` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"",m=this.filteredOptions.length===0&&i?[`${l}${e("yellow","No matches found")}`]:[],g=this.state==="error"?[`${l}${e("yellow",this.error)}`]:[];r&&s.push(`${l.trimEnd()}`),s.push(`${l}${e("dim","Search:")}${y}${p}`,...m,...g);const S=[`${e("dim","\u2191/\u2193")} to select`,`${e("dim","Enter:")} confirm`,`${e("dim","Type:")} to search`],h=[`${l}${S.join(" \u2022 ")}`,d],f=this.filteredOptions.length===0?[]:Y({cursor:this.cursor,options:this.filteredOptions,columnPadding:r?3:0,rowPadding:s.length+h.length,style:(v,T)=>c(v,v.disabled?"disabled":T?"active":"inactive"),maxItems:t.maxItems,output:t.output});return[...s,...f.map(v=>`${l}${v}`),...h].join(`
7
+ `)}}}}).prompt(),ie=t=>{const r=(i,u,n,o)=>{const c=n.includes(i.value),a=i.label??String(i.value??""),l=i.hint&&o!==void 0&&i.value===o?e("dim",` (${i.hint})`):"",d=c?e("green",U):e("dim",J);return i.disabled?`${e("gray",J)} ${e(["strikethrough","gray"],a)}`:u?`${d} ${a}${l}`:`${d} ${e("dim",a)}`},s=new vt({options:t.options,multiple:!0,placeholder:t.placeholder,filter:t.filter??((i,u)=>Rt(i,u)),validate:()=>{if(t.required&&s.selectedValues.length===0)return"Please select at least one item"},initialValue:t.initialValues,signal:t.signal,input:t.input,output:t.output,render(){const i=t.withGuide??_.withGuide,u=`${i?`${e("gray",$)}
8
+ `:""}${M(this.state)} ${t.message}
9
+ `,n=this.userInput,o=t.placeholder,c=n===""&&o!==void 0,a=this.isNavigating||c?e("dim",c?o:n):this.userInputWithCursor,l=this.options,d=this.filteredOptions.length!==l.length?e("dim",` (${this.filteredOptions.length} match${this.filteredOptions.length===1?"":"es"})`):"";switch(this.state){case"submit":return`${u}${i?`${e("gray",$)} `:""}${e("dim",`${this.selectedValues.length} items selected`)}`;case"cancel":return`${u}${i?`${e("gray",$)} `:""}${e(["strikethrough","dim"],n)}`;default:{const y=this.state==="error"?"yellow":"cyan",p=i?`${e(y,$)} `:"",m=i?e(y,E):"",g=[`${e("dim","\u2191/\u2193")} to navigate`,`${e("dim",this.isNavigating?"Space/Tab:":"Tab:")} select`,`${e("dim","Enter:")} confirm`,`${e("dim","Type:")} to search`],S=this.filteredOptions.length===0&&n?[`${p}${e("yellow","No matches found")}`]:[],h=this.state==="error"?[`${p}${e("yellow",this.error)}`]:[],f=[...`${u}${i?e(y,$):""}`.split(`
10
+ `),`${p}${e("dim","Search:")} ${a}${d}`,...S,...h],v=[`${p}${g.join(" \u2022 ")}`,m],T=Y({cursor:this.cursor,options:this.filteredOptions,style:(C,b)=>r(C,b,this.selectedValues,this.focusedValue),maxItems:t.maxItems,output:t.output,rowPadding:f.length+v.length});return[...f,...T.map(C=>`${p}${C}`),...v].join(`
11
+ `)}}}});return s.prompt()},re=[Ot,ct,dt,$t],ne=[lt,It,E,Et];function Pt(t,r,s,i){let u=s,n=s;return i==="center"?u=Math.floor((r-t)/2):i==="right"&&(u=r-t-s),n=r-u-t,[u,n]}const ae=t=>t,oe=(t="",r="",s)=>{const i=s?.output??process.stdout,u=X(i),n=2,o=s?.titlePadding??1,c=s?.contentPadding??2,a=s?.width===void 0||s.width==="auto"?1:Math.min(1,s.width),l=s?.withGuide??_.withGuide?`${$} `:"",d=s?.formatBorder??ae,y=(s?.rounded?re:ne).map(d),p=d(st),m=d($),g=k(l),S=k(r),h=u-g;let f=Math.floor(u*a)-g;if(s?.width==="auto"){const P=t.split(`
12
+ `);let N=S+o*2;for(const rt of P){const W=k(rt)+c*2;W>N&&(N=W)}const D=N+n;D<f&&(f=D)}f%2!==0&&(f<h?f++:f--);const v=f-n,T=v-o*2,C=S>T?`${r.slice(0,T-3)}...`:r,[b,G]=Pt(k(C),v,o,s?.titleAlign),x=q(t,v-c*2,{hard:!0,trim:!1});i.write(`${l}${y[0]}${p.repeat(b)}${C}${p.repeat(G)}${y[1]}
13
+ `);const A=x.split(`
14
+ `);for(const P of A){const[N,D]=Pt(k(P),v,c,s?.contentAlign);i.write(`${l}${m}${" ".repeat(N)}${P}${" ".repeat(D)}${m}
15
+ `)}i.write(`${l}${y[2]}${p.repeat(v)}${y[3]}
16
+ `)},ue=t=>{const r=t.active??"Yes",s=t.inactive??"No";return new Lt({active:r,inactive:s,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue??!0,render(){const i=t.withGuide??_.withGuide,u=`${M(this.state)} `,n=i?`${e("gray",$)} `:"",o=O(t.output,t.message,n,u),c=`${i?`${e("gray",$)}
17
+ `:""}${o}
18
+ `,a=this.value?r:s;switch(this.state){case"submit":{const l=i?`${e("gray",$)} `:"";return`${c}${l}${e("dim",a)}`}case"cancel":{const l=i?`${e("gray",$)} `:"";return`${c}${l}${e(["strikethrough","dim"],a)}${i?`
19
+ ${e("gray",$)}`:""}`}default:{const l=i?`${e("cyan",$)} `:"",d=i?e("cyan",E):"";return`${c}${l}${this.value?`${e("green",z)} ${r}`:`${e("dim",H)} ${e("dim",r)}`}${t.vertical?i?`
20
+ ${e("cyan",$)} `:`
21
+ `:` ${e("dim","/")} `}${this.value?`${e("dim",H)} ${e("dim",s)}`:`${e("green",z)} ${s}`}
22
+ ${d}
23
+ `}}}}).prompt()},le=t=>{const r=t.validate;return new Dt({...t,validate(s){if(s===void 0)return t.defaultValue!==void 0?void 0:r?r(s):_.date.messages.required;const i=u=>u.toISOString().slice(0,10);if(t.minDate&&i(s)<i(t.minDate))return _.date.messages.afterMin(t.minDate);if(t.maxDate&&i(s)>i(t.maxDate))return _.date.messages.beforeMax(t.maxDate);if(r)return r(s)},render(){const s=(t?.withGuide??_.withGuide)!==!1,i=`${`${s?`${e("gray",$)}
24
+ `:""}${M(this.state)} `}${t.message}
25
+ `,u=this.state!=="initial"?this.state:"active",n=ce(this,u),o=this.value instanceof Date?this.formattedValue:"";switch(this.state){case"error":{const c=this.error?` ${e("yellow",this.error)}`:"",a=s?`${e("yellow",$)} `:"",l=s?e("yellow",E):"";return`${i.trim()}
26
+ ${a}${n}
27
+ ${l}${c}
28
+ `}case"submit":{const c=o?` ${e("dim",o)}`:"",a=s?e("gray",$):"";return`${i}${a}${c}`}case"cancel":{const c=o?` ${e(["strikethrough","dim"],o)}`:"",a=s?e("gray",$):"";return`${i}${a}${c}${o.trim()?`
29
+ ${a}`:""}`}default:{const c=s?`${e("cyan",$)} `:"",a=s?e("cyan",E):"",l=s?`${e("cyan",$)} `:"",d=this.inlineError?`
30
+ ${l}${e("yellow",this.inlineError)}`:"";return`${i}${c}${n}${d}
31
+ ${a}
32
+ `}}}}).prompt()};function ce(t,r){const s=t.segmentValues,i=t.segmentCursor;if(r==="submit"||r==="cancel")return t.formattedValue;const u=e("gray",t.separator);return t.segments.map((n,o)=>{const c=o===i.segmentIndex&&!["submit","cancel"].includes(r),a=de[n.type];return $e(s[n.type],{isActive:c,label:a})}).join(u)}function $e(t,r){const s=!t||t.replace(/_/g,"")==="";return r.isActive?e("inverse",s?r.label:t.replace(/_/g," ")):s?e("dim",r.label):t.replace(/_/g,e("dim"," "))}const de={year:"yyyy",month:"mm",day:"dd"},he=async(t,r)=>{const s={},i=Object.keys(t);for(const u of i){const n=t[u],o=await n({results:s})?.catch(c=>{throw c});if(typeof r?.onCancel=="function"&&Wt(o)){s[u]="canceled",r.onCancel({results:s});continue}s[u]=o}return s},pe=t=>{const{selectableGroups:r=!0,groupSpacing:s=0}=t,i=(n,o,c=[])=>{const a=n.label??String(n.value),l=typeof n.group=="string",d=l&&(c[c.indexOf(n)+1]??{group:!0}),y=l&&d&&d.group===!0,p=l?r?`${y?E:$} `:" ":"";let m="";if(s>0&&!l){const S=`
33
+ ${e("cyan",$)}`;m=`${S.repeat(s-1)}${S} `}if(o==="active")return`${m}${e("dim",p)}${e("cyan",et)} ${a}${n.hint?` ${e("dim",`(${n.hint})`)}`:""}`;if(o==="group-active")return`${m}${p}${e("cyan",et)} ${e("dim",a)}`;if(o==="group-active-selected")return`${m}${p}${e("green",U)} ${e("dim",a)}`;if(o==="selected"){const S=l||r?e("green",U):"";return`${m}${e("dim",p)}${S} ${e("dim",a)}${n.hint?` ${e("dim",`(${n.hint})`)}`:""}`}if(o==="cancelled")return`${e(["strikethrough","dim"],a)}`;if(o==="active-selected")return`${m}${e("dim",p)}${e("green",U)} ${a}${n.hint?` ${e("dim",`(${n.hint})`)}`:""}`;if(o==="submitted")return`${e("dim",a)}`;const g=l||r?e("dim",J):"";return`${m}${e("dim",p)}${g} ${e("dim",a)}`},u=t.required??!0;return new Ft({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValues:t.initialValues,required:u,cursorAt:t.cursorAt,selectableGroups:r,validate(n){if(u&&(n===void 0||n.length===0))return`Please select at least one option.
34
+ ${e("reset",e("dim",`Press ${e(["gray","bgWhite","inverse"]," space ")} to select, ${e("gray",e(["bgWhite","inverse"]," enter "))} to submit`))}`},render(){const n=t.withGuide??_.withGuide,o=`${n?`${e("gray",$)}
35
+ `:""}${M(this.state)} ${t.message}
36
+ `,c=this.value??[];switch(this.state){case"submit":{const a=this.options.filter(({value:d})=>c.includes(d)).map(d=>i(d,"submitted")),l=a.length===0?"":` ${a.join(e("dim",", "))}`;return`${o}${n?e("gray",$):""}${l}`}case"cancel":{const a=this.options.filter(({value:l})=>c.includes(l)).map(l=>i(l,"cancelled")).join(e("dim",", "));return`${o}${n?`${e("gray",$)} `:""}${a.trim()?`${a}${n?`
37
+ ${e("gray",$)}`:""}`:""}`}case"error":{const a=this.error.split(`
38
+ `).map((l,d)=>d===0?`${n?`${e("yellow",E)} `:""}${e("yellow",l)}`:` ${l}`).join(`
39
+ `);return`${o}${n?`${e("yellow",$)} `:""}${this.options.map((l,d,y)=>{const p=c.includes(l.value)||l.group===!0&&this.isGroupSelected(`${l.value}`),m=d===this.cursor;return!m&&typeof l.group=="string"&&this.options[this.cursor].value===l.group?i(l,p?"group-active-selected":"group-active",y):m&&p?i(l,"active-selected",y):p?i(l,"selected",y):i(l,m?"active":"inactive",y)}).join(`
40
+ ${n?`${e("yellow",$)} `:""}`)}
41
+ ${a}
42
+ `}default:{const a=this.options.map((d,y,p)=>{const m=c.includes(d.value)||d.group===!0&&this.isGroupSelected(`${d.value}`),g=y===this.cursor,S=!g&&typeof d.group=="string"&&this.options[this.cursor].value===d.group;let h="";return S?h=i(d,m?"group-active-selected":"group-active",p):g&&m?h=i(d,"active-selected",p):m?h=i(d,"selected",p):h=i(d,g?"active":"inactive",p),`${y!==0&&!h.startsWith(`
43
+ `)?" ":""}${h}`}).join(`
44
+ ${n?e("cyan",$):""}`),l=a.startsWith(`
45
+ `)?"":" ";return`${o}${n?e("cyan",$):""}${l}${a}
46
+ ${n?e("cyan",E):""}
47
+ `}}}}).prompt()},R={message:(t=[],{symbol:r=e("gray",$),secondarySymbol:s=e("gray",$),output:i=process.stdout,spacing:u=1,withGuide:n}={})=>{const o=[],c=n??_.withGuide,a=c?s:"",l=c?`${r} `:"",d=c?`${s} `:"";for(let p=0;p<u;p++)o.push(a);const y=Array.isArray(t)?t:t.split(`
48
+ `);if(y.length>0){const[p,...m]=y;p.length>0?o.push(`${l}${p}`):o.push(c?r:"");for(const g of m)g.length>0?o.push(`${d}${g}`):o.push(c?s:"")}i.write(`${o.join(`
49
+ `)}
50
+ `)},info:(t,r)=>{R.message(t,{...r,symbol:e("blue",ht)})},success:(t,r)=>{R.message(t,{...r,symbol:e("green",pt)})},step:(t,r)=>{R.message(t,{...r,symbol:e("green",F)})},warn:(t,r)=>{R.message(t,{...r,symbol:e("yellow",mt)})},warning:(t,r)=>{R.warn(t,r)},error:(t,r)=>{R.message(t,{...r,symbol:e("red",gt)})}},me=(t="",r)=>{const s=r?.output??process.stdout,i=r?.withGuide??_.withGuide?`${e("gray",E)} `:"";s.write(`${i}${e("red",t)}
51
+
52
+ `)},ge=(t="",r)=>{const s=r?.output??process.stdout,i=r?.withGuide??_.withGuide?`${e("gray",lt)} `:"";s.write(`${i}${t}
53
+ `)},ye=(t="",r)=>{const s=r?.output??process.stdout,i=r?.withGuide??_.withGuide?`${e("gray",$)}
54
+ ${e("gray",E)} `:"";s.write(`${i}${t}
55
+
56
+ `)},fe=t=>new Ht({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,showSubmit:t.showSubmit,output:t.output,signal:t.signal,input:t.input,render(){const r=t?.withGuide??_.withGuide,s=`${`${r?`${e("gray",$)}
57
+ `:""}${M(this.state)} `}${t.message}
58
+ `,i=t.placeholder?e("inverse",t.placeholder[0])+e("dim",t.placeholder.slice(1)):e(["inverse","hidden"],"_"),u=this.userInput?this.userInputWithCursor:i,n=this.value??"",o=t.showSubmit?`
59
+ ${e(this.focused==="submit"?"cyan":"dim","[ submit ]")}`:"";switch(this.state){case"error":{const c=`${e("yellow",$)} `,a=r?O(t.output,u,c,void 0):u,l=e("yellow",E);return`${s}${a}
60
+ ${l} ${e("yellow",this.error)}${o}
61
+ `}case"submit":{const c=`${e("gray",$)} `,a=r?O(t.output,n,c,void 0,l=>e("dim",l)):n?e("dim",n):"";return`${s}${a}`}case"cancel":{const c=`${e("gray",$)} `,a=r?O(t.output,n,c,void 0,l=>e(["strikethrough","dim"],l)):n?e(["strikethrough","dim"],n):"";return`${s}${a}`}default:{const c=r?`${e("cyan",$)} `:"",a=r?e("cyan",E):"",l=r?O(t.output,u,c):u;return`${s}${l}
62
+ ${a}${o}
63
+ `}}}}).prompt(),Q=(t,r)=>t.split(`
64
+ `).map(s=>r(s)).join(`
65
+ `),ve=t=>{const r=(i,u)=>{const n=i.label??String(i.value);return u==="disabled"?`${e("gray",J)} ${Q(n,o=>e(["strikethrough","gray"],o))}${i.hint?` ${e("dim",`(${i.hint??"disabled"})`)}`:""}`:u==="active"?`${e("cyan",et)} ${n}${i.hint?` ${e("dim",`(${i.hint})`)}`:""}`:u==="selected"?`${e("green",U)} ${Q(n,o=>e("dim",o))}${i.hint?` ${e("dim",`(${i.hint})`)}`:""}`:u==="cancelled"?`${Q(n,o=>e(["strikethrough","dim"],o))}`:u==="active-selected"?`${e("green",U)} ${n}${i.hint?` ${e("dim",`(${i.hint})`)}`:""}`:u==="submitted"?`${Q(n,o=>e("dim",o))}`:`${e("dim",J)} ${Q(n,o=>e("dim",o))}`},s=t.required??!0;return new Ut({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValues:t.initialValues,required:s,cursorAt:t.cursorAt,validate(i){if(s&&(i===void 0||i.length===0))return`Please select at least one option.
66
+ ${e("reset",e("dim",`Press ${e(["gray","bgWhite","inverse"]," space ")} to select, ${e("gray",e("bgWhite",e("inverse"," enter ")))} to submit`))}`},render(){const i=t.withGuide??_.withGuide,u=O(t.output,t.message,i?`${yt(this.state)} `:"",`${M(this.state)} `),n=`${i?`${e("gray",$)}
67
+ `:""}${u}
68
+ `,o=this.value??[],c=(a,l)=>{if(a.disabled)return r(a,"disabled");const d=o.includes(a.value);return l&&d?r(a,"active-selected"):d?r(a,"selected"):r(a,l?"active":"inactive")};switch(this.state){case"submit":{const a=this.options.filter(({value:d})=>o.includes(d)).map(d=>r(d,"submitted")).join(e("dim",", "))||e("dim","none"),l=O(t.output,a,i?`${e("gray",$)} `:"");return`${n}${l}`}case"cancel":{const a=this.options.filter(({value:d})=>o.includes(d)).map(d=>r(d,"cancelled")).join(e("dim",", "));if(a.trim()==="")return`${n}${e("gray",$)}`;const l=O(t.output,a,i?`${e("gray",$)} `:"");return`${n}${l}${i?`
69
+ ${e("gray",$)}`:""}`}case"error":{const a=i?`${e("yellow",$)} `:"",l=this.error.split(`
70
+ `).map((p,m)=>m===0?`${i?`${e("yellow",E)} `:""}${e("yellow",p)}`:` ${p}`).join(`
71
+ `),d=n.split(`
72
+ `).length,y=l.split(`
73
+ `).length+1;return`${n}${a}${Y({output:t.output,options:this.options,cursor:this.cursor,maxItems:t.maxItems,columnPadding:a.length,rowPadding:d+y,style:c}).join(`
74
+ ${a}`)}
75
+ ${l}
76
+ `}default:{const a=i?`${e("cyan",$)} `:"",l=n.split(`
77
+ `).length,d=i?2:1;return`${n}${a}${Y({output:t.output,options:this.options,cursor:this.cursor,maxItems:t.maxItems,columnPadding:a.length,rowPadding:l+d,style:c}).join(`
78
+ ${a}`)}
79
+ ${i?e("cyan",E):""}
80
+ `}}}}).prompt()},we=t=>e("dim",t),be=(t,r,s)=>{const i={hard:!0,trim:!1},u=q(t,r,i).split(`
81
+ `),n=u.reduce((a,l)=>Math.max(k(l),a),0),o=u.map(s).reduce((a,l)=>Math.max(k(l),a),0),c=r-(o-n);return q(t,c,i)},Se=(t="",r="",s)=>{const i=s?.output??j.stdout,u=s?.withGuide??_.withGuide,n=s?.format??we,o=["",...be(t,X(i)-6,n).split(`
82
+ `).map(n),""],c=k(r),a=Math.max(o.reduce((p,m)=>{const g=k(m);return g>p?g:p},0),c)+2,l=o.map(p=>`${e("gray",$)} ${p}${" ".repeat(a-k(p))}${e("gray",$)}`).join(`
83
+ `),d=u?`${e("gray",$)}
84
+ `:"",y=u?xt:dt;i.write(`${d}${e("green",F)} ${e("reset",r)} ${e("gray",st.repeat(Math.max(a-c-1,1))+ct)}
85
+ ${l}
86
+ ${e("gray",y+st.repeat(a+2)+$t)}
87
+ `)},Ce=t=>new Kt({validate:t.validate,mask:t.mask??Gt,signal:t.signal,input:t.input,output:t.output,render(){const r=t.withGuide??_.withGuide,s=`${r?`${e("gray",$)}
88
+ `:""}${M(this.state)} ${t.message}
89
+ `,i=this.userInputWithCursor,u=this.masked;switch(this.state){case"error":{const n=r?`${e("yellow",$)} `:"",o=r?`${e("yellow",E)} `:"",c=u??"";return t.clearOnError&&this.clear(),`${s.trim()}
90
+ ${n}${c}
91
+ ${o}${e("yellow",this.error)}
92
+ `}case"submit":{const n=r?`${e("gray",$)} `:"",o=u?e("dim",u):"";return`${s}${n}${o}`}case"cancel":{const n=r?`${e("gray",$)} `:"",o=u?e(["strikethrough","dim"],u):"";return`${s}${n}${o}${u&&r?`
93
+ ${e("gray",$)}`:""}`}default:{const n=r?`${e("cyan",$)} `:"",o=r?e("cyan",E):"";return`${s}${n}${i}
94
+ ${o}
95
+ `}}}}).prompt(),Te=t=>{const r=t.validate;return At({...t,initialUserInput:t.initialValue??t.root??process.cwd(),maxItems:5,validate(s){if(!Array.isArray(s)){if(!s)return"Please select a path";if(r)return r(s)}},options(){const s=this.userInput;if(s==="")return[];try{let i;zt(s)?wt(s).isDirectory()&&(!t.directory||s.endsWith("/"))?i=s:i=bt(s):i=bt(s);const u=s.length>1&&s.endsWith("/")?s.slice(0,-1):s;return Qt(i).map(n=>{const o=Zt(i,n),c=wt(o);return{name:n,path:o,isDirectory:c.isDirectory()}}).filter(({path:n,isDirectory:o})=>n.startsWith(u)&&(o||!t.directory)).map(n=>({value:n.path}))}catch{return[]}}})},_e=t=>e("magenta",t),ft=({indicator:t="dots",onCancel:r,output:s=process.stdout,cancelMessage:i,errorMessage:u,frames:n=tt?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:o=tt?80:120,signal:c,...a}={})=>{const l=at();let d,y,p=!1,m=!1,g="",S,h=performance.now();const f=X(s),v=a?.styleFrame??_e,T=I=>{const V=I>1?u??_.messages.error:i??_.messages.cancel;m=I===1,p&&(W(V,I),m&&typeof r=="function"&&r())},C=()=>T(2),b=()=>T(1),G=()=>{process.on("uncaughtExceptionMonitor",C),process.on("unhandledRejection",C),process.on("SIGINT",b),process.on("SIGTERM",b),process.on("exit",T),c&&c.addEventListener("abort",b)},x=()=>{process.removeListener("uncaughtExceptionMonitor",C),process.removeListener("unhandledRejection",C),process.removeListener("SIGINT",b),process.removeListener("SIGTERM",b),process.removeListener("exit",T),c&&c.removeEventListener("abort",b)},A=()=>{if(S===void 0)return;l&&s.write(`
96
+ `);const I=q(S,f,{hard:!0,trim:!1}).split(`
97
+ `);I.length>1&&s.write(St.up(I.length-1)),s.write(St.to(0)),s.write(Ct.down())},P=I=>I.replace(/\.+$/,""),N=I=>{const V=(performance.now()-I)/1e3,B=Math.floor(V/60),L=Math.floor(V%60);return B>0?`[${B}m ${L}s]`:`[${L}s]`},D=a.withGuide??_.withGuide,rt=(I="")=>{p=!0,d=qt({output:s}),g=P(I),h=performance.now(),D&&s.write(`${e("gray",$)}
98
+ `);let V=0,B=0;G(),y=setInterval(()=>{if(l&&g===S)return;A(),S=g;const L=v(n[V]);let Z;if(l)Z=`${L} ${g}...`;else if(t==="timer")Z=`${L} ${g} ${N(h)}`;else{const kt=".".repeat(Math.floor(B)).slice(0,3);Z=`${L} ${g}${kt}`}const Nt=q(Z,f,{hard:!0,trim:!1});s.write(Nt),V=V+1<n.length?V+1:0,B=B<4?B+.125:0},o)},W=(I="",V=0,B=!1)=>{if(!p)return;p=!1,clearInterval(y),A();const L=V===0?e("green",F):V===1?e("red",ot):e("red",ut);g=I??g,B||(t==="timer"?s.write(`${L} ${g} ${N(h)}
99
+ `):s.write(`${L} ${g}
100
+ `)),x(),d()};return{start:rt,stop:(I="")=>W(I,0),message:(I="")=>{g=P(I??g)},cancel:(I="")=>W(I,1),error:(I="")=>W(I,2),clear:()=>W("",0,!0),get isCancelled(){return m}}},Vt={light:w("\u2500","-"),heavy:w("\u2501","="),block:w("\u2588","#")};function Ie({style:t="heavy",max:r=100,size:s=40,...i}={}){const u=ft(i);let n=0,o="";const c=Math.max(1,r),a=Math.max(1,s),l=m=>{switch(m){case"initial":case"active":return g=>e("magenta",g);case"error":case"cancel":return g=>e("red",g);case"submit":return g=>e("green",g);default:return g=>e("magenta",g)}},d=(m,g)=>{const S=Math.floor(n/c*a);return`${l(m)(Vt[t].repeat(S))}${e("dim",Vt[t].repeat(a-S))} ${g}`},y=(m="")=>{o=m,u.start(d("initial",m))},p=(m=1,g)=>{n=Math.min(c,m+n),u.message(d("active",g??o)),o=g??o};return{start:y,stop:u.stop,cancel:u.cancel,error:u.error,clear:u.clear,advance:p,isCancelled:u.isCancelled,message:m=>p(0,m)}}const it=(t,r)=>t.includes(`
101
+ `)?t.split(`
102
+ `).map(s=>r(s)).join(`
103
+ `):r(t),Ee=t=>{const r=(s,i)=>{const u=s.label??String(s.value);switch(i){case"disabled":return`${e("gray",H)} ${it(u,n=>e("gray",n))}${s.hint?` ${e("dim",`(${s.hint??"disabled"})`)}`:""}`;case"selected":return`${it(u,n=>e("dim",n))}`;case"active":return`${e("green",z)} ${u}${s.hint?` ${e("dim",`(${s.hint})`)}`:""}`;case"cancelled":return`${it(u,n=>e(["strikethrough","dim"],n))}`;default:return`${e("dim",H)} ${it(u,n=>e("dim",n))}`}};return new Jt({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue,render(){const s=t.withGuide??_.withGuide,i=`${M(this.state)} `,u=`${yt(this.state)} `,n=O(t.output,t.message,u,i),o=`${s?`${e("gray",$)}
104
+ `:""}${n}
105
+ `;switch(this.state){case"submit":{const c=s?`${e("gray",$)} `:"",a=O(t.output,r(this.options[this.cursor],"selected"),c);return`${o}${a}`}case"cancel":{const c=s?`${e("gray",$)} `:"",a=O(t.output,r(this.options[this.cursor],"cancelled"),c);return`${o}${a}${s?`
106
+ ${e("gray",$)}`:""}`}default:{const c=s?`${e("cyan",$)} `:"",a=s?e("cyan",E):"",l=o.split(`
107
+ `).length,d=s?2:1;return`${o}${c}${Y({output:t.output,cursor:this.cursor,options:this.options,maxItems:t.maxItems,columnPadding:c.length,rowPadding:l+d,style:(y,p)=>r(y,y.disabled?"disabled":p?"active":"inactive")}).join(`
108
+ ${c}`)}
109
+ ${a}
110
+ `}}}}).prompt()},Ge=t=>{const r=(s,i="inactive")=>{const u=s.label??String(s.value);return i==="selected"?`${e("dim",u)}`:i==="cancelled"?`${e(["strikethrough","dim"],u)}`:i==="active"?`${e(["bgCyan","gray"],` ${s.value} `)} ${u}${s.hint?` ${e("dim",`(${s.hint})`)}`:""}`:`${e(["gray","bgWhite","inverse"],` ${s.value} `)} ${u}${s.hint?` ${e("dim",`(${s.hint})`)}`:""}`};return new Yt({options:t.options,signal:t.signal,input:t.input,output:t.output,initialValue:t.initialValue,caseSensitive:t.caseSensitive,render(){const s=t.withGuide??_.withGuide,i=`${s?`${e("gray",$)}
111
+ `:""}${M(this.state)} ${t.message}
112
+ `;switch(this.state){case"submit":{const u=s?`${e("gray",$)} `:"",n=this.options.find(c=>c.value===this.value)??t.options[0],o=O(t.output,r(n,"selected"),u);return`${i}${o}`}case"cancel":{const u=s?`${e("gray",$)} `:"",n=O(t.output,r(this.options[0],"cancelled"),u);return`${i}${n}${s?`
113
+ ${e("gray",$)}`:""}`}default:{const u=s?`${e("cyan",$)} `:"",n=s?e("cyan",E):"",o=this.options.map((c,a)=>O(t.output,r(c,a===this.cursor?"active":"inactive"),u)).join(`
114
+ `);return`${i}${o}
115
+ ${n}
116
+ `}}}}).prompt()},jt=`${e("gray",$)} `,K={message:async(t,{symbol:r=e("gray",$)}={})=>{process.stdout.write(`${e("gray",$)}
117
+ ${r} `);let s=3;for await(let i of t){i=i.replace(/\n/g,`
118
+ ${jt}`),i.includes(`
119
+ `)&&(s=3+nt(i.slice(i.lastIndexOf(`
120
+ `))).length);const u=nt(i).length;s+u<process.stdout.columns?(s+=u,process.stdout.write(i)):(process.stdout.write(`
121
+ ${jt}${i.trimStart()}`),s=3+nt(i.trimStart()).length)}process.stdout.write(`
122
+ `)},info:t=>K.message(t,{symbol:e("blue",ht)}),success:t=>K.message(t,{symbol:e("green",pt)}),step:t=>K.message(t,{symbol:e("green",F)}),warn:t=>K.message(t,{symbol:e("yellow",mt)}),warning:t=>K.warn(t),error:t=>K.message(t,{symbol:e("red",gt)})},xe=async(t,r)=>{for(const s of t){if(s.enabled===!1)continue;const i=ft(r);i.start(s.title);const u=await s.task(i.message);i.stop(u||s.title)}},Oe=t=>t.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g,""),Me=t=>{const r=t.output??process.stdout,s=X(r),i=e("gray",$),u=t.spacing??1,n=3,o=t.retainLog===!0,c=!at()&&Tt(r);r.write(`${i}
123
+ `),r.write(`${e("green",F)} ${t.title}
124
+ `);for(let h=0;h<u;h++)r.write(`${i}
125
+ `);const a=[{value:"",full:""}];let l=!1;const d=h=>{if(a.length===0)return;let f=0;h&&(f+=u+2);for(const v of a){const{value:T,result:C}=v;let b=C?.message??T;if(b.length===0)continue;C===void 0&&v.header!==void 0&&v.header!==""&&(b+=`
126
+ ${v.header}`);const G=b.split(`
127
+ `).reduce((x,A)=>A===""?x+1:x+Math.ceil((A.length+n)/s),0);f+=G}f>0&&(f+=1,r.write(Ct.lines(f)))},y=(h,f,v)=>{const T=v?`${h.full}
128
+ ${h.value}`:h.value;h.header!==void 0&&h.header!==""&&R.message(h.header.split(`
129
+ `).map(C=>e("bold",C)),{output:r,secondarySymbol:i,symbol:i,spacing:0}),R.message(T.split(`
130
+ `).map(C=>e("dim",C)),{output:r,secondarySymbol:i,symbol:i,spacing:f??u})},p=()=>{for(const h of a){const{header:f,value:v,full:T}=h;(f===void 0||f.length===0)&&v.length===0||y(h,void 0,o===!0&&T.length>0)}},m=(h,f,v)=>{if(d(!1),(v?.raw!==!0||!l)&&h.value!==""&&(h.value+=`
131
+ `),h.value+=Oe(f),l=v?.raw===!0,t.limit!==void 0){const T=h.value.split(`
132
+ `),C=T.length-t.limit;if(C>0){const b=T.splice(0,C);o&&(h.full+=(h.full===""?"":`
133
+ `)+b.join(`
134
+ `))}h.value=T.join(`
135
+ `)}c&&g()},g=()=>{for(const h of a)h.result?h.result.status==="error"?R.error(h.result.message,{output:r,secondarySymbol:i,spacing:0}):R.success(h.result.message,{output:r,secondarySymbol:i,spacing:0}):h.value!==""&&y(h,0)},S=(h,f)=>{d(!1),h.result=f,c&&g()};return{message(h,f){m(a[0],h,f)},group(h){const f={header:h,value:"",full:""};return a.push(f),{message(v,T){m(f,v,T)},error(v){S(f,{status:"error",message:v})},success(v){S(f,{status:"success",message:v})}}},error(h,f){d(!0),R.error(h,{output:r,secondarySymbol:i,spacing:1}),f?.showLog!==!1&&p(),a.splice(1,a.length-1),a[0].value="",a[0].full=""},success(h,f){d(!0),R.success(h,{output:r,secondarySymbol:i,spacing:1}),f?.showLog===!0&&p(),a.splice(1,a.length-1),a[0].value="",a[0].full=""}}},Re=t=>new Xt({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,output:t.output,signal:t.signal,input:t.input,render(){const r=t?.withGuide??_.withGuide,s=`${`${r?`${e("gray",$)}
136
+ `:""}${M(this.state)} `}${t.message}
137
+ `,i=t.placeholder?e("inverse",t.placeholder[0])+e("dim",t.placeholder.slice(1)):e(["inverse","hidden"],"_"),u=this.userInput?this.userInputWithCursor:i,n=this.value??"";switch(this.state){case"error":{const o=this.error?` ${e("yellow",this.error)}`:"",c=r?`${e("yellow",$)} `:"",a=r?e("yellow",E):"";return`${s.trim()}
138
+ ${c}${u}
139
+ ${a}${o}
140
+ `}case"submit":{const o=n?` ${e("dim",n)}`:"",c=r?e("gray",$):"";return`${s}${c}${o}`}case"cancel":{const o=n?` ${e(["strikethrough","dim"],n)}`:"",c=r?e("gray",$):"";return`${s}${c}${o}${n.trim()?`
141
+ ${c}`:""}`}default:{const o=r?`${e("cyan",$)} `:"",c=r?e("cyan",E):"";return`${s}${o}${u}
142
+ ${c}
143
+ `}}}}).prompt();export{$ as S_BAR,E as S_BAR_END,Et as S_BAR_END_RIGHT,st as S_BAR_H,lt as S_BAR_START,It as S_BAR_START_RIGHT,et as S_CHECKBOX_ACTIVE,J as S_CHECKBOX_INACTIVE,U as S_CHECKBOX_SELECTED,xt as S_CONNECT_LEFT,dt as S_CORNER_BOTTOM_LEFT,$t as S_CORNER_BOTTOM_RIGHT,Ot as S_CORNER_TOP_LEFT,ct as S_CORNER_TOP_RIGHT,gt as S_ERROR,ht as S_INFO,Gt as S_PASSWORD_MASK,z as S_RADIO_ACTIVE,H as S_RADIO_INACTIVE,_t as S_STEP_ACTIVE,ot as S_STEP_CANCEL,ut as S_STEP_ERROR,F as S_STEP_SUBMIT,pt as S_SUCCESS,mt as S_WARN,At as autocomplete,ie as autocompleteMultiselect,oe as box,me as cancel,ue as confirm,le as date,he as group,pe as groupMultiselect,ge as intro,at as isCI,Tt as isTTY,Y as limitOptions,R as log,fe as multiline,ve as multiselect,Se as note,ye as outro,Ce as password,Te as path,Ie as progress,Ee as select,Ge as selectKey,ft as spinner,K as stream,M as symbol,yt as symbolBar,Me as taskLog,xe as tasks,Re as text,tt as unicode,w as unicodeOr};
144
+ //# sourceMappingURL=index.mjs.map