contentful-management 7.54.2 → 8.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 +234 -138
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +234 -138
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +374 -164
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/app-installation.js +5 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +25 -20
- package/dist/typings/adapters/REST/endpoints/webhook.d.ts +2 -1
- package/dist/typings/common-types.d.ts +59 -57
- package/dist/typings/create-contentful-api.d.ts +1 -1
- package/dist/typings/create-environment-api.d.ts +4 -1
- package/dist/typings/plain/common-types.d.ts +58 -58
- package/package.json +7 -7
|
@@ -125,12 +125,24 @@ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../node_mo
|
|
|
125
125
|
var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../node_modules/axios/lib/helpers/parseHeaders.js");
|
|
126
126
|
var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
|
|
127
127
|
var createError = __webpack_require__(/*! ../core/createError */ "../node_modules/axios/lib/core/createError.js");
|
|
128
|
+
var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
|
|
129
|
+
var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
|
|
128
130
|
|
|
129
131
|
module.exports = function xhrAdapter(config) {
|
|
130
132
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
131
133
|
var requestData = config.data;
|
|
132
134
|
var requestHeaders = config.headers;
|
|
133
135
|
var responseType = config.responseType;
|
|
136
|
+
var onCanceled;
|
|
137
|
+
function done() {
|
|
138
|
+
if (config.cancelToken) {
|
|
139
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (config.signal) {
|
|
143
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
134
146
|
|
|
135
147
|
if (utils.isFormData(requestData)) {
|
|
136
148
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
@@ -168,7 +180,13 @@ module.exports = function xhrAdapter(config) {
|
|
|
168
180
|
request: request
|
|
169
181
|
};
|
|
170
182
|
|
|
171
|
-
settle(
|
|
183
|
+
settle(function _resolve(value) {
|
|
184
|
+
resolve(value);
|
|
185
|
+
done();
|
|
186
|
+
}, function _reject(err) {
|
|
187
|
+
reject(err);
|
|
188
|
+
done();
|
|
189
|
+
}, response);
|
|
172
190
|
|
|
173
191
|
// Clean up request
|
|
174
192
|
request = null;
|
|
@@ -221,14 +239,15 @@ module.exports = function xhrAdapter(config) {
|
|
|
221
239
|
|
|
222
240
|
// Handle timeout
|
|
223
241
|
request.ontimeout = function handleTimeout() {
|
|
224
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
242
|
+
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
243
|
+
var transitional = config.transitional || defaults.transitional;
|
|
225
244
|
if (config.timeoutErrorMessage) {
|
|
226
245
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
227
246
|
}
|
|
228
247
|
reject(createError(
|
|
229
248
|
timeoutErrorMessage,
|
|
230
249
|
config,
|
|
231
|
-
|
|
250
|
+
transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
|
232
251
|
request));
|
|
233
252
|
|
|
234
253
|
// Clean up request
|
|
@@ -282,18 +301,22 @@ module.exports = function xhrAdapter(config) {
|
|
|
282
301
|
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
283
302
|
}
|
|
284
303
|
|
|
285
|
-
if (config.cancelToken) {
|
|
304
|
+
if (config.cancelToken || config.signal) {
|
|
286
305
|
// Handle cancellation
|
|
287
|
-
|
|
306
|
+
// eslint-disable-next-line func-names
|
|
307
|
+
onCanceled = function(cancel) {
|
|
288
308
|
if (!request) {
|
|
289
309
|
return;
|
|
290
310
|
}
|
|
291
|
-
|
|
311
|
+
reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
|
|
292
312
|
request.abort();
|
|
293
|
-
reject(cancel);
|
|
294
|
-
// Clean up request
|
|
295
313
|
request = null;
|
|
296
|
-
}
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
317
|
+
if (config.signal) {
|
|
318
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
319
|
+
}
|
|
297
320
|
}
|
|
298
321
|
|
|
299
322
|
if (!requestData) {
|
|
@@ -340,6 +363,11 @@ function createInstance(defaultConfig) {
|
|
|
340
363
|
// Copy context to instance
|
|
341
364
|
utils.extend(instance, context);
|
|
342
365
|
|
|
366
|
+
// Factory for creating new instances
|
|
367
|
+
instance.create = function create(instanceConfig) {
|
|
368
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
369
|
+
};
|
|
370
|
+
|
|
343
371
|
return instance;
|
|
344
372
|
}
|
|
345
373
|
|
|
@@ -349,15 +377,11 @@ var axios = createInstance(defaults);
|
|
|
349
377
|
// Expose Axios class to allow class inheritance
|
|
350
378
|
axios.Axios = Axios;
|
|
351
379
|
|
|
352
|
-
// Factory for creating new instances
|
|
353
|
-
axios.create = function create(instanceConfig) {
|
|
354
|
-
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
|
355
|
-
};
|
|
356
|
-
|
|
357
380
|
// Expose Cancel & CancelToken
|
|
358
381
|
axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
|
|
359
382
|
axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../node_modules/axios/lib/cancel/CancelToken.js");
|
|
360
383
|
axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
|
|
384
|
+
axios.VERSION = __webpack_require__(/*! ./env/data */ "../node_modules/axios/lib/env/data.js").version;
|
|
361
385
|
|
|
362
386
|
// Expose all/spread
|
|
363
387
|
axios.all = function all(promises) {
|
|
@@ -431,11 +455,42 @@ function CancelToken(executor) {
|
|
|
431
455
|
}
|
|
432
456
|
|
|
433
457
|
var resolvePromise;
|
|
458
|
+
|
|
434
459
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
435
460
|
resolvePromise = resolve;
|
|
436
461
|
});
|
|
437
462
|
|
|
438
463
|
var token = this;
|
|
464
|
+
|
|
465
|
+
// eslint-disable-next-line func-names
|
|
466
|
+
this.promise.then(function(cancel) {
|
|
467
|
+
if (!token._listeners) return;
|
|
468
|
+
|
|
469
|
+
var i;
|
|
470
|
+
var l = token._listeners.length;
|
|
471
|
+
|
|
472
|
+
for (i = 0; i < l; i++) {
|
|
473
|
+
token._listeners[i](cancel);
|
|
474
|
+
}
|
|
475
|
+
token._listeners = null;
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
// eslint-disable-next-line func-names
|
|
479
|
+
this.promise.then = function(onfulfilled) {
|
|
480
|
+
var _resolve;
|
|
481
|
+
// eslint-disable-next-line func-names
|
|
482
|
+
var promise = new Promise(function(resolve) {
|
|
483
|
+
token.subscribe(resolve);
|
|
484
|
+
_resolve = resolve;
|
|
485
|
+
}).then(onfulfilled);
|
|
486
|
+
|
|
487
|
+
promise.cancel = function reject() {
|
|
488
|
+
token.unsubscribe(_resolve);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
return promise;
|
|
492
|
+
};
|
|
493
|
+
|
|
439
494
|
executor(function cancel(message) {
|
|
440
495
|
if (token.reason) {
|
|
441
496
|
// Cancellation has already been requested
|
|
@@ -456,6 +511,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
|
456
511
|
}
|
|
457
512
|
};
|
|
458
513
|
|
|
514
|
+
/**
|
|
515
|
+
* Subscribe to the cancel signal
|
|
516
|
+
*/
|
|
517
|
+
|
|
518
|
+
CancelToken.prototype.subscribe = function subscribe(listener) {
|
|
519
|
+
if (this.reason) {
|
|
520
|
+
listener(this.reason);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (this._listeners) {
|
|
525
|
+
this._listeners.push(listener);
|
|
526
|
+
} else {
|
|
527
|
+
this._listeners = [listener];
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Unsubscribe from the cancel signal
|
|
533
|
+
*/
|
|
534
|
+
|
|
535
|
+
CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
|
|
536
|
+
if (!this._listeners) {
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
var index = this._listeners.indexOf(listener);
|
|
540
|
+
if (index !== -1) {
|
|
541
|
+
this._listeners.splice(index, 1);
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
|
|
459
545
|
/**
|
|
460
546
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
461
547
|
* cancels the `CancelToken`.
|
|
@@ -529,14 +615,14 @@ function Axios(instanceConfig) {
|
|
|
529
615
|
*
|
|
530
616
|
* @param {Object} config The config specific for this request (merged with this.defaults)
|
|
531
617
|
*/
|
|
532
|
-
Axios.prototype.request = function request(config) {
|
|
618
|
+
Axios.prototype.request = function request(configOrUrl, config) {
|
|
533
619
|
/*eslint no-param-reassign:0*/
|
|
534
620
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
535
|
-
if (typeof
|
|
536
|
-
config = arguments[1] || {};
|
|
537
|
-
config.url = arguments[0];
|
|
538
|
-
} else {
|
|
621
|
+
if (typeof configOrUrl === 'string') {
|
|
539
622
|
config = config || {};
|
|
623
|
+
config.url = configOrUrl;
|
|
624
|
+
} else {
|
|
625
|
+
config = configOrUrl || {};
|
|
540
626
|
}
|
|
541
627
|
|
|
542
628
|
config = mergeConfig(this.defaults, config);
|
|
@@ -554,9 +640,9 @@ Axios.prototype.request = function request(config) {
|
|
|
554
640
|
|
|
555
641
|
if (transitional !== undefined) {
|
|
556
642
|
validator.assertOptions(transitional, {
|
|
557
|
-
silentJSONParsing: validators.transitional(validators.boolean
|
|
558
|
-
forcedJSONParsing: validators.transitional(validators.boolean
|
|
559
|
-
clarifyTimeoutError: validators.transitional(validators.boolean
|
|
643
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
644
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
645
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
560
646
|
}, false);
|
|
561
647
|
}
|
|
562
648
|
|
|
@@ -795,6 +881,7 @@ var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/uti
|
|
|
795
881
|
var transformData = __webpack_require__(/*! ./transformData */ "../node_modules/axios/lib/core/transformData.js");
|
|
796
882
|
var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
|
|
797
883
|
var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
|
|
884
|
+
var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
|
|
798
885
|
|
|
799
886
|
/**
|
|
800
887
|
* Throws a `Cancel` if cancellation has been requested.
|
|
@@ -803,6 +890,10 @@ function throwIfCancellationRequested(config) {
|
|
|
803
890
|
if (config.cancelToken) {
|
|
804
891
|
config.cancelToken.throwIfRequested();
|
|
805
892
|
}
|
|
893
|
+
|
|
894
|
+
if (config.signal && config.signal.aborted) {
|
|
895
|
+
throw new Cancel('canceled');
|
|
896
|
+
}
|
|
806
897
|
}
|
|
807
898
|
|
|
808
899
|
/**
|
|
@@ -920,7 +1011,8 @@ module.exports = function enhanceError(error, config, code, request, response) {
|
|
|
920
1011
|
stack: this.stack,
|
|
921
1012
|
// Axios
|
|
922
1013
|
config: this.config,
|
|
923
|
-
code: this.code
|
|
1014
|
+
code: this.code,
|
|
1015
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
924
1016
|
};
|
|
925
1017
|
};
|
|
926
1018
|
return error;
|
|
@@ -954,17 +1046,6 @@ module.exports = function mergeConfig(config1, config2) {
|
|
|
954
1046
|
config2 = config2 || {};
|
|
955
1047
|
var config = {};
|
|
956
1048
|
|
|
957
|
-
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
|
958
|
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
|
959
|
-
var defaultToConfig2Keys = [
|
|
960
|
-
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
|
961
|
-
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
|
962
|
-
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
|
963
|
-
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
|
964
|
-
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
|
965
|
-
];
|
|
966
|
-
var directMergeKeys = ['validateStatus'];
|
|
967
|
-
|
|
968
1049
|
function getMergedValue(target, source) {
|
|
969
1050
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
970
1051
|
return utils.merge(target, source);
|
|
@@ -976,51 +1057,74 @@ module.exports = function mergeConfig(config1, config2) {
|
|
|
976
1057
|
return source;
|
|
977
1058
|
}
|
|
978
1059
|
|
|
1060
|
+
// eslint-disable-next-line consistent-return
|
|
979
1061
|
function mergeDeepProperties(prop) {
|
|
980
1062
|
if (!utils.isUndefined(config2[prop])) {
|
|
981
|
-
|
|
1063
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
982
1064
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
983
|
-
|
|
1065
|
+
return getMergedValue(undefined, config1[prop]);
|
|
984
1066
|
}
|
|
985
1067
|
}
|
|
986
1068
|
|
|
987
|
-
|
|
1069
|
+
// eslint-disable-next-line consistent-return
|
|
1070
|
+
function valueFromConfig2(prop) {
|
|
988
1071
|
if (!utils.isUndefined(config2[prop])) {
|
|
989
|
-
|
|
1072
|
+
return getMergedValue(undefined, config2[prop]);
|
|
990
1073
|
}
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
1074
|
+
}
|
|
994
1075
|
|
|
995
|
-
|
|
1076
|
+
// eslint-disable-next-line consistent-return
|
|
1077
|
+
function defaultToConfig2(prop) {
|
|
996
1078
|
if (!utils.isUndefined(config2[prop])) {
|
|
997
|
-
|
|
1079
|
+
return getMergedValue(undefined, config2[prop]);
|
|
998
1080
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
999
|
-
|
|
1081
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1000
1082
|
}
|
|
1001
|
-
}
|
|
1083
|
+
}
|
|
1002
1084
|
|
|
1003
|
-
|
|
1085
|
+
// eslint-disable-next-line consistent-return
|
|
1086
|
+
function mergeDirectKeys(prop) {
|
|
1004
1087
|
if (prop in config2) {
|
|
1005
|
-
|
|
1088
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1006
1089
|
} else if (prop in config1) {
|
|
1007
|
-
|
|
1090
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1008
1091
|
}
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
var axiosKeys = valueFromConfig2Keys
|
|
1012
|
-
.concat(mergeDeepPropertiesKeys)
|
|
1013
|
-
.concat(defaultToConfig2Keys)
|
|
1014
|
-
.concat(directMergeKeys);
|
|
1092
|
+
}
|
|
1015
1093
|
|
|
1016
|
-
var
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1094
|
+
var mergeMap = {
|
|
1095
|
+
'url': valueFromConfig2,
|
|
1096
|
+
'method': valueFromConfig2,
|
|
1097
|
+
'data': valueFromConfig2,
|
|
1098
|
+
'baseURL': defaultToConfig2,
|
|
1099
|
+
'transformRequest': defaultToConfig2,
|
|
1100
|
+
'transformResponse': defaultToConfig2,
|
|
1101
|
+
'paramsSerializer': defaultToConfig2,
|
|
1102
|
+
'timeout': defaultToConfig2,
|
|
1103
|
+
'timeoutMessage': defaultToConfig2,
|
|
1104
|
+
'withCredentials': defaultToConfig2,
|
|
1105
|
+
'adapter': defaultToConfig2,
|
|
1106
|
+
'responseType': defaultToConfig2,
|
|
1107
|
+
'xsrfCookieName': defaultToConfig2,
|
|
1108
|
+
'xsrfHeaderName': defaultToConfig2,
|
|
1109
|
+
'onUploadProgress': defaultToConfig2,
|
|
1110
|
+
'onDownloadProgress': defaultToConfig2,
|
|
1111
|
+
'decompress': defaultToConfig2,
|
|
1112
|
+
'maxContentLength': defaultToConfig2,
|
|
1113
|
+
'maxBodyLength': defaultToConfig2,
|
|
1114
|
+
'transport': defaultToConfig2,
|
|
1115
|
+
'httpAgent': defaultToConfig2,
|
|
1116
|
+
'httpsAgent': defaultToConfig2,
|
|
1117
|
+
'cancelToken': defaultToConfig2,
|
|
1118
|
+
'socketPath': defaultToConfig2,
|
|
1119
|
+
'responseEncoding': defaultToConfig2,
|
|
1120
|
+
'validateStatus': mergeDirectKeys
|
|
1121
|
+
};
|
|
1022
1122
|
|
|
1023
|
-
utils.forEach(
|
|
1123
|
+
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
1124
|
+
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
1125
|
+
var configValue = merge(prop);
|
|
1126
|
+
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
1127
|
+
});
|
|
1024
1128
|
|
|
1025
1129
|
return config;
|
|
1026
1130
|
};
|
|
@@ -1188,7 +1292,7 @@ var defaults = {
|
|
|
1188
1292
|
}],
|
|
1189
1293
|
|
|
1190
1294
|
transformResponse: [function transformResponse(data) {
|
|
1191
|
-
var transitional = this.transitional;
|
|
1295
|
+
var transitional = this.transitional || defaults.transitional;
|
|
1192
1296
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1193
1297
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1194
1298
|
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
|
@@ -1223,12 +1327,12 @@ var defaults = {
|
|
|
1223
1327
|
|
|
1224
1328
|
validateStatus: function validateStatus(status) {
|
|
1225
1329
|
return status >= 200 && status < 300;
|
|
1226
|
-
}
|
|
1227
|
-
};
|
|
1330
|
+
},
|
|
1228
1331
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1332
|
+
headers: {
|
|
1333
|
+
common: {
|
|
1334
|
+
'Accept': 'application/json, text/plain, */*'
|
|
1335
|
+
}
|
|
1232
1336
|
}
|
|
1233
1337
|
};
|
|
1234
1338
|
|
|
@@ -1246,6 +1350,19 @@ module.exports = defaults;
|
|
|
1246
1350
|
|
|
1247
1351
|
/***/ }),
|
|
1248
1352
|
|
|
1353
|
+
/***/ "../node_modules/axios/lib/env/data.js":
|
|
1354
|
+
/*!*********************************************!*\
|
|
1355
|
+
!*** ../node_modules/axios/lib/env/data.js ***!
|
|
1356
|
+
\*********************************************/
|
|
1357
|
+
/*! no static exports found */
|
|
1358
|
+
/***/ (function(module, exports) {
|
|
1359
|
+
|
|
1360
|
+
module.exports = {
|
|
1361
|
+
"version": "0.26.0"
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
/***/ }),
|
|
1365
|
+
|
|
1249
1366
|
/***/ "../node_modules/axios/lib/helpers/bind.js":
|
|
1250
1367
|
/*!*************************************************!*\
|
|
1251
1368
|
!*** ../node_modules/axios/lib/helpers/bind.js ***!
|
|
@@ -1462,7 +1579,7 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
1462
1579
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
1463
1580
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
1464
1581
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
1465
|
-
return /^([a-z][a-z\d
|
|
1582
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
1466
1583
|
};
|
|
1467
1584
|
|
|
1468
1585
|
|
|
@@ -1478,6 +1595,8 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
1478
1595
|
"use strict";
|
|
1479
1596
|
|
|
1480
1597
|
|
|
1598
|
+
var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
|
|
1599
|
+
|
|
1481
1600
|
/**
|
|
1482
1601
|
* Determines whether the payload is an error thrown by Axios
|
|
1483
1602
|
*
|
|
@@ -1485,7 +1604,7 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
1485
1604
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
1486
1605
|
*/
|
|
1487
1606
|
module.exports = function isAxiosError(payload) {
|
|
1488
|
-
return (
|
|
1607
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
1489
1608
|
};
|
|
1490
1609
|
|
|
1491
1610
|
|
|
@@ -1709,7 +1828,7 @@ module.exports = function spread(callback) {
|
|
|
1709
1828
|
"use strict";
|
|
1710
1829
|
|
|
1711
1830
|
|
|
1712
|
-
var
|
|
1831
|
+
var VERSION = __webpack_require__(/*! ../env/data */ "../node_modules/axios/lib/env/data.js").version;
|
|
1713
1832
|
|
|
1714
1833
|
var validators = {};
|
|
1715
1834
|
|
|
@@ -1721,48 +1840,26 @@ var validators = {};
|
|
|
1721
1840
|
});
|
|
1722
1841
|
|
|
1723
1842
|
var deprecatedWarnings = {};
|
|
1724
|
-
var currentVerArr = pkg.version.split('.');
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Compare package versions
|
|
1728
|
-
* @param {string} version
|
|
1729
|
-
* @param {string?} thanVersion
|
|
1730
|
-
* @returns {boolean}
|
|
1731
|
-
*/
|
|
1732
|
-
function isOlderVersion(version, thanVersion) {
|
|
1733
|
-
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
|
|
1734
|
-
var destVer = version.split('.');
|
|
1735
|
-
for (var i = 0; i < 3; i++) {
|
|
1736
|
-
if (pkgVersionArr[i] > destVer[i]) {
|
|
1737
|
-
return true;
|
|
1738
|
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
1739
|
-
return false;
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
return false;
|
|
1743
|
-
}
|
|
1744
1843
|
|
|
1745
1844
|
/**
|
|
1746
1845
|
* Transitional option validator
|
|
1747
|
-
* @param {function|boolean?} validator
|
|
1748
|
-
* @param {string?} version
|
|
1749
|
-
* @param {string} message
|
|
1846
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
1847
|
+
* @param {string?} version - deprecated version / removed since version
|
|
1848
|
+
* @param {string?} message - some message with additional info
|
|
1750
1849
|
* @returns {function}
|
|
1751
1850
|
*/
|
|
1752
1851
|
validators.transitional = function transitional(validator, version, message) {
|
|
1753
|
-
var isDeprecated = version && isOlderVersion(version);
|
|
1754
|
-
|
|
1755
1852
|
function formatMessage(opt, desc) {
|
|
1756
|
-
return '[Axios v' +
|
|
1853
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
1757
1854
|
}
|
|
1758
1855
|
|
|
1759
1856
|
// eslint-disable-next-line func-names
|
|
1760
1857
|
return function(value, opt, opts) {
|
|
1761
1858
|
if (validator === false) {
|
|
1762
|
-
throw new Error(formatMessage(opt, ' has been removed in ' + version));
|
|
1859
|
+
throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
|
|
1763
1860
|
}
|
|
1764
1861
|
|
|
1765
|
-
if (
|
|
1862
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
1766
1863
|
deprecatedWarnings[opt] = true;
|
|
1767
1864
|
// eslint-disable-next-line no-console
|
|
1768
1865
|
console.warn(
|
|
@@ -1808,7 +1905,6 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
1808
1905
|
}
|
|
1809
1906
|
|
|
1810
1907
|
module.exports = {
|
|
1811
|
-
isOlderVersion: isOlderVersion,
|
|
1812
1908
|
assertOptions: assertOptions,
|
|
1813
1909
|
validators: validators
|
|
1814
1910
|
};
|
|
@@ -1839,7 +1935,7 @@ var toString = Object.prototype.toString;
|
|
|
1839
1935
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
1840
1936
|
*/
|
|
1841
1937
|
function isArray(val) {
|
|
1842
|
-
return
|
|
1938
|
+
return Array.isArray(val);
|
|
1843
1939
|
}
|
|
1844
1940
|
|
|
1845
1941
|
/**
|
|
@@ -1880,7 +1976,7 @@ function isArrayBuffer(val) {
|
|
|
1880
1976
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
1881
1977
|
*/
|
|
1882
1978
|
function isFormData(val) {
|
|
1883
|
-
return (
|
|
1979
|
+
return toString.call(val) === '[object FormData]';
|
|
1884
1980
|
}
|
|
1885
1981
|
|
|
1886
1982
|
/**
|
|
@@ -1894,7 +1990,7 @@ function isArrayBufferView(val) {
|
|
|
1894
1990
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
1895
1991
|
result = ArrayBuffer.isView(val);
|
|
1896
1992
|
} else {
|
|
1897
|
-
result = (val) && (val.buffer) && (val.buffer
|
|
1993
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
1898
1994
|
}
|
|
1899
1995
|
return result;
|
|
1900
1996
|
}
|
|
@@ -2001,7 +2097,7 @@ function isStream(val) {
|
|
|
2001
2097
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
2002
2098
|
*/
|
|
2003
2099
|
function isURLSearchParams(val) {
|
|
2004
|
-
return
|
|
2100
|
+
return toString.call(val) === '[object URLSearchParams]';
|
|
2005
2101
|
}
|
|
2006
2102
|
|
|
2007
2103
|
/**
|
|
@@ -2175,17 +2271,6 @@ module.exports = {
|
|
|
2175
2271
|
};
|
|
2176
2272
|
|
|
2177
2273
|
|
|
2178
|
-
/***/ }),
|
|
2179
|
-
|
|
2180
|
-
/***/ "../node_modules/axios/package.json":
|
|
2181
|
-
/*!******************************************!*\
|
|
2182
|
-
!*** ../node_modules/axios/package.json ***!
|
|
2183
|
-
\******************************************/
|
|
2184
|
-
/*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
|
|
2185
|
-
/***/ (function(module) {
|
|
2186
|
-
|
|
2187
|
-
module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.4\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://axios-http.com\",\"devDependencies\":{\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.3.0\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^23.0.0\",\"grunt-karma\":\"^4.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^4.0.2\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^6.3.2\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-firefox-launcher\":\"^2.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^4.3.6\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^8.2.1\",\"sinon\":\"^4.5.0\",\"terser-webpack-plugin\":\"^4.2.3\",\"typescript\":\"^4.0.5\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^4.44.2\",\"webpack-dev-server\":\"^3.11.0\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.14.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}");
|
|
2188
|
-
|
|
2189
2274
|
/***/ }),
|
|
2190
2275
|
|
|
2191
2276
|
/***/ "../node_modules/call-bind/callBound.js":
|
|
@@ -2571,7 +2656,7 @@ function noop() {
|
|
|
2571
2656
|
return undefined;
|
|
2572
2657
|
}
|
|
2573
2658
|
|
|
2574
|
-
var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(
|
|
2659
|
+
var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\d+)(%)/, {
|
|
2575
2660
|
value: 1
|
|
2576
2661
|
});
|
|
2577
2662
|
|
|
@@ -3055,6 +3140,8 @@ function getUserAgentHeader(sdk, application, integration, feature) {
|
|
|
3055
3140
|
*/
|
|
3056
3141
|
|
|
3057
3142
|
function toPlainObject(data) {
|
|
3143
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3144
|
+
// @ts-expect-error
|
|
3058
3145
|
return Object.defineProperty(data, 'toPlainObject', {
|
|
3059
3146
|
enumerable: false,
|
|
3060
3147
|
configurable: false,
|
|
@@ -3079,7 +3166,7 @@ function errorHandler(errorResponse) {
|
|
|
3079
3166
|
var errorName; // Obscure the Management token
|
|
3080
3167
|
|
|
3081
3168
|
if (config && config.headers && config.headers['Authorization']) {
|
|
3082
|
-
var token = "...".concat(config.headers['Authorization'].substr(-5));
|
|
3169
|
+
var token = "...".concat(config.headers['Authorization'].toString().substr(-5));
|
|
3083
3170
|
config.headers['Authorization'] = "Bearer ".concat(token);
|
|
3084
3171
|
}
|
|
3085
3172
|
|
|
@@ -6522,7 +6609,11 @@ var getMany = function getMany(http, params) {
|
|
|
6522
6609
|
};
|
|
6523
6610
|
var upsert = function upsert(http, params, rawData, headers) {
|
|
6524
6611
|
var data = fast_copy__WEBPACK_IMPORTED_MODULE_2___default()(rawData);
|
|
6525
|
-
return _raw__WEBPACK_IMPORTED_MODULE_0__["put"](http, getAppInstallationUrl(params), data,
|
|
6612
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__["put"](http, getAppInstallationUrl(params), data, {
|
|
6613
|
+
headers: _objectSpread(_objectSpread({}, headers), params.acceptAllTerms && {
|
|
6614
|
+
'X-Contentful-Marketplace': 'i-accept-end-user-license-agreement,i-accept-marketplace-terms-of-service,i-accept-privacy-policy'
|
|
6615
|
+
})
|
|
6616
|
+
});
|
|
6526
6617
|
};
|
|
6527
6618
|
var del = function del(http, params) {
|
|
6528
6619
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["del"](http, getAppInstallationUrl(params));
|
|
@@ -10041,7 +10132,7 @@ function createClient(params) {
|
|
|
10041
10132
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10042
10133
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
10043
10134
|
var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
|
|
10044
|
-
"".concat(sdkMain, "/").concat("
|
|
10135
|
+
"".concat(sdkMain, "/").concat("8.1.2"), params.application, params.integration, params.feature);
|
|
10045
10136
|
var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
10046
10137
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
10047
10138
|
// @ts-expect-error
|
|
@@ -12749,6 +12840,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
12749
12840
|
* Creates an App Installation
|
|
12750
12841
|
* @param appDefinitionId - AppDefinition ID
|
|
12751
12842
|
* @param data - AppInstallation data
|
|
12843
|
+
* @param options.acceptAllTerms - Flag for accepting Apps' Marketplace EULA, Terms, and Privacy policy (need to pass `{acceptAllTerms: true}` to install a marketplace app)
|
|
12752
12844
|
* @return Promise for an App Installation
|
|
12753
12845
|
* @example ```javascript
|
|
12754
12846
|
* const contentful = require('contentful-management')
|
|
@@ -12769,6 +12861,9 @@ function createEnvironmentApi(makeRequest) {
|
|
|
12769
12861
|
* ```
|
|
12770
12862
|
*/
|
|
12771
12863
|
createAppInstallation: function createAppInstallation(appDefinitionId, data) {
|
|
12864
|
+
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
12865
|
+
acceptAllTerms = _ref.acceptAllTerms;
|
|
12866
|
+
|
|
12772
12867
|
var raw = this.toPlainObject();
|
|
12773
12868
|
return makeRequest({
|
|
12774
12869
|
entityType: 'AppInstallation',
|
|
@@ -12776,7 +12871,8 @@ function createEnvironmentApi(makeRequest) {
|
|
|
12776
12871
|
params: {
|
|
12777
12872
|
spaceId: raw.sys.space.sys.id,
|
|
12778
12873
|
environmentId: raw.sys.id,
|
|
12779
|
-
appDefinitionId: appDefinitionId
|
|
12874
|
+
appDefinitionId: appDefinitionId,
|
|
12875
|
+
acceptAllTerms: acceptAllTerms
|
|
12780
12876
|
},
|
|
12781
12877
|
payload: data
|
|
12782
12878
|
}).then(function (payload) {
|
|
@@ -13205,10 +13301,10 @@ function createEnvironmentApi(makeRequest) {
|
|
|
13205
13301
|
* .catch(console.error)
|
|
13206
13302
|
* ```
|
|
13207
13303
|
*/
|
|
13208
|
-
updateRelease: function updateRelease(
|
|
13209
|
-
var releaseId =
|
|
13210
|
-
payload =
|
|
13211
|
-
version =
|
|
13304
|
+
updateRelease: function updateRelease(_ref2) {
|
|
13305
|
+
var releaseId = _ref2.releaseId,
|
|
13306
|
+
payload = _ref2.payload,
|
|
13307
|
+
version = _ref2.version;
|
|
13212
13308
|
var raw = this.toPlainObject();
|
|
13213
13309
|
return makeRequest({
|
|
13214
13310
|
entityType: 'Release',
|
|
@@ -13275,9 +13371,9 @@ function createEnvironmentApi(makeRequest) {
|
|
|
13275
13371
|
* .catch(console.error)
|
|
13276
13372
|
* ```
|
|
13277
13373
|
*/
|
|
13278
|
-
publishRelease: function publishRelease(
|
|
13279
|
-
var releaseId =
|
|
13280
|
-
version =
|
|
13374
|
+
publishRelease: function publishRelease(_ref3) {
|
|
13375
|
+
var releaseId = _ref3.releaseId,
|
|
13376
|
+
version = _ref3.version;
|
|
13281
13377
|
var raw = this.toPlainObject();
|
|
13282
13378
|
return makeRequest({
|
|
13283
13379
|
entityType: 'Release',
|
|
@@ -13312,9 +13408,9 @@ function createEnvironmentApi(makeRequest) {
|
|
|
13312
13408
|
* .catch(console.error)
|
|
13313
13409
|
* ```
|
|
13314
13410
|
*/
|
|
13315
|
-
unpublishRelease: function unpublishRelease(
|
|
13316
|
-
var releaseId =
|
|
13317
|
-
version =
|
|
13411
|
+
unpublishRelease: function unpublishRelease(_ref4) {
|
|
13412
|
+
var releaseId = _ref4.releaseId,
|
|
13413
|
+
version = _ref4.version;
|
|
13318
13414
|
var raw = this.toPlainObject();
|
|
13319
13415
|
return makeRequest({
|
|
13320
13416
|
entityType: 'Release',
|
|
@@ -13350,9 +13446,9 @@ function createEnvironmentApi(makeRequest) {
|
|
|
13350
13446
|
* .catch(console.error)
|
|
13351
13447
|
* ```
|
|
13352
13448
|
*/
|
|
13353
|
-
validateRelease: function validateRelease(
|
|
13354
|
-
var releaseId =
|
|
13355
|
-
payload =
|
|
13449
|
+
validateRelease: function validateRelease(_ref5) {
|
|
13450
|
+
var releaseId = _ref5.releaseId,
|
|
13451
|
+
payload = _ref5.payload;
|
|
13356
13452
|
var raw = this.toPlainObject();
|
|
13357
13453
|
return makeRequest({
|
|
13358
13454
|
entityType: 'Release',
|
|
@@ -13387,9 +13483,9 @@ function createEnvironmentApi(makeRequest) {
|
|
|
13387
13483
|
* .catch(console.error)
|
|
13388
13484
|
* ```
|
|
13389
13485
|
*/
|
|
13390
|
-
getReleaseAction: function getReleaseAction(
|
|
13391
|
-
var actionId =
|
|
13392
|
-
releaseId =
|
|
13486
|
+
getReleaseAction: function getReleaseAction(_ref6) {
|
|
13487
|
+
var actionId = _ref6.actionId,
|
|
13488
|
+
releaseId = _ref6.releaseId;
|
|
13393
13489
|
var raw = this.toPlainObject();
|
|
13394
13490
|
return makeRequest({
|
|
13395
13491
|
entityType: 'ReleaseAction',
|
|
@@ -13425,9 +13521,9 @@ function createEnvironmentApi(makeRequest) {
|
|
|
13425
13521
|
* .catch(console.error)
|
|
13426
13522
|
* ```
|
|
13427
13523
|
*/
|
|
13428
|
-
getReleaseActions: function getReleaseActions(
|
|
13429
|
-
var releaseId =
|
|
13430
|
-
query =
|
|
13524
|
+
getReleaseActions: function getReleaseActions(_ref7) {
|
|
13525
|
+
var releaseId = _ref7.releaseId,
|
|
13526
|
+
query = _ref7.query;
|
|
13431
13527
|
var raw = this.toPlainObject();
|
|
13432
13528
|
return makeRequest({
|
|
13433
13529
|
entityType: 'ReleaseAction',
|