contentful-management 12.0.0-beta.12 → 12.0.0-beta.14
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.bundle.browser.js +20691 -21710
- package/dist/contentful-management.bundle.browser.js.map +1 -1
- package/dist/contentful-management.bundle.browser.min.js +1 -1
- package/dist/contentful-management.bundle.browser.min.js.map +1 -1
- package/dist/contentful-management.bundle.node.cjs +470 -237
- package/dist/contentful-management.bundle.node.cjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/bulk-action.js +13 -1
- package/dist/esm/adapters/REST/endpoints/bulk-action.js.map +1 -1
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.js +2 -2
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.js.map +1 -1
- package/dist/esm/common-types.js.map +1 -1
- package/dist/esm/create-contentful-api.js +1 -1
- package/dist/esm/create-environment-template-api.js +3 -1
- package/dist/esm/create-environment-template-api.js.map +1 -1
- package/dist/esm/entities/app-definition.js.map +1 -1
- package/dist/esm/entities/bulk-action.js.map +1 -1
- package/dist/esm/entities/environment-template-installation.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plain/plain-client.js +5 -1
- package/dist/esm/plain/plain-client.js.map +1 -1
- package/dist/stats-browser-min.html +1 -1
- package/dist/types/adapters/REST/endpoints/bulk-action.d.ts +4 -0
- package/dist/types/adapters/REST/endpoints/bulk-action.js +13 -1
- package/dist/types/adapters/REST/endpoints/bulk-action.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/environment-template-installation.js +2 -2
- package/dist/types/adapters/REST/endpoints/environment-template-installation.js.map +1 -1
- package/dist/types/common-types.d.ts +26 -1
- package/dist/types/common-types.js.map +1 -1
- package/dist/types/create-environment-template-api.d.ts +3 -1
- package/dist/types/create-environment-template-api.js +3 -1
- package/dist/types/create-environment-template-api.js.map +1 -1
- package/dist/types/entities/app-definition.d.ts +7 -1
- package/dist/types/entities/app-definition.js.map +1 -1
- package/dist/types/entities/bulk-action.d.ts +31 -3
- package/dist/types/entities/bulk-action.js.map +1 -1
- package/dist/types/entities/environment-template-installation.d.ts +1 -0
- package/dist/types/entities/environment-template-installation.js.map +1 -1
- package/dist/types/export-types.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/plain/common-types.d.ts +7 -1
- package/dist/types/plain/plain-client.js +4 -0
- package/dist/types/plain/plain-client.js.map +1 -1
- package/package.json +36 -35
- package/dist/types/methods/bulk-action.d.ts +0 -14
|
@@ -9,11 +9,12 @@ var require$$4 = require('https');
|
|
|
9
9
|
var require$$0$2 = require('url');
|
|
10
10
|
var require$$6 = require('fs');
|
|
11
11
|
var require$$8 = require('crypto');
|
|
12
|
+
var require$$6$1 = require('http2');
|
|
12
13
|
var require$$4$1 = require('assert');
|
|
13
|
-
var require$$
|
|
14
|
+
var require$$0$4 = require('tty');
|
|
14
15
|
var require$$0$3 = require('os');
|
|
15
|
-
var require$$
|
|
16
|
-
var require$$
|
|
16
|
+
var require$$9 = require('zlib');
|
|
17
|
+
var require$$11 = require('events');
|
|
17
18
|
|
|
18
19
|
function _OverloadYield(e, d) {
|
|
19
20
|
this.v = e, this.k = d;
|
|
@@ -1039,7 +1040,8 @@ function pThrottle({
|
|
|
1039
1040
|
interval,
|
|
1040
1041
|
strict,
|
|
1041
1042
|
signal,
|
|
1042
|
-
onDelay
|
|
1043
|
+
onDelay,
|
|
1044
|
+
weight
|
|
1043
1045
|
}) {
|
|
1044
1046
|
if (!Number.isFinite(limit)) {
|
|
1045
1047
|
throw new TypeError('Expected `limit` to be a finite number');
|
|
@@ -1050,25 +1052,37 @@ function pThrottle({
|
|
|
1050
1052
|
if (limit < 0) {
|
|
1051
1053
|
throw new TypeError('Expected `limit` to be >= 0');
|
|
1052
1054
|
}
|
|
1055
|
+
if (weight !== undefined && typeof weight !== 'function') {
|
|
1056
|
+
throw new TypeError('Expected `weight` to be a function');
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
// TODO: Uncomment in next major version (breaking change)
|
|
1060
|
+
// The combination of strict mode with interval=0 doesn't enforce the limit correctly
|
|
1061
|
+
// (minSpacing becomes 0, allowing unlimited calls in the same millisecond).
|
|
1062
|
+
// For now, we allow it to avoid breaking existing code, but it should be rejected in v9.
|
|
1063
|
+
// if (strict && interval === 0) {
|
|
1064
|
+
// throw new TypeError('The `strict` option cannot be used with `interval` of 0');
|
|
1065
|
+
// }
|
|
1066
|
+
|
|
1053
1067
|
const state = {
|
|
1054
1068
|
queue: new Map(),
|
|
1055
1069
|
strictTicks: [],
|
|
1056
1070
|
// Track windowed algorithm state so it can be reset on abort
|
|
1057
1071
|
currentTick: 0,
|
|
1058
|
-
|
|
1072
|
+
activeWeight: 0
|
|
1059
1073
|
};
|
|
1060
|
-
function windowedDelay() {
|
|
1074
|
+
function windowedDelay(requestWeight) {
|
|
1061
1075
|
const now = Date.now();
|
|
1062
1076
|
if (now - state.currentTick > interval) {
|
|
1063
|
-
state.
|
|
1077
|
+
state.activeWeight = requestWeight;
|
|
1064
1078
|
state.currentTick = now;
|
|
1065
1079
|
return 0;
|
|
1066
1080
|
}
|
|
1067
|
-
if (state.
|
|
1068
|
-
state.
|
|
1081
|
+
if (state.activeWeight + requestWeight <= limit) {
|
|
1082
|
+
state.activeWeight += requestWeight;
|
|
1069
1083
|
} else {
|
|
1070
1084
|
state.currentTick += interval;
|
|
1071
|
-
state.
|
|
1085
|
+
state.activeWeight = requestWeight;
|
|
1072
1086
|
}
|
|
1073
1087
|
return state.currentTick - now;
|
|
1074
1088
|
}
|
|
@@ -1080,6 +1094,28 @@ function pThrottle({
|
|
|
1080
1094
|
}
|
|
1081
1095
|
let timeoutId;
|
|
1082
1096
|
return new Promise((resolve, reject) => {
|
|
1097
|
+
// Calculate weight for this call
|
|
1098
|
+
let requestWeight = 1;
|
|
1099
|
+
if (weight) {
|
|
1100
|
+
try {
|
|
1101
|
+
requestWeight = weight(...arguments_);
|
|
1102
|
+
} catch (error) {
|
|
1103
|
+
reject(error);
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// Validate weight
|
|
1108
|
+
if (!Number.isFinite(requestWeight) || requestWeight < 0) {
|
|
1109
|
+
reject(new TypeError('Expected `weight` to be a finite non-negative number'));
|
|
1110
|
+
return;
|
|
1111
|
+
}
|
|
1112
|
+
if (requestWeight > limit) {
|
|
1113
|
+
reject(new TypeError(`Expected \`weight\` (${requestWeight}) to be <= \`limit\` (${limit})`));
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
const delayResult = getDelay(requestWeight);
|
|
1118
|
+
const delay = delayResult;
|
|
1083
1119
|
const execute = () => {
|
|
1084
1120
|
try {
|
|
1085
1121
|
resolve(function_.apply(this, arguments_));
|
|
@@ -1088,7 +1124,6 @@ function pThrottle({
|
|
|
1088
1124
|
}
|
|
1089
1125
|
state.queue.delete(timeoutId);
|
|
1090
1126
|
};
|
|
1091
|
-
const delay = getDelay();
|
|
1092
1127
|
if (delay > 0) {
|
|
1093
1128
|
timeoutId = setTimeout(execute, delay);
|
|
1094
1129
|
state.queue.set(timeoutId, reject);
|
|
@@ -1126,7 +1161,7 @@ function pThrottle({
|
|
|
1126
1161
|
functionState.strictTicks.length = 0;
|
|
1127
1162
|
// Reset windowed state so subsequent calls are not artificially delayed
|
|
1128
1163
|
functionState.currentTick = 0;
|
|
1129
|
-
functionState.
|
|
1164
|
+
functionState.activeWeight = 0;
|
|
1130
1165
|
}
|
|
1131
1166
|
signalThrottleds.delete(signal);
|
|
1132
1167
|
};
|
|
@@ -2444,48 +2479,6 @@ function requireGetProto() {
|
|
|
2444
2479
|
return getProto;
|
|
2445
2480
|
}
|
|
2446
2481
|
|
|
2447
|
-
var asyncFunction;
|
|
2448
|
-
var hasRequiredAsyncFunction;
|
|
2449
|
-
function requireAsyncFunction() {
|
|
2450
|
-
if (hasRequiredAsyncFunction) return asyncFunction;
|
|
2451
|
-
hasRequiredAsyncFunction = 1;
|
|
2452
|
-
|
|
2453
|
-
// eslint-disable-next-line no-extra-parens, no-empty-function
|
|
2454
|
-
const cached = /** @type {import('.').AsyncFunctionConstructor} */async function () {}.constructor;
|
|
2455
|
-
|
|
2456
|
-
/** @type {import('.')} */
|
|
2457
|
-
asyncFunction = () => cached;
|
|
2458
|
-
return asyncFunction;
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
var generatorFunction;
|
|
2462
|
-
var hasRequiredGeneratorFunction;
|
|
2463
|
-
function requireGeneratorFunction() {
|
|
2464
|
-
if (hasRequiredGeneratorFunction) return generatorFunction;
|
|
2465
|
-
hasRequiredGeneratorFunction = 1;
|
|
2466
|
-
|
|
2467
|
-
// eslint-disable-next-line no-extra-parens, no-empty-function
|
|
2468
|
-
const cached = /** @type {GeneratorFunctionConstructor} */function* () {}.constructor;
|
|
2469
|
-
|
|
2470
|
-
/** @type {import('.')} */
|
|
2471
|
-
generatorFunction = () => cached;
|
|
2472
|
-
return generatorFunction;
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
var asyncGeneratorFunction;
|
|
2476
|
-
var hasRequiredAsyncGeneratorFunction;
|
|
2477
|
-
function requireAsyncGeneratorFunction() {
|
|
2478
|
-
if (hasRequiredAsyncGeneratorFunction) return asyncGeneratorFunction;
|
|
2479
|
-
hasRequiredAsyncGeneratorFunction = 1;
|
|
2480
|
-
|
|
2481
|
-
// eslint-disable-next-line no-extra-parens, no-empty-function
|
|
2482
|
-
const cached = /** @type {import('.').AsyncGeneratorFunctionConstructor} */_wrapAsyncGenerator(function* () {}).constructor;
|
|
2483
|
-
|
|
2484
|
-
/** @type {import('.')} */
|
|
2485
|
-
asyncGeneratorFunction = () => cached;
|
|
2486
|
-
return asyncGeneratorFunction;
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
2482
|
var hasown;
|
|
2490
2483
|
var hasRequiredHasown;
|
|
2491
2484
|
function requireHasown() {
|
|
@@ -2521,6 +2514,14 @@ function requireGetIntrinsic() {
|
|
|
2521
2514
|
var pow = /*@__PURE__*/requirePow();
|
|
2522
2515
|
var round = /*@__PURE__*/requireRound();
|
|
2523
2516
|
var sign = /*@__PURE__*/requireSign();
|
|
2517
|
+
var $Function = Function;
|
|
2518
|
+
|
|
2519
|
+
// eslint-disable-next-line consistent-return
|
|
2520
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
2521
|
+
try {
|
|
2522
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
2523
|
+
} catch (e) {}
|
|
2524
|
+
};
|
|
2524
2525
|
var $gOPD = /*@__PURE__*/requireGopd();
|
|
2525
2526
|
var $defineProperty = /*@__PURE__*/requireEsDefineProperty();
|
|
2526
2527
|
var throwTypeError = function () {
|
|
@@ -2578,7 +2579,7 @@ function requireGetIntrinsic() {
|
|
|
2578
2579
|
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
2579
2580
|
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
2580
2581
|
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
2581
|
-
'%Function%': Function,
|
|
2582
|
+
'%Function%': $Function,
|
|
2582
2583
|
'%GeneratorFunction%': needsEval,
|
|
2583
2584
|
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
2584
2585
|
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
@@ -2641,17 +2642,14 @@ function requireGetIntrinsic() {
|
|
|
2641
2642
|
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
2642
2643
|
}
|
|
2643
2644
|
}
|
|
2644
|
-
var getAsyncFunction = requireAsyncFunction();
|
|
2645
|
-
var getGeneratorFunction = /*@__PURE__*/requireGeneratorFunction();
|
|
2646
|
-
var getAsyncGeneratorFunction = requireAsyncGeneratorFunction();
|
|
2647
2645
|
var doEval = function doEval(name) {
|
|
2648
2646
|
var value;
|
|
2649
2647
|
if (name === '%AsyncFunction%') {
|
|
2650
|
-
value =
|
|
2648
|
+
value = getEvalledConstructor('async function () {}');
|
|
2651
2649
|
} else if (name === '%GeneratorFunction%') {
|
|
2652
|
-
value =
|
|
2650
|
+
value = getEvalledConstructor('function* () {}');
|
|
2653
2651
|
} else if (name === '%AsyncGeneratorFunction%') {
|
|
2654
|
-
value =
|
|
2652
|
+
value = getEvalledConstructor('async function* () {}');
|
|
2655
2653
|
} else if (name === '%AsyncGenerator%') {
|
|
2656
2654
|
var fn = doEval('%AsyncGeneratorFunction%');
|
|
2657
2655
|
if (fn) {
|
|
@@ -15220,7 +15218,7 @@ var hasRequiredMimeTypes;
|
|
|
15220
15218
|
function requireMimeTypes() {
|
|
15221
15219
|
if (hasRequiredMimeTypes) return mimeTypes;
|
|
15222
15220
|
hasRequiredMimeTypes = 1;
|
|
15223
|
-
(function (exports) {
|
|
15221
|
+
(function (exports$1) {
|
|
15224
15222
|
|
|
15225
15223
|
/**
|
|
15226
15224
|
* Module dependencies.
|
|
@@ -15242,18 +15240,18 @@ function requireMimeTypes() {
|
|
|
15242
15240
|
* @public
|
|
15243
15241
|
*/
|
|
15244
15242
|
|
|
15245
|
-
exports.charset = charset;
|
|
15246
|
-
exports.charsets = {
|
|
15243
|
+
exports$1.charset = charset;
|
|
15244
|
+
exports$1.charsets = {
|
|
15247
15245
|
lookup: charset
|
|
15248
15246
|
};
|
|
15249
|
-
exports.contentType = contentType;
|
|
15250
|
-
exports.extension = extension;
|
|
15251
|
-
exports.extensions = Object.create(null);
|
|
15252
|
-
exports.lookup = lookup;
|
|
15253
|
-
exports.types = Object.create(null);
|
|
15247
|
+
exports$1.contentType = contentType;
|
|
15248
|
+
exports$1.extension = extension;
|
|
15249
|
+
exports$1.extensions = Object.create(null);
|
|
15250
|
+
exports$1.lookup = lookup;
|
|
15251
|
+
exports$1.types = Object.create(null);
|
|
15254
15252
|
|
|
15255
15253
|
// Populate the extensions/types maps
|
|
15256
|
-
populateMaps(exports.extensions, exports.types);
|
|
15254
|
+
populateMaps(exports$1.extensions, exports$1.types);
|
|
15257
15255
|
|
|
15258
15256
|
/**
|
|
15259
15257
|
* Get the default charset for a MIME type.
|
|
@@ -15293,14 +15291,14 @@ function requireMimeTypes() {
|
|
|
15293
15291
|
if (!str || typeof str !== 'string') {
|
|
15294
15292
|
return false;
|
|
15295
15293
|
}
|
|
15296
|
-
var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str;
|
|
15294
|
+
var mime = str.indexOf('/') === -1 ? exports$1.lookup(str) : str;
|
|
15297
15295
|
if (!mime) {
|
|
15298
15296
|
return false;
|
|
15299
15297
|
}
|
|
15300
15298
|
|
|
15301
15299
|
// TODO: use content-type or other module
|
|
15302
15300
|
if (mime.indexOf('charset') === -1) {
|
|
15303
|
-
var charset = exports.charset(mime);
|
|
15301
|
+
var charset = exports$1.charset(mime);
|
|
15304
15302
|
if (charset) mime += '; charset=' + charset.toLowerCase();
|
|
15305
15303
|
}
|
|
15306
15304
|
return mime;
|
|
@@ -15322,7 +15320,7 @@ function requireMimeTypes() {
|
|
|
15322
15320
|
var match = EXTRACT_TYPE_REGEXP.exec(type);
|
|
15323
15321
|
|
|
15324
15322
|
// get extensions
|
|
15325
|
-
var exts = match && exports.extensions[match[1].toLowerCase()];
|
|
15323
|
+
var exts = match && exports$1.extensions[match[1].toLowerCase()];
|
|
15326
15324
|
if (!exts || !exts.length) {
|
|
15327
15325
|
return false;
|
|
15328
15326
|
}
|
|
@@ -15346,7 +15344,7 @@ function requireMimeTypes() {
|
|
|
15346
15344
|
if (!extension) {
|
|
15347
15345
|
return false;
|
|
15348
15346
|
}
|
|
15349
|
-
return exports.types[extension] || false;
|
|
15347
|
+
return exports$1.types[extension] || false;
|
|
15350
15348
|
}
|
|
15351
15349
|
|
|
15352
15350
|
/**
|
|
@@ -16274,7 +16272,7 @@ function requireForm_data() {
|
|
|
16274
16272
|
var callback = function (error, responce) {
|
|
16275
16273
|
request.removeListener('error', callback);
|
|
16276
16274
|
request.removeListener('response', onResponse);
|
|
16277
|
-
return cb.call(this, error, responce);
|
|
16275
|
+
return cb.call(this, error, responce);
|
|
16278
16276
|
};
|
|
16279
16277
|
onResponse = callback.bind(this, null);
|
|
16280
16278
|
request.on('error', callback);
|
|
@@ -16293,7 +16291,7 @@ function requireForm_data() {
|
|
|
16293
16291
|
FormData.prototype.toString = function () {
|
|
16294
16292
|
return '[object FormData]';
|
|
16295
16293
|
};
|
|
16296
|
-
setToStringTag(FormData, 'FormData');
|
|
16294
|
+
setToStringTag(FormData.prototype, 'FormData');
|
|
16297
16295
|
|
|
16298
16296
|
// Public API
|
|
16299
16297
|
form_data = FormData;
|
|
@@ -16847,17 +16845,17 @@ var hasRequiredBrowser;
|
|
|
16847
16845
|
function requireBrowser() {
|
|
16848
16846
|
if (hasRequiredBrowser) return browser.exports;
|
|
16849
16847
|
hasRequiredBrowser = 1;
|
|
16850
|
-
(function (module, exports) {
|
|
16848
|
+
(function (module, exports$1) {
|
|
16851
16849
|
/**
|
|
16852
16850
|
* This is the web browser implementation of `debug()`.
|
|
16853
16851
|
*/
|
|
16854
16852
|
|
|
16855
|
-
exports.formatArgs = formatArgs;
|
|
16856
|
-
exports.save = save;
|
|
16857
|
-
exports.load = load;
|
|
16858
|
-
exports.useColors = useColors;
|
|
16859
|
-
exports.storage = localstorage();
|
|
16860
|
-
exports.destroy = (() => {
|
|
16853
|
+
exports$1.formatArgs = formatArgs;
|
|
16854
|
+
exports$1.save = save;
|
|
16855
|
+
exports$1.load = load;
|
|
16856
|
+
exports$1.useColors = useColors;
|
|
16857
|
+
exports$1.storage = localstorage();
|
|
16858
|
+
exports$1.destroy = (() => {
|
|
16861
16859
|
let warned = false;
|
|
16862
16860
|
return () => {
|
|
16863
16861
|
if (!warned) {
|
|
@@ -16871,7 +16869,7 @@ function requireBrowser() {
|
|
|
16871
16869
|
* Colors.
|
|
16872
16870
|
*/
|
|
16873
16871
|
|
|
16874
|
-
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
|
16872
|
+
exports$1.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
|
16875
16873
|
|
|
16876
16874
|
/**
|
|
16877
16875
|
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
@@ -16950,7 +16948,7 @@ function requireBrowser() {
|
|
|
16950
16948
|
*
|
|
16951
16949
|
* @api public
|
|
16952
16950
|
*/
|
|
16953
|
-
exports.log = console.debug || console.log || (() => {});
|
|
16951
|
+
exports$1.log = console.debug || console.log || (() => {});
|
|
16954
16952
|
|
|
16955
16953
|
/**
|
|
16956
16954
|
* Save `namespaces`.
|
|
@@ -16961,9 +16959,9 @@ function requireBrowser() {
|
|
|
16961
16959
|
function save(namespaces) {
|
|
16962
16960
|
try {
|
|
16963
16961
|
if (namespaces) {
|
|
16964
|
-
exports.storage.setItem('debug', namespaces);
|
|
16962
|
+
exports$1.storage.setItem('debug', namespaces);
|
|
16965
16963
|
} else {
|
|
16966
|
-
exports.storage.removeItem('debug');
|
|
16964
|
+
exports$1.storage.removeItem('debug');
|
|
16967
16965
|
}
|
|
16968
16966
|
} catch (error) {
|
|
16969
16967
|
// Swallow
|
|
@@ -16980,7 +16978,7 @@ function requireBrowser() {
|
|
|
16980
16978
|
function load() {
|
|
16981
16979
|
let r;
|
|
16982
16980
|
try {
|
|
16983
|
-
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
|
|
16981
|
+
r = exports$1.storage.getItem('debug') || exports$1.storage.getItem('DEBUG');
|
|
16984
16982
|
} catch (error) {
|
|
16985
16983
|
// Swallow
|
|
16986
16984
|
// XXX (@Qix-) should we be logging these?
|
|
@@ -17014,7 +17012,7 @@ function requireBrowser() {
|
|
|
17014
17012
|
// XXX (@Qix-) should we be logging these?
|
|
17015
17013
|
}
|
|
17016
17014
|
}
|
|
17017
|
-
module.exports = requireCommon()(exports);
|
|
17015
|
+
module.exports = requireCommon()(exports$1);
|
|
17018
17016
|
const {
|
|
17019
17017
|
formatters
|
|
17020
17018
|
} = module.exports;
|
|
@@ -17041,11 +17039,12 @@ var hasRequiredHasFlag;
|
|
|
17041
17039
|
function requireHasFlag() {
|
|
17042
17040
|
if (hasRequiredHasFlag) return hasFlag;
|
|
17043
17041
|
hasRequiredHasFlag = 1;
|
|
17044
|
-
hasFlag = (flag, argv
|
|
17042
|
+
hasFlag = (flag, argv) => {
|
|
17043
|
+
argv = argv || process.argv;
|
|
17045
17044
|
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
17046
|
-
const
|
|
17047
|
-
const
|
|
17048
|
-
return
|
|
17045
|
+
const pos = argv.indexOf(prefix + flag);
|
|
17046
|
+
const terminatorPos = argv.indexOf('--');
|
|
17047
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
17049
17048
|
};
|
|
17050
17049
|
return hasFlag;
|
|
17051
17050
|
}
|
|
@@ -17056,25 +17055,16 @@ function requireSupportsColor() {
|
|
|
17056
17055
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
17057
17056
|
hasRequiredSupportsColor = 1;
|
|
17058
17057
|
const os = require$$0$3;
|
|
17059
|
-
const tty = require$$1$2;
|
|
17060
17058
|
const hasFlag = requireHasFlag();
|
|
17061
|
-
const
|
|
17062
|
-
env
|
|
17063
|
-
} = process;
|
|
17059
|
+
const env = process.env;
|
|
17064
17060
|
let forceColor;
|
|
17065
|
-
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')
|
|
17066
|
-
forceColor =
|
|
17061
|
+
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
|
|
17062
|
+
forceColor = false;
|
|
17067
17063
|
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
17068
|
-
forceColor =
|
|
17064
|
+
forceColor = true;
|
|
17069
17065
|
}
|
|
17070
17066
|
if ('FORCE_COLOR' in env) {
|
|
17071
|
-
|
|
17072
|
-
forceColor = 1;
|
|
17073
|
-
} else if (env.FORCE_COLOR === 'false') {
|
|
17074
|
-
forceColor = 0;
|
|
17075
|
-
} else {
|
|
17076
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
17077
|
-
}
|
|
17067
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
17078
17068
|
}
|
|
17079
17069
|
function translateLevel(level) {
|
|
17080
17070
|
if (level === 0) {
|
|
@@ -17087,8 +17077,8 @@ function requireSupportsColor() {
|
|
|
17087
17077
|
has16m: level >= 3
|
|
17088
17078
|
};
|
|
17089
17079
|
}
|
|
17090
|
-
function supportsColor(
|
|
17091
|
-
if (forceColor ===
|
|
17080
|
+
function supportsColor(stream) {
|
|
17081
|
+
if (forceColor === false) {
|
|
17092
17082
|
return 0;
|
|
17093
17083
|
}
|
|
17094
17084
|
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
@@ -17097,24 +17087,25 @@ function requireSupportsColor() {
|
|
|
17097
17087
|
if (hasFlag('color=256')) {
|
|
17098
17088
|
return 2;
|
|
17099
17089
|
}
|
|
17100
|
-
if (
|
|
17090
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
17101
17091
|
return 0;
|
|
17102
17092
|
}
|
|
17103
|
-
const min = forceColor
|
|
17104
|
-
if (env.TERM === 'dumb') {
|
|
17105
|
-
return min;
|
|
17106
|
-
}
|
|
17093
|
+
const min = forceColor ? 1 : 0;
|
|
17107
17094
|
if (process.platform === 'win32') {
|
|
17108
|
-
//
|
|
17109
|
-
//
|
|
17095
|
+
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
17096
|
+
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
17097
|
+
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
17098
|
+
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
17099
|
+
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
17100
|
+
// that supports 16m/TrueColor.
|
|
17110
17101
|
const osRelease = os.release().split('.');
|
|
17111
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
17102
|
+
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
17112
17103
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
17113
17104
|
}
|
|
17114
17105
|
return 1;
|
|
17115
17106
|
}
|
|
17116
17107
|
if ('CI' in env) {
|
|
17117
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'
|
|
17108
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
17118
17109
|
return 1;
|
|
17119
17110
|
}
|
|
17120
17111
|
return min;
|
|
@@ -17144,16 +17135,19 @@ function requireSupportsColor() {
|
|
|
17144
17135
|
if ('COLORTERM' in env) {
|
|
17145
17136
|
return 1;
|
|
17146
17137
|
}
|
|
17138
|
+
if (env.TERM === 'dumb') {
|
|
17139
|
+
return min;
|
|
17140
|
+
}
|
|
17147
17141
|
return min;
|
|
17148
17142
|
}
|
|
17149
17143
|
function getSupportLevel(stream) {
|
|
17150
|
-
const level = supportsColor(stream
|
|
17144
|
+
const level = supportsColor(stream);
|
|
17151
17145
|
return translateLevel(level);
|
|
17152
17146
|
}
|
|
17153
17147
|
supportsColor_1 = {
|
|
17154
17148
|
supportsColor: getSupportLevel,
|
|
17155
|
-
stdout:
|
|
17156
|
-
stderr:
|
|
17149
|
+
stdout: getSupportLevel(process.stdout),
|
|
17150
|
+
stderr: getSupportLevel(process.stderr)
|
|
17157
17151
|
};
|
|
17158
17152
|
return supportsColor_1;
|
|
17159
17153
|
}
|
|
@@ -17165,33 +17159,33 @@ var hasRequiredNode;
|
|
|
17165
17159
|
function requireNode() {
|
|
17166
17160
|
if (hasRequiredNode) return node.exports;
|
|
17167
17161
|
hasRequiredNode = 1;
|
|
17168
|
-
(function (module, exports) {
|
|
17169
|
-
const tty = require$$
|
|
17162
|
+
(function (module, exports$1) {
|
|
17163
|
+
const tty = require$$0$4;
|
|
17170
17164
|
const util = require$$1;
|
|
17171
17165
|
|
|
17172
17166
|
/**
|
|
17173
17167
|
* This is the Node.js implementation of `debug()`.
|
|
17174
17168
|
*/
|
|
17175
17169
|
|
|
17176
|
-
exports.init = init;
|
|
17177
|
-
exports.log = log;
|
|
17178
|
-
exports.formatArgs = formatArgs;
|
|
17179
|
-
exports.save = save;
|
|
17180
|
-
exports.load = load;
|
|
17181
|
-
exports.useColors = useColors;
|
|
17182
|
-
exports.destroy = util.deprecate(() => {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
17170
|
+
exports$1.init = init;
|
|
17171
|
+
exports$1.log = log;
|
|
17172
|
+
exports$1.formatArgs = formatArgs;
|
|
17173
|
+
exports$1.save = save;
|
|
17174
|
+
exports$1.load = load;
|
|
17175
|
+
exports$1.useColors = useColors;
|
|
17176
|
+
exports$1.destroy = util.deprecate(() => {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
17183
17177
|
|
|
17184
17178
|
/**
|
|
17185
17179
|
* Colors.
|
|
17186
17180
|
*/
|
|
17187
17181
|
|
|
17188
|
-
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
17182
|
+
exports$1.colors = [6, 2, 3, 4, 5, 1];
|
|
17189
17183
|
try {
|
|
17190
17184
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
17191
17185
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
17192
17186
|
const supportsColor = requireSupportsColor();
|
|
17193
17187
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
17194
|
-
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
|
|
17188
|
+
exports$1.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
|
|
17195
17189
|
}
|
|
17196
17190
|
} catch (error) {
|
|
17197
17191
|
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
@@ -17203,7 +17197,7 @@ function requireNode() {
|
|
|
17203
17197
|
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
17204
17198
|
*/
|
|
17205
17199
|
|
|
17206
|
-
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
|
17200
|
+
exports$1.inspectOpts = Object.keys(process.env).filter(key => {
|
|
17207
17201
|
return /^debug_/i.test(key);
|
|
17208
17202
|
}).reduce((obj, key) => {
|
|
17209
17203
|
// Camel-case
|
|
@@ -17231,7 +17225,7 @@ function requireNode() {
|
|
|
17231
17225
|
*/
|
|
17232
17226
|
|
|
17233
17227
|
function useColors() {
|
|
17234
|
-
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
17228
|
+
return 'colors' in exports$1.inspectOpts ? Boolean(exports$1.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
17235
17229
|
}
|
|
17236
17230
|
|
|
17237
17231
|
/**
|
|
@@ -17256,7 +17250,7 @@ function requireNode() {
|
|
|
17256
17250
|
}
|
|
17257
17251
|
}
|
|
17258
17252
|
function getDate() {
|
|
17259
|
-
if (exports.inspectOpts.hideDate) {
|
|
17253
|
+
if (exports$1.inspectOpts.hideDate) {
|
|
17260
17254
|
return '';
|
|
17261
17255
|
}
|
|
17262
17256
|
return new Date().toISOString() + ' ';
|
|
@@ -17267,7 +17261,7 @@ function requireNode() {
|
|
|
17267
17261
|
*/
|
|
17268
17262
|
|
|
17269
17263
|
function log(...args) {
|
|
17270
|
-
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
|
|
17264
|
+
return process.stderr.write(util.formatWithOptions(exports$1.inspectOpts, ...args) + '\n');
|
|
17271
17265
|
}
|
|
17272
17266
|
|
|
17273
17267
|
/**
|
|
@@ -17306,12 +17300,12 @@ function requireNode() {
|
|
|
17306
17300
|
|
|
17307
17301
|
function init(debug) {
|
|
17308
17302
|
debug.inspectOpts = {};
|
|
17309
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
17303
|
+
const keys = Object.keys(exports$1.inspectOpts);
|
|
17310
17304
|
for (let i = 0; i < keys.length; i++) {
|
|
17311
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
17305
|
+
debug.inspectOpts[keys[i]] = exports$1.inspectOpts[keys[i]];
|
|
17312
17306
|
}
|
|
17313
17307
|
}
|
|
17314
|
-
module.exports = requireCommon()(exports);
|
|
17308
|
+
module.exports = requireCommon()(exports$1);
|
|
17315
17309
|
const {
|
|
17316
17310
|
formatters
|
|
17317
17311
|
} = module.exports;
|
|
@@ -17835,7 +17829,7 @@ function requireFollowRedirects() {
|
|
|
17835
17829
|
// Wraps the key/value object of protocols with redirect functionality
|
|
17836
17830
|
function wrap(protocols) {
|
|
17837
17831
|
// Default settings
|
|
17838
|
-
var exports = {
|
|
17832
|
+
var exports$1 = {
|
|
17839
17833
|
maxRedirects: 21,
|
|
17840
17834
|
maxBodyLength: 10 * 1024 * 1024
|
|
17841
17835
|
};
|
|
@@ -17845,7 +17839,7 @@ function requireFollowRedirects() {
|
|
|
17845
17839
|
Object.keys(protocols).forEach(function (scheme) {
|
|
17846
17840
|
var protocol = scheme + ":";
|
|
17847
17841
|
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
17848
|
-
var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
|
|
17842
|
+
var wrappedProtocol = exports$1[scheme] = Object.create(nativeProtocol);
|
|
17849
17843
|
|
|
17850
17844
|
// Executes a request, following redirects
|
|
17851
17845
|
function request(input, options, callback) {
|
|
@@ -17868,8 +17862,8 @@ function requireFollowRedirects() {
|
|
|
17868
17862
|
|
|
17869
17863
|
// Set defaults
|
|
17870
17864
|
options = Object.assign({
|
|
17871
|
-
maxRedirects: exports.maxRedirects,
|
|
17872
|
-
maxBodyLength: exports.maxBodyLength
|
|
17865
|
+
maxRedirects: exports$1.maxRedirects,
|
|
17866
|
+
maxBodyLength: exports$1.maxBodyLength
|
|
17873
17867
|
}, input, options);
|
|
17874
17868
|
options.nativeProtocols = nativeProtocols;
|
|
17875
17869
|
if (!isString(options.host) && !isString(options.hostname)) {
|
|
@@ -17903,7 +17897,7 @@ function requireFollowRedirects() {
|
|
|
17903
17897
|
}
|
|
17904
17898
|
});
|
|
17905
17899
|
});
|
|
17906
|
-
return exports;
|
|
17900
|
+
return exports$1;
|
|
17907
17901
|
}
|
|
17908
17902
|
function noop() {/* empty */}
|
|
17909
17903
|
function parseUrl(input) {
|
|
@@ -18038,11 +18032,12 @@ function requireAxios() {
|
|
|
18038
18032
|
const proxyFromEnv = requireProxyFromEnv();
|
|
18039
18033
|
const http = require$$3;
|
|
18040
18034
|
const https = require$$4;
|
|
18035
|
+
const http2 = require$$6$1;
|
|
18041
18036
|
const util = require$$1;
|
|
18042
18037
|
const followRedirects = requireFollowRedirects();
|
|
18043
|
-
const zlib = require$$
|
|
18038
|
+
const zlib = require$$9;
|
|
18044
18039
|
const stream = require$$0$1;
|
|
18045
|
-
const events = require$$
|
|
18040
|
+
const events = require$$11;
|
|
18046
18041
|
function _interopDefaultLegacy(e) {
|
|
18047
18042
|
return e && typeof e === 'object' && 'default' in e ? e : {
|
|
18048
18043
|
'default': e
|
|
@@ -18054,10 +18049,19 @@ function requireAxios() {
|
|
|
18054
18049
|
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
|
|
18055
18050
|
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
18056
18051
|
const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
|
18052
|
+
const http2__default = /*#__PURE__*/_interopDefaultLegacy(http2);
|
|
18057
18053
|
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
|
|
18058
18054
|
const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
|
|
18059
18055
|
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
|
|
18060
18056
|
const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
|
|
18057
|
+
|
|
18058
|
+
/**
|
|
18059
|
+
* Create a bound version of a function with a specified `this` context
|
|
18060
|
+
*
|
|
18061
|
+
* @param {Function} fn - The function to bind
|
|
18062
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
18063
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
18064
|
+
*/
|
|
18061
18065
|
function bind(fn, thisArg) {
|
|
18062
18066
|
return function wrap() {
|
|
18063
18067
|
return fn.apply(thisArg, arguments);
|
|
@@ -19191,7 +19195,7 @@ function requireAxios() {
|
|
|
19191
19195
|
*
|
|
19192
19196
|
* @param {Number} id The ID that was returned by `use`
|
|
19193
19197
|
*
|
|
19194
|
-
* @returns {
|
|
19198
|
+
* @returns {void}
|
|
19195
19199
|
*/
|
|
19196
19200
|
eject(id) {
|
|
19197
19201
|
if (this.handlers[id]) {
|
|
@@ -19895,7 +19899,7 @@ function requireAxios() {
|
|
|
19895
19899
|
}
|
|
19896
19900
|
return requestedURL;
|
|
19897
19901
|
}
|
|
19898
|
-
const VERSION = "1.
|
|
19902
|
+
const VERSION = "1.13.2";
|
|
19899
19903
|
function parseProtocol(url) {
|
|
19900
19904
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
19901
19905
|
return match && match[1] || '';
|
|
@@ -20388,6 +20392,77 @@ function requireAxios() {
|
|
|
20388
20392
|
stream.on('end', flush).on('error', flush);
|
|
20389
20393
|
return throttled;
|
|
20390
20394
|
};
|
|
20395
|
+
class Http2Sessions {
|
|
20396
|
+
constructor() {
|
|
20397
|
+
this.sessions = Object.create(null);
|
|
20398
|
+
}
|
|
20399
|
+
getSession(authority, options) {
|
|
20400
|
+
options = Object.assign({
|
|
20401
|
+
sessionTimeout: 1000
|
|
20402
|
+
}, options);
|
|
20403
|
+
let authoritySessions = this.sessions[authority];
|
|
20404
|
+
if (authoritySessions) {
|
|
20405
|
+
let len = authoritySessions.length;
|
|
20406
|
+
for (let i = 0; i < len; i++) {
|
|
20407
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
20408
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util__default["default"].isDeepStrictEqual(sessionOptions, options)) {
|
|
20409
|
+
return sessionHandle;
|
|
20410
|
+
}
|
|
20411
|
+
}
|
|
20412
|
+
}
|
|
20413
|
+
const session = http2__default["default"].connect(authority, options);
|
|
20414
|
+
let removed;
|
|
20415
|
+
const removeSession = () => {
|
|
20416
|
+
if (removed) {
|
|
20417
|
+
return;
|
|
20418
|
+
}
|
|
20419
|
+
removed = true;
|
|
20420
|
+
let entries = authoritySessions,
|
|
20421
|
+
len = entries.length,
|
|
20422
|
+
i = len;
|
|
20423
|
+
while (i--) {
|
|
20424
|
+
if (entries[i][0] === session) {
|
|
20425
|
+
if (len === 1) {
|
|
20426
|
+
delete this.sessions[authority];
|
|
20427
|
+
} else {
|
|
20428
|
+
entries.splice(i, 1);
|
|
20429
|
+
}
|
|
20430
|
+
return;
|
|
20431
|
+
}
|
|
20432
|
+
}
|
|
20433
|
+
};
|
|
20434
|
+
const originalRequestFn = session.request;
|
|
20435
|
+
const {
|
|
20436
|
+
sessionTimeout
|
|
20437
|
+
} = options;
|
|
20438
|
+
if (sessionTimeout != null) {
|
|
20439
|
+
let timer;
|
|
20440
|
+
let streamsCount = 0;
|
|
20441
|
+
session.request = function () {
|
|
20442
|
+
const stream = originalRequestFn.apply(this, arguments);
|
|
20443
|
+
streamsCount++;
|
|
20444
|
+
if (timer) {
|
|
20445
|
+
clearTimeout(timer);
|
|
20446
|
+
timer = null;
|
|
20447
|
+
}
|
|
20448
|
+
stream.once('close', () => {
|
|
20449
|
+
if (! --streamsCount) {
|
|
20450
|
+
timer = setTimeout(() => {
|
|
20451
|
+
timer = null;
|
|
20452
|
+
removeSession();
|
|
20453
|
+
}, sessionTimeout);
|
|
20454
|
+
}
|
|
20455
|
+
});
|
|
20456
|
+
return stream;
|
|
20457
|
+
};
|
|
20458
|
+
}
|
|
20459
|
+
session.once('close', removeSession);
|
|
20460
|
+
let entry = [session, options];
|
|
20461
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
20462
|
+
return session;
|
|
20463
|
+
}
|
|
20464
|
+
}
|
|
20465
|
+
const http2Sessions = new Http2Sessions();
|
|
20391
20466
|
|
|
20392
20467
|
/**
|
|
20393
20468
|
* If the proxy or config beforeRedirects functions are defined, call them with the options
|
|
@@ -20493,6 +20568,42 @@ function requireAxios() {
|
|
|
20493
20568
|
address,
|
|
20494
20569
|
family
|
|
20495
20570
|
});
|
|
20571
|
+
const http2Transport = {
|
|
20572
|
+
request(options, cb) {
|
|
20573
|
+
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || 80);
|
|
20574
|
+
const {
|
|
20575
|
+
http2Options,
|
|
20576
|
+
headers
|
|
20577
|
+
} = options;
|
|
20578
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
20579
|
+
const {
|
|
20580
|
+
HTTP2_HEADER_SCHEME,
|
|
20581
|
+
HTTP2_HEADER_METHOD,
|
|
20582
|
+
HTTP2_HEADER_PATH,
|
|
20583
|
+
HTTP2_HEADER_STATUS
|
|
20584
|
+
} = http2__default["default"].constants;
|
|
20585
|
+
const http2Headers = {
|
|
20586
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
|
|
20587
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
20588
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
20589
|
+
};
|
|
20590
|
+
utils$1.forEach(headers, (header, name) => {
|
|
20591
|
+
name.charAt(0) !== ':' && (http2Headers[name] = header);
|
|
20592
|
+
});
|
|
20593
|
+
const req = session.request(http2Headers);
|
|
20594
|
+
req.once('response', responseHeaders => {
|
|
20595
|
+
const response = req; //duplex
|
|
20596
|
+
|
|
20597
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
20598
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
20599
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
20600
|
+
response.headers = responseHeaders;
|
|
20601
|
+
response.statusCode = +status;
|
|
20602
|
+
cb(response);
|
|
20603
|
+
});
|
|
20604
|
+
return req;
|
|
20605
|
+
}
|
|
20606
|
+
};
|
|
20496
20607
|
|
|
20497
20608
|
/*eslint consistent-return:0*/
|
|
20498
20609
|
const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
@@ -20500,7 +20611,9 @@ function requireAxios() {
|
|
|
20500
20611
|
let {
|
|
20501
20612
|
data,
|
|
20502
20613
|
lookup,
|
|
20503
|
-
family
|
|
20614
|
+
family,
|
|
20615
|
+
httpVersion = 1,
|
|
20616
|
+
http2Options
|
|
20504
20617
|
} = config;
|
|
20505
20618
|
const {
|
|
20506
20619
|
responseType,
|
|
@@ -20510,6 +20623,14 @@ function requireAxios() {
|
|
|
20510
20623
|
let isDone;
|
|
20511
20624
|
let rejected = false;
|
|
20512
20625
|
let req;
|
|
20626
|
+
httpVersion = +httpVersion;
|
|
20627
|
+
if (Number.isNaN(httpVersion)) {
|
|
20628
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
20629
|
+
}
|
|
20630
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
20631
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
20632
|
+
}
|
|
20633
|
+
const isHttp2 = httpVersion === 2;
|
|
20513
20634
|
if (lookup) {
|
|
20514
20635
|
const _lookup = callbackify$1(lookup, value => utils$1.isArray(value) ? value : [value]);
|
|
20515
20636
|
// hotfix to support opt.all option which is required for node 20.x
|
|
@@ -20523,9 +20644,15 @@ function requireAxios() {
|
|
|
20523
20644
|
});
|
|
20524
20645
|
};
|
|
20525
20646
|
}
|
|
20526
|
-
|
|
20527
|
-
|
|
20528
|
-
|
|
20647
|
+
const abortEmitter = new events.EventEmitter();
|
|
20648
|
+
function abort(reason) {
|
|
20649
|
+
try {
|
|
20650
|
+
abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
20651
|
+
} catch (err) {
|
|
20652
|
+
console.warn('emit error', err);
|
|
20653
|
+
}
|
|
20654
|
+
}
|
|
20655
|
+
abortEmitter.once('abort', reject);
|
|
20529
20656
|
const onFinished = () => {
|
|
20530
20657
|
if (config.cancelToken) {
|
|
20531
20658
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -20533,25 +20660,33 @@ function requireAxios() {
|
|
|
20533
20660
|
if (config.signal) {
|
|
20534
20661
|
config.signal.removeEventListener('abort', abort);
|
|
20535
20662
|
}
|
|
20536
|
-
|
|
20663
|
+
abortEmitter.removeAllListeners();
|
|
20537
20664
|
};
|
|
20538
|
-
onDone((value, isRejected) => {
|
|
20539
|
-
isDone = true;
|
|
20540
|
-
if (isRejected) {
|
|
20541
|
-
rejected = true;
|
|
20542
|
-
onFinished();
|
|
20543
|
-
}
|
|
20544
|
-
});
|
|
20545
|
-
function abort(reason) {
|
|
20546
|
-
emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
20547
|
-
}
|
|
20548
|
-
emitter.once('abort', reject);
|
|
20549
20665
|
if (config.cancelToken || config.signal) {
|
|
20550
20666
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
20551
20667
|
if (config.signal) {
|
|
20552
20668
|
config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
|
|
20553
20669
|
}
|
|
20554
20670
|
}
|
|
20671
|
+
onDone((response, isRejected) => {
|
|
20672
|
+
isDone = true;
|
|
20673
|
+
if (isRejected) {
|
|
20674
|
+
rejected = true;
|
|
20675
|
+
onFinished();
|
|
20676
|
+
return;
|
|
20677
|
+
}
|
|
20678
|
+
const {
|
|
20679
|
+
data
|
|
20680
|
+
} = response;
|
|
20681
|
+
if (data instanceof stream__default["default"].Readable || data instanceof stream__default["default"].Duplex) {
|
|
20682
|
+
const offListeners = stream__default["default"].finished(data, () => {
|
|
20683
|
+
offListeners();
|
|
20684
|
+
onFinished();
|
|
20685
|
+
});
|
|
20686
|
+
} else {
|
|
20687
|
+
onFinished();
|
|
20688
|
+
}
|
|
20689
|
+
});
|
|
20555
20690
|
|
|
20556
20691
|
// Parse url
|
|
20557
20692
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
@@ -20710,7 +20845,8 @@ function requireAxios() {
|
|
|
20710
20845
|
protocol,
|
|
20711
20846
|
family,
|
|
20712
20847
|
beforeRedirect: dispatchBeforeRedirect,
|
|
20713
|
-
beforeRedirects: {}
|
|
20848
|
+
beforeRedirects: {},
|
|
20849
|
+
http2Options
|
|
20714
20850
|
};
|
|
20715
20851
|
|
|
20716
20852
|
// cacheable-lookup integration hotfix
|
|
@@ -20725,18 +20861,22 @@ function requireAxios() {
|
|
|
20725
20861
|
let transport;
|
|
20726
20862
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
20727
20863
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
20728
|
-
if (
|
|
20729
|
-
transport =
|
|
20730
|
-
} else if (config.maxRedirects === 0) {
|
|
20731
|
-
transport = isHttpsRequest ? https__default["default"] : http__default["default"];
|
|
20864
|
+
if (isHttp2) {
|
|
20865
|
+
transport = http2Transport;
|
|
20732
20866
|
} else {
|
|
20733
|
-
if (config.
|
|
20734
|
-
|
|
20735
|
-
}
|
|
20736
|
-
|
|
20737
|
-
|
|
20867
|
+
if (config.transport) {
|
|
20868
|
+
transport = config.transport;
|
|
20869
|
+
} else if (config.maxRedirects === 0) {
|
|
20870
|
+
transport = isHttpsRequest ? https__default["default"] : http__default["default"];
|
|
20871
|
+
} else {
|
|
20872
|
+
if (config.maxRedirects) {
|
|
20873
|
+
options.maxRedirects = config.maxRedirects;
|
|
20874
|
+
}
|
|
20875
|
+
if (config.beforeRedirect) {
|
|
20876
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
20877
|
+
}
|
|
20878
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
20738
20879
|
}
|
|
20739
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
20740
20880
|
}
|
|
20741
20881
|
if (config.maxBodyLength > -1) {
|
|
20742
20882
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -20752,7 +20892,7 @@ function requireAxios() {
|
|
|
20752
20892
|
req = transport.request(options, function handleResponse(res) {
|
|
20753
20893
|
if (req.destroyed) return;
|
|
20754
20894
|
const streams = [res];
|
|
20755
|
-
const responseLength =
|
|
20895
|
+
const responseLength = utils$1.toFiniteNumber(res.headers['content-length']);
|
|
20756
20896
|
if (onDownloadProgress || maxDownloadRate) {
|
|
20757
20897
|
const transformStream = new AxiosTransformStream$1({
|
|
20758
20898
|
maxRate: utils$1.toFiniteNumber(maxDownloadRate)
|
|
@@ -20803,10 +20943,6 @@ function requireAxios() {
|
|
|
20803
20943
|
}
|
|
20804
20944
|
}
|
|
20805
20945
|
responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
|
|
20806
|
-
const offListeners = stream__default["default"].finished(responseStream, () => {
|
|
20807
|
-
offListeners();
|
|
20808
|
-
onFinished();
|
|
20809
|
-
});
|
|
20810
20946
|
const response = {
|
|
20811
20947
|
status: res.statusCode,
|
|
20812
20948
|
statusText: res.statusMessage,
|
|
@@ -20829,7 +20965,7 @@ function requireAxios() {
|
|
|
20829
20965
|
// stream.destroy() emit aborted event before calling reject() on Node.js v16
|
|
20830
20966
|
rejected = true;
|
|
20831
20967
|
responseStream.destroy();
|
|
20832
|
-
|
|
20968
|
+
abort(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
20833
20969
|
}
|
|
20834
20970
|
});
|
|
20835
20971
|
responseStream.on('aborted', function handlerStreamAborted() {
|
|
@@ -20860,16 +20996,19 @@ function requireAxios() {
|
|
|
20860
20996
|
settle(resolve, reject, response);
|
|
20861
20997
|
});
|
|
20862
20998
|
}
|
|
20863
|
-
|
|
20999
|
+
abortEmitter.once('abort', err => {
|
|
20864
21000
|
if (!responseStream.destroyed) {
|
|
20865
21001
|
responseStream.emit('error', err);
|
|
20866
21002
|
responseStream.destroy();
|
|
20867
21003
|
}
|
|
20868
21004
|
});
|
|
20869
21005
|
});
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
21006
|
+
abortEmitter.once('abort', err => {
|
|
21007
|
+
if (req.close) {
|
|
21008
|
+
req.close();
|
|
21009
|
+
} else {
|
|
21010
|
+
req.destroy(err);
|
|
21011
|
+
}
|
|
20873
21012
|
});
|
|
20874
21013
|
|
|
20875
21014
|
// Handle errors
|
|
@@ -20890,7 +21029,7 @@ function requireAxios() {
|
|
|
20890
21029
|
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
|
20891
21030
|
const timeout = parseInt(config.timeout, 10);
|
|
20892
21031
|
if (Number.isNaN(timeout)) {
|
|
20893
|
-
|
|
21032
|
+
abort(new AxiosError('error trying to parse `config.timeout` to int', AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
20894
21033
|
return;
|
|
20895
21034
|
}
|
|
20896
21035
|
|
|
@@ -20906,9 +21045,11 @@ function requireAxios() {
|
|
|
20906
21045
|
if (config.timeoutErrorMessage) {
|
|
20907
21046
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
20908
21047
|
}
|
|
20909
|
-
|
|
20910
|
-
abort();
|
|
21048
|
+
abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
|
|
20911
21049
|
});
|
|
21050
|
+
} else {
|
|
21051
|
+
// explicitly reset the socket timeout value for a possible `keep-alive` request
|
|
21052
|
+
req.setTimeout(0);
|
|
20912
21053
|
}
|
|
20913
21054
|
|
|
20914
21055
|
// Send the request
|
|
@@ -20929,7 +21070,8 @@ function requireAxios() {
|
|
|
20929
21070
|
});
|
|
20930
21071
|
data.pipe(req);
|
|
20931
21072
|
} else {
|
|
20932
|
-
req.
|
|
21073
|
+
data && req.write(data);
|
|
21074
|
+
req.end();
|
|
20933
21075
|
}
|
|
20934
21076
|
});
|
|
20935
21077
|
};
|
|
@@ -20940,20 +21082,33 @@ function requireAxios() {
|
|
|
20940
21082
|
const cookies = platform.hasStandardBrowserEnv ?
|
|
20941
21083
|
// Standard browser envs support document.cookie
|
|
20942
21084
|
{
|
|
20943
|
-
write(name, value, expires, path, domain, secure) {
|
|
20944
|
-
|
|
20945
|
-
|
|
20946
|
-
utils$1.
|
|
20947
|
-
|
|
20948
|
-
|
|
21085
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
21086
|
+
if (typeof document === 'undefined') return;
|
|
21087
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
21088
|
+
if (utils$1.isNumber(expires)) {
|
|
21089
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
21090
|
+
}
|
|
21091
|
+
if (utils$1.isString(path)) {
|
|
21092
|
+
cookie.push(`path=${path}`);
|
|
21093
|
+
}
|
|
21094
|
+
if (utils$1.isString(domain)) {
|
|
21095
|
+
cookie.push(`domain=${domain}`);
|
|
21096
|
+
}
|
|
21097
|
+
if (secure === true) {
|
|
21098
|
+
cookie.push('secure');
|
|
21099
|
+
}
|
|
21100
|
+
if (utils$1.isString(sameSite)) {
|
|
21101
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
21102
|
+
}
|
|
20949
21103
|
document.cookie = cookie.join('; ');
|
|
20950
21104
|
},
|
|
20951
21105
|
read(name) {
|
|
20952
|
-
|
|
20953
|
-
|
|
21106
|
+
if (typeof document === 'undefined') return null;
|
|
21107
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
21108
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
20954
21109
|
},
|
|
20955
21110
|
remove(name) {
|
|
20956
|
-
this.write(name, '', Date.now() - 86400000);
|
|
21111
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
20957
21112
|
}
|
|
20958
21113
|
} :
|
|
20959
21114
|
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
@@ -21621,7 +21776,7 @@ function requireAxios() {
|
|
|
21621
21776
|
};
|
|
21622
21777
|
const seedCache = new Map();
|
|
21623
21778
|
const getFetch = config => {
|
|
21624
|
-
let env = config
|
|
21779
|
+
let env = config && config.env || {};
|
|
21625
21780
|
const {
|
|
21626
21781
|
fetch,
|
|
21627
21782
|
Request,
|
|
@@ -21642,6 +21797,16 @@ function requireAxios() {
|
|
|
21642
21797
|
return target;
|
|
21643
21798
|
};
|
|
21644
21799
|
getFetch();
|
|
21800
|
+
|
|
21801
|
+
/**
|
|
21802
|
+
* Known adapters mapping.
|
|
21803
|
+
* Provides environment-specific adapters for Axios:
|
|
21804
|
+
* - `http` for Node.js
|
|
21805
|
+
* - `xhr` for browsers
|
|
21806
|
+
* - `fetch` for fetch API-based requests
|
|
21807
|
+
*
|
|
21808
|
+
* @type {Object<string, Function|Object>}
|
|
21809
|
+
*/
|
|
21645
21810
|
const knownAdapters = {
|
|
21646
21811
|
http: httpAdapter,
|
|
21647
21812
|
xhr: xhrAdapter,
|
|
@@ -21649,6 +21814,8 @@ function requireAxios() {
|
|
|
21649
21814
|
get: getFetch
|
|
21650
21815
|
}
|
|
21651
21816
|
};
|
|
21817
|
+
|
|
21818
|
+
// Assign adapter names for easier debugging and identification
|
|
21652
21819
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
21653
21820
|
if (fn) {
|
|
21654
21821
|
try {
|
|
@@ -21663,39 +21830,77 @@ function requireAxios() {
|
|
|
21663
21830
|
});
|
|
21664
21831
|
}
|
|
21665
21832
|
});
|
|
21833
|
+
|
|
21834
|
+
/**
|
|
21835
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
21836
|
+
*
|
|
21837
|
+
* @param {string} reason
|
|
21838
|
+
* @returns {string}
|
|
21839
|
+
*/
|
|
21666
21840
|
const renderReason = reason => `- ${reason}`;
|
|
21841
|
+
|
|
21842
|
+
/**
|
|
21843
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
21844
|
+
*
|
|
21845
|
+
* @param {Function|null|false} adapter
|
|
21846
|
+
* @returns {boolean}
|
|
21847
|
+
*/
|
|
21667
21848
|
const isResolvedHandle = adapter => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
|
|
21671
|
-
|
|
21672
|
-
|
|
21673
|
-
|
|
21674
|
-
|
|
21675
|
-
|
|
21676
|
-
|
|
21677
|
-
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
|
|
21688
|
-
|
|
21849
|
+
|
|
21850
|
+
/**
|
|
21851
|
+
* Get the first suitable adapter from the provided list.
|
|
21852
|
+
* Tries each adapter in order until a supported one is found.
|
|
21853
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
21854
|
+
*
|
|
21855
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
21856
|
+
* @param {Object} config - Axios request configuration
|
|
21857
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
21858
|
+
* @returns {Function} The resolved adapter function
|
|
21859
|
+
*/
|
|
21860
|
+
function getAdapter(adapters, config) {
|
|
21861
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
21862
|
+
const {
|
|
21863
|
+
length
|
|
21864
|
+
} = adapters;
|
|
21865
|
+
let nameOrAdapter;
|
|
21866
|
+
let adapter;
|
|
21867
|
+
const rejectedReasons = {};
|
|
21868
|
+
for (let i = 0; i < length; i++) {
|
|
21869
|
+
nameOrAdapter = adapters[i];
|
|
21870
|
+
let id;
|
|
21871
|
+
adapter = nameOrAdapter;
|
|
21872
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
21873
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
21874
|
+
if (adapter === undefined) {
|
|
21875
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
21689
21876
|
}
|
|
21690
|
-
rejectedReasons[id || '#' + i] = adapter;
|
|
21691
21877
|
}
|
|
21692
|
-
if (
|
|
21693
|
-
|
|
21694
|
-
let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
21695
|
-
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT');
|
|
21878
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
21879
|
+
break;
|
|
21696
21880
|
}
|
|
21697
|
-
|
|
21698
|
-
}
|
|
21881
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
21882
|
+
}
|
|
21883
|
+
if (!adapter) {
|
|
21884
|
+
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build'));
|
|
21885
|
+
let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
21886
|
+
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT');
|
|
21887
|
+
}
|
|
21888
|
+
return adapter;
|
|
21889
|
+
}
|
|
21890
|
+
|
|
21891
|
+
/**
|
|
21892
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
21893
|
+
*/
|
|
21894
|
+
const adapters = {
|
|
21895
|
+
/**
|
|
21896
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
21897
|
+
* @type {Function}
|
|
21898
|
+
*/
|
|
21899
|
+
getAdapter,
|
|
21900
|
+
/**
|
|
21901
|
+
* Exposes all known adapters
|
|
21902
|
+
* @type {Object<string, Function|Object>}
|
|
21903
|
+
*/
|
|
21699
21904
|
adapters: knownAdapters
|
|
21700
21905
|
};
|
|
21701
21906
|
|
|
@@ -22245,7 +22450,13 @@ function requireAxios() {
|
|
|
22245
22450
|
InsufficientStorage: 507,
|
|
22246
22451
|
LoopDetected: 508,
|
|
22247
22452
|
NotExtended: 510,
|
|
22248
|
-
NetworkAuthenticationRequired: 511
|
|
22453
|
+
NetworkAuthenticationRequired: 511,
|
|
22454
|
+
WebServerIsDown: 521,
|
|
22455
|
+
ConnectionTimedOut: 522,
|
|
22456
|
+
OriginIsUnreachable: 523,
|
|
22457
|
+
TimeoutOccurred: 524,
|
|
22458
|
+
SslHandshakeFailed: 525,
|
|
22459
|
+
InvalidSslCertificate: 526
|
|
22249
22460
|
};
|
|
22250
22461
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
22251
22462
|
HttpStatusCode[value] = key;
|
|
@@ -23542,13 +23753,29 @@ const unpublish$3 = (http, params, payload) => {
|
|
|
23542
23753
|
const validate$2 = (http, params, payload) => {
|
|
23543
23754
|
return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions/validate`, payload);
|
|
23544
23755
|
};
|
|
23756
|
+
const getV2 = (http, params) => {
|
|
23757
|
+
return get$W(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions/${params.bulkActionId}`);
|
|
23758
|
+
};
|
|
23759
|
+
const publishV2 = (http, params, payload) => {
|
|
23760
|
+
return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions`, payload);
|
|
23761
|
+
};
|
|
23762
|
+
const unpublishV2 = (http, params, payload) => {
|
|
23763
|
+
return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions`, payload);
|
|
23764
|
+
};
|
|
23765
|
+
const validateV2 = (http, params, payload) => {
|
|
23766
|
+
return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions`, payload);
|
|
23767
|
+
};
|
|
23545
23768
|
|
|
23546
23769
|
var BulkAction = /*#__PURE__*/Object.freeze({
|
|
23547
23770
|
__proto__: null,
|
|
23548
23771
|
get: get$E,
|
|
23772
|
+
getV2: getV2,
|
|
23549
23773
|
publish: publish$3,
|
|
23774
|
+
publishV2: publishV2,
|
|
23550
23775
|
unpublish: unpublish$3,
|
|
23551
|
-
|
|
23776
|
+
unpublishV2: unpublishV2,
|
|
23777
|
+
validate: validate$2,
|
|
23778
|
+
validateV2: validateV2
|
|
23552
23779
|
});
|
|
23553
23780
|
|
|
23554
23781
|
const VERSION_HEADER = 'X-Contentful-Version';
|
|
@@ -24187,9 +24414,9 @@ var EnvironmentTemplate = /*#__PURE__*/Object.freeze({
|
|
|
24187
24414
|
});
|
|
24188
24415
|
|
|
24189
24416
|
const apiPath = (organizationId, ...pathSegments) => `/organizations/${organizationId}/environment_templates/` + pathSegments.join('/');
|
|
24190
|
-
const getMany$o = (http, { organizationId, environmentTemplateId, spaceId, environmentId, ...
|
|
24417
|
+
const getMany$o = (http, { organizationId, environmentTemplateId, spaceId, environmentId, ...otherProps }, headers) => get$W(http, apiPath(organizationId, environmentTemplateId, 'template_installations'), {
|
|
24191
24418
|
params: {
|
|
24192
|
-
...
|
|
24419
|
+
...otherProps,
|
|
24193
24420
|
...(environmentId && { 'environment.sys.id': environmentId }),
|
|
24194
24421
|
...(spaceId && { 'space.sys.id': spaceId }),
|
|
24195
24422
|
},
|
|
@@ -30925,7 +31152,7 @@ const wrapEnvironmentAliasCollection = wrapCollection(wrapEnvironmentAlias);
|
|
|
30925
31152
|
/**
|
|
30926
31153
|
* Represents that state of the scheduled action
|
|
30927
31154
|
*/
|
|
30928
|
-
|
|
31155
|
+
exports.ScheduledActionStatus = void 0;
|
|
30929
31156
|
(function (ScheduledActionStatus) {
|
|
30930
31157
|
/** action is pending execution */
|
|
30931
31158
|
ScheduledActionStatus["scheduled"] = "scheduled";
|
|
@@ -30937,7 +31164,7 @@ var ScheduledActionStatus;
|
|
|
30937
31164
|
ScheduledActionStatus["failed"] = "failed";
|
|
30938
31165
|
/** action was canceled by a user (terminal state) */
|
|
30939
31166
|
ScheduledActionStatus["canceled"] = "canceled";
|
|
30940
|
-
})(ScheduledActionStatus || (ScheduledActionStatus = {}));
|
|
31167
|
+
})(exports.ScheduledActionStatus || (exports.ScheduledActionStatus = {}));
|
|
30941
31168
|
function getInstanceMethods(makeRequest) {
|
|
30942
31169
|
const getParams = (self) => {
|
|
30943
31170
|
const scheduledAction = self.toPlainObject();
|
|
@@ -34187,6 +34414,7 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
34187
34414
|
* Gets a collection of all installations for the environment template
|
|
34188
34415
|
* @param [installationParams.spaceId] - Space ID to filter installations by space and environment
|
|
34189
34416
|
* @param [installationParams.environmentId] - Environment ID to filter installations by space and environment
|
|
34417
|
+
* @param [installationParams.latestOnly] - Boolean flag to only return the latest installation per environment
|
|
34190
34418
|
* @return Promise for a collection of EnvironmentTemplateInstallations
|
|
34191
34419
|
* ```javascript
|
|
34192
34420
|
* const contentful = require('contentful-management')
|
|
@@ -34203,7 +34431,7 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
34203
34431
|
* .catch(console.error)
|
|
34204
34432
|
* ```
|
|
34205
34433
|
*/
|
|
34206
|
-
getInstallations: function getEnvironmentTemplateInstallations({ spaceId, environmentId, ...query } = {}) {
|
|
34434
|
+
getInstallations: function getEnvironmentTemplateInstallations({ spaceId, environmentId, latestOnly, ...query } = {}) {
|
|
34207
34435
|
const raw = this.toPlainObject();
|
|
34208
34436
|
return makeRequest({
|
|
34209
34437
|
entityType: 'EnvironmentTemplateInstallation',
|
|
@@ -34214,6 +34442,7 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
34214
34442
|
query: { ...createRequestConfig({ query }).params },
|
|
34215
34443
|
spaceId,
|
|
34216
34444
|
environmentId,
|
|
34445
|
+
latestOnly,
|
|
34217
34446
|
},
|
|
34218
34447
|
}).then((data) => wrapEnvironmentTemplateInstallationCollection(makeRequest, data));
|
|
34219
34448
|
},
|
|
@@ -34429,7 +34658,7 @@ const wrapOAuthApplicationCollection = wrapCursorPaginatedCollection(wrapOAuthAp
|
|
|
34429
34658
|
*/
|
|
34430
34659
|
function createClientApi(makeRequest) {
|
|
34431
34660
|
return {
|
|
34432
|
-
version: "12.0.0-beta.
|
|
34661
|
+
version: "12.0.0-beta.14",
|
|
34433
34662
|
/**
|
|
34434
34663
|
* Gets all environment templates for a given organization with the lasted version
|
|
34435
34664
|
* @param organizationId - Organization ID
|
|
@@ -35028,7 +35257,7 @@ const wrap = ({ makeRequest, defaults }, entityType, action) => {
|
|
|
35028
35257
|
const createPlainClient = (makeRequest, defaults) => {
|
|
35029
35258
|
const wrapParams = { makeRequest, defaults };
|
|
35030
35259
|
return {
|
|
35031
|
-
version: "12.0.0-beta.
|
|
35260
|
+
version: "12.0.0-beta.14",
|
|
35032
35261
|
raw: {
|
|
35033
35262
|
getDefaultParams: () => defaults,
|
|
35034
35263
|
get: (url, config) => makeRequest({
|
|
@@ -35207,6 +35436,10 @@ const createPlainClient = (makeRequest, defaults) => {
|
|
|
35207
35436
|
publish: wrap(wrapParams, 'BulkAction', 'publish'),
|
|
35208
35437
|
unpublish: wrap(wrapParams, 'BulkAction', 'unpublish'),
|
|
35209
35438
|
validate: wrap(wrapParams, 'BulkAction', 'validate'),
|
|
35439
|
+
getV2: wrap(wrapParams, 'BulkAction', 'getV2'),
|
|
35440
|
+
publishV2: wrap(wrapParams, 'BulkAction', 'publishV2'),
|
|
35441
|
+
unpublishV2: wrap(wrapParams, 'BulkAction', 'unpublishV2'),
|
|
35442
|
+
validateV2: wrap(wrapParams, 'BulkAction', 'validateV2'),
|
|
35210
35443
|
},
|
|
35211
35444
|
comment: {
|
|
35212
35445
|
get: wrap(wrapParams, 'Comment', 'get'),
|
|
@@ -35979,7 +36212,7 @@ var WorkflowStepActionType;
|
|
|
35979
36212
|
*/
|
|
35980
36213
|
function createClient(params, opts = {}) {
|
|
35981
36214
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
35982
|
-
const userAgent = getUserAgentHeader(`${sdkMain}/${"12.0.0-beta.
|
|
36215
|
+
const userAgent = getUserAgentHeader(`${sdkMain}/${"12.0.0-beta.14"}`, params.application, params.integration, params.feature);
|
|
35983
36216
|
const adapter = createAdapter({ ...params, userAgent });
|
|
35984
36217
|
// Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
35985
36218
|
// https://github.com/microsoft/TypeScript/issues/26591
|