@aroman22/codegraph-vba-darwin-arm64 1.3.3

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 (800) hide show
  1. package/bin/codegraph +14 -0
  2. package/lib/dist/bin/codegraph.d.ts +26 -0
  3. package/lib/dist/bin/codegraph.d.ts.map +1 -0
  4. package/lib/dist/bin/codegraph.js +2018 -0
  5. package/lib/dist/bin/codegraph.js.map +1 -0
  6. package/lib/dist/bin/command-supervision.d.ts +12 -0
  7. package/lib/dist/bin/command-supervision.d.ts.map +1 -0
  8. package/lib/dist/bin/command-supervision.js +76 -0
  9. package/lib/dist/bin/command-supervision.js.map +1 -0
  10. package/lib/dist/bin/fatal-handler.d.ts +20 -0
  11. package/lib/dist/bin/fatal-handler.d.ts.map +1 -0
  12. package/lib/dist/bin/fatal-handler.js +118 -0
  13. package/lib/dist/bin/fatal-handler.js.map +1 -0
  14. package/lib/dist/bin/node-version-check.d.ts +37 -0
  15. package/lib/dist/bin/node-version-check.d.ts.map +1 -0
  16. package/lib/dist/bin/node-version-check.js +79 -0
  17. package/lib/dist/bin/node-version-check.js.map +1 -0
  18. package/lib/dist/bin/uninstall.d.ts +14 -0
  19. package/lib/dist/bin/uninstall.d.ts.map +1 -0
  20. package/lib/dist/bin/uninstall.js +36 -0
  21. package/lib/dist/bin/uninstall.js.map +1 -0
  22. package/lib/dist/context/formatter.d.ts +30 -0
  23. package/lib/dist/context/formatter.d.ts.map +1 -0
  24. package/lib/dist/context/formatter.js +263 -0
  25. package/lib/dist/context/formatter.js.map +1 -0
  26. package/lib/dist/context/index.d.ts +119 -0
  27. package/lib/dist/context/index.d.ts.map +1 -0
  28. package/lib/dist/context/index.js +1296 -0
  29. package/lib/dist/context/index.js.map +1 -0
  30. package/lib/dist/context/markers.d.ts +19 -0
  31. package/lib/dist/context/markers.d.ts.map +1 -0
  32. package/lib/dist/context/markers.js +22 -0
  33. package/lib/dist/context/markers.js.map +1 -0
  34. package/lib/dist/db/index.d.ts +122 -0
  35. package/lib/dist/db/index.d.ts.map +1 -0
  36. package/lib/dist/db/index.js +296 -0
  37. package/lib/dist/db/index.js.map +1 -0
  38. package/lib/dist/db/migrations.d.ts +44 -0
  39. package/lib/dist/db/migrations.d.ts.map +1 -0
  40. package/lib/dist/db/migrations.js +140 -0
  41. package/lib/dist/db/migrations.js.map +1 -0
  42. package/lib/dist/db/queries.d.ts +402 -0
  43. package/lib/dist/db/queries.d.ts.map +1 -0
  44. package/lib/dist/db/queries.js +1626 -0
  45. package/lib/dist/db/queries.js.map +1 -0
  46. package/lib/dist/db/schema.sql +152 -0
  47. package/lib/dist/db/sqlite-adapter.d.ts +53 -0
  48. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -0
  49. package/lib/dist/db/sqlite-adapter.js +117 -0
  50. package/lib/dist/db/sqlite-adapter.js.map +1 -0
  51. package/lib/dist/directory.d.ts +179 -0
  52. package/lib/dist/directory.d.ts.map +1 -0
  53. package/lib/dist/directory.js +625 -0
  54. package/lib/dist/directory.js.map +1 -0
  55. package/lib/dist/errors.d.ts +136 -0
  56. package/lib/dist/errors.d.ts.map +1 -0
  57. package/lib/dist/errors.js +219 -0
  58. package/lib/dist/errors.js.map +1 -0
  59. package/lib/dist/extraction/astro-extractor.d.ts +79 -0
  60. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -0
  61. package/lib/dist/extraction/astro-extractor.js +320 -0
  62. package/lib/dist/extraction/astro-extractor.js.map +1 -0
  63. package/lib/dist/extraction/dfm-extractor.d.ts +31 -0
  64. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -0
  65. package/lib/dist/extraction/dfm-extractor.js +151 -0
  66. package/lib/dist/extraction/dfm-extractor.js.map +1 -0
  67. package/lib/dist/extraction/extraction-version.d.ts +25 -0
  68. package/lib/dist/extraction/extraction-version.d.ts.map +1 -0
  69. package/lib/dist/extraction/extraction-version.js +28 -0
  70. package/lib/dist/extraction/extraction-version.js.map +1 -0
  71. package/lib/dist/extraction/function-ref.d.ts +118 -0
  72. package/lib/dist/extraction/function-ref.d.ts.map +1 -0
  73. package/lib/dist/extraction/function-ref.js +727 -0
  74. package/lib/dist/extraction/function-ref.js.map +1 -0
  75. package/lib/dist/extraction/generated-detection.d.ts +30 -0
  76. package/lib/dist/extraction/generated-detection.d.ts.map +1 -0
  77. package/lib/dist/extraction/generated-detection.js +83 -0
  78. package/lib/dist/extraction/generated-detection.js.map +1 -0
  79. package/lib/dist/extraction/grammars.d.ts +128 -0
  80. package/lib/dist/extraction/grammars.d.ts.map +1 -0
  81. package/lib/dist/extraction/grammars.js +537 -0
  82. package/lib/dist/extraction/grammars.js.map +1 -0
  83. package/lib/dist/extraction/index.d.ts +187 -0
  84. package/lib/dist/extraction/index.d.ts.map +1 -0
  85. package/lib/dist/extraction/index.js +1951 -0
  86. package/lib/dist/extraction/index.js.map +1 -0
  87. package/lib/dist/extraction/languages/c-cpp.d.ts +12 -0
  88. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  89. package/lib/dist/extraction/languages/c-cpp.js +275 -0
  90. package/lib/dist/extraction/languages/c-cpp.js.map +1 -0
  91. package/lib/dist/extraction/languages/csharp.d.ts +25 -0
  92. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -0
  93. package/lib/dist/extraction/languages/csharp.js +175 -0
  94. package/lib/dist/extraction/languages/csharp.js.map +1 -0
  95. package/lib/dist/extraction/languages/dart.d.ts +3 -0
  96. package/lib/dist/extraction/languages/dart.d.ts.map +1 -0
  97. package/lib/dist/extraction/languages/dart.js +374 -0
  98. package/lib/dist/extraction/languages/dart.js.map +1 -0
  99. package/lib/dist/extraction/languages/go.d.ts +3 -0
  100. package/lib/dist/extraction/languages/go.d.ts.map +1 -0
  101. package/lib/dist/extraction/languages/go.js +111 -0
  102. package/lib/dist/extraction/languages/go.js.map +1 -0
  103. package/lib/dist/extraction/languages/index.d.ts +10 -0
  104. package/lib/dist/extraction/languages/index.d.ts.map +1 -0
  105. package/lib/dist/extraction/languages/index.js +53 -0
  106. package/lib/dist/extraction/languages/index.js.map +1 -0
  107. package/lib/dist/extraction/languages/java.d.ts +3 -0
  108. package/lib/dist/extraction/languages/java.d.ts.map +1 -0
  109. package/lib/dist/extraction/languages/java.js +315 -0
  110. package/lib/dist/extraction/languages/java.js.map +1 -0
  111. package/lib/dist/extraction/languages/javascript.d.ts +3 -0
  112. package/lib/dist/extraction/languages/javascript.d.ts.map +1 -0
  113. package/lib/dist/extraction/languages/javascript.js +106 -0
  114. package/lib/dist/extraction/languages/javascript.js.map +1 -0
  115. package/lib/dist/extraction/languages/kotlin.d.ts +3 -0
  116. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -0
  117. package/lib/dist/extraction/languages/kotlin.js +379 -0
  118. package/lib/dist/extraction/languages/kotlin.js.map +1 -0
  119. package/lib/dist/extraction/languages/lua.d.ts +3 -0
  120. package/lib/dist/extraction/languages/lua.d.ts.map +1 -0
  121. package/lib/dist/extraction/languages/lua.js +150 -0
  122. package/lib/dist/extraction/languages/lua.js.map +1 -0
  123. package/lib/dist/extraction/languages/luau.d.ts +3 -0
  124. package/lib/dist/extraction/languages/luau.d.ts.map +1 -0
  125. package/lib/dist/extraction/languages/luau.js +37 -0
  126. package/lib/dist/extraction/languages/luau.js.map +1 -0
  127. package/lib/dist/extraction/languages/objc.d.ts +3 -0
  128. package/lib/dist/extraction/languages/objc.d.ts.map +1 -0
  129. package/lib/dist/extraction/languages/objc.js +175 -0
  130. package/lib/dist/extraction/languages/objc.js.map +1 -0
  131. package/lib/dist/extraction/languages/pascal.d.ts +3 -0
  132. package/lib/dist/extraction/languages/pascal.d.ts.map +1 -0
  133. package/lib/dist/extraction/languages/pascal.js +77 -0
  134. package/lib/dist/extraction/languages/pascal.js.map +1 -0
  135. package/lib/dist/extraction/languages/php.d.ts +3 -0
  136. package/lib/dist/extraction/languages/php.d.ts.map +1 -0
  137. package/lib/dist/extraction/languages/php.js +196 -0
  138. package/lib/dist/extraction/languages/php.js.map +1 -0
  139. package/lib/dist/extraction/languages/python.d.ts +3 -0
  140. package/lib/dist/extraction/languages/python.d.ts.map +1 -0
  141. package/lib/dist/extraction/languages/python.js +56 -0
  142. package/lib/dist/extraction/languages/python.js.map +1 -0
  143. package/lib/dist/extraction/languages/r.d.ts +3 -0
  144. package/lib/dist/extraction/languages/r.d.ts.map +1 -0
  145. package/lib/dist/extraction/languages/r.js +314 -0
  146. package/lib/dist/extraction/languages/r.js.map +1 -0
  147. package/lib/dist/extraction/languages/ruby.d.ts +3 -0
  148. package/lib/dist/extraction/languages/ruby.d.ts.map +1 -0
  149. package/lib/dist/extraction/languages/ruby.js +149 -0
  150. package/lib/dist/extraction/languages/ruby.js.map +1 -0
  151. package/lib/dist/extraction/languages/rust.d.ts +3 -0
  152. package/lib/dist/extraction/languages/rust.d.ts.map +1 -0
  153. package/lib/dist/extraction/languages/rust.js +142 -0
  154. package/lib/dist/extraction/languages/rust.js.map +1 -0
  155. package/lib/dist/extraction/languages/scala.d.ts +3 -0
  156. package/lib/dist/extraction/languages/scala.d.ts.map +1 -0
  157. package/lib/dist/extraction/languages/scala.js +209 -0
  158. package/lib/dist/extraction/languages/scala.js.map +1 -0
  159. package/lib/dist/extraction/languages/swift.d.ts +3 -0
  160. package/lib/dist/extraction/languages/swift.d.ts.map +1 -0
  161. package/lib/dist/extraction/languages/swift.js +152 -0
  162. package/lib/dist/extraction/languages/swift.js.map +1 -0
  163. package/lib/dist/extraction/languages/typescript.d.ts +16 -0
  164. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -0
  165. package/lib/dist/extraction/languages/typescript.js +167 -0
  166. package/lib/dist/extraction/languages/typescript.js.map +1 -0
  167. package/lib/dist/extraction/liquid-extractor.d.ts +59 -0
  168. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -0
  169. package/lib/dist/extraction/liquid-extractor.js +357 -0
  170. package/lib/dist/extraction/liquid-extractor.js.map +1 -0
  171. package/lib/dist/extraction/mybatis-extractor.d.ts +48 -0
  172. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -0
  173. package/lib/dist/extraction/mybatis-extractor.js +198 -0
  174. package/lib/dist/extraction/mybatis-extractor.js.map +1 -0
  175. package/lib/dist/extraction/parse-pool.d.ts +126 -0
  176. package/lib/dist/extraction/parse-pool.d.ts.map +1 -0
  177. package/lib/dist/extraction/parse-pool.js +319 -0
  178. package/lib/dist/extraction/parse-pool.js.map +1 -0
  179. package/lib/dist/extraction/parse-worker.d.ts +8 -0
  180. package/lib/dist/extraction/parse-worker.d.ts.map +1 -0
  181. package/lib/dist/extraction/parse-worker.js +97 -0
  182. package/lib/dist/extraction/parse-worker.js.map +1 -0
  183. package/lib/dist/extraction/razor-extractor.d.ts +42 -0
  184. package/lib/dist/extraction/razor-extractor.d.ts.map +1 -0
  185. package/lib/dist/extraction/razor-extractor.js +285 -0
  186. package/lib/dist/extraction/razor-extractor.js.map +1 -0
  187. package/lib/dist/extraction/sql-query-extractor.d.ts +25 -0
  188. package/lib/dist/extraction/sql-query-extractor.d.ts.map +1 -0
  189. package/lib/dist/extraction/sql-query-extractor.js +177 -0
  190. package/lib/dist/extraction/sql-query-extractor.js.map +1 -0
  191. package/lib/dist/extraction/svelte-extractor.d.ts +56 -0
  192. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -0
  193. package/lib/dist/extraction/svelte-extractor.js +275 -0
  194. package/lib/dist/extraction/svelte-extractor.js.map +1 -0
  195. package/lib/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  196. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  197. package/lib/dist/extraction/tree-sitter-helpers.js +152 -0
  198. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -0
  199. package/lib/dist/extraction/tree-sitter-types.d.ts +239 -0
  200. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  201. package/lib/dist/extraction/tree-sitter-types.js +10 -0
  202. package/lib/dist/extraction/tree-sitter-types.js.map +1 -0
  203. package/lib/dist/extraction/tree-sitter.d.ts +647 -0
  204. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -0
  205. package/lib/dist/extraction/tree-sitter.js +5647 -0
  206. package/lib/dist/extraction/tree-sitter.js.map +1 -0
  207. package/lib/dist/extraction/vba-extractor.d.ts +394 -0
  208. package/lib/dist/extraction/vba-extractor.d.ts.map +1 -0
  209. package/lib/dist/extraction/vba-extractor.js +1716 -0
  210. package/lib/dist/extraction/vba-extractor.js.map +1 -0
  211. package/lib/dist/extraction/vba-form-extractor.d.ts +89 -0
  212. package/lib/dist/extraction/vba-form-extractor.d.ts.map +1 -0
  213. package/lib/dist/extraction/vba-form-extractor.js +367 -0
  214. package/lib/dist/extraction/vba-form-extractor.js.map +1 -0
  215. package/lib/dist/extraction/vba-preprocess.d.ts +81 -0
  216. package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -0
  217. package/lib/dist/extraction/vba-preprocess.js +287 -0
  218. package/lib/dist/extraction/vba-preprocess.js.map +1 -0
  219. package/lib/dist/extraction/vue-extractor.d.ts +51 -0
  220. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -0
  221. package/lib/dist/extraction/vue-extractor.js +254 -0
  222. package/lib/dist/extraction/vue-extractor.js.map +1 -0
  223. package/lib/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  224. package/lib/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  225. package/lib/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  226. package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  227. package/lib/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
  228. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  229. package/lib/dist/extraction/wasm-runtime-flags.d.ts +38 -0
  230. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
  231. package/lib/dist/extraction/wasm-runtime-flags.js +106 -0
  232. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -0
  233. package/lib/dist/graph/index.d.ts +8 -0
  234. package/lib/dist/graph/index.d.ts.map +1 -0
  235. package/lib/dist/graph/index.js +13 -0
  236. package/lib/dist/graph/index.js.map +1 -0
  237. package/lib/dist/graph/queries.d.ts +106 -0
  238. package/lib/dist/graph/queries.d.ts.map +1 -0
  239. package/lib/dist/graph/queries.js +339 -0
  240. package/lib/dist/graph/queries.js.map +1 -0
  241. package/lib/dist/graph/traversal.d.ts +127 -0
  242. package/lib/dist/graph/traversal.d.ts.map +1 -0
  243. package/lib/dist/graph/traversal.js +540 -0
  244. package/lib/dist/graph/traversal.js.map +1 -0
  245. package/lib/dist/index.d.ts +563 -0
  246. package/lib/dist/index.d.ts.map +1 -0
  247. package/lib/dist/index.js +1041 -0
  248. package/lib/dist/index.js.map +1 -0
  249. package/lib/dist/installer/config-writer.d.ts +28 -0
  250. package/lib/dist/installer/config-writer.d.ts.map +1 -0
  251. package/lib/dist/installer/config-writer.js +91 -0
  252. package/lib/dist/installer/config-writer.js.map +1 -0
  253. package/lib/dist/installer/index.d.ts +100 -0
  254. package/lib/dist/installer/index.d.ts.map +1 -0
  255. package/lib/dist/installer/index.js +524 -0
  256. package/lib/dist/installer/index.js.map +1 -0
  257. package/lib/dist/installer/instructions-template.d.ts +41 -0
  258. package/lib/dist/installer/instructions-template.d.ts.map +1 -0
  259. package/lib/dist/installer/instructions-template.js +53 -0
  260. package/lib/dist/installer/instructions-template.js.map +1 -0
  261. package/lib/dist/installer/targets/antigravity.d.ts +57 -0
  262. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -0
  263. package/lib/dist/installer/targets/antigravity.js +308 -0
  264. package/lib/dist/installer/targets/antigravity.js.map +1 -0
  265. package/lib/dist/installer/targets/claude.d.ts +62 -0
  266. package/lib/dist/installer/targets/claude.d.ts.map +1 -0
  267. package/lib/dist/installer/targets/claude.js +454 -0
  268. package/lib/dist/installer/targets/claude.js.map +1 -0
  269. package/lib/dist/installer/targets/codex.d.ts +18 -0
  270. package/lib/dist/installer/targets/codex.d.ts.map +1 -0
  271. package/lib/dist/installer/targets/codex.js +185 -0
  272. package/lib/dist/installer/targets/codex.js.map +1 -0
  273. package/lib/dist/installer/targets/cursor.d.ts +35 -0
  274. package/lib/dist/installer/targets/cursor.d.ts.map +1 -0
  275. package/lib/dist/installer/targets/cursor.js +254 -0
  276. package/lib/dist/installer/targets/cursor.js.map +1 -0
  277. package/lib/dist/installer/targets/gemini.d.ts +26 -0
  278. package/lib/dist/installer/targets/gemini.d.ts.map +1 -0
  279. package/lib/dist/installer/targets/gemini.js +165 -0
  280. package/lib/dist/installer/targets/gemini.js.map +1 -0
  281. package/lib/dist/installer/targets/hermes.d.ts +18 -0
  282. package/lib/dist/installer/targets/hermes.d.ts.map +1 -0
  283. package/lib/dist/installer/targets/hermes.js +359 -0
  284. package/lib/dist/installer/targets/hermes.js.map +1 -0
  285. package/lib/dist/installer/targets/kiro.d.ts +27 -0
  286. package/lib/dist/installer/targets/kiro.d.ts.map +1 -0
  287. package/lib/dist/installer/targets/kiro.js +178 -0
  288. package/lib/dist/installer/targets/kiro.js.map +1 -0
  289. package/lib/dist/installer/targets/opencode.d.ts +38 -0
  290. package/lib/dist/installer/targets/opencode.d.ts.map +1 -0
  291. package/lib/dist/installer/targets/opencode.js +307 -0
  292. package/lib/dist/installer/targets/opencode.js.map +1 -0
  293. package/lib/dist/installer/targets/registry.d.ts +35 -0
  294. package/lib/dist/installer/targets/registry.d.ts.map +1 -0
  295. package/lib/dist/installer/targets/registry.js +91 -0
  296. package/lib/dist/installer/targets/registry.js.map +1 -0
  297. package/lib/dist/installer/targets/shared.d.ts +101 -0
  298. package/lib/dist/installer/targets/shared.d.ts.map +1 -0
  299. package/lib/dist/installer/targets/shared.js +264 -0
  300. package/lib/dist/installer/targets/shared.js.map +1 -0
  301. package/lib/dist/installer/targets/toml.d.ts +52 -0
  302. package/lib/dist/installer/targets/toml.d.ts.map +1 -0
  303. package/lib/dist/installer/targets/toml.js +147 -0
  304. package/lib/dist/installer/targets/toml.js.map +1 -0
  305. package/lib/dist/installer/targets/types.d.ts +108 -0
  306. package/lib/dist/installer/targets/types.d.ts.map +1 -0
  307. package/lib/dist/installer/targets/types.js +16 -0
  308. package/lib/dist/installer/targets/types.js.map +1 -0
  309. package/lib/dist/mcp/daemon-manager.d.ts +42 -0
  310. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -0
  311. package/lib/dist/mcp/daemon-manager.js +129 -0
  312. package/lib/dist/mcp/daemon-manager.js.map +1 -0
  313. package/lib/dist/mcp/daemon-paths.d.ts +73 -0
  314. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -0
  315. package/lib/dist/mcp/daemon-paths.js +165 -0
  316. package/lib/dist/mcp/daemon-paths.js.map +1 -0
  317. package/lib/dist/mcp/daemon-registry.d.ts +47 -0
  318. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -0
  319. package/lib/dist/mcp/daemon-registry.js +233 -0
  320. package/lib/dist/mcp/daemon-registry.js.map +1 -0
  321. package/lib/dist/mcp/daemon.d.ts +258 -0
  322. package/lib/dist/mcp/daemon.d.ts.map +1 -0
  323. package/lib/dist/mcp/daemon.js +770 -0
  324. package/lib/dist/mcp/daemon.js.map +1 -0
  325. package/lib/dist/mcp/dynamic-boundaries.d.ts +41 -0
  326. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
  327. package/lib/dist/mcp/dynamic-boundaries.js +359 -0
  328. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -0
  329. package/lib/dist/mcp/engine.d.ts +122 -0
  330. package/lib/dist/mcp/engine.d.ts.map +1 -0
  331. package/lib/dist/mcp/engine.js +350 -0
  332. package/lib/dist/mcp/engine.js.map +1 -0
  333. package/lib/dist/mcp/index.d.ts +113 -0
  334. package/lib/dist/mcp/index.d.ts.map +1 -0
  335. package/lib/dist/mcp/index.js +481 -0
  336. package/lib/dist/mcp/index.js.map +1 -0
  337. package/lib/dist/mcp/liveness-watchdog.d.ts +18 -0
  338. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -0
  339. package/lib/dist/mcp/liveness-watchdog.js +207 -0
  340. package/lib/dist/mcp/liveness-watchdog.js.map +1 -0
  341. package/lib/dist/mcp/ppid-watchdog.d.ts +62 -0
  342. package/lib/dist/mcp/ppid-watchdog.d.ts.map +1 -0
  343. package/lib/dist/mcp/ppid-watchdog.js +64 -0
  344. package/lib/dist/mcp/ppid-watchdog.js.map +1 -0
  345. package/lib/dist/mcp/proxy.d.ts +87 -0
  346. package/lib/dist/mcp/proxy.d.ts.map +1 -0
  347. package/lib/dist/mcp/proxy.js +641 -0
  348. package/lib/dist/mcp/proxy.js.map +1 -0
  349. package/lib/dist/mcp/query-pool.d.ts +94 -0
  350. package/lib/dist/mcp/query-pool.d.ts.map +1 -0
  351. package/lib/dist/mcp/query-pool.js +297 -0
  352. package/lib/dist/mcp/query-pool.js.map +1 -0
  353. package/lib/dist/mcp/query-worker.d.ts +24 -0
  354. package/lib/dist/mcp/query-worker.d.ts.map +1 -0
  355. package/lib/dist/mcp/query-worker.js +87 -0
  356. package/lib/dist/mcp/query-worker.js.map +1 -0
  357. package/lib/dist/mcp/server-instructions.d.ts +34 -0
  358. package/lib/dist/mcp/server-instructions.d.ts.map +1 -0
  359. package/lib/dist/mcp/server-instructions.js +126 -0
  360. package/lib/dist/mcp/server-instructions.js.map +1 -0
  361. package/lib/dist/mcp/session.d.ts +79 -0
  362. package/lib/dist/mcp/session.d.ts.map +1 -0
  363. package/lib/dist/mcp/session.js +330 -0
  364. package/lib/dist/mcp/session.js.map +1 -0
  365. package/lib/dist/mcp/stdin-teardown.d.ts +27 -0
  366. package/lib/dist/mcp/stdin-teardown.d.ts.map +1 -0
  367. package/lib/dist/mcp/stdin-teardown.js +49 -0
  368. package/lib/dist/mcp/stdin-teardown.js.map +1 -0
  369. package/lib/dist/mcp/tools.d.ts +591 -0
  370. package/lib/dist/mcp/tools.d.ts.map +1 -0
  371. package/lib/dist/mcp/tools.js +4211 -0
  372. package/lib/dist/mcp/tools.js.map +1 -0
  373. package/lib/dist/mcp/transport.d.ts +188 -0
  374. package/lib/dist/mcp/transport.d.ts.map +1 -0
  375. package/lib/dist/mcp/transport.js +359 -0
  376. package/lib/dist/mcp/transport.js.map +1 -0
  377. package/lib/dist/mcp/version.d.ts +19 -0
  378. package/lib/dist/mcp/version.d.ts.map +1 -0
  379. package/lib/dist/mcp/version.js +71 -0
  380. package/lib/dist/mcp/version.js.map +1 -0
  381. package/lib/dist/project-config.d.ts +56 -0
  382. package/lib/dist/project-config.d.ts.map +1 -0
  383. package/lib/dist/project-config.js +297 -0
  384. package/lib/dist/project-config.js.map +1 -0
  385. package/lib/dist/reasoning/config.d.ts +45 -0
  386. package/lib/dist/reasoning/config.d.ts.map +1 -0
  387. package/lib/dist/reasoning/config.js +171 -0
  388. package/lib/dist/reasoning/config.js.map +1 -0
  389. package/lib/dist/reasoning/credentials.d.ts +5 -0
  390. package/lib/dist/reasoning/credentials.d.ts.map +1 -0
  391. package/lib/dist/reasoning/credentials.js +83 -0
  392. package/lib/dist/reasoning/credentials.js.map +1 -0
  393. package/lib/dist/reasoning/login.d.ts +21 -0
  394. package/lib/dist/reasoning/login.d.ts.map +1 -0
  395. package/lib/dist/reasoning/login.js +85 -0
  396. package/lib/dist/reasoning/login.js.map +1 -0
  397. package/lib/dist/reasoning/reasoner.d.ts +43 -0
  398. package/lib/dist/reasoning/reasoner.d.ts.map +1 -0
  399. package/lib/dist/reasoning/reasoner.js +308 -0
  400. package/lib/dist/reasoning/reasoner.js.map +1 -0
  401. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +5 -0
  402. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
  403. package/lib/dist/resolution/c-fnptr-synthesizer.js +1038 -0
  404. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
  405. package/lib/dist/resolution/callback-synthesizer.d.ts +15 -0
  406. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  407. package/lib/dist/resolution/callback-synthesizer.js +2926 -0
  408. package/lib/dist/resolution/callback-synthesizer.js.map +1 -0
  409. package/lib/dist/resolution/frameworks/astro.d.ts +9 -0
  410. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -0
  411. package/lib/dist/resolution/frameworks/astro.js +169 -0
  412. package/lib/dist/resolution/frameworks/astro.js.map +1 -0
  413. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  414. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  415. package/lib/dist/resolution/frameworks/cargo-workspace.js +225 -0
  416. package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  417. package/lib/dist/resolution/frameworks/csharp.d.ts +8 -0
  418. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  419. package/lib/dist/resolution/frameworks/csharp.js +241 -0
  420. package/lib/dist/resolution/frameworks/csharp.js.map +1 -0
  421. package/lib/dist/resolution/frameworks/drupal.d.ts +51 -0
  422. package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -0
  423. package/lib/dist/resolution/frameworks/drupal.js +367 -0
  424. package/lib/dist/resolution/frameworks/drupal.js.map +1 -0
  425. package/lib/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  426. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  427. package/lib/dist/resolution/frameworks/expo-modules.js +148 -0
  428. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -0
  429. package/lib/dist/resolution/frameworks/express.d.ts +8 -0
  430. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -0
  431. package/lib/dist/resolution/frameworks/express.js +308 -0
  432. package/lib/dist/resolution/frameworks/express.js.map +1 -0
  433. package/lib/dist/resolution/frameworks/fabric.d.ts +3 -0
  434. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  435. package/lib/dist/resolution/frameworks/fabric.js +354 -0
  436. package/lib/dist/resolution/frameworks/fabric.js.map +1 -0
  437. package/lib/dist/resolution/frameworks/go.d.ts +8 -0
  438. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -0
  439. package/lib/dist/resolution/frameworks/go.js +161 -0
  440. package/lib/dist/resolution/frameworks/go.js.map +1 -0
  441. package/lib/dist/resolution/frameworks/goframe.d.ts +41 -0
  442. package/lib/dist/resolution/frameworks/goframe.d.ts.map +1 -0
  443. package/lib/dist/resolution/frameworks/goframe.js +112 -0
  444. package/lib/dist/resolution/frameworks/goframe.js.map +1 -0
  445. package/lib/dist/resolution/frameworks/index.d.ts +50 -0
  446. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -0
  447. package/lib/dist/resolution/frameworks/index.js +169 -0
  448. package/lib/dist/resolution/frameworks/index.js.map +1 -0
  449. package/lib/dist/resolution/frameworks/java.d.ts +8 -0
  450. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -0
  451. package/lib/dist/resolution/frameworks/java.js +509 -0
  452. package/lib/dist/resolution/frameworks/java.js.map +1 -0
  453. package/lib/dist/resolution/frameworks/laravel.d.ts +13 -0
  454. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  455. package/lib/dist/resolution/frameworks/laravel.js +257 -0
  456. package/lib/dist/resolution/frameworks/laravel.js.map +1 -0
  457. package/lib/dist/resolution/frameworks/nestjs.d.ts +26 -0
  458. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  459. package/lib/dist/resolution/frameworks/nestjs.js +698 -0
  460. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -0
  461. package/lib/dist/resolution/frameworks/play.d.ts +19 -0
  462. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -0
  463. package/lib/dist/resolution/frameworks/play.js +111 -0
  464. package/lib/dist/resolution/frameworks/play.js.map +1 -0
  465. package/lib/dist/resolution/frameworks/python.d.ts +10 -0
  466. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -0
  467. package/lib/dist/resolution/frameworks/python.js +400 -0
  468. package/lib/dist/resolution/frameworks/python.js.map +1 -0
  469. package/lib/dist/resolution/frameworks/react-native.d.ts +3 -0
  470. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  471. package/lib/dist/resolution/frameworks/react-native.js +410 -0
  472. package/lib/dist/resolution/frameworks/react-native.js.map +1 -0
  473. package/lib/dist/resolution/frameworks/react.d.ts +8 -0
  474. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -0
  475. package/lib/dist/resolution/frameworks/react.js +334 -0
  476. package/lib/dist/resolution/frameworks/react.js.map +1 -0
  477. package/lib/dist/resolution/frameworks/ruby.d.ts +8 -0
  478. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  479. package/lib/dist/resolution/frameworks/ruby.js +302 -0
  480. package/lib/dist/resolution/frameworks/ruby.js.map +1 -0
  481. package/lib/dist/resolution/frameworks/rust.d.ts +8 -0
  482. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -0
  483. package/lib/dist/resolution/frameworks/rust.js +304 -0
  484. package/lib/dist/resolution/frameworks/rust.js.map +1 -0
  485. package/lib/dist/resolution/frameworks/svelte.d.ts +9 -0
  486. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  487. package/lib/dist/resolution/frameworks/svelte.js +253 -0
  488. package/lib/dist/resolution/frameworks/svelte.js.map +1 -0
  489. package/lib/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  490. package/lib/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  491. package/lib/dist/resolution/frameworks/swift-objc.js +252 -0
  492. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -0
  493. package/lib/dist/resolution/frameworks/swift.d.ts +10 -0
  494. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -0
  495. package/lib/dist/resolution/frameworks/swift.js +400 -0
  496. package/lib/dist/resolution/frameworks/swift.js.map +1 -0
  497. package/lib/dist/resolution/frameworks/vue.d.ts +9 -0
  498. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -0
  499. package/lib/dist/resolution/frameworks/vue.js +303 -0
  500. package/lib/dist/resolution/frameworks/vue.js.map +1 -0
  501. package/lib/dist/resolution/go-module.d.ts +26 -0
  502. package/lib/dist/resolution/go-module.d.ts.map +1 -0
  503. package/lib/dist/resolution/go-module.js +78 -0
  504. package/lib/dist/resolution/go-module.js.map +1 -0
  505. package/lib/dist/resolution/goframe-synthesizer.d.ts +28 -0
  506. package/lib/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
  507. package/lib/dist/resolution/goframe-synthesizer.js +158 -0
  508. package/lib/dist/resolution/goframe-synthesizer.js.map +1 -0
  509. package/lib/dist/resolution/import-resolver.d.ts +78 -0
  510. package/lib/dist/resolution/import-resolver.d.ts.map +1 -0
  511. package/lib/dist/resolution/import-resolver.js +1849 -0
  512. package/lib/dist/resolution/import-resolver.js.map +1 -0
  513. package/lib/dist/resolution/index.d.ts +196 -0
  514. package/lib/dist/resolution/index.d.ts.map +1 -0
  515. package/lib/dist/resolution/index.js +1328 -0
  516. package/lib/dist/resolution/index.js.map +1 -0
  517. package/lib/dist/resolution/lru-cache.d.ts +24 -0
  518. package/lib/dist/resolution/lru-cache.d.ts.map +1 -0
  519. package/lib/dist/resolution/lru-cache.js +62 -0
  520. package/lib/dist/resolution/lru-cache.js.map +1 -0
  521. package/lib/dist/resolution/name-matcher.d.ts +93 -0
  522. package/lib/dist/resolution/name-matcher.d.ts.map +1 -0
  523. package/lib/dist/resolution/name-matcher.js +1256 -0
  524. package/lib/dist/resolution/name-matcher.js.map +1 -0
  525. package/lib/dist/resolution/path-aliases.d.ts +68 -0
  526. package/lib/dist/resolution/path-aliases.d.ts.map +1 -0
  527. package/lib/dist/resolution/path-aliases.js +238 -0
  528. package/lib/dist/resolution/path-aliases.js.map +1 -0
  529. package/lib/dist/resolution/strip-comments.d.ts +27 -0
  530. package/lib/dist/resolution/strip-comments.d.ts.map +1 -0
  531. package/lib/dist/resolution/strip-comments.js +443 -0
  532. package/lib/dist/resolution/strip-comments.js.map +1 -0
  533. package/lib/dist/resolution/swift-objc-bridge.d.ts +134 -0
  534. package/lib/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  535. package/lib/dist/resolution/swift-objc-bridge.js +256 -0
  536. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -0
  537. package/lib/dist/resolution/types.d.ts +233 -0
  538. package/lib/dist/resolution/types.d.ts.map +1 -0
  539. package/lib/dist/resolution/types.js +8 -0
  540. package/lib/dist/resolution/types.js.map +1 -0
  541. package/lib/dist/resolution/workspace-packages.d.ts +48 -0
  542. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -0
  543. package/lib/dist/resolution/workspace-packages.js +208 -0
  544. package/lib/dist/resolution/workspace-packages.js.map +1 -0
  545. package/lib/dist/search/query-parser.d.ts +57 -0
  546. package/lib/dist/search/query-parser.d.ts.map +1 -0
  547. package/lib/dist/search/query-parser.js +177 -0
  548. package/lib/dist/search/query-parser.js.map +1 -0
  549. package/lib/dist/search/query-utils.d.ts +87 -0
  550. package/lib/dist/search/query-utils.d.ts.map +1 -0
  551. package/lib/dist/search/query-utils.js +449 -0
  552. package/lib/dist/search/query-utils.js.map +1 -0
  553. package/lib/dist/sync/git-hooks.d.ts +45 -0
  554. package/lib/dist/sync/git-hooks.d.ts.map +1 -0
  555. package/lib/dist/sync/git-hooks.js +225 -0
  556. package/lib/dist/sync/git-hooks.js.map +1 -0
  557. package/lib/dist/sync/index.d.ts +19 -0
  558. package/lib/dist/sync/index.d.ts.map +1 -0
  559. package/lib/dist/sync/index.js +35 -0
  560. package/lib/dist/sync/index.js.map +1 -0
  561. package/lib/dist/sync/watch-policy.d.ts +48 -0
  562. package/lib/dist/sync/watch-policy.d.ts.map +1 -0
  563. package/lib/dist/sync/watch-policy.js +124 -0
  564. package/lib/dist/sync/watch-policy.js.map +1 -0
  565. package/lib/dist/sync/watcher.d.ts +358 -0
  566. package/lib/dist/sync/watcher.d.ts.map +1 -0
  567. package/lib/dist/sync/watcher.js +829 -0
  568. package/lib/dist/sync/watcher.js.map +1 -0
  569. package/lib/dist/sync/worktree.d.ts +54 -0
  570. package/lib/dist/sync/worktree.d.ts.map +1 -0
  571. package/lib/dist/sync/worktree.js +145 -0
  572. package/lib/dist/sync/worktree.js.map +1 -0
  573. package/lib/dist/telemetry/index.d.ts +143 -0
  574. package/lib/dist/telemetry/index.d.ts.map +1 -0
  575. package/lib/dist/telemetry/index.js +541 -0
  576. package/lib/dist/telemetry/index.js.map +1 -0
  577. package/lib/dist/types.d.ts +409 -0
  578. package/lib/dist/types.d.ts.map +1 -0
  579. package/lib/dist/types.js +101 -0
  580. package/lib/dist/types.js.map +1 -0
  581. package/lib/dist/ui/glyphs.d.ts +42 -0
  582. package/lib/dist/ui/glyphs.d.ts.map +1 -0
  583. package/lib/dist/ui/glyphs.js +78 -0
  584. package/lib/dist/ui/glyphs.js.map +1 -0
  585. package/lib/dist/ui/shimmer-progress.d.ts +11 -0
  586. package/lib/dist/ui/shimmer-progress.d.ts.map +1 -0
  587. package/lib/dist/ui/shimmer-progress.js +90 -0
  588. package/lib/dist/ui/shimmer-progress.js.map +1 -0
  589. package/lib/dist/ui/shimmer-worker.d.ts +2 -0
  590. package/lib/dist/ui/shimmer-worker.d.ts.map +1 -0
  591. package/lib/dist/ui/shimmer-worker.js +118 -0
  592. package/lib/dist/ui/shimmer-worker.js.map +1 -0
  593. package/lib/dist/ui/types.d.ts +17 -0
  594. package/lib/dist/ui/types.d.ts.map +1 -0
  595. package/lib/dist/ui/types.js +3 -0
  596. package/lib/dist/ui/types.js.map +1 -0
  597. package/lib/dist/upgrade/index.d.ts +132 -0
  598. package/lib/dist/upgrade/index.d.ts.map +1 -0
  599. package/lib/dist/upgrade/index.js +576 -0
  600. package/lib/dist/upgrade/index.js.map +1 -0
  601. package/lib/dist/utils.d.ts +224 -0
  602. package/lib/dist/utils.d.ts.map +1 -0
  603. package/lib/dist/utils.js +583 -0
  604. package/lib/dist/utils.js.map +1 -0
  605. package/lib/node_modules/.modules.yaml +45 -0
  606. package/lib/node_modules/.pnpm/lock.yaml +126 -0
  607. package/lib/node_modules/.pnpm-workspace-state-v1.json +25 -0
  608. package/lib/node_modules/@clack/core/CHANGELOG.md +397 -0
  609. package/lib/node_modules/@clack/core/LICENSE +9 -0
  610. package/lib/node_modules/@clack/core/README.md +22 -0
  611. package/lib/node_modules/@clack/core/dist/index.d.mts +469 -0
  612. package/lib/node_modules/@clack/core/dist/index.mjs +981 -0
  613. package/lib/node_modules/@clack/core/package.json +64 -0
  614. package/lib/node_modules/@clack/prompts/CHANGELOG.md +672 -0
  615. package/lib/node_modules/@clack/prompts/LICENSE +9 -0
  616. package/lib/node_modules/@clack/prompts/README.md +396 -0
  617. package/lib/node_modules/@clack/prompts/dist/index.d.mts +928 -0
  618. package/lib/node_modules/@clack/prompts/dist/index.mjs +1398 -0
  619. package/lib/node_modules/@clack/prompts/package.json +68 -0
  620. package/lib/node_modules/commander/LICENSE +22 -0
  621. package/lib/node_modules/commander/Readme.md +1176 -0
  622. package/lib/node_modules/commander/esm.mjs +16 -0
  623. package/lib/node_modules/commander/index.js +24 -0
  624. package/lib/node_modules/commander/lib/argument.js +150 -0
  625. package/lib/node_modules/commander/lib/command.js +2777 -0
  626. package/lib/node_modules/commander/lib/error.js +39 -0
  627. package/lib/node_modules/commander/lib/help.js +747 -0
  628. package/lib/node_modules/commander/lib/option.js +380 -0
  629. package/lib/node_modules/commander/lib/suggestSimilar.js +101 -0
  630. package/lib/node_modules/commander/package-support.json +19 -0
  631. package/lib/node_modules/commander/package.json +82 -0
  632. package/lib/node_modules/commander/typings/esm.d.mts +3 -0
  633. package/lib/node_modules/commander/typings/index.d.ts +1113 -0
  634. package/lib/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
  635. package/lib/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  636. package/lib/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
  637. package/lib/node_modules/fast-string-truncated-width/dist/types.js +2 -0
  638. package/lib/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
  639. package/lib/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  640. package/lib/node_modules/fast-string-truncated-width/license +21 -0
  641. package/lib/node_modules/fast-string-truncated-width/package.json +35 -0
  642. package/lib/node_modules/fast-string-truncated-width/readme.md +59 -0
  643. package/lib/node_modules/fast-string-width/dist/index.d.ts +4 -0
  644. package/lib/node_modules/fast-string-width/dist/index.js +14 -0
  645. package/lib/node_modules/fast-string-width/license +21 -0
  646. package/lib/node_modules/fast-string-width/package.json +34 -0
  647. package/lib/node_modules/fast-string-width/readme.md +42 -0
  648. package/lib/node_modules/fast-wrap-ansi/LICENSE +23 -0
  649. package/lib/node_modules/fast-wrap-ansi/README.md +26 -0
  650. package/lib/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
  651. package/lib/node_modules/fast-wrap-ansi/lib/main.js +218 -0
  652. package/lib/node_modules/fast-wrap-ansi/package.json +51 -0
  653. package/lib/node_modules/ignore/LICENSE-MIT +21 -0
  654. package/lib/node_modules/ignore/README.md +452 -0
  655. package/lib/node_modules/ignore/index.d.ts +81 -0
  656. package/lib/node_modules/ignore/index.js +784 -0
  657. package/lib/node_modules/ignore/legacy.js +681 -0
  658. package/lib/node_modules/ignore/package.json +87 -0
  659. package/lib/node_modules/jsonc-parser/CHANGELOG.md +76 -0
  660. package/lib/node_modules/jsonc-parser/LICENSE.md +21 -0
  661. package/lib/node_modules/jsonc-parser/README.md +364 -0
  662. package/lib/node_modules/jsonc-parser/SECURITY.md +41 -0
  663. package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
  664. package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
  665. package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
  666. package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
  667. package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
  668. package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
  669. package/lib/node_modules/jsonc-parser/lib/esm/main.js +178 -0
  670. package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
  671. package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
  672. package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
  673. package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
  674. package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
  675. package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
  676. package/lib/node_modules/jsonc-parser/lib/umd/main.js +194 -0
  677. package/lib/node_modules/jsonc-parser/package.json +37 -0
  678. package/lib/node_modules/picomatch/LICENSE +21 -0
  679. package/lib/node_modules/picomatch/README.md +749 -0
  680. package/lib/node_modules/picomatch/index.js +17 -0
  681. package/lib/node_modules/picomatch/lib/constants.js +184 -0
  682. package/lib/node_modules/picomatch/lib/parse.js +1386 -0
  683. package/lib/node_modules/picomatch/lib/picomatch.js +349 -0
  684. package/lib/node_modules/picomatch/lib/scan.js +391 -0
  685. package/lib/node_modules/picomatch/lib/utils.js +72 -0
  686. package/lib/node_modules/picomatch/package.json +82 -0
  687. package/lib/node_modules/picomatch/posix.js +3 -0
  688. package/lib/node_modules/sisteransi/license +21 -0
  689. package/lib/node_modules/sisteransi/package.json +34 -0
  690. package/lib/node_modules/sisteransi/readme.md +113 -0
  691. package/lib/node_modules/sisteransi/src/index.js +58 -0
  692. package/lib/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  693. package/lib/node_modules/tree-sitter-wasms/LICENSE +24 -0
  694. package/lib/node_modules/tree-sitter-wasms/README.md +23 -0
  695. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-bash.wasm +0 -0
  696. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c.wasm +0 -0
  697. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-c_sharp.wasm +0 -0
  698. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-cpp.wasm +0 -0
  699. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-css.wasm +0 -0
  700. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-dart.wasm +0 -0
  701. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elisp.wasm +0 -0
  702. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elixir.wasm +0 -0
  703. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-elm.wasm +0 -0
  704. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-embedded_template.wasm +0 -0
  705. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-go.wasm +0 -0
  706. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-html.wasm +0 -0
  707. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-java.wasm +0 -0
  708. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-javascript.wasm +0 -0
  709. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-json.wasm +0 -0
  710. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-kotlin.wasm +0 -0
  711. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-lua.wasm +0 -0
  712. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-objc.wasm +0 -0
  713. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ocaml.wasm +0 -0
  714. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-php.wasm +0 -0
  715. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-python.wasm +0 -0
  716. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ql.wasm +0 -0
  717. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rescript.wasm +0 -0
  718. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-ruby.wasm +0 -0
  719. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-rust.wasm +0 -0
  720. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-scala.wasm +0 -0
  721. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-solidity.wasm +0 -0
  722. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-swift.wasm +0 -0
  723. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-systemrdl.wasm +0 -0
  724. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tlaplus.wasm +0 -0
  725. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-toml.wasm +0 -0
  726. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-tsx.wasm +0 -0
  727. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-typescript.wasm +0 -0
  728. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-vue.wasm +0 -0
  729. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-yaml.wasm +0 -0
  730. package/lib/node_modules/tree-sitter-wasms/out/tree-sitter-zig.wasm +0 -0
  731. package/lib/node_modules/tree-sitter-wasms/package.json +64 -0
  732. package/lib/node_modules/web-tree-sitter/LICENSE +21 -0
  733. package/lib/node_modules/web-tree-sitter/README.md +269 -0
  734. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs +4558 -0
  735. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.cjs.map +7 -0
  736. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js +4516 -0
  737. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.js.map +7 -0
  738. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm +0 -0
  739. package/lib/node_modules/web-tree-sitter/debug/tree-sitter.wasm.map +31 -0
  740. package/lib/node_modules/web-tree-sitter/lib/alloc.c +48 -0
  741. package/lib/node_modules/web-tree-sitter/lib/alloc.h +41 -0
  742. package/lib/node_modules/web-tree-sitter/lib/array.h +291 -0
  743. package/lib/node_modules/web-tree-sitter/lib/atomic.h +68 -0
  744. package/lib/node_modules/web-tree-sitter/lib/clock.h +146 -0
  745. package/lib/node_modules/web-tree-sitter/lib/error_costs.h +11 -0
  746. package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.c +523 -0
  747. package/lib/node_modules/web-tree-sitter/lib/get_changed_ranges.h +36 -0
  748. package/lib/node_modules/web-tree-sitter/lib/host.h +21 -0
  749. package/lib/node_modules/web-tree-sitter/lib/language.c +293 -0
  750. package/lib/node_modules/web-tree-sitter/lib/language.h +293 -0
  751. package/lib/node_modules/web-tree-sitter/lib/length.h +52 -0
  752. package/lib/node_modules/web-tree-sitter/lib/lexer.c +483 -0
  753. package/lib/node_modules/web-tree-sitter/lib/lexer.h +54 -0
  754. package/lib/node_modules/web-tree-sitter/lib/lib.c +12 -0
  755. package/lib/node_modules/web-tree-sitter/lib/node.c +875 -0
  756. package/lib/node_modules/web-tree-sitter/lib/parser.c +2297 -0
  757. package/lib/node_modules/web-tree-sitter/lib/parser.h +286 -0
  758. package/lib/node_modules/web-tree-sitter/lib/point.h +48 -0
  759. package/lib/node_modules/web-tree-sitter/lib/query.c +4347 -0
  760. package/lib/node_modules/web-tree-sitter/lib/reduce_action.h +34 -0
  761. package/lib/node_modules/web-tree-sitter/lib/reusable_node.h +95 -0
  762. package/lib/node_modules/web-tree-sitter/lib/stack.c +912 -0
  763. package/lib/node_modules/web-tree-sitter/lib/stack.h +133 -0
  764. package/lib/node_modules/web-tree-sitter/lib/subtree.c +1034 -0
  765. package/lib/node_modules/web-tree-sitter/lib/subtree.h +399 -0
  766. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.c +987 -0
  767. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.cjs +2988 -0
  768. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm +0 -0
  769. package/lib/node_modules/web-tree-sitter/lib/tree-sitter.wasm.map +1 -0
  770. package/lib/node_modules/web-tree-sitter/lib/tree.c +170 -0
  771. package/lib/node_modules/web-tree-sitter/lib/tree.h +31 -0
  772. package/lib/node_modules/web-tree-sitter/lib/tree_cursor.c +716 -0
  773. package/lib/node_modules/web-tree-sitter/lib/tree_cursor.h +48 -0
  774. package/lib/node_modules/web-tree-sitter/lib/ts_assert.h +11 -0
  775. package/lib/node_modules/web-tree-sitter/lib/unicode.h +75 -0
  776. package/lib/node_modules/web-tree-sitter/lib/wasm_store.c +1937 -0
  777. package/lib/node_modules/web-tree-sitter/lib/wasm_store.h +31 -0
  778. package/lib/node_modules/web-tree-sitter/package.json +98 -0
  779. package/lib/node_modules/web-tree-sitter/src/bindings.ts +26 -0
  780. package/lib/node_modules/web-tree-sitter/src/constants.ts +133 -0
  781. package/lib/node_modules/web-tree-sitter/src/index.ts +31 -0
  782. package/lib/node_modules/web-tree-sitter/src/language.ts +291 -0
  783. package/lib/node_modules/web-tree-sitter/src/lookahead_iterator.ts +75 -0
  784. package/lib/node_modules/web-tree-sitter/src/marshal.ts +176 -0
  785. package/lib/node_modules/web-tree-sitter/src/node.ts +646 -0
  786. package/lib/node_modules/web-tree-sitter/src/parser.ts +325 -0
  787. package/lib/node_modules/web-tree-sitter/src/query.ts +973 -0
  788. package/lib/node_modules/web-tree-sitter/src/tree.ts +145 -0
  789. package/lib/node_modules/web-tree-sitter/src/tree_cursor.ts +318 -0
  790. package/lib/node_modules/web-tree-sitter/tree-sitter.cjs +4031 -0
  791. package/lib/node_modules/web-tree-sitter/tree-sitter.cjs.map +7 -0
  792. package/lib/node_modules/web-tree-sitter/tree-sitter.js +3980 -0
  793. package/lib/node_modules/web-tree-sitter/tree-sitter.js.map +7 -0
  794. package/lib/node_modules/web-tree-sitter/tree-sitter.wasm +0 -0
  795. package/lib/node_modules/web-tree-sitter/tree-sitter.wasm.map +30 -0
  796. package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts +1030 -0
  797. package/lib/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +56 -0
  798. package/lib/package.json +57 -0
  799. package/node +0 -0
  800. package/package.json +17 -0
