@deslop/deploy 0.1.1254 → 0.1.1256
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.
- package/dist/client/assets/(home)-ByxxWWFS.js +41 -0
- package/dist/client/assets/{-expose-v63MRu6-.js → -expose-C-Ms5e0i.js} +1 -1
- package/dist/client/assets/{index-Dp4GpdSj.js → index-CbCUTK2X.js} +2 -2
- package/dist/client/assets/{route-DIRz-Zlx.js → route-Cwy9vRbP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server.js +116 -3
- package/package.json +2 -2
- package/dist/client/assets/(home)-C1xOprE3.js +0 -41
- package/dist/client/assets/icon-BvNBGpnY.svg +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-
|
|
2
|
-
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Ct as t,Dt as n,Et as r,St as i,Tt as a,_t as o,a as s,at as c,bt as l,c as u,dt as d,ft as f,gt as p,ht as m,it as h,mt as g,o as _,pt as v,rt as ee,st as y,t as te,ut as ne,vt as b,wt as x,xt as S,yt as C}from"./schema-C6EZGADp.js";import{a as w,o as T}from"./react-COyt-gOi.js";import{ot as E,st as D,tt as O,vt as k}from"./effect-BfFgN0bu.js";var A=`Error preloading route! ☝️`;function j(e,t){if(e)return typeof e==`string`?e:e[t]}function M(e){return e?.scriptFormat??`module`}function N(e,t,n){let r=P(t),i=j(n,`script`)??r.crossOrigin;return{...M(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function P(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function F(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function re(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function ie(e,t,n,r){let i=f(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function I([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var L=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=g:this.parentRoute||l();let r=n?g:t?.path;r&&r!==`/`&&(r=b(r));let i=t?.id||r,a=n?g:p((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:p(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=C(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>v({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ae=class{constructor({id:e}){this.notFound=e=>m({routeId:this.id,...e}),this.redirect=e=>v({from:this.id,...e}),this.id=e}},oe=class extends L{constructor(e){super(e)}};function R(e){return c({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function z(e){let{select:t,...n}=e;return c({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function B(e){return c({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function V(e){return c({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var H=e(T(),1);function U(e){let t=n();return H.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function W(e){return c({...e,select:t=>e.select?e.select(t.context):t.context})}var G=w();function se(...e){let t=H.useRef(e),n=t.current;return e.forEach((e,t)=>{S(n[t],e,!1,!0)||(n[t]=e)}),t.current}function K(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(A)})}function ce(e,t){let n=typeof e==`string`&&x(e);if(n)return t.has(n)?e:null}function le(e,t,n,r){let i=o(e.pathname,r),a=o(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!S(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function ue(e,t,r){let i=n(),a=H.useRef(null),o=H.useCallback(e=>{if(a.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:f,target:p,onClick:m,onBlur:h,onFocus:g,onMouseEnter:_,onMouseLeave:v,onTouchStart:ee}=e,[y,te,b]=se(e.search,e.params,s),S=H.useContext(d),C=(i.stores._linkScopes??={})[S]??=ne(i,S),[w,T,E]=H.useMemo(()=>{let t=ce(c,i.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},r,a,o,s=()=>{let e=C[0]();if(e!==r){n._fromLocation=e;let t=i.buildLocation(n),o=he(t,i,f),s=f||o&&!x(o)?le(e,t,b,i.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),r=e}return a};return[n,s,b?.includeHash&&(()=>{let e=s();return e[1]?o??=[e[0],!1]:e})]},[i,C,e.from,e.hash,e.href,c,y,te,e.state,e.mask,e.unsafeRelative,b,f]),[D,O]=H.useSyncExternalStore(C[1],T,E||T),k=O===void 0&&D,A=f||D===void 0,j=H.useRef(!1),M=e.reloadDocument||k||A?!1:l??i.options.defaultPreload,N=u??i.options.defaultPreloadDelay??0,P=H.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?a.t??=setTimeout(()=>{a.t=void 0,K(i,w)},N):K(i,w):t===!1&&J(a)},[i,w,a,M,N]);H.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,K(i,w));let e=!0,t;return M===`viewport`&&a.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(a.current)),()=>{e=!1,t?.disconnect(),J(a)}},[i,w,M,P,a]);let F=pe(e,r);if(F.ref=t?o:a,k)return F.href=k,F;let re=t=>{let n=p??t.currentTarget.getAttribute(`target`);A||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),J(a),i.navigate({...e,_fromLocation:w._fromLocation}))},ie=()=>{M===`intent`&&K(i,w)},I=()=>{M===`intent`&&J(a)};return F.onClick=Y(m,re),F.onBlur=Y(h,I),F.onFocus=Y(g,P),F.onMouseEnter=Y(_,P),F.onMouseLeave=Y(v,I),F.onTouchStart=Y(ee,ie),me(F,e,O,D,A,r)}var de={},fe={className:`active`},q=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function pe(e,t){let n={};for(let r in e)q.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function me(e,n,r,i,a,o){let{activeProps:s,inactiveProps:c,className:l,style:u,target:d}=n,f=t(r?s:c,{})??(r?fe:de);Object.assign(e,f),e.href=i,o!==`a`&&(e.disabled=a),e.target=d;let p=f.style;(u||p)&&(e.style=u&&p?{...u,...p}:u||p);let m=f.className;return(l||m)&&(e.className=l?m?`${l} ${m}`:l:m),a&&(e.role=`link`,e[`aria-disabled`]=!0),r&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var J=e=>{clearTimeout(e.t),e.t=void 0},Y=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function he(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!a(i,t.protocolAllowlist))return i}var X=H.memo(H.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ue(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return H.createElement(n,r,i)}),ge);function ge(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!q.has(r)||!S(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}function _e(e){return new ve({id:e})}var ve=class extends ae{constructor({id:e}){super({id:e}),this.useMatch=e=>c({...e,from:this.id}),this.useRouteContext=e=>W({...e,from:this.id}),this.useSearch=e=>V({...e,from:this.id}),this.useParams=e=>B({...e,from:this.id}),this.useLoaderDeps=e=>z({...e,from:this.id,strict:!1}),this.useLoaderData=e=>R({...e,from:this.id,strict:!1}),this.useNavigate=()=>U({from:n().routesById[this.id].fullPath}),this.notFound=e=>m({routeId:this.id,...e}),this.Link=H.forwardRef((e,t)=>{let r=n().routesById[this.id].fullPath;return(0,G.jsx)(X,{ref:t,from:r,...e})})}},ye=class extends L{constructor(e){super(e),this.useMatch=e=>c({...e,from:this.id}),this.useRouteContext=e=>W({...e,from:this.id}),this.useSearch=e=>V({...e,from:this.id}),this.useParams=e=>B({...e,from:this.id}),this.useLoaderDeps=e=>z({...e,from:this.id}),this.useLoaderData=e=>R({...e,from:this.id}),this.useNavigate=()=>U({from:this.fullPath}),this.Link=H.forwardRef((e,t)=>(0,G.jsx)(X,{ref:t,from:this.fullPath,...e}))}};function be(e){return new ye(e)}var xe=class extends oe{constructor(e){super(e),this.useMatch=e=>c({...e,from:this.id}),this.useRouteContext=e=>W({...e,from:this.id}),this.useSearch=e=>V({...e,from:this.id}),this.useParams=e=>B({...e,from:this.id}),this.useLoaderDeps=e=>z({...e,from:this.id}),this.useLoaderData=e=>R({...e,from:this.id}),this.useNavigate=()=>U({from:this.fullPath}),this.Link=H.forwardRef((e,t)=>(0,G.jsx)(X,{ref:t,from:this.fullPath,...e}))}};function Se(e){return new xe(e)}function Z(e){return e=>{let t=be(e);return t.isRoot=!1,t}}function Ce(e,t){let n,i,a,o=()=>(n||=(a=void 0,e().then(e=>{n=void 0,s.preload=void 0,i=e[t??`default`]}).catch(e=>{n=void 0,a=e})),n),s=function(e){if(a){if(r(a)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw a}if(!i){if(h)h(o());else throw o()}return H.createElement(i,e)};return s.preload=o,s}function we(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Te(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=H.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,G.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,G.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,G.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,G.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,G.jsx)(Ee,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Ee({attrs:e,children:t,preventScriptHoist:r}){n();let i=ee(),a=H.useMemo(()=>t===void 0?void 0:{__html:t},[t]),o=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(H.useEffect(()=>{if(!o){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return we(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,we(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,o]),o&&typeof t==`string`)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:a});if(!i){if(e?.src)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,G.jsx)(`script`,{...e,dangerouslySetInnerHTML:a,suppressHydrationWarning:!0})}return null}function De(e,t,n,r){n=f(n);let a=n.map(e=>e.meta).filter(e=>e!==void 0),o=[],s={},c;for(let e=a.length-1;e>=0;e--){let n=a[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)c||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);o.push({tag:`script`,attrs:{type:`application/ld+json`},children:i(e)})}catch{}else{let e=r.name??r.property;if(e){if(s[e])continue;s[e]=!0}o.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}c&&o.push(c),t&&o.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),o.reverse();let l=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),u=e.ssr?.manifest,d=[];u&&(n.forEach(e=>{(u.routes[e.routeId]?.css)?.forEach(e=>{let n=re(e);d.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:j(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),u.inlineStyle&&d.push({tag:`style`,attrs:{...u.inlineStyle.attrs,nonce:t},children:u.inlineStyle.children,inlineCss:!0}));let p=[];u&&n.forEach(e=>{u.routes[e.routeId]?.preloads?.forEach(e=>{p.push({tag:`link`,attrs:{...N(u,e,r),nonce:t}})})});let m=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),h=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),g=[];return F(g,o),g.push(...p),F(g,l),g.push(...d),F(g,m),F(g,h),g}var Oe=e=>{let t=n(),r=t.options.ssr?.nonce,i=H.useCallback(n=>De(t,r,n,e),[e,r,t]);return y(t.stores.matches,i,{compare:S})};function ke(e){let t=Oe(e.assetCrossOrigin),r=n().options.ssr?.nonce;return(0,G.jsx)(G.Fragment,{children:t.map(e=>(0,H.createElement)(Te,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:r}))})}var Ae={suppressHydrationWarning:!0},je=()=>{let e=n(),t=e.options.ssr?.nonce,r=n=>{let r=ie(n,e.ssr?.manifest,t,Ae);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return Me(y(e.stores.matches,e=>I(r(e)),{compare:S}))};function Me(e){return(0,G.jsx)(G.Fragment,{children:e.map((e,t)=>(0,H.createElement)(Te,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Ne=Se({shellComponent:e=>(0,G.jsxs)(`div`,{className:`bg-background text-foreground pt-safe-top pr-safe-right pl-safe-left flex h-dvh w-dvw flex-col`,children:[(0,G.jsx)(ke,{}),(0,G.jsx)(je,{}),e.children]})}),Pe=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Fe=function(e){return`/`+e},Ie={},Le=function(e){return e.pathname.endsWith(`.css`)},Re=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Fe(t,n);let r=s(t),i=Le(r);return Re(Ie,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Pe,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ze=Z(`/(home)`)({component:Ce(()=>Q(()=>import(`./route-DIRz-Zlx.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),Be=()=>Q(()=>import(`./(home)-C1xOprE3.js`),__vite__mapDeps([6,2,1,5,4,3])),Ve=O([`apps`,`machine`,`process`]),He=D({app:k(E),machine:k(E),pane:k(Ve),range:k(te.fields.minutes)}),Ue=Z(`/(home)/`)({component:Ce(Be,`component`),validateSearch:u(He)}),We=Z(`/(home)/monitor`)({beforeLoad:()=>{throw v({replace:!0,to:`/`})}}),$=ze.update({id:`/(home)`,getParentRoute:()=>Ne}),Ge=Ue.update({id:`/`,path:`/`,getParentRoute:()=>$}),Ke={homeMonitorRoute:We.update({id:`/monitor`,path:`/monitor`,getParentRoute:()=>$}),homeIndexRoute:Ge},qe={homeRouteRoute:$._addFileChildren(Ke)},Je=Ne._addFileChildren(qe)._addFileTypes(),Ye=s(Je);_(Ye);export{_e as t};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-Cwy9vRbP.js","assets/react-COyt-gOi.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/schema-C6EZGADp.js","assets/effect-BfFgN0bu.js","assets/-expose-C-Ms5e0i.js","assets/(home)-ByxxWWFS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{Ct as t,Dt as n,Et as r,St as i,Tt as a,_t as o,a as s,at as c,bt as l,c as u,dt as d,ft as f,gt as p,ht as m,it as h,mt as g,o as _,pt as v,rt as ee,st as y,t as te,ut as ne,vt as b,wt as x,xt as S,yt as C}from"./schema-C6EZGADp.js";import{a as w,o as T}from"./react-COyt-gOi.js";import{ot as E,st as D,tt as O,vt as k}from"./effect-BfFgN0bu.js";var A=`Error preloading route! ☝️`;function j(e,t){if(e)return typeof e==`string`?e:e[t]}function M(e){return e?.scriptFormat??`module`}function N(e,t,n){let r=P(t),i=j(n,`script`)??r.crossOrigin;return{...M(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function P(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function F(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function re(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function ie(e,t,n,r){let i=f(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function I([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var L=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=g:this.parentRoute||l();let r=n?g:t?.path;r&&r!==`/`&&(r=b(r));let i=t?.id||r,a=n?g:p((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:p(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=C(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>v({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ae=class{constructor({id:e}){this.notFound=e=>m({routeId:this.id,...e}),this.redirect=e=>v({from:this.id,...e}),this.id=e}},oe=class extends L{constructor(e){super(e)}};function R(e){return c({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function z(e){let{select:t,...n}=e;return c({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function B(e){return c({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function V(e){return c({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var H=e(T(),1);function U(e){let t=n();return H.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function W(e){return c({...e,select:t=>e.select?e.select(t.context):t.context})}var G=w();function se(...e){let t=H.useRef(e),n=t.current;return e.forEach((e,t)=>{S(n[t],e,!1,!0)||(n[t]=e)}),t.current}function K(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(A)})}function ce(e,t){let n=typeof e==`string`&&x(e);if(n)return t.has(n)?e:null}function le(e,t,n,r){let i=o(e.pathname,r),a=o(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!S(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function ue(e,t,r){let i=n(),a=H.useRef(null),o=H.useCallback(e=>{if(a.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:f,target:p,onClick:m,onBlur:h,onFocus:g,onMouseEnter:_,onMouseLeave:v,onTouchStart:ee}=e,[y,te,b]=se(e.search,e.params,s),S=H.useContext(d),C=(i.stores._linkScopes??={})[S]??=ne(i,S),[w,T,E]=H.useMemo(()=>{let t=ce(c,i.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},r,a,o,s=()=>{let e=C[0]();if(e!==r){n._fromLocation=e;let t=i.buildLocation(n),o=he(t,i,f),s=f||o&&!x(o)?le(e,t,b,i.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),r=e}return a};return[n,s,b?.includeHash&&(()=>{let e=s();return e[1]?o??=[e[0],!1]:e})]},[i,C,e.from,e.hash,e.href,c,y,te,e.state,e.mask,e.unsafeRelative,b,f]),[D,O]=H.useSyncExternalStore(C[1],T,E||T),k=O===void 0&&D,A=f||D===void 0,j=H.useRef(!1),M=e.reloadDocument||k||A?!1:l??i.options.defaultPreload,N=u??i.options.defaultPreloadDelay??0,P=H.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?a.t??=setTimeout(()=>{a.t=void 0,K(i,w)},N):K(i,w):t===!1&&J(a)},[i,w,a,M,N]);H.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,K(i,w));let e=!0,t;return M===`viewport`&&a.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(a.current)),()=>{e=!1,t?.disconnect(),J(a)}},[i,w,M,P,a]);let F=pe(e,r);if(F.ref=t?o:a,k)return F.href=k,F;let re=t=>{let n=p??t.currentTarget.getAttribute(`target`);A||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),J(a),i.navigate({...e,_fromLocation:w._fromLocation}))},ie=()=>{M===`intent`&&K(i,w)},I=()=>{M===`intent`&&J(a)};return F.onClick=Y(m,re),F.onBlur=Y(h,I),F.onFocus=Y(g,P),F.onMouseEnter=Y(_,P),F.onMouseLeave=Y(v,I),F.onTouchStart=Y(ee,ie),me(F,e,O,D,A,r)}var de={},fe={className:`active`},q=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function pe(e,t){let n={};for(let r in e)q.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function me(e,n,r,i,a,o){let{activeProps:s,inactiveProps:c,className:l,style:u,target:d}=n,f=t(r?s:c,{})??(r?fe:de);Object.assign(e,f),e.href=i,o!==`a`&&(e.disabled=a),e.target=d;let p=f.style;(u||p)&&(e.style=u&&p?{...u,...p}:u||p);let m=f.className;return(l||m)&&(e.className=l?m?`${l} ${m}`:l:m),a&&(e.role=`link`,e[`aria-disabled`]=!0),r&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var J=e=>{clearTimeout(e.t),e.t=void 0},Y=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function he(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!a(i,t.protocolAllowlist))return i}var X=H.memo(H.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ue(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return H.createElement(n,r,i)}),ge);function ge(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!q.has(r)||!S(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}function _e(e){return new ve({id:e})}var ve=class extends ae{constructor({id:e}){super({id:e}),this.useMatch=e=>c({...e,from:this.id}),this.useRouteContext=e=>W({...e,from:this.id}),this.useSearch=e=>V({...e,from:this.id}),this.useParams=e=>B({...e,from:this.id}),this.useLoaderDeps=e=>z({...e,from:this.id,strict:!1}),this.useLoaderData=e=>R({...e,from:this.id,strict:!1}),this.useNavigate=()=>U({from:n().routesById[this.id].fullPath}),this.notFound=e=>m({routeId:this.id,...e}),this.Link=H.forwardRef((e,t)=>{let r=n().routesById[this.id].fullPath;return(0,G.jsx)(X,{ref:t,from:r,...e})})}},ye=class extends L{constructor(e){super(e),this.useMatch=e=>c({...e,from:this.id}),this.useRouteContext=e=>W({...e,from:this.id}),this.useSearch=e=>V({...e,from:this.id}),this.useParams=e=>B({...e,from:this.id}),this.useLoaderDeps=e=>z({...e,from:this.id}),this.useLoaderData=e=>R({...e,from:this.id}),this.useNavigate=()=>U({from:this.fullPath}),this.Link=H.forwardRef((e,t)=>(0,G.jsx)(X,{ref:t,from:this.fullPath,...e}))}};function be(e){return new ye(e)}var xe=class extends oe{constructor(e){super(e),this.useMatch=e=>c({...e,from:this.id}),this.useRouteContext=e=>W({...e,from:this.id}),this.useSearch=e=>V({...e,from:this.id}),this.useParams=e=>B({...e,from:this.id}),this.useLoaderDeps=e=>z({...e,from:this.id}),this.useLoaderData=e=>R({...e,from:this.id}),this.useNavigate=()=>U({from:this.fullPath}),this.Link=H.forwardRef((e,t)=>(0,G.jsx)(X,{ref:t,from:this.fullPath,...e}))}};function Se(e){return new xe(e)}function Z(e){return e=>{let t=be(e);return t.isRoot=!1,t}}function Ce(e,t){let n,i,a,o=()=>(n||=(a=void 0,e().then(e=>{n=void 0,s.preload=void 0,i=e[t??`default`]}).catch(e=>{n=void 0,a=e})),n),s=function(e){if(a){if(r(a)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw a}if(!i){if(h)h(o());else throw o()}return H.createElement(i,e)};return s.preload=o,s}function we(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Te(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=H.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,G.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,G.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,G.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,G.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,G.jsx)(Ee,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Ee({attrs:e,children:t,preventScriptHoist:r}){n();let i=ee(),a=H.useMemo(()=>t===void 0?void 0:{__html:t},[t]),o=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(H.useEffect(()=>{if(!o){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return we(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,we(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,o]),o&&typeof t==`string`)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:a});if(!i){if(e?.src)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,G.jsx)(`script`,{...e,dangerouslySetInnerHTML:a,suppressHydrationWarning:!0})}return null}function De(e,t,n,r){n=f(n);let a=n.map(e=>e.meta).filter(e=>e!==void 0),o=[],s={},c;for(let e=a.length-1;e>=0;e--){let n=a[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)c||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);o.push({tag:`script`,attrs:{type:`application/ld+json`},children:i(e)})}catch{}else{let e=r.name??r.property;if(e){if(s[e])continue;s[e]=!0}o.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}c&&o.push(c),t&&o.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),o.reverse();let l=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),u=e.ssr?.manifest,d=[];u&&(n.forEach(e=>{(u.routes[e.routeId]?.css)?.forEach(e=>{let n=re(e);d.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:j(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),u.inlineStyle&&d.push({tag:`style`,attrs:{...u.inlineStyle.attrs,nonce:t},children:u.inlineStyle.children,inlineCss:!0}));let p=[];u&&n.forEach(e=>{u.routes[e.routeId]?.preloads?.forEach(e=>{p.push({tag:`link`,attrs:{...N(u,e,r),nonce:t}})})});let m=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),h=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),g=[];return F(g,o),g.push(...p),F(g,l),g.push(...d),F(g,m),F(g,h),g}var Oe=e=>{let t=n(),r=t.options.ssr?.nonce,i=H.useCallback(n=>De(t,r,n,e),[e,r,t]);return y(t.stores.matches,i,{compare:S})};function ke(e){let t=Oe(e.assetCrossOrigin),r=n().options.ssr?.nonce;return(0,G.jsx)(G.Fragment,{children:t.map(e=>(0,H.createElement)(Te,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:r}))})}var Ae={suppressHydrationWarning:!0},je=()=>{let e=n(),t=e.options.ssr?.nonce,r=n=>{let r=ie(n,e.ssr?.manifest,t,Ae);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return Me(y(e.stores.matches,e=>I(r(e)),{compare:S}))};function Me(e){return(0,G.jsx)(G.Fragment,{children:e.map((e,t)=>(0,H.createElement)(Te,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Ne=Se({shellComponent:e=>(0,G.jsxs)(`div`,{className:`bg-background text-foreground pt-safe-top pr-safe-right pl-safe-left flex h-dvh w-dvw flex-col`,children:[(0,G.jsx)(ke,{}),(0,G.jsx)(je,{}),e.children]})}),Pe=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Fe=function(e){return`/`+e},Ie={},Le=function(e){return e.pathname.endsWith(`.css`)},Re=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Fe(t,n);let r=s(t),i=Le(r);return Re(Ie,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Pe,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ze=Z(`/(home)`)({component:Ce(()=>Q(()=>import(`./route-Cwy9vRbP.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),Be=()=>Q(()=>import(`./(home)-ByxxWWFS.js`),__vite__mapDeps([6,2,1,5,4,3])),Ve=O([`apps`,`machine`,`process`]),He=D({app:k(E),machine:k(E),pane:k(Ve),range:k(te.fields.minutes)}),Ue=Z(`/(home)/`)({component:Ce(Be,`component`),validateSearch:u(He)}),We=Z(`/(home)/monitor`)({beforeLoad:()=>{throw v({replace:!0,to:`/`})}}),$=ze.update({id:`/(home)`,getParentRoute:()=>Ne}),Ge=Ue.update({id:`/`,path:`/`,getParentRoute:()=>$}),Ke={homeMonitorRoute:We.update({id:`/monitor`,path:`/monitor`,getParentRoute:()=>$}),homeIndexRoute:Ge},qe={homeRouteRoute:$._addFileChildren(Ke)},Je=Ne._addFileChildren(qe)._addFileTypes(),Ye=s(Je);_(Ye);export{_e as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t}from"./react-COyt-gOi.js";import{Dt as n,Ot as r,f as i,nt as a,ot as o,p as s,st as c}from"./schema-C6EZGADp.js";import{d as l,t as u,u as d}from"./-expose-
|
|
1
|
+
import{a as e,n as t}from"./react-COyt-gOi.js";import{Dt as n,Ot as r,f as i,nt as a,ot as o,p as s,st as c}from"./schema-C6EZGADp.js";import{d as l,t as u,u as d}from"./-expose-C-Ms5e0i.js";function f(e){let t=n();return c(t.stores.location,o(e,t))}var p=t(),m=e();function h(e){let t=(0,p.c)(3);if(d(e.error)){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,m.jsx)(s,{href:l(location.href)}),t[0]=e):e=t[0],e}let n;return t[1]===e.error?n=t[2]:(n=(0,m.jsx)(i,{error:e.error,reset:g}),t[1]=e.error,t[2]=n),n}function g(){return location.reload()}function _(){let e=(0,p.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:v},e[0]=t):t=e[0];let n=f(t),i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,m.jsx)(u,{}),e[1]=i):i=e[1];let o;e[2]===n?o=e[3]:(o=()=>n,e[2]=n,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,m.jsx)(a,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,m.jsxs)(m.Fragment,{children:[i,(0,m.jsx)(r,{getResetKey:o,errorComponent:h,children:s})]}),e[5]=o,e[6]=c),c}function v(e){return e.href}export{_ as component};
|
package/dist/client/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
16
16
|
|
|
17
17
|
<title>deploy</title>
|
|
18
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-CbCUTK2X.js"></script>
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-WkwZ5CU-.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/effect-BfFgN0bu.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/react-COyt-gOi.js">
|
package/dist/server.js
CHANGED
|
@@ -39485,6 +39485,25 @@ function Redacted$1(value, options) {
|
|
|
39485
39485
|
});
|
|
39486
39486
|
return make$60(schema.ast, { value });
|
|
39487
39487
|
}
|
|
39488
|
+
/**
|
|
39489
|
+
* Decodes a value and wraps it in `Redacted<A>`. Unlike {@link Redacted} which
|
|
39490
|
+
* expects the input to already be a `Redacted` instance, this schema decodes
|
|
39491
|
+
* the raw value and wraps it.
|
|
39492
|
+
*
|
|
39493
|
+
* @see {@link Redacted} for schemas whose input is already a `Redacted` value.
|
|
39494
|
+
* @stability stable
|
|
39495
|
+
* @category schemas
|
|
39496
|
+
* @since 4.0.0
|
|
39497
|
+
*/
|
|
39498
|
+
function RedactedFromValue(value, options) {
|
|
39499
|
+
return decodeTo(Redacted$1(toType(value), {
|
|
39500
|
+
label: options?.label,
|
|
39501
|
+
disallowJsonEncode: options?.disallowEncode
|
|
39502
|
+
}), {
|
|
39503
|
+
decode: transform$3((t) => make$65(t, { label: options?.label })),
|
|
39504
|
+
encode: options?.disallowEncode ? forbidden((oe) => "Cannot encode Redacted" + (isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform$3(value$2)
|
|
39505
|
+
})(value);
|
|
39506
|
+
}
|
|
39488
39507
|
const immerable = /*#__PURE__*/ globalThis.Symbol.for("immer-draftable");
|
|
39489
39508
|
const payloadToken = {};
|
|
39490
39509
|
function makeClass(Inherited, identifier, struct$1, annotations, proto) {
|
|
@@ -53497,6 +53516,14 @@ const compressBody = /*#__PURE__*/ dual((args) => isHttpClientRequest(args[0]),
|
|
|
53497
53516
|
return map$5(compressBody$1(self.body, algorithm, options), (body) => body === self.body ? self : makeWith$1(self.method, self.url, self.urlParams, self.hash, set$3(updateContentLength(self.headers, body), "content-encoding", algorithm), body));
|
|
53498
53517
|
});
|
|
53499
53518
|
/**
|
|
53519
|
+
* Encodes a value as a JSON request body and sets it on the request, failing with `HttpBodyError` if encoding fails.
|
|
53520
|
+
*
|
|
53521
|
+
* @stability unstable
|
|
53522
|
+
* @category combinators
|
|
53523
|
+
* @since 4.0.0
|
|
53524
|
+
*/
|
|
53525
|
+
const bodyJson = /*#__PURE__*/ dual(2, (self, body) => map$5(json$1(body), (body) => setBody$1(self, body)));
|
|
53526
|
+
/**
|
|
53500
53527
|
* Sets a JSON request body using unsafe JSON encoding.
|
|
53501
53528
|
*
|
|
53502
53529
|
* **When to use**
|
|
@@ -54051,6 +54078,14 @@ const endSpanWithStatusError = (fiber, span, request, response) => {
|
|
|
54051
54078
|
span.end(fiber.getRef(TracerTimingEnabled) ? fiber.getRef(Clock).currentTimeNanosUnsafe() : BigInt(0), exit);
|
|
54052
54079
|
};
|
|
54053
54080
|
/**
|
|
54081
|
+
* Appends an effectful transformation of the request object before sending it.
|
|
54082
|
+
*
|
|
54083
|
+
* @stability unstable
|
|
54084
|
+
* @category mapping
|
|
54085
|
+
* @since 4.0.0
|
|
54086
|
+
*/
|
|
54087
|
+
const mapRequestEffect = /*#__PURE__*/ dual(2, (self, f) => makeWith(self.postprocess, (request) => flatMap$2(self.preprocess(request), f)));
|
|
54088
|
+
/**
|
|
54054
54089
|
* Retries common transient errors, such as rate limiting, timeouts or network issues.
|
|
54055
54090
|
*
|
|
54056
54091
|
* **When to use**
|
|
@@ -88922,6 +88957,71 @@ function failureOptions(error, status) {
|
|
|
88922
88957
|
}
|
|
88923
88958
|
var CurrentUser = class extends Service$1()("@deslop/runtime/auth/lib/utils/CurrentUser") {};
|
|
88924
88959
|
var RpcAuth = class extends Service()("@deslop/runtime/auth/lib/utils/RpcAuth", { error: AuthError }) {};
|
|
88960
|
+
Literals([
|
|
88961
|
+
"anthropic",
|
|
88962
|
+
"openrouter",
|
|
88963
|
+
"opencode-zen",
|
|
88964
|
+
"opencode-go"
|
|
88965
|
+
]);
|
|
88966
|
+
// ../../packages/runtime/src/ai/service.ts
|
|
88967
|
+
var AiUnavailable = class extends TaggedError()("AiUnavailable", { message: String$6 }) {};
|
|
88968
|
+
fromJsonString(Struct({ error: Struct({ message: String$6 }) }));
|
|
88969
|
+
var AiGateway = class AiGateway extends Service$1()("@deslop/runtime/ai/service/AiGateway") {
|
|
88970
|
+
static layer = effect(this, gen(function* () {
|
|
88971
|
+
const gateway = yield* option(String$5("GATEWAY_URL"));
|
|
88972
|
+
const local = yield* localAuth;
|
|
88973
|
+
const app = yield* String$5("APP_URL");
|
|
88974
|
+
const client = yield* HttpClient;
|
|
88975
|
+
const store = toSchemaStore(yield* KeyValueStore, Record$1(String$6, RedactedFromValue(String$6)));
|
|
88976
|
+
const grants = yield* make$44(getOrElse(yield* store.get("ai-gateway-grants"), () => ({})));
|
|
88977
|
+
const lock = yield* make$70(1);
|
|
88978
|
+
return AiGateway.of({
|
|
88979
|
+
apiUrl: (provider) => match$8(gateway, {
|
|
88980
|
+
onNone: () => fail$6(AiUnavailable.make({ message: "Start the app with --gateway" })),
|
|
88981
|
+
onSome: (url) => succeed$5(`${url}/ai/${provider}${match$1(provider === "openrouter", {
|
|
88982
|
+
onFalse: () => "",
|
|
88983
|
+
onTrue: () => "/v1"
|
|
88984
|
+
})}`)
|
|
88985
|
+
}),
|
|
88986
|
+
authorize: (userId) => (http) => pipe(mapRequestEffect(http, (request) => gen(function* () {
|
|
88987
|
+
if (local) return request;
|
|
88988
|
+
const token = (yield* get$1(grants))[userId];
|
|
88989
|
+
if (token === void 0) return yield* new HttpClientError({ reason: new TransportError({
|
|
88990
|
+
description: "AI access is unavailable; sign in again to enroll with Gateway",
|
|
88991
|
+
request
|
|
88992
|
+
}) });
|
|
88993
|
+
return setHeader$1(request, "authorization", `Bearer ${value$2(token)}`);
|
|
88994
|
+
})), tap((response) => pipe(gen(function* () {
|
|
88995
|
+
if (local || response.headers["x-gateway-grant-refused"] === void 0 || !exists(gateway, (url) => startsWith(`${url}/ai/`)(response.request.url))) return;
|
|
88996
|
+
const current = yield* get$1(grants);
|
|
88997
|
+
const token = current[userId];
|
|
88998
|
+
if (token === void 0 || response.request.headers["authorization"] !== `Bearer ${value$2(token)}`) return;
|
|
88999
|
+
const next = remove$4(current, userId);
|
|
89000
|
+
yield* pipe(store.set("ai-gateway-grants", next), ignore$1({
|
|
89001
|
+
log: "Warn",
|
|
89002
|
+
message: "The rejected AI grant could not be removed from storage"
|
|
89003
|
+
}));
|
|
89004
|
+
yield* set$1(grants, next);
|
|
89005
|
+
}), withPermit(lock)))),
|
|
89006
|
+
enroll: fnUntraced(function* (userId, headers) {
|
|
89007
|
+
return yield* pipe(gen(function* () {
|
|
89008
|
+
if (local || isNone(gateway) || (yield* get$1(grants))[userId] !== void 0) return;
|
|
89009
|
+
const response = yield* client.execute(yield* bodyJson(post(`${getOrElse(gateway, () => "")}/ai/grants`, { headers: match$1(headers["authorization"] !== void 0, {
|
|
89010
|
+
onFalse: () => ({ cookie: headers["cookie"] ?? "" }),
|
|
89011
|
+
onTrue: () => ({ authorization: headers["authorization"] })
|
|
89012
|
+
}) }), { app }));
|
|
89013
|
+
const result = yield* schemaBodyJson(Struct({ token: String$6 }))(response);
|
|
89014
|
+
const next = {
|
|
89015
|
+
...yield* get$1(grants),
|
|
89016
|
+
[userId]: make$65(result.token)
|
|
89017
|
+
};
|
|
89018
|
+
yield* store.set("ai-gateway-grants", next);
|
|
89019
|
+
yield* set$1(grants, next);
|
|
89020
|
+
}), withPermit(lock), timeout$1("10 seconds"), catch_$2(() => logWarning("AI Gateway enrollment failed")));
|
|
89021
|
+
})
|
|
89022
|
+
});
|
|
89023
|
+
}));
|
|
89024
|
+
};
|
|
88925
89025
|
// ../../packages/runtime/src/auth/service.ts
|
|
88926
89026
|
function rejected(message) {
|
|
88927
89027
|
return mapError$2((cause) => {
|
|
@@ -88940,12 +89040,18 @@ function rejected(message) {
|
|
|
88940
89040
|
function developer() {
|
|
88941
89041
|
return succeed$5(DEVELOPER);
|
|
88942
89042
|
}
|
|
89043
|
+
function enrolled(user, headers) {
|
|
89044
|
+
return gen(function* () {
|
|
89045
|
+
const gateway = getOrUndefined(yield* context(), AiGateway);
|
|
89046
|
+
if (gateway !== void 0) yield* gateway.enroll(user.id, headers);
|
|
89047
|
+
});
|
|
89048
|
+
}
|
|
88943
89049
|
const unavailable = text("The authorization service is temporarily unavailable; retry later", {
|
|
88944
89050
|
headers: { "retry-after": "5" },
|
|
88945
89051
|
status: 503
|
|
88946
89052
|
});
|
|
88947
89053
|
var Auth = class Auth extends Service$1()("@deslop/runtime/auth/service/Auth") {
|
|
88948
|
-
static makeContext = (auth) => pipe(make$80(Auth, auth), add$1(RpcAuth, RpcAuth.of((effect, request) => pipe(auth.user(request.headers), tap$1(() => {
|
|
89054
|
+
static makeContext = (auth) => pipe(make$80(Auth, auth), add$1(RpcAuth, RpcAuth.of((effect, request) => pipe(auth.user(request.headers), tap$1((user) => enrolled(user, request.headers)), tap$1(() => {
|
|
88949
89055
|
if (isStreamSchema(request.rpc.successSchema)) return annotateCurrentSpan("rpc.stream", true);
|
|
88950
89056
|
return void_$1;
|
|
88951
89057
|
}), flatMap$2((user) => raceFirst(provideService(effect, CurrentUser, user), pipe(delay(auth.user(request.headers), "5 minutes"), retry({ while: (error) => error.error === "temporarily_unavailable" }), forever)))))));
|
|
@@ -88980,6 +89086,7 @@ middleware()(gen(function* () {
|
|
|
88980
89086
|
if (user.failure.error === "temporarily_unavailable") return unavailable;
|
|
88981
89087
|
return text("Sign in first", { status: 401 });
|
|
88982
89088
|
}
|
|
89089
|
+
yield* enrolled(user.success, (yield* HttpServerRequest).headers);
|
|
88983
89090
|
return yield* provideService(app, CurrentUser, user.success);
|
|
88984
89091
|
});
|
|
88985
89092
|
}));
|
|
@@ -89002,6 +89109,7 @@ function layerMcpAuth(resource) {
|
|
|
89002
89109
|
status: 401
|
|
89003
89110
|
});
|
|
89004
89111
|
}
|
|
89112
|
+
yield* enrolled(user.success, headers);
|
|
89005
89113
|
return yield* provideService(app, CurrentUser, user.success);
|
|
89006
89114
|
});
|
|
89007
89115
|
})).layer;
|
|
@@ -89100,7 +89208,7 @@ function layerKeyValueStore(directory) {
|
|
|
89100
89208
|
});
|
|
89101
89209
|
})), provide$2(layerFileSystem(directory)));
|
|
89102
89210
|
}
|
|
89103
|
-
unwrap$7(map$5(dataDirectory, layerKeyValueStore));
|
|
89211
|
+
const layerDataStore = unwrap$7(map$5(dataDirectory, layerKeyValueStore));
|
|
89104
89212
|
const layerProtocol = mergeAll$1(layerSchemaBinary(), succeed$6(MaxBodySize)(mebibytes(10)), effect(TracerDisabledWhen, map$5(TracerDisabledWhen, (previous) => (request) => {
|
|
89105
89213
|
const path = headNonEmpty(split$1(request.url, "?"));
|
|
89106
89214
|
return previous(request) || path === "/api/rpc" && toLowerCase(request.headers["upgrade"] ?? "") === "websocket" || startsWith("/assets/")(path) || contains([
|
|
@@ -89392,6 +89500,11 @@ const SETTINGS = {
|
|
|
89392
89500
|
flag: "auth",
|
|
89393
89501
|
schema: SecureOrigin
|
|
89394
89502
|
},
|
|
89503
|
+
GATEWAY_URL: {
|
|
89504
|
+
description: "Deslop Gateway origin for AI calls",
|
|
89505
|
+
flag: "gateway",
|
|
89506
|
+
schema: Origin
|
|
89507
|
+
},
|
|
89395
89508
|
HOST: {
|
|
89396
89509
|
description: `Listen address; defaults to ${DEFAULT_HOST}`,
|
|
89397
89510
|
flag: "host",
|
|
@@ -89423,7 +89536,7 @@ function server(app) {
|
|
|
89423
89536
|
return pipe(serve(pipe(mergeAll$1(app.routes, layerRoutes, layerIcon(app.icon), layerWeb, layerAnnounce), provide$2(match$8(fromUndefinedOr(app.middleware), {
|
|
89424
89537
|
onNone: () => empty$10,
|
|
89425
89538
|
onSome: (middleware$1) => middleware()(middleware$1).layer
|
|
89426
|
-
})), provide$2(Auth.layer)), {
|
|
89539
|
+
})), provide$2(Auth.layer), provideMerge(pipe(AiGateway.layer, provide$2(layerDataStore)))), {
|
|
89427
89540
|
disableLogger: true,
|
|
89428
89541
|
middleware: guard
|
|
89429
89542
|
}), provide$2(mergeAll$1(layerProtocol, match$1(app.telemetry === false, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deslop/deploy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1256",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/MP281X/deslop.git",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=26"
|
|
40
40
|
},
|
|
41
|
-
"fingerprint": "
|
|
41
|
+
"fingerprint": "4a01512ba520b7b6dfed32c1c77b3f2e3d1e86e74e2003837a84212c8b444c37"
|
|
42
42
|
}
|