global-agent 3.0.0 → 4.0.0

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 (95) hide show
  1. package/.babelrc +23 -0
  2. package/.editorconfig +9 -0
  3. package/.eslintignore +1 -0
  4. package/.eslintrc +27 -0
  5. package/.github/FUNDING.yml +2 -0
  6. package/.github/workflows/feature.yaml +32 -0
  7. package/.github/workflows/main.yaml +31 -0
  8. package/.gitignore +14 -0
  9. package/LICENSE +2 -2
  10. package/README.md +67 -8
  11. package/package.json +48 -56
  12. package/src/{Logger.js → Logger.ts} +3 -3
  13. package/{dist/classes/Agent.js.flow → src/classes/Agent.ts} +121 -39
  14. package/src/classes/HttpProxyAgent.ts +45 -0
  15. package/src/classes/HttpsProxyAgent.ts +83 -0
  16. package/src/classes/index.ts +9 -0
  17. package/src/{errors.js → errors.ts} +2 -6
  18. package/src/factories/{createGlobalProxyAgent.js → createGlobalProxyAgent.ts} +36 -50
  19. package/{dist/factories/createProxyController.js.flow → src/factories/createProxyController.ts} +8 -5
  20. package/src/factories/index.ts +6 -0
  21. package/src/index.ts +6 -0
  22. package/{dist/routines/bootstrap.js.flow → src/routines/bootstrap.ts} +6 -5
  23. package/src/routines/index.ts +3 -0
  24. package/src/types.ts +66 -0
  25. package/src/utilities/{bindHttpMethod.js → bindHttpMethod.ts} +6 -7
  26. package/src/utilities/index.ts +9 -0
  27. package/{dist/utilities/isUrlMatchingNoProxy.js.flow → src/utilities/isUrlMatchingNoProxy.ts} +1 -6
  28. package/src/utilities/parseBoolean.ts +17 -0
  29. package/src/utilities/{parseProxyUrl.js → parseProxyUrl.ts} +12 -9
  30. package/test/.eslintrc +10 -0
  31. package/test/global-agent/factories/createGlobalProxyAgent.ts +760 -0
  32. package/test/global-agent/factories/createProxyController.ts +37 -0
  33. package/test/global-agent/utilities/isUrlMatchingNoProxy.ts +62 -0
  34. package/test/global-agent/utilities/parseProxyUrl.ts +38 -0
  35. package/tsconfig.json +25 -0
  36. package/.flowconfig +0 -3
  37. package/dist/Logger.js +0 -18
  38. package/dist/Logger.js.flow +0 -10
  39. package/dist/Logger.js.map +0 -1
  40. package/dist/classes/Agent.js +0 -174
  41. package/dist/classes/Agent.js.map +0 -1
  42. package/dist/classes/HttpProxyAgent.js +0 -33
  43. package/dist/classes/HttpProxyAgent.js.flow +0 -30
  44. package/dist/classes/HttpProxyAgent.js.map +0 -1
  45. package/dist/classes/HttpsProxyAgent.js +0 -53
  46. package/dist/classes/HttpsProxyAgent.js.flow +0 -54
  47. package/dist/classes/HttpsProxyAgent.js.map +0 -1
  48. package/dist/classes/index.js +0 -32
  49. package/dist/classes/index.js.flow +0 -5
  50. package/dist/classes/index.js.map +0 -1
  51. package/dist/errors.js +0 -22
  52. package/dist/errors.js.flow +0 -15
  53. package/dist/errors.js.map +0 -1
  54. package/dist/factories/createGlobalProxyAgent.js +0 -175
  55. package/dist/factories/createGlobalProxyAgent.js.flow +0 -197
  56. package/dist/factories/createGlobalProxyAgent.js.map +0 -1
  57. package/dist/factories/createProxyController.js +0 -45
  58. package/dist/factories/createProxyController.js.map +0 -1
  59. package/dist/factories/index.js +0 -24
  60. package/dist/factories/index.js.flow +0 -4
  61. package/dist/factories/index.js.map +0 -1
  62. package/dist/index.js +0 -22
  63. package/dist/index.js.flow +0 -4
  64. package/dist/index.js.map +0 -1
  65. package/dist/routines/bootstrap.js +0 -30
  66. package/dist/routines/bootstrap.js.map +0 -1
  67. package/dist/routines/index.js +0 -16
  68. package/dist/routines/index.js.flow +0 -3
  69. package/dist/routines/index.js.map +0 -1
  70. package/dist/types.js +0 -10
  71. package/dist/types.js.flow +0 -66
  72. package/dist/types.js.map +0 -1
  73. package/dist/utilities/bindHttpMethod.js +0 -62
  74. package/dist/utilities/bindHttpMethod.js.flow +0 -54
  75. package/dist/utilities/bindHttpMethod.js.map +0 -1
  76. package/dist/utilities/index.js +0 -32
  77. package/dist/utilities/index.js.flow +0 -5
  78. package/dist/utilities/index.js.map +0 -1
  79. package/dist/utilities/isUrlMatchingNoProxy.js +0 -43
  80. package/dist/utilities/isUrlMatchingNoProxy.js.map +0 -1
  81. package/dist/utilities/parseProxyUrl.js +0 -42
  82. package/dist/utilities/parseProxyUrl.js.flow +0 -36
  83. package/dist/utilities/parseProxyUrl.js.map +0 -1
  84. package/src/classes/Agent.js +0 -212
  85. package/src/classes/HttpProxyAgent.js +0 -30
  86. package/src/classes/HttpsProxyAgent.js +0 -54
  87. package/src/classes/index.js +0 -5
  88. package/src/factories/createProxyController.js +0 -46
  89. package/src/factories/index.js +0 -4
  90. package/src/index.js +0 -4
  91. package/src/routines/bootstrap.js +0 -25
  92. package/src/routines/index.js +0 -3
  93. package/src/types.js +0 -66
  94. package/src/utilities/index.js +0 -5
  95. package/src/utilities/isUrlMatchingNoProxy.js +0 -37
