@ethersphere/bee-js 5.1.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -6
- package/dist/223.index.browser.min.js +3 -0
- package/dist/223.index.browser.min.js.LICENSE.txt +1 -0
- package/dist/223.index.browser.min.js.map +1 -0
- package/dist/cjs/bee-debug.js +208 -312
- package/dist/cjs/bee.js +258 -353
- package/dist/cjs/chunk/signer.js +11 -22
- package/dist/cjs/chunk/soc.js +33 -50
- package/dist/cjs/chunk/span.js +1 -1
- package/dist/cjs/feed/index.js +50 -65
- package/dist/cjs/feed/json.js +8 -21
- package/dist/cjs/feed/retrievable.js +14 -27
- package/dist/cjs/modules/bytes.js +25 -37
- package/dist/cjs/modules/bzz.js +63 -68
- package/dist/cjs/modules/chunk.js +17 -27
- package/dist/cjs/modules/debug/balance.js +24 -41
- package/dist/cjs/modules/debug/chequebook.js +71 -96
- package/dist/cjs/modules/debug/chunk.js +13 -26
- package/dist/cjs/modules/debug/connectivity.js +32 -53
- package/dist/cjs/modules/debug/settlements.js +12 -25
- package/dist/cjs/modules/debug/stake.js +20 -33
- package/dist/cjs/modules/debug/stamps.js +45 -66
- package/dist/cjs/modules/debug/states.js +27 -40
- package/dist/cjs/modules/debug/status.js +53 -80
- package/dist/cjs/modules/debug/tag.js +6 -17
- package/dist/cjs/modules/debug/transactions.js +23 -40
- package/dist/cjs/modules/feed.js +17 -27
- package/dist/cjs/modules/pinning.js +24 -41
- package/dist/cjs/modules/pss.js +9 -20
- package/dist/cjs/modules/soc.js +12 -20
- package/dist/cjs/modules/status.js +4 -15
- package/dist/cjs/modules/stewardship.js +10 -23
- package/dist/cjs/modules/tag.js +28 -47
- package/dist/cjs/utils/collection.browser.js +4 -17
- package/dist/cjs/utils/collection.js +11 -22
- package/dist/cjs/utils/collection.node.js +42 -86
- package/dist/cjs/utils/data.browser.js +46 -59
- package/dist/cjs/utils/data.js +22 -35
- package/dist/cjs/utils/eth.js +31 -43
- package/dist/cjs/utils/file.js +9 -20
- package/dist/cjs/utils/headers.js +4 -4
- package/dist/cjs/utils/http.js +78 -93
- package/dist/cjs/utils/merge.js +1 -1
- package/dist/cjs/utils/sleep.js +2 -13
- package/dist/cjs/utils/type.js +14 -12
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.LICENSE.txt +1 -3
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee-debug.js +209 -450
- package/dist/mjs/bee.js +256 -491
- package/dist/mjs/chunk/bmt.js +4 -10
- package/dist/mjs/chunk/cac.js +0 -3
- package/dist/mjs/chunk/signer.js +12 -63
- package/dist/mjs/chunk/soc.js +33 -85
- package/dist/mjs/chunk/span.js +3 -6
- package/dist/mjs/feed/identifier.js +0 -6
- package/dist/mjs/feed/index.js +53 -97
- package/dist/mjs/feed/json.js +10 -49
- package/dist/mjs/feed/retrievable.js +13 -64
- package/dist/mjs/feed/topic.js +0 -2
- package/dist/mjs/index.js +1 -2
- package/dist/mjs/modules/bytes.js +25 -65
- package/dist/mjs/modules/bzz.js +64 -108
- package/dist/mjs/modules/chunk.js +17 -54
- package/dist/mjs/modules/debug/balance.js +24 -68
- package/dist/mjs/modules/debug/chequebook.js +75 -138
- package/dist/mjs/modules/debug/chunk.js +13 -51
- package/dist/mjs/modules/debug/connectivity.js +32 -76
- package/dist/mjs/modules/debug/settlements.js +12 -50
- package/dist/mjs/modules/debug/stake.js +20 -61
- package/dist/mjs/modules/debug/stamps.js +47 -94
- package/dist/mjs/modules/debug/states.js +25 -66
- package/dist/mjs/modules/debug/status.js +66 -125
- package/dist/mjs/modules/debug/tag.js +6 -41
- package/dist/mjs/modules/debug/transactions.js +25 -69
- package/dist/mjs/modules/feed.js +17 -57
- package/dist/mjs/modules/pinning.js +24 -68
- package/dist/mjs/modules/pss.js +11 -47
- package/dist/mjs/modules/soc.js +14 -48
- package/dist/mjs/modules/status.js +4 -39
- package/dist/mjs/modules/stewardship.js +10 -47
- package/dist/mjs/modules/tag.js +31 -78
- package/dist/mjs/types/debug.js +0 -1
- package/dist/mjs/types/index.js +0 -4
- package/dist/mjs/utils/bytes.js +6 -14
- package/dist/mjs/utils/collection.browser.js +4 -42
- package/dist/mjs/utils/collection.js +11 -57
- package/dist/mjs/utils/collection.node.js +42 -150
- package/dist/mjs/utils/data.browser.js +49 -94
- package/dist/mjs/utils/data.js +19 -62
- package/dist/mjs/utils/error.js +0 -5
- package/dist/mjs/utils/eth.js +37 -95
- package/dist/mjs/utils/file.js +11 -50
- package/dist/mjs/utils/hash.js +0 -1
- package/dist/mjs/utils/headers.js +6 -14
- package/dist/mjs/utils/hex.js +6 -25
- package/dist/mjs/utils/http.js +80 -138
- package/dist/mjs/utils/merge.js +3 -7
- package/dist/mjs/utils/pss.js +0 -2
- package/dist/mjs/utils/reference.js +2 -5
- package/dist/mjs/utils/sleep.js +2 -37
- package/dist/mjs/utils/stream.js +0 -23
- package/dist/mjs/utils/tar.js +2 -5
- package/dist/mjs/utils/type.js +18 -82
- package/dist/mjs/utils/uint64.js +0 -1
- package/dist/mjs/utils/url.js +2 -10
- package/dist/types/bee-debug.d.ts +2 -2
- package/dist/types/bee.d.ts +2 -26
- package/dist/types/chunk/cac.d.ts +1 -1
- package/dist/types/chunk/soc.d.ts +8 -7
- package/dist/types/feed/index.d.ts +9 -8
- package/dist/types/feed/type.d.ts +1 -1
- package/dist/types/modules/bytes.d.ts +6 -5
- package/dist/types/modules/bzz.d.ts +9 -8
- package/dist/types/modules/chunk.d.ts +5 -4
- package/dist/types/modules/debug/balance.d.ts +10 -9
- package/dist/types/modules/debug/chequebook.d.ts +18 -17
- package/dist/types/modules/debug/chunk.d.ts +6 -5
- package/dist/types/modules/debug/connectivity.d.ts +8 -7
- package/dist/types/modules/debug/settlements.d.ts +6 -5
- package/dist/types/modules/debug/stake.d.ts +5 -4
- package/dist/types/modules/debug/stamps.d.ts +8 -7
- package/dist/types/modules/debug/states.d.ts +8 -7
- package/dist/types/modules/debug/status.d.ts +15 -15
- package/dist/types/modules/debug/tag.d.ts +4 -3
- package/dist/types/modules/debug/transactions.d.ts +6 -5
- package/dist/types/modules/feed.d.ts +4 -3
- package/dist/types/modules/pinning.d.ts +8 -7
- package/dist/types/modules/pss.d.ts +4 -3
- package/dist/types/modules/soc.d.ts +3 -2
- package/dist/types/modules/status.d.ts +3 -3
- package/dist/types/modules/stewardship.d.ts +4 -3
- package/dist/types/modules/tag.d.ts +7 -6
- package/dist/types/types/debug.d.ts +1 -1
- package/dist/types/types/index.d.ts +30 -34
- package/dist/types/utils/eth.d.ts +3 -3
- package/dist/types/utils/hex.d.ts +2 -2
- package/dist/types/utils/http.d.ts +6 -6
- package/package.json +34 -39
- package/dist/cjs/types/ky-options.js +0 -8
- package/dist/cjs/types/ky-universal/common.js +0 -8
- package/dist/cjs/types/ky-universal/hooks.js +0 -8
- package/dist/cjs/types/ky-universal/retry.js +0 -8
- package/dist/mjs/types/ky-options.js +0 -7
- package/dist/mjs/types/ky-universal/common.js +0 -7
- package/dist/mjs/types/ky-universal/hooks.js +0 -7
- package/dist/mjs/types/ky-universal/retry.js +0 -7
- package/dist/types/types/ky-options.d.ts +0 -221
- package/dist/types/types/ky-universal/common.d.ts +0 -13
- package/dist/types/types/ky-universal/hooks.d.ts +0 -92
- package/dist/types/types/ky-universal/retry.d.ts +0 -38
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
**Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**
|
|
15
15
|
|
|
16
|
-
This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.
|
|
16
|
+
This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.11.1<!-- SUPPORTED_BEE_END -->**. Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the [releases tab](https://github.com/ethersphere/bee-js/releases).
|
|
17
17
|
|
|
18
18
|
## Table of Contents
|
|
19
19
|
|
|
@@ -77,9 +77,9 @@ const bee = new Bee('http://localhost:1633')
|
|
|
77
77
|
const beeDebug = new BeeDebug('http://localhost:1635')
|
|
78
78
|
|
|
79
79
|
// Be aware, this creates on-chain transactions that spend Eth and BZZ!
|
|
80
|
-
const batchId = await
|
|
81
|
-
const
|
|
82
|
-
const data = await bee.downloadData(reference)
|
|
80
|
+
const batchId = await bee.createPostageBatch('2000', 20)
|
|
81
|
+
const uploadResult = await bee.uploadData(batchId, "Bee is awesome!")
|
|
82
|
+
const data = await bee.downloadData(uploadResult.reference)
|
|
83
83
|
|
|
84
84
|
console.log(data.text()) // prints 'Bee is awesome!'
|
|
85
85
|
```
|
|
@@ -106,6 +106,16 @@ Install project dependencies with
|
|
|
106
106
|
npm i
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
### Node 18
|
|
110
|
+
|
|
111
|
+
Node 18 came with its own fetch's native implementation called Undici. If you want to run bee-js tests under Node 18, then disable
|
|
112
|
+
the native's fetch implementation otherwise unit tests will fail as they capture HTTP calls with library called `nock` that does
|
|
113
|
+
not support native fetch yet.
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
export NODE_OPTIONS='--no-experimental-fetch'
|
|
117
|
+
```
|
|
118
|
+
|
|
109
119
|
### Test
|
|
110
120
|
|
|
111
121
|
The tests run in both context: node and dom with Jest.
|
|
@@ -138,8 +148,6 @@ or for Browsers
|
|
|
138
148
|
|
|
139
149
|
## Maintainers
|
|
140
150
|
|
|
141
|
-
- [auhau](https://github.com/auhau)
|
|
142
|
-
- [vojtechsimetka](https://github.com/vojtechsimetka)
|
|
143
151
|
|
|
144
152
|
## License
|
|
145
153
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 223.index.browser.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(this.webpackChunkBeeJs=this.webpackChunkBeeJs||[]).push([[223],{8223:(t,e,r)=>{r.r(e),r.d(e,{HTTPError:()=>s,TimeoutError:()=>o,default:()=>E});class s extends Error{constructor(t,e,r){const s=`${t.status||0===t.status?t.status:""} ${t.statusText||""}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=t,this.request=e,this.options=r}}class o extends Error{constructor(t){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=t}}const n=t=>null!==t&&"object"==typeof t,i=(...t)=>{for(const e of t)if((!n(e)||Array.isArray(e))&&void 0!==e)throw new TypeError("The `options` argument must be an object");return u({},...t)},a=(t={},e={})=>{const r=new globalThis.Headers(t),s=e instanceof globalThis.Headers,o=new globalThis.Headers(e);for(const[n,i]of o.entries())s&&"undefined"===i||void 0===i?r.delete(n):r.set(n,i);return r},u=(...t)=>{let e={},r={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(n(s)){for(let[t,r]of Object.entries(s))n(r)&&t in e&&(r=u(e[t],r)),e={...e,[t]:r};n(s.headers)&&(r=a(r,s.headers),e.headers=r)}return e},h=(()=>{let t=!1,e=!1;return"function"==typeof globalThis.ReadableStream&&(e=new globalThis.Request("https://a.com",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")),t&&!e})(),l="function"==typeof globalThis.AbortController,p="function"==typeof globalThis.ReadableStream,c="function"==typeof globalThis.FormData,f=["get","post","put","patch","head","delete"],d={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},b=2147483647,y=Symbol("stop"),m=t=>f.includes(t)?t.toUpperCase():t,_=[413,429,503],w={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:_,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY},g=(t={})=>{if("number"==typeof t)return{...w,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...w,...t,afterStatusCodes:_}};const T=Boolean(globalThis.DOMException);function R(t){if(T)return new DOMException(t?.reason??"The operation was aborted.","AbortError");const e=new Error(t?.reason??"The operation was aborted.");return e.name="AbortError",e}class q{static create(t,e){const r=new q(t,e),o=async()=>{if(r._options.timeout>b)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let t=await r._fetch();for(const e of r._options.hooks.afterResponse){const s=await e(r.request,r._options,r._decorateResponse(t.clone()));s instanceof globalThis.Response&&(t=s)}if(r._decorateResponse(t),!t.ok&&r._options.throwHttpErrors){let e=new s(t,r.request,r._options);for(const t of r._options.hooks.beforeError)e=await t(e);throw e}if(r._options.onDownloadProgress){if("function"!=typeof r._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!p)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return r._stream(t.clone(),r._options.onDownloadProgress)}return t},n=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(o):o();for(const[s,i]of Object.entries(d))n[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||i);const t=(await n).clone();if("json"===s){if(204===t.status)return"";if(0===(await t.clone().arrayBuffer()).byteLength)return"";if(e.parseJson)return e.parseJson(await t.text())}return t[s]()};return n}constructor(t,e={}){if(Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=t,this._options={credentials:this._input.credentials||"same-origin",...e,headers:a(this._input.headers,e.headers),hooks:u({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},e.hooks),method:m(e.method??this._input.method),prefixUrl:String(e.prefixUrl||""),retry:g(e.retry),throwHttpErrors:!1!==e.throwHttpErrors,timeout:void 0===e.timeout?1e4:e.timeout,fetch:e.fetch??globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(l){if(this.abortController=new globalThis.AbortController,this._options.signal){const t=this._options.signal;this._options.signal.addEventListener("abort",(()=>{this.abortController.abort(t.reason)}))}this._options.signal=this.abortController.signal}if(h&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),e=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(c&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(e,{...this.request}),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof o)){if(t instanceof s){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}const e=.3;return Math.min(this._options.retry.backoffLimit,e*2**(this._retryCount-1)*1e3)}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),b);if(0!==r&&this._retryCount>0){await async function(t,{signal:e}){return new Promise(((r,s)=>{if(e){if(e.aborted)return void s(R(e));e.addEventListener("abort",o,{once:!0})}function o(){s(R(e)),clearTimeout(n)}const n=setTimeout((()=>{e?.removeEventListener("abort",o),r()}),t)}))}(r,{signal:this._options.signal});for(const t of this._options.hooks.beforeRetry){if(await t({request:this.request,options:this._options,error:e,retryCount:this._retryCount})===y)return}return this._retry(t)}throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?this._options.fetch(this.request.clone()):async function(t,e,r){return new Promise(((s,n)=>{const i=setTimeout((()=>{e&&e.abort(),n(new o(t))}),r.timeout);r.fetch(t).then(s).catch(n).then((()=>{clearTimeout(i)}))}))}(this.request.clone(),this.abortController,this._options)}_stream(t,e){const r=Number(t.headers.get("content-length"))||0;let s=0;return 204===t.status?(e&&e({percent:1,totalBytes:r,transferredBytes:s},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(o){const n=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await async function t(){const{done:i,value:a}=await n.read();if(i)o.close();else{if(e){s+=a.byteLength;e({percent:0===r?0:s/r,transferredBytes:s,totalBytes:r},a)}o.enqueue(a),await t()}}()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}}const v=t=>{const e=(e,r)=>q.create(e,i(t,r));for(const r of f)e[r]=(e,s)=>q.create(e,i(t,s,{method:r}));return e.create=t=>v(i(t)),e.extend=e=>v(i(t,e)),e.stop=y,e},E=v()}}]);
|
|
3
|
+
//# sourceMappingURL=223.index.browser.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! MIT License © Sindre Sorhus */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"223.index.browser.min.js","mappings":";8JAGM,MAAOA,UAAkBC,MAK9BC,YAAYC,EAAoBC,EAAkBC,GACjD,MAEMC,EAAS,GAFDH,EAASG,QAA8B,IAApBH,EAASG,OAAgBH,EAASG,OAAS,MAC9DH,EAASI,YAAc,KACHC,OAGlCC,MAAM,uBAFSH,EAAS,eAAeA,IAAW,sBARnDI,OAAAA,eAAAA,KAAAA,WAAAA,0DACAA,OAAAA,eAAAA,KAAAA,UAAAA,0DACAA,OAAAA,eAAAA,KAAAA,UAAAA,0DAUCC,KAAKC,KAAO,YACZD,KAAKR,SAAWA,EAChBQ,KAAKP,QAAUA,EACfO,KAAKN,QAAUA,GCnBX,MAAOQ,UAAqBZ,MAGjCC,YAAYE,GACXK,MAAM,qBAHPC,OAAAA,eAAAA,KAAAA,UAAAA,0DAICC,KAAKC,KAAO,eACZD,KAAKP,QAAUA,GCLV,MAAMU,EAAYC,GAA8C,OAAVA,GAAmC,iBAAVA,ECEzEC,EAAmB,IAAIC,KACnC,IAAK,MAAMC,KAAUD,EACpB,KAAMH,EAASI,IAAWC,MAAMC,QAAQF,UAA8B,IAAXA,EAC1D,MAAM,IAAIG,UAAU,4CAItB,OAAOC,EAAU,MAAOL,IAGZM,EAAe,CAACC,EAAyB,GAAIC,EAAyB,MAClF,MAAMC,EAAS,IAAIC,WAAWC,QAAQJ,GAChCK,EAAoBJ,aAAmBE,WAAWC,QAClDV,EAAS,IAAIS,WAAWC,QAAQH,GAEtC,IAAK,MAAOK,EAAKf,KAAUG,EAAOa,UAC5BF,GA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Q3J,SACbwJ,KAGDA,MAGR,CACCjK,OAAQH,EAASG,OACjBC,WAAYJ,EAASI,WACrB6B,QAASjC,EAASiC,WG5VtB,MAAMuI,EAAkBC,IAEvB,MAAMtF,EAAmC,CAACxB,EAAczD,IAAsB+E,EAAGyF,OAAO/G,EAAO9C,EAAiB4J,EAAUvK,IAE1H,IAAK,MAAMsC,KAAUQ,EAEpBmC,EAAG3C,GAAU,CAACmB,EAAczD,IAAsB+E,EAAGyF,OAAO/G,EAAO9C,EAAiB4J,EAAUvK,EAAS,CAACsC,OAAAA,KAOzG,OAJA2C,EAAGuF,OAAUC,GAAmCH,EAAe3J,EAAiB8J,IAChFxF,EAAGyF,OAAUD,GAAmCH,EAAe3J,EAAiB4J,EAAUE,IAC1FxF,EAAG3B,KAAOA,EAEH2B,GAKR,EAFWqF","sources":["webpack://BeeJs/../../source/errors/HTTPError.ts","webpack://BeeJs/../../source/errors/TimeoutError.ts","webpack://BeeJs/../../source/utils/is.ts","webpack://BeeJs/../../source/utils/merge.ts","webpack://BeeJs/../../source/core/constants.ts","webpack://BeeJs/../../source/utils/normalize.ts","webpack://BeeJs/../../source/errors/DOMException.ts","webpack://BeeJs/../../source/core/Ky.ts","webpack://BeeJs/../../source/utils/delay.ts","webpack://BeeJs/../../source/utils/timeout.ts","webpack://BeeJs/../source/index.ts"],"sourcesContent":["import type {NormalizedOptions} from '../types/options.js';\n\n// eslint-lint-disable-next-line @typescript-eslint/naming-convention\nexport class HTTPError extends Error {\n\tpublic response: Response;\n\tpublic request: Request;\n\tpublic options: NormalizedOptions;\n\n\tconstructor(response: Response, request: Request, options: NormalizedOptions) {\n\t\tconst code = (response.status || response.status === 0) ? response.status : '';\n\t\tconst title = response.statusText || '';\n\t\tconst status = `${code} ${title}`.trim();\n\t\tconst reason = status ? `status code ${status}` : 'an unknown error';\n\n\t\tsuper(`Request failed with ${reason}`);\n\n\t\tthis.name = 'HTTPError';\n\t\tthis.response = response;\n\t\tthis.request = request;\n\t\tthis.options = options;\n\t}\n}\n","export class TimeoutError extends Error {\n\tpublic request: Request;\n\n\tconstructor(request: Request) {\n\t\tsuper('Request timed out');\n\t\tthis.name = 'TimeoutError';\n\t\tthis.request = request;\n\t}\n}\n","// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isObject = (value: unknown): value is object => value !== null && typeof value === 'object';\n","import type {KyHeadersInit, Options} from '../types/options.js';\nimport {isObject} from './is.js';\n\nexport const validateAndMerge = (...sources: Array<Partial<Options> | undefined>): Partial<Options> => {\n\tfor (const source of sources) {\n\t\tif ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n\t\t\tthrow new TypeError('The `options` argument must be an object');\n\t\t}\n\t}\n\n\treturn deepMerge({}, ...sources);\n};\n\nexport const mergeHeaders = (source1: KyHeadersInit = {}, source2: KyHeadersInit = {}) => {\n\tconst result = new globalThis.Headers(source1 as HeadersInit);\n\tconst isHeadersInstance = source2 instanceof globalThis.Headers;\n\tconst source = new globalThis.Headers(source2 as HeadersInit);\n\n\tfor (const [key, value] of source.entries()) {\n\t\tif ((isHeadersInstance && value === 'undefined') || value === undefined) {\n\t\t\tresult.delete(key);\n\t\t} else {\n\t\t\tresult.set(key, value);\n\t\t}\n\t}\n\n\treturn result;\n};\n\n// TODO: Make this strongly-typed (no `any`).\nexport const deepMerge = <T>(...sources: Array<Partial<T> | undefined>): T => {\n\tlet returnValue: any = {};\n\tlet headers = {};\n\n\tfor (const source of sources) {\n\t\tif (Array.isArray(source)) {\n\t\t\tif (!Array.isArray(returnValue)) {\n\t\t\t\treturnValue = [];\n\t\t\t}\n\n\t\t\treturnValue = [...returnValue, ...source];\n\t\t} else if (isObject(source)) {\n\t\t\tfor (let [key, value] of Object.entries(source)) {\n\t\t\t\tif (isObject(value) && key in returnValue) {\n\t\t\t\t\tvalue = deepMerge(returnValue[key], value);\n\t\t\t\t}\n\n\t\t\t\treturnValue = {...returnValue, [key]: value};\n\t\t\t}\n\n\t\t\tif (isObject((source as any).headers)) {\n\t\t\t\theaders = mergeHeaders(headers, (source as any).headers);\n\t\t\t\treturnValue.headers = headers;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn returnValue;\n};\n","import type {Expect, Equal} from '@type-challenges/utils';\nimport {HttpMethod} from '../types/options.js';\n\nexport const supportsRequestStreams = (() => {\n\tlet duplexAccessed = false;\n\tlet hasContentType = false;\n\tconst supportsReadableStream = typeof globalThis.ReadableStream === 'function';\n\n\tif (supportsReadableStream) {\n\t\thasContentType = new globalThis.Request('https://a.com', {\n\t\t\tbody: new globalThis.ReadableStream(),\n\t\t\tmethod: 'POST',\n\t\t\t// @ts-expect-error - Types are outdated.\n\t\t\tget duplex() {\n\t\t\t\tduplexAccessed = true;\n\t\t\t\treturn 'half';\n\t\t\t},\n\t\t}).headers.has('Content-Type');\n\t}\n\n\treturn duplexAccessed && !hasContentType;\n})();\n\nexport const supportsAbortController = typeof globalThis.AbortController === 'function';\nexport const supportsResponseStreams = typeof globalThis.ReadableStream === 'function';\nexport const supportsFormData = typeof globalThis.FormData === 'function';\n\nexport const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'] as const;\n\nconst validate = <T extends Array<true>>() => undefined as unknown as T;\nvalidate<[\n\tExpect<Equal<typeof requestMethods[number], HttpMethod>>,\n]>();\n\nexport const responseTypes = {\n\tjson: 'application/json',\n\ttext: 'text/*',\n\tformData: 'multipart/form-data',\n\tarrayBuffer: '*/*',\n\tblob: '*/*',\n} as const;\n\n// The maximum value of a 32bit int (see issue #117)\nexport const maxSafeTimeout = 2_147_483_647;\n\nexport const stop = Symbol('stop');\n","import {requestMethods} from '../core/constants.js';\nimport type {HttpMethod} from '../types/options.js';\nimport type {RetryOptions} from '../types/retry.js';\n\nexport const normalizeRequestMethod = (input: string): string =>\n\trequestMethods.includes(input as HttpMethod) ? input.toUpperCase() : input;\n\nconst retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\n\nconst retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\n\nconst retryAfterStatusCodes = [413, 429, 503];\n\nconst defaultRetryOptions: Required<RetryOptions> = {\n\tlimit: 2,\n\tmethods: retryMethods,\n\tstatusCodes: retryStatusCodes,\n\tafterStatusCodes: retryAfterStatusCodes,\n\tmaxRetryAfter: Number.POSITIVE_INFINITY,\n\tbackoffLimit: Number.POSITIVE_INFINITY,\n};\n\nexport const normalizeRetryOptions = (retry: number | RetryOptions = {}): Required<RetryOptions> => {\n\tif (typeof retry === 'number') {\n\t\treturn {\n\t\t\t...defaultRetryOptions,\n\t\t\tlimit: retry,\n\t\t};\n\t}\n\n\tif (retry.methods && !Array.isArray(retry.methods)) {\n\t\tthrow new Error('retry.methods must be an array');\n\t}\n\n\tif (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n\t\tthrow new Error('retry.statusCodes must be an array');\n\t}\n\n\treturn {\n\t\t...defaultRetryOptions,\n\t\t...retry,\n\t\tafterStatusCodes: retryAfterStatusCodes,\n\t};\n};\n","// DOMException is supported on most modern browsers and Node.js 18+.\n// @see https://developer.mozilla.org/en-US/docs/Web/API/DOMException#browser_compatibility\nconst isDomExceptionSupported = Boolean(globalThis.DOMException);\n\n// TODO: When targeting Node.js 18, use `signal.throwIfAborted()` (https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/throwIfAborted)\nexport function composeAbortError(signal?: AbortSignal) {\n\t/*\n\tNOTE: Use DomException with AbortError name as specified in MDN docs (https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)\n\t> When abort() is called, the fetch() promise rejects with an Error of type DOMException, with name AbortError.\n\t*/\n\tif (isDomExceptionSupported) {\n\t\treturn new DOMException(signal?.reason ?? 'The operation was aborted.', 'AbortError');\n\t}\n\n\t// DOMException not supported. Fall back to use of error and override name.\n\tconst error = new Error(signal?.reason ?? 'The operation was aborted.');\n\terror.name = 'AbortError';\n\n\treturn error;\n}\n","import {HTTPError} from '../errors/HTTPError.js';\nimport {TimeoutError} from '../errors/TimeoutError.js';\nimport type {Hooks} from '../types/hooks.js';\nimport type {Input, InternalOptions, NormalizedOptions, Options, SearchParamsInit} from '../types/options.js';\nimport {ResponsePromise} from '../types/ResponsePromise.js';\nimport {deepMerge, mergeHeaders} from '../utils/merge.js';\nimport {normalizeRequestMethod, normalizeRetryOptions} from '../utils/normalize.js';\nimport timeout, {TimeoutOptions} from '../utils/timeout.js';\nimport delay from '../utils/delay.js';\nimport {ObjectEntries} from '../utils/types.js';\nimport {\n\tmaxSafeTimeout,\n\tresponseTypes,\n\tstop,\n\tsupportsAbortController,\n\tsupportsFormData,\n\tsupportsResponseStreams,\n\tsupportsRequestStreams,\n} from './constants.js';\n\nexport class Ky {\n\t// eslint-disable-next-line @typescript-eslint/promise-function-async\n\tstatic create(input: Input, options: Options): ResponsePromise {\n\t\tconst ky = new Ky(input, options);\n\n\t\tconst fn = async (): Promise<Response> => {\n\t\t\tif (ky._options.timeout > maxSafeTimeout) {\n\t\t\t\tthrow new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n\t\t\t}\n\n\t\t\t// Delay the fetch so that body method shortcuts can set the Accept header\n\t\t\tawait Promise.resolve();\n\t\t\tlet response = await ky._fetch();\n\n\t\t\tfor (const hook of ky._options.hooks.afterResponse) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst modifiedResponse = await hook(\n\t\t\t\t\tky.request,\n\t\t\t\t\tky._options as NormalizedOptions,\n\t\t\t\t\tky._decorateResponse(response.clone()),\n\t\t\t\t);\n\n\t\t\t\tif (modifiedResponse instanceof globalThis.Response) {\n\t\t\t\t\tresponse = modifiedResponse;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tky._decorateResponse(response);\n\n\t\t\tif (!response.ok && ky._options.throwHttpErrors) {\n\t\t\t\tlet error = new HTTPError(response, ky.request, (ky._options as unknown) as NormalizedOptions);\n\n\t\t\t\tfor (const hook of ky._options.hooks.beforeError) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\terror = await hook(error);\n\t\t\t\t}\n\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\t// If `onDownloadProgress` is passed, it uses the stream API internally\n\t\t\t/* istanbul ignore next */\n\t\t\tif (ky._options.onDownloadProgress) {\n\t\t\t\tif (typeof ky._options.onDownloadProgress !== 'function') {\n\t\t\t\t\tthrow new TypeError('The `onDownloadProgress` option must be a function');\n\t\t\t\t}\n\n\t\t\t\tif (!supportsResponseStreams) {\n\t\t\t\t\tthrow new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n\t\t\t\t}\n\n\t\t\t\treturn ky._stream(response.clone(), ky._options.onDownloadProgress);\n\t\t\t}\n\n\t\t\treturn response;\n\t\t};\n\n\t\tconst isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n\t\tconst result = (isRetriableMethod ? ky._retry(fn) : fn()) as ResponsePromise;\n\n\t\tfor (const [type, mimeType] of Object.entries(responseTypes) as ObjectEntries<typeof responseTypes>) {\n\t\t\tresult[type] = async () => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\tky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n\n\t\t\t\tconst awaitedResult = await result;\n\t\t\t\tconst response = awaitedResult.clone();\n\n\t\t\t\tif (type === 'json') {\n\t\t\t\t\tif (response.status === 204) {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\n\t\t\t\t\tconst arrayBuffer = await response.clone().arrayBuffer();\n\t\t\t\t\tconst responseSize = arrayBuffer.byteLength;\n\t\t\t\t\tif (responseSize === 0) {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (options.parseJson) {\n\t\t\t\t\t\treturn options.parseJson(await response.text());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn response[type]();\n\t\t\t};\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic request: Request;\n\tprotected abortController?: AbortController;\n\tprotected _retryCount = 0;\n\tprotected _input: Input;\n\tprotected _options: InternalOptions;\n\n\t// eslint-disable-next-line complexity\n\tconstructor(input: Input, options: Options = {}) {\n\t\tthis._input = input;\n\t\tthis._options = {\n\t\t\t// TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n\t\t\tcredentials: (this._input as Request).credentials || 'same-origin',\n\t\t\t...options,\n\t\t\theaders: mergeHeaders((this._input as Request).headers, options.headers),\n\t\t\thooks: deepMerge<Required<Hooks>>(\n\t\t\t\t{\n\t\t\t\t\tbeforeRequest: [],\n\t\t\t\t\tbeforeRetry: [],\n\t\t\t\t\tbeforeError: [],\n\t\t\t\t\tafterResponse: [],\n\t\t\t\t},\n\t\t\t\toptions.hooks,\n\t\t\t),\n\t\t\tmethod: normalizeRequestMethod(options.method ?? (this._input as Request).method),\n\t\t\t// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\tprefixUrl: String(options.prefixUrl || ''),\n\t\t\tretry: normalizeRetryOptions(options.retry),\n\t\t\tthrowHttpErrors: options.throwHttpErrors !== false,\n\t\t\ttimeout: typeof options.timeout === 'undefined' ? 10_000 : options.timeout,\n\t\t\tfetch: options.fetch ?? globalThis.fetch.bind(globalThis),\n\t\t};\n\n\t\tif (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n\t\t\tthrow new TypeError('`input` must be a string, URL, or Request');\n\t\t}\n\n\t\tif (this._options.prefixUrl && typeof this._input === 'string') {\n\t\t\tif (this._input.startsWith('/')) {\n\t\t\t\tthrow new Error('`input` must not begin with a slash when using `prefixUrl`');\n\t\t\t}\n\n\t\t\tif (!this._options.prefixUrl.endsWith('/')) {\n\t\t\t\tthis._options.prefixUrl += '/';\n\t\t\t}\n\n\t\t\tthis._input = this._options.prefixUrl + this._input;\n\t\t}\n\n\t\tif (supportsAbortController) {\n\t\t\tthis.abortController = new globalThis.AbortController();\n\t\t\tif (this._options.signal) {\n\t\t\t\tconst originalSignal = this._options.signal;\n\n\t\t\t\tthis._options.signal.addEventListener('abort', () => {\n\t\t\t\t\tthis.abortController!.abort(originalSignal.reason);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._options.signal = this.abortController.signal;\n\t\t}\n\n\t\tif (supportsRequestStreams) {\n\t\t\t// @ts-expect-error - Types are outdated.\n\t\t\tthis._options.duplex = 'half';\n\t\t}\n\n\t\tthis.request = new globalThis.Request(this._input as RequestInfo, this._options as RequestInit);\n\n\t\tif (this._options.searchParams) {\n\t\t\t// eslint-disable-next-line unicorn/prevent-abbreviations\n\t\t\tconst textSearchParams = typeof this._options.searchParams === 'string'\n\t\t\t\t? this._options.searchParams.replace(/^\\?/, '')\n\t\t\t\t: new URLSearchParams(this._options.searchParams as unknown as SearchParamsInit).toString();\n\t\t\t// eslint-disable-next-line unicorn/prevent-abbreviations\n\t\t\tconst searchParams = '?' + textSearchParams;\n\t\t\tconst url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n\n\t\t\t// To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n\t\t\tif (\n\t\t\t\t((supportsFormData && this._options.body instanceof globalThis.FormData)\n\t\t\t\t\t|| this._options.body instanceof URLSearchParams) && !(this._options.headers && (this._options.headers as Record<string, string>)['content-type'])\n\t\t\t) {\n\t\t\t\tthis.request.headers.delete('content-type');\n\t\t\t}\n\n\t\t\t// The spread of `this.request` is required as otherwise it misses the `duplex` option for some reason and throws.\n\t\t\tthis.request = new globalThis.Request(new globalThis.Request(url, {...this.request}), this._options as RequestInit);\n\t\t}\n\n\t\tif (this._options.json !== undefined) {\n\t\t\tthis._options.body = JSON.stringify(this._options.json);\n\t\t\tthis.request.headers.set('content-type', this._options.headers.get('content-type') ?? 'application/json');\n\t\t\tthis.request = new globalThis.Request(this.request, {body: this._options.body});\n\t\t}\n\t}\n\n\tprotected _calculateRetryDelay(error: unknown) {\n\t\tthis._retryCount++;\n\n\t\tif (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n\t\t\tif (error instanceof HTTPError) {\n\t\t\t\tif (!this._options.retry.statusCodes.includes(error.response.status)) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\tconst retryAfter = error.response.headers.get('Retry-After');\n\t\t\t\tif (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n\t\t\t\t\tlet after = Number(retryAfter);\n\t\t\t\t\tif (Number.isNaN(after)) {\n\t\t\t\t\t\tafter = Date.parse(retryAfter) - Date.now();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tafter *= 1000;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn after;\n\t\t\t\t}\n\n\t\t\t\tif (error.response.status === 413) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst BACKOFF_FACTOR = 0.3;\n\t\t\treturn Math.min(this._options.retry.backoffLimit, BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000);\n\t\t}\n\n\t\treturn 0;\n\t}\n\n\tprotected _decorateResponse(response: Response): Response {\n\t\tif (this._options.parseJson) {\n\t\t\tresponse.json = async () => this._options.parseJson!(await response.text());\n\t\t}\n\n\t\treturn response;\n\t}\n\n\tprotected async _retry<T extends (...args: any) => Promise<any>>(fn: T): Promise<ReturnType<T> | void> {\n\t\ttry {\n\t\t\treturn await fn();\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-implicit-any-catch\n\t\t} catch (error) {\n\t\t\tconst ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n\t\t\tif (ms !== 0 && this._retryCount > 0) {\n\t\t\t\tawait delay(ms, {signal: this._options.signal});\n\n\t\t\t\tfor (const hook of this._options.hooks.beforeRetry) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tconst hookResult = await hook({\n\t\t\t\t\t\trequest: this.request,\n\t\t\t\t\t\toptions: (this._options as unknown) as NormalizedOptions,\n\t\t\t\t\t\terror: error as Error,\n\t\t\t\t\t\tretryCount: this._retryCount,\n\t\t\t\t\t});\n\n\t\t\t\t\t// If `stop` is returned from the hook, the retry process is stopped\n\t\t\t\t\tif (hookResult === stop) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn this._retry(fn);\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tprotected async _fetch(): Promise<Response> {\n\t\tfor (const hook of this._options.hooks.beforeRequest) {\n\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\tconst result = await hook(this.request, (this._options as unknown) as NormalizedOptions);\n\n\t\t\tif (result instanceof Request) {\n\t\t\t\tthis.request = result;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (result instanceof Response) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\n\t\tif (this._options.timeout === false) {\n\t\t\treturn this._options.fetch(this.request.clone());\n\t\t}\n\n\t\treturn timeout(this.request.clone(), this.abortController, this._options as TimeoutOptions);\n\t}\n\n\t/* istanbul ignore next */\n\tprotected _stream(response: Response, onDownloadProgress: Options['onDownloadProgress']) {\n\t\tconst totalBytes = Number(response.headers.get('content-length')) || 0;\n\t\tlet transferredBytes = 0;\n\n\t\tif (response.status === 204) {\n\t\t\tif (onDownloadProgress) {\n\t\t\t\tonDownloadProgress({percent: 1, totalBytes, transferredBytes}, new Uint8Array());\n\t\t\t}\n\n\t\t\treturn new globalThis.Response(\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\theaders: response.headers,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn new globalThis.Response(\n\t\t\tnew globalThis.ReadableStream({\n\t\t\t\tasync start(controller) {\n\t\t\t\t\tconst reader = response.body!.getReader();\n\n\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\tonDownloadProgress({percent: 0, transferredBytes: 0, totalBytes}, new Uint8Array());\n\t\t\t\t\t}\n\n\t\t\t\t\tasync function read() {\n\t\t\t\t\t\tconst {done, value} = await reader.read();\n\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\ttransferredBytes += value.byteLength;\n\t\t\t\t\t\t\tconst percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n\t\t\t\t\t\t\tonDownloadProgress({percent, transferredBytes, totalBytes}, value);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t\tawait read();\n\t\t\t\t\t}\n\n\t\t\t\t\tawait read();\n\t\t\t\t},\n\t\t\t}),\n\t\t\t{\n\t\t\t\tstatus: response.status,\n\t\t\t\tstatusText: response.statusText,\n\t\t\t\theaders: response.headers,\n\t\t\t},\n\t\t);\n\t}\n}\n","// https://github.com/sindresorhus/delay/tree/ab98ae8dfcb38e1593286c94d934e70d14a4e111\n\nimport {composeAbortError} from '../errors/DOMException.js';\nimport {InternalOptions} from '../types/options.js';\n\nexport interface DelayOptions {\n\tsignal?: InternalOptions['signal'];\n}\n\nexport default async function delay(\n\tms: number,\n\t{signal}: DelayOptions,\n): Promise<void> {\n\treturn new Promise((resolve, reject) => {\n\t\tif (signal) {\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(composeAbortError(signal));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', handleAbort, {once: true});\n\t\t}\n\n\t\tfunction handleAbort() {\n\t\t\treject(composeAbortError(signal!));\n\t\t\tclearTimeout(timeoutId);\n\t\t}\n\n\t\tconst timeoutId = setTimeout(() => {\n\t\t\tsignal?.removeEventListener('abort', handleAbort);\n\t\t\tresolve();\n\t\t}, ms);\n\t});\n}\n","import {TimeoutError} from '../errors/TimeoutError.js';\n\nexport type TimeoutOptions = {\n\ttimeout: number;\n\tfetch: typeof fetch;\n};\n\n// `Promise.race()` workaround (#91)\nexport default async function timeout(\n\trequest: Request,\n\tabortController: AbortController | undefined,\n\toptions: TimeoutOptions,\n): Promise<Response> {\n\treturn new Promise((resolve, reject) => {\n\t\tconst timeoutId = setTimeout(() => {\n\t\t\tif (abortController) {\n\t\t\t\tabortController.abort();\n\t\t\t}\n\n\t\t\treject(new TimeoutError(request));\n\t\t}, options.timeout);\n\n\t\tvoid options\n\t\t\t.fetch(request)\n\t\t\t.then(resolve)\n\t\t\t.catch(reject)\n\t\t\t.then(() => {\n\t\t\t\tclearTimeout(timeoutId);\n\t\t\t});\n\t});\n}\n","/*! MIT License © Sindre Sorhus */\n\nimport {Ky} from './core/Ky.js';\nimport {requestMethods, stop} from './core/constants.js';\nimport type {KyInstance} from './types/ky.js';\nimport type {Input, Options} from './types/options.js';\nimport {validateAndMerge} from './utils/merge.js';\nimport {Mutable} from './utils/types.js';\n\nconst createInstance = (defaults?: Partial<Options>): KyInstance => {\n\t// eslint-disable-next-line @typescript-eslint/promise-function-async\n\tconst ky: Partial<Mutable<KyInstance>> = (input: Input, options?: Options) => Ky.create(input, validateAndMerge(defaults, options));\n\n\tfor (const method of requestMethods) {\n\t\t// eslint-disable-next-line @typescript-eslint/promise-function-async\n\t\tky[method] = (input: Input, options?: Options) => Ky.create(input, validateAndMerge(defaults, options, {method}));\n\t}\n\n\tky.create = (newDefaults?: Partial<Options>) => createInstance(validateAndMerge(newDefaults));\n\tky.extend = (newDefaults?: Partial<Options>) => createInstance(validateAndMerge(defaults, newDefaults));\n\tky.stop = stop;\n\n\treturn ky as KyInstance;\n};\n\nconst ky = createInstance();\n\nexport default ky;\n\nexport type {\n\tOptions,\n\tNormalizedOptions,\n\tRetryOptions,\n\tSearchParamsOption,\n\tDownloadProgress,\n} from './types/options.js';\n\nexport type {\n\tHooks,\n\tBeforeRequestHook,\n\tBeforeRetryHook,\n\tBeforeRetryState,\n\tBeforeErrorHook,\n\tAfterResponseHook,\n} from './types/hooks.js';\n\nexport type {ResponsePromise} from './types/ResponsePromise.js';\nexport type {KyResponse} from './types/response.js';\nexport {HTTPError} from './errors/HTTPError.js';\nexport {TimeoutError} from './errors/TimeoutError.js';\n"],"names":["HTTPError","Error","constructor","response","request","options","status","statusText","trim","super","Object","this","name","TimeoutError","isObject","value","validateAndMerge","sources","source","Array","isArray","TypeError","deepMerge","mergeHeaders","source1","source2","result","globalThis","Headers","isHeadersInstance","key","entries","undefined","delete","set","returnValue","headers","supportsRequestStreams","duplexAccessed","hasContentType","ReadableStream","Request","body","method","duplex","has","supportsAbortController","AbortController","supportsResponseStreams","supportsFormData","FormData","requestMethods","responseTypes","json","text","formData","arrayBuffer","blob","maxSafeTimeout","stop","Symbol","normalizeRequestMethod","input","includes","toUpperCase","retryAfterStatusCodes","defaultRetryOptions","limit","methods","statusCodes","afterStatusCodes","maxRetryAfter","Number","POSITIVE_INFINITY","backoffLimit","normalizeRetryOptions","retry","isDomExceptionSupported","Boolean","DOMException","composeAbortError","signal","reason","error","Ky","static","ky","fn","async","_options","timeout","RangeError","Promise","resolve","_fetch","hook","hooks","afterResponse","modifiedResponse","_decorateResponse","clone","Response","ok","throwHttpErrors","beforeError","onDownloadProgress","_stream","toLowerCase","_retry","type","mimeType","get","byteLength","parseJson","_input","credentials","beforeRequest","beforeRetry","prefixUrl","String","fetch","bind","URL","startsWith","endsWith","abortController","originalSignal","addEventListener","abort","searchParams","replace","URLSearchParams","toString","url","JSON","stringify","_calculateRetryDelay","_retryCount","retryAfter","after","isNaN","Date","parse","now","BACKOFF_FACTOR","Math","min","ms","reject","aborted","handleAbort","once","clearTimeout","timeoutId","setTimeout","removeEventListener","delay","retryCount","then","catch","totalBytes","transferredBytes","percent","Uint8Array","controller","reader","getReader","read","done","close","enqueue","createInstance","defaults","create","newDefaults","extend"],"sourceRoot":""}
|