jialing-code 1.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/README.md +97 -0
- package/dist/chunk-065m026w.js +97 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0975ccyw.js +265 -0
- package/dist/chunk-09n3fjx5.js +67 -0
- package/dist/chunk-0bdjdzew.js +41 -0
- package/dist/chunk-0ce6kd7y.js +212 -0
- package/dist/chunk-0e1xsncc.js +969 -0
- package/dist/chunk-0m2861gw.js +154 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0rg6yrhy.js +99 -0
- package/dist/chunk-0sakxrcf.js +643 -0
- package/dist/chunk-0v9hwxvz.js +105 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0vvfnhhv.js +248 -0
- package/dist/chunk-0w4rsycj.js +145 -0
- package/dist/chunk-0x9b2nmd.js +63 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-13d1842d.js +154 -0
- package/dist/chunk-1921a6yb.js +32 -0
- package/dist/chunk-1ad8mk9g.js +527 -0
- package/dist/chunk-1ax41pws.js +28 -0
- package/dist/chunk-1c8z1b5v.js +16 -0
- package/dist/chunk-1cbn5kxf.js +7 -0
- package/dist/chunk-1eapde8a.js +726 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jggnf7z.js +85 -0
- package/dist/chunk-1k92pn9c.js +32 -0
- package/dist/chunk-1qakq4sn.js +802 -0
- package/dist/chunk-1rvz0433.js +722 -0
- package/dist/chunk-1xkekb9y.js +19 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-24ge0eqa.js +106 -0
- package/dist/chunk-278vghwm.js +5395 -0
- package/dist/chunk-27xc1csx.js +104 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2aa02aw6.js +438 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2sd2w2h4.js +44 -0
- package/dist/chunk-2tw2ve8h.js +145 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-3aavh06g.js +1581 -0
- package/dist/chunk-3b0yvt2h.js +469 -0
- package/dist/chunk-3be7ka25.js +56 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3dyxka97.js +584 -0
- package/dist/chunk-3f7rypmf.js +16544 -0
- package/dist/chunk-3fsd7f51.js +93 -0
- package/dist/chunk-3gqdqmzb.js +75 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3m84sret.js +71 -0
- package/dist/chunk-3nb7j3js.js +96 -0
- package/dist/chunk-3p08nvn2.js +98 -0
- package/dist/chunk-3r09htpc.js +318 -0
- package/dist/chunk-3r24h7t6.js +113 -0
- package/dist/chunk-3rkfxjtq.js +80 -0
- package/dist/chunk-3tmk7dc2.js +604 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-43qjymy5.js +92 -0
- package/dist/chunk-44fpr6jq.js +434 -0
- package/dist/chunk-45kxdsp8.js +444 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4ba796se.js +1095 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4h53xj8n.js +3445 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4jy9dtwk.js +116 -0
- package/dist/chunk-4p60dd45.js +55 -0
- package/dist/chunk-4z0jsrqg.js +81 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-55wgxwa9.js +13877 -0
- package/dist/chunk-5dbk24zg.js +890 -0
- package/dist/chunk-5hzvp4va.js +115 -0
- package/dist/chunk-5kbt1mbt.js +500 -0
- package/dist/chunk-5pen7vr8.js +176 -0
- package/dist/chunk-5r280eng.js +198 -0
- package/dist/chunk-5srym52s.js +88 -0
- package/dist/chunk-600kg7k6.js +41 -0
- package/dist/chunk-616w0qj3.js +160 -0
- package/dist/chunk-62jw1t8c.js +94 -0
- package/dist/chunk-62xmt9mk.js +372 -0
- package/dist/chunk-64bvg7c3.js +229 -0
- package/dist/chunk-65yhe4s0.js +281 -0
- package/dist/chunk-6aewh27m.js +102 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6exxdk1p.js +6956 -0
- package/dist/chunk-6f5j8fs0.js +752 -0
- package/dist/chunk-6g62sjpf.js +328 -0
- package/dist/chunk-6gecq2ta.js +1493 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6kpbgc5w.js +23 -0
- package/dist/chunk-6kseqw79.js +154 -0
- package/dist/chunk-6mxm1qd0.js +40764 -0
- package/dist/chunk-6n2qgm9v.js +8 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-6wsdhj3v.js +93 -0
- package/dist/chunk-6zw9fhgb.js +4389 -0
- package/dist/chunk-71grc1mw.js +111 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-748feghg.js +604 -0
- package/dist/chunk-75e8gtg9.js +84 -0
- package/dist/chunk-75th4717.js +780 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-778fnx46.js +472 -0
- package/dist/chunk-77g09znh.js +391 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7m2nd8da.js +110 -0
- package/dist/chunk-7n35vjtw.js +444 -0
- package/dist/chunk-7n5ss4sh.js +144 -0
- package/dist/chunk-7rjnxcfe.js +107 -0
- package/dist/chunk-7sb5axvf.js +122 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7ymfj7m3.js +151 -0
- package/dist/chunk-7z8j9qfn.js +121 -0
- package/dist/chunk-7zsapntc.js +216 -0
- package/dist/chunk-805fhkfh.js +908 -0
- package/dist/chunk-80k1nj24.js +253 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-85cypsdd.js +92 -0
- package/dist/chunk-8760caxf.js +2644 -0
- package/dist/chunk-88f6egg6.js +387 -0
- package/dist/chunk-88r7kwgj.js +22 -0
- package/dist/chunk-89e1v45e.js +463 -0
- package/dist/chunk-8bedvdm1.js +32 -0
- package/dist/chunk-8c4x4vdz.js +177 -0
- package/dist/chunk-8hq5kk3y.js +44 -0
- package/dist/chunk-8ngxagxq.js +18 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8wjnca8h.js +307 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-92bp5bnf.js +650 -0
- package/dist/chunk-92q8sx5z.js +90 -0
- package/dist/chunk-958rtmtx.js +10476 -0
- package/dist/chunk-9e2kqv5g.js +125 -0
- package/dist/chunk-9f4f1hy5.js +281 -0
- package/dist/chunk-9gbamk79.js +93 -0
- package/dist/chunk-9k5s3ryh.js +167 -0
- package/dist/chunk-9xzfqm15.js +97 -0
- package/dist/chunk-9zgdvbm6.js +110 -0
- package/dist/chunk-a0p3q8jw.js +24 -0
- package/dist/chunk-a22sayzp.js +220 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a8gj9d9z.js +120 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9yev47v.js +674 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-ack5mfba.js +105 -0
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-akjw4dh6.js +538 -0
- package/dist/chunk-asc6wz4q.js +1188 -0
- package/dist/chunk-atqejh3p.js +273 -0
- package/dist/chunk-atv2e6b7.js +61 -0
- package/dist/chunk-axvvkwz8.js +1551 -0
- package/dist/chunk-azgz7kj9.js +38 -0
- package/dist/chunk-b3zave8q.js +275 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b8b13qn2.js +100 -0
- package/dist/chunk-bg3mt9bm.js +28 -0
- package/dist/chunk-bh4jvcjn.js +91 -0
- package/dist/chunk-bhdt6k7w.js +15 -0
- package/dist/chunk-bm1qb16p.js +17 -0
- package/dist/chunk-bpvsd1j1.js +266 -0
- package/dist/chunk-bqfnp99q.js +477 -0
- package/dist/chunk-bsbmmfyt.js +17 -0
- package/dist/chunk-bsbt34jm.js +42 -0
- package/dist/chunk-c78akdhr.js +458 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-ckh4r5er.js +257 -0
- package/dist/chunk-cmgjnvn9.js +89 -0
- package/dist/chunk-cpjgvay8.js +687 -0
- package/dist/chunk-crfryjx9.js +276 -0
- package/dist/chunk-ctw5jwcd.js +213 -0
- package/dist/chunk-cvy3vntc.js +65 -0
- package/dist/chunk-cwbzz504.js +94 -0
- package/dist/chunk-cy2hswr1.js +15 -0
- package/dist/chunk-cyejkay3.js +222 -0
- package/dist/chunk-d18z9pna.js +106 -0
- package/dist/chunk-d5cq0n0v.js +162 -0
- package/dist/chunk-db45aryp.js +50 -0
- package/dist/chunk-de8nqh0z.js +790 -0
- package/dist/chunk-dfw6h350.js +2336 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dn75ptgd.js +184 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dpshyv9m.js +90 -0
- package/dist/chunk-dt8cdvnm.js +642 -0
- package/dist/chunk-dtxby6fr.js +306 -0
- package/dist/chunk-dv1wfr85.js +6373 -0
- package/dist/chunk-dw363edx.js +1154 -0
- package/dist/chunk-dwrdacck.js +62 -0
- package/dist/chunk-dxnnv5e3.js +276 -0
- package/dist/chunk-e3g8q4cn.js +1646 -0
- package/dist/chunk-e3m9k9s2.js +542 -0
- package/dist/chunk-e4q49asn.js +155 -0
- package/dist/chunk-e5pntxye.js +37 -0
- package/dist/chunk-e7393td6.js +42 -0
- package/dist/chunk-ead42yrh.js +87 -0
- package/dist/chunk-eb90vwvr.js +152 -0
- package/dist/chunk-ecvwk9hg.js +250 -0
- package/dist/chunk-edjd6aay.js +173 -0
- package/dist/chunk-eg0h8mtm.js +130 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-ek686gx1.js +94 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-evhwt0ar.js +1015 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-ewsgsw9h.js +172291 -0
- package/dist/chunk-f0pa0r7e.js +3198 -0
- package/dist/chunk-f2mhrmww.js +62 -0
- package/dist/chunk-f39zxvwn.js +401 -0
- package/dist/chunk-f46z54tq.js +374 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-f60q23az.js +3038 -0
- package/dist/chunk-f6v2nz57.js +107 -0
- package/dist/chunk-f6yjan38.js +38 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fem4s778.js +70 -0
- package/dist/chunk-fezm1kn8.js +376 -0
- package/dist/chunk-fm1n3ysp.js +6108 -0
- package/dist/chunk-frg83bfw.js +225 -0
- package/dist/chunk-fscm8db0.js +692 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-g0j0t6qk.js +26 -0
- package/dist/chunk-g0nc1ftf.js +849 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g3t0act8.js +8 -0
- package/dist/chunk-g75w4hw3.js +26 -0
- package/dist/chunk-g8vp82en.js +1866 -0
- package/dist/chunk-gax0fcbx.js +182 -0
- package/dist/chunk-gsz4dh3y.js +606 -0
- package/dist/chunk-gtfffm7h.js +440 -0
- package/dist/chunk-gver9zb9.js +420 -0
- package/dist/chunk-gyj242zr.js +20 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h14kemnk.js +123 -0
- package/dist/chunk-h8wj1a74.js +8960 -0
- package/dist/chunk-h9mcb2eg.js +87 -0
- package/dist/chunk-h9nh2980.js +91 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hbc6ymdv.js +55 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hjhc4cpt.js +69 -0
- package/dist/chunk-hjwez8qc.js +5018 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hqmz36b3.js +552 -0
- package/dist/chunk-hrzerbfw.js +1299 -0
- package/dist/chunk-hs8ph4p8.js +8 -0
- package/dist/chunk-ht1xwrnd.js +716 -0
- package/dist/chunk-hvmfg2dc.js +338 -0
- package/dist/chunk-hx2tr4ep.js +7189 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j49g6g3s.js +57 -0
- package/dist/chunk-j5d5hp9h.js +71 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j7tyxan1.js +116 -0
- package/dist/chunk-j8v4774z.js +424 -0
- package/dist/chunk-jafes477.js +29 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jftd4jq5.js +4521 -0
- package/dist/chunk-jkxqhv6y.js +812 -0
- package/dist/chunk-jmfr6h0n.js +120 -0
- package/dist/chunk-jn4aabmx.js +40 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jsbpm1gz.js +27 -0
- package/dist/chunk-jtcyjc3k.js +5802 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k3dcdnck.js +89 -0
- package/dist/chunk-k3wadzcd.js +88 -0
- package/dist/chunk-kaeshsk1.js +713 -0
- package/dist/chunk-kbkey9ed.js +522 -0
- package/dist/chunk-kcwfhqbb.js +196 -0
- package/dist/chunk-key6jr7p.js +224 -0
- package/dist/chunk-knay8cy9.js +173 -0
- package/dist/chunk-kr3rg2y1.js +95 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m06q12hg.js +61 -0
- package/dist/chunk-m2mcpbhk.js +43 -0
- package/dist/chunk-m8v220gz.js +71 -0
- package/dist/chunk-mgpqy78h.js +208 -0
- package/dist/chunk-mkejwh4t.js +16 -0
- package/dist/chunk-mptyw5n1.js +107 -0
- package/dist/chunk-mqajm0dp.js +66 -0
- package/dist/chunk-mrksbgxj.js +490 -0
- package/dist/chunk-msjfc5ba.js +246 -0
- package/dist/chunk-mt25echc.js +6157 -0
- package/dist/chunk-mt3jfnr8.js +277 -0
- package/dist/chunk-mtn242d4.js +9300 -0
- package/dist/chunk-mzfkvave.js +169 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n1erf6kh.js +22820 -0
- package/dist/chunk-n2avk1r2.js +61 -0
- package/dist/chunk-n6atnpcq.js +765 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-ncnfzby5.js +822 -0
- package/dist/chunk-ncnr1jtf.js +2058 -0
- package/dist/chunk-nerv0jvx.js +74 -0
- package/dist/chunk-ngd2abep.js +90 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nnaxkc2z.js +128 -0
- package/dist/chunk-npyrtj8j.js +691 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nrmffak7.js +114 -0
- package/dist/chunk-nsz546wq.js +1170 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nv64x1z5.js +86 -0
- package/dist/chunk-nxsh6de2.js +1711 -0
- package/dist/chunk-nz4getcr.js +40 -0
- package/dist/chunk-p1f607pa.js +83 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p4r5y02t.js +90 -0
- package/dist/chunk-p7g7pf3f.js +336 -0
- package/dist/chunk-pb4ad8r2.js +110 -0
- package/dist/chunk-pbrhz0zr.js +716 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pwnt3veb.js +103 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-px3w0kde.js +299 -0
- package/dist/chunk-pzn777jb.js +756 -0
- package/dist/chunk-q25bjaev.js +15 -0
- package/dist/chunk-q5by3da6.js +8 -0
- package/dist/chunk-q6av622g.js +38 -0
- package/dist/chunk-q6xkvtf2.js +1318 -0
- package/dist/chunk-q81jx1tq.js +476 -0
- package/dist/chunk-qehb6fk5.js +339 -0
- package/dist/chunk-qj1avx1q.js +87 -0
- package/dist/chunk-qn2dxr66.js +105 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp18kd4h.js +48 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qpjy9tcf.js +133 -0
- package/dist/chunk-qqfa0dqg.js +2343 -0
- package/dist/chunk-qwh3htcz.js +202 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-r3vakcs1.js +496 -0
- package/dist/chunk-r66hz8j6.js +34 -0
- package/dist/chunk-r6b58y3x.js +17 -0
- package/dist/chunk-rekp48rk.js +62 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rs1xrs6m.js +534 -0
- package/dist/chunk-rs45skes.js +123 -0
- package/dist/chunk-rzszqp82.js +524 -0
- package/dist/chunk-s274nv8k.js +8 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s9mesaw0.js +26840 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sdj9b9wh.js +782 -0
- package/dist/chunk-sdw2q69p.js +227 -0
- package/dist/chunk-sfgp9cc0.js +130 -0
- package/dist/chunk-spqaamnc.js +63 -0
- package/dist/chunk-spzrs4df.js +73 -0
- package/dist/chunk-sxkr7k43.js +55 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0rgmccj.js +39 -0
- package/dist/chunk-t1nnzjgg.js +17 -0
- package/dist/chunk-t94fcnt8.js +566 -0
- package/dist/chunk-tjaqa99q.js +125 -0
- package/dist/chunk-tjq2evtw.js +328 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tw0q7ynt.js +59 -0
- package/dist/chunk-v02jkvgy.js +131 -0
- package/dist/chunk-v084bqt3.js +1529 -0
- package/dist/chunk-v0amythm.js +164 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v1mgv1et.js +15 -0
- package/dist/chunk-v399mzxk.js +58 -0
- package/dist/chunk-v3gm2day.js +8 -0
- package/dist/chunk-v43hrrxp.js +71 -0
- package/dist/chunk-v6aqb2aj.js +102 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v7qmhjdn.js +1921 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-vdw93s4h.js +2431 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vratq94g.js +349 -0
- package/dist/chunk-vrz7t3m3.js +20 -0
- package/dist/chunk-vtb185z9.js +70 -0
- package/dist/chunk-vx01rvg8.js +654 -0
- package/dist/chunk-vyc0rjyx.js +31 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vzpffsza.js +269 -0
- package/dist/chunk-w2ef3kxk.js +3353 -0
- package/dist/chunk-w2z5pqd3.js +336 -0
- package/dist/chunk-w3whm4mn.js +432 -0
- package/dist/chunk-w7wgpqcp.js +157 -0
- package/dist/chunk-waa00cvb.js +301 -0
- package/dist/chunk-wb0qm4es.js +155 -0
- package/dist/chunk-wbkahkdc.js +27 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wn0cx0pt.js +283 -0
- package/dist/chunk-wv6gzt9c.js +726 -0
- package/dist/chunk-wx42ycm4.js +998 -0
- package/dist/chunk-wxkpgy05.js +268 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x0mwzt38.js +714 -0
- package/dist/chunk-x592wbfh.js +244 -0
- package/dist/chunk-x5pqsp9r.js +100 -0
- package/dist/chunk-x679thag.js +825 -0
- package/dist/chunk-x8b7vft8.js +132 -0
- package/dist/chunk-x8cftch7.js +119 -0
- package/dist/chunk-x9q7r885.js +348 -0
- package/dist/chunk-xawkt0vb.js +1585 -0
- package/dist/chunk-xdw5dv00.js +8 -0
- package/dist/chunk-xe9cc860.js +287 -0
- package/dist/chunk-xjr9c3vt.js +101 -0
- package/dist/chunk-xk7zaqta.js +21933 -0
- package/dist/chunk-xktbmawc.js +678 -0
- package/dist/chunk-xn6yw46v.js +140 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xszk7n10.js +14358 -0
- package/dist/chunk-xt8a5r1t.js +84 -0
- package/dist/chunk-xydyndkv.js +195 -0
- package/dist/chunk-xzt10yc5.js +60 -0
- package/dist/chunk-y04y95dr.js +91 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y1x32h3x.js +128 -0
- package/dist/chunk-y3s7aww5.js +99 -0
- package/dist/chunk-y47cg3kz.js +42 -0
- package/dist/chunk-y7kzvepn.js +469 -0
- package/dist/chunk-y89kbsyc.js +287 -0
- package/dist/chunk-yd87p1c3.js +159 -0
- package/dist/chunk-yf3yw8fw.js +105 -0
- package/dist/chunk-ygbf0ezx.js +1391 -0
- package/dist/chunk-yjbxnshv.js +208 -0
- package/dist/chunk-ynednmqd.js +192 -0
- package/dist/chunk-yvhez44y.js +259 -0
- package/dist/chunk-ywxd4qw4.js +22 -0
- package/dist/chunk-yzrmgpy4.js +117 -0
- package/dist/chunk-z0b2vb24.js +862 -0
- package/dist/chunk-z1zj044v.js +655 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z3w0xasa.js +165 -0
- package/dist/chunk-z7ycmrb3.js +644 -0
- package/dist/chunk-zh11tdkb.js +347 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-zqfqcf22.js +229 -0
- package/dist/chunk-zqk2j8px.js +699 -0
- package/dist/chunk-zqvsc10j.js +2833 -0
- package/dist/chunk-zsfxha74.js +17655 -0
- package/dist/chunk-zvc4snyb.js +117 -0
- package/dist/cli.js +194 -0
- package/package.json +173 -0
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
require_dist_cjs as require_dist_cjs8
|
|
4
|
+
} from "./chunk-p2d5nh3g.js";
|
|
5
|
+
import {
|
|
6
|
+
require_dist_cjs2 as require_dist_cjs6,
|
|
7
|
+
require_dist_cjs4 as require_dist_cjs7
|
|
8
|
+
} from "./chunk-wfz0qffj.js";
|
|
9
|
+
import {
|
|
10
|
+
require_client
|
|
11
|
+
} from "./chunk-b4wg70y1.js";
|
|
12
|
+
import {
|
|
13
|
+
require_dist_cjs as require_dist_cjs2
|
|
14
|
+
} from "./chunk-nka1g8f4.js";
|
|
15
|
+
import {
|
|
16
|
+
require_dist_cjs
|
|
17
|
+
} from "./chunk-30rst83v.js";
|
|
18
|
+
import {
|
|
19
|
+
require_dist_cjs as require_dist_cjs3
|
|
20
|
+
} from "./chunk-hk9xz7gk.js";
|
|
21
|
+
import {
|
|
22
|
+
require_dist_cjs as require_dist_cjs4,
|
|
23
|
+
require_dist_cjs2 as require_dist_cjs5
|
|
24
|
+
} from "./chunk-2nayx6q1.js";
|
|
25
|
+
import {
|
|
26
|
+
__commonJS
|
|
27
|
+
} from "./chunk-qp2qdcda.js";
|
|
28
|
+
|
|
29
|
+
// node_modules/.bun/@smithy+signature-v4@5.3.12/node_modules/@smithy/signature-v4/dist-cjs/index.js
|
|
30
|
+
var require_dist_cjs9 = __commonJS((exports) => {
|
|
31
|
+
var utilHexEncoding = require_dist_cjs6();
|
|
32
|
+
var utilUtf8 = require_dist_cjs5();
|
|
33
|
+
var isArrayBuffer = require_dist_cjs4();
|
|
34
|
+
var protocolHttp = require_dist_cjs();
|
|
35
|
+
var utilMiddleware = require_dist_cjs7();
|
|
36
|
+
var utilUriEscape = require_dist_cjs2();
|
|
37
|
+
var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
|
|
38
|
+
var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
|
|
39
|
+
var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
|
|
40
|
+
var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
|
|
41
|
+
var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
|
|
42
|
+
var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
|
|
43
|
+
var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
|
|
44
|
+
var REGION_SET_PARAM = "X-Amz-Region-Set";
|
|
45
|
+
var AUTH_HEADER = "authorization";
|
|
46
|
+
var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
|
|
47
|
+
var DATE_HEADER = "date";
|
|
48
|
+
var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
|
|
49
|
+
var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
|
|
50
|
+
var SHA256_HEADER = "x-amz-content-sha256";
|
|
51
|
+
var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
|
|
52
|
+
var HOST_HEADER = "host";
|
|
53
|
+
var ALWAYS_UNSIGNABLE_HEADERS = {
|
|
54
|
+
authorization: true,
|
|
55
|
+
"cache-control": true,
|
|
56
|
+
connection: true,
|
|
57
|
+
expect: true,
|
|
58
|
+
from: true,
|
|
59
|
+
"keep-alive": true,
|
|
60
|
+
"max-forwards": true,
|
|
61
|
+
pragma: true,
|
|
62
|
+
referer: true,
|
|
63
|
+
te: true,
|
|
64
|
+
trailer: true,
|
|
65
|
+
"transfer-encoding": true,
|
|
66
|
+
upgrade: true,
|
|
67
|
+
"user-agent": true,
|
|
68
|
+
"x-amzn-trace-id": true
|
|
69
|
+
};
|
|
70
|
+
var PROXY_HEADER_PATTERN = /^proxy-/;
|
|
71
|
+
var SEC_HEADER_PATTERN = /^sec-/;
|
|
72
|
+
var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];
|
|
73
|
+
var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
|
|
74
|
+
var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256";
|
|
75
|
+
var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
|
|
76
|
+
var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
77
|
+
var MAX_CACHE_SIZE = 50;
|
|
78
|
+
var KEY_TYPE_IDENTIFIER = "aws4_request";
|
|
79
|
+
var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
|
|
80
|
+
var signingKeyCache = {};
|
|
81
|
+
var cacheQueue = [];
|
|
82
|
+
var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
|
|
83
|
+
var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
|
|
84
|
+
const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
|
|
85
|
+
const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`;
|
|
86
|
+
if (cacheKey in signingKeyCache) {
|
|
87
|
+
return signingKeyCache[cacheKey];
|
|
88
|
+
}
|
|
89
|
+
cacheQueue.push(cacheKey);
|
|
90
|
+
while (cacheQueue.length > MAX_CACHE_SIZE) {
|
|
91
|
+
delete signingKeyCache[cacheQueue.shift()];
|
|
92
|
+
}
|
|
93
|
+
let key = `AWS4${credentials.secretAccessKey}`;
|
|
94
|
+
for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
|
|
95
|
+
key = await hmac(sha256Constructor, key, signable);
|
|
96
|
+
}
|
|
97
|
+
return signingKeyCache[cacheKey] = key;
|
|
98
|
+
};
|
|
99
|
+
var clearCredentialCache = () => {
|
|
100
|
+
cacheQueue.length = 0;
|
|
101
|
+
Object.keys(signingKeyCache).forEach((cacheKey) => {
|
|
102
|
+
delete signingKeyCache[cacheKey];
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
var hmac = (ctor, secret, data) => {
|
|
106
|
+
const hash = new ctor(secret);
|
|
107
|
+
hash.update(utilUtf8.toUint8Array(data));
|
|
108
|
+
return hash.digest();
|
|
109
|
+
};
|
|
110
|
+
var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
|
|
111
|
+
const canonical = {};
|
|
112
|
+
for (const headerName of Object.keys(headers).sort()) {
|
|
113
|
+
if (headers[headerName] == undefined) {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const canonicalHeaderName = headerName.toLowerCase();
|
|
117
|
+
if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
|
|
118
|
+
if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
|
|
123
|
+
}
|
|
124
|
+
return canonical;
|
|
125
|
+
};
|
|
126
|
+
var getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
127
|
+
for (const headerName of Object.keys(headers)) {
|
|
128
|
+
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
129
|
+
return headers[headerName];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (body == undefined) {
|
|
133
|
+
return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
134
|
+
} else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) {
|
|
135
|
+
const hashCtor = new hashConstructor;
|
|
136
|
+
hashCtor.update(utilUtf8.toUint8Array(body));
|
|
137
|
+
return utilHexEncoding.toHex(await hashCtor.digest());
|
|
138
|
+
}
|
|
139
|
+
return UNSIGNED_PAYLOAD;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
class HeaderFormatter {
|
|
143
|
+
format(headers) {
|
|
144
|
+
const chunks = [];
|
|
145
|
+
for (const headerName of Object.keys(headers)) {
|
|
146
|
+
const bytes = utilUtf8.fromUtf8(headerName);
|
|
147
|
+
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
148
|
+
}
|
|
149
|
+
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
150
|
+
let position = 0;
|
|
151
|
+
for (const chunk of chunks) {
|
|
152
|
+
out.set(chunk, position);
|
|
153
|
+
position += chunk.byteLength;
|
|
154
|
+
}
|
|
155
|
+
return out;
|
|
156
|
+
}
|
|
157
|
+
formatHeaderValue(header) {
|
|
158
|
+
switch (header.type) {
|
|
159
|
+
case "boolean":
|
|
160
|
+
return Uint8Array.from([header.value ? 0 : 1]);
|
|
161
|
+
case "byte":
|
|
162
|
+
return Uint8Array.from([2, header.value]);
|
|
163
|
+
case "short":
|
|
164
|
+
const shortView = new DataView(new ArrayBuffer(3));
|
|
165
|
+
shortView.setUint8(0, 3);
|
|
166
|
+
shortView.setInt16(1, header.value, false);
|
|
167
|
+
return new Uint8Array(shortView.buffer);
|
|
168
|
+
case "integer":
|
|
169
|
+
const intView = new DataView(new ArrayBuffer(5));
|
|
170
|
+
intView.setUint8(0, 4);
|
|
171
|
+
intView.setInt32(1, header.value, false);
|
|
172
|
+
return new Uint8Array(intView.buffer);
|
|
173
|
+
case "long":
|
|
174
|
+
const longBytes = new Uint8Array(9);
|
|
175
|
+
longBytes[0] = 5;
|
|
176
|
+
longBytes.set(header.value.bytes, 1);
|
|
177
|
+
return longBytes;
|
|
178
|
+
case "binary":
|
|
179
|
+
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
180
|
+
binView.setUint8(0, 6);
|
|
181
|
+
binView.setUint16(1, header.value.byteLength, false);
|
|
182
|
+
const binBytes = new Uint8Array(binView.buffer);
|
|
183
|
+
binBytes.set(header.value, 3);
|
|
184
|
+
return binBytes;
|
|
185
|
+
case "string":
|
|
186
|
+
const utf8Bytes = utilUtf8.fromUtf8(header.value);
|
|
187
|
+
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
188
|
+
strView.setUint8(0, 7);
|
|
189
|
+
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
190
|
+
const strBytes = new Uint8Array(strView.buffer);
|
|
191
|
+
strBytes.set(utf8Bytes, 3);
|
|
192
|
+
return strBytes;
|
|
193
|
+
case "timestamp":
|
|
194
|
+
const tsBytes = new Uint8Array(9);
|
|
195
|
+
tsBytes[0] = 8;
|
|
196
|
+
tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
|
|
197
|
+
return tsBytes;
|
|
198
|
+
case "uuid":
|
|
199
|
+
if (!UUID_PATTERN.test(header.value)) {
|
|
200
|
+
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
201
|
+
}
|
|
202
|
+
const uuidBytes = new Uint8Array(17);
|
|
203
|
+
uuidBytes[0] = 9;
|
|
204
|
+
uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1);
|
|
205
|
+
return uuidBytes;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
210
|
+
|
|
211
|
+
class Int64 {
|
|
212
|
+
bytes;
|
|
213
|
+
constructor(bytes) {
|
|
214
|
+
this.bytes = bytes;
|
|
215
|
+
if (bytes.byteLength !== 8) {
|
|
216
|
+
throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
static fromNumber(number) {
|
|
220
|
+
if (number > 9223372036854776000 || number < -9223372036854776000) {
|
|
221
|
+
throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
222
|
+
}
|
|
223
|
+
const bytes = new Uint8Array(8);
|
|
224
|
+
for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
|
|
225
|
+
bytes[i] = remaining;
|
|
226
|
+
}
|
|
227
|
+
if (number < 0) {
|
|
228
|
+
negate(bytes);
|
|
229
|
+
}
|
|
230
|
+
return new Int64(bytes);
|
|
231
|
+
}
|
|
232
|
+
valueOf() {
|
|
233
|
+
const bytes = this.bytes.slice(0);
|
|
234
|
+
const negative = bytes[0] & 128;
|
|
235
|
+
if (negative) {
|
|
236
|
+
negate(bytes);
|
|
237
|
+
}
|
|
238
|
+
return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1);
|
|
239
|
+
}
|
|
240
|
+
toString() {
|
|
241
|
+
return String(this.valueOf());
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function negate(bytes) {
|
|
245
|
+
for (let i = 0;i < 8; i++) {
|
|
246
|
+
bytes[i] ^= 255;
|
|
247
|
+
}
|
|
248
|
+
for (let i = 7;i > -1; i--) {
|
|
249
|
+
bytes[i]++;
|
|
250
|
+
if (bytes[i] !== 0)
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
var hasHeader = (soughtHeader, headers) => {
|
|
255
|
+
soughtHeader = soughtHeader.toLowerCase();
|
|
256
|
+
for (const headerName of Object.keys(headers)) {
|
|
257
|
+
if (soughtHeader === headerName.toLowerCase()) {
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return false;
|
|
262
|
+
};
|
|
263
|
+
var moveHeadersToQuery = (request, options = {}) => {
|
|
264
|
+
const { headers, query = {} } = protocolHttp.HttpRequest.clone(request);
|
|
265
|
+
for (const name of Object.keys(headers)) {
|
|
266
|
+
const lname = name.toLowerCase();
|
|
267
|
+
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
|
268
|
+
query[name] = headers[name];
|
|
269
|
+
delete headers[name];
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
...request,
|
|
274
|
+
headers,
|
|
275
|
+
query
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
var prepareRequest = (request) => {
|
|
279
|
+
request = protocolHttp.HttpRequest.clone(request);
|
|
280
|
+
for (const headerName of Object.keys(request.headers)) {
|
|
281
|
+
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
282
|
+
delete request.headers[headerName];
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return request;
|
|
286
|
+
};
|
|
287
|
+
var getCanonicalQuery = ({ query = {} }) => {
|
|
288
|
+
const keys = [];
|
|
289
|
+
const serialized = {};
|
|
290
|
+
for (const key of Object.keys(query)) {
|
|
291
|
+
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
const encodedKey = utilUriEscape.escapeUri(key);
|
|
295
|
+
keys.push(encodedKey);
|
|
296
|
+
const value = query[key];
|
|
297
|
+
if (typeof value === "string") {
|
|
298
|
+
serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`;
|
|
299
|
+
} else if (Array.isArray(value)) {
|
|
300
|
+
serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value2)}`]), []).sort().join("&");
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
|
|
304
|
+
};
|
|
305
|
+
var iso8601 = (time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
306
|
+
var toDate = (time) => {
|
|
307
|
+
if (typeof time === "number") {
|
|
308
|
+
return new Date(time * 1000);
|
|
309
|
+
}
|
|
310
|
+
if (typeof time === "string") {
|
|
311
|
+
if (Number(time)) {
|
|
312
|
+
return new Date(Number(time) * 1000);
|
|
313
|
+
}
|
|
314
|
+
return new Date(time);
|
|
315
|
+
}
|
|
316
|
+
return time;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
class SignatureV4Base {
|
|
320
|
+
service;
|
|
321
|
+
regionProvider;
|
|
322
|
+
credentialProvider;
|
|
323
|
+
sha256;
|
|
324
|
+
uriEscapePath;
|
|
325
|
+
applyChecksum;
|
|
326
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
327
|
+
this.service = service;
|
|
328
|
+
this.sha256 = sha256;
|
|
329
|
+
this.uriEscapePath = uriEscapePath;
|
|
330
|
+
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
|
|
331
|
+
this.regionProvider = utilMiddleware.normalizeProvider(region);
|
|
332
|
+
this.credentialProvider = utilMiddleware.normalizeProvider(credentials);
|
|
333
|
+
}
|
|
334
|
+
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
|
|
335
|
+
const sortedHeaders = Object.keys(canonicalHeaders).sort();
|
|
336
|
+
return `${request.method}
|
|
337
|
+
${this.getCanonicalPath(request)}
|
|
338
|
+
${getCanonicalQuery(request)}
|
|
339
|
+
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(`
|
|
340
|
+
`)}
|
|
341
|
+
|
|
342
|
+
${sortedHeaders.join(";")}
|
|
343
|
+
${payloadHash}`;
|
|
344
|
+
}
|
|
345
|
+
async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
|
|
346
|
+
const hash = new this.sha256;
|
|
347
|
+
hash.update(utilUtf8.toUint8Array(canonicalRequest));
|
|
348
|
+
const hashedRequest = await hash.digest();
|
|
349
|
+
return `${algorithmIdentifier}
|
|
350
|
+
${longDate}
|
|
351
|
+
${credentialScope}
|
|
352
|
+
${utilHexEncoding.toHex(hashedRequest)}`;
|
|
353
|
+
}
|
|
354
|
+
getCanonicalPath({ path }) {
|
|
355
|
+
if (this.uriEscapePath) {
|
|
356
|
+
const normalizedPathSegments = [];
|
|
357
|
+
for (const pathSegment of path.split("/")) {
|
|
358
|
+
if (pathSegment?.length === 0)
|
|
359
|
+
continue;
|
|
360
|
+
if (pathSegment === ".")
|
|
361
|
+
continue;
|
|
362
|
+
if (pathSegment === "..") {
|
|
363
|
+
normalizedPathSegments.pop();
|
|
364
|
+
} else {
|
|
365
|
+
normalizedPathSegments.push(pathSegment);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
|
|
369
|
+
const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
|
|
370
|
+
return doubleEncoded.replace(/%2F/g, "/");
|
|
371
|
+
}
|
|
372
|
+
return path;
|
|
373
|
+
}
|
|
374
|
+
validateResolvedCredentials(credentials) {
|
|
375
|
+
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
376
|
+
throw new Error("Resolved credential object is not valid");
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
formatDate(now) {
|
|
380
|
+
const longDate = iso8601(now).replace(/[\-:]/g, "");
|
|
381
|
+
return {
|
|
382
|
+
longDate,
|
|
383
|
+
shortDate: longDate.slice(0, 8)
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
getCanonicalHeaderList(headers) {
|
|
387
|
+
return Object.keys(headers).sort().join(";");
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
class SignatureV4 extends SignatureV4Base {
|
|
392
|
+
headerFormatter = new HeaderFormatter;
|
|
393
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
394
|
+
super({
|
|
395
|
+
applyChecksum,
|
|
396
|
+
credentials,
|
|
397
|
+
region,
|
|
398
|
+
service,
|
|
399
|
+
sha256,
|
|
400
|
+
uriEscapePath
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
async presign(originalRequest, options = {}) {
|
|
404
|
+
const { signingDate = new Date, expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options;
|
|
405
|
+
const credentials = await this.credentialProvider();
|
|
406
|
+
this.validateResolvedCredentials(credentials);
|
|
407
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
408
|
+
const { longDate, shortDate } = this.formatDate(signingDate);
|
|
409
|
+
if (expiresIn > MAX_PRESIGNED_TTL) {
|
|
410
|
+
return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future");
|
|
411
|
+
}
|
|
412
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
413
|
+
const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });
|
|
414
|
+
if (credentials.sessionToken) {
|
|
415
|
+
request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
|
|
416
|
+
}
|
|
417
|
+
request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;
|
|
418
|
+
request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
|
|
419
|
+
request.query[AMZ_DATE_QUERY_PARAM] = longDate;
|
|
420
|
+
request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
|
|
421
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
422
|
+
request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);
|
|
423
|
+
request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
|
|
424
|
+
return request;
|
|
425
|
+
}
|
|
426
|
+
async sign(toSign, options) {
|
|
427
|
+
if (typeof toSign === "string") {
|
|
428
|
+
return this.signString(toSign, options);
|
|
429
|
+
} else if (toSign.headers && toSign.payload) {
|
|
430
|
+
return this.signEvent(toSign, options);
|
|
431
|
+
} else if (toSign.message) {
|
|
432
|
+
return this.signMessage(toSign, options);
|
|
433
|
+
} else {
|
|
434
|
+
return this.signRequest(toSign, options);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
async signEvent({ headers, payload }, { signingDate = new Date, priorSignature, signingRegion, signingService }) {
|
|
438
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
439
|
+
const { shortDate, longDate } = this.formatDate(signingDate);
|
|
440
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
441
|
+
const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
|
|
442
|
+
const hash = new this.sha256;
|
|
443
|
+
hash.update(headers);
|
|
444
|
+
const hashedHeaders = utilHexEncoding.toHex(await hash.digest());
|
|
445
|
+
const stringToSign = [
|
|
446
|
+
EVENT_ALGORITHM_IDENTIFIER,
|
|
447
|
+
longDate,
|
|
448
|
+
scope,
|
|
449
|
+
priorSignature,
|
|
450
|
+
hashedHeaders,
|
|
451
|
+
hashedPayload
|
|
452
|
+
].join(`
|
|
453
|
+
`);
|
|
454
|
+
return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });
|
|
455
|
+
}
|
|
456
|
+
async signMessage(signableMessage, { signingDate = new Date, signingRegion, signingService }) {
|
|
457
|
+
const promise = this.signEvent({
|
|
458
|
+
headers: this.headerFormatter.format(signableMessage.message.headers),
|
|
459
|
+
payload: signableMessage.message.body
|
|
460
|
+
}, {
|
|
461
|
+
signingDate,
|
|
462
|
+
signingRegion,
|
|
463
|
+
signingService,
|
|
464
|
+
priorSignature: signableMessage.priorSignature
|
|
465
|
+
});
|
|
466
|
+
return promise.then((signature) => {
|
|
467
|
+
return { message: signableMessage.message, signature };
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
async signString(stringToSign, { signingDate = new Date, signingRegion, signingService } = {}) {
|
|
471
|
+
const credentials = await this.credentialProvider();
|
|
472
|
+
this.validateResolvedCredentials(credentials);
|
|
473
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
474
|
+
const { shortDate } = this.formatDate(signingDate);
|
|
475
|
+
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
|
|
476
|
+
hash.update(utilUtf8.toUint8Array(stringToSign));
|
|
477
|
+
return utilHexEncoding.toHex(await hash.digest());
|
|
478
|
+
}
|
|
479
|
+
async signRequest(requestToSign, { signingDate = new Date, signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
|
|
480
|
+
const credentials = await this.credentialProvider();
|
|
481
|
+
this.validateResolvedCredentials(credentials);
|
|
482
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
483
|
+
const request = prepareRequest(requestToSign);
|
|
484
|
+
const { longDate, shortDate } = this.formatDate(signingDate);
|
|
485
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
486
|
+
request.headers[AMZ_DATE_HEADER] = longDate;
|
|
487
|
+
if (credentials.sessionToken) {
|
|
488
|
+
request.headers[TOKEN_HEADER] = credentials.sessionToken;
|
|
489
|
+
}
|
|
490
|
+
const payloadHash = await getPayloadHash(request, this.sha256);
|
|
491
|
+
if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {
|
|
492
|
+
request.headers[SHA256_HEADER] = payloadHash;
|
|
493
|
+
}
|
|
494
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
495
|
+
const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
|
|
496
|
+
request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} ` + `Credential=${credentials.accessKeyId}/${scope}, ` + `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` + `Signature=${signature}`;
|
|
497
|
+
return request;
|
|
498
|
+
}
|
|
499
|
+
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
|
|
500
|
+
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
|
|
501
|
+
const hash = new this.sha256(await keyPromise);
|
|
502
|
+
hash.update(utilUtf8.toUint8Array(stringToSign));
|
|
503
|
+
return utilHexEncoding.toHex(await hash.digest());
|
|
504
|
+
}
|
|
505
|
+
getSigningKey(credentials, region, shortDate, service) {
|
|
506
|
+
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
var signatureV4aContainer = {
|
|
510
|
+
SignatureV4a: null
|
|
511
|
+
};
|
|
512
|
+
exports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER;
|
|
513
|
+
exports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A;
|
|
514
|
+
exports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM;
|
|
515
|
+
exports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS;
|
|
516
|
+
exports.AMZ_DATE_HEADER = AMZ_DATE_HEADER;
|
|
517
|
+
exports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM;
|
|
518
|
+
exports.AUTH_HEADER = AUTH_HEADER;
|
|
519
|
+
exports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM;
|
|
520
|
+
exports.DATE_HEADER = DATE_HEADER;
|
|
521
|
+
exports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER;
|
|
522
|
+
exports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM;
|
|
523
|
+
exports.GENERATED_HEADERS = GENERATED_HEADERS;
|
|
524
|
+
exports.HOST_HEADER = HOST_HEADER;
|
|
525
|
+
exports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER;
|
|
526
|
+
exports.MAX_CACHE_SIZE = MAX_CACHE_SIZE;
|
|
527
|
+
exports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL;
|
|
528
|
+
exports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN;
|
|
529
|
+
exports.REGION_SET_PARAM = REGION_SET_PARAM;
|
|
530
|
+
exports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN;
|
|
531
|
+
exports.SHA256_HEADER = SHA256_HEADER;
|
|
532
|
+
exports.SIGNATURE_HEADER = SIGNATURE_HEADER;
|
|
533
|
+
exports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM;
|
|
534
|
+
exports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM;
|
|
535
|
+
exports.SignatureV4 = SignatureV4;
|
|
536
|
+
exports.SignatureV4Base = SignatureV4Base;
|
|
537
|
+
exports.TOKEN_HEADER = TOKEN_HEADER;
|
|
538
|
+
exports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM;
|
|
539
|
+
exports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS;
|
|
540
|
+
exports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD;
|
|
541
|
+
exports.clearCredentialCache = clearCredentialCache;
|
|
542
|
+
exports.createScope = createScope;
|
|
543
|
+
exports.getCanonicalHeaders = getCanonicalHeaders;
|
|
544
|
+
exports.getCanonicalQuery = getCanonicalQuery;
|
|
545
|
+
exports.getPayloadHash = getPayloadHash;
|
|
546
|
+
exports.getSigningKey = getSigningKey;
|
|
547
|
+
exports.hasHeader = hasHeader;
|
|
548
|
+
exports.moveHeadersToQuery = moveHeadersToQuery;
|
|
549
|
+
exports.prepareRequest = prepareRequest;
|
|
550
|
+
exports.signatureV4aContainer = signatureV4aContainer;
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
// node_modules/.bun/@aws-sdk+core@3.973.26/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js
|
|
554
|
+
var require_httpAuthSchemes = __commonJS((exports) => {
|
|
555
|
+
var protocolHttp = require_dist_cjs();
|
|
556
|
+
var core = require_dist_cjs8();
|
|
557
|
+
var propertyProvider = require_dist_cjs3();
|
|
558
|
+
var client = require_client();
|
|
559
|
+
var signatureV4 = require_dist_cjs9();
|
|
560
|
+
var getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;
|
|
561
|
+
var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
|
|
562
|
+
var isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;
|
|
563
|
+
var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
|
|
564
|
+
const clockTimeInMs = Date.parse(clockTime);
|
|
565
|
+
if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
|
|
566
|
+
return clockTimeInMs - Date.now();
|
|
567
|
+
}
|
|
568
|
+
return currentSystemClockOffset;
|
|
569
|
+
};
|
|
570
|
+
var throwSigningPropertyError = (name, property) => {
|
|
571
|
+
if (!property) {
|
|
572
|
+
throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
|
|
573
|
+
}
|
|
574
|
+
return property;
|
|
575
|
+
};
|
|
576
|
+
var validateSigningProperties = async (signingProperties) => {
|
|
577
|
+
const context = throwSigningPropertyError("context", signingProperties.context);
|
|
578
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
579
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
|
580
|
+
const signerFunction = throwSigningPropertyError("signer", config.signer);
|
|
581
|
+
const signer = await signerFunction(authScheme);
|
|
582
|
+
const signingRegion = signingProperties?.signingRegion;
|
|
583
|
+
const signingRegionSet = signingProperties?.signingRegionSet;
|
|
584
|
+
const signingName = signingProperties?.signingName;
|
|
585
|
+
return {
|
|
586
|
+
config,
|
|
587
|
+
signer,
|
|
588
|
+
signingRegion,
|
|
589
|
+
signingRegionSet,
|
|
590
|
+
signingName
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
class AwsSdkSigV4Signer {
|
|
595
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
596
|
+
if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {
|
|
597
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
598
|
+
}
|
|
599
|
+
const validatedProps = await validateSigningProperties(signingProperties);
|
|
600
|
+
const { config, signer } = validatedProps;
|
|
601
|
+
let { signingRegion, signingName } = validatedProps;
|
|
602
|
+
const handlerExecutionContext = signingProperties.context;
|
|
603
|
+
if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
|
|
604
|
+
const [first, second] = handlerExecutionContext.authSchemes;
|
|
605
|
+
if (first?.name === "sigv4a" && second?.name === "sigv4") {
|
|
606
|
+
signingRegion = second?.signingRegion ?? signingRegion;
|
|
607
|
+
signingName = second?.signingName ?? signingName;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
const signedRequest = await signer.sign(httpRequest, {
|
|
611
|
+
signingDate: getSkewCorrectedDate(config.systemClockOffset),
|
|
612
|
+
signingRegion,
|
|
613
|
+
signingService: signingName
|
|
614
|
+
});
|
|
615
|
+
return signedRequest;
|
|
616
|
+
}
|
|
617
|
+
errorHandler(signingProperties) {
|
|
618
|
+
return (error) => {
|
|
619
|
+
const serverTime = error.ServerTime ?? getDateHeader(error.$response);
|
|
620
|
+
if (serverTime) {
|
|
621
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
622
|
+
const initialSystemClockOffset = config.systemClockOffset;
|
|
623
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
|
|
624
|
+
const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
|
|
625
|
+
if (clockSkewCorrected && error.$metadata) {
|
|
626
|
+
error.$metadata.clockSkewCorrected = true;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
throw error;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
successHandler(httpResponse, signingProperties) {
|
|
633
|
+
const dateHeader = getDateHeader(httpResponse);
|
|
634
|
+
if (dateHeader) {
|
|
635
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
636
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
var AWSSDKSigV4Signer = AwsSdkSigV4Signer;
|
|
641
|
+
|
|
642
|
+
class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
|
|
643
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
644
|
+
if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {
|
|
645
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
646
|
+
}
|
|
647
|
+
const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
|
|
648
|
+
const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
|
|
649
|
+
const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(",");
|
|
650
|
+
const signedRequest = await signer.sign(httpRequest, {
|
|
651
|
+
signingDate: getSkewCorrectedDate(config.systemClockOffset),
|
|
652
|
+
signingRegion: multiRegionOverride,
|
|
653
|
+
signingService: signingName
|
|
654
|
+
});
|
|
655
|
+
return signedRequest;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
var getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
|
|
659
|
+
var getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
|
|
660
|
+
var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
|
|
661
|
+
var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
|
|
662
|
+
var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
|
|
663
|
+
environmentVariableSelector: (env, options) => {
|
|
664
|
+
if (options?.signingName) {
|
|
665
|
+
const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
|
|
666
|
+
if (bearerTokenKey in env)
|
|
667
|
+
return ["httpBearerAuth"];
|
|
668
|
+
}
|
|
669
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))
|
|
670
|
+
return;
|
|
671
|
+
return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
|
|
672
|
+
},
|
|
673
|
+
configFileSelector: (profile) => {
|
|
674
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
|
|
675
|
+
return;
|
|
676
|
+
return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
|
|
677
|
+
},
|
|
678
|
+
default: []
|
|
679
|
+
};
|
|
680
|
+
var resolveAwsSdkSigV4AConfig = (config) => {
|
|
681
|
+
config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet);
|
|
682
|
+
return config;
|
|
683
|
+
};
|
|
684
|
+
var NODE_SIGV4A_CONFIG_OPTIONS = {
|
|
685
|
+
environmentVariableSelector(env) {
|
|
686
|
+
if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
|
|
687
|
+
return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
|
|
688
|
+
}
|
|
689
|
+
throw new propertyProvider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
|
|
690
|
+
tryNextLink: true
|
|
691
|
+
});
|
|
692
|
+
},
|
|
693
|
+
configFileSelector(profile) {
|
|
694
|
+
if (profile.sigv4a_signing_region_set) {
|
|
695
|
+
return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
|
|
696
|
+
}
|
|
697
|
+
throw new propertyProvider.ProviderError("sigv4a_signing_region_set not set in profile.", {
|
|
698
|
+
tryNextLink: true
|
|
699
|
+
});
|
|
700
|
+
},
|
|
701
|
+
default: undefined
|
|
702
|
+
};
|
|
703
|
+
var resolveAwsSdkSigV4Config = (config) => {
|
|
704
|
+
let inputCredentials = config.credentials;
|
|
705
|
+
let isUserSupplied = !!config.credentials;
|
|
706
|
+
let resolvedCredentials = undefined;
|
|
707
|
+
Object.defineProperty(config, "credentials", {
|
|
708
|
+
set(credentials) {
|
|
709
|
+
if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
|
|
710
|
+
isUserSupplied = true;
|
|
711
|
+
}
|
|
712
|
+
inputCredentials = credentials;
|
|
713
|
+
const memoizedProvider = normalizeCredentialProvider(config, {
|
|
714
|
+
credentials: inputCredentials,
|
|
715
|
+
credentialDefaultProvider: config.credentialDefaultProvider
|
|
716
|
+
});
|
|
717
|
+
const boundProvider = bindCallerConfig(config, memoizedProvider);
|
|
718
|
+
if (isUserSupplied && !boundProvider.attributed) {
|
|
719
|
+
const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
|
|
720
|
+
resolvedCredentials = async (options) => {
|
|
721
|
+
const creds = await boundProvider(options);
|
|
722
|
+
const attributedCreds = creds;
|
|
723
|
+
if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
|
|
724
|
+
return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
|
|
725
|
+
}
|
|
726
|
+
return attributedCreds;
|
|
727
|
+
};
|
|
728
|
+
resolvedCredentials.memoized = boundProvider.memoized;
|
|
729
|
+
resolvedCredentials.configBound = boundProvider.configBound;
|
|
730
|
+
resolvedCredentials.attributed = true;
|
|
731
|
+
} else {
|
|
732
|
+
resolvedCredentials = boundProvider;
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
get() {
|
|
736
|
+
return resolvedCredentials;
|
|
737
|
+
},
|
|
738
|
+
enumerable: true,
|
|
739
|
+
configurable: true
|
|
740
|
+
});
|
|
741
|
+
config.credentials = inputCredentials;
|
|
742
|
+
const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
|
|
743
|
+
let signer;
|
|
744
|
+
if (config.signer) {
|
|
745
|
+
signer = core.normalizeProvider(config.signer);
|
|
746
|
+
} else if (config.regionInfoProvider) {
|
|
747
|
+
signer = () => core.normalizeProvider(config.region)().then(async (region) => [
|
|
748
|
+
await config.regionInfoProvider(region, {
|
|
749
|
+
useFipsEndpoint: await config.useFipsEndpoint(),
|
|
750
|
+
useDualstackEndpoint: await config.useDualstackEndpoint()
|
|
751
|
+
}) || {},
|
|
752
|
+
region
|
|
753
|
+
]).then(([regionInfo, region]) => {
|
|
754
|
+
const { signingRegion, signingService } = regionInfo;
|
|
755
|
+
config.signingRegion = config.signingRegion || signingRegion || region;
|
|
756
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
|
757
|
+
const params = {
|
|
758
|
+
...config,
|
|
759
|
+
credentials: config.credentials,
|
|
760
|
+
region: config.signingRegion,
|
|
761
|
+
service: config.signingName,
|
|
762
|
+
sha256,
|
|
763
|
+
uriEscapePath: signingEscapePath
|
|
764
|
+
};
|
|
765
|
+
const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;
|
|
766
|
+
return new SignerCtor(params);
|
|
767
|
+
});
|
|
768
|
+
} else {
|
|
769
|
+
signer = async (authScheme) => {
|
|
770
|
+
authScheme = Object.assign({}, {
|
|
771
|
+
name: "sigv4",
|
|
772
|
+
signingName: config.signingName || config.defaultSigningName,
|
|
773
|
+
signingRegion: await core.normalizeProvider(config.region)(),
|
|
774
|
+
properties: {}
|
|
775
|
+
}, authScheme);
|
|
776
|
+
const signingRegion = authScheme.signingRegion;
|
|
777
|
+
const signingService = authScheme.signingName;
|
|
778
|
+
config.signingRegion = config.signingRegion || signingRegion;
|
|
779
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
|
780
|
+
const params = {
|
|
781
|
+
...config,
|
|
782
|
+
credentials: config.credentials,
|
|
783
|
+
region: config.signingRegion,
|
|
784
|
+
service: config.signingName,
|
|
785
|
+
sha256,
|
|
786
|
+
uriEscapePath: signingEscapePath
|
|
787
|
+
};
|
|
788
|
+
const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;
|
|
789
|
+
return new SignerCtor(params);
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
const resolvedConfig = Object.assign(config, {
|
|
793
|
+
systemClockOffset,
|
|
794
|
+
signingEscapePath,
|
|
795
|
+
signer
|
|
796
|
+
});
|
|
797
|
+
return resolvedConfig;
|
|
798
|
+
};
|
|
799
|
+
var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
|
|
800
|
+
function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
|
|
801
|
+
let credentialsProvider;
|
|
802
|
+
if (credentials) {
|
|
803
|
+
if (!credentials?.memoized) {
|
|
804
|
+
credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh);
|
|
805
|
+
} else {
|
|
806
|
+
credentialsProvider = credentials;
|
|
807
|
+
}
|
|
808
|
+
} else {
|
|
809
|
+
if (credentialDefaultProvider) {
|
|
810
|
+
credentialsProvider = core.normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {
|
|
811
|
+
parentClientConfig: config
|
|
812
|
+
})));
|
|
813
|
+
} else {
|
|
814
|
+
credentialsProvider = async () => {
|
|
815
|
+
throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
credentialsProvider.memoized = true;
|
|
820
|
+
return credentialsProvider;
|
|
821
|
+
}
|
|
822
|
+
function bindCallerConfig(config, credentialsProvider) {
|
|
823
|
+
if (credentialsProvider.configBound) {
|
|
824
|
+
return credentialsProvider;
|
|
825
|
+
}
|
|
826
|
+
const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
|
|
827
|
+
fn.memoized = credentialsProvider.memoized;
|
|
828
|
+
fn.configBound = true;
|
|
829
|
+
return fn;
|
|
830
|
+
}
|
|
831
|
+
exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;
|
|
832
|
+
exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner;
|
|
833
|
+
exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer;
|
|
834
|
+
exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
|
|
835
|
+
exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;
|
|
836
|
+
exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
|
|
837
|
+
exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;
|
|
838
|
+
exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig;
|
|
839
|
+
exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config;
|
|
840
|
+
exports.validateSigningProperties = validateSigningProperties;
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
export { require_httpAuthSchemes };
|