@stacksjs/buddy 0.70.9 → 0.70.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-1e89wpt6.js +2 -0
- package/dist/chunk-2htrvvzn.js +3 -0
- package/dist/chunk-2nrg08kz.js +2 -0
- package/dist/{chunk-bj7sb2gs.js → chunk-2pj0cr49.js} +1 -1
- package/dist/chunk-4v1a15ke.js +5 -0
- package/dist/{chunk-aqgpc9tg.js → chunk-68apz1e2.js} +1 -1
- package/dist/chunk-6v69415e.js +2 -0
- package/dist/chunk-8nb3z33p.js +2 -0
- package/dist/chunk-992fz6fq.js +3 -0
- package/dist/chunk-9j2yq17h.js +15 -0
- package/dist/chunk-9jthaaph.js +2 -0
- package/dist/chunk-am6xbcgg.js +2 -0
- package/dist/chunk-at17xh96.js +1 -0
- package/dist/{chunk-6444b3b6.js → chunk-cdr3xnz9.js} +1 -1
- package/dist/{chunk-h6ga49c2.js → chunk-cptthhq1.js} +2 -2
- package/dist/chunk-cqrmkpzz.js +8 -0
- package/dist/chunk-d9bheak7.js +35 -0
- package/dist/chunk-f0ftye71.js +3 -0
- package/dist/chunk-fvdx05dx.js +25 -0
- package/dist/{chunk-eyn01tkt.js → chunk-hjdz5p2e.js} +2 -2
- package/dist/{chunk-864kk6a7.js → chunk-ks9kq37e.js} +1 -1
- package/dist/chunk-m05w5c0s.js +2 -0
- package/dist/{chunk-m5phygyg.js → chunk-mvkb5fc3.js} +2 -2
- package/dist/chunk-nec9r4e3.js +240 -0
- package/dist/chunk-rewjb3gf.js +10 -0
- package/dist/{chunk-y7yphjhj.js → chunk-s6kch47s.js} +1 -1
- package/dist/{chunk-wjhmhcgy.js → chunk-sgrntkej.js} +2 -2
- package/dist/{chunk-vcke324z.js → chunk-whp9hjd8.js} +3 -3
- package/dist/chunk-x0ahr107.js +33 -0
- package/dist/chunk-x46hz7dc.js +10 -0
- package/dist/{chunk-sz5qrrg9.js → chunk-z4zm45jz.js} +1 -1
- package/dist/chunk-z8qfv6vv.js +5410 -0
- package/dist/chunk-zxq24dtw.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +45 -45
- package/dist/chunk-0kx5e4np.js +0 -3
- package/dist/chunk-8nnfx0xe.js +0 -10
- package/dist/chunk-cdz7xgbk.js +0 -5
- package/dist/chunk-cs2tr6yd.js +0 -2
- package/dist/chunk-cx7bz59q.js +0 -3
- package/dist/chunk-dvnqfcah.js +0 -2
- package/dist/chunk-dz02fqrj.js +0 -1
- package/dist/chunk-ensrnv3v.js +0 -4699
- package/dist/chunk-f0sjawty.js +0 -3
- package/dist/chunk-gamj1826.js +0 -2
- package/dist/chunk-gser7yzj.js +0 -2
- package/dist/chunk-p2hmvsjh.js +0 -10
- package/dist/chunk-v040jj16.js +0 -2
- package/dist/chunk-xkpw06x6.js +0 -2
- package/dist/chunk-yqrgw3jk.js +0 -35
- package/dist/chunk-zyvsgnfm.js +0 -25
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ga as U,Ha as m}from"./chunk-6v69415e.js";import"./chunk-2pj0cr49.js";/*!
|
|
3
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*
|
|
6
|
+
* Redistribution and use in source and binary forms, with or without
|
|
7
|
+
* modification, are permitted provided that the following conditions are met:
|
|
8
|
+
*
|
|
9
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
* list of conditions and the following disclaimer.
|
|
11
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
* this list of conditions and the following disclaimer in the
|
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
|
14
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
15
|
+
* may be used to endorse or promote products derived from this software without
|
|
16
|
+
* specific prior written permission.
|
|
17
|
+
*
|
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
*/function A(k,z){let j=k.slice(0,z).split(/\r\n|\n|\r/g);return[j.length,j.pop().length+1]}function d(k,z,j){let J=k.split(/\r\n|\n|\r/g),K="",Z=(Math.log10(z+1)|0)+1;for(let Q=z-1;Q<=z+1;Q++){let q=J[Q-1];q&&(K+=Q.toString().padEnd(Z," "),K+=": ",K+=q,K+=`
|
|
29
|
+
`,Q===z&&(K+=" ".repeat(Z+j+2),K+=`^
|
|
30
|
+
`))}return K}class x extends Error{line;column;codeblock;constructor(k,z){let[j,J]=A(z.toml,z.ptr),K=d(z.toml,j,J);super(`Invalid TOML document: ${k}
|
|
31
|
+
|
|
32
|
+
${K}`,z),this.line=j,this.column=J,this.codeblock=K}}/*!
|
|
33
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
34
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
+
*
|
|
36
|
+
* Redistribution and use in source and binary forms, with or without
|
|
37
|
+
* modification, are permitted provided that the following conditions are met:
|
|
38
|
+
*
|
|
39
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
40
|
+
* list of conditions and the following disclaimer.
|
|
41
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
42
|
+
* this list of conditions and the following disclaimer in the
|
|
43
|
+
* documentation and/or other materials provided with the distribution.
|
|
44
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
45
|
+
* may be used to endorse or promote products derived from this software without
|
|
46
|
+
* specific prior written permission.
|
|
47
|
+
*
|
|
48
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
49
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
50
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
51
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
52
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
53
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
54
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
55
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
56
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
57
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
58
|
+
*/function M(k,z=0,j=k.length){let J=k.indexOf(`
|
|
59
|
+
`,z);return k[J-1]==="\r"&&J--,J<=j?J:-1}function G(k,z){for(let j=z;j<k.length;j++){let J=k[j];if(J===`
|
|
60
|
+
`)return j;if(J==="\r"&&k[j+1]===`
|
|
61
|
+
`)return j+1;if(J<" "&&J!=="\t"||J==="\x7F")throw new x("control characters are not allowed in comments",{toml:k,ptr:z})}return k.length}function V(k,z,j,J){let K;for(;(K=k[z])===" "||K==="\t"||!j&&(K===`
|
|
62
|
+
`||K==="\r"&&k[z+1]===`
|
|
63
|
+
`);)z++;return J||K!=="#"?z:V(k,G(k,z),j)}function P(k,z,j,J,K=!1){if(!J)return z=M(k,z),z<0?k.length:z;for(let Z=z;Z<k.length;Z++){let Q=k[Z];if(Q==="#")Z=M(k,Z);else{if(Q===j)return Z+1;if(Q===J)return Z;if(K&&(Q===`
|
|
64
|
+
`||Q==="\r"&&k[Z+1]===`
|
|
65
|
+
`))return Z}}throw new x("cannot find end of structure",{toml:k,ptr:z})}function C(k,z){let j=k[z],J=j===k[z+1]&&k[z+1]===k[z+2]?k.slice(z,z+3):j;z+=J.length-1;do z=k.indexOf(J,++z);while(z>-1&&j!=="'"&&k[z-1]==="\\"&&k[z-2]!=="\\");return z>-1&&(z+=J.length,J.length>1&&(k[z]===j&&z++,k[z]===j&&z++)),z}/*!
|
|
66
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
+
*
|
|
69
|
+
* Redistribution and use in source and binary forms, with or without
|
|
70
|
+
* modification, are permitted provided that the following conditions are met:
|
|
71
|
+
*
|
|
72
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
73
|
+
* list of conditions and the following disclaimer.
|
|
74
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
75
|
+
* this list of conditions and the following disclaimer in the
|
|
76
|
+
* documentation and/or other materials provided with the distribution.
|
|
77
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
78
|
+
* may be used to endorse or promote products derived from this software without
|
|
79
|
+
* specific prior written permission.
|
|
80
|
+
*
|
|
81
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
82
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
83
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
84
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
85
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
86
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
87
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
88
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
89
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
90
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
91
|
+
*/var s=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class v extends Date{#z=!1;#J=!1;#k=null;constructor(k){let z=!0,j=!0,J="Z";if(typeof k=="string"){let K=k.match(s);K?(K[1]||(z=!1,k=`0000-01-01T${k}`),j=!!K[2],K[2]&&+K[2]>23?k="":(J=K[3]||null,k=k.toUpperCase(),!J&&j&&(k+="Z"))):k=""}super(k),isNaN(this.getTime())||(this.#z=z,this.#J=j,this.#k=J)}isDateTime(){return this.#z&&this.#J}isLocal(){return!this.#z||!this.#J||!this.#k}isDate(){return this.#z&&!this.#J}isTime(){return this.#J&&!this.#z}isValid(){return this.#z||this.#J}toISOString(){let k=super.toISOString();if(this.isDate())return k.slice(0,10);if(this.isTime())return k.slice(11,23);if(this.#k===null)return k.slice(0,-1);if(this.#k==="Z")return k;let z=+this.#k.slice(1,3)*60+ +this.#k.slice(4,6);return z=this.#k[0]==="-"?z:-z,new Date(this.getTime()-z*60000).toISOString().slice(0,-1)+this.#k}static wrapAsOffsetDateTime(k,z="Z"){let j=new v(k);return j.#k=z,j}static wrapAsLocalDateTime(k){let z=new v(k);return z.#k=null,z}static wrapAsLocalDate(k){let z=new v(k);return z.#J=!1,z.#k=null,z}static wrapAsLocalTime(k){let z=new v(k);return z.#z=!1,z.#k=null,z}}/*!
|
|
92
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
93
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
94
|
+
*
|
|
95
|
+
* Redistribution and use in source and binary forms, with or without
|
|
96
|
+
* modification, are permitted provided that the following conditions are met:
|
|
97
|
+
*
|
|
98
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
99
|
+
* list of conditions and the following disclaimer.
|
|
100
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
101
|
+
* this list of conditions and the following disclaimer in the
|
|
102
|
+
* documentation and/or other materials provided with the distribution.
|
|
103
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
104
|
+
* may be used to endorse or promote products derived from this software without
|
|
105
|
+
* specific prior written permission.
|
|
106
|
+
*
|
|
107
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
108
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
109
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
110
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
111
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
112
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
113
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
114
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
115
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
116
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
117
|
+
*/var S=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,R=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,O=/^[+-]?0[0-9_]/,T=/^[0-9a-f]{4,8}$/i,w={b:"\b",t:"\t",n:`
|
|
118
|
+
`,f:"\f",r:"\r",'"':'"',"\\":"\\"};function L(k,z=0,j=k.length){let J=k[z]==="'",K=k[z++]===k[z]&&k[z]===k[z+1];K&&(j-=2,k[z+=2]==="\r"&&z++,k[z]===`
|
|
119
|
+
`&&z++);let Z=0,Q,q="",_=z;for(;z<j-1;){let $=k[z++];if($===`
|
|
120
|
+
`||$==="\r"&&k[z]===`
|
|
121
|
+
`){if(!K)throw new x("newlines are not allowed in strings",{toml:k,ptr:z-1})}else if($<" "&&$!=="\t"||$==="\x7F")throw new x("control characters are not allowed in strings",{toml:k,ptr:z-1});if(Q){if(Q=!1,$==="u"||$==="U"){let X=k.slice(z,z+=$==="u"?4:8);if(!T.test(X))throw new x("invalid unicode escape",{toml:k,ptr:Z});try{q+=String.fromCodePoint(parseInt(X,16))}catch{throw new x("invalid unicode escape",{toml:k,ptr:Z})}}else if(K&&($===`
|
|
122
|
+
`||$===" "||$==="\t"||$==="\r")){if(z=V(k,z-1,!0),k[z]!==`
|
|
123
|
+
`&&k[z]!=="\r")throw new x("invalid escape: only line-ending whitespace may be escaped",{toml:k,ptr:Z});z=V(k,z)}else if($ in w)q+=w[$];else throw new x("unrecognized escape sequence",{toml:k,ptr:Z});_=z}else!J&&$==="\\"&&(Z=z-1,Q=!0,q+=k.slice(_,Z))}return q+k.slice(_,j-1)}function u(k,z,j){if(k==="true")return!0;if(k==="false")return!1;if(k==="-inf")return-1/0;if(k==="inf"||k==="+inf")return 1/0;if(k==="nan"||k==="+nan"||k==="-nan")return NaN;if(k==="-0")return 0;let J;if((J=S.test(k))||R.test(k)){if(O.test(k))throw new x("leading zeroes are not allowed",{toml:z,ptr:j});let Z=+k.replace(/_/g,"");if(isNaN(Z))throw new x("invalid number",{toml:z,ptr:j});if(J&&!Number.isSafeInteger(Z))throw new x("integer value cannot be represented losslessly",{toml:z,ptr:j});return Z}let K=new v(k);if(!K.isValid())throw new x("invalid value",{toml:z,ptr:j});return K}/*!
|
|
124
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
125
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
126
|
+
*
|
|
127
|
+
* Redistribution and use in source and binary forms, with or without
|
|
128
|
+
* modification, are permitted provided that the following conditions are met:
|
|
129
|
+
*
|
|
130
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
131
|
+
* list of conditions and the following disclaimer.
|
|
132
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
133
|
+
* this list of conditions and the following disclaimer in the
|
|
134
|
+
* documentation and/or other materials provided with the distribution.
|
|
135
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
136
|
+
* may be used to endorse or promote products derived from this software without
|
|
137
|
+
* specific prior written permission.
|
|
138
|
+
*
|
|
139
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
140
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
141
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
142
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
143
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
144
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
145
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
146
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
147
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
148
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
149
|
+
*/function E(k,z,j,J){let K=k.slice(z,j),Z=K.indexOf("#");Z>-1&&(G(k,Z),K=K.slice(0,Z));let Q=K.trimEnd();if(!J){let q=K.indexOf(`
|
|
150
|
+
`,Q.length);if(q>-1)throw new x("newlines are not allowed in inline tables",{toml:k,ptr:z+q})}return[Q,Z]}function b(k,z,j,J){if(J===0)throw new x("document contains excessively nested structures. aborting.",{toml:k,ptr:z});let K=k[z];if(K==="["||K==="{"){let[q,_]=K==="["?f(k,z,J):a(k,z,J),$=P(k,_,",",j);if(j==="}"){let X=M(k,_,$);if(X>-1)throw new x("newlines are not allowed in inline tables",{toml:k,ptr:X})}return[q,$]}let Z;if(K==='"'||K==="'"){Z=C(k,z);let q=L(k,z,Z);if(j){if(Z=V(k,Z,j!=="]"),k[Z]&&k[Z]!==","&&k[Z]!==j&&k[Z]!==`
|
|
151
|
+
`&&k[Z]!=="\r")throw new x("unexpected character encountered",{toml:k,ptr:Z});Z+=+(k[Z]===",")}return[q,Z]}Z=P(k,z,",",j);let Q=E(k,z,Z-+(k[Z-1]===","),j==="]");if(!Q[0])throw new x("incomplete key-value declaration: no value specified",{toml:k,ptr:z});return j&&Q[1]>-1&&(Z=V(k,z+Q[1]),Z+=+(k[Z]===",")),[u(Q[0],k,z),Z]}/*!
|
|
152
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
153
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
154
|
+
*
|
|
155
|
+
* Redistribution and use in source and binary forms, with or without
|
|
156
|
+
* modification, are permitted provided that the following conditions are met:
|
|
157
|
+
*
|
|
158
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
159
|
+
* list of conditions and the following disclaimer.
|
|
160
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
161
|
+
* this list of conditions and the following disclaimer in the
|
|
162
|
+
* documentation and/or other materials provided with the distribution.
|
|
163
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
164
|
+
* may be used to endorse or promote products derived from this software without
|
|
165
|
+
* specific prior written permission.
|
|
166
|
+
*
|
|
167
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
168
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
169
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
170
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
171
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
172
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
173
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
174
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
175
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
176
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
177
|
+
*/var I=/^[a-zA-Z0-9-_]+[ \t]*$/;function g(k,z,j="="){let J=z-1,K=[],Z=k.indexOf(j,z);if(Z<0)throw new x("incomplete key-value: cannot find end of key",{toml:k,ptr:z});do{let Q=k[z=++J];if(Q!==" "&&Q!=="\t")if(Q==='"'||Q==="'"){if(Q===k[z+1]&&Q===k[z+2])throw new x("multiline strings are not allowed in keys",{toml:k,ptr:z});let q=C(k,z);if(q<0)throw new x("unfinished string encountered",{toml:k,ptr:z});J=k.indexOf(".",q);let _=k.slice(q,J<0||J>Z?Z:J),$=M(_);if($>-1)throw new x("newlines are not allowed in keys",{toml:k,ptr:z+J+$});if(_.trimStart())throw new x("found extra tokens after the string part",{toml:k,ptr:q});if(Z<q&&(Z=k.indexOf(j,q),Z<0))throw new x("incomplete key-value: cannot find end of key",{toml:k,ptr:z});K.push(L(k,z,q))}else{J=k.indexOf(".",z);let q=k.slice(z,J<0||J>Z?Z:J);if(!I.test(q))throw new x("only letter, numbers, dashes and underscores are allowed in keys",{toml:k,ptr:z});K.push(q.trimEnd())}}while(J+1&&J<Z);return[K,V(k,Z+1,!0,!0)]}function a(k,z,j){let J={},K=new Set,Z,Q=0;for(z++;(Z=k[z++])!=="}"&&Z;){if(Z===`
|
|
178
|
+
`)throw new x("newlines are not allowed in inline tables",{toml:k,ptr:z-1});if(Z==="#")throw new x("inline tables cannot contain comments",{toml:k,ptr:z-1});if(Z===",")throw new x("expected key-value, found comma",{toml:k,ptr:z-1});if(Z!==" "&&Z!=="\t"){let q,_=J,$=!1,[X,h]=g(k,z-1);for(let y=0;y<X.length;y++){if(y&&(_=$?_[q]:_[q]={}),q=X[y],($=Object.hasOwn(_,q))&&(typeof _[q]!="object"||K.has(_[q])))throw new x("trying to redefine an already defined value",{toml:k,ptr:z});!$&&q==="__proto__"&&Object.defineProperty(_,q,{enumerable:!0,configurable:!0,writable:!0})}if($)throw new x("trying to redefine an already defined value",{toml:k,ptr:z});let[F,N]=b(k,h,"}",j-1);K.add(F),_[q]=F,z=N,Q=k[z-1]===","?z-1:0}}if(Q)throw new x("trailing commas are not allowed in inline tables",{toml:k,ptr:Q});if(!Z)throw new x("unfinished table encountered",{toml:k,ptr:z});return[J,z]}function f(k,z,j){let J=[],K;for(z++;(K=k[z++])!=="]"&&K;){if(K===",")throw new x("expected value, found comma",{toml:k,ptr:z-1});if(K==="#")z=G(k,z);else if(K!==" "&&K!=="\t"&&K!==`
|
|
179
|
+
`&&K!=="\r"){let Z=b(k,z-1,"]",j-1);J.push(Z[0]),z=Z[1]}}if(!K)throw new x("unfinished array encountered",{toml:k,ptr:z});return[J,z]}/*!
|
|
180
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
181
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
182
|
+
*
|
|
183
|
+
* Redistribution and use in source and binary forms, with or without
|
|
184
|
+
* modification, are permitted provided that the following conditions are met:
|
|
185
|
+
*
|
|
186
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
187
|
+
* list of conditions and the following disclaimer.
|
|
188
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
189
|
+
* this list of conditions and the following disclaimer in the
|
|
190
|
+
* documentation and/or other materials provided with the distribution.
|
|
191
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
192
|
+
* may be used to endorse or promote products derived from this software without
|
|
193
|
+
* specific prior written permission.
|
|
194
|
+
*
|
|
195
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
196
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
197
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
198
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
199
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
200
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
201
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
202
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
203
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
204
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
205
|
+
*/function H(k,z,j,J){let K=z,Z=j,Q,q=!1,_;for(let $=0;$<k.length;$++){if($){if(K=q?K[Q]:K[Q]={},Z=(_=Z[Q]).c,J===0&&(_.t===1||_.t===2))return null;if(_.t===2){let X=K.length-1;K=K[X],Z=Z[X].c}}if(Q=k[$],(q=Object.hasOwn(K,Q))&&Z[Q]?.t===0&&Z[Q]?.d)return null;q||(Q==="__proto__"&&(Object.defineProperty(K,Q,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(Z,Q,{enumerable:!0,configurable:!0,writable:!0})),Z[Q]={t:$<k.length-1&&J===2?3:J,d:!1,i:0,c:{}})}if(_=Z[Q],_.t!==J&&!(J===1&&_.t===3)||(J===2&&(_.d||(_.d=!0,K[Q]=[]),K[Q].push(K={}),_.c[_.i++]=_={t:1,d:!1,i:0,c:{}}),_.d))return null;if(_.d=!0,J===1)K=q?K[Q]:K[Q]={};else if(J===0&&q)return null;return[Q,K,_.c]}function c(k,z){let j=z?.maxDepth??1000,J={},K={},Z=J,Q=K;for(let q=V(k,0);q<k.length;){if(k[q]==="["){let _=k[++q]==="[",$=g(k,q+=+_,"]");if(_){if(k[$[1]-1]!=="]")throw new x("expected end of table declaration",{toml:k,ptr:$[1]-1});$[1]++}let X=H($[0],J,K,_?2:1);if(!X)throw new x("trying to redefine an already defined table or value",{toml:k,ptr:q});Q=X[2],Z=X[1],q=$[1]}else{let _=g(k,q),$=H(_[0],Z,Q,0);if(!$)throw new x("trying to redefine an already defined table or value",{toml:k,ptr:q});let X=b(k,_[1],void 0,j);$[1][$[0]]=X[0],q=X[1]}if(q=V(k,q,!0),k[q]&&k[q]!==`
|
|
206
|
+
`&&k[q]!=="\r")throw new x("each key-value declaration must be followed by an end-of-line",{toml:k,ptr:q});q=V(k,q)}return J}/*!
|
|
207
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
208
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
209
|
+
*
|
|
210
|
+
* Redistribution and use in source and binary forms, with or without
|
|
211
|
+
* modification, are permitted provided that the following conditions are met:
|
|
212
|
+
*
|
|
213
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
214
|
+
* list of conditions and the following disclaimer.
|
|
215
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
216
|
+
* this list of conditions and the following disclaimer in the
|
|
217
|
+
* documentation and/or other materials provided with the distribution.
|
|
218
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
219
|
+
* may be used to endorse or promote products derived from this software without
|
|
220
|
+
* specific prior written permission.
|
|
221
|
+
*
|
|
222
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
223
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
224
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
225
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
226
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
227
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
228
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
229
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
230
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
231
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
232
|
+
*/var D=/^[a-z0-9-_]+$/i;function W(k){let z=typeof k;if(z==="object"){if(Array.isArray(k))return"array";if(k instanceof Date)return"date"}return z}function l(k){for(let z=0;z<k.length;z++)if(W(k[z])!=="object")return!1;return k.length!=0}function p(k){return JSON.stringify(k).replace(/\x7f/g,"\\u007f")}function B(k,z,j){if(j===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(z==="number")return isNaN(k)?"nan":k===1/0?"inf":k===-1/0?"-inf":k.toString();if(z==="bigint"||z==="boolean")return k.toString();if(z==="string")return p(k);if(z==="date"){if(isNaN(k.getTime()))throw new TypeError("cannot serialize invalid date");return k.toISOString()}if(z==="object")return o(k,j);if(z==="array")return r(k,j)}function o(k,z){let j=Object.keys(k);if(j.length===0)return"{}";let J="{ ";for(let K=0;K<j.length;K++){let Z=j[K];K&&(J+=", "),J+=D.test(Z)?Z:p(Z),J+=" = ",J+=B(k[Z],W(k[Z]),z-1)}return J+" }"}function r(k,z){if(k.length===0)return"[]";let j="[ ";for(let J=0;J<k.length;J++){if(J&&(j+=", "),k[J]===null||k[J]===void 0)throw new TypeError("arrays cannot contain null or undefined values");j+=B(k[J],W(k[J]),z-1)}return j+" ]"}function i(k,z,j){if(j===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let J="";for(let K=0;K<k.length;K++)J+=`[[${z}]]
|
|
233
|
+
`,J+=Y(k[K],z,j),J+=`
|
|
234
|
+
|
|
235
|
+
`;return J}function Y(k,z,j){if(j===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let J="",K="",Z=Object.keys(k);for(let Q=0;Q<Z.length;Q++){let q=Z[Q];if(k[q]!==null&&k[q]!==void 0){let _=W(k[q]);if(_==="symbol"||_==="function")throw new TypeError(`cannot serialize values of type '${_}'`);let $=D.test(q)?q:p(q);if(_==="array"&&l(k[q]))K+=i(k[q],z?`${z}.${$}`:$,j-1);else if(_==="object"){let X=z?`${z}.${$}`:$;K+=`[${X}]
|
|
236
|
+
`,K+=Y(k[q],X,j-1),K+=`
|
|
237
|
+
|
|
238
|
+
`}else J+=$,J+=" = ",J+=B(k[q],_,j),J+=`
|
|
239
|
+
`}}return`${J}
|
|
240
|
+
${K}`.trim()}function t(k,z){if(W(k)!=="object")throw new TypeError("stringify can only be called with an object");let j=z?.maxDepth??1000;return Y(k,"",j)}function e(k){let z=c(k);return U(k,z,{preserveIndentation:!1}),z}function k0(k){let z=m(k,{}),j=t(k);return z.whitespace.start+j+z.whitespace.end}export{k0 as stringifyTOML,e as parseTOML};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{Lc as u6}from"./chunk-sgrntkej.js";import{Tc as U,Wc as N}from"./chunk-2pj0cr49.js";var l=U((Ew,M0)=>{var{defineProperty:u,getOwnPropertyDescriptor:l6,getOwnPropertyNames:d6}=Object,i6=Object.prototype.hasOwnProperty,y=($,w)=>u($,"name",{value:w,configurable:!0}),p6=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},_6=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of d6(w))if(!i6.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(L=l6(w,Z))||L.enumerable})}return $},a6=($)=>_6(u({},"__esModule",{value:!0}),$),A0={};p6(A0,{Field:()=>s6,Fields:()=>r6,HttpRequest:()=>t6,HttpResponse:()=>o6,IHttpRequest:()=>R0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>n6,isValidHostname:()=>I0,resolveHttpHandlerRuntimeConfig:()=>m6});M0.exports=a6(A0);var n6=y(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),m6=y(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),R0=u6(),s6=class{static{y(this,"Field")}constructor({name:$,kind:w=R0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},r6=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{y(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},t6=class ${static{y(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=N0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function N0($){return Object.keys($).reduce((w,z)=>{let L=$[z];return{...w,[z]:Array.isArray(L)?[...L]:L}},{})}y(N0,"cloneQuery");var o6=class{static{y(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function I0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}y(I0,"isValidHostname")});var x0=U((gw,S0)=>{var{defineProperty:d,getOwnPropertyDescriptor:e6,getOwnPropertyNames:$4}=Object,w4=Object.prototype.hasOwnProperty,w0=($,w)=>d($,"name",{value:w,configurable:!0}),z4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},Z4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of $4(w))if(!w4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(L=e6(w,Z))||L.enumerable})}return $},L4=($)=>Z4(d({},"__esModule",{value:!0}),$),O0={};z4(O0,{escapeUri:()=>b0,escapeUriPath:()=>K4});S0.exports=L4(O0);var b0=w0(($)=>encodeURIComponent($).replace(/[!'()*]/g,Y4),"escapeUri"),Y4=w0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),K4=w0(($)=>$.split("/").map(b0).join("/"),"escapeUriPath")});var Z0=U((uw,k0)=>{var{defineProperty:i,getOwnPropertyDescriptor:Q4,getOwnPropertyNames:X4}=Object,G4=Object.prototype.hasOwnProperty,B4=($,w)=>i($,"name",{value:w,configurable:!0}),F4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},U4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of X4(w))if(!G4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(L=Q4(w,Z))||L.enumerable})}return $},V4=($)=>U4(i({},"__esModule",{value:!0}),$),T0={};F4(T0,{buildQueryString:()=>y0});k0.exports=V4(T0);var z0=x0();function y0($){let w=[];for(let z of Object.keys($).sort()){let L=$[z];if(z=z0.escapeUri(z),Array.isArray(L))for(let Z=0,Q=L.length;Z<Q;Z++)w.push(`${z}=${z0.escapeUri(L[Z])}`);else{let Z=z;if(L||typeof L==="string")Z+=`=${z0.escapeUri(L)}`;w.push(Z)}}return w.join("&")}B4(y0,"buildQueryString")});var m0=U((lw,n0)=>{var{create:h4,defineProperty:q,getOwnPropertyDescriptor:W4,getOwnPropertyNames:J4,getPrototypeOf:j4}=Object,D4=Object.prototype.hasOwnProperty,V=($,w)=>q($,"name",{value:w,configurable:!0}),v4=($,w)=>{for(var z in w)q($,z,{get:w[z],enumerable:!0})},q0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of J4(w))if(!D4.call($,Z)&&Z!==z)q($,Z,{get:()=>w[Z],enumerable:!(L=W4(w,Z))||L.enumerable})}return $},C4=($,w,z)=>(z=$!=null?h4(j4($)):{},q0(w||!$||!$.__esModule?q(z,"default",{value:$,enumerable:!0}):z,$)),H4=($)=>q0(q({},"__esModule",{value:!0}),$),g0={};v4(g0,{DEFAULT_REQUEST_TIMEOUT:()=>_0,NodeHttp2Handler:()=>T4,NodeHttpHandler:()=>O4,streamCollector:()=>k4});n0.exports=H4(g0);var u0=l(),l0=Z0(),L0=N("node:http"),Y0=N("node:https"),A4=["ECONNRESET","EPIPE","ETIMEDOUT"],d0=V(($)=>{let w={};for(let z of Object.keys($)){let L=$[z];w[z]=Array.isArray(L)?L.join(","):L}return w},"getTransformedHeaders"),H={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},f0=1000,R4=V(($,w,z=0)=>{if(!z)return-1;let L=V((Z)=>{let Q=H.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Y=V((K)=>{if(K?.connecting)K.on("connect",()=>{H.clearTimeout(Q)});else H.clearTimeout(Q)},"doWithSocket");if($.socket)Y($.socket);else $.on("socket",Y)},"registerTimeout");if(z<2000)return L(0),0;return H.setTimeout(L.bind(null,f0),f0)},"setConnectionTimeout"),N4=3000,I4=V(($,{keepAlive:w,keepAliveMsecs:z},L=N4)=>{if(w!==!0)return-1;let Z=V(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(Q)=>{Q.setKeepAlive(w,z||0)})},"registerListener");if(L===0)return Z(),0;return H.setTimeout(Z,L)},"setSocketKeepAlive"),E0=3000,M4=V(($,w,z=_0)=>{let L=V((Z)=>{let Q=z-Z,Y=V(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(Q,Y),$.on("close",()=>$.socket?.removeListener("timeout",Y));else $.setTimeout(Q,Y)},"registerTimeout");if(0<z&&z<6000)return L(0),0;return H.setTimeout(L.bind(null,z===0?0:E0),E0)},"setSocketTimeout"),i0=N("node:stream"),P0=6000;async function K0($,w,z=P0){let L=w.headers??{},Z=L.Expect||L.expect,Q=-1,Y=!0;if(Z==="100-continue")Y=await Promise.race([new Promise((K)=>{Q=Number(H.setTimeout(()=>K(!0),Math.max(P0,z)))}),new Promise((K)=>{$.on("continue",()=>{H.clearTimeout(Q),K(!0)}),$.on("response",()=>{H.clearTimeout(Q),K(!1)}),$.on("error",()=>{H.clearTimeout(Q),K(!1)})})]);if(Y)p0($,w.body)}V(K0,"writeRequestBody");function p0($,w){if(w instanceof i0.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}V(p0,"writeBody");var _0=0,O4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(L);else z(this.resolveDefaultConfig(w))})}static{V(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,L=console){let{sockets:Z,requests:Q,maxSockets:Y}=w;if(typeof Y!=="number"||Y===1/0)return z;let K=15000;if(Date.now()-K<z)return z;if(Z&&Q)for(let X in Z){let G=Z[X]?.length??0,F=Q[X]?.length??0;if(G>=Y&&F>=2*Y)return L?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${G} and ${F} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return z}resolveDefaultConfig(w){let{requestTimeout:z,connectionTimeout:L,socketTimeout:Z,socketAcquisitionWarningTimeout:Q,httpAgent:Y,httpsAgent:K}=w||{},X=!0,G=50;return{connectionTimeout:L,requestTimeout:z??Z,socketAcquisitionWarningTimeout:Q,httpAgent:(()=>{if(Y instanceof L0.Agent||typeof Y?.destroy==="function")return Y;return new L0.Agent({keepAlive:!0,maxSockets:50,...Y})})(),httpsAgent:(()=>{if(K instanceof Y0.Agent||typeof K?.destroy==="function")return K;return new Y0.Agent({keepAlive:!0,maxSockets:50,...K})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;return new Promise((L,Z)=>{let Q=void 0,Y=[],K=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),L(B)},"resolve"),X=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),Z(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(z?.aborted){let B=new Error("Request aborted");B.name="AbortError",X(B);return}let G=w.protocol==="https:",F=G?this.config.httpsAgent:this.config.httpAgent;Y.push(H.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let v=l0.buildQueryString(w.query||{}),D=void 0;if(w.username!=null||w.password!=null){let B=w.username??"",W=w.password??"";D=`${B}:${W}`}let j=w.path;if(v)j+=`?${v}`;if(w.fragment)j+=`#${w.fragment}`;let C=w.hostname??"";if(C[0]==="["&&C.endsWith("]"))C=w.hostname.slice(1,-1);else C=w.hostname;let x={headers:w.headers,host:C,method:w.method,path:j,port:w.port,agent:F,auth:D},h=(G?Y0.request:L0.request)(x,(B)=>{let W=new u0.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:d0(B.headers),body:B});K({response:W})});if(h.on("error",(B)=>{if(A4.includes(B.code))X(Object.assign(B,{name:"TimeoutError"}));else X(B)}),z){let B=V(()=>{h.destroy();let W=new Error("Request aborted");W.name="AbortError",X(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),h.once("close",()=>W.removeEventListener("abort",B))}else z.onabort=B}Y.push(R4(h,X,this.config.connectionTimeout)),Y.push(M4(h,X,this.config.requestTimeout));let A=x.agent;if(typeof A==="object"&&"keepAlive"in A)Y.push(I4(h,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs}));Q=K0(h,w,this.config.requestTimeout).catch((B)=>{return Y.forEach(H.clearTimeout),Z(B)})})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}},c0=N("node:http2"),b4=C4(N("node:http2")),S4=class{constructor($){this.sessions=[],this.sessions=$??[]}static{V(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}},x4=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{V(this,"NodeHttp2ConnectionManager")}lease($,w){let z=this.getUrlString($),L=this.sessionCache.get(z);if(L){let K=L.poll();if(K&&!this.config.disableConcurrency)return K}let Z=b4.default.connect(z);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(K)=>{if(K)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Z.unref();let Q=V(()=>{Z.destroy(),this.deleteSession(z,Z)},"destroySessionCb");if(Z.on("goaway",Q),Z.on("error",Q),Z.on("frameError",Q),Z.on("close",()=>this.deleteSession(z,Z)),w.requestTimeout)Z.setTimeout(w.requestTimeout,Q);let Y=this.sessionCache.get(z)||new S4;return Y.offerLast(Z),this.sessionCache.set(z,Y),Z}deleteSession($,w){let z=this.sessionCache.get($);if(!z)return;if(!z.contains(w))return;z.remove(w),this.sessionCache.set($,z)}release($,w){let z=this.getUrlString($);this.sessionCache.get(z)?.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let z of w){if(!z.destroyed)z.destroy();w.remove(z)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},T4=class ${constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new x4({}),this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(Z||{})}).catch(L);else z(w||{})})}static{V(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:L,disableConcurrentStreams:Z}=this.config;return new Promise((Q,Y)=>{let K=!1,X=void 0,G=V(async(J)=>{await X,Q(J)},"resolve"),F=V(async(J)=>{await X,Y(J)},"reject");if(z?.aborted){K=!0;let J=new Error("Request aborted");J.name="AbortError",F(J);return}let{hostname:v,method:D,port:j,protocol:C,query:x}=w,T="";if(w.username!=null||w.password!=null){let J=w.username??"",I=w.password??"";T=`${J}:${I}@`}let h=`${C}//${T}${v}${j?`:${j}`:""}`,A={destination:new URL(h)},B=this.connectionManager.lease(A,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Z||!1}),W=V((J)=>{if(Z)this.destroySession(B);K=!0,F(J)},"rejectWithDestroy"),E=l0.buildQueryString(x||{}),$0=w.path;if(E)$0+=`?${E}`;if(w.fragment)$0+=`#${w.fragment}`;let R=B.request({...w.headers,[c0.constants.HTTP2_HEADER_PATH]:$0,[c0.constants.HTTP2_HEADER_METHOD]:D});if(B.ref(),R.on("response",(J)=>{let I=new u0.HttpResponse({statusCode:J[":status"]||-1,headers:d0(J),body:R});if(K=!0,G({response:I}),Z)B.close(),this.connectionManager.deleteSession(h,B)}),L)R.setTimeout(L,()=>{R.close();let J=new Error(`Stream timed out because of no activity for ${L} ms`);J.name="TimeoutError",W(J)});if(z){let J=V(()=>{R.close();let I=new Error("Request aborted");I.name="AbortError",W(I)},"onAbort");if(typeof z.addEventListener==="function"){let I=z;I.addEventListener("abort",J,{once:!0}),R.once("close",()=>I.removeEventListener("abort",J))}else z.onabort=J}R.on("frameError",(J,I,g6)=>{W(new Error(`Frame type id ${J} in stream id ${g6} has failed with code ${I}.`))}),R.on("error",W),R.on("aborted",()=>{W(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${R.rstCode}.`))}),R.on("close",()=>{if(B.unref(),Z)B.destroy();if(!K)W(new Error("Unexpected error: http2 request did not get a response"))}),X=K0(R,w,L)})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},y4=class extends i0.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{V(this,"Collector")}_write($,w,z){this.bufferedBytes.push($),z()}},k4=V(($)=>{if(f4($))return a0($);return new Promise((w,z)=>{let L=new y4;$.pipe(L),$.on("error",(Z)=>{L.end(),z(Z)}),L.on("error",z),L.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));w(Z)})})},"streamCollector"),f4=V(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function a0($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}V(a0,"collectReadableStream")});var t0=U((_w,r0)=>{var{defineProperty:p,getOwnPropertyDescriptor:E4,getOwnPropertyNames:P4}=Object,c4=Object.prototype.hasOwnProperty,q4=($,w)=>p($,"name",{value:w,configurable:!0}),g4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},u4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of P4(w))if(!c4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(L=E4(w,Z))||L.enumerable})}return $},l4=($)=>u4(p({},"__esModule",{value:!0}),$),s0={};g4(s0,{isArrayBuffer:()=>d4});r0.exports=l4(s0);var d4=q4(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var g=U((aw,$1)=>{var{defineProperty:_,getOwnPropertyDescriptor:i4,getOwnPropertyNames:p4}=Object,_4=Object.prototype.hasOwnProperty,o0=($,w)=>_($,"name",{value:w,configurable:!0}),a4=($,w)=>{for(var z in w)_($,z,{get:w[z],enumerable:!0})},n4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of p4(w))if(!_4.call($,Z)&&Z!==z)_($,Z,{get:()=>w[Z],enumerable:!(L=i4(w,Z))||L.enumerable})}return $},m4=($)=>n4(_({},"__esModule",{value:!0}),$),e0={};a4(e0,{fromArrayBuffer:()=>r4,fromString:()=>t4});$1.exports=m4(e0);var s4=t0(),Q0=N("node:buffer"),r4=o0(($,w=0,z=$.byteLength-w)=>{if(!s4.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return Q0.Buffer.from($,w,z)},"fromArrayBuffer"),t4=o0(($,w)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return w?Q0.Buffer.from($,w):Q0.Buffer.from($)},"fromString")});var Z1=U((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.fromBase64=void 0;var o4=g(),e4=/^[A-Za-z0-9+/]*={0,2}$/,$$=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!e4.exec($))throw new TypeError("Invalid base64 string.");let w=o4.fromString($,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};w1.fromBase64=$$});var n=U((mw,Q1)=>{var{defineProperty:a,getOwnPropertyDescriptor:w$,getOwnPropertyNames:z$}=Object,Z$=Object.prototype.hasOwnProperty,X0=($,w)=>a($,"name",{value:w,configurable:!0}),L$=($,w)=>{for(var z in w)a($,z,{get:w[z],enumerable:!0})},Y$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of z$(w))if(!Z$.call($,Z)&&Z!==z)a($,Z,{get:()=>w[Z],enumerable:!(L=w$(w,Z))||L.enumerable})}return $},K$=($)=>Y$(a({},"__esModule",{value:!0}),$),L1={};L$(L1,{fromUtf8:()=>K1,toUint8Array:()=>Q$,toUtf8:()=>X$});Q1.exports=K$(L1);var Y1=g(),K1=X0(($)=>{let w=Y1.fromString($,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Q$=X0(($)=>{if(typeof $==="string")return K1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),X$=X0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Y1.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var B1=U((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.toBase64=void 0;var G$=g(),B$=n(),F$=($)=>{let w;if(typeof $==="string")w=B$.fromUtf8($);else w=$;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return G$.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};X1.toBase64=F$});var P=U((rw,m)=>{var{defineProperty:F1,getOwnPropertyDescriptor:U$,getOwnPropertyNames:V$}=Object,h$=Object.prototype.hasOwnProperty,G0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V$(w))if(!h$.call($,Z)&&Z!==z)F1($,Z,{get:()=>w[Z],enumerable:!(L=U$(w,Z))||L.enumerable})}return $},U1=($,w,z)=>(G0($,w,"default"),z&&G0(z,w,"default")),W$=($)=>G0(F1({},"__esModule",{value:!0}),$),B0={};m.exports=W$(B0);U1(B0,Z1(),m.exports);U1(B0,B1(),m.exports)});var F0=U((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.ChecksumStream=void 0;var J$=P(),j$=N("node:stream");class V1 extends j$.Duplex{constructor({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z}){var Q,Y;super();if(typeof z.pipe==="function")this.source=z;else throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);this.base64Encoder=Z!==null&&Z!==void 0?Z:J$.toBase64,this.expectedChecksum=$,this.checksum=w,this.checksumSourceLocation=L,this.source.pipe(this)}_read($){}_write($,w,z){try{this.checksum.update($),this.push($)}catch(L){return z(L)}return z()}async _final($){try{let w=await this.checksum.digest(),z=this.base64Encoder(w);if(this.expectedChecksum!==z)return $(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${z}" in response header "${this.checksumSourceLocation}".`))}catch(w){return $(w)}return this.push(null),$()}}h1.ChecksumStream=V1});var k=U((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.isBlob=J1.isReadableStream=void 0;var D$=($)=>{var w;return typeof ReadableStream==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||$ instanceof ReadableStream)};J1.isReadableStream=D$;var v$=($)=>{var w;return typeof Blob==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===Blob.name||$ instanceof Blob)};J1.isBlob=v$});var H1=U((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0});v1.ChecksumStream=void 0;var H$=typeof ReadableStream==="function"?ReadableStream:function(){};class D1 extends H${}v1.ChecksumStream=D1});var N1=U((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.createChecksumStream=void 0;var A$=P(),R$=k(),N$=H1(),I$=({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z})=>{var Q,Y;if(!R$.isReadableStream(z))throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);let K=Z!==null&&Z!==void 0?Z:A$.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let X=new TransformStream({start(){},async transform(F,v){w.update(F),v.enqueue(F)},async flush(F){let v=await w.digest(),D=K(v);if($!==D){let j=new Error(`Checksum mismatch: expected "${$}" but received "${D}" in response header "${L}".`);F.error(j)}else F.terminate()}});z.pipeThrough(X);let G=X.readable;return Object.setPrototypeOf(G,N$.ChecksumStream.prototype),G};A1.createChecksumStream=I$});var O1=U((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0});I1.createChecksumStream=void 0;var M$=k(),O$=F0(),b$=N1();function S$($){if(typeof ReadableStream==="function"&&M$.isReadableStream($.source))return b$.createChecksumStream($);return new O$.ChecksumStream($)}I1.createChecksumStream=S$});var U0=U((S1)=>{Object.defineProperty(S1,"__esModule",{value:!0});S1.ByteArrayCollector=void 0;class b1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let z=this.byteArrays[0];return this.reset(),z}let $=this.allocByteArray(this.byteLength),w=0;for(let z=0;z<this.byteArrays.length;++z){let L=this.byteArrays[z];$.set(L,w),w+=L.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}S1.ByteArrayCollector=b1});var P1=U((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});f1.modeOf=f1.sizeOf=f1.flush=f1.merge=f1.createBufferedReadable=f1.createBufferedReadableStream=void 0;var x$=U0();function T1($,w,z){let L=$.getReader(),Z=!1,Q=0,Y=["",new x$.ByteArrayCollector((G)=>new Uint8Array(G))],K=-1,X=async(G)=>{let{value:F,done:v}=await L.read(),D=F;if(v){if(K!==-1){let j=s(Y,K);if(c(j)>0)G.enqueue(j)}G.close()}else{let j=k1(D,!1);if(K!==j){if(K>=0)G.enqueue(s(Y,K));K=j}if(K===-1){G.enqueue(D);return}let C=c(D);Q+=C;let x=c(Y[K]);if(C>=w&&x===0)G.enqueue(D);else{let T=y1(Y,K,D);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${w}, automatically buffering.`);if(T>=w)G.enqueue(s(Y,K));else await X(G)}}};return new ReadableStream({pull:X})}f1.createBufferedReadableStream=T1;f1.createBufferedReadable=T1;function y1($,w,z){switch(w){case 0:return $[0]+=z,c($[0]);case 1:case 2:return $[w].push(z),c($[w])}}f1.merge=y1;function s($,w){switch(w){case 0:let z=$[0];return $[0]="",z;case 1:case 2:return $[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}f1.flush=s;function c($){var w,z;return(z=(w=$===null||$===void 0?void 0:$.byteLength)!==null&&w!==void 0?w:$===null||$===void 0?void 0:$.length)!==null&&z!==void 0?z:0}f1.sizeOf=c;function k1($,w=!0){if(w&&typeof Buffer!=="undefined"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}f1.modeOf=k1});var u1=U((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.createBufferedReadable=void 0;var P$=N("node:stream"),c1=U0(),S=P1(),c$=k();function q$($,w,z){if(c$.isReadableStream($))return S.createBufferedReadableStream($,w,z);let L=new P$.Readable({read(){}}),Z=!1,Q=0,Y=["",new c1.ByteArrayCollector((X)=>new Uint8Array(X)),new c1.ByteArrayCollector((X)=>Buffer.from(new Uint8Array(X)))],K=-1;return $.on("data",(X)=>{let G=S.modeOf(X,!0);if(K!==G){if(K>=0)L.push(S.flush(Y,K));K=G}if(K===-1){L.push(X);return}let F=S.sizeOf(X);Q+=F;let v=S.sizeOf(Y[K]);if(F>=w&&v===0)L.push(X);else{let D=S.merge(Y,K,X);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${F} is below threshold of ${w}, automatically buffering.`);if(D>=w)L.push(S.flush(Y,K))}}),$.on("end",()=>{if(K!==-1){let X=S.flush(Y,K);if(S.sizeOf(X)>0)L.push(X)}L.push(null)}),L}q1.createBufferedReadable=q$});var i1=U((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});l1.getAwsChunkedEncodingStream=void 0;var g$=N("node:stream"),u$=($,w)=>{let{base64Encoder:z,bodyLengthChecker:L,checksumAlgorithmFn:Z,checksumLocationName:Q,streamHasher:Y}=w,K=z!==void 0&&Z!==void 0&&Q!==void 0&&Y!==void 0,X=K?Y(Z,$):void 0,G=new g$.Readable({read:()=>{}});return $.on("data",(F)=>{let v=L(F)||0;G.push(`${v.toString(16)}\r
|
|
4
|
+
`),G.push(F),G.push(`\r
|
|
5
|
+
`)}),$.on("end",async()=>{if(G.push(`0\r
|
|
6
|
+
`),K){let F=z(await X);G.push(`${Q}:${F}\r
|
|
7
|
+
`),G.push(`\r
|
|
8
|
+
`)}G.push(null)}),G};l1.getAwsChunkedEncodingStream=u$});var a1=U((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.headStream=void 0;async function l$($,w){var z;let L=0,Z=[],Q=$.getReader(),Y=!1;while(!Y){let{done:G,value:F}=await Q.read();if(F)Z.push(F),L+=(z=F===null||F===void 0?void 0:F.byteLength)!==null&&z!==void 0?z:0;if(L>=w)break;Y=G}Q.releaseLock();let K=new Uint8Array(Math.min(w,L)),X=0;for(let G of Z){if(G.byteLength>K.byteLength-X){K.set(G.subarray(0,K.byteLength-X),X);break}else K.set(G,X);X+=G.length}return K}p1.headStream=l$});var r1=U((m1)=>{Object.defineProperty(m1,"__esModule",{value:!0});m1.headStream=void 0;var d$=N("node:stream"),i$=a1(),p$=k(),_$=($,w)=>{if(p$.isReadableStream($))return i$.headStream($,w);return new Promise((z,L)=>{let Z=new n1;Z.limit=w,$.pipe(Z),$.on("error",(Q)=>{Z.end(),L(Q)}),Z.on("error",L),Z.on("finish",function(){let Q=new Uint8Array(Buffer.concat(this.buffers));z(Q)})})};m1.headStream=_$;class n1 extends d$.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,w,z){var L;if(this.buffers.push($),this.bytesBuffered+=(L=$.byteLength)!==null&&L!==void 0?L:0,this.bytesBuffered>=this.limit){let Z=this.bytesBuffered-this.limit,Q=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Q.subarray(0,Q.byteLength-Z),this.emit("finish")}z()}}});var L6=U((X8,Z6)=>{var{defineProperty:t,getOwnPropertyDescriptor:a$,getOwnPropertyNames:n$}=Object,m$=Object.prototype.hasOwnProperty,M=($,w)=>t($,"name",{value:w,configurable:!0}),s$=($,w)=>{for(var z in w)t($,z,{get:w[z],enumerable:!0})},r$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of n$(w))if(!m$.call($,Z)&&Z!==z)t($,Z,{get:()=>w[Z],enumerable:!(L=a$(w,Z))||L.enumerable})}return $},t$=($)=>r$(t({},"__esModule",{value:!0}),$),o1={};s$(o1,{FetchHttpHandler:()=>e$,keepAliveSupport:()=>r,streamCollector:()=>ww});Z6.exports=t$(o1);var t1=l(),o$=Z0();function V0($,w){return new Request($,w)}M(V0,"createRequest");function e1($=0){return new Promise((w,z)=>{if($)setTimeout(()=>{let L=new Error(`Request did not complete within ${$} ms`);L.name="TimeoutError",z(L)},$)})}M(e1,"requestTimeout");var r={supported:void 0},e$=class ${static{M(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((z)=>z||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(r.supported===void 0)r.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in V0("https://[::1]"))}destroy(){}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;let L=this.config.requestTimeout,Z=this.config.keepAlive===!0,Q=this.config.credentials;if(z?.aborted){let h=new Error("Request aborted");return h.name="AbortError",Promise.reject(h)}let Y=w.path,K=o$.buildQueryString(w.query||{});if(K)Y+=`?${K}`;if(w.fragment)Y+=`#${w.fragment}`;let X="";if(w.username!=null||w.password!=null){let h=w.username??"",A=w.password??"";X=`${h}:${A}@`}let{port:G,method:F}=w,v=`${w.protocol}//${X}${w.hostname}${G?`:${G}`:""}${Y}`,D=F==="GET"||F==="HEAD"?void 0:w.body,j={body:D,headers:new Headers(w.headers),method:F,credentials:Q};if(this.config?.cache)j.cache=this.config.cache;if(D)j.duplex="half";if(typeof AbortController!=="undefined")j.signal=z;if(r.supported)j.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(j,this.config.requestInit(w));let C=M(()=>{},"removeSignalEventListener"),x=V0(v,j),T=[fetch(x).then((h)=>{let A=h.headers,B={};for(let E of A.entries())B[E[0]]=E[1];if(h.body==null)return h.blob().then((E)=>({response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:E})}));return{response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:h.body})}}),e1(L)];if(z)T.push(new Promise((h,A)=>{let B=M(()=>{let W=new Error("Request aborted");W.name="AbortError",A(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),C=M(()=>W.removeEventListener("abort",B),"removeSignalEventListener")}else z.onabort=B}));return Promise.race(T).finally(C)}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return L[w]=z,L})}httpHandlerConfigs(){return this.config??{}}},$w=P(),ww=M(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return $6($)}return w6($)},"streamCollector");async function $6($){let w=await z6($),z=$w.fromBase64(w);return new Uint8Array(z)}M($6,"collectBlob");async function w6($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}M(w6,"collectStream");function z6($){return new Promise((w,z)=>{let L=new FileReader;L.onloadend=()=>{if(L.readyState!==2)return z(new Error("Reader aborted too early"));let Z=L.result??"",Q=Z.indexOf(","),Y=Q>-1?Q+1:Z.length;w(Z.substring(Y))},L.onabort=()=>z(new Error("Read aborted")),L.onerror=()=>z(L.error),L.readAsDataURL($)})}M(z6,"readToBase64")});var F6=U((G8,B6)=>{var{defineProperty:o,getOwnPropertyDescriptor:zw,getOwnPropertyNames:Zw}=Object,Lw=Object.prototype.hasOwnProperty,Y6=($,w)=>o($,"name",{value:w,configurable:!0}),Yw=($,w)=>{for(var z in w)o($,z,{get:w[z],enumerable:!0})},Kw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Zw(w))if(!Lw.call($,Z)&&Z!==z)o($,Z,{get:()=>w[Z],enumerable:!(L=zw(w,Z))||L.enumerable})}return $},Qw=($)=>Kw(o({},"__esModule",{value:!0}),$),K6={};Yw(K6,{fromHex:()=>X6,toHex:()=>G6});B6.exports=Qw(K6);var Q6={},h0={};for(let $=0;$<256;$++){let w=$.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;Q6[$]=w,h0[w]=$}function X6($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array($.length/2);for(let z=0;z<$.length;z+=2){let L=$.slice(z,z+2).toLowerCase();if(L in h0)w[z/2]=h0[L];else throw new Error(`Cannot decode unrecognized sequence ${L} as hexadecimal`)}return w}Y6(X6,"fromHex");function G6($){let w="";for(let z=0;z<$.byteLength;z++)w+=Q6[$[z]];return w}Y6(G6,"toHex")});var j6=U((W6)=>{Object.defineProperty(W6,"__esModule",{value:!0});W6.sdkStreamMixin=void 0;var Xw=L6(),Gw=P(),Bw=F6(),Fw=n(),U6=k(),V6="The stream has already been transformed.",Uw=($)=>{var w,z;if(!h6($)&&!U6.isReadableStream($)){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(V6);return L=!0,await Xw.streamCollector($)},Q=(Y)=>{if(typeof Y.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
9
|
+
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return Y.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Y)=>{let K=await Z();if(Y==="base64")return Gw.toBase64(K);else if(Y==="hex")return Bw.toHex(K);else if(Y===void 0||Y==="utf8"||Y==="utf-8")return Fw.toUtf8(K);else if(typeof TextDecoder==="function")return new TextDecoder(Y).decode(K);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(L)throw new Error(V6);if(L=!0,h6($))return Q($);else if(U6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};W6.sdkStreamMixin=Uw;var h6=($)=>typeof Blob==="function"&&$ instanceof Blob});var H6=U((v6)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.sdkStreamMixin=void 0;var Vw=m0(),hw=g(),W0=N("node:stream"),Ww=j6(),D6="The stream has already been transformed.",Jw=($)=>{var w,z;if(!($ instanceof W0.Readable))try{return Ww.sdkStreamMixin($)}catch(Q){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(D6);return L=!0,await Vw.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(Q)=>{let Y=await Z();if(Q===void 0||Buffer.isEncoding(Q))return hw.fromArrayBuffer(Y.buffer,Y.byteOffset,Y.byteLength).toString(Q);else return new TextDecoder(Q).decode(Y)},transformToWebStream:()=>{if(L)throw new Error(D6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof W0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return L=!0,W0.Readable.toWeb($)}})};v6.sdkStreamMixin=Jw});var N6=U((A6)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.splitStream=void 0;async function jw($){if(typeof $.stream==="function")$=$.stream();return $.tee()}A6.splitStream=jw});var S6=U((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.splitStream=void 0;var I6=N("node:stream"),Dw=N6(),M6=k();async function vw($){if(M6.isReadableStream($)||M6.isBlob($))return Dw.splitStream($);let w=new I6.PassThrough,z=new I6.PassThrough;return $.pipe(w),$.pipe(z),[w,z]}O6.splitStream=vw});var f6=U((h8,b)=>{var{defineProperty:e,getOwnPropertyDescriptor:Cw,getOwnPropertyNames:Hw}=Object,Aw=Object.prototype.hasOwnProperty,D0=($,w)=>e($,"name",{value:w,configurable:!0}),Rw=($,w)=>{for(var z in w)e($,z,{get:w[z],enumerable:!0})},J0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Hw(w))if(!Aw.call($,Z)&&Z!==z)e($,Z,{get:()=>w[Z],enumerable:!(L=Cw(w,Z))||L.enumerable})}return $},f=($,w,z)=>(J0($,w,"default"),z&&J0(z,w,"default")),Nw=($)=>J0(e({},"__esModule",{value:!0}),$),O={};Rw(O,{Uint8ArrayBlobAdapter:()=>j0});b.exports=Nw(O);var x6=P(),T6=n();function y6($,w="utf-8"){if(w==="base64")return x6.toBase64($);return T6.toUtf8($)}D0(y6,"transformToString");function k6($,w){if(w==="base64")return j0.mutate(x6.fromBase64($));return j0.mutate(T6.fromUtf8($))}D0(k6,"transformFromString");var j0=class $ extends Uint8Array{static{D0(this,"Uint8ArrayBlobAdapter")}static fromString(w,z="utf-8"){switch(typeof w){case"string":return k6(w,z);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,$.prototype),w}transformToString(w="utf-8"){return y6(this,w)}};f(O,F0(),b.exports);f(O,O1(),b.exports);f(O,u1(),b.exports);f(O,i1(),b.exports);f(O,r1(),b.exports);f(O,H6(),b.exports);f(O,S6(),b.exports);f(O,k(),b.exports)});var fw=U((W8,q6)=>{var{defineProperty:H0,getOwnPropertyDescriptor:Iw,getOwnPropertyNames:Mw}=Object,Ow=Object.prototype.hasOwnProperty,bw=($,w)=>{for(var z in w)H0($,z,{get:w[z],enumerable:!0})},Sw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Mw(w))if(!Ow.call($,Z)&&Z!==z)H0($,Z,{get:()=>w[Z],enumerable:!(L=Iw(w,Z))||L.enumerable})}return $},xw=($)=>Sw(H0({},"__esModule",{value:!0}),$),E6={};bw(E6,{RequestBuilder:()=>c6,collectBody:()=>Tw,extendedEncodeURIComponent:()=>C0,requestBuilder:()=>kw,resolvedPath:()=>P6});q6.exports=xw(E6);var v0=f6(),Tw=async($=new Uint8Array,w)=>{if($ instanceof Uint8Array)return v0.Uint8ArrayBlobAdapter.mutate($);if(!$)return v0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let z=w.streamCollector($);return v0.Uint8ArrayBlobAdapter.mutate(await z)};function C0($){return encodeURIComponent($).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var yw=l(),P6=($,w,z,L,Z,Q)=>{if(w!=null&&w[z]!==void 0){let Y=L();if(Y.length<=0)throw new Error("Empty value provided for input HTTP label: "+z+".");$=$.replace(Z,Q?Y.split("/").map((K)=>C0(K)).join("/"):C0(Y))}else throw new Error("No value provided for input HTTP label: "+z+".");return $};function kw($,w){return new c6($,w)}var c6=class{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:w="https",port:z,path:L}=await this.context.endpoint();this.path=L;for(let Z of this.resolvePathStack)Z(this.path);return new yw.HttpRequest({protocol:w,hostname:this.hostname||$,port:z,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+$}),this}p($,w,z,L){return this.resolvePathStack.push((Z)=>{this.path=P6(Z,this.input,$,w,z,L)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});
|
|
10
|
+
export{l as sc,t0 as tc,g as uc,n as vc,P as wc,x0 as xc,Z0 as yc,m0 as zc,F6 as Ac,f6 as Bc,fw as Cc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Kb as g,Wb as w,jc as x}from"./chunk-4v1a15ke.js";import{Bc as b}from"./chunk-rewjb3gf.js";import"./chunk-sgrntkej.js";import{Pc as v}from"./chunk-hjdz5p2e.js";import{Qc as i}from"./chunk-cptthhq1.js";import{Rc as n}from"./chunk-2pj0cr49.js";var E=n(v(),1);var d=n(i(),1);import _ from"node:fs/promises";var C=n(i(),1);var u="169.254.170.2",A="169.254.170.23",O="[fd00:ec2::23]",S=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===u||e.hostname===A||e.hostname===O)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
3
|
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
4
|
- ECS container host 169.254.170.2
|
|
5
5
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};var o=n(i(),1);var I=n(b(),1);function P(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function K(e,a){let r=await I.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new o.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:w(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a})}var T=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var B="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",D="http://169.254.170.2",M="AWS_CONTAINER_CREDENTIALS_FULL_URI",N="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",j="AWS_CONTAINER_AUTHORIZATION_TOKEN",H=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a,c=e.awsContainerCredentialsRelativeUri??process.env[B],r=e.awsContainerCredentialsFullUri??process.env[M],t=e.awsContainerAuthorizationToken??process.env[j],s=e.awsContainerAuthorizationTokenFile??process.env[N],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(c&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${D}${c}`;else throw new d.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{S as
|
|
1
|
+
import{Tc as D}from"./chunk-2pj0cr49.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{let j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{addChecksumAlgorithm(z){j.push(z)},checksumAlgorithms(){return j}}},"getChecksumConfiguration"),F=Q((b)=>{let j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return E(b)},"getDefaultClientConfiguration"),k=Q((b)=>{return F(b)},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
|
|
2
|
+
export{S as Lc};
|