@npora/request 1.18.4 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +13 -0
  2. package/dist/{MockAdapter--6ZwMMQ8.d.ts → MockAdapter-C-0Hh1uW.d.ts} +2 -2
  3. package/dist/{MockAdapter-BrXOqgTA.d.cts → MockAdapter-zyLuXWEm.d.cts} +2 -2
  4. package/dist/{Plugin-DYSeSZ6O.d.cts → Plugin-9Z-IZ_NJ.d.cts} +1 -1
  5. package/dist/{Plugin-C5P_tBXo.d.ts → Plugin-Dx5Jby_c.d.ts} +1 -1
  6. package/dist/{SchemaValidationError-BANH6INo.d.cts → SchemaValidationError-B2bnpz8J.d.ts} +11 -5
  7. package/dist/{SchemaValidationError-ljhan6YH.d.ts → SchemaValidationError-MUg6trpg.d.cts} +11 -5
  8. package/dist/{adapter-CBaLHCEm.d.ts → adapter-c5-nyUCy.d.ts} +1 -1
  9. package/dist/{adapter-DlZ5Qbou.d.cts → adapter-phBJ1R70.d.cts} +1 -1
  10. package/dist/{authPlugin-DpE4afbz.d.cts → authPlugin-BtPHJ7EZ.d.cts} +1 -1
  11. package/dist/{authPlugin-USKx_XNX.d.ts → authPlugin-CVgJvxsA.d.ts} +1 -1
  12. package/dist/{cachePlugin-DJGfieqN.d.cts → cachePlugin-DANU1VAL.d.cts} +2 -2
  13. package/dist/{cachePlugin-XXrPNTfx.d.ts → cachePlugin-DxzbF294.d.ts} +2 -2
  14. package/dist/{circuitBreakerPlugin-D12NHWon.d.ts → circuitBreakerPlugin-D77O9CVl.d.ts} +2 -2
  15. package/dist/{circuitBreakerPlugin-tbwS-j5u.d.cts → circuitBreakerPlugin-DHyLSvdy.d.cts} +2 -2
  16. package/dist/{concurrencyPlugin-W84oJyJP.d.ts → concurrencyPlugin-CizobNMf.d.ts} +2 -2
  17. package/dist/{concurrencyPlugin-Dvsgel94.d.cts → concurrencyPlugin-D4YMInT5.d.cts} +2 -2
  18. package/dist/core.cjs +1 -1
  19. package/dist/core.d.cts +5 -5
  20. package/dist/core.d.ts +5 -5
  21. package/dist/core.js +1 -1
  22. package/dist/{createClient-aKdBLRu2.cjs → createClient-BNcd9hoJ.cjs} +1 -1
  23. package/dist/createClient-BtpOdm47.js +1 -0
  24. package/dist/{downloadPlugin-DJDuMLwT.d.cts → downloadPlugin-C4ugCtc1.d.cts} +1 -1
  25. package/dist/{downloadPlugin-DjCZgsVL.d.ts → downloadPlugin-DexFPPeR.d.ts} +1 -1
  26. package/dist/{errorResponseTimeout-XNQun4Rc.js → errorResponseTimeout-BFkSLlXS.js} +1 -1
  27. package/dist/{errorResponseTimeout-w0J4aUQO.cjs → errorResponseTimeout-ENMLOzj4.cjs} +1 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.cts +17 -17
  30. package/dist/index.d.ts +17 -17
  31. package/dist/index.js +1 -1
  32. package/dist/loggerPlugin-CSWyHhxS.d.cts +6 -0
  33. package/dist/loggerPlugin-IGqtnWzy.d.ts +6 -0
  34. package/dist/{openTelemetryMetricsPlugin-BqUiYPda.d.cts → openTelemetryMetricsPlugin-BtO0nwPY.d.cts} +2 -2
  35. package/dist/{openTelemetryMetricsPlugin-0UQ5jqvv.d.ts → openTelemetryMetricsPlugin-De76vmwq.d.ts} +2 -2
  36. package/dist/{openTelemetryPlugin-w3t3yoCr.d.ts → openTelemetryPlugin-BeykGhuv.d.ts} +2 -2
  37. package/dist/{openTelemetryPlugin-Cuap7zKx.d.cts → openTelemetryPlugin-DX-5cpbR.d.cts} +2 -2
  38. package/dist/plugins/auth.d.cts +1 -1
  39. package/dist/plugins/auth.d.ts +1 -1
  40. package/dist/plugins/cache.d.cts +1 -1
  41. package/dist/plugins/cache.d.ts +1 -1
  42. package/dist/plugins/circuit-breaker.d.cts +1 -1
  43. package/dist/plugins/circuit-breaker.d.ts +1 -1
  44. package/dist/plugins/concurrency.d.cts +1 -1
  45. package/dist/plugins/concurrency.d.ts +1 -1
  46. package/dist/plugins/download.cjs +1 -1
  47. package/dist/plugins/download.d.cts +1 -1
  48. package/dist/plugins/download.d.ts +1 -1
  49. package/dist/plugins/download.js +1 -1
  50. package/dist/plugins/logger.d.cts +1 -1
  51. package/dist/plugins/logger.d.ts +1 -1
  52. package/dist/plugins/memory-cache.d.cts +1 -1
  53. package/dist/plugins/memory-cache.d.ts +1 -1
  54. package/dist/plugins/opentelemetry-metrics.d.cts +1 -1
  55. package/dist/plugins/opentelemetry-metrics.d.ts +1 -1
  56. package/dist/plugins/opentelemetry.d.cts +1 -1
  57. package/dist/plugins/opentelemetry.d.ts +1 -1
  58. package/dist/plugins/rate-limit.d.cts +1 -1
  59. package/dist/plugins/rate-limit.d.ts +1 -1
  60. package/dist/plugins/retry.d.cts +1 -1
  61. package/dist/plugins/retry.d.ts +1 -1
  62. package/dist/plugins/upload.cjs +1 -1
  63. package/dist/plugins/upload.d.cts +1 -1
  64. package/dist/plugins/upload.d.ts +1 -1
  65. package/dist/plugins/upload.js +1 -1
  66. package/dist/plugins.d.cts +12 -12
  67. package/dist/plugins.d.ts +12 -12
  68. package/dist/{rateLimitPlugin-KOSUTbvE.d.cts → rateLimitPlugin-C357f6EC.d.cts} +2 -2
  69. package/dist/{rateLimitPlugin-cU0qI8TH.d.ts → rateLimitPlugin-e_IjO32D.d.ts} +2 -2
  70. package/dist/{response-BmBc0r8_.d.cts → response-BJacGco5.d.cts} +10 -1
  71. package/dist/{response-BmBc0r8_.d.ts → response-BJacGco5.d.ts} +10 -1
  72. package/dist/retryPlugin-JAQQ0CbN.d.ts +6 -0
  73. package/dist/retryPlugin-lpF9dskF.d.cts +6 -0
  74. package/dist/testing.cjs +1 -1
  75. package/dist/testing.d.cts +1 -1
  76. package/dist/testing.d.ts +1 -1
  77. package/dist/testing.js +1 -1
  78. package/dist/{uploadPlugin-CAHUGiz4.d.cts → uploadPlugin-Db0fMNLg.d.cts} +1 -1
  79. package/dist/{uploadPlugin-C8CgYCKh.d.ts → uploadPlugin-DdVkxO9B.d.ts} +1 -1
  80. package/dist/validateResponseStatus-CkUhntvh.js +6 -0
  81. package/dist/validateResponseStatus-DhsoZTyz.cjs +6 -0
  82. package/dist/{xhrTransport-BMPYpFxa.cjs → xhrTransport-BoLJnrNS.cjs} +1 -1
  83. package/dist/{xhrTransport-Dpn15mjV.js → xhrTransport-DiFlcZRG.js} +1 -1
  84. package/package.json +1 -1
  85. package/dist/createClient-CH1uIslF.js +0 -1
  86. package/dist/loggerPlugin-DFIXW1B1.d.ts +0 -6
  87. package/dist/loggerPlugin-DZlxRUT0.d.cts +0 -6
  88. package/dist/retryPlugin-Df4T3WEv.d.ts +0 -6
  89. package/dist/retryPlugin-Ir1VPUHq.d.cts +0 -6
  90. package/dist/validateResponseStatus-BAkeZ0TD.cjs +0 -6
  91. package/dist/validateResponseStatus-DVPM4SHm.js +0 -6
