sliccy 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.
Files changed (63) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +512 -0
  3. package/dist/cli/chrome-launch.d.ts +47 -0
  4. package/dist/cli/chrome-launch.js +324 -0
  5. package/dist/cli/cli-log-dedup.d.ts +19 -0
  6. package/dist/cli/cli-log-dedup.js +62 -0
  7. package/dist/cli/electron-controller.d.ts +38 -0
  8. package/dist/cli/electron-controller.js +287 -0
  9. package/dist/cli/electron-main.d.ts +1 -0
  10. package/dist/cli/electron-main.js +183 -0
  11. package/dist/cli/electron-runtime.d.ts +58 -0
  12. package/dist/cli/electron-runtime.js +133 -0
  13. package/dist/cli/file-logger.d.ts +38 -0
  14. package/dist/cli/file-logger.js +207 -0
  15. package/dist/cli/index.d.ts +2 -0
  16. package/dist/cli/index.js +1023 -0
  17. package/dist/cli/launch-url.d.ts +9 -0
  18. package/dist/cli/launch-url.js +34 -0
  19. package/dist/cli/qa-setup.d.ts +1 -0
  20. package/dist/cli/qa-setup.js +36 -0
  21. package/dist/cli/release-package.d.ts +17 -0
  22. package/dist/cli/release-package.js +232 -0
  23. package/dist/cli/runtime-flags.d.ts +21 -0
  24. package/dist/cli/runtime-flags.js +154 -0
  25. package/dist/cli/sync-release-version.d.ts +2 -0
  26. package/dist/cli/sync-release-version.js +34 -0
  27. package/dist/tray-url-shared.d.ts +11 -0
  28. package/dist/tray-url-shared.js +56 -0
  29. package/dist/ui/assets/___vite-browser-external_commonjs-proxy-7ULRRj69.js +1 -0
  30. package/dist/ui/assets/__vite-browser-external-D7Ct-6yo.js +1 -0
  31. package/dist/ui/assets/addon-fit-DOCEibfw.js +12 -0
  32. package/dist/ui/assets/bsh-watchdog-D19WB0U1.js +2 -0
  33. package/dist/ui/assets/index-BVQAdk-Y.js +8 -0
  34. package/dist/ui/assets/index-BjJrFm2K.js +43 -0
  35. package/dist/ui/assets/index-C1dglHrI.js +3 -0
  36. package/dist/ui/assets/index-D3Enm5ux.js +13091 -0
  37. package/dist/ui/assets/index-D7hjyFh1.js +2 -0
  38. package/dist/ui/assets/index-D8uSC2sl.js +45 -0
  39. package/dist/ui/assets/index-DEglHp2j.js +1 -0
  40. package/dist/ui/assets/index-DvjzakYY.js +14406 -0
  41. package/dist/ui/assets/index-deZeJCgO.js +1 -0
  42. package/dist/ui/assets/index-mz3VYh0I.js +131 -0
  43. package/dist/ui/assets/index-r2m8Dpaz.js +54 -0
  44. package/dist/ui/assets/index-ygVJ3eFG.js +11 -0
  45. package/dist/ui/assets/lick-manager-proxy-G3WuipZ-.js +1 -0
  46. package/dist/ui/assets/magic-string.es-BPLJknd7.js +10 -0
  47. package/dist/ui/assets/oauth-service-DIahkF-o.js +1 -0
  48. package/dist/ui/assets/offscreen-client-ByVIJGHW.js +1 -0
  49. package/dist/ui/assets/pdfjs-uyZuKmOq.js +59 -0
  50. package/dist/ui/assets/pyodide-D73G_Ygx.mjs +4 -0
  51. package/dist/ui/assets/sql-wasm-BggYNCID.js +2 -0
  52. package/dist/ui/assets/stream-lEC9OYG2.js +1 -0
  53. package/dist/ui/assets/xterm-Bb8UKAlD.js +27 -0
  54. package/dist/ui/assets/xterm-DOrYoP_4.css +32 -0
  55. package/dist/ui/electron-overlay-entry.js +360 -0
  56. package/dist/ui/favicon.png +0 -0
  57. package/dist/ui/fonts/AdobeClean-Bold.otf +0 -0
  58. package/dist/ui/fonts/AdobeClean-ExtraBold.otf +0 -0
  59. package/dist/ui/fonts/AdobeClean-Medium.otf +0 -0
  60. package/dist/ui/fonts/AdobeClean-Regular.otf +0 -0
  61. package/dist/ui/index.html +1981 -0
  62. package/dist/ui/preview-sw.js +4 -0
  63. package/package.json +81 -0
