UNPKG

constatic

Version:

Constatic is a CLI for creating and managing modern TypeScript projects, providing an organized structure and features that streamline development.

2 lines (1 loc) 717 B
import{select as c}from"inquirer-select-pro";import r from"chalk";import i from"lodash.merge";const t={style:{help:()=>"",message:e=>r.reset(e),answer:e=>r.dim(e),renderSelectedChoices:()=>""},prefix:{idle:r.cyan("\u25C6"),done:r.green("\u25C7")},icon:{cursor:"\u2192"}},a={...t,searchSelect:{style:t.style,prefix:t.prefix.done,icon:{...t.icon,checked:r.green("\u25C9"),unchecked:"\u25EF"}}};function g(e){return{mask:"*",instructions:!1,...e,theme:i(a,e?.theme)}}function m(e,o){return async(...s)=>{try{return await e(...s)}catch(n){throw o(n,s)}}}class l extends Error{constructor(){super(),this.name="ExitPromptError"}}const T=m(c,()=>new l);export{t as baseTheme,T as searchSelect,a as theme,g as withDefaults};