contentful 9.2.16 → 9.2.18
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 +56 -42
- package/dist/contentful.browser.js.map +1 -1
- package/dist/contentful.browser.min.js +2 -2
- package/dist/contentful.node.js +56 -42
- package/dist/contentful.node.js.map +1 -1
- package/dist/contentful.node.min.js +2 -2
- package/dist/es-modules/contentful.js +1 -1
- package/package.json +5 -5
|
@@ -3037,6 +3037,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3037
3037
|
|
|
3038
3038
|
|
|
3039
3039
|
|
|
3040
|
+
function _iterableToArrayLimit(arr, i) {
|
|
3041
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3042
|
+
if (null != _i) {
|
|
3043
|
+
var _s,
|
|
3044
|
+
_e,
|
|
3045
|
+
_x,
|
|
3046
|
+
_r,
|
|
3047
|
+
_arr = [],
|
|
3048
|
+
_n = !0,
|
|
3049
|
+
_d = !1;
|
|
3050
|
+
try {
|
|
3051
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
3052
|
+
if (Object(_i) !== _i) return;
|
|
3053
|
+
_n = !1;
|
|
3054
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
3055
|
+
} catch (err) {
|
|
3056
|
+
_d = !0, _e = err;
|
|
3057
|
+
} finally {
|
|
3058
|
+
try {
|
|
3059
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
3060
|
+
} finally {
|
|
3061
|
+
if (_d) throw _e;
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
return _arr;
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3040
3067
|
function ownKeys(object, enumerableOnly) {
|
|
3041
3068
|
var keys = Object.keys(object);
|
|
3042
3069
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -3090,12 +3117,18 @@ function _wrapRegExp() {
|
|
|
3090
3117
|
}
|
|
3091
3118
|
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
|
|
3092
3119
|
var result = _super.exec.call(this, str);
|
|
3093
|
-
|
|
3120
|
+
if (result) {
|
|
3121
|
+
result.groups = buildGroups(result, this);
|
|
3122
|
+
var indices = result.indices;
|
|
3123
|
+
indices && (indices.groups = buildGroups(indices, this));
|
|
3124
|
+
}
|
|
3125
|
+
return result;
|
|
3094
3126
|
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
|
3095
3127
|
if ("string" == typeof substitution) {
|
|
3096
3128
|
var groups = _groups.get(this);
|
|
3097
3129
|
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
|
3098
|
-
|
|
3130
|
+
var group = groups[name];
|
|
3131
|
+
return "$" + (Array.isArray(group) ? group.join("$") : group);
|
|
3099
3132
|
}));
|
|
3100
3133
|
}
|
|
3101
3134
|
if ("function" == typeof substitution) {
|
|
@@ -3109,6 +3142,7 @@ function _wrapRegExp() {
|
|
|
3109
3142
|
}, _wrapRegExp.apply(this, arguments);
|
|
3110
3143
|
}
|
|
3111
3144
|
function _defineProperty(obj, key, value) {
|
|
3145
|
+
key = _toPropertyKey(key);
|
|
3112
3146
|
if (key in obj) {
|
|
3113
3147
|
Object.defineProperty(obj, key, {
|
|
3114
3148
|
value: value,
|
|
@@ -3150,30 +3184,6 @@ function _slicedToArray(arr, i) {
|
|
|
3150
3184
|
function _arrayWithHoles(arr) {
|
|
3151
3185
|
if (Array.isArray(arr)) return arr;
|
|
3152
3186
|
}
|
|
3153
|
-
function _iterableToArrayLimit(arr, i) {
|
|
3154
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3155
|
-
if (_i == null) return;
|
|
3156
|
-
var _arr = [];
|
|
3157
|
-
var _n = true;
|
|
3158
|
-
var _d = false;
|
|
3159
|
-
var _s, _e;
|
|
3160
|
-
try {
|
|
3161
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
3162
|
-
_arr.push(_s.value);
|
|
3163
|
-
if (i && _arr.length === i) break;
|
|
3164
|
-
}
|
|
3165
|
-
} catch (err) {
|
|
3166
|
-
_d = true;
|
|
3167
|
-
_e = err;
|
|
3168
|
-
} finally {
|
|
3169
|
-
try {
|
|
3170
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3171
|
-
} finally {
|
|
3172
|
-
if (_d) throw _e;
|
|
3173
|
-
}
|
|
3174
|
-
}
|
|
3175
|
-
return _arr;
|
|
3176
|
-
}
|
|
3177
3187
|
function _unsupportedIterableToArray(o, minLen) {
|
|
3178
3188
|
if (!o) return;
|
|
3179
3189
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -3241,16 +3251,28 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
3241
3251
|
}
|
|
3242
3252
|
};
|
|
3243
3253
|
}
|
|
3254
|
+
function _toPrimitive(input, hint) {
|
|
3255
|
+
if (typeof input !== "object" || input === null) return input;
|
|
3256
|
+
var prim = input[Symbol.toPrimitive];
|
|
3257
|
+
if (prim !== undefined) {
|
|
3258
|
+
var res = prim.call(input, hint || "default");
|
|
3259
|
+
if (typeof res !== "object") return res;
|
|
3260
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3261
|
+
}
|
|
3262
|
+
return (hint === "string" ? String : Number)(input);
|
|
3263
|
+
}
|
|
3264
|
+
function _toPropertyKey(arg) {
|
|
3265
|
+
var key = _toPrimitive(arg, "string");
|
|
3266
|
+
return typeof key === "symbol" ? key : String(key);
|
|
3267
|
+
}
|
|
3244
3268
|
|
|
3245
3269
|
function isNode() {
|
|
3246
3270
|
/**
|
|
3247
|
-
*
|
|
3248
|
-
*
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
**/
|
|
3253
|
-
return typeof process !== 'undefined' && !process.browser;
|
|
3271
|
+
* Save way to check for the global scope which should confirm if an environment is node
|
|
3272
|
+
* For reference: https://stackoverflow.com/a/31090240
|
|
3273
|
+
*/
|
|
3274
|
+
var isNodeFunc = new Function('try {return this===global;}catch(e){return false;}');
|
|
3275
|
+
return isNodeFunc();
|
|
3254
3276
|
}
|
|
3255
3277
|
function isReactNative() {
|
|
3256
3278
|
return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';
|
|
@@ -3495,14 +3517,6 @@ function createHttpClient(axios, options) {
|
|
|
3495
3517
|
if (!config.headers.Authorization && typeof config.accessToken !== 'function') {
|
|
3496
3518
|
config.headers.Authorization = 'Bearer ' + config.accessToken;
|
|
3497
3519
|
}
|
|
3498
|
-
|
|
3499
|
-
// Set these headers only for node because browsers don't like it when you
|
|
3500
|
-
// override user-agent or accept-encoding.
|
|
3501
|
-
// The SDKs should set their own X-Contentful-User-Agent.
|
|
3502
|
-
if (isNode()) {
|
|
3503
|
-
config.headers['user-agent'] = 'node.js/' + getNodeVersion();
|
|
3504
|
-
config.headers['Accept-Encoding'] = 'gzip';
|
|
3505
|
-
}
|
|
3506
3520
|
var axiosOptions = {
|
|
3507
3521
|
// Axios
|
|
3508
3522
|
baseURL: baseURL,
|
|
@@ -8889,7 +8903,7 @@ function createClient(params) {
|
|
|
8889
8903
|
environment: 'master'
|
|
8890
8904
|
};
|
|
8891
8905
|
const config = _objectSpread(_objectSpread({}, defaultConfig), params);
|
|
8892
|
-
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.
|
|
8906
|
+
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.18"}`, config.application, config.integration);
|
|
8893
8907
|
config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
|
|
8894
8908
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
8895
8909
|
'X-Contentful-User-Agent': userAgentHeader
|