@@ -0,0 +1,3 @@
1
+ import{n as B,o as W}from"./index-DvjzakYY.js";import{R as j,A as P,a as D,r as $,b as F,W as K}from"./stream-lEC9OYG2.js";const V=["ECONNRESET","EPIPE","ETIMEDOUT"],z=r=>{const e={};for(const t of Object.keys(r)){const n=r[t];e[t]=Array.isArray(n)?n.join(","):n}return e},l={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r)},H=1e3,q=(r,e,t=0)=>{if(!t)return-1;const n=s=>{const i=l.setTimeout(()=>{r.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${t} ms.`),{name:"TimeoutError"}))},t-s),o=a=>{a?.connecting?a.on("connect",()=>{l.clearTimeout(i)}):l.clearTimeout(i)};r.socket?o(r.socket):r.on("socket",o)};return t<2e3?(n(0),0):l.setTimeout(n.bind(null,H),H)},Q=(r,e,t=0,n,s)=>t?l.setTimeout(()=>{let i=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${t} ms requestTimeout.`;if(n){const o=Object.assign(new Error(i),{name:"TimeoutError",code:"ETIMEDOUT"});r.destroy(o),e(o)}else i+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(i)},t):-1,J=3e3,G=(r,{keepAlive:e,keepAliveMsecs:t},n=J)=>{if(e!==!0)return-1;const s=()=>{r.socket?r.socket.setKeepAlive(e,t||0):r.on("socket",i=>{i.setKeepAlive(e,t||0)})};return n===0?(s(),0):l.setTimeout(s,n)},U=3e3,X=(r,e,t=0)=>{const n=s=>{const i=t-s,o=()=>{r.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${t} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};r.socket?(r.socket.setTimeout(i,o),r.on("close",()=>r.socket?.removeListener("timeout",o))):r.setTimeout(i,o)};return 0<t&&t<6e3?(n(0),0):l.setTimeout(n.bind(null,t===0?0:U),U)},N=6e3;async function I(r,e,t=N,n=!1){const s=e.headers??{},i=s.Expect||s.expect;let o=-1,a=!0;!n&&i==="100-continue"&&(a=await Promise.race([new Promise(c=>{o=Number(l.setTimeout(()=>c(!0),Math.max(N,t)))}),new Promise(c=>{r.on("continue",()=>{l.clearTimeout(o),c(!0)}),r.on("response",()=>{l.clearTimeout(o),c(!1)}),r.on("error",()=>{l.clearTimeout(o),c(!1)})})])),a&&Y(r,e.body)}function Y(r,e){if(e instanceof j){e.pipe(r);return}if(e){const t=Buffer.isBuffer(e);if(t||typeof e=="string"){t&&e.byteLength===0?r.end():r.end(e);return}const s=e;if(typeof s=="object"&&s.buffer&&typeof s.byteOffset=="number"&&typeof s.byteLength=="number"){r.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}r.end(Buffer.from(e));return}r.end()}const fe=0;class L{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){return typeof e?.handle=="function"?e:new L(e)}static checkSocketUsage(e,t,n=console){const{sockets:s,requests:i,maxSockets:o}=e;if(typeof o!="number"||o===1/0||Date.now()-15e3<t)return t;if(s&&i)for(const c in s){const h=s[c]?.length??0,d=i[c]?.length??0;if(h>=o&&d>=2*o)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${h} and ${d} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,n)=>{typeof e=="function"?e().then(s=>{t(this.resolveDefaultConfig(s))}).catch(n):t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:n,socketTimeout:s,socketAcquisitionWarningTimeout:i,httpAgent:o,httpsAgent:a,throwOnRequestTimeout:c,logger:h}=e||{},d=!0,T=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:s,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:c,httpAgent:o instanceof D||typeof o?.destroy=="function"?(this.externalAgent=!0,o):new D({keepAlive:d,maxSockets:T,...o}),httpsAgent:a instanceof P||typeof a?.destroy=="function"?(this.externalAgent=!0,a):new P({keepAlive:d,maxSockets:T,...a}),logger:h}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){return this.config||(this.config=await this.configProvider),new Promise((s,i)=>{const o=this.config;let a;const c=[],h=async u=>{await a,c.forEach(l.clearTimeout),i(u)};if(t?.aborted){const u=new Error("Request aborted");u.name="AbortError",h(u);return}const d=e.protocol==="https:",T=e.headers??{},S=(T.Expect??T.expect)==="100-continue";let b=d?o.httpsAgent:o.httpAgent;S&&!this.externalAgent&&(b=new(d?P:D)({keepAlive:!1,maxSockets:1/0})),c.push(l.setTimeout(()=>{this.socketWarningTimestamp=L.checkSocketUsage(b,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2e3)+(o.connectionTimeout??1e3)));const v=B(e.query||{});(e.username!=null||e.password!=null)&&(e.username,e.password);let C=e.path;v&&(C+=`?${v}`),e.fragment&&(C+=`#${e.fragment}`);let w=e.hostname??"";w[0]==="["&&w.endsWith("]")?w=e.hostname.slice(1,-1):w=e.hostname;const k={headers:e.headers,method:e.method,port:e.port,agent:b},y=(d?$:F)();if(y.on("error",u=>{V.includes(u.code)?h(Object.assign(u,{name:"TimeoutError"})):h(u)}),t){const u=()=>{y.destroy();const p=new Error("Request aborted");p.name="AbortError",h(p)};if(typeof t.addEventListener=="function"){const p=t;p.addEventListener("abort",u,{once:!0}),y.once("close",()=>p.removeEventListener("abort",u))}else t.onabort=u}const A=n??o.requestTimeout;c.push(q(y,h,o.connectionTimeout)),c.push(Q(y,h,A,o.throwOnRequestTimeout,o.logger??console)),c.push(X(y,h,o.socketTimeout));const m=k.agent;typeof m=="object"&&"keepAlive"in m&&c.push(G(y,{keepAlive:m.keepAlive,keepAliveMsecs:m.keepAliveMsecs})),a=I(y,e,A,this.externalAgent).catch(u=>(c.forEach(l.clearTimeout),i(u)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}const _={};function Z(){throw new Error("http2.createServer is not available in the browser")}function ee(){throw new Error("http2.connect is not available in the browser")}const te={constants:_,createServer:Z,connect:ee};class ne{sessions=[];constructor(e){this.sessions=e??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter(t=>t!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(const t of this.sessions)t===e&&(t.destroyed||t.destroy())}}class oe{constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}config;sessionCache=new Map;lease(e,t){const n=this.getUrlString(e),s=this.sessionCache.get(n);if(s){const c=s.poll();if(c&&!this.config.disableConcurrency)return c}const i=te.connect(n);this.config.maxConcurrency&&i.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())}),i.unref();const o=()=>{i.destroy(),this.deleteSession(n,i)};i.on("goaway",o),i.on("error",o),i.on("frameError",o),i.on("close",()=>this.deleteSession(n,i)),t.requestTimeout&&i.setTimeout(t.requestTimeout,o);const a=this.sessionCache.get(n)||new ne;return a.offerLast(i),this.sessionCache.set(n,a),i}deleteSession(e,t){const n=this.sessionCache.get(e);n&&n.contains(t)&&(n.remove(t),this.sessionCache.set(e,n))}release(e,t){const n=this.getUrlString(e);this.sessionCache.get(n)?.offerLast(t)}destroy(){for(const[e,t]of this.sessionCache){for(const n of t)n.destroyed||n.destroy(),t.remove(n);this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}}class M{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new oe({});static create(e){return typeof e?.handle=="function"?e:new M(e)}constructor(e){this.configProvider=new Promise((t,n)=>{typeof e=="function"?e().then(s=>{t(s||{})}).catch(n):t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));const{requestTimeout:s,disableConcurrentStreams:i}=this.config,o=n??s;return new Promise((a,c)=>{let h=!1,d;const T=async f=>{await d,a(f)},S=async f=>{await d,c(f)};if(t?.aborted){h=!0;const f=new Error("Request aborted");f.name="AbortError",S(f);return}const{hostname:b,method:v,port:C,protocol:w,query:k}=e;let x="";if(e.username!=null||e.password!=null){const f=e.username??"",E=e.password??"";x=`${f}:${E}@`}const y=`${w}//${x}${b}${C?`:${C}`:""}`,A={destination:new URL(y)},m=this.connectionManager.lease(A,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:i||!1}),u=f=>{i&&this.destroySession(m),h=!0,S(f)},p=B(k||{});let R=e.path;p&&(R+=`?${p}`),e.fragment&&(R+=`#${e.fragment}`);const g=m.request({...e.headers,[_.HTTP2_HEADER_PATH]:R,[_.HTTP2_HEADER_METHOD]:v});if(m.ref(),g.on("response",f=>{const E=new W({statusCode:f[":status"]||-1,headers:z(f),body:g});h=!0,T({response:E}),i&&(m.close(),this.connectionManager.deleteSession(y,m))}),o&&g.setTimeout(o,()=>{g.close();const f=new Error(`Stream timed out because of no activity for ${o} ms`);f.name="TimeoutError",u(f)}),t){const f=()=>{g.close();const E=new Error("Request aborted");E.name="AbortError",u(E)};if(typeof t.addEventListener=="function"){const E=t;E.addEventListener("abort",f,{once:!0}),g.once("close",()=>E.removeEventListener("abort",f))}else t.onabort=f}g.on("frameError",(f,E,O)=>{u(new Error(`Frame type id ${f} in stream id ${O} has failed with code ${E}.`))}),g.on("error",u),g.on("aborted",()=>{u(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${g.rstCode}.`))}),g.on("close",()=>{m.unref(),i&&m.destroy(),h||u(new Error("Unexpected error: http2 request did not get a response"))}),d=I(g,e,o)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}destroySession(e){e.destroyed||e.destroy()}}class re extends K{bufferedBytes=[];_write(e,t,n){this.bufferedBytes.push(e),n()}}const ue=r=>se(r)?ie(r):new Promise((e,t)=>{const n=new re;r.pipe(n),r.on("error",s=>{n.end(),t(s)}),n.on("error",t),n.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.bufferedBytes));e(s)})}),se=r=>typeof ReadableStream=="function"&&r instanceof ReadableStream;async function ie(r){const e=[],t=r.getReader();let n=!1,s=0;for(;!n;){const{done:a,value:c}=await t.read();c&&(e.push(c),s+=c.length),n=a}const i=new Uint8Array(s);let o=0;for(const a of e)i.set(a,o),o+=a.length;return i}export{fe as DEFAULT_REQUEST_TIMEOUT,M as NodeHttp2Handler,L as NodeHttpHandler,ue as streamCollector};