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