contentful-management 7.53.0 → 8.0.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.
@@ -125,12 +125,24 @@ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../node_mo
125
125
  var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../node_modules/axios/lib/helpers/parseHeaders.js");
126
126
  var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
127
127
  var createError = __webpack_require__(/*! ../core/createError */ "../node_modules/axios/lib/core/createError.js");
128
+ var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
129
+ var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
128
130
 
129
131
  module.exports = function xhrAdapter(config) {
130
132
  return new Promise(function dispatchXhrRequest(resolve, reject) {
131
133
  var requestData = config.data;
132
134
  var requestHeaders = config.headers;
133
135
  var responseType = config.responseType;
136
+ var onCanceled;
137
+ function done() {
138
+ if (config.cancelToken) {
139
+ config.cancelToken.unsubscribe(onCanceled);
140
+ }
141
+
142
+ if (config.signal) {
143
+ config.signal.removeEventListener('abort', onCanceled);
144
+ }
145
+ }
134
146
 
135
147
  if (utils.isFormData(requestData)) {
136
148
  delete requestHeaders['Content-Type']; // Let the browser set it
@@ -168,7 +180,13 @@ module.exports = function xhrAdapter(config) {
168
180
  request: request
169
181
  };
170
182
 
171
- settle(resolve, reject, response);
183
+ settle(function _resolve(value) {
184
+ resolve(value);
185
+ done();
186
+ }, function _reject(err) {
187
+ reject(err);
188
+ done();
189
+ }, response);
172
190
 
173
191
  // Clean up request
174
192
  request = null;
@@ -221,14 +239,15 @@ module.exports = function xhrAdapter(config) {
221
239
 
222
240
  // Handle timeout
223
241
  request.ontimeout = function handleTimeout() {
224
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
242
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
243
+ var transitional = config.transitional || defaults.transitional;
225
244
  if (config.timeoutErrorMessage) {
226
245
  timeoutErrorMessage = config.timeoutErrorMessage;
227
246
  }
228
247
  reject(createError(
229
248
  timeoutErrorMessage,
230
249
  config,
231
- config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
250
+ transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
232
251
  request));
233
252
 
234
253
  // Clean up request
@@ -282,18 +301,22 @@ module.exports = function xhrAdapter(config) {
282
301
  request.upload.addEventListener('progress', config.onUploadProgress);
283
302
  }
284
303
 
285
- if (config.cancelToken) {
304
+ if (config.cancelToken || config.signal) {
286
305
  // Handle cancellation
287
- config.cancelToken.promise.then(function onCanceled(cancel) {
306
+ // eslint-disable-next-line func-names
307
+ onCanceled = function(cancel) {
288
308
  if (!request) {
289
309
  return;
290
310
  }
291
-
311
+ reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
292
312
  request.abort();
293
- reject(cancel);
294
- // Clean up request
295
313
  request = null;
296
- });
314
+ };
315
+
316
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
317
+ if (config.signal) {
318
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
319
+ }
297
320
  }
298
321
 
299
322
  if (!requestData) {
@@ -340,6 +363,11 @@ function createInstance(defaultConfig) {
340
363
  // Copy context to instance
341
364
  utils.extend(instance, context);
342
365
 
366
+ // Factory for creating new instances
367
+ instance.create = function create(instanceConfig) {
368
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
369
+ };
370
+
343
371
  return instance;
344
372
  }
345
373
 
@@ -349,15 +377,11 @@ var axios = createInstance(defaults);
349
377
  // Expose Axios class to allow class inheritance
350
378
  axios.Axios = Axios;
351
379
 
352
- // Factory for creating new instances
353
- axios.create = function create(instanceConfig) {
354
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
355
- };
356
-
357
380
  // Expose Cancel & CancelToken
358
381
  axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
359
382
  axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../node_modules/axios/lib/cancel/CancelToken.js");
360
383
  axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
384
+ axios.VERSION = __webpack_require__(/*! ./env/data */ "../node_modules/axios/lib/env/data.js").version;
361
385
 
362
386
  // Expose all/spread
363
387
  axios.all = function all(promises) {
@@ -431,11 +455,42 @@ function CancelToken(executor) {
431
455
  }
432
456
 
433
457
  var resolvePromise;
458
+
434
459
  this.promise = new Promise(function promiseExecutor(resolve) {
435
460
  resolvePromise = resolve;
436
461
  });
437
462
 
438
463
  var token = this;
464
+
465
+ // eslint-disable-next-line func-names
466
+ this.promise.then(function(cancel) {
467
+ if (!token._listeners) return;
468
+
469
+ var i;
470
+ var l = token._listeners.length;
471
+
472
+ for (i = 0; i < l; i++) {
473
+ token._listeners[i](cancel);
474
+ }
475
+ token._listeners = null;
476
+ });
477
+
478
+ // eslint-disable-next-line func-names
479
+ this.promise.then = function(onfulfilled) {
480
+ var _resolve;
481
+ // eslint-disable-next-line func-names
482
+ var promise = new Promise(function(resolve) {
483
+ token.subscribe(resolve);
484
+ _resolve = resolve;
485
+ }).then(onfulfilled);
486
+
487
+ promise.cancel = function reject() {
488
+ token.unsubscribe(_resolve);
489
+ };
490
+
491
+ return promise;
492
+ };
493
+
439
494
  executor(function cancel(message) {
440
495
  if (token.reason) {
441
496
  // Cancellation has already been requested
@@ -456,6 +511,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
456
511
  }
457
512
  };
458
513
 
514
+ /**
515
+ * Subscribe to the cancel signal
516
+ */
517
+
518
+ CancelToken.prototype.subscribe = function subscribe(listener) {
519
+ if (this.reason) {
520
+ listener(this.reason);
521
+ return;
522
+ }
523
+
524
+ if (this._listeners) {
525
+ this._listeners.push(listener);
526
+ } else {
527
+ this._listeners = [listener];
528
+ }
529
+ };
530
+
531
+ /**
532
+ * Unsubscribe from the cancel signal
533
+ */
534
+
535
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
536
+ if (!this._listeners) {
537
+ return;
538
+ }
539
+ var index = this._listeners.indexOf(listener);
540
+ if (index !== -1) {
541
+ this._listeners.splice(index, 1);
542
+ }
543
+ };
544
+
459
545
  /**
460
546
  * Returns an object that contains a new `CancelToken` and a function that, when called,
461
547
  * cancels the `CancelToken`.
@@ -529,14 +615,18 @@ function Axios(instanceConfig) {
529
615
  *
530
616
  * @param {Object} config The config specific for this request (merged with this.defaults)
531
617
  */
532
- Axios.prototype.request = function request(config) {
618
+ Axios.prototype.request = function request(configOrUrl, config) {
533
619
  /*eslint no-param-reassign:0*/
534
620
  // Allow for axios('example/url'[, config]) a la fetch API
535
- if (typeof config === 'string') {
536
- config = arguments[1] || {};
537
- config.url = arguments[0];
538
- } else {
621
+ if (typeof configOrUrl === 'string') {
539
622
  config = config || {};
623
+ config.url = configOrUrl;
624
+ } else {
625
+ config = configOrUrl || {};
626
+ }
627
+
628
+ if (!config.url) {
629
+ throw new Error('Provided config url is not valid');
540
630
  }
541
631
 
542
632
  config = mergeConfig(this.defaults, config);
@@ -554,9 +644,9 @@ Axios.prototype.request = function request(config) {
554
644
 
555
645
  if (transitional !== undefined) {
556
646
  validator.assertOptions(transitional, {
557
- silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
558
- forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
559
- clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
647
+ silentJSONParsing: validators.transitional(validators.boolean),
648
+ forcedJSONParsing: validators.transitional(validators.boolean),
649
+ clarifyTimeoutError: validators.transitional(validators.boolean)
560
650
  }, false);
561
651
  }
562
652
 
@@ -621,6 +711,9 @@ Axios.prototype.request = function request(config) {
621
711
  };
622
712
 
623
713
  Axios.prototype.getUri = function getUri(config) {
714
+ if (!config.url) {
715
+ throw new Error('Provided config url is not valid');
716
+ }
624
717
  config = mergeConfig(this.defaults, config);
625
718
  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
626
719
  };
@@ -795,6 +888,7 @@ var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/uti
795
888
  var transformData = __webpack_require__(/*! ./transformData */ "../node_modules/axios/lib/core/transformData.js");
796
889
  var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
797
890
  var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
891
+ var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
798
892
 
799
893
  /**
800
894
  * Throws a `Cancel` if cancellation has been requested.
@@ -803,6 +897,10 @@ function throwIfCancellationRequested(config) {
803
897
  if (config.cancelToken) {
804
898
  config.cancelToken.throwIfRequested();
805
899
  }
900
+
901
+ if (config.signal && config.signal.aborted) {
902
+ throw new Cancel('canceled');
903
+ }
806
904
  }
807
905
 
808
906
  /**
@@ -920,7 +1018,8 @@ module.exports = function enhanceError(error, config, code, request, response) {
920
1018
  stack: this.stack,
921
1019
  // Axios
922
1020
  config: this.config,
923
- code: this.code
1021
+ code: this.code,
1022
+ status: this.response && this.response.status ? this.response.status : null
924
1023
  };
925
1024
  };
926
1025
  return error;
@@ -954,17 +1053,6 @@ module.exports = function mergeConfig(config1, config2) {
954
1053
  config2 = config2 || {};
955
1054
  var config = {};
956
1055
 
957
- var valueFromConfig2Keys = ['url', 'method', 'data'];
958
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
959
- var defaultToConfig2Keys = [
960
- 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
961
- 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
962
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
963
- 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
964
- 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
965
- ];
966
- var directMergeKeys = ['validateStatus'];
967
-
968
1056
  function getMergedValue(target, source) {
969
1057
  if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
970
1058
  return utils.merge(target, source);
@@ -976,51 +1064,74 @@ module.exports = function mergeConfig(config1, config2) {
976
1064
  return source;
977
1065
  }
978
1066
 
1067
+ // eslint-disable-next-line consistent-return
979
1068
  function mergeDeepProperties(prop) {
980
1069
  if (!utils.isUndefined(config2[prop])) {
981
- config[prop] = getMergedValue(config1[prop], config2[prop]);
1070
+ return getMergedValue(config1[prop], config2[prop]);
982
1071
  } else if (!utils.isUndefined(config1[prop])) {
983
- config[prop] = getMergedValue(undefined, config1[prop]);
1072
+ return getMergedValue(undefined, config1[prop]);
984
1073
  }
985
1074
  }
986
1075
 
987
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
1076
+ // eslint-disable-next-line consistent-return
1077
+ function valueFromConfig2(prop) {
988
1078
  if (!utils.isUndefined(config2[prop])) {
989
- config[prop] = getMergedValue(undefined, config2[prop]);
1079
+ return getMergedValue(undefined, config2[prop]);
990
1080
  }
991
- });
992
-
993
- utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
1081
+ }
994
1082
 
995
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
1083
+ // eslint-disable-next-line consistent-return
1084
+ function defaultToConfig2(prop) {
996
1085
  if (!utils.isUndefined(config2[prop])) {
997
- config[prop] = getMergedValue(undefined, config2[prop]);
1086
+ return getMergedValue(undefined, config2[prop]);
998
1087
  } else if (!utils.isUndefined(config1[prop])) {
999
- config[prop] = getMergedValue(undefined, config1[prop]);
1088
+ return getMergedValue(undefined, config1[prop]);
1000
1089
  }
1001
- });
1090
+ }
1002
1091
 
1003
- utils.forEach(directMergeKeys, function merge(prop) {
1092
+ // eslint-disable-next-line consistent-return
1093
+ function mergeDirectKeys(prop) {
1004
1094
  if (prop in config2) {
1005
- config[prop] = getMergedValue(config1[prop], config2[prop]);
1095
+ return getMergedValue(config1[prop], config2[prop]);
1006
1096
  } else if (prop in config1) {
1007
- config[prop] = getMergedValue(undefined, config1[prop]);
1097
+ return getMergedValue(undefined, config1[prop]);
1008
1098
  }
1009
- });
1010
-
1011
- var axiosKeys = valueFromConfig2Keys
1012
- .concat(mergeDeepPropertiesKeys)
1013
- .concat(defaultToConfig2Keys)
1014
- .concat(directMergeKeys);
1099
+ }
1015
1100
 
1016
- var otherKeys = Object
1017
- .keys(config1)
1018
- .concat(Object.keys(config2))
1019
- .filter(function filterAxiosKeys(key) {
1020
- return axiosKeys.indexOf(key) === -1;
1021
- });
1101
+ var mergeMap = {
1102
+ 'url': valueFromConfig2,
1103
+ 'method': valueFromConfig2,
1104
+ 'data': valueFromConfig2,
1105
+ 'baseURL': defaultToConfig2,
1106
+ 'transformRequest': defaultToConfig2,
1107
+ 'transformResponse': defaultToConfig2,
1108
+ 'paramsSerializer': defaultToConfig2,
1109
+ 'timeout': defaultToConfig2,
1110
+ 'timeoutMessage': defaultToConfig2,
1111
+ 'withCredentials': defaultToConfig2,
1112
+ 'adapter': defaultToConfig2,
1113
+ 'responseType': defaultToConfig2,
1114
+ 'xsrfCookieName': defaultToConfig2,
1115
+ 'xsrfHeaderName': defaultToConfig2,
1116
+ 'onUploadProgress': defaultToConfig2,
1117
+ 'onDownloadProgress': defaultToConfig2,
1118
+ 'decompress': defaultToConfig2,
1119
+ 'maxContentLength': defaultToConfig2,
1120
+ 'maxBodyLength': defaultToConfig2,
1121
+ 'transport': defaultToConfig2,
1122
+ 'httpAgent': defaultToConfig2,
1123
+ 'httpsAgent': defaultToConfig2,
1124
+ 'cancelToken': defaultToConfig2,
1125
+ 'socketPath': defaultToConfig2,
1126
+ 'responseEncoding': defaultToConfig2,
1127
+ 'validateStatus': mergeDirectKeys
1128
+ };
1022
1129
 
1023
- utils.forEach(otherKeys, mergeDeepProperties);
1130
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
1131
+ var merge = mergeMap[prop] || mergeDeepProperties;
1132
+ var configValue = merge(prop);
1133
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
1134
+ });
1024
1135
 
1025
1136
  return config;
1026
1137
  };
@@ -1188,7 +1299,7 @@ var defaults = {
1188
1299
  }],
1189
1300
 
1190
1301
  transformResponse: [function transformResponse(data) {
1191
- var transitional = this.transitional;
1302
+ var transitional = this.transitional || defaults.transitional;
1192
1303
  var silentJSONParsing = transitional && transitional.silentJSONParsing;
1193
1304
  var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1194
1305
  var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
@@ -1223,12 +1334,12 @@ var defaults = {
1223
1334
 
1224
1335
  validateStatus: function validateStatus(status) {
1225
1336
  return status >= 200 && status < 300;
1226
- }
1227
- };
1337
+ },
1228
1338
 
1229
- defaults.headers = {
1230
- common: {
1231
- 'Accept': 'application/json, text/plain, */*'
1339
+ headers: {
1340
+ common: {
1341
+ 'Accept': 'application/json, text/plain, */*'
1342
+ }
1232
1343
  }
1233
1344
  };
1234
1345
 
@@ -1246,6 +1357,19 @@ module.exports = defaults;
1246
1357
 
1247
1358
  /***/ }),
1248
1359
 
1360
+ /***/ "../node_modules/axios/lib/env/data.js":
1361
+ /*!*********************************************!*\
1362
+ !*** ../node_modules/axios/lib/env/data.js ***!
1363
+ \*********************************************/
1364
+ /*! no static exports found */
1365
+ /***/ (function(module, exports) {
1366
+
1367
+ module.exports = {
1368
+ "version": "0.25.0"
1369
+ };
1370
+
1371
+ /***/ }),
1372
+
1249
1373
  /***/ "../node_modules/axios/lib/helpers/bind.js":
1250
1374
  /*!*************************************************!*\
1251
1375
  !*** ../node_modules/axios/lib/helpers/bind.js ***!
@@ -1462,7 +1586,7 @@ module.exports = function isAbsoluteURL(url) {
1462
1586
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1463
1587
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1464
1588
  // by any combination of letters, digits, plus, period, or hyphen.
1465
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1589
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1466
1590
  };
1467
1591
 
1468
1592
 
@@ -1478,6 +1602,8 @@ module.exports = function isAbsoluteURL(url) {
1478
1602
  "use strict";
1479
1603
 
1480
1604
 
1605
+ var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
1606
+
1481
1607
  /**
1482
1608
  * Determines whether the payload is an error thrown by Axios
1483
1609
  *
@@ -1485,7 +1611,7 @@ module.exports = function isAbsoluteURL(url) {
1485
1611
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
1486
1612
  */
1487
1613
  module.exports = function isAxiosError(payload) {
1488
- return (typeof payload === 'object') && (payload.isAxiosError === true);
1614
+ return utils.isObject(payload) && (payload.isAxiosError === true);
1489
1615
  };
1490
1616
 
1491
1617
 
@@ -1709,7 +1835,7 @@ module.exports = function spread(callback) {
1709
1835
  "use strict";
1710
1836
 
1711
1837
 
1712
- var pkg = __webpack_require__(/*! ./../../package.json */ "../node_modules/axios/package.json");
1838
+ var VERSION = __webpack_require__(/*! ../env/data */ "../node_modules/axios/lib/env/data.js").version;
1713
1839
 
1714
1840
  var validators = {};
1715
1841
 
@@ -1721,48 +1847,26 @@ var validators = {};
1721
1847
  });
1722
1848
 
1723
1849
  var deprecatedWarnings = {};
1724
- var currentVerArr = pkg.version.split('.');
1725
-
1726
- /**
1727
- * Compare package versions
1728
- * @param {string} version
1729
- * @param {string?} thanVersion
1730
- * @returns {boolean}
1731
- */
1732
- function isOlderVersion(version, thanVersion) {
1733
- var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
1734
- var destVer = version.split('.');
1735
- for (var i = 0; i < 3; i++) {
1736
- if (pkgVersionArr[i] > destVer[i]) {
1737
- return true;
1738
- } else if (pkgVersionArr[i] < destVer[i]) {
1739
- return false;
1740
- }
1741
- }
1742
- return false;
1743
- }
1744
1850
 
1745
1851
  /**
1746
1852
  * Transitional option validator
1747
- * @param {function|boolean?} validator
1748
- * @param {string?} version
1749
- * @param {string} message
1853
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
1854
+ * @param {string?} version - deprecated version / removed since version
1855
+ * @param {string?} message - some message with additional info
1750
1856
  * @returns {function}
1751
1857
  */
1752
1858
  validators.transitional = function transitional(validator, version, message) {
1753
- var isDeprecated = version && isOlderVersion(version);
1754
-
1755
1859
  function formatMessage(opt, desc) {
1756
- return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
1860
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
1757
1861
  }
1758
1862
 
1759
1863
  // eslint-disable-next-line func-names
1760
1864
  return function(value, opt, opts) {
1761
1865
  if (validator === false) {
1762
- throw new Error(formatMessage(opt, ' has been removed in ' + version));
1866
+ throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
1763
1867
  }
1764
1868
 
1765
- if (isDeprecated && !deprecatedWarnings[opt]) {
1869
+ if (version && !deprecatedWarnings[opt]) {
1766
1870
  deprecatedWarnings[opt] = true;
1767
1871
  // eslint-disable-next-line no-console
1768
1872
  console.warn(
@@ -1808,7 +1912,6 @@ function assertOptions(options, schema, allowUnknown) {
1808
1912
  }
1809
1913
 
1810
1914
  module.exports = {
1811
- isOlderVersion: isOlderVersion,
1812
1915
  assertOptions: assertOptions,
1813
1916
  validators: validators
1814
1917
  };
@@ -1839,7 +1942,7 @@ var toString = Object.prototype.toString;
1839
1942
  * @returns {boolean} True if value is an Array, otherwise false
1840
1943
  */
1841
1944
  function isArray(val) {
1842
- return toString.call(val) === '[object Array]';
1945
+ return Array.isArray(val);
1843
1946
  }
1844
1947
 
1845
1948
  /**
@@ -1880,7 +1983,7 @@ function isArrayBuffer(val) {
1880
1983
  * @returns {boolean} True if value is an FormData, otherwise false
1881
1984
  */
1882
1985
  function isFormData(val) {
1883
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
1986
+ return toString.call(val) === '[object FormData]';
1884
1987
  }
1885
1988
 
1886
1989
  /**
@@ -1894,7 +1997,7 @@ function isArrayBufferView(val) {
1894
1997
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
1895
1998
  result = ArrayBuffer.isView(val);
1896
1999
  } else {
1897
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
2000
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
1898
2001
  }
1899
2002
  return result;
1900
2003
  }
@@ -2001,7 +2104,7 @@ function isStream(val) {
2001
2104
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
2002
2105
  */
2003
2106
  function isURLSearchParams(val) {
2004
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
2107
+ return toString.call(val) === '[object URLSearchParams]';
2005
2108
  }
2006
2109
 
2007
2110
  /**
@@ -2175,17 +2278,6 @@ module.exports = {
2175
2278
  };
2176
2279
 
2177
2280
 
2178
- /***/ }),
2179
-
2180
- /***/ "../node_modules/axios/package.json":
2181
- /*!******************************************!*\
2182
- !*** ../node_modules/axios/package.json ***!
2183
- \******************************************/
2184
- /*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
2185
- /***/ (function(module) {
2186
-
2187
- module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.4\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://axios-http.com\",\"devDependencies\":{\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.3.0\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^23.0.0\",\"grunt-karma\":\"^4.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^4.0.2\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^6.3.2\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-firefox-launcher\":\"^2.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^4.3.6\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^8.2.1\",\"sinon\":\"^4.5.0\",\"terser-webpack-plugin\":\"^4.2.3\",\"typescript\":\"^4.0.5\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^4.44.2\",\"webpack-dev-server\":\"^3.11.0\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.14.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}");
2188
-
2189
2281
  /***/ }),
2190
2282
 
2191
2283
  /***/ "../node_modules/call-bind/callBound.js":
@@ -2571,7 +2663,7 @@ function noop() {
2571
2663
  return undefined;
2572
2664
  }
2573
2665
 
2574
- var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/([0-9]+)(%)/, {
2666
+ var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\d+)(%)/, {
2575
2667
  value: 1
2576
2668
  });
2577
2669
 
@@ -3055,6 +3147,8 @@ function getUserAgentHeader(sdk, application, integration, feature) {
3055
3147
  */
3056
3148
 
3057
3149
  function toPlainObject(data) {
3150
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3151
+ // @ts-expect-error
3058
3152
  return Object.defineProperty(data, 'toPlainObject', {
3059
3153
  enumerable: false,
3060
3154
  configurable: false,
@@ -3079,7 +3173,7 @@ function errorHandler(errorResponse) {
3079
3173
  var errorName; // Obscure the Management token
3080
3174
 
3081
3175
  if (config && config.headers && config.headers['Authorization']) {
3082
- var token = "...".concat(config.headers['Authorization'].substr(-5));
3176
+ var token = "...".concat(config.headers['Authorization'].toString().substr(-5));
3083
3177
  config.headers['Authorization'] = "Bearer ".concat(token);
3084
3178
  }
3085
3179
 
@@ -7638,6 +7732,8 @@ __webpack_require__.r(__webpack_exports__);
7638
7732
  /* harmony import */ var _webhook__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./webhook */ "./adapters/REST/endpoints/webhook.ts");
7639
7733
  /* harmony import */ var _workflow_definition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./workflow-definition */ "./adapters/REST/endpoints/workflow-definition.ts");
7640
7734
  /* harmony import */ var _workflow__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./workflow */ "./adapters/REST/endpoints/workflow.ts");
7735
+ /* harmony import */ var _workflows_changelog__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./workflows-changelog */ "./adapters/REST/endpoints/workflows-changelog.ts");
7736
+
7641
7737
 
7642
7738
 
7643
7739
 
@@ -7730,7 +7826,8 @@ __webpack_require__.r(__webpack_exports__);
7730
7826
  User: _user__WEBPACK_IMPORTED_MODULE_42__,
7731
7827
  Webhook: _webhook__WEBPACK_IMPORTED_MODULE_43__,
7732
7828
  WorkflowDefinition: _workflow_definition__WEBPACK_IMPORTED_MODULE_44__,
7733
- Workflow: _workflow__WEBPACK_IMPORTED_MODULE_45__
7829
+ Workflow: _workflow__WEBPACK_IMPORTED_MODULE_45__,
7830
+ WorkflowsChangelog: _workflows_changelog__WEBPACK_IMPORTED_MODULE_46__
7734
7831
  });
7735
7832
 
7736
7833
  /***/ }),
@@ -9317,6 +9414,32 @@ var complete = function complete(http, _ref2, headers) {
9317
9414
 
9318
9415
  /***/ }),
9319
9416
 
9417
+ /***/ "./adapters/REST/endpoints/workflows-changelog.ts":
9418
+ /*!********************************************************!*\
9419
+ !*** ./adapters/REST/endpoints/workflows-changelog.ts ***!
9420
+ \********************************************************/
9421
+ /*! exports provided: getMany */
9422
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
9423
+
9424
+ "use strict";
9425
+ __webpack_require__.r(__webpack_exports__);
9426
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMany", function() { return getMany; });
9427
+ /* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
9428
+
9429
+
9430
+ var getBaseUrl = function getBaseUrl(params) {
9431
+ return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/workflows_changelog");
9432
+ };
9433
+
9434
+ var getMany = function getMany(http, params, headers) {
9435
+ return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, getBaseUrl(params), {
9436
+ headers: headers,
9437
+ params: params.query
9438
+ });
9439
+ };
9440
+
9441
+ /***/ }),
9442
+
9320
9443
  /***/ "./adapters/REST/rest-adapter.ts":
9321
9444
  /*!***************************************!*\
9322
9445
  !*** ./adapters/REST/rest-adapter.ts ***!
@@ -10012,7 +10135,7 @@ function createClient(params) {
10012
10135
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10013
10136
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
10014
10137
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
10015
- "".concat(sdkMain, "/").concat("7.53.0"), params.application, params.integration, params.feature);
10138
+ "".concat(sdkMain, "/").concat("8.0.0"), params.application, params.integration, params.feature);
10016
10139
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
10017
10140
  // https://github.com/microsoft/TypeScript/issues/26591
10018
10141
  // @ts-expect-error
@@ -20430,6 +20553,9 @@ var addAlphaFeatures = function addAlphaFeatures(makeRequest, defaults, alphaFea
20430
20553
  delete: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Workflow', 'delete'),
20431
20554
  complete: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Workflow', 'complete')
20432
20555
  };
20556
+ alphaInterface.workflowsChangelog = {
20557
+ getMany: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'WorkflowsChangelog', 'getMany')
20558
+ };
20433
20559
  }
20434
20560
 
20435
20561
  return alphaInterface;