UNPKG

@lunora/cli

Version:

The Lunora CLI: init, dev, deploy, codegen, migrate, seed, doctor, insights, logs, registry, and the rest of the project commands

2 lines (1 loc) • 584 B
import{resolveTargetOrThrow as n}from"@lunora/config";import{isRunnableTarget as a,runnableTargetIds as s}from"@lunora/config/cli";const g=(e,t)=>{try{return{target:n(e,t)}}catch(r){return{error:r instanceof Error?r.message:String(r)}}},c=(e,t)=>{const r=g(e,t);if(r.target===void 0)return r;if(!a(r.target)){const o=s();return{error:`deploy target "${r.target}" has no command-line toolchain, so the Lunora CLI cannot deploy or serve it — it can only generate for it (\`lunora codegen --target ${r.target}\`). Deployable targets: ${o.join(", ")}`}}return r};export{c as a,g as r};