@lunora/cli
Version:
The Lunora CLI: init, dev, deploy, codegen, migrate, seed, doctor, insights, logs, registry, and the rest of the project commands
4 lines (3 loc) • 677 B
JavaScript
import{findLunoraSolution as n}from"@lunora/codegen";import{VisulimaError as a,renderError as s}from"@visulima/error";const d=r=>r.body.split(`
`).filter(e=>!e.startsWith("```")).join(`
`).replaceAll(/\*\*(.+?)\*\*/gu,"$1").replaceAll(/`([^`]+)`/gu,"$1"),l={filterStacktrace:()=>!1,hideErrorCodeView:!0},m=(r,e)=>{const o=r instanceof Error?r.message:String(r),t=n(o),i=new a({hint:t?[t.header,"",d(t)]:void 0,message:e===void 0?`codegen failed: ${o}`:`codegen failed (${e}): ${o}`,name:"CodegenError"});return i.stack="",s(i,l)},u=r=>{const e=n(r);if(e===void 0)return;const o=new a({hint:[d(e)],message:e.header,name:"Hint"});return o.stack="",s(o,l)};export{u as c,m as l};