1import{d as ae,b as m,w as F,y as he,o as i,e as u,g as r,m as $,u as P,F as K,l as W,t as x,c as ye,_ as se,q,z as H,A as I,B as J,k as S,T as be,H as ke,f as we,n as Q}from"./600-B6wu_fgg.js";import{h as ge,u as xe,g as Ce,z as _e}from"./main-BoLYIECj.js";import{z as Ee,at as ee,k as j,au as Te,av as Ae,aw as Le}from"./ExeBuilder-BRe68UH-.js";import{D as te}from"./DocsSearch-BcCNSGEn.js";import{s as Ne}from"./themeMode-CJ36fwdE.js";import"./tokens-BBKQUwyO.js";const Me=/^[A-Za-z0-9_@%+=:,./-]+$/;function ne(p){return p===""?"''":Me.test(p)?p:p.includes("'")?/["\\$`]/.test(p)?"'"+p.replace(/'/g,"'\\''")+"'":'"'+p+'"':"'"+p+"'"}function oe(p,l){return`ssh ${p} ${ne(l)}`}function qe(p,l,f,w){return[`curl -X POST ${f} \\`,` -H "Authorization: Bearer ${w}" \\`,` -d ${ne(oe(p,l))}`].join(` 2`)}const Se={class:"command-quoter"},$e={class:"command-editor"},De={class:"command-row"},He={class:"example-control"},Ie={class:"quoter-results","aria-label":"Quoted commands"},Pe={class:"result-label"},Be=["data-testid"],Ve={class:"sr-only",role:"status","aria-live":"polite"},Re=ae({__name:"CommandQuoter",setup(p){const l=[{id:"simple",label:"Simple command",cmd:"whoami"},{id:"pipeline",label:"Pipeline",cmd:"cd /srv && ls | head -3"},{id:"quoted",label:"Quoted argument",cmd:"echo 'hello world'"},{id:"both-quotes",label:"Both quote kinds",cmd:`printf '%s\\n' "it's ready"`},{id:"detached",label:"Detached job",cmd:"setsid nohup ./build.sh > /tmp/build.log 2>&1 & echo started"}],f=m("both-quotes"),w=m(l.find(h=>h.id===f.value).cmd),b=m(null),k=m("");let C,v;const A=ye(()=>[{id:"lobby",label:"ssh exe.dev",value:oe("my-vm",w.value)},{id:"curl",label:"curl",value:qe("my-vm",w.value,"https://exe.dev/exec","$TOKEN")}]);function L(h){const d=l.find(s=>s.id===h);d&&(w.value=d.cmd)}async function D(h,d){try{await navigator.clipboard.writeText(d)}catch{const s=document.createElement("textarea");s.value=d,s.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}b.value=h,clearTimeout(C),C=setTimeout(()=>{b.value=null},1500)}return F(w,h=>{f.value=l.find(d=>d.cmd===h)?.id??null,k.value="",clearTimeout(v),v=setTimeout(()=>{k.value="Quoted commands updated."},400)}),he(()=>{clearTimeout(C),clearTimeout(v)}),(h,d)=>(i(),u("section",Se,[r("div",$e,[r("div",De,[d[3]||(d[3]=r("label",{for:"quoter-command"},"Command",-1)),r("div",He,[d[2]||(d[2]=r("label",{for:"quoter-example-select"},"Example",-1)),$(P(Ee),{modelValue:f.value,"onUpdate:modelValue":[d[0]||(d[0]=s=>f.value=s),L],"input-id":"quoter-example-select",options:l,"option-label":"label","option-value":"id",placeholder:"Load an exampleâ¦","aria-label":"Load an example command",size:"small"},null,8,["modelValue"])])]),$(P(ge),{id:"quoter-command",modelValue:w.value,"onUpdate:modelValue":d[1]||(d[1]=s=>w.value=s),rows:"2","auto-resize":"",spellcheck:"false","aria-label":"Editable command to run",fluid:""},null,8,["modelValue"])]),r("div",Ie,[(i(!0),u(K,null,W(A.value,s=>(i(),u("section",{key:s.id,class:"result-step"},[r("div",Pe,[r("strong",null,x(s.label),1)]),$(P(Ne),{label:"Copy",icon:b.value===s.id?"pi pi-check":"pi pi-copy","aria-label":b.value===s.id?`Copied ${s.label}`:`Copy ${s.label}`,severity:"secondary",size:"small",text:"",onClick:U=>D(s.id,s.value)},null,8,["icon","aria-label","onClick"]),r("pre",{"data-testid":`quoter-${s.id}-output`},[r("code",null,x(s.value),1)],8,Be)]))),128))]),r("span",Ve,x(k.value),1)]))}}),Oe=se(Re,[["__scopeId","data-v-0efc6bd9"]]),ze={class:"docs-page"},Qe={key:0,class:"loading-state"},je={key:1,class:"error-state"},Fe={key:2,class:"docs-container"},Ke={class:"sidebar-top"},We=["open"],Ue={class:"sidebar-heading"},Xe=["href"],Ge={key:1},Ye={class:"main"},Ze={class:"mobile-top-row"},Je={class:"mobile-search"},et={key:0,class:"doc-header"},tt={class:"doc-title"},at=["data-tooltip","aria-label"],st={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},nt={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},ot=["innerHTML"],lt={key:3,class:"page-nav"},rt=ae({__name:"DocsEntry",setup(p){const l=xe(),f=Ce();function w(e){return e.replace(/\.md$/,"").replace(/\/+$/,"").split("/").pop().replace(/[-_]+/g," ").trim()}const b=m(!0),k=m(""),C=m([]),v=m(null),A=m(null),L=m(null),D=m(""),h=m("Copy as Markdown"),d=m(!1),s=m(null),U=m(null),B=m(!1);async function le(e){B.value=!1,!v.value&&(b.value=!0),k.value="";try{const[a,n]=await Promise.all([C.value.length?Promise.resolve(null):ee(),Te(e)]);if(l.params.slug!==e)return;a&&(C.value=a.groups,j.value=a.isLoggedIn),v.value=n.entry,A.value=n.prev,L.value=n.next,D.value=e,n.entry?.title&&_e(`${n.entry.title} â Docs`)}catch(a){if(l.params.slug!==e)return;if(a instanceof Ae&&a.status===404){f.replace({path:"/docs/search",query:{q:w(e),from:"/docs/"+e}});return}k.value=a.message||"Failed to load"}finally{b.value=!1}await Q(),X(),G(),de(),await Y(),O()}async function re(){B.value=!1,b.value=!0,k.value="";try{const e=await Le();C.value=e.groups,j.value=e.isLoggedIn,v.value={slug:"all",path:"/docs/all",title:"exe.dev Documentation",description:"Complete exe.dev documentation in one page",content:e.content,markdown:""},A.value=null,L.value=null,D.value="all"}catch(e){k.value=e.message||"Failed to load"}finally{b.value=!1}await Q(),X(),G(),await Y(),O()}function O(){const e=l.hash;if(!e)return;const t=document.querySelector(e);t&&t.scrollIntoView({behavior:"instant"})}function ie(e){if(e.docs.some(t=>t.slug===D.value))return!0;
2if(l.name==="docs-all"&&l.hash){const t=l.hash.slice(1);if(t===e.slug||e.docs.some(a=>a.slug===t))return!0}return e.defaultOpen}function _(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function X(){if(!s.value)return;const e='<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>',t='<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>';s.value.querySelectorAll("pre code").forEach(a=>{const n=a.textContent||"",c=a.parentNode;if(c.parentElement?.classList.contains("copy-code-wrap"))return;const y=document.createElement("div");y.className="copy-code-wrap",c.parentNode.insertBefore(y,c),y.appendChild(c);const o=document.createElement("button");o.type="button",o.className="copy-code-button",o.setAttribute("aria-label","Copy code"),o.innerHTML=e,o.addEventListener("click",()=>{navigator.clipboard.writeText(n).then(()=>{o.innerHTML=t,o.classList.add("is-copied"),setTimeout(()=>{o.innerHTML=e,o.classList.remove("is-copied")},2e3)})}),y.appendChild(o)})}function G(){s.value&&s.value.querySelectorAll("h1[id], h2[id], h3[id], h4[id]").forEach(e=>{if(e.querySelector(".anchor-link"))return;const t=document.createElement("a");t.href="#"+e.id,t.className="anchor-link",t.setAttribute("aria-label","Link to this section"),t.textContent="#",e.appendChild(t)})}function ce(){const e=t=>typeof t=="string"?t.trim():"";return{domain:e(l.query.domain),vm:e(l.query.vm)}}async function Y(){B.value=!!s.value?.querySelector("#command-quoter"),B.value&&await Q()}function de(){if(!s.value)return;const e=s.value.querySelector("#dns-checker");if(!e)return;e.innerHTML=` 3 <div class="dns-input-row"> 4 <input id="dns-domain" type="text" placeholder="example.com" class="dns-input" /> 5 <input id="dns-vm" type="text" placeholder="vm-name" class="dns-input dns-input-vm" /> 6 <button id="dns-check-btn" class="dns-btn">Check DNS</button> 7 </div> 8 <div id="dns-result"></div> 9 `;const t=e.querySelector("#dns-domain"),a=e.querySelector("#dns-vm"),n=e.querySelector("#dns-check-btn"),c=e.querySelector("#dns-result");async function y(){const E=t.value.trim(),M=a.value.trim();if(!E){c.innerHTML='<p class="dns-warn">Enter a domain name.</p>';return}if(!M){c.innerHTML='<p class="dns-warn">Enter your VM name.</p>';return}n.disabled=!0,n.textContent="Checkingâ¦",c.innerHTML="";try{const N=await(await fetch("/api/dns-check?domain="+encodeURIComponent(E)+"&vm="+encodeURIComponent(M))).json();N.error?c.innerHTML='<p class="dns-err">'+_(N.error)+"</p>":c.innerHTML=ue(N)}catch(T){c.innerHTML='<p class="dns-err">Request failed: '+_(T.message)+"</p>"}finally{n.disabled=!1,n.textContent="Check DNS"}}n.addEventListener("click",y);const o=E=>{E.key==="Enter"&&y()};t.addEventListener("keydown",o),a.addEventListener("keydown",o);const g=ce();g.domain&&(t.value=g.domain),g.vm&&(a.value=g.vm),g.domain&&g.vm&&y()}function ue(e){const t=!!e.probedName,a=!t&&e.status==="ok"&&e.wildcardCname,n=a?"dns-status-warn":e.status==="ok"?"dns-status-ok":e.status==="partial"?"dns-status-warn":"dns-status-err",c=a?"Well, sorta...":e.status==="ok"?"All good!":e.status==="partial"?"Almost there.":"Not quite.",y=a?"â ":e.status==="ok"?"â":e.status==="partial"?"â ":"â";let o='<div class="dns-result-box '+n+'">';o+='<p class="dns-summary">'+y+" "+c+"</p>",o+='<table class="dns-table">',o+="<thead><tr><th>Record</th><th>Expected</th><th>Actual</th><th></th></tr></thead>",o+="<tbody>";const g=e.isApex||!e.cname&&!e.cnamePointsToExe,E=e.boxHost||"exe.xyz",M=e.boxName?e.boxName+"."+E:"your-vm."+E;if(g){const T=e.aRecords&&e.aRecords.length?e.aRecords.join(", "):e.aError||"none",N=e.pointsToExe,ve=e.boxIP?e.boxIP:"IP of "+M,fe=e.boxIP?M:"";o+=z("A / ALIAS",e.domain,ve,T,N,fe);let R="",Z=!1;e.wwwCname?(R=e.wwwCname,Z=e.wwwPointsToExe===!0):e.wwwCnameError?R=e.wwwCnameError:R="not set",o+=z("CNAME","www."+e.domain,M,R,Z)}else{let T="",N=!1;e.cname?(T=e.cname,N=e.cnamePointsToExe):e.cnameError?T=e.cnameError:T="not set",o+=z(t?"CNAME (wildcard)":"CNAME",e.domain,M,T,N)}return o+="</tbody></table>",e.apexCname&&(o+='<p class="dns-wildcard-warn">â <strong>'+_(e.domain)+'</strong> is an apex domain, but it has a <code>CNAME</code> record. <a href="https://datatracker.ietf.org/doc/html/rfc1912#section-2.4" target="_blank" rel="noopener">RFC 1912 §2.4</a> forbids CNAMEs on a name that also has SOA/NS/MX records, and every apex has them. This will break email (MX), nameserver delegation (NS), and other records. Replace the CNAME with an <code>A</code>, <code>ALIAS</code>, <code>ANAME</code>, or flattened-CNAME record pointing to your VM.</p>'),t?o+='<p class="dns-hint">Checked <code>'+_(e.probedName)+"</code>, a name nobody has published â only a wildcard record can answer for it.</p>":e.wildcardCname&&(o+=`<p class="dns-wildcard-warn">â It'll work for now, but we recommend against wildcard CNAME records, as they can allow for certificate issuance abuse.</p>`),o+="</div>",o}function z(e,t,a,n,c,y){const o=c?"dns-row-ok":"dns-row-err",g=c?"â":"â",E=y?'<br><span class="dns-hint">'+_(y)+"</span>":"";return'<tr class="'+o+'"><td>
9<span class="dns-record-type">'+_(e)+"</span><br><code>"+_(t)+"</code></td><td><code>"+_(a)+"</code>"+E+"</td><td><code>"+_(n)+'</code></td><td class="dns-check-icon">'+g+"</td></tr>"}function me(e){if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0)return;const t=e.target.closest("a");if(!t)return;const a=t.getAttribute("href");if(!a||!a.startsWith("/docs/")||a.endsWith(".md")||a.startsWith("/docs/section/"))return;e.preventDefault();const n=a.replace(/^\/docs\//,"");n==="all"?f.push("/docs/all"):n==="list"?f.push("/docs/list"):n&&f.push("/docs/"+n)}function pe(){v.value?.markdown&&navigator.clipboard.writeText(v.value.markdown).then(()=>{h.value="Copied!",d.value=!0,setTimeout(()=>{h.value="Copy as Markdown",d.value=!1},2e3)})}const V=m(!1);return F(()=>[l.params.slug,l.name],async()=>{if(l.name==="docs-all"){V.value||(await re(),V.value=!0);return}if(V.value=!1,l.name!=="docs"&&l.name!=="docs-entry")return;const e=l.params.slug;if(e&&e.endsWith("/")){f.replace("/docs/"+e.replace(/\/+$/,""));return}const t=e;if(t)await le(t);else try{const a=await ee();C.value=a.groups,j.value=a.isLoggedIn,a.defaultSlug&&f.replace("/docs/"+a.defaultSlug)}catch(a){k.value=a.message||"Failed to load",b.value=!1}},{immediate:!0}),F(()=>l.hash,()=>{l.name==="docs-all"&&V.value&&O()}),(e,t)=>{const a=ke("router-link");return i(),u("div",ze,[b.value?(i(),u("div",Qe,[...t[1]||(t[1]=[r("i",{class:"pi pi-spin pi-spinner"},null,-1),q(" Loading...",-1)])])):k.value?(i(),u("div",je,[r("p",null,x(k.value),1)])):(i(),u("div",Fe,[r("nav",{class:"sidebar",ref_key:"sidebarEl",ref:U},[$(te),r("div",Ke,[P(l).name==="docs-all"?(i(),H(a,{key:0,to:"/docs",class:"sidebar-link"},{default:I(()=>[...t[2]||(t[2]=[q("Many Pages",-1)])]),_:1})):(i(),H(a,{key:1,to:"/docs/all",class:"sidebar-link"},{default:I(()=>[...t[3]||(t[3]=[q("One Page",-1)])]),_:1})),t[4]||(t[4]=r("span",{class:"sidebar-sep"},"·",-1)),t[5]||(t[5]=r("a",{href:"/llms.txt",class:"sidebar-link"},"llms.txt",-1))]),(i(!0),u(K,null,W(C.value,n=>(i(),u("details",{key:n.slug,class:"sidebar-section",open:ie(n)},[r("summary",Ue,[P(l).name==="docs-all"?(i(),u("a",{key:0,href:"#"+n.slug,class:"sidebar-heading-link",onClick:t[0]||(t[0]=we(()=>{},["stop"]))},x(n.heading),9,Xe)):(i(),u("span",Ge,x(n.heading),1))]),(i(!0),u(K,null,W(n.docs,c=>(i(),H(a,{key:c.slug,to:P(l).name==="docs-all"?{hash:"#"+c.slug}:"/docs/"+c.slug,class:J(["sidebar-link",{active:c.slug===D.value}])},{default:I(()=>[q(x(c.title),1)]),_:2},1032,["to","class"]))),128))],8,We))),128))],512),r("main",Ye,[r("div",Ze,[$(a,{class:"back-to-list",to:"/docs/list"},{default:I(()=>[...t[6]||(t[6]=[q("â All docs",-1)])]),_:1}),r("div",Je,[$(te,{trigger:"button"})])]),v.value?(i(),u("div",et,[r("h1",tt,x(v.value.title),1),v.value.markdown?(i(),u("button",{key:0,class:J(["copy-md-btn",{copied:d.value}]),"data-tooltip":h.value,"aria-label":h.value,onClick:pe},[d.value?(i(),u("svg",nt,[...t[8]||(t[8]=[r("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(i(),u("svg",st,[...t[7]||(t[7]=[r("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"},null,-1),r("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])]))],10,at)):S("",!0)])):S("",!0),v.value?(i(),u("div",{key:1,class:"doc-content",ref_key:"contentEl",ref:s,innerHTML:v.value.content,onClick:me},null,8,ot)):S("",!0),B.value?(i(),H(be,{key:2,to:"#command-quoter"},[$(Oe)])):S("",!0),A.value||L.value?(i(),u("nav",lt,[A.value?(i(),H(a,{key:0,to:"/docs/"+A.value.slug,class:"page-nav-link page-nav-prev"},{default:I(()=>[q("â "+x(A.value.title),1)]),_:1},8,["to"])):S("",!0),L.value?(i(),H(a,{key:1,to:"/docs/"+L.value.slug,class:"page-nav-link page-nav-next"},{default:I(()=>[q(x(L.value.title)+" â",1)]),_:1},8,["to"])):S("",!0)])):S("",!0)])]))])}}}),vt=se(rt,[["__scopeId","data-v-6c659043"]]);export{vt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.