@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) • 514 B
JavaScript
import{readLiveDevServerState as a}from"@lunora/config";const l=new Set(["127.0.0.1","::1","[::1]","localhost"]),i=/\/$/u,n="http://localhost:8787",c=r=>r===void 0?n:a(r)?.url??n,d=r=>r.replace(i,""),u=(r,o,s)=>{const e=r??c(s);let t;try{t=new URL(e)}catch{o.error(`invalid --url: ${e}`);return}if(!l.has(t.hostname)&&t.protocol!=="https:"){o.error(`refusing to send the admin bearer over ${t.protocol}// to ${t.hostname} — use https for non-localhost targets`);return}return d(e)};export{c as a,d as n,u as r};