contentful-management 11.48.0 → 11.48.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.
@@ -24503,6 +24503,17 @@ module.exports = require("assert");
24503
24503
 
24504
24504
  /***/ }),
24505
24505
 
24506
+ /***/ "crypto":
24507
+ /*!*************************!*\
24508
+ !*** external "crypto" ***!
24509
+ \*************************/
24510
+ /***/ ((module) => {
24511
+
24512
+ "use strict";
24513
+ module.exports = require("crypto");
24514
+
24515
+ /***/ }),
24516
+
24506
24517
  /***/ "events":
24507
24518
  /*!*************************!*\
24508
24519
  !*** external "events" ***!
@@ -25254,7 +25265,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
25254
25265
  }
25255
25266
 
25256
25267
  // Parse url
25257
- const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_12__["default"])(config.baseURL, config.url);
25268
+ const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_12__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
25258
25269
  const parsed = new URL(fullPath, _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].hasBrowserEnv ? _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].origin : undefined);
25259
25270
  const protocol = parsed.protocol || supportedProtocols[0];
25260
25271
 
@@ -26397,6 +26408,15 @@ class Axios {
26397
26408
  }
26398
26409
  }
26399
26410
 
26411
+ // Set config.allowAbsoluteUrls
26412
+ if (config.allowAbsoluteUrls !== undefined) {
26413
+ // do nothing
26414
+ } else if (this.defaults.allowAbsoluteUrls !== undefined) {
26415
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
26416
+ } else {
26417
+ config.allowAbsoluteUrls = true;
26418
+ }
26419
+
26400
26420
  _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(config, {
26401
26421
  baseUrl: validators.spelling('baseURL'),
26402
26422
  withXsrfToken: validators.spelling('withXSRFToken')
@@ -26492,7 +26512,7 @@ class Axios {
26492
26512
 
26493
26513
  getUri(config) {
26494
26514
  config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config);
26495
- const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url);
26515
+ const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
26496
26516
  return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer);
26497
26517
  }
26498
26518
  }
@@ -27088,8 +27108,9 @@ __webpack_require__.r(__webpack_exports__);
27088
27108
  *
27089
27109
  * @returns {string} The combined full path
27090
27110
  */
27091
- function buildFullPath(baseURL, requestedURL) {
27092
- if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) {
27111
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
27112
+ let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
27113
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
27093
27114
  return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
27094
27115
  }
27095
27116
  return requestedURL;
@@ -27628,7 +27649,7 @@ __webpack_require__.r(__webpack_exports__);
27628
27649
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27629
27650
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
27630
27651
  /* harmony export */ });
27631
- const VERSION = "1.7.9";
27652
+ const VERSION = "1.8.4";
27632
27653
 
27633
27654
  /***/ }),
27634
27655
 
@@ -28415,14 +28436,16 @@ __webpack_require__.r(__webpack_exports__);
28415
28436
  /* harmony export */ });
28416
28437
  /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! util */ "util");
28417
28438
  /* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stream */ "stream");
28418
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
28419
- /* harmony import */ var _readBlob_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./readBlob.js */ "../node_modules/axios/lib/helpers/readBlob.js");
28439
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
28440
+ /* harmony import */ var _readBlob_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./readBlob.js */ "../node_modules/axios/lib/helpers/readBlob.js");
28441
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
28442
+
28420
28443
 
28421
28444
 
28422
28445
 
28423
28446
 
28424
28447
 
28425
- const BOUNDARY_ALPHABET = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].ALPHABET.ALPHA_DIGIT + '-_';
28448
+ const BOUNDARY_ALPHABET = _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].ALPHABET.ALPHA_DIGIT + '-_';
28426
28449
 
28427
28450
  const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder();
28428
28451
 
