@bkm016/basalt 0.1.0 → 0.1.2
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/README.md +16 -22
- package/chunk-06hdzq5n.js +2 -0
- package/chunk-09rj27b2.js +2 -0
- package/{chunk-qnr1f5pj.js → chunk-0y7ne3d0.js} +2 -2
- package/{chunk-8wjgbd9k.js → chunk-10xzzn07.js} +2 -2
- package/{chunk-bj14jshr.js → chunk-1qpces5a.js} +2 -2
- package/chunk-1zdwrgd4.js +2 -0
- package/chunk-27gntzs5.js +5 -0
- package/chunk-2esbgxps.js +25 -0
- package/{chunk-913tfr9c.js → chunk-362g64pd.js} +1 -1
- package/{chunk-rjdhaasf.js → chunk-3cjsd292.js} +2 -2
- package/chunk-5c9j8qe4.js +478 -0
- package/chunk-5j1krv9v.js +2 -0
- package/{chunk-vkkj4awb.js → chunk-6hssbcgj.js} +1 -1
- package/chunk-75m78j7x.js +10 -0
- package/{chunk-zt1wvkyf.js → chunk-8296hw9m.js} +1 -1
- package/{chunk-9y69ywyg.js → chunk-8d46jtbj.js} +2 -2
- package/{chunk-sf13azm4.js → chunk-8tjad3r0.js} +4 -4
- package/{chunk-agntrqs9.js → chunk-97rzj7f6.js} +1 -1
- package/{chunk-k7w7ac9q.js → chunk-981f9dw8.js} +8 -8
- package/chunk-9mmz6wt3.js +2 -0
- package/chunk-aefadsy6.js +3 -0
- package/chunk-bannb9xm.js +3 -0
- package/chunk-bpw6q7g0.js +3 -0
- package/{chunk-3jz9g8ab.js → chunk-c7x1zq39.js} +3 -3
- package/{chunk-rv06x0kn.js → chunk-cjc90f84.js} +1 -1
- package/{chunk-6gyhajhx.js → chunk-d2j735sd.js} +2 -2
- package/{chunk-qcwnkr5y.js → chunk-d8gtbw9g.js} +1 -1
- package/{chunk-rm3kcxq9.js → chunk-fjtvjrkg.js} +13 -13
- package/{chunk-qbf8x2ft.js → chunk-fm0k0qtz.js} +1 -1
- package/{chunk-1yzt0qm0.js → chunk-fw2bpqmw.js} +1 -1
- package/{chunk-kgdrjqsy.js → chunk-g2t6t8fk.js} +2 -2
- package/{chunk-wc5j0hfw.js → chunk-gp7y0fja.js} +13 -13
- package/{chunk-5fdgy0q2.js → chunk-gzxnene8.js} +10 -10
- package/{chunk-y9xe9ct2.js → chunk-hwr56pfj.js} +1 -1
- package/{chunk-0hbjv3y6.js → chunk-jwdb0ccj.js} +3 -3
- package/{chunk-x9982ek7.js → chunk-k23t7vhs.js} +5 -5
- package/{chunk-qffb7een.js → chunk-k506w58v.js} +2 -2
- package/{chunk-0tdv0t5q.js → chunk-k6w6y71k.js} +2 -2
- package/chunk-m40gxwq4.js +5 -0
- package/chunk-m8vkwdgr.js +5 -0
- package/{chunk-7yw8aa5j.js → chunk-mvfsxdx6.js} +13 -13
- package/{chunk-3p7q2pyp.js → chunk-nbb9trwz.js} +1 -1
- package/{chunk-0szjy61m.js → chunk-pbcy6zdt.js} +1 -1
- package/chunk-pmqtkqsf.js +2 -0
- package/{chunk-hat3s3pr.js → chunk-pxsrqrd0.js} +1 -1
- package/{chunk-xsbxykr4.js → chunk-qe0teyn1.js} +1 -1
- package/{chunk-2zqny2sy.js → chunk-r7fpkb49.js} +1 -1
- package/{chunk-xhk54h2q.js → chunk-rtzqqngy.js} +4 -4
- package/chunk-ry0z4ev6.js +2 -0
- package/{chunk-0rya8cxe.js → chunk-shadcb9z.js} +2 -2
- package/chunk-shhrr741.js +3753 -0
- package/{chunk-tnrqkc7b.js → chunk-t6zs4kw0.js} +2 -2
- package/chunk-tvm4zmgj.js +3 -0
- package/{chunk-hcn9cf6v.js → chunk-v258nxcz.js} +1 -1
- package/{chunk-a6r4z44b.js → chunk-vk1gxk1t.js} +1 -1
- package/{chunk-d913kpyw.js → chunk-vv7fp27r.js} +2 -2
- package/{chunk-g2k3yhgh.js → chunk-x1xss1d7.js} +3 -3
- package/{chunk-dakrpbe6.js → chunk-x4874m8e.js} +2 -2
- package/{chunk-wx7kdf0b.js → chunk-xfvvh1s5.js} +1 -1
- package/{chunk-1egbcp85.js → chunk-y0m980k3.js} +7 -7
- package/{chunk-5wp4egky.js → chunk-y58ygzn9.js} +4 -4
- package/{chunk-kjr81mrd.js → chunk-y648fzx0.js} +5 -5
- package/{chunk-32at88hc.js → chunk-y7nma9rk.js} +1 -1
- package/{chunk-wd9zxhza.js → chunk-ykens1hy.js} +1 -1
- package/chunk-z55bmysw.js +2 -0
- package/chunk-zmsgwr3s.js +2 -0
- package/{chunk-501zkf9b.js → chunk-ztsjgssj.js} +1 -1
- package/cli.js +89 -0
- package/compiled.js +12 -3762
- package/package.json +4 -3
- package/ui-test-worker.js +67 -67
- package/web/chunk-0sewdyz1.js +1 -0
- package/web/{chunk-g9qv15hq.js → chunk-1z5p7a1h.js} +1 -1
- package/web/chunk-21ke27j6.js +1 -0
- package/web/{chunk-svmhj9hd.js → chunk-24k0r5aq.js} +1 -1
- package/web/{chunk-vqjs551t.js → chunk-284a17k8.js} +1 -1
- package/web/{chunk-3cfabjey.js → chunk-2pjdtesn.js} +14 -14
- package/web/{chunk-ngpq43vn.js → chunk-3mvr2gwh.js} +1 -1
- package/web/chunk-3t3zwx9j.js +1 -0
- package/web/{chunk-ezyvv4ab.js → chunk-3z93efr4.js} +1 -1
- package/web/{chunk-rkesqprv.js → chunk-43jqvsrg.js} +1 -1
- package/web/{chunk-4y2td14d.js → chunk-4bry4xds.js} +2 -2
- package/web/{chunk-ea9swkkt.js → chunk-5e7ygjdn.js} +1 -1
- package/web/{chunk-3ahpr030.js → chunk-5jbf7n5q.js} +1 -1
- package/web/{chunk-bhe4jzha.js → chunk-5rx8rtsa.js} +1 -1
- package/web/chunk-5xc9d5ft.js +1 -0
- package/web/{chunk-fdkp6tzq.js → chunk-693m9kt7.js} +3 -3
- package/web/{chunk-mq92vqb1.js → chunk-6qejm5s2.js} +1 -1
- package/web/{chunk-z1jtv4c0.js → chunk-8ah6ce1b.js} +2 -2
- package/web/{chunk-zk2f7x5e.js → chunk-8e43yaq3.js} +3 -3
- package/web/{chunk-hejz98gw.js → chunk-8wye0wbb.js} +1 -1
- package/web/{chunk-pz934t6t.js → chunk-986z0p48.js} +5 -5
- package/web/{chunk-jtwhjp20.js → chunk-9dd1c37b.js} +77 -77
- package/web/{chunk-sc63gh9d.js → chunk-9re6yttj.js} +2 -2
- package/web/{chunk-1t760bg0.js → chunk-abbvjt4e.js} +1 -1
- package/web/{chunk-1v3d60pp.js → chunk-agmkx996.js} +3 -3
- package/web/{chunk-kbtbbarw.js → chunk-anbn2ttv.js} +2 -2
- package/web/chunk-aqm3spxt.js +1139 -0
- package/web/{chunk-jvhmna7z.js → chunk-avwpjsxw.js} +5 -5
- package/web/chunk-b470hvpk.js +1 -0
- package/web/{chunk-29e1trsq.js → chunk-bt1m87ck.js} +2 -2
- package/web/chunk-cqp1d4p0.js +1 -0
- package/web/{chunk-b5brnfv9.js → chunk-ctcrk3qn.js} +2 -2
- package/web/{chunk-zakv2xdf.js → chunk-ctd8bfg2.js} +1 -1
- package/web/{chunk-5hex8g0y.js → chunk-cwvtraca.js} +1 -1
- package/web/{chunk-1x8fn8w9.js → chunk-dk90px7g.js} +1 -1
- package/web/{chunk-0mrkjnte.js → chunk-ds7srg4p.js} +1 -1
- package/web/{chunk-6r912gfj.js → chunk-dt8ss97f.js} +5 -5
- package/web/{chunk-ykxpb3wv.js → chunk-ezkqa7we.js} +1 -1
- package/web/{chunk-svdzmaxb.js → chunk-f078k1ej.js} +1 -1
- package/web/chunk-fekjj24p.css +1 -0
- package/web/{chunk-v6v831tc.js → chunk-fqj9kry9.js} +5 -5
- package/web/chunk-frjfamx7.js +8 -0
- package/web/{chunk-rz6wwdd5.js → chunk-fy8ey195.js} +1 -1
- package/web/{chunk-p8y0hjx9.js → chunk-g8ee1csm.js} +1 -1
- package/web/{chunk-ktqt87qw.js → chunk-h31p43qa.js} +1 -1
- package/web/chunk-h5p5jsrw.js +1 -0
- package/web/chunk-h9fmr6ch.js +1 -0
- package/web/{chunk-x9q4kh67.js → chunk-jf2ehmvp.js} +2 -2
- package/web/{chunk-canbct9d.js → chunk-jmnaq7c1.js} +1 -1
- package/web/chunk-jq0pw0k2.js +1 -0
- package/web/{chunk-ghxe4gam.js → chunk-jvj66qhs.js} +2 -2
- package/web/{chunk-7f0m2yrd.js → chunk-jzmzhj8z.js} +4 -4
- package/web/chunk-k4cfnvyq.js +1 -0
- package/web/{chunk-942prjb6.js → chunk-kgerjbn4.js} +1 -1
- package/web/{chunk-3bqh2dkw.js → chunk-kww4azv5.js} +5 -5
- package/web/chunk-m29dhjkh.js +1 -0
- package/web/chunk-mj6tee5h.js +1 -0
- package/web/{chunk-a3xt6840.js → chunk-mjpjkyd1.js} +1 -1
- package/web/{chunk-20q90epj.js → chunk-n8sky2q6.js} +1 -1
- package/web/{chunk-3pf33xsm.js → chunk-pk3ap3wh.js} +4 -4
- package/web/{chunk-tfyxp2qs.js → chunk-q1pkntc6.js} +4 -4
- package/web/{chunk-gxn0bey7.js → chunk-qryrg2pq.js} +2 -2
- package/web/{chunk-0xck277j.js → chunk-r92sbgwv.js} +5 -5
- package/web/{chunk-ev1g5cqw.js → chunk-raqqscwa.js} +2 -2
- package/web/{chunk-c85wxnpw.js → chunk-rc2vq9wz.js} +3 -3
- package/web/{chunk-rsn8j7xv.js → chunk-rkj743fg.js} +3 -3
- package/web/{chunk-v47rhg7b.js → chunk-rrws61wf.js} +1 -1
- package/web/{chunk-ytpwz01r.js → chunk-s3hwejnr.js} +2 -2
- package/web/{chunk-bwyw10wx.js → chunk-s3rdx28k.js} +2 -2
- package/web/{chunk-hryhthxr.js → chunk-shbw6wg8.js} +1 -1
- package/web/chunk-szcy5z56.js +1 -0
- package/web/{chunk-ejd43q75.js → chunk-t1xk6hca.js} +4 -4
- package/web/chunk-t2hhdg9r.js +1 -0
- package/web/chunk-tj4cmkwe.js +1 -0
- package/web/{chunk-mdsgekpk.js → chunk-tn1xzmgx.js} +1 -1
- package/web/{chunk-0k0hvh59.js → chunk-tnv7z83q.js} +1 -1
- package/web/chunk-v2b5q0n5.js +1 -0
- package/web/{chunk-haphmhz8.js → chunk-vj6kstpp.js} +5 -5
- package/web/{chunk-e5rmr47n.js → chunk-vjqmnkh2.js} +1 -1
- package/web/{chunk-vfqe8298.js → chunk-vkc149rb.js} +1 -1
- package/web/{chunk-n5fn9khr.js → chunk-vny496ba.js} +1 -1
- package/web/{chunk-s8vapqgr.js → chunk-vz5ck6x9.js} +1 -1
- package/web/{chunk-6atq9qtt.js → chunk-xa88zgkr.js} +1 -1
- package/web/{chunk-d4d3mnak.js → chunk-xdcs8qz3.js} +4 -4
- package/web/chunk-y5x74t89.js +1 -0
- package/web/{chunk-x3zwjkwg.js → chunk-yen2kkn2.js} +1 -1
- package/web/{chunk-vadqkz3x.js → chunk-yjv2c45j.js} +4 -4
- package/web/chunk-yx3dh5hg.js +1 -0
- package/web/chunk-yz4fmtk2.js +1 -0
- package/web/{chunk-4b5mt5pd.js → chunk-z24vs8q9.js} +3 -3
- package/web/chunk-z5j6x6j8.js +2 -0
- package/web/chunk-z5stjrhc.js +1 -0
- package/web/{chunk-3pm4645m.js → chunk-z760wagr.js} +1 -1
- package/web/{chunk-nerx2q12.js → chunk-znvnb9dh.js} +1 -1
- package/web/{chunk-55kw67nv.js → chunk-zrzq29e6.js} +1 -1
- package/web/{icon-yx2p2pye.svg → icon-1wgy7kzy.svg} +13 -13
- package/web/icon.svg +13 -13
- package/web/index.html +2 -2
- package/web/install.sh +0 -0
- package/web/sw.js +9 -0
- package/worker.js +1 -1
- package/chunk-1fv27j4b.js +0 -3
- package/chunk-356q8e0y.js +0 -10
- package/chunk-58vz2qsq.js +0 -2
- package/chunk-665jzf2w.js +0 -25
- package/chunk-97kjn55j.js +0 -2
- package/chunk-b9bg5fhd.js +0 -2
- package/chunk-c25s4w6a.js +0 -5
- package/chunk-j2x0g1vg.js +0 -2
- package/chunk-k0t23cmx.js +0 -2
- package/chunk-m38ber71.js +0 -2
- package/chunk-rad3dm0q.js +0 -2
- package/chunk-sytpmbfp.js +0 -471
- package/chunk-t057xfrt.js +0 -5
- package/chunk-tjpvayr1.js +0 -2
- package/chunk-ve7qx8wm.js +0 -3
- package/chunk-y8ced1jm.js +0 -5
- package/chunk-yb1jxgnk.js +0 -2
- package/web/chunk-00mq7bhx.js +0 -1
- package/web/chunk-0atfn8jf.js +0 -1
- package/web/chunk-310yey4q.js +0 -1
- package/web/chunk-32ezm0ry.js +0 -1136
- package/web/chunk-3hvgs5aw.js +0 -1
- package/web/chunk-3kh6zefg.js +0 -1
- package/web/chunk-401v5ht6.js +0 -8
- package/web/chunk-5r5kv4gh.js +0 -1
- package/web/chunk-95q1bwxn.js +0 -1
- package/web/chunk-9s7c178f.js +0 -1
- package/web/chunk-benmmqt2.js +0 -1
- package/web/chunk-bgqdcnke.js +0 -1
- package/web/chunk-eqegxtdt.js +0 -1
- package/web/chunk-gmfp7fg4.js +0 -1
- package/web/chunk-gxay64d5.js +0 -1
- package/web/chunk-jg6nzn6q.js +0 -1
- package/web/chunk-kx2xk3bb.js +0 -1
- package/web/chunk-ry9256r7.js +0 -1
- package/web/chunk-vfqdy860.js +0 -1
- package/web/chunk-wtawdeej.css +0 -1
- package/web/chunk-x59p8sg2.js +0 -1
- package/web/chunk-y7z144e3.js +0 -1
- package/web/chunk-ydgqrfvw.js +0 -2
- package/web/chunk-yj1a2d37.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{X,B}from"./chunk-981f9dw8.js";import{r,p}from"./chunk-0y7ne3d0.js";var Fe=r(function(me){var{hasOwn:Q}=X(),{streamCollector:ne}=X();me.streamCollector=ne;var{buildQueryString:J,HttpResponse:G}=B(),A=p("https"),{Readable:se}=p("stream"),O=p("http2");function M(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let n=Error(String(t));return n.name="AbortError",n}let o=Error("Request aborted");return o.name="AbortError",o}var re=["ECONNRESET","EPIPE","ETIMEDOUT"],Y=(e)=>{let t={};for(let o in e){if(!Q(e,o))continue;let n=e[o];t[o]=Array.isArray(n)?n.join(","):n}return t},l={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},j=1000,ie=(e,t,o=0)=>{if(!o)return-1;let n=(s)=>{let c=l.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${o} ms.`),{name:"TimeoutError"}))},o-s),a=(u)=>{if(u?.connecting)u.on("connect",()=>{l.clearTimeout(c)});else l.clearTimeout(c)};if(e.socket)a(e.socket);else e.on("socket",a)};if(o<2000)return n(0),0;return l.setTimeout(n.bind(null,j),j)},ce=(e,t,o=0,n,s)=>{if(o)return l.setTimeout(()=>{let c=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${o} ms requestTimeout.`;if(n){let a=Object.assign(Error(c),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(a),t(a)}else c+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(c)},o);return-1},ae=3000,ue=(e,{keepAlive:t,keepAliveMsecs:o},n=ae)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,o||0);else e.on("socket",(c)=>{c.setKeepAlive(t,o||0)})};if(n===0)return s(),0;return l.setTimeout(s,n)},W=3000,fe=(e,t,o=0)=>{let n=(s)=>{let c=o-s,a=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${o} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(c,a),e.on("close",()=>e.socket?.removeListener("timeout",a));else e.setTimeout(c,a)};if(0<o&&o<6000)return n(0),0;return l.setTimeout(n.bind(null,o===0?0:W),W)},z=6000;async function Z(e,t,o=z,n=!1){let s=t.headers,c=s?s.Expect||s.expect:void 0,a=-1,u=!0;if(!n&&c==="100-continue")u=await Promise.race([new Promise((f)=>{a=Number(l.setTimeout(()=>f(!0),Math.max(z,o)))}),new Promise((f)=>{e.on("continue",()=>{l.clearTimeout(a),f(!0)}),e.on("response",()=>{l.clearTimeout(a),f(!1)}),e.on("error",()=>{l.clearTimeout(a),f(!1)})})]);if(u)de(e,t.body)}function de(e,t){if(t instanceof se){t.pipe(e);return}if(t){let o=Buffer.isBuffer(t);if(o||typeof t==="string"){if(o&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var he=0,L=void 0,V=void 0;class U{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new U(e)}static checkSocketUsage(e,t,o=console){let{sockets:n,requests:s,maxSockets:c}=e;if(typeof c!=="number"||c===1/0)return t;let a=15000;if(Date.now()-a<t)return t;if(n&&s)for(let u in n){if(!Q(n,u))continue;let f=n[u]?.length??0,m=s[u]?.length??0;if(f>=c&&m>=2*c)return o?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${f} and ${m} additional requests are enqueued.
|
|
3
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
4
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,o)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(o);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:o}={}){if(!this.config)this.config=await this.configProvider;let n=this.config,s=n.logger,c=e.protocol==="https:";if(!c&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((a,u)=>{let f=void 0,m=-1,g=-1,w=-1,v=-1,C=-1,_=()=>{l.clearTimeout(m),l.clearTimeout(g),l.clearTimeout(w),l.clearTimeout(v),l.clearTimeout(C)},F=async(i)=>{await f,_(),a(i)},E=async(i)=>{await f,_(),u(i)};if(t?.aborted){let i=M(t);E(i);return}let D=e.headers,H=D?(D.Expect??D.expect)==="100-continue":!1,P=c?n.httpsAgent:n.httpAgent;if(H&&!this.externalAgent)P=new(c?A.Agent:L)({keepAlive:!1,maxSockets:1/0});m=l.setTimeout(()=>{this.socketWarningTimestamp=U.checkSocketUsage(P,this.socketWarningTimestamp,s)},n.socketAcquisitionWarningTimeout??(n.requestTimeout??2000)+(n.connectionTimeout??1000));let I=e.query?J(e.query):"",b=void 0;if(e.username!=null||e.password!=null){let i=e.username??"",d=e.password??"";b=`${i}:${d}`}let k=e.path;if(I)k+=`?${I}`;if(e.fragment)k+=`#${e.fragment}`;let y=e.hostname??"";if(y[0]==="["&&y.endsWith("]"))y=e.hostname.slice(1,-1);else y=e.hostname;let S={headers:e.headers,host:y,method:e.method,path:k,port:e.port,agent:P,auth:b},T=(c?A.request:V)(S,(i)=>{let d=new G({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:Y(i.headers),body:i});F({response:d})});if(T.on("error",(i)=>{if(re.includes(i.code))E(Object.assign(i,{name:"TimeoutError"}));else E(i)}),t){let i=()=>{T.destroy();let d=M(t);E(d)};if(typeof t.addEventListener==="function"){let d=t;d.addEventListener("abort",i,{once:!0}),T.once("close",()=>d.removeEventListener("abort",i))}else t.onabort=i}let R=o??n.requestTimeout;g=ie(T,E,n.connectionTimeout),w=ce(T,E,R,n.throwOnRequestTimeout,s??console),v=fe(T,E,n.socketTimeout);let h=S.agent;if(typeof h==="object"&&"keepAlive"in h)C=ue(T,{keepAlive:h.keepAlive,keepAliveMsecs:h.keepAliveMsecs});f=Z(T,e,R,this.externalAgent).catch((i)=>(_(),u(i)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((o)=>{if(e===Symbol.for("logger"))return{...o,logger:o.logger??t};return{...o,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:o,socketTimeout:n,socketAcquisitionWarningTimeout:s,httpAgent:c,httpsAgent:a,throwOnRequestTimeout:u,logger:f}=e||{},m=!0,g=50;return{connectionTimeout:o,requestTimeout:t,socketTimeout:n,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:u,httpAgentProvider:async()=>{let w=p("http"),{Agent:v,request:C}=w.default??w;if(V=C,L=v,c instanceof L||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new L({keepAlive:!0,maxSockets:50,...c})},httpsAgent:(()=>{if(a instanceof A.Agent||typeof a?.destroy==="function")return this.externalAgent=!0,a;return new A.Agent({keepAlive:!0,maxSockets:50,...a})})(),logger:f}}}var le=new Uint16Array(1);class N{id=le[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.setTimeout(0),this.session.destroy()}useCount(){return this.refs}}class ee{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((t)=>new N(t))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e){for(let t of this.sessions)if(t.deref().destroyed)this.remove(t)}}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);if(t>-1)this.sessions.splice(t,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class te{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,t){let o=this.getUrlString(e),n=this.getPool(o);if(!this.config.disableConcurrency&&!t.isEventStream){let f=n.poll();if(f)return f.retain(),f}let s=new N(this.connect(o)),c=s.deref();if(this.config.maxConcurrency)c.settings({maxConcurrentStreams:this.config.maxConcurrency},(f)=>{if(f)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let a=()=>{this.removeFromPoolAndClose(o,s)},u=()=>{this.removeFromPoolAndCheckedDestroy(o,s)};if(c.on("goaway",a),c.on("error",u),c.on("frameError",u),c.on("close",u),t.requestTimeout)c.setTimeout(t.requestTimeout,u);return n.offerLast(s),s.retain(),s}release(e,t){t.free()}createIsolatedSession(e,t){let o=this.getUrlString(e),n=new N(this.connect(o)),s=n.deref();s.settings({maxConcurrentStreams:1});let c=()=>{n.destroy()};s.on("error",c),s.on("frameError",c),s.on("close",c);let a=t.requestTimeout??300000;return s.setTimeout(a,c),n.retain(),n}destroy(){for(let[e,t]of this.connectionPools){for(let o of[...t])o.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,o]of this.connectionPools){let n=[];for(let s of o)n.push({id:s.id,active:s.useCount(),maxConcurrent:s.max,totalRequests:s.total});e[t]={sessions:n}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new ee;if(this.config.maxConcurrency)t.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?O.connect(e):O.connect(e,this.connectOptions)}}var{constants:K}=O;class q{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new te({});static create(e){if(typeof e?.handle==="function")return e;return new q(e)}constructor(e){this.configProvider=new Promise((t,o)=>{if(typeof e==="function")e().then((n)=>{t(n||{})}).catch(o);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:o,isEventStream:n}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:f,maxConcurrentStreams:m,nodeHttp2ConnectOptions:g}=this.config;if(this.connectionManager.setDisableConcurrentStreams(f??!1),m)this.connectionManager.setMaxConcurrentStreams(m);if(g)this.connectionManager.setNodeHttp2ConnectOptions(g)}let{requestTimeout:s,disableConcurrentStreams:c}=this.config,a=c||n,u=o??s;return new Promise((f,m)=>{let g=!1,w=void 0,v=async(i)=>{await w,f(i)},C=async(i)=>{await w,m(i)};if(t?.aborted){g=!0;let i=M(t);C(i);return}let{hostname:_,method:F,port:E,protocol:D,query:H}=e,P="";if(e.username!=null||e.password!=null){let i=e.username??"",d=e.password??"";P=`${i}:${d}@`}let I=`${D}//${P}${_}${E?`:${E}`:""}`,b={destination:new URL(I)},k={requestTimeout:this.config?.sessionTimeout,isEventStream:n},y=a?this.connectionManager.createIsolatedSession(b,k):this.connectionManager.lease(b,k),S=y.deref(),x=(i)=>{if(a)y.destroy();g=!0,C(i)},T=H?J(H):"",R=e.path;if(T)R+=`?${T}`;if(e.fragment)R+=`#${e.fragment}`;let h=S.request({...e.headers,[K.HTTP2_HEADER_PATH]:R,[K.HTTP2_HEADER_METHOD]:F});if(u)h.setTimeout(u,()=>{h.close();let i=Error(`Stream timed out because of no activity for ${u} ms`);i.name="TimeoutError",x(i)});if(t){let i=()=>{h.close();let d=M(t);x(d)};if(typeof t.addEventListener==="function"){let d=t;d.addEventListener("abort",i,{once:!0}),h.once("close",()=>d.removeEventListener("abort",i))}else t.onabort=i}h.on("frameError",(i,d,oe)=>{x(Error(`Frame type id ${i} in stream id ${oe} has failed with code ${d}.`))}),h.on("error",x),h.on("aborted",()=>{x(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${h.rstCode}.`))}),h.on("response",(i)=>{let d=new G({statusCode:i[":status"]??-1,headers:Y(i),body:h});if(g=!0,v({response:d}),a)S.close(),h.on("end",()=>{y.destroy()})}),h.on("close",()=>{if(a)y.destroy();else this.connectionManager.release(b,y);if(!g){let i=Error("Unexpected error: http2 request did not get a response");if(S.destroyed)i.name="TimeoutError";x(i)}}),w=Z(h,e,u)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((o)=>({...o,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}me.DEFAULT_REQUEST_TIMEOUT=he;me.NodeHttp2Handler=q;me.NodeHttpHandler=U});
|
|
5
|
+
export{Fe};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{i,r}from"./chunk-0y7ne3d0.js";var R=r(function(m){Object.defineProperty(m,"__esModule",{value:!0});m.Allow=m.ALL=m.COLLECTION=m.ATOM=m.SPECIAL=m.INF=m._INFINITY=m.INFINITY=m.NAN=m.BOOL=m.NULL=m.OBJ=m.ARR=m.NUM=m.STR=void 0;m.STR=1;m.NUM=2;m.ARR=4;m.OBJ=8;m.NULL=16;m.BOOL=32;m.NAN=64;m.INFINITY=128;m._INFINITY=256;m.INF=m.INFINITY|m._INFINITY;m.SPECIAL=m.NULL|m.BOOL|m.INF|m.NAN;m.ATOM=m.STR|m.NUM|m.SPECIAL;m.COLLECTION=m.ARR|m.OBJ;m.ALL=m.ATOM|m.COLLECTION;m.Allow={STR:m.STR,NUM:m.NUM,ARR:m.ARR,OBJ:m.OBJ,NULL:m.NULL,BOOL:m.BOOL,NAN:m.NAN,INFINITY:m.INFINITY,_INFINITY:m._INFINITY,INF:m.INF,SPECIAL:m.SPECIAL,ATOM:m.ATOM,COLLECTION:m.COLLECTION,ALL:m.ALL};m.default=m.Allow});var W=r(function(o){var G=o&&o.__createBinding||(Object.create?function(t,s,u,e){if(e===void 0)e=u;var c=Object.getOwnPropertyDescriptor(s,u);if(!c||("get"in c?!s.__esModule:c.writable||c.configurable))c={enumerable:!0,get:function(){return s[u]}};Object.defineProperty(t,e,c)}:function(t,s,u,e){if(e===void 0)e=u;t[e]=s[u]}),H=o&&o.__exportStar||function(t,s){for(var u in t)if(u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u))G(s,t,u)};Object.defineProperty(o,"__esModule",{value:!0});o.Allow=o.MalformedJSON=o.PartialJSON=o.parseJSON=o.parse=void 0;var n=R();Object.defineProperty(o,"Allow",{enumerable:!0,get:function(){return n.Allow}});H(R(),o);class B extends Error{}o.PartialJSON=B;class P extends Error{}o.MalformedJSON=P;function v(t,s=n.Allow.ALL){if(typeof t!=="string")throw TypeError(`expecting str, got ${typeof t}`);if(!t.trim())throw Error(`${t} is empty`);return K(t.trim(),s)}o.parseJSON=v;var K=(t,s)=>{let u=t.length,e=0,c=(a)=>{throw new B(`${a} at position ${e}`)},p=(a)=>{throw new P(`${a} at position ${e}`)},l=()=>{if(O(),e>=u)c("Unexpected end of input");if(t[e]==='"')return U();if(t[e]==="{")return D();if(t[e]==="[")return q();if(t.substring(e,e+4)==="null"||n.Allow.NULL&s&&u-e<4&&"null".startsWith(t.substring(e)))return e+=4,null;if(t.substring(e,e+4)==="true"||n.Allow.BOOL&s&&u-e<4&&"true".startsWith(t.substring(e)))return e+=4,!0;if(t.substring(e,e+5)==="false"||n.Allow.BOOL&s&&u-e<5&&"false".startsWith(t.substring(e)))return e+=5,!1;if(t.substring(e,e+8)==="Infinity"||n.Allow.INFINITY&s&&u-e<8&&"Infinity".startsWith(t.substring(e)))return e+=8,1/0;if(t.substring(e,e+9)==="-Infinity"||n.Allow._INFINITY&s&&1<u-e&&u-e<9&&"-Infinity".startsWith(t.substring(e)))return e+=9,-1/0;if(t.substring(e,e+3)==="NaN"||n.Allow.NAN&s&&u-e<3&&"NaN".startsWith(t.substring(e)))return e+=3,NaN;return V()},U=()=>{let a=e,f=!1;e++;while(e<u&&(t[e]!=='"'||f&&t[e-1]==="\\"))f=t[e]==="\\"?!f:!1,e++;if(t.charAt(e)=='"')try{return JSON.parse(t.substring(a,++e-Number(f)))}catch(N){p(String(N))}else if(n.Allow.STR&s)try{return JSON.parse(t.substring(a,e-Number(f))+'"')}catch(N){return JSON.parse(t.substring(a,t.lastIndexOf("\\"))+'"')}c("Unterminated string literal")},D=()=>{e++,O();let a={};try{while(t[e]!=="}"){if(O(),e>=u&&n.Allow.OBJ&s)return a;let f=U();O(),e++;try{let N=l();a[f]=N}catch(N){if(n.Allow.OBJ&s)return a;else throw N}if(O(),t[e]===",")e++}}catch(f){if(n.Allow.OBJ&s)return a;else c("Expected '}' at end of object")}return e++,a},q=()=>{e++;let a=[];try{while(t[e]!=="]")if(a.push(l()),O(),t[e]===",")e++}catch(f){if(n.Allow.ARR&s)return a;c("Expected ']' at end of array")}return e++,a},V=()=>{if(e===0){if(t==="-")p("Not sure what '-' is");try{return JSON.parse(t)}catch(f){if(n.Allow.NUM&s)try{return JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch(N){}p(String(f))}}let a=e;if(t[e]==="-")e++;while(t[e]&&",]}".indexOf(t[e])===-1)e++;if(e==u&&!(n.Allow.NUM&s))c("Unterminated number literal");try{return JSON.parse(t.substring(a,e))}catch(f){if(t.substring(a,e)==="-")c("Not sure what '-' is");try{return JSON.parse(t.substring(a,t.lastIndexOf("e")))}catch(N){p(String(N))}}},O=()=>{while(e<u&&`
|
|
3
|
+
\r `.includes(t[e]))e++};return l()},Q=v;o.parse=Q});var M=i(W(),1),X=new Set(['"',"\\","/","b","f","n","r","t","u"]);function Z(t){let s=t.codePointAt(0);return s!==void 0&&s>=0&&s<=31}function S(t){switch(t){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
4
|
+
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${t.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function Do(t){let s="",u=!1;for(let e=0;e<t.length;e++){let c=t[e];if(!u){if(s+=c,c==='"')u=!0;continue}if(c==='"'){s+=c,u=!1;continue}if(c==="\\"){let p=t[e+1];if(p===void 0){s+="\\\\";continue}if(p==="u"){let l=t.slice(e+2,e+6);if(/^[0-9a-fA-F]{4}$/.test(l)){s+=`\\u${l}`,e+=5;continue}}if(X.has(p)){s+=`\\${p}`,e+=1;continue}s+="\\\\";continue}s+=Z(c)?S(c):c}return s}function zr(t){try{return JSON.parse(t)}catch(s){let u=Do(t);if(u!==t)return JSON.parse(u);throw s}}function F(t){if(!t||t.trim()==="")return{};try{return zr(t)}catch{try{return M.parse(t)??{}}catch{try{return M.parse(Do(t))??{}}catch{return{}}}}}
|
|
5
|
+
export{Do,zr,F};
|