cloudstructs 0.6.16 → 0.6.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.
Files changed (62) hide show
  1. package/.jsii +3 -3
  2. package/assets/slack-app/provider.lambda/index.js +130 -4
  3. package/assets/slack-events/events.lambda/index.js +4 -0
  4. package/assets/slack-textract/detect.lambda/index.js +347 -73
  5. package/assets/ssl-server-test/analyze.lambda/index.js +130 -4
  6. package/assets/static-website/origin-request.edge-lambda/index.js +4 -0
  7. package/assets/toolkit-cleaner/clean-images.lambda/index.js +2 -1
  8. package/assets/toolkit-cleaner/clean-objects.lambda/index.js +6 -1
  9. package/assets/url-shortener/redirect.edge-lambda/index.js +2 -1
  10. package/assets/url-shortener/shortener.lambda/index.js +2 -1
  11. package/lib/codecommit-mirror/index.js +2 -2
  12. package/lib/ecs-service-roller/index.js +2 -2
  13. package/lib/email-receiver/receiver.js +1 -1
  14. package/lib/email-receiver/s3-function.js +2 -2
  15. package/lib/email-receiver/whitelist-function.js +2 -2
  16. package/lib/saml-identity-provider/index.js +2 -2
  17. package/lib/slack-app/manifest.js +1 -1
  18. package/lib/slack-app/provider-function.js +2 -2
  19. package/lib/slack-app/slack-app.js +2 -2
  20. package/lib/slack-events/events-function.js +2 -2
  21. package/lib/slack-events/index.js +1 -1
  22. package/lib/slack-textract/detect-function.js +2 -2
  23. package/lib/slack-textract/index.js +3 -3
  24. package/lib/ssl-server-test/analyze-function.js +2 -2
  25. package/lib/ssl-server-test/extract-grade-function.js +2 -2
  26. package/lib/ssl-server-test/index.js +1 -1
  27. package/lib/state-machine-cr-provider/index.js +4 -4
  28. package/lib/static-website/index.js +1 -1
  29. package/lib/static-website/origin-request-function.js +2 -2
  30. package/lib/toolkit-cleaner/clean-images-function.js +2 -2
  31. package/lib/toolkit-cleaner/clean-objects-function.js +2 -2
  32. package/lib/toolkit-cleaner/extract-template-hashes-function.js +2 -2
  33. package/lib/toolkit-cleaner/get-stack-names-function.js +2 -2
  34. package/lib/toolkit-cleaner/index.js +1 -1
  35. package/lib/url-shortener/index.js +1 -1
  36. package/lib/url-shortener/redirect-function.js +2 -2
  37. package/lib/url-shortener/shortener-function.js +2 -2
  38. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  39. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +1 -1
  40. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
  41. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
  42. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  43. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +1 -1
  44. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  45. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1 -1
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
  50. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  51. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +1 -1
  52. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
  53. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
  54. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  55. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1 -1
  56. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
  57. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
  58. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  59. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1 -1
  60. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
  61. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +1 -1
  62. package/package.json +10 -10
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.72.0 (build 4b8828b)",
2847
+ "jsiiVersion": "1.73.0 (build 6faeda3)",
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.16",
6395
- "fingerprint": "wfvaTJSmZd6CqWrqnhUV40J4zJDEJaG2N0wj1ObaE0Q="
6394
+ "version": "0.6.18",
6395
+ "fingerprint": "1RYFd+1diacm9rRmoHYFSvi9Cmt8uencybFWZJ6uNys="
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
  },
@@ -1604,6 +1615,7 @@ var require_http_cache_semantics = __commonJS({
1604
1615
  ]);
