@pnpm/exe 11.0.6 → 11.0.8
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 +4529 -3898
- package/dist/worker.js +76 -73
- 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
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* negotiator
|
|
3
|
-
* Copyright(c) 2012 Isaac Z. Schlueter
|
|
4
|
-
* Copyright(c) 2014 Federico Romero
|
|
5
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
6
|
-
* MIT Licensed
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
'use strict';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Module exports.
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
module.exports = preferredMediaTypes;
|
|
17
|
-
module.exports.preferredMediaTypes = preferredMediaTypes;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Module variables.
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Parse the Accept header.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
function parseAccept(accept) {
|
|
32
|
-
var accepts = splitMediaTypes(accept);
|
|
33
|
-
|
|
34
|
-
for (var i = 0, j = 0; i < accepts.length; i++) {
|
|
35
|
-
var mediaType = parseMediaType(accepts[i].trim(), i);
|
|
36
|
-
|
|
37
|
-
if (mediaType) {
|
|
38
|
-
accepts[j++] = mediaType;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// trim accepts
|
|
43
|
-
accepts.length = j;
|
|
44
|
-
|
|
45
|
-
return accepts;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Parse a media type from the Accept header.
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
function parseMediaType(str, i) {
|
|
54
|
-
var match = simpleMediaTypeRegExp.exec(str);
|
|
55
|
-
if (!match) return null;
|
|
56
|
-
|
|
57
|
-
var params = Object.create(null);
|
|
58
|
-
var q = 1;
|
|
59
|
-
var subtype = match[2];
|
|
60
|
-
var type = match[1];
|
|
61
|
-
|
|
62
|
-
if (match[3]) {
|
|
63
|
-
var kvps = splitParameters(match[3]).map(splitKeyValuePair);
|
|
64
|
-
|
|
65
|
-
for (var j = 0; j < kvps.length; j++) {
|
|
66
|
-
var pair = kvps[j];
|
|
67
|
-
var key = pair[0].toLowerCase();
|
|
68
|
-
var val = pair[1];
|
|
69
|
-
|
|
70
|
-
// get the value, unwrapping quotes
|
|
71
|
-
var value = val && val[0] === '"' && val[val.length - 1] === '"'
|
|
72
|
-
? val.slice(1, -1)
|
|
73
|
-
: val;
|
|
74
|
-
|
|
75
|
-
if (key === 'q') {
|
|
76
|
-
q = parseFloat(value);
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// store parameter
|
|
81
|
-
params[key] = value;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
type: type,
|
|
87
|
-
subtype: subtype,
|
|
88
|
-
params: params,
|
|
89
|
-
q: q,
|
|
90
|
-
i: i
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Get the priority of a media type.
|
|
96
|
-
* @private
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
function getMediaTypePriority(type, accepted, index) {
|
|
100
|
-
var priority = {o: -1, q: 0, s: 0};
|
|
101
|
-
|
|
102
|
-
for (var i = 0; i < accepted.length; i++) {
|
|
103
|
-
var spec = specify(type, accepted[i], index);
|
|
104
|
-
|
|
105
|
-
if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
|
|
106
|
-
priority = spec;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return priority;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Get the specificity of the media type.
|
|
115
|
-
* @private
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
function specify(type, spec, index) {
|
|
119
|
-
var p = parseMediaType(type);
|
|
120
|
-
var s = 0;
|
|
121
|
-
|
|
122
|
-
if (!p) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if(spec.type.toLowerCase() == p.type.toLowerCase()) {
|
|
127
|
-
s |= 4
|
|
128
|
-
} else if(spec.type != '*') {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
|
|
133
|
-
s |= 2
|
|
134
|
-
} else if(spec.subtype != '*') {
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
var keys = Object.keys(spec.params);
|
|
139
|
-
if (keys.length > 0) {
|
|
140
|
-
if (keys.every(function (k) {
|
|
141
|
-
return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
|
|
142
|
-
})) {
|
|
143
|
-
s |= 1
|
|
144
|
-
} else {
|
|
145
|
-
return null
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return {
|
|
150
|
-
i: index,
|
|
151
|
-
o: spec.i,
|
|
152
|
-
q: spec.q,
|
|
153
|
-
s: s,
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Get the preferred media types from an Accept header.
|
|
159
|
-
* @public
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
function preferredMediaTypes(accept, provided) {
|
|
163
|
-
// RFC 2616 sec 14.2: no header = */*
|
|
164
|
-
var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
|
|
165
|
-
|
|
166
|
-
if (!provided) {
|
|
167
|
-
// sorted list of all types
|
|
168
|
-
return accepts
|
|
169
|
-
.filter(isQuality)
|
|
170
|
-
.sort(compareSpecs)
|
|
171
|
-
.map(getFullType);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
var priorities = provided.map(function getPriority(type, index) {
|
|
175
|
-
return getMediaTypePriority(type, accepts, index);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// sorted list of accepted types
|
|
179
|
-
return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
|
|
180
|
-
return provided[priorities.indexOf(priority)];
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Compare two specs.
|
|
186
|
-
* @private
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
function compareSpecs(a, b) {
|
|
190
|
-
return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Get full type string.
|
|
195
|
-
* @private
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
function getFullType(spec) {
|
|
199
|
-
return spec.type + '/' + spec.subtype;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Check if a spec has any quality.
|
|
204
|
-
* @private
|
|
205
|
-
*/
|
|
206
|
-
|
|
207
|
-
function isQuality(spec) {
|
|
208
|
-
return spec.q > 0;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Count the number of quotes in a string.
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
function quoteCount(string) {
|
|
217
|
-
var count = 0;
|
|
218
|
-
var index = 0;
|
|
219
|
-
|
|
220
|
-
while ((index = string.indexOf('"', index)) !== -1) {
|
|
221
|
-
count++;
|
|
222
|
-
index++;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
return count;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Split a key value pair.
|
|
230
|
-
* @private
|
|
231
|
-
*/
|
|
232
|
-
|
|
233
|
-
function splitKeyValuePair(str) {
|
|
234
|
-
var index = str.indexOf('=');
|
|
235
|
-
var key;
|
|
236
|
-
var val;
|
|
237
|
-
|
|
238
|
-
if (index === -1) {
|
|
239
|
-
key = str;
|
|
240
|
-
} else {
|
|
241
|
-
key = str.slice(0, index);
|
|
242
|
-
val = str.slice(index + 1);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return [key, val];
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Split an Accept header into media types.
|
|
250
|
-
* @private
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
function splitMediaTypes(accept) {
|
|
254
|
-
var accepts = accept.split(',');
|
|
255
|
-
|
|
256
|
-
for (var i = 1, j = 0; i < accepts.length; i++) {
|
|
257
|
-
if (quoteCount(accepts[j]) % 2 == 0) {
|
|
258
|
-
accepts[++j] = accepts[i];
|
|
259
|
-
} else {
|
|
260
|
-
accepts[j] += ',' + accepts[i];
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// trim accepts
|
|
265
|
-
accepts.length = j + 1;
|
|
266
|
-
|
|
267
|
-
return accepts;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Split a string of parameters.
|
|
272
|
-
* @private
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
function splitParameters(str) {
|
|
276
|
-
var parameters = str.split(';');
|
|
277
|
-
|
|
278
|
-
for (var i = 1, j = 0; i < parameters.length; i++) {
|
|
279
|
-
if (quoteCount(parameters[j]) % 2 == 0) {
|
|
280
|
-
parameters[++j] = parameters[i];
|
|
281
|
-
} else {
|
|
282
|
-
parameters[j] += ';' + parameters[i];
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// trim parameters
|
|
287
|
-
parameters.length = j + 1;
|
|
288
|
-
|
|
289
|
-
for (var i = 0; i < parameters.length; i++) {
|
|
290
|
-
parameters[i] = parameters[i].trim();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
return parameters;
|
|
294
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "negotiator",
|
|
3
|
-
"description": "HTTP content negotiation",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"contributors": [
|
|
6
|
-
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
|
-
"Federico Romero <federico.romero@outboxlabs.com>",
|
|
8
|
-
"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
|
|
9
|
-
],
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"http",
|
|
13
|
-
"content negotiation",
|
|
14
|
-
"accept",
|
|
15
|
-
"accept-language",
|
|
16
|
-
"accept-encoding",
|
|
17
|
-
"accept-charset"
|
|
18
|
-
],
|
|
19
|
-
"repository": "jshttp/negotiator",
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "7.32.0",
|
|
22
|
-
"eslint-plugin-markdown": "2.2.1",
|
|
23
|
-
"mocha": "9.1.3",
|
|
24
|
-
"nyc": "15.1.0"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"lib/",
|
|
28
|
-
"HISTORY.md",
|
|
29
|
-
"LICENSE",
|
|
30
|
-
"index.js",
|
|
31
|
-
"README.md"
|
|
32
|
-
],
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">= 0.6"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"lint": "eslint .",
|
|
38
|
-
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
39
|
-
"test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
|
|
40
|
-
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
41
|
-
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
export default async function pMap(
|
|
2
|
-
iterable,
|
|
3
|
-
mapper,
|
|
4
|
-
{
|
|
5
|
-
concurrency = Number.POSITIVE_INFINITY,
|
|
6
|
-
stopOnError = true,
|
|
7
|
-
signal,
|
|
8
|
-
} = {},
|
|
9
|
-
) {
|
|
10
|
-
return new Promise((resolve_, reject_) => {
|
|
11
|
-
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
|
12
|
-
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (typeof mapper !== 'function') {
|
|
16
|
-
throw new TypeError('Mapper function is required');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
|
20
|
-
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const result = [];
|
|
24
|
-
const errors = [];
|
|
25
|
-
const skippedIndexesMap = new Map();
|
|
26
|
-
let isRejected = false;
|
|
27
|
-
let isResolved = false;
|
|
28
|
-
let isIterableDone = false;
|
|
29
|
-
let resolvingCount = 0;
|
|
30
|
-
let currentIndex = 0;
|
|
31
|
-
const iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
32
|
-
|
|
33
|
-
const signalListener = () => {
|
|
34
|
-
reject(signal.reason);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const cleanup = () => {
|
|
38
|
-
signal?.removeEventListener('abort', signalListener);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const resolve = value => {
|
|
42
|
-
resolve_(value);
|
|
43
|
-
cleanup();
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const reject = reason => {
|
|
47
|
-
isRejected = true;
|
|
48
|
-
isResolved = true;
|
|
49
|
-
reject_(reason);
|
|
50
|
-
cleanup();
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
if (signal) {
|
|
54
|
-
if (signal.aborted) {
|
|
55
|
-
reject(signal.reason);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
signal.addEventListener('abort', signalListener, {once: true});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const next = async () => {
|
|
62
|
-
if (isResolved) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const nextItem = await iterator.next();
|
|
67
|
-
|
|
68
|
-
const index = currentIndex;
|
|
69
|
-
currentIndex++;
|
|
70
|
-
|
|
71
|
-
// Note: `iterator.next()` can be called many times in parallel.
|
|
72
|
-
// This can cause multiple calls to this `next()` function to
|
|
73
|
-
// receive a `nextItem` with `done === true`.
|
|
74
|
-
// The shutdown logic that rejects/resolves must be protected
|
|
75
|
-
// so it runs only one time as the `skippedIndex` logic is
|
|
76
|
-
// non-idempotent.
|
|
77
|
-
if (nextItem.done) {
|
|
78
|
-
isIterableDone = true;
|
|
79
|
-
|
|
80
|
-
if (resolvingCount === 0 && !isResolved) {
|
|
81
|
-
if (!stopOnError && errors.length > 0) {
|
|
82
|
-
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
isResolved = true;
|
|
87
|
-
|
|
88
|
-
if (skippedIndexesMap.size === 0) {
|
|
89
|
-
resolve(result);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const pureResult = [];
|
|
94
|
-
|
|
95
|
-
// Support multiple `pMapSkip`'s.
|
|
96
|
-
for (const [index, value] of result.entries()) {
|
|
97
|
-
if (skippedIndexesMap.get(index) === pMapSkip) {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
pureResult.push(value);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
resolve(pureResult);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
resolvingCount++;
|
|
111
|
-
|
|
112
|
-
// Intentionally detached
|
|
113
|
-
(async () => {
|
|
114
|
-
try {
|
|
115
|
-
const element = await nextItem.value;
|
|
116
|
-
|
|
117
|
-
if (isResolved) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const value = await mapper(element, index);
|
|
122
|
-
|
|
123
|
-
// Use Map to stage the index of the element.
|
|
124
|
-
if (value === pMapSkip) {
|
|
125
|
-
skippedIndexesMap.set(index, value);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
result[index] = value;
|
|
129
|
-
|
|
130
|
-
resolvingCount--;
|
|
131
|
-
await next();
|
|
132
|
-
} catch (error) {
|
|
133
|
-
if (stopOnError) {
|
|
134
|
-
reject(error);
|
|
135
|
-
} else {
|
|
136
|
-
errors.push(error);
|
|
137
|
-
resolvingCount--;
|
|
138
|
-
|
|
139
|
-
// In that case we can't really continue regardless of `stopOnError` state
|
|
140
|
-
// since an iterable is likely to continue throwing after it throws once.
|
|
141
|
-
// If we continue calling `next()` indefinitely we will likely end up
|
|
142
|
-
// in an infinite loop of failed iteration.
|
|
143
|
-
try {
|
|
144
|
-
await next();
|
|
145
|
-
} catch (error) {
|
|
146
|
-
reject(error);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
})();
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
// Create the concurrent runners in a detached (non-awaited)
|
|
154
|
-
// promise. We need this so we can await the `next()` calls
|
|
155
|
-
// to stop creating runners before hitting the concurrency limit
|
|
156
|
-
// if the iterable has already been marked as done.
|
|
157
|
-
// NOTE: We *must* do this for async iterators otherwise we'll spin up
|
|
158
|
-
// infinite `next()` calls by default and never start the event loop.
|
|
159
|
-
(async () => {
|
|
160
|
-
for (let index = 0; index < concurrency; index++) {
|
|
161
|
-
try {
|
|
162
|
-
// eslint-disable-next-line no-await-in-loop
|
|
163
|
-
await next();
|
|
164
|
-
} catch (error) {
|
|
165
|
-
reject(error);
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (isIterableDone || isRejected) {
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
})();
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export function pMapIterable(
|
|
178
|
-
iterable,
|
|
179
|
-
mapper,
|
|
180
|
-
{
|
|
181
|
-
concurrency = Number.POSITIVE_INFINITY,
|
|
182
|
-
backpressure = concurrency,
|
|
183
|
-
} = {},
|
|
184
|
-
) {
|
|
185
|
-
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
|
186
|
-
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (typeof mapper !== 'function') {
|
|
190
|
-
throw new TypeError('Mapper function is required');
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
|
194
|
-
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {
|
|
198
|
-
throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${concurrency}) and up or \`Infinity\`, got \`${backpressure}\` (${typeof backpressure})`);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return {
|
|
202
|
-
async * [Symbol.asyncIterator]() {
|
|
203
|
-
const iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
|
|
204
|
-
|
|
205
|
-
const promises = [];
|
|
206
|
-
let pendingPromisesCount = 0;
|
|
207
|
-
let isDone = false;
|
|
208
|
-
let index = 0;
|
|
209
|
-
|
|
210
|
-
function trySpawn() {
|
|
211
|
-
if (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
pendingPromisesCount++;
|
|
216
|
-
|
|
217
|
-
const promise = (async () => {
|
|
218
|
-
const {done, value} = await iterator.next();
|
|
219
|
-
|
|
220
|
-
if (done) {
|
|
221
|
-
pendingPromisesCount--;
|
|
222
|
-
return {done: true};
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Spawn if still below concurrency and backpressure limit
|
|
226
|
-
trySpawn();
|
|
227
|
-
|
|
228
|
-
try {
|
|
229
|
-
const returnValue = await mapper(await value, index++);
|
|
230
|
-
|
|
231
|
-
pendingPromisesCount--;
|
|
232
|
-
|
|
233
|
-
if (returnValue === pMapSkip) {
|
|
234
|
-
const index = promises.indexOf(promise);
|
|
235
|
-
|
|
236
|
-
if (index > 0) {
|
|
237
|
-
promises.splice(index, 1);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// Spawn if still below backpressure limit and just dropped below concurrency limit
|
|
242
|
-
trySpawn();
|
|
243
|
-
|
|
244
|
-
return {done: false, value: returnValue};
|
|
245
|
-
} catch (error) {
|
|
246
|
-
pendingPromisesCount--;
|
|
247
|
-
isDone = true;
|
|
248
|
-
return {error};
|
|
249
|
-
}
|
|
250
|
-
})();
|
|
251
|
-
|
|
252
|
-
promises.push(promise);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
trySpawn();
|
|
256
|
-
|
|
257
|
-
while (promises.length > 0) {
|
|
258
|
-
const {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop
|
|
259
|
-
|
|
260
|
-
promises.shift();
|
|
261
|
-
|
|
262
|
-
if (error) {
|
|
263
|
-
throw error;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
if (done) {
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// Spawn if just dropped below backpressure limit and below the concurrency limit
|
|
271
|
-
trySpawn();
|
|
272
|
-
|
|
273
|
-
if (value === pMapSkip) {
|
|
274
|
-
continue;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
yield value;
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export const pMapSkip = Symbol('skip');
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "p-map",
|
|
3
|
-
"version": "7.0.4",
|
|
4
|
-
"description": "Map over promises concurrently",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/p-map",
|
|
7
|
-
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
-
"author": {
|
|
9
|
-
"name": "Sindre Sorhus",
|
|
10
|
-
"email": "sindresorhus@gmail.com",
|
|
11
|
-
"url": "https://sindresorhus.com"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"exports": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"default": "./index.js"
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": false,
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "xo && ava && tsd"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"index.js",
|
|
27
|
-
"index.d.ts"
|
|
28
|
-
],
|
|
29
|
-
"keywords": [
|
|
30
|
-
"promise",
|
|
31
|
-
"map",
|
|
32
|
-
"resolved",
|
|
33
|
-
"wait",
|
|
34
|
-
"collection",
|
|
35
|
-
"iterable",
|
|
36
|
-
"iterator",
|
|
37
|
-
"race",
|
|
38
|
-
"fulfilled",
|
|
39
|
-
"async",
|
|
40
|
-
"await",
|
|
41
|
-
"promises",
|
|
42
|
-
"concurrently",
|
|
43
|
-
"concurrency",
|
|
44
|
-
"parallel",
|
|
45
|
-
"bluebird"
|
|
46
|
-
],
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"ava": "^5.2.0",
|
|
49
|
-
"chalk": "^5.3.0",
|
|
50
|
-
"delay": "^6.0.0",
|
|
51
|
-
"in-range": "^3.0.0",
|
|
52
|
-
"random-int": "^3.0.0",
|
|
53
|
-
"time-span": "^5.1.0",
|
|
54
|
-
"tsd": "^0.29.0",
|
|
55
|
-
"xo": "^0.56.0"
|
|
56
|
-
}
|
|
57
|
-
}
|