@npora/request 1.20.2 → 1.21.1

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 (100) hide show
  1. package/README.md +8 -2
  2. package/dist/{MockAdapter-DS80lrWx.d.cts → MockAdapter-CDWlJKqY.d.cts} +2 -2
  3. package/dist/{MockAdapter-6MdaHStI.d.ts → MockAdapter-Hi5uqQ8K.d.ts} +2 -2
  4. package/dist/{Plugin-BvvTFwQj.d.ts → Plugin-BG4NQC3T.d.ts} +1 -1
  5. package/dist/{Plugin-LFR-Mb-u.d.cts → Plugin-CCFavD-_.d.cts} +1 -1
  6. package/dist/{SchemaValidationError-erxAaNjo.d.ts → SchemaValidationError-D-Bg0Wc9.d.ts} +9 -5
  7. package/dist/{SchemaValidationError-D5T7agcb.d.cts → SchemaValidationError-DV3aqGe0.d.cts} +9 -5
  8. package/dist/{adapter-DkVzG4v_.d.ts → adapter-CcfItVkl.d.ts} +1 -1
  9. package/dist/{adapter-C6IM9_f3.d.cts → adapter-Cq9y_Fww.d.cts} +1 -1
  10. package/dist/{authPlugin-JZQ0ISdH.d.ts → authPlugin-DRCFibHZ.d.ts} +1 -1
  11. package/dist/{authPlugin-C-JOJhQ9.d.cts → authPlugin-DWpsWoVD.d.cts} +1 -1
  12. package/dist/{cachePlugin-LkXinWXp.js → cachePlugin-BGfwCJRI.js} +1 -1
  13. package/dist/{cachePlugin-wCADcVdJ.d.cts → cachePlugin-BlsRZKN2.d.cts} +2 -2
  14. package/dist/{cachePlugin-C5ge5iH6.cjs → cachePlugin-C9gu5JD0.cjs} +1 -1
  15. package/dist/{cachePlugin-DI1tXJPk.d.ts → cachePlugin-D2ONW9sl.d.ts} +2 -2
  16. package/dist/{circuitBreakerPlugin-Ch8uc67V.d.cts → circuitBreakerPlugin-BL5Pxslz.d.cts} +2 -2
  17. package/dist/{circuitBreakerPlugin-BA-Fb4e0.d.ts → circuitBreakerPlugin-DUyVrQlA.d.ts} +2 -2
  18. package/dist/{concurrencyPlugin-IDGEoShG.d.cts → concurrencyPlugin-DId5qkk9.d.cts} +2 -2
  19. package/dist/{concurrencyPlugin-DgiZSKYy.d.ts → concurrencyPlugin-DM66h5PD.d.ts} +2 -2
  20. package/dist/core.cjs +1 -1
  21. package/dist/core.d.cts +6 -5
  22. package/dist/core.d.ts +6 -5
  23. package/dist/core.js +1 -1
  24. package/dist/createClient-BttEtWHl.js +1 -0
  25. package/dist/createClient-CFKHM4wT.cjs +1 -0
  26. package/dist/{downloadPlugin-TkaOEp9I.d.ts → downloadPlugin-BY3BVNw4.d.ts} +1 -1
  27. package/dist/{downloadPlugin-CDBxyGy8.d.cts → downloadPlugin-DtOzKGt_.d.cts} +1 -1
  28. package/dist/errorResponseTimeout-BEEJV0xA.js +5 -0
  29. package/dist/errorResponseTimeout-zXdbsbDE.cjs +5 -0
  30. package/dist/index.cjs +1 -1
  31. package/dist/index.d.cts +18 -17
  32. package/dist/index.d.ts +18 -17
  33. package/dist/index.js +1 -1
  34. package/dist/loggerPlugin-ChJJN0ZA.d.ts +6 -0
  35. package/dist/loggerPlugin-DDEGhC31.d.cts +6 -0
  36. package/dist/{openTelemetryMetricsPlugin-BSlh7PDU.d.ts → openTelemetryMetricsPlugin-BEoeRl3q.d.ts} +2 -2
  37. package/dist/{openTelemetryMetricsPlugin-CAAyfWw-.d.cts → openTelemetryMetricsPlugin-DuF9OWoT.d.cts} +2 -2
  38. package/dist/{openTelemetryPlugin-hAAiIVka.d.ts → openTelemetryPlugin-DOhBE_uZ.d.ts} +2 -2
  39. package/dist/{openTelemetryPlugin-CWgLyQQV.d.cts → openTelemetryPlugin-Dpz6-bEj.d.cts} +2 -2
  40. package/dist/plugins/auth.d.cts +1 -1
  41. package/dist/plugins/auth.d.ts +1 -1
  42. package/dist/plugins/cache.cjs +1 -1
  43. package/dist/plugins/cache.d.cts +1 -1
  44. package/dist/plugins/cache.d.ts +1 -1
  45. package/dist/plugins/cache.js +1 -1
  46. package/dist/plugins/circuit-breaker.d.cts +1 -1
  47. package/dist/plugins/circuit-breaker.d.ts +1 -1
  48. package/dist/plugins/concurrency.d.cts +1 -1
  49. package/dist/plugins/concurrency.d.ts +1 -1
  50. package/dist/plugins/download.cjs +1 -1
  51. package/dist/plugins/download.d.cts +1 -1
  52. package/dist/plugins/download.d.ts +1 -1
  53. package/dist/plugins/download.js +1 -1
  54. package/dist/plugins/logger.d.cts +1 -1
  55. package/dist/plugins/logger.d.ts +1 -1
  56. package/dist/plugins/memory-cache.d.cts +1 -1
  57. package/dist/plugins/memory-cache.d.ts +1 -1
  58. package/dist/plugins/opentelemetry-metrics.d.cts +1 -1
  59. package/dist/plugins/opentelemetry-metrics.d.ts +1 -1
  60. package/dist/plugins/opentelemetry.d.cts +1 -1
  61. package/dist/plugins/opentelemetry.d.ts +1 -1
  62. package/dist/plugins/rate-limit.d.cts +1 -1
  63. package/dist/plugins/rate-limit.d.ts +1 -1
  64. package/dist/plugins/retry.d.cts +1 -1
  65. package/dist/plugins/retry.d.ts +1 -1
  66. package/dist/plugins/upload.cjs +1 -1
  67. package/dist/plugins/upload.d.cts +1 -1
  68. package/dist/plugins/upload.d.ts +1 -1
  69. package/dist/plugins/upload.js +1 -1
  70. package/dist/plugins.cjs +1 -1
  71. package/dist/plugins.d.cts +12 -12
  72. package/dist/plugins.d.ts +12 -12
  73. package/dist/plugins.js +1 -1
  74. package/dist/{rateLimitPlugin-BUkgrdXu.d.cts → rateLimitPlugin-CRpne4Qz.d.cts} +2 -2
  75. package/dist/{rateLimitPlugin-B5a7LKCy.d.ts → rateLimitPlugin-Ce3bjrRw.d.ts} +2 -2
  76. package/dist/{response-LhB9NRBw.d.cts → response-BhOBjarL.d.ts} +5 -44
  77. package/dist/{response-LhB9NRBw.d.ts → response-CXF5lNlw.d.cts} +5 -44
  78. package/dist/retryPlugin-5vYHV92i.d.ts +6 -0
  79. package/dist/retryPlugin-uC02f2sm.d.cts +6 -0
  80. package/dist/schema-errors.cjs +1 -0
  81. package/dist/schema-errors.d.cts +12 -0
  82. package/dist/schema-errors.d.ts +12 -0
  83. package/dist/schema-errors.js +1 -0
  84. package/dist/standardSchema-CjWI0T2o.d.cts +44 -0
  85. package/dist/standardSchema-CjWI0T2o.d.ts +44 -0
  86. package/dist/testing.d.cts +1 -1
  87. package/dist/testing.d.ts +1 -1
  88. package/dist/{uploadPlugin-BUH9XZoy.d.ts → uploadPlugin-CNdvddnT.d.ts} +1 -1
  89. package/dist/{uploadPlugin-ZP-i_dac.d.cts → uploadPlugin-_xtlBLNY.d.cts} +1 -1
  90. package/dist/{xhrTransport-zrL-rBvu.js → xhrTransport--NHaimro.js} +1 -1
  91. package/dist/{xhrTransport-C0mICH5q.cjs → xhrTransport-BeC2XSM2.cjs} +1 -1
  92. package/package.json +10 -2
  93. package/dist/createClient-DkuK3ABy.js +0 -1
  94. package/dist/createClient-DqORyBdY.cjs +0 -1
  95. package/dist/errorResponseTimeout-CNU7mMr2.cjs +0 -5
  96. package/dist/errorResponseTimeout-CpuovLyt.js +0 -5
  97. package/dist/loggerPlugin-06w_0Hbs.d.cts +0 -6
  98. package/dist/loggerPlugin-DllEKlkQ.d.ts +0 -6
  99. package/dist/retryPlugin-CvTlR5xZ.d.ts +0 -6
  100. package/dist/retryPlugin-DkqM2IjS.d.cts +0 -6
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cachePlugin-C5ge5iH6.cjs");exports.IndexedDBCacheStore=e.r,exports.MemoryCacheStore=e.i,exports.TieredCacheStore=e.n,exports.WebStorageCacheStore=e.a,exports.cachePlugin=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cachePlugin-C9gu5JD0.cjs");exports.IndexedDBCacheStore=e.r,exports.MemoryCacheStore=e.i,exports.TieredCacheStore=e.n,exports.WebStorageCacheStore=e.a,exports.cachePlugin=e.t;
@@ -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-wCADcVdJ.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-BlsRZKN2.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-DI1tXJPk.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-D2ONW9sl.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 +1 @@
1
- import{a as e,i as t,n,r,t as cachePlugin}from"../cachePlugin-LkXinWXp.js";export{r as IndexedDBCacheStore,t as MemoryCacheStore,n as TieredCacheStore,e as WebStorageCacheStore,cachePlugin};
1
+ import{a as e,i as t,n,r,t as cachePlugin}from"../cachePlugin-BGfwCJRI.js";export{r as IndexedDBCacheStore,t as MemoryCacheStore,n as TieredCacheStore,e as WebStorageCacheStore,cachePlugin};
@@ -1,2 +1,2 @@
1
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-Ch8uc67V.cjs";
1
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-BL5Pxslz.cjs";
2
2
  export { CircuitBreakerPlugin, CircuitBreakerPluginOptions, circuitBreakerPlugin };
