@gammarers/aws-sns-slack-message-lambda-subscription 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +3 -3
- package/API.md +15 -1
- package/assets/funcs/send-slack-message.lambda/index.js +495 -176
- package/assets/funcs/send-slack-message.lambda/index.js.map +3 -3
- package/lib/index.js +1 -1
- package/package.json +6 -6
|
@@ -10031,7 +10031,7 @@ var require_form_data = __commonJS({
|
|
|
10031
10031
|
var CombinedStream = require_combined_stream();
|
|
10032
10032
|
var util3 = require("util");
|
|
10033
10033
|
var path = require("path");
|
|
10034
|
-
var
|
|
10034
|
+
var http3 = require("http");
|
|
10035
10035
|
var https2 = require("https");
|
|
10036
10036
|
var parseUrl = require("url").parse;
|
|
10037
10037
|
var fs = require("fs");
|
|
@@ -10303,7 +10303,7 @@ var require_form_data = __commonJS({
|
|
|
10303
10303
|
if (options.protocol === "https:") {
|
|
10304
10304
|
request = https2.request(options);
|
|
10305
10305
|
} else {
|
|
10306
|
-
request =
|
|
10306
|
+
request = http3.request(options);
|
|
10307
10307
|
}
|
|
10308
10308
|
this.getLength(function(err, length) {
|
|
10309
10309
|
if (err && err !== "Unknown stream") {
|
|
@@ -11208,7 +11208,7 @@ var require_follow_redirects = __commonJS({
|
|
|
11208
11208
|
"use strict";
|
|
11209
11209
|
var url2 = require("url");
|
|
11210
11210
|
var URL2 = url2.URL;
|
|
11211
|
-
var
|
|
11211
|
+
var http3 = require("http");
|
|
11212
11212
|
var https2 = require("https");
|
|
11213
11213
|
var Writable = require("stream").Writable;
|
|
11214
11214
|
var assert = require("assert");
|
|
@@ -11694,7 +11694,7 @@ var require_follow_redirects = __commonJS({
|
|
|
11694
11694
|
function isURL(value) {
|
|
11695
11695
|
return URL2 && value instanceof URL2;
|
|
11696
11696
|
}
|
|
11697
|
-
module2.exports = wrap({ http:
|
|
11697
|
+
module2.exports = wrap({ http: http3, https: https2 });
|
|
11698
11698
|
module2.exports.wrap = wrap;
|
|
11699
11699
|
}
|
|
11700
11700
|
});
|
|
@@ -11707,8 +11707,9 @@ var require_axios = __commonJS({
|
|
|
11707
11707
|
var crypto2 = require("crypto");
|
|
11708
11708
|
var url2 = require("url");
|
|
11709
11709
|
var proxyFromEnv2 = require_proxy_from_env();
|
|
11710
|
-
var
|
|
11710
|
+
var http3 = require("http");
|
|
11711
11711
|
var https2 = require("https");
|
|
11712
|
+
var http22 = require("http2");
|
|
11712
11713
|
var util3 = require("util");
|
|
11713
11714
|
var followRedirects2 = require_follow_redirects();
|
|
11714
11715
|
var zlib2 = require("zlib");
|
|
@@ -11721,8 +11722,9 @@ var require_axios = __commonJS({
|
|
|
11721
11722
|
var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto2);
|
|
11722
11723
|
var url__default = /* @__PURE__ */ _interopDefaultLegacy(url2);
|
|
11723
11724
|
var proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv2);
|
|
11724
|
-
var http__default = /* @__PURE__ */ _interopDefaultLegacy(
|
|
11725
|
+
var http__default = /* @__PURE__ */ _interopDefaultLegacy(http3);
|
|
11725
11726
|
var https__default = /* @__PURE__ */ _interopDefaultLegacy(https2);
|
|
11727
|
+
var http2__default = /* @__PURE__ */ _interopDefaultLegacy(http22);
|
|
11726
11728
|
var util__default = /* @__PURE__ */ _interopDefaultLegacy(util3);
|
|
11727
11729
|
var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects2);
|
|
11728
11730
|
var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib2);
|
|
@@ -12388,7 +12390,7 @@ var require_axios = __commonJS({
|
|
|
12388
12390
|
*
|
|
12389
12391
|
* @param {Number} id The ID that was returned by `use`
|
|
12390
12392
|
*
|
|
12391
|
-
* @returns {
|
|
12393
|
+
* @returns {void}
|
|
12392
12394
|
*/
|
|
12393
12395
|
eject(id) {
|
|
12394
12396
|
if (this.handlers[id]) {
|
|
@@ -12965,7 +12967,7 @@ var require_axios = __commonJS({
|
|
|
12965
12967
|
}
|
|
12966
12968
|
return requestedURL;
|
|
12967
12969
|
}
|
|
12968
|
-
var VERSION3 = "1.
|
|
12970
|
+
var VERSION3 = "1.13.2";
|
|
12969
12971
|
function parseProtocol2(url3) {
|
|
12970
12972
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url3);
|
|
12971
12973
|
return match && match[1] || "";
|
|
@@ -13396,6 +13398,76 @@ var require_axios = __commonJS({
|
|
|
13396
13398
|
stream5.on("end", flush).on("error", flush);
|
|
13397
13399
|
return throttled;
|
|
13398
13400
|
};
|
|
13401
|
+
var Http2Sessions2 = class {
|
|
13402
|
+
constructor() {
|
|
13403
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
13404
|
+
}
|
|
13405
|
+
getSession(authority, options) {
|
|
13406
|
+
options = Object.assign({
|
|
13407
|
+
sessionTimeout: 1e3
|
|
13408
|
+
}, options);
|
|
13409
|
+
let authoritySessions = this.sessions[authority];
|
|
13410
|
+
if (authoritySessions) {
|
|
13411
|
+
let len = authoritySessions.length;
|
|
13412
|
+
for (let i = 0; i < len; i++) {
|
|
13413
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
13414
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util__default["default"].isDeepStrictEqual(sessionOptions, options)) {
|
|
13415
|
+
return sessionHandle;
|
|
13416
|
+
}
|
|
13417
|
+
}
|
|
13418
|
+
}
|
|
13419
|
+
const session = http2__default["default"].connect(authority, options);
|
|
13420
|
+
let removed;
|
|
13421
|
+
const removeSession = () => {
|
|
13422
|
+
if (removed) {
|
|
13423
|
+
return;
|
|
13424
|
+
}
|
|
13425
|
+
removed = true;
|
|
13426
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
13427
|
+
while (i--) {
|
|
13428
|
+
if (entries[i][0] === session) {
|
|
13429
|
+
if (len === 1) {
|
|
13430
|
+
delete this.sessions[authority];
|
|
13431
|
+
} else {
|
|
13432
|
+
entries.splice(i, 1);
|
|
13433
|
+
}
|
|
13434
|
+
return;
|
|
13435
|
+
}
|
|
13436
|
+
}
|
|
13437
|
+
};
|
|
13438
|
+
const originalRequestFn = session.request;
|
|
13439
|
+
const { sessionTimeout } = options;
|
|
13440
|
+
if (sessionTimeout != null) {
|
|
13441
|
+
let timer;
|
|
13442
|
+
let streamsCount = 0;
|
|
13443
|
+
session.request = function() {
|
|
13444
|
+
const stream5 = originalRequestFn.apply(this, arguments);
|
|
13445
|
+
streamsCount++;
|
|
13446
|
+
if (timer) {
|
|
13447
|
+
clearTimeout(timer);
|
|
13448
|
+
timer = null;
|
|
13449
|
+
}
|
|
13450
|
+
stream5.once("close", () => {
|
|
13451
|
+
if (!--streamsCount) {
|
|
13452
|
+
timer = setTimeout(() => {
|
|
13453
|
+
timer = null;
|
|
13454
|
+
removeSession();
|
|
13455
|
+
}, sessionTimeout);
|
|
13456
|
+
}
|
|
13457
|
+
});
|
|
13458
|
+
return stream5;
|
|
13459
|
+
};
|
|
13460
|
+
}
|
|
13461
|
+
session.once("close", removeSession);
|
|
13462
|
+
let entry = [
|
|
13463
|
+
session,
|
|
13464
|
+
options
|
|
13465
|
+
];
|
|
13466
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
13467
|
+
return session;
|
|
13468
|
+
}
|
|
13469
|
+
};
|
|
13470
|
+
var http2Sessions2 = new Http2Sessions2();
|
|
13399
13471
|
function dispatchBeforeRedirect2(options, responseDetails) {
|
|
13400
13472
|
if (options.beforeRedirects.proxy) {
|
|
13401
13473
|
options.beforeRedirects.proxy(options);
|
|
@@ -13468,14 +13540,54 @@ var require_axios = __commonJS({
|
|
|
13468
13540
|
};
|
|
13469
13541
|
};
|
|
13470
13542
|
var buildAddressEntry2 = (address, family) => resolveFamily2(utils$1.isObject(address) ? address : { address, family });
|
|
13543
|
+
var http2Transport2 = {
|
|
13544
|
+
request(options, cb) {
|
|
13545
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
13546
|
+
const { http2Options, headers } = options;
|
|
13547
|
+
const session = http2Sessions2.getSession(authority, http2Options);
|
|
13548
|
+
const {
|
|
13549
|
+
HTTP2_HEADER_SCHEME,
|
|
13550
|
+
HTTP2_HEADER_METHOD,
|
|
13551
|
+
HTTP2_HEADER_PATH,
|
|
13552
|
+
HTTP2_HEADER_STATUS
|
|
13553
|
+
} = http2__default["default"].constants;
|
|
13554
|
+
const http2Headers = {
|
|
13555
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
13556
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
13557
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
13558
|
+
};
|
|
13559
|
+
utils$1.forEach(headers, (header, name) => {
|
|
13560
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
13561
|
+
});
|
|
13562
|
+
const req = session.request(http2Headers);
|
|
13563
|
+
req.once("response", (responseHeaders) => {
|
|
13564
|
+
const response = req;
|
|
13565
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
13566
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
13567
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
13568
|
+
response.headers = responseHeaders;
|
|
13569
|
+
response.statusCode = +status;
|
|
13570
|
+
cb(response);
|
|
13571
|
+
});
|
|
13572
|
+
return req;
|
|
13573
|
+
}
|
|
13574
|
+
};
|
|
13471
13575
|
var httpAdapter2 = isHttpAdapterSupported2 && function httpAdapter3(config) {
|
|
13472
13576
|
return wrapAsync2(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
13473
|
-
let { data, lookup, family } = config;
|
|
13577
|
+
let { data, lookup, family, httpVersion = 1, http2Options } = config;
|
|
13474
13578
|
const { responseType, responseEncoding } = config;
|
|
13475
13579
|
const method = config.method.toUpperCase();
|
|
13476
13580
|
let isDone;
|
|
13477
13581
|
let rejected = false;
|
|
13478
13582
|
let req;
|
|
13583
|
+
httpVersion = +httpVersion;
|
|
13584
|
+
if (Number.isNaN(httpVersion)) {
|
|
13585
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
13586
|
+
}
|
|
13587
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
13588
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
13589
|
+
}
|
|
13590
|
+
const isHttp2 = httpVersion === 2;
|
|
13479
13591
|
if (lookup) {
|
|
13480
13592
|
const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
|
|
13481
13593
|
lookup = (hostname, opt, cb) => {
|
|
@@ -13488,7 +13600,15 @@ var require_axios = __commonJS({
|
|
|
13488
13600
|
});
|
|
13489
13601
|
};
|
|
13490
13602
|
}
|
|
13491
|
-
const
|
|
13603
|
+
const abortEmitter = new events.EventEmitter();
|
|
13604
|
+
function abort(reason) {
|
|
13605
|
+
try {
|
|
13606
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError3(null, config, req) : reason);
|
|
13607
|
+
} catch (err) {
|
|
13608
|
+
console.warn("emit error", err);
|
|
13609
|
+
}
|
|
13610
|
+
}
|
|
13611
|
+
abortEmitter.once("abort", reject);
|
|
13492
13612
|
const onFinished = () => {
|
|
13493
13613
|
if (config.cancelToken) {
|
|
13494
13614
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -13496,25 +13616,31 @@ var require_axios = __commonJS({
|
|
|
13496
13616
|
if (config.signal) {
|
|
13497
13617
|
config.signal.removeEventListener("abort", abort);
|
|
13498
13618
|
}
|
|
13499
|
-
|
|
13619
|
+
abortEmitter.removeAllListeners();
|
|
13500
13620
|
};
|
|
13501
|
-
onDone((value, isRejected) => {
|
|
13502
|
-
isDone = true;
|
|
13503
|
-
if (isRejected) {
|
|
13504
|
-
rejected = true;
|
|
13505
|
-
onFinished();
|
|
13506
|
-
}
|
|
13507
|
-
});
|
|
13508
|
-
function abort(reason) {
|
|
13509
|
-
emitter.emit("abort", !reason || reason.type ? new CanceledError3(null, config, req) : reason);
|
|
13510
|
-
}
|
|
13511
|
-
emitter.once("abort", reject);
|
|
13512
13621
|
if (config.cancelToken || config.signal) {
|
|
13513
13622
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
13514
13623
|
if (config.signal) {
|
|
13515
13624
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
13516
13625
|
}
|
|
13517
13626
|
}
|
|
13627
|
+
onDone((response, isRejected) => {
|
|
13628
|
+
isDone = true;
|
|
13629
|
+
if (isRejected) {
|
|
13630
|
+
rejected = true;
|
|
13631
|
+
onFinished();
|
|
13632
|
+
return;
|
|
13633
|
+
}
|
|
13634
|
+
const { data: data2 } = response;
|
|
13635
|
+
if (data2 instanceof stream__default["default"].Readable || data2 instanceof stream__default["default"].Duplex) {
|
|
13636
|
+
const offListeners = stream__default["default"].finished(data2, () => {
|
|
13637
|
+
offListeners();
|
|
13638
|
+
onFinished();
|
|
13639
|
+
});
|
|
13640
|
+
} else {
|
|
13641
|
+
onFinished();
|
|
13642
|
+
}
|
|
13643
|
+
});
|
|
13518
13644
|
const fullPath = buildFullPath2(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
13519
13645
|
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : void 0);
|
|
13520
13646
|
const protocol = parsed.protocol || supportedProtocols2[0];
|
|
@@ -13680,7 +13806,8 @@ var require_axios = __commonJS({
|
|
|
13680
13806
|
protocol,
|
|
13681
13807
|
family,
|
|
13682
13808
|
beforeRedirect: dispatchBeforeRedirect2,
|
|
13683
|
-
beforeRedirects: {}
|
|
13809
|
+
beforeRedirects: {},
|
|
13810
|
+
http2Options
|
|
13684
13811
|
};
|
|
13685
13812
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
13686
13813
|
if (config.socketPath) {
|
|
@@ -13693,18 +13820,22 @@ var require_axios = __commonJS({
|
|
|
13693
13820
|
let transport;
|
|
13694
13821
|
const isHttpsRequest = isHttps2.test(options.protocol);
|
|
13695
13822
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
13696
|
-
if (
|
|
13697
|
-
transport =
|
|
13698
|
-
} else if (config.maxRedirects === 0) {
|
|
13699
|
-
transport = isHttpsRequest ? https__default["default"] : http__default["default"];
|
|
13823
|
+
if (isHttp2) {
|
|
13824
|
+
transport = http2Transport2;
|
|
13700
13825
|
} else {
|
|
13701
|
-
if (config.
|
|
13702
|
-
|
|
13703
|
-
}
|
|
13704
|
-
|
|
13705
|
-
|
|
13826
|
+
if (config.transport) {
|
|
13827
|
+
transport = config.transport;
|
|
13828
|
+
} else if (config.maxRedirects === 0) {
|
|
13829
|
+
transport = isHttpsRequest ? https__default["default"] : http__default["default"];
|
|
13830
|
+
} else {
|
|
13831
|
+
if (config.maxRedirects) {
|
|
13832
|
+
options.maxRedirects = config.maxRedirects;
|
|
13833
|
+
}
|
|
13834
|
+
if (config.beforeRedirect) {
|
|
13835
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
13836
|
+
}
|
|
13837
|
+
transport = isHttpsRequest ? httpsFollow2 : httpFollow2;
|
|
13706
13838
|
}
|
|
13707
|
-
transport = isHttpsRequest ? httpsFollow2 : httpFollow2;
|
|
13708
13839
|
}
|
|
13709
13840
|
if (config.maxBodyLength > -1) {
|
|
13710
13841
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -13717,7 +13848,7 @@ var require_axios = __commonJS({
|
|
|
13717
13848
|
req = transport.request(options, function handleResponse(res) {
|
|
13718
13849
|
if (req.destroyed) return;
|
|
13719
13850
|
const streams = [res];
|
|
13720
|
-
const responseLength =
|
|
13851
|
+
const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
|
|
13721
13852
|
if (onDownloadProgress || maxDownloadRate) {
|
|
13722
13853
|
const transformStream = new AxiosTransformStream$1({
|
|
13723
13854
|
maxRate: utils$1.toFiniteNumber(maxDownloadRate)
|
|
@@ -13759,10 +13890,6 @@ var require_axios = __commonJS({
|
|
|
13759
13890
|
}
|
|
13760
13891
|
}
|
|
13761
13892
|
responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
|
|
13762
|
-
const offListeners = stream__default["default"].finished(responseStream, () => {
|
|
13763
|
-
offListeners();
|
|
13764
|
-
onFinished();
|
|
13765
|
-
});
|
|
13766
13893
|
const response = {
|
|
13767
13894
|
status: res.statusCode,
|
|
13768
13895
|
statusText: res.statusMessage,
|
|
@@ -13782,7 +13909,7 @@ var require_axios = __commonJS({
|
|
|
13782
13909
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
13783
13910
|
rejected = true;
|
|
13784
13911
|
responseStream.destroy();
|
|
13785
|
-
|
|
13912
|
+
abort(new AxiosError3(
|
|
13786
13913
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
13787
13914
|
AxiosError3.ERR_BAD_RESPONSE,
|
|
13788
13915
|
config,
|
|
@@ -13823,16 +13950,19 @@ var require_axios = __commonJS({
|
|
|
13823
13950
|
settle2(resolve, reject, response);
|
|
13824
13951
|
});
|
|
13825
13952
|
}
|
|
13826
|
-
|
|
13953
|
+
abortEmitter.once("abort", (err) => {
|
|
13827
13954
|
if (!responseStream.destroyed) {
|
|
13828
13955
|
responseStream.emit("error", err);
|
|
13829
13956
|
responseStream.destroy();
|
|
13830
13957
|
}
|
|
13831
13958
|
});
|
|
13832
13959
|
});
|
|
13833
|
-
|
|
13834
|
-
|
|
13835
|
-
|
|
13960
|
+
abortEmitter.once("abort", (err) => {
|
|
13961
|
+
if (req.close) {
|
|
13962
|
+
req.close();
|
|
13963
|
+
} else {
|
|
13964
|
+
req.destroy(err);
|
|
13965
|
+
}
|
|
13836
13966
|
});
|
|
13837
13967
|
req.on("error", function handleRequestError(err) {
|
|
13838
13968
|
reject(AxiosError3.from(err, null, config, req));
|
|
@@ -13843,7 +13973,7 @@ var require_axios = __commonJS({
|
|
|
13843
13973
|
if (config.timeout) {
|
|
13844
13974
|
const timeout = parseInt(config.timeout, 10);
|
|
13845
13975
|
if (Number.isNaN(timeout)) {
|
|
13846
|
-
|
|
13976
|
+
abort(new AxiosError3(
|
|
13847
13977
|
"error trying to parse `config.timeout` to int",
|
|
13848
13978
|
AxiosError3.ERR_BAD_OPTION_VALUE,
|
|
13849
13979
|
config,
|
|
@@ -13858,14 +13988,15 @@ var require_axios = __commonJS({
|
|
|
13858
13988
|
if (config.timeoutErrorMessage) {
|
|
13859
13989
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
13860
13990
|
}
|
|
13861
|
-
|
|
13991
|
+
abort(new AxiosError3(
|
|
13862
13992
|
timeoutErrorMessage,
|
|
13863
13993
|
transitional2.clarifyTimeoutError ? AxiosError3.ETIMEDOUT : AxiosError3.ECONNABORTED,
|
|
13864
13994
|
config,
|
|
13865
13995
|
req
|
|
13866
13996
|
));
|
|
13867
|
-
abort();
|
|
13868
13997
|
});
|
|
13998
|
+
} else {
|
|
13999
|
+
req.setTimeout(0);
|
|
13869
14000
|
}
|
|
13870
14001
|
if (utils$1.isStream(data)) {
|
|
13871
14002
|
let ended = false;
|
|
@@ -13884,7 +14015,8 @@ var require_axios = __commonJS({
|
|
|
13884
14015
|
});
|
|
13885
14016
|
data.pipe(req);
|
|
13886
14017
|
} else {
|
|
13887
|
-
req.
|
|
14018
|
+
data && req.write(data);
|
|
14019
|
+
req.end();
|
|
13888
14020
|
}
|
|
13889
14021
|
});
|
|
13890
14022
|
};
|
|
@@ -13898,20 +14030,33 @@ var require_axios = __commonJS({
|
|
|
13898
14030
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
13899
14031
|
// Standard browser envs support document.cookie
|
|
13900
14032
|
{
|
|
13901
|
-
write(name, value, expires, path, domain, secure) {
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
utils$1.
|
|
13905
|
-
|
|
13906
|
-
|
|
14033
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
14034
|
+
if (typeof document === "undefined") return;
|
|
14035
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
14036
|
+
if (utils$1.isNumber(expires)) {
|
|
14037
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
14038
|
+
}
|
|
14039
|
+
if (utils$1.isString(path)) {
|
|
14040
|
+
cookie.push(`path=${path}`);
|
|
14041
|
+
}
|
|
14042
|
+
if (utils$1.isString(domain)) {
|
|
14043
|
+
cookie.push(`domain=${domain}`);
|
|
14044
|
+
}
|
|
14045
|
+
if (secure === true) {
|
|
14046
|
+
cookie.push("secure");
|
|
14047
|
+
}
|
|
14048
|
+
if (utils$1.isString(sameSite)) {
|
|
14049
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
14050
|
+
}
|
|
13907
14051
|
document.cookie = cookie.join("; ");
|
|
13908
14052
|
},
|
|
13909
14053
|
read(name) {
|
|
13910
|
-
|
|
13911
|
-
|
|
14054
|
+
if (typeof document === "undefined") return null;
|
|
14055
|
+
const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
14056
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
13912
14057
|
},
|
|
13913
14058
|
remove(name) {
|
|
13914
|
-
this.write(name, "", Date.now() - 864e5);
|
|
14059
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
13915
14060
|
}
|
|
13916
14061
|
}
|
|
13917
14062
|
) : (
|
|
@@ -14466,7 +14611,7 @@ var require_axios = __commonJS({
|
|
|
14466
14611
|
};
|
|
14467
14612
|
var seedCache2 = /* @__PURE__ */ new Map();
|
|
14468
14613
|
var getFetch2 = (config) => {
|
|
14469
|
-
let env = config
|
|
14614
|
+
let env = config && config.env || {};
|
|
14470
14615
|
const { fetch: fetch2, Request, Response } = env;
|
|
14471
14616
|
const seeds = [
|
|
14472
14617
|
Request,
|
|
@@ -14501,40 +14646,49 @@ var require_axios = __commonJS({
|
|
|
14501
14646
|
});
|
|
14502
14647
|
var renderReason2 = (reason) => `- ${reason}`;
|
|
14503
14648
|
var isResolvedHandle2 = (adapter2) => utils$1.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
throw new AxiosError3(`Unknown adapter '${id}'`);
|
|
14519
|
-
}
|
|
14520
|
-
}
|
|
14521
|
-
if (adapter2 && (utils$1.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
14522
|
-
break;
|
|
14649
|
+
function getAdapter3(adapters2, config) {
|
|
14650
|
+
adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
|
|
14651
|
+
const { length } = adapters2;
|
|
14652
|
+
let nameOrAdapter;
|
|
14653
|
+
let adapter2;
|
|
14654
|
+
const rejectedReasons = {};
|
|
14655
|
+
for (let i = 0; i < length; i++) {
|
|
14656
|
+
nameOrAdapter = adapters2[i];
|
|
14657
|
+
let id;
|
|
14658
|
+
adapter2 = nameOrAdapter;
|
|
14659
|
+
if (!isResolvedHandle2(nameOrAdapter)) {
|
|
14660
|
+
adapter2 = knownAdapters2[(id = String(nameOrAdapter)).toLowerCase()];
|
|
14661
|
+
if (adapter2 === void 0) {
|
|
14662
|
+
throw new AxiosError3(`Unknown adapter '${id}'`);
|
|
14523
14663
|
}
|
|
14524
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
14525
14664
|
}
|
|
14526
|
-
if (
|
|
14527
|
-
|
|
14528
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
14529
|
-
);
|
|
14530
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason2).join("\n") : " " + renderReason2(reasons[0]) : "as no adapter specified";
|
|
14531
|
-
throw new AxiosError3(
|
|
14532
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
14533
|
-
"ERR_NOT_SUPPORT"
|
|
14534
|
-
);
|
|
14665
|
+
if (adapter2 && (utils$1.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
14666
|
+
break;
|
|
14535
14667
|
}
|
|
14536
|
-
|
|
14537
|
-
}
|
|
14668
|
+
rejectedReasons[id || "#" + i] = adapter2;
|
|
14669
|
+
}
|
|
14670
|
+
if (!adapter2) {
|
|
14671
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
14672
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
14673
|
+
);
|
|
14674
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason2).join("\n") : " " + renderReason2(reasons[0]) : "as no adapter specified";
|
|
14675
|
+
throw new AxiosError3(
|
|
14676
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
14677
|
+
"ERR_NOT_SUPPORT"
|
|
14678
|
+
);
|
|
14679
|
+
}
|
|
14680
|
+
return adapter2;
|
|
14681
|
+
}
|
|
14682
|
+
var adapters = {
|
|
14683
|
+
/**
|
|
14684
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
14685
|
+
* @type {Function}
|
|
14686
|
+
*/
|
|
14687
|
+
getAdapter: getAdapter3,
|
|
14688
|
+
/**
|
|
14689
|
+
* Exposes all known adapters
|
|
14690
|
+
* @type {Object<string, Function|Object>}
|
|
14691
|
+
*/
|
|
14538
14692
|
adapters: knownAdapters2
|
|
14539
14693
|
};
|
|
14540
14694
|
function throwIfCancellationRequested2(config) {
|
|
@@ -14979,7 +15133,13 @@ var require_axios = __commonJS({
|
|
|
14979
15133
|
InsufficientStorage: 507,
|
|
14980
15134
|
LoopDetected: 508,
|
|
14981
15135
|
NotExtended: 510,
|
|
14982
|
-
NetworkAuthenticationRequired: 511
|
|
15136
|
+
NetworkAuthenticationRequired: 511,
|
|
15137
|
+
WebServerIsDown: 521,
|
|
15138
|
+
ConnectionTimedOut: 522,
|
|
15139
|
+
OriginIsUnreachable: 523,
|
|
15140
|
+
TimeoutOccurred: 524,
|
|
15141
|
+
SslHandshakeFailed: 525,
|
|
15142
|
+
InvalidSslCertificate: 526
|
|
14983
15143
|
};
|
|
14984
15144
|
Object.entries(HttpStatusCode3).forEach(([key, value]) => {
|
|
14985
15145
|
HttpStatusCode3[value] = key;
|
|
@@ -15928,7 +16088,7 @@ var InterceptorManager = class {
|
|
|
15928
16088
|
*
|
|
15929
16089
|
* @param {Number} id The ID that was returned by `use`
|
|
15930
16090
|
*
|
|
15931
|
-
* @returns {
|
|
16091
|
+
* @returns {void}
|
|
15932
16092
|
*/
|
|
15933
16093
|
eject(id) {
|
|
15934
16094
|
if (this.handlers[id]) {
|
|
@@ -16550,12 +16710,13 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
16550
16710
|
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
16551
16711
|
var import_http = __toESM(require("http"), 1);
|
|
16552
16712
|
var import_https = __toESM(require("https"), 1);
|
|
16713
|
+
var import_http2 = __toESM(require("http2"), 1);
|
|
16553
16714
|
var import_util2 = __toESM(require("util"), 1);
|
|
16554
16715
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
16555
16716
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
16556
16717
|
|
|
16557
16718
|
// node_modules/axios/lib/env/data.js
|
|
16558
|
-
var VERSION = "1.
|
|
16719
|
+
var VERSION = "1.13.2";
|
|
16559
16720
|
|
|
16560
16721
|
// node_modules/axios/lib/helpers/parseProtocol.js
|
|
16561
16722
|
function parseProtocol(url2) {
|
|
@@ -17024,6 +17185,76 @@ var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
|
17024
17185
|
stream4.on("end", flush).on("error", flush);
|
|
17025
17186
|
return throttled;
|
|
17026
17187
|
};
|
|
17188
|
+
var Http2Sessions = class {
|
|
17189
|
+
constructor() {
|
|
17190
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
17191
|
+
}
|
|
17192
|
+
getSession(authority, options) {
|
|
17193
|
+
options = Object.assign({
|
|
17194
|
+
sessionTimeout: 1e3
|
|
17195
|
+
}, options);
|
|
17196
|
+
let authoritySessions = this.sessions[authority];
|
|
17197
|
+
if (authoritySessions) {
|
|
17198
|
+
let len = authoritySessions.length;
|
|
17199
|
+
for (let i = 0; i < len; i++) {
|
|
17200
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
17201
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && import_util2.default.isDeepStrictEqual(sessionOptions, options)) {
|
|
17202
|
+
return sessionHandle;
|
|
17203
|
+
}
|
|
17204
|
+
}
|
|
17205
|
+
}
|
|
17206
|
+
const session = import_http2.default.connect(authority, options);
|
|
17207
|
+
let removed;
|
|
17208
|
+
const removeSession = () => {
|
|
17209
|
+
if (removed) {
|
|
17210
|
+
return;
|
|
17211
|
+
}
|
|
17212
|
+
removed = true;
|
|
17213
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
17214
|
+
while (i--) {
|
|
17215
|
+
if (entries[i][0] === session) {
|
|
17216
|
+
if (len === 1) {
|
|
17217
|
+
delete this.sessions[authority];
|
|
17218
|
+
} else {
|
|
17219
|
+
entries.splice(i, 1);
|
|
17220
|
+
}
|
|
17221
|
+
return;
|
|
17222
|
+
}
|
|
17223
|
+
}
|
|
17224
|
+
};
|
|
17225
|
+
const originalRequestFn = session.request;
|
|
17226
|
+
const { sessionTimeout } = options;
|
|
17227
|
+
if (sessionTimeout != null) {
|
|
17228
|
+
let timer;
|
|
17229
|
+
let streamsCount = 0;
|
|
17230
|
+
session.request = function() {
|
|
17231
|
+
const stream4 = originalRequestFn.apply(this, arguments);
|
|
17232
|
+
streamsCount++;
|
|
17233
|
+
if (timer) {
|
|
17234
|
+
clearTimeout(timer);
|
|
17235
|
+
timer = null;
|
|
17236
|
+
}
|
|
17237
|
+
stream4.once("close", () => {
|
|
17238
|
+
if (!--streamsCount) {
|
|
17239
|
+
timer = setTimeout(() => {
|
|
17240
|
+
timer = null;
|
|
17241
|
+
removeSession();
|
|
17242
|
+
}, sessionTimeout);
|
|
17243
|
+
}
|
|
17244
|
+
});
|
|
17245
|
+
return stream4;
|
|
17246
|
+
};
|
|
17247
|
+
}
|
|
17248
|
+
session.once("close", removeSession);
|
|
17249
|
+
let entry = [
|
|
17250
|
+
session,
|
|
17251
|
+
options
|
|
17252
|
+
];
|
|
17253
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
17254
|
+
return session;
|
|
17255
|
+
}
|
|
17256
|
+
};
|
|
17257
|
+
var http2Sessions = new Http2Sessions();
|
|
17027
17258
|
function dispatchBeforeRedirect(options, responseDetails) {
|
|
17028
17259
|
if (options.beforeRedirects.proxy) {
|
|
17029
17260
|
options.beforeRedirects.proxy(options);
|
|
@@ -17096,14 +17327,54 @@ var resolveFamily = ({ address, family }) => {
|
|
|
17096
17327
|
};
|
|
17097
17328
|
};
|
|
17098
17329
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
17330
|
+
var http2Transport = {
|
|
17331
|
+
request(options, cb) {
|
|
17332
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
17333
|
+
const { http2Options, headers } = options;
|
|
17334
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
17335
|
+
const {
|
|
17336
|
+
HTTP2_HEADER_SCHEME,
|
|
17337
|
+
HTTP2_HEADER_METHOD,
|
|
17338
|
+
HTTP2_HEADER_PATH,
|
|
17339
|
+
HTTP2_HEADER_STATUS
|
|
17340
|
+
} = import_http2.default.constants;
|
|
17341
|
+
const http2Headers = {
|
|
17342
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
17343
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
17344
|
+
[HTTP2_HEADER_PATH]: options.path
|
|
17345
|
+
};
|
|
17346
|
+
utils_default.forEach(headers, (header, name) => {
|
|
17347
|
+
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
17348
|
+
});
|
|
17349
|
+
const req = session.request(http2Headers);
|
|
17350
|
+
req.once("response", (responseHeaders) => {
|
|
17351
|
+
const response = req;
|
|
17352
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
17353
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
17354
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
17355
|
+
response.headers = responseHeaders;
|
|
17356
|
+
response.statusCode = +status;
|
|
17357
|
+
cb(response);
|
|
17358
|
+
});
|
|
17359
|
+
return req;
|
|
17360
|
+
}
|
|
17361
|
+
};
|
|
17099
17362
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
17100
17363
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
17101
|
-
let { data, lookup, family } = config;
|
|
17364
|
+
let { data, lookup, family, httpVersion = 1, http2Options } = config;
|
|
17102
17365
|
const { responseType, responseEncoding } = config;
|
|
17103
17366
|
const method = config.method.toUpperCase();
|
|
17104
17367
|
let isDone;
|
|
17105
17368
|
let rejected = false;
|
|
17106
17369
|
let req;
|
|
17370
|
+
httpVersion = +httpVersion;
|
|
17371
|
+
if (Number.isNaN(httpVersion)) {
|
|
17372
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
17373
|
+
}
|
|
17374
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
17375
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
17376
|
+
}
|
|
17377
|
+
const isHttp2 = httpVersion === 2;
|
|
17107
17378
|
if (lookup) {
|
|
17108
17379
|
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
17109
17380
|
lookup = (hostname, opt, cb) => {
|
|
@@ -17116,7 +17387,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17116
17387
|
});
|
|
17117
17388
|
};
|
|
17118
17389
|
}
|
|
17119
|
-
const
|
|
17390
|
+
const abortEmitter = new import_events.EventEmitter();
|
|
17391
|
+
function abort(reason) {
|
|
17392
|
+
try {
|
|
17393
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
17394
|
+
} catch (err) {
|
|
17395
|
+
console.warn("emit error", err);
|
|
17396
|
+
}
|
|
17397
|
+
}
|
|
17398
|
+
abortEmitter.once("abort", reject);
|
|
17120
17399
|
const onFinished = () => {
|
|
17121
17400
|
if (config.cancelToken) {
|
|
17122
17401
|
config.cancelToken.unsubscribe(abort);
|
|
@@ -17124,25 +17403,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17124
17403
|
if (config.signal) {
|
|
17125
17404
|
config.signal.removeEventListener("abort", abort);
|
|
17126
17405
|
}
|
|
17127
|
-
|
|
17406
|
+
abortEmitter.removeAllListeners();
|
|
17128
17407
|
};
|
|
17129
|
-
onDone((value, isRejected) => {
|
|
17130
|
-
isDone = true;
|
|
17131
|
-
if (isRejected) {
|
|
17132
|
-
rejected = true;
|
|
17133
|
-
onFinished();
|
|
17134
|
-
}
|
|
17135
|
-
});
|
|
17136
|
-
function abort(reason) {
|
|
17137
|
-
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
17138
|
-
}
|
|
17139
|
-
emitter.once("abort", reject);
|
|
17140
17408
|
if (config.cancelToken || config.signal) {
|
|
17141
17409
|
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
17142
17410
|
if (config.signal) {
|
|
17143
17411
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
17144
17412
|
}
|
|
17145
17413
|
}
|
|
17414
|
+
onDone((response, isRejected) => {
|
|
17415
|
+
isDone = true;
|
|
17416
|
+
if (isRejected) {
|
|
17417
|
+
rejected = true;
|
|
17418
|
+
onFinished();
|
|
17419
|
+
return;
|
|
17420
|
+
}
|
|
17421
|
+
const { data: data2 } = response;
|
|
17422
|
+
if (data2 instanceof import_stream4.default.Readable || data2 instanceof import_stream4.default.Duplex) {
|
|
17423
|
+
const offListeners = import_stream4.default.finished(data2, () => {
|
|
17424
|
+
offListeners();
|
|
17425
|
+
onFinished();
|
|
17426
|
+
});
|
|
17427
|
+
} else {
|
|
17428
|
+
onFinished();
|
|
17429
|
+
}
|
|
17430
|
+
});
|
|
17146
17431
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
17147
17432
|
const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
|
|
17148
17433
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
@@ -17308,7 +17593,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17308
17593
|
protocol,
|
|
17309
17594
|
family,
|
|
17310
17595
|
beforeRedirect: dispatchBeforeRedirect,
|
|
17311
|
-
beforeRedirects: {}
|
|
17596
|
+
beforeRedirects: {},
|
|
17597
|
+
http2Options
|
|
17312
17598
|
};
|
|
17313
17599
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
17314
17600
|
if (config.socketPath) {
|
|
@@ -17321,18 +17607,22 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17321
17607
|
let transport;
|
|
17322
17608
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
17323
17609
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
17324
|
-
if (
|
|
17325
|
-
transport =
|
|
17326
|
-
} else if (config.maxRedirects === 0) {
|
|
17327
|
-
transport = isHttpsRequest ? import_https.default : import_http.default;
|
|
17610
|
+
if (isHttp2) {
|
|
17611
|
+
transport = http2Transport;
|
|
17328
17612
|
} else {
|
|
17329
|
-
if (config.
|
|
17330
|
-
|
|
17331
|
-
}
|
|
17332
|
-
|
|
17333
|
-
|
|
17613
|
+
if (config.transport) {
|
|
17614
|
+
transport = config.transport;
|
|
17615
|
+
} else if (config.maxRedirects === 0) {
|
|
17616
|
+
transport = isHttpsRequest ? import_https.default : import_http.default;
|
|
17617
|
+
} else {
|
|
17618
|
+
if (config.maxRedirects) {
|
|
17619
|
+
options.maxRedirects = config.maxRedirects;
|
|
17620
|
+
}
|
|
17621
|
+
if (config.beforeRedirect) {
|
|
17622
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
17623
|
+
}
|
|
17624
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
17334
17625
|
}
|
|
17335
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
17336
17626
|
}
|
|
17337
17627
|
if (config.maxBodyLength > -1) {
|
|
17338
17628
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -17345,7 +17635,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17345
17635
|
req = transport.request(options, function handleResponse(res) {
|
|
17346
17636
|
if (req.destroyed) return;
|
|
17347
17637
|
const streams = [res];
|
|
17348
|
-
const responseLength =
|
|
17638
|
+
const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
|
|
17349
17639
|
if (onDownloadProgress || maxDownloadRate) {
|
|
17350
17640
|
const transformStream = new AxiosTransformStream_default({
|
|
17351
17641
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
@@ -17387,10 +17677,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17387
17677
|
}
|
|
17388
17678
|
}
|
|
17389
17679
|
responseStream = streams.length > 1 ? import_stream4.default.pipeline(streams, utils_default.noop) : streams[0];
|
|
17390
|
-
const offListeners = import_stream4.default.finished(responseStream, () => {
|
|
17391
|
-
offListeners();
|
|
17392
|
-
onFinished();
|
|
17393
|
-
});
|
|
17394
17680
|
const response = {
|
|
17395
17681
|
status: res.statusCode,
|
|
17396
17682
|
statusText: res.statusMessage,
|
|
@@ -17410,7 +17696,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17410
17696
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
17411
17697
|
rejected = true;
|
|
17412
17698
|
responseStream.destroy();
|
|
17413
|
-
|
|
17699
|
+
abort(new AxiosError_default(
|
|
17414
17700
|
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
17415
17701
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
17416
17702
|
config,
|
|
@@ -17451,16 +17737,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17451
17737
|
settle(resolve, reject, response);
|
|
17452
17738
|
});
|
|
17453
17739
|
}
|
|
17454
|
-
|
|
17740
|
+
abortEmitter.once("abort", (err) => {
|
|
17455
17741
|
if (!responseStream.destroyed) {
|
|
17456
17742
|
responseStream.emit("error", err);
|
|
17457
17743
|
responseStream.destroy();
|
|
17458
17744
|
}
|
|
17459
17745
|
});
|
|
17460
17746
|
});
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17747
|
+
abortEmitter.once("abort", (err) => {
|
|
17748
|
+
if (req.close) {
|
|
17749
|
+
req.close();
|
|
17750
|
+
} else {
|
|
17751
|
+
req.destroy(err);
|
|
17752
|
+
}
|
|
17464
17753
|
});
|
|
17465
17754
|
req.on("error", function handleRequestError(err) {
|
|
17466
17755
|
reject(AxiosError_default.from(err, null, config, req));
|
|
@@ -17471,7 +17760,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17471
17760
|
if (config.timeout) {
|
|
17472
17761
|
const timeout = parseInt(config.timeout, 10);
|
|
17473
17762
|
if (Number.isNaN(timeout)) {
|
|
17474
|
-
|
|
17763
|
+
abort(new AxiosError_default(
|
|
17475
17764
|
"error trying to parse `config.timeout` to int",
|
|
17476
17765
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
17477
17766
|
config,
|
|
@@ -17486,14 +17775,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17486
17775
|
if (config.timeoutErrorMessage) {
|
|
17487
17776
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
17488
17777
|
}
|
|
17489
|
-
|
|
17778
|
+
abort(new AxiosError_default(
|
|
17490
17779
|
timeoutErrorMessage,
|
|
17491
17780
|
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
17492
17781
|
config,
|
|
17493
17782
|
req
|
|
17494
17783
|
));
|
|
17495
|
-
abort();
|
|
17496
17784
|
});
|
|
17785
|
+
} else {
|
|
17786
|
+
req.setTimeout(0);
|
|
17497
17787
|
}
|
|
17498
17788
|
if (utils_default.isStream(data)) {
|
|
17499
17789
|
let ended = false;
|
|
@@ -17512,7 +17802,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17512
17802
|
});
|
|
17513
17803
|
data.pipe(req);
|
|
17514
17804
|
} else {
|
|
17515
|
-
req.
|
|
17805
|
+
data && req.write(data);
|
|
17806
|
+
req.end();
|
|
17516
17807
|
}
|
|
17517
17808
|
});
|
|
17518
17809
|
};
|
|
@@ -17530,20 +17821,33 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
|
|
|
17530
17821
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
17531
17822
|
// Standard browser envs support document.cookie
|
|
17532
17823
|
{
|
|
17533
|
-
write(name, value, expires, path, domain, secure) {
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
utils_default.
|
|
17537
|
-
|
|
17538
|
-
|
|
17824
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
17825
|
+
if (typeof document === "undefined") return;
|
|
17826
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
17827
|
+
if (utils_default.isNumber(expires)) {
|
|
17828
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
17829
|
+
}
|
|
17830
|
+
if (utils_default.isString(path)) {
|
|
17831
|
+
cookie.push(`path=${path}`);
|
|
17832
|
+
}
|
|
17833
|
+
if (utils_default.isString(domain)) {
|
|
17834
|
+
cookie.push(`domain=${domain}`);
|
|
17835
|
+
}
|
|
17836
|
+
if (secure === true) {
|
|
17837
|
+
cookie.push("secure");
|
|
17838
|
+
}
|
|
17839
|
+
if (utils_default.isString(sameSite)) {
|
|
17840
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
17841
|
+
}
|
|
17539
17842
|
document.cookie = cookie.join("; ");
|
|
17540
17843
|
},
|
|
17541
17844
|
read(name) {
|
|
17542
|
-
|
|
17543
|
-
|
|
17845
|
+
if (typeof document === "undefined") return null;
|
|
17846
|
+
const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
17847
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
17544
17848
|
},
|
|
17545
17849
|
remove(name) {
|
|
17546
|
-
this.write(name, "", Date.now() - 864e5);
|
|
17850
|
+
this.write(name, "", Date.now() - 864e5, "/");
|
|
17547
17851
|
}
|
|
17548
17852
|
}
|
|
17549
17853
|
) : (
|
|
@@ -18110,7 +18414,7 @@ var factory = (env) => {
|
|
|
18110
18414
|
};
|
|
18111
18415
|
var seedCache = /* @__PURE__ */ new Map();
|
|
18112
18416
|
var getFetch = (config) => {
|
|
18113
|
-
let env = config
|
|
18417
|
+
let env = config && config.env || {};
|
|
18114
18418
|
const { fetch: fetch2, Request, Response } = env;
|
|
18115
18419
|
const seeds = [
|
|
18116
18420
|
Request,
|
|
@@ -18147,40 +18451,49 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
18147
18451
|
});
|
|
18148
18452
|
var renderReason = (reason) => `- ${reason}`;
|
|
18149
18453
|
var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
18454
|
+
function getAdapter(adapters, config) {
|
|
18455
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
18456
|
+
const { length } = adapters;
|
|
18457
|
+
let nameOrAdapter;
|
|
18458
|
+
let adapter2;
|
|
18459
|
+
const rejectedReasons = {};
|
|
18460
|
+
for (let i = 0; i < length; i++) {
|
|
18461
|
+
nameOrAdapter = adapters[i];
|
|
18462
|
+
let id;
|
|
18463
|
+
adapter2 = nameOrAdapter;
|
|
18464
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
18465
|
+
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
18466
|
+
if (adapter2 === void 0) {
|
|
18467
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
18468
|
+
}
|
|
18469
|
+
}
|
|
18470
|
+
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
18471
|
+
break;
|
|
18472
|
+
}
|
|
18473
|
+
rejectedReasons[id || "#" + i] = adapter2;
|
|
18474
|
+
}
|
|
18475
|
+
if (!adapter2) {
|
|
18476
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
18477
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
18478
|
+
);
|
|
18479
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
18480
|
+
throw new AxiosError_default(
|
|
18481
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
18482
|
+
"ERR_NOT_SUPPORT"
|
|
18483
|
+
);
|
|
18484
|
+
}
|
|
18485
|
+
return adapter2;
|
|
18486
|
+
}
|
|
18150
18487
|
var adapters_default = {
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
adapter2 = nameOrAdapter;
|
|
18161
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
18162
|
-
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
18163
|
-
if (adapter2 === void 0) {
|
|
18164
|
-
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
18165
|
-
}
|
|
18166
|
-
}
|
|
18167
|
-
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
18168
|
-
break;
|
|
18169
|
-
}
|
|
18170
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
18171
|
-
}
|
|
18172
|
-
if (!adapter2) {
|
|
18173
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
18174
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
18175
|
-
);
|
|
18176
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
18177
|
-
throw new AxiosError_default(
|
|
18178
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
18179
|
-
"ERR_NOT_SUPPORT"
|
|
18180
|
-
);
|
|
18181
|
-
}
|
|
18182
|
-
return adapter2;
|
|
18183
|
-
},
|
|
18488
|
+
/**
|
|
18489
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
18490
|
+
* @type {Function}
|
|
18491
|
+
*/
|
|
18492
|
+
getAdapter,
|
|
18493
|
+
/**
|
|
18494
|
+
* Exposes all known adapters
|
|
18495
|
+
* @type {Object<string, Function|Object>}
|
|
18496
|
+
*/
|
|
18184
18497
|
adapters: knownAdapters
|
|
18185
18498
|
};
|
|
18186
18499
|
|
|
@@ -18639,7 +18952,13 @@ var HttpStatusCode = {
|
|
|
18639
18952
|
InsufficientStorage: 507,
|
|
18640
18953
|
LoopDetected: 508,
|
|
18641
18954
|
NotExtended: 510,
|
|
18642
|
-
NetworkAuthenticationRequired: 511
|
|
18955
|
+
NetworkAuthenticationRequired: 511,
|
|
18956
|
+
WebServerIsDown: 521,
|
|
18957
|
+
ConnectionTimedOut: 522,
|
|
18958
|
+
OriginIsUnreachable: 523,
|
|
18959
|
+
TimeoutOccurred: 524,
|
|
18960
|
+
SslHandshakeFailed: 525,
|
|
18961
|
+
InvalidSslCertificate: 526
|
|
18643
18962
|
};
|
|
18644
18963
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
18645
18964
|
HttpStatusCode[value] = key;
|
|
@@ -18695,7 +19014,7 @@ var {
|
|
|
18695
19014
|
AxiosHeaders: AxiosHeaders2,
|
|
18696
19015
|
HttpStatusCode: HttpStatusCode2,
|
|
18697
19016
|
formToJSON,
|
|
18698
|
-
getAdapter,
|
|
19017
|
+
getAdapter: getAdapter2,
|
|
18699
19018
|
mergeConfig: mergeConfig2
|
|
18700
19019
|
} = axios_default;
|
|
18701
19020
|
|
|
@@ -18764,6 +19083,6 @@ mime-types/index.js:
|
|
|
18764
19083
|
*)
|
|
18765
19084
|
|
|
18766
19085
|
axios/dist/node/axios.cjs:
|
|
18767
|
-
(*! Axios v1.
|
|
19086
|
+
(*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
|
|
18768
19087
|
*/
|
|
18769
19088
|
//# sourceMappingURL=index.js.map
|