@@ -28433,7 +28456,7 @@ const CRLF_BYTES_COUNT = 2;
28433
28456
  class FormDataPart {
28434
28457
  constructor(name, value) {
28435
28458
  const {escapeName} = this.constructor;
28436
- const isStringValue = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isString(value);
28459
+ const isStringValue = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isString(value);
28437
28460
 
28438
28461
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
28439
28462
  !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
@@ -28460,10 +28483,10 @@ class FormDataPart {
28460
28483
 
28461
28484
  const {value} = this;
28462
28485
 
28463
- if(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isTypedArray(value)) {
28486
+ if(_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isTypedArray(value)) {
28464
28487
  yield value;
28465
28488
  } else {
28466
- yield* (0,_readBlob_js__WEBPACK_IMPORTED_MODULE_3__["default"])(value);
28489
+ yield* (0,_readBlob_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value);
28467
28490
  }
28468
28491
 
28469
28492
  yield CRLF_BYTES;
@@ -28482,10 +28505,10 @@ const formDataToStream = (form, headersHandler, options) => {
28482
28505
  const {
28483
28506
  tag = 'form-data-boundary',
28484
28507
  size = 25,
28485
- boundary = tag + '-' + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].generateString(size, BOUNDARY_ALPHABET)
28508
+ boundary = tag + '-' + _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].generateString(size, BOUNDARY_ALPHABET)
28486
28509
  } = options || {};
28487
28510
 
28488
- if(!_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFormData(form)) {
28511
+ if(!_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFormData(form)) {
28489
28512
  throw TypeError('FormData instance required');
28490
28513
  }
28491
28514
 
@@ -28505,7 +28528,7 @@ const formDataToStream = (form, headersHandler, options) => {
28505
28528
 
28506
28529
  contentLength += boundaryBytes.byteLength * parts.length;
28507
28530
 
28508
- contentLength = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].toFiniteNumber(contentLength);
28531
+ contentLength = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].toFiniteNumber(contentLength);
28509
28532
 
28510
28533
  const computedHeaders = {
28511
28534
  'Content-Type': `multipart/form-data; boundary=${boundary}`
@@ -28914,7 +28937,7 @@ __webpack_require__.r(__webpack_exports__);
28914
28937
 
28915
28938
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers);
28916
28939
 
28917
- newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
28940
+ newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
28918
28941
 
28919
28942
  // HTTP basic authentication
28920
28943
  if (auth) {
@@ -29762,18 +29785,45 @@ __webpack_require__.r(__webpack_exports__);
29762
29785
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29763
29786
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
29764
29787
  /* harmony export */ });
29765
- /* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "../node_modules/axios/lib/platform/node/classes/URLSearchParams.js");
29766
- /* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "../node_modules/axios/lib/platform/node/classes/FormData.js");
29788
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto */ "crypto");
29789
+ /* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "../node_modules/axios/lib/platform/node/classes/URLSearchParams.js");
29790
+ /* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/FormData.js */ "../node_modules/axios/lib/platform/node/classes/FormData.js");
29791
+
29792
+
29793
+
29794
+
29795
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
29796
+
29797
+ const DIGIT = '0123456789';
29798
+
29799
+ const ALPHABET = {
29800
+ DIGIT,
29801
+ ALPHA,
29802
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
29803
+ }
29804
+
29805
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
29806
+ let str = '';
29807
+ const {length} = alphabet;
29808
+ const randomValues = new Uint32Array(size);
29809
+ crypto__WEBPACK_IMPORTED_MODULE_0__.randomFillSync(randomValues);
29810
+ for (let i = 0; i < size; i++) {
29811
+ str += alphabet[randomValues[i] % length];
29812
+ }
29767
29813
 
29814
+ return str;
29815
+ }
29768
29816
 
29769
29817
 
29770
29818
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
29771
29819
  isNode: true,
29772
29820
  classes: {
29773
- URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
29774
- FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
29821
+ URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"],
29822
+ FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"],
29775
29823
  Blob: typeof Blob !== 'undefined' && Blob || null
29776
29824
  },
29825
+ ALPHABET,
29826
+ generateString,
29777
29827
  protocols: [ 'http', 'https', 'file', 'data' ]
29778
29828
  });
29779
29829
 
@@ -30396,26 +30446,6 @@ const toFiniteNumber = (value, defaultValue) => {
30396
30446
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
30397
30447
  }
30398
30448
 
30399
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
30400
-
30401
- const DIGIT = '0123456789';
30402
-
30403
- const ALPHABET = {
30404
- DIGIT,
30405
- ALPHA,
30406
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
30407
- }
30408
-
30409
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
30410
- let str = '';
30411
- const {length} = alphabet;
30412
- while (size--) {
30413
- str += alphabet[Math.random() * length|0]
30414
- }
30415
-
30416
- return str;
30417
- }
30418
-
30419
30449
  /**
30420
30450
  * If the thing is a FormData object, return true, otherwise return false.
30421
30451
  *
@@ -30543,8 +30573,6 @@ const asap = typeof queueMicrotask !== 'undefined' ?
30543
30573
  findKey,
30544
30574
  global: _global,
30545
30575
  isContextDefined,
30546
- ALPHABET,
30547
- generateString,
30548
30576
  isSpecCompliantForm,
30549
30577
  toJSONObject,
30550
30578
  isAsyncFn,
@@ -32008,7 +32036,7 @@ function createClient(params, opts = {}) {
32008
32036
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
32009
32037
  const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
32010
32038
  // @ts-expect-error
32011
- `${sdkMain}/${"11.48.0"}`, params.application, params.integration, params.feature);
32039
+ `${sdkMain}/${"11.48.2"}`, params.application, params.integration, params.feature);
32012
32040
  const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
32013
32041
  userAgent
32014
32042
  }));