@jjrawlins/cdk-iam-policy-builder-helper 0.0.75 → 0.0.76

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.
@@ -1,4 +1,3 @@
1
- import { connect, constants } from 'http2';
2
1
  import utils from './../utils.js';
3
2
  import settle from './../core/settle.js';
4
3
  import buildFullPath from '../core/buildFullPath.js';
@@ -6,6 +5,7 @@ import buildURL from './../helpers/buildURL.js';
6
5
  import proxyFromEnv from 'proxy-from-env';
7
6
  import http from 'http';
8
7
  import https from 'https';
8
+ import http2 from 'http2';
9
9
  import util from 'util';
10
10
  import followRedirects from 'follow-redirects';
11
11
  import zlib from 'zlib';
@@ -36,13 +36,6 @@ const brotliOptions = {
36
36
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
37
37
  }
38
38
 
39
- const {
40
- HTTP2_HEADER_SCHEME,
41
- HTTP2_HEADER_METHOD,
42
- HTTP2_HEADER_PATH,
43
- HTTP2_HEADER_STATUS
44
- } = constants;
45
-
46
39
  const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
47
40
 
48
41
  const {http: httpFollow, https: httpsFollow} = followRedirects;
@@ -72,9 +65,9 @@ class Http2Sessions {
72
65
  sessionTimeout: 1000
73
66
  }, options);
74
67
 
75
- let authoritySessions;
68
+ let authoritySessions = this.sessions[authority];
76
69
 
77
- if ((authoritySessions = this.sessions[authority])) {
70
+ if (authoritySessions) {
78
71
  let len = authoritySessions.length;
79
72
 
80
73
  for (let i = 0; i < len; i++) {
@@ -85,7 +78,7 @@ class Http2Sessions {
85
78
  }
86
79
  }
87
80
 
88
- const session = connect(authority, options);
81
+ const session = http2.connect(authority, options);
89
82
 
90
83
  let removed;
91
84
 
@@ -100,11 +93,12 @@ class Http2Sessions {
100
93
 
101
94
  while (i--) {
102
95
  if (entries[i][0] === session) {
103
- entries.splice(i, 1);
104
96
  if (len === 1) {
105
97
  delete this.sessions[authority];
106
- return;
98
+ } else {
99
+ entries.splice(i, 1);
107
100
  }
101
+ return;
108
102
  }
109
103
  }
110
104
  };
@@ -143,12 +137,12 @@ class Http2Sessions {
143
137
 
144
138
  session.once('close', removeSession);
145
139
 
146
- let entries = this.sessions[authority], entry = [
147
- session,
148
- options
149
- ];
140
+ let entry = [
141
+ session,
142
+ options
143
+ ];
150
144
 
151
- entries ? this.sessions[authority].push(entry) : authoritySessions = this.sessions[authority] = [entry];
145
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
152
146
 
153
147
  return session;
154
148
  }
@@ -276,6 +270,13 @@ const http2Transport = {
276
270
 
277
271
  const session = http2Sessions.getSession(authority, http2Options);
278
272
 
273
+ const {
274
+ HTTP2_HEADER_SCHEME,
275
+ HTTP2_HEADER_METHOD,
276
+ HTTP2_HEADER_PATH,
277
+ HTTP2_HEADER_STATUS
278
+ } = http2.constants;
279
+
279
280
  const http2Headers = {
280
281
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
281
282
  [HTTP2_HEADER_METHOD]: options.method,
@@ -857,6 +858,9 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
857
858
  req
858
859
  ));
859
860
  });
861
+ } else {
862
+ // explicitly reset the socket timeout value for a possible `keep-alive` request
863
+ req.setTimeout(0);
860
864
  }
861
865
 
862
866
 
@@ -1 +1 @@
1
- export const VERSION = "1.13.1";
1
+ export const VERSION = "1.13.2";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "index.js",
6
6
  "exports": {
package/package.json CHANGED
@@ -101,7 +101,7 @@
101
101
  "publishConfig": {
102
102
  "access": "public"
103
103
  },
104
- "version": "0.0.75",
104
+ "version": "0.0.76",
105
105
  "jest": {
106
106
  "coverageProvider": "v8",
107
107
  "testMatch": [