@pnpm/exe 11.0.6 → 11.0.7
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/dist/node-gyp-bin/node-gyp +0 -0
- package/dist/node-gyp-bin/node-gyp.cmd +0 -0
- package/dist/node_modules/node-gyp/.release-please-manifest.json +1 -1
- package/dist/node_modules/node-gyp/bin/node-gyp.js +0 -0
- package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +1 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +11 -3
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +2 -3
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +1 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +26 -16
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +1 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +1 -1
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +2 -2
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +3 -20
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/tags.py +2 -14
- package/dist/node_modules/node-gyp/gyp/pyproject.toml +5 -3
- package/dist/node_modules/node-gyp/lib/download.js +55 -8
- package/dist/node_modules/node-gyp/lib/find-visualstudio.js +1 -1
- package/dist/node_modules/node-gyp/lib/process-release.js +17 -19
- package/dist/node_modules/node-gyp/package.json +3 -3
- package/dist/node_modules/{safer-buffer → undici}/LICENSE +1 -1
- package/dist/node_modules/undici/index-fetch.js +35 -0
- package/dist/node_modules/undici/index.js +169 -0
- package/dist/node_modules/undici/lib/api/abort-signal.js +57 -0
- package/dist/node_modules/undici/lib/api/api-connect.js +108 -0
- package/dist/node_modules/undici/lib/api/api-pipeline.js +251 -0
- package/dist/node_modules/undici/lib/api/api-request.js +214 -0
- package/dist/node_modules/undici/lib/api/api-stream.js +220 -0
- package/dist/node_modules/undici/lib/api/api-upgrade.js +108 -0
- package/dist/node_modules/undici/lib/api/index.js +7 -0
- package/dist/node_modules/undici/lib/api/readable.js +385 -0
- package/dist/node_modules/undici/lib/api/util.js +93 -0
- package/dist/node_modules/undici/lib/core/connect.js +240 -0
- package/dist/node_modules/undici/lib/core/constants.js +118 -0
- package/dist/node_modules/undici/lib/core/diagnostics.js +202 -0
- package/dist/node_modules/undici/lib/core/errors.js +425 -0
- package/dist/node_modules/undici/lib/core/request.js +405 -0
- package/dist/node_modules/undici/lib/core/symbols.js +67 -0
- package/dist/node_modules/undici/lib/core/tree.js +152 -0
- package/dist/node_modules/undici/lib/core/util.js +719 -0
- package/dist/node_modules/undici/lib/dispatcher/agent.js +130 -0
- package/dist/node_modules/undici/lib/dispatcher/balanced-pool.js +209 -0
- package/dist/node_modules/undici/lib/dispatcher/client-h1.js +1370 -0
- package/dist/node_modules/undici/lib/dispatcher/client-h2.js +744 -0
- package/dist/node_modules/undici/lib/dispatcher/client.js +623 -0
- package/dist/node_modules/undici/lib/dispatcher/dispatcher-base.js +198 -0
- package/dist/node_modules/undici/lib/dispatcher/dispatcher.js +65 -0
- package/dist/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +160 -0
- package/dist/node_modules/undici/lib/dispatcher/fixed-queue.js +117 -0
- package/dist/node_modules/undici/lib/dispatcher/pool-base.js +194 -0
- package/dist/node_modules/undici/lib/dispatcher/pool-stats.js +34 -0
- package/dist/node_modules/undici/lib/dispatcher/pool.js +107 -0
- package/dist/node_modules/undici/lib/dispatcher/proxy-agent.js +274 -0
- package/dist/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/dist/node_modules/undici/lib/global.js +32 -0
- package/dist/node_modules/undici/lib/handler/decorator-handler.js +44 -0
- package/dist/node_modules/undici/lib/handler/redirect-handler.js +232 -0
- package/dist/node_modules/undici/lib/handler/retry-handler.js +374 -0
- package/dist/node_modules/undici/lib/interceptor/dns.js +375 -0
- package/dist/node_modules/undici/lib/interceptor/dump.js +123 -0
- package/dist/node_modules/undici/lib/interceptor/redirect-interceptor.js +21 -0
- package/dist/node_modules/undici/lib/interceptor/redirect.js +24 -0
- package/dist/node_modules/undici/lib/interceptor/response-error.js +86 -0
- package/dist/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/dist/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/dist/node_modules/undici/lib/llhttp/constants.js +278 -0
- package/dist/node_modules/undici/lib/llhttp/llhttp-wasm.js +5 -0
- package/dist/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +5 -0
- package/dist/node_modules/undici/lib/llhttp/utils.js +15 -0
- package/dist/node_modules/undici/lib/mock/mock-agent.js +160 -0
- package/dist/node_modules/undici/lib/mock/mock-client.js +59 -0
- package/dist/node_modules/undici/lib/mock/mock-errors.js +28 -0
- package/dist/node_modules/undici/lib/mock/mock-interceptor.js +207 -0
- package/dist/node_modules/undici/lib/mock/mock-pool.js +59 -0
- package/dist/node_modules/undici/lib/mock/mock-symbols.js +23 -0
- package/dist/node_modules/undici/lib/mock/mock-utils.js +367 -0
- package/dist/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/dist/node_modules/undici/lib/mock/pluralizer.js +29 -0
- package/dist/node_modules/undici/lib/util/timers.js +423 -0
- package/dist/node_modules/undici/lib/web/cache/cache.js +859 -0
- package/dist/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/dist/node_modules/undici/lib/web/cache/symbols.js +5 -0
- package/dist/node_modules/undici/lib/web/cache/util.js +45 -0
- package/dist/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/dist/node_modules/undici/lib/web/cookies/index.js +184 -0
- package/dist/node_modules/undici/lib/web/cookies/parse.js +317 -0
- package/dist/node_modules/undici/lib/web/cookies/util.js +282 -0
- package/dist/node_modules/undici/lib/web/eventsource/eventsource-stream.js +398 -0
- package/dist/node_modules/undici/lib/web/eventsource/eventsource.js +480 -0
- package/dist/node_modules/undici/lib/web/eventsource/util.js +37 -0
- package/dist/node_modules/{@npmcli/redact → undici/lib/web/fetch}/LICENSE +1 -1
- package/dist/node_modules/undici/lib/web/fetch/body.js +529 -0
- package/dist/node_modules/undici/lib/web/fetch/constants.js +124 -0
- package/dist/node_modules/undici/lib/web/fetch/data-url.js +744 -0
- package/dist/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +46 -0
- package/dist/node_modules/undici/lib/web/fetch/file.js +126 -0
- package/dist/node_modules/undici/lib/web/fetch/formdata-parser.js +474 -0
- package/dist/node_modules/undici/lib/web/fetch/formdata.js +252 -0
- package/dist/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/dist/node_modules/undici/lib/web/fetch/headers.js +687 -0
- package/dist/node_modules/undici/lib/web/fetch/index.js +2272 -0
- package/dist/node_modules/undici/lib/web/fetch/request.js +1037 -0
- package/dist/node_modules/undici/lib/web/fetch/response.js +610 -0
- package/dist/node_modules/undici/lib/web/fetch/symbols.js +9 -0
- package/dist/node_modules/undici/lib/web/fetch/util.js +1632 -0
- package/dist/node_modules/undici/lib/web/fetch/webidl.js +695 -0
- package/dist/node_modules/undici/lib/web/fileapi/encoding.js +290 -0
- package/dist/node_modules/undici/lib/web/fileapi/filereader.js +344 -0
- package/dist/node_modules/undici/lib/web/fileapi/progressevent.js +78 -0
- package/dist/node_modules/undici/lib/web/fileapi/symbols.js +10 -0
- package/dist/node_modules/undici/lib/web/fileapi/util.js +391 -0
- package/dist/node_modules/undici/lib/web/websocket/connection.js +371 -0
- package/dist/node_modules/undici/lib/web/websocket/constants.js +66 -0
- package/dist/node_modules/undici/lib/web/websocket/events.js +329 -0
- package/dist/node_modules/undici/lib/web/websocket/frame.js +96 -0
- package/dist/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/dist/node_modules/undici/lib/web/websocket/receiver.js +490 -0
- package/dist/node_modules/undici/lib/web/websocket/sender.js +104 -0
- package/dist/node_modules/undici/lib/web/websocket/symbols.js +12 -0
- package/dist/node_modules/undici/lib/web/websocket/util.js +322 -0
- package/dist/node_modules/undici/lib/web/websocket/websocket.js +592 -0
- package/dist/node_modules/undici/package.json +160 -0
- package/dist/node_modules/undici/scripts/strip-comments.js +8 -0
- package/dist/node_modules/yallist/package.json +51 -12
- package/dist/pnpm.mjs +4468 -3877
- package/dist/worker.js +70 -67
- package/package.json +21 -13
- package/setup.js +17 -3
- package/dist/node_modules/@gar/promise-retry/LICENSE +0 -20
- package/dist/node_modules/@gar/promise-retry/lib/index.js +0 -62
- package/dist/node_modules/@gar/promise-retry/lib/retry.js +0 -109
- package/dist/node_modules/@gar/promise-retry/package.json +0 -45
- package/dist/node_modules/@npmcli/agent/lib/agents.js +0 -206
- package/dist/node_modules/@npmcli/agent/lib/dns.js +0 -53
- package/dist/node_modules/@npmcli/agent/lib/errors.js +0 -61
- package/dist/node_modules/@npmcli/agent/lib/index.js +0 -56
- package/dist/node_modules/@npmcli/agent/lib/options.js +0 -86
- package/dist/node_modules/@npmcli/agent/lib/proxy.js +0 -88
- package/dist/node_modules/@npmcli/agent/package.json +0 -60
- package/dist/node_modules/@npmcli/fs/lib/common/get-options.js +0 -20
- package/dist/node_modules/@npmcli/fs/lib/common/node.js +0 -9
- package/dist/node_modules/@npmcli/fs/lib/cp/LICENSE +0 -15
- package/dist/node_modules/@npmcli/fs/lib/cp/errors.js +0 -129
- package/dist/node_modules/@npmcli/fs/lib/cp/index.js +0 -22
- package/dist/node_modules/@npmcli/fs/lib/cp/polyfill.js +0 -428
- package/dist/node_modules/@npmcli/fs/lib/index.js +0 -13
- package/dist/node_modules/@npmcli/fs/lib/move-file.js +0 -78
- package/dist/node_modules/@npmcli/fs/lib/readdir-scoped.js +0 -20
- package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +0 -39
- package/dist/node_modules/@npmcli/fs/package.json +0 -54
- package/dist/node_modules/@npmcli/redact/lib/deep-map.js +0 -71
- package/dist/node_modules/@npmcli/redact/lib/error.js +0 -28
- package/dist/node_modules/@npmcli/redact/lib/index.js +0 -44
- package/dist/node_modules/@npmcli/redact/lib/matchers.js +0 -88
- package/dist/node_modules/@npmcli/redact/lib/server.js +0 -59
- package/dist/node_modules/@npmcli/redact/lib/utils.js +0 -202
- package/dist/node_modules/@npmcli/redact/package.json +0 -52
- package/dist/node_modules/agent-base/LICENSE +0 -22
- package/dist/node_modules/agent-base/dist/helpers.js +0 -66
- package/dist/node_modules/agent-base/dist/index.js +0 -178
- package/dist/node_modules/agent-base/package.json +0 -46
- package/dist/node_modules/balanced-match/dist/commonjs/index.js +0 -59
- package/dist/node_modules/balanced-match/dist/esm/index.js +0 -54
- package/dist/node_modules/balanced-match/package.json +0 -68
- package/dist/node_modules/brace-expansion/LICENSE +0 -23
- package/dist/node_modules/brace-expansion/dist/commonjs/index.js +0 -201
- package/dist/node_modules/brace-expansion/dist/commonjs/package.json +0 -3
- package/dist/node_modules/brace-expansion/dist/esm/index.js +0 -197
- package/dist/node_modules/brace-expansion/dist/esm/package.json +0 -3
- package/dist/node_modules/brace-expansion/package.json +0 -64
- package/dist/node_modules/cacache/lib/content/path.js +0 -29
- package/dist/node_modules/cacache/lib/content/read.js +0 -165
- package/dist/node_modules/cacache/lib/content/rm.js +0 -18
- package/dist/node_modules/cacache/lib/content/write.js +0 -206
- package/dist/node_modules/cacache/lib/entry-index.js +0 -336
- package/dist/node_modules/cacache/lib/get.js +0 -170
- package/dist/node_modules/cacache/lib/index.js +0 -42
- package/dist/node_modules/cacache/lib/memoization.js +0 -72
- package/dist/node_modules/cacache/lib/put.js +0 -80
- package/dist/node_modules/cacache/lib/rm.js +0 -31
- package/dist/node_modules/cacache/lib/util/glob.js +0 -7
- package/dist/node_modules/cacache/lib/util/hash-to-segments.js +0 -7
- package/dist/node_modules/cacache/lib/util/tmp.js +0 -32
- package/dist/node_modules/cacache/lib/verify.js +0 -258
- package/dist/node_modules/cacache/package.json +0 -81
- package/dist/node_modules/debug/LICENSE +0 -20
- package/dist/node_modules/debug/package.json +0 -64
- package/dist/node_modules/debug/src/browser.js +0 -272
- package/dist/node_modules/debug/src/common.js +0 -292
- package/dist/node_modules/debug/src/index.js +0 -10
- package/dist/node_modules/debug/src/node.js +0 -263
- package/dist/node_modules/fs-minipass/LICENSE +0 -15
- package/dist/node_modules/fs-minipass/lib/index.js +0 -443
- package/dist/node_modules/fs-minipass/package.json +0 -54
- package/dist/node_modules/glob/dist/commonjs/glob.js +0 -248
- package/dist/node_modules/glob/dist/commonjs/has-magic.js +0 -27
- package/dist/node_modules/glob/dist/commonjs/ignore.js +0 -119
- package/dist/node_modules/glob/dist/commonjs/index.js +0 -68
- package/dist/node_modules/glob/dist/commonjs/index.min.js +0 -4
- package/dist/node_modules/glob/dist/commonjs/package.json +0 -3
- package/dist/node_modules/glob/dist/commonjs/pattern.js +0 -223
- package/dist/node_modules/glob/dist/commonjs/processor.js +0 -301
- package/dist/node_modules/glob/dist/commonjs/walker.js +0 -387
- package/dist/node_modules/glob/dist/esm/glob.js +0 -244
- package/dist/node_modules/glob/dist/esm/has-magic.js +0 -23
- package/dist/node_modules/glob/dist/esm/ignore.js +0 -115
- package/dist/node_modules/glob/dist/esm/index.js +0 -55
- package/dist/node_modules/glob/dist/esm/index.min.js +0 -4
- package/dist/node_modules/glob/dist/esm/package.json +0 -3
- package/dist/node_modules/glob/dist/esm/pattern.js +0 -219
- package/dist/node_modules/glob/dist/esm/processor.js +0 -294
- package/dist/node_modules/glob/dist/esm/walker.js +0 -381
- package/dist/node_modules/glob/package.json +0 -98
- package/dist/node_modules/http-cache-semantics/LICENSE +0 -9
- package/dist/node_modules/http-cache-semantics/index.js +0 -928
- package/dist/node_modules/http-cache-semantics/package.json +0 -22
- package/dist/node_modules/http-proxy-agent/LICENSE +0 -22
- package/dist/node_modules/http-proxy-agent/dist/index.js +0 -148
- package/dist/node_modules/http-proxy-agent/package.json +0 -47
- package/dist/node_modules/https-proxy-agent/LICENSE +0 -22
- package/dist/node_modules/https-proxy-agent/dist/index.js +0 -180
- package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
- package/dist/node_modules/https-proxy-agent/package.json +0 -50
- package/dist/node_modules/iconv-lite/LICENSE +0 -21
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -532
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +0 -185
- package/dist/node_modules/iconv-lite/encodings/index.js +0 -23
- package/dist/node_modules/iconv-lite/encodings/internal.js +0 -218
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -75
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +0 -178
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
- package/dist/node_modules/iconv-lite/encodings/utf16.js +0 -187
- package/dist/node_modules/iconv-lite/encodings/utf32.js +0 -307
- package/dist/node_modules/iconv-lite/encodings/utf7.js +0 -283
- package/dist/node_modules/iconv-lite/lib/bom-handling.js +0 -48
- package/dist/node_modules/iconv-lite/lib/helpers/merge-exports.js +0 -13
- package/dist/node_modules/iconv-lite/lib/index.js +0 -182
- package/dist/node_modules/iconv-lite/lib/streams.js +0 -105
- package/dist/node_modules/iconv-lite/package.json +0 -70
- package/dist/node_modules/ip-address/LICENSE +0 -19
- package/dist/node_modules/ip-address/dist/address-error.js +0 -12
- package/dist/node_modules/ip-address/dist/common.js +0 -46
- package/dist/node_modules/ip-address/dist/ip-address.js +0 -35
- package/dist/node_modules/ip-address/dist/ipv4.js +0 -360
- package/dist/node_modules/ip-address/dist/ipv6.js +0 -1003
- package/dist/node_modules/ip-address/dist/v4/constants.js +0 -8
- package/dist/node_modules/ip-address/dist/v6/constants.js +0 -76
- package/dist/node_modules/ip-address/dist/v6/helpers.js +0 -45
- package/dist/node_modules/ip-address/dist/v6/regular-expressions.js +0 -95
- package/dist/node_modules/ip-address/package.json +0 -78
- package/dist/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +0 -10
- package/dist/node_modules/lru-cache/dist/commonjs/index.js +0 -1692
- package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +0 -2
- package/dist/node_modules/lru-cache/dist/commonjs/package.json +0 -3
- package/dist/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +0 -4
- package/dist/node_modules/lru-cache/dist/esm/browser/index.js +0 -1688
- package/dist/node_modules/lru-cache/dist/esm/browser/index.min.js +0 -2
- package/dist/node_modules/lru-cache/dist/esm/diagnostics-channel.js +0 -19
- package/dist/node_modules/lru-cache/dist/esm/index.js +0 -1688
- package/dist/node_modules/lru-cache/dist/esm/index.min.js +0 -2
- package/dist/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +0 -7
- package/dist/node_modules/lru-cache/dist/esm/node/index.js +0 -1688
- package/dist/node_modules/lru-cache/dist/esm/node/index.min.js +0 -2
- package/dist/node_modules/lru-cache/dist/esm/package.json +0 -3
- package/dist/node_modules/lru-cache/package.json +0 -126
- package/dist/node_modules/make-fetch-happen/LICENSE +0 -16
- package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +0 -471
- package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +0 -11
- package/dist/node_modules/make-fetch-happen/lib/cache/index.js +0 -49
- package/dist/node_modules/make-fetch-happen/lib/cache/key.js +0 -17
- package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +0 -161
- package/dist/node_modules/make-fetch-happen/lib/fetch.js +0 -118
- package/dist/node_modules/make-fetch-happen/lib/index.js +0 -41
- package/dist/node_modules/make-fetch-happen/lib/options.js +0 -59
- package/dist/node_modules/make-fetch-happen/lib/pipeline.js +0 -41
- package/dist/node_modules/make-fetch-happen/lib/remote.js +0 -134
- package/dist/node_modules/make-fetch-happen/package.json +0 -75
- package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +0 -14
- package/dist/node_modules/minimatch/dist/commonjs/ast.js +0 -845
- package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -150
- package/dist/node_modules/minimatch/dist/commonjs/escape.js +0 -30
- package/dist/node_modules/minimatch/dist/commonjs/index.js +0 -1127
- package/dist/node_modules/minimatch/dist/commonjs/package.json +0 -3
- package/dist/node_modules/minimatch/dist/commonjs/unescape.js +0 -38
- package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -10
- package/dist/node_modules/minimatch/dist/esm/ast.js +0 -841
- package/dist/node_modules/minimatch/dist/esm/brace-expressions.js +0 -146
- package/dist/node_modules/minimatch/dist/esm/escape.js +0 -26
- package/dist/node_modules/minimatch/dist/esm/index.js +0 -1114
- package/dist/node_modules/minimatch/dist/esm/package.json +0 -3
- package/dist/node_modules/minimatch/dist/esm/unescape.js +0 -34
- package/dist/node_modules/minimatch/package.json +0 -73
- package/dist/node_modules/minipass-collect/LICENSE +0 -15
- package/dist/node_modules/minipass-collect/index.js +0 -71
- package/dist/node_modules/minipass-collect/package.json +0 -30
- package/dist/node_modules/minipass-fetch/LICENSE +0 -28
- package/dist/node_modules/minipass-fetch/lib/abort-error.js +0 -17
- package/dist/node_modules/minipass-fetch/lib/blob.js +0 -97
- package/dist/node_modules/minipass-fetch/lib/body.js +0 -360
- package/dist/node_modules/minipass-fetch/lib/fetch-error.js +0 -32
- package/dist/node_modules/minipass-fetch/lib/headers.js +0 -267
- package/dist/node_modules/minipass-fetch/lib/index.js +0 -376
- package/dist/node_modules/minipass-fetch/lib/request.js +0 -282
- package/dist/node_modules/minipass-fetch/lib/response.js +0 -90
- package/dist/node_modules/minipass-fetch/package.json +0 -70
- package/dist/node_modules/minipass-flush/index.js +0 -39
- package/dist/node_modules/minipass-flush/node_modules/minipass/LICENSE +0 -15
- package/dist/node_modules/minipass-flush/node_modules/minipass/index.js +0 -649
- package/dist/node_modules/minipass-flush/node_modules/minipass/package.json +0 -56
- package/dist/node_modules/minipass-flush/package.json +0 -42
- package/dist/node_modules/minipass-pipeline/LICENSE +0 -15
- package/dist/node_modules/minipass-pipeline/index.js +0 -128
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +0 -15
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/index.js +0 -649
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/package.json +0 -56
- package/dist/node_modules/minipass-pipeline/package.json +0 -29
- package/dist/node_modules/minipass-sized/LICENSE +0 -15
- package/dist/node_modules/minipass-sized/dist/commonjs/index.js +0 -69
- package/dist/node_modules/minipass-sized/dist/commonjs/package.json +0 -3
- package/dist/node_modules/minipass-sized/dist/esm/index.js +0 -64
- package/dist/node_modules/minipass-sized/dist/esm/package.json +0 -3
- package/dist/node_modules/minipass-sized/package.json +0 -69
- package/dist/node_modules/ms/index.js +0 -162
- package/dist/node_modules/ms/package.json +0 -38
- package/dist/node_modules/negotiator/LICENSE +0 -24
- package/dist/node_modules/negotiator/index.js +0 -83
- package/dist/node_modules/negotiator/lib/charset.js +0 -169
- package/dist/node_modules/negotiator/lib/encoding.js +0 -205
- package/dist/node_modules/negotiator/lib/language.js +0 -179
- package/dist/node_modules/negotiator/lib/mediaType.js +0 -294
- package/dist/node_modules/negotiator/package.json +0 -43
- package/dist/node_modules/p-map/index.js +0 -283
- package/dist/node_modules/p-map/license +0 -9
- package/dist/node_modules/p-map/package.json +0 -57
- package/dist/node_modules/path-scurry/dist/commonjs/index.js +0 -2018
- package/dist/node_modules/path-scurry/dist/commonjs/package.json +0 -3
- package/dist/node_modules/path-scurry/dist/esm/index.js +0 -1983
- package/dist/node_modules/path-scurry/dist/esm/package.json +0 -3
- package/dist/node_modules/path-scurry/package.json +0 -72
- package/dist/node_modules/safer-buffer/dangerous.js +0 -58
- package/dist/node_modules/safer-buffer/package.json +0 -34
- package/dist/node_modules/safer-buffer/safer.js +0 -77
- package/dist/node_modules/safer-buffer/tests.js +0 -406
- package/dist/node_modules/smart-buffer/.prettierrc.yaml +0 -5
- package/dist/node_modules/smart-buffer/LICENSE +0 -20
- package/dist/node_modules/smart-buffer/build/smartbuffer.js +0 -1233
- package/dist/node_modules/smart-buffer/build/utils.js +0 -108
- package/dist/node_modules/smart-buffer/package.json +0 -79
- package/dist/node_modules/socks/.eslintrc.cjs +0 -11
- package/dist/node_modules/socks/.prettierrc.yaml +0 -7
- package/dist/node_modules/socks/LICENSE +0 -20
- package/dist/node_modules/socks/build/client/socksclient.js +0 -793
- package/dist/node_modules/socks/build/common/constants.js +0 -108
- package/dist/node_modules/socks/build/common/helpers.js +0 -167
- package/dist/node_modules/socks/build/common/receivebuffer.js +0 -43
- package/dist/node_modules/socks/build/common/util.js +0 -25
- package/dist/node_modules/socks/build/index.js +0 -18
- package/dist/node_modules/socks/package.json +0 -58
- package/dist/node_modules/socks-proxy-agent/LICENSE +0 -22
- package/dist/node_modules/socks-proxy-agent/dist/index.js +0 -195
- package/dist/node_modules/socks-proxy-agent/package.json +0 -142
- package/dist/node_modules/ssri/lib/index.js +0 -550
- package/dist/node_modules/ssri/package.json +0 -66
- package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/package.json +0 -3
- package/dist/node_modules/tar/node_modules/yallist/dist/esm/package.json +0 -3
- package/dist/node_modules/tar/node_modules/yallist/package.json +0 -68
- package/dist/node_modules/yallist/LICENSE +0 -15
- package/dist/node_modules/yallist/iterator.js +0 -8
- package/dist/node_modules/yallist/yallist.js +0 -426
- /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/commonjs/index.js +0 -0
- /package/dist/node_modules/{balanced-match → yallist}/dist/commonjs/package.json +0 -0
- /package/dist/node_modules/{tar/node_modules/yallist → yallist}/dist/esm/index.js +0 -0
- /package/dist/node_modules/{balanced-match → yallist}/dist/esm/package.json +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const Dispatcher = require('./dispatcher')
|
|
4
|
+
const {
|
|
5
|
+
ClientDestroyedError,
|
|
6
|
+
ClientClosedError,
|
|
7
|
+
InvalidArgumentError
|
|
8
|
+
} = require('../core/errors')
|
|
9
|
+
const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require('../core/symbols')
|
|
10
|
+
|
|
11
|
+
const kOnDestroyed = Symbol('onDestroyed')
|
|
12
|
+
const kOnClosed = Symbol('onClosed')
|
|
13
|
+
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
|
14
|
+
const kWebSocketOptions = Symbol('webSocketOptions')
|
|
15
|
+
|
|
16
|
+
class DispatcherBase extends Dispatcher {
|
|
17
|
+
constructor (opts) {
|
|
18
|
+
super()
|
|
19
|
+
|
|
20
|
+
this[kDestroyed] = false
|
|
21
|
+
this[kOnDestroyed] = null
|
|
22
|
+
this[kClosed] = false
|
|
23
|
+
this[kOnClosed] = []
|
|
24
|
+
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
get webSocketOptions () {
|
|
28
|
+
return {
|
|
29
|
+
maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get destroyed () {
|
|
34
|
+
return this[kDestroyed]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
get closed () {
|
|
38
|
+
return this[kClosed]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get interceptors () {
|
|
42
|
+
return this[kInterceptors]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
set interceptors (newInterceptors) {
|
|
46
|
+
if (newInterceptors) {
|
|
47
|
+
for (let i = newInterceptors.length - 1; i >= 0; i--) {
|
|
48
|
+
const interceptor = this[kInterceptors][i]
|
|
49
|
+
if (typeof interceptor !== 'function') {
|
|
50
|
+
throw new InvalidArgumentError('interceptor must be an function')
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
this[kInterceptors] = newInterceptors
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
close (callback) {
|
|
59
|
+
if (callback === undefined) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
this.close((err, data) => {
|
|
62
|
+
return err ? reject(err) : resolve(data)
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (typeof callback !== 'function') {
|
|
68
|
+
throw new InvalidArgumentError('invalid callback')
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (this[kDestroyed]) {
|
|
72
|
+
queueMicrotask(() => callback(new ClientDestroyedError(), null))
|
|
73
|
+
return
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (this[kClosed]) {
|
|
77
|
+
if (this[kOnClosed]) {
|
|
78
|
+
this[kOnClosed].push(callback)
|
|
79
|
+
} else {
|
|
80
|
+
queueMicrotask(() => callback(null, null))
|
|
81
|
+
}
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
this[kClosed] = true
|
|
86
|
+
this[kOnClosed].push(callback)
|
|
87
|
+
|
|
88
|
+
const onClosed = () => {
|
|
89
|
+
const callbacks = this[kOnClosed]
|
|
90
|
+
this[kOnClosed] = null
|
|
91
|
+
for (let i = 0; i < callbacks.length; i++) {
|
|
92
|
+
callbacks[i](null, null)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Should not error.
|
|
97
|
+
this[kClose]()
|
|
98
|
+
.then(() => this.destroy())
|
|
99
|
+
.then(() => {
|
|
100
|
+
queueMicrotask(onClosed)
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
destroy (err, callback) {
|
|
105
|
+
if (typeof err === 'function') {
|
|
106
|
+
callback = err
|
|
107
|
+
err = null
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (callback === undefined) {
|
|
111
|
+
return new Promise((resolve, reject) => {
|
|
112
|
+
this.destroy(err, (err, data) => {
|
|
113
|
+
return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data)
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (typeof callback !== 'function') {
|
|
119
|
+
throw new InvalidArgumentError('invalid callback')
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (this[kDestroyed]) {
|
|
123
|
+
if (this[kOnDestroyed]) {
|
|
124
|
+
this[kOnDestroyed].push(callback)
|
|
125
|
+
} else {
|
|
126
|
+
queueMicrotask(() => callback(null, null))
|
|
127
|
+
}
|
|
128
|
+
return
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (!err) {
|
|
132
|
+
err = new ClientDestroyedError()
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
this[kDestroyed] = true
|
|
136
|
+
this[kOnDestroyed] = this[kOnDestroyed] || []
|
|
137
|
+
this[kOnDestroyed].push(callback)
|
|
138
|
+
|
|
139
|
+
const onDestroyed = () => {
|
|
140
|
+
const callbacks = this[kOnDestroyed]
|
|
141
|
+
this[kOnDestroyed] = null
|
|
142
|
+
for (let i = 0; i < callbacks.length; i++) {
|
|
143
|
+
callbacks[i](null, null)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Should not error.
|
|
148
|
+
this[kDestroy](err).then(() => {
|
|
149
|
+
queueMicrotask(onDestroyed)
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
[kInterceptedDispatch] (opts, handler) {
|
|
154
|
+
if (!this[kInterceptors] || this[kInterceptors].length === 0) {
|
|
155
|
+
this[kInterceptedDispatch] = this[kDispatch]
|
|
156
|
+
return this[kDispatch](opts, handler)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
let dispatch = this[kDispatch].bind(this)
|
|
160
|
+
for (let i = this[kInterceptors].length - 1; i >= 0; i--) {
|
|
161
|
+
dispatch = this[kInterceptors][i](dispatch)
|
|
162
|
+
}
|
|
163
|
+
this[kInterceptedDispatch] = dispatch
|
|
164
|
+
return dispatch(opts, handler)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
dispatch (opts, handler) {
|
|
168
|
+
if (!handler || typeof handler !== 'object') {
|
|
169
|
+
throw new InvalidArgumentError('handler must be an object')
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
try {
|
|
173
|
+
if (!opts || typeof opts !== 'object') {
|
|
174
|
+
throw new InvalidArgumentError('opts must be an object.')
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (this[kDestroyed] || this[kOnDestroyed]) {
|
|
178
|
+
throw new ClientDestroyedError()
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (this[kClosed]) {
|
|
182
|
+
throw new ClientClosedError()
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return this[kInterceptedDispatch](opts, handler)
|
|
186
|
+
} catch (err) {
|
|
187
|
+
if (typeof handler.onError !== 'function') {
|
|
188
|
+
throw new InvalidArgumentError('invalid onError method')
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
handler.onError(err)
|
|
192
|
+
|
|
193
|
+
return false
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
module.exports = DispatcherBase
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
const EventEmitter = require('node:events')
|
|
3
|
+
|
|
4
|
+
class Dispatcher extends EventEmitter {
|
|
5
|
+
dispatch () {
|
|
6
|
+
throw new Error('not implemented')
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
close () {
|
|
10
|
+
throw new Error('not implemented')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
destroy () {
|
|
14
|
+
throw new Error('not implemented')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
compose (...args) {
|
|
18
|
+
// So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ...
|
|
19
|
+
const interceptors = Array.isArray(args[0]) ? args[0] : args
|
|
20
|
+
let dispatch = this.dispatch.bind(this)
|
|
21
|
+
|
|
22
|
+
for (const interceptor of interceptors) {
|
|
23
|
+
if (interceptor == null) {
|
|
24
|
+
continue
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (typeof interceptor !== 'function') {
|
|
28
|
+
throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
dispatch = interceptor(dispatch)
|
|
32
|
+
|
|
33
|
+
if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) {
|
|
34
|
+
throw new TypeError('invalid interceptor')
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return new ComposedDispatcher(this, dispatch)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class ComposedDispatcher extends Dispatcher {
|
|
43
|
+
#dispatcher = null
|
|
44
|
+
#dispatch = null
|
|
45
|
+
|
|
46
|
+
constructor (dispatcher, dispatch) {
|
|
47
|
+
super()
|
|
48
|
+
this.#dispatcher = dispatcher
|
|
49
|
+
this.#dispatch = dispatch
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
dispatch (...args) {
|
|
53
|
+
this.#dispatch(...args)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
close (...args) {
|
|
57
|
+
return this.#dispatcher.close(...args)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
destroy (...args) {
|
|
61
|
+
return this.#dispatcher.destroy(...args)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = Dispatcher
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const DispatcherBase = require('./dispatcher-base')
|
|
4
|
+
const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require('../core/symbols')
|
|
5
|
+
const ProxyAgent = require('./proxy-agent')
|
|
6
|
+
const Agent = require('./agent')
|
|
7
|
+
|
|
8
|
+
const DEFAULT_PORTS = {
|
|
9
|
+
'http:': 80,
|
|
10
|
+
'https:': 443
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let experimentalWarned = false
|
|
14
|
+
|
|
15
|
+
class EnvHttpProxyAgent extends DispatcherBase {
|
|
16
|
+
#noProxyValue = null
|
|
17
|
+
#noProxyEntries = null
|
|
18
|
+
#opts = null
|
|
19
|
+
|
|
20
|
+
constructor (opts = {}) {
|
|
21
|
+
super()
|
|
22
|
+
this.#opts = opts
|
|
23
|
+
|
|
24
|
+
if (!experimentalWarned) {
|
|
25
|
+
experimentalWarned = true
|
|
26
|
+
process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', {
|
|
27
|
+
code: 'UNDICI-EHPA'
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts
|
|
32
|
+
|
|
33
|
+
this[kNoProxyAgent] = new Agent(agentOpts)
|
|
34
|
+
|
|
35
|
+
const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY
|
|
36
|
+
if (HTTP_PROXY) {
|
|
37
|
+
this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY })
|
|
38
|
+
} else {
|
|
39
|
+
this[kHttpProxyAgent] = this[kNoProxyAgent]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY
|
|
43
|
+
if (HTTPS_PROXY) {
|
|
44
|
+
this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY })
|
|
45
|
+
} else {
|
|
46
|
+
this[kHttpsProxyAgent] = this[kHttpProxyAgent]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
this.#parseNoProxy()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[kDispatch] (opts, handler) {
|
|
53
|
+
const url = new URL(opts.origin)
|
|
54
|
+
const agent = this.#getProxyAgentForUrl(url)
|
|
55
|
+
return agent.dispatch(opts, handler)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async [kClose] () {
|
|
59
|
+
await this[kNoProxyAgent].close()
|
|
60
|
+
if (!this[kHttpProxyAgent][kClosed]) {
|
|
61
|
+
await this[kHttpProxyAgent].close()
|
|
62
|
+
}
|
|
63
|
+
if (!this[kHttpsProxyAgent][kClosed]) {
|
|
64
|
+
await this[kHttpsProxyAgent].close()
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async [kDestroy] (err) {
|
|
69
|
+
await this[kNoProxyAgent].destroy(err)
|
|
70
|
+
if (!this[kHttpProxyAgent][kDestroyed]) {
|
|
71
|
+
await this[kHttpProxyAgent].destroy(err)
|
|
72
|
+
}
|
|
73
|
+
if (!this[kHttpsProxyAgent][kDestroyed]) {
|
|
74
|
+
await this[kHttpsProxyAgent].destroy(err)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
#getProxyAgentForUrl (url) {
|
|
79
|
+
let { protocol, host: hostname, port } = url
|
|
80
|
+
|
|
81
|
+
// Stripping ports in this way instead of using parsedUrl.hostname to make
|
|
82
|
+
// sure that the brackets around IPv6 addresses are kept.
|
|
83
|
+
hostname = hostname.replace(/:\d*$/, '').toLowerCase()
|
|
84
|
+
port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0
|
|
85
|
+
if (!this.#shouldProxy(hostname, port)) {
|
|
86
|
+
return this[kNoProxyAgent]
|
|
87
|
+
}
|
|
88
|
+
if (protocol === 'https:') {
|
|
89
|
+
return this[kHttpsProxyAgent]
|
|
90
|
+
}
|
|
91
|
+
return this[kHttpProxyAgent]
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#shouldProxy (hostname, port) {
|
|
95
|
+
if (this.#noProxyChanged) {
|
|
96
|
+
this.#parseNoProxy()
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (this.#noProxyEntries.length === 0) {
|
|
100
|
+
return true // Always proxy if NO_PROXY is not set or empty.
|
|
101
|
+
}
|
|
102
|
+
if (this.#noProxyValue === '*') {
|
|
103
|
+
return false // Never proxy if wildcard is set.
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
for (let i = 0; i < this.#noProxyEntries.length; i++) {
|
|
107
|
+
const entry = this.#noProxyEntries[i]
|
|
108
|
+
if (entry.port && entry.port !== port) {
|
|
109
|
+
continue // Skip if ports don't match.
|
|
110
|
+
}
|
|
111
|
+
if (!/^[.*]/.test(entry.hostname)) {
|
|
112
|
+
// No wildcards, so don't proxy only if there is not an exact match.
|
|
113
|
+
if (hostname === entry.hostname) {
|
|
114
|
+
return false
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
// Don't proxy if the hostname ends with the no_proxy host.
|
|
118
|
+
if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) {
|
|
119
|
+
return false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return true
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#parseNoProxy () {
|
|
128
|
+
const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv
|
|
129
|
+
const noProxySplit = noProxyValue.split(/[,\s]/)
|
|
130
|
+
const noProxyEntries = []
|
|
131
|
+
|
|
132
|
+
for (let i = 0; i < noProxySplit.length; i++) {
|
|
133
|
+
const entry = noProxySplit[i]
|
|
134
|
+
if (!entry) {
|
|
135
|
+
continue
|
|
136
|
+
}
|
|
137
|
+
const parsed = entry.match(/^(.+):(\d+)$/)
|
|
138
|
+
noProxyEntries.push({
|
|
139
|
+
hostname: (parsed ? parsed[1] : entry).toLowerCase(),
|
|
140
|
+
port: parsed ? Number.parseInt(parsed[2], 10) : 0
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
this.#noProxyValue = noProxyValue
|
|
145
|
+
this.#noProxyEntries = noProxyEntries
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
get #noProxyChanged () {
|
|
149
|
+
if (this.#opts.noProxy !== undefined) {
|
|
150
|
+
return false
|
|
151
|
+
}
|
|
152
|
+
return this.#noProxyValue !== this.#noProxyEnv
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
get #noProxyEnv () {
|
|
156
|
+
return process.env.no_proxy ?? process.env.NO_PROXY ?? ''
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
module.exports = EnvHttpProxyAgent
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
'use strict'
|
|
4
|
+
|
|
5
|
+
// Extracted from node/lib/internal/fixed_queue.js
|
|
6
|
+
|
|
7
|
+
// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.
|
|
8
|
+
const kSize = 2048;
|
|
9
|
+
const kMask = kSize - 1;
|
|
10
|
+
|
|
11
|
+
// The FixedQueue is implemented as a singly-linked list of fixed-size
|
|
12
|
+
// circular buffers. It looks something like this:
|
|
13
|
+
//
|
|
14
|
+
// head tail
|
|
15
|
+
// | |
|
|
16
|
+
// v v
|
|
17
|
+
// +-----------+ <-----\ +-----------+ <------\ +-----------+
|
|
18
|
+
// | [null] | \----- | next | \------- | next |
|
|
19
|
+
// +-----------+ +-----------+ +-----------+
|
|
20
|
+
// | item | <-- bottom | item | <-- bottom | [empty] |
|
|
21
|
+
// | item | | item | | [empty] |
|
|
22
|
+
// | item | | item | | [empty] |
|
|
23
|
+
// | item | | item | | [empty] |
|
|
24
|
+
// | item | | item | bottom --> | item |
|
|
25
|
+
// | item | | item | | item |
|
|
26
|
+
// | ... | | ... | | ... |
|
|
27
|
+
// | item | | item | | item |
|
|
28
|
+
// | item | | item | | item |
|
|
29
|
+
// | [empty] | <-- top | item | | item |
|
|
30
|
+
// | [empty] | | item | | item |
|
|
31
|
+
// | [empty] | | [empty] | <-- top top --> | [empty] |
|
|
32
|
+
// +-----------+ +-----------+ +-----------+
|
|
33
|
+
//
|
|
34
|
+
// Or, if there is only one circular buffer, it looks something
|
|
35
|
+
// like either of these:
|
|
36
|
+
//
|
|
37
|
+
// head tail head tail
|
|
38
|
+
// | | | |
|
|
39
|
+
// v v v v
|
|
40
|
+
// +-----------+ +-----------+
|
|
41
|
+
// | [null] | | [null] |
|
|
42
|
+
// +-----------+ +-----------+
|
|
43
|
+
// | [empty] | | item |
|
|
44
|
+
// | [empty] | | item |
|
|
45
|
+
// | item | <-- bottom top --> | [empty] |
|
|
46
|
+
// | item | | [empty] |
|
|
47
|
+
// | [empty] | <-- top bottom --> | item |
|
|
48
|
+
// | [empty] | | item |
|
|
49
|
+
// +-----------+ +-----------+
|
|
50
|
+
//
|
|
51
|
+
// Adding a value means moving `top` forward by one, removing means
|
|
52
|
+
// moving `bottom` forward by one. After reaching the end, the queue
|
|
53
|
+
// wraps around.
|
|
54
|
+
//
|
|
55
|
+
// When `top === bottom` the current queue is empty and when
|
|
56
|
+
// `top + 1 === bottom` it's full. This wastes a single space of storage
|
|
57
|
+
// but allows much quicker checks.
|
|
58
|
+
|
|
59
|
+
class FixedCircularBuffer {
|
|
60
|
+
constructor() {
|
|
61
|
+
this.bottom = 0;
|
|
62
|
+
this.top = 0;
|
|
63
|
+
this.list = new Array(kSize);
|
|
64
|
+
this.next = null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
isEmpty() {
|
|
68
|
+
return this.top === this.bottom;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
isFull() {
|
|
72
|
+
return ((this.top + 1) & kMask) === this.bottom;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
push(data) {
|
|
76
|
+
this.list[this.top] = data;
|
|
77
|
+
this.top = (this.top + 1) & kMask;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
shift() {
|
|
81
|
+
const nextItem = this.list[this.bottom];
|
|
82
|
+
if (nextItem === undefined)
|
|
83
|
+
return null;
|
|
84
|
+
this.list[this.bottom] = undefined;
|
|
85
|
+
this.bottom = (this.bottom + 1) & kMask;
|
|
86
|
+
return nextItem;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
module.exports = class FixedQueue {
|
|
91
|
+
constructor() {
|
|
92
|
+
this.head = this.tail = new FixedCircularBuffer();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
isEmpty() {
|
|
96
|
+
return this.head.isEmpty();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
push(data) {
|
|
100
|
+
if (this.head.isFull()) {
|
|
101
|
+
// Head is full: Creates a new queue, sets the old queue's `.next` to it,
|
|
102
|
+
// and sets it as the new main queue.
|
|
103
|
+
this.head = this.head.next = new FixedCircularBuffer();
|
|
104
|
+
}
|
|
105
|
+
this.head.push(data);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
shift() {
|
|
109
|
+
const tail = this.tail;
|
|
110
|
+
const next = tail.shift();
|
|
111
|
+
if (tail.isEmpty() && tail.next !== null) {
|
|
112
|
+
// If there is another queue, it forms the new tail.
|
|
113
|
+
this.tail = tail.next;
|
|
114
|
+
}
|
|
115
|
+
return next;
|
|
116
|
+
}
|
|
117
|
+
};
|