vigor-fetch 4.0.2 → 4.0.3
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.d.ts +27 -2498
- package/dist/index.js +23 -9
- package/dist/index.mjs +23 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -240,7 +240,9 @@ class VigorAll extends VigorStatus {
|
|
|
240
240
|
const result = typeof input === 'function'
|
|
241
241
|
? input(new VigorAllPolicySettings())
|
|
242
242
|
: input;
|
|
243
|
-
return this._next(
|
|
243
|
+
return this._next({
|
|
244
|
+
policy: { settings: result.config.policy.settings }
|
|
245
|
+
});
|
|
244
246
|
}
|
|
245
247
|
return this._next({ policy: { settings: input } });
|
|
246
248
|
}
|
|
@@ -250,7 +252,9 @@ class VigorAll extends VigorStatus {
|
|
|
250
252
|
const result = typeof input === 'function'
|
|
251
253
|
? input(new VigorAllPolicyMiddlewares())
|
|
252
254
|
: input;
|
|
253
|
-
return this._next(
|
|
255
|
+
return this._next({
|
|
256
|
+
policy: { middlewares: result.config.policy.middlewares }
|
|
257
|
+
});
|
|
254
258
|
}
|
|
255
259
|
return this._next({ policy: { middlewares: input } });
|
|
256
260
|
}
|
|
@@ -804,7 +808,9 @@ class VigorRetry extends VigorStatus {
|
|
|
804
808
|
const result = typeof input === 'function'
|
|
805
809
|
? input(new VigorRetryPolicySettings())
|
|
806
810
|
: input;
|
|
807
|
-
return this._next(
|
|
811
|
+
return this._next({
|
|
812
|
+
policy: { settings: result.config.policy.settings }
|
|
813
|
+
});
|
|
808
814
|
}
|
|
809
815
|
return this._next({
|
|
810
816
|
policy: { settings: input }
|
|
@@ -816,7 +822,9 @@ class VigorRetry extends VigorStatus {
|
|
|
816
822
|
const result = typeof input === 'function'
|
|
817
823
|
? input(new VigorRetryPolicyMiddlewares())
|
|
818
824
|
: input;
|
|
819
|
-
return this._next(
|
|
825
|
+
return this._next({
|
|
826
|
+
policy: { middlewares: result.config.policy.middlewares }
|
|
827
|
+
});
|
|
820
828
|
}
|
|
821
829
|
return this._next({
|
|
822
830
|
policy: { middlewares: input }
|
|
@@ -1283,7 +1291,9 @@ class VigorParse extends VigorStatus {
|
|
|
1283
1291
|
const result = typeof input === 'function'
|
|
1284
1292
|
? input(new VigorParsePolicySettings())
|
|
1285
1293
|
: input;
|
|
1286
|
-
return this._next(
|
|
1294
|
+
return this._next({
|
|
1295
|
+
policy: { settings: result.config.policy.settings }
|
|
1296
|
+
});
|
|
1287
1297
|
}
|
|
1288
1298
|
return this._next({ policy: { settings: input } });
|
|
1289
1299
|
}
|
|
@@ -1293,7 +1303,9 @@ class VigorParse extends VigorStatus {
|
|
|
1293
1303
|
const result = typeof input === 'function'
|
|
1294
1304
|
? input(new VigorParsePolicyMiddlewares())
|
|
1295
1305
|
: input;
|
|
1296
|
-
return this._next(
|
|
1306
|
+
return this._next({
|
|
1307
|
+
policy: { middlewares: result.config.policy.middlewares }
|
|
1308
|
+
});
|
|
1297
1309
|
}
|
|
1298
1310
|
return this._next({ policy: { middlewares: input } });
|
|
1299
1311
|
}
|
|
@@ -1303,7 +1315,9 @@ class VigorParse extends VigorStatus {
|
|
|
1303
1315
|
const result = typeof input === 'function'
|
|
1304
1316
|
? input(new VigorParsePolicyStrategies())
|
|
1305
1317
|
: input;
|
|
1306
|
-
return this._next(
|
|
1318
|
+
return this._next({
|
|
1319
|
+
policy: { strategies: result.config.policy.strategies }
|
|
1320
|
+
});
|
|
1307
1321
|
}
|
|
1308
1322
|
return this._next({ policy: { strategies: input } });
|
|
1309
1323
|
}
|
|
@@ -1572,7 +1586,7 @@ class VigorFetch extends VigorStatus {
|
|
|
1572
1586
|
const result = typeof input === 'function'
|
|
1573
1587
|
? input(new VigorFetchPolicySettings())
|
|
1574
1588
|
: input;
|
|
1575
|
-
return this._next(result.config);
|
|
1589
|
+
return this._next({ policy: { settings: result.config.policy.settings } });
|
|
1576
1590
|
}
|
|
1577
1591
|
return this._next({ policy: { settings: input } });
|
|
1578
1592
|
}
|
|
@@ -1582,7 +1596,7 @@ class VigorFetch extends VigorStatus {
|
|
|
1582
1596
|
const result = typeof input === 'function'
|
|
1583
1597
|
? input(new VigorFetchPolicyMiddlewares())
|
|
1584
1598
|
: input;
|
|
1585
|
-
return this._next(result.config);
|
|
1599
|
+
return this._next({ policy: { middlewares: result.config.policy.middlewares } });
|
|
1586
1600
|
}
|
|
1587
1601
|
return this._next({ policy: { middlewares: input } });
|
|
1588
1602
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -236,7 +236,9 @@ class VigorAll extends VigorStatus {
|
|
|
236
236
|
const result = typeof input === 'function'
|
|
237
237
|
? input(new VigorAllPolicySettings())
|
|
238
238
|
: input;
|
|
239
|
-
return this._next(
|
|
239
|
+
return this._next({
|
|
240
|
+
policy: { settings: result.config.policy.settings }
|
|
241
|
+
});
|
|
240
242
|
}
|
|
241
243
|
return this._next({ policy: { settings: input } });
|
|
242
244
|
}
|
|
@@ -246,7 +248,9 @@ class VigorAll extends VigorStatus {
|
|
|
246
248
|
const result = typeof input === 'function'
|
|
247
249
|
? input(new VigorAllPolicyMiddlewares())
|
|
248
250
|
: input;
|
|
249
|
-
return this._next(
|
|
251
|
+
return this._next({
|
|
252
|
+
policy: { middlewares: result.config.policy.middlewares }
|
|
253
|
+
});
|
|
250
254
|
}
|
|
251
255
|
return this._next({ policy: { middlewares: input } });
|
|
252
256
|
}
|
|
@@ -800,7 +804,9 @@ class VigorRetry extends VigorStatus {
|
|
|
800
804
|
const result = typeof input === 'function'
|
|
801
805
|
? input(new VigorRetryPolicySettings())
|
|
802
806
|
: input;
|
|
803
|
-
return this._next(
|
|
807
|
+
return this._next({
|
|
808
|
+
policy: { settings: result.config.policy.settings }
|
|
809
|
+
});
|
|
804
810
|
}
|
|
805
811
|
return this._next({
|
|
806
812
|
policy: { settings: input }
|
|
@@ -812,7 +818,9 @@ class VigorRetry extends VigorStatus {
|
|
|
812
818
|
const result = typeof input === 'function'
|
|
813
819
|
? input(new VigorRetryPolicyMiddlewares())
|
|
814
820
|
: input;
|
|
815
|
-
return this._next(
|
|
821
|
+
return this._next({
|
|
822
|
+
policy: { middlewares: result.config.policy.middlewares }
|
|
823
|
+
});
|
|
816
824
|
}
|
|
817
825
|
return this._next({
|
|
818
826
|
policy: { middlewares: input }
|
|
@@ -1279,7 +1287,9 @@ class VigorParse extends VigorStatus {
|
|
|
1279
1287
|
const result = typeof input === 'function'
|
|
1280
1288
|
? input(new VigorParsePolicySettings())
|
|
1281
1289
|
: input;
|
|
1282
|
-
return this._next(
|
|
1290
|
+
return this._next({
|
|
1291
|
+
policy: { settings: result.config.policy.settings }
|
|
1292
|
+
});
|
|
1283
1293
|
}
|
|
1284
1294
|
return this._next({ policy: { settings: input } });
|
|
1285
1295
|
}
|
|
@@ -1289,7 +1299,9 @@ class VigorParse extends VigorStatus {
|
|
|
1289
1299
|
const result = typeof input === 'function'
|
|
1290
1300
|
? input(new VigorParsePolicyMiddlewares())
|
|
1291
1301
|
: input;
|
|
1292
|
-
return this._next(
|
|
1302
|
+
return this._next({
|
|
1303
|
+
policy: { middlewares: result.config.policy.middlewares }
|
|
1304
|
+
});
|
|
1293
1305
|
}
|
|
1294
1306
|
return this._next({ policy: { middlewares: input } });
|
|
1295
1307
|
}
|
|
@@ -1299,7 +1311,9 @@ class VigorParse extends VigorStatus {
|
|
|
1299
1311
|
const result = typeof input === 'function'
|
|
1300
1312
|
? input(new VigorParsePolicyStrategies())
|
|
1301
1313
|
: input;
|
|
1302
|
-
return this._next(
|
|
1314
|
+
return this._next({
|
|
1315
|
+
policy: { strategies: result.config.policy.strategies }
|
|
1316
|
+
});
|
|
1303
1317
|
}
|
|
1304
1318
|
return this._next({ policy: { strategies: input } });
|
|
1305
1319
|
}
|
|
@@ -1568,7 +1582,7 @@ class VigorFetch extends VigorStatus {
|
|
|
1568
1582
|
const result = typeof input === 'function'
|
|
1569
1583
|
? input(new VigorFetchPolicySettings())
|
|
1570
1584
|
: input;
|
|
1571
|
-
return this._next(result.config);
|
|
1585
|
+
return this._next({ policy: { settings: result.config.policy.settings } });
|
|
1572
1586
|
}
|
|
1573
1587
|
return this._next({ policy: { settings: input } });
|
|
1574
1588
|
}
|
|
@@ -1578,7 +1592,7 @@ class VigorFetch extends VigorStatus {
|
|
|
1578
1592
|
const result = typeof input === 'function'
|
|
1579
1593
|
? input(new VigorFetchPolicyMiddlewares())
|
|
1580
1594
|
: input;
|
|
1581
|
-
return this._next(result.config);
|
|
1595
|
+
return this._next({ policy: { middlewares: result.config.policy.middlewares } });
|
|
1582
1596
|
}
|
|
1583
1597
|
return this._next({ policy: { middlewares: input } });
|
|
1584
1598
|
}
|