1605
1616
  var hopByHopHeaders = {
1606
1617
  date: true,
1618
+ // included, because we add Age update Date
1607
1619
  connection: true,
1608
1620
  "keep-alive": true,
1609
1621
  "proxy-authenticate": true,
@@ -1614,6 +1626,7 @@ var require_http_cache_semantics = __commonJS({
1614
1626
  upgrade: true
1615
1627
  };
1616
1628
  var excludedFromRevalidationUpdate = {
1629
+ // Since the old body is reused, it doesn't make sense to change properties of the body
1617
1630
  "content-length": true,
1618
1631
  "content-encoding": true,
1619
1632
  "transfer-encoding": true,
@@ -1700,7 +1713,19 @@ var require_http_cache_semantics = __commonJS({
1700
1713
  return Date.now();
1701
1714
  }
1702
1715
  storable() {
1703
- return !!(!this._reqcc["no-store"] && ("GET" === this._method || "HEAD" === this._method || "POST" === this._method && this._hasExplicitExpiration()) && understoodStatuses.has(this._status) && !this._rescc["no-store"] && (!this._isShared || !this._rescc.private) && (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && (this._resHeaders.expires || this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || statusCodeCacheableByDefault.has(this._status)));
1716
+ return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
1717
+ // The request method is understood by the cache and defined as being cacheable, and
1718
+ ("GET" === this._method || "HEAD" === this._method || "POST" === this._method && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and
1719
+ understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and
1720
+ !this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and
1721
+ (!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared,
1722
+ (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either:
1723
+ // contains an Expires header field, or
1724
+ (this._resHeaders.expires || // contains a max-age response directive, or
1725
+ // contains a s-maxage response directive and the cache is shared, or
1726
+ // contains a public response directive.
1727
+ this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
1728
+ statusCodeCacheableByDefault.has(this._status)));
1704
1729
  }
1705
1730
  _hasExplicitExpiration() {
1706
1731
  return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
@@ -1731,7 +1756,9 @@ var require_http_cache_semantics = __commonJS({
1731
1756
  return this._requestMatches(req, false);
1732
1757
  }
1733
1758
  _requestMatches(req, allowHeadMethod) {
1734
- return (!this._url || this._url === req.url) && this._host === req.headers.host && (!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && this._varyMatches(req);
1759
+ 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
1760
+ (!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
1761
+ this._varyMatches(req);
1735
1762
  }
1736
1763
  _allowsStoringAuthenticated() {
1737
1764
  return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
@@ -1785,6 +1812,10 @@ var require_http_cache_semantics = __commonJS({
1785
1812
  headers.date = new Date(this.now()).toUTCString();
1786
1813
  return headers;
1787
1814
  }
1815
+ /**
1816
+ * Value of the Date response header or current time if Date was invalid
1817
+ * @return timestamp
1818
+ */
1788
1819
  date() {
1789
1820
  const serverDate = Date.parse(this._resHeaders.date);
1790
1821
  if (isFinite(serverDate)) {
@@ -1792,6 +1823,12 @@ var require_http_cache_semantics = __commonJS({
1792
1823
  }
1793
1824
  return this._responseTime;
1794
1825
  }
1826
+ /**
1827
+ * Value of the Age header, in seconds, updated for the current time.
1828
+ * May be fractional.
1829
+ *
1830
+ * @return Number
1831
+ */
1795
1832
  age() {
1796
1833
  let age = this._ageValue();
1797
1834
  const residentTime = (this.now() - this._responseTime) / 1e3;
@@ -1800,6 +1837,13 @@ var require_http_cache_semantics = __commonJS({
1800
1837
  _ageValue() {
1801
1838
  return toNumberOrZero(this._resHeaders.age);
1802
1839
  }
1840
+ /**
1841
+ * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
1842
+ *
1843
+ * For an up-to-date value, see `timeToLive()`.
1844
+ *
1845
+ * @return Number
1846
+ */
1803
1847
  maxAge() {
1804
1848
  if (!this.storable() || this._rescc["no-cache"]) {
1805
1849
  return 0;
@@ -1896,6 +1940,13 @@ var require_http_cache_semantics = __commonJS({
1896
1940
  reqcc: this._reqcc
1897
1941
  };
1898
1942
  }
1943
+ /**
1944
+ * Headers for sending to the origin server to revalidate stale response.
1945
+ * Allows server to return 304 to allow reuse of the previous response.
1946
+ *
1947
+ * Hop by hop headers are always stripped.
1948
+ * Revalidation headers may be added or removed, depending on request.
1949
+ */
1899
1950
  revalidationHeaders(incomingReq) {
1900
1951
  this._assertRequestHasHeaders(incomingReq);
1901
1952
  const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
@@ -1926,6 +1977,15 @@ var require_http_cache_semantics = __commonJS({
1926
1977
  }
1927
1978
  return headers;
1928
1979
  }
1980
+ /**
1981
+ * Creates new CachePolicy with information combined from the previews response,
1982
+ * and the new revalidation response.
1983
+ *
1984
+ * Returns {policy, modified} where modified is a boolean indicating
1985
+ * whether the response body has been modified, and old cached body can't be used.
1986
+ *
1987
+ * @return {Object} {policy: CachePolicy, modified: Boolean}
1988
+ */
1929
1989
  revalidatedPolicy(request, response) {
1930
1990
  this._assertRequestHasHeaders(request);
1931
1991
  if (this._useStaleIfError() && isErrorResponse(response)) {
@@ -1955,6 +2015,9 @@ var require_http_cache_semantics = __commonJS({
1955
2015
  if (!matches) {
1956
2016
  return {
1957
2017
  policy: new this.constructor(request, response),
2018
+ // Client receiving 304 without body, even if it's invalid/mismatched has no option
2019
+ // but to reuse a cached body. We don't have a good way to tell clients to do
2020
+ // error recovery in such case.
1958
2021
  modified: response.status != 304,
1959
2022
  matches: false
1960
2023
  };
@@ -2786,6 +2849,7 @@ var require_agent = __commonJS({
2786
2849
  var kOriginSet = Symbol("cachedOriginSet");
2787
2850
  var kGracefullyClosing = Symbol("gracefullyClosing");
2788
2851
  var nameKeys = [
2852
+ // `http2.connect()` options
2789
2853
  "maxDeflateDynamicTableSize",
2790
2854
  "maxSessionMemory",
2791
2855
  "maxHeaderListPairs",
@@ -2793,10 +2857,12 @@ var require_agent = __commonJS({
2793
2857
  "maxReservedRemoteStreams",
2794
2858
  "maxSendHeaderBlockLength",
2795
2859
  "paddingStrategy",
2860
+ // `tls.connect()` options
2796
2861
  "localAddress",
2797
2862
  "path",
2798
2863
  "rejectUnauthorized",
2799
2864
  "minDHSize",
2865
+ // `tls.createSecureContext()` options
2800
2866
  "ca",
2801
2867
  "cert",
2802
2868
  "clientCertEngine",
@@ -2832,7 +2898,12 @@ var require_agent = __commonJS({
2832
2898
  };
2833
2899
  var closeCoveredSessions = (where, session) => {
2834
2900
  for (const coveredSession of where) {
2835
- if (coveredSession[kOriginSet].length < session[kOriginSet].length && coveredSession[kOriginSet].every((origin) => session[kOriginSet].includes(origin)) && coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams) {
2901
+ if (
2902
+ // The set is a proper subset when its length is less than the other set.
2903
+ coveredSession[kOriginSet].length < session[kOriginSet].length && // And the other set includes all elements of the subset.
2904
+ coveredSession[kOriginSet].every((origin) => session[kOriginSet].includes(origin)) && // Makes sure that the session can handle all requests from the covered session.
2905
+ coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams
2906
+ ) {
2836
2907
  gracefullyClose(coveredSession);
2837
2908
  }
2838
2909
  }
@@ -2937,7 +3008,9 @@ var require_agent = __commonJS({
2937
3008
  }
2938
3009
  if (session[kOriginSet].includes(normalizedOrigin)) {
2939
3010
  const sessionCurrentStreamsCount = session[kCurrentStreamsCount];
2940
- if (sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || session[kGracefullyClosing] || session.destroyed) {
3011
+ if (sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || session[kGracefullyClosing] || // Unfortunately the `close` event isn't called immediately,
3012
+ // so `session.destroyed` is `true`, but `session.closed` is `false`.
3013
+ session.destroyed) {
2941
3014
  continue;
2942
3015
  }
2943
3016
  if (!optimalSession) {
@@ -4495,6 +4568,7 @@ var require_core = __commonJS({
4495
4568
  "beforeRedirect",
4496
4569
  "beforeError",
4497
4570
  "beforeRetry",
4571
+ // Promise-Only
4498
4572
  "afterResponse"
4499
4573
  ];
4500
4574
  function validateSearchParameters(searchParameters) {
@@ -4543,6 +4617,7 @@ var require_core = __commonJS({
4543
4617
  writable: true,
4544
4618
  configurable: true,
4545
4619
  enumerable: false,
4620
+ // @ts-expect-error TS doesn't see the check above
4546
4621
  value: source[name]
4547
4622
  };
4548
4623
  }
@@ -4566,11 +4641,15 @@ var require_core = __commonJS({
4566
4641
  value: self[kResponse]
4567
4642
  });
4568
4643
  Object.defineProperty(this, "options", {
4644
+ // This fails because of TS 3.7.2 useDefineForClassFields
4645
+ // Ref: https://github.com/microsoft/TypeScript/issues/34972
4569
4646
  enumerable: false,
4570
4647
  value: self.options
4571
4648
  });
4572
4649
  } else {
4573
4650
  Object.defineProperty(this, "options", {
4651
+ // This fails because of TS 3.7.2 useDefineForClassFields
4652
+ // Ref: https://github.com/microsoft/TypeScript/issues/34972
4574
4653
  enumerable: false,
4575
4654
  value: self
4576
4655
  });
@@ -4656,7 +4735,10 @@ var require_core = __commonJS({
4656
4735
  var Request = class extends stream_1.Duplex {
4657
4736
  constructor(url, options = {}, defaults) {
4658
4737
  super({
4738
+ // This must be false, to enable throwing after destroy
4739
+ // It is used for retry logic in Promise API
4659
4740
  autoDestroy: false,
4741
+ // It needs to be zero because we're just proxying the data to another stream
4660
4742
  highWaterMark: 0
4661
4743
  });
4662
4744
  this[kDownloadedSize] = 0;
@@ -5554,6 +5636,7 @@ var require_core = __commonJS({
5554
5636
  }
5555
5637
  }
5556
5638
  }
5639
+ // Node.js 12 has incorrect types, so the encoding must be a string
5557
5640
  _write(chunk, encoding, callback) {
5558
5641
  const write = () => {
5559
5642
  this._writeRequest(chunk, encoding, callback);
@@ -5628,10 +5711,16 @@ var require_core = __commonJS({
5628
5711
  get _isAboutToError() {
5629
5712
  return this[kStopReading];
5630
5713
  }
5714
+ /**
5715
+ The remote IP address.
5716
+ */
5631
5717
  get ip() {
5632
5718
  var _a;
5633
5719
  return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress;
5634
5720
  }
5721
+ /**
5722
+ Indicates whether the request has been aborted or not.
5723
+ */
5635
5724
  get aborted() {
5636
5725
  var _a, _b, _c;
5637
5726
  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 +5729,9 @@ var require_core = __commonJS({
5640
5729
  var _a, _b;
5641
5730
  return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : void 0;
5642
5731
  }
5732
+ /**
5733
+ Progress event for downloading (receiving a response).
5734
+ */
5643
5735
  get downloadProgress() {
5644
5736
  let percent;
5645
5737
  if (this[kResponseSize]) {
@@ -5655,6 +5747,9 @@ var require_core = __commonJS({
5655
5747
  total: this[kResponseSize]
5656
5748
  };
5657
5749
  }
5750
+ /**
5751
+ Progress event for uploading (sending a request).
5752
+ */
5658
5753
  get uploadProgress() {
5659
5754
  let percent;
5660
5755
  if (this[kBodySize]) {
@@ -5670,10 +5765,40 @@ var require_core = __commonJS({
5670
5765
  total: this[kBodySize]
5671
5766
  };
5672
5767
  }
5768
+ /**
5769
+ The object contains the following properties:
5770
+
5771
+ - `start` - Time when the request started.
5772
+ - `socket` - Time when a socket was assigned to the request.
5773
+ - `lookup` - Time when the DNS lookup finished.
5774
+ - `connect` - Time when the socket successfully connected.
5775
+ - `secureConnect` - Time when the socket securely connected.
5776
+ - `upload` - Time when the request finished uploading.
5777
+ - `response` - Time when the request fired `response` event.
5778
+ - `end` - Time when the response fired `end` event.
5779
+ - `error` - Time when the request fired `error` event.
5780
+ - `abort` - Time when the request fired `abort` event.
5781
+ - `phases`
5782
+ - `wait` - `timings.socket - timings.start`
5783
+ - `dns` - `timings.lookup - timings.socket`
5784
+ - `tcp` - `timings.connect - timings.lookup`
5785
+ - `tls` - `timings.secureConnect - timings.connect`
5786
+ - `request` - `timings.upload - (timings.secureConnect || timings.connect)`
5787
+ - `firstByte` - `timings.response - timings.upload`
5788
+ - `download` - `timings.end - timings.response`
5789
+ - `total` - `(timings.end || timings.error || timings.abort) - timings.start`
5790
+
5791
+ If something has not been measured yet, it will be `undefined`.
5792
+
5793
+ __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
5794
+ */
5673
5795
  get timings() {
5674
5796
  var _a;
5675
5797
  return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings;
5676
5798
  }
5799
+ /**
5800
+ Whether the response was retrieved from the cache.
5801
+ */
5677
5802
  get isFromCache() {
5678
5803
  return this[kIsFromCache];
5679
5804
  }
@@ -6320,6 +6445,7 @@ var require_source5 = __commonJS({
6320
6445
  methodRewriting: true,
6321
6446
  ignoreInvalidCookies: false,
6322
6447
  context: {},
6448
+ // TODO: Set this to `true` when Got 12 gets released
6323
6449
  http2: false,
6324
6450
  allowGetBody: false,
6325
6451
  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
  ));