watch-tail 0.1.0
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/LICENSE +21 -0
- package/README.md +210 -0
- package/build/client/_app/immutable/assets/0.B1NsRRrX.css +2 -0
- package/build/client/_app/immutable/assets/0.B1NsRRrX.css.br +0 -0
- package/build/client/_app/immutable/assets/0.B1NsRRrX.css.gz +0 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DCKWcE8r.js +1 -0
- package/build/client/_app/immutable/chunks/DCKWcE8r.js.br +0 -0
- package/build/client/_app/immutable/chunks/DCKWcE8r.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DDRhiz1-.js +1 -0
- package/build/client/_app/immutable/chunks/DDRhiz1-.js.br +0 -0
- package/build/client/_app/immutable/chunks/DDRhiz1-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ZAD2y5xJ.js +3 -0
- package/build/client/_app/immutable/chunks/ZAD2y5xJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/ZAD2y5xJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DIoggGwf.js +2 -0
- package/build/client/_app/immutable/entry/app.DIoggGwf.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DIoggGwf.js.gz +0 -0
- package/build/client/_app/immutable/entry/start._YXgjuSB.js +1 -0
- package/build/client/_app/immutable/entry/start._YXgjuSB.js.br +0 -0
- package/build/client/_app/immutable/entry/start._YXgjuSB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.D5bYt7iX.js +1 -0
- package/build/client/_app/immutable/nodes/0.D5bYt7iX.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.D5bYt7iX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DBX83mYX.js +1 -0
- package/build/client/_app/immutable/nodes/1.DBX83mYX.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DBX83mYX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DiH-2moC.js +5 -0
- package/build/client/_app/immutable/nodes/2.DiH-2moC.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DiH-2moC.js.gz +0 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/robots.txt +3 -0
- package/build/client/robots.txt.br +0 -0
- package/build/client/robots.txt.gz +0 -0
- package/build/env.js +70 -0
- package/build/env.js.map +1 -0
- package/build/handler.js +24 -0
- package/build/handler.js.map +1 -0
- package/build/index.js +147 -0
- package/build/index.js.map +1 -0
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js.map +1 -0
- package/build/server/chunks/chunks/env2.js-D7xrfc37.js +316 -0
- package/build/server/chunks/chunks/env2.js-D7xrfc37.js.map +1 -0
- package/build/server/chunks/chunks/exports.js-CvFPPbaH.js +263 -0
- package/build/server/chunks/chunks/exports.js-CvFPPbaH.js.map +1 -0
- package/build/server/chunks/chunks/internal.js-DdmUz1r3.js +1191 -0
- package/build/server/chunks/chunks/internal.js-DdmUz1r3.js.map +1 -0
- package/build/server/chunks/chunks/internal2.js-DZ8ZzzjN.js +22 -0
- package/build/server/chunks/chunks/internal2.js-DZ8ZzzjN.js.map +1 -0
- package/build/server/chunks/chunks/regions.js-IQPMyP5C.js +52 -0
- package/build/server/chunks/chunks/regions.js-IQPMyP5C.js.map +1 -0
- package/build/server/chunks/chunks/server.js-ByNB8uti.js +3659 -0
- package/build/server/chunks/chunks/server.js-ByNB8uti.js.map +1 -0
- package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js +22 -0
- package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js.map +1 -0
- package/build/server/chunks/chunks/shared.js-CgjUIvRK.js +776 -0
- package/build/server/chunks/chunks/shared.js-CgjUIvRK.js.map +1 -0
- package/build/server/chunks/chunks/state.js-ClLTNPGs.js +86 -0
- package/build/server/chunks/chunks/state.js-ClLTNPGs.js.map +1 -0
- package/build/server/chunks/chunks/time-range.js-BLMT8aU3.js +102 -0
- package/build/server/chunks/chunks/time-range.js-BLMT8aU3.js.map +1 -0
- package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js +488 -0
- package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js.map +1 -0
- package/build/server/chunks/chunks/utils.js-BIlHjgGW.js +933 -0
- package/build/server/chunks/chunks/utils.js-BIlHjgGW.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-aiNZfkco.js +41 -0
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-aiNZfkco.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D143-vRl.js +120 -0
- package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D143-vRl.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-CDNL7msU.js +88 -0
- package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-CDNL7msU.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-D_i-xW6_.js +610 -0
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-D_i-xW6_.js.map +1 -0
- package/build/server/chunks/entries/fallbacks/error.svelte.js-qFLa8EVy.js +17 -0
- package/build/server/chunks/entries/fallbacks/error.svelte.js-qFLa8EVy.js.map +1 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-Bx7lXkAi.js +22 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-Bx7lXkAi.js.map +1 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-BsvaKqbk.js +1264 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-BsvaKqbk.js.map +1 -0
- package/build/server/chunks/handler-nVqa-QPz.js +1735 -0
- package/build/server/chunks/handler-nVqa-QPz.js.map +1 -0
- package/build/server/chunks/index.js-CtbhHm7L.js +3803 -0
- package/build/server/chunks/index.js-CtbhHm7L.js.map +1 -0
- package/build/server/chunks/manifest.js-BwUys8gK.js +70 -0
- package/build/server/chunks/manifest.js-BwUys8gK.js.map +1 -0
- package/build/server/chunks/nodes/0.js-Dl0J9d3p.js +9 -0
- package/build/server/chunks/nodes/0.js-Dl0J9d3p.js.map +1 -0
- package/build/server/chunks/nodes/1.js-dXZVW92o.js +9 -0
- package/build/server/chunks/nodes/1.js-dXZVW92o.js.map +1 -0
- package/build/server/chunks/nodes/2.js-aMMUenQc.js +9 -0
- package/build/server/chunks/nodes/2.js-aMMUenQc.js.map +1 -0
- package/build/shims.js +33 -0
- package/build/shims.js.map +1 -0
- package/dist/cli/bin.js +9 -0
- package/dist/cli/completions.js +99 -0
- package/dist/cli/index.js +183 -0
- package/dist/cli/options.js +171 -0
- package/dist/cli/server.js +126 -0
- package/dist/cli/ui.js +75 -0
- package/dist/lib/cli/aws.js +264 -0
- package/dist/lib/time-range.js +106 -0
- package/package.json +106 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as e,N as t,P as n,Q as r,R as i,S as a,V as o,_ as s,c,h as l,w as u}from"../chunks/ZAD2y5xJ.js";import"../chunks/xihTtKlq.js";var d=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e`,f=u(`<link rel="icon"/>`),p=u(`<div class="flex h-dvh min-h-[30rem] flex-col overflow-hidden bg-neutral-950 font-sans text-neutral-100 antialiased selection:bg-sky-900/60"><header class="flex-none border-b border-neutral-900 bg-neutral-950/90"><div class="flex w-full items-baseline gap-3 px-3 py-2 sm:px-4"><span class="text-sm font-semibold tracking-tight">watch<span class="text-sky-400">-stream</span></span> <span class="hidden text-xs text-neutral-500 sm:inline">Tail CloudWatch Logs in the browser</span></div></header> <main class="flex min-h-0 w-full flex-1 flex-col gap-3 px-3 py-3 sm:px-4"><!></main></div>`);function m(u,m){var h=p();l(`12qhfyh`,r=>{var i=f();n(()=>c(i,`href`,d)),t(()=>{e.title=`watch-stream`}),a(r,i)});var g=o(i(h),2),_=i(g);s(_,()=>m.children),r(g),r(h),a(u,h)}export{m as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,J as t,P as n,S as r,V as i,Y as a,w as o,x as s,z as c}from"../chunks/ZAD2y5xJ.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/DCKWcE8r.js";var u=o(`<h1> </h1> <p> </p>`,1);function d(o,d){a(d,!0);var f=u(),p=c(f),m=e(p,!0),h=i(p,2),g=e(h,!0);n(()=>{s(m,l.status),s(g,l.error?.message)}),r(o,f),t()}export{d as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{B as e,C as t,D as n,E as r,F as i,G as a,H as o,J as s,O as c,P as l,Q as u,R as d,S as f,T as p,U as m,V as h,W as g,Y as _,Z as v,a as y,b,c as x,d as S,f as C,i as w,k as T,l as E,m as D,n as O,o as k,p as A,s as j,u as M,v as N,w as P,x as F,y as I,z as ee}from"../chunks/ZAD2y5xJ.js";import{t as te}from"../chunks/DDRhiz1-.js";import"../chunks/xihTtKlq.js";import{t as L}from"../chunks/DCKWcE8r.js";var R=`--:--:--.---`;function z(e,t=2){return String(Math.trunc(Math.abs(e))).padStart(t,`0`)}function ne(e){if(typeof e!=`number`||!Number.isFinite(e))return R;let t=new Date(e);return Number.isNaN(t.getTime())?R:`${`${z(t.getUTCHours())}:${z(t.getUTCMinutes())}:${z(t.getUTCSeconds())}`}.${z(t.getUTCMilliseconds(),3)}`}function B(e){if(typeof e!=`number`||!Number.isFinite(e))return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toISOString()}function re(e){let t=e>=100?e.toFixed(0):e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function ie(e){if(typeof e!=`number`||!Number.isFinite(e)||e<0)return`—`;if(e<1024)return`${Math.trunc(e)} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=t[0];for(let e=1;e<t.length&&n>=1024;e+=1)n/=1024,r=t[e];return`${re(n)} ${r}`}function V(e){if(typeof e!=`number`||!Number.isFinite(e))return`0`;let t=Math.trunc(e);return(t<0?`-`:``)+String(Math.abs(t)).replace(/\B(?=(\d{3})+(?!\d))/g,`,`)}function ae(e){let t=typeof e==`string`?e.trim():``;if(t===``)return null;let n=t.toLowerCase();return n.includes(`floci`)?`floci`:n.includes(`localstack`)?`localstack`:H(t)===`4566`?`floci`:`local emulator`}function H(e){return U(e)?.port||null}function U(e){try{return new URL(e)}catch{return null}}function oe(e){let t=typeof e==`string`?e.trim():``;if(t===``)return null;let n=ae(t);return n===null?null:(U(t)?.hostname.toLowerCase()??t.toLowerCase()).startsWith(n)?t:`${n} ${t}`}var se=P(`<span data-testid="credentials-hint" class="text-[0.6875rem] text-neutral-500">dev creds</span>`),ce=P(`<span class="inline-flex items-center gap-1.5"><span data-testid="endpoint-badge" class="rounded-full border border-violet-900 bg-violet-950/60 px-2.5 py-1 text-xs font-medium text-violet-300"> </span> <!></span>`);function le(n,r){_(r,!0);let i=w(r,`endpoint`,3,null),o=w(r,`credentials`,3,null),c=a(()=>oe(i())),p=a(()=>o()===`emulator-default`),m=a(()=>T(p)?`Local emulator endpoint - using floci's throwaway credentials (no ambient AWS credentials found)`:`Local emulator endpoint`);var g=t(),v=ee(g),y=t=>{var n=ce(),r=d(n),i=e(r,!0),a=h(r,2),o=e=>{var t=se();f(e,t)};b(a,e=>{T(p)&&e(o)}),u(n),l(()=>{x(n,`title`,T(m)),x(r,`title`,T(m)),F(i,T(c))}),f(t,n)};b(v,e=>{T(c)!==null&&e(y)}),f(n,g),s()}var W={sidebarWidth:`watch-stream:sidebar-width`,prefixWidth:`watch-stream:prefix-width`,wrap:`watch-stream:wrap`,jsonView:`watch-stream:json-view`},G={defaultRem:22,minRem:16,maxVw:44},ue={defaultRem:14,minRem:4,maxRem:40};function K(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return Number.isNaN(e)?r:Math.min(Math.max(e,r),i)}function de(e,t,n,r){if(typeof e!=`string`||e.trim()===``)return K(t,n,r);let i=Number(e);return K(Number.isFinite(i)?i:t,n,r)}function fe(e){let{startWidth:t,startX:n,currentX:r,min:i,max:a}=e;return K(t+(r-n),i,a)}function q(e){let{width:t,key:n,step:r=16,min:i,max:a}=e;return K(n!==`ArrowLeft`&&n!==`ArrowRight`?t:t+(n===`ArrowLeft`?-r:r),i,a)}function pe(e,t=16){let n=e/t;return`${Number.isInteger(n)?n:Number(n.toFixed(3))}rem`}function J(e,t=16){return e*t}var Y=P(`<div role="separator" aria-orientation="vertical" tabindex="0"></div>`);function me(e,t){_(t,!0);let r=w(t,`class`,3,``),i=w(t,`style`,3,``),a=null;function o(e){a={x:e.clientX,width:t.width},e.currentTarget.setPointerCapture?.(e.pointerId),e.preventDefault()}function u(e){a!==null&&(t.onChange(fe({startWidth:a.width,startX:a.x,currentX:e.clientX,min:t.min,max:t.max})),e.preventDefault())}function d(e){a!==null&&(a=null,e.currentTarget.releasePointerCapture?.(e.pointerId),t.onCommit?.(t.width))}function p(e){let n=q({width:t.width,key:e.key,min:t.min,max:t.max});n!==t.width&&(e.preventDefault(),t.onChange(n),t.onCommit?.(n))}var m=Y();l(e=>{x(m,`aria-label`,t.label),x(m,`aria-valuemin`,t.min),x(m,`aria-valuemax`,t.max),x(m,`aria-valuenow`,e),x(m,`title`,`${t.label??``} (drag or use the arrow keys)`),x(m,`data-testid`,t.testId),A(m,1,`cursor-col-resize touch-none bg-transparent hover:bg-sky-500/30 focus:bg-sky-500/50 focus:outline-none ${r()??``}`),C(m,i())},[()=>Math.round(t.width)]),n(`pointerdown`,m,o),n(`pointermove`,m,u),n(`pointerup`,m,d),c(`pointercancel`,m,d),n(`keydown`,m,p),f(e,m),s()}r([`pointerdown`,`pointermove`,`pointerup`,`keydown`]);var X=[`15m`,`1h`,`3h`,`12h`,`24h`,`5d`],he={"15m":`15 min`,"1h":`1 hour`,"3h":`3 hours`,"12h":`12 hours`,"24h":`24 hours`,"5d":`5 days`};function ge(e){return X.includes(e)}function Z(e){return ge(e)?he[e]:e}function Q(e){return String(e).padStart(2,`0`)}function _e(e){let t=new Date(e);return`${t.getFullYear()}-${Q(t.getMonth()+1)}-${Q(t.getDate())}T${Q(t.getHours())}:${Q(t.getMinutes())}`}function ve(e){if(typeof e!=`string`||e.trim()===``)return null;let t=Date.parse(e);return Number.isNaN(t)?null:t}function $(e,t){let n=new Date(e),r=`${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}`;return new Date(t).toDateString()===n.toDateString()?r:`${n.toLocaleDateString(void 0,{day:`numeric`,month:`short`})} ${r}`}function ye(e,t){if(e===null||e.startTime===void 0)return{mode:`live`,label:`live`,title:`Tailing new events`,clamped:!1};let n=e.clamped===!0;if(e.mode!==`historic`||e.endTime===null||e.endTime===void 0)return{mode:`live`,label:`live`,title:`Live since ${$(e.startTime,t)}`,clamped:n};let r=$(e.startTime,t),i=$(e.endTime,t),a=e.preset===null||e.preset===void 0?null:Z(e.preset);return{mode:`historic`,label:a===null?`${r} → ${i}`:`${a} · ${r} → ${i}`,title:n?`Historic window, clamped to the last 14 days that CloudWatch Logs keeps`:`Historic window`,clamped:n}}var be=P(`<button type="button"> </button>`),xe=P(`<div class="flex flex-wrap items-center gap-1" role="group" aria-label="Historic range"><!> <button type="button" data-testid="preset-custom"> </button></div>`),Se=P(`<span class="text-xs text-amber-300" data-testid="range-loading">loading window…</span>`),Ce=P(`<span class="text-xs text-neutral-500"> </span>`),we=P(`<span class="text-xs text-red-300" role="alert" data-testid="custom-error"> </span>`),Te=P(`<div class="flex flex-wrap items-center gap-2 rounded-lg border border-neutral-800 bg-neutral-900/70 p-2" data-testid="custom-window"><label class="flex items-center gap-1 text-xs text-neutral-400">From <input type="datetime-local" data-testid="custom-from" class="rounded-md border border-neutral-800 bg-neutral-950 px-2 py-1 text-xs text-neutral-100"/></label> <label class="flex items-center gap-1 text-xs text-neutral-400">To <input type="datetime-local" data-testid="custom-to" class="rounded-md border border-neutral-800 bg-neutral-950 px-2 py-1 text-xs text-neutral-100"/></label> <button type="button" data-testid="custom-apply" class="rounded-md border border-sky-800 bg-sky-950/60 px-2 py-1 text-xs font-medium text-sky-200 hover:border-sky-600">Apply</button> <!></div>`),Ee=P(`<div class="flex flex-wrap items-center gap-2" data-testid="range-controls"><div class="flex items-center gap-1 rounded-lg border border-neutral-800 bg-neutral-900 p-0.5" role="group" aria-label="Tail mode"><button type="button" data-testid="mode-live">Live</button> <button type="button" data-testid="mode-historic">Historic</button></div> <!> <!> <!></div>`);function De(t,r){_(r,!0);let o=w(r,`mode`,3,`live`),c=w(r,`range`,3,`15m`),p=w(r,`from`,3,null),v=w(r,`to`,3,null),y=w(r,`disabled`,3,!1),S=w(r,`loading`,3,!1),C=g(!1),E=g(``),D=g(``),O=g(null);i(()=>{let e=p()??(v()??Date.now())-36e5,t=v()??Date.now();m(E,_e(e),!0),m(D,_e(t),!0),m(C,o()===`historic`&&c()===``&&p()!==null&&v()!==null,!0)});function M(e){e!==o()&&r.onApply?.({mode:e,range:e===`live`?``:c()===``?`15m`:c(),from:null,to:null})}function P(e){m(O,null),r.onApply?.({mode:`historic`,range:e,from:null,to:null})}function I(){m(O,null),m(C,!0)}function ee(){let e=ve(T(E)),t=ve(T(D));if(e===null||t===null){m(O,`Pick both a start and an end time.`);return}if(t<=e){m(O,`The end must be after the start.`);return}if(t-e>12096e5){m(O,`CloudWatch Logs only keeps 14 days.`);return}m(O,null),r.onApply?.({mode:`historic`,range:``,from:e,to:t})}let te=a(()=>o()===`historic`&&c()===``&&p()!==null&&v()!==null?`${_e(p()).replace(`T`,` `)} → ${_e(v()).replace(`T`,` `)}`:`Custom…`);var L=Ee(),R=d(L),z=d(R),ne=h(z,2);u(R);var B=h(R,2),re=t=>{var r=xe(),i=d(r);N(i,16,()=>X,e=>e,(t,r)=>{var i=be(),a=e(i,!0);l(()=>{x(i,`aria-pressed`,c()===r),x(i,`data-testid`,`preset-${r??``}`),i.disabled=y(),A(i,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${c()===r?`border-amber-700 bg-amber-950/50 text-amber-200`:`border-neutral-800 bg-neutral-900 text-neutral-300 hover:border-neutral-700`} disabled:opacity-40`),F(a,he[r])}),n(`click`,i,()=>P(r)),f(t,i)});var a=h(i,2),o=e(a,!0);u(r),l(()=>{x(a,`aria-pressed`,c()===``),a.disabled=y(),A(a,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${c()===``?`border-amber-700 bg-amber-950/50 text-amber-200`:`border-neutral-800 bg-neutral-900 text-neutral-300 hover:border-neutral-700`}`),F(o,T(te))}),n(`click`,a,I),f(t,r)};b(B,e=>{o()===`historic`&&e(re)});var ie=h(B,2),V=e=>{var t=Se();f(e,t)},ae=t=>{var n=Ce(),r=e(n);l(e=>F(r,`last ${e??``}`),[()=>Z(c())]),f(t,n)};b(ie,e=>{S()?e(V):o()===`historic`&&c()!==``&&e(ae,1)});var H=h(ie,2),U=t=>{var r=Te(),i=d(r),a=h(d(i));j(a),u(i);var o=h(i,2),s=h(d(o));j(s),u(o);var c=h(o,2),p=h(c,2),g=t=>{var n=we(),r=e(n,!0);l(()=>F(r,T(O))),f(t,n)};b(p,e=>{T(O)!==null&&e(g)}),u(r),k(a,()=>T(E),e=>m(E,e)),k(s,()=>T(D),e=>m(D,e)),n(`click`,c,ee),f(t,r)};b(H,e=>{T(C)&&o()===`historic`&&e(U)}),u(L),l(()=>{x(z,`aria-pressed`,o()===`live`),A(z,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${o()===`live`?`border-sky-700 bg-sky-950/60 text-sky-300`:`border-transparent text-neutral-400 hover:text-neutral-200`}`),x(ne,`aria-pressed`,o()===`historic`),A(ne,1,`rounded-md border px-2 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${o()===`historic`?`border-amber-700 bg-amber-950/50 text-amber-300`:`border-transparent text-neutral-400 hover:text-neutral-200`}`)}),n(`click`,z,()=>M(`live`)),n(`click`,ne,()=>M(`historic`)),f(t,L),s()}r([`click`]);var Oe=`us-east-1.us-east-2.us-west-1.us-west-2.ca-central-1.ca-west-1.mx-central-1.sa-east-1.eu-west-1.eu-west-2.eu-west-3.eu-central-1.eu-central-2.eu-north-1.eu-south-1.eu-south-2.af-south-1.me-south-1.me-central-1.il-central-1.ap-east-1.ap-south-1.ap-south-2.ap-southeast-1.ap-southeast-2.ap-southeast-3.ap-southeast-4.ap-southeast-5.ap-southeast-6.ap-southeast-7.ap-northeast-1.ap-northeast-2.ap-northeast-3`.split(`.`),ke=class extends Error{status;code;details;constructor(e,t={}){super(e,{cause:t.cause}),this.name=`ApiError`,this.status=t.status??0,this.code=t.code,this.details=t.details}};function Ae(e,t){if(typeof e!=`object`||!e)return;let n=e[t];return typeof n==`string`?n:void 0}function je(e,t=`Unexpected API error`){return Ae(e,`error`)??t}function Me(e){let t=new URLSearchParams;e.region&&t.set(`region`,e.region),e.prefix&&t.set(`prefix`,e.prefix),typeof e.limit==`number`&&Number.isFinite(e.limit)&&t.set(`limit`,String(e.limit));let n=t.toString();return n===``?`/api/log-groups`:`/api/log-groups?${n}`}function Ne(e){return e instanceof Error&&e.name===`AbortError`}async function Pe(e,t){let n=t.fetchImpl??fetch,r;try{r=await n(e,{headers:{accept:`application/json`},signal:t.signal})}catch(t){throw Ne(t)?t:new ke(`Could not reach ${e}.`,{cause:t})}let i=await r.text(),a=null;if(i.trim()!==``)try{a=JSON.parse(i)}catch{a=null}if(!r.ok)throw new ke(je(a,`Request to ${e} failed with ${r.status}.`),{status:r.status,code:Ae(a,`code`),details:Ae(a,`details`)});return a}function Fe(e={}){return Pe(`/api/regions`,e)}function Ie(e={}){return Pe(`/api/health`,e)}function Le(e){return Pe(Me(e),e)}function Re(e){return`No log groups found in ${e}. Start floci and run \`pnpm seed\` to create sample groups.`}function ze(e){return e.trim().replace(/\.+$/,``)}function Be(e,t){if(t instanceof ke){let n=t.details?` ${t.details}`:``;return`Could not list log groups in ${e}: ${ze(t.message)}.${n}`}return`Could not reach the watch-stream API for ${e}. ${t instanceof Error&&t.message!==``?t.message:String(t)}`}function Ve(e,t,n){return`${n} (${t===null||t===``?e:`${t} in ${e}`})`}var He=P(`<p role="alert" data-testid="group-error" class="rounded-md border border-red-900 bg-red-950/50 px-3 py-2 text-xs leading-5 text-red-300"> </p>`),Ue=P(`<div class="h-5 animate-pulse rounded bg-neutral-800/80"></div>`),We=P(`<div class="flex flex-col gap-2" data-testid="group-loading" aria-busy="true"><!> <p class="text-xs text-neutral-500">Loading log groups…</p></div>`),Ge=P(`<p data-testid="group-empty" class="rounded-md border border-neutral-800 bg-neutral-900/60 px-3 py-2 text-xs leading-5 text-neutral-400"> </p>`),Ke=P(`<p data-testid="group-no-match" class="px-1 py-2 text-xs text-neutral-500"> </p>`),qe=P(`<span class="shrink-0 text-[0.6875rem] text-neutral-500"> </span>`),Je=P(`<li><button type="button" data-testid="group-row"><span class="truncate font-mono"> </span> <!></button></li>`),Ye=P(`<p class="text-[0.6875rem] text-neutral-500" data-testid="group-truncated"> </p>`),Xe=P(`<ul class="flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto pr-1"></ul> <!>`,1),Ze=P(`<section class="flex min-h-0 flex-1 flex-col gap-3"><div class="flex items-center justify-between gap-2"><div class="flex items-baseline gap-2"><h2 class="text-sm font-semibold text-neutral-200">Log groups</h2> <span class="text-xs text-neutral-500" data-testid="group-count"> </span></div> <button type="button" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100 disabled:cursor-not-allowed disabled:opacity-50"> </button></div> <div class="flex flex-col gap-1.5"><label class="sr-only" for="group-search">Search log groups</label> <input id="group-search" type="search" placeholder="Search log groups" class="w-full rounded-md border border-neutral-800 bg-neutral-900 px-2.5 py-1.5 text-sm text-neutral-100 outline-none transition-colors placeholder:text-neutral-600 hover:border-neutral-700 focus:border-sky-600"/></div> <!></section>`);function Qe(t,r){_(r,!0);let i=w(r,`groups`,19,()=>[]),o=w(r,`region`,3,``),c=w(r,`selected`,3,null),p=w(r,`loading`,3,!1),y=w(r,`error`,3,null),S=w(r,`maxRows`,3,500),C=g(``),D=a(()=>i().filter(e=>e.name.toLowerCase().includes(T(C).trim().toLowerCase()))),O=a(()=>T(D).slice(0,S())),k=a(()=>T(D).length>T(O).length),M=a(()=>T(C).trim());function P(e){return e===c()?`border-sky-800 bg-sky-950/50 text-sky-200`:`border-transparent bg-neutral-900/60 text-neutral-300 hover:border-neutral-800 hover:text-neutral-100`}var te=Ze(),L=d(te),R=d(L),z=h(d(R),2),ne=e(z);u(R);var B=h(R,2),re=e(B,!0);u(L);var ae=h(L,2),H=h(d(ae),2);j(H),u(ae);var U=h(ae,2),oe=t=>{var n=He(),r=e(n,!0);l(()=>F(r,y())),f(t,n)},se=e=>{var t=We(),n=d(t);N(n,16,()=>Array.from({length:5}),I,(e,t)=>{var n=Ue();f(e,n)}),v(2),u(t),f(e,t)},ce=t=>{var n=Ge(),r=e(n,!0);l(e=>F(r,e),[()=>Re(o())]),f(t,n)},le=t=>{var n=Ke(),r=e(n);l(()=>F(r,`No log groups match “${T(M)??``}”.`)),f(t,n)},W=t=>{var i=Xe(),a=ee(i);N(a,21,()=>T(O),e=>e.arn??e.name,(t,i)=>{var a=Je(),o=d(a),s=d(o),p=e(s,!0),m=h(s,2),g=t=>{var n=qe(),r=e(n,!0);l(e=>F(r,e),[()=>ie(T(i).storedBytes)]),f(t,n)};b(m,e=>{T(i).storedBytes!==void 0&&e(g)}),u(o),u(a),l(e=>{x(o,`aria-current`,T(i).name===c()?`true`:void 0),A(o,1,`flex w-full items-center justify-between gap-2 rounded-md border px-2.5 py-1.5 text-left text-xs transition-colors ${e??``}`),F(p,T(i).name)},[()=>P(T(i).name)]),n(`click`,o,()=>r.onSelect?.(T(i).name)),f(t,a)}),u(a);var o=h(a,2),s=t=>{var n=Ye(),r=e(n);l((e,t)=>F(r,`Showing first ${e??``} of ${t??``} groups.`),[()=>V(S()),()=>V(T(D).length)]),f(t,n)};b(o,e=>{T(k)&&e(s)}),f(t,i)};b(U,e=>{y()!==null&&y()!==``?e(oe):p()&&i().length===0?e(se,1):i().length===0?e(ce,2):T(O).length===0?e(le,3):e(W,-1)}),u(te),l((e,t)=>{F(ne,`${e??``} of ${t??``}`),B.disabled=p(),F(re,p()?`Refreshing…`:`Refresh`),E(H,T(C))},[()=>V(T(D).length),()=>V(i().length)]),n(`click`,B,()=>r.onRefresh?.()),n(`input`,H,e=>m(C,e.currentTarget.value,!0)),f(t,te),s()}r([`click`,`input`]);var $e=P(`<span data-testid="status-badge"><span aria-hidden="true"></span> </span>`);function et(e,t){let n={idle:`idle`,connecting:`connecting`,live:`live`,reconnecting:`reconnecting`,error:`error`,ended:`ended`},r={idle:`border-neutral-700 bg-neutral-800/60 text-neutral-400`,connecting:`border-sky-900 bg-sky-950/70 text-sky-300`,live:`border-emerald-900 bg-emerald-950/70 text-emerald-300`,reconnecting:`border-amber-900 bg-amber-950/70 text-amber-300`,error:`border-red-900 bg-red-950/70 text-red-300`,ended:`border-neutral-700 bg-neutral-800/60 text-neutral-400`},i={idle:`bg-neutral-500`,connecting:`bg-sky-400 animate-pulse`,live:`bg-emerald-400`,reconnecting:`bg-amber-400 animate-pulse`,error:`bg-red-400`,ended:`bg-neutral-500`},o=a(()=>r[t.status]),s=a(()=>i[t.status]),c=a(()=>n[t.status]);var p=$e(),m=d(p),g=h(m);u(p),l(()=>{x(p,`data-status`,t.status),A(p,1,`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium ${T(o)??``}`),A(m,1,`size-1.5 rounded-full ${T(s)??``}`),F(g,` ${T(c)??``}`)}),f(e,p)}var tt=5e3,nt=/\b(ERROR|FATAL|CRITICAL|CRIT|PANIC|EXCEPTION|TRACEBACK|SEVERE|FAILED|FAILURE)\b/,rt=/\b(WARN|WARNING)\b/,it=/\b(DEBUG|TRACE|VERBOSE)\b/;function at(e){let t=(e??``).toUpperCase();return nt.test(t)?`error`:rt.test(t)?`warn`:it.test(t)?`debug`:`info`}function ot(e){switch(e){case`error`:return`text-red-400`;case`warn`:return`text-amber-300`;case`debug`:return`text-neutral-500`;default:return`text-neutral-200`}}function st(e,t){return`${e.id??`no-id`}:${e.timestamp}:${t}`}function ct(e,t){let n=(t??``).trim().toLowerCase();return n===``||`${e.message??``} ${e.streamName??``}`.toLowerCase().includes(n)}function lt(e,t){return(t??``).trim()===``?e.slice():e.filter(e=>ct(e,t))}function ut(e){return Array.from({length:e})}var dt=class{capacity;#e;#t=0;#n=0;#r=0;constructor(e=tt){if(!Number.isInteger(e)||e<=0)throw RangeError(`capacity must be a positive integer, received ${e}`);this.capacity=e,this.#e=ut(e)}get size(){return this.#n}get dropped(){return this.#r}get full(){return this.#n===this.capacity}push(e){this.#n===this.capacity&&(this.#r+=1,this.#t=(this.#t+1)%this.capacity,--this.#n);let t=(this.#t+this.#n)%this.capacity;this.#e[t]=e,this.#n+=1}pushMany(e){for(let t of e)this.push(t)}toArray(){let e=ut(this.#n);for(let t=0;t<this.#n;t+=1)e[t]=this.#e[(this.#t+t)%this.capacity];return e}first(){return this.#n===0?void 0:this.#e[this.#t]}last(){return this.#n===0?void 0:this.#e[(this.#t+this.#n-1)%this.capacity]}clear(){this.#e=ut(this.capacity),this.#t=0,this.#n=0,this.#r=0}},ft=class{buffer;#e;#t=!1;constructor(e=tt){this.buffer=new dt(e),this.#e=new dt(e)}get paused(){return this.#t}get size(){return this.buffer.size}get pendingCount(){return this.#e.size}get droppedCount(){return this.buffer.dropped}push(e){if(this.#t){this.#e.pushMany(e);return}this.buffer.pushMany(e)}setPaused(e){return e===this.#t?[]:(this.#t=e,e?[]:this.flush())}pause(){this.#t=!0}resume(){return this.#t=!1,this.flush()}flush(){let e=this.#e.toArray();return this.#e.clear(),this.buffer.pushMany(e),e}toArray(){return this.buffer.toArray()}clear(){this.buffer.clear(),this.#e.clear()}};function pt(e){if(typeof e!=`string`)return null;let t=e.trim();if(t.length===0)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e!=`object`||!e?null:e}catch{return null}}function mt(e,t={}){let{prettyJson:n=!0}=t,r=pt(e);return r===null||!n?{text:e,isJson:r!==null,value:r}:{text:JSON.stringify(r,null,2),isJson:!0,value:r}}var ht=/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function gt(e){let t=[],n=0,r=(e,n)=>{n.length>0&&t.push({type:e,text:n})};for(;n<e.length;){let t=e[n];if(t===` `||t===`
|
|
2
|
+
`||t===` `||t===`\r`){let t=n;for(;t<e.length&&`
|
|
3
|
+
\r`.includes(e[t]);)t+=1;r(`whitespace`,e.slice(n,t)),n=t;continue}if(t===`"`){let t=n+1;for(;t<e.length;){if(e[t]===`\\`){t+=2;continue}if(e[t]===`"`)break;t+=1}let i=e.slice(n,Math.min(t+1,e.length)),a=n+i.length;for(;a<e.length&&`
|
|
4
|
+
\r`.includes(e[a]);)a+=1;r(e[a]===`:`?`key`:`string`,i),n+=i.length;continue}if(t===`{`||t===`}`||t===`[`||t===`]`||t===`,`||t===`:`){r(`punctuation`,t),n+=1;continue}if(e.startsWith(`true`,n)||e.startsWith(`false`,n)){let t=e.startsWith(`true`,n)?`true`:`false`;r(`boolean`,t),n+=t.length;continue}if(e.startsWith(`null`,n)){r(`null`,`null`),n+=4;continue}let i=n;for(;i<e.length&&!`{}[],:"
|
|
5
|
+
\r`.includes(e[i]);)i+=1;let a=e.slice(n,Math.max(i,n+1));r(ht.test(a)?`number`:`other`,a),n+=a.length}return t}var _t=P(`<span class="text-xs text-amber-300" data-testid="pending-count"> </span>`),vt=P(`<span class="text-xs text-amber-300/80" data-testid="dropped-count"> </span>`),yt=P(`<span class="text-[0.6875rem] text-amber-400/80" data-testid="window-clamped">14-day limit</span>`),bt=P(`<span class="text-[0.6875rem] text-emerald-400/80" data-testid="window-complete">window complete</span>`),xt=P(`<p role="alert" data-testid="stream-error" class="border-b border-red-900 bg-red-950/50 px-3 py-2 text-xs leading-5 text-red-300"> </p>`),St=P(`<p class="px-3 py-6 text-sm text-neutral-500" data-testid="viewer-idle">Select a log group to start tailing.</p>`),Ct=P(`<p class="px-3 py-6 text-sm text-neutral-500" data-testid="viewer-empty"> </p>`),wt=P(`<span> </span>`),Tt=P(`<li data-testid="log-line"><span class="w-[7.5rem] shrink-0 text-neutral-500"> </span> <span class="shrink-0 truncate text-sky-400/80" data-testid="log-stream"> </span> <span data-testid="log-message"><!></span></li>`),Et=P(`<div data-testid="log-canvas"><ol class="font-mono text-xs leading-5" data-testid="log-lines"></ol> <!></div>`),Dt=P(`<section class="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-lg border border-neutral-800 bg-neutral-950"><div class="flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-neutral-800 bg-neutral-900/40 px-3 py-2"><!> <span class="text-xs text-neutral-400" data-testid="visible-count"> </span> <span class="text-xs text-neutral-500" data-testid="received-count"> </span> <!> <!> <span data-testid="window-chip"> </span> <!> <!> <div class="ml-auto flex flex-wrap items-center gap-2"><input type="search" aria-label="Filter log lines" placeholder="Filter lines" class="w-40 rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs text-neutral-100 outline-none transition-colors placeholder:text-neutral-600 hover:border-neutral-700 focus:border-sky-600"/> <button type="button" title="Wrap long lines instead of scrolling sideways" data-testid="wrap-toggle">Wrap</button> <button type="button" title="Pretty-print JSON log entries" data-testid="json-toggle">JSON</button> <button type="button" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100"> </button> <button type="button" class="rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:text-neutral-100">Clear</button> <button type="button">Auto-scroll</button></div></div> <!> <div class="min-h-0 min-w-0 flex-1 overflow-auto bg-neutral-950" data-testid="log-scroller"><!></div></section>`);function Ot(r,c){_(c,!0);let v=w(c,`lines`,19,()=>[]),S=w(c,`status`,3,`idle`),k=w(c,`error`,3,null),M=w(c,`region`,3,``),P=w(c,`group`,3,null),I=w(c,`filter`,3,``),te=w(c,`paused`,3,!1),L=w(c,`autoScroll`,3,!0),R=w(c,`pendingCount`,3,0),z=w(c,`droppedCount`,3,0),re=w(c,`receivedCount`,3,0),ie=w(c,`mode`,3,`live`),ae=w(c,`ready`,3,null),H=w(c,`endReason`,3,null),U=J(7.5),oe=J(.75),se=J(.5),ce=J(ue.minRem),le=J(ue.maxRem),G=J(ue.defaultRem);function K(e){try{return typeof localStorage>`u`?null:localStorage.getItem(e)}catch{return null}}function fe(e,t){try{if(typeof localStorage>`u`)return;localStorage.setItem(e,t)}catch{}}let q=g(!1),Y=g(!0),X=g(o(G));O(()=>{m(q,K(W.wrap)===`true`),m(Y,K(W.jsonView)!==`false`),m(X,de(K(W.prefixWidth),G,ce,le),!0)});let he=a(()=>lt(v(),I())),ge=a(()=>T(he).map((e,t)=>{let n=at(e.message),r=mt(e.message,{prettyJson:T(Y)});return{key:st(e,t),time:ne(e.timestamp),timestamp:B(e.timestamp),streamName:e.streamName,message:r.text,tokens:T(Y)&&r.isJson?gt(r.text):null,level:n,levelClass:ot(n)}})),Z=g(null);i(()=>{let e=T(ge).length;L()&&T(Z)!==null&&e!==0&&(T(Z).scrollTop=T(Z).scrollHeight)});let Q=a(()=>k()===null?null:Ve(M(),P(),k().message)),_e=a(()=>P()===null||P()===``?`Select a log group to start tailing.`:I().trim()===``?`Waiting for events from ${P()}\u2026`:`No lines match the filter.`),ve=a(()=>L()?`text-sky-300`:`text-neutral-400`),$=a(()=>ye(ae(),Date.now())),be=a(()=>ie()===`historic`&&H()===`window-complete`),xe=a(()=>T(q)?`text-sky-300`:`text-neutral-400`),Se=a(()=>T(Y)?`text-sky-300`:`text-neutral-400`),Ce=a(()=>T(q)?`w-full`:`w-max min-w-full`),we=a(()=>T(q)?`whitespace-pre-wrap break-words`:`whitespace-pre`),Te=a(()=>oe+U+se+T(X)),Ee=a(()=>`max-width: ${pe(T(X))}`);function De(e){switch(e){case`key`:return`text-sky-300`;case`string`:return`text-emerald-300`;case`number`:return`text-amber-300`;case`boolean`:return`text-fuchsia-300`;case`null`:return`text-neutral-500`;case`punctuation`:return`text-neutral-600`;default:return``}}function Oe(){fe(W.prefixWidth,String(Math.round(T(X))))}function ke(){m(q,!T(q)),fe(W.wrap,String(T(q)))}function Ae(){m(Y,!T(Y)),fe(W.jsonView,String(T(Y)))}var je=Dt(),Me=d(je),Ne=d(Me);et(Ne,{get status(){return S()}});var Pe=h(Ne,2),Fe=e(Pe),Ie=h(Pe,2),Le=e(Ie),Re=h(Ie,2),ze=t=>{var n=_t(),r=e(n);l(e=>F(r,`${e??``} buffered`),[()=>V(R())]),f(t,n)};b(Re,e=>{R()>0&&e(ze)});var Be=h(Re,2),He=t=>{var n=vt(),r=e(n);l(e=>F(r,`${e??``} dropped`),[()=>V(z())]),f(t,n)};b(Be,e=>{z()>0&&e(He)});var Ue=h(Be,2),We=e(Ue,!0),Ge=h(Ue,2),Ke=e=>{var t=yt();f(e,t)};b(Ge,e=>{T($).clamped&&e(Ke)});var qe=h(Ge,2),Je=e=>{var t=bt();f(e,t)};b(qe,e=>{T(be)&&e(Je)});var Ye=h(qe,2),Xe=d(Ye);j(Xe);var Ze=h(Xe,2),Qe=h(Ze,2),$e=h(Qe,2),tt=e($e,!0),nt=h($e,2),rt=h(nt,2);u(Ye),u(Me);var it=h(Me,2),ct=t=>{var n=xt(),r=e(n,!0);l(()=>F(r,T(Q))),f(t,n)};b(it,e=>{T(Q)!==null&&e(ct)});var ut=h(it,2),dt=d(ut),ft=e=>{var t=St();f(e,t)},pt=t=>{var n=Ct(),r=e(n,!0);l(()=>F(r,T(_e))),f(t,n)},ht=n=>{var r=Et(),i=d(r);N(i,21,()=>T(ge),e=>e.key,(n,r)=>{var i=Tt(),a=d(i),o=e(a,!0),s=h(a,2),c=e(s,!0),m=h(s,2),g=d(m),_=n=>{var i=t(),a=ee(i);N(a,19,()=>T(r).tokens,(e,t)=>`${T(r).key}-${t}`,(t,n)=>{var r=wt(),i=e(r,!0);l(e=>{A(r,1,e),F(i,T(n).text)},[()=>D(De(T(n).type))]),f(t,r)}),f(n,i)},v=e=>{var t=p();l(()=>F(t,T(r).message)),f(e,t)};b(g,e=>{T(r).tokens===null?e(v,-1):e(_)}),u(m),u(i),l(()=>{A(i,1,`flex items-baseline gap-2 px-3 py-0.5 hover:bg-neutral-900/60 ${T(Ce)??``}`),x(i,`data-level`,T(r).level),x(a,`title`,T(r).timestamp),F(o,T(r).time),C(s,T(Ee)),x(s,`title`,T(r).streamName??``),F(c,T(r).streamName??``),A(m,1,`${T(we)??``} ${T(r).levelClass??``}`)}),f(n,i)}),u(i);var o=h(i,2);{let e=a(()=>T(Te)-4);me(o,{label:`Resize prefix column`,get width(){return T(X)},get min(){return ce},get max(){return le},testId:`prefix-resizer`,onChange:e=>m(X,e,!0),onCommit:()=>Oe(),class:`absolute inset-y-0 w-2`,get style(){return`left: ${T(e)??``}px`}})}u(r),l(()=>A(r,1,`relative min-h-full ${T(Ce)??``}`)),f(n,r)};b(dt,e=>{P()===null||P()===``?e(ft):T(ge).length===0?e(pt,1):e(ht,-1)}),u(ut),y(ut,e=>m(Z,e),()=>T(Z)),u(je),l((e,t)=>{F(Fe,`${e??``} shown`),F(Le,`${t??``} received`),A(Ue,1,`rounded-full border px-2 py-0.5 text-[0.6875rem] font-medium ${T($).mode===`historic`?`border-amber-900 bg-amber-950/40 text-amber-300`:`border-neutral-800 bg-neutral-900 text-neutral-400`}`),x(Ue,`title`,T($).title),F(We,T($).label),E(Xe,I()),x(Ze,`aria-pressed`,T(q)),A(Ze,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${T(xe)??``}`),x(Qe,`aria-pressed`,T(Y)),A(Qe,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${T(Se)??``}`),x($e,`aria-pressed`,te()),F(tt,te()?`Resume`:`Pause`),x(rt,`aria-pressed`,L()),A(rt,1,`rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 text-xs font-medium transition-colors hover:border-neutral-700 ${T(ve)??``}`)},[()=>V(T(he).length),()=>V(re())]),n(`input`,Xe,e=>c.onFilterChange?.(e.currentTarget.value)),n(`click`,Ze,ke),n(`click`,Qe,Ae),n(`click`,$e,()=>c.onPauseToggle?.()),n(`click`,nt,()=>c.onClear?.()),n(`click`,rt,()=>c.onAutoScrollToggle?.()),f(r,je),s()}r([`input`,`click`]);var kt=P(`<option> </option>`),At=P(`<div class="flex flex-col gap-1.5"><label class="text-[0.6875rem] font-semibold uppercase tracking-wider text-neutral-500"> </label> <select class="w-full rounded-md border border-neutral-800 bg-neutral-900 px-2.5 py-1.5 text-sm text-neutral-100 outline-none transition-colors hover:border-neutral-700 focus:border-sky-600 disabled:cursor-not-allowed disabled:opacity-50"></select></div>`);function jt(t,r){_(r,!0);let i=w(r,`regions`,3,Oe),o=w(r,`value`,3,``),c=w(r,`disabled`,3,!1),p=w(r,`label`,3,`Region`),m=w(r,`id`,3,`region-select`),g=a(()=>o()!==``&&!i().includes(o())?[o(),...i()]:[...i()]);var v=At(),y=d(v),b=e(y,!0),C=h(y,2);N(C,20,()=>T(g),e=>e,(t,n)=>{var r=kt(),i=e(r,!0),a={};l(()=>{F(i,n),a!==(a=n)&&(r.value=(r.__value=a)??``)}),f(t,r)}),u(C);var E;M(C),u(v),l(()=>{x(y,`for`,m()),F(b,p()),x(C,`id`,m()),C.disabled=c(),E!==(E=o())&&(C.value=(C.__value=E)??``,S(C,E))}),n(`change`,C,e=>r.onchange?.(e.currentTarget.value)),f(t,v),s()}r([`change`]);function Mt(e){return new EventSource(e)}function Nt(e,t=``){let n=new URLSearchParams;return n.set(`region`,e.region),n.set(`group`,e.group),e.filterPattern&&n.set(`filterPattern`,e.filterPattern),e.mode===`historic`?(n.set(`mode`,`historic`),e.range&&n.set(`range`,e.range),e.from!==void 0&&e.from!==``&&n.set(`from`,String(e.from)),e.to!==void 0&&e.to!==``&&n.set(`to`,String(e.to))):e.mode===`live`&&n.set(`mode`,`live`),e.startTime!==void 0&&e.startTime!==``&&n.set(`startTime`,String(e.startTime)),e.lookback&&n.set(`lookback`,e.lookback),typeof e.poll==`number`&&Number.isFinite(e.poll)&&n.set(`poll`,String(e.poll)),`${t}/api/stream?${n.toString()}`}function Pt(e){try{return JSON.parse(e)}catch{return null}}var Ft=class{#e=g(`idle`);get status(){return T(this.#e)}set status(e){m(this.#e,e,!0)}#t=g(null);get lastError(){return T(this.#t)}set lastError(e){m(this.#t,e,!0)}#n=g(null);get ready(){return T(this.#n)}set ready(e){m(this.#n,e,!0)}#r=g(null);get target(){return T(this.#r)}set target(e){m(this.#r,e,!0)}#i=g([]);get lines(){return T(this.#i)}set lines(e){m(this.#i,e)}#a=g(0);get receivedCount(){return T(this.#a)}set receivedCount(e){m(this.#a,e,!0)}#o=g(0);get droppedCount(){return T(this.#o)}set droppedCount(e){m(this.#o,e,!0)}#s=g(0);get pendingCount(){return T(this.#s)}set pendingCount(e){m(this.#s,e,!0)}#c=g(!1);get paused(){return T(this.#c)}set paused(e){m(this.#c,e,!0)}#l=g(null);get lastEventAt(){return T(this.#l)}set lastEventAt(e){m(this.#l,e,!0)}#u=g(null);get endReason(){return T(this.#u)}set endReason(e){m(this.#u,e,!0)}#d;#f=null;#p=[];#m=null;#h;#g;#_;#v;#y;constructor(e={}){this.#d=new ft(e.capacity??5e3),this.#h=e.createEventSource??Mt,this.#g=e.reconnectDelayMs??1e3,this.#_=e.url??(e=>Nt(e)),this.#v=e.schedule??((e,t)=>setTimeout(e,t)),this.#y=e.cancel??(e=>clearTimeout(e))}start(e){this.#S(),this.#E(),this.clear(),this.status=`connecting`,this.lastError=null,this.ready=null,this.endReason=null,this.target={...e},this.#b(!1)}stop(){this.#E(),this.#S(),this.target=null,this.status=`idle`}pause(){this.#d.pause(),this.paused=!0}resume(){this.#d.resume(),this.paused=!1,this.#O()}togglePause(){this.paused?this.resume():this.pause()}clear(){this.#d.clear(),this.paused=!1,this.lines=[],this.receivedCount=0,this.droppedCount=0,this.pendingCount=0}get size(){return this.#d.size}#b(e){let t=this.target;if(t===null)return;this.#S(),this.status=e?`reconnecting`:`connecting`;let n;try{n=this.#h(this.#_(t))}catch(e){this.status=`error`,this.lastError={message:e instanceof Error?e.message:String(e)};return}this.#f=n,this.#x(n,`open`,()=>{this.status=`live`,this.lastError=null}),this.#x(n,`error`,e=>this.#C(e)),this.#x(n,`ready`,e=>this.#k(e)),this.#x(n,`log`,e=>this.#A(e)),this.#x(n,`ping`,e=>this.#j(e)),this.#x(n,`end`,e=>this.#M(e))}#x(e,t,n){e.addEventListener(t,n),this.#p.push({source:e,type:t,handler:n})}#S(){for(let e of this.#p)e.source.removeEventListener(e.type,e.handler);this.#p=[],this.#f?.close(),this.#f=null}#C(e){let t=typeof e.data==`string`?e.data.trim():``;if(t===``){this.#w();return}this.lastError=Pt(t)??{message:t},this.status=`error`}#w(){let e=this.#f;e!==null&&(this.status=`reconnecting`,e.readyState===2&&this.#T())}#T(){this.#m===null&&(this.#m=this.#v(()=>{this.#m=null,this.target!==null&&this.#b(!0)},this.#g))}#E(){this.#m!==null&&(this.#y(this.#m),this.#m=null)}#D(){this.lastEventAt=Date.now(),this.status!==`ended`&&(this.status=`live`)}#O(){this.lines=this.#d.toArray(),this.pendingCount=this.#d.pendingCount,this.droppedCount=this.#d.droppedCount}#k(e){let t=Pt(e.data);t!==null&&(this.ready=t),this.#D()}#A(e){let t=Pt(e.data),n=t!==null&&Array.isArray(t.events)?t.events:[];n.length!==0&&(this.#d.push(n),this.#O(),this.receivedCount+=n.length,this.#D())}#j(e){let t=Pt(e.data);this.lastEventAt=t?.at??Date.now(),this.status!==`ended`&&(this.status=`live`)}#M(e){let t=Pt(e.data);this.endReason=t?.reason??null,this.status=`ended`,this.#E(),this.#S()}},It=P(`<span class="text-xs text-emerald-400/80">API ok</span>`),Lt=P(`<p role="alert" data-testid="boot-error" class="rounded-md border border-red-900 bg-red-950/50 px-3 py-2 text-xs leading-5 text-red-300"> </p>`),Rt=P(`<div class="flex flex-wrap items-center gap-x-3 gap-y-2"><span class="text-[0.6875rem] font-semibold uppercase tracking-wider text-neutral-500">Watching</span> <span class="max-w-[22rem] truncate rounded-md border border-neutral-800 bg-neutral-900 px-2 py-1 font-mono text-xs text-neutral-200"> </span> <span class="text-xs text-neutral-500">in</span> <span class="font-mono text-xs text-neutral-300"> </span> <!> <!></div> <!> <!> <div class="flex min-h-0 min-w-0 flex-1 flex-col gap-3 lg:flex-row"><div class="flex min-h-0 w-full flex-col gap-3 rounded-lg border border-neutral-800 bg-neutral-950/60 p-3 lg:shrink-0" data-testid="sidebar"><!> <!></div> <!> <div class="flex min-h-0 min-w-0 flex-1 flex-col"><!></div></div>`,1);function zt(t,n){_(n,!0);let r=new Ft,c=g(o(L.url.searchParams.get(`region`)??``)),p=g(o(L.url.searchParams.get(`mode`)===`historic`?`historic`:`live`)),v=g(o(L.url.searchParams.get(`range`)??`15m`)),y=g(o(oe(L.url.searchParams.get(`from`)))),x=g(o(oe(L.url.searchParams.get(`to`)))),S=g(!1),w=g(o([...Oe])),E=g(o([])),D=g(!1),k=g(null),A=g(null),j=g(null),M=g(null),N=g(``),P=g(!0),I=a(()=>r.target?.group??null),R=g(0),z=g(o(J(G.defaultRem))),ne=a(()=>T(R)===0?J(G.defaultRem):Math.max(J(G.minRem),T(R)*G.maxVw/100)),B=J(G.minRem),re=a(()=>`width: min(${T(z)}px, ${G.maxVw}vw)`);function ie(e){try{return typeof localStorage>`u`?null:localStorage.getItem(e)}catch{return null}}function V(){try{if(typeof localStorage>`u`)return;localStorage.setItem(W.sidebarWidth,String(Math.round(T(z))))}catch{}}O(()=>{ae();let e=()=>{m(R,window.innerWidth,!0)};return e(),m(z,K(de(ie(W.sidebarWidth),J(G.defaultRem),J(G.minRem),window.innerWidth*G.maxVw/100),J(G.minRem),Math.max(J(G.minRem),window.innerWidth*G.maxVw/100)),!0),window.addEventListener(`resize`,e),()=>{r.stop(),window.removeEventListener(`resize`,e)}});async function ae(){let e=L.url.searchParams.get(`group`);await H(),await U(T(c)),e!==null&&e!==``?(m(S,T(p)===`historic`),ce(e)):pe(T(c),null)}async function H(){try{let[e,t]=await Promise.all([Fe(),Ie()]);e.regions.length>0&&m(w,e.regions,!0),T(c)===``&&m(c,e.defaultRegion||T(w)[0]||Oe[0],!0),m(A,t,!0),m(j,t.endpoint,!0)}catch(e){m(M,`Could not reach the watch-stream API. ${Y(e)}`),T(c)===``&&m(c,Oe[0],!0)}}async function U(e){m(D,!0),m(k,null);try{let t=await Le({region:e});if(e!==T(c))return;t.endpoint!==null&&m(j,t.endpoint,!0),m(E,t.groups,!0)}catch(t){if(e!==T(c))return;m(E,[],!0),m(k,Be(e,t),!0)}finally{e===T(c)&&m(D,!1)}}function oe(e){if(e===null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?t:null}function se(){return T(p)===`live`?{mode:`live`}:T(v)===``&&T(y)!==null&&T(x)!==null?{mode:`historic`,from:T(y),to:T(x)}:{mode:`historic`,range:T(v)===``?`15m`:T(v)}}function ce(e){T(c)!==``&&e!==``&&(r.start({region:T(c),group:e,...se()}),pe(T(c),e))}function ue(e){m(p,e.mode,!0),m(v,e.range,!0),m(y,e.from,!0),m(x,e.to,!0),pe(T(c),T(I)),T(I)!==null&&(m(S,e.mode===`historic`),r.start({region:T(c),group:T(I),...se()}))}function fe(e){e!==``&&e!==T(c)&&(m(c,e,!0),r.stop(),m(E,[],!0),pe(e,null),U(e))}function q(){U(T(c))}function pe(e,t){let n=new URL(L.url);e===``?n.searchParams.delete(`region`):n.searchParams.set(`region`,e),t===null||t===``?n.searchParams.delete(`group`):n.searchParams.set(`group`,t),T(p)===`live`?(n.searchParams.delete(`mode`),n.searchParams.delete(`range`),n.searchParams.delete(`from`),n.searchParams.delete(`to`)):(n.searchParams.set(`mode`,`historic`),n.searchParams.delete(`from`),n.searchParams.delete(`to`),n.searchParams.delete(`range`),T(v)===``&&T(y)!==null&&T(x)!==null?(n.searchParams.set(`from`,String(T(y))),n.searchParams.set(`to`,String(T(x)))):n.searchParams.set(`range`,T(v)===``?`15m`:T(v))),n.href!==L.url.href&&te(n,{})}i(()=>{(r.ready!==null||r.status===`error`)&&m(S,!1)});function Y(e){return e instanceof Error&&e.message!==``?e.message:String(e)}var X=Rt(),he=ee(X),ge=h(d(he),2),Z=e(ge,!0),Q=h(ge,4),_e=e(Q,!0),ve=h(Q,2);{let e=a(()=>T(A)?.credentials??null);le(ve,{get endpoint(){return T(j)},get credentials(){return T(e)}})}var $=h(ve,2),ye=e=>{var t=It();f(e,t)};b($,e=>{T(A)!==null&&T(A).ok&&e(ye)}),u(he);var be=h(he,2),xe=t=>{var n=Lt(),r=e(n,!0);l(()=>F(r,T(M))),f(t,n)};b(be,e=>{T(M)!==null&&e(xe)});var Se=h(be,2);{let e=a(()=>T(I)===null);De(Se,{get mode(){return T(p)},get range(){return T(v)},get from(){return T(y)},get to(){return T(x)},get loading(){return T(S)},get disabled(){return T(e)},onApply:ue})}var Ce=h(Se,2),we=d(Ce),Te=d(we);jt(Te,{get regions(){return T(w)},get value(){return T(c)},onchange:fe}),Qe(h(Te,2),{get groups(){return T(E)},get region(){return T(c)},get selected(){return T(I)},get loading(){return T(D)},get error(){return T(k)},onSelect:ce,onRefresh:q}),u(we);var Ee=h(we,2);me(Ee,{label:`Resize group list`,get width(){return T(z)},get min(){return B},get max(){return T(ne)},testId:`sidebar-resizer`,onChange:e=>m(z,e,!0),onCommit:()=>V(),class:`hidden lg:block lg:w-2`});var ke=h(Ee,2);Ot(d(ke),{get lines(){return r.lines},get status(){return r.status},get error(){return r.lastError},get mode(){return T(p)},get ready(){return r.ready},get endReason(){return r.endReason},get region(){return T(c)},get group(){return T(I)},get filter(){return T(N)},get paused(){return r.paused},get autoScroll(){return T(P)},get pendingCount(){return r.pendingCount},get droppedCount(){return r.droppedCount},get receivedCount(){return r.receivedCount},onFilterChange:e=>m(N,e,!0),onPauseToggle:()=>r.togglePause(),onClear:()=>r.clear(),onAutoScrollToggle:()=>m(P,!T(P))}),u(ke),u(Ce),l(()=>{F(Z,T(I)??`no group selected`),F(_e,T(c)===``?`resolving region…`:T(c)),C(we,T(re))}),f(t,X),s()}export{zt as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"1789138632342"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build/env.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
// since env.js is an entrypoint, `dir` will point to the output directory
|
|
6
|
+
const dir = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
|
|
8
|
+
const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);
|
|
9
|
+
|
|
10
|
+
const env_prefix = "";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} name
|
|
14
|
+
* @param {any} [fallback]
|
|
15
|
+
*/
|
|
16
|
+
function env(name, fallback) {
|
|
17
|
+
const prefix = expected_unprefixed.has(name) ? '' : env_prefix;
|
|
18
|
+
const prefixed = prefix + name;
|
|
19
|
+
return prefixed in process.env ? process.env[prefixed] : fallback;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const integer_regexp = /^\d+$/;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Throw a consistently-structured parsing error for environment variables.
|
|
26
|
+
* @param {string} name
|
|
27
|
+
* @param {any} value
|
|
28
|
+
* @param {string} description
|
|
29
|
+
* @returns {never}
|
|
30
|
+
*/
|
|
31
|
+
function parsing_error(name, value, description) {
|
|
32
|
+
throw new Error(
|
|
33
|
+
`Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check the environment for a timeout value (non-negative integer) in seconds.
|
|
39
|
+
* @param {string} name
|
|
40
|
+
* @param {number} [fallback]
|
|
41
|
+
* @returns {number | undefined}
|
|
42
|
+
*/
|
|
43
|
+
function timeout_env(name, fallback) {
|
|
44
|
+
const raw = env(name, fallback);
|
|
45
|
+
if (!raw) {
|
|
46
|
+
return fallback;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!integer_regexp.test(raw)) {
|
|
50
|
+
parsing_error(name, raw, 'should be a non-negative integer');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const parsed = Number.parseInt(raw, 10);
|
|
54
|
+
|
|
55
|
+
// We don't technically need to check `Number.isNaN` because the value already passed the regexp test.
|
|
56
|
+
// However, just in case there's some new codepath introduced somewhere down the line, it's probably good
|
|
57
|
+
// to stick this in here.
|
|
58
|
+
if (Number.isNaN(parsed)) {
|
|
59
|
+
parsing_error(name, raw, 'should be a non-negative integer');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (parsed < 0) {
|
|
63
|
+
parsing_error(name, raw, 'should be a non-negative integer');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return parsed;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { dir, env, env_prefix, timeout_env };
|
|
70
|
+
//# sourceMappingURL=env.js.map
|
package/build/env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sources":["../.svelte-kit/adapter-node/entries/env.js"],"sourcesContent":["import path from 'node:path';\nimport process from 'node:process';\nimport { fileURLToPath } from 'node:url';\n\n// since env.js is an entrypoint, `dir` will point to the output directory\nconst dir = path.dirname(fileURLToPath(import.meta.url));\n\nconst expected = new Set([\n\t'SOCKET_PATH',\n\t'HOST',\n\t'PORT',\n\t'ORIGIN',\n\t'XFF_DEPTH',\n\t'ADDRESS_HEADER',\n\t'PROTOCOL_HEADER',\n\t'HOST_HEADER',\n\t'PORT_HEADER',\n\t'BODY_SIZE_LIMIT',\n\t'SHUTDOWN_TIMEOUT',\n\t'IDLE_TIMEOUT',\n\t'KEEP_ALIVE_TIMEOUT',\n\t'HEADERS_TIMEOUT'\n]);\n\nconst expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);\n\nconst env_prefix = ENV_PREFIX;\n\nif (env_prefix) {\n\tfor (const name in process.env) {\n\t\tif (name.startsWith(env_prefix)) {\n\t\t\tconst unprefixed = name.slice(env_prefix.length);\n\t\t\tif (!expected.has(unprefixed)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`You should change envPrefix (${env_prefix}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {string} name\n * @param {any} [fallback]\n */\nfunction env(name, fallback) {\n\tconst prefix = expected_unprefixed.has(name) ? '' : env_prefix;\n\tconst prefixed = prefix + name;\n\treturn prefixed in process.env ? process.env[prefixed] : fallback;\n}\n\nconst integer_regexp = /^\\d+$/;\n\n/**\n * Throw a consistently-structured parsing error for environment variables.\n * @param {string} name\n * @param {any} value\n * @param {string} description\n * @returns {never}\n */\nfunction parsing_error(name, value, description) {\n\tthrow new Error(\n\t\t`Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})`\n\t);\n}\n\n/**\n * Check the environment for a timeout value (non-negative integer) in seconds.\n * @param {string} name\n * @param {number} [fallback]\n * @returns {number | undefined}\n */\nfunction timeout_env(name, fallback) {\n\tconst raw = env(name, fallback);\n\tif (!raw) {\n\t\treturn fallback;\n\t}\n\n\tif (!integer_regexp.test(raw)) {\n\t\tparsing_error(name, raw, 'should be a non-negative integer');\n\t}\n\n\tconst parsed = Number.parseInt(raw, 10);\n\n\t// We don't technically need to check `Number.isNaN` because the value already passed the regexp test.\n\t// However, just in case there's some new codepath introduced somewhere down the line, it's probably good\n\t// to stick this in here.\n\tif (Number.isNaN(parsed)) {\n\t\tparsing_error(name, raw, 'should be a non-negative integer');\n\t}\n\n\tif (parsed < 0) {\n\t\tparsing_error(name, raw, 'should be a non-negative integer');\n\t}\n\n\treturn parsed;\n}\n\nexport { dir, env, env_prefix, timeout_env };\n"],"names":[],"mappings":";;;;AAIA;AACK,MAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;;AAmBvD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;;AAE5D,MAAC,UAAU,GAAG;;AAenB;AACA;AACA;AACA;AACA,SAAS,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE;AAC7B,CAAC,MAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU;AAC/D,CAAC,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI;AAC/B,CAAC,OAAO,QAAQ,IAAI,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAClE;;AAEA,MAAM,cAAc,GAAG,OAAO;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;AACjD,CAAC,MAAM,IAAI,KAAK;AAChB,EAAE,CAAC,uCAAuC,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;AAC5F,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE;AACrC,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;AAChC,CAAC,IAAI,CAAC,GAAG,EAAE;AACX,EAAE,OAAO,QAAQ;AACjB,CAAC;;AAED,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAChC,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,kCAAkC,CAAC;AAC9D,CAAC;;AAED,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC;;AAExC;AACA;AACA;AACA,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AAC3B,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,kCAAkC,CAAC;AAC9D,CAAC;;AAED,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE;AACjB,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,kCAAkC,CAAC;AAC9D,CAAC;;AAED,CAAC,OAAO,MAAM;AACd;;"}
|
package/build/handler.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './shims.js';
|
|
2
|
+
import 'node:fs';
|
|
3
|
+
import 'node:path';
|
|
4
|
+
import 'node:process';
|
|
5
|
+
export { h as handler } from './server/chunks/handler-nVqa-QPz.js';
|
|
6
|
+
import './server/chunks/index.js-CtbhHm7L.js';
|
|
7
|
+
import './server/chunks/manifest.js-BwUys8gK.js';
|
|
8
|
+
import './env.js';
|
|
9
|
+
import 'node:buffer';
|
|
10
|
+
import 'node:crypto';
|
|
11
|
+
import 'node:http';
|
|
12
|
+
import 'node:timers';
|
|
13
|
+
import 'node:querystring';
|
|
14
|
+
import 'node:stream';
|
|
15
|
+
import './server/chunks/chunks/shared.js-CgjUIvRK.js';
|
|
16
|
+
import './server/chunks/chunks/uneval.js-DaakSYFQ.js';
|
|
17
|
+
import './server/chunks/chunks/utils.js-BIlHjgGW.js';
|
|
18
|
+
import 'node:url';
|
|
19
|
+
import './server/chunks/chunks/internal.js-DdmUz1r3.js';
|
|
20
|
+
import './server/chunks/chunks/server.js-ByNB8uti.js';
|
|
21
|
+
import './server/chunks/chunks/internal2.js-DZ8ZzzjN.js';
|
|
22
|
+
import './server/chunks/chunks/shared-server.js-Dn5XheXH.js';
|
|
23
|
+
import './server/chunks/chunks/exports.js-CvFPPbaH.js';
|
|
24
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import http from 'node:http';
|
|
2
|
+
import fs__default from 'node:fs';
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-nVqa-QPz.js';
|
|
5
|
+
import { env, timeout_env } from './env.js';
|
|
6
|
+
import { rm } from 'node:fs/promises';
|
|
7
|
+
import './shims.js';
|
|
8
|
+
import 'node:buffer';
|
|
9
|
+
import 'node:crypto';
|
|
10
|
+
import 'node:path';
|
|
11
|
+
import 'node:timers';
|
|
12
|
+
import 'node:querystring';
|
|
13
|
+
import 'node:stream';
|
|
14
|
+
import './server/chunks/chunks/shared.js-CgjUIvRK.js';
|
|
15
|
+
import './server/chunks/chunks/uneval.js-DaakSYFQ.js';
|
|
16
|
+
import './server/chunks/chunks/utils.js-BIlHjgGW.js';
|
|
17
|
+
import './server/chunks/index.js-CtbhHm7L.js';
|
|
18
|
+
import './server/chunks/chunks/internal.js-DdmUz1r3.js';
|
|
19
|
+
import './server/chunks/chunks/server.js-ByNB8uti.js';
|
|
20
|
+
import './server/chunks/chunks/internal2.js-DZ8ZzzjN.js';
|
|
21
|
+
import './server/chunks/chunks/shared-server.js-Dn5XheXH.js';
|
|
22
|
+
import './server/chunks/chunks/exports.js-CvFPPbaH.js';
|
|
23
|
+
import './server/chunks/manifest.js-BwUys8gK.js';
|
|
24
|
+
import 'node:url';
|
|
25
|
+
|
|
26
|
+
const path = env('SOCKET_PATH', false);
|
|
27
|
+
const host = env('HOST', '0.0.0.0');
|
|
28
|
+
const port = env('PORT', !path && '3000');
|
|
29
|
+
|
|
30
|
+
const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));
|
|
31
|
+
const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));
|
|
32
|
+
const listen_pid = parseInt(env('LISTEN_PID', '0'));
|
|
33
|
+
const listen_fds = parseInt(env('LISTEN_FDS', '0'));
|
|
34
|
+
// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html
|
|
35
|
+
const SD_LISTEN_FDS_START = 3;
|
|
36
|
+
|
|
37
|
+
if (listen_pid !== 0 && listen_pid !== process.pid) {
|
|
38
|
+
throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);
|
|
39
|
+
}
|
|
40
|
+
if (listen_fds > 1) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const socket_activation = listen_pid === process.pid && listen_fds === 1;
|
|
47
|
+
|
|
48
|
+
let requests = 0;
|
|
49
|
+
/** @type {NodeJS.Timeout | void} */
|
|
50
|
+
let shutdown_timeout_id;
|
|
51
|
+
/** @type {NodeJS.Timeout | void} */
|
|
52
|
+
let idle_timeout_id;
|
|
53
|
+
|
|
54
|
+
// Initialize the HTTP server here so that we can set properties before starting to listen.
|
|
55
|
+
// Otherwise, polka delays creating the server until listen() is called. Settings these
|
|
56
|
+
// properties after the server has started listening could lead to race conditions.
|
|
57
|
+
const httpServer = http.createServer();
|
|
58
|
+
|
|
59
|
+
const keep_alive_timeout = timeout_env('KEEP_ALIVE_TIMEOUT');
|
|
60
|
+
if (keep_alive_timeout !== undefined) {
|
|
61
|
+
// Convert the keep-alive timeout from seconds to milliseconds (the unit Node.js expects).
|
|
62
|
+
httpServer.keepAliveTimeout = keep_alive_timeout * 1000;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const headers_timeout = timeout_env('HEADERS_TIMEOUT');
|
|
66
|
+
if (headers_timeout !== undefined) {
|
|
67
|
+
// Convert the headers timeout from seconds to milliseconds (the unit Node.js expects).
|
|
68
|
+
httpServer.headersTimeout = headers_timeout * 1000;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const server = polka({ server: httpServer }).use(handler);
|
|
72
|
+
|
|
73
|
+
if (socket_activation) {
|
|
74
|
+
server.listen({ fd: SD_LISTEN_FDS_START }, () => {
|
|
75
|
+
console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);
|
|
76
|
+
});
|
|
77
|
+
} else {
|
|
78
|
+
if (path) {
|
|
79
|
+
try {
|
|
80
|
+
if (fs__default.statSync(path).size === 0) {
|
|
81
|
+
await rm(path);
|
|
82
|
+
}
|
|
83
|
+
} catch {
|
|
84
|
+
// ignore
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
server.listen({ path, host, port }, () => {
|
|
89
|
+
console.log(`Listening on ${format_listening_address(path, host, port, httpServer.address())}`);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */
|
|
94
|
+
function graceful_shutdown(reason) {
|
|
95
|
+
if (shutdown_timeout_id) return;
|
|
96
|
+
|
|
97
|
+
// If a connection was opened with a keep-alive header close() will wait for the connection to
|
|
98
|
+
// time out rather than close it even if it is not handling any requests, so call this first
|
|
99
|
+
httpServer.closeIdleConnections();
|
|
100
|
+
|
|
101
|
+
httpServer.close((error) => {
|
|
102
|
+
// occurs if the server is already closed
|
|
103
|
+
if (error) return;
|
|
104
|
+
|
|
105
|
+
if (shutdown_timeout_id) {
|
|
106
|
+
clearTimeout(shutdown_timeout_id);
|
|
107
|
+
}
|
|
108
|
+
if (idle_timeout_id) {
|
|
109
|
+
clearTimeout(idle_timeout_id);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// @ts-expect-error custom events cannot be typed
|
|
113
|
+
process.emit('sveltekit:shutdown', reason);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
shutdown_timeout_id = setTimeout(() => httpServer.closeAllConnections(), shutdown_timeout * 1000);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
httpServer.on(
|
|
120
|
+
'request',
|
|
121
|
+
/** @param {import('node:http').IncomingMessage} req */
|
|
122
|
+
(req) => {
|
|
123
|
+
requests++;
|
|
124
|
+
|
|
125
|
+
if (socket_activation && idle_timeout_id) {
|
|
126
|
+
idle_timeout_id = clearTimeout(idle_timeout_id);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
req.on('close', () => {
|
|
130
|
+
requests--;
|
|
131
|
+
|
|
132
|
+
if (shutdown_timeout_id) {
|
|
133
|
+
// close connections as soon as they become idle, so they don't accept new requests
|
|
134
|
+
httpServer.closeIdleConnections();
|
|
135
|
+
}
|
|
136
|
+
if (requests === 0 && socket_activation && idle_timeout) {
|
|
137
|
+
idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
process.on('SIGTERM', graceful_shutdown);
|
|
144
|
+
process.on('SIGINT', graceful_shutdown);
|
|
145
|
+
|
|
146
|
+
export { host, path, port, server };
|
|
147
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../.svelte-kit/adapter-node/entries/index.js"],"sourcesContent":["import http from 'node:http';\nimport fs__default from 'node:fs';\nimport process from 'node:process';\nimport { handler } from './handler.js';\nimport { env, timeout_env } from './env.js';\nimport { p as polka } from './chunks/vendor.js';\nimport { rm } from 'node:fs/promises';\nimport { format_listening_address } from './utils.js';\n\nconst path = env('SOCKET_PATH', false);\nconst host = env('HOST', '0.0.0.0');\nconst port = env('PORT', !path && '3000');\n\nconst shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));\nconst idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));\nconst listen_pid = parseInt(env('LISTEN_PID', '0'));\nconst listen_fds = parseInt(env('LISTEN_FDS', '0'));\n// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html\nconst SD_LISTEN_FDS_START = 3;\n\nif (listen_pid !== 0 && listen_pid !== process.pid) {\n\tthrow new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);\n}\nif (listen_fds > 1) {\n\tthrow new Error(\n\t\t`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`\n\t);\n}\n\nconst socket_activation = listen_pid === process.pid && listen_fds === 1;\n\nlet requests = 0;\n/** @type {NodeJS.Timeout | void} */\nlet shutdown_timeout_id;\n/** @type {NodeJS.Timeout | void} */\nlet idle_timeout_id;\n\n// Initialize the HTTP server here so that we can set properties before starting to listen.\n// Otherwise, polka delays creating the server until listen() is called. Settings these\n// properties after the server has started listening could lead to race conditions.\nconst httpServer = http.createServer();\n\nconst keep_alive_timeout = timeout_env('KEEP_ALIVE_TIMEOUT');\nif (keep_alive_timeout !== undefined) {\n\t// Convert the keep-alive timeout from seconds to milliseconds (the unit Node.js expects).\n\thttpServer.keepAliveTimeout = keep_alive_timeout * 1000;\n}\n\nconst headers_timeout = timeout_env('HEADERS_TIMEOUT');\nif (headers_timeout !== undefined) {\n\t// Convert the headers timeout from seconds to milliseconds (the unit Node.js expects).\n\thttpServer.headersTimeout = headers_timeout * 1000;\n}\n\nconst server = polka({ server: httpServer }).use(handler);\n\nif (socket_activation) {\n\tserver.listen({ fd: SD_LISTEN_FDS_START }, () => {\n\t\tconsole.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);\n\t});\n} else {\n\tif (path) {\n\t\ttry {\n\t\t\tif (fs__default.statSync(path).size === 0) {\n\t\t\t\tawait rm(path);\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\tserver.listen({ path, host, port }, () => {\n\t\tconsole.log(`Listening on ${format_listening_address(path, host, port, httpServer.address())}`);\n\t});\n}\n\n/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */\nfunction graceful_shutdown(reason) {\n\tif (shutdown_timeout_id) return;\n\n\t// If a connection was opened with a keep-alive header close() will wait for the connection to\n\t// time out rather than close it even if it is not handling any requests, so call this first\n\thttpServer.closeIdleConnections();\n\n\thttpServer.close((error) => {\n\t\t// occurs if the server is already closed\n\t\tif (error) return;\n\n\t\tif (shutdown_timeout_id) {\n\t\t\tclearTimeout(shutdown_timeout_id);\n\t\t}\n\t\tif (idle_timeout_id) {\n\t\t\tclearTimeout(idle_timeout_id);\n\t\t}\n\n\t\t// @ts-expect-error custom events cannot be typed\n\t\tprocess.emit('sveltekit:shutdown', reason);\n\t});\n\n\tshutdown_timeout_id = setTimeout(() => httpServer.closeAllConnections(), shutdown_timeout * 1000);\n}\n\nhttpServer.on(\n\t'request',\n\t/** @param {import('node:http').IncomingMessage} req */\n\t(req) => {\n\t\trequests++;\n\n\t\tif (socket_activation && idle_timeout_id) {\n\t\t\tidle_timeout_id = clearTimeout(idle_timeout_id);\n\t\t}\n\n\t\treq.on('close', () => {\n\t\t\trequests--;\n\n\t\t\tif (shutdown_timeout_id) {\n\t\t\t\t// close connections as soon as they become idle, so they don't accept new requests\n\t\t\t\thttpServer.closeIdleConnections();\n\t\t\t}\n\t\t\tif (requests === 0 && socket_activation && idle_timeout) {\n\t\t\t\tidle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);\n\t\t\t}\n\t\t});\n\t}\n);\n\nprocess.on('SIGTERM', graceful_shutdown);\nprocess.on('SIGINT', graceful_shutdown);\n\nexport { host, path, port, server };\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js-l0sNRNKZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|