vigor-fetch 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1885,7 +1885,33 @@ const vigor = {
1885
1885
  retry: (task) => task ? new VigorRetry().target(task) : new VigorRetry(),
1886
1886
  parse: (response) => response ? new VigorParse().target(response) : new VigorParse(),
1887
1887
  fetch: (origin) => origin ? new VigorFetch().origin(origin) : new VigorFetch(),
1888
- all: (...tasks) => tasks.length > 0 ? new VigorAll().target(...tasks) : new VigorAll()
1888
+ all: (...tasks) => tasks.length > 0 ? new VigorAll().target(...tasks) : new VigorAll(),
1889
+ builders: {
1890
+ fetch: {
1891
+ settings: () => new VigorFetchPolicySettings(),
1892
+ middlewares: () => new VigorFetchPolicyMiddlewares(),
1893
+ },
1894
+ retry: {
1895
+ settings: () => new VigorRetryPolicySettings(),
1896
+ middlewares: () => new VigorRetryPolicyMiddlewares(),
1897
+ algorithms: () => new VigorRetryPolicyAlgorithms(),
1898
+ algorithm: {
1899
+ constant: () => new VigorRetryPolicyAlgorithmsConstant(),
1900
+ linear: () => new VigorRetryPolicyAlgorithmsLinear(),
1901
+ backoff: () => new VigorRetryPolicyAlgorithmsBackoff(),
1902
+ custom: () => new VigorRetryPolicyAlgorithmsCustom(),
1903
+ },
1904
+ },
1905
+ parse: {
1906
+ settings: () => new VigorParsePolicySettings(),
1907
+ middlewares: () => new VigorParsePolicyMiddlewares(),
1908
+ strategies: () => new VigorParsePolicyStrategies(),
1909
+ },
1910
+ all: {
1911
+ settings: () => new VigorAllPolicySettings(),
1912
+ middlewares: () => new VigorAllPolicyMiddlewares(),
1913
+ },
1914
+ }
1889
1915
  };
1890
1916
 
1891
1917
  exports.VigorAll = VigorAll;
package/dist/index.mjs CHANGED
@@ -1881,7 +1881,33 @@ const vigor = {
1881
1881
  retry: (task) => task ? new VigorRetry().target(task) : new VigorRetry(),
1882
1882
  parse: (response) => response ? new VigorParse().target(response) : new VigorParse(),
1883
1883
  fetch: (origin) => origin ? new VigorFetch().origin(origin) : new VigorFetch(),
1884
- all: (...tasks) => tasks.length > 0 ? new VigorAll().target(...tasks) : new VigorAll()
1884
+ all: (...tasks) => tasks.length > 0 ? new VigorAll().target(...tasks) : new VigorAll(),
1885
+ builders: {
1886
+ fetch: {
1887
+ settings: () => new VigorFetchPolicySettings(),
1888
+ middlewares: () => new VigorFetchPolicyMiddlewares(),
1889
+ },
1890
+ retry: {
1891
+ settings: () => new VigorRetryPolicySettings(),
1892
+ middlewares: () => new VigorRetryPolicyMiddlewares(),
1893
+ algorithms: () => new VigorRetryPolicyAlgorithms(),
1894
+ algorithm: {
1895
+ constant: () => new VigorRetryPolicyAlgorithmsConstant(),
1896
+ linear: () => new VigorRetryPolicyAlgorithmsLinear(),
1897
+ backoff: () => new VigorRetryPolicyAlgorithmsBackoff(),
1898
+ custom: () => new VigorRetryPolicyAlgorithmsCustom(),
1899
+ },
1900
+ },
1901
+ parse: {
1902
+ settings: () => new VigorParsePolicySettings(),
1903
+ middlewares: () => new VigorParsePolicyMiddlewares(),
1904
+ strategies: () => new VigorParsePolicyStrategies(),
1905
+ },
1906
+ all: {
1907
+ settings: () => new VigorAllPolicySettings(),
1908
+ middlewares: () => new VigorAllPolicyMiddlewares(),
1909
+ },
1910
+ }
1885
1911
  };
1886
1912
 
1887
1913
  export { VigorAll, VigorAllBase, VigorAllError, VigorAllErrorMessageFuncs, VigorAllPolicyBase, VigorAllPolicyMiddlewares, VigorAllPolicyMiddlewaresBase, VigorAllPolicySettings, VigorAllPolicySettingsBase, VigorError, VigorFetch, VigorFetchBase, VigorFetchError, VigorFetchErrorMessageFuncs, VigorFetchPolicyBase, VigorFetchPolicyMiddlewares, VigorFetchPolicyMiddlewaresBase, VigorFetchPolicySettings, VigorFetchPolicySettingsBase, VigorJitter, VigorParse, VigorParseBase, VigorParseContentTypeStrategy, VigorParseError, VigorParseErrorMessageFuncs, VigorParsePolicyBase, VigorParsePolicyMiddlewares, VigorParsePolicyMiddlewaresBase, VigorParsePolicySettings, VigorParsePolicySettingsBase, VigorParsePolicyStrategies, VigorParsePolicyStrategiesBase, VigorParseSniffStrategy, VigorRetry, VigorRetryBase, VigorRetryError, VigorRetryErrorMessageFuncs, VigorRetryPolicyAlgorithms, VigorRetryPolicyAlgorithmsBackoff, VigorRetryPolicyAlgorithmsBackoffBase, VigorRetryPolicyAlgorithmsBase, VigorRetryPolicyAlgorithmsConstant, VigorRetryPolicyAlgorithmsConstantBase, VigorRetryPolicyAlgorithmsCustom, VigorRetryPolicyAlgorithmsCustomBase, VigorRetryPolicyAlgorithmsLinear, VigorRetryPolicyAlgorithmsLinearBase, VigorRetryPolicyBase, VigorRetryPolicyMiddlewares, VigorRetryPolicyMiddlewaresBase, VigorRetryPolicySettings, VigorRetryPolicySettingsBase, VigorStatus, vigor as default, vigor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigor-fetch",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Smart, zero-dependency HTTP client with self-healing retries for rate-limited servers.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",