contentful-management 9.0.0 → 9.1.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.
- package/dist/contentful-management.browser.js +350 -357
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +350 -357
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +348 -354
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/typings/entities/release.d.ts +17 -6
- package/package.json +1 -1
|
@@ -3255,365 +3255,358 @@ function errorHandler(errorResponse) {
|
|
|
3255
3255
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3256
3256
|
|
|
3257
3257
|
/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
}(this, (function () { 'use strict';
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
flags += 'm';
|
|
3431
|
-
}
|
|
3432
|
-
if (regExp.unicode) {
|
|
3433
|
-
flags += 'u';
|
|
3434
|
-
}
|
|
3435
|
-
if (regExp.sticky) {
|
|
3436
|
-
flags += 'y';
|
|
3437
|
-
}
|
|
3438
|
-
return flags;
|
|
3439
|
-
};
|
|
3258
|
+
true ? module.exports = factory() :
|
|
3259
|
+
undefined;
|
|
3260
|
+
})(this, (function () { 'use strict';
|
|
3261
|
+
|
|
3262
|
+
var toStringFunction = Function.prototype.toString;
|
|
3263
|
+
var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf;
|
|
3264
|
+
var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
|
3265
|
+
var SYMBOL_PROPERTIES = typeof getOwnPropertySymbols === 'function';
|
|
3266
|
+
var WEAK_MAP = typeof WeakMap === 'function';
|
|
3267
|
+
/**
|
|
3268
|
+
* @function createCache
|
|
3269
|
+
*
|
|
3270
|
+
* @description
|
|
3271
|
+
* get a new cache object to prevent circular references
|
|
3272
|
+
*
|
|
3273
|
+
* @returns the new cache object
|
|
3274
|
+
*/
|
|
3275
|
+
var createCache = (function () {
|
|
3276
|
+
if (WEAK_MAP) {
|
|
3277
|
+
return function () { return new WeakMap(); };
|
|
3278
|
+
}
|
|
3279
|
+
var Cache = /** @class */ (function () {
|
|
3280
|
+
function Cache() {
|
|
3281
|
+
this._keys = [];
|
|
3282
|
+
this._values = [];
|
|
3283
|
+
}
|
|
3284
|
+
Cache.prototype.has = function (key) {
|
|
3285
|
+
return !!~this._keys.indexOf(key);
|
|
3286
|
+
};
|
|
3287
|
+
Cache.prototype.get = function (key) {
|
|
3288
|
+
return this._values[this._keys.indexOf(key)];
|
|
3289
|
+
};
|
|
3290
|
+
Cache.prototype.set = function (key, value) {
|
|
3291
|
+
this._keys.push(key);
|
|
3292
|
+
this._values.push(value);
|
|
3293
|
+
};
|
|
3294
|
+
return Cache;
|
|
3295
|
+
}());
|
|
3296
|
+
return function () { return new Cache(); };
|
|
3297
|
+
})();
|
|
3298
|
+
/**
|
|
3299
|
+
* @function getCleanClone
|
|
3300
|
+
*
|
|
3301
|
+
* @description
|
|
3302
|
+
* get an empty version of the object with the same prototype it has
|
|
3303
|
+
*
|
|
3304
|
+
* @param object the object to build a clean clone from
|
|
3305
|
+
* @param realm the realm the object resides in
|
|
3306
|
+
* @returns the empty cloned object
|
|
3307
|
+
*/
|
|
3308
|
+
var getCleanClone = function (object, realm) {
|
|
3309
|
+
var prototype = object.__proto__ || getPrototypeOf$1(object);
|
|
3310
|
+
if (!prototype) {
|
|
3311
|
+
return create(null);
|
|
3312
|
+
}
|
|
3313
|
+
var Constructor = prototype.constructor;
|
|
3314
|
+
if (Constructor === realm.Object) {
|
|
3315
|
+
return prototype === realm.Object.prototype ? {} : create(prototype);
|
|
3316
|
+
}
|
|
3317
|
+
if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
|
3318
|
+
try {
|
|
3319
|
+
return new Constructor();
|
|
3320
|
+
}
|
|
3321
|
+
catch (_a) { }
|
|
3322
|
+
}
|
|
3323
|
+
return create(prototype);
|
|
3324
|
+
};
|
|
3325
|
+
/**
|
|
3326
|
+
* @function getObjectCloneLoose
|
|
3327
|
+
*
|
|
3328
|
+
* @description
|
|
3329
|
+
* get a copy of the object based on loose rules, meaning all enumerable keys
|
|
3330
|
+
* and symbols are copied, but property descriptors are not considered
|
|
3331
|
+
*
|
|
3332
|
+
* @param object the object to clone
|
|
3333
|
+
* @param realm the realm the object resides in
|
|
3334
|
+
* @param handleCopy the function that handles copying the object
|
|
3335
|
+
* @returns the copied object
|
|
3336
|
+
*/
|
|
3337
|
+
var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
|
|
3338
|
+
var clone = getCleanClone(object, realm);
|
|
3339
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
3340
|
+
cache.set(object, clone);
|
|
3341
|
+
for (var key in object) {
|
|
3342
|
+
if (hasOwnProperty.call(object, key)) {
|
|
3343
|
+
clone[key] = handleCopy(object[key], cache);
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
if (SYMBOL_PROPERTIES) {
|
|
3347
|
+
var symbols = getOwnPropertySymbols(object);
|
|
3348
|
+
for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {
|
|
3349
|
+
symbol = symbols[index];
|
|
3350
|
+
if (propertyIsEnumerable.call(object, symbol)) {
|
|
3351
|
+
clone[symbol] = handleCopy(object[symbol], cache);
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
return clone;
|
|
3356
|
+
};
|
|
3357
|
+
/**
|
|
3358
|
+
* @function getObjectCloneStrict
|
|
3359
|
+
*
|
|
3360
|
+
* @description
|
|
3361
|
+
* get a copy of the object based on strict rules, meaning all keys and symbols
|
|
3362
|
+
* are copied based on the original property descriptors
|
|
3363
|
+
*
|
|
3364
|
+
* @param object the object to clone
|
|
3365
|
+
* @param realm the realm the object resides in
|
|
3366
|
+
* @param handleCopy the function that handles copying the object
|
|
3367
|
+
* @returns the copied object
|
|
3368
|
+
*/
|
|
3369
|
+
var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
|
|
3370
|
+
var clone = getCleanClone(object, realm);
|
|
3371
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
3372
|
+
cache.set(object, clone);
|
|
3373
|
+
var properties = SYMBOL_PROPERTIES
|
|
3374
|
+
? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))
|
|
3375
|
+
: getOwnPropertyNames(object);
|
|
3376
|
+
for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {
|
|
3377
|
+
property = properties[index];
|
|
3378
|
+
if (property !== 'callee' && property !== 'caller') {
|
|
3379
|
+
descriptor = getOwnPropertyDescriptor(object, property);
|
|
3380
|
+
if (descriptor) {
|
|
3381
|
+
// Only clone the value if actually a value, not a getter / setter.
|
|
3382
|
+
if (!descriptor.get && !descriptor.set) {
|
|
3383
|
+
descriptor.value = handleCopy(object[property], cache);
|
|
3384
|
+
}
|
|
3385
|
+
try {
|
|
3386
|
+
defineProperty(clone, property, descriptor);
|
|
3387
|
+
}
|
|
3388
|
+
catch (error) {
|
|
3389
|
+
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
|
3390
|
+
clone[property] = descriptor.value;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
else {
|
|
3394
|
+
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
|
3395
|
+
// the loose assignment.
|
|
3396
|
+
clone[property] = handleCopy(object[property], cache);
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
return clone;
|
|
3401
|
+
};
|
|
3402
|
+
/**
|
|
3403
|
+
* @function getRegExpFlags
|
|
3404
|
+
*
|
|
3405
|
+
* @description
|
|
3406
|
+
* get the flags to apply to the copied regexp
|
|
3407
|
+
*
|
|
3408
|
+
* @param regExp the regexp to get the flags of
|
|
3409
|
+
* @returns the flags for the regexp
|
|
3410
|
+
*/
|
|
3411
|
+
var getRegExpFlags = function (regExp) {
|
|
3412
|
+
var flags = '';
|
|
3413
|
+
if (regExp.global) {
|
|
3414
|
+
flags += 'g';
|
|
3415
|
+
}
|
|
3416
|
+
if (regExp.ignoreCase) {
|
|
3417
|
+
flags += 'i';
|
|
3418
|
+
}
|
|
3419
|
+
if (regExp.multiline) {
|
|
3420
|
+
flags += 'm';
|
|
3421
|
+
}
|
|
3422
|
+
if (regExp.unicode) {
|
|
3423
|
+
flags += 'u';
|
|
3424
|
+
}
|
|
3425
|
+
if (regExp.sticky) {
|
|
3426
|
+
flags += 'y';
|
|
3427
|
+
}
|
|
3428
|
+
return flags;
|
|
3429
|
+
};
|
|
3440
3430
|
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3431
|
+
// utils
|
|
3432
|
+
var isArray = Array.isArray;
|
|
3433
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
3434
|
+
var GLOBAL_THIS = (function () {
|
|
3435
|
+
if (typeof globalThis !== 'undefined') {
|
|
3436
|
+
return globalThis;
|
|
3437
|
+
}
|
|
3438
|
+
if (typeof self !== 'undefined') {
|
|
3439
|
+
return self;
|
|
3440
|
+
}
|
|
3441
|
+
if (typeof window !== 'undefined') {
|
|
3442
|
+
return window;
|
|
3443
|
+
}
|
|
3444
|
+
if (typeof global !== 'undefined') {
|
|
3445
|
+
return global;
|
|
3446
|
+
}
|
|
3447
|
+
if (console && console.error) {
|
|
3448
|
+
console.error('Unable to locate global object, returning "this".');
|
|
3449
|
+
}
|
|
3450
|
+
return this;
|
|
3451
|
+
})();
|
|
3452
|
+
/**
|
|
3453
|
+
* @function copy
|
|
3454
|
+
*
|
|
3455
|
+
* @description
|
|
3456
|
+
* copy an value deeply as much as possible
|
|
3457
|
+
*
|
|
3458
|
+
* If `strict` is applied, then all properties (including non-enumerable ones)
|
|
3459
|
+
* are copied with their original property descriptors on both objects and arrays.
|
|
3460
|
+
*
|
|
3461
|
+
* The value is compared to the global constructors in the `realm` provided,
|
|
3462
|
+
* and the native constructor is always used to ensure that extensions of native
|
|
3463
|
+
* objects (allows in ES2015+) are maintained.
|
|
3464
|
+
*
|
|
3465
|
+
* @param value the value to copy
|
|
3466
|
+
* @param [options] the options for copying with
|
|
3467
|
+
* @param [options.isStrict] should the copy be strict
|
|
3468
|
+
* @param [options.realm] the realm (this) value the value is copied from
|
|
3469
|
+
* @returns the copied value
|
|
3470
|
+
*/
|
|
3471
|
+
function copy(value, options) {
|
|
3472
|
+
// manually coalesced instead of default parameters for performance
|
|
3473
|
+
var isStrict = !!(options && options.isStrict);
|
|
3474
|
+
var realm = (options && options.realm) || GLOBAL_THIS;
|
|
3475
|
+
var getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;
|
|
3476
|
+
/**
|
|
3477
|
+
* @function handleCopy
|
|
3478
|
+
*
|
|
3479
|
+
* @description
|
|
3480
|
+
* copy the value recursively based on its type
|
|
3481
|
+
*
|
|
3482
|
+
* @param value the value to copy
|
|
3483
|
+
* @returns the copied value
|
|
3484
|
+
*/
|
|
3485
|
+
var handleCopy = function (value, cache) {
|
|
3486
|
+
if (!value || typeof value !== 'object') {
|
|
3487
|
+
return value;
|
|
3488
|
+
}
|
|
3489
|
+
if (cache.has(value)) {
|
|
3490
|
+
return cache.get(value);
|
|
3491
|
+
}
|
|
3492
|
+
var prototype = value.__proto__ || getPrototypeOf(value);
|
|
3493
|
+
var Constructor = prototype && prototype.constructor;
|
|
3494
|
+
// plain objects
|
|
3495
|
+
if (!Constructor || Constructor === realm.Object) {
|
|
3496
|
+
return getObjectClone(value, realm, handleCopy, cache);
|
|
3497
|
+
}
|
|
3498
|
+
var clone;
|
|
3499
|
+
// arrays
|
|
3500
|
+
if (isArray(value)) {
|
|
3501
|
+
// if strict, include non-standard properties
|
|
3502
|
+
if (isStrict) {
|
|
3503
|
+
return getObjectCloneStrict(value, realm, handleCopy, cache);
|
|
3504
|
+
}
|
|
3505
|
+
clone = new Constructor();
|
|
3506
|
+
cache.set(value, clone);
|
|
3507
|
+
for (var index = 0, length_1 = value.length; index < length_1; ++index) {
|
|
3508
|
+
clone[index] = handleCopy(value[index], cache);
|
|
3509
|
+
}
|
|
3510
|
+
return clone;
|
|
3511
|
+
}
|
|
3512
|
+
// dates
|
|
3513
|
+
if (value instanceof realm.Date) {
|
|
3514
|
+
return new Constructor(value.getTime());
|
|
3515
|
+
}
|
|
3516
|
+
// regexps
|
|
3517
|
+
if (value instanceof realm.RegExp) {
|
|
3518
|
+
clone = new Constructor(value.source, value.flags || getRegExpFlags(value));
|
|
3519
|
+
clone.lastIndex = value.lastIndex;
|
|
3520
|
+
return clone;
|
|
3521
|
+
}
|
|
3522
|
+
// maps
|
|
3523
|
+
if (realm.Map && value instanceof realm.Map) {
|
|
3524
|
+
clone = new Constructor();
|
|
3525
|
+
cache.set(value, clone);
|
|
3526
|
+
value.forEach(function (value, key) {
|
|
3527
|
+
clone.set(key, handleCopy(value, cache));
|
|
3528
|
+
});
|
|
3529
|
+
return clone;
|
|
3530
|
+
}
|
|
3531
|
+
// sets
|
|
3532
|
+
if (realm.Set && value instanceof realm.Set) {
|
|
3533
|
+
clone = new Constructor();
|
|
3534
|
+
cache.set(value, clone);
|
|
3535
|
+
value.forEach(function (value) {
|
|
3536
|
+
clone.add(handleCopy(value, cache));
|
|
3537
|
+
});
|
|
3538
|
+
return clone;
|
|
3539
|
+
}
|
|
3540
|
+
// blobs
|
|
3541
|
+
if (realm.Blob && value instanceof realm.Blob) {
|
|
3542
|
+
return value.slice(0, value.size, value.type);
|
|
3543
|
+
}
|
|
3544
|
+
// buffers (node-only)
|
|
3545
|
+
if (realm.Buffer && realm.Buffer.isBuffer(value)) {
|
|
3546
|
+
clone = realm.Buffer.allocUnsafe
|
|
3547
|
+
? realm.Buffer.allocUnsafe(value.length)
|
|
3548
|
+
: new Constructor(value.length);
|
|
3549
|
+
cache.set(value, clone);
|
|
3550
|
+
value.copy(clone);
|
|
3551
|
+
return clone;
|
|
3552
|
+
}
|
|
3553
|
+
// arraybuffers / dataviews
|
|
3554
|
+
if (realm.ArrayBuffer) {
|
|
3555
|
+
// dataviews
|
|
3556
|
+
if (realm.ArrayBuffer.isView(value)) {
|
|
3557
|
+
clone = new Constructor(value.buffer.slice(0));
|
|
3558
|
+
cache.set(value, clone);
|
|
3559
|
+
return clone;
|
|
3560
|
+
}
|
|
3561
|
+
// arraybuffers
|
|
3562
|
+
if (value instanceof realm.ArrayBuffer) {
|
|
3563
|
+
clone = value.slice(0);
|
|
3564
|
+
cache.set(value, clone);
|
|
3565
|
+
return clone;
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
// if the value cannot / should not be cloned, don't
|
|
3569
|
+
if (
|
|
3570
|
+
// promise-like
|
|
3571
|
+
typeof value.then === 'function' ||
|
|
3572
|
+
// errors
|
|
3573
|
+
value instanceof Error ||
|
|
3574
|
+
// weakmaps
|
|
3575
|
+
(realm.WeakMap && value instanceof realm.WeakMap) ||
|
|
3576
|
+
// weaksets
|
|
3577
|
+
(realm.WeakSet && value instanceof realm.WeakSet)) {
|
|
3578
|
+
return value;
|
|
3579
|
+
}
|
|
3580
|
+
// assume anything left is a custom constructor
|
|
3581
|
+
return getObjectClone(value, realm, handleCopy, cache);
|
|
3582
|
+
};
|
|
3583
|
+
return handleCopy(value, createCache());
|
|
3584
|
+
}
|
|
3585
|
+
// Adding reference to allow usage in CommonJS libraries compiled using TSC, which
|
|
3586
|
+
// expects there to be a default property on the exported value. See
|
|
3587
|
+
// [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
|
|
3588
|
+
copy.default = copy;
|
|
3589
|
+
/**
|
|
3590
|
+
* @function strictCopy
|
|
3591
|
+
*
|
|
3592
|
+
* @description
|
|
3593
|
+
* copy the value with `strict` option pre-applied
|
|
3594
|
+
*
|
|
3595
|
+
* @param value the value to copy
|
|
3596
|
+
* @param [options] the options for copying with
|
|
3597
|
+
* @param [options.realm] the realm (this) value the value is copied from
|
|
3598
|
+
* @returns the copied value
|
|
3599
|
+
*/
|
|
3600
|
+
copy.strict = function strictCopy(value, options) {
|
|
3601
|
+
return copy(value, {
|
|
3602
|
+
isStrict: true,
|
|
3603
|
+
realm: options ? options.realm : void 0,
|
|
3604
|
+
});
|
|
3605
|
+
};
|
|
3613
3606
|
|
|
3614
|
-
|
|
3607
|
+
return copy;
|
|
3615
3608
|
|
|
3616
|
-
}))
|
|
3609
|
+
}));
|
|
3617
3610
|
//# sourceMappingURL=fast-copy.js.map
|
|
3618
3611
|
|
|
3619
3612
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
|
|
@@ -10174,7 +10167,7 @@ function createClient(params) {
|
|
|
10174
10167
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10175
10168
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
10176
10169
|
var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
|
|
10177
|
-
"".concat(sdkMain, "/").concat("9.
|
|
10170
|
+
"".concat(sdkMain, "/").concat("9.1.2"), params.application, params.integration, params.feature);
|
|
10178
10171
|
var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
10179
10172
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
10180
10173
|
// @ts-expect-error
|