@@ -1,2 +1,2 @@
1
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-BA-Fb4e0.js";
1
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "../circuitBreakerPlugin-DUyVrQlA.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-IDGEoShG.cjs";
1
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "../concurrencyPlugin-DId5qkk9.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-DgiZSKYy.js";
1
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "../concurrencyPlugin-DM66h5PD.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("../isBinaryBody-DNjjEzFS.cjs"),n=require("../validateResponseStatus-6FKeKyEV.cjs"),r=require("../isReadableStream-uWhOa7eR.cjs"),i=require("../resolveExtensionConfig-D_eh4DjS.cjs"),a=require("../xhrTransport-C0mICH5q.cjs");function downloadPlugin(t={}){let o=new WeakSet;return{name:`download`,install(u){u.interceptors.request.use(e=>{let n=i.t(e,`download`);if(!n)return e;if(s(n.output,e)===`stream`)return c(t.transport,e),{...e,responseType:`stream`};let r=n.onProgress&&!l(t.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),u.hooks.onTransport(async n=>{if(n.response)return;let r=i.t(n.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!l(t.transport))){if(typeof XMLHttpRequest>`u`)throw new e.t(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:n.config});n.response=await a.t(n.config,{onDownloadProgress:s,preserveRaw:n.preserveRaw}),o.add(n)}},{priority:-3e3}),u.hooks.onResponse(async t=>{if(o.has(t))return;let a=t.response;if(!a)return;let s=i.t(a.config,`download`),c=s?.onProgress;if(!s)return;let l=a.data,u=s.output===`stream`;if(l===void 0&&n.n(a.config.method,a.status,a.raw.type)){if(!u){c?.({loaded:0,total:0,bytes:0});return}l=new ReadableStream({start(e){e.close()}})}if(!u&&!c)return;if(!r.t(l))throw new e.t(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:a.status,config:a.config});if(u){t.response={...a,data:c?f(l,a,c):l};return}if(!c)return;let p=await d(l,a,c);t.response={...a,data:p}},{requiresRawResponse:!1})}}}function s(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 c(t,n){if(t===`xhr`)throw new e.t(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!u())throw new e.t(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function l(e=`auto`){return e===`xhr`||e!==`fetch`&&!u()&&typeof XMLHttpRequest<`u`}function u(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function d(e,t,n){let r=e.getReader(),i=[],o=m(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(p(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 f(e,t,n){let r=e.getReader(),i=m(t.headers.get(`content-length`)),o=a.n(),s=0,c=!1,l=!1,u=()=>{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)),u(),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{}u(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{u()}}},{highWaterMark:0})}function p(e){if(t.t(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let n=new Uint8Array(e.byteLength);return n.set(e),n.buffer}function m(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("../isBinaryBody-DNjjEzFS.cjs"),n=require("../validateResponseStatus-6FKeKyEV.cjs"),r=require("../isReadableStream-uWhOa7eR.cjs"),i=require("../resolveExtensionConfig-D_eh4DjS.cjs"),a=require("../xhrTransport-BeC2XSM2.cjs");function downloadPlugin(t={}){let o=new WeakSet;return{name:`download`,install(u){u.interceptors.request.use(e=>{let n=i.t(e,`download`);if(!n)return e;if(s(n.output,e)===`stream`)return c(t.transport,e),{...e,responseType:`stream`};let r=n.onProgress&&!l(t.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),u.hooks.onTransport(async n=>{if(n.response)return;let r=i.t(n.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!l(t.transport))){if(typeof XMLHttpRequest>`u`)throw new e.t(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:n.config});n.response=await a.t(n.config,{onDownloadProgress:s,preserveRaw:n.preserveRaw}),o.add(n)}},{priority:-3e3}),u.hooks.onResponse(async t=>{if(o.has(t))return;let a=t.response;if(!a)return;let s=i.t(a.config,`download`),c=s?.onProgress;if(!s)return;let l=a.data,u=s.output===`stream`;if(l===void 0&&n.n(a.config.method,a.status,a.raw.type)){if(!u){c?.({loaded:0,total:0,bytes:0});return}l=new ReadableStream({start(e){e.close()}})}if(!u&&!c)return;if(!r.t(l))throw new e.t(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:a.status,config:a.config});if(u){t.response={...a,data:c?f(l,a,c):l};return}if(!c)return;let p=await d(l,a,c);t.response={...a,data:p}},{requiresRawResponse:!1})}}}function s(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 c(t,n){if(t===`xhr`)throw new e.t(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!u())throw new e.t(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function l(e=`auto`){return e===`xhr`||e!==`fetch`&&!u()&&typeof XMLHttpRequest<`u`}function u(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function d(e,t,n){let r=e.getReader(),i=[],o=m(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(p(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 f(e,t,n){let r=e.getReader(),i=m(t.headers.get(`content-length`)),o=a.n(),s=0,c=!1,l=!1,u=()=>{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)),u(),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{}u(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{u()}}},{highWaterMark:0})}function p(e){if(t.t(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let n=new Uint8Array(e.byteLength);return n.set(e),n.buffer}function m(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-CDBxyGy8.cjs";
1
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-DtOzKGt_.cjs";
2
2
  export { DownloadPluginOptions, DownloadTransport, downloadPlugin };
