cloudstructs 0.6.17 → 0.6.19
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/assets/slack-app/provider.lambda/index.js +134 -7
- package/assets/slack-events/events.lambda/index.js +4 -0
- package/assets/slack-textract/detect.lambda/index.js +355 -80
- package/assets/ssl-server-test/analyze.lambda/index.js +134 -7
- package/assets/static-website/origin-request.edge-lambda/index.js +4 -0
- package/assets/toolkit-cleaner/clean-objects.lambda/index.js +4 -0
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +3 -3
- package/lib/ssl-server-test/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
- package/node_modules/http-cache-semantics/index.js +4 -3
- package/node_modules/http-cache-semantics/package.json +2 -8
- package/package.json +11 -12
package/.jsii
CHANGED
|
@@ -2844,7 +2844,7 @@
|
|
|
2844
2844
|
"stability": "stable"
|
|
2845
2845
|
},
|
|
2846
2846
|
"homepage": "https://github.com/jogold/cloudstructs.git",
|
|
2847
|
-
"jsiiVersion": "1.
|
|
2847
|
+
"jsiiVersion": "1.74.0 (build 6d08790)",
|
|
2848
2848
|
"keywords": [
|
|
2849
2849
|
"cdk"
|
|
2850
2850
|
],
|
|
@@ -6391,6 +6391,6 @@
|
|
|
6391
6391
|
"symbolId": "src/url-shortener/index:UrlShortenerProps"
|
|
6392
6392
|
}
|
|
6393
6393
|
},
|
|
6394
|
-
"version": "0.6.
|
|
6395
|
-
"fingerprint": "
|
|
6394
|
+
"version": "0.6.19",
|
|
6395
|
+
"fingerprint": "doAelXkYeIh/Hn9ecaDlJkpIA2xv/2/iiEKpI7WJa34="
|
|
6396
6396
|
}
|
|
@@ -21,6 +21,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
23
23
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
28
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
29
|
mod
|
|
26
30
|
));
|
|
@@ -324,10 +328,12 @@ var require_dist = __commonJS({
|
|
|
324
328
|
}
|
|
325
329
|
};
|
|
326
330
|
exports.assert = {
|
|
331
|
+
// Unknowns.
|
|
327
332
|
undefined: (value) => assertType(is.undefined(value), "undefined", value),
|
|
328
333
|
string: (value) => assertType(is.string(value), "string", value),
|
|
329
334
|
number: (value) => assertType(is.number(value), "number", value),
|
|
330
335
|
bigint: (value) => assertType(is.bigint(value), "bigint", value),
|
|
336
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
331
337
|
function_: (value) => assertType(is.function_(value), "Function", value),
|
|
332
338
|
null_: (value) => assertType(is.null_(value), "null", value),
|
|
333
339
|
class_: (value) => assertType(is.class_(value), "Class", value),
|
|
@@ -353,7 +359,9 @@ var require_dist = __commonJS({
|
|
|
353
359
|
promise: (value) => assertType(is.promise(value), "Promise", value),
|
|
354
360
|
generatorFunction: (value) => assertType(is.generatorFunction(value), "GeneratorFunction", value),
|
|
355
361
|
asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), "AsyncGeneratorFunction", value),
|
|
362
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
356
363
|
asyncFunction: (value) => assertType(is.asyncFunction(value), "AsyncFunction", value),
|
|
364
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
357
365
|
boundFunction: (value) => assertType(is.boundFunction(value), "Function", value),
|
|
358
366
|
regExp: (value) => assertType(is.regExp(value), "RegExp", value),
|
|
359
367
|
date: (value) => assertType(is.date(value), "Date", value),
|
|
@@ -407,10 +415,13 @@ var require_dist = __commonJS({
|
|
|
407
415
|
propertyKey: (value) => assertType(is.propertyKey(value), "PropertyKey", value),
|
|
408
416
|
formData: (value) => assertType(is.formData(value), "FormData", value),
|
|
409
417
|
urlSearchParams: (value) => assertType(is.urlSearchParams(value), "URLSearchParams", value),
|
|
418
|
+
// Numbers.
|
|
410
419
|
evenInteger: (value) => assertType(is.evenInteger(value), "even integer", value),
|
|
411
420
|
oddInteger: (value) => assertType(is.oddInteger(value), "odd integer", value),
|
|
421
|
+
// Two arguments.
|
|
412
422
|
directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T", instance),
|
|
413
423
|
inRange: (value, range) => assertType(is.inRange(value, range), "in range", value),
|
|
424
|
+
// Variadic functions.
|
|
414
425
|
any: (predicate, ...values) => {
|
|
415
426
|
return assertType(is.any(predicate, ...values), "predicate returns truthy for any value", values, { multipleValues: true });
|
|
416
427
|
},
|
|
@@ -1574,6 +1585,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1574
1585
|
206,
|
|
1575
1586
|
300,
|
|
1576
1587
|
301,
|
|
1588
|
+
308,
|
|
1577
1589
|
404,
|
|
1578
1590
|
405,
|
|
1579
1591
|
410,
|
|
@@ -1604,6 +1616,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1604
1616
|
]);
|
|
1605
1617
|
var hopByHopHeaders = {
|
|
1606
1618
|
date: true,
|
|
1619
|
+
// included, because we add Age update Date
|
|
1607
1620
|
connection: true,
|
|
1608
1621
|
"keep-alive": true,
|
|
1609
1622
|
"proxy-authenticate": true,
|
|
@@ -1614,6 +1627,7 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1614
1627
|
upgrade: true
|
|
1615
1628
|
};
|
|
1616
1629
|
var excludedFromRevalidationUpdate = {
|
|
1630
|
+
// Since the old body is reused, it doesn't make sense to change properties of the body
|
|
1617
1631
|
"content-length": true,
|
|
1618
1632
|
"content-encoding": true,
|
|
1619
1633
|
"transfer-encoding": true,
|
|
@@ -1633,10 +1647,10 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1633
1647
|
const cc = {};
|
|
1634
1648
|
if (!header)
|
|
1635
1649
|
return cc;
|
|
1636
|
-
const parts = header.trim().split(
|
|
1650
|
+
const parts = header.trim().split(/,/);
|
|
1637
1651
|
for (const part of parts) {
|
|
1638
|
-
const [k, v] = part.split(
|
|
1639
|
-
cc[k] = v === void 0 ? true : v.replace(/^"|"$/g, "");
|
|
1652
|
+
const [k, v] = part.split(/=/, 2);
|
|
1653
|
+
cc[k.trim()] = v === void 0 ? true : v.trim().replace(/^"|"$/g, "");
|
|
1640
1654
|
}
|
|
1641
1655
|
return cc;
|
|
1642
1656
|
}
|
|
@@ -1700,7 +1714,19 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1700
1714
|
return Date.now();
|
|
1701
1715
|
}
|
|
1702
1716
|
storable() {
|
|
1703
|
-
return !!(!this._reqcc["no-store"] &&
|
|
1717
|
+
return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
|
|
1718
|
+
// The request method is understood by the cache and defined as being cacheable, and
|
|
1719
|
+
("GET" === this._method || "HEAD" === this._method || "POST" === this._method && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and
|
|
1720
|
+
understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and
|
|
1721
|
+
!this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and
|
|
1722
|
+
(!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared,
|
|
1723
|
+
(!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either:
|
|
1724
|
+
// contains an Expires header field, or
|
|
1725
|
+
(this._resHeaders.expires || // contains a max-age response directive, or
|
|
1726
|
+
// contains a s-maxage response directive and the cache is shared, or
|
|
1727
|
+
// contains a public response directive.
|
|
1728
|
+
this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
|
|
1729
|
+
statusCodeCacheableByDefault.has(this._status)));
|
|
1704
1730
|
}
|
|
1705
1731
|
_hasExplicitExpiration() {
|
|
1706
1732
|
return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
|
|
@@ -1731,7 +1757,9 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1731
1757
|
return this._requestMatches(req, false);
|
|
1732
1758
|
}
|
|
1733
1759
|
_requestMatches(req, allowHeadMethod) {
|
|
1734
|
-
return (!this._url || this._url === req.url) && this._host === req.headers.host &&
|
|
1760
|
+
return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
|
|
1761
|
+
(!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
|
|
1762
|
+
this._varyMatches(req);
|
|
1735
1763
|
}
|
|
1736
1764
|
_allowsStoringAuthenticated() {
|
|
1737
1765
|
return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
|
|
@@ -1785,6 +1813,10 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1785
1813
|
headers.date = new Date(this.now()).toUTCString();
|
|
1786
1814
|
return headers;
|
|
1787
1815
|
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Value of the Date response header or current time if Date was invalid
|
|
1818
|
+
* @return timestamp
|
|
1819
|
+
*/
|
|
1788
1820
|
date() {
|
|
1789
1821
|
const serverDate = Date.parse(this._resHeaders.date);
|
|
1790
1822
|
if (isFinite(serverDate)) {
|
|
@@ -1792,6 +1824,12 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1792
1824
|
}
|
|
1793
1825
|
return this._responseTime;
|
|
1794
1826
|
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Value of the Age header, in seconds, updated for the current time.
|
|
1829
|
+
* May be fractional.
|
|
1830
|
+
*
|
|
1831
|
+
* @return Number
|
|
1832
|
+
*/
|
|
1795
1833
|
age() {
|
|
1796
1834
|
let age = this._ageValue();
|
|
1797
1835
|
const residentTime = (this.now() - this._responseTime) / 1e3;
|
|
@@ -1800,6 +1838,13 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1800
1838
|
_ageValue() {
|
|
1801
1839
|
return toNumberOrZero(this._resHeaders.age);
|
|
1802
1840
|
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
|
|
1843
|
+
*
|
|
1844
|
+
* For an up-to-date value, see `timeToLive()`.
|
|
1845
|
+
*
|
|
1846
|
+
* @return Number
|
|
1847
|
+
*/
|
|
1803
1848
|
maxAge() {
|
|
1804
1849
|
if (!this.storable() || this._rescc["no-cache"]) {
|
|
1805
1850
|
return 0;
|
|
@@ -1896,6 +1941,13 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1896
1941
|
reqcc: this._reqcc
|
|
1897
1942
|
};
|
|
1898
1943
|
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Headers for sending to the origin server to revalidate stale response.
|
|
1946
|
+
* Allows server to return 304 to allow reuse of the previous response.
|
|
1947
|
+
*
|
|
1948
|
+
* Hop by hop headers are always stripped.
|
|
1949
|
+
* Revalidation headers may be added or removed, depending on request.
|
|
1950
|
+
*/
|
|
1899
1951
|
revalidationHeaders(incomingReq) {
|
|
1900
1952
|
this._assertRequestHasHeaders(incomingReq);
|
|
1901
1953
|
const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
|
|
@@ -1926,6 +1978,15 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1926
1978
|
}
|
|
1927
1979
|
return headers;
|
|
1928
1980
|
}
|
|
1981
|
+
/**
|
|
1982
|
+
* Creates new CachePolicy with information combined from the previews response,
|
|
1983
|
+
* and the new revalidation response.
|
|
1984
|
+
*
|
|
1985
|
+
* Returns {policy, modified} where modified is a boolean indicating
|
|
1986
|
+
* whether the response body has been modified, and old cached body can't be used.
|
|
1987
|
+
*
|
|
1988
|
+
* @return {Object} {policy: CachePolicy, modified: Boolean}
|
|
1989
|
+
*/
|
|
1929
1990
|
revalidatedPolicy(request, response) {
|
|
1930
1991
|
this._assertRequestHasHeaders(request);
|
|
1931
1992
|
if (this._useStaleIfError() && isErrorResponse(response)) {
|
|
@@ -1955,6 +2016,9 @@ var require_http_cache_semantics = __commonJS({
|
|
|
1955
2016
|
if (!matches) {
|
|
1956
2017
|
return {
|
|
1957
2018
|
policy: new this.constructor(request, response),
|
|
2019
|
+
// Client receiving 304 without body, even if it's invalid/mismatched has no option
|
|
2020
|
+
// but to reuse a cached body. We don't have a good way to tell clients to do
|
|
2021
|
+
// error recovery in such case.
|
|
1958
2022
|
modified: response.status != 304,
|
|
1959
2023
|
matches: false
|
|
1960
2024
|
};
|
|
@@ -2786,6 +2850,7 @@ var require_agent = __commonJS({
|
|
|
2786
2850
|
var kOriginSet = Symbol("cachedOriginSet");
|
|
2787
2851
|
var kGracefullyClosing = Symbol("gracefullyClosing");
|
|
2788
2852
|
var nameKeys = [
|
|
2853
|
+
// `http2.connect()` options
|
|
2789
2854
|
"maxDeflateDynamicTableSize",
|
|
2790
2855
|
"maxSessionMemory",
|
|
2791
2856
|
"maxHeaderListPairs",
|
|
@@ -2793,10 +2858,12 @@ var require_agent = __commonJS({
|
|
|
2793
2858
|
"maxReservedRemoteStreams",
|
|
2794
2859
|
"maxSendHeaderBlockLength",
|
|
2795
2860
|
"paddingStrategy",
|
|
2861
|
+
// `tls.connect()` options
|
|
2796
2862
|
"localAddress",
|
|
2797
2863
|
"path",
|
|
2798
2864
|
"rejectUnauthorized",
|
|
2799
2865
|
"minDHSize",
|
|
2866
|
+
// `tls.createSecureContext()` options
|
|
2800
2867
|
"ca",
|
|
2801
2868
|
"cert",
|
|
2802
2869
|
"clientCertEngine",
|
|
@@ -2832,7 +2899,12 @@ var require_agent = __commonJS({
|
|
|
2832
2899
|
};
|
|
2833
2900
|
var closeCoveredSessions = (where, session) => {
|
|
2834
2901
|
for (const coveredSession of where) {
|
|
2835
|
-
if (
|
|
2902
|
+
if (
|
|
2903
|
+
// The set is a proper subset when its length is less than the other set.
|
|
2904
|
+
coveredSession[kOriginSet].length < session[kOriginSet].length && // And the other set includes all elements of the subset.
|
|
2905
|
+
coveredSession[kOriginSet].every((origin) => session[kOriginSet].includes(origin)) && // Makes sure that the session can handle all requests from the covered session.
|
|
2906
|
+
coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams
|
|
2907
|
+
) {
|
|
2836
2908
|
gracefullyClose(coveredSession);
|
|
2837
2909
|
}
|
|
2838
2910
|
}
|
|
@@ -2937,7 +3009,9 @@ var require_agent = __commonJS({
|
|
|
2937
3009
|
}
|
|
2938
3010
|
if (session[kOriginSet].includes(normalizedOrigin)) {
|
|
2939
3011
|
const sessionCurrentStreamsCount = session[kCurrentStreamsCount];
|
|
2940
|
-
if (sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || session[kGracefullyClosing] ||
|
|
3012
|
+
if (sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || session[kGracefullyClosing] || // Unfortunately the `close` event isn't called immediately,
|
|
3013
|
+
// so `session.destroyed` is `true`, but `session.closed` is `false`.
|
|
3014
|
+
session.destroyed) {
|
|
2941
3015
|
continue;
|
|
2942
3016
|
}
|
|
2943
3017
|
if (!optimalSession) {
|
|
@@ -4495,6 +4569,7 @@ var require_core = __commonJS({
|
|
|
4495
4569
|
"beforeRedirect",
|
|
4496
4570
|
"beforeError",
|
|
4497
4571
|
"beforeRetry",
|
|
4572
|
+
// Promise-Only
|
|
4498
4573
|
"afterResponse"
|
|
4499
4574
|
];
|
|
4500
4575
|
function validateSearchParameters(searchParameters) {
|
|
@@ -4543,6 +4618,7 @@ var require_core = __commonJS({
|
|
|
4543
4618
|
writable: true,
|
|
4544
4619
|
configurable: true,
|
|
4545
4620
|
enumerable: false,
|
|
4621
|
+
// @ts-expect-error TS doesn't see the check above
|
|
4546
4622
|
value: source[name]
|
|
4547
4623
|
};
|
|
4548
4624
|
}
|
|
@@ -4566,11 +4642,15 @@ var require_core = __commonJS({
|
|
|
4566
4642
|
value: self[kResponse]
|
|
4567
4643
|
});
|
|
4568
4644
|
Object.defineProperty(this, "options", {
|
|
4645
|
+
// This fails because of TS 3.7.2 useDefineForClassFields
|
|
4646
|
+
// Ref: https://github.com/microsoft/TypeScript/issues/34972
|
|
4569
4647
|
enumerable: false,
|
|
4570
4648
|
value: self.options
|
|
4571
4649
|
});
|
|
4572
4650
|
} else {
|
|
4573
4651
|
Object.defineProperty(this, "options", {
|
|
4652
|
+
// This fails because of TS 3.7.2 useDefineForClassFields
|
|
4653
|
+
// Ref: https://github.com/microsoft/TypeScript/issues/34972
|
|
4574
4654
|
enumerable: false,
|
|
4575
4655
|
value: self
|
|
4576
4656
|
});
|
|
@@ -4656,7 +4736,10 @@ var require_core = __commonJS({
|
|
|
4656
4736
|
var Request = class extends stream_1.Duplex {
|
|
4657
4737
|
constructor(url, options = {}, defaults) {
|
|
4658
4738
|
super({
|
|
4739
|
+
// This must be false, to enable throwing after destroy
|
|
4740
|
+
// It is used for retry logic in Promise API
|
|
4659
4741
|
autoDestroy: false,
|
|
4742
|
+
// It needs to be zero because we're just proxying the data to another stream
|
|
4660
4743
|
highWaterMark: 0
|
|
4661
4744
|
});
|
|
4662
4745
|
this[kDownloadedSize] = 0;
|
|
@@ -5554,6 +5637,7 @@ var require_core = __commonJS({
|
|
|
5554
5637
|
}
|
|
5555
5638
|
}
|
|
5556
5639
|
}
|
|
5640
|
+
// Node.js 12 has incorrect types, so the encoding must be a string
|
|
5557
5641
|
_write(chunk, encoding, callback) {
|
|
5558
5642
|
const write = () => {
|
|
5559
5643
|
this._writeRequest(chunk, encoding, callback);
|
|
@@ -5628,10 +5712,16 @@ var require_core = __commonJS({
|
|
|
5628
5712
|
get _isAboutToError() {
|
|
5629
5713
|
return this[kStopReading];
|
|
5630
5714
|
}
|
|
5715
|
+
/**
|
|
5716
|
+
The remote IP address.
|
|
5717
|
+
*/
|
|
5631
5718
|
get ip() {
|
|
5632
5719
|
var _a;
|
|
5633
5720
|
return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress;
|
|
5634
5721
|
}
|
|
5722
|
+
/**
|
|
5723
|
+
Indicates whether the request has been aborted or not.
|
|
5724
|
+
*/
|
|
5635
5725
|
get aborted() {
|
|
5636
5726
|
var _a, _b, _c;
|
|
5637
5727
|
return ((_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroyed) !== null && _b !== void 0 ? _b : this.destroyed) && !((_c = this[kOriginalResponse]) === null || _c === void 0 ? void 0 : _c.complete);
|
|
@@ -5640,6 +5730,9 @@ var require_core = __commonJS({
|
|
|
5640
5730
|
var _a, _b;
|
|
5641
5731
|
return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : void 0;
|
|
5642
5732
|
}
|
|
5733
|
+
/**
|
|
5734
|
+
Progress event for downloading (receiving a response).
|
|
5735
|
+
*/
|
|
5643
5736
|
get downloadProgress() {
|
|
5644
5737
|
let percent;
|
|
5645
5738
|
if (this[kResponseSize]) {
|
|
@@ -5655,6 +5748,9 @@ var require_core = __commonJS({
|
|
|
5655
5748
|
total: this[kResponseSize]
|
|
5656
5749
|
};
|
|
5657
5750
|
}
|
|
5751
|
+
/**
|
|
5752
|
+
Progress event for uploading (sending a request).
|
|
5753
|
+
*/
|
|
5658
5754
|
get uploadProgress() {
|
|
5659
5755
|
let percent;
|
|
5660
5756
|
if (this[kBodySize]) {
|
|
@@ -5670,10 +5766,40 @@ var require_core = __commonJS({
|
|
|
5670
5766
|
total: this[kBodySize]
|
|
5671
5767
|
};
|
|
5672
5768
|
}
|
|
5769
|
+
/**
|
|
5770
|
+
The object contains the following properties:
|
|
5771
|
+
|
|
5772
|
+
- `start` - Time when the request started.
|
|
5773
|
+
- `socket` - Time when a socket was assigned to the request.
|
|
5774
|
+
- `lookup` - Time when the DNS lookup finished.
|
|
5775
|
+
- `connect` - Time when the socket successfully connected.
|
|
5776
|
+
- `secureConnect` - Time when the socket securely connected.
|
|
5777
|
+
- `upload` - Time when the request finished uploading.
|
|
5778
|
+
- `response` - Time when the request fired `response` event.
|
|
5779
|
+
- `end` - Time when the response fired `end` event.
|
|
5780
|
+
- `error` - Time when the request fired `error` event.
|
|
5781
|
+
- `abort` - Time when the request fired `abort` event.
|
|
5782
|
+
- `phases`
|
|
5783
|
+
- `wait` - `timings.socket - timings.start`
|
|
5784
|
+
- `dns` - `timings.lookup - timings.socket`
|
|
5785
|
+
- `tcp` - `timings.connect - timings.lookup`
|
|
5786
|
+
- `tls` - `timings.secureConnect - timings.connect`
|
|
5787
|
+
- `request` - `timings.upload - (timings.secureConnect || timings.connect)`
|
|
5788
|
+
- `firstByte` - `timings.response - timings.upload`
|
|
5789
|
+
- `download` - `timings.end - timings.response`
|
|
5790
|
+
- `total` - `(timings.end || timings.error || timings.abort) - timings.start`
|
|
5791
|
+
|
|
5792
|
+
If something has not been measured yet, it will be `undefined`.
|
|
5793
|
+
|
|
5794
|
+
__Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
|
|
5795
|
+
*/
|
|
5673
5796
|
get timings() {
|
|
5674
5797
|
var _a;
|
|
5675
5798
|
return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings;
|
|
5676
5799
|
}
|
|
5800
|
+
/**
|
|
5801
|
+
Whether the response was retrieved from the cache.
|
|
5802
|
+
*/
|
|
5677
5803
|
get isFromCache() {
|
|
5678
5804
|
return this[kIsFromCache];
|
|
5679
5805
|
}
|
|
@@ -6320,6 +6446,7 @@ var require_source5 = __commonJS({
|
|
|
6320
6446
|
methodRewriting: true,
|
|
6321
6447
|
ignoreInvalidCookies: false,
|
|
6322
6448
|
context: {},
|
|
6449
|
+
// TODO: Set this to `true` when Got 12 gets released
|
|
6323
6450
|
http2: false,
|
|
6324
6451
|
allowGetBody: false,
|
|
6325
6452
|
https: void 0,
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|