@cyberstrike-io/cyberstrike 1.1.15-beta.2 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{u as D,a as C,b as S,c as L,d as P,e as z,f as M,g,i as l,h as a,L as A,j as B,k as E,m as w,D as F,B as u,M as y,F as I,l as R,I as G,S as H,n as N,o as T,t as o}from"./index-C0CQ2ZN1.js";var q=o("<div>"),J=o('<div class="mt-20 w-full flex flex-col gap-4"><div class="flex gap-2 items-center justify-between pl-3"><div class="text-14-medium text-text-strong"></div></div><ul class="flex flex-col gap-2">'),K=o('<div class="mt-30 mx-auto flex flex-col items-center gap-3"><div class="flex flex-col gap-1 items-center justify-center"><div class="text-14-medium text-text-strong"></div><div class="text-12-regular text-text-weak">'),O=o('<div class="mx-auto mt-55 w-full md:w-auto px-4">'),Q=o('<div class="text-14-regular text-text-weak">');function V(){const m=D(),$=C(),p=S(),x=L(),_=P(),n=z(),s=M(),b=g(()=>m.data.path.home),k=g(()=>m.data.project.slice().sort((t,e)=>(e.time.updated??e.time.created)-(t.time.updated??t.time.created)).slice(0,5)),j=g(()=>{const t=n.healthy();return t===!0?"bg-icon-success-base":t===!1?"bg-icon-critical-base":"bg-border-weak-base"});function d(t){$.projects.open(t),n.projects.touch(t),_(`/${N(t)}`)}async function h(){function t(e){if(Array.isArray(e))for(const r of e)d(r);else e&&d(e)}if(p.openDirectoryPickerDialog&&n.isLocal()){const e=await p.openDirectoryPickerDialog?.({title:s.t("command.project.open"),multiple:!0});t(e)}else x.show(()=>a(T,{multiple:!0,onSelect:t}),()=>t(null))}return(()=>{var t=O();return l(t,a(A,{class:"md:w-xl opacity-12"}),null),l(t,a(u,{size:"large",variant:"ghost",class:"mt-4 mx-auto text-14-regular text-text-weak",onClick:()=>x.show(()=>a(F,{})),get children(){return[(()=>{var e=q();return B(r=>E(e,{"size-2 rounded-full":!0,[j()]:!0},r)),e})(),w(()=>n.name)]}}),null),l(t,a(H,{get children(){return[a(y,{get when(){return m.data.project.length>0},get children(){var e=J(),r=e.firstChild,i=r.firstChild,f=r.nextSibling;return l(i,()=>s.t("home.recentProjects")),l(r,a(u,{icon:"folder-add-left",size:"normal",class:"pl-2 pr-3",onClick:h,get children(){return s.t("command.project.open")}}),null),l(f,a(I,{get each(){return k()},children:c=>a(u,{size:"large",variant:"ghost",class:"text-14-mono text-left justify-between px-3",onClick:()=>d(c.worktree),get children(){return[w(()=>c.worktree.replace(b(),"~")),(()=>{var v=Q();return l(v,()=>R.fromMillis(c.time.updated??c.time.created).toRelative()),v})()]}})})),e}}),a(y,{when:!0,get children(){var e=K(),r=e.firstChild,i=r.firstChild,f=i.nextSibling;return l(e,a(G,{name:"folder-add-left",size:"large"}),r),l(i,()=>s.t("home.empty.title")),l(f,()=>s.t("home.empty.description")),l(e,a(u,{class:"px-3 mt-1",onClick:h,get children(){return s.t("command.project.open")}}),null),e}})]}}),null),t})()}export{V as default};
1
+ import{u as D,a as C,b as S,c as L,d as P,e as z,f as M,g,i as l,h as a,L as A,j as B,k as E,m as w,D as F,B as u,M as y,F as I,l as R,I as G,S as H,n as N,o as T,t as o}from"./index-DMx52TJy.js";var q=o("<div>"),J=o('<div class="mt-20 w-full flex flex-col gap-4"><div class="flex gap-2 items-center justify-between pl-3"><div class="text-14-medium text-text-strong"></div></div><ul class="flex flex-col gap-2">'),K=o('<div class="mt-30 mx-auto flex flex-col items-center gap-3"><div class="flex flex-col gap-1 items-center justify-center"><div class="text-14-medium text-text-strong"></div><div class="text-12-regular text-text-weak">'),O=o('<div class="mx-auto mt-55 w-full md:w-auto px-4">'),Q=o('<div class="text-14-regular text-text-weak">');function V(){const m=D(),$=C(),p=S(),x=L(),_=P(),n=z(),s=M(),b=g(()=>m.data.path.home),k=g(()=>m.data.project.slice().sort((t,e)=>(e.time.updated??e.time.created)-(t.time.updated??t.time.created)).slice(0,5)),j=g(()=>{const t=n.healthy();return t===!0?"bg-icon-success-base":t===!1?"bg-icon-critical-base":"bg-border-weak-base"});function d(t){$.projects.open(t),n.projects.touch(t),_(`/${N(t)}`)}async function h(){function t(e){if(Array.isArray(e))for(const r of e)d(r);else e&&d(e)}if(p.openDirectoryPickerDialog&&n.isLocal()){const e=await p.openDirectoryPickerDialog?.({title:s.t("command.project.open"),multiple:!0});t(e)}else x.show(()=>a(T,{multiple:!0,onSelect:t}),()=>t(null))}return(()=>{var t=O();return l(t,a(A,{class:"md:w-xl opacity-12"}),null),l(t,a(u,{size:"large",variant:"ghost",class:"mt-4 mx-auto text-14-regular text-text-weak",onClick:()=>x.show(()=>a(F,{})),get children(){return[(()=>{var e=q();return B(r=>E(e,{"size-2 rounded-full":!0,[j()]:!0},r)),e})(),w(()=>n.name)]}}),null),l(t,a(H,{get children(){return[a(y,{get when(){return m.data.project.length>0},get children(){var e=J(),r=e.firstChild,i=r.firstChild,f=r.nextSibling;return l(i,()=>s.t("home.recentProjects")),l(r,a(u,{icon:"folder-add-left",size:"normal",class:"pl-2 pr-3",onClick:h,get children(){return s.t("command.project.open")}}),null),l(f,a(I,{get each(){return k()},children:c=>a(u,{size:"large",variant:"ghost",class:"text-14-mono text-left justify-between px-3",onClick:()=>d(c.worktree),get children(){return[w(()=>c.worktree.replace(b(),"~")),(()=>{var v=Q();return l(v,()=>R.fromMillis(c.time.updated??c.time.created).toRelative()),v})()]}})})),e}}),a(y,{when:!0,get children(){var e=K(),r=e.firstChild,i=r.firstChild,f=i.nextSibling;return l(e,a(G,{name:"folder-add-left",size:"large"}),r),l(i,()=>s.t("home.empty.title")),l(f,()=>s.t("home.empty.description")),l(e,a(u,{class:"px-3 mt-1",onClick:h,get children(){return s.t("command.project.open")}}),null),e}})]}}),null),t})()}export{V as default};
@@ -2139,6 +2139,6 @@ ${c}`)}if(!c&&!s&&i.push(a+l),t.cause){const d=g8(t.cause,e,r+1,t.message);d&&i.
2139
2139
  ${Bd}${e("error.chain.causedBy")}
2140
2140
  `:"")+t:(r>0?`
2141
2141
  ${Bd}${e("error.chain.causedBy")}
2142
- `:"")+yo(t)}function Nf(t,e){return g8(t,e,0)}const OX=t=>{const e=Qr(),r=$t(),[n,o]=$e({checking:!1,version:void 0,actionError:void 0});async function s(){e.checkUpdate&&(o("checking",!0),await e.checkUpdate().then(a=>{o("actionError",void 0),a.updateAvailable&&a.version&&o("version",a.version)}).catch(a=>{o("actionError",Nf(a,r.t))}).finally(()=>{o("checking",!1)}))}async function i(){!e.update||!e.restart||await e.update().then(()=>e.restart()).then(()=>o("actionError",void 0)).catch(a=>{o("actionError",Nf(a,r.t))})}return(()=>{var a=IX(),l=a.firstChild,c=l.firstChild,d=c.firstChild,u=d.nextSibling,p=c.nextSibling,m=p.nextSibling,f=m.firstChild,h=f.firstChild,b=h.firstChild;return R(l,v(f5,{class:"w-58.5 opacity-12 shrink-0"}),c),R(d,()=>r.t("error.page.title")),R(u,()=>r.t("error.page.description")),R(l,v(Gt,{get value(){return Nf(t.error,r.t)},readOnly:!0,copyable:!0,multiline:!0,class:"max-h-96 w-full font-mono text-xs no-scrollbar",get label(){return r.t("error.page.details.label")},hideLabel:!0}),p),R(p,v(bt,{size:"large",get onClick(){return e.restart},get children(){return r.t("error.page.action.restart")}}),null),R(p,v(he,{get when(){return e.checkUpdate},get children(){return v(he,{get when(){return n.version},get fallback(){return v(bt,{size:"large",variant:"ghost",onClick:s,get disabled(){return n.checking},get children(){return ze(()=>!!n.checking)()?r.t("error.page.action.checking"):r.t("error.page.action.checkUpdates")}})},get children(){return v(bt,{size:"large",onClick:i,get children(){return r.t("error.page.action.updateTo",{version:n.version??""})}})}})}}),null),R(l,v(he,{get when(){return n.actionError},children:k=>(()=>{var y=PX();return R(y,k),y})()}),m),R(f,()=>r.t("error.page.report.prefix"),h),h.$$click=()=>e.openLink("https://cyberstrike.io/desktop-feedback"),R(b,()=>r.t("error.page.report.discord")),R(h,v(Ot,{name:"discord",class:"text-text-interactive-base"}),null),R(m,v(he,{get when(){return e.version},children:k=>(()=>{var y=DX();return R(y,()=>r.t("error.page.version",{version:k()})),y})()}),null),a})()};Wr(["click"]);var FX=X("<div class=size-full>");const _X=vw(()=>N(()=>import("./home-SafXwlHS.js"),[])),NX=vw(()=>N(()=>import("./session-WtE9tIH4.js"),[])),v8=()=>FX(),BX=()=>v(yw,{get fallback(){return v(v8,{})},get children(){return v(_X,{})}}),VX=()=>v(KX,{get children(){return v(yw,{get fallback(){return v(v8,{})},get children(){return v(NX,{})}})}}),HX=()=>v(U9,{href:"session"});function qX(t){const e=$t();return v(XR,{get value(){return{locale:e.locale,t:e.t}},get children(){return t.children}})}function UX(t){const e=Qr();return v(zD,{get nativeParser(){return e.parseMarkdown},get children(){return t.children}})}function $X(t){return v(SV,{get children(){return v(BN,{get children(){return v(KN,{get children(){return v(pq,{get children(){return v(V$,{get children(){return v(W$,{get children(){return v(dK,{get children(){return v(SX,{get children(){return t.children}})}})}})}})}})}})}})}})}function KX(t){return v(EV,{get children(){return v(dH,{get children(){return v(BV,{get children(){return v(bH,{get children(){return t.children}})}})}})}})}function WX(t){return v($X,{get children(){return[ze(()=>t.appChildren),ze(()=>t.children)]}})}const GX=t=>{if(t.platform!=="web")return;const e=t.getDefaultServerUrl?.();if(!(e instanceof Promise)&&e)return Wo(e)},ZX=t=>t.defaultUrl?t.defaultUrl:t.hostname.includes("cyberstrike.io")?"":t.storedDefaultServerUrl?t.storedDefaultServerUrl:t.origin;function QX(t){return v(J9,{get children(){return[v(TS,{}),v(CO,{get children(){return v(gN,{get children(){return v(qX,{get children(){return v(H8,{fallback:e=>v(OX,{error:e}),get children(){return v(ZR,{get children(){return v(UX,{get children(){return v(OD,{component:uj,get children(){return v(FD,{component:yj,get children(){return t.children}})}})}})}})}})}})}})}})]}})}function JX(t){const e=ta(),r=V(()=>t.active?e.current&&e.healthy()===!0?"pass":"connect":"pass");return v(Fn,{get children(){return[v(Vt,{get when(){return r()==="pass"},get children(){return t.children}}),v(Vt,{get when(){return r()==="connect"},get children(){return v(xV,{})}})]}})}function XX(t){const e=ta(),r=V(()=>{const n=e.current;return n?`${n.http.url}
2142
+ `:"")+yo(t)}function Nf(t,e){return g8(t,e,0)}const OX=t=>{const e=Qr(),r=$t(),[n,o]=$e({checking:!1,version:void 0,actionError:void 0});async function s(){e.checkUpdate&&(o("checking",!0),await e.checkUpdate().then(a=>{o("actionError",void 0),a.updateAvailable&&a.version&&o("version",a.version)}).catch(a=>{o("actionError",Nf(a,r.t))}).finally(()=>{o("checking",!1)}))}async function i(){!e.update||!e.restart||await e.update().then(()=>e.restart()).then(()=>o("actionError",void 0)).catch(a=>{o("actionError",Nf(a,r.t))})}return(()=>{var a=IX(),l=a.firstChild,c=l.firstChild,d=c.firstChild,u=d.nextSibling,p=c.nextSibling,m=p.nextSibling,f=m.firstChild,h=f.firstChild,b=h.firstChild;return R(l,v(f5,{class:"w-58.5 opacity-12 shrink-0"}),c),R(d,()=>r.t("error.page.title")),R(u,()=>r.t("error.page.description")),R(l,v(Gt,{get value(){return Nf(t.error,r.t)},readOnly:!0,copyable:!0,multiline:!0,class:"max-h-96 w-full font-mono text-xs no-scrollbar",get label(){return r.t("error.page.details.label")},hideLabel:!0}),p),R(p,v(bt,{size:"large",get onClick(){return e.restart},get children(){return r.t("error.page.action.restart")}}),null),R(p,v(he,{get when(){return e.checkUpdate},get children(){return v(he,{get when(){return n.version},get fallback(){return v(bt,{size:"large",variant:"ghost",onClick:s,get disabled(){return n.checking},get children(){return ze(()=>!!n.checking)()?r.t("error.page.action.checking"):r.t("error.page.action.checkUpdates")}})},get children(){return v(bt,{size:"large",onClick:i,get children(){return r.t("error.page.action.updateTo",{version:n.version??""})}})}})}}),null),R(l,v(he,{get when(){return n.actionError},children:k=>(()=>{var y=PX();return R(y,k),y})()}),m),R(f,()=>r.t("error.page.report.prefix"),h),h.$$click=()=>e.openLink("https://cyberstrike.io/desktop-feedback"),R(b,()=>r.t("error.page.report.discord")),R(h,v(Ot,{name:"discord",class:"text-text-interactive-base"}),null),R(m,v(he,{get when(){return e.version},children:k=>(()=>{var y=DX();return R(y,()=>r.t("error.page.version",{version:k()})),y})()}),null),a})()};Wr(["click"]);var FX=X("<div class=size-full>");const _X=vw(()=>N(()=>import("./home-CBbUenzB.js"),[])),NX=vw(()=>N(()=>import("./session-BpWko3PJ.js"),[])),v8=()=>FX(),BX=()=>v(yw,{get fallback(){return v(v8,{})},get children(){return v(_X,{})}}),VX=()=>v(KX,{get children(){return v(yw,{get fallback(){return v(v8,{})},get children(){return v(NX,{})}})}}),HX=()=>v(U9,{href:"session"});function qX(t){const e=$t();return v(XR,{get value(){return{locale:e.locale,t:e.t}},get children(){return t.children}})}function UX(t){const e=Qr();return v(zD,{get nativeParser(){return e.parseMarkdown},get children(){return t.children}})}function $X(t){return v(SV,{get children(){return v(BN,{get children(){return v(KN,{get children(){return v(pq,{get children(){return v(V$,{get children(){return v(W$,{get children(){return v(dK,{get children(){return v(SX,{get children(){return t.children}})}})}})}})}})}})}})}})}function KX(t){return v(EV,{get children(){return v(dH,{get children(){return v(BV,{get children(){return v(bH,{get children(){return t.children}})}})}})}})}function WX(t){return v($X,{get children(){return[ze(()=>t.appChildren),ze(()=>t.children)]}})}const GX=t=>{if(t.platform!=="web")return;const e=t.getDefaultServerUrl?.();if(!(e instanceof Promise)&&e)return Wo(e)},ZX=t=>t.defaultUrl?t.defaultUrl:t.hostname.includes("cyberstrike.io")?"":t.storedDefaultServerUrl?t.storedDefaultServerUrl:t.origin;function QX(t){return v(J9,{get children(){return[v(TS,{}),v(CO,{get children(){return v(gN,{get children(){return v(qX,{get children(){return v(H8,{fallback:e=>v(OX,{error:e}),get children(){return v(ZR,{get children(){return v(UX,{get children(){return v(OD,{component:uj,get children(){return v(FD,{component:yj,get children(){return t.children}})}})}})}})}})}})}})}})]}})}function JX(t){const e=ta(),r=V(()=>t.active?e.current&&e.healthy()===!0?"pass":"connect":"pass");return v(Fn,{get children(){return[v(Vt,{get when(){return r()==="pass"},get children(){return t.children}}),v(Vt,{get when(){return r()==="connect"},get children(){return v(xV,{})}})]}})}function XX(t){const e=ta(),r=V(()=>{const n=e.current;return n?`${n.http.url}
2143
2143
  ${n.http.username??""}
2144
2144
  ${n.http.password??""}`:""});return v(he,{get when(){return r()},keyed:!0,get children(){return t.children}})}function YX(t){const e=Qr(),r=GX(e),n=!t.defaultUrl&&!t.isSidecar&&location.hostname.includes("cyberstrike.io");n&&console.info("[cyberstrike] hub mode:",location.hostname);const o=ZX({defaultUrl:t.defaultUrl,storedDefaultServerUrl:r,hostname:location.hostname,origin:window.location.origin});return v(JF,{defaultUrl:o,get isSidecar(){return t.isSidecar},get children(){return v(JX,{active:n,get children(){return v(XX,{get children(){return v(XF,{get children(){return v(FN,{get children(){return v(V9,{root:s=>v(WX,{get appChildren(){return t.children},get children(){return s.children}}),get children(){return[v(rd,{path:"/",component:BX}),v(rd,{path:"/:dir",component:EX,get children(){return[v(rd,{path:"/",component:HX}),v(rd,{path:"/session/:id?",component:VX})]}})]}})}})}})}})}})}})}const eY=(t,e=window)=>{e.focus(),t&&e.location.assign(t)},tY="1.1.14",rY={version:tY},b8="cyberstrike.settings.dat:defaultServerUrl",nY=t=>{if(typeof localStorage>"u")return null;try{return localStorage.getItem(t)}catch{return null}},oY=(t,e)=>{if(!(typeof localStorage>"u"))try{if(e!==null){localStorage.setItem(t,e);return}localStorage.removeItem(t)}catch{return}},sY=()=>nY(b8),iY=t=>oY(b8,t),aY=async(t,e,r)=>{if(!("Notification"in window)||(Notification.permission==="default"?await Notification.requestPermission().catch(()=>"denied"):Notification.permission)!=="granted"||document.visibilityState==="visible"&&document.hasFocus())return;const s=new Notification(t,{body:e??"",icon:"https://cyberstrike.io/favicon-96x96-v3.png"});s.onclick=()=>{eY(r),s.close()}},lY=t=>{window.open(t,"_blank")},cY=()=>{window.history.back()},dY=()=>{window.history.forward()},uY=async()=>{window.location.reload()},aw=document.getElementById("root"),pY={platform:"web",version:rY.version,openLink:lY,back:cY,forward:dY,restart:uY,notify:aY,getDefaultServerUrl:sY,setDefaultServerUrl:iY};aw instanceof HTMLElement&&e9(()=>v(IF,{value:pY,get children(){return v(QX,{get children(){return v(YX,{})}})}}),aw);export{gt as $,ee as A,bt as B,ir as C,qk as D,qe as E,or as F,bi as G,Rs as H,Ot as I,wi as J,kt as K,f5 as L,Vt as M,yi as N,Ze as O,zo as P,gi as Q,he as R,Fn as S,D0 as T,j0 as U,P0 as V,Dc as W,Ln as X,kr as Y,En as Z,Ct as _,Fc as a,MY as a$,Ve as a0,dr as a1,Mr as a2,xn as a3,jc as a4,xr as a5,ev as a6,Vc as a7,cr as a8,Qn as a9,J7 as aA,Q7 as aB,TY as aC,Bi as aD,_u as aE,Or as aF,xs as aG,yj as aH,_Y as aI,u7 as aJ,Wk as aK,OY as aL,I_ as aM,vt as aN,Ep as aO,Nc as aP,_c as aQ,C0 as aR,V0 as aS,cl as aT,H0 as aU,$0 as aV,ce as aW,Lp as aX,Ro as aY,E0 as aZ,ap as a_,iG as aa,yt as ab,Mp as ac,lt as ad,Wo as ae,Wr as af,qn as ag,uo as ah,pv as ai,ys as aj,zr as ak,$r as al,wr as am,It as an,Gt as ao,kn as ap,jt as aq,Wu as ar,V6 as as,Vp as at,O6 as au,mt as av,kv as aw,H6 as ax,Bp as ay,X7 as az,Qr as b,Kk as b$,Y7 as b0,u9 as b1,na as b2,F0 as b3,Xh as b4,tp as b5,BY as b6,mx as b7,Nr as b8,N as b9,Ho as bA,bc as bB,Zl as bC,a8 as bD,FY as bE,qD as bF,$D as bG,Kc as bH,Ni as bI,f7 as bJ,uH as bK,WV as bL,_d as bM,jY as bN,NY as bO,NN as bP,p7 as bQ,DV as bR,tg as bS,Ei as bT,it as bU,Ka as bV,ny as bW,zY as bX,dt as bY,x0 as bZ,VN as b_,pK as ba,i7 as bb,o7 as bc,a7 as bd,HY as be,d7 as bf,l7 as bg,_f as bh,q6 as bi,q0 as bj,U0 as bk,tl as bl,Ic as bm,oi as bn,EY as bo,LY as bp,rr as bq,np as br,To as bs,gr as bt,IQ as bu,om as bv,ru as bw,Xo as bx,qY as by,bo as bz,Do as c,Os as d,ta as e,$t as f,V as g,v as h,R as i,Be as j,nr as k,rt as l,ze as m,Qt as n,XZ as o,$e as p,xW as q,ne as r,Ut as s,X as t,cn as u,fe as v,de as w,me as x,Jt as y,Kr as z};