@@ -1,15 +0,0 @@
1
- // @flow
2
-
3
- /* eslint-disable fp/no-class, fp/no-this */
4
-
5
- import ExtendableError from 'es6-error';
6
-
7
- export class UnexpectedStateError extends ExtendableError {
8
- code: string;
9
-
10
- constructor (message: string, code: string = 'UNEXPECTED_STATE_ERROR') {
11
- super(message);
12
-
13
- this.code = code;
14
- }
15
- }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/errors.js"],"names":["UnexpectedStateError","ExtendableError","constructor","message","code"],"mappings":";;;;;;;AAIA;;;;AAFA;AAIO,MAAMA,oBAAN,SAAmCC,iBAAnC,CAAmD;AAGxDC,EAAAA,WAAW,CAAEC,OAAF,EAAmBC,IAAY,GAAG,wBAAlC,EAA4D;AACrE,UAAMD,OAAN;AAEA,SAAKC,IAAL,GAAYA,IAAZ;AACD;;AAPuD","sourcesContent":["// @flow\n\n/* eslint-disable fp/no-class, fp/no-this */\n\nimport ExtendableError from 'es6-error';\n\nexport class UnexpectedStateError extends ExtendableError {\n code: string;\n\n constructor (message: string, code: string = 'UNEXPECTED_STATE_ERROR') {\n super(message);\n\n this.code = code;\n }\n}\n"],"file":"errors.js"}
@@ -1,175 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _http = _interopRequireDefault(require("http"));
9
-
10
- var _https = _interopRequireDefault(require("https"));
11
-
12
- var _boolean = require("boolean");
13
-
14
- var _semver = _interopRequireDefault(require("semver"));
15
-
16
- var _Logger = _interopRequireDefault(require("../Logger"));
17
-
18
- var _classes = require("../classes");
19
-
20
- var _errors = require("../errors");
21
-
22
- var _utilities = require("../utilities");
23
-
24
- var _createProxyController = _interopRequireDefault(require("./createProxyController"));
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
- const httpGet = _http.default.get;
29
- const httpRequest = _http.default.request;
30
- const httpsGet = _https.default.get;
31
- const httpsRequest = _https.default.request;
32
-
33
- const log = _Logger.default.child({
34
- namespace: 'createGlobalProxyAgent'
35
- });
36
-
37
- const defaultConfigurationInput = {
38
- environmentVariableNamespace: undefined,
39
- forceGlobalAgent: undefined,
40
- socketConnectionTimeout: 60000
41
- };
42
-
43
- const omitUndefined = subject => {
44
- const keys = Object.keys(subject);
45
- const result = {};
46
-
47
- for (const key of keys) {
48
- const value = subject[key];
49
-
50
- if (value !== undefined) {
51
- result[key] = value;
52
- }
53
- }
54
-
55
- return result;
56
- };
57
-
58
- const createConfiguration = configurationInput => {
59
- // eslint-disable-next-line no-process-env
60
- const environment = process.env;
61
- const defaultConfiguration = {
62
- environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',
63
- forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? (0, _boolean.boolean)(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,
64
- socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout
65
- }; // $FlowFixMe
66
-
67
- return { ...defaultConfiguration,
68
- ...omitUndefined(configurationInput)
69
- };
70
- };
71
-
72
- const createGlobalProxyAgent = (configurationInput = defaultConfigurationInput) => {
73
- const configuration = createConfiguration(configurationInput);
74
- const proxyController = (0, _createProxyController.default)(); // eslint-disable-next-line no-process-env
75
-
76
- proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null; // eslint-disable-next-line no-process-env
77
-
78
- proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null; // eslint-disable-next-line no-process-env
79
-
80
- proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;
81
- log.info({
82
- configuration,
83
- state: proxyController
84
- }, 'global agent has been initialized');
85
-
86
- const mustUrlUseProxy = getProxy => {
87
- return url => {
88
- if (!getProxy()) {
89
- return false;
90
- }
91
-
92
- if (!proxyController.NO_PROXY) {
93
- return true;
94
- }
95
-
96
- return !(0, _utilities.isUrlMatchingNoProxy)(url, proxyController.NO_PROXY);
97
- };
98
- };
99
-
100
- const getUrlProxy = getProxy => {
101
- return () => {
102
- const proxy = getProxy();
103
-
104
- if (!proxy) {
105
- throw new _errors.UnexpectedStateError('HTTP(S) proxy must be configured.');
106
- }
107
-
108
- return (0, _utilities.parseProxyUrl)(proxy);
109
- };
110
- };
111
-
112
- const getHttpProxy = () => {
113
- return proxyController.HTTP_PROXY;
114
- };
115
-
116
- const BoundHttpProxyAgent = class extends _classes.HttpProxyAgent {
117
- constructor() {
118
- super(() => {
119
- return getHttpProxy();
120
- }, mustUrlUseProxy(getHttpProxy), getUrlProxy(getHttpProxy), _http.default.globalAgent, configuration.socketConnectionTimeout);
121
- }
122
-
123
- };
124
- const httpAgent = new BoundHttpProxyAgent();
125
-
126
- const getHttpsProxy = () => {
127
- return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;
128
- };
129
-
130
- const BoundHttpsProxyAgent = class extends _classes.HttpsProxyAgent {
131
- constructor() {
132
- super(() => {
133
- return getHttpsProxy();
134
- }, mustUrlUseProxy(getHttpsProxy), getUrlProxy(getHttpsProxy), _https.default.globalAgent, configuration.socketConnectionTimeout);
135
- }
136
-
137
- };
138
- const httpsAgent = new BoundHttpsProxyAgent(); // Overriding globalAgent was added in v11.7.
139
- // @see https://nodejs.org/uk/blog/release/v11.7.0/
140
-
141
- if (_semver.default.gte(process.version, 'v11.7.0')) {
142
- // @see https://github.com/facebook/flow/issues/7670
143
- // $FlowFixMe
144
- _http.default.globalAgent = httpAgent; // $FlowFixMe
145
-
146
- _https.default.globalAgent = httpsAgent;
147
- } // The reason this logic is used in addition to overriding http(s).globalAgent
148
- // is because there is no guarantee that we set http(s).globalAgent variable
149
- // before an instance of http(s).Agent has been already constructed by someone,
150
- // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.
151
- // @see https://github.com/gajus/global-agent/pull/13
152
- //
153
- // We still want to override http(s).globalAgent when possible to enable logic
154
- // in `bindHttpMethod`.
155
-
156
-
157
- if (_semver.default.gte(process.version, 'v10.0.0')) {
158
- // $FlowFixMe
159
- _http.default.get = (0, _utilities.bindHttpMethod)(httpGet, httpAgent, configuration.forceGlobalAgent); // $FlowFixMe
160
-
161
- _http.default.request = (0, _utilities.bindHttpMethod)(httpRequest, httpAgent, configuration.forceGlobalAgent); // $FlowFixMe
162
-
163
- _https.default.get = (0, _utilities.bindHttpMethod)(httpsGet, httpsAgent, configuration.forceGlobalAgent); // $FlowFixMe
164
-
165
- _https.default.request = (0, _utilities.bindHttpMethod)(httpsRequest, httpsAgent, configuration.forceGlobalAgent);
166
- } else {
167
- log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');
168
- }
169
-
170
- return proxyController;
171
- };
172
-
173
- var _default = createGlobalProxyAgent;
174
- exports.default = _default;
175
- //# sourceMappingURL=createGlobalProxyAgent.js.map
@@ -1,197 +0,0 @@
1
- // @flow
2
-
3
- import http from 'http';
4
- import https from 'https';
5
- import {
6
- boolean as parseBoolean,
7
- } from 'boolean';
8
- import semver from 'semver';
9
- import Logger from '../Logger';
10
- import {
11
- HttpProxyAgent,
12
- HttpsProxyAgent,
13
- } from '../classes';
14
- import {
15
- UnexpectedStateError,
16
- } from '../errors';
17
- import {
18
- bindHttpMethod,
19
- isUrlMatchingNoProxy,
20
- parseProxyUrl,
21
- } from '../utilities';
22
- import type {
23
- ProxyAgentConfigurationInputType,
24
- ProxyAgentConfigurationType,
25
- } from '../types';
26
- import createProxyController from './createProxyController';
27
-
28
- const httpGet = http.get;
29
- const httpRequest = http.request;
30
- const httpsGet = https.get;
31
- const httpsRequest = https.request;
32
-
33
- const log = Logger.child({
34
- namespace: 'createGlobalProxyAgent',
35
- });
36
-
37
- const defaultConfigurationInput = {
38
- environmentVariableNamespace: undefined,
39
- forceGlobalAgent: undefined,
40
- socketConnectionTimeout: 60000,
41
- };
42
-
43
- const omitUndefined = (subject) => {
44
- const keys = Object.keys(subject);
45
-
46
- const result = {};
47
-
48
- for (const key of keys) {
49
- const value = subject[key];
50
-
51
- if (value !== undefined) {
52
- result[key] = value;
53
- }
54
- }
55
-
56
- return result;
57
- };
58
-
59
- const createConfiguration = (configurationInput: ProxyAgentConfigurationInputType): ProxyAgentConfigurationType => {
60
- // eslint-disable-next-line no-process-env
61
- const environment = process.env;
62
-
63
- const defaultConfiguration = {
64
- environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',
65
- forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? parseBoolean(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,
66
- socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout,
67
- };
68
-
69
- // $FlowFixMe
70
- return {
71
- ...defaultConfiguration,
72
- ...omitUndefined(configurationInput),
73
- };
74
- };
75
-
76
- export default (configurationInput: ProxyAgentConfigurationInputType = defaultConfigurationInput) => {
77
- const configuration = createConfiguration(configurationInput);
78
-
79
- const proxyController = createProxyController();
80
-
81
- // eslint-disable-next-line no-process-env
82
- proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null;
83
-
84
- // eslint-disable-next-line no-process-env
85
- proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null;
86
-
87
- // eslint-disable-next-line no-process-env
88
- proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;
89
-
90
- log.info({
91
- configuration,
92
- state: proxyController,
93
- }, 'global agent has been initialized');
94
-
95
- const mustUrlUseProxy = (getProxy) => {
96
- return (url) => {
97
- if (!getProxy()) {
98
- return false;
99
- }
100
-
101
- if (!proxyController.NO_PROXY) {
102
- return true;
103
- }
104
-
105
- return !isUrlMatchingNoProxy(url, proxyController.NO_PROXY);
106
- };
107
- };
108
-
109
- const getUrlProxy = (getProxy) => {
110
- return () => {
111
- const proxy = getProxy();
112
-
113
- if (!proxy) {
114
- throw new UnexpectedStateError('HTTP(S) proxy must be configured.');
115
- }
116
-
117
- return parseProxyUrl(proxy);
118
- };
119
- };
120
-
121
- const getHttpProxy = () => {
122
- return proxyController.HTTP_PROXY;
123
- };
124
-
125
- const BoundHttpProxyAgent = class extends HttpProxyAgent {
126
- constructor () {
127
- super(
128
- () => {
129
- return getHttpProxy();
130
- },
131
- mustUrlUseProxy(getHttpProxy),
132
- getUrlProxy(getHttpProxy),
133
- http.globalAgent,
134
- configuration.socketConnectionTimeout,
135
- );
136
- }
137
- };
138
-
139
- const httpAgent = new BoundHttpProxyAgent();
140
-
141
- const getHttpsProxy = () => {
142
- return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;
143
- };
144
-
145
- const BoundHttpsProxyAgent = class extends HttpsProxyAgent {
146
- constructor () {
147
- super(
148
- () => {
149
- return getHttpsProxy();
150
- },
151
- mustUrlUseProxy(getHttpsProxy),
152
- getUrlProxy(getHttpsProxy),
153
- https.globalAgent,
154
- configuration.socketConnectionTimeout,
155
- );
156
- }
157
- };
158
-
159
- const httpsAgent = new BoundHttpsProxyAgent();
160
-
161
- // Overriding globalAgent was added in v11.7.
162
- // @see https://nodejs.org/uk/blog/release/v11.7.0/
163
- if (semver.gte(process.version, 'v11.7.0')) {
164
- // @see https://github.com/facebook/flow/issues/7670
165
- // $FlowFixMe
166
- http.globalAgent = httpAgent;
167
-
168
- // $FlowFixMe
169
- https.globalAgent = httpsAgent;
170
- }
171
-
172
- // The reason this logic is used in addition to overriding http(s).globalAgent
173
- // is because there is no guarantee that we set http(s).globalAgent variable
174
- // before an instance of http(s).Agent has been already constructed by someone,
175
- // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.
176
- // @see https://github.com/gajus/global-agent/pull/13
177
- //
178
- // We still want to override http(s).globalAgent when possible to enable logic
179
- // in `bindHttpMethod`.
180
- if (semver.gte(process.version, 'v10.0.0')) {
181
- // $FlowFixMe
182
- http.get = bindHttpMethod(httpGet, httpAgent, configuration.forceGlobalAgent);
183
-
184
- // $FlowFixMe
185
- http.request = bindHttpMethod(httpRequest, httpAgent, configuration.forceGlobalAgent);
186
-
187
- // $FlowFixMe
188
- https.get = bindHttpMethod(httpsGet, httpsAgent, configuration.forceGlobalAgent);
189
-
190
- // $FlowFixMe
191
- https.request = bindHttpMethod(httpsRequest, httpsAgent, configuration.forceGlobalAgent);
192
- } else {
193
- log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');
194
- }
195
-
196
- return proxyController;
197
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/factories/createGlobalProxyAgent.js"],"names":["httpGet","http","get","httpRequest","request","httpsGet","https","httpsRequest","log","Logger","child","namespace","defaultConfigurationInput","environmentVariableNamespace","undefined","forceGlobalAgent","socketConnectionTimeout","omitUndefined","subject","keys","Object","result","key","value","createConfiguration","configurationInput","environment","process","env","defaultConfiguration","GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE","GLOBAL_AGENT_FORCE_GLOBAL_AGENT","GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT","Number","parseInt","configuration","proxyController","HTTP_PROXY","HTTPS_PROXY","NO_PROXY","info","state","mustUrlUseProxy","getProxy","url","getUrlProxy","proxy","UnexpectedStateError","getHttpProxy","BoundHttpProxyAgent","HttpProxyAgent","constructor","globalAgent","httpAgent","getHttpsProxy","BoundHttpsProxyAgent","HttpsProxyAgent","httpsAgent","semver","gte","version","warn"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AAIA;;AAGA;;AASA;;;;AAEA,MAAMA,OAAO,GAAGC,cAAKC,GAArB;AACA,MAAMC,WAAW,GAAGF,cAAKG,OAAzB;AACA,MAAMC,QAAQ,GAAGC,eAAMJ,GAAvB;AACA,MAAMK,YAAY,GAAGD,eAAMF,OAA3B;;AAEA,MAAMI,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;AAIA,MAAMC,yBAAyB,GAAG;AAChCC,EAAAA,4BAA4B,EAAEC,SADE;AAEhCC,EAAAA,gBAAgB,EAAED,SAFc;AAGhCE,EAAAA,uBAAuB,EAAE;AAHO,CAAlC;;AAMA,MAAMC,aAAa,GAAIC,OAAD,IAAa;AACjC,QAAMC,IAAI,GAAGC,MAAM,CAACD,IAAP,CAAYD,OAAZ,CAAb;AAEA,QAAMG,MAAM,GAAG,EAAf;;AAEA,OAAK,MAAMC,GAAX,IAAkBH,IAAlB,EAAwB;AACtB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["// @flow\n\nimport http from 'http';\nimport https from 'https';\nimport {\n boolean as parseBoolean,\n} from 'boolean';\nimport semver from 'semver';\nimport Logger from '../Logger';\nimport {\n HttpProxyAgent,\n HttpsProxyAgent,\n} from '../classes';\nimport {\n UnexpectedStateError,\n} from '../errors';\nimport {\n bindHttpMethod,\n isUrlMatchingNoProxy,\n parseProxyUrl,\n} from '../utilities';\nimport type {\n ProxyAgentConfigurationInputType,\n ProxyAgentConfigurationType,\n} from '../types';\nimport createProxyController from './createProxyController';\n\nconst httpGet = http.get;\nconst httpRequest = http.request;\nconst httpsGet = https.get;\nconst httpsRequest = https.request;\n\nconst log = Logger.child({\n namespace: 'createGlobalProxyAgent',\n});\n\nconst defaultConfigurationInput = {\n environmentVariableNamespace: undefined,\n forceGlobalAgent: undefined,\n socketConnectionTimeout: 60000,\n};\n\nconst omitUndefined = (subject) => {\n const keys = Object.keys(subject);\n\n const result = {};\n\n for (const key of keys) {\n const value = subject[key];\n\n if (value !== undefined) {\n result[key] = value;\n }\n }\n\n return result;\n};\n\nconst createConfiguration = (configurationInput: ProxyAgentConfigurationInputType): ProxyAgentConfigurationType => {\n // eslint-disable-next-line no-process-env\n const environment = process.env;\n\n const defaultConfiguration = {\n environmentVariableNamespace: typeof environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE === 'string' ? environment.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE : 'GLOBAL_AGENT_',\n forceGlobalAgent: typeof environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT === 'string' ? parseBoolean(environment.GLOBAL_AGENT_FORCE_GLOBAL_AGENT) : true,\n socketConnectionTimeout: typeof environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT === 'string' ? Number.parseInt(environment.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT, 10) : defaultConfigurationInput.socketConnectionTimeout,\n };\n\n // $FlowFixMe\n return {\n ...defaultConfiguration,\n ...omitUndefined(configurationInput),\n };\n};\n\nexport default (configurationInput: ProxyAgentConfigurationInputType = defaultConfigurationInput) => {\n const configuration = createConfiguration(configurationInput);\n\n const proxyController = createProxyController();\n\n // eslint-disable-next-line no-process-env\n proxyController.HTTP_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTP_PROXY'] || null;\n\n // eslint-disable-next-line no-process-env\n proxyController.HTTPS_PROXY = process.env[configuration.environmentVariableNamespace + 'HTTPS_PROXY'] || null;\n\n // eslint-disable-next-line no-process-env\n proxyController.NO_PROXY = process.env[configuration.environmentVariableNamespace + 'NO_PROXY'] || null;\n\n log.info({\n configuration,\n state: proxyController,\n }, 'global agent has been initialized');\n\n const mustUrlUseProxy = (getProxy) => {\n return (url) => {\n if (!getProxy()) {\n return false;\n }\n\n if (!proxyController.NO_PROXY) {\n return true;\n }\n\n return !isUrlMatchingNoProxy(url, proxyController.NO_PROXY);\n };\n };\n\n const getUrlProxy = (getProxy) => {\n return () => {\n const proxy = getProxy();\n\n if (!proxy) {\n throw new UnexpectedStateError('HTTP(S) proxy must be configured.');\n }\n\n return parseProxyUrl(proxy);\n };\n };\n\n const getHttpProxy = () => {\n return proxyController.HTTP_PROXY;\n };\n\n const BoundHttpProxyAgent = class extends HttpProxyAgent {\n constructor () {\n super(\n () => {\n return getHttpProxy();\n },\n mustUrlUseProxy(getHttpProxy),\n getUrlProxy(getHttpProxy),\n http.globalAgent,\n configuration.socketConnectionTimeout,\n );\n }\n };\n\n const httpAgent = new BoundHttpProxyAgent();\n\n const getHttpsProxy = () => {\n return proxyController.HTTPS_PROXY || proxyController.HTTP_PROXY;\n };\n\n const BoundHttpsProxyAgent = class extends HttpsProxyAgent {\n constructor () {\n super(\n () => {\n return getHttpsProxy();\n },\n mustUrlUseProxy(getHttpsProxy),\n getUrlProxy(getHttpsProxy),\n https.globalAgent,\n configuration.socketConnectionTimeout,\n );\n }\n };\n\n const httpsAgent = new BoundHttpsProxyAgent();\n\n // Overriding globalAgent was added in v11.7.\n // @see https://nodejs.org/uk/blog/release/v11.7.0/\n if (semver.gte(process.version, 'v11.7.0')) {\n // @see https://github.com/facebook/flow/issues/7670\n // $FlowFixMe\n http.globalAgent = httpAgent;\n\n // $FlowFixMe\n https.globalAgent = httpsAgent;\n }\n\n // The reason this logic is used in addition to overriding http(s).globalAgent\n // is because there is no guarantee that we set http(s).globalAgent variable\n // before an instance of http(s).Agent has been already constructed by someone,\n // e.g. Stripe SDK creates instances of http(s).Agent at the top-level.\n // @see https://github.com/gajus/global-agent/pull/13\n //\n // We still want to override http(s).globalAgent when possible to enable logic\n // in `bindHttpMethod`.\n if (semver.gte(process.version, 'v10.0.0')) {\n // $FlowFixMe\n http.get = bindHttpMethod(httpGet, httpAgent, configuration.forceGlobalAgent);\n\n // $FlowFixMe\n http.request = bindHttpMethod(httpRequest, httpAgent, configuration.forceGlobalAgent);\n\n // $FlowFixMe\n https.get = bindHttpMethod(httpsGet, httpsAgent, configuration.forceGlobalAgent);\n\n // $FlowFixMe\n https.request = bindHttpMethod(httpsRequest, httpsAgent, configuration.forceGlobalAgent);\n } else {\n log.warn('attempt to initialize global-agent in unsupported Node.js version was ignored');\n }\n\n return proxyController;\n};\n"],"file":"createGlobalProxyAgent.js"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _Logger = _interopRequireDefault(require("../Logger"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- const log = _Logger.default.child({
13
- namespace: 'createProxyController'
14
- });
15
-
16
- const KNOWN_PROPERTY_NAMES = ['HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY'];
17
-
18
- const createProxyController = () => {
19
- // eslint-disable-next-line fp/no-proxy
20
- return new Proxy({
21
- HTTP_PROXY: null,
22
- HTTPS_PROXY: null,
23
- NO_PROXY: null
24
- }, {
25
- set: (subject, name, value) => {
26
- if (!KNOWN_PROPERTY_NAMES.includes(name)) {
27
- throw new Error('Cannot set an unmapped property "' + name + '".');
28
- }
29
-
30
- subject[name] = value;
31
- log.info({
32
- change: {
33
- name,
34
- value
35
- },
36
- newConfiguration: subject
37
- }, 'configuration changed');
38
- return true;
39
- }
40
- });
41
- };
42
-
43
- var _default = createProxyController;
44
- exports.default = _default;
45
- //# sourceMappingURL=createProxyController.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/factories/createProxyController.js"],"names":["log","Logger","child","namespace","KNOWN_PROPERTY_NAMES","Proxy","HTTP_PROXY","HTTPS_PROXY","NO_PROXY","set","subject","name","value","includes","Error","info","change","newConfiguration"],"mappings":";;;;;;;AAEA;;;;AAQA,MAAMA,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;AAIA,MAAMC,oBAAoB,GAAG,CAC3B,YAD2B,EAE3B,aAF2B,EAG3B,UAH2B,CAA7B;;oCAM0C;AACxC;AACA,SAAO,IAAIC,KAAJ,CAAU;AACfC,IAAAA,UAAU,EAAE,IADG;AAEfC,IAAAA,WAAW,EAAE,IAFE;AAGfC,IAAAA,QAAQ,EAAE;AAHK,GAAV,EAIJ;AACDC,IAAAA,GAAG,EAAE,CAACC,OAAD,EAAUC,IAAV,EAAgBC,KAAhB,KAA0B;AAC7B,UAAI,CAACR,oBAAoB,CAACS,QAArB,CAA8BF,IAA9B,CAAL,EAA0C;AACxC,cAAM,IAAIG,KAAJ,CAAU,sCAAsCH,IAAtC,GAA6C,IAAvD,CAAN;AACD;;AAEDD,MAAAA,OAAO,CAACC,IAAD,CAAP,GAAgBC,KAAhB;AAEAZ,MAAAA,GAAG,CAACe,IAAJ,CAAS;AACPC,QAAAA,MAAM,EAAE;AACNL,UAAAA,IADM;AAENC,UAAAA;AAFM,SADD;AAKPK,QAAAA,gBAAgB,EAAEP;AALX,OAAT,EAMG,uBANH;AAQA,aAAO,IAAP;AACD;AAjBA,GAJI,CAAP;AAuBD,C","sourcesContent":["// @flow\n\nimport Logger from '../Logger';\n\ntype ProxyControllerType = {|\n HTTP_PROXY: string | null,\n HTTPS_PROXY: string | null,\n NO_PROXY: string | null,\n|};\n\nconst log = Logger.child({\n namespace: 'createProxyController',\n});\n\nconst KNOWN_PROPERTY_NAMES = [\n 'HTTP_PROXY',\n 'HTTPS_PROXY',\n 'NO_PROXY',\n];\n\nexport default (): ProxyControllerType => {\n // eslint-disable-next-line fp/no-proxy\n return new Proxy({\n HTTP_PROXY: null,\n HTTPS_PROXY: null,\n NO_PROXY: null,\n }, {\n set: (subject, name, value) => {\n if (!KNOWN_PROPERTY_NAMES.includes(name)) {\n throw new Error('Cannot set an unmapped property \"' + name + '\".');\n }\n\n subject[name] = value;\n\n log.info({\n change: {\n name,\n value,\n },\n newConfiguration: subject,\n }, 'configuration changed');\n\n return true;\n },\n });\n};\n"],"file":"createProxyController.js"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "createGlobalProxyAgent", {
7
- enumerable: true,
8
- get: function () {
9
- return _createGlobalProxyAgent.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "createProxyController", {
13
- enumerable: true,
14
- get: function () {
15
- return _createProxyController.default;
16
- }
17
- });
18
-
19
- var _createGlobalProxyAgent = _interopRequireDefault(require("./createGlobalProxyAgent"));
20
-
21
- var _createProxyController = _interopRequireDefault(require("./createProxyController"));
22
-
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
- //# sourceMappingURL=index.js.map
@@ -1,4 +0,0 @@
1
- // @flow
2
-
3
- export {default as createGlobalProxyAgent} from './createGlobalProxyAgent';
4
- export {default as createProxyController} from './createProxyController';
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/factories/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;;AACA","sourcesContent":["// @flow\n\nexport {default as createGlobalProxyAgent} from './createGlobalProxyAgent';\nexport {default as createProxyController} from './createProxyController';\n"],"file":"index.js"}
package/dist/index.js DELETED
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "bootstrap", {
7
- enumerable: true,
8
- get: function () {
9
- return _routines.bootstrap;
10
- }
11
- });
12
- Object.defineProperty(exports, "createGlobalProxyAgent", {
13
- enumerable: true,
14
- get: function () {
15
- return _factories.createGlobalProxyAgent;
16
- }
17
- });
18
-
19
- var _routines = require("./routines");
20
-
21
- var _factories = require("./factories");
22
- //# sourceMappingURL=index.js.map
@@ -1,4 +0,0 @@
1
- // @flow
2
-
3
- export {bootstrap} from './routines';
4
- export {createGlobalProxyAgent} from './factories';
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;;AACA","sourcesContent":["// @flow\n\nexport {bootstrap} from './routines';\nexport {createGlobalProxyAgent} from './factories';\n"],"file":"index.js"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _Logger = _interopRequireDefault(require("../Logger"));
9
-
10
- var _factories = require("../factories");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- const log = _Logger.default.child({
15
- namespace: 'bootstrap'
16
- });
17
-
18
- const bootstrap = configurationInput => {
19
- if (global.GLOBAL_AGENT) {
20
- log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');
21
- return false;
22
- }
23
-
24
- global.GLOBAL_AGENT = (0, _factories.createGlobalProxyAgent)(configurationInput);
25
- return true;
26
- };
27
-
28
- var _default = bootstrap;
29
- exports.default = _default;
30
- //# sourceMappingURL=bootstrap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/routines/bootstrap.js"],"names":["log","Logger","child","namespace","configurationInput","global","GLOBAL_AGENT","warn"],"mappings":";;;;;;;AAEA;;AACA;;;;AAOA,MAAMA,GAAG,GAAGC,gBAAOC,KAAP,CAAa;AACvBC,EAAAA,SAAS,EAAE;AADY,CAAb,CAAZ;;kBAIgBC,kB,IAAmE;AACjF,MAAIC,MAAM,CAACC,YAAX,EAAyB;AACvBN,IAAAA,GAAG,CAACO,IAAJ,CAAS,iFAAT;AAEA,WAAO,KAAP;AACD;;AAEDF,EAAAA,MAAM,CAACC,YAAP,GAAsB,uCAAuBF,kBAAvB,CAAtB;AAEA,SAAO,IAAP;AACD,C","sourcesContent":["// @flow\n\nimport Logger from '../Logger';\nimport {\n createGlobalProxyAgent,\n} from '../factories';\nimport type {\n ProxyAgentConfigurationInputType,\n} from '../types';\n\nconst log = Logger.child({\n namespace: 'bootstrap',\n});\n\nexport default (configurationInput?: ProxyAgentConfigurationInputType): boolean => {\n if (global.GLOBAL_AGENT) {\n log.warn('found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored');\n\n return false;\n }\n\n global.GLOBAL_AGENT = createGlobalProxyAgent(configurationInput);\n\n return true;\n};\n"],"file":"bootstrap.js"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "bootstrap", {
7
- enumerable: true,
8
- get: function () {
9
- return _bootstrap.default;
10
- }
11
- });
12
-
13
- var _bootstrap = _interopRequireDefault(require("./bootstrap"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- //# sourceMappingURL=index.js.map
@@ -1,3 +0,0 @@
1
- // @flow
2
-
3
- export {default as bootstrap} from './bootstrap';
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/routines/index.js"],"names":[],"mappings":";;;;;;;;;;;;AAEA","sourcesContent":["// @flow\n\nexport {default as bootstrap} from './bootstrap';\n"],"file":"index.js"}
package/dist/types.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- var _net = require("net");
4
-
5
- var _tls = require("tls");
6
-
7
- var _http = require("http");
8
-
9
- var _https = require("https");
10
- //# sourceMappingURL=types.js.map