UNPKG

@lunora/cli

Version:

The Lunora CLI: init, dev, deploy, codegen, run, reset, and migrate commands

2 lines (1 loc) 389 B
const n=new Set(["127.0.0.1","::1","[::1]","localhost"]),s=/\/$/u,a=(r,e)=>{const o=r??"http://localhost:8787";let t;try{t=new URL(o)}catch{e.error(`invalid --url: ${o}`);return}if(!n.has(t.hostname)&&t.protocol!=="https:"){e.error(`refusing to send the admin bearer over ${t.protocol}// to ${t.hostname} — use https for non-localhost targets`);return}return o.replace(s,"")};export{a};