@@ -0,0 +1,1398 @@
1
+ import { getColumns, getRows, AutocompletePrompt, settings, ConfirmPrompt, wrapTextWithPrefix, DatePrompt, runValidation, isCancel, MultiSelectPrompt, GroupMultiSelectPrompt, MultiLinePrompt, PasswordPrompt, block, SelectPrompt, SelectKeyPrompt, TextPrompt } from '@clack/core';
2
+ export { isCancel, settings, updateSettings } from '@clack/core';
3
+ import { styleText, stripVTControlCharacters } from 'node:util';
4
+ import process$1 from 'node:process';
5
+ import { wrapAnsi } from 'fast-wrap-ansi';
6
+ import l from 'fast-string-width';
7
+ import { existsSync, lstatSync, readdirSync } from 'node:fs';
8
+ import { dirname, join } from 'node:path';
9
+ import { cursor, erase } from 'sisteransi';
10
+
11
+ function isUnicodeSupported() {
12
+ if (process$1.platform !== 'win32') {
13
+ return process$1.env.TERM !== 'linux'; // Linux console (kernel)
14
+ }
15
+
16
+ return Boolean(process$1.env.CI)
17
+ || Boolean(process$1.env.WT_SESSION) // Windows Terminal
18
+ || Boolean(process$1.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
19
+ || process$1.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
20
+ || process$1.env.TERM_PROGRAM === 'Terminus-Sublime'
21
+ || process$1.env.TERM_PROGRAM === 'vscode'
22
+ || process$1.env.TERM === 'xterm-256color'
23
+ || process$1.env.TERM === 'alacritty'
24
+ || process$1.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
25
+ }
26
+
27
+ const unicode = isUnicodeSupported(), isCI = () => process.env.CI === "true", isTTY = (o) => o.isTTY === true, unicodeOr = (o, e) => unicode ? o : e, S_STEP_ACTIVE = unicodeOr("\u25C6", "*"), S_STEP_CANCEL = unicodeOr("\u25A0", "x"), S_STEP_ERROR = unicodeOr("\u25B2", "x"), S_STEP_SUBMIT = unicodeOr("\u25C7", "o"), S_BAR_START = unicodeOr("\u250C", "T"), S_BAR = unicodeOr("\u2502", "|"), S_BAR_END = unicodeOr("\u2514", "\u2014"), S_BAR_START_RIGHT = unicodeOr("\u2510", "T"), S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014"), S_RADIO_ACTIVE = unicodeOr("\u25CF", ">"), S_RADIO_INACTIVE = unicodeOr("\u25CB", " "), S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]"), S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]"), S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]"), S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022"), S_BAR_H = unicodeOr("\u2500", "-"), S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+"), S_CONNECT_LEFT = unicodeOr("\u251C", "+"), S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+"), S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+"), S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+"), S_INFO = unicodeOr("\u25CF", "\u2022"), S_SUCCESS = unicodeOr("\u25C6", "*"), S_WARN = unicodeOr("\u25B2", "!"), S_ERROR = unicodeOr("\u25A0", "x"), symbol = (o) => {
28
+ switch (o) {
29
+ case "initial":
30
+ case "active":
31
+ return styleText("cyan", S_STEP_ACTIVE);
32
+ case "cancel":
33
+ return styleText("red", S_STEP_CANCEL);
34
+ case "error":
35
+ return styleText("yellow", S_STEP_ERROR);
36
+ case "submit":
37
+ return styleText("green", S_STEP_SUBMIT);
38
+ }
39
+ }, symbolBar = (o) => {
40
+ switch (o) {
41
+ case "initial":
42
+ case "active":
43
+ return styleText("cyan", S_BAR);
44
+ case "cancel":
45
+ return styleText("red", S_BAR);
46
+ case "error":
47
+ return styleText("yellow", S_BAR);
48
+ case "submit":
49
+ return styleText("green", S_BAR);
50
+ }
51
+ };
52
+ function formatInstructionFooter(o, e) {
53
+ const r = [`${e ? `${styleText("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
54
+ return e && r.push(styleText("cyan", S_BAR_END)), r;
55
+ }
56
+
57
+ const E$1 = (l, o, g, c, h, O = false) => {
58
+ let r = o, w = 0;
59
+ if (O)
60
+ for (let i = c - 1; i >= g && (r -= l[i].length, w++, !(r <= h)); i--)
61
+ ;
62
+ else
63
+ for (let i = g; i < c && (r -= l[i].length, w++, !(r <= h)); i++)
64
+ ;
65
+ return { lineCount: r, removals: w };
66
+ };
67
+ const limitOptions = ({
68
+ cursor: l,
69
+ options: o,
70
+ style: g,
71
+ output: c = process.stdout,
72
+ maxItems: h = Number.POSITIVE_INFINITY,
73
+ columnPadding: O = 0,
74
+ rowPadding: r = 4
75
+ }) => {
76
+ const i = getColumns(c) - O, I = getRows(c), C = styleText("dim", "..."), x = Math.max(I - r, 0), m = Math.max(Math.min(h, x), 5);
77
+ let p = 0;
78
+ l >= m - 3 && (p = Math.max(
79
+ Math.min(l - m + 3, o.length - m),
80
+ 0
81
+ ));
82
+ let f = m < o.length && p > 0, u = m < o.length && p + m < o.length;
83
+ const W = Math.min(
84
+ p + m,
85
+ o.length
86
+ ), e = [];
87
+ let d = 0;
88
+ f && d++, u && d++;
89
+ const v = p + (f ? 1 : 0), P = W - (u ? 1 : 0);
90
+ for (let t = v; t < P; t++) {
91
+ const n = wrapAnsi(g(o[t], t === l), i, {
92
+ hard: true,
93
+ trim: false
94
+ }).split(`
95
+ `);
96
+ e.push(n), d += n.length;
97
+ }
98
+ if (d > x) {
99
+ let t = 0, n = 0, s = d;
100
+ const M = l - v;
101
+ let a = x;
102
+ const T = () => E$1(e, s, 0, M, a), L = () => E$1(
103
+ e,
104
+ s,
105
+ M + 1,
106
+ e.length,
107
+ a,
108
+ true
109
+ );
110
+ f ? ({ lineCount: s, removals: t } = T(), s > a && (u || (a -= 1), { lineCount: s, removals: n } = L())) : (u || (a -= 1), { lineCount: s, removals: n } = L(), s > a && (a -= 1, { lineCount: s, removals: t } = T())), t > 0 && (f = true, e.splice(0, t)), n > 0 && (u = true, e.splice(e.length - n, n));
111
+ }
112
+ const b = [];
113
+ f && b.push(C);
114
+ for (const t of e)
115
+ for (const n of t)
116
+ b.push(n);
117
+ return u && b.push(C), b;
118
+ };
119
+
120
+ function P(t) {
121
+ return t.label ?? String(t.value ?? "");
122
+ }
123
+ function E(t, c) {
124
+ if (!t)
125
+ return true;
126
+ const n = (c.label ?? String(c.value ?? "")).toLowerCase(), i = (c.hint ?? "").toLowerCase(), l = String(c.value).toLowerCase(), o = t.toLowerCase();
127
+ return n.includes(o) || i.includes(o) || l.includes(o);
128
+ }
129
+ function N(t, c) {
130
+ const n = [];
131
+ for (const i of c)
132
+ t.includes(i.value) && n.push(i);
133
+ return n;
134
+ }
135
+ const autocomplete = (t) => new AutocompletePrompt({
136
+ options: t.options,
137
+ initialValue: t.initialValue ? [t.initialValue] : void 0,
138
+ initialUserInput: t.initialUserInput,
139
+ placeholder: t.placeholder,
140
+ filter: t.filter ?? ((n, i) => E(n, i)),
141
+ signal: t.signal,
142
+ input: t.input,
143
+ output: t.output,
144
+ validate: t.validate,
145
+ render() {
146
+ const n = t.withGuide ?? settings.withGuide, i = n ? [`${styleText("gray", S_BAR)}`, `${symbol(this.state)} ${t.message}`] : [`${symbol(this.state)} ${t.message}`], l = this.userInput, o = this.options, m = t.placeholder, p = l === "" && m !== void 0, $ = (r, s) => {
147
+ const a = P(r), u = r.hint && r.value === this.focusedValue ? styleText("dim", ` (${r.hint})`) : "";
148
+ switch (s) {
149
+ case "active":
150
+ return `${styleText("green", S_RADIO_ACTIVE)} ${a}${u}`;
151
+ case "inactive":
152
+ return `${styleText("dim", S_RADIO_INACTIVE)} ${styleText("dim", a)}`;
153
+ case "disabled":
154
+ return `${styleText("gray", S_RADIO_INACTIVE)} ${styleText(["strikethrough", "gray"], a)}`;
155
+ }
156
+ };
157
+ switch (this.state) {
158
+ case "submit": {
159
+ const r = N(this.selectedValues, o), s = r.length > 0 ? ` ${styleText("dim", r.map(P).join(", "))}` : "", a = n ? styleText("gray", S_BAR) : "";
160
+ return `${i.join(`
161
+ `)}
162
+ ${a}${s}`;
163
+ }
164
+ case "cancel": {
165
+ const r = l ? ` ${styleText(["strikethrough", "dim"], l)}` : "", s = n ? styleText("gray", S_BAR) : "";
166
+ return `${i.join(`
167
+ `)}
168
+ ${s}${r}`;
169
+ }
170
+ default: {
171
+ const r = this.state === "error" ? "yellow" : "cyan", s = n ? `${styleText(r, S_BAR)} ` : "", a = n ? styleText(r, S_BAR_END) : "";
172
+ let u = "";
173
+ if (this.isNavigating || p) {
174
+ const d = p ? m : l;
175
+ u = d !== "" ? ` ${styleText("dim", d)}` : "";
176
+ } else
177
+ u = ` ${this.userInputWithCursor}`;
178
+ const V = this.filteredOptions.length !== o.length ? styleText(
179
+ "dim",
180
+ ` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`
181
+ ) : "", y = this.filteredOptions.length === 0 && l ? [`${s}${styleText("yellow", "No matches found")}`] : [], b = this.state === "error" ? [`${s}${styleText("yellow", this.error)}`] : [];
182
+ n && i.push(`${s.trimEnd()}`), i.push(
183
+ `${s}${styleText("dim", "Search:")}${u}${V}`,
184
+ ...y,
185
+ ...b
186
+ );
187
+ const v = [
188
+ `${styleText("dim", "\u2191/\u2193")} to select`,
189
+ `${styleText("dim", "Enter:")} confirm`,
190
+ `${styleText("dim", "Type:")} to search`
191
+ ], g = [`${s}${v.join(" \u2022 ")}`, a], O = this.filteredOptions.length === 0 ? [] : limitOptions({
192
+ cursor: this.cursor,
193
+ options: this.filteredOptions,
194
+ columnPadding: n ? 3 : 0,
195
+ // for `| ` when guide is shown
196
+ rowPadding: i.length + g.length,
197
+ style: (d, f) => $(
198
+ d,
199
+ d.disabled ? "disabled" : f ? "active" : "inactive"
200
+ ),
201
+ maxItems: t.maxItems,
202
+ output: t.output
203
+ });
204
+ return [
205
+ ...i,
206
+ ...O.map((d) => `${s}${d}`),
207
+ ...g
208
+ ].join(`
209
+ `);
210
+ }
211
+ }
212
+ }
213
+ }).prompt(), autocompleteMultiselect = (t) => {
214
+ const c = (i, l, o, m) => {
215
+ const p = o.includes(i.value), $ = i.label ?? String(i.value ?? ""), r = i.hint && m !== void 0 && i.value === m ? styleText("dim", ` (${i.hint})`) : "", s = p ? styleText("green", S_CHECKBOX_SELECTED) : styleText("dim", S_CHECKBOX_INACTIVE);
216
+ return i.disabled ? `${styleText("gray", S_CHECKBOX_INACTIVE)} ${styleText(["strikethrough", "gray"], $)}` : l ? `${s} ${$}${r}` : `${s} ${styleText("dim", $)}`;
217
+ }, n = new AutocompletePrompt({
218
+ options: t.options,
219
+ multiple: true,
220
+ placeholder: t.placeholder,
221
+ filter: t.filter ?? ((i, l) => E(i, l)),
222
+ validate: () => {
223
+ if (t.required && n.selectedValues.length === 0)
224
+ return "Please select at least one item";
225
+ },
226
+ initialValue: t.initialValues,
227
+ signal: t.signal,
228
+ input: t.input,
229
+ output: t.output,
230
+ render() {
231
+ const i = t.withGuide ?? settings.withGuide, l = `${i ? `${styleText("gray", S_BAR)}
232
+ ` : ""}${symbol(this.state)} ${t.message}
233
+ `, o = this.userInput, m = t.placeholder, p = o === "" && m !== void 0, $ = this.isNavigating || p ? styleText("dim", p ? m : o) : this.userInputWithCursor, r = this.options, s = this.filteredOptions.length !== r.length ? styleText(
234
+ "dim",
235
+ ` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`
236
+ ) : "";
237
+ switch (this.state) {
238
+ case "submit":
239
+ return `${l}${i ? `${styleText("gray", S_BAR)} ` : ""}${styleText(
240
+ "dim",
241
+ `${this.selectedValues.length} items selected`
242
+ )}`;
243
+ case "cancel":
244
+ return `${l}${i ? `${styleText("gray", S_BAR)} ` : ""}${styleText(
245
+ ["strikethrough", "dim"],
246
+ o
247
+ )}`;
248
+ default: {
249
+ const a = this.state === "error" ? "yellow" : "cyan", u = i ? `${styleText(a, S_BAR)} ` : "", V = i ? styleText(a, S_BAR_END) : "", y = [
250
+ `${styleText("dim", "\u2191/\u2193")} to navigate`,
251
+ `${styleText("dim", this.isNavigating ? "Space/Tab:" : "Tab:")} select`,
252
+ `${styleText("dim", "Enter:")} confirm`,
253
+ `${styleText("dim", "Type:")} to search`
254
+ ], b = this.filteredOptions.length === 0 && o ? [`${u}${styleText("yellow", "No matches found")}`] : [], v = this.state === "error" ? [`${u}${styleText("yellow", this.error)}`] : [], g = [
255
+ ...`${l}${i ? styleText(a, S_BAR) : ""}`.split(`
256
+ `),
257
+ `${u}${styleText("dim", "Search:")} ${$}${s}`,
258
+ ...b,
259
+ ...v
260
+ ], O = [`${u}${y.join(" \u2022 ")}`, V], d = limitOptions({
261
+ cursor: this.cursor,
262
+ options: this.filteredOptions,
263
+ style: (f, _) => c(f, _, this.selectedValues, this.focusedValue),
264
+ maxItems: t.maxItems,
265
+ output: t.output,
266
+ rowPadding: g.length + O.length
267
+ });
268
+ return [
269
+ ...g,
270
+ ...d.map((f) => `${u}${f}`),
271
+ ...O
272
+ ].join(`
273
+ `);
274
+ }
275
+ }
276
+ }
277
+ });
278
+ return n.prompt();
279
+ };
280
+
281
+ const J = [
282
+ S_CORNER_TOP_LEFT,
283
+ S_CORNER_TOP_RIGHT,
284
+ S_CORNER_BOTTOM_LEFT,
285
+ S_CORNER_BOTTOM_RIGHT
286
+ ], K = [S_BAR_START, S_BAR_START_RIGHT, S_BAR_END, S_BAR_END_RIGHT];
287
+ function A$1(n, e, t, o) {
288
+ let i = t, f = t;
289
+ return o === "center" ? i = Math.floor((e - n) / 2) : o === "right" && (i = e - n - t), f = e - i - n, [i, f];
290
+ }
291
+ const Q = (n) => n;
292
+ const box = (n = "", e = "", t) => {
293
+ const o = t?.output ?? process.stdout, i = getColumns(o), R = 1 * 2, u = t?.titlePadding ?? 1, h = t?.contentPadding ?? 2, w = t?.width === void 0 || t.width === "auto" ? 1 : Math.min(1, t.width), m = t?.withGuide ?? settings.withGuide ? `${S_BAR} ` : "", b = t?.formatBorder ?? Q, a = (t?.rounded ? J : K).map(b), _ = b(S_BAR_H), B = b(S_BAR), p = l(m), x = l(e), O = i - p;
294
+ let r = Math.floor(i * w) - p;
295
+ if (t?.width === "auto") {
296
+ const c = n.split(`
297
+ `);
298
+ let s = x + u * 2;
299
+ for (const G of c) {
300
+ const P = l(G) + h * 2;
301
+ P > s && (s = P);
302
+ }
303
+ const g = s + R;
304
+ g < r && (r = g);
305
+ }
306
+ r % 2 !== 0 && (r < O ? r++ : r--);
307
+ const d = r - R, S = d - u * 2, T = x > S ? `${e.slice(0, S - 3)}...` : e, [y, W] = A$1(
308
+ l(T),
309
+ d,
310
+ u,
311
+ t?.titleAlign
312
+ ), L = wrapAnsi(n, d - h * 2, {
313
+ hard: true,
314
+ trim: false
315
+ });
316
+ o.write(
317
+ `${m}${a[0]}${_.repeat(y)}${T}${_.repeat(W)}${a[1]}
318
+ `
319
+ );
320
+ const E = L.split(`
321
+ `);
322
+ for (const c of E) {
323
+ const [s, g] = A$1(
324
+ l(c),
325
+ d,
326
+ h,
327
+ t?.contentAlign
328
+ );
329
+ o.write(
330
+ `${m}${B}${" ".repeat(s)}${c}${" ".repeat(g)}${B}
331
+ `
332
+ );
333
+ }
334
+ o.write(`${m}${a[2]}${_.repeat(d)}${a[3]}
335
+ `);
336
+ };
337
+
338
+ const confirm = (i) => {
339
+ const a = i.active ?? "Yes", s = i.inactive ?? "No";
340
+ return new ConfirmPrompt({
341
+ active: a,
342
+ inactive: s,
343
+ signal: i.signal,
344
+ input: i.input,
345
+ output: i.output,
346
+ initialValue: i.initialValue ?? true,
347
+ render() {
348
+ const e = i.withGuide ?? settings.withGuide, u = `${symbol(this.state)} `, l = e ? `${styleText("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
349
+ i.output,
350
+ i.message,
351
+ l,
352
+ u
353
+ ), o = `${e ? `${styleText("gray", S_BAR)}
354
+ ` : ""}${f}
355
+ `, c = this.value ? a : s;
356
+ switch (this.state) {
357
+ case "submit": {
358
+ const r = e ? `${styleText("gray", S_BAR)} ` : "";
359
+ return `${o}${r}${styleText("dim", c)}`;
360
+ }
361
+ case "cancel": {
362
+ const r = e ? `${styleText("gray", S_BAR)} ` : "";
363
+ return `${o}${r}${styleText(["strikethrough", "dim"], c)}${e ? `
364
+ ${styleText("gray", S_BAR)}` : ""}`;
365
+ }
366
+ default: {
367
+ const r = e ? `${styleText("cyan", S_BAR)} ` : "", g = e ? styleText("cyan", S_BAR_END) : "";
368
+ return `${o}${r}${this.value ? `${styleText("green", S_RADIO_ACTIVE)} ${a}` : `${styleText("dim", S_RADIO_INACTIVE)} ${styleText("dim", a)}`}${i.vertical ? e ? `
369
+ ${styleText("cyan", S_BAR)} ` : `
370
+ ` : ` ${styleText("dim", "/")} `}${this.value ? `${styleText("dim", S_RADIO_INACTIVE)} ${styleText("dim", s)}` : `${styleText("green", S_RADIO_ACTIVE)} ${s}`}
371
+ ${g}
372
+ `;
373
+ }
374
+ }
375
+ }
376
+ }).prompt();
377
+ };
378
+
379
+ const date = (e) => {
380
+ const r = e.validate;
381
+ return new DatePrompt({
382
+ ...e,
383
+ validate(t) {
384
+ if (t === void 0)
385
+ return e.defaultValue !== void 0 ? void 0 : r ? runValidation(r, t) : settings.date.messages.required;
386
+ const o = (i) => i.toISOString().slice(0, 10);
387
+ if (e.minDate && o(t) < o(e.minDate))
388
+ return settings.date.messages.afterMin(e.minDate);
389
+ if (e.maxDate && o(t) > o(e.maxDate))
390
+ return settings.date.messages.beforeMax(e.maxDate);
391
+ if (r) return runValidation(r, t);
392
+ },
393
+ render() {
394
+ const t = (e?.withGuide ?? settings.withGuide) !== false, i = `${`${t ? `${styleText("gray", S_BAR)}
395
+ ` : ""}${symbol(this.state)} `}${e.message}
396
+ `, l = this.state !== "initial" ? this.state : "active", d = b(this, l), c = this.value instanceof Date ? this.formattedValue : "";
397
+ switch (this.state) {
398
+ case "error": {
399
+ const a = this.error ? ` ${styleText("yellow", this.error)}` : "", s = t ? `${styleText("yellow", S_BAR)} ` : "", f = t ? styleText("yellow", S_BAR_END) : "";
400
+ return `${i.trim()}
401
+ ${s}${d}
402
+ ${f}${a}
403
+ `;
404
+ }
405
+ case "submit": {
406
+ const a = c ? ` ${styleText("dim", c)}` : "", s = t ? styleText("gray", S_BAR) : "";
407
+ return `${i}${s}${a}`;
408
+ }
409
+ case "cancel": {
410
+ const a = c ? ` ${styleText(["strikethrough", "dim"], c)}` : "", s = t ? styleText("gray", S_BAR) : "";
411
+ return `${i}${s}${a}${c.trim() ? `
412
+ ${s}` : ""}`;
413
+ }
414
+ default: {
415
+ const a = t ? `${styleText("cyan", S_BAR)} ` : "", s = t ? styleText("cyan", S_BAR_END) : "", f = t ? `${styleText("cyan", S_BAR)} ` : "", g = this.inlineError ? `
416
+ ${f}${styleText("yellow", this.inlineError)}` : "";
417
+ return `${i}${a}${d}${g}
418
+ ${s}
419
+ `;
420
+ }
421
+ }
422
+ }
423
+ }).prompt();
424
+ };
425
+ function b(e, r) {
426
+ const t = e.segmentValues, o = e.segmentCursor;
427
+ if (r === "submit" || r === "cancel")
428
+ return e.formattedValue;
429
+ const i = styleText("gray", e.separator);
430
+ return e.segments.map((l, d) => {
431
+ const c = d === o.segmentIndex && !["submit", "cancel"].includes(r), a = p[l.type];
432
+ return x(t[l.type], { isActive: c, label: a });
433
+ }).join(i);
434
+ }
435
+ function x(e, r) {
436
+ const t = !e || e.replace(/_/g, "") === "";
437
+ return r.isActive ? styleText("inverse", t ? r.label : e.replace(/_/g, " ")) : t ? styleText("dim", r.label) : e.replace(/_/g, styleText("dim", " "));
438
+ }
439
+ const p = {
440
+ year: "yyyy",
441
+ month: "mm",
442
+ day: "dd"
443
+ };
444
+
445
+ const group = async (o, r) => {
446
+ const t = {}, p = Object.keys(o);
447
+ for (const e of p) {
448
+ const i = o[e], n = await i({ results: t })?.catch((a) => {
449
+ throw a;
450
+ });
451
+ if (typeof r?.onCancel == "function" && isCancel(n)) {
452
+ t[e] = "canceled", r.onCancel({ results: t });
453
+ continue;
454
+ }
455
+ t[e] = n;
456
+ }
457
+ return t;
458
+ };
459
+
460
+ const MULTISELECT_INSTRUCTIONS = [
461
+ `${styleText("dim", "\u2191/\u2193")} to navigate`,
462
+ `${styleText("dim", "Space:")} select`,
463
+ `${styleText("dim", "Enter:")} confirm`
464
+ ];
465
+ const m = (n, o) => n.split(`
466
+ `).map((d) => o(d)).join(`
467
+ `);
468
+ const multiselect = (n) => {
469
+ const o = (t, a) => {
470
+ const r = t.label ?? String(t.value);
471
+ return a === "disabled" ? `${styleText("gray", S_CHECKBOX_INACTIVE)} ${m(r, (l) => styleText(["strikethrough", "gray"], l))}${t.hint ? ` ${styleText("dim", `(${t.hint ?? "disabled"})`)}` : ""}` : a === "active" ? `${styleText("cyan", S_CHECKBOX_ACTIVE)} ${r}${t.hint ? ` ${styleText("dim", `(${t.hint})`)}` : ""}` : a === "selected" ? `${styleText("green", S_CHECKBOX_SELECTED)} ${m(r, (l) => styleText("dim", l))}${t.hint ? ` ${styleText("dim", `(${t.hint})`)}` : ""}` : a === "cancelled" ? `${m(r, (l) => styleText(["strikethrough", "dim"], l))}` : a === "active-selected" ? `${styleText("green", S_CHECKBOX_SELECTED)} ${r}${t.hint ? ` ${styleText("dim", `(${t.hint})`)}` : ""}` : a === "submitted" ? `${m(r, (l) => styleText("dim", l))}` : `${styleText("dim", S_CHECKBOX_INACTIVE)} ${m(r, (l) => styleText("dim", l))}`;
472
+ }, d = n.required ?? true;
473
+ return new MultiSelectPrompt({
474
+ options: n.options,
475
+ signal: n.signal,
476
+ input: n.input,
477
+ output: n.output,
478
+ initialValues: n.initialValues,
479
+ required: d,
480
+ cursorAt: n.cursorAt,
481
+ validate(t) {
482
+ if (d && (t === void 0 || t.length === 0))
483
+ return `Please select at least one option.
484
+ ${styleText(
485
+ "reset",
486
+ styleText(
487
+ "dim",
488
+ `Press ${styleText(["gray", "bgWhite", "inverse"], " space ")} to select, ${styleText(
489
+ "gray",
490
+ styleText("bgWhite", styleText("inverse", " enter "))
491
+ )} to submit`
492
+ )
493
+ )}`;
494
+ },
495
+ render() {
496
+ const t = n.withGuide ?? settings.withGuide, a = wrapTextWithPrefix(
497
+ n.output,
498
+ n.message,
499
+ t ? `${symbolBar(this.state)} ` : "",
500
+ `${symbol(this.state)} `
501
+ ), r = `${t ? `${styleText("gray", S_BAR)}
502
+ ` : ""}${a}
503
+ `, l = this.value ?? [], p = (i, u) => {
504
+ if (i.disabled)
505
+ return o(i, "disabled");
506
+ const s = l.includes(i.value);
507
+ return u && s ? o(i, "active-selected") : s ? o(i, "selected") : o(i, u ? "active" : "inactive");
508
+ };
509
+ switch (this.state) {
510
+ case "submit": {
511
+ const i = this.options.filter(({ value: s }) => l.includes(s)).map((s) => o(s, "submitted")).join(styleText("dim", ", ")) || styleText("dim", "none"), u = wrapTextWithPrefix(
512
+ n.output,
513
+ i,
514
+ t ? `${styleText("gray", S_BAR)} ` : ""
515
+ );
516
+ return `${r}${u}`;
517
+ }
518
+ case "cancel": {
519
+ const i = this.options.filter(({ value: s }) => l.includes(s)).map((s) => o(s, "cancelled")).join(styleText("dim", ", "));
520
+ if (i.trim() === "")
521
+ return `${r}${styleText("gray", S_BAR)}`;
522
+ const u = wrapTextWithPrefix(
523
+ n.output,
524
+ i,
525
+ t ? `${styleText("gray", S_BAR)} ` : ""
526
+ );
527
+ return `${r}${u}${t ? `
528
+ ${styleText("gray", S_BAR)}` : ""}`;
529
+ }
530
+ case "error": {
531
+ const i = t ? `${styleText("yellow", S_BAR)} ` : "", u = this.error.split(`
532
+ `).map(
533
+ ($, x) => x === 0 ? `${t ? `${styleText("yellow", S_BAR_END)} ` : ""}${styleText("yellow", $)}` : ` ${$}`
534
+ ).join(`
535
+ `), s = r.split(`
536
+ `).length, g = u.split(`
537
+ `).length + 1;
538
+ return `${r}${i}${limitOptions({
539
+ output: n.output,
540
+ options: this.options,
541
+ cursor: this.cursor,
542
+ maxItems: n.maxItems,
543
+ columnPadding: i.length,
544
+ rowPadding: s + g,
545
+ style: p
546
+ }).join(`
547
+ ${i}`)}
548
+ ${u}
549
+ `;
550
+ }
551
+ default: {
552
+ const i = t ? `${styleText("cyan", S_BAR)} ` : "", u = r.split(`
553
+ `).length, s = formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t), g = s.join(`
554
+ `), $ = s.length + 1;
555
+ return `${r}${i}${limitOptions({
556
+ output: n.output,
557
+ options: this.options,
558
+ cursor: this.cursor,
559
+ maxItems: n.maxItems,
560
+ columnPadding: i.length,
561
+ rowPadding: u + $,
562
+ style: p
563
+ }).join(`
564
+ ${i}`)}
565
+ ${g}
566
+ `;
567
+ }
568
+ }
569
+ }
570
+ }).prompt();
571
+ };
572
+
573
+ const groupMultiselect = (o) => {
574
+ const { selectableGroups: f = true, groupSpacing: b = 0 } = o, m = (n, l, g = []) => {
575
+ const a = n.label ?? String(n.value), t = typeof n.group == "string", u = t && (g[g.indexOf(n) + 1] ?? { group: true }), s = t && u && u.group === true;
576
+ let r = "", c = "";
577
+ t && (f ? (r = s ? `${S_BAR_END} ` : `${S_BAR} `, c = s ? " " : `${S_BAR} `) : r = " ");
578
+ let i = "";
579
+ if (b > 0 && !t && (i = `
580
+ `.repeat(b)), l === "active")
581
+ return wrapTextWithPrefix(
582
+ o.output,
583
+ `${a}${n.hint ? ` ${styleText("dim", `(${n.hint})`)}` : ""}`,
584
+ `${i}${styleText("dim", r)} `,
585
+ `${i}${styleText("dim", r)}${styleText("cyan", S_CHECKBOX_ACTIVE)} `,
586
+ `${i}${styleText("dim", c)} `
587
+ );
588
+ if (l === "group-active")
589
+ return wrapTextWithPrefix(
590
+ o.output,
591
+ a,
592
+ `${i}${r} `,
593
+ `${i}${r}${styleText("cyan", S_CHECKBOX_ACTIVE)} `,
594
+ `${i}${c} `,
595
+ (d) => styleText("dim", d)
596
+ );
597
+ if (l === "group-active-selected")
598
+ return wrapTextWithPrefix(
599
+ o.output,
600
+ a,
601
+ `${i}${r} `,
602
+ `${i}${r}${styleText("green", S_CHECKBOX_SELECTED)} `,
603
+ `${i}${c} `,
604
+ (d) => styleText("dim", d)
605
+ );
606
+ if (l === "selected") {
607
+ const d = t || f ? styleText("green", S_CHECKBOX_SELECTED) : "";
608
+ return wrapTextWithPrefix(
609
+ o.output,
610
+ `${a}${n.hint ? ` (${n.hint})` : ""}`,
611
+ `${i}${styleText("dim", r)} `,
612
+ `${i}${styleText("dim", r)}${d} `,
613
+ `${i}${styleText("dim", c)} `,
614
+ (S) => styleText("dim", S)
615
+ );
616
+ }
617
+ if (l === "cancelled")
618
+ return `${styleText(["strikethrough", "dim"], a)}`;
619
+ if (l === "active-selected")
620
+ return wrapTextWithPrefix(
621
+ o.output,
622
+ `${a}${n.hint ? ` ${styleText("dim", `(${n.hint})`)}` : ""}`,
623
+ `${i}${styleText("dim", r)} `,
624
+ `${i}${styleText("dim", r)}${styleText("green", S_CHECKBOX_SELECTED)} `,
625
+ `${i}${styleText("dim", c)} `
626
+ );
627
+ if (l === "submitted")
628
+ return `${styleText("dim", a)}`;
629
+ const h = t || f ? styleText("dim", S_CHECKBOX_INACTIVE) : "";
630
+ return wrapTextWithPrefix(
631
+ o.output,
632
+ a,
633
+ `${i}${styleText("dim", r)} `,
634
+ `${i}${styleText("dim", r)}${h} `,
635
+ `${i}${styleText("dim", c)} `,
636
+ (d) => styleText("dim", d)
637
+ );
638
+ }, x = o.required ?? true;
639
+ return new GroupMultiSelectPrompt({
640
+ options: o.options,
641
+ signal: o.signal,
642
+ input: o.input,
643
+ output: o.output,
644
+ initialValues: o.initialValues,
645
+ required: x,
646
+ cursorAt: o.cursorAt,
647
+ selectableGroups: f,
648
+ validate(n) {
649
+ if (x && (n === void 0 || n.length === 0))
650
+ return `Please select at least one option.
651
+ ${styleText(
652
+ "reset",
653
+ styleText(
654
+ "dim",
655
+ `Press ${styleText(["gray", "bgWhite", "inverse"], " space ")} to select, ${styleText(
656
+ "gray",
657
+ styleText(["bgWhite", "inverse"], " enter ")
658
+ )} to submit`
659
+ )
660
+ )}`;
661
+ },
662
+ render() {
663
+ const n = o.withGuide ?? settings.withGuide, l = `${n ? `${styleText("gray", S_BAR)}
664
+ ` : ""}${symbol(this.state)} ${o.message}
665
+ `, g = this.value ?? [], a = (t, u) => {
666
+ const s = this.options, r = g.includes(t.value) || t.group === true && this.isGroupSelected(`${t.value}`);
667
+ return !u && typeof t.group == "string" && this.options[this.cursor].value === t.group ? m(t, r ? "group-active-selected" : "group-active", s) : u && r ? m(t, "active-selected", s) : r ? m(t, "selected", s) : m(t, u ? "active" : "inactive", s);
668
+ };
669
+ switch (this.state) {
670
+ case "submit": {
671
+ const t = this.options.filter(({ value: s }) => g.includes(s)).map((s) => m(s, "submitted")), u = t.length === 0 ? "" : ` ${t.join(styleText("dim", ", "))}`;
672
+ return `${l}${n ? styleText("gray", S_BAR) : ""}${u}`;
673
+ }
674
+ case "cancel": {
675
+ const t = this.options.filter(({ value: u }) => g.includes(u)).map((u) => m(u, "cancelled")).join(styleText("dim", ", "));
676
+ return `${l}${n ? `${styleText("gray", S_BAR)} ` : ""}${t.trim() ? `${t}${n ? `
677
+ ${styleText("gray", S_BAR)}` : ""}` : ""}`;
678
+ }
679
+ case "error": {
680
+ const t = n ? `${styleText("yellow", S_BAR)} ` : "", u = this.error.split(`
681
+ `).map(
682
+ (i, h) => h === 0 ? `${n ? `${styleText("yellow", S_BAR_END)} ` : ""}${styleText("yellow", i)}` : ` ${i}`
683
+ ).join(`
684
+ `), s = l.split(`
685
+ `).length, r = u.split(`
686
+ `).length + 1, c = limitOptions({
687
+ output: o.output,
688
+ options: this.options,
689
+ cursor: this.cursor,
690
+ maxItems: o.maxItems,
691
+ columnPadding: t.length,
692
+ rowPadding: s + r,
693
+ style: a
694
+ }).join(`
695
+ ${t}`);
696
+ return `${l}${t}${c}
697
+ ${u}
698
+ `;
699
+ }
700
+ default: {
701
+ const t = n ? `${styleText("cyan", S_BAR)} ` : "", u = l.split(`
702
+ `).length, s = formatInstructionFooter(MULTISELECT_INSTRUCTIONS, n), r = s.join(`
703
+ `), c = s.length + 1, i = limitOptions({
704
+ output: o.output,
705
+ options: this.options,
706
+ cursor: this.cursor,
707
+ maxItems: o.maxItems,
708
+ columnPadding: t.length,
709
+ rowPadding: u + c,
710
+ style: a
711
+ }).join(`
712
+ ${t}`);
713
+ return `${l}${t}${i}
714
+ ${r}
715
+ `;
716
+ }
717
+ }
718
+ }
719
+ }).prompt();
720
+ };
721
+
722
+ const log = {
723
+ message: (s = [], {
724
+ symbol: e = styleText("gray", S_BAR),
725
+ secondarySymbol: r = styleText("gray", S_BAR),
726
+ output: m = process.stdout,
727
+ spacing: l = 1,
728
+ withGuide: c
729
+ } = {}) => {
730
+ const t = [], o = c ?? settings.withGuide, f = o ? r : "", O = o ? `${e} ` : "", u = o ? `${r} ` : "";
731
+ for (let i = 0; i < l; i++)
732
+ t.push(f);
733
+ const g = Array.isArray(s) ? s : s.split(`
734
+ `);
735
+ if (g.length > 0) {
736
+ const [i, ...y] = g;
737
+ i.length > 0 ? t.push(`${O}${i}`) : t.push(o ? e : "");
738
+ for (const p of y)
739
+ p.length > 0 ? t.push(`${u}${p}`) : t.push(o ? r : "");
740
+ }
741
+ m.write(`${t.join(`
742
+ `)}
743
+ `);
744
+ },
745
+ info: (s, e) => {
746
+ log.message(s, { ...e, symbol: styleText("blue", S_INFO) });
747
+ },
748
+ success: (s, e) => {
749
+ log.message(s, { ...e, symbol: styleText("green", S_SUCCESS) });
750
+ },
751
+ step: (s, e) => {
752
+ log.message(s, { ...e, symbol: styleText("green", S_STEP_SUBMIT) });
753
+ },
754
+ warn: (s, e) => {
755
+ log.message(s, { ...e, symbol: styleText("yellow", S_WARN) });
756
+ },
757
+ /** alias for `log.warn()`. */
758
+ warning: (s, e) => {
759
+ log.warn(s, e);
760
+ },
761
+ error: (s, e) => {
762
+ log.message(s, { ...e, symbol: styleText("red", S_ERROR) });
763
+ }
764
+ };
765
+
766
+ const cancel = (o = "", t) => {
767
+ const i = t?.output ?? process.stdout, e = t?.withGuide ?? settings.withGuide ? `${styleText("gray", S_BAR_END)} ` : "";
768
+ i.write(`${e}${styleText("red", o)}
769
+
770
+ `);
771
+ }, intro = (o = "", t) => {
772
+ const i = t?.output ?? process.stdout, e = t?.withGuide ?? settings.withGuide ? `${styleText("gray", S_BAR_START)} ` : "";
773
+ i.write(`${e}${o}
774
+ `);
775
+ }, outro = (o = "", t) => {
776
+ const i = t?.output ?? process.stdout, e = t?.withGuide ?? settings.withGuide ? `${styleText("gray", S_BAR)}
777
+ ${styleText("gray", S_BAR_END)} ` : "";
778
+ i.write(`${e}${o}
779
+
780
+ `);
781
+ };
782
+
783
+ const multiline = (e) => new MultiLinePrompt({
784
+ validate: e.validate,
785
+ placeholder: e.placeholder,
786
+ defaultValue: e.defaultValue,
787
+ initialValue: e.initialValue,
788
+ showSubmit: e.showSubmit,
789
+ output: e.output,
790
+ signal: e.signal,
791
+ input: e.input,
792
+ render() {
793
+ const i = e?.withGuide ?? settings.withGuide, o = `${`${i ? `${styleText("gray", S_BAR)}
794
+ ` : ""}${symbol(this.state)} `}${e.message}
795
+ `, h = e.placeholder ? styleText("inverse", e.placeholder[0]) + styleText("dim", e.placeholder.slice(1)) : styleText(["inverse", "hidden"], "_"), a = this.userInput ? this.userInputWithCursor : h, s = this.value ?? "", c = e.showSubmit ? `
796
+ ${styleText(this.focused === "submit" ? "cyan" : "dim", "[ submit ]")}` : "";
797
+ switch (this.state) {
798
+ case "error": {
799
+ const n = `${styleText("yellow", S_BAR)} `, r = i ? wrapTextWithPrefix(e.output, a, n, void 0) : a, u = styleText("yellow", S_BAR_END);
800
+ return `${o}${r}
801
+ ${u} ${styleText("yellow", this.error)}${c}
802
+ `;
803
+ }
804
+ case "submit": {
805
+ const n = `${styleText("gray", S_BAR)} `, r = i ? wrapTextWithPrefix(
806
+ e.output,
807
+ s,
808
+ n,
809
+ void 0,
810
+ void 0,
811
+ (u) => styleText("dim", u)
812
+ ) : s ? styleText("dim", s) : "";
813
+ return `${o}${r}`;
814
+ }
815
+ case "cancel": {
816
+ const n = `${styleText("gray", S_BAR)} `, r = i ? wrapTextWithPrefix(
817
+ e.output,
818
+ s,
819
+ n,
820
+ void 0,
821
+ void 0,
822
+ (u) => styleText(["strikethrough", "dim"], u)
823
+ ) : s ? styleText(["strikethrough", "dim"], s) : "";
824
+ return `${o}${r}`;
825
+ }
826
+ default: {
827
+ const n = i ? `${styleText("cyan", S_BAR)} ` : "", r = i ? styleText("cyan", S_BAR_END) : "", u = i ? wrapTextWithPrefix(e.output, a, n) : a;
828
+ return `${o}${u}
829
+ ${r}${c}
830
+ `;
831
+ }
832
+ }
833
+ }
834
+ }).prompt();
835
+
836
+ const W$1 = (o) => o, C = (o, e, s) => {
837
+ const a = {
838
+ hard: true,
839
+ trim: false
840
+ }, i = wrapAnsi(o, e, a).split(`
841
+ `), c = i.reduce((n, t) => Math.max(l(t), n), 0), u = i.map(s).reduce((n, t) => Math.max(l(t), n), 0), g = e - (u - c);
842
+ return wrapAnsi(o, g, a);
843
+ };
844
+ const note = (o = "", e = "", s) => {
845
+ const a = s?.output ?? process$1.stdout, i = s?.withGuide ?? settings.withGuide, c = s?.format ?? W$1, g = ["", ...C(o, getColumns(a) - 6, c).split(`
846
+ `).map(c), ""], n = l(e), t = Math.max(
847
+ g.reduce((m, F) => {
848
+ const O = l(F);
849
+ return O > m ? O : m;
850
+ }, 0),
851
+ n
852
+ ) + 2, h = g.map(
853
+ (m) => `${styleText("gray", S_BAR)} ${m}${" ".repeat(t - l(m))}${styleText("gray", S_BAR)}`
854
+ ).join(`
855
+ `), T = i ? `${styleText("gray", S_BAR)}
856
+ ` : "", l$1 = i ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
857
+ a.write(
858
+ `${T}${styleText("green", S_STEP_SUBMIT)} ${styleText("reset", e)} ${styleText(
859
+ "gray",
860
+ S_BAR_H.repeat(Math.max(t - n - 1, 1)) + S_CORNER_TOP_RIGHT
861
+ )}
862
+ ${h}
863
+ ${styleText("gray", l$1 + S_BAR_H.repeat(t + 2) + S_CORNER_BOTTOM_RIGHT)}
864
+ `
865
+ );
866
+ };
867
+
868
+ const password = (r) => new PasswordPrompt({
869
+ validate: r.validate,
870
+ mask: r.mask ?? S_PASSWORD_MASK,
871
+ signal: r.signal,
872
+ input: r.input,
873
+ output: r.output,
874
+ render() {
875
+ const e = r.withGuide ?? settings.withGuide, o = `${e ? `${styleText("gray", S_BAR)}
876
+ ` : ""}${symbol(this.state)} ${r.message}
877
+ `, c = this.userInputWithCursor, i = this.masked;
878
+ switch (this.state) {
879
+ case "error": {
880
+ const s = e ? `${styleText("yellow", S_BAR)} ` : "", n = e ? `${styleText("yellow", S_BAR_END)} ` : "", l = i ?? "";
881
+ return r.clearOnError && this.clear(), `${o.trim()}
882
+ ${s}${l}
883
+ ${n}${styleText("yellow", this.error)}
884
+ `;
885
+ }
886
+ case "submit": {
887
+ const s = e ? `${styleText("gray", S_BAR)} ` : "", n = i ? styleText("dim", i) : "";
888
+ return `${o}${s}${n}`;
889
+ }
890
+ case "cancel": {
891
+ const s = e ? `${styleText("gray", S_BAR)} ` : "", n = i ? styleText(["strikethrough", "dim"], i) : "";
892
+ return `${o}${s}${n}${i && e ? `
893
+ ${styleText("gray", S_BAR)}` : ""}`;
894
+ }
895
+ default: {
896
+ const s = e ? `${styleText("cyan", S_BAR)} ` : "", n = e ? styleText("cyan", S_BAR_END) : "";
897
+ return `${o}${s}${c}
898
+ ${n}
899
+ `;
900
+ }
901
+ }
902
+ }
903
+ }).prompt();
904
+
905
+ const path = (e) => {
906
+ const a = e.validate;
907
+ return autocomplete({
908
+ ...e,
909
+ initialUserInput: e.initialValue ?? e.root ?? process.cwd(),
910
+ maxItems: 5,
911
+ validate(t) {
912
+ if (!Array.isArray(t)) {
913
+ if (!t)
914
+ return "Please select a path";
915
+ if (a)
916
+ return runValidation(a, t);
917
+ }
918
+ },
919
+ options() {
920
+ const t = this.userInput;
921
+ if (t === "")
922
+ return [];
923
+ try {
924
+ let i;
925
+ existsSync(t) ? lstatSync(t).isDirectory() && (!e.directory || t.endsWith("/")) ? i = t : i = dirname(t) : i = dirname(t);
926
+ const c = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
927
+ return readdirSync(i).map((r) => {
928
+ const n = join(i, r), m = lstatSync(n);
929
+ return {
930
+ name: r,
931
+ path: n,
932
+ isDirectory: m.isDirectory()
933
+ };
934
+ }).filter(
935
+ ({ path: r, isDirectory: n }) => r.startsWith(c) && (n || !e.directory)
936
+ ).map((r) => ({
937
+ value: r.path
938
+ }));
939
+ } catch {
940
+ return [];
941
+ }
942
+ }
943
+ });
944
+ };
945
+
946
+ const W = (l) => styleText("magenta", l);
947
+ const spinner = ({
948
+ indicator: l = "dots",
949
+ onCancel: h,
950
+ output: n = process.stdout,
951
+ cancelMessage: G,
952
+ errorMessage: O,
953
+ frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
954
+ delay: F = unicode ? 80 : 120,
955
+ signal: m,
956
+ ...I
957
+ } = {}) => {
958
+ const u = isCI();
959
+ let M, T, d = false, S = false, s = "", p, w = performance.now();
960
+ const x = getColumns(n), k = I?.styleFrame ?? W, g = (e) => {
961
+ const r = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
962
+ S = e === 1, d && (a(r, e), S && typeof h == "function" && h());
963
+ }, f = () => g(2), i = () => g(1), A = () => {
964
+ process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i), process.on("SIGTERM", i), process.on("exit", g), m && m.addEventListener("abort", i);
965
+ }, H = () => {
966
+ process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i), process.removeListener("SIGTERM", i), process.removeListener("exit", g), m && m.removeEventListener("abort", i);
967
+ }, y = () => {
968
+ if (p === void 0) return;
969
+ u && n.write(`
970
+ `);
971
+ const r = wrapAnsi(p, x, {
972
+ hard: true,
973
+ trim: false
974
+ }).split(`
975
+ `);
976
+ r.length > 1 && n.write(cursor.up(r.length - 1)), n.write(cursor.to(0)), n.write(erase.down());
977
+ }, C = (e) => e.replace(/\.+$/, ""), _ = (e) => {
978
+ const r = (performance.now() - e) / 1e3, t = Math.floor(r / 60), o = Math.floor(r % 60);
979
+ return t > 0 ? `[${t}m ${o}s]` : `[${o}s]`;
980
+ }, N = I.withGuide ?? settings.withGuide, P = (e = "") => {
981
+ d = true, M = block({ output: n }), s = C(e), w = performance.now(), N && n.write(`${styleText("gray", S_BAR)}
982
+ `);
983
+ let r = 0, t = 0;
984
+ A(), T = setInterval(() => {
985
+ if (u && s === p)
986
+ return;
987
+ y(), p = s;
988
+ const o = k(E[r]);
989
+ let v;
990
+ if (u)
991
+ v = `${o} ${s}...`;
992
+ else if (l === "timer")
993
+ v = `${o} ${s} ${_(w)}`;
994
+ else {
995
+ const B = ".".repeat(Math.floor(t)).slice(0, 3);
996
+ v = `${o} ${s}${B}`;
997
+ }
998
+ const j = wrapAnsi(v, x, {
999
+ hard: true,
1000
+ trim: false
1001
+ });
1002
+ n.write(j), r = r + 1 < E.length ? r + 1 : 0, t = t < 4 ? t + 0.125 : 0;
1003
+ }, F);
1004
+ }, a = (e = "", r = 0, t = false) => {
1005
+ if (!d) return;
1006
+ d = false, clearInterval(T), y();
1007
+ const o = r === 0 ? styleText("green", S_STEP_SUBMIT) : r === 1 ? styleText("red", S_STEP_CANCEL) : styleText("red", S_STEP_ERROR);
1008
+ s = e ?? s, t || (l === "timer" ? n.write(`${o} ${s} ${_(w)}
1009
+ `) : n.write(`${o} ${s}
1010
+ `)), H(), M();
1011
+ };
1012
+ return {
1013
+ start: P,
1014
+ stop: (e = "") => a(e, 0),
1015
+ message: (e = "") => {
1016
+ s = C(e ?? s);
1017
+ },
1018
+ cancel: (e = "") => a(e, 1),
1019
+ error: (e = "") => a(e, 2),
1020
+ clear: () => a("", 0, true),
1021
+ get isCancelled() {
1022
+ return S;
1023
+ }
1024
+ };
1025
+ };
1026
+
1027
+ const u = {
1028
+ light: unicodeOr("\u2500", "-"),
1029
+ heavy: unicodeOr("\u2501", "="),
1030
+ block: unicodeOr("\u2588", "#")
1031
+ };
1032
+ function progress({
1033
+ style: o = "heavy",
1034
+ max: d = 100,
1035
+ size: v = 40,
1036
+ ...x
1037
+ } = {}) {
1038
+ const r = spinner(x);
1039
+ let a = 0, n = "";
1040
+ const c = Math.max(1, d), l = Math.max(1, v), S = (t) => {
1041
+ switch (t) {
1042
+ case "initial":
1043
+ case "active":
1044
+ return (e) => styleText("magenta", e);
1045
+ case "error":
1046
+ case "cancel":
1047
+ return (e) => styleText("red", e);
1048
+ case "submit":
1049
+ return (e) => styleText("green", e);
1050
+ default:
1051
+ return (e) => styleText("magenta", e);
1052
+ }
1053
+ }, p = (t, e) => {
1054
+ const m = Math.floor(a / c * l);
1055
+ return `${S(t)(u[o].repeat(m))}${styleText("dim", u[o].repeat(l - m))} ${e}`;
1056
+ }, h = (t = "") => {
1057
+ n = t, r.start(p("initial", t));
1058
+ }, g = (t = 1, e) => {
1059
+ a = Math.min(c, t + a), r.message(p("active", e ?? n)), n = e ?? n;
1060
+ };
1061
+ return {
1062
+ start: h,
1063
+ stop: r.stop,
1064
+ cancel: r.cancel,
1065
+ error: r.error,
1066
+ clear: r.clear,
1067
+ advance: g,
1068
+ isCancelled: r.isCancelled,
1069
+ message: (t) => g(0, t)
1070
+ };
1071
+ }
1072
+
1073
+ const SELECT_INSTRUCTIONS = [
1074
+ `${styleText("dim", "\u2191/\u2193")} to navigate`,
1075
+ `${styleText("dim", "Enter:")} confirm`
1076
+ ];
1077
+ const c = (t, a) => t.includes(`
1078
+ `) ? t.split(`
1079
+ `).map((i) => a(i)).join(`
1080
+ `) : a(t);
1081
+ const select = (t) => {
1082
+ const a = (i, m) => {
1083
+ const s = i.label ?? String(i.value);
1084
+ switch (m) {
1085
+ case "disabled":
1086
+ return `${styleText("gray", S_RADIO_INACTIVE)} ${c(s, (n) => styleText("gray", n))}${i.hint ? ` ${styleText("dim", `(${i.hint ?? "disabled"})`)}` : ""}`;
1087
+ case "selected":
1088
+ return `${c(s, (n) => styleText("dim", n))}`;
1089
+ case "active":
1090
+ return `${styleText("green", S_RADIO_ACTIVE)} ${s}${i.hint ? ` ${styleText("dim", `(${i.hint})`)}` : ""}`;
1091
+ case "cancelled":
1092
+ return `${c(s, (n) => styleText(["strikethrough", "dim"], n))}`;
1093
+ default:
1094
+ return `${styleText("dim", S_RADIO_INACTIVE)} ${c(s, (n) => styleText("dim", n))}`;
1095
+ }
1096
+ };
1097
+ return new SelectPrompt({
1098
+ options: t.options,
1099
+ signal: t.signal,
1100
+ input: t.input,
1101
+ output: t.output,
1102
+ initialValue: t.initialValue,
1103
+ render() {
1104
+ const i = t.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, n = wrapTextWithPrefix(
1105
+ t.output,
1106
+ t.message,
1107
+ s,
1108
+ m
1109
+ ), u = `${i ? `${styleText("gray", S_BAR)}
1110
+ ` : ""}${n}
1111
+ `;
1112
+ switch (this.state) {
1113
+ case "submit": {
1114
+ const r = i ? `${styleText("gray", S_BAR)} ` : "", o = wrapTextWithPrefix(
1115
+ t.output,
1116
+ a(this.options[this.cursor], "selected"),
1117
+ r
1118
+ );
1119
+ return `${u}${o}`;
1120
+ }
1121
+ case "cancel": {
1122
+ const r = i ? `${styleText("gray", S_BAR)} ` : "", o = wrapTextWithPrefix(
1123
+ t.output,
1124
+ a(this.options[this.cursor], "cancelled"),
1125
+ r
1126
+ );
1127
+ return `${u}${o}${i ? `
1128
+ ${styleText("gray", S_BAR)}` : ""}`;
1129
+ }
1130
+ default: {
1131
+ const r = i ? `${styleText("cyan", S_BAR)} ` : "", o = u.split(`
1132
+ `).length, $ = formatInstructionFooter(SELECT_INSTRUCTIONS, i), h = $.join(`
1133
+ `), b = $.length + 1;
1134
+ return `${u}${r}${limitOptions({
1135
+ output: t.output,
1136
+ cursor: this.cursor,
1137
+ options: this.options,
1138
+ maxItems: t.maxItems,
1139
+ columnPadding: r.length,
1140
+ rowPadding: o + b,
1141
+ style: (p, x) => a(p, p.disabled ? "disabled" : x ? "active" : "inactive")
1142
+ }).join(`
1143
+ ${r}`)}
1144
+ ${h}
1145
+ `;
1146
+ }
1147
+ }
1148
+ }
1149
+ }).prompt();
1150
+ };
1151
+
1152
+ const selectKey = (t) => {
1153
+ const l = (e, a = "inactive") => {
1154
+ const n = e.label ?? String(e.value);
1155
+ return a === "selected" ? `${styleText("dim", n)}` : a === "cancelled" ? `${styleText(["strikethrough", "dim"], n)}` : a === "active" ? `${styleText(["bgCyan", "gray"], ` ${e.value} `)} ${n}${e.hint ? ` ${styleText("dim", `(${e.hint})`)}` : ""}` : `${styleText(["gray", "bgWhite", "inverse"], ` ${e.value} `)} ${n}${e.hint ? ` ${styleText("dim", `(${e.hint})`)}` : ""}`;
1156
+ };
1157
+ return new SelectKeyPrompt({
1158
+ options: t.options,
1159
+ signal: t.signal,
1160
+ input: t.input,
1161
+ output: t.output,
1162
+ initialValue: t.initialValue,
1163
+ caseSensitive: t.caseSensitive,
1164
+ render() {
1165
+ const e = t.withGuide ?? settings.withGuide, a = `${e ? `${styleText("gray", S_BAR)}
1166
+ ` : ""}${symbol(this.state)} ${t.message}
1167
+ `;
1168
+ switch (this.state) {
1169
+ case "submit": {
1170
+ const n = e ? `${styleText("gray", S_BAR)} ` : "", s = this.options.find((u) => u.value === this.value) ?? t.options[0], c = wrapTextWithPrefix(
1171
+ t.output,
1172
+ l(s, "selected"),
1173
+ n
1174
+ );
1175
+ return `${a}${c}`;
1176
+ }
1177
+ case "cancel": {
1178
+ const n = e ? `${styleText("gray", S_BAR)} ` : "", s = wrapTextWithPrefix(
1179
+ t.output,
1180
+ l(this.options[0], "cancelled"),
1181
+ n
1182
+ );
1183
+ return `${a}${s}${e ? `
1184
+ ${styleText("gray", S_BAR)}` : ""}`;
1185
+ }
1186
+ default: {
1187
+ const n = e ? `${styleText("cyan", S_BAR)} ` : "", s = e ? styleText("cyan", S_BAR_END) : "", c = this.options.map(
1188
+ (u, $) => wrapTextWithPrefix(
1189
+ t.output,
1190
+ l(u, $ === this.cursor ? "active" : "inactive"),
1191
+ n
1192
+ )
1193
+ ).join(`
1194
+ `);
1195
+ return `${a}${c}
1196
+ ${s}
1197
+ `;
1198
+ }
1199
+ }
1200
+ }
1201
+ }).prompt();
1202
+ };
1203
+
1204
+ const i = `${styleText("gray", S_BAR)} `;
1205
+ const stream = {
1206
+ message: async (e, { symbol: l = styleText("gray", S_BAR) } = {}) => {
1207
+ process.stdout.write(`${styleText("gray", S_BAR)}
1208
+ ${l} `);
1209
+ let s = 3;
1210
+ for await (let r of e) {
1211
+ r = r.replace(/\n/g, `
1212
+ ${i}`), r.includes(`
1213
+ `) && (s = 3 + stripVTControlCharacters(r.slice(r.lastIndexOf(`
1214
+ `))).length);
1215
+ const o = stripVTControlCharacters(r).length;
1216
+ s + o < process.stdout.columns ? (s += o, process.stdout.write(r)) : (process.stdout.write(`
1217
+ ${i}${r.trimStart()}`), s = 3 + stripVTControlCharacters(r.trimStart()).length);
1218
+ }
1219
+ process.stdout.write(`
1220
+ `);
1221
+ },
1222
+ info: (e) => stream.message(e, { symbol: styleText("blue", S_INFO) }),
1223
+ success: (e) => stream.message(e, { symbol: styleText("green", S_SUCCESS) }),
1224
+ step: (e) => stream.message(e, { symbol: styleText("green", S_STEP_SUBMIT) }),
1225
+ warn: (e) => stream.message(e, { symbol: styleText("yellow", S_WARN) }),
1226
+ /** alias for `log.warn()`. */
1227
+ warning: (e) => stream.warn(e),
1228
+ error: (e) => stream.message(e, { symbol: styleText("red", S_ERROR) })
1229
+ };
1230
+
1231
+ const tasks = async (o, e) => {
1232
+ for (const t of o) {
1233
+ if (t.enabled === false) continue;
1234
+ const s = spinner(e);
1235
+ s.start(t.title);
1236
+ const n = await t.task(s.message);
1237
+ s.stop(n || t.title);
1238
+ }
1239
+ };
1240
+
1241
+ const A = (l) => l.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g, "");
1242
+ const taskLog = (l) => {
1243
+ const r = l.output ?? process.stdout, O = getColumns(r), i = styleText("gray", S_BAR), p = l.spacing ?? 1, k = 3, m = l.retainLog === true, d = !isCI() && isTTY(r);
1244
+ r.write(`${i}
1245
+ `), r.write(`${styleText("green", S_STEP_SUBMIT)} ${l.title}
1246
+ `);
1247
+ for (let e = 0; e < p; e++)
1248
+ r.write(`${i}
1249
+ `);
1250
+ const n = [
1251
+ {
1252
+ value: "",
1253
+ full: ""
1254
+ }
1255
+ ];
1256
+ let v = false;
1257
+ const f = (e) => {
1258
+ if (n.length === 0)
1259
+ return;
1260
+ let s = 0;
1261
+ e && (s += p + 2);
1262
+ for (const t of n) {
1263
+ const { value: o, result: a } = t;
1264
+ let g = a?.message ?? o;
1265
+ if (g.length === 0)
1266
+ continue;
1267
+ a === void 0 && t.header !== void 0 && t.header !== "" && (g += `
1268
+ ${t.header}`);
1269
+ const x = g.split(`
1270
+ `).reduce((b, w) => w === "" ? b + 1 : b + Math.ceil((w.length + k) / O), 0);
1271
+ s += x;
1272
+ }
1273
+ s > 0 && (s += 1, r.write(erase.lines(s)));
1274
+ }, h = (e, s, t) => {
1275
+ const o = t ? `${e.full}
1276
+ ${e.value}` : e.value;
1277
+ e.header !== void 0 && e.header !== "" && log.message(
1278
+ e.header.split(`
1279
+ `).map((a) => styleText("bold", a)),
1280
+ {
1281
+ output: r,
1282
+ secondarySymbol: i,
1283
+ symbol: i,
1284
+ spacing: 0
1285
+ }
1286
+ ), log.message(
1287
+ o.split(`
1288
+ `).map((a) => styleText("dim", a)),
1289
+ {
1290
+ output: r,
1291
+ secondarySymbol: i,
1292
+ symbol: i,
1293
+ spacing: s ?? p
1294
+ }
1295
+ );
1296
+ }, T = () => {
1297
+ for (const e of n) {
1298
+ const { header: s, value: t, full: o } = e;
1299
+ (s === void 0 || s.length === 0) && t.length === 0 || h(e, void 0, m === true && o.length > 0);
1300
+ }
1301
+ }, L = (e, s, t) => {
1302
+ if (f(false), (t?.raw !== true || !v) && e.value !== "" && (e.value += `
1303
+ `), e.value += A(s), v = t?.raw === true, l.limit !== void 0) {
1304
+ const o = e.value.split(`
1305
+ `), a = o.length - l.limit;
1306
+ if (a > 0) {
1307
+ const g = o.splice(0, a);
1308
+ m && (e.full += (e.full === "" ? "" : `
1309
+ `) + g.join(`
1310
+ `));
1311
+ }
1312
+ e.value = o.join(`
1313
+ `);
1314
+ }
1315
+ d && y();
1316
+ }, y = () => {
1317
+ for (const e of n)
1318
+ e.result ? e.result.status === "error" ? log.error(e.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : log.success(e.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : e.value !== "" && h(e, 0);
1319
+ }, B = (e, s) => {
1320
+ f(false), e.result = s, d && y();
1321
+ };
1322
+ return {
1323
+ message(e, s) {
1324
+ L(n[0], e, s);
1325
+ },
1326
+ group(e) {
1327
+ const s = {
1328
+ header: e,
1329
+ value: "",
1330
+ full: ""
1331
+ };
1332
+ return n.push(s), {
1333
+ message(t, o) {
1334
+ L(s, t, o);
1335
+ },
1336
+ error(t) {
1337
+ B(s, {
1338
+ status: "error",
1339
+ message: t
1340
+ });
1341
+ },
1342
+ success(t) {
1343
+ B(s, {
1344
+ status: "success",
1345
+ message: t
1346
+ });
1347
+ }
1348
+ };
1349
+ },
1350
+ error(e, s) {
1351
+ f(true), log.error(e, { output: r, secondarySymbol: i, spacing: 1 }), s?.showLog !== false && T(), n.splice(1, n.length - 1), n[0].value = "", n[0].full = "";
1352
+ },
1353
+ success(e, s) {
1354
+ f(true), log.success(e, { output: r, secondarySymbol: i, spacing: 1 }), s?.showLog === true && T(), n.splice(1, n.length - 1), n[0].value = "", n[0].full = "";
1355
+ }
1356
+ };
1357
+ };
1358
+
1359
+ const text = (t) => new TextPrompt({
1360
+ validate: t.validate,
1361
+ placeholder: t.placeholder,
1362
+ defaultValue: t.defaultValue,
1363
+ initialValue: t.initialValue,
1364
+ output: t.output,
1365
+ signal: t.signal,
1366
+ input: t.input,
1367
+ render() {
1368
+ const i = t?.withGuide ?? settings.withGuide, s = `${`${i ? `${styleText("gray", S_BAR)}
1369
+ ` : ""}${symbol(this.state)} `}${t.message}
1370
+ `, c = t.placeholder ? styleText("inverse", t.placeholder[0]) + styleText("dim", t.placeholder.slice(1)) : styleText(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : c, a = this.value ?? "";
1371
+ switch (this.state) {
1372
+ case "error": {
1373
+ const n = this.error ? ` ${styleText("yellow", this.error)}` : "", r = i ? `${styleText("yellow", S_BAR)} ` : "", d = i ? styleText("yellow", S_BAR_END) : "";
1374
+ return `${s.trim()}
1375
+ ${r}${o}
1376
+ ${d}${n}
1377
+ `;
1378
+ }
1379
+ case "submit": {
1380
+ const n = a ? ` ${styleText("dim", a)}` : "", r = i ? styleText("gray", S_BAR) : "";
1381
+ return `${s}${r}${n}`;
1382
+ }
1383
+ case "cancel": {
1384
+ const n = a ? ` ${styleText(["strikethrough", "dim"], a)}` : "", r = i ? styleText("gray", S_BAR) : "";
1385
+ return `${s}${r}${n}${a.trim() ? `
1386
+ ${r}` : ""}`;
1387
+ }
1388
+ default: {
1389
+ const n = i ? `${styleText("cyan", S_BAR)} ` : "", r = i ? styleText("cyan", S_BAR_END) : "";
1390
+ return `${s}${n}${o}
1391
+ ${r}
1392
+ `;
1393
+ }
1394
+ }
1395
+ }
1396
+ }).prompt();
1397
+
1398
+ export { MULTISELECT_INSTRUCTIONS, SELECT_INSTRUCTIONS, 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, formatInstructionFooter, 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 };