contentful 9.1.7 → 9.1.8
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.browser.js +5 -3
- package/dist/contentful.browser.js.map +1 -1
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.node.js +5 -3
- package/dist/contentful.node.js.map +1 -1
- package/dist/contentful.node.min.js +1 -1
- package/dist/es-modules/contentful.js +1 -1
- package/package.json +2 -2
|
@@ -2819,7 +2819,7 @@ function noop() {
|
|
|
2819
2819
|
return undefined;
|
|
2820
2820
|
}
|
|
2821
2821
|
|
|
2822
|
-
var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(
|
|
2822
|
+
var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\d+)(%)/, {
|
|
2823
2823
|
value: 1
|
|
2824
2824
|
});
|
|
2825
2825
|
|
|
@@ -3303,6 +3303,8 @@ function getUserAgentHeader(sdk, application, integration, feature) {
|
|
|
3303
3303
|
*/
|
|
3304
3304
|
|
|
3305
3305
|
function toPlainObject(data) {
|
|
3306
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3307
|
+
// @ts-expect-error
|
|
3306
3308
|
return Object.defineProperty(data, 'toPlainObject', {
|
|
3307
3309
|
enumerable: false,
|
|
3308
3310
|
configurable: false,
|
|
@@ -3327,7 +3329,7 @@ function errorHandler(errorResponse) {
|
|
|
3327
3329
|
var errorName; // Obscure the Management token
|
|
3328
3330
|
|
|
3329
3331
|
if (config && config.headers && config.headers['Authorization']) {
|
|
3330
|
-
var token = "...".concat(config.headers['Authorization'].substr(-5));
|
|
3332
|
+
var token = "...".concat(config.headers['Authorization'].toString().substr(-5));
|
|
3331
3333
|
config.headers['Authorization'] = "Bearer ".concat(token);
|
|
3332
3334
|
}
|
|
3333
3335
|
|
|
@@ -6514,7 +6516,7 @@ function createClient(params) {
|
|
|
6514
6516
|
|
|
6515
6517
|
const config = _objectSpread(_objectSpread({}, defaultConfig), params);
|
|
6516
6518
|
|
|
6517
|
-
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.1.
|
|
6519
|
+
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.1.8"}`, config.application, config.integration);
|
|
6518
6520
|
config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
|
|
6519
6521
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
6520
6522
|
'X-Contentful-User-Agent': userAgentHeader
|