urllib 3.12.0 → 3.13.1
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/README.md +8 -8
- package/package.json +6 -6
- package/src/HttpAgent.ts +2 -2
- package/src/HttpClient.ts +16 -14
- package/src/Request.ts +2 -2
- package/src/Response.ts +2 -2
- package/src/cjs/HttpAgent.d.ts +1 -1
- package/src/cjs/HttpAgent.js +11 -21
- package/src/cjs/HttpAgent.js.map +1 -1
- package/src/cjs/HttpClient.d.ts +2 -2
- package/src/cjs/HttpClient.js +439 -448
- package/src/cjs/HttpClient.js.map +1 -1
- package/src/cjs/Request.d.ts +2 -2
- package/src/cjs/Response.d.ts +2 -2
- package/src/cjs/diagnosticsChannel.js +11 -11
- package/src/cjs/diagnosticsChannel.js.map +1 -1
- package/src/cjs/utils.js +8 -8
- package/src/cjs/utils.js.map +1 -1
- package/src/diagnosticsChannel.ts +3 -3
- package/src/esm/HttpAgent.d.ts +1 -1
- package/src/esm/HttpAgent.js +9 -19
- package/src/esm/HttpAgent.js.map +1 -1
- package/src/esm/HttpClient.d.ts +2 -2
- package/src/esm/HttpClient.js +434 -443
- package/src/esm/HttpClient.js.map +1 -1
- package/src/esm/Request.d.ts +2 -2
- package/src/esm/Response.d.ts +2 -2
- package/src/esm/diagnosticsChannel.js +3 -3
- package/src/esm/diagnosticsChannel.js.map +1 -1
- package/src/esm/utils.js +3 -3
- package/src/esm/utils.js.map +1 -1
- package/src/utils.ts +3 -3
package/README.md
CHANGED
@@ -332,14 +332,14 @@ Fork [undici benchmarks script](https://github.com/fengmk2/undici/blob/urllib-be
|
|
332
332
|
|
333
333
|
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/288288?v=4" width="100px;"/><br/><sub><b>xingrz</b></sub>](https://github.com/xingrz)<br/>|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src="https://avatars.githubusercontent.com/u/327019?v=4" width="100px;"/><br/><sub><b>JacksonTian</b></sub>](https://github.com/JacksonTian)<br/>|[<img src="https://avatars.githubusercontent.com/u/543405?v=4" width="100px;"/><br/><sub><b>ibigbug</b></sub>](https://github.com/ibigbug)<br/>|
|
334
334
|
| :---: | :---: | :---: | :---: | :---: | :---: |
|
335
|
-
|[<img src="https://avatars.githubusercontent.com/u/14790466?v=4" width="100px;"/><br/><sub><b>greenkeeperio-bot</b></sub>](https://github.com/greenkeeperio-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/
|
336
|
-
|[<img src="https://avatars.githubusercontent.com/u/
|
337
|
-
|[<img src="https://avatars.githubusercontent.com/u/
|
338
|
-
|[<img src="https://avatars.githubusercontent.com/u/
|
339
|
-
|[<img src="https://avatars.githubusercontent.com/
|
340
|
-
[<img src="https://avatars.githubusercontent.com/u/17476119?v=4" width="100px;"/><br/><sub><b>mars-coder</b></sub>](https://github.com/mars-coder)<br/>|[<img src="https://avatars.githubusercontent.com/u/929179?v=4" width="100px;"/><br/><sub><b>rockdai</b></sub>](https://github.com/rockdai)<br/>|[<img src="https://avatars.githubusercontent.com/u/2196373?v=4" width="100px;"/><br/><sub><b>dickeylth</b></sub>](https://github.com/dickeylth)<br/>|[<img src="https://avatars.githubusercontent.com/u/13050025?v=4" width="100px;"/><br/><sub><b>aladdin-add</b></sub>](https://github.com/aladdin-add)<br/>
|
341
|
-
|
342
|
-
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat
|
335
|
+
|[<img src="https://avatars.githubusercontent.com/u/14790466?v=4" width="100px;"/><br/><sub><b>greenkeeperio-bot</b></sub>](https://github.com/greenkeeperio-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/227713?v=4" width="100px;"/><br/><sub><b>atian25</b></sub>](https://github.com/atian25)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|[<img src="https://avatars.githubusercontent.com/u/5381764?v=4" width="100px;"/><br/><sub><b>paambaati</b></sub>](https://github.com/paambaati)<br/>|[<img src="https://avatars.githubusercontent.com/u/1433247?v=4" width="100px;"/><br/><sub><b>denghongcai</b></sub>](https://github.com/denghongcai)<br/>|
|
336
|
+
|[<img src="https://avatars.githubusercontent.com/u/4635838?v=4" width="100px;"/><br/><sub><b>gemwuu</b></sub>](https://github.com/gemwuu)<br/>|[<img src="https://avatars.githubusercontent.com/u/2842176?v=4" width="100px;"/><br/><sub><b>XadillaX</b></sub>](https://github.com/XadillaX)<br/>|[<img src="https://avatars.githubusercontent.com/u/1147375?v=4" width="100px;"/><br/><sub><b>alsotang</b></sub>](https://github.com/alsotang)<br/>|[<img src="https://avatars.githubusercontent.com/u/546535?v=4" width="100px;"/><br/><sub><b>leoner</b></sub>](https://github.com/leoner)<br/>|[<img src="https://avatars.githubusercontent.com/u/19908330?v=4" width="100px;"/><br/><sub><b>hyj1991</b></sub>](https://github.com/hyj1991)<br/>|[<img src="https://avatars.githubusercontent.com/u/1747852?v=4" width="100px;"/><br/><sub><b>isayme</b></sub>](https://github.com/isayme)<br/>|
|
337
|
+
|[<img src="https://avatars.githubusercontent.com/u/252317?v=4" width="100px;"/><br/><sub><b>cyjake</b></sub>](https://github.com/cyjake)<br/>|[<img src="https://avatars.githubusercontent.com/u/5856440?v=4" width="100px;"/><br/><sub><b>whxaxes</b></sub>](https://github.com/whxaxes)<br/>|[<img src="https://avatars.githubusercontent.com/u/309219?v=4" width="100px;"/><br/><sub><b>chadxz</b></sub>](https://github.com/chadxz)<br/>|[<img src="https://avatars.githubusercontent.com/u/2055702?v=4" width="100px;"/><br/><sub><b>adapt0</b></sub>](https://github.com/adapt0)<br/>|[<img src="https://avatars.githubusercontent.com/u/5139554?v=4" width="100px;"/><br/><sub><b>danielwpz</b></sub>](https://github.com/danielwpz)<br/>|[<img src="https://avatars.githubusercontent.com/u/5127897?v=4" width="100px;"/><br/><sub><b>danielsss</b></sub>](https://github.com/danielsss)<br/>|
|
338
|
+
|[<img src="https://avatars.githubusercontent.com/u/3367820?v=4" width="100px;"/><br/><sub><b>Jeff-Tian</b></sub>](https://github.com/Jeff-Tian)<br/>|[<img src="https://avatars.githubusercontent.com/u/17075261?v=4" width="100px;"/><br/><sub><b>nick-ng</b></sub>](https://github.com/nick-ng)<br/>|[<img src="https://avatars.githubusercontent.com/u/1706595?v=4" width="100px;"/><br/><sub><b>rishavsharan</b></sub>](https://github.com/rishavsharan)<br/>|[<img src="https://avatars.githubusercontent.com/u/1886161?v=4" width="100px;"/><br/><sub><b>willizm</b></sub>](https://github.com/willizm)<br/>|[<img src="https://avatars.githubusercontent.com/u/7227589?v=4" width="100px;"/><br/><sub><b>davidkhala</b></sub>](https://github.com/davidkhala)<br/>|[<img src="https://avatars.githubusercontent.com/u/535479?v=4" width="100px;"/><br/><sub><b>aleafs</b></sub>](https://github.com/aleafs)<br/>|
|
339
|
+
|[<img src="https://avatars.githubusercontent.com/u/3689968?v=4" width="100px;"/><br/><sub><b>Amunu</b></sub>](https://github.com/Amunu)<br/>|[<img src="https://avatars.githubusercontent.com/in/9426?v=4" width="100px;"/><br/><sub><b>azure-pipelines[bot]</b></sub>](https://github.com/apps/azure-pipelines)<br/>|[<img src="https://avatars.githubusercontent.com/u/108602490?v=4" width="100px;"/><br/><sub><b>capsice</b></sub>](https://github.com/capsice)<br/>|[<img src="https://avatars.githubusercontent.com/u/1281323?v=4" width="100px;"/><br/><sub><b>changzhiwin</b></sub>](https://github.com/changzhiwin)<br/>|[<img src="https://avatars.githubusercontent.com/u/929503?v=4" width="100px;"/><br/><sub><b>yuzhigang33</b></sub>](https://github.com/yuzhigang33)<br/>|[<img src="https://avatars.githubusercontent.com/u/5574625?v=4" width="100px;"/><br/><sub><b>elrrrrrrr</b></sub>](https://github.com/elrrrrrrr)<br/>|
|
340
|
+
[<img src="https://avatars.githubusercontent.com/u/981128?v=4" width="100px;"/><br/><sub><b>fishbar</b></sub>](https://github.com/fishbar)<br/>|[<img src="https://avatars.githubusercontent.com/u/1207064?v=4" width="100px;"/><br/><sub><b>gxcsoccer</b></sub>](https://github.com/gxcsoccer)<br/>|[<img src="https://avatars.githubusercontent.com/u/17476119?v=4" width="100px;"/><br/><sub><b>mars-coder</b></sub>](https://github.com/mars-coder)<br/>|[<img src="https://avatars.githubusercontent.com/u/929179?v=4" width="100px;"/><br/><sub><b>rockdai</b></sub>](https://github.com/rockdai)<br/>|[<img src="https://avatars.githubusercontent.com/u/2196373?v=4" width="100px;"/><br/><sub><b>dickeylth</b></sub>](https://github.com/dickeylth)<br/>|[<img src="https://avatars.githubusercontent.com/u/13050025?v=4" width="100px;"/><br/><sub><b>aladdin-add</b></sub>](https://github.com/aladdin-add)<br/>
|
341
|
+
|
342
|
+
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Mar 25 2023 22:00:34 GMT+0800`.
|
343
343
|
|
344
344
|
<!-- GITCONTRIBUTOR_END -->
|
345
345
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "urllib",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.13.1",
|
4
4
|
"publishConfig": {
|
5
5
|
"tag": "latest"
|
6
6
|
},
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"url": "git://github.com/node-modules/urllib.git"
|
42
42
|
},
|
43
43
|
"scripts": {
|
44
|
-
"lint": "eslint src --ext .ts",
|
44
|
+
"lint": "eslint src test --ext .ts --cache",
|
45
45
|
"build": "npm run build:dist",
|
46
46
|
"build:cjs": "tsc -p ./tsconfig.build.cjs.json",
|
47
47
|
"build:esm": "tsc -p ./tsconfig.build.esm.json && node ./scripts/esm_import_fix.js",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"build:esm:test": "cd test/esm && rm -rf node_modules && npm link ../.. && node index.js",
|
51
51
|
"build:test": "npm run build && npm run build:cjs:test && npm run build:esm:test && npm run test-tsc",
|
52
52
|
"test-tsc": "tsc -p ./test/fixtures/ts/tsconfig.json",
|
53
|
-
"test": "vitest run",
|
53
|
+
"test": "npm run lint && vitest run",
|
54
54
|
"cov": "vitest run --coverage --no-threads",
|
55
55
|
"ci": "npm run lint && npm run cov && npm run build:test",
|
56
56
|
"contributor": "git-contributor",
|
@@ -74,7 +74,7 @@
|
|
74
74
|
"@types/pump": "^1.1.1",
|
75
75
|
"@types/selfsigned": "^2.0.1",
|
76
76
|
"@types/tar-stream": "^2.2.2",
|
77
|
-
"@vitest/coverage-c8": "^0.
|
77
|
+
"@vitest/coverage-c8": "^0.29.7",
|
78
78
|
"busboy": "^1.6.0",
|
79
79
|
"eslint": "^8.25.0",
|
80
80
|
"eslint-config-egg": "^12.1.0",
|
@@ -84,10 +84,10 @@
|
|
84
84
|
"selfsigned": "^2.0.1",
|
85
85
|
"tar-stream": "^2.2.0",
|
86
86
|
"typescript": "^4.8.3",
|
87
|
-
"vitest": "^0.
|
87
|
+
"vitest": "^0.29.7"
|
88
88
|
},
|
89
89
|
"engines": {
|
90
|
-
"node": ">= 14.
|
90
|
+
"node": ">= 14.19.3"
|
91
91
|
},
|
92
92
|
"license": "MIT"
|
93
93
|
}
|
package/src/HttpAgent.ts
CHANGED
package/src/HttpClient.ts
CHANGED
@@ -1,20 +1,21 @@
|
|
1
|
-
import { EventEmitter } from 'events';
|
2
|
-
import { LookupFunction } from 'net';
|
3
|
-
import { STATUS_CODES } from 'http';
|
4
|
-
import {
|
1
|
+
import { EventEmitter } from 'node:events';
|
2
|
+
import { LookupFunction } from 'node:net';
|
3
|
+
import { STATUS_CODES } from 'node:http';
|
4
|
+
import type { IncomingHttpHeaders } from 'node:http';
|
5
|
+
import { debuglog } from 'node:util';
|
5
6
|
import {
|
6
7
|
createGunzip,
|
7
8
|
createBrotliDecompress,
|
8
9
|
gunzipSync,
|
9
10
|
brotliDecompressSync,
|
10
|
-
} from 'zlib';
|
11
|
-
import { Blob } from 'buffer';
|
12
|
-
import { Readable, pipeline } from 'stream';
|
13
|
-
import stream from 'stream';
|
14
|
-
import { basename } from 'path';
|
15
|
-
import { createReadStream } from 'fs';
|
16
|
-
import { format as urlFormat } from 'url';
|
17
|
-
import { performance } from 'perf_hooks';
|
11
|
+
} from 'node:zlib';
|
12
|
+
import { Blob } from 'node:buffer';
|
13
|
+
import { Readable, pipeline } from 'node:stream';
|
14
|
+
import stream from 'node:stream';
|
15
|
+
import { basename } from 'node:path';
|
16
|
+
import { createReadStream } from 'node:fs';
|
17
|
+
import { format as urlFormat } from 'node:url';
|
18
|
+
import { performance } from 'node:perf_hooks';
|
18
19
|
import {
|
19
20
|
FormData as FormDataNative,
|
20
21
|
request as undiciRequest,
|
@@ -33,7 +34,6 @@ import { RawResponseWithMeta, HttpClientResponse, SocketInfo } from './Response'
|
|
33
34
|
import { parseJSON, sleep, digestAuthHeader, globalId, performanceTime, isReadable } from './utils';
|
34
35
|
import symbols from './symbols';
|
35
36
|
import { initDiagnosticsChannel } from './diagnosticsChannel';
|
36
|
-
import type { IncomingHttpHeaders } from 'http';
|
37
37
|
|
38
38
|
type Exists<T> = T extends undefined ? never : T;
|
39
39
|
type UndiciRequestOption = Exists<Parameters<typeof undiciRequest>[1]>;
|
@@ -409,7 +409,9 @@ export class HttpClient extends EventEmitter {
|
|
409
409
|
if (isGETOrHEAD) {
|
410
410
|
if (!isStringOrBufferOrReadable) {
|
411
411
|
for (const field in args.data) {
|
412
|
-
|
412
|
+
const fieldValue = args.data[field];
|
413
|
+
if (fieldValue === undefined) continue;
|
414
|
+
requestUrl.searchParams.append(field, fieldValue);
|
413
415
|
}
|
414
416
|
}
|
415
417
|
} else {
|
package/src/Request.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Readable, Writable } from 'stream';
|
2
|
-
import type { IncomingHttpHeaders } from 'http';
|
1
|
+
import { Readable, Writable } from 'node:stream';
|
2
|
+
import type { IncomingHttpHeaders } from 'node:http';
|
3
3
|
import type Dispatcher from 'undici/types/dispatcher';
|
4
4
|
import type {
|
5
5
|
HttpClientResponse,
|
package/src/Response.ts
CHANGED
package/src/cjs/HttpAgent.d.ts
CHANGED
package/src/cjs/HttpAgent.js
CHANGED
@@ -1,25 +1,16 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
7
|
-
};
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
12
|
-
};
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
4
|
};
|
16
|
-
var _HttpAgent_checkAddress;
|
17
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18
6
|
exports.HttpAgent = void 0;
|
19
|
-
const
|
20
|
-
const
|
7
|
+
const node_dns_1 = __importDefault(require("node:dns"));
|
8
|
+
const node_net_1 = require("node:net");
|
21
9
|
const undici_1 = require("undici");
|
22
10
|
class IllegalAddressError extends Error {
|
11
|
+
hostname;
|
12
|
+
ip;
|
13
|
+
family;
|
23
14
|
constructor(hostname, ip, family) {
|
24
15
|
const message = 'illegal address';
|
25
16
|
super(message);
|
@@ -31,9 +22,10 @@ class IllegalAddressError extends Error {
|
|
31
22
|
}
|
32
23
|
}
|
33
24
|
class HttpAgent extends undici_1.Agent {
|
25
|
+
#checkAddress;
|
34
26
|
constructor(options) {
|
35
27
|
/* eslint node/prefer-promises/dns: off*/
|
36
|
-
const _lookup = options.lookup ??
|
28
|
+
const _lookup = options.lookup ?? node_dns_1.default.lookup;
|
37
29
|
const lookup = (hostname, dnsOptions, callback) => {
|
38
30
|
_lookup(hostname, dnsOptions, (err, address, family) => {
|
39
31
|
if (err)
|
@@ -47,21 +39,20 @@ class HttpAgent extends undici_1.Agent {
|
|
47
39
|
super({
|
48
40
|
connect: { ...options.connect, lookup },
|
49
41
|
});
|
50
|
-
|
51
|
-
__classPrivateFieldSet(this, _HttpAgent_checkAddress, options.checkAddress, "f");
|
42
|
+
this.#checkAddress = options.checkAddress;
|
52
43
|
}
|
53
44
|
dispatch(options, handler) {
|
54
|
-
if (
|
45
|
+
if (this.#checkAddress && options.origin) {
|
55
46
|
const originUrl = typeof options.origin === 'string' ? new URL(options.origin) : options.origin;
|
56
47
|
let hostname = originUrl.hostname;
|
57
48
|
// [2001:db8:2de::e13] => 2001:db8:2de::e13
|
58
49
|
if (hostname.startsWith('[') && hostname.endsWith(']')) {
|
59
50
|
hostname = hostname.substring(1, hostname.length - 1);
|
60
51
|
}
|
61
|
-
const family = (0,
|
52
|
+
const family = (0, node_net_1.isIP)(hostname);
|
62
53
|
if (family === 4 || family === 6) {
|
63
54
|
// if request hostname is ip, custom lookup won't excute
|
64
|
-
if (!
|
55
|
+
if (!this.#checkAddress(hostname, family)) {
|
65
56
|
throw new IllegalAddressError(hostname, hostname, family);
|
66
57
|
}
|
67
58
|
}
|
@@ -70,5 +61,4 @@ class HttpAgent extends undici_1.Agent {
|
|
70
61
|
}
|
71
62
|
}
|
72
63
|
exports.HttpAgent = HttpAgent;
|
73
|
-
_HttpAgent_checkAddress = new WeakMap();
|
74
64
|
//# sourceMappingURL=HttpAgent.js.map
|
package/src/cjs/HttpAgent.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HttpAgent.js","sourceRoot":"","sources":["../HttpAgent.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"HttpAgent.js","sourceRoot":"","sources":["../HttpAgent.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA2B;AAC3B,uCAAgD;AAChD,mCAEgB;AAYhB,MAAM,mBAAoB,SAAQ,KAAK;IACrC,QAAQ,CAAS;IACjB,EAAE,CAAS;IACX,MAAM,CAAS;IAEf,YAAY,QAAgB,EAAE,EAAU,EAAE,MAAc;QACtD,MAAM,OAAO,GAAG,iBAAiB,CAAC;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;CACF;AAED,MAAa,SAAU,SAAQ,cAAK;IAClC,aAAa,CAAwB;IAErC,YAAY,OAAyB;QACnC,yCAAyC;QACzC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,kBAAG,CAAC,MAAM,CAAC;QAC7C,MAAM,MAAM,GAAmB,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;YAChE,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrD,IAAI,GAAG;oBAAE,OAAO,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC/C,IAAI,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;oBAClE,GAAG,GAAG,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;iBAC1D;gBACD,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QACF,KAAK,CAAC;YACJ,OAAO,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE;SACxC,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED,QAAQ,CAAC,OAA8B,EAAE,OAAoC;QAC3E,IAAI,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,MAAM,EAAE;YACxC,MAAM,SAAS,GAAG,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;YAChG,IAAI,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YAClC,2CAA2C;YAC3C,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACtD,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;aACvD;YACD,MAAM,MAAM,GAAG,IAAA,eAAI,EAAC,QAAQ,CAAC,CAAC;YAC9B,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,EAAE;gBAChC,wDAAwD;gBACxD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;oBACzC,MAAM,IAAI,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;iBAC3D;aACF;SACF;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAvCD,8BAuCC"}
|
package/src/cjs/HttpClient.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
3
|
/// <reference types="node" />
|
4
|
-
import { EventEmitter } from 'events';
|
5
|
-
import { LookupFunction } from 'net';
|
4
|
+
import { EventEmitter } from 'node:events';
|
5
|
+
import { LookupFunction } from 'node:net';
|
6
6
|
import { CheckAddressFunction } from './HttpAgent';
|
7
7
|
import { RequestURL, RequestOptions } from './Request';
|
8
8
|
import { HttpClientResponse } from './Response';
|