contentful-management 11.48.0 → 11.49.0-beta.1
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/contentful-management.browser.js +27 -29
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +74 -42
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/make-request.js +5 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/package.json +1 -1
|
@@ -4715,7 +4715,7 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
|
|
|
4715
4715
|
var makeRequest = /*#__PURE__*/function () {
|
|
4716
4716
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
4717
4717
|
var _endpoints$entityType;
|
|
4718
|
-
var axiosInstance, entityType, actionInput, params, payload, headers, userAgent, action, endpoint;
|
|
4718
|
+
var axiosInstance, entityType, actionInput, params, payload, headers, userAgent, action, endpoint, response;
|
|
4719
4719
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4720
4720
|
while (1) switch (_context.prev = _context.next) {
|
|
4721
4721
|
case 0:
|
|
@@ -4736,8 +4736,18 @@ var makeRequest = /*#__PURE__*/function () {
|
|
|
4736
4736
|
'X-Contentful-User-Agent': userAgent
|
|
4737
4737
|
} : {}));
|
|
4738
4738
|
case 7:
|
|
4739
|
+
response = _context.sent;
|
|
4740
|
+
if (!(response instanceof ReadableStream)) {
|
|
4741
|
+
_context.next = 12;
|
|
4742
|
+
break;
|
|
4743
|
+
}
|
|
4744
|
+
_context.next = 11;
|
|
4745
|
+
return new Response(response).json();
|
|
4746
|
+
case 11:
|
|
4739
4747
|
return _context.abrupt("return", _context.sent);
|
|
4740
|
-
case
|
|
4748
|
+
case 12:
|
|
4749
|
+
return _context.abrupt("return", response);
|
|
4750
|
+
case 13:
|
|
4741
4751
|
case "end":
|
|
4742
4752
|
return _context.stop();
|
|
4743
4753
|
}
|
|
@@ -23597,6 +23607,15 @@ class Axios {
|
|
|
23597
23607
|
}
|
|
23598
23608
|
}
|
|
23599
23609
|
|
|
23610
|
+
// Set config.allowAbsoluteUrls
|
|
23611
|
+
if (config.allowAbsoluteUrls !== undefined) {
|
|
23612
|
+
// do nothing
|
|
23613
|
+
} else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
|
23614
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
23615
|
+
} else {
|
|
23616
|
+
config.allowAbsoluteUrls = true;
|
|
23617
|
+
}
|
|
23618
|
+
|
|
23600
23619
|
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(config, {
|
|
23601
23620
|
baseUrl: validators.spelling('baseURL'),
|
|
23602
23621
|
withXsrfToken: validators.spelling('withXSRFToken')
|
|
@@ -23692,7 +23711,7 @@ class Axios {
|
|
|
23692
23711
|
|
|
23693
23712
|
getUri(config) {
|
|
23694
23713
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config);
|
|
23695
|
-
const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url);
|
|
23714
|
+
const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
23696
23715
|
return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer);
|
|
23697
23716
|
}
|
|
23698
23717
|
}
|
|
@@ -24279,8 +24298,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24279
24298
|
*
|
|
24280
24299
|
* @returns {string} The combined full path
|
|
24281
24300
|
*/
|
|
24282
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
24283
|
-
|
|
24301
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
24302
|
+
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
|
|
24303
|
+
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
|
24284
24304
|
return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
|
|
24285
24305
|
}
|
|
24286
24306
|
return requestedURL;
|
|
@@ -24813,7 +24833,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24813
24833
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24814
24834
|
/* harmony export */ VERSION: function() { return /* binding */ VERSION; }
|
|
24815
24835
|
/* harmony export */ });
|
|
24816
|
-
const VERSION = "1.
|
|
24836
|
+
const VERSION = "1.8.2";
|
|
24817
24837
|
|
|
24818
24838
|
/***/ }),
|
|
24819
24839
|
|
|
@@ -27093,26 +27113,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
27093
27113
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
27094
27114
|
}
|
|
27095
27115
|
|
|
27096
|
-
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
|
|
27097
|
-
|
|
27098
|
-
const DIGIT = '0123456789';
|
|
27099
|
-
|
|
27100
|
-
const ALPHABET = {
|
|
27101
|
-
DIGIT,
|
|
27102
|
-
ALPHA,
|
|
27103
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
27104
|
-
}
|
|
27105
|
-
|
|
27106
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
27107
|
-
let str = '';
|
|
27108
|
-
const {length} = alphabet;
|
|
27109
|
-
while (size--) {
|
|
27110
|
-
str += alphabet[Math.random() * length|0]
|
|
27111
|
-
}
|
|
27112
|
-
|
|
27113
|
-
return str;
|
|
27114
|
-
}
|
|
27115
|
-
|
|
27116
27116
|
/**
|
|
27117
27117
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
27118
27118
|
*
|
|
@@ -27240,8 +27240,6 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|
|
27240
27240
|
findKey,
|
|
27241
27241
|
global: _global,
|
|
27242
27242
|
isContextDefined,
|
|
27243
|
-
ALPHABET,
|
|
27244
|
-
generateString,
|
|
27245
27243
|
isSpecCompliantForm,
|
|
27246
27244
|
toJSONObject,
|
|
27247
27245
|
isAsyncFn,
|
|
@@ -28704,7 +28702,7 @@ function createClient(params) {
|
|
|
28704
28702
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28705
28703
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
28706
28704
|
var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
|
|
28707
|
-
"".concat(sdkMain, "/").concat("11.
|
|
28705
|
+
"".concat(sdkMain, "/").concat("11.49.0-beta.1"), params.application, params.integration, params.feature);
|
|
28708
28706
|
var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
28709
28707
|
userAgent: userAgent
|
|
28710
28708
|
}));
|