@justworkflowit/cdk-constructs 0.0.225 → 0.0.227

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.
@@ -1769,12 +1769,12 @@ var require_dist_cjs12 = __commonJS({
1769
1769
  return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
1770
1770
  };
1771
1771
  var MIN_WAIT_TIME = 6e3;
1772
- async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {
1772
+ async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
1773
1773
  const headers = request.headers ?? {};
1774
1774
  const expect = headers.Expect || headers.expect;
1775
1775
  let timeoutId = -1;
1776
1776
  let sendBody = true;
1777
- if (expect === "100-continue") {
1777
+ if (!externalAgent && expect === "100-continue") {
1778
1778
  sendBody = await Promise.race([
1779
1779
  new Promise((resolve) => {
1780
1780
  timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
@@ -1824,6 +1824,7 @@ var require_dist_cjs12 = __commonJS({
1824
1824
  config;
1825
1825
  configProvider;
1826
1826
  socketWarningTimestamp = 0;
1827
+ externalAgent = false;
1827
1828
  metadata = { handlerProtocol: "http/1.1" };
1828
1829
  static create(instanceOrOptions) {
1829
1830
  if (typeof instanceOrOptions?.handle === "function") {
@@ -1877,12 +1878,14 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
1877
1878
  throwOnRequestTimeout,
1878
1879
  httpAgent: (() => {
1879
1880
  if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") {
1881
+ this.externalAgent = true;
1880
1882
  return httpAgent;
1881
1883
  }
1882
1884
  return new http.Agent({ keepAlive, maxSockets, ...httpAgent });
1883
1885
  })(),
1884
1886
  httpsAgent: (() => {
1885
1887
  if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") {
1888
+ this.externalAgent = true;
1886
1889
  return httpsAgent;
1887
1890
  }
1888
1891
  return new https.Agent({ keepAlive, maxSockets, ...httpsAgent });
@@ -1922,7 +1925,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
1922
1925
  const headers = request.headers ?? {};
1923
1926
  const expectContinue = (headers.Expect ?? headers.expect) === "100-continue";
1924
1927
  let agent = isSSL ? config.httpsAgent : config.httpAgent;
1925
- if (expectContinue) {
1928
+ if (expectContinue && !this.externalAgent) {
1926
1929
  agent = new (isSSL ? https.Agent : http.Agent)({
1927
1930
  keepAlive: false,
1928
1931
  maxSockets: Infinity
@@ -2003,7 +2006,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
2003
2006
  keepAliveMsecs: httpAgent.keepAliveMsecs
2004
2007
  }));
2005
2008
  }
2006
- writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e3) => {
2009
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e3) => {
2007
2010
  timeouts.forEach(timing.clearTimeout);
2008
2011
  return _reject(e3);
2009
2012
  });
@@ -4717,12 +4720,8 @@ var init_schema_date_utils = __esm({
4717
4720
  range(hours, 0, 23);
4718
4721
  range(minutes, 0, 59);
4719
4722
  range(seconds, 0, 60);
4720
- const date2 = /* @__PURE__ */ new Date();
4721
- date2.setUTCFullYear(Number(yearStr), Number(monthStr) - 1, Number(dayStr));
4722
- date2.setUTCHours(Number(hours));
4723
- date2.setUTCMinutes(Number(minutes));
4724
- date2.setUTCSeconds(Number(seconds));
4725
- date2.setUTCMilliseconds(Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0);
4723
+ const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
4724
+ date2.setUTCFullYear(Number(yearStr));
4726
4725
  if (offsetStr.toUpperCase() != "Z") {
4727
4726
  const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
4728
4727
  const scalar = sign === "-" ? 1 : -1;
@@ -4754,18 +4753,13 @@ var init_schema_date_utils = __esm({
4754
4753
  [, month, day, hour, minute, second, fraction, year2] = matches;
4755
4754
  }
4756
4755
  if (year2 && second) {
4757
- const date2 = /* @__PURE__ */ new Date();
4758
- date2.setUTCFullYear(Number(year2));
4759
- date2.setUTCMonth(months.indexOf(month));
4756
+ const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
4760
4757
  range(day, 1, 31);
4761
- date2.setUTCDate(Number(day));
4762
4758
  range(hour, 0, 23);
4763
- date2.setUTCHours(Number(hour));
4764
4759
  range(minute, 0, 59);
4765
- date2.setUTCMinutes(Number(minute));
4766
4760
  range(second, 0, 60);
4767
- date2.setUTCSeconds(Number(second));
4768
- date2.setUTCMilliseconds(fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
4761
+ const date2 = new Date(timestamp);
4762
+ date2.setUTCFullYear(Number(year2));
4769
4763
  return date2;
4770
4764
  }
4771
4765
  throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justworkflowit/cdk-constructs",
3
3
  "description": "",
4
- "version": "0.0.225",
4
+ "version": "0.0.227",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "publishConfig": {