@@ -1,2 +1,2 @@
1
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-TkaOEp9I.js";
1
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "../downloadPlugin-BY3BVNw4.js";
2
2
  export { DownloadPluginOptions, DownloadTransport, downloadPlugin };
@@ -1 +1 @@
1
- import{t as e}from"../RequestError-B0HIY1zK.js";import{t}from"../isBinaryBody-D-Wp2IPk.js";import{n}from"../validateResponseStatus-BzkEtZZi.js";import{t as r}from"../isReadableStream-DBMPCr6B.js";import{t as i}from"../resolveExtensionConfig-C_MshvkE.js";import{n as a,t as o}from"../xhrTransport-zrL-rBvu.js";function downloadPlugin(t={}){let a=new WeakSet;return{name:`download`,install(s){s.interceptors.request.use(e=>{let n=i(e,`download`);if(!n)return e;if(c(n.output,e)===`stream`)return l(t.transport,e),{...e,responseType:`stream`};let r=n.onProgress&&!u(t.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),s.hooks.onTransport(async n=>{if(n.response)return;let r=i(n.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!u(t.transport))){if(typeof XMLHttpRequest>`u`)throw new e(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:n.config});n.response=await o(n.config,{onDownloadProgress:s,preserveRaw:n.preserveRaw}),a.add(n)}},{priority:-3e3}),s.hooks.onResponse(async t=>{if(a.has(t))return;let o=t.response;if(!o)return;let s=i(o.config,`download`),c=s?.onProgress;if(!s)return;let l=o.data,u=s.output===`stream`;if(l===void 0&&n(o.config.method,o.status,o.raw.type)){if(!u){c?.({loaded:0,total:0,bytes:0});return}l=new ReadableStream({start(e){e.close()}})}if(!u&&!c)return;if(!r(l))throw new e(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:o.status,config:o.config});if(u){t.response={...o,data:c?p(l,o,c):l};return}if(!c)return;let d=await f(l,o,c);t.response={...o,data:d}},{requiresRawResponse:!1})}}}function c(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 l(t,n){if(t===`xhr`)throw new e(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!d())throw new e(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function u(e=`auto`){return e===`xhr`||e!==`fetch`&&!d()&&typeof XMLHttpRequest<`u`}function d(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function f(e,t,n){let r=e.getReader(),i=[],o=h(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(m(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 p(e,t,n){let r=e.getReader(),i=h(t.headers.get(`content-length`)),o=a(),s=0,c=!1,l=!1,u=()=>{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)),u(),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{}u(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{u()}}},{highWaterMark:0})}function m(e){if(t(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let n=new Uint8Array(e.byteLength);return n.set(e),n.buffer}function h(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{t}from"../isBinaryBody-D-Wp2IPk.js";import{n}from"../validateResponseStatus-BzkEtZZi.js";import{t as r}from"../isReadableStream-DBMPCr6B.js";import{t as i}from"../resolveExtensionConfig-C_MshvkE.js";import{n as a,t as o}from"../xhrTransport--NHaimro.js";function downloadPlugin(t={}){let a=new WeakSet;return{name:`download`,install(s){s.interceptors.request.use(e=>{let n=i(e,`download`);if(!n)return e;if(c(n.output,e)===`stream`)return l(t.transport,e),{...e,responseType:`stream`};let r=n.onProgress&&!u(t.transport)?`stream`:e.responseType??`blob`;return{...e,responseType:r}}),s.hooks.onTransport(async n=>{if(n.response)return;let r=i(n.config,`download`),s=r?.onProgress;if(!(r?.output===`stream`||!s||!u(t.transport))){if(typeof XMLHttpRequest>`u`)throw new e(`XMLHttpRequest is unavailable for download progress`,{code:`CONFIG_ERROR`,config:n.config});n.response=await o(n.config,{onDownloadProgress:s,preserveRaw:n.preserveRaw}),a.add(n)}},{priority:-3e3}),s.hooks.onResponse(async t=>{if(a.has(t))return;let o=t.response;if(!o)return;let s=i(o.config,`download`),c=s?.onProgress;if(!s)return;let l=o.data,u=s.output===`stream`;if(l===void 0&&n(o.config.method,o.status,o.raw.type)){if(!u){c?.({loaded:0,total:0,bytes:0});return}l=new ReadableStream({start(e){e.close()}})}if(!u&&!c)return;if(!r(l))throw new e(`Download response stream is unavailable`,{code:`PARSER_ERROR`,status:o.status,config:o.config});if(u){t.response={...o,data:c?p(l,o,c):l};return}if(!c)return;let d=await f(l,o,c);t.response={...o,data:d}},{requiresRawResponse:!1})}}}function c(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 l(t,n){if(t===`xhr`)throw new e(`Stream downloads require the Fetch transport`,{code:`CONFIG_ERROR`,config:n});if(!d())throw new e(`Fetch response streams are unavailable`,{code:`CONFIG_ERROR`,config:n})}function u(e=`auto`){return e===`xhr`||e!==`fetch`&&!d()&&typeof XMLHttpRequest<`u`}function d(){return typeof ReadableStream<`u`&&typeof Response<`u`&&`body`in Response.prototype}async function f(e,t,n){let r=e.getReader(),i=[],o=h(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(m(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 p(e,t,n){let r=e.getReader(),i=h(t.headers.get(`content-length`)),o=a(),s=0,c=!1,l=!1,u=()=>{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)),u(),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{}u(),e.error(t)}},async cancel(e){try{await r.cancel(e)}finally{u()}}},{highWaterMark:0})}function m(e){if(t(e.buffer))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let n=new Uint8Array(e.byteLength);return n.set(e),n.buffer}function h(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-06w_0Hbs.cjs";
1
+ import { t as loggerPlugin } from "../loggerPlugin-DDEGhC31.cjs";
2
2
  export { loggerPlugin };
@@ -1,2 +1,2 @@
1
- import { t as loggerPlugin } from "../loggerPlugin-DllEKlkQ.js";
1
+ import { t as loggerPlugin } from "../loggerPlugin-ChJJN0ZA.js";
2
2
  export { loggerPlugin };
@@ -1,4 +1,4 @@
1
- import { t as Plugin } from "../Plugin-LFR-Mb-u.cjs";
1
+ import { t as Plugin } from "../Plugin-CCFavD-_.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-BvvTFwQj.js";
1
+ import { t as Plugin } from "../Plugin-BG4NQC3T.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-CAAyfWw-.cjs";
1
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "../openTelemetryMetricsPlugin-DuF9OWoT.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-BSlh7PDU.js";
1
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "../openTelemetryMetricsPlugin-BEoeRl3q.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-CWgLyQQV.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-Dpz6-bEj.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-hAAiIVka.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-DOhBE_uZ.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-BUkgrdXu.cjs";
1
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "../rateLimitPlugin-CRpne4Qz.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-B5a7LKCy.js";
1
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "../rateLimitPlugin-Ce3bjrRw.js";
2
2
  export { RateLimitPlugin, RateLimitPluginOptions, RateLimitState, rateLimitPlugin };
@@ -1,2 +1,2 @@
1
- import { t as retryPlugin } from "../retryPlugin-DkqM2IjS.cjs";
1
+ import { t as retryPlugin } from "../retryPlugin-uC02f2sm.cjs";
2
2
  export { retryPlugin };
@@ -1,2 +1,2 @@
1
- import { t as retryPlugin } from "../retryPlugin-CvTlR5xZ.js";
1
+ import { t as retryPlugin } from "../retryPlugin-5vYHV92i.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-D_eh4DjS.cjs"),n=require("../xhrTransport-C0mICH5q.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-D_eh4DjS.cjs"),n=require("../xhrTransport-BeC2XSM2.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-ZP-i_dac.cjs";
1
+ import { t as uploadPlugin } from "../uploadPlugin-_xtlBLNY.cjs";
2
2
  export { uploadPlugin };
@@ -1,2 +1,2 @@
1
- import { t as uploadPlugin } from "../uploadPlugin-BUH9XZoy.js";
1
+ import { t as uploadPlugin } from "../uploadPlugin-CNdvddnT.js";
2
2
  export { uploadPlugin };
@@ -1 +1 @@
1
- import{t as e}from"../RequestError-B0HIY1zK.js";import{t}from"../resolveExtensionConfig-C_MshvkE.js";import{t as n}from"../xhrTransport-zrL-rBvu.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-C_MshvkE.js";import{t as n}from"../xhrTransport--NHaimro.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};
package/dist/plugins.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./PluginError-DT3VnlUB.cjs"),t=require("./plugins/auth.cjs"),n=require("./cachePlugin-C5ge5iH6.cjs"),r=require("./plugins/circuit-breaker.cjs"),i=require("./plugins/concurrency.cjs"),a=require("./plugins/download.cjs"),o=require("./plugins/logger.cjs"),s=require("./plugins/opentelemetry.cjs"),c=require("./plugins/opentelemetry-metrics.cjs"),l=require("./rateLimitPlugin-DWNa7AQu.cjs"),u=require("./plugins/retry.cjs"),d=require("./plugins/upload.cjs");exports.IndexedDBCacheStore=n.r,exports.MemoryCacheStore=n.i,exports.PluginError=e.t,exports.TieredCacheStore=n.n,exports.WebStorageCacheStore=n.a,exports.authPlugin=t.authPlugin,exports.cachePlugin=n.t,exports.circuitBreakerPlugin=r.circuitBreakerPlugin,exports.concurrencyPlugin=i.concurrencyPlugin,exports.downloadPlugin=a.downloadPlugin,exports.loggerPlugin=o.loggerPlugin,exports.openTelemetryMetricsPlugin=c.openTelemetryMetricsPlugin,exports.openTelemetryPlugin=s.openTelemetryPlugin,exports.rateLimitPlugin=l.t,exports.retryPlugin=u.retryPlugin,exports.uploadPlugin=d.uploadPlugin;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./PluginError-DT3VnlUB.cjs"),t=require("./plugins/auth.cjs"),n=require("./cachePlugin-C9gu5JD0.cjs"),r=require("./plugins/circuit-breaker.cjs"),i=require("./plugins/concurrency.cjs"),a=require("./plugins/download.cjs"),o=require("./plugins/logger.cjs"),s=require("./plugins/opentelemetry.cjs"),c=require("./plugins/opentelemetry-metrics.cjs"),l=require("./rateLimitPlugin-DWNa7AQu.cjs"),u=require("./plugins/retry.cjs"),d=require("./plugins/upload.cjs");exports.IndexedDBCacheStore=n.r,exports.MemoryCacheStore=n.i,exports.PluginError=e.t,exports.TieredCacheStore=n.n,exports.WebStorageCacheStore=n.a,exports.authPlugin=t.authPlugin,exports.cachePlugin=n.t,exports.circuitBreakerPlugin=r.circuitBreakerPlugin,exports.concurrencyPlugin=i.concurrencyPlugin,exports.downloadPlugin=a.downloadPlugin,exports.loggerPlugin=o.loggerPlugin,exports.openTelemetryMetricsPlugin=c.openTelemetryMetricsPlugin,exports.openTelemetryPlugin=s.openTelemetryPlugin,exports.rateLimitPlugin=l.t,exports.retryPlugin=u.retryPlugin,exports.uploadPlugin=d.uploadPlugin;
@@ -1,14 +1,14 @@
1
- import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-LFR-Mb-u.cjs";
1
+ import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-CCFavD-_.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-C-JOJhQ9.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-wCADcVdJ.cjs";
5
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-Ch8uc67V.cjs";
6
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-IDGEoShG.cjs";
7
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-CDBxyGy8.cjs";
8
- import { t as loggerPlugin } from "./loggerPlugin-06w_0Hbs.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-CWgLyQQV.cjs";
10
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-CAAyfWw-.cjs";
11
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-BUkgrdXu.cjs";
12
- import { t as retryPlugin } from "./retryPlugin-DkqM2IjS.cjs";
13
- import { t as uploadPlugin } from "./uploadPlugin-ZP-i_dac.cjs";
3
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-DWpsWoVD.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-BlsRZKN2.cjs";
5
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-BL5Pxslz.cjs";
6
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-DId5qkk9.cjs";
7
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-DtOzKGt_.cjs";
8
+ import { t as loggerPlugin } from "./loggerPlugin-DDEGhC31.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-Dpz6-bEj.cjs";
10
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-DuF9OWoT.cjs";
11
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-CRpne4Qz.cjs";
12
+ import { t as retryPlugin } from "./retryPlugin-uC02f2sm.cjs";
13
+ import { t as uploadPlugin } from "./uploadPlugin-_xtlBLNY.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-BvvTFwQj.js";
1
+ import { a as PluginInterceptorManager, i as PluginHookManager, n as PluginCleanup, r as PluginContext, t as Plugin } from "./Plugin-BG4NQC3T.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-JZQ0ISdH.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-DI1tXJPk.js";
5
- import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-BA-Fb4e0.js";
6
- import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-DgiZSKYy.js";
7
- import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-TkaOEp9I.js";
8
- import { t as loggerPlugin } from "./loggerPlugin-DllEKlkQ.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-hAAiIVka.js";
10
- import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-BSlh7PDU.js";
11
- import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-B5a7LKCy.js";
12
- import { t as retryPlugin } from "./retryPlugin-CvTlR5xZ.js";
13
- import { t as uploadPlugin } from "./uploadPlugin-BUH9XZoy.js";
3
+ import { n as AuthTokenStorage, r as authPlugin, t as AuthPluginOptions } from "./authPlugin-DRCFibHZ.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-D2ONW9sl.js";
5
+ import { n as CircuitBreakerPluginOptions, r as circuitBreakerPlugin, t as CircuitBreakerPlugin } from "./circuitBreakerPlugin-DUyVrQlA.js";
6
+ import { i as concurrencyPlugin, n as ConcurrencyPluginOptions, r as ConcurrencyState, t as ConcurrencyPlugin } from "./concurrencyPlugin-DM66h5PD.js";
7
+ import { n as DownloadTransport, r as downloadPlugin, t as DownloadPluginOptions } from "./downloadPlugin-BY3BVNw4.js";
8
+ import { t as loggerPlugin } from "./loggerPlugin-ChJJN0ZA.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-DOhBE_uZ.js";
10
+ import { a as OpenTelemetryMetricsPluginOptions, i as OpenTelemetryMetricAttributes, n as OpenTelemetryHistogram, o as openTelemetryMetricsPlugin, r as OpenTelemetryMeter, t as OpenTelemetryCounter } from "./openTelemetryMetricsPlugin-BEoeRl3q.js";
11
+ import { i as rateLimitPlugin, n as RateLimitPluginOptions, r as RateLimitState, t as RateLimitPlugin } from "./rateLimitPlugin-Ce3bjrRw.js";
12
+ import { t as retryPlugin } from "./retryPlugin-5vYHV92i.js";
13
+ import { t as uploadPlugin } from "./uploadPlugin-CNdvddnT.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 };
package/dist/plugins.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./PluginError-CcuPSIRv.js";import{authPlugin}from"./plugins/auth.js";import{a as t,i as n,n as r,r as i,t as cachePlugin}from"./cachePlugin-LkXinWXp.js";import{circuitBreakerPlugin}from"./plugins/circuit-breaker.js";import{concurrencyPlugin}from"./plugins/concurrency.js";import{downloadPlugin}from"./plugins/download.js";import{loggerPlugin}from"./plugins/logger.js";import{openTelemetryPlugin}from"./plugins/opentelemetry.js";import{openTelemetryMetricsPlugin}from"./plugins/opentelemetry-metrics.js";import{t as rateLimitPlugin}from"./rateLimitPlugin-hVcAA_ZA.js";import{retryPlugin}from"./plugins/retry.js";import{uploadPlugin}from"./plugins/upload.js";export{i as IndexedDBCacheStore,n as MemoryCacheStore,e as PluginError,r as TieredCacheStore,t as WebStorageCacheStore,authPlugin,cachePlugin,circuitBreakerPlugin,concurrencyPlugin,downloadPlugin,loggerPlugin,openTelemetryMetricsPlugin,openTelemetryPlugin,rateLimitPlugin,retryPlugin,uploadPlugin};
1
+ import{t as e}from"./PluginError-CcuPSIRv.js";import{authPlugin}from"./plugins/auth.js";import{a as t,i as n,n as r,r as i,t as cachePlugin}from"./cachePlugin-BGfwCJRI.js";import{circuitBreakerPlugin}from"./plugins/circuit-breaker.js";import{concurrencyPlugin}from"./plugins/concurrency.js";import{downloadPlugin}from"./plugins/download.js";import{loggerPlugin}from"./plugins/logger.js";import{openTelemetryPlugin}from"./plugins/opentelemetry.js";import{openTelemetryMetricsPlugin}from"./plugins/opentelemetry-metrics.js";import{t as rateLimitPlugin}from"./rateLimitPlugin-hVcAA_ZA.js";import{retryPlugin}from"./plugins/retry.js";import{uploadPlugin}from"./plugins/upload.js";export{i as IndexedDBCacheStore,n as MemoryCacheStore,e as PluginError,r as TieredCacheStore,t as WebStorageCacheStore,authPlugin,cachePlugin,circuitBreakerPlugin,concurrencyPlugin,downloadPlugin,loggerPlugin,openTelemetryMetricsPlugin,openTelemetryPlugin,rateLimitPlugin,retryPlugin,uploadPlugin};
@@ -1,5 +1,5 @@
1
- import { p as RequestConfig } from "./response-LhB9NRBw.cjs";
2
- import { t as Plugin } from "./Plugin-LFR-Mb-u.cjs";
1
+ import { h as RequestConfig } from "./response-CXF5lNlw.cjs";
2
+ import { t as Plugin } from "./Plugin-CCFavD-_.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 { p as RequestConfig } from "./response-LhB9NRBw.js";
2
- import { t as Plugin } from "./Plugin-BvvTFwQj.js";
1
+ import { h as RequestConfig } from "./response-BhOBjarL.js";
2
+ import { t as Plugin } from "./Plugin-BG4NQC3T.js";
3
3
  //#region src/plugins/rateLimitPlugin.d.ts
4
4
  interface RateLimitPluginOptions {
5
5
  /** Maximum transport attempts admitted during each rolling interval. */
@@ -1,52 +1,10 @@
1
+ import { t as StandardSchemaV1 } from "./standardSchema-CjWI0T2o.js";
1
2
  //#region src/types/method.d.ts
2
3
  /**
3
4
  * HTTP request method.
4
5
  */
5
6
  type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'QUERY' | 'DELETE' | 'HEAD' | 'OPTIONS';
6
7
  //#endregion
7
- //#region src/types/standardSchema.d.ts
8
- /**
9
- * Standard Schema v1 interface.
10
- *
11
- * Compatible schema libraries can be consumed without a runtime dependency on
12
- * `@standard-schema/spec`.
13
- */
14
- interface StandardSchemaV1<Input = unknown, Output = Input> {
15
- readonly '~standard': StandardSchemaV1.Props<Input, Output>;
16
- }
17
- declare namespace StandardSchemaV1 {
18
- interface Props<Input = unknown, Output = Input> {
19
- readonly version: 1;
20
- readonly vendor: string;
21
- readonly validate: (value: unknown, options?: Options) => Result<Output> | Promise<Result<Output>>;
22
- readonly types?: Types<Input, Output>;
23
- }
24
- interface Options {
25
- readonly libraryOptions?: Record<string, unknown>;
26
- }
27
- type Result<Output> = SuccessResult<Output> | FailureResult;
28
- interface SuccessResult<Output> {
29
- readonly value: Output;
30
- readonly issues?: undefined;
31
- }
32
- interface FailureResult {
33
- readonly issues: ReadonlyArray<Issue>;
34
- }
35
- interface Issue {
36
- readonly message: string;
37
- readonly path?: ReadonlyArray<PropertyKey | PathSegment>;
38
- }
39
- interface PathSegment {
40
- readonly key: PropertyKey;
41
- }
42
- interface Types<Input = unknown, Output = Input> {
43
- readonly input: Input;
44
- readonly output: Output;
45
- }
46
- type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
47
- type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
48
- }
49
- //#endregion
50
8
  //#region src/types/extensions.d.ts
51
9
  type CircuitState = 'closed' | 'open' | 'half-open';
52
10
  interface CircuitBreakerOptions {
@@ -543,6 +501,9 @@ interface ServerSentEvent {
543
501
  */
544
502
  retry?: number;
545
503
  }
504
+ /** Observable SSE connection lifecycle, separate from delivery/backpressure. */
505
+ type SseState = 'connecting' | 'open' | 'reconnecting' | 'closed' | 'errored';
506
+ type SseStateObserver = (state: SseState) => void;
546
507
  /** Bounded reconnection for an SSE async iterable. */
547
508
  interface SseReconnectOptions {
548
509
  /** Maximum number of new connections after the initial response. */
@@ -593,4 +554,4 @@ interface NporaResponse<T = unknown> {
593
554
  raw: Response;
594
555
  }
595
556
  //#endregion
596
- 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 };
557
+ export { LoggerEntry as A, RetryEvent as B, CircuitBreakerStateChange as C, DownloadOutput as D, DownloadOptions as E, OpenTelemetryOptions as F, UploadProgress as G, TransferProgress as H, RateLimitOptions as I, HttpMethod as K, RequestLogEntry as L, MemoryCacheOptions as M, OpenTelemetryAttributeValue as N, DownloadProgress as O, OpenTelemetryMetricsOptions as P, RequestLogger as R, CircuitBreakerOptions as S, ConcurrencyOptions as T, UploadData as U, RetryOptions as V, UploadOptions as W, RequestInputConfig as _, SseStateObserver as a, AuthOptions as b, FetchOptions as c, JsonStringifier as d, QueryParams as f, RequestExtensions as g, RequestConfig as h, SseState as i, LoggerOptions as j, ErrorLogEntry as k, JsonParser as l, QueryValue as m, ServerSentEvent as n, StreamingSchemaLocation as o, QuerySerializer as p, SseReconnectOptions as r, FetchFunction as s, NporaResponse as t, JsonParserContext as u, RequestURL as v, CircuitState as w, CacheOptions as x, ResponseType as y, ResponseLogEntry as z };
@@ -1,52 +1,10 @@
1
+ import { t as StandardSchemaV1 } from "./standardSchema-CjWI0T2o.cjs";
1
2
  //#region src/types/method.d.ts
2
3
  /**
3
4
  * HTTP request method.
4
5
  */
5
6
  type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'QUERY' | 'DELETE' | 'HEAD' | 'OPTIONS';
6
7
  //#endregion
7
- //#region src/types/standardSchema.d.ts
8
- /**
9
- * Standard Schema v1 interface.
10
- *
11
- * Compatible schema libraries can be consumed without a runtime dependency on
12
- * `@standard-schema/spec`.
13
- */
14
- interface StandardSchemaV1<Input = unknown, Output = Input> {
15
- readonly '~standard': StandardSchemaV1.Props<Input, Output>;
16
- }
17
- declare namespace StandardSchemaV1 {
18
- interface Props<Input = unknown, Output = Input> {
19
- readonly version: 1;
20
- readonly vendor: string;
21
- readonly validate: (value: unknown, options?: Options) => Result<Output> | Promise<Result<Output>>;
22
- readonly types?: Types<Input, Output>;
23
- }
24
- interface Options {
25
- readonly libraryOptions?: Record<string, unknown>;
26
- }
27
- type Result<Output> = SuccessResult<Output> | FailureResult;
28
- interface SuccessResult<Output> {
29
- readonly value: Output;
30
- readonly issues?: undefined;
31
- }
32
- interface FailureResult {
33
- readonly issues: ReadonlyArray<Issue>;
34
- }
35
- interface Issue {
36
- readonly message: string;
37
- readonly path?: ReadonlyArray<PropertyKey | PathSegment>;
38
- }
39
- interface PathSegment {
40
- readonly key: PropertyKey;
41
- }
42
- interface Types<Input = unknown, Output = Input> {
43
- readonly input: Input;
44
- readonly output: Output;
45
- }
46
- type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
47
- type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
48
- }
49
- //#endregion
50
8
  //#region src/types/extensions.d.ts
51
9
  type CircuitState = 'closed' | 'open' | 'half-open';
52
10
  interface CircuitBreakerOptions {
@@ -543,6 +501,9 @@ interface ServerSentEvent {
543
501
  */
544
502
  retry?: number;
545
503
  }
504
+ /** Observable SSE connection lifecycle, separate from delivery/backpressure. */
505
+ type SseState = 'connecting' | 'open' | 'reconnecting' | 'closed' | 'errored';
506
+ type SseStateObserver = (state: SseState) => void;
546
507
  /** Bounded reconnection for an SSE async iterable. */
547
508
  interface SseReconnectOptions {
548
509
  /** Maximum number of new connections after the initial response. */
@@ -593,4 +554,4 @@ interface NporaResponse<T = unknown> {
593
554
  raw: Response;
594
555
  }
595
556
  //#endregion
596
- 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 };
557
+ export { LoggerEntry as A, RetryEvent as B, CircuitBreakerStateChange as C, DownloadOutput as D, DownloadOptions as E, OpenTelemetryOptions as F, UploadProgress as G, TransferProgress as H, RateLimitOptions as I, HttpMethod as K, RequestLogEntry as L, MemoryCacheOptions as M, OpenTelemetryAttributeValue as N, DownloadProgress as O, OpenTelemetryMetricsOptions as P, RequestLogger as R, CircuitBreakerOptions as S, ConcurrencyOptions as T, UploadData as U, RetryOptions as V, UploadOptions as W, RequestInputConfig as _, SseStateObserver as a, AuthOptions as b, FetchOptions as c, JsonStringifier as d, QueryParams as f, RequestExtensions as g, RequestConfig as h, SseState as i, LoggerOptions as j, ErrorLogEntry as k, JsonParser as l, QueryValue as m, ServerSentEvent as n, StreamingSchemaLocation as o, QuerySerializer as p, SseReconnectOptions as r, FetchFunction as s, NporaResponse as t, JsonParserContext as u, RequestURL as v, CircuitState as w, CacheOptions as x, ResponseType as y, ResponseLogEntry as z };
@@ -0,0 +1,6 @@
1
+ import { V as RetryOptions } from "./response-BhOBjarL.js";
2
+ import { t as Plugin } from "./Plugin-BG4NQC3T.js";
3
+ //#region src/plugins/retryPlugin.d.ts
4
+ declare function retryPlugin(defaultOptions?: RetryOptions): Plugin;
5
+ //#endregion
6
+ export { retryPlugin as t };
@@ -0,0 +1,6 @@
1
+ import { V as RetryOptions } from "./response-CXF5lNlw.cjs";
2
+ import { t as Plugin } from "./Plugin-CCFavD-_.cjs";
3
+ //#region src/plugins/retryPlugin.d.ts
4
+ declare function retryPlugin(defaultOptions?: RetryOptions): Plugin;
5
+ //#endregion
6
+ export { retryPlugin as t };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function toFormErrors(e){let t={formErrors:[],fieldErrors:Object.create(null)};for(let r of e){var n;let e=r.path?.map(e=>typeof e==`object`?e.key:e);if(!e?.length||e.some(e=>typeof e==`symbol`)){t.formErrors.push(r.message);continue}let i=e.map(e=>String(e).replace(/[\\.]/g,`\\$&`)).join(`.`);((n=t.fieldErrors)[i]??(n[i]=[])).push(r.message)}return t}exports.toFormErrors=toFormErrors;
@@ -0,0 +1,12 @@
1
+ import { t as StandardSchemaV1 } from "./standardSchema-CjWI0T2o.cjs";
2
+ //#region src/schema-errors.d.ts
3
+ interface FormErrors {
4
+ /** Issues without a representable field path, including symbol keys. */
5
+ formErrors: string[];
6
+ /** All messages per field. Dots and backslashes in keys are escaped. */
7
+ fieldErrors: Record<string, string[]>;
8
+ }
9
+ /** Flatten Standard Schema issues without losing duplicate or form-level errors. */
10
+ declare function toFormErrors(issues: ReadonlyArray<StandardSchemaV1.Issue>): FormErrors;
11
+ //#endregion
12
+ export { FormErrors, toFormErrors };
@@ -0,0 +1,12 @@
1
+ import { t as StandardSchemaV1 } from "./standardSchema-CjWI0T2o.js";
2
+ //#region src/schema-errors.d.ts
3
+ interface FormErrors {
4
+ /** Issues without a representable field path, including symbol keys. */
5
+ formErrors: string[];
6
+ /** All messages per field. Dots and backslashes in keys are escaped. */
7
+ fieldErrors: Record<string, string[]>;
8
+ }
9
+ /** Flatten Standard Schema issues without losing duplicate or form-level errors. */
10
+ declare function toFormErrors(issues: ReadonlyArray<StandardSchemaV1.Issue>): FormErrors;
11
+ //#endregion
12
+ export { FormErrors, toFormErrors };
@@ -0,0 +1 @@
1
+ function toFormErrors(e){let t={formErrors:[],fieldErrors:Object.create(null)};for(let r of e){var n;let e=r.path?.map(e=>typeof e==`object`?e.key:e);if(!e?.length||e.some(e=>typeof e==`symbol`)){t.formErrors.push(r.message);continue}let i=e.map(e=>String(e).replace(/[\\.]/g,`\\$&`)).join(`.`);((n=t.fieldErrors)[i]??(n[i]=[])).push(r.message)}return t}export{toFormErrors};
@@ -0,0 +1,44 @@
1
+ //#region src/types/standardSchema.d.ts
2
+ /**
3
+ * Standard Schema v1 interface.
4
+ *
5
+ * Compatible schema libraries can be consumed without a runtime dependency on
6
+ * `@standard-schema/spec`.
7
+ */
8
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
9
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
10
+ }
11
+ declare namespace StandardSchemaV1 {
12
+ interface Props<Input = unknown, Output = Input> {
13
+ readonly version: 1;
14
+ readonly vendor: string;
15
+ readonly validate: (value: unknown, options?: Options) => Result<Output> | Promise<Result<Output>>;
16
+ readonly types?: Types<Input, Output>;
17
+ }
18
+ interface Options {
19
+ readonly libraryOptions?: Record<string, unknown>;
20
+ }
21
+ type Result<Output> = SuccessResult<Output> | FailureResult;
22
+ interface SuccessResult<Output> {
23
+ readonly value: Output;
24
+ readonly issues?: undefined;
25
+ }
26
+ interface FailureResult {
27
+ readonly issues: ReadonlyArray<Issue>;
28
+ }
29
+ interface Issue {
30
+ readonly message: string;
31
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment>;
32
+ }
33
+ interface PathSegment {
34
+ readonly key: PropertyKey;
35
+ }
36
+ interface Types<Input = unknown, Output = Input> {
37
+ readonly input: Input;
38
+ readonly output: Output;
39
+ }
40
+ type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
41
+ type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
42
+ }
43
+ //#endregion
44
+ export { StandardSchemaV1 as t };
@@ -0,0 +1,44 @@
1
+ //#region src/types/standardSchema.d.ts
2
+ /**
3
+ * Standard Schema v1 interface.
4
+ *
5
+ * Compatible schema libraries can be consumed without a runtime dependency on
6
+ * `@standard-schema/spec`.
7
+ */
8
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
9
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
10
+ }
11
+ declare namespace StandardSchemaV1 {
12
+ interface Props<Input = unknown, Output = Input> {
13
+ readonly version: 1;
14
+ readonly vendor: string;
15
+ readonly validate: (value: unknown, options?: Options) => Result<Output> | Promise<Result<Output>>;
16
+ readonly types?: Types<Input, Output>;
17
+ }
18
+ interface Options {
19
+ readonly libraryOptions?: Record<string, unknown>;
20
+ }
21
+ type Result<Output> = SuccessResult<Output> | FailureResult;
22
+ interface SuccessResult<Output> {
23
+ readonly value: Output;
24
+ readonly issues?: undefined;
25
+ }
26
+ interface FailureResult {
27
+ readonly issues: ReadonlyArray<Issue>;
28
+ }
29
+ interface Issue {
30
+ readonly message: string;
31
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment>;
32
+ }
33
+ interface PathSegment {
34
+ readonly key: PropertyKey;
35
+ }
36
+ interface Types<Input = unknown, Output = Input> {
37
+ readonly input: Input;
38
+ readonly output: Output;
39
+ }
40
+ type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
41
+ type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
42
+ }
43
+ //#endregion
44
+ export { StandardSchemaV1 as t };
@@ -1,2 +1,2 @@
1
- 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-DS80lrWx.cjs";
1
+ 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-CDWlJKqY.cjs";
2
2
  export { MockAdapter, MockAdapterOptions, MockHandler, MockReply, MockReplyHandler, MockRequestMatcher, MockResponseOptions, MockRoute, MockURLMatcher };