@@ -1 +1 @@
1
- const e=require("./RequestError-DrCr_lwO.cjs"),t=require("./validateResponseStatus-BAkeZ0TD.cjs"),n=require("./isBinaryBody-CdXW3TxQ.cjs"),r=require("./isReadableStream-4C8oyfa_.cjs");function createTimeoutSignal(t,n,r=`Request timeout after ${n}ms`){if(!n||n<=0||t?.aborted)return{signal:t,clear:noop$1};let i=new AbortController,a,onAbort,clear=()=>{if(a!==void 0&&(clearTimeout(a),a=void 0),t&&onAbort){try{t.removeEventListener(`abort`,onAbort)}catch{}onAbort=void 0}};if(t){onAbort=()=>{clear(),i.abort(t.reason??new e.t(`Request aborted`,{code:`ABORT_ERROR`}))};try{t.addEventListener(`abort`,onAbort,{once:!0})}catch(e){throw clear(),e}if(t.aborted&&!i.signal.aborted&&onAbort(),i.signal.aborted)return{signal:i.signal,clear}}try{a=setTimeout(()=>{clear(),i.abort(new e.t(r,{code:`TIMEOUT_ERROR`}))},n)}catch(e){throw clear(),e}return i.signal.aborted&&clear(),{signal:i.signal,clear}}function noop$1(){}const i=Object.prototype.hasOwnProperty,a=Symbol(`nativeRequest`);function isRequest(e){if(typeof e!=`object`||!e||typeof Request>`u`)return!1;try{let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null)return!1;let n=Object.getOwnPropertyDescriptor(Request.prototype,`url`)?.get;return n?(n.call(e),!0):!1}catch{return!1}}function rememberRequestBody(e,t,n=t.body){e[a]={request:t,body:n}}function getRequestForBody(e,t){let n=e[a];return n&&n.body===t?n.request:void 0}const o={json:`application/json`,text:`text/*`,blob:`*/*`,arrayBuffer:`*/*`,bytes:`*/*`,formData:`multipart/form-data`,stream:`*/*`,sse:`text/event-stream`,ndjson:`application/x-ndjson, application/ndjson`},s=/^([^?#]*)(?:\?([^#]*))?(#.*)?$/;function buildRequest(e){return buildRequestWithHeaders(e,new Headers(e.headers))}function buildRequestWithHeaders(e,t){setAccept(t,e.responseType);let n=buildBody(e,t);validateRequestBodySize(n,e);let i={},a=n;n=limitStreamingRequestBody(n,e,i);let o=buildURL(e),s=resolveNativeRequestInput(e,n,o,e.method),c={...e.fetchOptions,method:e.method??`GET`,headers:t,signal:e.signal};s||(c.body=n,n&&r.t(n)&&(c.duplex=`half`));let l=e.timeout&&e.timeout>0?createTimeoutSignal(e.signal,e.timeout):void 0;return l&&(c.signal=l.signal),{url:o,input:s,useNativeInput:s?canUseNativeInput(s,c,e.fetchOptions):!1,init:c,clear:l?.clear??noop,bodyError:n===a?void 0:i}}function canUseNativeInput(e,t,n){return t.method!==e.method||t.signal!==e.signal||!headersEqual(e.headers,t.headers)?!1:n===void 0||n.cache===e.cache&&n.credentials===e.credentials&&n.integrity===e.integrity&&n.keepalive===e.keepalive&&n.mode===e.mode&&n.redirect===e.redirect&&n.referrer===e.referrer&&n.referrerPolicy===e.referrerPolicy&&Reflect.ownKeys(n).length===8}function headersEqual(e,t){let n=new Headers(t),r=0;for(let[t,i]of e){if(n.get(t)!==i)return!1;r+=1}for(let e of n)--r;return r===0}function resolveNativeRequestInput(e,t,n,r){let i=getRequestForBody(e,t);return i?.url===n&&i.method===(r??`GET`)?i:void 0}function setAccept(e,t){!t||e.has(`accept`)||e.set(`accept`,o[t])}function buildURL(e){let t=joinURL(e.baseURL,String(e.url));if(!e.query&&!e.searchParams)return t;let n=serializeQuery(e);if(!n)return t;let r=t.indexOf(`#`),i=r===-1?t:t.slice(0,r),a=r===-1?``:t.slice(r),o=i.charCodeAt(i.length-1);return`${i}${i.includes(`?`)?o===63||o===38?``:`&`:`?`}${n}${a}`}function serializeQuery(t){if(t.searchParams)return t.searchParams.toString();let n=t.query;if(!t.querySerializer)return stringifyQuery(n);let r;try{r=t.querySerializer(n)}catch(n){throw new e.t(`Request query serialization failed`,{code:`CONFIG_ERROR`,config:t,cause:n})}if(typeof r!=`string`)throw new e.t(`Request querySerializer must return a string`,{code:`CONFIG_ERROR`,config:t});return r.startsWith(`?`)?r.slice(1):r}function joinURL(e,t){if(!e||isAbsoluteURL(t))return t;if(!t)return e;let n=e.includes(`?`)||e.includes(`#`),r=t.charCodeAt(0);if(!n&&r!==63&&r!==35)return joinURLPath(e,t);let i=s.exec(e),a=s.exec(t),o=joinURLPath(i[1],a[1]),c=i[2]??``,l=a[2]??``,u=c&&l?`${c}&${l}`:c||l,d=a[3]||i[3]||``;return`${o}${u?`?${u}`:``}${d}`}function joinURLPath(e,t){if(!t)return e;let n=e.length,r=0;for(;n>0&&e.charCodeAt(n-1)===47;)--n;for(;r<t.length&&t.charCodeAt(r)===47;)r+=1;return`${e.slice(0,n)}/${t.slice(r)}`}function isAbsoluteURL(e){if(e.startsWith(`//`))return!0;let t=e.indexOf(`:`);return t<=0?!1:/^[a-z][a-z\d+\-.]*$/i.test(e.slice(0,t))}function stringifyQuery(e){let t=new URLSearchParams;for(let n in e)i.call(e,n)&&appendQuery(t,n,e[n]);return t.toString()}function appendQuery(e,t,n){if(n!==void 0){if(n===null){e.append(t,``);return}if(Array.isArray(n)){for(let r of n)r!==void 0&&e.append(t,r===null?``:String(r));return}e.append(t,String(n))}}function buildBody(e,t){if(e.json!==void 0)return setContentType(t,`application/json`),stringifyJson(e.json,e);if(e.form!==void 0)return setContentType(t,`application/x-www-form-urlencoded;charset=UTF-8`),buildURLSearchParams(e.form);if(e.formData!==void 0)return buildFormData(e.formData,e.maxFormDataDepth);if(e.body!==null&&e.body!==void 0)return isPlainObject(e.body)?(setContentType(t,`application/json`),stringifyJson(e.body,e)):e.body}function stringifyJson(e,t){let n=t.stringifyJson?t.stringifyJson(e):JSON.stringify(e);if(typeof n!=`string`)throw TypeError(`Request JSON stringifier must return a string`);return n}function buildURLSearchParams(e){if(n.r(e))return e;let t=new URLSearchParams;for(let n in e)i.call(e,n)&&appendQuery(t,n,e[n]);return t}function buildFormData(e,n=32){if(t.u(e))return e;let r=new FormData,a=new WeakSet;for(let t in e)i.call(e,t)&&appendFormDataValue(r,t,e[t],0,n,a);return r}function appendFormDataValue(e,t,r,i,a,o){if(r!=null){if(Array.isArray(r)){if(o.has(r))throw TypeError(`FormData arrays cannot contain circular references`);let n=i+1;if(n>a)throw RangeError(`FormData array depth exceeds maxFormDataDepth ${a}`);o.add(r);try{for(let i of r)appendFormDataValue(e,t,i,n,a,o)}finally{o.delete(r)}return}if(n.n(r)){e.append(t,r);return}e.append(t,String(r))}}function setContentType(e,t){e.has(`content-type`)||e.set(`content-type`,t)}function validateRequestBodySize(t,n){let r=n.maxRequestSize;if(!Number.isFinite(r)||t===void 0)return;let i=getRequestBodySize(t);if(i!==void 0&&i>(r??1/0))throw new e.t(`Request body exceeds maxRequestSize ${r}`,{code:`REQUEST_TOO_LARGE`,config:n})}function getRequestBodySize(e){if(typeof e==`string`)return utf8ByteLength(e);if(n.r(e))return utf8ByteLength(e.toString());if(n.n(e))return e.size;if(n.t(e)||ArrayBuffer.isView(e))return e.byteLength}function limitStreamingRequestBody(t,n,i){let a=n.maxRequestSize;if(!r.t(t)||!Number.isFinite(a))return t;let o=t,s,c=0;return new ReadableStream({async pull(t){s??(s=o.getReader());try{let r=await s.read();if(r.done){s.releaseLock(),s=void 0,t.close();return}if(c+=r.value.byteLength,c>(a??1/0)){let t=new e.t(`Request body exceeds maxRequestSize ${a}`,{code:`REQUEST_TOO_LARGE`,config:n});throw i.current=t,s.cancel(t).catch(()=>{}),s.releaseLock(),s=void 0,t}t.enqueue(r.value)}catch(e){throw s&&(s.releaseLock(),s=void 0),e}},async cancel(e){if(s)try{await s.cancel(e)}finally{s.releaseLock(),s=void 0}else o.locked||await o.cancel(e)}})}function utf8ByteLength(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r<128)t+=1;else if(r<2048)t+=2;else if(r>=55296&&r<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=4,n+=1):t+=3}else t+=3}return t}function isPlainObject(e){return Object.prototype.toString.call(e)===`[object Object]`}function noop(){}function resolveErrorResponseSizeLimit(e){let t=e.maxErrorResponseSize??10485760,n=e.maxResponseSize;return Number.isFinite(t)&&(!Number.isFinite(n)||t<(n??1/0))?t:void 0}const c=Symbol(`ERROR_RESPONSE_DATA_UNAVAILABLE`);async function withErrorResponseTimeout(t,n,r){let i=t.timeout??0,a=i>0?i:1e4,o=new AbortController,s,l=!1,u,cancelOperation=()=>{try{r?.()}catch{}o.abort()};try{let r=new Promise((n,r)=>{s=setTimeout(()=>{if(l=!0,cancelOperation(),i>0){r(new e.t(`Request timeout after ${i}ms`,{code:`TIMEOUT_ERROR`,config:t}));return}n(c)},a)});u=n(o.signal);try{return await Promise.race([u,r])}catch(t){if(e.n(t)&&t.code===`PARSER_ERROR`)return c;throw t}}finally{s!==void 0&&!l&&clearTimeout(s),u?.catch(()=>{})}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return buildRequestWithHeaders}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return rememberRequestBody}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return buildRequest}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return withErrorResponseTimeout}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return isAbsoluteURL}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return resolveErrorResponseSizeLimit}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return isRequest}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return createTimeoutSignal}});
1
+ const e=require("./RequestError-DrCr_lwO.cjs"),t=require("./validateResponseStatus-DhsoZTyz.cjs"),n=require("./isBinaryBody-CdXW3TxQ.cjs"),r=require("./isReadableStream-4C8oyfa_.cjs");function createTimeoutSignal(t,n,r=`Request timeout after ${n}ms`){if(!n||n<=0||t?.aborted)return{signal:t,clear:noop$1};let i=new AbortController,a,onAbort,clear=()=>{if(a!==void 0&&(clearTimeout(a),a=void 0),t&&onAbort){try{t.removeEventListener(`abort`,onAbort)}catch{}onAbort=void 0}};if(t){onAbort=()=>{clear(),i.abort(t.reason??new e.t(`Request aborted`,{code:`ABORT_ERROR`}))};try{t.addEventListener(`abort`,onAbort,{once:!0})}catch(e){throw clear(),e}if(t.aborted&&!i.signal.aborted&&onAbort(),i.signal.aborted)return{signal:i.signal,clear}}try{a=setTimeout(()=>{clear(),i.abort(new e.t(r,{code:`TIMEOUT_ERROR`}))},n)}catch(e){throw clear(),e}return i.signal.aborted&&clear(),{signal:i.signal,clear}}function noop$1(){}const i=Object.prototype.hasOwnProperty,a=Symbol(`nativeRequest`);function isRequest(e){if(typeof e!=`object`||!e||typeof Request>`u`)return!1;try{let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null)return!1;let n=Object.getOwnPropertyDescriptor(Request.prototype,`url`)?.get;return n?(n.call(e),!0):!1}catch{return!1}}function rememberRequestBody(e,t,n=t.body){e[a]={request:t,body:n}}function getRequestForBody(e,t){let n=e[a];return n&&n.body===t?n.request:void 0}const o={json:`application/json`,text:`text/*`,blob:`*/*`,arrayBuffer:`*/*`,bytes:`*/*`,formData:`multipart/form-data`,stream:`*/*`,sse:`text/event-stream`,ndjson:`application/x-ndjson, application/ndjson`},s=/^([^?#]*)(?:\?([^#]*))?(#.*)?$/;function buildRequest(e){return buildRequestWithHeaders(e,new Headers(e.headers))}function buildRequestWithHeaders(e,t){setAccept(t,e.responseType);let n=buildBody(e,t);validateRequestBodySize(n,e);let i={},a=n;n=limitStreamingRequestBody(n,e,i);let o=buildURL(e),s=resolveNativeRequestInput(e,n,o,e.method),c={...e.fetchOptions,method:e.method??`GET`,headers:t,signal:e.signal};s||(c.body=n,n&&r.t(n)&&(c.duplex=`half`));let l=e.timeout&&e.timeout>0?createTimeoutSignal(e.signal,e.timeout):void 0;return l&&(c.signal=l.signal),{url:o,input:s,useNativeInput:s?canUseNativeInput(s,c,e.fetchOptions):!1,init:c,clear:l?.clear??noop,bodyError:n===a?void 0:i}}function canUseNativeInput(e,t,n){return t.method!==e.method||t.signal!==e.signal||!headersEqual(e.headers,t.headers)?!1:n===void 0||n.cache===e.cache&&n.credentials===e.credentials&&n.integrity===e.integrity&&n.keepalive===e.keepalive&&n.mode===e.mode&&n.redirect===e.redirect&&n.referrer===e.referrer&&n.referrerPolicy===e.referrerPolicy&&Reflect.ownKeys(n).length===8}function headersEqual(e,t){let n=new Headers(t),r=0;for(let[t,i]of e){if(n.get(t)!==i)return!1;r+=1}for(let e of n)--r;return r===0}function resolveNativeRequestInput(e,t,n,r){let i=getRequestForBody(e,t);return i?.url===n&&i.method===(r??`GET`)?i:void 0}function setAccept(e,t){!t||e.has(`accept`)||e.set(`accept`,o[t])}function buildURL(e){let t=joinURL(e.baseURL,String(e.url));if(!e.query&&!e.searchParams)return t;let n=serializeQuery(e);if(!n)return t;let r=t.indexOf(`#`),i=r===-1?t:t.slice(0,r),a=r===-1?``:t.slice(r),o=i.charCodeAt(i.length-1);return`${i}${i.includes(`?`)?o===63||o===38?``:`&`:`?`}${n}${a}`}function serializeQuery(t){if(t.searchParams)return t.searchParams.toString();let n=t.query;if(!t.querySerializer)return stringifyQuery(n);let r;try{r=t.querySerializer(n)}catch(n){throw new e.t(`Request query serialization failed`,{code:`CONFIG_ERROR`,config:t,cause:n})}if(typeof r!=`string`)throw new e.t(`Request querySerializer must return a string`,{code:`CONFIG_ERROR`,config:t});return r.startsWith(`?`)?r.slice(1):r}function joinURL(e,t){if(!e||isAbsoluteURL(t))return t;if(!t)return e;let n=e.includes(`?`)||e.includes(`#`),r=t.charCodeAt(0);if(!n&&r!==63&&r!==35)return joinURLPath(e,t);let i=s.exec(e),a=s.exec(t),o=joinURLPath(i[1],a[1]),c=i[2]??``,l=a[2]??``,u=c&&l?`${c}&${l}`:c||l,d=a[3]||i[3]||``;return`${o}${u?`?${u}`:``}${d}`}function joinURLPath(e,t){if(!t)return e;let n=e.length,r=0;for(;n>0&&e.charCodeAt(n-1)===47;)--n;for(;r<t.length&&t.charCodeAt(r)===47;)r+=1;return`${e.slice(0,n)}/${t.slice(r)}`}function isAbsoluteURL(e){if(e.startsWith(`//`))return!0;let t=e.indexOf(`:`);return t<=0?!1:/^[a-z][a-z\d+\-.]*$/i.test(e.slice(0,t))}function stringifyQuery(e){let t=new URLSearchParams;for(let n in e)i.call(e,n)&&appendQuery(t,n,e[n]);return t.toString()}function appendQuery(e,t,n){if(n!==void 0){if(n===null){e.append(t,``);return}if(Array.isArray(n)){for(let r of n)r!==void 0&&e.append(t,r===null?``:String(r));return}e.append(t,String(n))}}function buildBody(e,t){if(e.json!==void 0)return setContentType(t,`application/json`),stringifyJson(e.json,e);if(e.form!==void 0)return setContentType(t,`application/x-www-form-urlencoded;charset=UTF-8`),buildURLSearchParams(e.form);if(e.formData!==void 0)return buildFormData(e.formData,e.maxFormDataDepth);if(e.body!==null&&e.body!==void 0)return isPlainObject(e.body)?(setContentType(t,`application/json`),stringifyJson(e.body,e)):e.body}function stringifyJson(e,t){let n=t.stringifyJson?t.stringifyJson(e):JSON.stringify(e);if(typeof n!=`string`)throw TypeError(`Request JSON stringifier must return a string`);return n}function buildURLSearchParams(e){if(n.r(e))return e;let t=new URLSearchParams;for(let n in e)i.call(e,n)&&appendQuery(t,n,e[n]);return t}function buildFormData(e,n=32){if(t.d(e))return e;let r=new FormData,a=new WeakSet;for(let t in e)i.call(e,t)&&appendFormDataValue(r,t,e[t],0,n,a);return r}function appendFormDataValue(e,t,r,i,a,o){if(r!=null){if(Array.isArray(r)){if(o.has(r))throw TypeError(`FormData arrays cannot contain circular references`);let n=i+1;if(n>a)throw RangeError(`FormData array depth exceeds maxFormDataDepth ${a}`);o.add(r);try{for(let i of r)appendFormDataValue(e,t,i,n,a,o)}finally{o.delete(r)}return}if(n.n(r)){e.append(t,r);return}e.append(t,String(r))}}function setContentType(e,t){e.has(`content-type`)||e.set(`content-type`,t)}function validateRequestBodySize(t,n){let r=n.maxRequestSize;if(!Number.isFinite(r)||t===void 0)return;let i=getRequestBodySize(t);if(i!==void 0&&i>(r??1/0))throw new e.t(`Request body exceeds maxRequestSize ${r}`,{code:`REQUEST_TOO_LARGE`,config:n})}function getRequestBodySize(e){if(typeof e==`string`)return utf8ByteLength(e);if(n.r(e))return utf8ByteLength(e.toString());if(n.n(e))return e.size;if(n.t(e)||ArrayBuffer.isView(e))return e.byteLength}function limitStreamingRequestBody(t,n,i){let a=n.maxRequestSize;if(!r.t(t)||!Number.isFinite(a))return t;let o=t,s,c=0;return new ReadableStream({async pull(t){s??(s=o.getReader());try{let r=await s.read();if(r.done){s.releaseLock(),s=void 0,t.close();return}if(c+=r.value.byteLength,c>(a??1/0)){let t=new e.t(`Request body exceeds maxRequestSize ${a}`,{code:`REQUEST_TOO_LARGE`,config:n});throw i.current=t,s.cancel(t).catch(()=>{}),s.releaseLock(),s=void 0,t}t.enqueue(r.value)}catch(e){throw s&&(s.releaseLock(),s=void 0),e}},async cancel(e){if(s)try{await s.cancel(e)}finally{s.releaseLock(),s=void 0}else o.locked||await o.cancel(e)}})}function utf8ByteLength(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r<128)t+=1;else if(r<2048)t+=2;else if(r>=55296&&r<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=4,n+=1):t+=3}else t+=3}return t}function isPlainObject(e){return Object.prototype.toString.call(e)===`[object Object]`}function noop(){}function resolveErrorResponseSizeLimit(e){let t=e.maxErrorResponseSize??10485760,n=e.maxResponseSize;return Number.isFinite(t)&&(!Number.isFinite(n)||t<(n??1/0))?t:void 0}const c=Symbol(`ERROR_RESPONSE_DATA_UNAVAILABLE`);async function withErrorResponseTimeout(t,n,r){let i=t.timeout??0,a=i>0?i:1e4,o=new AbortController,s,l=!1,u,cancelOperation=()=>{try{r?.()}catch{}o.abort()};try{let r=new Promise((n,r)=>{s=setTimeout(()=>{if(l=!0,cancelOperation(),i>0){r(new e.t(`Request timeout after ${i}ms`,{code:`TIMEOUT_ERROR`,config:t}));return}n(c)},a)});u=n(o.signal);try{return await Promise.race([u,r])}catch(t){if(e.n(t)&&t.code===`PARSER_ERROR`)return c;throw t}}finally{s!==void 0&&!l&&clearTimeout(s),u?.catch(()=>{})}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return buildRequestWithHeaders}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return rememberRequestBody}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return buildRequest}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return withErrorResponseTimeout}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return isAbsoluteURL}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return resolveErrorResponseSizeLimit}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return isRequest}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return createTimeoutSignal}});
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./RequestError-DrCr_lwO.cjs"),t=require("./validateResponseStatus-BAkeZ0TD.cjs"),n=require("./createClient-aKdBLRu2.cjs"),r=require("./testing.cjs"),i=require("./PluginError-DT3VnlUB.cjs"),a=require("./plugins/auth.cjs"),o=require("./cachePlugin-0cb8h9cY.cjs"),s=require("./plugins/circuit-breaker.cjs"),c=require("./plugins/concurrency.cjs"),l=require("./plugins/download.cjs"),u=require("./plugins/logger.cjs"),d=require("./plugins/opentelemetry.cjs"),f=require("./plugins/opentelemetry-metrics.cjs"),p=require("./rateLimitPlugin-CtwD8U0P.cjs"),m=require("./plugins/retry.cjs"),h=require("./plugins/upload.cjs");require("./plugins.cjs"),exports.Client=n.n,exports.FetchAdapter=n.i,exports.IndexedDBCacheStore=o.r,exports.InterceptorManager=n.r,exports.MemoryCacheStore=o.i,exports.MockAdapter=r.MockAdapter,exports.PluginError=i.t,exports.RequestError=e.t,exports.SchemaValidationError=t.d,exports.TieredCacheStore=o.n,exports.WebStorageCacheStore=o.a,exports.authPlugin=a.authPlugin,exports.cachePlugin=o.t,exports.circuitBreakerPlugin=s.circuitBreakerPlugin,exports.concurrencyPlugin=c.concurrencyPlugin,exports.createClient=n.t,exports.downloadPlugin=l.downloadPlugin,exports.isRequestError=e.n,exports.isSchemaValidationError=t.f,exports.loggerPlugin=u.loggerPlugin,exports.openTelemetryMetricsPlugin=f.openTelemetryMetricsPlugin,exports.openTelemetryPlugin=d.openTelemetryPlugin,exports.rateLimitPlugin=p.t,exports.retryPlugin=m.retryPlugin,exports.uploadPlugin=h.uploadPlugin;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./RequestError-DrCr_lwO.cjs"),t=require("./validateResponseStatus-DhsoZTyz.cjs"),n=require("./createClient-BNcd9hoJ.cjs"),r=require("./testing.cjs"),i=require("./PluginError-DT3VnlUB.cjs"),a=require("./plugins/auth.cjs"),o=require("./cachePlugin-0cb8h9cY.cjs"),s=require("./plugins/circuit-breaker.cjs"),c=require("./plugins/concurrency.cjs"),l=require("./plugins/download.cjs"),u=require("./plugins/logger.cjs"),d=require("./plugins/opentelemetry.cjs"),f=require("./plugins/opentelemetry-metrics.cjs"),p=require("./rateLimitPlugin-CtwD8U0P.cjs"),m=require("./plugins/retry.cjs"),h=require("./plugins/upload.cjs");require("./plugins.cjs"),exports.Client=n.n,exports.FetchAdapter=n.i,exports.IndexedDBCacheStore=o.r,exports.InterceptorManager=n.r,exports.MemoryCacheStore=o.i,exports.MockAdapter=r.MockAdapter,exports.PluginError=i.t,exports.RequestError=e.t,exports.SchemaValidationError=t.f,exports.TieredCacheStore=o.n,exports.WebStorageCacheStore=o.a,exports.authPlugin=a.authPlugin,exports.cachePlugin=o.t,exports.circuitBreakerPlugin=s.circuitBreakerPlugin,exports.concurrencyPlugin=c.concurrencyPlugin,exports.createClient=n.t,exports.downloadPlugin=l.downloadPlugin,exports.isRequestError=e.n,exports.isSchemaValidationError=t.p,exports.loggerPlugin=u.loggerPlugin,exports.openTelemetryMetricsPlugin=f.openTelemetryMetricsPlugin,exports.openTelemetryPlugin=d.openTelemetryPlugin,exports.rateLimitPlugin=p.t,exports.retryPlugin=m.retryPlugin,exports.uploadPlugin=h.uploadPlugin;
package/dist/index.d.cts CHANGED
@@ -1,18 +1,18 @@
1
- import { A as OpenTelemetryAttributeValue, B as UploadData, C as DownloadOptions, D as LoggerEntry, E as ErrorLogEntry, F as RequestLogger, H as UploadProgress, I as ResponseLogEntry, L as RetryEvent, M as OpenTelemetryOptions, N as RateLimitOptions, O as LoggerOptions, P as RequestLogEntry, R as RetryOptions, S as ConcurrencyOptions, T as DownloadProgress, U as StandardSchemaV1, V as UploadOptions, W as HttpMethod, _ as AuthOptions, a as FetchOptions, b as CircuitBreakerStateChange, c as JsonStringifier, d as QueryValue, f as RequestConfig, g as ResponseType, h as RequestURL, i as FetchFunction, j as OpenTelemetryMetricsOptions, k as MemoryCacheOptions, l as QueryParams, m as RequestInputConfig, n as ServerSentEvent, o as JsonParser, p as RequestExtensions, r as StreamingSchemaLocation, s as JsonParserContext, t as NporaResponse, u as QuerySerializer, v as CacheOptions, w as DownloadOutput, x as CircuitState, y as CircuitBreakerOptions, z as TransferProgress } from "./response-BmBc0r8_.cjs";
2
- import { t as Adapter } from "./adapter-DlZ5Qbou.cjs";
3
- import { a as RequestErrorOptions, c as createClient, i as RequestErrorCode, l as Client, n as isSchemaValidationError, o as isRequestError, r as RequestError, s as FetchAdapter, t as SchemaValidationError, u as ClientOptions } from "./SchemaValidationError-BANH6INo.cjs";
4
- import { a as MockReplyHandler, c as MockRoute, i as MockReply, l as MockURLMatcher, n as MockAdapterOptions, o as MockRequestMatcher, r as MockHandler, s as MockResponseOptions, t as MockAdapter } from "./MockAdapter-BrXOqgTA.cjs";
5
- import { a as PluginInterceptorManager, c as InterceptorOptions, i as PluginHookManager, n as PluginCleanup, o as Interceptor, r as PluginContext, s as InterceptorManager, t as Plugin } from "./Plugin-DYSeSZ6O.cjs";
1
+ import { A as MemoryCacheOptions, B as TransferProgress, C as ConcurrencyOptions, D as ErrorLogEntry, E as DownloadProgress, F as RequestLogEntry, G as HttpMethod, H as UploadOptions, I as RequestLogger, L as ResponseLogEntry, M as OpenTelemetryMetricsOptions, N as OpenTelemetryOptions, O as LoggerEntry, P as RateLimitOptions, R as RetryEvent, S as CircuitState, T as DownloadOutput, U as UploadProgress, V as UploadData, W as StandardSchemaV1, _ as ResponseType, a as FetchFunction, b as CircuitBreakerOptions, c as JsonParserContext, d as QuerySerializer, f as QueryValue, g as RequestURL, h as RequestInputConfig, i as StreamingSchemaLocation, j as OpenTelemetryAttributeValue, k as LoggerOptions, l as JsonStringifier, m as RequestExtensions, n as ServerSentEvent, o as FetchOptions, p as RequestConfig, r as SseReconnectOptions, s as JsonParser, t as NporaResponse, u as QueryParams, v as AuthOptions, w as DownloadOptions, x as CircuitBreakerStateChange, y as CacheOptions, z as RetryOptions } from "./response-BJacGco5.cjs";
2
+ import { t as Adapter } from "./adapter-phBJ1R70.cjs";
3
+ import { a as RequestErrorOptions, c as createClient, i as RequestErrorCode, l as Client, n as isSchemaValidationError, o as isRequestError, r as RequestError, s as FetchAdapter, t as SchemaValidationError, u as ClientOptions } from "./SchemaValidationError-MUg6trpg.cjs";
4
+ import { a as MockReplyHandler, c as MockRoute, i as MockReply, l as MockURLMatcher, n as MockAdapterOptions, o as MockRequestMatcher, r as MockHandler, s as MockResponseOptions, t as MockAdapter } from "./MockAdapter-zyLuXWEm.cjs";
5
+ import { a as PluginInterceptorManager, c as InterceptorOptions, i as PluginHookManager, n as PluginCleanup, o as Interceptor, r as PluginContext, s as InterceptorManager, t as Plugin } from "./Plugin-9Z-IZ_NJ.cjs";
6
6
  import { n as PluginErrorCode, r as PluginErrorOptions, t as PluginError } from "./PluginError-DVP3pUt_.cjs";
7
- import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-DpE4afbz.cjs";
8
- import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-DJGfieqN.cjs";
9
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-tbwS-j5u.cjs";
10
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-Dvsgel94.cjs";
11
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DJDuMLwT.cjs";
12
- import { t as loggerPlugin } from "./loggerPlugin-DZlxRUT0.cjs";
13
- import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-Cuap7zKx.cjs";
14
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-BqUiYPda.cjs";
15
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-KOSUTbvE.cjs";
16
- import { t as retryPlugin } from "./retryPlugin-Ir1VPUHq.cjs";
17
- import { t as uploadPlugin } from "./uploadPlugin-CAHUGiz4.cjs";
18
- export { Adapter, AuthOptions, AuthPluginOptions, AuthTokenStorage, type CacheEntry, type CacheEvent, type CacheEventType, CacheOptions, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, CircuitBreakerOptions, CircuitBreakerPlugin, CircuitBreakerPluginOptions, CircuitBreakerStateChange, CircuitState, Client, ClientOptions, ConcurrencyOptions, ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, DownloadOptions, DownloadOutput, DownloadPluginOptions, DownloadProgress, DownloadTransport, ErrorLogEntry, FetchAdapter, FetchFunction, FetchOptions, HttpMethod, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, Interceptor, InterceptorManager, InterceptorOptions, JsonParser, JsonParserContext, JsonStringifier, LoggerEntry, LoggerOptions, MemoryCacheOptions, MemoryCacheStore, type MemoryCacheStoreOptions, MockAdapter, MockAdapterOptions, MockHandler, MockReply, MockReplyHandler, MockRequestMatcher, MockResponseOptions, MockRoute, MockURLMatcher, NporaResponse, OpenTelemetryAttributeValue, OpenTelemetryContextApi, OpenTelemetryCounter, OpenTelemetryHeaderSetter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsOptions, OpenTelemetryMetricsPluginOptions, OpenTelemetryOptions, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, Plugin, PluginCleanup, PluginContext, PluginError, PluginErrorCode, PluginErrorOptions, PluginHookManager, PluginInterceptorManager, QueryParams, QuerySerializer, QueryValue, RateLimitOptions, RateLimitPlugin, RateLimitPluginOptions, RateLimitState, RequestConfig, RequestError, RequestErrorCode, RequestErrorOptions, RequestExtensions, RequestInputConfig, RequestLogEntry, RequestLogger, RequestURL, ResponseLogEntry, ResponseType, RetryEvent, RetryOptions, SchemaValidationError, ServerSentEvent, StandardSchemaV1, StreamingSchemaLocation, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, TransferProgress, UploadData, UploadOptions, UploadProgress, WebStorageCacheStore, type WebStorageCacheStoreOptions, authPlugin, cachePlugin, circuitBreakerPlugin, concurrencyPlugin, createClient, downloadPlugin, isRequestError, isSchemaValidationError, loggerPlugin, openTelemetryMetricsPlugin, openTelemetryPlugin, rateLimitPlugin, retryPlugin, uploadPlugin };
7
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-BtPHJ7EZ.cjs";
8
+ import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-DANU1VAL.cjs";
9
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-DHyLSvdy.cjs";
10
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-D4YMInT5.cjs";
11
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-C4ugCtc1.cjs";
12
+ import { t as loggerPlugin } from "./loggerPlugin-CSWyHhxS.cjs";
13
+ import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-DX-5cpbR.cjs";
14
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-BtO0nwPY.cjs";
15
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-C357f6EC.cjs";
16
+ import { t as retryPlugin } from "./retryPlugin-lpF9dskF.cjs";
17
+ import { t as uploadPlugin } from "./uploadPlugin-Db0fMNLg.cjs";
18
+ export { Adapter, AuthOptions, AuthPluginOptions, AuthTokenStorage, type CacheEntry, type CacheEvent, type CacheEventType, CacheOptions, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, CircuitBreakerOptions, CircuitBreakerPlugin, CircuitBreakerPluginOptions, CircuitBreakerStateChange, CircuitState, Client, ClientOptions, ConcurrencyOptions, ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, DownloadOptions, DownloadOutput, DownloadPluginOptions, DownloadProgress, DownloadTransport, ErrorLogEntry, FetchAdapter, FetchFunction, FetchOptions, HttpMethod, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, Interceptor, InterceptorManager, InterceptorOptions, JsonParser, JsonParserContext, JsonStringifier, LoggerEntry, LoggerOptions, MemoryCacheOptions, MemoryCacheStore, type MemoryCacheStoreOptions, MockAdapter, MockAdapterOptions, MockHandler, MockReply, MockReplyHandler, MockRequestMatcher, MockResponseOptions, MockRoute, MockURLMatcher, NporaResponse, OpenTelemetryAttributeValue, OpenTelemetryContextApi, OpenTelemetryCounter, OpenTelemetryHeaderSetter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsOptions, OpenTelemetryMetricsPluginOptions, OpenTelemetryOptions, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, Plugin, PluginCleanup, PluginContext, PluginError, PluginErrorCode, PluginErrorOptions, PluginHookManager, PluginInterceptorManager, QueryParams, QuerySerializer, QueryValue, RateLimitOptions, RateLimitPlugin, RateLimitPluginOptions, RateLimitState, RequestConfig, RequestError, RequestErrorCode, RequestErrorOptions, RequestExtensions, RequestInputConfig, RequestLogEntry, RequestLogger, RequestURL, ResponseLogEntry, ResponseType, RetryEvent, RetryOptions, SchemaValidationError, ServerSentEvent, SseReconnectOptions, StandardSchemaV1, StreamingSchemaLocation, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, TransferProgress, UploadData, UploadOptions, UploadProgress, WebStorageCacheStore, type WebStorageCacheStoreOptions, authPlugin, cachePlugin, circuitBreakerPlugin, concurrencyPlugin, createClient, downloadPlugin, isRequestError, isSchemaValidationError, loggerPlugin, openTelemetryMetricsPlugin, openTelemetryPlugin, rateLimitPlugin, retryPlugin, uploadPlugin };
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { A as OpenTelemetryAttributeValue, B as UploadData, C as DownloadOptions, D as LoggerEntry, E as ErrorLogEntry, F as RequestLogger, H as UploadProgress, I as ResponseLogEntry, L as RetryEvent, M as OpenTelemetryOptions, N as RateLimitOptions, O as LoggerOptions, P as RequestLogEntry, R as RetryOptions, S as ConcurrencyOptions, T as DownloadProgress, U as StandardSchemaV1, V as UploadOptions, W as HttpMethod, _ as AuthOptions, a as FetchOptions, b as CircuitBreakerStateChange, c as JsonStringifier, d as QueryValue, f as RequestConfig, g as ResponseType, h as RequestURL, i as FetchFunction, j as OpenTelemetryMetricsOptions, k as MemoryCacheOptions, l as QueryParams, m as RequestInputConfig, n as ServerSentEvent, o as JsonParser, p as RequestExtensions, r as StreamingSchemaLocation, s as JsonParserContext, t as NporaResponse, u as QuerySerializer, v as CacheOptions, w as DownloadOutput, x as CircuitState, y as CircuitBreakerOptions, z as TransferProgress } from "./response-BmBc0r8_.js";
2
- import { t as Adapter } from "./adapter-CBaLHCEm.js";
3
- import { a as RequestErrorOptions, c as createClient, i as RequestErrorCode, l as Client, n as isSchemaValidationError, o as isRequestError, r as RequestError, s as FetchAdapter, t as SchemaValidationError, u as ClientOptions } from "./SchemaValidationError-ljhan6YH.js";
4
- import { a as MockReplyHandler, c as MockRoute, i as MockReply, l as MockURLMatcher, n as MockAdapterOptions, o as MockRequestMatcher, r as MockHandler, s as MockResponseOptions, t as MockAdapter } from "./MockAdapter--6ZwMMQ8.js";
5
- import { a as PluginInterceptorManager, c as InterceptorOptions, i as PluginHookManager, n as PluginCleanup, o as Interceptor, r as PluginContext, s as InterceptorManager, t as Plugin } from "./Plugin-C5P_tBXo.js";
1
+ import { A as MemoryCacheOptions, B as TransferProgress, C as ConcurrencyOptions, D as ErrorLogEntry, E as DownloadProgress, F as RequestLogEntry, G as HttpMethod, H as UploadOptions, I as RequestLogger, L as ResponseLogEntry, M as OpenTelemetryMetricsOptions, N as OpenTelemetryOptions, O as LoggerEntry, P as RateLimitOptions, R as RetryEvent, S as CircuitState, T as DownloadOutput, U as UploadProgress, V as UploadData, W as StandardSchemaV1, _ as ResponseType, a as FetchFunction, b as CircuitBreakerOptions, c as JsonParserContext, d as QuerySerializer, f as QueryValue, g as RequestURL, h as RequestInputConfig, i as StreamingSchemaLocation, j as OpenTelemetryAttributeValue, k as LoggerOptions, l as JsonStringifier, m as RequestExtensions, n as ServerSentEvent, o as FetchOptions, p as RequestConfig, r as SseReconnectOptions, s as JsonParser, t as NporaResponse, u as QueryParams, v as AuthOptions, w as DownloadOptions, x as CircuitBreakerStateChange, y as CacheOptions, z as RetryOptions } from "./response-BJacGco5.js";
2
+ import { t as Adapter } from "./adapter-c5-nyUCy.js";
3
+ import { a as RequestErrorOptions, c as createClient, i as RequestErrorCode, l as Client, n as isSchemaValidationError, o as isRequestError, r as RequestError, s as FetchAdapter, t as SchemaValidationError, u as ClientOptions } from "./SchemaValidationError-B2bnpz8J.js";
4
+ import { a as MockReplyHandler, c as MockRoute, i as MockReply, l as MockURLMatcher, n as MockAdapterOptions, o as MockRequestMatcher, r as MockHandler, s as MockResponseOptions, t as MockAdapter } from "./MockAdapter-C-0Hh1uW.js";
5
+ import { a as PluginInterceptorManager, c as InterceptorOptions, i as PluginHookManager, n as PluginCleanup, o as Interceptor, r as PluginContext, s as InterceptorManager, t as Plugin } from "./Plugin-Dx5Jby_c.js";
6
6
  import { n as PluginErrorCode, r as PluginErrorOptions, t as PluginError } from "./PluginError-DVP3pUt_.js";
7
- import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-USKx_XNX.js";
8
- import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-XXrPNTfx.js";
9
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-D12NHWon.js";
10
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-W84oJyJP.js";
11
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DjCZgsVL.js";
12
- import { t as loggerPlugin } from "./loggerPlugin-DFIXW1B1.js";
13
- import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-w3t3yoCr.js";
14
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-0UQ5jqvv.js";
15
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-cU0qI8TH.js";
16
- import { t as retryPlugin } from "./retryPlugin-Df4T3WEv.js";
17
- import { t as uploadPlugin } from "./uploadPlugin-C8CgYCKh.js";
18
- export { Adapter, AuthOptions, AuthPluginOptions, AuthTokenStorage, type CacheEntry, type CacheEvent, type CacheEventType, CacheOptions, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, CircuitBreakerOptions, CircuitBreakerPlugin, CircuitBreakerPluginOptions, CircuitBreakerStateChange, CircuitState, Client, ClientOptions, ConcurrencyOptions, ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, DownloadOptions, DownloadOutput, DownloadPluginOptions, DownloadProgress, DownloadTransport, ErrorLogEntry, FetchAdapter, FetchFunction, FetchOptions, HttpMethod, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, Interceptor, InterceptorManager, InterceptorOptions, JsonParser, JsonParserContext, JsonStringifier, LoggerEntry, LoggerOptions, MemoryCacheOptions, MemoryCacheStore, type MemoryCacheStoreOptions, MockAdapter, MockAdapterOptions, MockHandler, MockReply, MockReplyHandler, MockRequestMatcher, MockResponseOptions, MockRoute, MockURLMatcher, NporaResponse, OpenTelemetryAttributeValue, OpenTelemetryContextApi, OpenTelemetryCounter, OpenTelemetryHeaderSetter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsOptions, OpenTelemetryMetricsPluginOptions, OpenTelemetryOptions, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, Plugin, PluginCleanup, PluginContext, PluginError, PluginErrorCode, PluginErrorOptions, PluginHookManager, PluginInterceptorManager, QueryParams, QuerySerializer, QueryValue, RateLimitOptions, RateLimitPlugin, RateLimitPluginOptions, RateLimitState, RequestConfig, RequestError, RequestErrorCode, RequestErrorOptions, RequestExtensions, RequestInputConfig, RequestLogEntry, RequestLogger, RequestURL, ResponseLogEntry, ResponseType, RetryEvent, RetryOptions, SchemaValidationError, ServerSentEvent, StandardSchemaV1, StreamingSchemaLocation, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, TransferProgress, UploadData, UploadOptions, UploadProgress, WebStorageCacheStore, type WebStorageCacheStoreOptions, authPlugin, cachePlugin, circuitBreakerPlugin, concurrencyPlugin, createClient, downloadPlugin, isRequestError, isSchemaValidationError, loggerPlugin, openTelemetryMetricsPlugin, openTelemetryPlugin, rateLimitPlugin, retryPlugin, uploadPlugin };
7
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-CVgJvxsA.js";
8
+ import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-DxzbF294.js";
9
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-D77O9CVl.js";
10
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-CizobNMf.js";
11
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DexFPPeR.js";
12
+ import { t as loggerPlugin } from "./loggerPlugin-IGqtnWzy.js";
13
+ import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-BeykGhuv.js";
14
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-De76vmwq.js";
15
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-e_IjO32D.js";
16
+ import { t as retryPlugin } from "./retryPlugin-JAQQ0CbN.js";
17
+ import { t as uploadPlugin } from "./uploadPlugin-DdVkxO9B.js";
18
+ export { Adapter, AuthOptions, AuthPluginOptions, AuthTokenStorage, type CacheEntry, type CacheEvent, type CacheEventType, CacheOptions, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, CircuitBreakerOptions, CircuitBreakerPlugin, CircuitBreakerPluginOptions, CircuitBreakerStateChange, CircuitState, Client, ClientOptions, ConcurrencyOptions, ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, DownloadOptions, DownloadOutput, DownloadPluginOptions, DownloadProgress, DownloadTransport, ErrorLogEntry, FetchAdapter, FetchFunction, FetchOptions, HttpMethod, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, Interceptor, InterceptorManager, InterceptorOptions, JsonParser, JsonParserContext, JsonStringifier, LoggerEntry, LoggerOptions, MemoryCacheOptions, MemoryCacheStore, type MemoryCacheStoreOptions, MockAdapter, MockAdapterOptions, MockHandler, MockReply, MockReplyHandler, MockRequestMatcher, MockResponseOptions, MockRoute, MockURLMatcher, NporaResponse, OpenTelemetryAttributeValue, OpenTelemetryContextApi, OpenTelemetryCounter, OpenTelemetryHeaderSetter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsOptions, OpenTelemetryMetricsPluginOptions, OpenTelemetryOptions, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, Plugin, PluginCleanup, PluginContext, PluginError, PluginErrorCode, PluginErrorOptions, PluginHookManager, PluginInterceptorManager, QueryParams, QuerySerializer, QueryValue, RateLimitOptions, RateLimitPlugin, RateLimitPluginOptions, RateLimitState, RequestConfig, RequestError, RequestErrorCode, RequestErrorOptions, RequestExtensions, RequestInputConfig, RequestLogEntry, RequestLogger, RequestURL, ResponseLogEntry, ResponseType, RetryEvent, RetryOptions, SchemaValidationError, ServerSentEvent, SseReconnectOptions, StandardSchemaV1, StreamingSchemaLocation, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, TransferProgress, UploadData, UploadOptions, UploadProgress, WebStorageCacheStore, type WebStorageCacheStoreOptions, authPlugin, cachePlugin, circuitBreakerPlugin, concurrencyPlugin, createClient, downloadPlugin, isRequestError, isSchemaValidationError, loggerPlugin, openTelemetryMetricsPlugin, openTelemetryPlugin, rateLimitPlugin, retryPlugin, uploadPlugin };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{n as e,t}from"./RequestError-B0HIY1zK.js";import{d as n,f as r}from"./validateResponseStatus-DVPM4SHm.js";import{i,n as a,r as o,t as s}from"./createClient-CH1uIslF.js";import{MockAdapter as c}from"./testing.js";import{t as l}from"./PluginError-CcuPSIRv.js";import{authPlugin as u}from"./plugins/auth.js";import{a as d,i as f,n as p,r as m,t as h}from"./cachePlugin-C3FQUhLv.js";import{circuitBreakerPlugin as g}from"./plugins/circuit-breaker.js";import{concurrencyPlugin as _}from"./plugins/concurrency.js";import{downloadPlugin as v}from"./plugins/download.js";import{loggerPlugin as y}from"./plugins/logger.js";import{openTelemetryPlugin as b}from"./plugins/opentelemetry.js";import{openTelemetryMetricsPlugin as x}from"./plugins/opentelemetry-metrics.js";import{t as S}from"./rateLimitPlugin-EyoriWyF.js";import{retryPlugin as C}from"./plugins/retry.js";import{uploadPlugin as w}from"./plugins/upload.js";import"./plugins.js";export{a as Client,i as FetchAdapter,m as IndexedDBCacheStore,o as InterceptorManager,f as MemoryCacheStore,c as MockAdapter,l as PluginError,t as RequestError,n as SchemaValidationError,p as TieredCacheStore,d as WebStorageCacheStore,u as authPlugin,h as cachePlugin,g as circuitBreakerPlugin,_ as concurrencyPlugin,s as createClient,v as downloadPlugin,e as isRequestError,r as isSchemaValidationError,y as loggerPlugin,x as openTelemetryMetricsPlugin,b as openTelemetryPlugin,S as rateLimitPlugin,C as retryPlugin,w as uploadPlugin};
1
+ import{n as e,t}from"./RequestError-B0HIY1zK.js";import{f as n,p as r}from"./validateResponseStatus-CkUhntvh.js";import{i,n as a,r as o,t as s}from"./createClient-BtpOdm47.js";import{MockAdapter as c}from"./testing.js";import{t as l}from"./PluginError-CcuPSIRv.js";import{authPlugin as u}from"./plugins/auth.js";import{a as d,i as f,n as p,r as m,t as h}from"./cachePlugin-C3FQUhLv.js";import{circuitBreakerPlugin as g}from"./plugins/circuit-breaker.js";import{concurrencyPlugin as _}from"./plugins/concurrency.js";import{downloadPlugin as v}from"./plugins/download.js";import{loggerPlugin as y}from"./plugins/logger.js";import{openTelemetryPlugin as b}from"./plugins/opentelemetry.js";import{openTelemetryMetricsPlugin as x}from"./plugins/opentelemetry-metrics.js";import{t as S}from"./rateLimitPlugin-EyoriWyF.js";import{retryPlugin as C}from"./plugins/retry.js";import{uploadPlugin as w}from"./plugins/upload.js";import"./plugins.js";export{a as Client,i as FetchAdapter,m as IndexedDBCacheStore,o as InterceptorManager,f as MemoryCacheStore,c as MockAdapter,l as PluginError,t as RequestError,n as SchemaValidationError,p as TieredCacheStore,d as WebStorageCacheStore,u as authPlugin,h as cachePlugin,g as circuitBreakerPlugin,_ as concurrencyPlugin,s as createClient,v as downloadPlugin,e as isRequestError,r as isSchemaValidationError,y as loggerPlugin,x as openTelemetryMetricsPlugin,b as openTelemetryPlugin,S as rateLimitPlugin,C as retryPlugin,w as uploadPlugin};
@@ -0,0 +1,6 @@
1
+ import { k as LoggerOptions } from "./response-BJacGco5.cjs";
2
+ import { t as Plugin } from "./Plugin-9Z-IZ_NJ.cjs";
3
+ //#region src/plugins/loggerPlugin.d.ts
4
+ declare function loggerPlugin(defaultOptions?: LoggerOptions): Plugin;
5
+ //#endregion
6
+ export { loggerPlugin as t };
@@ -0,0 +1,6 @@
1
+ import { k as LoggerOptions } from "./response-BJacGco5.js";
2
+ import { t as Plugin } from "./Plugin-Dx5Jby_c.js";
3
+ //#region src/plugins/loggerPlugin.d.ts
4
+ declare function loggerPlugin(defaultOptions?: LoggerOptions): Plugin;
5
+ //#endregion
6
+ export { loggerPlugin as t };
@@ -1,5 +1,5 @@
1
- import { A as OpenTelemetryAttributeValue, f as RequestConfig } from "./response-BmBc0r8_.cjs";
2
- import { t as Plugin } from "./Plugin-DYSeSZ6O.cjs";
1
+ import { j as OpenTelemetryAttributeValue, p as RequestConfig } from "./response-BJacGco5.cjs";
2
+ import { t as Plugin } from "./Plugin-9Z-IZ_NJ.cjs";
3
3
  //#region src/plugins/openTelemetryMetricsPlugin.d.ts
4
4
  type OpenTelemetryMetricAttributes = Readonly<Record<string, OpenTelemetryAttributeValue>>;
5
5
  interface OpenTelemetryCounter {
@@ -1,5 +1,5 @@
1
- import { A as OpenTelemetryAttributeValue, f as RequestConfig } from "./response-BmBc0r8_.js";
2
- import { t as Plugin } from "./Plugin-C5P_tBXo.js";
1
+ import { j as OpenTelemetryAttributeValue, p as RequestConfig } from "./response-BJacGco5.js";
2
+ import { t as Plugin } from "./Plugin-Dx5Jby_c.js";
3
3
  //#region src/plugins/openTelemetryMetricsPlugin.d.ts
4
4
  type OpenTelemetryMetricAttributes = Readonly<Record<string, OpenTelemetryAttributeValue>>;
5
5
  interface OpenTelemetryCounter {
@@ -1,5 +1,5 @@
1
- import { A as OpenTelemetryAttributeValue, f as RequestConfig } from "./response-BmBc0r8_.js";
2
- import { t as Plugin } from "./Plugin-C5P_tBXo.js";
1
+ import { j as OpenTelemetryAttributeValue, p as RequestConfig } from "./response-BJacGco5.js";
2
+ import { t as Plugin } from "./Plugin-Dx5Jby_c.js";
3
3
  //#region src/plugins/openTelemetryPlugin.d.ts
4
4
  interface OpenTelemetrySpan {
5
5
  setAttribute(name: string, value: OpenTelemetryAttributeValue): this;
@@ -1,5 +1,5 @@
1
- import { A as OpenTelemetryAttributeValue, f as RequestConfig } from "./response-BmBc0r8_.cjs";
2
- import { t as Plugin } from "./Plugin-DYSeSZ6O.cjs";
1
+ import { j as OpenTelemetryAttributeValue, p as RequestConfig } from "./response-BJacGco5.cjs";
2
+ import { t as Plugin } from "./Plugin-9Z-IZ_NJ.cjs";
3
3
  //#region src/plugins/openTelemetryPlugin.d.ts
4
4
  interface OpenTelemetrySpan {
5
5
  setAttribute(name: string, value: OpenTelemetryAttributeValue): this;
@@ -1,2 +1,2 @@
1
- import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "../authPlugin-DpE4afbz.cjs";
1
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "../authPlugin-BtPHJ7EZ.cjs";
2
2
  export { AuthPluginOptions, AuthTokenStorage, authPlugin };
@@ -1,2 +1,2 @@
1
- import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "../authPlugin-USKx_XNX.js";
1
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "../authPlugin-CVgJvxsA.js";
2
2
  export { AuthPluginOptions, AuthTokenStorage, authPlugin };
@@ -1,2 +1,2 @@
1
- import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "../cachePlugin-DJGfieqN.cjs";
1
+ import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "../cachePlugin-DANU1VAL.cjs";
2
2
  export { type CacheEntry, type CacheEvent, type CacheEventType, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, MemoryCacheStore, type MemoryCacheStoreOptions, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, WebStorageCacheStore, type WebStorageCacheStoreOptions, cachePlugin };
@@ -1,2 +1,2 @@
1
- import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "../cachePlugin-XXrPNTfx.js";
1
+ import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "../cachePlugin-DxzbF294.js";
2
2
  export { type CacheEntry, type CacheEvent, type CacheEventType, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, MemoryCacheStore, type MemoryCacheStoreOptions, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, WebStorageCacheStore, type WebStorageCacheStoreOptions, cachePlugin };
@@ -1,2 +1,2 @@
1
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-tbwS-j5u.cjs";
1
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-DHyLSvdy.cjs";
2
2
  export { CircuitBreakerPlugin, CircuitBreakerPluginOptions, circuitBreakerPlugin };
@@ -1,2 +1,2 @@
1
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-D12NHWon.js";
1
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-D77O9CVl.js";
2
2
  export { CircuitBreakerPlugin, CircuitBreakerPluginOptions, circuitBreakerPlugin };
@@ -1,2 +1,2 @@
1
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "../concurrencyPlugin-Dvsgel94.cjs";
1
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "../concurrencyPlugin-D4YMInT5.cjs";
2
2
  export { ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, concurrencyPlugin };
@@ -1,2 +1,2 @@
1
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "../concurrencyPlugin-W84oJyJP.js";
1
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "../concurrencyPlugin-CizobNMf.js";
2
2
  export { ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, concurrencyPlugin };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../RequestError-DrCr_lwO.cjs"),t=require("../validateResponseStatus-BAkeZ0TD.cjs"),n=require("../isBinaryBody-CdXW3TxQ.cjs"),r=require("../isReadableStream-4C8oyfa_.cjs"),i=require("../resolveExtensionConfig-BHHfQwjF.cjs"),a=require("../xhrTransport-BMPYpFxa.cjs");function downloadPlugin(n={}){let o=new WeakSet;return{name:`download`,install(s){s.interceptors.request.use(e=>{let t=i.t(e,`download`);if(!t)return e;if(resolveDownloadOutput(t.output,e)===`stream`)return validateStreamOutput(n.transport,e),{...e,responseType:`stream`};let r=t.onProgress&&!shouldUseXHR(n.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),s.hooks.onTransport(async t=>{if(t.response)return;let r=i.t(t.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!shouldUseXHR(n.transport))){if(typeof XMLHttpRequest>`u`)throw new e.t(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:t.config});t.response=await a.t(t.config,{onDownloadProgress:s,preserveRaw:t.preserveRaw}),o.add(t)}},{priority:-3e3}),s.hooks.onResponse(async e=>{if(o.has(e))return;let n=e.response;if(!n)return;let a=i.t(n.config,`download`),s=a?.onProgress;if(!a)return;let c=n.data;if(a.output===`stream`){if(c===void 0&&t.r(n.config.method,n.status,n.raw.type)&&(c=createEmptyDownloadStream()),!r.t(c))throw unavailableDownloadStream(n);s&&(e.response={...n,data:monitorDownloadStream(c,n,s)});return}if(!s)return;if(!r.t(c))throw unavailableDownloadStream(n);let l=await consumeDownloadStream(c,n,s);e.response={...n,data:l}},{requiresRawResponse:!1})}}}function createEmptyDownloadStream(){return new ReadableStream({start(e){e.close()}})}function resolveDownloadOutput(t,n){if(t===void 0||t===`blob`)return`blob`;if(t===`stream`)return t;throw new e.t(`Download output must be "blob" or "stream"`,{code:`CONFIG_ERROR`,config:n})}function validateStreamOutput(t,n){if(t===`xhr`)throw new e.t(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!supportsFetchResponseStream())throw new e.t(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function unavailableDownloadStream(t){return new e.t(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:t.status,config:t.config})}function shouldUseXHR(e=`auto`){return e===`xhr`||e!==`fetch`&&!supportsFetchResponseStream()&&typeof XMLHttpRequest<`u`}function supportsFetchResponseStream(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function consumeDownloadStream(e,t,n){let r=e.getReader(),i=[],o=parseContentLength(t.headers.get(`content-length`)),s=a.n(),c=0,l=!1;try{for(;;){let e=await r.read();if(e.done)break;let t=e.value;i.push(toDownloadBuffer(t)),c+=t.byteLength,l=!0,n(s(c,o))}l||n(s(0,o))}catch(e){try{await r.cancel(e)}catch{}throw e}finally{r.releaseLock()}return new Blob(i,{type:t.headers.get(`content-type`)??``})}function monitorDownloadStream(e,t,n){let r=e.getReader(),i=parseContentLength(t.headers.get(`content-length`)),o=a.n(),s=0,c=!1,l=!1,release=()=>{l||(l=!0,r.releaseLock())};return new ReadableStream({async pull(e){try{let t=await r.read();if(t.done){c||n(o(0,i)),release(),e.close();return}s+=t.value.byteLength,c=!0,n(o(s,i)),e.enqueue(t.value)}catch(t){try{await r.cancel(t)}catch{}release(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{release()}}},{highWaterMark:0})}function toDownloadBuffer(e){if(n.t(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}function parseContentLength(e){if(!e)return;let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}exports.downloadPlugin=downloadPlugin;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../RequestError-DrCr_lwO.cjs"),t=require("../validateResponseStatus-DhsoZTyz.cjs"),n=require("../isBinaryBody-CdXW3TxQ.cjs"),r=require("../isReadableStream-4C8oyfa_.cjs"),i=require("../resolveExtensionConfig-BHHfQwjF.cjs"),a=require("../xhrTransport-BoLJnrNS.cjs");function downloadPlugin(n={}){let o=new WeakSet;return{name:`download`,install(s){s.interceptors.request.use(e=>{let t=i.t(e,`download`);if(!t)return e;if(resolveDownloadOutput(t.output,e)===`stream`)return validateStreamOutput(n.transport,e),{...e,responseType:`stream`};let r=t.onProgress&&!shouldUseXHR(n.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),s.hooks.onTransport(async t=>{if(t.response)return;let r=i.t(t.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!shouldUseXHR(n.transport))){if(typeof XMLHttpRequest>`u`)throw new e.t(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:t.config});t.response=await a.t(t.config,{onDownloadProgress:s,preserveRaw:t.preserveRaw}),o.add(t)}},{priority:-3e3}),s.hooks.onResponse(async e=>{if(o.has(e))return;let n=e.response;if(!n)return;let a=i.t(n.config,`download`),s=a?.onProgress;if(!a)return;let c=n.data;if(a.output===`stream`){if(c===void 0&&t.r(n.config.method,n.status,n.raw.type)&&(c=createEmptyDownloadStream()),!r.t(c))throw unavailableDownloadStream(n);s&&(e.response={...n,data:monitorDownloadStream(c,n,s)});return}if(!s)return;if(!r.t(c))throw unavailableDownloadStream(n);let l=await consumeDownloadStream(c,n,s);e.response={...n,data:l}},{requiresRawResponse:!1})}}}function createEmptyDownloadStream(){return new ReadableStream({start(e){e.close()}})}function resolveDownloadOutput(t,n){if(t===void 0||t===`blob`)return`blob`;if(t===`stream`)return t;throw new e.t(`Download output must be "blob" or "stream"`,{code:`CONFIG_ERROR`,config:n})}function validateStreamOutput(t,n){if(t===`xhr`)throw new e.t(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!supportsFetchResponseStream())throw new e.t(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function unavailableDownloadStream(t){return new e.t(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:t.status,config:t.config})}function shouldUseXHR(e=`auto`){return e===`xhr`||e!==`fetch`&&!supportsFetchResponseStream()&&typeof XMLHttpRequest<`u`}function supportsFetchResponseStream(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function consumeDownloadStream(e,t,n){let r=e.getReader(),i=[],o=parseContentLength(t.headers.get(`content-length`)),s=a.n(),c=0,l=!1;try{for(;;){let e=await r.read();if(e.done)break;let t=e.value;i.push(toDownloadBuffer(t)),c+=t.byteLength,l=!0,n(s(c,o))}l||n(s(0,o))}catch(e){try{await r.cancel(e)}catch{}throw e}finally{r.releaseLock()}return new Blob(i,{type:t.headers.get(`content-type`)??``})}function monitorDownloadStream(e,t,n){let r=e.getReader(),i=parseContentLength(t.headers.get(`content-length`)),o=a.n(),s=0,c=!1,l=!1,release=()=>{l||(l=!0,r.releaseLock())};return new ReadableStream({async pull(e){try{let t=await r.read();if(t.done){c||n(o(0,i)),release(),e.close();return}s+=t.value.byteLength,c=!0,n(o(s,i)),e.enqueue(t.value)}catch(t){try{await r.cancel(t)}catch{}release(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{release()}}},{highWaterMark:0})}function toDownloadBuffer(e){if(n.t(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}function parseContentLength(e){if(!e)return;let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}exports.downloadPlugin=downloadPlugin;
@@ -1,2 +1,2 @@
1
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-DJDuMLwT.cjs";
1
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-C4ugCtc1.cjs";
2
2
  export { DownloadPluginOptions, DownloadTransport, downloadPlugin };
@@ -1,2 +1,2 @@
1
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-DjCZgsVL.js";
1
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-DexFPPeR.js";
2
2
  export { DownloadPluginOptions, DownloadTransport, downloadPlugin };
@@ -1 +1 @@
1
- import{t as e}from"../RequestError-B0HIY1zK.js";import{r as t}from"../validateResponseStatus-DVPM4SHm.js";import{t as n}from"../isBinaryBody-C7V7uzZ6.js";import{t as r}from"../isReadableStream-CRq9INpv.js";import{t as i}from"../resolveExtensionConfig-QAFHZVte.js";import{n as a,t as o}from"../xhrTransport-Dpn15mjV.js";function downloadPlugin(n={}){let a=new WeakSet;return{name:`download`,install(s){s.interceptors.request.use(e=>{let t=i(e,`download`);if(!t)return e;if(resolveDownloadOutput(t.output,e)===`stream`)return validateStreamOutput(n.transport,e),{...e,responseType:`stream`};let r=t.onProgress&&!shouldUseXHR(n.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),s.hooks.onTransport(async t=>{if(t.response)return;let r=i(t.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!shouldUseXHR(n.transport))){if(typeof XMLHttpRequest>`u`)throw new e(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:t.config});t.response=await o(t.config,{onDownloadProgress:s,preserveRaw:t.preserveRaw}),a.add(t)}},{priority:-3e3}),s.hooks.onResponse(async e=>{if(a.has(e))return;let n=e.response;if(!n)return;let o=i(n.config,`download`),s=o?.onProgress;if(!o)return;let c=n.data;if(o.output===`stream`){if(c===void 0&&t(n.config.method,n.status,n.raw.type)&&(c=createEmptyDownloadStream()),!r(c))throw unavailableDownloadStream(n);s&&(e.response={...n,data:monitorDownloadStream(c,n,s)});return}if(!s)return;if(!r(c))throw unavailableDownloadStream(n);let l=await consumeDownloadStream(c,n,s);e.response={...n,data:l}},{requiresRawResponse:!1})}}}function createEmptyDownloadStream(){return new ReadableStream({start(e){e.close()}})}function resolveDownloadOutput(t,n){if(t===void 0||t===`blob`)return`blob`;if(t===`stream`)return t;throw new e(`Download output must be "blob" or "stream"`,{code:`CONFIG_ERROR`,config:n})}function validateStreamOutput(t,n){if(t===`xhr`)throw new e(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!supportsFetchResponseStream())throw new e(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function unavailableDownloadStream(t){return new e(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:t.status,config:t.config})}function shouldUseXHR(e=`auto`){return e===`xhr`||e!==`fetch`&&!supportsFetchResponseStream()&&typeof XMLHttpRequest<`u`}function supportsFetchResponseStream(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function consumeDownloadStream(e,t,n){let r=e.getReader(),i=[],o=parseContentLength(t.headers.get(`content-length`)),s=a(),c=0,l=!1;try{for(;;){let e=await r.read();if(e.done)break;let t=e.value;i.push(toDownloadBuffer(t)),c+=t.byteLength,l=!0,n(s(c,o))}l||n(s(0,o))}catch(e){try{await r.cancel(e)}catch{}throw e}finally{r.releaseLock()}return new Blob(i,{type:t.headers.get(`content-type`)??``})}function monitorDownloadStream(e,t,n){let r=e.getReader(),i=parseContentLength(t.headers.get(`content-length`)),o=a(),s=0,c=!1,l=!1,release=()=>{l||(l=!0,r.releaseLock())};return new ReadableStream({async pull(e){try{let t=await r.read();if(t.done){c||n(o(0,i)),release(),e.close();return}s+=t.value.byteLength,c=!0,n(o(s,i)),e.enqueue(t.value)}catch(t){try{await r.cancel(t)}catch{}release(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{release()}}},{highWaterMark:0})}function toDownloadBuffer(e){if(n(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}function parseContentLength(e){if(!e)return;let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}export{downloadPlugin};
1
+ import{t as e}from"../RequestError-B0HIY1zK.js";import{r as t}from"../validateResponseStatus-CkUhntvh.js";import{t as n}from"../isBinaryBody-C7V7uzZ6.js";import{t as r}from"../isReadableStream-CRq9INpv.js";import{t as i}from"../resolveExtensionConfig-QAFHZVte.js";import{n as a,t as o}from"../xhrTransport-DiFlcZRG.js";function downloadPlugin(n={}){let a=new WeakSet;return{name:`download`,install(s){s.interceptors.request.use(e=>{let t=i(e,`download`);if(!t)return e;if(resolveDownloadOutput(t.output,e)===`stream`)return validateStreamOutput(n.transport,e),{...e,responseType:`stream`};let r=t.onProgress&&!shouldUseXHR(n.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),s.hooks.onTransport(async t=>{if(t.response)return;let r=i(t.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!shouldUseXHR(n.transport))){if(typeof XMLHttpRequest>`u`)throw new e(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:t.config});t.response=await o(t.config,{onDownloadProgress:s,preserveRaw:t.preserveRaw}),a.add(t)}},{priority:-3e3}),s.hooks.onResponse(async e=>{if(a.has(e))return;let n=e.response;if(!n)return;let o=i(n.config,`download`),s=o?.onProgress;if(!o)return;let c=n.data;if(o.output===`stream`){if(c===void 0&&t(n.config.method,n.status,n.raw.type)&&(c=createEmptyDownloadStream()),!r(c))throw unavailableDownloadStream(n);s&&(e.response={...n,data:monitorDownloadStream(c,n,s)});return}if(!s)return;if(!r(c))throw unavailableDownloadStream(n);let l=await consumeDownloadStream(c,n,s);e.response={...n,data:l}},{requiresRawResponse:!1})}}}function createEmptyDownloadStream(){return new ReadableStream({start(e){e.close()}})}function resolveDownloadOutput(t,n){if(t===void 0||t===`blob`)return`blob`;if(t===`stream`)return t;throw new e(`Download output must be "blob" or "stream"`,{code:`CONFIG_ERROR`,config:n})}function validateStreamOutput(t,n){if(t===`xhr`)throw new e(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!supportsFetchResponseStream())throw new e(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function unavailableDownloadStream(t){return new e(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:t.status,config:t.config})}function shouldUseXHR(e=`auto`){return e===`xhr`||e!==`fetch`&&!supportsFetchResponseStream()&&typeof XMLHttpRequest<`u`}function supportsFetchResponseStream(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function consumeDownloadStream(e,t,n){let r=e.getReader(),i=[],o=parseContentLength(t.headers.get(`content-length`)),s=a(),c=0,l=!1;try{for(;;){let e=await r.read();if(e.done)break;let t=e.value;i.push(toDownloadBuffer(t)),c+=t.byteLength,l=!0,n(s(c,o))}l||n(s(0,o))}catch(e){try{await r.cancel(e)}catch{}throw e}finally{r.releaseLock()}return new Blob(i,{type:t.headers.get(`content-type`)??``})}function monitorDownloadStream(e,t,n){let r=e.getReader(),i=parseContentLength(t.headers.get(`content-length`)),o=a(),s=0,c=!1,l=!1,release=()=>{l||(l=!0,r.releaseLock())};return new ReadableStream({async pull(e){try{let t=await r.read();if(t.done){c||n(o(0,i)),release(),e.close();return}s+=t.value.byteLength,c=!0,n(o(s,i)),e.enqueue(t.value)}catch(t){try{await r.cancel(t)}catch{}release(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{release()}}},{highWaterMark:0})}function toDownloadBuffer(e){if(n(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}function parseContentLength(e){if(!e)return;let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}export{downloadPlugin};
@@ -1,2 +1,2 @@
1
- import { t as loggerPlugin } from "../loggerPlugin-DZlxRUT0.cjs";
1
+ import { t as loggerPlugin } from "../loggerPlugin-CSWyHhxS.cjs";
2
2
  export { loggerPlugin };
@@ -1,2 +1,2 @@
1
- import { t as loggerPlugin } from "../loggerPlugin-DFIXW1B1.js";
1
+ import { t as loggerPlugin } from "../loggerPlugin-IGqtnWzy.js";
2
2
  export { loggerPlugin };
@@ -1,4 +1,4 @@
1
- import { t as Plugin } from "../Plugin-DYSeSZ6O.cjs";
1
+ import { t as Plugin } from "../Plugin-9Z-IZ_NJ.cjs";
2
2
  //#region src/plugins/memoryCachePlugin.d.ts
3
3
  interface MemoryCachePluginOptions {
4
4
  /** Default lifetime in milliseconds. @default 30000 */
@@ -1,4 +1,4 @@
1
- import { t as Plugin } from "../Plugin-C5P_tBXo.js";
1
+ import { t as Plugin } from "../Plugin-Dx5Jby_c.js";
2
2
  //#region src/plugins/memoryCachePlugin.d.ts
3
3
  interface MemoryCachePluginOptions {
4
4
  /** Default lifetime in milliseconds. @default 30000 */
@@ -1,2 +1,2 @@
1
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "../openTelemetryMetricsPlugin-BqUiYPda.cjs";
1
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "../openTelemetryMetricsPlugin-BtO0nwPY.cjs";
2
2
  export { OpenTelemetryCounter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsPluginOptions, openTelemetryMetricsPlugin };
@@ -1,2 +1,2 @@
1
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "../openTelemetryMetricsPlugin-0UQ5jqvv.js";
1
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "../openTelemetryMetricsPlugin-De76vmwq.js";
2
2
  export { OpenTelemetryCounter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsPluginOptions, openTelemetryMetricsPlugin };
@@ -1,2 +1,2 @@
1
- import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "../openTelemetryPlugin-Cuap7zKx.cjs";
1
+ import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "../openTelemetryPlugin-DX-5cpbR.cjs";
2
2
  export { OpenTelemetryContextApi, OpenTelemetryHeaderSetter, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, openTelemetryPlugin };
@@ -1,2 +1,2 @@
1
- import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "../openTelemetryPlugin-w3t3yoCr.js";
1
+ import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "../openTelemetryPlugin-BeykGhuv.js";
2
2
  export { OpenTelemetryContextApi, OpenTelemetryHeaderSetter, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, openTelemetryPlugin };
@@ -1,2 +1,2 @@
1
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "../rateLimitPlugin-KOSUTbvE.cjs";
1
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "../rateLimitPlugin-C357f6EC.cjs";
2
2
  export { RateLimitPlugin, RateLimitPluginOptions, RateLimitState, rateLimitPlugin };
@@ -1,2 +1,2 @@
1
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "../rateLimitPlugin-cU0qI8TH.js";
1
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "../rateLimitPlugin-e_IjO32D.js";
2
2
  export { RateLimitPlugin, RateLimitPluginOptions, RateLimitState, rateLimitPlugin };
@@ -1,2 +1,2 @@
1
- import { t as retryPlugin } from "../retryPlugin-Ir1VPUHq.cjs";
1
+ import { t as retryPlugin } from "../retryPlugin-lpF9dskF.cjs";
2
2
  export { retryPlugin };
@@ -1,2 +1,2 @@
1
- import { t as retryPlugin } from "../retryPlugin-Df4T3WEv.js";
1
+ import { t as retryPlugin } from "../retryPlugin-JAQQ0CbN.js";
2
2
  export { retryPlugin };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../RequestError-DrCr_lwO.cjs"),t=require("../resolveExtensionConfig-BHHfQwjF.cjs"),n=require("../xhrTransport-BMPYpFxa.cjs");function uploadPlugin(){return{name:`upload`,install(r){r.interceptors.request.use(e=>{let n=t.t(e,`upload`);return n?{...e,method:e.method??`POST`,formData:n.data}:e}),r.hooks.onTransport(async r=>{if(r.response)return;let i=t.t(r.config,`upload`);if(i?.onProgress){if(typeof XMLHttpRequest>`u`)throw new e.t(`XMLHttpRequest is unavailable for upload progress`,{code:`CONFIG_ERROR`,config:r.config});r.response=await n.t(r.config,{onUploadProgress:i.onProgress,preserveRaw:r.preserveRaw})}})}}}exports.uploadPlugin=uploadPlugin;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../RequestError-DrCr_lwO.cjs"),t=require("../resolveExtensionConfig-BHHfQwjF.cjs"),n=require("../xhrTransport-BoLJnrNS.cjs");function uploadPlugin(){return{name:`upload`,install(r){r.interceptors.request.use(e=>{let n=t.t(e,`upload`);return n?{...e,method:e.method??`POST`,formData:n.data}:e}),r.hooks.onTransport(async r=>{if(r.response)return;let i=t.t(r.config,`upload`);if(i?.onProgress){if(typeof XMLHttpRequest>`u`)throw new e.t(`XMLHttpRequest is unavailable for upload progress`,{code:`CONFIG_ERROR`,config:r.config});r.response=await n.t(r.config,{onUploadProgress:i.onProgress,preserveRaw:r.preserveRaw})}})}}}exports.uploadPlugin=uploadPlugin;
@@ -1,2 +1,2 @@
1
- import { t as uploadPlugin } from "../uploadPlugin-CAHUGiz4.cjs";
1
+ import { t as uploadPlugin } from "../uploadPlugin-Db0fMNLg.cjs";
2
2
  export { uploadPlugin };
@@ -1,2 +1,2 @@
1
- import { t as uploadPlugin } from "../uploadPlugin-C8CgYCKh.js";
1
+ import { t as uploadPlugin } from "../uploadPlugin-DdVkxO9B.js";
2
2
  export { uploadPlugin };
@@ -1 +1 @@
1
- import{t as e}from"../RequestError-B0HIY1zK.js";import{t}from"../resolveExtensionConfig-QAFHZVte.js";import{t as n}from"../xhrTransport-Dpn15mjV.js";function uploadPlugin(){return{name:`upload`,install(r){r.interceptors.request.use(e=>{let n=t(e,`upload`);return n?{...e,method:e.method??`POST`,formData:n.data}:e}),r.hooks.onTransport(async r=>{if(r.response)return;let i=t(r.config,`upload`);if(i?.onProgress){if(typeof XMLHttpRequest>`u`)throw new e(`XMLHttpRequest is unavailable for upload progress`,{code:`CONFIG_ERROR`,config:r.config});r.response=await n(r.config,{onUploadProgress:i.onProgress,preserveRaw:r.preserveRaw})}})}}}export{uploadPlugin};
1
+ import{t as e}from"../RequestError-B0HIY1zK.js";import{t}from"../resolveExtensionConfig-QAFHZVte.js";import{t as n}from"../xhrTransport-DiFlcZRG.js";function uploadPlugin(){return{name:`upload`,install(r){r.interceptors.request.use(e=>{let n=t(e,`upload`);return n?{...e,method:e.method??`POST`,formData:n.data}:e}),r.hooks.onTransport(async r=>{if(r.response)return;let i=t(r.config,`upload`);if(i?.onProgress){if(typeof XMLHttpRequest>`u`)throw new e(`XMLHttpRequest is unavailable for upload progress`,{code:`CONFIG_ERROR`,config:r.config});r.response=await n(r.config,{onUploadProgress:i.onProgress,preserveRaw:r.preserveRaw})}})}}}export{uploadPlugin};
@@ -1,14 +1,14 @@
1
- import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-DYSeSZ6O.cjs";
1
+ import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-9Z-IZ_NJ.cjs";
2
2
  import { n as PluginErrorCode, r as PluginErrorOptions, t as PluginError } from "./PluginError-DVP3pUt_.cjs";
3
- import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-DpE4afbz.cjs";
4
- import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-DJGfieqN.cjs";
5
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-tbwS-j5u.cjs";
6
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-Dvsgel94.cjs";
7
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DJDuMLwT.cjs";
8
- import { t as loggerPlugin } from "./loggerPlugin-DZlxRUT0.cjs";
9
- import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-Cuap7zKx.cjs";
10
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-BqUiYPda.cjs";
11
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-KOSUTbvE.cjs";
12
- import { t as retryPlugin } from "./retryPlugin-Ir1VPUHq.cjs";
13
- import { t as uploadPlugin } from "./uploadPlugin-CAHUGiz4.cjs";
3
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-BtPHJ7EZ.cjs";
4
+ import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-DANU1VAL.cjs";
5
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-DHyLSvdy.cjs";
6
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-D4YMInT5.cjs";
7
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-C4ugCtc1.cjs";
8
+ import { t as loggerPlugin } from "./loggerPlugin-CSWyHhxS.cjs";
9
+ import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-DX-5cpbR.cjs";
10
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-BtO0nwPY.cjs";
11
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-C357f6EC.cjs";
12
+ import { t as retryPlugin } from "./retryPlugin-lpF9dskF.cjs";
13
+ import { t as uploadPlugin } from "./uploadPlugin-Db0fMNLg.cjs";
14
14
  export { AuthPluginOptions, AuthTokenStorage, type CacheEntry, type CacheEvent, type CacheEventType, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, CircuitBreakerPlugin, CircuitBreakerPluginOptions, ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, DownloadPluginOptions, DownloadTransport, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, MemoryCacheStore, type MemoryCacheStoreOptions, OpenTelemetryContextApi, OpenTelemetryCounter, OpenTelemetryHeaderSetter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsPluginOptions, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, Plugin, PluginCleanup, PluginContext, PluginError, PluginErrorCode, PluginErrorOptions, PluginHookManager, PluginInterceptorManager, RateLimitPlugin, RateLimitPluginOptions, RateLimitState, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, WebStorageCacheStore, type WebStorageCacheStoreOptions, authPlugin, cachePlugin, circuitBreakerPlugin, concurrencyPlugin, downloadPlugin, loggerPlugin, openTelemetryMetricsPlugin, openTelemetryPlugin, rateLimitPlugin, retryPlugin, uploadPlugin };
package/dist/plugins.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-C5P_tBXo.js";
1
+ import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-Dx5Jby_c.js";
2
2
  import { n as PluginErrorCode, r as PluginErrorOptions, t as PluginError } from "./PluginError-DVP3pUt_.js";
3
- import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-USKx_XNX.js";
4
- import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-XXrPNTfx.js";
5
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-D12NHWon.js";
6
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-W84oJyJP.js";
7
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DjCZgsVL.js";
8
- import { t as loggerPlugin } from "./loggerPlugin-DFIXW1B1.js";
9
- import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-w3t3yoCr.js";
10
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-0UQ5jqvv.js";
11
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-cU0qI8TH.js";
12
- import { t as retryPlugin } from "./retryPlugin-Df4T3WEv.js";
13
- import { t as uploadPlugin } from "./uploadPlugin-C8CgYCKh.js";
3
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-CVgJvxsA.js";
4
+ import { C as WebStorageCacheStore, S as MemoryCacheStoreOptions, _ as CacheStats, a as TieredCacheStoreOptions, b as CacheStore, c as IndexedDBCacheCompactionResult, d as IndexedDBCacheUsage, f as CacheEvent, g as CacheSetOptions, h as CachePluginOptions, i as TieredCacheStore, l as IndexedDBCacheStoreEvent, m as CachePlugin, n as TieredCacheBroadcastOptions, o as IndexedDBCacheStore, p as CacheEventType, r as TieredCacheCoordinationOptions, s as IndexedDBCacheCompactionOptions, t as cachePlugin, u as IndexedDBCacheStoreOptions, v as CacheEntry, w as WebStorageCacheStoreOptions, x as MemoryCacheStore, y as CacheRefreshLease } from "./cachePlugin-DxzbF294.js";
5
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-D77O9CVl.js";
6
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-CizobNMf.js";
7
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DexFPPeR.js";
8
+ import { t as loggerPlugin } from "./loggerPlugin-IGqtnWzy.js";
9
+ import { a as OpenTelemetrySpan, c as openTelemetryPlugin, i as OpenTelemetryPropagationApi, n as OpenTelemetryHeaderSetter, o as OpenTelemetryTraceApi, r as OpenTelemetryPluginOptions, s as OpenTelemetryTracer, t as OpenTelemetryContextApi } from "./openTelemetryPlugin-BeykGhuv.js";
10
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-De76vmwq.js";
11
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-e_IjO32D.js";
12
+ import { t as retryPlugin } from "./retryPlugin-JAQQ0CbN.js";
13
+ import { t as uploadPlugin } from "./uploadPlugin-DdVkxO9B.js";
14
14
  export { AuthPluginOptions, AuthTokenStorage, type CacheEntry, type CacheEvent, type CacheEventType, type CachePlugin, type CachePluginOptions, type CacheRefreshLease, type CacheSetOptions, type CacheStats, type CacheStore, CircuitBreakerPlugin, CircuitBreakerPluginOptions, ConcurrencyPlugin, ConcurrencyPluginOptions, ConcurrencyState, DownloadPluginOptions, DownloadTransport, type IndexedDBCacheCompactionOptions, type IndexedDBCacheCompactionResult, IndexedDBCacheStore, type IndexedDBCacheStoreEvent, type IndexedDBCacheStoreOptions, type IndexedDBCacheUsage, MemoryCacheStore, type MemoryCacheStoreOptions, OpenTelemetryContextApi, OpenTelemetryCounter, OpenTelemetryHeaderSetter, OpenTelemetryHistogram, OpenTelemetryMeter, OpenTelemetryMetricAttributes, OpenTelemetryMetricsPluginOptions, OpenTelemetryPluginOptions, OpenTelemetryPropagationApi, OpenTelemetrySpan, OpenTelemetryTraceApi, OpenTelemetryTracer, Plugin, PluginCleanup, PluginContext, PluginError, PluginErrorCode, PluginErrorOptions, PluginHookManager, PluginInterceptorManager, RateLimitPlugin, RateLimitPluginOptions, RateLimitState, type TieredCacheBroadcastOptions, type TieredCacheCoordinationOptions, TieredCacheStore, type TieredCacheStoreOptions, WebStorageCacheStore, type WebStorageCacheStoreOptions, authPlugin, cachePlugin, circuitBreakerPlugin, concurrencyPlugin, downloadPlugin, loggerPlugin, openTelemetryMetricsPlugin, openTelemetryPlugin, rateLimitPlugin, retryPlugin, uploadPlugin };
@@ -1,5 +1,5 @@
1
- import { f as RequestConfig } from "./response-BmBc0r8_.cjs";
2
- import { t as Plugin } from "./Plugin-DYSeSZ6O.cjs";
1
+ import { p as RequestConfig } from "./response-BJacGco5.cjs";
2
+ import { t as Plugin } from "./Plugin-9Z-IZ_NJ.cjs";
3
3
  //#region src/plugins/rateLimitPlugin.d.ts
4
4
  interface RateLimitPluginOptions {
5
5
  /** Maximum transport attempts admitted during each rolling interval. */
@@ -1,5 +1,5 @@
1
- import { f as RequestConfig } from "./response-BmBc0r8_.js";
2
- import { t as Plugin } from "./Plugin-C5P_tBXo.js";
1
+ import { p as RequestConfig } from "./response-BJacGco5.js";
2
+ import { t as Plugin } from "./Plugin-Dx5Jby_c.js";
3
3
  //#region src/plugins/rateLimitPlugin.d.ts
4
4
  interface RateLimitPluginOptions {
5
5
  /** Maximum transport attempts admitted during each rolling interval. */
@@ -529,6 +529,15 @@ interface ServerSentEvent {
529
529
  */
530
530
  retry?: number;
531
531
  }
532
+ /** Bounded reconnection for an SSE async iterable. */
533
+ interface SseReconnectOptions {
534
+ /** Maximum number of new connections after the initial response. */
535
+ maxAttempts: number;
536
+ /** Delay between connections in milliseconds, unless the server supplies retry. */
537
+ delay?: number;
538
+ /** Upper bound for the server supplied retry delay, in milliseconds. */
539
+ maxDelay?: number;
540
+ }
532
541
  /** Location of an item that failed validation in a streaming response. */
533
542
  interface StreamingSchemaLocation {
534
543
  /** Zero-based index among emitted SSE events or non-empty NDJSON records. */
@@ -570,4 +579,4 @@ interface NporaResponse<T = unknown> {
570
579
  raw: Response;
571
580
  }
572
581
  //#endregion
573
- export { OpenTelemetryAttributeValue as A, UploadData as B, DownloadOptions as C, LoggerEntry as D, ErrorLogEntry as E, RequestLogger as F, UploadProgress as H, ResponseLogEntry as I, RetryEvent as L, OpenTelemetryOptions as M, RateLimitOptions as N, LoggerOptions as O, RequestLogEntry as P, RetryOptions as R, ConcurrencyOptions as S, DownloadProgress as T, StandardSchemaV1 as U, UploadOptions as V, HttpMethod as W, AuthOptions as _, FetchOptions as a, CircuitBreakerStateChange as b, JsonStringifier as c, QueryValue as d, RequestConfig as f, ResponseType as g, RequestURL as h, FetchFunction as i, OpenTelemetryMetricsOptions as j, MemoryCacheOptions as k, QueryParams as l, RequestInputConfig as m, ServerSentEvent as n, JsonParser as o, RequestExtensions as p, StreamingSchemaLocation as r, JsonParserContext as s, NporaResponse as t, QuerySerializer as u, CacheOptions as v, DownloadOutput as w, CircuitState as x, CircuitBreakerOptions as y, TransferProgress as z };
582
+ export { MemoryCacheOptions as A, TransferProgress as B, ConcurrencyOptions as C, ErrorLogEntry as D, DownloadProgress as E, RequestLogEntry as F, HttpMethod as G, UploadOptions as H, RequestLogger as I, ResponseLogEntry as L, OpenTelemetryMetricsOptions as M, OpenTelemetryOptions as N, LoggerEntry as O, RateLimitOptions as P, RetryEvent as R, CircuitState as S, DownloadOutput as T, UploadProgress as U, UploadData as V, StandardSchemaV1 as W, ResponseType as _, FetchFunction as a, CircuitBreakerOptions as b, JsonParserContext as c, QuerySerializer as d, QueryValue as f, RequestURL as g, RequestInputConfig as h, StreamingSchemaLocation as i, OpenTelemetryAttributeValue as j, LoggerOptions as k, JsonStringifier as l, RequestExtensions as m, ServerSentEvent as n, FetchOptions as o, RequestConfig as p, SseReconnectOptions as r, JsonParser as s, NporaResponse as t, QueryParams as u, AuthOptions as v, DownloadOptions as w, CircuitBreakerStateChange as x, CacheOptions as y, RetryOptions as z };