@hyper-fetch/core 5.1.2 → 5.2.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.
@@ -1325,7 +1325,7 @@ var getAdapterBindings = (req, requestId, systemErrorStatus, systemErrorExtra) =
1325
1325
  if (processingError) {
1326
1326
  return onError(processingError, systemErrorStatus, systemErrorExtra, () => null);
1327
1327
  }
1328
- if (req.mock && req.isMockEnabled) {
1328
+ if (req.mock && req.isMockEnabled && req.client.isMockEnabled) {
1329
1329
  return mocker(request, {
1330
1330
  onError,
1331
1331
  onResponseEnd,
@@ -2115,6 +2115,7 @@ var Client = class {
2115
2115
  this.loggerManager = new LoggerManager(this);
2116
2116
  this.defaultMethod = "GET" /* get */;
2117
2117
  this.defaultExtra = xhrExtra;
2118
+ this.isMockEnabled = true;
2118
2119
  this.effects = [];
2119
2120
  this.abortKeyMapper = getSimpleKey;
2120
2121
  this.cacheKeyMapper = getRequestKey;
@@ -2161,6 +2162,10 @@ var Client = class {
2161
2162
  this.payloadMapper = payloadMapper;
2162
2163
  return this;
2163
2164
  };
2165
+ this.setEnableGlobalMocking = (isMockEnabled) => {
2166
+ this.isMockEnabled = isMockEnabled;
2167
+ return this;
2168
+ };
2164
2169
  this.setEndpointMapper = (endpointMapper) => {
2165
2170
  this.endpointMapper = endpointMapper;
2166
2171
  return this;