UNPKG

constatic

Version:
2 lines (1 loc) 751 B
import{uiMessage as r,divider as p,sleep as c,cliTableChars as m}from"#helpers";import{menus as l}from"#menus";import e from"chalk";import g from"cli-table3";async function P(n,o){const t={name:r({"en-US":"Name","pt-BR":"Nome"},e.white),id:r({"en-US":"ID","pt-BR":"ID"},e.white),files:r({"en-US":"Files","pt-BR":"Arquivos"},e.white),deps:r({"en-US":"Dependencies","pt-BR":"Depend\xEAncias"},e.white)},s=new g({head:[t.name,t.id,t.files,t.deps],style:{compact:!0},chars:m});o.forEach(i=>s.push([e.yellow(i.name),e.green(i.id),e.greenBright(i.files.length),e.greenBright(Object.values(i.packageJson??{}).map(a=>Object.values(a)).flat().length)])),console.log(s.toString()),p(),await c(400),l.presets.scripts.main(n)}export{P as presetsScriptsListMenu};