global-agent 2.2.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.
- package/.babelrc +23 -0
- package/.editorconfig +9 -0
- package/.eslintignore +1 -0
- package/.eslintrc +27 -0
- package/.github/FUNDING.yml +2 -0
- package/.github/workflows/feature.yaml +32 -0
- package/.github/workflows/main.yaml +31 -0
- package/.gitignore +14 -0
- package/LICENSE +2 -2
- package/README.md +67 -8
- package/package.json +48 -57
- package/src/{Logger.js → Logger.ts} +3 -3
- package/{dist/classes/Agent.js.flow → src/classes/Agent.ts} +121 -39
- package/src/classes/HttpProxyAgent.ts +45 -0
- package/src/classes/HttpsProxyAgent.ts +83 -0
- package/src/classes/index.ts +9 -0
- package/src/{errors.js → errors.ts} +2 -6
- package/src/factories/{createGlobalProxyAgent.js → createGlobalProxyAgent.ts} +36 -50
- package/{dist/factories/createProxyController.js.flow → src/factories/createProxyController.ts} +8 -5
- package/src/factories/index.ts +6 -0
- package/src/index.ts +6 -0
- package/{dist/routines/bootstrap.js.flow → src/routines/bootstrap.ts} +6 -5
- package/src/routines/index.ts +3 -0
- package/src/types.ts +66 -0
- package/src/utilities/{bindHttpMethod.js → bindHttpMethod.ts} +6 -7
- package/src/utilities/index.ts +9 -0
- package/{dist/utilities/isUrlMatchingNoProxy.js.flow → src/utilities/isUrlMatchingNoProxy.ts} +1 -6
- package/src/utilities/parseBoolean.ts +17 -0
- package/src/utilities/{parseProxyUrl.js → parseProxyUrl.ts} +12 -9
- package/test/.eslintrc +10 -0
- package/test/global-agent/factories/createGlobalProxyAgent.ts +760 -0
- package/test/global-agent/factories/createProxyController.ts +37 -0
- package/test/global-agent/utilities/isUrlMatchingNoProxy.ts +62 -0
- package/test/global-agent/utilities/parseProxyUrl.ts +38 -0
- package/tsconfig.json +25 -0
- package/.flowconfig +0 -3
- package/dist/Logger.js +0 -18
- package/dist/Logger.js.flow +0 -10
- package/dist/Logger.js.map +0 -1
- package/dist/classes/Agent.js +0 -174
- package/dist/classes/Agent.js.map +0 -1
- package/dist/classes/HttpProxyAgent.js +0 -33
- package/dist/classes/HttpProxyAgent.js.flow +0 -30
- package/dist/classes/HttpProxyAgent.js.map +0 -1
- package/dist/classes/HttpsProxyAgent.js +0 -53
- package/dist/classes/HttpsProxyAgent.js.flow +0 -54
- package/dist/classes/HttpsProxyAgent.js.map +0 -1
- package/dist/classes/index.js +0 -32
- package/dist/classes/index.js.flow +0 -5
- package/dist/classes/index.js.map +0 -1
- package/dist/errors.js +0 -22
- package/dist/errors.js.flow +0 -15
- package/dist/errors.js.map +0 -1
- package/dist/factories/createGlobalProxyAgent.js +0 -175
- package/dist/factories/createGlobalProxyAgent.js.flow +0 -197
- package/dist/factories/createGlobalProxyAgent.js.map +0 -1
- package/dist/factories/createProxyController.js +0 -45
- package/dist/factories/createProxyController.js.map +0 -1
- package/dist/factories/index.js +0 -24
- package/dist/factories/index.js.flow +0 -4
- package/dist/factories/index.js.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.flow +0 -4
- package/dist/index.js.map +0 -1
- package/dist/routines/bootstrap.js +0 -30
- package/dist/routines/bootstrap.js.map +0 -1
- package/dist/routines/index.js +0 -16
- package/dist/routines/index.js.flow +0 -3
- package/dist/routines/index.js.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.flow +0 -66
- package/dist/types.js.map +0 -1
- package/dist/utilities/bindHttpMethod.js +0 -62
- package/dist/utilities/bindHttpMethod.js.flow +0 -54
- package/dist/utilities/bindHttpMethod.js.map +0 -1
- package/dist/utilities/index.js +0 -32
- package/dist/utilities/index.js.flow +0 -5
- package/dist/utilities/index.js.map +0 -1
- package/dist/utilities/isUrlMatchingNoProxy.js +0 -43
- package/dist/utilities/isUrlMatchingNoProxy.js.map +0 -1
- package/dist/utilities/parseProxyUrl.js +0 -42
- package/dist/utilities/parseProxyUrl.js.flow +0 -36
- package/dist/utilities/parseProxyUrl.js.map +0 -1
- package/src/classes/Agent.js +0 -212
- package/src/classes/HttpProxyAgent.js +0 -30
- package/src/classes/HttpsProxyAgent.js +0 -54
- package/src/classes/index.js +0 -5
- package/src/factories/createProxyController.js +0 -46
- package/src/factories/index.js +0 -4
- package/src/index.js +0 -4
- package/src/routines/bootstrap.js +0 -25
- package/src/routines/index.js +0 -3
- package/src/types.js +0 -66
- package/src/utilities/index.js +0 -5
- package/src/utilities/isUrlMatchingNoProxy.js +0 -37
package/.babelrc
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"test": {
|
|
4
|
+
"plugins": [
|
|
5
|
+
"istanbul"
|
|
6
|
+
]
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
"transform-export-default-name",
|
|
11
|
+
"@babel/transform-flow-strip-types"
|
|
12
|
+
],
|
|
13
|
+
"presets": [
|
|
14
|
+
[
|
|
15
|
+
"@babel/env",
|
|
16
|
+
{
|
|
17
|
+
"targets": {
|
|
18
|
+
"node": "12"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
]
|
|
23
|
+
}
|
package/.editorconfig
ADDED
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/bootstrap.js
|
package/.eslintrc
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"canonical",
|
|
4
|
+
"canonical/node",
|
|
5
|
+
"canonical/typescript"
|
|
6
|
+
],
|
|
7
|
+
"parserOptions": {
|
|
8
|
+
"project": "./tsconfig.json"
|
|
9
|
+
},
|
|
10
|
+
"root": true,
|
|
11
|
+
"rules": {
|
|
12
|
+
"@typescript-eslint/prefer-regexp-exec": 0,
|
|
13
|
+
"class-methods-use-this": 0,
|
|
14
|
+
"fp/no-class": 0,
|
|
15
|
+
"fp/no-events": 0,
|
|
16
|
+
"fp/no-this": 0,
|
|
17
|
+
"import/no-cycle": 0,
|
|
18
|
+
"no-continue": 0,
|
|
19
|
+
"no-restricted-syntax": 0,
|
|
20
|
+
"no-unused-expressions": [
|
|
21
|
+
2,
|
|
22
|
+
{
|
|
23
|
+
"allowTaggedTemplates": true
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
jobs:
|
|
2
|
+
test:
|
|
3
|
+
name: Test
|
|
4
|
+
runs-on: ubuntu-latest
|
|
5
|
+
steps:
|
|
6
|
+
- name: setup repository
|
|
7
|
+
uses: actions/checkout@v3
|
|
8
|
+
with:
|
|
9
|
+
fetch-depth: 0
|
|
10
|
+
- name: setup node.js
|
|
11
|
+
uses: actions/setup-node@v4
|
|
12
|
+
with:
|
|
13
|
+
node-version: '24'
|
|
14
|
+
- name: setup npm
|
|
15
|
+
uses: npm/action-setup@v4
|
|
16
|
+
with:
|
|
17
|
+
version: 10
|
|
18
|
+
- run: npm install
|
|
19
|
+
- run: npm run lint
|
|
20
|
+
- run: npm run test
|
|
21
|
+
- run: npm run build
|
|
22
|
+
timeout-minutes: 10
|
|
23
|
+
name: Test
|
|
24
|
+
on:
|
|
25
|
+
pull_request:
|
|
26
|
+
branches:
|
|
27
|
+
- main
|
|
28
|
+
types:
|
|
29
|
+
- opened
|
|
30
|
+
- synchronize
|
|
31
|
+
- reopened
|
|
32
|
+
- ready_for_review
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
jobs:
|
|
2
|
+
release:
|
|
3
|
+
environment: release
|
|
4
|
+
name: Release
|
|
5
|
+
permissions:
|
|
6
|
+
contents: write
|
|
7
|
+
id-token: write
|
|
8
|
+
issues: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: setup repository
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- name: setup node.js
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: '24'
|
|
20
|
+
- run: npm install
|
|
21
|
+
- run: npm run lint
|
|
22
|
+
- run: npm run test
|
|
23
|
+
- run: npm run build
|
|
24
|
+
- env:
|
|
25
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
run: npx semantic-release
|
|
27
|
+
name: Release
|
|
28
|
+
on:
|
|
29
|
+
push:
|
|
30
|
+
branches:
|
|
31
|
+
- main
|
package/.gitignore
ADDED
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2026, Gajus Kuizinas (https://gajus.com/)
|
|
2
2
|
All rights reserved.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -8,7 +8,7 @@ modification, are permitted provided that the following conditions are met:
|
|
|
8
8
|
* Redistributions in binary form must reproduce the above copyright
|
|
9
9
|
notice, this list of conditions and the following disclaimer in the
|
|
10
10
|
documentation and/or other materials provided with the distribution.
|
|
11
|
-
* Neither the name of the Gajus Kuizinas (
|
|
11
|
+
* Neither the name of the Gajus Kuizinas (https://gajus.com/) nor the
|
|
12
12
|
names of its contributors may be used to endorse or promote products
|
|
13
13
|
derived from this software without specific prior written permission.
|
|
14
14
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# global-agent
|
|
2
2
|
|
|
3
|
-
[](https://gitspo.com/mentions/gajus/global-agent)
|
|
4
|
-
[](https://travis-ci.org/gajus/global-agent)
|
|
5
3
|
[](https://coveralls.io/github/gajus/global-agent)
|
|
6
4
|
[](https://www.npmjs.org/package/global-agent)
|
|
7
5
|
[](https://github.com/gajus/canonical)
|
|
@@ -125,7 +123,7 @@ global.GLOBAL_AGENT.HTTP_PROXY = 'http://127.0.0.1:8002';
|
|
|
125
123
|
|
|
126
124
|
```
|
|
127
125
|
|
|
128
|
-
The first HTTP request is going to use http://127.0.0.1:8001 proxy and the
|
|
126
|
+
The first HTTP request is going to use http://127.0.0.1:8001 proxy and the second request is going to use http://127.0.0.1:8002.
|
|
129
127
|
|
|
130
128
|
All `global-agent` configuration is available under `global.GLOBAL_AGENT` namespace.
|
|
131
129
|
|
|
@@ -167,11 +165,13 @@ Use [`roarr-cli`](https://github.com/gajus/roarr-cli) program to pretty-print th
|
|
|
167
165
|
* @property environmentVariableNamespace Defines namespace of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables. (Default: `GLOBAL_AGENT_`)
|
|
168
166
|
* @property forceGlobalAgent Forces to use `global-agent` HTTP(S) agent even when request was explicitly constructed with another agent. (Default: `true`)
|
|
169
167
|
* @property socketConnectionTimeout Destroys socket if connection is not established within the timeout. (Default: `60000`)
|
|
168
|
+
* @property ca Single CA certificate or an array of CA certificates that is trusted for secure connections to the registry.
|
|
170
169
|
*/
|
|
171
170
|
type ProxyAgentConfigurationInputType = {|
|
|
172
171
|
+environmentVariableNamespace?: string,
|
|
173
172
|
+forceGlobalAgent?: boolean,
|
|
174
173
|
+socketConnectionTimeout?: number,
|
|
174
|
+
+ca?: string[] | string,
|
|
175
175
|
|};
|
|
176
176
|
|
|
177
177
|
(configurationInput: ProxyAgentConfigurationInputType) => ProxyAgentConfigurationType;
|
|
@@ -185,9 +185,9 @@ type ProxyAgentConfigurationInputType = {|
|
|
|
185
185
|
|`GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE`|Defines namespace of `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables.|`GLOBAL_AGENT_`|
|
|
186
186
|
|`GLOBAL_AGENT_FORCE_GLOBAL_AGENT`|Forces to use `global-agent` HTTP(S) agent even when request was explicitly constructed with another agent.|`true`|
|
|
187
187
|
|`GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT`|Destroys socket if connection is not established within the timeout.|`60000`|
|
|
188
|
-
|`${NAMESPACE}
|
|
189
|
-
|`${NAMESPACE}
|
|
190
|
-
|`${NAMESPACE}
|
|
188
|
+
|`${NAMESPACE}HTTP_PROXY`|Sets the initial proxy controller HTTP_PROXY value.|N/A|
|
|
189
|
+
|`${NAMESPACE}HTTPS_PROXY`|Sets the initial proxy controller HTTPS_PROXY value.|N/A|
|
|
190
|
+
|`${NAMESPACE}NO_PROXY`|Sets the initial proxy controller NO_PROXY value.|N/A|
|
|
191
191
|
|
|
192
192
|
### `global.GLOBAL_AGENT`
|
|
193
193
|
|
|
@@ -195,12 +195,71 @@ type ProxyAgentConfigurationInputType = {|
|
|
|
195
195
|
|
|
196
196
|
`global.GLOBAL_AGENT` has the following properties:
|
|
197
197
|
|
|
198
|
-
|Name|Description|
|
|
198
|
+
|Name|Configurable|Description|
|
|
199
199
|
|---|---|---|
|
|
200
200
|
|`HTTP_PROXY`|Yes|Sets HTTP proxy to use.|
|
|
201
201
|
|`HTTPS_PROXY`|Yes|Sets a distinct proxy to use for HTTPS requests.|
|
|
202
202
|
|`NO_PROXY`|Yes|Specifies a pattern of URLs that should be excluded from proxying. See [Exclude URLs](#exclude-urls).|
|
|
203
203
|
|
|
204
|
+
## Certificate Authority (CA)
|
|
205
|
+
|
|
206
|
+
### `addCACertificates`
|
|
207
|
+
This method can be accessed using https to add CA certificates to the global-agent.
|
|
208
|
+
|
|
209
|
+
Uses:
|
|
210
|
+
```js
|
|
211
|
+
if (typeof https.globalAgent.addCACertificates === 'function') {
|
|
212
|
+
//certificate - an array of ca certificates to be added to the global-agent
|
|
213
|
+
https.globalAgent.addCACertificates(certificate);
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Method Definition:
|
|
218
|
+
```js
|
|
219
|
+
/**
|
|
220
|
+
* This method can be used to append new ca certificates to existing ca certificates
|
|
221
|
+
* @param {string[] | string} ca a ca certificate or an array of ca certificates
|
|
222
|
+
*/
|
|
223
|
+
public addCACertificates (ca: string[] | string) {
|
|
224
|
+
if (!ca) {
|
|
225
|
+
log.error('Invalid input ca certificate');
|
|
226
|
+
} else if (this.ca) {
|
|
227
|
+
if (typeof ca === typeof this.ca) {
|
|
228
|
+
// concat valid ca certificates with the existing certificates,
|
|
229
|
+
if (typeof this.ca === 'string') {
|
|
230
|
+
this.ca = this.ca.concat(ca as string);
|
|
231
|
+
} else {
|
|
232
|
+
this.ca = this.ca.concat(ca as string[]);
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
log.error('Input ca certificate type mismatched with existing ca certificate type');
|
|
236
|
+
}
|
|
237
|
+
} else {
|
|
238
|
+
this.ca = ca;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### `clearCACertificates`
|
|
244
|
+
This method can be accessed using https to clear existing CA certificates from global-agent.
|
|
245
|
+
|
|
246
|
+
Uses:
|
|
247
|
+
```js
|
|
248
|
+
if (typeof https.globalAgent.clearCACertificates === 'function') {
|
|
249
|
+
https.globalAgent.clearCACertificates();
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
Method Definition:
|
|
253
|
+
```js
|
|
254
|
+
/**
|
|
255
|
+
* This method clears existing CA Certificates.
|
|
256
|
+
* It sets ca to undefined
|
|
257
|
+
*/
|
|
258
|
+
public clearCACertificates () {
|
|
259
|
+
this.ca = undefined;
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
204
263
|
## Supported libraries
|
|
205
264
|
|
|
206
265
|
`global-agent` works with all libraries that internally use [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback).
|
|
@@ -209,7 +268,7 @@ type ProxyAgentConfigurationInputType = {|
|
|
|
209
268
|
|
|
210
269
|
* [`got`](https://www.npmjs.com/package/got)
|
|
211
270
|
* [`axios`](https://www.npmjs.com/package/axios)
|
|
212
|
-
* [`request`](https://www.npmjs.com/package/
|
|
271
|
+
* [`request`](https://www.npmjs.com/package/request)
|
|
213
272
|
|
|
214
273
|
## FAQ
|
|
215
274
|
|
package/package.json
CHANGED
|
@@ -5,54 +5,61 @@
|
|
|
5
5
|
"url": "http://gajus.com"
|
|
6
6
|
},
|
|
7
7
|
"ava": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
},
|
|
8
|
+
"extensions": [
|
|
9
|
+
"ts"
|
|
10
|
+
],
|
|
13
11
|
"files": [
|
|
14
12
|
"test/global-agent/**/*"
|
|
15
13
|
],
|
|
16
14
|
"require": [
|
|
17
|
-
"
|
|
15
|
+
"ts-node/register/transpile-only"
|
|
18
16
|
]
|
|
19
17
|
},
|
|
20
18
|
"dependencies": {
|
|
21
|
-
"boolean": "^3.0.1",
|
|
22
|
-
"core-js": "^3.6.5",
|
|
23
19
|
"es6-error": "^4.1.1",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
20
|
+
"globalthis": "^1.0.2",
|
|
21
|
+
"matcher": "^4.0.0",
|
|
22
|
+
"omit-undefined": "^1.0.1",
|
|
23
|
+
"roarr": "^7.0.3",
|
|
24
|
+
"semver": "^7.3.5",
|
|
25
|
+
"serialize-error": "^8.1.0"
|
|
28
26
|
},
|
|
29
27
|
"description": "Global HTTP/HTTPS proxy configurable using environment variables.",
|
|
30
28
|
"devDependencies": {
|
|
31
|
-
"@ava/babel": "^
|
|
32
|
-
"@babel/cli": "^7.
|
|
33
|
-
"@babel/core": "^7.
|
|
34
|
-
"@babel/node": "^7.
|
|
35
|
-
"@babel/plugin-transform-flow-strip-types": "^7.
|
|
36
|
-
"@babel/preset-env": "^7.
|
|
37
|
-
"@babel/register": "^7.
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
29
|
+
"@ava/babel": "^2.0.0",
|
|
30
|
+
"@babel/cli": "^7.14.8",
|
|
31
|
+
"@babel/core": "^7.14.8",
|
|
32
|
+
"@babel/node": "^7.14.7",
|
|
33
|
+
"@babel/plugin-transform-flow-strip-types": "^7.14.5",
|
|
34
|
+
"@babel/preset-env": "^7.14.8",
|
|
35
|
+
"@babel/register": "^7.14.5",
|
|
36
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
37
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
38
|
+
"@semantic-release/github": "^12.0.3",
|
|
39
|
+
"@semantic-release/npm": "^13.1.3",
|
|
40
|
+
"@types/globalthis": "^1.0.1",
|
|
41
|
+
"@types/pem": "^1.14.4",
|
|
42
|
+
"@types/request": "^2.48.6",
|
|
43
|
+
"@types/semver": "^7.3.8",
|
|
44
|
+
"@types/sinon": "^10.0.2",
|
|
45
|
+
"ava": "^3.15.0",
|
|
46
|
+
"axios": "^0.21.1",
|
|
41
47
|
"babel-plugin-istanbul": "^6.0.0",
|
|
42
|
-
"babel-plugin-transform-export-default-name": "^2.0
|
|
43
|
-
"coveralls": "^3.1.
|
|
44
|
-
"
|
|
45
|
-
"eslint
|
|
46
|
-
"
|
|
47
|
-
"flow-copy-source": "^2.0.9",
|
|
48
|
+
"babel-plugin-transform-export-default-name": "^2.1.0",
|
|
49
|
+
"coveralls": "^3.1.1",
|
|
50
|
+
"del-cli": "^4.0.1",
|
|
51
|
+
"eslint": "^7.31.0",
|
|
52
|
+
"eslint-config-canonical": "^26.2.3",
|
|
48
53
|
"get-port": "^5.1.1",
|
|
49
|
-
"got": "^11.
|
|
50
|
-
"husky": "^
|
|
54
|
+
"got": "^11.8.2",
|
|
55
|
+
"husky": "^7.0.1",
|
|
51
56
|
"nyc": "^15.1.0",
|
|
52
57
|
"pem": "^1.14.4",
|
|
53
58
|
"request": "^2.88.2",
|
|
54
|
-
"semantic-release": "^
|
|
55
|
-
"sinon": "^
|
|
59
|
+
"semantic-release": "^25.0.3",
|
|
60
|
+
"sinon": "^11.1.2",
|
|
61
|
+
"ts-node": "^10.1.0",
|
|
62
|
+
"typescript": "^4.3.5"
|
|
56
63
|
},
|
|
57
64
|
"engines": {
|
|
58
65
|
"node": ">=10.0"
|
|
@@ -69,38 +76,22 @@
|
|
|
69
76
|
"agent"
|
|
70
77
|
],
|
|
71
78
|
"license": "BSD-3-Clause",
|
|
72
|
-
"main": "./dist/index.js",
|
|
79
|
+
"main": "./dist/src/index.js",
|
|
73
80
|
"name": "global-agent",
|
|
74
81
|
"nyc": {
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"src/bin",
|
|
78
|
-
"src/queries/*.js"
|
|
79
|
-
],
|
|
80
|
-
"include": [
|
|
81
|
-
"src/**/*.js"
|
|
82
|
-
],
|
|
83
|
-
"instrument": false,
|
|
84
|
-
"reporter": [
|
|
85
|
-
"html",
|
|
86
|
-
"text-summary"
|
|
87
|
-
],
|
|
88
|
-
"require": [
|
|
89
|
-
"@babel/register"
|
|
90
|
-
],
|
|
91
|
-
"silent": true,
|
|
92
|
-
"sourceMap": false
|
|
82
|
+
"extends": "@istanbuljs/nyc-config-typescript",
|
|
83
|
+
"all": true
|
|
93
84
|
},
|
|
94
85
|
"repository": {
|
|
95
86
|
"type": "git",
|
|
96
87
|
"url": "https://github.com/gajus/global-agent"
|
|
97
88
|
},
|
|
98
89
|
"scripts": {
|
|
99
|
-
"build": "
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"test": "NODE_TLS_REJECT_UNAUTHORIZED=false NODE_ENV=test nyc ava --verbose --serial"
|
|
90
|
+
"build": "del-cli ./dist && tsc",
|
|
91
|
+
"lint": "eslint ./src ./test && tsc",
|
|
92
|
+
"test": "ava --verbose --serial",
|
|
93
|
+
"create-readme": "gitdown ./.README/README.md --output-file ./README.md"
|
|
104
94
|
},
|
|
105
|
-
"
|
|
95
|
+
"typings": "./dist/src/index.d.ts",
|
|
96
|
+
"version": "4.0.0"
|
|
106
97
|
}
|