deepv-code 1.0.182 → 1.0.185
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/bundle/dvcode.js +757 -753
- package/package.json +1 -1
- package/bundle/assets/help/README.md +0 -113
- package/bundle/assets/sounds/README.md +0 -74
- package/bundle/node_modules/undici/LICENSE +0 -21
- package/bundle/node_modules/undici/README.md +0 -472
- package/bundle/node_modules/undici/docs/docs/api/Agent.md +0 -83
- package/bundle/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
- package/bundle/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
- package/bundle/node_modules/undici/docs/docs/api/CacheStore.md +0 -151
- package/bundle/node_modules/undici/docs/docs/api/Client.md +0 -281
- package/bundle/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
- package/bundle/node_modules/undici/docs/docs/api/Connector.md +0 -115
- package/bundle/node_modules/undici/docs/docs/api/ContentType.md +0 -57
- package/bundle/node_modules/undici/docs/docs/api/Cookies.md +0 -101
- package/bundle/node_modules/undici/docs/docs/api/Debug.md +0 -62
- package/bundle/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -204
- package/bundle/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1200
- package/bundle/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
- package/bundle/node_modules/undici/docs/docs/api/Errors.md +0 -49
- package/bundle/node_modules/undici/docs/docs/api/EventSource.md +0 -45
- package/bundle/node_modules/undici/docs/docs/api/Fetch.md +0 -52
- package/bundle/node_modules/undici/docs/docs/api/H2CClient.md +0 -262
- package/bundle/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
- package/bundle/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
- package/bundle/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
- package/bundle/node_modules/undici/docs/docs/api/MockClient.md +0 -77
- package/bundle/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
- package/bundle/node_modules/undici/docs/docs/api/MockPool.md +0 -548
- package/bundle/node_modules/undici/docs/docs/api/Pool.md +0 -84
- package/bundle/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
- package/bundle/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -227
- package/bundle/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -96
- package/bundle/node_modules/undici/docs/docs/api/RetryAgent.md +0 -45
- package/bundle/node_modules/undici/docs/docs/api/RetryHandler.md +0 -117
- package/bundle/node_modules/undici/docs/docs/api/Util.md +0 -25
- package/bundle/node_modules/undici/docs/docs/api/WebSocket.md +0 -85
- package/bundle/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
- package/bundle/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
- package/bundle/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
- package/bundle/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
- package/bundle/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -20
- package/bundle/node_modules/undici/index-fetch.js +0 -35
- package/bundle/node_modules/undici/index.d.ts +0 -3
- package/bundle/node_modules/undici/index.js +0 -183
- package/bundle/node_modules/undici/lib/api/abort-signal.js +0 -59
- package/bundle/node_modules/undici/lib/api/api-connect.js +0 -110
- package/bundle/node_modules/undici/lib/api/api-pipeline.js +0 -252
- package/bundle/node_modules/undici/lib/api/api-request.js +0 -199
- package/bundle/node_modules/undici/lib/api/api-stream.js +0 -209
- package/bundle/node_modules/undici/lib/api/api-upgrade.js +0 -110
- package/bundle/node_modules/undici/lib/api/index.js +0 -7
- package/bundle/node_modules/undici/lib/api/readable.js +0 -558
- package/bundle/node_modules/undici/lib/api/util.js +0 -95
- package/bundle/node_modules/undici/lib/cache/memory-cache-store.js +0 -234
- package/bundle/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -461
- package/bundle/node_modules/undici/lib/core/connect.js +0 -164
- package/bundle/node_modules/undici/lib/core/constants.js +0 -143
- package/bundle/node_modules/undici/lib/core/diagnostics.js +0 -196
- package/bundle/node_modules/undici/lib/core/errors.js +0 -244
- package/bundle/node_modules/undici/lib/core/request.js +0 -397
- package/bundle/node_modules/undici/lib/core/symbols.js +0 -68
- package/bundle/node_modules/undici/lib/core/tree.js +0 -160
- package/bundle/node_modules/undici/lib/core/util.js +0 -988
- package/bundle/node_modules/undici/lib/dispatcher/agent.js +0 -135
- package/bundle/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -206
- package/bundle/node_modules/undici/lib/dispatcher/client-h1.js +0 -1615
- package/bundle/node_modules/undici/lib/dispatcher/client-h2.js +0 -798
- package/bundle/node_modules/undici/lib/dispatcher/client.js +0 -614
- package/bundle/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -161
- package/bundle/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
- package/bundle/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -151
- package/bundle/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -159
- package/bundle/node_modules/undici/lib/dispatcher/h2c-client.js +0 -122
- package/bundle/node_modules/undici/lib/dispatcher/pool-base.js +0 -191
- package/bundle/node_modules/undici/lib/dispatcher/pool.js +0 -118
- package/bundle/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -275
- package/bundle/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
- package/bundle/node_modules/undici/lib/global.js +0 -32
- package/bundle/node_modules/undici/lib/handler/cache-handler.js +0 -448
- package/bundle/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
- package/bundle/node_modules/undici/lib/handler/decorator-handler.js +0 -67
- package/bundle/node_modules/undici/lib/handler/redirect-handler.js +0 -227
- package/bundle/node_modules/undici/lib/handler/retry-handler.js +0 -342
- package/bundle/node_modules/undici/lib/handler/unwrap-handler.js +0 -96
- package/bundle/node_modules/undici/lib/handler/wrap-handler.js +0 -95
- package/bundle/node_modules/undici/lib/interceptor/cache.js +0 -372
- package/bundle/node_modules/undici/lib/interceptor/dns.js +0 -432
- package/bundle/node_modules/undici/lib/interceptor/dump.js +0 -111
- package/bundle/node_modules/undici/lib/interceptor/redirect.js +0 -21
- package/bundle/node_modules/undici/lib/interceptor/response-error.js +0 -95
- package/bundle/node_modules/undici/lib/interceptor/retry.js +0 -19
- package/bundle/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/bundle/node_modules/undici/lib/llhttp/constants.d.ts +0 -97
- package/bundle/node_modules/undici/lib/llhttp/constants.js +0 -498
- package/bundle/node_modules/undici/lib/llhttp/constants.js.map +0 -1
- package/bundle/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
- package/bundle/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
- package/bundle/node_modules/undici/lib/llhttp/utils.d.ts +0 -2
- package/bundle/node_modules/undici/lib/llhttp/utils.js +0 -15
- package/bundle/node_modules/undici/lib/llhttp/utils.js.map +0 -1
- package/bundle/node_modules/undici/lib/mock/mock-agent.js +0 -224
- package/bundle/node_modules/undici/lib/mock/mock-call-history.js +0 -248
- package/bundle/node_modules/undici/lib/mock/mock-client.js +0 -64
- package/bundle/node_modules/undici/lib/mock/mock-errors.js +0 -19
- package/bundle/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
- package/bundle/node_modules/undici/lib/mock/mock-pool.js +0 -64
- package/bundle/node_modules/undici/lib/mock/mock-symbols.js +0 -31
- package/bundle/node_modules/undici/lib/mock/mock-utils.js +0 -433
- package/bundle/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
- package/bundle/node_modules/undici/lib/util/cache.js +0 -368
- package/bundle/node_modules/undici/lib/util/date.js +0 -259
- package/bundle/node_modules/undici/lib/util/stats.js +0 -32
- package/bundle/node_modules/undici/lib/util/timers.js +0 -423
- package/bundle/node_modules/undici/lib/web/cache/cache.js +0 -862
- package/bundle/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
- package/bundle/node_modules/undici/lib/web/cache/util.js +0 -45
- package/bundle/node_modules/undici/lib/web/cookies/constants.js +0 -12
- package/bundle/node_modules/undici/lib/web/cookies/index.js +0 -199
- package/bundle/node_modules/undici/lib/web/cookies/parse.js +0 -322
- package/bundle/node_modules/undici/lib/web/cookies/util.js +0 -282
- package/bundle/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
- package/bundle/node_modules/undici/lib/web/eventsource/eventsource.js +0 -484
- package/bundle/node_modules/undici/lib/web/eventsource/util.js +0 -37
- package/bundle/node_modules/undici/lib/web/fetch/LICENSE +0 -21
- package/bundle/node_modules/undici/lib/web/fetch/body.js +0 -532
- package/bundle/node_modules/undici/lib/web/fetch/constants.js +0 -131
- package/bundle/node_modules/undici/lib/web/fetch/data-url.js +0 -744
- package/bundle/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +0 -46
- package/bundle/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -501
- package/bundle/node_modules/undici/lib/web/fetch/formdata.js +0 -263
- package/bundle/node_modules/undici/lib/web/fetch/global.js +0 -40
- package/bundle/node_modules/undici/lib/web/fetch/headers.js +0 -719
- package/bundle/node_modules/undici/lib/web/fetch/index.js +0 -2258
- package/bundle/node_modules/undici/lib/web/fetch/request.js +0 -1099
- package/bundle/node_modules/undici/lib/web/fetch/response.js +0 -636
- package/bundle/node_modules/undici/lib/web/fetch/util.js +0 -1782
- package/bundle/node_modules/undici/lib/web/fetch/webidl.js +0 -740
- package/bundle/node_modules/undici/lib/web/websocket/connection.js +0 -325
- package/bundle/node_modules/undici/lib/web/websocket/constants.js +0 -126
- package/bundle/node_modules/undici/lib/web/websocket/events.js +0 -331
- package/bundle/node_modules/undici/lib/web/websocket/frame.js +0 -138
- package/bundle/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -70
- package/bundle/node_modules/undici/lib/web/websocket/receiver.js +0 -454
- package/bundle/node_modules/undici/lib/web/websocket/sender.js +0 -109
- package/bundle/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -83
- package/bundle/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -485
- package/bundle/node_modules/undici/lib/web/websocket/util.js +0 -338
- package/bundle/node_modules/undici/lib/web/websocket/websocket.js +0 -686
- package/bundle/node_modules/undici/package.json +0 -149
- package/bundle/node_modules/undici/scripts/strip-comments.js +0 -10
- package/bundle/node_modules/undici/types/README.md +0 -6
- package/bundle/node_modules/undici/types/agent.d.ts +0 -35
- package/bundle/node_modules/undici/types/api.d.ts +0 -43
- package/bundle/node_modules/undici/types/balanced-pool.d.ts +0 -29
- package/bundle/node_modules/undici/types/cache-interceptor.d.ts +0 -172
- package/bundle/node_modules/undici/types/cache.d.ts +0 -36
- package/bundle/node_modules/undici/types/client-stats.d.ts +0 -15
- package/bundle/node_modules/undici/types/client.d.ts +0 -110
- package/bundle/node_modules/undici/types/connector.d.ts +0 -34
- package/bundle/node_modules/undici/types/content-type.d.ts +0 -21
- package/bundle/node_modules/undici/types/cookies.d.ts +0 -30
- package/bundle/node_modules/undici/types/diagnostics-channel.d.ts +0 -66
- package/bundle/node_modules/undici/types/dispatcher.d.ts +0 -281
- package/bundle/node_modules/undici/types/env-http-proxy-agent.d.ts +0 -21
- package/bundle/node_modules/undici/types/errors.d.ts +0 -171
- package/bundle/node_modules/undici/types/eventsource.d.ts +0 -61
- package/bundle/node_modules/undici/types/fetch.d.ts +0 -210
- package/bundle/node_modules/undici/types/formdata.d.ts +0 -108
- package/bundle/node_modules/undici/types/global-dispatcher.d.ts +0 -9
- package/bundle/node_modules/undici/types/global-origin.d.ts +0 -7
- package/bundle/node_modules/undici/types/h2c-client.d.ts +0 -75
- package/bundle/node_modules/undici/types/handlers.d.ts +0 -15
- package/bundle/node_modules/undici/types/header.d.ts +0 -160
- package/bundle/node_modules/undici/types/index.d.ts +0 -75
- package/bundle/node_modules/undici/types/interceptors.d.ts +0 -34
- package/bundle/node_modules/undici/types/mock-agent.d.ts +0 -68
- package/bundle/node_modules/undici/types/mock-call-history.d.ts +0 -111
- package/bundle/node_modules/undici/types/mock-client.d.ts +0 -25
- package/bundle/node_modules/undici/types/mock-errors.d.ts +0 -12
- package/bundle/node_modules/undici/types/mock-interceptor.d.ts +0 -93
- package/bundle/node_modules/undici/types/mock-pool.d.ts +0 -25
- package/bundle/node_modules/undici/types/patch.d.ts +0 -29
- package/bundle/node_modules/undici/types/pool-stats.d.ts +0 -19
- package/bundle/node_modules/undici/types/pool.d.ts +0 -41
- package/bundle/node_modules/undici/types/proxy-agent.d.ts +0 -29
- package/bundle/node_modules/undici/types/readable.d.ts +0 -68
- package/bundle/node_modules/undici/types/retry-agent.d.ts +0 -8
- package/bundle/node_modules/undici/types/retry-handler.d.ts +0 -116
- package/bundle/node_modules/undici/types/util.d.ts +0 -18
- package/bundle/node_modules/undici/types/utility.d.ts +0 -7
- package/bundle/node_modules/undici/types/webidl.d.ts +0 -266
- package/bundle/node_modules/undici/types/websocket.d.ts +0 -184
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "undici",
|
|
3
|
-
"version": "7.10.0",
|
|
4
|
-
"description": "An HTTP/1.1 client, written from scratch for Node.js",
|
|
5
|
-
"homepage": "https://undici.nodejs.org",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/nodejs/undici/issues"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/nodejs/undici.git"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"contributors": [
|
|
15
|
-
{
|
|
16
|
-
"name": "Daniele Belardi",
|
|
17
|
-
"url": "https://github.com/dnlup",
|
|
18
|
-
"author": true
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "Ethan Arrowood",
|
|
22
|
-
"url": "https://github.com/ethan-arrowood",
|
|
23
|
-
"author": true
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "Matteo Collina",
|
|
27
|
-
"url": "https://github.com/mcollina",
|
|
28
|
-
"author": true
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "Matthew Aitken",
|
|
32
|
-
"url": "https://github.com/KhafraDev",
|
|
33
|
-
"author": true
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "Robert Nagy",
|
|
37
|
-
"url": "https://github.com/ronag",
|
|
38
|
-
"author": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "Szymon Marczak",
|
|
42
|
-
"url": "https://github.com/szmarczak",
|
|
43
|
-
"author": true
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "Tomas Della Vedova",
|
|
47
|
-
"url": "https://github.com/delvedor",
|
|
48
|
-
"author": true
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"keywords": [
|
|
52
|
-
"fetch",
|
|
53
|
-
"http",
|
|
54
|
-
"https",
|
|
55
|
-
"promise",
|
|
56
|
-
"request",
|
|
57
|
-
"curl",
|
|
58
|
-
"wget",
|
|
59
|
-
"xhr",
|
|
60
|
-
"whatwg"
|
|
61
|
-
],
|
|
62
|
-
"main": "index.js",
|
|
63
|
-
"types": "index.d.ts",
|
|
64
|
-
"scripts": {
|
|
65
|
-
"build:node": "esbuild index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names && node scripts/strip-comments.js",
|
|
66
|
-
"build:wasm": "node build/wasm.js --docker",
|
|
67
|
-
"generate-pem": "node scripts/generate-pem.js",
|
|
68
|
-
"lint": "eslint --cache",
|
|
69
|
-
"lint:fix": "eslint --fix --cache",
|
|
70
|
-
"test": "npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript",
|
|
71
|
-
"test:javascript": "npm run test:javascript:no-jest && npm run test:jest",
|
|
72
|
-
"test:javascript:no-jest": "npm run generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:cache && npm run test:cache-interceptor && npm run test:interceptors && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:node-test && npm run test:cache-tests",
|
|
73
|
-
"test:javascript:without-intl": "npm run test:javascript:no-jest",
|
|
74
|
-
"test:busboy": "borp -p \"test/busboy/*.js\"",
|
|
75
|
-
"test:cache": "borp -p \"test/cache/*.js\"",
|
|
76
|
-
"test:sqlite": "NODE_OPTIONS=--experimental-sqlite borp -p \"test/cache-interceptor/*.js\"",
|
|
77
|
-
"test:cache-interceptor": "borp -p \"test/cache-interceptor/*.js\"",
|
|
78
|
-
"test:cookies": "borp -p \"test/cookie/*.js\"",
|
|
79
|
-
"test:eventsource": "npm run build:node && borp --expose-gc -p \"test/eventsource/*.js\"",
|
|
80
|
-
"test:fuzzing": "node test/fuzzing/fuzzing.test.js",
|
|
81
|
-
"test:fetch": "npm run build:node && borp --timeout 180000 --expose-gc --concurrency 1 -p \"test/fetch/*.js\" && npm run test:webidl && npm run test:busboy",
|
|
82
|
-
"test:h2": "npm run test:h2:core && npm run test:h2:fetch",
|
|
83
|
-
"test:h2:core": "borp -p \"test/+(http2|h2)*.js\"",
|
|
84
|
-
"test:h2:fetch": "npm run build:node && borp -p \"test/fetch/http2*.js\"",
|
|
85
|
-
"test:interceptors": "borp -p \"test/interceptors/*.js\"",
|
|
86
|
-
"test:jest": "cross-env NODE_V8_COVERAGE= jest",
|
|
87
|
-
"test:unit": "borp --expose-gc -p \"test/*.js\"",
|
|
88
|
-
"test:node-fetch": "borp -p \"test/node-fetch/**/*.js\"",
|
|
89
|
-
"test:node-test": "borp -p \"test/node-test/**/*.js\"",
|
|
90
|
-
"test:tdd": "borp --expose-gc -p \"test/*.js\"",
|
|
91
|
-
"test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w",
|
|
92
|
-
"test:typescript": "tsd && tsc test/imports/undici-import.ts --typeRoots ./types --noEmit && tsc ./types/*.d.ts --noEmit --typeRoots ./types",
|
|
93
|
-
"test:webidl": "borp -p \"test/webidl/*.js\"",
|
|
94
|
-
"test:websocket": "borp -p \"test/websocket/*.js\"",
|
|
95
|
-
"test:websocket:autobahn": "node test/autobahn/client.js",
|
|
96
|
-
"test:websocket:autobahn:report": "node test/autobahn/report.js",
|
|
97
|
-
"test:wpt": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs",
|
|
98
|
-
"test:wpt:withoutintl": "node test/wpt/start-fetch.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs",
|
|
99
|
-
"test:cache-tests": "node test/cache-interceptor/cache-tests.mjs --ci",
|
|
100
|
-
"coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report",
|
|
101
|
-
"coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test:javascript && npm run coverage:report:ci",
|
|
102
|
-
"coverage:clean": "node ./scripts/clean-coverage.js",
|
|
103
|
-
"coverage:report": "cross-env NODE_V8_COVERAGE= c8 report",
|
|
104
|
-
"coverage:report:ci": "c8 report",
|
|
105
|
-
"bench": "echo \"Error: Benchmarks have been moved to '/benchmarks'\" && exit 1",
|
|
106
|
-
"serve:website": "echo \"Error: Documentation has been moved to '/docs'\" && exit 1",
|
|
107
|
-
"prepare": "husky && node ./scripts/platform-shell.js"
|
|
108
|
-
},
|
|
109
|
-
"devDependencies": {
|
|
110
|
-
"@fastify/busboy": "3.1.1",
|
|
111
|
-
"@matteo.collina/tspl": "^0.2.0",
|
|
112
|
-
"@sinonjs/fake-timers": "^12.0.0",
|
|
113
|
-
"@types/node": "^18.19.50",
|
|
114
|
-
"abort-controller": "^3.0.0",
|
|
115
|
-
"borp": "^0.19.0",
|
|
116
|
-
"c8": "^10.0.0",
|
|
117
|
-
"cross-env": "^7.0.3",
|
|
118
|
-
"dns-packet": "^5.4.0",
|
|
119
|
-
"esbuild": "^0.25.2",
|
|
120
|
-
"eslint": "^9.9.0",
|
|
121
|
-
"fast-check": "^3.17.1",
|
|
122
|
-
"https-pem": "^3.0.0",
|
|
123
|
-
"husky": "^9.0.7",
|
|
124
|
-
"jest": "^29.0.2",
|
|
125
|
-
"neostandard": "^0.12.0",
|
|
126
|
-
"node-forge": "^1.3.1",
|
|
127
|
-
"proxy": "^2.1.1",
|
|
128
|
-
"tsd": "^0.31.2",
|
|
129
|
-
"typescript": "^5.6.2",
|
|
130
|
-
"ws": "^8.11.0"
|
|
131
|
-
},
|
|
132
|
-
"engines": {
|
|
133
|
-
"node": ">=20.18.1"
|
|
134
|
-
},
|
|
135
|
-
"tsd": {
|
|
136
|
-
"directory": "test/types",
|
|
137
|
-
"compilerOptions": {
|
|
138
|
-
"esModuleInterop": true,
|
|
139
|
-
"lib": [
|
|
140
|
-
"esnext"
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
"jest": {
|
|
145
|
-
"testMatch": [
|
|
146
|
-
"<rootDir>/test/jest/**"
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { readFileSync, writeFileSync } = require('node:fs')
|
|
4
|
-
const { transcode } = require('node:buffer')
|
|
5
|
-
|
|
6
|
-
const buffer = transcode
|
|
7
|
-
? transcode(readFileSync('./undici-fetch.js'), 'utf8', 'latin1')
|
|
8
|
-
: readFileSync('./undici-fetch.js')
|
|
9
|
-
|
|
10
|
-
writeFileSync('./undici-fetch.js', buffer.toString('latin1'))
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# undici-types
|
|
2
|
-
|
|
3
|
-
This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version.
|
|
4
|
-
|
|
5
|
-
- [GitHub nodejs/undici](https://github.com/nodejs/undici)
|
|
6
|
-
- [Undici Documentation](https://undici.nodejs.org/#/)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { URL } from 'url'
|
|
2
|
-
import Pool from './pool'
|
|
3
|
-
import Dispatcher from './dispatcher'
|
|
4
|
-
import TClientStats from './client-stats'
|
|
5
|
-
import TPoolStats from './pool-stats'
|
|
6
|
-
|
|
7
|
-
export default Agent
|
|
8
|
-
|
|
9
|
-
declare class Agent extends Dispatcher {
|
|
10
|
-
constructor (opts?: Agent.Options)
|
|
11
|
-
/** `true` after `dispatcher.close()` has been called. */
|
|
12
|
-
closed: boolean
|
|
13
|
-
/** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
|
|
14
|
-
destroyed: boolean
|
|
15
|
-
/** Dispatches a request. */
|
|
16
|
-
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
|
|
17
|
-
/** Aggregate stats for a Agent by origin. */
|
|
18
|
-
readonly stats: Record<string, TClientStats | TPoolStats>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare namespace Agent {
|
|
22
|
-
export interface Options extends Pool.Options {
|
|
23
|
-
/** Default: `(origin, opts) => new Pool(origin, opts)`. */
|
|
24
|
-
factory?(origin: string | URL, opts: Object): Dispatcher;
|
|
25
|
-
/** Integer. Default: `0` */
|
|
26
|
-
maxRedirections?: number;
|
|
27
|
-
|
|
28
|
-
interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface DispatchOptions extends Dispatcher.DispatchOptions {
|
|
32
|
-
/** Integer. */
|
|
33
|
-
maxRedirections?: number;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { URL, UrlObject } from 'url'
|
|
2
|
-
import { Duplex } from 'stream'
|
|
3
|
-
import Dispatcher from './dispatcher'
|
|
4
|
-
|
|
5
|
-
/** Performs an HTTP request. */
|
|
6
|
-
declare function request<TOpaque = null> (
|
|
7
|
-
url: string | URL | UrlObject,
|
|
8
|
-
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
|
|
9
|
-
): Promise<Dispatcher.ResponseData<TOpaque>>
|
|
10
|
-
|
|
11
|
-
/** A faster version of `request`. */
|
|
12
|
-
declare function stream<TOpaque = null> (
|
|
13
|
-
url: string | URL | UrlObject,
|
|
14
|
-
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path'>,
|
|
15
|
-
factory: Dispatcher.StreamFactory<TOpaque>
|
|
16
|
-
): Promise<Dispatcher.StreamData<TOpaque>>
|
|
17
|
-
|
|
18
|
-
/** For easy use with `stream.pipeline`. */
|
|
19
|
-
declare function pipeline<TOpaque = null> (
|
|
20
|
-
url: string | URL | UrlObject,
|
|
21
|
-
options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions<TOpaque>, 'origin' | 'path'>,
|
|
22
|
-
handler: Dispatcher.PipelineHandler<TOpaque>
|
|
23
|
-
): Duplex
|
|
24
|
-
|
|
25
|
-
/** Starts two-way communications with the requested resource. */
|
|
26
|
-
declare function connect<TOpaque = null> (
|
|
27
|
-
url: string | URL | UrlObject,
|
|
28
|
-
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin' | 'path'>
|
|
29
|
-
): Promise<Dispatcher.ConnectData<TOpaque>>
|
|
30
|
-
|
|
31
|
-
/** Upgrade to a different protocol. */
|
|
32
|
-
declare function upgrade (
|
|
33
|
-
url: string | URL | UrlObject,
|
|
34
|
-
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
|
|
35
|
-
): Promise<Dispatcher.UpgradeData>
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
request,
|
|
39
|
-
stream,
|
|
40
|
-
pipeline,
|
|
41
|
-
connect,
|
|
42
|
-
upgrade
|
|
43
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import Pool from './pool'
|
|
2
|
-
import Dispatcher from './dispatcher'
|
|
3
|
-
import { URL } from 'url'
|
|
4
|
-
|
|
5
|
-
export default BalancedPool
|
|
6
|
-
|
|
7
|
-
type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
|
|
8
|
-
|
|
9
|
-
declare class BalancedPool extends Dispatcher {
|
|
10
|
-
constructor (url: string | string[] | URL | URL[], options?: Pool.Options)
|
|
11
|
-
|
|
12
|
-
addUpstream (upstream: string | URL): BalancedPool
|
|
13
|
-
removeUpstream (upstream: string | URL): BalancedPool
|
|
14
|
-
upstreams: Array<string>
|
|
15
|
-
|
|
16
|
-
/** `true` after `pool.close()` has been called. */
|
|
17
|
-
closed: boolean
|
|
18
|
-
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
|
|
19
|
-
destroyed: boolean
|
|
20
|
-
|
|
21
|
-
// Override dispatcher APIs.
|
|
22
|
-
override connect (
|
|
23
|
-
options: BalancedPoolConnectOptions
|
|
24
|
-
): Promise<Dispatcher.ConnectData>
|
|
25
|
-
override connect (
|
|
26
|
-
options: BalancedPoolConnectOptions,
|
|
27
|
-
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
28
|
-
): void
|
|
29
|
-
}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Readable, Writable } from 'node:stream'
|
|
2
|
-
|
|
3
|
-
export default CacheHandler
|
|
4
|
-
|
|
5
|
-
declare namespace CacheHandler {
|
|
6
|
-
export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE'
|
|
7
|
-
|
|
8
|
-
export interface CacheHandlerOptions {
|
|
9
|
-
store: CacheStore
|
|
10
|
-
|
|
11
|
-
cacheByDefault?: number
|
|
12
|
-
|
|
13
|
-
type?: CacheOptions['type']
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface CacheOptions {
|
|
17
|
-
store?: CacheStore
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The methods to cache
|
|
21
|
-
* Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST)
|
|
22
|
-
* invalidate the cache for a origin.
|
|
23
|
-
* @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons
|
|
24
|
-
* @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1
|
|
25
|
-
*/
|
|
26
|
-
methods?: CacheMethods[]
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* RFC9111 allows for caching responses that we aren't explicitly told to
|
|
30
|
-
* cache or to not cache.
|
|
31
|
-
* @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5
|
|
32
|
-
* @default undefined
|
|
33
|
-
*/
|
|
34
|
-
cacheByDefault?: number
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* TODO docs
|
|
38
|
-
* @default 'shared'
|
|
39
|
-
*/
|
|
40
|
-
type?: 'shared' | 'private'
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface CacheControlDirectives {
|
|
44
|
-
'max-stale'?: number;
|
|
45
|
-
'min-fresh'?: number;
|
|
46
|
-
'max-age'?: number;
|
|
47
|
-
's-maxage'?: number;
|
|
48
|
-
'stale-while-revalidate'?: number;
|
|
49
|
-
'stale-if-error'?: number;
|
|
50
|
-
public?: true;
|
|
51
|
-
private?: true | string[];
|
|
52
|
-
'no-store'?: true;
|
|
53
|
-
'no-cache'?: true | string[];
|
|
54
|
-
'must-revalidate'?: true;
|
|
55
|
-
'proxy-revalidate'?: true;
|
|
56
|
-
immutable?: true;
|
|
57
|
-
'no-transform'?: true;
|
|
58
|
-
'must-understand'?: true;
|
|
59
|
-
'only-if-cached'?: true;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface CacheKey {
|
|
63
|
-
origin: string
|
|
64
|
-
method: string
|
|
65
|
-
path: string
|
|
66
|
-
headers?: Record<string, string | string[]>
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface CacheValue {
|
|
70
|
-
statusCode: number
|
|
71
|
-
statusMessage: string
|
|
72
|
-
headers: Record<string, string | string[]>
|
|
73
|
-
vary?: Record<string, string | string[] | null>
|
|
74
|
-
etag?: string
|
|
75
|
-
cacheControlDirectives?: CacheControlDirectives
|
|
76
|
-
cachedAt: number
|
|
77
|
-
staleAt: number
|
|
78
|
-
deleteAt: number
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface DeleteByUri {
|
|
82
|
-
origin: string
|
|
83
|
-
method: string
|
|
84
|
-
path: string
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
type GetResult = {
|
|
88
|
-
statusCode: number
|
|
89
|
-
statusMessage: string
|
|
90
|
-
headers: Record<string, string | string[]>
|
|
91
|
-
vary?: Record<string, string | string[] | null>
|
|
92
|
-
etag?: string
|
|
93
|
-
body?: Readable | Iterable<Buffer> | AsyncIterable<Buffer> | Buffer | Iterable<string> | AsyncIterable<string> | string
|
|
94
|
-
cacheControlDirectives: CacheControlDirectives,
|
|
95
|
-
cachedAt: number
|
|
96
|
-
staleAt: number
|
|
97
|
-
deleteAt: number
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Underlying storage provider for cached responses
|
|
102
|
-
*/
|
|
103
|
-
export interface CacheStore {
|
|
104
|
-
get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
|
|
105
|
-
|
|
106
|
-
createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined
|
|
107
|
-
|
|
108
|
-
delete(key: CacheKey): void | Promise<void>
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface MemoryCacheStoreOpts {
|
|
112
|
-
/**
|
|
113
|
-
* @default Infinity
|
|
114
|
-
*/
|
|
115
|
-
maxCount?: number
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @default Infinity
|
|
119
|
-
*/
|
|
120
|
-
maxSize?: number
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @default Infinity
|
|
124
|
-
*/
|
|
125
|
-
maxEntrySize?: number
|
|
126
|
-
|
|
127
|
-
errorCallback?: (err: Error) => void
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export class MemoryCacheStore implements CacheStore {
|
|
131
|
-
constructor (opts?: MemoryCacheStoreOpts)
|
|
132
|
-
|
|
133
|
-
get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
|
|
134
|
-
|
|
135
|
-
createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
|
|
136
|
-
|
|
137
|
-
delete (key: CacheKey): void | Promise<void>
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface SqliteCacheStoreOpts {
|
|
141
|
-
/**
|
|
142
|
-
* Location of the database
|
|
143
|
-
* @default ':memory:'
|
|
144
|
-
*/
|
|
145
|
-
location?: string
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @default Infinity
|
|
149
|
-
*/
|
|
150
|
-
maxCount?: number
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @default Infinity
|
|
154
|
-
*/
|
|
155
|
-
maxEntrySize?: number
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export class SqliteCacheStore implements CacheStore {
|
|
159
|
-
constructor (opts?: SqliteCacheStoreOpts)
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Closes the connection to the database
|
|
163
|
-
*/
|
|
164
|
-
close (): void
|
|
165
|
-
|
|
166
|
-
get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
|
|
167
|
-
|
|
168
|
-
createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
|
|
169
|
-
|
|
170
|
-
delete (key: CacheKey): void | Promise<void>
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { RequestInfo, Response, Request } from './fetch'
|
|
2
|
-
|
|
3
|
-
export interface CacheStorage {
|
|
4
|
-
match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
|
|
5
|
-
has (cacheName: string): Promise<boolean>,
|
|
6
|
-
open (cacheName: string): Promise<Cache>,
|
|
7
|
-
delete (cacheName: string): Promise<boolean>,
|
|
8
|
-
keys (): Promise<string[]>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare const CacheStorage: {
|
|
12
|
-
prototype: CacheStorage
|
|
13
|
-
new(): CacheStorage
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface Cache {
|
|
17
|
-
match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
|
|
18
|
-
matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
|
|
19
|
-
add (request: RequestInfo): Promise<undefined>,
|
|
20
|
-
addAll (requests: RequestInfo[]): Promise<undefined>,
|
|
21
|
-
put (request: RequestInfo, response: Response): Promise<undefined>,
|
|
22
|
-
delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
|
|
23
|
-
keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface CacheQueryOptions {
|
|
27
|
-
ignoreSearch?: boolean,
|
|
28
|
-
ignoreMethod?: boolean,
|
|
29
|
-
ignoreVary?: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
33
|
-
cacheName?: string
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare const caches: CacheStorage
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import Client from './client'
|
|
2
|
-
|
|
3
|
-
export default ClientStats
|
|
4
|
-
|
|
5
|
-
declare class ClientStats {
|
|
6
|
-
constructor (pool: Client)
|
|
7
|
-
/** If socket has open connection. */
|
|
8
|
-
connected: boolean
|
|
9
|
-
/** Number of open socket connections in this client that do not have an active request. */
|
|
10
|
-
pending: number
|
|
11
|
-
/** Number of currently active requests of this client. */
|
|
12
|
-
running: number
|
|
13
|
-
/** Number of active, pending, or queued requests of this client. */
|
|
14
|
-
size: number
|
|
15
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { URL } from 'url'
|
|
2
|
-
import Dispatcher from './dispatcher'
|
|
3
|
-
import buildConnector from './connector'
|
|
4
|
-
import TClientStats from './client-stats'
|
|
5
|
-
|
|
6
|
-
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
10
|
-
*/
|
|
11
|
-
export class Client extends Dispatcher {
|
|
12
|
-
constructor (url: string | URL, options?: Client.Options)
|
|
13
|
-
/** Property to get and set the pipelining factor. */
|
|
14
|
-
pipelining: number
|
|
15
|
-
/** `true` after `client.close()` has been called. */
|
|
16
|
-
closed: boolean
|
|
17
|
-
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
|
|
18
|
-
destroyed: boolean
|
|
19
|
-
/** Aggregate stats for a Client. */
|
|
20
|
-
readonly stats: TClientStats
|
|
21
|
-
|
|
22
|
-
// Override dispatcher APIs.
|
|
23
|
-
override connect (
|
|
24
|
-
options: ClientConnectOptions
|
|
25
|
-
): Promise<Dispatcher.ConnectData>
|
|
26
|
-
override connect (
|
|
27
|
-
options: ClientConnectOptions,
|
|
28
|
-
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
29
|
-
): void
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export declare namespace Client {
|
|
33
|
-
export interface OptionsInterceptors {
|
|
34
|
-
Client: readonly Dispatcher.DispatchInterceptor[];
|
|
35
|
-
}
|
|
36
|
-
export interface Options {
|
|
37
|
-
/** TODO */
|
|
38
|
-
interceptors?: OptionsInterceptors;
|
|
39
|
-
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
|
|
40
|
-
maxHeaderSize?: number;
|
|
41
|
-
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
|
|
42
|
-
headersTimeout?: number;
|
|
43
|
-
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
|
|
44
|
-
socketTimeout?: never;
|
|
45
|
-
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
|
|
46
|
-
requestTimeout?: never;
|
|
47
|
-
/** TODO */
|
|
48
|
-
connectTimeout?: number;
|
|
49
|
-
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
|
|
50
|
-
bodyTimeout?: number;
|
|
51
|
-
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
|
|
52
|
-
idleTimeout?: never;
|
|
53
|
-
/** @deprecated unsupported keepAlive, use pipelining=0 instead */
|
|
54
|
-
keepAlive?: never;
|
|
55
|
-
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
|
|
56
|
-
keepAliveTimeout?: number;
|
|
57
|
-
/** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
|
|
58
|
-
maxKeepAliveTimeout?: never;
|
|
59
|
-
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
|
|
60
|
-
keepAliveMaxTimeout?: number;
|
|
61
|
-
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
|
|
62
|
-
keepAliveTimeoutThreshold?: number;
|
|
63
|
-
/** TODO */
|
|
64
|
-
socketPath?: string;
|
|
65
|
-
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
|
|
66
|
-
pipelining?: number;
|
|
67
|
-
/** @deprecated use the connect option instead */
|
|
68
|
-
tls?: never;
|
|
69
|
-
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
70
|
-
strictContentLength?: boolean;
|
|
71
|
-
/** TODO */
|
|
72
|
-
maxCachedSessions?: number;
|
|
73
|
-
/** TODO */
|
|
74
|
-
maxRedirections?: number;
|
|
75
|
-
/** TODO */
|
|
76
|
-
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
|
|
77
|
-
/** TODO */
|
|
78
|
-
maxRequestsPerClient?: number;
|
|
79
|
-
/** TODO */
|
|
80
|
-
localAddress?: string;
|
|
81
|
-
/** Max response body size in bytes, -1 is disabled */
|
|
82
|
-
maxResponseSize?: number;
|
|
83
|
-
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
|
|
84
|
-
autoSelectFamily?: boolean;
|
|
85
|
-
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
|
|
86
|
-
autoSelectFamilyAttemptTimeout?: number;
|
|
87
|
-
/**
|
|
88
|
-
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
|
|
89
|
-
* @default false
|
|
90
|
-
*/
|
|
91
|
-
allowH2?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
|
|
94
|
-
* @default 100
|
|
95
|
-
*/
|
|
96
|
-
maxConcurrentStreams?: number;
|
|
97
|
-
}
|
|
98
|
-
export interface SocketInfo {
|
|
99
|
-
localAddress?: string
|
|
100
|
-
localPort?: number
|
|
101
|
-
remoteAddress?: string
|
|
102
|
-
remotePort?: number
|
|
103
|
-
remoteFamily?: string
|
|
104
|
-
timeout?: number
|
|
105
|
-
bytesWritten?: number
|
|
106
|
-
bytesRead?: number
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export default Client
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { TLSSocket, ConnectionOptions } from 'tls'
|
|
2
|
-
import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net'
|
|
3
|
-
|
|
4
|
-
export default buildConnector
|
|
5
|
-
declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector
|
|
6
|
-
|
|
7
|
-
declare namespace buildConnector {
|
|
8
|
-
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
|
|
9
|
-
allowH2?: boolean;
|
|
10
|
-
maxCachedSessions?: number | null;
|
|
11
|
-
socketPath?: string | null;
|
|
12
|
-
timeout?: number | null;
|
|
13
|
-
port?: number;
|
|
14
|
-
keepAlive?: boolean | null;
|
|
15
|
-
keepAliveInitialDelay?: number | null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface Options {
|
|
19
|
-
hostname: string
|
|
20
|
-
host?: string
|
|
21
|
-
protocol: string
|
|
22
|
-
port: string
|
|
23
|
-
servername?: string
|
|
24
|
-
localAddress?: string | null
|
|
25
|
-
httpSocket?: Socket
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type Callback = (...args: CallbackArgs) => void
|
|
29
|
-
type CallbackArgs = [null, Socket | TLSSocket] | [Error, null]
|
|
30
|
-
|
|
31
|
-
export interface connector {
|
|
32
|
-
(options: buildConnector.Options, callback: buildConnector.Callback): void
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
interface MIMEType {
|
|
4
|
-
type: string
|
|
5
|
-
subtype: string
|
|
6
|
-
parameters: Map<string, string>
|
|
7
|
-
essence: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Parse a string to a {@link MIMEType} object. Returns `failure` if the string
|
|
12
|
-
* couldn't be parsed.
|
|
13
|
-
* @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type
|
|
14
|
-
*/
|
|
15
|
-
export function parseMIMEType (input: string): 'failure' | MIMEType
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Convert a MIMEType object to a string.
|
|
19
|
-
* @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
|
|
20
|
-
*/
|
|
21
|
-
export function serializeAMimeType (mimeType: MIMEType): string
|