From fbd97068ad588f6763f99b87352cba58f44e3594 Mon Sep 17 00:00:00 2001 From: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:28:41 -0600 Subject: [PATCH] Revert "Replace url" This reverts commit 289392effb4e9425f8fed122e334ec8a5e07d496. --- .licenses/npm/brace-expansion.dep.yml | Bin 2581 -> 2581 bytes .licenses/npm/call-bind-apply-helpers.dep.yml | Bin 1411 -> 0 bytes .licenses/npm/dunder-proto.dep.yml | Bin 1400 -> 0 bytes .licenses/npm/es-define-property.dep.yml | Bin 1382 -> 0 bytes .licenses/npm/es-errors.dep.yml | Bin 1365 -> 0 bytes .licenses/npm/es-object-atoms.dep.yml | Bin 1390 -> 0 bytes .licenses/npm/es-set-tostringtag.dep.yml | Bin 1398 -> 0 bytes ...-2.5.5.dep.yml => form-data-2.5.1.dep.yml} | Bin 1529 -> 1575 bytes ...-4.0.5.dep.yml => form-data-4.0.0.dep.yml} | Bin 1529 -> 1575 bytes .licenses/npm/function-bind.dep.yml | Bin 1335 -> 0 bytes .licenses/npm/get-intrinsic.dep.yml | Bin 1398 -> 0 bytes .licenses/npm/get-proto.dep.yml | Bin 1354 -> 0 bytes .licenses/npm/gopd.dep.yml | Bin 1382 -> 0 bytes .licenses/npm/has-symbols.dep.yml | Bin 1391 -> 0 bytes .licenses/npm/has-tostringtag.dep.yml | Bin 1415 -> 0 bytes .licenses/npm/hasown.dep.yml | Bin 1376 -> 0 bytes .licenses/npm/math-intrinsics.dep.yml | Bin 1383 -> 0 bytes .licenses/npm/safe-buffer.dep.yml | Bin 1431 -> 0 bytes .licenses/npm/undici.dep.yml | Bin 1396 -> 1396 bytes README.md | 4 +- __tests__/setup-go.test.ts | 4 +- dist/cache-save/index.js | 1438 +++------------- dist/setup/index.js | 1440 +++-------------- package-lock.json | 259 +-- src/installer.ts | 2 +- 25 files changed, 442 insertions(+), 2705 deletions(-) delete mode 100644 .licenses/npm/call-bind-apply-helpers.dep.yml delete mode 100644 .licenses/npm/dunder-proto.dep.yml delete mode 100644 .licenses/npm/es-define-property.dep.yml delete mode 100644 .licenses/npm/es-errors.dep.yml delete mode 100644 .licenses/npm/es-object-atoms.dep.yml delete mode 100644 .licenses/npm/es-set-tostringtag.dep.yml rename .licenses/npm/{form-data-2.5.5.dep.yml => form-data-2.5.1.dep.yml} (95%) rename .licenses/npm/{form-data-4.0.5.dep.yml => form-data-4.0.0.dep.yml} (94%) delete mode 100644 .licenses/npm/function-bind.dep.yml delete mode 100644 .licenses/npm/get-intrinsic.dep.yml delete mode 100644 .licenses/npm/get-proto.dep.yml delete mode 100644 .licenses/npm/gopd.dep.yml delete mode 100644 .licenses/npm/has-symbols.dep.yml delete mode 100644 .licenses/npm/has-tostringtag.dep.yml delete mode 100644 .licenses/npm/hasown.dep.yml delete mode 100644 .licenses/npm/math-intrinsics.dep.yml delete mode 100644 .licenses/npm/safe-buffer.dep.yml diff --git a/.licenses/npm/brace-expansion.dep.yml b/.licenses/npm/brace-expansion.dep.yml index 95ca8eb1f991041106ab6106e972259b5d00804a..8fa6cfb3114422eeaf20402cb8f97e1fa8892f45 100644 GIT binary patch delta 12 TcmbO#GF4=P2BYCd%{QC?8XW`- delta 12 TcmbO#GF4=P2BXnN%{QC?8X^P@ diff --git a/.licenses/npm/call-bind-apply-helpers.dep.yml b/.licenses/npm/call-bind-apply-helpers.dep.yml deleted file mode 100644 index bfd264f376ba5117014109f3c54fbdd2a6cc5dbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1411 zcmZ8hU60y06n)RHxSGDSQh@GgpLolF8N3@3l!Q)4tCi{`hPX=ND0VtU+8@8i4$P`6 zAt2ZHp08_IEEYj8I=QAwwC$o)eZ3IF&|VjfYzH}-;0NB6?$`9&^7HaBu-5_2{m=zw z>N+uA*R=PYbe{UkqSKHV_0-q2yA?e2%A>9vK}csk(qts5p1!^FehV7i$w6Fz-&i}C z^=frdwwcOhrMp%8y%A%%dT;+#=7&*=x|2bxD%l$#bjscz%sN<*(bHH-v!NWaLCtR~T4$>oXxU0R`f)n7 z!WdmC0ZgiOHFdJL!bMGI)k;GjZ6oO+zfC-R@1tw%)2?)-jCZ^%?nmPTppsQk)8 zY@%wX+G)8Tw+a!?ENd$;6~gi z`JnFB;C3pF#idZ9r9qGL&*XoWmp2`IMtQm`UZRW<&*_+@U-*`7=^@JT{1DO$FZSuF zAarC=QoK^SqbPZ$KY6kZiG4k0EYB&;yas+a#+;$flTCcu^5mJGFq@>f?;N)tz(q<0 zNN;eQVRlCcmTmSxkDhqUi`USD?Rb$m>|L5sM8_yA_~sNx868jAG0hodYyq9{WS4=7 z9avH#USs_RN(XZ-m#T;A!G4ZPKL3@EF2zR=khD@SKGdWjuG`?6UMQ zn{^Rm3M>G^Y{F(F7rzheeM@L@0iF=RT@!6t6ax<{OWy6?2bRHnd+=}c*Wbav6~w$a diff --git a/.licenses/npm/dunder-proto.dep.yml b/.licenses/npm/dunder-proto.dep.yml deleted file mode 100644 index 39542bfdc18dec26030b1ea57be1124b66f6f461..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1400 zcmZ8hUvJ_#5P#3781-JdQh@I2o_KSEDb|GqIbpli>C|-+Lwri&$adOAx(|P22ddqb zkig@a-@ma~EEdrqdbx&X8X9R9qtQ-BZ_-$$hc$d&J}f^+?lNM>F!qt1`d*mJ8rTWM zn^2voIvIm&C4A4Te`W2K0l`l!Uth!T*VpeL>RMW>4TzzEesaQT6GJV!Zc%Auj#}Nz zQJj&cb#Aol)#|KVJ5|eC_bX`^wpG1d{VehiBSq88s8h8ZEDrX{-41pgEx_u@AnO`Z zme8!A5rC6F+#3GFUjTbnLORbzp^)hDV$`{Ha9@9dFArb-1e)wgQ5!WnD7=8V@gPmF ztPcp3g;p9_UEplQ;A9iS$w&$M1a&LS*=M8C^aVzY6bE$Wgc{Uv1_3n^24?JbEkap+ za__>(kdnZ>Y9$a88eLDl956M{c~YIUaPKp}E3OlFp8`=MMHdj&5O#9AhIb58PY#T< z&Zyes#Gr<{n;Ng>cHJoqac1%GAq^V<(ZyuZjn^DQuN!sp-!fPnr>ax7jiFH@d>6wr zD|h*^1nl4>D_}}40z=80RCC8L-I2`#QFDS~`AausE zEk`E0r&+l~W~>4IiU%lmBuzbCz#~U=!o5~V^1};fPrDL!dAgxke59z5Jf?J}LxV|5 z*gl30*^?))l0%M2vrpeTD~0DB^<~dX@RO7*&%C81&q|KR7#;KSWBi#FGzP+1;ltVT zd_SA@5#toHAP~-GbVl;=hrm9zge^Y6BL;BO1RF|H#KVT*_-AZ> zeri^&9@oRSo||UuMx!MjmJgKUMeI6O*sKiEyQ1gj_03cG=frX;UO1mMIEw}GGd z3*bO&$mZE76jFV;8hP#=ylLOUhj$--gWt93xPm<@;HsP3N?}H6eGnim^umbd3TMNW z6I~1^BLwIZw5a+lVsIL`x&j7haX>eYOC{AAIJ8I?c(L2{2xaxjy>KINpaX8LZY4)d z=yW@cLOJd{=SdF2!W-8MSX8%(#oIvC2|ffwsSr`X{Tf~{PK^sN!a5^cj}wDb?J#v- z%l&$g7~#y~$3qr20HTY@q8qO{hEaF&ReZ{*t>0!_> z-e#*+C%t!k9l=$N*Syi+MesGR9^WX+4l4*t31a4L->z)WhXERK3lO<6ZY%}JyESw> zHP+#ykbHoPHi7rQmRC0&djeIltDh1^fL2hl;uGDHEi94>&x;tIXuU6vHDCuz^7Tbq(%A6=;OYIeUWVm79R*IOdc{a)1kpMOXwknZE{E+y-EfJ zBF#R1>#P)>_QaPxZ-Sq+rbX^8rA1ydJjUpl)vx1Ev?4Jij8;CJ9V-sASsyV@AqxWG sY))n*AAbn!bxYXd13Y2?cTKP*Nrrg1vi#NVeP9*MuLu8)K7Wb+2Bx;Kc>n+a diff --git a/.licenses/npm/es-errors.dep.yml b/.licenses/npm/es-errors.dep.yml deleted file mode 100644 index a5827aac9003a51e4508c377d60a69789ff8b2d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1365 zcmZ8hU60y06n)RHxSGDSQh;uEpLolF8QcvCNhpCfm@;Ci_9ksbS9nCp@fvZ}vy zl4?=6l1|!?pp$$jeIkd#*OHjWqFN8unXz`joky+iEN!3pO% zPpXraKKc}&%3H_Nr$E$5(FH^`gp}{s^o|tu=*UQft!j@GlN#!7Y`m8Hb*B*F#Ny#Y z7B&FF#c1KiYmTYcjXL?iGFZHf$4=Qcrbc=AZ$gWK_F9hO3gjxO2+ z-v3*k-*jvlmHDQ6O$tW5q92r=-OBDW+FmZSzA#cu^!-^+x%IlI)HCnV z_I+QlvZTBS8u)IXa)vt3R_S5Qvln_sZW@pc$InVOD^O8Zv8qgWfHU*g2j%C#x%%~Cjh69z`BuzbC zz)KErQh2Sj%J**tf7w>F&C@kQ@tHwk@|?1X4hC0g!gn#PlU?%SRTh*3Y4YixPD<%@ z%Y51MCitu>o@d_DD$l9{#~6-_>e2qnOBPd7@Y08~De~Q9)<=vkumA|X8Jm!N{2{Q% jl<>p{ct8MmO|)i73OtM~d)U1<%%f?0@ZadKzoUNvv*M~& diff --git a/.licenses/npm/es-object-atoms.dep.yml b/.licenses/npm/es-object-atoms.dep.yml deleted file mode 100644 index dc42eaae79cfa5f21addebe4bb52fabe1381f875..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1390 zcmZ8hPmkI-6u;+FJk1{3N&&Xjp165}8N3Y%a!hAOt35c0A+C~`wVh6p`r-TRz^t|c z3Hz*gIa@f3sZkpjbBJ_2A6zO)@d`Y;o}lNiN9X3X}k=Hn}$K!>l)tC z3d(uJs$P24LL6P+swoIF@29}kzmv9VUS>wwM%TT1mvm-O7kNhL&ijj7uU2R6yQy9_ zW?1!KJ8A3HFUo$iO16Vadflke;pCwGec{&00-Tv_qud&DmeHc334mAM{ThDYKY%?G zkk7M8EM(?#wffw7c;9@0PrrZq1O7C&l_TtsUXJbDc2IWEE@T4QL8q*$uW+_?jh>JbqY+_&KsvowHuF)9y?tq#)C+yd_de(KC?1W;UO~;NxRc^&I;S^W}2VQ<*8@ho9QsMd`g=Z#qJIO$zj{1E&=}ggk0s`$Nts)>)C|#|?k85@KySh3~EMEA51OJv3x&@Z@v zYDe-s&_z6QL?=9Gg{(ZhaQ3tluq*Qo#o{AHh2$}(GaVYta>Dj0Y{;HG1(h61M4Eku z)>$b$?`S9oUV`6Du(Al2va%2ym-q@Qxp*6YW))3=a8`wIw!GZWW<$g{g)9h!vjv@z oLi{nXw^PEF5a1C5xNCw9B{|~Zkri)t?*q$ZzCHLh`um^cCt_o>YybcN diff --git a/.licenses/npm/es-set-tostringtag.dep.yml b/.licenses/npm/es-set-tostringtag.dep.yml deleted file mode 100644 index f4b673e2763b374bb4b5a26b2ec9bc72fcd7e8f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1398 zcmZ8hOK;;g5WeeI4ARRkAUoR}eN$vQCMrvYBySoNJ?KGOEF@7NsdWwX$M+*;r`Q4p zY>j5V*G#fnt%9){#D;`f8DUpe8LQ=ZvDGE`A+(Wd+|bMV*Y&r+-X`>o(-4?>7%F|+ zP(+>RC!xtIQj?W~G*&iM-`@yeRNRJI^=qpNk6BiikglB=X;Q|>x)NFeDB9 zYf<0mqN~x0Hl(u_g4CIsuF@9~x?rmDM##uuK-IRABjTls8W4JBblVP4MxE`o(gFi5 zRmP}BR=}iIHS-`wTUp0>mc20a#dd<8iu=UVS5MT6s`rR;1frnFYq}y*HCxicEw^zv zA<41n=hkU?yza5TJBu6lX&4U(7qfvIr#YlSwesw~g||4(buUd9Qj6_tS=)rcpOda+v%kkHKjPjDlrzFbhc*>7i!60J`=#;0s98B!M z(sB)E)QEk@0~PxyNgSQWi%xKoJFOIF$B&%9?MvEc$(Et`%AhcMP1r&QgK-k^LrB}` z5WP8-Ib}dve7e>}DZTHRD?8o@pSa{%>MX@sTIP5R;W#fp$KQFuLW*);xNvrPc38~1 xh%p5g0AV&|3zCc92llxow739I2;iZKwk%43hn1zDb{_-lV7VUrKl6s-NrAd0p`MLUO`9-<9DTyVC2$phDYGO)m J>c*octN^%Y7LEV_ delta 15 XcmZ3^^OJjmBBSX6s-NrAd0p`MLUO`9-<9DTyVC2$phDYGO)m Q>c*q@Sy;iW$tzg{0JLQq$p8QV delta 25 hcmZ3^^OJjmBBSXX75!awZ(x! zx#)JVn`i~r%u^%n1~Qh?yrdC;lRw-Bety880I3>~y2u!ufl6Ot#4NnS+Eq#`eSr!Z6uSuLyZ;~@ka0MW&4(T&#}!(du<_TMsC9Ot@Mwu_-v9=@I( zc3NKy8;HH1wVA-mevyYL3Oxkhe^iD(pBH9@I&P6!UwOmz|LsUEy3X^Yks3q7uGV0L zf%%(koUeEnXVdrQ&D(5@Zk2y%_zZ$8f!9@SzRTci*||0jWrr1nr35j{wr^LqtNI>l zc?%G^l@4&ee7A;f=h`}a6sqcBG*jUHzvbJD5_<||u@f(ZQ(z?=dGVEP=@uSHiRXtH zUYOVyCjr>ONiJTY*a693;S0;RG0=aGoR%dNJm_GDW5y`fS)OL6Ez6(b31{;{;FCWv zfxw~wPkMu66lZsEpgi3pI(cFl6R&Xq+cA-Q>|Mcuz>#pl(o;q_98dgMloVxb5jto2 zjw2I2&|DL05`onAN=3>_rEAf GlIRy<457~e diff --git a/.licenses/npm/get-intrinsic.dep.yml b/.licenses/npm/get-intrinsic.dep.yml deleted file mode 100644 index c94509f44c73128bc042303ff9bb767d8c99370c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1398 zcmZ8hU60~66n)RHxSGD~N&%+ZH{LQ}25&=xlCaZJ)dwdr;8hY++nHIU{`ej{Fx6H< z0$<;IzOKb=Hj4()%O#zpo2kJWHCWX|Z_-$$hb8?w|84#lx$6Zj!=;bx*!RL*m-H+h ziJ>K<>(RRIN{wjFl0?_h*OEFhoJMhyvrfLrjy`}b2}eg|tRo};9+i<1kyE{l&bpTu zOf2c_+{G>zi<5Hav7R@&Uv%Hk!qkhOH2z|wXffESMh+Hpy>j=1T}CsqdNhr+OG^2Q zWhL`W@`qc}Klnwo;}xaTY!nJBeYqNSIy?H*e5NmtUmoeJHmw+F3vzg!+V;})%KCIj zSvpH2>noj%7@TZlIvOcSAE|-hlZ?q}q;#bV^2C6yolt`sP9&%SUEoExI|ItL^S|W(*2s=k)$4d^Y`ZdH8yC=(N5V z7883v3vI~CZjuKS1rNdZe=0+t&kI>W$1O7JEAMz5KRZ&BuH$G1P$MLCwHgry=I^p` zzT#aRb=T>4Z?n-utGsu-j^L`owW#%*48Eq-586R?SV34y5HoH2c4g20jo0!PAh;1X zN&)h24Q|KUIy?#`I=W~Rc>iyCe$%mKROXxNB`Fy3lJ-UZjj!379+DF0hnQY?wapI| zp`%E$>Xq^hCD|+e&a-t)?2moH%98RTXyChj${FfBTcw9J&z|WCvssS!&hhF2T;)`O z^ajTnW;e8B#cB)mnPuMTNa(Ed>D^O8Zv8qgWfHU*g2 zj%C#x%%~Cjh69z`BuzbCz)KErQh2Sj%J;7Yf8JKK&C@kQ@rglU@|3cP4hC0g!gn#P zlU?%cRTh*3Y4Yh?C#CeVWxnir6MR+`&oggnm1k9fV+_Yd^)dd!OBPd7@Y08~De~Q9 z)<=vfumA|N8Jm!N{2{Q9EuqB+ct8MmO|)i73OuYV`>=Z-m`Bs=!N1X;e?|WSTq?ID diff --git a/.licenses/npm/get-proto.dep.yml b/.licenses/npm/get-proto.dep.yml deleted file mode 100644 index 1176a9536e24c3c63510166104391d0640a28eb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1354 zcmZ8hUyIu~5P$cl7`87hI7wT$m%M2mWurUCHnP+0vh0IwE3t}g8A=~k1`PDj6`u}Y6y__qGK{ua6GgxBLVM0OqqVXj-?x}L4; zuYL$zC*k$A@T0!r;vI^2=HVTDAPgkQZ zorBNK7x@15`ycS9HZ96KAh8(RrLB-=P}aK!WucQs)@aU%(aAQ3vysx9YEbM&#^5yi zyTXJy;ef84P@@_zAfQ3Iz>D3kLny1y?p+v(11$(^b)y7gLaUp3kfRgMbDmW%EqwM# zK9skKhcAJsm7))bY79x=ui+h2)UyL4tuw0eI5DWP>F3sKxnK7RBV1TKe8|EEKy)!% zbmKM0Fz8mD{kIGjr@8Kx?P6$^hp%Ucoz@q_Vq))SqYYTuFY*vYp@-mG!d+$P^Lb%b zsN)uy^_6#g82@#o7G3Arj7W_kVOOg$!ochwldpIeXWjSu-P>&R*edTGUq^6N;kBss zZy9_os~@#P*j{r)3E_ z4;t99NEyXC%aZi8W7!it;%t`VduRCS5xB~sLed)?qd2>VBjw2f(a9rAS@jYJusy3X zkG;=15GV+*SaM1UhvLMGyrd{&htL_z_8gh$k!IBznXv}+2Ogk2kTmsl0gs%}3HMqd z$%_}xo(>fp@^nYB_()M9c}(d-hX#|Buwx86awJb)C5If57N5R#Q3}ro>dT&&;3uhA zo_R}2o>d%=F*@ee$M`cVX$*w3(ucF>`EfDpBgQFYK_HyX=z`?q4}pDb30r)CCk)`O a33imEh=(i7KJ4BH*3t5M@Zae5E&3O4T&GL` diff --git a/.licenses/npm/gopd.dep.yml b/.licenses/npm/gopd.dep.yml deleted file mode 100644 index d3d28af9b6078815c7a038986226e02189a1f674..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1382 zcmZ8hUyqwO5P#=WjM9g;5}Wk)F>fq58}|qxAl+M?PO1SXxCI;8rfH=6@HaNeR#z!f z;_=My-&lEgcnBmL`4-M<>Vh9!8=>SD{#ZY*KLz$W;f1N}^z0;g^BM%1Aa%r%A6!v~F+u#9=nsv*~7E&6M ztRew`5Ja2UNc_Z=!rVc29GEtB67H2!vzCWxCG6O)uMGl zhahA-%$?J6za9ie=-1%KeHO+8qKny}8>cyhQFY?vzPYzJ&CMW8A3`S_JZ>91jVt=a zgwD?fw{G~b$U_u?9=z{gDt({J3$sEUx5$jET<}f&-;r2!on|eO8biXaPGN+e**!>C zaUq=4FsO^O*(%uy=N(^%cU9vxYt#?!eJ!h(%A#z)0>2b5X4&@b%Jgg)py9UwksIU2 zl83xoL$`BdEItas2AGugyuVvs-*oH=RQaxciAn;rf}+g7(1awgiYh#>LU^I|K0nrg z9c7f&uaNH`%3k45nk6BSzlxGn738JYKo3Pq3D#*Ar^ke5&+vq^S&r|W;;TpCI)@rb zZ*Y|0><$j3jQ5BhJ<*ibub~Iq(K>V3yS#)5im0qU6 zB&*lRj5Q!%@Br05N>fMY@uDL-DVmtS}WI-UD&B%h};`f2QZ3$akfJY4At_cznrHF?s%iiqX2iC#zdhp-q?|*{-0DtDO AasU7T diff --git a/.licenses/npm/has-symbols.dep.yml b/.licenses/npm/has-symbols.dep.yml deleted file mode 100644 index 38b50f044e0c58140de7fea6a947db17fa809c74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1391 zcmZ8h&5olu5We#irQXYoM3U(}>>)QAoQ`J+M21XnYqbXhPVfk9WSj1dG!MUJleBh5 zij+`PeScNTYPE_KAH^1WZddj?HhQqpn=n>twS~v^X^iYVj@(?gkO?Qu zD3t(t2G7vbDw zx0}sHx_)lftsXbS_nw<(^FMjN8Ns_zM1yRFvN$zLcYm-;4gp!ts!4#qfkiobT#tQJNVRohTp$D{sCXL>9~SDQghWUZAb6e`d~m>=!Fr@ z6)uJ=C%PEUMhMVnXi@G(#Nae=b%hC|!~xwnE|pXl;Lsvn;Kgp&Bb3!=_s)&LfeyH} zx|JL;q0{Z`)8x)`p5-7ceDYyGRJVzT&w;2Ddm>tuKbf#NN-w zuUQO>JVcS`A@~+>R~h1TW@cAKz7h3PjQw`X` zlA?ZvatBHA3V+ffi-G)gWTdK~WI+Qx9CJ#rPKz`@WwdyPC!8%xymyLMkHB>aHIm-o zD8bns90*JIh@L#roYt>#0Nc^J@YuVOK?28w)igcj34`N_9m|TKj0~X*TI?7ykpn5} zH8Nuj$Txg|YM{{bD?w6*{M diff --git a/.licenses/npm/has-tostringtag.dep.yml b/.licenses/npm/has-tostringtag.dep.yml deleted file mode 100644 index efa5c5c1b8d88631b14b4d9b446105d2567a41fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1415 zcmZ8hUvHa85P#=WjMA4@!nn<&-w3SZy~AJuZZ4`$>KfK&E7(QslANXc@HeyAk*<;@ zn_=enZzfr-R)H3S+(0Mn${Fh>r7uogf;Tx?W%LHVMPH-Gz+Fdd(&G@=c^JfW-9Rdx zoCc*Os57`u!XFh#{iY_P2dNz)!q4hDoJ=1%Q+ecCTz-O`$I(nKf@=9;0{}b9CImBq z?ZjZCpfiIU#f5}9H`>j5eNnEPPf=rrwbIn?R=@1}H`$*iDcV5>y=tVkI6WwLf3TZi z1=h?{Bkcw}m~0 z=$U`vwNQmzoK4@Gce2?S-74~qm*HL2_*$IIoAkbxwQJ*0wqJo?iWjqN`}PViw(sGD ze+E84=yQ{Om>JKKkGL>P%E^k?sV1V zU_}$sMGHadLUmi}E8JTJm^;C^L4&GnDF-=RsRZ(P_Zo28wtzC~VsE7up0_kc)e;dk z)Tnyu#b6OAATF{KhCbO=&?0|yEIxapMwFdLlmie2J-6wGNY!LX3j;H?!wE?abvHFm z%X7Pvh;wFf?LHUd0pVgYaN{(G)T>5b+^_H!$EoV1X+vtHgGW|4XqySJE|VTWjgWAvQHanp|G?0=igR&MU8io& zCa$uP&O0W>yDG3|h7i!w$$r&E@GZT zD0!zpc(TJA_wAIiJf}4C8u;-PbA~!kw()t#lUI5{Z<1p6Io<#O7bz7WeZX;s-aQ>z zwmkqndf_oI-a`+z=SAYM_i2WA{1jyc-=5@zU2BTI@Em{BA4 z6${D_Q5-uuj~AWcBy(D6o1We?{(30rkj6WP;tPYq=p|+|9Sm;ch#y1RMaSsXsmv$^ z((Kb6ot4ttfw{8djquqPJWZUXZJHDrmLVKx#Yg)a&sj)O#&Z|WK1+|YSr;+7zycuj rCTvD>@%z9&ZV5+RfM*2o)I>WL#lXXrB_DR54Xa?D9{e+X|1INknOhU$u~x(V`B9%D7k4+?17SKiwj8^uy@T(>|= z$o!Czy>POH-@_or7CPBah!KO)^=w^#g+?@;Y}Zkz2RVrg;&skVcDvbJl z?aFp)u$#XG{bQtP2O0IMk)!p3mAfD8Hd=wzvuUK=Ldp`Fmox%!@`u~PPy7auu?o^< zHVTDAPgkQZor8DHd-(L>(`TSbM#{#h$wBEgER9EL24#I1pe))lvcAH_h!IW4a5hqc zK10(9bCEGPjqb1Dt>b{Molv71FCd^n!oZB(u0trR&+b(i8R8Pw>PCeiTiwiq9G!5U z^Q?Ml;hpOwJe0SIhxdV~m7))bYD7c{_iK2?JoW6rNQ(=${6qR>O| z{aa<|^Lb%bsN)uy^_5qAB7Ztki>~u*Mx@5qhFz`32m|x~vT?rRU7U5_>sN2H(POK; zcYGhgRfX50*576DwJd+s4rPZGgrx*A%eHSz1EP~h zma^(44q$s$_H!LIYTRIrGG_BL)gT)&8B8Cg4ekfC z4c1`PtQ%prkg}L&1q}eK_}gybAN&VU_5zNqgmkHgXFRL|e-*3iP0LGf;kjAC-g5$} z)%;gqwenr`OWH~3Q5xqHq=8;&QQzRAtI3KsgiZ?qs)MGl^hJbV6;#s=uGkqYP_?b( zB&Q2h&>)@X#cbOnlu@1isI7Aj*@BP+y&RyFe|CRtvpdH zs=*`52@wT6uHge)sb&jW7^`LDa6*t%Gt8~i^0*!(HgjQd<-Qlj1EP!Bpc|(-gi*D! zb6?>tUgvs{rVpW&4!)i(W*QgtBMP0LjnZJmu*gFci5|S~A1ZyG>lgM4b=+HKT;u~^ z$A2BkMOQcL38}G3nAIw5p=W* zDBF*~55&%6|OmZo*x&puEkh|EC__P8C{TE`+dW{PYF|81JBrihbBlUNf8f6 zmU*i#;ZYF%yqP#9$&p55i)qVl!l^_M|JXnA3cmbe0eyXT%Mo|uvJfMsFRNgAmbmb~ Hd=35u87jY8 diff --git a/.licenses/npm/undici.dep.yml b/.licenses/npm/undici.dep.yml index fadecf4a743b7ff972adff6fb838d0547a1c7578..961089c6539002815e4cb02802c7de40242b34f4 100644 GIT binary patch delta 14 Vcmeyu^@VGKEVG54=|+VRRsbjY1abfX delta 14 Vcmeyu^@VGKEVHGa!A6A;RsbjG1a1HT diff --git a/README.md b/README.md index 62af839..b23585d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The V3 edition of the action offers: The action will first check the local cache for a version match. If a version is not found locally, it will pull it from the `main` branch of the [go-versions](https://github.com/actions/go-versions/blob/main/versions-manifest.json) repository. On miss or failure, it will fall back to downloading directly -from [go dist](https://go.dev/dl). To change the default behavior, please use +from [go dist](https://storage.googleapis.com/golang). To change the default behavior, please use the [check-latest input](#check-latest-version). **Note:** The `setup-go` action uses executable binaries which are built by Golang side. The action does not build @@ -247,7 +247,7 @@ When dynamically downloading Go distributions, `setup-go` downloads distribution These calls to `actions/go-versions` are made via unauthenticated requests, which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). If more requests are made within the time frame, then the action leverages the `raw API` to retrieve the version-manifest. This approach does not impose a rate limit and hence facilitates unrestricted consumption. This is particularly beneficial for GHES runners, which often share the same IP, to avoid the quick exhaustion of the unauthenticated rate limit. -If that fails as well the action will try to download versions directly from https://go.dev/dl. +If that fails as well the action will try to download versions directly from https://storage.googleapis.com/golang. If that fails as well you can get a higher rate limit with [generating a personal access token on github.com](https://github.com/settings/tokens/new) and passing it as the `token` input to the action: diff --git a/__tests__/setup-go.test.ts b/__tests__/setup-go.test.ts index eebb283..f94f9ee 100644 --- a/__tests__/setup-go.test.ts +++ b/__tests__/setup-go.test.ts @@ -388,7 +388,7 @@ describe('setup-go', () => { const expPath = path.win32.join(toolPath, 'bin'); expect(dlSpy).toHaveBeenCalledWith( - 'https://go.dev/dl/go1.13.1.windows-amd64.zip', + 'https://storage.googleapis.com/golang/go1.13.1.windows-amd64.zip', 'C:\\temp\\go1.13.1.windows-amd64.zip', undefined ); @@ -945,7 +945,7 @@ use . const expectedUrl = platform === 'win32' ? `https://github.com/actions/go-versions/releases/download/${version}/go-${version}-${platform}-${arch}.${fileExtension}` - : `https://go.dev/dl/go${version}.${osSpec}-${arch}.${fileExtension}`; + : `https://storage.googleapis.com/golang/go${version}.${osSpec}-${arch}.${fileExtension}`; // ... but not in the local cache findSpy.mockImplementation(() => ''); diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 9dfea8c..ce1c046 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -14907,9 +14907,6 @@ exports.userAgentPolicy = userAgentPolicy; /***/ 6279: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - - var CombinedStream = __nccwpck_require__(5443); var util = __nccwpck_require__(3837); var path = __nccwpck_require__(1017); @@ -14918,20 +14915,23 @@ var https = __nccwpck_require__(5687); var parseUrl = (__nccwpck_require__(7310).parse); var fs = __nccwpck_require__(7147); var Stream = (__nccwpck_require__(2781).Stream); -var crypto = __nccwpck_require__(6113); var mime = __nccwpck_require__(3583); var asynckit = __nccwpck_require__(4812); -var setToStringTag = __nccwpck_require__(1770); -var hasOwn = __nccwpck_require__(2157); var populate = __nccwpck_require__(3971); +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + /** * Create readable "multipart/form-data" streams. * Can be used to submit forms * and file uploads to other web applications. * * @constructor - * @param {object} options - Properties to be added/overriden for FormData and CombinedStream + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream */ function FormData(options) { if (!(this instanceof FormData)) { @@ -14944,39 +14944,35 @@ function FormData(options) { CombinedStream.call(this); - options = options || {}; // eslint-disable-line no-param-reassign - for (var option in options) { // eslint-disable-line no-restricted-syntax + options = options || {}; + for (var option in options) { this[option] = options[option]; } } -// make it a Stream -util.inherits(FormData, CombinedStream); - FormData.LINE_BREAK = '\r\n'; FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; -FormData.prototype.append = function (field, value, options) { - options = options || {}; // eslint-disable-line no-param-reassign +FormData.prototype.append = function(field, value, options) { + + options = options || {}; // allow filename as single option - if (typeof options === 'string') { - options = { filename: options }; // eslint-disable-line no-param-reassign + if (typeof options == 'string') { + options = {filename: options}; } var append = CombinedStream.prototype.append.bind(this); // all that streamy business can't handle numbers - if (typeof value === 'number' || value == null) { - value = String(value); // eslint-disable-line no-param-reassign + if (typeof value == 'number') { + value = '' + value; } // https://github.com/felixge/node-form-data/issues/38 - if (Array.isArray(value)) { - /* - * Please convert your array into string - * the way web server expects it - */ + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it this._error(new Error('Arrays are not supported.')); return; } @@ -14992,17 +14988,15 @@ FormData.prototype.append = function (field, value, options) { this._trackLength(header, value, options); }; -FormData.prototype._trackLength = function (header, value, options) { +FormData.prototype._trackLength = function(header, value, options) { var valueLength = 0; - /* - * used w/ getLengthSync(), when length is known. - * e.g. for streaming directly from a remote server, - * w/ a known file a size, and not wanting to wait for - * incoming file to finish to get its size. - */ + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. if (options.knownLength != null) { - valueLength += Number(options.knownLength); + valueLength += +options.knownLength; } else if (Buffer.isBuffer(value)) { valueLength = value.length; } else if (typeof value === 'string') { @@ -15012,10 +15006,12 @@ FormData.prototype._trackLength = function (header, value, options) { this._valueLength += valueLength; // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; // empty or either doesn't have path or not an http response or not a stream - if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { return; } @@ -15025,8 +15021,10 @@ FormData.prototype._trackLength = function (header, value, options) { } }; -FormData.prototype._lengthRetriever = function (value, callback) { - if (hasOwn(value, 'fd')) { +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + // take read range into a account // `end` = Infinity –> read file till the end // @@ -15035,52 +15033,54 @@ FormData.prototype._lengthRetriever = function (value, callback) { // Fix it when node fixes it. // https://github.com/joyent/node/issues/7819 if (value.end != undefined && value.end != Infinity && value.start != undefined) { + // when end specified // no need to calculate range // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return + callback(null, value.end + 1 - (value.start ? value.start : 0)); - // not that fast snoopy + // not that fast snoopy } else { // still need to fetch file size from fs - fs.stat(value.path, function (err, stat) { + fs.stat(value.path, function(err, stat) { + + var fileSize; + if (err) { callback(err); return; } // update final size based on the range options - var fileSize = stat.size - (value.start ? value.start : 0); + fileSize = stat.size - (value.start ? value.start : 0); callback(null, fileSize); }); } - // or http response - } else if (hasOwn(value, 'httpVersion')) { - callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); - // or request stream http://github.com/mikeal/request - } else if (hasOwn(value, 'httpModule')) { + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { // wait till response come back - value.on('response', function (response) { + value.on('response', function(response) { value.pause(); - callback(null, Number(response.headers['content-length'])); + callback(null, +response.headers['content-length']); }); value.resume(); - // something else + // something else } else { - callback('Unknown stream'); // eslint-disable-line callback-return + callback('Unknown stream'); } }; -FormData.prototype._multiPartHeader = function (field, value, options) { - /* - * custom header specified (as string)? - * it becomes responsible for boundary - * (e.g. to handle extra CRLFs on .NET servers) - */ - if (typeof options.header === 'string') { +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { return options.header; } @@ -15088,7 +15088,7 @@ FormData.prototype._multiPartHeader = function (field, value, options) { var contentType = this._getContentType(value, options); var contents = ''; - var headers = { + var headers = { // add custom disposition as third element or keep it two elements if not 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), // if no content type. allow it to be empty array @@ -15096,74 +15096,77 @@ FormData.prototype._multiPartHeader = function (field, value, options) { }; // allow custom headers. - if (typeof options.header === 'object') { + if (typeof options.header == 'object') { populate(headers, options.header); } var header; - for (var prop in headers) { // eslint-disable-line no-restricted-syntax - if (hasOwn(headers, prop)) { - header = headers[prop]; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; - // skip nullish headers. - if (header == null) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } + // skip nullish headers. + if (header == null) { + continue; + } - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; } } return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; }; -FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return - var filename; +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; if (typeof options.filepath === 'string') { // custom filepath for relative paths filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || (value && (value.name || value.path))) { - /* - * custom filename take precedence - * formidable and the browser add a name property - * fs- and request- streams have path property - */ - filename = path.basename(options.filename || (value && (value.name || value.path))); - } else if (value && value.readable && hasOwn(value, 'httpVersion')) { + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { // or try http response filename = path.basename(value.client._httpMessage.path || ''); } if (filename) { - return 'filename="' + filename + '"'; + contentDisposition = 'filename="' + filename + '"'; } + + return contentDisposition; }; -FormData.prototype._getContentType = function (value, options) { +FormData.prototype._getContentType = function(value, options) { + // use custom content-type above all var contentType = options.contentType; // or try `name` from formidable, browser - if (!contentType && value && value.name) { + if (!contentType && value.name) { contentType = mime.lookup(value.name); } // or try `path` from fs-, request- streams - if (!contentType && value && value.path) { + if (!contentType && value.path) { contentType = mime.lookup(value.path); } // or if it's http-reponse - if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { contentType = value.headers['content-type']; } @@ -15173,18 +15176,18 @@ FormData.prototype._getContentType = function (value, options) { } // fallback to the default content type if `value` is not simple value - if (!contentType && value && typeof value === 'object') { + if (!contentType && typeof value == 'object') { contentType = FormData.DEFAULT_CONTENT_TYPE; } return contentType; }; -FormData.prototype._multiPartFooter = function () { - return function (next) { +FormData.prototype._multiPartFooter = function() { + return function(next) { var footer = FormData.LINE_BREAK; - var lastPart = this._streams.length === 0; + var lastPart = (this._streams.length === 0); if (lastPart) { footer += this._lastBoundary(); } @@ -15193,18 +15196,18 @@ FormData.prototype._multiPartFooter = function () { }.bind(this); }; -FormData.prototype._lastBoundary = function () { +FormData.prototype._lastBoundary = function() { return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; }; -FormData.prototype.getHeaders = function (userHeaders) { +FormData.prototype.getHeaders = function(userHeaders) { var header; var formHeaders = { 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() }; - for (header in userHeaders) { // eslint-disable-line no-restricted-syntax - if (hasOwn(userHeaders, header)) { + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { formHeaders[header.toLowerCase()] = userHeaders[header]; } } @@ -15212,14 +15215,11 @@ FormData.prototype.getHeaders = function (userHeaders) { return formHeaders; }; -FormData.prototype.setBoundary = function (boundary) { - if (typeof boundary !== 'string') { - throw new TypeError('FormData boundary must be a string'); - } +FormData.prototype.setBoundary = function(boundary) { this._boundary = boundary; }; -FormData.prototype.getBoundary = function () { +FormData.prototype.getBoundary = function() { if (!this._boundary) { this._generateBoundary(); } @@ -15227,55 +15227,60 @@ FormData.prototype.getBoundary = function () { return this._boundary; }; -FormData.prototype.getBuffer = function () { - var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); var boundary = this.getBoundary(); // Create the form content. Add Line breaks to the end of data. for (var i = 0, len = this._streams.length; i < len; i++) { if (typeof this._streams[i] !== 'function') { + // Add content to the buffer. - if (Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); - } else { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); } // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); } } } // Add the footer and return the Buffer object. - return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); }; -FormData.prototype._generateBoundary = function () { +FormData.prototype._generateBoundary = function() { // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; }; // Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually and add it as knownLength option -FormData.prototype.getLengthSync = function () { +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { var knownLength = this._overheadLength + this._valueLength; - // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form if (this._streams.length) { knownLength += this._lastBoundary().length; } // https://github.com/form-data/form-data/issues/40 if (!this.hasKnownLength()) { - /* - * Some async length retrievers are present - * therefore synchronous length calculation is false. - * Please use getLength(callback) to get proper length - */ + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length this._error(new Error('Cannot calculate proper length in synchronous way.')); } @@ -15285,7 +15290,7 @@ FormData.prototype.getLengthSync = function () { // Public API to check if length of added values is known // https://github.com/form-data/form-data/issues/196 // https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function () { +FormData.prototype.hasKnownLength = function() { var hasKnownLength = true; if (this._valuesToMeasure.length) { @@ -15295,7 +15300,7 @@ FormData.prototype.hasKnownLength = function () { return hasKnownLength; }; -FormData.prototype.getLength = function (cb) { +FormData.prototype.getLength = function(cb) { var knownLength = this._overheadLength + this._valueLength; if (this._streams.length) { @@ -15307,13 +15312,13 @@ FormData.prototype.getLength = function (cb) { return; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { if (err) { cb(err); return; } - values.forEach(function (length) { + values.forEach(function(length) { knownLength += length; }); @@ -15321,26 +15326,31 @@ FormData.prototype.getLength = function (cb) { }); }; -FormData.prototype.submit = function (params, cb) { - var request; - var options; - var defaults = { method: 'post' }; +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; - // parse provided url if it's string or treat it as options object - if (typeof params === 'string') { - params = parseUrl(params); // eslint-disable-line no-param-reassign - /* eslint sort-keys: 0 */ + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); options = populate({ port: params.port, path: params.pathname, host: params.hostname, protocol: params.protocol }, defaults); - } else { // use custom params + + // use custom params + } else { + options = populate(params, defaults); // if no port provided use default one if (!options.port) { - options.port = options.protocol === 'https:' ? 443 : 80; + options.port = options.protocol == 'https:' ? 443 : 80; } } @@ -15348,14 +15358,14 @@ FormData.prototype.submit = function (params, cb) { options.headers = this.getHeaders(params.headers); // https if specified, fallback to http in any other case - if (options.protocol === 'https:') { + if (options.protocol == 'https:') { request = https.request(options); } else { request = http.request(options); } // get content length and fire away - this.getLength(function (err, length) { + this.getLength(function(err, length) { if (err && err !== 'Unknown stream') { this._error(err); return; @@ -15387,7 +15397,7 @@ FormData.prototype.submit = function (params, cb) { return request; }; -FormData.prototype._error = function (err) { +FormData.prototype._error = function(err) { if (!this.error) { this.error = err; this.pause(); @@ -15398,10 +15408,6 @@ FormData.prototype._error = function (err) { FormData.prototype.toString = function () { return '[object FormData]'; }; -setToStringTag(FormData.prototype, 'FormData'); - -// Public API -module.exports = FormData; /***/ }), @@ -15409,13 +15415,12 @@ module.exports = FormData; /***/ 3971: /***/ ((module) => { -"use strict"; - - // populates missing values -module.exports = function (dst, src) { - Object.keys(src).forEach(function (prop) { - dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; }); return dst; @@ -51572,7 +51577,7 @@ function expand(str, isTop) { var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} - if (m.post.match(/,(?!,).*\}/)) { + if (m.post.match(/,.*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } @@ -51664,83 +51669,6 @@ function expand(str, isTop) { -/***/ }), - -/***/ 9227: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var bind = __nccwpck_require__(8334); - -var $apply = __nccwpck_require__(4177); -var $call = __nccwpck_require__(2808); -var $reflectApply = __nccwpck_require__(8309); - -/** @type {import('./actualApply')} */ -module.exports = $reflectApply || bind.call($call, $apply); - - -/***/ }), - -/***/ 4177: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./functionApply')} */ -module.exports = Function.prototype.apply; - - -/***/ }), - -/***/ 2808: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./functionCall')} */ -module.exports = Function.prototype.call; - - -/***/ }), - -/***/ 6815: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var bind = __nccwpck_require__(8334); -var $TypeError = __nccwpck_require__(6361); - -var $call = __nccwpck_require__(2808); -var $actualApply = __nccwpck_require__(9227); - -/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ -module.exports = function callBindBasic(args) { - if (args.length < 1 || typeof args[0] !== 'function') { - throw new $TypeError('a function is required'); - } - return $actualApply(bind, $call, args); -}; - - -/***/ }), - -/***/ 8309: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./reflectApply')} */ -module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; - - /***/ }), /***/ 5443: @@ -52090,1004 +52018,6 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { }; -/***/ }), - -/***/ 2693: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var callBind = __nccwpck_require__(6815); -var gOPD = __nccwpck_require__(8501); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; - - -/***/ }), - -/***/ 6123: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; - - -/***/ }), - -/***/ 1933: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./eval')} */ -module.exports = EvalError; - - -/***/ }), - -/***/ 8015: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Error; - - -/***/ }), - -/***/ 4415: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./range')} */ -module.exports = RangeError; - - -/***/ }), - -/***/ 9246: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./ref')} */ -module.exports = ReferenceError; - - -/***/ }), - -/***/ 5474: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; - - -/***/ }), - -/***/ 6361: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./type')} */ -module.exports = TypeError; - - -/***/ }), - -/***/ 5065: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./uri')} */ -module.exports = URIError; - - -/***/ }), - -/***/ 8308: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Object; - - -/***/ }), - -/***/ 1770: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var GetIntrinsic = __nccwpck_require__(4538); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -var hasToStringTag = __nccwpck_require__(9038)(); -var hasOwn = __nccwpck_require__(2157); -var $TypeError = __nccwpck_require__(6361); - -var toStringTag = hasToStringTag ? Symbol.toStringTag : null; - -/** @type {import('.')} */ -module.exports = function setToStringTag(object, value) { - var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; - var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; - if ( - (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') - || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') - ) { - throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); - } - if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { - if ($defineProperty) { - $defineProperty(object, toStringTag, { - configurable: !nonConfigurable, - enumerable: false, - value: value, - writable: false - }); - } else { - object[toStringTag] = value; // eslint-disable-line no-param-reassign - } - } -}; - - -/***/ }), - -/***/ 9320: -/***/ ((module) => { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - - -/***/ }), - -/***/ 8334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var implementation = __nccwpck_require__(9320); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), - -/***/ 4538: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var undefined; - -var $Object = __nccwpck_require__(8308); - -var $Error = __nccwpck_require__(8015); -var $EvalError = __nccwpck_require__(1933); -var $RangeError = __nccwpck_require__(4415); -var $ReferenceError = __nccwpck_require__(9246); -var $SyntaxError = __nccwpck_require__(5474); -var $TypeError = __nccwpck_require__(6361); -var $URIError = __nccwpck_require__(5065); - -var abs = __nccwpck_require__(9775); -var floor = __nccwpck_require__(924); -var max = __nccwpck_require__(2419); -var min = __nccwpck_require__(3373); -var pow = __nccwpck_require__(8029); -var round = __nccwpck_require__(9396); -var sign = __nccwpck_require__(9091); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = __nccwpck_require__(8501); -var $defineProperty = __nccwpck_require__(6123); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __nccwpck_require__(587)(); - -var getProto = __nccwpck_require__(3592); -var $ObjectGPO = __nccwpck_require__(5045); -var $ReflectGPO = __nccwpck_require__(8859); - -var $apply = __nccwpck_require__(4177); -var $call = __nccwpck_require__(2808); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%Object.getPrototypeOf%': $ObjectGPO, - '%Math.abs%': abs, - '%Math.floor%': floor, - '%Math.max%': max, - '%Math.min%': min, - '%Math.pow%': pow, - '%Math.round%': round, - '%Math.sign%': sign, - '%Reflect.getPrototypeOf%': $ReflectGPO -}; - -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __nccwpck_require__(8334); -var hasOwn = __nccwpck_require__(2157); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 5045: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var $Object = __nccwpck_require__(8308); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; - - -/***/ }), - -/***/ 8859: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; - - -/***/ }), - -/***/ 3592: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var reflectGetProto = __nccwpck_require__(8859); -var originalGetProto = __nccwpck_require__(5045); - -var getDunderProto = __nccwpck_require__(2693); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; - - -/***/ }), - -/***/ 7087: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; - - -/***/ }), - -/***/ 8501: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/** @type {import('.')} */ -var $gOPD = __nccwpck_require__(7087); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; - - -/***/ }), - -/***/ 587: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __nccwpck_require__(7747); - -/** @type {import('.')} */ -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), - -/***/ 7747: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 9038: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var hasSymbols = __nccwpck_require__(7747); - -/** @type {import('.')} */ -module.exports = function hasToStringTagShams() { - return hasSymbols() && !!Symbol.toStringTag; -}; - - -/***/ }), - -/***/ 2157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = __nccwpck_require__(8334); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); - - -/***/ }), - -/***/ 9775: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./abs')} */ -module.exports = Math.abs; - - -/***/ }), - -/***/ 924: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./floor')} */ -module.exports = Math.floor; - - -/***/ }), - -/***/ 7661: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; - - -/***/ }), - -/***/ 2419: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./max')} */ -module.exports = Math.max; - - -/***/ }), - -/***/ 3373: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./min')} */ -module.exports = Math.min; - - -/***/ }), - -/***/ 8029: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./pow')} */ -module.exports = Math.pow; - - -/***/ }), - -/***/ 9396: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./round')} */ -module.exports = Math.round; - - -/***/ }), - -/***/ 9091: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var $isNaN = __nccwpck_require__(7661); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; - - /***/ }), /***/ 7426: @@ -63872,7 +62802,7 @@ module.exports = { const { parseSetCookie } = __nccwpck_require__(4408) -const { stringify } = __nccwpck_require__(3121) +const { stringify, getHeadersList } = __nccwpck_require__(3121) const { webidl } = __nccwpck_require__(1744) const { Headers } = __nccwpck_require__(554) @@ -63948,13 +62878,14 @@ function getSetCookies (headers) { webidl.brandCheck(headers, Headers, { strict: false }) - const cookies = headers.getSetCookie() + const cookies = getHeadersList(headers).cookies if (!cookies) { return [] } - return cookies.map((pair) => parseSetCookie(pair)) + // In older versions of undici, cookies is a list of name:value. + return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) } /** @@ -64382,15 +63313,14 @@ module.exports = { /***/ }), /***/ 3121: -/***/ ((module) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * @param {string} value - * @returns {boolean} - */ +const assert = __nccwpck_require__(9491) +const { kHeadersList } = __nccwpck_require__(2785) + function isCTLExcludingHtab (value) { if (value.length === 0) { return false @@ -64651,13 +63581,31 @@ function stringify (cookie) { return out.join('; ') } +let kHeadersListNode + +function getHeadersList (headers) { + if (headers[kHeadersList]) { + return headers[kHeadersList] + } + + if (!kHeadersListNode) { + kHeadersListNode = Object.getOwnPropertySymbols(headers).find( + (symbol) => symbol.description === 'headers list' + ) + + assert(kHeadersListNode, 'Headers cannot be parsed') + } + + const headersList = headers[kHeadersListNode] + assert(headersList) + + return headersList +} + module.exports = { isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify + stringify, + getHeadersList } @@ -68661,7 +67609,6 @@ const { isValidHeaderName, isValidHeaderValue } = __nccwpck_require__(2538) -const util = __nccwpck_require__(3837) const { webidl } = __nccwpck_require__(1744) const assert = __nccwpck_require__(9491) @@ -69215,9 +68162,6 @@ Object.defineProperties(Headers.prototype, { [Symbol.toStringTag]: { value: 'Headers', configurable: true - }, - [util.inspect.custom]: { - enumerable: false } }) @@ -78394,20 +77338,6 @@ class Pool extends PoolBase { ? { ...options.interceptors } : undefined this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) } [kGetDispatcher] () { diff --git a/dist/setup/index.js b/dist/setup/index.js index a90e4d6..ffccd09 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -18687,9 +18687,6 @@ exports.userAgentPolicy = userAgentPolicy; /***/ 6279: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - - var CombinedStream = __nccwpck_require__(5443); var util = __nccwpck_require__(3837); var path = __nccwpck_require__(1017); @@ -18698,20 +18695,23 @@ var https = __nccwpck_require__(5687); var parseUrl = (__nccwpck_require__(7310).parse); var fs = __nccwpck_require__(7147); var Stream = (__nccwpck_require__(2781).Stream); -var crypto = __nccwpck_require__(6113); var mime = __nccwpck_require__(3583); var asynckit = __nccwpck_require__(4812); -var setToStringTag = __nccwpck_require__(1770); -var hasOwn = __nccwpck_require__(2157); var populate = __nccwpck_require__(3971); +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + /** * Create readable "multipart/form-data" streams. * Can be used to submit forms * and file uploads to other web applications. * * @constructor - * @param {object} options - Properties to be added/overriden for FormData and CombinedStream + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream */ function FormData(options) { if (!(this instanceof FormData)) { @@ -18724,39 +18724,35 @@ function FormData(options) { CombinedStream.call(this); - options = options || {}; // eslint-disable-line no-param-reassign - for (var option in options) { // eslint-disable-line no-restricted-syntax + options = options || {}; + for (var option in options) { this[option] = options[option]; } } -// make it a Stream -util.inherits(FormData, CombinedStream); - FormData.LINE_BREAK = '\r\n'; FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; -FormData.prototype.append = function (field, value, options) { - options = options || {}; // eslint-disable-line no-param-reassign +FormData.prototype.append = function(field, value, options) { + + options = options || {}; // allow filename as single option - if (typeof options === 'string') { - options = { filename: options }; // eslint-disable-line no-param-reassign + if (typeof options == 'string') { + options = {filename: options}; } var append = CombinedStream.prototype.append.bind(this); // all that streamy business can't handle numbers - if (typeof value === 'number' || value == null) { - value = String(value); // eslint-disable-line no-param-reassign + if (typeof value == 'number') { + value = '' + value; } // https://github.com/felixge/node-form-data/issues/38 - if (Array.isArray(value)) { - /* - * Please convert your array into string - * the way web server expects it - */ + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it this._error(new Error('Arrays are not supported.')); return; } @@ -18772,17 +18768,15 @@ FormData.prototype.append = function (field, value, options) { this._trackLength(header, value, options); }; -FormData.prototype._trackLength = function (header, value, options) { +FormData.prototype._trackLength = function(header, value, options) { var valueLength = 0; - /* - * used w/ getLengthSync(), when length is known. - * e.g. for streaming directly from a remote server, - * w/ a known file a size, and not wanting to wait for - * incoming file to finish to get its size. - */ + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. if (options.knownLength != null) { - valueLength += Number(options.knownLength); + valueLength += +options.knownLength; } else if (Buffer.isBuffer(value)) { valueLength = value.length; } else if (typeof value === 'string') { @@ -18792,10 +18786,12 @@ FormData.prototype._trackLength = function (header, value, options) { this._valueLength += valueLength; // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; // empty or either doesn't have path or not an http response or not a stream - if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { return; } @@ -18805,8 +18801,10 @@ FormData.prototype._trackLength = function (header, value, options) { } }; -FormData.prototype._lengthRetriever = function (value, callback) { - if (hasOwn(value, 'fd')) { +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + // take read range into a account // `end` = Infinity –> read file till the end // @@ -18815,52 +18813,54 @@ FormData.prototype._lengthRetriever = function (value, callback) { // Fix it when node fixes it. // https://github.com/joyent/node/issues/7819 if (value.end != undefined && value.end != Infinity && value.start != undefined) { + // when end specified // no need to calculate range // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return + callback(null, value.end + 1 - (value.start ? value.start : 0)); - // not that fast snoopy + // not that fast snoopy } else { // still need to fetch file size from fs - fs.stat(value.path, function (err, stat) { + fs.stat(value.path, function(err, stat) { + + var fileSize; + if (err) { callback(err); return; } // update final size based on the range options - var fileSize = stat.size - (value.start ? value.start : 0); + fileSize = stat.size - (value.start ? value.start : 0); callback(null, fileSize); }); } - // or http response - } else if (hasOwn(value, 'httpVersion')) { - callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); - // or request stream http://github.com/mikeal/request - } else if (hasOwn(value, 'httpModule')) { + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { // wait till response come back - value.on('response', function (response) { + value.on('response', function(response) { value.pause(); - callback(null, Number(response.headers['content-length'])); + callback(null, +response.headers['content-length']); }); value.resume(); - // something else + // something else } else { - callback('Unknown stream'); // eslint-disable-line callback-return + callback('Unknown stream'); } }; -FormData.prototype._multiPartHeader = function (field, value, options) { - /* - * custom header specified (as string)? - * it becomes responsible for boundary - * (e.g. to handle extra CRLFs on .NET servers) - */ - if (typeof options.header === 'string') { +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { return options.header; } @@ -18868,7 +18868,7 @@ FormData.prototype._multiPartHeader = function (field, value, options) { var contentType = this._getContentType(value, options); var contents = ''; - var headers = { + var headers = { // add custom disposition as third element or keep it two elements if not 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), // if no content type. allow it to be empty array @@ -18876,74 +18876,77 @@ FormData.prototype._multiPartHeader = function (field, value, options) { }; // allow custom headers. - if (typeof options.header === 'object') { + if (typeof options.header == 'object') { populate(headers, options.header); } var header; - for (var prop in headers) { // eslint-disable-line no-restricted-syntax - if (hasOwn(headers, prop)) { - header = headers[prop]; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; - // skip nullish headers. - if (header == null) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } + // skip nullish headers. + if (header == null) { + continue; + } - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; } } return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; }; -FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return - var filename; +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; if (typeof options.filepath === 'string') { // custom filepath for relative paths filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || (value && (value.name || value.path))) { - /* - * custom filename take precedence - * formidable and the browser add a name property - * fs- and request- streams have path property - */ - filename = path.basename(options.filename || (value && (value.name || value.path))); - } else if (value && value.readable && hasOwn(value, 'httpVersion')) { + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { // or try http response filename = path.basename(value.client._httpMessage.path || ''); } if (filename) { - return 'filename="' + filename + '"'; + contentDisposition = 'filename="' + filename + '"'; } + + return contentDisposition; }; -FormData.prototype._getContentType = function (value, options) { +FormData.prototype._getContentType = function(value, options) { + // use custom content-type above all var contentType = options.contentType; // or try `name` from formidable, browser - if (!contentType && value && value.name) { + if (!contentType && value.name) { contentType = mime.lookup(value.name); } // or try `path` from fs-, request- streams - if (!contentType && value && value.path) { + if (!contentType && value.path) { contentType = mime.lookup(value.path); } // or if it's http-reponse - if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { contentType = value.headers['content-type']; } @@ -18953,18 +18956,18 @@ FormData.prototype._getContentType = function (value, options) { } // fallback to the default content type if `value` is not simple value - if (!contentType && value && typeof value === 'object') { + if (!contentType && typeof value == 'object') { contentType = FormData.DEFAULT_CONTENT_TYPE; } return contentType; }; -FormData.prototype._multiPartFooter = function () { - return function (next) { +FormData.prototype._multiPartFooter = function() { + return function(next) { var footer = FormData.LINE_BREAK; - var lastPart = this._streams.length === 0; + var lastPart = (this._streams.length === 0); if (lastPart) { footer += this._lastBoundary(); } @@ -18973,18 +18976,18 @@ FormData.prototype._multiPartFooter = function () { }.bind(this); }; -FormData.prototype._lastBoundary = function () { +FormData.prototype._lastBoundary = function() { return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; }; -FormData.prototype.getHeaders = function (userHeaders) { +FormData.prototype.getHeaders = function(userHeaders) { var header; var formHeaders = { 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() }; - for (header in userHeaders) { // eslint-disable-line no-restricted-syntax - if (hasOwn(userHeaders, header)) { + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { formHeaders[header.toLowerCase()] = userHeaders[header]; } } @@ -18992,14 +18995,11 @@ FormData.prototype.getHeaders = function (userHeaders) { return formHeaders; }; -FormData.prototype.setBoundary = function (boundary) { - if (typeof boundary !== 'string') { - throw new TypeError('FormData boundary must be a string'); - } +FormData.prototype.setBoundary = function(boundary) { this._boundary = boundary; }; -FormData.prototype.getBoundary = function () { +FormData.prototype.getBoundary = function() { if (!this._boundary) { this._generateBoundary(); } @@ -19007,55 +19007,60 @@ FormData.prototype.getBoundary = function () { return this._boundary; }; -FormData.prototype.getBuffer = function () { - var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); var boundary = this.getBoundary(); // Create the form content. Add Line breaks to the end of data. for (var i = 0, len = this._streams.length; i < len; i++) { if (typeof this._streams[i] !== 'function') { + // Add content to the buffer. - if (Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); - } else { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); } // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); } } } // Add the footer and return the Buffer object. - return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); }; -FormData.prototype._generateBoundary = function () { +FormData.prototype._generateBoundary = function() { // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; }; // Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually and add it as knownLength option -FormData.prototype.getLengthSync = function () { +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { var knownLength = this._overheadLength + this._valueLength; - // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form if (this._streams.length) { knownLength += this._lastBoundary().length; } // https://github.com/form-data/form-data/issues/40 if (!this.hasKnownLength()) { - /* - * Some async length retrievers are present - * therefore synchronous length calculation is false. - * Please use getLength(callback) to get proper length - */ + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length this._error(new Error('Cannot calculate proper length in synchronous way.')); } @@ -19065,7 +19070,7 @@ FormData.prototype.getLengthSync = function () { // Public API to check if length of added values is known // https://github.com/form-data/form-data/issues/196 // https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function () { +FormData.prototype.hasKnownLength = function() { var hasKnownLength = true; if (this._valuesToMeasure.length) { @@ -19075,7 +19080,7 @@ FormData.prototype.hasKnownLength = function () { return hasKnownLength; }; -FormData.prototype.getLength = function (cb) { +FormData.prototype.getLength = function(cb) { var knownLength = this._overheadLength + this._valueLength; if (this._streams.length) { @@ -19087,13 +19092,13 @@ FormData.prototype.getLength = function (cb) { return; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { if (err) { cb(err); return; } - values.forEach(function (length) { + values.forEach(function(length) { knownLength += length; }); @@ -19101,26 +19106,31 @@ FormData.prototype.getLength = function (cb) { }); }; -FormData.prototype.submit = function (params, cb) { - var request; - var options; - var defaults = { method: 'post' }; +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; - // parse provided url if it's string or treat it as options object - if (typeof params === 'string') { - params = parseUrl(params); // eslint-disable-line no-param-reassign - /* eslint sort-keys: 0 */ + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); options = populate({ port: params.port, path: params.pathname, host: params.hostname, protocol: params.protocol }, defaults); - } else { // use custom params + + // use custom params + } else { + options = populate(params, defaults); // if no port provided use default one if (!options.port) { - options.port = options.protocol === 'https:' ? 443 : 80; + options.port = options.protocol == 'https:' ? 443 : 80; } } @@ -19128,14 +19138,14 @@ FormData.prototype.submit = function (params, cb) { options.headers = this.getHeaders(params.headers); // https if specified, fallback to http in any other case - if (options.protocol === 'https:') { + if (options.protocol == 'https:') { request = https.request(options); } else { request = http.request(options); } // get content length and fire away - this.getLength(function (err, length) { + this.getLength(function(err, length) { if (err && err !== 'Unknown stream') { this._error(err); return; @@ -19167,7 +19177,7 @@ FormData.prototype.submit = function (params, cb) { return request; }; -FormData.prototype._error = function (err) { +FormData.prototype._error = function(err) { if (!this.error) { this.error = err; this.pause(); @@ -19178,10 +19188,6 @@ FormData.prototype._error = function (err) { FormData.prototype.toString = function () { return '[object FormData]'; }; -setToStringTag(FormData.prototype, 'FormData'); - -// Public API -module.exports = FormData; /***/ }), @@ -19189,13 +19195,12 @@ module.exports = FormData; /***/ 3971: /***/ ((module) => { -"use strict"; - - // populates missing values -module.exports = function (dst, src) { - Object.keys(src).forEach(function (prop) { - dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; }); return dst; @@ -55352,7 +55357,7 @@ function expand(str, isTop) { var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} - if (m.post.match(/,(?!,).*\}/)) { + if (m.post.match(/,.*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } @@ -55444,83 +55449,6 @@ function expand(str, isTop) { -/***/ }), - -/***/ 9227: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var bind = __nccwpck_require__(8334); - -var $apply = __nccwpck_require__(4177); -var $call = __nccwpck_require__(2808); -var $reflectApply = __nccwpck_require__(8309); - -/** @type {import('./actualApply')} */ -module.exports = $reflectApply || bind.call($call, $apply); - - -/***/ }), - -/***/ 4177: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./functionApply')} */ -module.exports = Function.prototype.apply; - - -/***/ }), - -/***/ 2808: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./functionCall')} */ -module.exports = Function.prototype.call; - - -/***/ }), - -/***/ 6815: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var bind = __nccwpck_require__(8334); -var $TypeError = __nccwpck_require__(6361); - -var $call = __nccwpck_require__(2808); -var $actualApply = __nccwpck_require__(9227); - -/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ -module.exports = function callBindBasic(args) { - if (args.length < 1 || typeof args[0] !== 'function') { - throw new $TypeError('a function is required'); - } - return $actualApply(bind, $call, args); -}; - - -/***/ }), - -/***/ 8309: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./reflectApply')} */ -module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; - - /***/ }), /***/ 5443: @@ -55870,1004 +55798,6 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { }; -/***/ }), - -/***/ 2693: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var callBind = __nccwpck_require__(6815); -var gOPD = __nccwpck_require__(8501); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; - - -/***/ }), - -/***/ 6123: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; - - -/***/ }), - -/***/ 1933: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./eval')} */ -module.exports = EvalError; - - -/***/ }), - -/***/ 8015: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Error; - - -/***/ }), - -/***/ 4415: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./range')} */ -module.exports = RangeError; - - -/***/ }), - -/***/ 9246: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./ref')} */ -module.exports = ReferenceError; - - -/***/ }), - -/***/ 5474: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; - - -/***/ }), - -/***/ 6361: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./type')} */ -module.exports = TypeError; - - -/***/ }), - -/***/ 5065: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./uri')} */ -module.exports = URIError; - - -/***/ }), - -/***/ 8308: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('.')} */ -module.exports = Object; - - -/***/ }), - -/***/ 1770: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var GetIntrinsic = __nccwpck_require__(4538); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -var hasToStringTag = __nccwpck_require__(9038)(); -var hasOwn = __nccwpck_require__(2157); -var $TypeError = __nccwpck_require__(6361); - -var toStringTag = hasToStringTag ? Symbol.toStringTag : null; - -/** @type {import('.')} */ -module.exports = function setToStringTag(object, value) { - var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; - var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; - if ( - (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') - || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') - ) { - throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); - } - if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { - if ($defineProperty) { - $defineProperty(object, toStringTag, { - configurable: !nonConfigurable, - enumerable: false, - value: value, - writable: false - }); - } else { - object[toStringTag] = value; // eslint-disable-line no-param-reassign - } - } -}; - - -/***/ }), - -/***/ 9320: -/***/ ((module) => { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - - -/***/ }), - -/***/ 8334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var implementation = __nccwpck_require__(9320); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), - -/***/ 4538: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var undefined; - -var $Object = __nccwpck_require__(8308); - -var $Error = __nccwpck_require__(8015); -var $EvalError = __nccwpck_require__(1933); -var $RangeError = __nccwpck_require__(4415); -var $ReferenceError = __nccwpck_require__(9246); -var $SyntaxError = __nccwpck_require__(5474); -var $TypeError = __nccwpck_require__(6361); -var $URIError = __nccwpck_require__(5065); - -var abs = __nccwpck_require__(9775); -var floor = __nccwpck_require__(924); -var max = __nccwpck_require__(2419); -var min = __nccwpck_require__(3373); -var pow = __nccwpck_require__(8029); -var round = __nccwpck_require__(9396); -var sign = __nccwpck_require__(9091); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = __nccwpck_require__(8501); -var $defineProperty = __nccwpck_require__(6123); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __nccwpck_require__(587)(); - -var getProto = __nccwpck_require__(3592); -var $ObjectGPO = __nccwpck_require__(5045); -var $ReflectGPO = __nccwpck_require__(8859); - -var $apply = __nccwpck_require__(4177); -var $call = __nccwpck_require__(2808); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%Object.getPrototypeOf%': $ObjectGPO, - '%Math.abs%': abs, - '%Math.floor%': floor, - '%Math.max%': max, - '%Math.min%': min, - '%Math.pow%': pow, - '%Math.round%': round, - '%Math.sign%': sign, - '%Reflect.getPrototypeOf%': $ReflectGPO -}; - -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __nccwpck_require__(8334); -var hasOwn = __nccwpck_require__(2157); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 5045: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var $Object = __nccwpck_require__(8308); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; - - -/***/ }), - -/***/ 8859: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; - - -/***/ }), - -/***/ 3592: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var reflectGetProto = __nccwpck_require__(8859); -var originalGetProto = __nccwpck_require__(5045); - -var getDunderProto = __nccwpck_require__(2693); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; - - -/***/ }), - -/***/ 7087: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; - - -/***/ }), - -/***/ 8501: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/** @type {import('.')} */ -var $gOPD = __nccwpck_require__(7087); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; - - -/***/ }), - -/***/ 587: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __nccwpck_require__(7747); - -/** @type {import('.')} */ -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), - -/***/ 7747: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 9038: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var hasSymbols = __nccwpck_require__(7747); - -/** @type {import('.')} */ -module.exports = function hasToStringTagShams() { - return hasSymbols() && !!Symbol.toStringTag; -}; - - -/***/ }), - -/***/ 2157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = __nccwpck_require__(8334); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); - - -/***/ }), - -/***/ 9775: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./abs')} */ -module.exports = Math.abs; - - -/***/ }), - -/***/ 924: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./floor')} */ -module.exports = Math.floor; - - -/***/ }), - -/***/ 7661: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; - - -/***/ }), - -/***/ 2419: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./max')} */ -module.exports = Math.max; - - -/***/ }), - -/***/ 3373: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./min')} */ -module.exports = Math.min; - - -/***/ }), - -/***/ 8029: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./pow')} */ -module.exports = Math.pow; - - -/***/ }), - -/***/ 9396: -/***/ ((module) => { - -"use strict"; - - -/** @type {import('./round')} */ -module.exports = Math.round; - - -/***/ }), - -/***/ 9091: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var $isNaN = __nccwpck_require__(7661); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; - - /***/ }), /***/ 7426: @@ -70212,7 +69142,7 @@ module.exports = { const { parseSetCookie } = __nccwpck_require__(4408) -const { stringify } = __nccwpck_require__(3121) +const { stringify, getHeadersList } = __nccwpck_require__(3121) const { webidl } = __nccwpck_require__(1744) const { Headers } = __nccwpck_require__(554) @@ -70288,13 +69218,14 @@ function getSetCookies (headers) { webidl.brandCheck(headers, Headers, { strict: false }) - const cookies = headers.getSetCookie() + const cookies = getHeadersList(headers).cookies if (!cookies) { return [] } - return cookies.map((pair) => parseSetCookie(pair)) + // In older versions of undici, cookies is a list of name:value. + return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) } /** @@ -70722,15 +69653,14 @@ module.exports = { /***/ }), /***/ 3121: -/***/ ((module) => { +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * @param {string} value - * @returns {boolean} - */ +const assert = __nccwpck_require__(9491) +const { kHeadersList } = __nccwpck_require__(2785) + function isCTLExcludingHtab (value) { if (value.length === 0) { return false @@ -70991,13 +69921,31 @@ function stringify (cookie) { return out.join('; ') } +let kHeadersListNode + +function getHeadersList (headers) { + if (headers[kHeadersList]) { + return headers[kHeadersList] + } + + if (!kHeadersListNode) { + kHeadersListNode = Object.getOwnPropertySymbols(headers).find( + (symbol) => symbol.description === 'headers list' + ) + + assert(kHeadersListNode, 'Headers cannot be parsed') + } + + const headersList = headers[kHeadersListNode] + assert(headersList) + + return headersList +} + module.exports = { isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify + stringify, + getHeadersList } @@ -75001,7 +73949,6 @@ const { isValidHeaderName, isValidHeaderValue } = __nccwpck_require__(2538) -const util = __nccwpck_require__(3837) const { webidl } = __nccwpck_require__(1744) const assert = __nccwpck_require__(9491) @@ -75555,9 +74502,6 @@ Object.defineProperties(Headers.prototype, { [Symbol.toStringTag]: { value: 'Headers', configurable: true - }, - [util.inspect.custom]: { - enumerable: false } }) @@ -84734,20 +83678,6 @@ class Pool extends PoolBase { ? { ...options.interceptors } : undefined this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) } [kGetDispatcher] () { @@ -94624,7 +93554,7 @@ function getInfoFromDist(versionSpec, arch) { if (!version) { return null; } - const downloadUrl = `https://go.dev/dl/${version.files[0].filename}`; + const downloadUrl = `https://storage.googleapis.com/golang/${version.files[0].filename}`; return { type: 'dist', downloadUrl: downloadUrl, diff --git a/package-lock.json b/package-lock.json index ed50496..0c516cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -207,15 +207,12 @@ } }, "node_modules/@azure/core-http/node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -974,11 +971,10 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -1616,15 +1612,12 @@ } }, "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -1805,9 +1798,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "license": "MIT", "dependencies": { @@ -2161,10 +2154,9 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "license": "MIT", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2255,19 +2247,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2635,20 +2614,6 @@ "node": ">=6.0.0" } }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -2698,51 +2663,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3200,9 +3120,9 @@ } }, "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "license": "MIT", "dependencies": { @@ -3271,17 +3191,13 @@ "dev": true }, "node_modules/form-data": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", - "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", - "license": "MIT", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.35", - "safe-buffer": "^5.2.1" + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" }, "engines": { "node": ">= 0.12" @@ -3311,6 +3227,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3352,24 +3269,15 @@ } }, "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3384,19 +3292,6 @@ "node": ">=8.0.0" } }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3457,12 +3352,12 @@ } }, "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3501,11 +3396,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -3514,12 +3421,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, "dependencies": { - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -3529,10 +3436,10 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -4413,11 +4320,10 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4606,15 +4512,6 @@ "tmpl": "1.0.5" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5362,26 +5259,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/sax": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", @@ -5802,9 +5679,9 @@ } }, "node_modules/undici": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", - "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" diff --git a/src/installer.ts b/src/installer.ts index 75b9aa5..1b5f20f 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -386,7 +386,7 @@ async function getInfoFromDist( return null; } - const downloadUrl = `https://go.dev/dl/${version.files[0].filename}`; + const downloadUrl = `https://storage.googleapis.com/golang/${version.files[0].filename}`; return { type: 'dist',