contentful 9.2.7 → 9.2.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 +14 -425
- package/dist/contentful.browser.js.map +1 -1
- package/dist/contentful.browser.min.js +3 -3
- package/dist/contentful.node.js +14 -419
- package/dist/contentful.node.js.map +1 -1
- package/dist/contentful.node.min.js +3 -3
- package/dist/es-modules/contentful.js +1 -1
- package/package.json +2 -2
|
@@ -2848,7 +2848,7 @@ if ($defineProperty) {
|
|
|
2848
2848
|
|
|
2849
2849
|
"use strict";
|
|
2850
2850
|
__webpack_require__.r(__webpack_exports__);
|
|
2851
|
-
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/
|
|
2851
|
+
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
|
|
2852
2852
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);
|
|
2853
2853
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
2854
2854
|
|
|
@@ -3003,426 +3003,6 @@ var resolveResponse = function resolveResponse(response, options) {
|
|
|
3003
3003
|
|
|
3004
3004
|
/* harmony default export */ __webpack_exports__["default"] = (resolveResponse);
|
|
3005
3005
|
|
|
3006
|
-
/***/ }),
|
|
3007
|
-
|
|
3008
|
-
/***/ "../node_modules/contentful-resolve-response/node_modules/fast-copy/dist/umd/index.js":
|
|
3009
|
-
/*!********************************************************************************************!*\
|
|
3010
|
-
!*** ../node_modules/contentful-resolve-response/node_modules/fast-copy/dist/umd/index.js ***!
|
|
3011
|
-
\********************************************************************************************/
|
|
3012
|
-
/*! no static exports found */
|
|
3013
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3014
|
-
|
|
3015
|
-
(function (global, factory) {
|
|
3016
|
-
true ? factory(exports) :
|
|
3017
|
-
undefined;
|
|
3018
|
-
})(this, (function (exports) { 'use strict';
|
|
3019
|
-
|
|
3020
|
-
var toStringFunction = Function.prototype.toString;
|
|
3021
|
-
var create = Object.create;
|
|
3022
|
-
var toStringObject = Object.prototype.toString;
|
|
3023
|
-
/**
|
|
3024
|
-
* @classdesc Fallback cache for when WeakMap is not natively supported
|
|
3025
|
-
*/
|
|
3026
|
-
var LegacyCache = /** @class */ (function () {
|
|
3027
|
-
function LegacyCache() {
|
|
3028
|
-
this._keys = [];
|
|
3029
|
-
this._values = [];
|
|
3030
|
-
}
|
|
3031
|
-
LegacyCache.prototype.has = function (key) {
|
|
3032
|
-
return !!~this._keys.indexOf(key);
|
|
3033
|
-
};
|
|
3034
|
-
LegacyCache.prototype.get = function (key) {
|
|
3035
|
-
return this._values[this._keys.indexOf(key)];
|
|
3036
|
-
};
|
|
3037
|
-
LegacyCache.prototype.set = function (key, value) {
|
|
3038
|
-
this._keys.push(key);
|
|
3039
|
-
this._values.push(value);
|
|
3040
|
-
};
|
|
3041
|
-
return LegacyCache;
|
|
3042
|
-
}());
|
|
3043
|
-
function createCacheLegacy() {
|
|
3044
|
-
return new LegacyCache();
|
|
3045
|
-
}
|
|
3046
|
-
function createCacheModern() {
|
|
3047
|
-
return new WeakMap();
|
|
3048
|
-
}
|
|
3049
|
-
/**
|
|
3050
|
-
* Get a new cache object to prevent circular references.
|
|
3051
|
-
*/
|
|
3052
|
-
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
|
3053
|
-
/**
|
|
3054
|
-
* Get an empty version of the object with the same prototype it has.
|
|
3055
|
-
*/
|
|
3056
|
-
function getCleanClone(prototype) {
|
|
3057
|
-
if (!prototype) {
|
|
3058
|
-
return create(null);
|
|
3059
|
-
}
|
|
3060
|
-
var Constructor = prototype.constructor;
|
|
3061
|
-
if (Constructor === Object) {
|
|
3062
|
-
return prototype === Object.prototype ? {} : create(prototype);
|
|
3063
|
-
}
|
|
3064
|
-
if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
|
3065
|
-
try {
|
|
3066
|
-
return new Constructor();
|
|
3067
|
-
}
|
|
3068
|
-
catch (_a) { }
|
|
3069
|
-
}
|
|
3070
|
-
return create(prototype);
|
|
3071
|
-
}
|
|
3072
|
-
function getRegExpFlagsLegacy(regExp) {
|
|
3073
|
-
var flags = '';
|
|
3074
|
-
if (regExp.global) {
|
|
3075
|
-
flags += 'g';
|
|
3076
|
-
}
|
|
3077
|
-
if (regExp.ignoreCase) {
|
|
3078
|
-
flags += 'i';
|
|
3079
|
-
}
|
|
3080
|
-
if (regExp.multiline) {
|
|
3081
|
-
flags += 'm';
|
|
3082
|
-
}
|
|
3083
|
-
if (regExp.unicode) {
|
|
3084
|
-
flags += 'u';
|
|
3085
|
-
}
|
|
3086
|
-
if (regExp.sticky) {
|
|
3087
|
-
flags += 'y';
|
|
3088
|
-
}
|
|
3089
|
-
return flags;
|
|
3090
|
-
}
|
|
3091
|
-
function getRegExpFlagsModern(regExp) {
|
|
3092
|
-
return regExp.flags;
|
|
3093
|
-
}
|
|
3094
|
-
/**
|
|
3095
|
-
* Get the flags to apply to the copied regexp.
|
|
3096
|
-
*/
|
|
3097
|
-
var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
|
|
3098
|
-
function getTagLegacy(value) {
|
|
3099
|
-
var type = toStringObject.call(value);
|
|
3100
|
-
return type.substring(8, type.length - 1);
|
|
3101
|
-
}
|
|
3102
|
-
function getTagModern(value) {
|
|
3103
|
-
return value[Symbol.toStringTag] || getTagLegacy(value);
|
|
3104
|
-
}
|
|
3105
|
-
/**
|
|
3106
|
-
* Get the tag of the value passed, so that the correct copier can be used.
|
|
3107
|
-
*/
|
|
3108
|
-
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
|
3109
|
-
|
|
3110
|
-
var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
3111
|
-
var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
|
3112
|
-
var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
|
|
3113
|
-
function getStrictPropertiesModern(object) {
|
|
3114
|
-
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
|
3115
|
-
}
|
|
3116
|
-
/**
|
|
3117
|
-
* Get the properites used when copying objects strictly. This includes both keys and symbols.
|
|
3118
|
-
*/
|
|
3119
|
-
var getStrictProperties = SUPPORTS_SYMBOL
|
|
3120
|
-
? getStrictPropertiesModern
|
|
3121
|
-
: getOwnPropertyNames;
|
|
3122
|
-
/**
|
|
3123
|
-
* Striclty copy all properties contained on the object.
|
|
3124
|
-
*/
|
|
3125
|
-
function copyOwnPropertiesStrict(value, clone, state) {
|
|
3126
|
-
var properties = getStrictProperties(value);
|
|
3127
|
-
for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
|
|
3128
|
-
property = properties[index];
|
|
3129
|
-
if (property === 'callee' || property === 'caller') {
|
|
3130
|
-
continue;
|
|
3131
|
-
}
|
|
3132
|
-
descriptor = getOwnPropertyDescriptor(value, property);
|
|
3133
|
-
if (!descriptor) {
|
|
3134
|
-
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
|
3135
|
-
// the loose assignment.
|
|
3136
|
-
clone[property] = state.copier(value[property], state);
|
|
3137
|
-
continue;
|
|
3138
|
-
}
|
|
3139
|
-
// Only clone the value if actually a value, not a getter / setter.
|
|
3140
|
-
if (!descriptor.get && !descriptor.set) {
|
|
3141
|
-
descriptor.value = state.copier(descriptor.value, state);
|
|
3142
|
-
}
|
|
3143
|
-
try {
|
|
3144
|
-
defineProperty(clone, property, descriptor);
|
|
3145
|
-
}
|
|
3146
|
-
catch (error) {
|
|
3147
|
-
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
|
3148
|
-
clone[property] = descriptor.value;
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
return clone;
|
|
3152
|
-
}
|
|
3153
|
-
/**
|
|
3154
|
-
* Deeply copy the indexed values in the array.
|
|
3155
|
-
*/
|
|
3156
|
-
function copyArrayLoose(array, state) {
|
|
3157
|
-
var clone = new state.Constructor();
|
|
3158
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3159
|
-
state.cache.set(array, clone);
|
|
3160
|
-
for (var index = 0, length_2 = array.length; index < length_2; ++index) {
|
|
3161
|
-
clone[index] = state.copier(array[index], state);
|
|
3162
|
-
}
|
|
3163
|
-
return clone;
|
|
3164
|
-
}
|
|
3165
|
-
/**
|
|
3166
|
-
* Deeply copy the indexed values in the array, as well as any custom properties.
|
|
3167
|
-
*/
|
|
3168
|
-
function copyArrayStrict(array, state) {
|
|
3169
|
-
var clone = new state.Constructor();
|
|
3170
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3171
|
-
state.cache.set(array, clone);
|
|
3172
|
-
return copyOwnPropertiesStrict(array, clone, state);
|
|
3173
|
-
}
|
|
3174
|
-
/**
|
|
3175
|
-
* Copy the contents of the ArrayBuffer.
|
|
3176
|
-
*/
|
|
3177
|
-
function copyArrayBuffer(arrayBuffer, _state) {
|
|
3178
|
-
return arrayBuffer.slice(0);
|
|
3179
|
-
}
|
|
3180
|
-
/**
|
|
3181
|
-
* Create a new Blob with the contents of the original.
|
|
3182
|
-
*/
|
|
3183
|
-
function copyBlob(blob, _state) {
|
|
3184
|
-
return blob.slice(0, blob.size, blob.type);
|
|
3185
|
-
}
|
|
3186
|
-
/**
|
|
3187
|
-
* Create a new DataView with the contents of the original.
|
|
3188
|
-
*/
|
|
3189
|
-
function copyDataView(dataView, state) {
|
|
3190
|
-
return new state.Constructor(copyArrayBuffer(dataView.buffer));
|
|
3191
|
-
}
|
|
3192
|
-
/**
|
|
3193
|
-
* Create a new Date based on the time of the original.
|
|
3194
|
-
*/
|
|
3195
|
-
function copyDate(date, state) {
|
|
3196
|
-
return new state.Constructor(date.getTime());
|
|
3197
|
-
}
|
|
3198
|
-
/**
|
|
3199
|
-
* Deeply copy the keys and values of the original.
|
|
3200
|
-
*/
|
|
3201
|
-
function copyMapLoose(map, state) {
|
|
3202
|
-
var clone = new state.Constructor();
|
|
3203
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3204
|
-
state.cache.set(map, clone);
|
|
3205
|
-
map.forEach(function (value, key) {
|
|
3206
|
-
clone.set(key, state.copier(value, state));
|
|
3207
|
-
});
|
|
3208
|
-
return clone;
|
|
3209
|
-
}
|
|
3210
|
-
/**
|
|
3211
|
-
* Deeply copy the keys and values of the original, as well as any custom properties.
|
|
3212
|
-
*/
|
|
3213
|
-
function copyMapStrict(map, state) {
|
|
3214
|
-
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
|
3215
|
-
}
|
|
3216
|
-
function copyObjectLooseLegacy(object, state) {
|
|
3217
|
-
var clone = getCleanClone(state.prototype);
|
|
3218
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3219
|
-
state.cache.set(object, clone);
|
|
3220
|
-
for (var key in object) {
|
|
3221
|
-
if (hasOwnProperty.call(object, key)) {
|
|
3222
|
-
clone[key] = state.copier(object[key], state);
|
|
3223
|
-
}
|
|
3224
|
-
}
|
|
3225
|
-
return clone;
|
|
3226
|
-
}
|
|
3227
|
-
function copyObjectLooseModern(object, state) {
|
|
3228
|
-
var clone = getCleanClone(state.prototype);
|
|
3229
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3230
|
-
state.cache.set(object, clone);
|
|
3231
|
-
for (var key in object) {
|
|
3232
|
-
if (hasOwnProperty.call(object, key)) {
|
|
3233
|
-
clone[key] = state.copier(object[key], state);
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
var symbols = getOwnPropertySymbols(object);
|
|
3237
|
-
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
|
3238
|
-
symbol = symbols[index];
|
|
3239
|
-
if (propertyIsEnumerable.call(object, symbol)) {
|
|
3240
|
-
clone[symbol] = state.copier(object[symbol], state);
|
|
3241
|
-
}
|
|
3242
|
-
}
|
|
3243
|
-
return clone;
|
|
3244
|
-
}
|
|
3245
|
-
/**
|
|
3246
|
-
* Deeply copy the properties (keys and symbols) and values of the original.
|
|
3247
|
-
*/
|
|
3248
|
-
var copyObjectLoose = SUPPORTS_SYMBOL
|
|
3249
|
-
? copyObjectLooseModern
|
|
3250
|
-
: copyObjectLooseLegacy;
|
|
3251
|
-
/**
|
|
3252
|
-
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
|
3253
|
-
* as any hidden or non-enumerable properties.
|
|
3254
|
-
*/
|
|
3255
|
-
function copyObjectStrict(object, state) {
|
|
3256
|
-
var clone = getCleanClone(state.prototype);
|
|
3257
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3258
|
-
state.cache.set(object, clone);
|
|
3259
|
-
return copyOwnPropertiesStrict(object, clone, state);
|
|
3260
|
-
}
|
|
3261
|
-
/**
|
|
3262
|
-
* Create a new primitive wrapper from the value of the original.
|
|
3263
|
-
*/
|
|
3264
|
-
function copyPrimitiveWrapper(primitiveObject, state) {
|
|
3265
|
-
return new state.Constructor(primitiveObject.valueOf());
|
|
3266
|
-
}
|
|
3267
|
-
/**
|
|
3268
|
-
* Create a new RegExp based on the value and flags of the original.
|
|
3269
|
-
*/
|
|
3270
|
-
function copyRegExp(regExp, state) {
|
|
3271
|
-
var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
|
|
3272
|
-
clone.lastIndex = regExp.lastIndex;
|
|
3273
|
-
return clone;
|
|
3274
|
-
}
|
|
3275
|
-
/**
|
|
3276
|
-
* Return the original value (an identity function).
|
|
3277
|
-
*
|
|
3278
|
-
* @note
|
|
3279
|
-
* THis is used for objects that cannot be copied, such as WeakMap.
|
|
3280
|
-
*/
|
|
3281
|
-
function copySelf(value, _state) {
|
|
3282
|
-
return value;
|
|
3283
|
-
}
|
|
3284
|
-
/**
|
|
3285
|
-
* Deeply copy the values of the original.
|
|
3286
|
-
*/
|
|
3287
|
-
function copySetLoose(set, state) {
|
|
3288
|
-
var clone = new state.Constructor();
|
|
3289
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
3290
|
-
state.cache.set(set, clone);
|
|
3291
|
-
set.forEach(function (value) {
|
|
3292
|
-
clone.add(state.copier(value, state));
|
|
3293
|
-
});
|
|
3294
|
-
return clone;
|
|
3295
|
-
}
|
|
3296
|
-
/**
|
|
3297
|
-
* Deeply copy the values of the original, as well as any custom properties.
|
|
3298
|
-
*/
|
|
3299
|
-
function copySetStrict(set, state) {
|
|
3300
|
-
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
|
3301
|
-
}
|
|
3302
|
-
|
|
3303
|
-
var isArray = Array.isArray;
|
|
3304
|
-
var assign = Object.assign, getPrototypeOf = Object.getPrototypeOf;
|
|
3305
|
-
var DEFAULT_LOOSE_OPTIONS = {
|
|
3306
|
-
array: copyArrayLoose,
|
|
3307
|
-
arrayBuffer: copyArrayBuffer,
|
|
3308
|
-
blob: copyBlob,
|
|
3309
|
-
dataView: copyDataView,
|
|
3310
|
-
date: copyDate,
|
|
3311
|
-
error: copySelf,
|
|
3312
|
-
map: copyMapLoose,
|
|
3313
|
-
object: copyObjectLoose,
|
|
3314
|
-
regExp: copyRegExp,
|
|
3315
|
-
set: copySetLoose,
|
|
3316
|
-
};
|
|
3317
|
-
var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
|
|
3318
|
-
array: copyArrayStrict,
|
|
3319
|
-
map: copyMapStrict,
|
|
3320
|
-
object: copyObjectStrict,
|
|
3321
|
-
set: copySetStrict,
|
|
3322
|
-
});
|
|
3323
|
-
/**
|
|
3324
|
-
* Get the copiers used for each specific object tag.
|
|
3325
|
-
*/
|
|
3326
|
-
function getTagSpecificCopiers(options) {
|
|
3327
|
-
return {
|
|
3328
|
-
Arguments: options.object,
|
|
3329
|
-
Array: options.array,
|
|
3330
|
-
ArrayBuffer: options.arrayBuffer,
|
|
3331
|
-
Blob: options.blob,
|
|
3332
|
-
Boolean: copyPrimitiveWrapper,
|
|
3333
|
-
DataView: options.dataView,
|
|
3334
|
-
Date: options.date,
|
|
3335
|
-
Error: options.error,
|
|
3336
|
-
Float32Array: options.arrayBuffer,
|
|
3337
|
-
Float64Array: options.arrayBuffer,
|
|
3338
|
-
Int8Array: options.arrayBuffer,
|
|
3339
|
-
Int16Array: options.arrayBuffer,
|
|
3340
|
-
Int32Array: options.arrayBuffer,
|
|
3341
|
-
Map: options.map,
|
|
3342
|
-
Number: copyPrimitiveWrapper,
|
|
3343
|
-
Object: options.object,
|
|
3344
|
-
Promise: copySelf,
|
|
3345
|
-
RegExp: options.regExp,
|
|
3346
|
-
Set: options.set,
|
|
3347
|
-
String: copyPrimitiveWrapper,
|
|
3348
|
-
WeakMap: copySelf,
|
|
3349
|
-
WeakSet: copySelf,
|
|
3350
|
-
Uint8Array: options.arrayBuffer,
|
|
3351
|
-
Uint8ClampedArray: options.arrayBuffer,
|
|
3352
|
-
Uint16Array: options.arrayBuffer,
|
|
3353
|
-
Uint32Array: options.arrayBuffer,
|
|
3354
|
-
Uint64Array: options.arrayBuffer,
|
|
3355
|
-
};
|
|
3356
|
-
}
|
|
3357
|
-
/**
|
|
3358
|
-
* Create a custom copier based on the object-specific copy methods passed.
|
|
3359
|
-
*/
|
|
3360
|
-
function createCopier(options) {
|
|
3361
|
-
var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
|
|
3362
|
-
var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
|
|
3363
|
-
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
|
3364
|
-
function copier(value, state) {
|
|
3365
|
-
state.prototype = state.Constructor = undefined;
|
|
3366
|
-
if (!value || typeof value !== 'object') {
|
|
3367
|
-
return value;
|
|
3368
|
-
}
|
|
3369
|
-
if (state.cache.has(value)) {
|
|
3370
|
-
return state.cache.get(value);
|
|
3371
|
-
}
|
|
3372
|
-
state.prototype = value.__proto__ || getPrototypeOf(value);
|
|
3373
|
-
state.Constructor = state.prototype && state.prototype.constructor;
|
|
3374
|
-
// plain objects
|
|
3375
|
-
if (!state.Constructor || state.Constructor === Object) {
|
|
3376
|
-
return object(value, state);
|
|
3377
|
-
}
|
|
3378
|
-
// arrays
|
|
3379
|
-
if (isArray(value)) {
|
|
3380
|
-
return array(value, state);
|
|
3381
|
-
}
|
|
3382
|
-
var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
|
|
3383
|
-
if (tagSpecificCopier) {
|
|
3384
|
-
return tagSpecificCopier(value, state);
|
|
3385
|
-
}
|
|
3386
|
-
return typeof value.then === 'function' ? value : object(value, state);
|
|
3387
|
-
}
|
|
3388
|
-
return function copy(value) {
|
|
3389
|
-
return copier(value, {
|
|
3390
|
-
Constructor: undefined,
|
|
3391
|
-
cache: createCache(),
|
|
3392
|
-
copier: copier,
|
|
3393
|
-
prototype: undefined,
|
|
3394
|
-
});
|
|
3395
|
-
};
|
|
3396
|
-
}
|
|
3397
|
-
/**
|
|
3398
|
-
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
|
3399
|
-
* same internals as `copyStrict`.
|
|
3400
|
-
*/
|
|
3401
|
-
function createStrictCopier(options) {
|
|
3402
|
-
return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
|
|
3403
|
-
}
|
|
3404
|
-
/**
|
|
3405
|
-
* Copy an value deeply as much as possible, where strict recreation of object properties
|
|
3406
|
-
* are maintained. All properties (including non-enumerable ones) are copied with their
|
|
3407
|
-
* original property descriptors on both objects and arrays.
|
|
3408
|
-
*/
|
|
3409
|
-
var copyStrict = createStrictCopier({});
|
|
3410
|
-
/**
|
|
3411
|
-
* Copy an value deeply as much as possible.
|
|
3412
|
-
*/
|
|
3413
|
-
var index = createCopier({});
|
|
3414
|
-
|
|
3415
|
-
exports.copyStrict = copyStrict;
|
|
3416
|
-
exports.createCopier = createCopier;
|
|
3417
|
-
exports.createStrictCopier = createStrictCopier;
|
|
3418
|
-
exports["default"] = index;
|
|
3419
|
-
|
|
3420
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3421
|
-
|
|
3422
|
-
}));
|
|
3423
|
-
//# sourceMappingURL=index.js.map
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
3006
|
/***/ }),
|
|
3427
3007
|
|
|
3428
3008
|
/***/ "../node_modules/contentful-sdk-core/dist/index.es-modules.js":
|
|
@@ -9008,6 +8588,7 @@ var stringify = function stringify(
|
|
|
9008
8588
|
object,
|
|
9009
8589
|
prefix,
|
|
9010
8590
|
generateArrayPrefix,
|
|
8591
|
+
commaRoundTrip,
|
|
9011
8592
|
strictNullHandling,
|
|
9012
8593
|
skipNulls,
|
|
9013
8594
|
encoder,
|
|
@@ -9072,7 +8653,7 @@ var stringify = function stringify(
|
|
|
9072
8653
|
for (var i = 0; i < valuesArray.length; ++i) {
|
|
9073
8654
|
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
|
|
9074
8655
|
}
|
|
9075
|
-
return [formatter(keyValue) + '=' + valuesJoined];
|
|
8656
|
+
return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
|
|
9076
8657
|
}
|
|
9077
8658
|
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
9078
8659
|
}
|
|
@@ -9096,6 +8677,8 @@ var stringify = function stringify(
|
|
|
9096
8677
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
9097
8678
|
}
|
|
9098
8679
|
|
|
8680
|
+
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
8681
|
+
|
|
9099
8682
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
9100
8683
|
var key = objKeys[j];
|
|
9101
8684
|
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
@@ -9105,8 +8688,8 @@ var stringify = function stringify(
|
|
|
9105
8688
|
}
|
|
9106
8689
|
|
|
9107
8690
|
var keyPrefix = isArray(obj)
|
|
9108
|
-
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(
|
|
9109
|
-
:
|
|
8691
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
8692
|
+
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
9110
8693
|
|
|
9111
8694
|
sideChannel.set(object, step);
|
|
9112
8695
|
var valueSideChannel = getSideChannel();
|
|
@@ -9115,6 +8698,7 @@ var stringify = function stringify(
|
|
|
9115
8698
|
value,
|
|
9116
8699
|
keyPrefix,
|
|
9117
8700
|
generateArrayPrefix,
|
|
8701
|
+
commaRoundTrip,
|
|
9118
8702
|
strictNullHandling,
|
|
9119
8703
|
skipNulls,
|
|
9120
8704
|
encoder,
|
|
@@ -9211,6 +8795,10 @@ module.exports = function (object, opts) {
|
|
|
9211
8795
|
}
|
|
9212
8796
|
|
|
9213
8797
|
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
8798
|
+
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
8799
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
8800
|
+
}
|
|
8801
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
9214
8802
|
|
|
9215
8803
|
if (!objKeys) {
|
|
9216
8804
|
objKeys = Object.keys(obj);
|
|
@@ -9231,6 +8819,7 @@ module.exports = function (object, opts) {
|
|
|
9231
8819
|
obj[key],
|
|
9232
8820
|
key,
|
|
9233
8821
|
generateArrayPrefix,
|
|
8822
|
+
commaRoundTrip,
|
|
9234
8823
|
options.strictNullHandling,
|
|
9235
8824
|
options.skipNulls,
|
|
9236
8825
|
options.encode ? options.encoder : null,
|
|
@@ -9774,7 +9363,7 @@ function createClient(params) {
|
|
|
9774
9363
|
environment: 'master'
|
|
9775
9364
|
};
|
|
9776
9365
|
const config = _objectSpread(_objectSpread({}, defaultConfig), params);
|
|
9777
|
-
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.
|
|
9366
|
+
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.8"}`, config.application, config.integration);
|
|
9778
9367
|
config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
|
|
9779
9368
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
9780
9369
|
'X-Contentful-User-Agent': userAgentHeader
|