@relative-ci/core 5.3.0-beta.0 → 5.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/lib/cjs/__/@actions/http-client/__/undici/index.js +226 -0
- package/lib/cjs/__/@actions/http-client/__/undici/index.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/abort-signal.js +73 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/abort-signal.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-connect.js +131 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-connect.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-pipeline.js +276 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-pipeline.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-request.js +238 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-request.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-stream.js +246 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-stream.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-upgrade.js +131 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-upgrade.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/index.js +25 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/index.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/readable.js +405 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/readable.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/util.js +114 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/api/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/connect.js +266 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/connect.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/constants.js +130 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/constants.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/diagnostics.js +222 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/diagnostics.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/errors.js +418 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/errors.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/request.js +417 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/request.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/symbols.js +80 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/symbols.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/tree.js +166 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/tree.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/util.js +755 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/core/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/agent.js +149 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/agent.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js +227 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js +1397 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js +768 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client.js +650 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js +206 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js +83 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js +177 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js +129 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js +211 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js +49 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool.js +126 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js +299 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js +50 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/global.js +47 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/global.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js +56 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js +237 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/retry-handler.js +395 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/retry-handler.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dns.js +397 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dns.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dump.js +139 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dump.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js +35 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect.js +38 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/retry.js +33 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/retry.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/constants.js +288 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/constants.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js +23 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js +23 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/utils.js +28 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/utils.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-agent.js +183 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-agent.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-client.js +83 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-client.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-errors.js +42 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-errors.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js +224 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-pool.js +83 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-pool.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js +35 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-utils.js +390 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-utils.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js +63 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pluralizer.js +41 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pluralizer.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/util/timers.js +435 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/util/timers.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cache.js +886 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cache.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js +169 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/symbols.js +19 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/symbols.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/util.js +65 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/constants.js +24 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/constants.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/index.js +201 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/index.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/parse.js +338 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/parse.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/util.js +294 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js +417 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js +508 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/util.js +49 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/body.js +560 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/body.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/constants.js +136 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/constants.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js +762 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js +60 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/file.js +146 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/file.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js +499 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js +275 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/global.js +52 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/global.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/headers.js +709 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/headers.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/index.js +2235 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/index.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/request.js +1069 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/request.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/response.js +640 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/response.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js +21 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/util.js +1662 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js +716 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js +302 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js +361 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js +92 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js +22 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/util.js +417 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/connection.js +391 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/connection.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/constants.js +78 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/constants.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/events.js +350 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/events.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/frame.js +110 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/frame.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js +89 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js +451 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/sender.js +120 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/sender.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js +24 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/util.js +336 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/util.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js +618 -0
- package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js.map +1 -0
- package/lib/cjs/__/@actions/http-client/lib/index.js +2 -2
- package/lib/cjs/__/@octokit/auth-token/dist-bundle/index.js.map +1 -0
- package/lib/cjs/__/@octokit/core/dist-src/index.js.map +1 -0
- package/lib/cjs/__/@octokit/core/dist-src/version.js.map +1 -0
- package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/endpoint/dist-bundle/index.js +1 -1
- package/lib/cjs/__/@octokit/endpoint/dist-bundle/index.js.map +1 -0
- package/lib/cjs/__/@octokit/graphql/dist-bundle/index.js.map +1 -0
- package/lib/cjs/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +1 -0
- package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +1 -0
- package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +1 -0
- package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +1 -0
- package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +1 -0
- package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/request/dist-bundle/index.js +5 -4
- package/lib/cjs/__/@octokit/request/dist-bundle/index.js.map +1 -0
- package/lib/cjs/__/@octokit/request-error/dist-src/index.js.map +1 -0
- package/lib/cjs/__/before-after-hook/index.js.map +1 -0
- package/lib/cjs/__/before-after-hook/lib/add.js.map +1 -0
- package/lib/cjs/__/before-after-hook/lib/register.js.map +1 -0
- package/lib/cjs/__/before-after-hook/lib/remove.js.map +1 -0
- package/lib/cjs/__/cross-spawn/index.js +1 -1
- package/lib/cjs/__/env-ci/lib/git.js +1 -1
- package/lib/cjs/__/{env-ci/__/execa → execa}/index.js +3 -3
- package/lib/cjs/__/execa/index.js.map +1 -0
- package/lib/cjs/__/execa/lib/command.js.map +1 -0
- package/lib/cjs/__/execa/lib/error.js.map +1 -0
- package/lib/cjs/__/execa/lib/promise.js.map +1 -0
- package/lib/cjs/__/execa/lib/stdio.js.map +1 -0
- package/lib/cjs/__/{env-ci/__/execa → execa}/lib/stream.js +1 -1
- package/lib/cjs/__/execa/lib/stream.js.map +1 -0
- package/lib/cjs/__/execa/lib/verbose.js.map +1 -0
- package/lib/cjs/__/get-stream/source/array-buffer.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/core.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/main.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/realtime.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/signals.js.map +1 -0
- package/lib/cjs/__/is-stream/index.js.map +1 -0
- package/lib/cjs/__/json-with-bigint/json-with-bigint.js +151 -0
- package/lib/cjs/__/json-with-bigint/json-with-bigint.js.map +1 -0
- package/lib/cjs/__/npm-run-path/__/path-key/index.js.map +1 -0
- package/lib/cjs/__/{env-ci/__/npm-run-path → npm-run-path}/index.js +1 -1
- package/lib/cjs/__/npm-run-path/index.js.map +1 -0
- package/lib/cjs/__/path-key/index.js +1 -1
- package/lib/cjs/__/signal-exit/dist/mjs/index.js.map +1 -0
- package/lib/cjs/__/signal-exit/dist/mjs/signals.js.map +1 -0
- package/lib/cjs/__/strip-final-newline/index.js.map +1 -0
- package/lib/cjs/__/undici/index.js +1 -1
- package/lib/cjs/__/undici/lib/api/api-connect.js +3 -3
- package/lib/cjs/__/undici/lib/api/api-pipeline.js +3 -3
- package/lib/cjs/__/undici/lib/api/api-request.js +3 -3
- package/lib/cjs/__/undici/lib/api/api-stream.js +3 -3
- package/lib/cjs/__/undici/lib/api/api-upgrade.js +3 -3
- package/lib/cjs/__/undici/lib/core/util.js +14 -14
- package/lib/cjs/__/undici/lib/fetch/body.js +8 -8
- package/lib/cjs/__/undici/lib/fetch/constants.js +3 -3
- package/lib/cjs/__/undici/lib/fetch/dataURL.js +5 -5
- package/lib/cjs/__/undici/lib/fetch/file.js +3 -3
- package/lib/cjs/__/undici/lib/fetch/formdata.js +3 -3
- package/lib/cjs/__/undici/lib/fetch/index.js +3 -3
- package/lib/cjs/__/undici/lib/fetch/index.js.map +1 -1
- package/lib/cjs/__/undici/lib/fetch/util.js +6 -6
- package/lib/cjs/__/undici/lib/fileapi/util.js +6 -6
- package/lib/cjs/__/undici/lib/websocket/events.js +3 -3
- package/lib/cjs/__/universal-user-agent/index.js.map +1 -0
- package/lib/cjs/_virtual/api-request2.js +6 -0
- package/lib/cjs/_virtual/api-request2.js.map +1 -0
- package/lib/cjs/_virtual/constants2.js +6 -0
- package/lib/cjs/_virtual/constants2.js.map +1 -0
- package/lib/cjs/_virtual/index10.js +2 -2
- package/lib/cjs/_virtual/index11.js +2 -2
- package/lib/cjs/_virtual/index14.js +2 -2
- package/lib/cjs/_virtual/index15.js +6 -0
- package/lib/cjs/_virtual/index15.js.map +1 -0
- package/lib/cjs/_virtual/index16.js +6 -0
- package/lib/cjs/_virtual/index16.js.map +1 -0
- package/lib/cjs/_virtual/index2.js +1 -1
- package/lib/cjs/_virtual/index3.js +1 -1
- package/lib/cjs/_virtual/index4.js +1 -1
- package/lib/cjs/_virtual/index8.js +2 -2
- package/lib/cjs/_virtual/mock-interceptor2.js +6 -0
- package/lib/cjs/_virtual/mock-interceptor2.js.map +1 -0
- package/lib/cjs/_virtual/utils4.js +6 -0
- package/lib/cjs/_virtual/utils4.js.map +1 -0
- package/lib/cjs/env/load.js +1 -1
- package/lib/cjs/env/load.js.map +1 -1
- package/lib/esm/__/@actions/http-client/__/undici/index.js +220 -0
- package/lib/esm/__/@actions/http-client/__/undici/index.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/abort-signal.js +71 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/abort-signal.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-connect.js +124 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-connect.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-pipeline.js +268 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-pipeline.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-request.js +231 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-request.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-stream.js +238 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-stream.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-upgrade.js +124 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-upgrade.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/index.js +23 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/index.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/readable.js +398 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/readable.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/util.js +108 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/api/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/connect.js +258 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/connect.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/constants.js +128 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/constants.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/diagnostics.js +215 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/diagnostics.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/errors.js +416 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/errors.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/request.js +411 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/request.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/symbols.js +78 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/symbols.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/tree.js +164 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/tree.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/util.js +742 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/core/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/agent.js +147 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/agent.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js +225 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js +1391 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js +761 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client.js +642 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js +204 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js +77 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js +175 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js +127 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js +209 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js +47 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool.js +124 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js +293 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js +48 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/global.js +45 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/global.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js +54 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js +230 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/handler/retry-handler.js +389 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/handler/retry-handler.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dns.js +390 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dns.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dump.js +137 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dump.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js +33 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect.js +36 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/retry.js +31 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/retry.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/constants.js +286 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/constants.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js +17 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js +17 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/utils.js +26 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/utils.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-agent.js +181 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-agent.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-client.js +77 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-client.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-errors.js +40 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-errors.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js +222 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-pool.js +77 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-pool.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js +33 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-utils.js +383 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-utils.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js +56 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pluralizer.js +39 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pluralizer.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/util/timers.js +433 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/util/timers.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cache.js +880 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cache.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js +167 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/symbols.js +17 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/symbols.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/util.js +59 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/constants.js +22 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/constants.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/index.js +199 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/index.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/parse.js +332 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/parse.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/util.js +292 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js +411 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js +502 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/util.js +47 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/body.js +551 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/body.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/constants.js +134 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/constants.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js +756 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js +58 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/file.js +140 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/file.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js +492 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js +268 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/global.js +50 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/global.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/headers.js +702 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/headers.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/index.js +2224 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/index.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/request.js +1061 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/request.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/response.js +633 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/response.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js +19 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/util.js +1652 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js +709 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js +300 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js +359 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js +90 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js +20 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/util.js +409 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/connection.js +389 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/connection.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/constants.js +76 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/constants.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/events.js +344 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/events.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/frame.js +108 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/frame.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js +83 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js +444 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/sender.js +118 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/sender.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js +22 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/util.js +330 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/util.js.map +1 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js +612 -0
- package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js.map +1 -0
- package/lib/esm/__/@actions/http-client/lib/index.js +2 -2
- package/lib/esm/__/@octokit/auth-token/dist-bundle/index.js.map +1 -0
- package/lib/esm/__/@octokit/core/dist-src/index.js.map +1 -0
- package/lib/esm/__/@octokit/core/dist-src/version.js.map +1 -0
- package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/endpoint/dist-bundle/index.js +1 -1
- package/lib/esm/__/@octokit/endpoint/dist-bundle/index.js.map +1 -0
- package/lib/esm/__/@octokit/graphql/dist-bundle/index.js.map +1 -0
- package/lib/esm/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +1 -0
- package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +1 -0
- package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +1 -0
- package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +1 -0
- package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +1 -0
- package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/request/dist-bundle/index.js +5 -4
- package/lib/esm/__/@octokit/request/dist-bundle/index.js.map +1 -0
- package/lib/esm/__/@octokit/request-error/dist-src/index.js.map +1 -0
- package/lib/esm/__/before-after-hook/index.js.map +1 -0
- package/lib/esm/__/before-after-hook/lib/add.js.map +1 -0
- package/lib/esm/__/before-after-hook/lib/register.js.map +1 -0
- package/lib/esm/__/before-after-hook/lib/remove.js.map +1 -0
- package/lib/esm/__/cross-spawn/index.js +1 -1
- package/lib/esm/__/env-ci/lib/git.js +1 -1
- package/lib/esm/__/{env-ci/__/execa → execa}/index.js +1 -1
- package/lib/esm/__/execa/index.js.map +1 -0
- package/lib/esm/__/execa/lib/command.js.map +1 -0
- package/lib/esm/__/execa/lib/error.js.map +1 -0
- package/lib/esm/__/execa/lib/promise.js.map +1 -0
- package/lib/esm/__/execa/lib/stdio.js.map +1 -0
- package/lib/esm/__/{env-ci/__/execa → execa}/lib/stream.js +1 -1
- package/lib/esm/__/execa/lib/stream.js.map +1 -0
- package/lib/esm/__/execa/lib/verbose.js.map +1 -0
- package/lib/esm/__/get-stream/source/array-buffer.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/core.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/main.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/realtime.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/signals.js.map +1 -0
- package/lib/esm/__/is-stream/index.js.map +1 -0
- package/lib/esm/__/java-properties/dist-node/index.js +1 -1
- package/lib/esm/__/json-with-bigint/json-with-bigint.js +148 -0
- package/lib/esm/__/json-with-bigint/json-with-bigint.js.map +1 -0
- package/lib/esm/__/npm-run-path/__/path-key/index.js.map +1 -0
- package/lib/esm/__/{env-ci/__/npm-run-path → npm-run-path}/index.js +1 -1
- package/lib/esm/__/npm-run-path/index.js.map +1 -0
- package/lib/esm/__/path-key/index.js +1 -1
- package/lib/esm/__/signal-exit/dist/mjs/index.js.map +1 -0
- package/lib/esm/__/signal-exit/dist/mjs/signals.js.map +1 -0
- package/lib/esm/__/strip-final-newline/index.js.map +1 -0
- package/lib/esm/__/undici/index.js +1 -1
- package/lib/esm/__/undici/lib/api/api-connect.js +2 -2
- package/lib/esm/__/undici/lib/api/api-pipeline.js +2 -2
- package/lib/esm/__/undici/lib/api/api-request.js +2 -2
- package/lib/esm/__/undici/lib/api/api-request.js.map +1 -1
- package/lib/esm/__/undici/lib/api/api-stream.js +2 -2
- package/lib/esm/__/undici/lib/api/api-stream.js.map +1 -1
- package/lib/esm/__/undici/lib/api/api-upgrade.js +2 -2
- package/lib/esm/__/undici/lib/api/api-upgrade.js.map +1 -1
- package/lib/esm/__/undici/lib/core/util.js +10 -10
- package/lib/esm/__/undici/lib/core/util.js.map +1 -1
- package/lib/esm/__/undici/lib/fetch/body.js +6 -6
- package/lib/esm/__/undici/lib/fetch/body.js.map +1 -1
- package/lib/esm/__/undici/lib/fetch/constants.js +2 -2
- package/lib/esm/__/undici/lib/fetch/constants.js.map +1 -1
- package/lib/esm/__/undici/lib/fetch/dataURL.js +4 -4
- package/lib/esm/__/undici/lib/fetch/dataURL.js.map +1 -1
- package/lib/esm/__/undici/lib/fetch/file.js +2 -2
- package/lib/esm/__/undici/lib/fetch/file.js.map +1 -1
- package/lib/esm/__/undici/lib/fetch/formdata.js +2 -2
- package/lib/esm/__/undici/lib/fetch/index.js +2 -2
- package/lib/esm/__/undici/lib/fetch/index.js.map +1 -1
- package/lib/esm/__/undici/lib/fetch/util.js +4 -4
- package/lib/esm/__/undici/lib/fetch/util.js.map +1 -1
- package/lib/esm/__/undici/lib/fileapi/util.js +4 -4
- package/lib/esm/__/undici/lib/fileapi/util.js.map +1 -1
- package/lib/esm/__/undici/lib/websocket/events.js +2 -2
- package/lib/esm/__/universal-user-agent/index.js.map +1 -0
- package/lib/esm/_virtual/api-request2.js +4 -0
- package/lib/esm/_virtual/api-request2.js.map +1 -0
- package/lib/esm/_virtual/constants2.js +4 -0
- package/lib/esm/_virtual/constants2.js.map +1 -0
- package/lib/esm/_virtual/index10.js +4 -2
- package/lib/esm/_virtual/index10.js.map +1 -1
- package/lib/esm/_virtual/index11.js +2 -2
- package/lib/esm/_virtual/index14.js +2 -2
- package/lib/esm/_virtual/index15.js +4 -0
- package/lib/esm/_virtual/index15.js.map +1 -0
- package/lib/esm/_virtual/index16.js +4 -0
- package/lib/esm/_virtual/index16.js.map +1 -0
- package/lib/esm/_virtual/index2.js +1 -1
- package/lib/esm/_virtual/index3.js +1 -1
- package/lib/esm/_virtual/index4.js +1 -1
- package/lib/esm/_virtual/index5.js +2 -6
- package/lib/esm/_virtual/index5.js.map +1 -1
- package/lib/esm/_virtual/index6.js +6 -2
- package/lib/esm/_virtual/index6.js.map +1 -1
- package/lib/esm/_virtual/index8.js +2 -4
- package/lib/esm/_virtual/index8.js.map +1 -1
- package/lib/esm/_virtual/index9.js +2 -2
- package/lib/esm/_virtual/mock-interceptor2.js +4 -0
- package/lib/esm/_virtual/mock-interceptor2.js.map +1 -0
- package/lib/esm/_virtual/utils4.js +4 -0
- package/lib/esm/_virtual/utils4.js.map +1 -0
- package/lib/esm/env/load.js +1 -1
- package/lib/esm/env/load.js.map +1 -1
- package/lib/types/env/load.d.ts +5 -5
- package/lib/types/utils/log-response.d.ts +5 -5
- package/lib/types/utils/logger.d.ts +5 -5
- package/package.json +9 -9
- package/lib/cjs/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/version.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/request/dist-bundle/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/@octokit/request-error/dist-src/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/before-after-hook/index.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/before-after-hook/lib/add.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/before-after-hook/lib/register.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/before-after-hook/lib/remove.js.map +0 -1
- package/lib/cjs/__/@actions/github/__/universal-user-agent/index.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/index.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/lib/command.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/lib/error.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/lib/promise.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/lib/stdio.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/lib/stream.js.map +0 -1
- package/lib/cjs/__/env-ci/__/execa/lib/verbose.js.map +0 -1
- package/lib/cjs/__/env-ci/__/get-stream/source/array-buffer.js.map +0 -1
- package/lib/cjs/__/env-ci/__/human-signals/build/src/core.js.map +0 -1
- package/lib/cjs/__/env-ci/__/human-signals/build/src/main.js.map +0 -1
- package/lib/cjs/__/env-ci/__/human-signals/build/src/realtime.js.map +0 -1
- package/lib/cjs/__/env-ci/__/human-signals/build/src/signals.js.map +0 -1
- package/lib/cjs/__/env-ci/__/is-stream/index.js.map +0 -1
- package/lib/cjs/__/env-ci/__/npm-run-path/index.js.map +0 -1
- package/lib/cjs/__/env-ci/__/path-key/index.js.map +0 -1
- package/lib/cjs/__/env-ci/__/signal-exit/dist/mjs/index.js.map +0 -1
- package/lib/cjs/__/env-ci/__/signal-exit/dist/mjs/signals.js.map +0 -1
- package/lib/cjs/__/env-ci/__/strip-final-newline/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/version.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/request/dist-bundle/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/@octokit/request-error/dist-src/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/before-after-hook/index.js.map +0 -1
- package/lib/esm/__/@actions/github/__/before-after-hook/lib/add.js.map +0 -1
- package/lib/esm/__/@actions/github/__/before-after-hook/lib/register.js.map +0 -1
- package/lib/esm/__/@actions/github/__/before-after-hook/lib/remove.js.map +0 -1
- package/lib/esm/__/@actions/github/__/universal-user-agent/index.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/index.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/lib/command.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/lib/error.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/lib/promise.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/lib/stdio.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/lib/stream.js.map +0 -1
- package/lib/esm/__/env-ci/__/execa/lib/verbose.js.map +0 -1
- package/lib/esm/__/env-ci/__/get-stream/source/array-buffer.js.map +0 -1
- package/lib/esm/__/env-ci/__/human-signals/build/src/core.js.map +0 -1
- package/lib/esm/__/env-ci/__/human-signals/build/src/main.js.map +0 -1
- package/lib/esm/__/env-ci/__/human-signals/build/src/realtime.js.map +0 -1
- package/lib/esm/__/env-ci/__/human-signals/build/src/signals.js.map +0 -1
- package/lib/esm/__/env-ci/__/is-stream/index.js.map +0 -1
- package/lib/esm/__/env-ci/__/npm-run-path/index.js.map +0 -1
- package/lib/esm/__/env-ci/__/path-key/index.js.map +0 -1
- package/lib/esm/__/env-ci/__/signal-exit/dist/mjs/index.js.map +0 -1
- package/lib/esm/__/env-ci/__/signal-exit/dist/mjs/signals.js.map +0 -1
- package/lib/esm/__/env-ci/__/strip-final-newline/index.js.map +0 -1
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/auth-token/dist-bundle/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/version.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/graphql/dist-bundle/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-paginate-rest/dist-bundle/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/version.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/request-error/dist-src/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/add.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/register.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/remove.js +0 -0
- /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/command.js +0 -0
- /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/error.js +0 -0
- /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/promise.js +0 -0
- /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/stdio.js +0 -0
- /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/verbose.js +0 -0
- /package/lib/cjs/__/{env-ci/__/get-stream → get-stream}/source/array-buffer.js +0 -0
- /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/core.js +0 -0
- /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/main.js +0 -0
- /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/realtime.js +0 -0
- /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/signals.js +0 -0
- /package/lib/cjs/__/{env-ci/__/is-stream → is-stream}/index.js +0 -0
- /package/lib/cjs/__/{env-ci → npm-run-path}/__/path-key/index.js +0 -0
- /package/lib/cjs/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/index.js +0 -0
- /package/lib/cjs/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/signals.js +0 -0
- /package/lib/cjs/__/{env-ci/__/strip-final-newline → strip-final-newline}/index.js +0 -0
- /package/lib/cjs/__/{@actions/github/__/universal-user-agent → universal-user-agent}/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/auth-token/dist-bundle/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/version.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/graphql/dist-bundle/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-paginate-rest/dist-bundle/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/version.js +0 -0
- /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/request-error/dist-src/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/add.js +0 -0
- /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/register.js +0 -0
- /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/remove.js +0 -0
- /package/lib/esm/__/{env-ci/__/execa → execa}/lib/command.js +0 -0
- /package/lib/esm/__/{env-ci/__/execa → execa}/lib/error.js +0 -0
- /package/lib/esm/__/{env-ci/__/execa → execa}/lib/promise.js +0 -0
- /package/lib/esm/__/{env-ci/__/execa → execa}/lib/stdio.js +0 -0
- /package/lib/esm/__/{env-ci/__/execa → execa}/lib/verbose.js +0 -0
- /package/lib/esm/__/{env-ci/__/get-stream → get-stream}/source/array-buffer.js +0 -0
- /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/core.js +0 -0
- /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/main.js +0 -0
- /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/realtime.js +0 -0
- /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/signals.js +0 -0
- /package/lib/esm/__/{env-ci/__/is-stream → is-stream}/index.js +0 -0
- /package/lib/esm/__/{env-ci → npm-run-path}/__/path-key/index.js +0 -0
- /package/lib/esm/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/index.js +0 -0
- /package/lib/esm/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/signals.js +0 -0
- /package/lib/esm/__/{env-ci/__/strip-final-newline → strip-final-newline}/index.js +0 -0
- /package/lib/esm/__/{@actions/github/__/universal-user-agent → universal-user-agent}/index.js +0 -0
|
@@ -0,0 +1,1391 @@
|
|
|
1
|
+
import require$$0 from 'node:assert';
|
|
2
|
+
import { __require as requireUtil } from '../core/util.js';
|
|
3
|
+
import { __require as requireDiagnostics } from '../core/diagnostics.js';
|
|
4
|
+
import { __require as requireTimers } from '../util/timers.js';
|
|
5
|
+
import { __require as requireErrors } from '../core/errors.js';
|
|
6
|
+
import { __require as requireSymbols } from '../core/symbols.js';
|
|
7
|
+
import { __require as requireConstants } from '../llhttp/constants.js';
|
|
8
|
+
import { __require as requireLlhttpWasm } from '../llhttp/llhttp-wasm.js';
|
|
9
|
+
import { __require as requireLlhttp_simdWasm } from '../llhttp/llhttp_simd-wasm.js';
|
|
10
|
+
import { __require as requireBody } from '../web/fetch/body.js';
|
|
11
|
+
|
|
12
|
+
var clientH1;
|
|
13
|
+
var hasRequiredClientH1;
|
|
14
|
+
|
|
15
|
+
function requireClientH1 () {
|
|
16
|
+
if (hasRequiredClientH1) return clientH1;
|
|
17
|
+
hasRequiredClientH1 = 1;
|
|
18
|
+
|
|
19
|
+
/* global WebAssembly */
|
|
20
|
+
|
|
21
|
+
const assert = require$$0;
|
|
22
|
+
const util = requireUtil();
|
|
23
|
+
const { channels } = requireDiagnostics();
|
|
24
|
+
const timers = requireTimers();
|
|
25
|
+
const {
|
|
26
|
+
RequestContentLengthMismatchError,
|
|
27
|
+
ResponseContentLengthMismatchError,
|
|
28
|
+
RequestAbortedError,
|
|
29
|
+
HeadersTimeoutError,
|
|
30
|
+
HeadersOverflowError,
|
|
31
|
+
SocketError,
|
|
32
|
+
InformationalError,
|
|
33
|
+
BodyTimeoutError,
|
|
34
|
+
HTTPParserError,
|
|
35
|
+
ResponseExceededMaxSizeError
|
|
36
|
+
} = requireErrors();
|
|
37
|
+
const {
|
|
38
|
+
kUrl,
|
|
39
|
+
kReset,
|
|
40
|
+
kClient,
|
|
41
|
+
kParser,
|
|
42
|
+
kBlocking,
|
|
43
|
+
kRunning,
|
|
44
|
+
kPending,
|
|
45
|
+
kSize,
|
|
46
|
+
kWriting,
|
|
47
|
+
kQueue,
|
|
48
|
+
kNoRef,
|
|
49
|
+
kKeepAliveDefaultTimeout,
|
|
50
|
+
kHostHeader,
|
|
51
|
+
kPendingIdx,
|
|
52
|
+
kRunningIdx,
|
|
53
|
+
kError,
|
|
54
|
+
kPipelining,
|
|
55
|
+
kSocket,
|
|
56
|
+
kKeepAliveTimeoutValue,
|
|
57
|
+
kMaxHeadersSize,
|
|
58
|
+
kKeepAliveMaxTimeout,
|
|
59
|
+
kKeepAliveTimeoutThreshold,
|
|
60
|
+
kHeadersTimeout,
|
|
61
|
+
kBodyTimeout,
|
|
62
|
+
kStrictContentLength,
|
|
63
|
+
kMaxRequests,
|
|
64
|
+
kCounter,
|
|
65
|
+
kMaxResponseSize,
|
|
66
|
+
kOnError,
|
|
67
|
+
kResume,
|
|
68
|
+
kHTTPContext
|
|
69
|
+
} = requireSymbols();
|
|
70
|
+
|
|
71
|
+
const constants = requireConstants();
|
|
72
|
+
const EMPTY_BUF = Buffer.alloc(0);
|
|
73
|
+
const FastBuffer = Buffer[Symbol.species];
|
|
74
|
+
const addListener = util.addListener;
|
|
75
|
+
const removeAllListeners = util.removeAllListeners;
|
|
76
|
+
|
|
77
|
+
let extractBody;
|
|
78
|
+
|
|
79
|
+
async function lazyllhttp () {
|
|
80
|
+
const llhttpWasmData = process.env.JEST_WORKER_ID ? requireLlhttpWasm() : undefined;
|
|
81
|
+
|
|
82
|
+
let mod;
|
|
83
|
+
try {
|
|
84
|
+
mod = await WebAssembly.compile(requireLlhttp_simdWasm());
|
|
85
|
+
} catch (e) {
|
|
86
|
+
/* istanbul ignore next */
|
|
87
|
+
|
|
88
|
+
// We could check if the error was caused by the simd option not
|
|
89
|
+
// being enabled, but the occurring of this other error
|
|
90
|
+
// * https://github.com/emscripten-core/emscripten/issues/11495
|
|
91
|
+
// got me to remove that check to avoid breaking Node 12.
|
|
92
|
+
mod = await WebAssembly.compile(llhttpWasmData || requireLlhttpWasm());
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return await WebAssembly.instantiate(mod, {
|
|
96
|
+
env: {
|
|
97
|
+
/* eslint-disable camelcase */
|
|
98
|
+
|
|
99
|
+
wasm_on_url: (p, at, len) => {
|
|
100
|
+
/* istanbul ignore next */
|
|
101
|
+
return 0
|
|
102
|
+
},
|
|
103
|
+
wasm_on_status: (p, at, len) => {
|
|
104
|
+
assert(currentParser.ptr === p);
|
|
105
|
+
const start = at - currentBufferPtr + currentBufferRef.byteOffset;
|
|
106
|
+
return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
|
|
107
|
+
},
|
|
108
|
+
wasm_on_message_begin: (p) => {
|
|
109
|
+
assert(currentParser.ptr === p);
|
|
110
|
+
return currentParser.onMessageBegin() || 0
|
|
111
|
+
},
|
|
112
|
+
wasm_on_header_field: (p, at, len) => {
|
|
113
|
+
assert(currentParser.ptr === p);
|
|
114
|
+
const start = at - currentBufferPtr + currentBufferRef.byteOffset;
|
|
115
|
+
return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
|
|
116
|
+
},
|
|
117
|
+
wasm_on_header_value: (p, at, len) => {
|
|
118
|
+
assert(currentParser.ptr === p);
|
|
119
|
+
const start = at - currentBufferPtr + currentBufferRef.byteOffset;
|
|
120
|
+
return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
|
|
121
|
+
},
|
|
122
|
+
wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {
|
|
123
|
+
assert(currentParser.ptr === p);
|
|
124
|
+
return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0
|
|
125
|
+
},
|
|
126
|
+
wasm_on_body: (p, at, len) => {
|
|
127
|
+
assert(currentParser.ptr === p);
|
|
128
|
+
const start = at - currentBufferPtr + currentBufferRef.byteOffset;
|
|
129
|
+
return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
|
|
130
|
+
},
|
|
131
|
+
wasm_on_message_complete: (p) => {
|
|
132
|
+
assert(currentParser.ptr === p);
|
|
133
|
+
return currentParser.onMessageComplete() || 0
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* eslint-enable camelcase */
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
let llhttpInstance = null;
|
|
142
|
+
let llhttpPromise = lazyllhttp();
|
|
143
|
+
llhttpPromise.catch();
|
|
144
|
+
|
|
145
|
+
let currentParser = null;
|
|
146
|
+
let currentBufferRef = null;
|
|
147
|
+
let currentBufferSize = 0;
|
|
148
|
+
let currentBufferPtr = null;
|
|
149
|
+
|
|
150
|
+
const USE_NATIVE_TIMER = 0;
|
|
151
|
+
const USE_FAST_TIMER = 1;
|
|
152
|
+
|
|
153
|
+
// Use fast timers for headers and body to take eventual event loop
|
|
154
|
+
// latency into account.
|
|
155
|
+
const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER;
|
|
156
|
+
const TIMEOUT_BODY = 4 | USE_FAST_TIMER;
|
|
157
|
+
|
|
158
|
+
// Use native timers to ignore event loop latency for keep-alive
|
|
159
|
+
// handling.
|
|
160
|
+
const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER;
|
|
161
|
+
|
|
162
|
+
class Parser {
|
|
163
|
+
constructor (client, socket, { exports: exports$1 }) {
|
|
164
|
+
assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0);
|
|
165
|
+
|
|
166
|
+
this.llhttp = exports$1;
|
|
167
|
+
this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE);
|
|
168
|
+
this.client = client;
|
|
169
|
+
this.socket = socket;
|
|
170
|
+
this.timeout = null;
|
|
171
|
+
this.timeoutValue = null;
|
|
172
|
+
this.timeoutType = null;
|
|
173
|
+
this.statusCode = null;
|
|
174
|
+
this.statusText = '';
|
|
175
|
+
this.upgrade = false;
|
|
176
|
+
this.headers = [];
|
|
177
|
+
this.headersSize = 0;
|
|
178
|
+
this.headersMaxSize = client[kMaxHeadersSize];
|
|
179
|
+
this.shouldKeepAlive = false;
|
|
180
|
+
this.paused = false;
|
|
181
|
+
this.resume = this.resume.bind(this);
|
|
182
|
+
|
|
183
|
+
this.bytesRead = 0;
|
|
184
|
+
|
|
185
|
+
this.keepAlive = '';
|
|
186
|
+
this.contentLength = '';
|
|
187
|
+
this.connection = '';
|
|
188
|
+
this.maxResponseSize = client[kMaxResponseSize];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
setTimeout (delay, type) {
|
|
192
|
+
// If the existing timer and the new timer are of different timer type
|
|
193
|
+
// (fast or native) or have different delay, we need to clear the existing
|
|
194
|
+
// timer and set a new one.
|
|
195
|
+
if (
|
|
196
|
+
delay !== this.timeoutValue ||
|
|
197
|
+
(type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER)
|
|
198
|
+
) {
|
|
199
|
+
// If a timeout is already set, clear it with clearTimeout of the fast
|
|
200
|
+
// timer implementation, as it can clear fast and native timers.
|
|
201
|
+
if (this.timeout) {
|
|
202
|
+
timers.clearTimeout(this.timeout);
|
|
203
|
+
this.timeout = null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (delay) {
|
|
207
|
+
if (type & USE_FAST_TIMER) {
|
|
208
|
+
this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this));
|
|
209
|
+
} else {
|
|
210
|
+
this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this));
|
|
211
|
+
this.timeout.unref();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
this.timeoutValue = delay;
|
|
216
|
+
} else if (this.timeout) {
|
|
217
|
+
// istanbul ignore else: only for jest
|
|
218
|
+
if (this.timeout.refresh) {
|
|
219
|
+
this.timeout.refresh();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
this.timeoutType = type;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
resume () {
|
|
227
|
+
if (this.socket.destroyed || !this.paused) {
|
|
228
|
+
return
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
assert(this.ptr != null);
|
|
232
|
+
assert(currentParser == null);
|
|
233
|
+
|
|
234
|
+
this.llhttp.llhttp_resume(this.ptr);
|
|
235
|
+
|
|
236
|
+
assert(this.timeoutType === TIMEOUT_BODY);
|
|
237
|
+
if (this.timeout) {
|
|
238
|
+
// istanbul ignore else: only for jest
|
|
239
|
+
if (this.timeout.refresh) {
|
|
240
|
+
this.timeout.refresh();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
this.paused = false;
|
|
245
|
+
this.execute(this.socket.read() || EMPTY_BUF); // Flush parser.
|
|
246
|
+
this.readMore();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
readMore () {
|
|
250
|
+
while (!this.paused && this.ptr) {
|
|
251
|
+
const chunk = this.socket.read();
|
|
252
|
+
if (chunk === null) {
|
|
253
|
+
break
|
|
254
|
+
}
|
|
255
|
+
this.execute(chunk);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
execute (data) {
|
|
260
|
+
assert(this.ptr != null);
|
|
261
|
+
assert(currentParser == null);
|
|
262
|
+
assert(!this.paused);
|
|
263
|
+
|
|
264
|
+
const { socket, llhttp } = this;
|
|
265
|
+
|
|
266
|
+
if (data.length > currentBufferSize) {
|
|
267
|
+
if (currentBufferPtr) {
|
|
268
|
+
llhttp.free(currentBufferPtr);
|
|
269
|
+
}
|
|
270
|
+
currentBufferSize = Math.ceil(data.length / 4096) * 4096;
|
|
271
|
+
currentBufferPtr = llhttp.malloc(currentBufferSize);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data);
|
|
275
|
+
|
|
276
|
+
// Call `execute` on the wasm parser.
|
|
277
|
+
// We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,
|
|
278
|
+
// and finally the length of bytes to parse.
|
|
279
|
+
// The return value is an error code or `constants.ERROR.OK`.
|
|
280
|
+
try {
|
|
281
|
+
let ret;
|
|
282
|
+
|
|
283
|
+
try {
|
|
284
|
+
currentBufferRef = data;
|
|
285
|
+
currentParser = this;
|
|
286
|
+
ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length);
|
|
287
|
+
/* eslint-disable-next-line no-useless-catch */
|
|
288
|
+
} catch (err) {
|
|
289
|
+
/* istanbul ignore next: difficult to make a test case for */
|
|
290
|
+
throw err
|
|
291
|
+
} finally {
|
|
292
|
+
currentParser = null;
|
|
293
|
+
currentBufferRef = null;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr;
|
|
297
|
+
|
|
298
|
+
if (ret === constants.ERROR.PAUSED_UPGRADE) {
|
|
299
|
+
this.onUpgrade(data.slice(offset));
|
|
300
|
+
} else if (ret === constants.ERROR.PAUSED) {
|
|
301
|
+
this.paused = true;
|
|
302
|
+
socket.unshift(data.slice(offset));
|
|
303
|
+
} else if (ret !== constants.ERROR.OK) {
|
|
304
|
+
const ptr = llhttp.llhttp_get_error_reason(this.ptr);
|
|
305
|
+
let message = '';
|
|
306
|
+
/* istanbul ignore else: difficult to make a test case for */
|
|
307
|
+
if (ptr) {
|
|
308
|
+
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0);
|
|
309
|
+
message =
|
|
310
|
+
'Response does not match the HTTP/1.1 protocol (' +
|
|
311
|
+
Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
|
|
312
|
+
')';
|
|
313
|
+
}
|
|
314
|
+
throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))
|
|
315
|
+
}
|
|
316
|
+
} catch (err) {
|
|
317
|
+
util.destroy(socket, err);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
destroy () {
|
|
322
|
+
assert(this.ptr != null);
|
|
323
|
+
assert(currentParser == null);
|
|
324
|
+
|
|
325
|
+
this.llhttp.llhttp_free(this.ptr);
|
|
326
|
+
this.ptr = null;
|
|
327
|
+
|
|
328
|
+
this.timeout && timers.clearTimeout(this.timeout);
|
|
329
|
+
this.timeout = null;
|
|
330
|
+
this.timeoutValue = null;
|
|
331
|
+
this.timeoutType = null;
|
|
332
|
+
|
|
333
|
+
this.paused = false;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
onStatus (buf) {
|
|
337
|
+
this.statusText = buf.toString();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
onMessageBegin () {
|
|
341
|
+
const { socket, client } = this;
|
|
342
|
+
|
|
343
|
+
/* istanbul ignore next: difficult to make a test case for */
|
|
344
|
+
if (socket.destroyed) {
|
|
345
|
+
return -1
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
349
|
+
if (!request) {
|
|
350
|
+
return -1
|
|
351
|
+
}
|
|
352
|
+
request.onResponseStarted();
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
onHeaderField (buf) {
|
|
356
|
+
const len = this.headers.length;
|
|
357
|
+
|
|
358
|
+
if ((len & 1) === 0) {
|
|
359
|
+
this.headers.push(buf);
|
|
360
|
+
} else {
|
|
361
|
+
this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
this.trackHeader(buf.length);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
onHeaderValue (buf) {
|
|
368
|
+
let len = this.headers.length;
|
|
369
|
+
|
|
370
|
+
if ((len & 1) === 1) {
|
|
371
|
+
this.headers.push(buf);
|
|
372
|
+
len += 1;
|
|
373
|
+
} else {
|
|
374
|
+
this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const key = this.headers[len - 2];
|
|
378
|
+
if (key.length === 10) {
|
|
379
|
+
const headerName = util.bufferToLowerCasedHeaderName(key);
|
|
380
|
+
if (headerName === 'keep-alive') {
|
|
381
|
+
this.keepAlive += buf.toString();
|
|
382
|
+
} else if (headerName === 'connection') {
|
|
383
|
+
this.connection += buf.toString();
|
|
384
|
+
}
|
|
385
|
+
} else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') {
|
|
386
|
+
this.contentLength += buf.toString();
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
this.trackHeader(buf.length);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
trackHeader (len) {
|
|
393
|
+
this.headersSize += len;
|
|
394
|
+
if (this.headersSize >= this.headersMaxSize) {
|
|
395
|
+
util.destroy(this.socket, new HeadersOverflowError());
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
onUpgrade (head) {
|
|
400
|
+
const { upgrade, client, socket, headers, statusCode } = this;
|
|
401
|
+
|
|
402
|
+
assert(upgrade);
|
|
403
|
+
assert(client[kSocket] === socket);
|
|
404
|
+
assert(!socket.destroyed);
|
|
405
|
+
assert(!this.paused);
|
|
406
|
+
assert((headers.length & 1) === 0);
|
|
407
|
+
|
|
408
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
409
|
+
assert(request);
|
|
410
|
+
assert(request.upgrade || request.method === 'CONNECT');
|
|
411
|
+
|
|
412
|
+
this.statusCode = null;
|
|
413
|
+
this.statusText = '';
|
|
414
|
+
this.shouldKeepAlive = null;
|
|
415
|
+
|
|
416
|
+
this.headers = [];
|
|
417
|
+
this.headersSize = 0;
|
|
418
|
+
|
|
419
|
+
socket.unshift(head);
|
|
420
|
+
|
|
421
|
+
socket[kParser].destroy();
|
|
422
|
+
socket[kParser] = null;
|
|
423
|
+
|
|
424
|
+
socket[kClient] = null;
|
|
425
|
+
socket[kError] = null;
|
|
426
|
+
|
|
427
|
+
removeAllListeners(socket);
|
|
428
|
+
|
|
429
|
+
client[kSocket] = null;
|
|
430
|
+
client[kHTTPContext] = null; // TODO (fix): This is hacky...
|
|
431
|
+
client[kQueue][client[kRunningIdx]++] = null;
|
|
432
|
+
client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'));
|
|
433
|
+
|
|
434
|
+
try {
|
|
435
|
+
request.onUpgrade(statusCode, headers, socket);
|
|
436
|
+
} catch (err) {
|
|
437
|
+
util.destroy(socket, err);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
client[kResume]();
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {
|
|
444
|
+
const { client, socket, headers, statusText } = this;
|
|
445
|
+
|
|
446
|
+
/* istanbul ignore next: difficult to make a test case for */
|
|
447
|
+
if (socket.destroyed) {
|
|
448
|
+
return -1
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
452
|
+
|
|
453
|
+
/* istanbul ignore next: difficult to make a test case for */
|
|
454
|
+
if (!request) {
|
|
455
|
+
return -1
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
assert(!this.upgrade);
|
|
459
|
+
assert(this.statusCode < 200);
|
|
460
|
+
|
|
461
|
+
if (statusCode === 100) {
|
|
462
|
+
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)));
|
|
463
|
+
return -1
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* this can only happen if server is misbehaving */
|
|
467
|
+
if (upgrade && !request.upgrade) {
|
|
468
|
+
util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)));
|
|
469
|
+
return -1
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
assert(this.timeoutType === TIMEOUT_HEADERS);
|
|
473
|
+
|
|
474
|
+
this.statusCode = statusCode;
|
|
475
|
+
this.shouldKeepAlive = (
|
|
476
|
+
shouldKeepAlive ||
|
|
477
|
+
// Override llhttp value which does not allow keepAlive for HEAD.
|
|
478
|
+
(request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')
|
|
479
|
+
);
|
|
480
|
+
|
|
481
|
+
if (this.statusCode >= 200) {
|
|
482
|
+
const bodyTimeout = request.bodyTimeout != null
|
|
483
|
+
? request.bodyTimeout
|
|
484
|
+
: client[kBodyTimeout];
|
|
485
|
+
this.setTimeout(bodyTimeout, TIMEOUT_BODY);
|
|
486
|
+
} else if (this.timeout) {
|
|
487
|
+
// istanbul ignore else: only for jest
|
|
488
|
+
if (this.timeout.refresh) {
|
|
489
|
+
this.timeout.refresh();
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if (request.method === 'CONNECT') {
|
|
494
|
+
assert(client[kRunning] === 1);
|
|
495
|
+
this.upgrade = true;
|
|
496
|
+
return 2
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (upgrade) {
|
|
500
|
+
assert(client[kRunning] === 1);
|
|
501
|
+
this.upgrade = true;
|
|
502
|
+
return 2
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
assert((this.headers.length & 1) === 0);
|
|
506
|
+
this.headers = [];
|
|
507
|
+
this.headersSize = 0;
|
|
508
|
+
|
|
509
|
+
if (this.shouldKeepAlive && client[kPipelining]) {
|
|
510
|
+
const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null;
|
|
511
|
+
|
|
512
|
+
if (keepAliveTimeout != null) {
|
|
513
|
+
const timeout = Math.min(
|
|
514
|
+
keepAliveTimeout - client[kKeepAliveTimeoutThreshold],
|
|
515
|
+
client[kKeepAliveMaxTimeout]
|
|
516
|
+
);
|
|
517
|
+
if (timeout <= 0) {
|
|
518
|
+
socket[kReset] = true;
|
|
519
|
+
} else {
|
|
520
|
+
client[kKeepAliveTimeoutValue] = timeout;
|
|
521
|
+
}
|
|
522
|
+
} else {
|
|
523
|
+
client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout];
|
|
524
|
+
}
|
|
525
|
+
} else {
|
|
526
|
+
// Stop more requests from being dispatched.
|
|
527
|
+
socket[kReset] = true;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false;
|
|
531
|
+
|
|
532
|
+
if (request.aborted) {
|
|
533
|
+
return -1
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
if (request.method === 'HEAD') {
|
|
537
|
+
return 1
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (statusCode < 200) {
|
|
541
|
+
return 1
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if (socket[kBlocking]) {
|
|
545
|
+
socket[kBlocking] = false;
|
|
546
|
+
client[kResume]();
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
return pause ? constants.ERROR.PAUSED : 0
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
onBody (buf) {
|
|
553
|
+
const { client, socket, statusCode, maxResponseSize } = this;
|
|
554
|
+
|
|
555
|
+
if (socket.destroyed) {
|
|
556
|
+
return -1
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
560
|
+
assert(request);
|
|
561
|
+
|
|
562
|
+
assert(this.timeoutType === TIMEOUT_BODY);
|
|
563
|
+
if (this.timeout) {
|
|
564
|
+
// istanbul ignore else: only for jest
|
|
565
|
+
if (this.timeout.refresh) {
|
|
566
|
+
this.timeout.refresh();
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
assert(statusCode >= 200);
|
|
571
|
+
|
|
572
|
+
if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
|
|
573
|
+
util.destroy(socket, new ResponseExceededMaxSizeError());
|
|
574
|
+
return -1
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
this.bytesRead += buf.length;
|
|
578
|
+
|
|
579
|
+
if (request.onData(buf) === false) {
|
|
580
|
+
return constants.ERROR.PAUSED
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
onMessageComplete () {
|
|
585
|
+
const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this;
|
|
586
|
+
|
|
587
|
+
if (socket.destroyed && (!statusCode || shouldKeepAlive)) {
|
|
588
|
+
return -1
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
if (upgrade) {
|
|
592
|
+
return
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
assert(statusCode >= 100);
|
|
596
|
+
assert((this.headers.length & 1) === 0);
|
|
597
|
+
|
|
598
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
599
|
+
assert(request);
|
|
600
|
+
|
|
601
|
+
this.statusCode = null;
|
|
602
|
+
this.statusText = '';
|
|
603
|
+
this.bytesRead = 0;
|
|
604
|
+
this.contentLength = '';
|
|
605
|
+
this.keepAlive = '';
|
|
606
|
+
this.connection = '';
|
|
607
|
+
|
|
608
|
+
this.headers = [];
|
|
609
|
+
this.headersSize = 0;
|
|
610
|
+
|
|
611
|
+
if (statusCode < 200) {
|
|
612
|
+
return
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/* istanbul ignore next: should be handled by llhttp? */
|
|
616
|
+
if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {
|
|
617
|
+
util.destroy(socket, new ResponseContentLengthMismatchError());
|
|
618
|
+
return -1
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
request.onComplete(headers);
|
|
622
|
+
|
|
623
|
+
client[kQueue][client[kRunningIdx]++] = null;
|
|
624
|
+
|
|
625
|
+
if (socket[kWriting]) {
|
|
626
|
+
assert(client[kRunning] === 0);
|
|
627
|
+
// Response completed before request.
|
|
628
|
+
util.destroy(socket, new InformationalError('reset'));
|
|
629
|
+
return constants.ERROR.PAUSED
|
|
630
|
+
} else if (!shouldKeepAlive) {
|
|
631
|
+
util.destroy(socket, new InformationalError('reset'));
|
|
632
|
+
return constants.ERROR.PAUSED
|
|
633
|
+
} else if (socket[kReset] && client[kRunning] === 0) {
|
|
634
|
+
// Destroy socket once all requests have completed.
|
|
635
|
+
// The request at the tail of the pipeline is the one
|
|
636
|
+
// that requested reset and no further requests should
|
|
637
|
+
// have been queued since then.
|
|
638
|
+
util.destroy(socket, new InformationalError('reset'));
|
|
639
|
+
return constants.ERROR.PAUSED
|
|
640
|
+
} else if (client[kPipelining] == null || client[kPipelining] === 1) {
|
|
641
|
+
// We must wait a full event loop cycle to reuse this socket to make sure
|
|
642
|
+
// that non-spec compliant servers are not closing the connection even if they
|
|
643
|
+
// said they won't.
|
|
644
|
+
setImmediate(() => client[kResume]());
|
|
645
|
+
} else {
|
|
646
|
+
client[kResume]();
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
function onParserTimeout (parser) {
|
|
652
|
+
const { socket, timeoutType, client, paused } = parser.deref();
|
|
653
|
+
|
|
654
|
+
/* istanbul ignore else */
|
|
655
|
+
if (timeoutType === TIMEOUT_HEADERS) {
|
|
656
|
+
if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
|
|
657
|
+
assert(!paused, 'cannot be paused while waiting for headers');
|
|
658
|
+
util.destroy(socket, new HeadersTimeoutError());
|
|
659
|
+
}
|
|
660
|
+
} else if (timeoutType === TIMEOUT_BODY) {
|
|
661
|
+
if (!paused) {
|
|
662
|
+
util.destroy(socket, new BodyTimeoutError());
|
|
663
|
+
}
|
|
664
|
+
} else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
|
|
665
|
+
assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
|
|
666
|
+
util.destroy(socket, new InformationalError('socket idle timeout'));
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
async function connectH1 (client, socket) {
|
|
671
|
+
client[kSocket] = socket;
|
|
672
|
+
|
|
673
|
+
if (!llhttpInstance) {
|
|
674
|
+
llhttpInstance = await llhttpPromise;
|
|
675
|
+
llhttpPromise = null;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
socket[kNoRef] = false;
|
|
679
|
+
socket[kWriting] = false;
|
|
680
|
+
socket[kReset] = false;
|
|
681
|
+
socket[kBlocking] = false;
|
|
682
|
+
socket[kParser] = new Parser(client, socket, llhttpInstance);
|
|
683
|
+
|
|
684
|
+
addListener(socket, 'error', function (err) {
|
|
685
|
+
assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID');
|
|
686
|
+
|
|
687
|
+
const parser = this[kParser];
|
|
688
|
+
|
|
689
|
+
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
|
690
|
+
// to the user.
|
|
691
|
+
if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
|
|
692
|
+
// We treat all incoming data so for as a valid response.
|
|
693
|
+
parser.onMessageComplete();
|
|
694
|
+
return
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
this[kError] = err;
|
|
698
|
+
|
|
699
|
+
this[kClient][kOnError](err);
|
|
700
|
+
});
|
|
701
|
+
addListener(socket, 'readable', function () {
|
|
702
|
+
const parser = this[kParser];
|
|
703
|
+
|
|
704
|
+
if (parser) {
|
|
705
|
+
parser.readMore();
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
addListener(socket, 'end', function () {
|
|
709
|
+
const parser = this[kParser];
|
|
710
|
+
|
|
711
|
+
if (parser.statusCode && !parser.shouldKeepAlive) {
|
|
712
|
+
// We treat all incoming data so far as a valid response.
|
|
713
|
+
parser.onMessageComplete();
|
|
714
|
+
return
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)));
|
|
718
|
+
});
|
|
719
|
+
addListener(socket, 'close', function () {
|
|
720
|
+
const client = this[kClient];
|
|
721
|
+
const parser = this[kParser];
|
|
722
|
+
|
|
723
|
+
if (parser) {
|
|
724
|
+
if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
|
|
725
|
+
// We treat all incoming data so far as a valid response.
|
|
726
|
+
parser.onMessageComplete();
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
this[kParser].destroy();
|
|
730
|
+
this[kParser] = null;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
const err = this[kError] || new SocketError('closed', util.getSocketInfo(this));
|
|
734
|
+
|
|
735
|
+
client[kSocket] = null;
|
|
736
|
+
client[kHTTPContext] = null; // TODO (fix): This is hacky...
|
|
737
|
+
|
|
738
|
+
if (client.destroyed) {
|
|
739
|
+
assert(client[kPending] === 0);
|
|
740
|
+
|
|
741
|
+
// Fail entire queue.
|
|
742
|
+
const requests = client[kQueue].splice(client[kRunningIdx]);
|
|
743
|
+
for (let i = 0; i < requests.length; i++) {
|
|
744
|
+
const request = requests[i];
|
|
745
|
+
util.errorRequest(client, request, err);
|
|
746
|
+
}
|
|
747
|
+
} else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {
|
|
748
|
+
// Fail head of pipeline.
|
|
749
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
750
|
+
client[kQueue][client[kRunningIdx]++] = null;
|
|
751
|
+
|
|
752
|
+
util.errorRequest(client, request, err);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
client[kPendingIdx] = client[kRunningIdx];
|
|
756
|
+
|
|
757
|
+
assert(client[kRunning] === 0);
|
|
758
|
+
|
|
759
|
+
client.emit('disconnect', client[kUrl], [client], err);
|
|
760
|
+
|
|
761
|
+
client[kResume]();
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
let closed = false;
|
|
765
|
+
socket.on('close', () => {
|
|
766
|
+
closed = true;
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
return {
|
|
770
|
+
version: 'h1',
|
|
771
|
+
defaultPipelining: 1,
|
|
772
|
+
write (...args) {
|
|
773
|
+
return writeH1(client, ...args)
|
|
774
|
+
},
|
|
775
|
+
resume () {
|
|
776
|
+
resumeH1(client);
|
|
777
|
+
},
|
|
778
|
+
destroy (err, callback) {
|
|
779
|
+
if (closed) {
|
|
780
|
+
queueMicrotask(callback);
|
|
781
|
+
} else {
|
|
782
|
+
socket.destroy(err).on('close', callback);
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
get destroyed () {
|
|
786
|
+
return socket.destroyed
|
|
787
|
+
},
|
|
788
|
+
busy (request) {
|
|
789
|
+
if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {
|
|
790
|
+
return true
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
if (request) {
|
|
794
|
+
if (client[kRunning] > 0 && !request.idempotent) {
|
|
795
|
+
// Non-idempotent request cannot be retried.
|
|
796
|
+
// Ensure that no other requests are inflight and
|
|
797
|
+
// could cause failure.
|
|
798
|
+
return true
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {
|
|
802
|
+
// Don't dispatch an upgrade until all preceding requests have completed.
|
|
803
|
+
// A misbehaving server might upgrade the connection before all pipelined
|
|
804
|
+
// request has completed.
|
|
805
|
+
return true
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&
|
|
809
|
+
(util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {
|
|
810
|
+
// Request with stream or iterator body can error while other requests
|
|
811
|
+
// are inflight and indirectly error those as well.
|
|
812
|
+
// Ensure this doesn't happen by waiting for inflight
|
|
813
|
+
// to complete before dispatching.
|
|
814
|
+
|
|
815
|
+
// Request with stream or iterator body cannot be retried.
|
|
816
|
+
// Ensure that no other requests are inflight and
|
|
817
|
+
// could cause failure.
|
|
818
|
+
return true
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
return false
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
function resumeH1 (client) {
|
|
828
|
+
const socket = client[kSocket];
|
|
829
|
+
|
|
830
|
+
if (socket && !socket.destroyed) {
|
|
831
|
+
if (client[kSize] === 0) {
|
|
832
|
+
if (!socket[kNoRef] && socket.unref) {
|
|
833
|
+
socket.unref();
|
|
834
|
+
socket[kNoRef] = true;
|
|
835
|
+
}
|
|
836
|
+
} else if (socket[kNoRef] && socket.ref) {
|
|
837
|
+
socket.ref();
|
|
838
|
+
socket[kNoRef] = false;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
if (client[kSize] === 0) {
|
|
842
|
+
if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
|
|
843
|
+
socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE);
|
|
844
|
+
}
|
|
845
|
+
} else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {
|
|
846
|
+
if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {
|
|
847
|
+
const request = client[kQueue][client[kRunningIdx]];
|
|
848
|
+
const headersTimeout = request.headersTimeout != null
|
|
849
|
+
? request.headersTimeout
|
|
850
|
+
: client[kHeadersTimeout];
|
|
851
|
+
socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2
|
|
858
|
+
function shouldSendContentLength (method) {
|
|
859
|
+
return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
function writeH1 (client, request) {
|
|
863
|
+
const { method, path, host, upgrade, blocking, reset } = request;
|
|
864
|
+
|
|
865
|
+
let { body, headers, contentLength } = request;
|
|
866
|
+
|
|
867
|
+
// https://tools.ietf.org/html/rfc7231#section-4.3.1
|
|
868
|
+
// https://tools.ietf.org/html/rfc7231#section-4.3.2
|
|
869
|
+
// https://tools.ietf.org/html/rfc7231#section-4.3.5
|
|
870
|
+
|
|
871
|
+
// Sending a payload body on a request that does not
|
|
872
|
+
// expect it can cause undefined behavior on some
|
|
873
|
+
// servers and corrupt connection state. Do not
|
|
874
|
+
// re-use the connection for further requests.
|
|
875
|
+
|
|
876
|
+
const expectsPayload = (
|
|
877
|
+
method === 'PUT' ||
|
|
878
|
+
method === 'POST' ||
|
|
879
|
+
method === 'PATCH' ||
|
|
880
|
+
method === 'QUERY' ||
|
|
881
|
+
method === 'PROPFIND' ||
|
|
882
|
+
method === 'PROPPATCH'
|
|
883
|
+
);
|
|
884
|
+
|
|
885
|
+
if (util.isFormDataLike(body)) {
|
|
886
|
+
if (!extractBody) {
|
|
887
|
+
extractBody = requireBody().extractBody;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
const [bodyStream, contentType] = extractBody(body);
|
|
891
|
+
if (request.contentType == null) {
|
|
892
|
+
headers.push('content-type', contentType);
|
|
893
|
+
}
|
|
894
|
+
body = bodyStream.stream;
|
|
895
|
+
contentLength = bodyStream.length;
|
|
896
|
+
} else if (util.isBlobLike(body) && request.contentType == null && body.type) {
|
|
897
|
+
headers.push('content-type', body.type);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
if (body && typeof body.read === 'function') {
|
|
901
|
+
// Try to read EOF in order to get length.
|
|
902
|
+
body.read(0);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
const bodyLength = util.bodyLength(body);
|
|
906
|
+
|
|
907
|
+
contentLength = bodyLength ?? contentLength;
|
|
908
|
+
|
|
909
|
+
if (contentLength === null) {
|
|
910
|
+
contentLength = request.contentLength;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
if (contentLength === 0 && !expectsPayload) {
|
|
914
|
+
// https://tools.ietf.org/html/rfc7230#section-3.3.2
|
|
915
|
+
// A user agent SHOULD NOT send a Content-Length header field when
|
|
916
|
+
// the request message does not contain a payload body and the method
|
|
917
|
+
// semantics do not anticipate such a body.
|
|
918
|
+
|
|
919
|
+
contentLength = null;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
// https://github.com/nodejs/undici/issues/2046
|
|
923
|
+
// A user agent may send a Content-Length header with 0 value, this should be allowed.
|
|
924
|
+
if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {
|
|
925
|
+
if (client[kStrictContentLength]) {
|
|
926
|
+
util.errorRequest(client, request, new RequestContentLengthMismatchError());
|
|
927
|
+
return false
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
process.emitWarning(new RequestContentLengthMismatchError());
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
const socket = client[kSocket];
|
|
934
|
+
|
|
935
|
+
const abort = (err) => {
|
|
936
|
+
if (request.aborted || request.completed) {
|
|
937
|
+
return
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
util.errorRequest(client, request, err || new RequestAbortedError());
|
|
941
|
+
|
|
942
|
+
util.destroy(body);
|
|
943
|
+
util.destroy(socket, new InformationalError('aborted'));
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
try {
|
|
947
|
+
request.onConnect(abort);
|
|
948
|
+
} catch (err) {
|
|
949
|
+
util.errorRequest(client, request, err);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
if (request.aborted) {
|
|
953
|
+
return false
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
if (method === 'HEAD') {
|
|
957
|
+
// https://github.com/mcollina/undici/issues/258
|
|
958
|
+
// Close after a HEAD request to interop with misbehaving servers
|
|
959
|
+
// that may send a body in the response.
|
|
960
|
+
|
|
961
|
+
socket[kReset] = true;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
if (upgrade || method === 'CONNECT') {
|
|
965
|
+
// On CONNECT or upgrade, block pipeline from dispatching further
|
|
966
|
+
// requests on this connection.
|
|
967
|
+
|
|
968
|
+
socket[kReset] = true;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
if (reset != null) {
|
|
972
|
+
socket[kReset] = reset;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {
|
|
976
|
+
socket[kReset] = true;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
if (blocking) {
|
|
980
|
+
socket[kBlocking] = true;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
let header = `${method} ${path} HTTP/1.1\r\n`;
|
|
984
|
+
|
|
985
|
+
if (typeof host === 'string') {
|
|
986
|
+
header += `host: ${host}\r\n`;
|
|
987
|
+
} else {
|
|
988
|
+
header += client[kHostHeader];
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
if (upgrade) {
|
|
992
|
+
header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`;
|
|
993
|
+
} else if (client[kPipelining] && !socket[kReset]) {
|
|
994
|
+
header += 'connection: keep-alive\r\n';
|
|
995
|
+
} else {
|
|
996
|
+
header += 'connection: close\r\n';
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
if (Array.isArray(headers)) {
|
|
1000
|
+
for (let n = 0; n < headers.length; n += 2) {
|
|
1001
|
+
const key = headers[n + 0];
|
|
1002
|
+
const val = headers[n + 1];
|
|
1003
|
+
|
|
1004
|
+
if (Array.isArray(val)) {
|
|
1005
|
+
for (let i = 0; i < val.length; i++) {
|
|
1006
|
+
header += `${key}: ${val[i]}\r\n`;
|
|
1007
|
+
}
|
|
1008
|
+
} else {
|
|
1009
|
+
header += `${key}: ${val}\r\n`;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (channels.sendHeaders.hasSubscribers) {
|
|
1015
|
+
channels.sendHeaders.publish({ request, headers: header, socket });
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/* istanbul ignore else: assertion */
|
|
1019
|
+
if (!body || bodyLength === 0) {
|
|
1020
|
+
writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload);
|
|
1021
|
+
} else if (util.isBuffer(body)) {
|
|
1022
|
+
writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload);
|
|
1023
|
+
} else if (util.isBlobLike(body)) {
|
|
1024
|
+
if (typeof body.stream === 'function') {
|
|
1025
|
+
writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload);
|
|
1026
|
+
} else {
|
|
1027
|
+
writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload);
|
|
1028
|
+
}
|
|
1029
|
+
} else if (util.isStream(body)) {
|
|
1030
|
+
writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload);
|
|
1031
|
+
} else if (util.isIterable(body)) {
|
|
1032
|
+
writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload);
|
|
1033
|
+
} else {
|
|
1034
|
+
assert(false);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
return true
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) {
|
|
1041
|
+
assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined');
|
|
1042
|
+
|
|
1043
|
+
let finished = false;
|
|
1044
|
+
|
|
1045
|
+
const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header });
|
|
1046
|
+
|
|
1047
|
+
const onData = function (chunk) {
|
|
1048
|
+
if (finished) {
|
|
1049
|
+
return
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
try {
|
|
1053
|
+
if (!writer.write(chunk) && this.pause) {
|
|
1054
|
+
this.pause();
|
|
1055
|
+
}
|
|
1056
|
+
} catch (err) {
|
|
1057
|
+
util.destroy(this, err);
|
|
1058
|
+
}
|
|
1059
|
+
};
|
|
1060
|
+
const onDrain = function () {
|
|
1061
|
+
if (finished) {
|
|
1062
|
+
return
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
if (body.resume) {
|
|
1066
|
+
body.resume();
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1069
|
+
const onClose = function () {
|
|
1070
|
+
// 'close' might be emitted *before* 'error' for
|
|
1071
|
+
// broken streams. Wait a tick to avoid this case.
|
|
1072
|
+
queueMicrotask(() => {
|
|
1073
|
+
// It's only safe to remove 'error' listener after
|
|
1074
|
+
// 'close'.
|
|
1075
|
+
body.removeListener('error', onFinished);
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
if (!finished) {
|
|
1079
|
+
const err = new RequestAbortedError();
|
|
1080
|
+
queueMicrotask(() => onFinished(err));
|
|
1081
|
+
}
|
|
1082
|
+
};
|
|
1083
|
+
const onFinished = function (err) {
|
|
1084
|
+
if (finished) {
|
|
1085
|
+
return
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
finished = true;
|
|
1089
|
+
|
|
1090
|
+
assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1));
|
|
1091
|
+
|
|
1092
|
+
socket
|
|
1093
|
+
.off('drain', onDrain)
|
|
1094
|
+
.off('error', onFinished);
|
|
1095
|
+
|
|
1096
|
+
body
|
|
1097
|
+
.removeListener('data', onData)
|
|
1098
|
+
.removeListener('end', onFinished)
|
|
1099
|
+
.removeListener('close', onClose);
|
|
1100
|
+
|
|
1101
|
+
if (!err) {
|
|
1102
|
+
try {
|
|
1103
|
+
writer.end();
|
|
1104
|
+
} catch (er) {
|
|
1105
|
+
err = er;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
writer.destroy(err);
|
|
1110
|
+
|
|
1111
|
+
if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {
|
|
1112
|
+
util.destroy(body, err);
|
|
1113
|
+
} else {
|
|
1114
|
+
util.destroy(body);
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
body
|
|
1119
|
+
.on('data', onData)
|
|
1120
|
+
.on('end', onFinished)
|
|
1121
|
+
.on('error', onFinished)
|
|
1122
|
+
.on('close', onClose);
|
|
1123
|
+
|
|
1124
|
+
if (body.resume) {
|
|
1125
|
+
body.resume();
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
socket
|
|
1129
|
+
.on('drain', onDrain)
|
|
1130
|
+
.on('error', onFinished);
|
|
1131
|
+
|
|
1132
|
+
if (body.errorEmitted ?? body.errored) {
|
|
1133
|
+
setImmediate(() => onFinished(body.errored));
|
|
1134
|
+
} else if (body.endEmitted ?? body.readableEnded) {
|
|
1135
|
+
setImmediate(() => onFinished(null));
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
if (body.closeEmitted ?? body.closed) {
|
|
1139
|
+
setImmediate(onClose);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) {
|
|
1144
|
+
try {
|
|
1145
|
+
if (!body) {
|
|
1146
|
+
if (contentLength === 0) {
|
|
1147
|
+
socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1');
|
|
1148
|
+
} else {
|
|
1149
|
+
assert(contentLength === null, 'no body must not have content length');
|
|
1150
|
+
socket.write(`${header}\r\n`, 'latin1');
|
|
1151
|
+
}
|
|
1152
|
+
} else if (util.isBuffer(body)) {
|
|
1153
|
+
assert(contentLength === body.byteLength, 'buffer body must have content length');
|
|
1154
|
+
|
|
1155
|
+
socket.cork();
|
|
1156
|
+
socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1');
|
|
1157
|
+
socket.write(body);
|
|
1158
|
+
socket.uncork();
|
|
1159
|
+
request.onBodySent(body);
|
|
1160
|
+
|
|
1161
|
+
if (!expectsPayload && request.reset !== false) {
|
|
1162
|
+
socket[kReset] = true;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
request.onRequestSent();
|
|
1166
|
+
|
|
1167
|
+
client[kResume]();
|
|
1168
|
+
} catch (err) {
|
|
1169
|
+
abort(err);
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) {
|
|
1174
|
+
assert(contentLength === body.size, 'blob body must have content length');
|
|
1175
|
+
|
|
1176
|
+
try {
|
|
1177
|
+
if (contentLength != null && contentLength !== body.size) {
|
|
1178
|
+
throw new RequestContentLengthMismatchError()
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
const buffer = Buffer.from(await body.arrayBuffer());
|
|
1182
|
+
|
|
1183
|
+
socket.cork();
|
|
1184
|
+
socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1');
|
|
1185
|
+
socket.write(buffer);
|
|
1186
|
+
socket.uncork();
|
|
1187
|
+
|
|
1188
|
+
request.onBodySent(buffer);
|
|
1189
|
+
request.onRequestSent();
|
|
1190
|
+
|
|
1191
|
+
if (!expectsPayload && request.reset !== false) {
|
|
1192
|
+
socket[kReset] = true;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
client[kResume]();
|
|
1196
|
+
} catch (err) {
|
|
1197
|
+
abort(err);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) {
|
|
1202
|
+
assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined');
|
|
1203
|
+
|
|
1204
|
+
let callback = null;
|
|
1205
|
+
function onDrain () {
|
|
1206
|
+
if (callback) {
|
|
1207
|
+
const cb = callback;
|
|
1208
|
+
callback = null;
|
|
1209
|
+
cb();
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
const waitForDrain = () => new Promise((resolve, reject) => {
|
|
1214
|
+
assert(callback === null);
|
|
1215
|
+
|
|
1216
|
+
if (socket[kError]) {
|
|
1217
|
+
reject(socket[kError]);
|
|
1218
|
+
} else {
|
|
1219
|
+
callback = resolve;
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
|
|
1223
|
+
socket
|
|
1224
|
+
.on('close', onDrain)
|
|
1225
|
+
.on('drain', onDrain);
|
|
1226
|
+
|
|
1227
|
+
const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header });
|
|
1228
|
+
try {
|
|
1229
|
+
// It's up to the user to somehow abort the async iterable.
|
|
1230
|
+
for await (const chunk of body) {
|
|
1231
|
+
if (socket[kError]) {
|
|
1232
|
+
throw socket[kError]
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
if (!writer.write(chunk)) {
|
|
1236
|
+
await waitForDrain();
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
writer.end();
|
|
1241
|
+
} catch (err) {
|
|
1242
|
+
writer.destroy(err);
|
|
1243
|
+
} finally {
|
|
1244
|
+
socket
|
|
1245
|
+
.off('close', onDrain)
|
|
1246
|
+
.off('drain', onDrain);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
class AsyncWriter {
|
|
1251
|
+
constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) {
|
|
1252
|
+
this.socket = socket;
|
|
1253
|
+
this.request = request;
|
|
1254
|
+
this.contentLength = contentLength;
|
|
1255
|
+
this.client = client;
|
|
1256
|
+
this.bytesWritten = 0;
|
|
1257
|
+
this.expectsPayload = expectsPayload;
|
|
1258
|
+
this.header = header;
|
|
1259
|
+
this.abort = abort;
|
|
1260
|
+
|
|
1261
|
+
socket[kWriting] = true;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
write (chunk) {
|
|
1265
|
+
const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this;
|
|
1266
|
+
|
|
1267
|
+
if (socket[kError]) {
|
|
1268
|
+
throw socket[kError]
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
if (socket.destroyed) {
|
|
1272
|
+
return false
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
const len = Buffer.byteLength(chunk);
|
|
1276
|
+
if (!len) {
|
|
1277
|
+
return true
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
// We should defer writing chunks.
|
|
1281
|
+
if (contentLength !== null && bytesWritten + len > contentLength) {
|
|
1282
|
+
if (client[kStrictContentLength]) {
|
|
1283
|
+
throw new RequestContentLengthMismatchError()
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
process.emitWarning(new RequestContentLengthMismatchError());
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
socket.cork();
|
|
1290
|
+
|
|
1291
|
+
if (bytesWritten === 0) {
|
|
1292
|
+
if (!expectsPayload && request.reset !== false) {
|
|
1293
|
+
socket[kReset] = true;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
if (contentLength === null) {
|
|
1297
|
+
socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1');
|
|
1298
|
+
} else {
|
|
1299
|
+
socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1');
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
if (contentLength === null) {
|
|
1304
|
+
socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1');
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
this.bytesWritten += len;
|
|
1308
|
+
|
|
1309
|
+
const ret = socket.write(chunk);
|
|
1310
|
+
|
|
1311
|
+
socket.uncork();
|
|
1312
|
+
|
|
1313
|
+
request.onBodySent(chunk);
|
|
1314
|
+
|
|
1315
|
+
if (!ret) {
|
|
1316
|
+
if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
|
|
1317
|
+
// istanbul ignore else: only for jest
|
|
1318
|
+
if (socket[kParser].timeout.refresh) {
|
|
1319
|
+
socket[kParser].timeout.refresh();
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
return ret
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
end () {
|
|
1328
|
+
const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this;
|
|
1329
|
+
request.onRequestSent();
|
|
1330
|
+
|
|
1331
|
+
socket[kWriting] = false;
|
|
1332
|
+
|
|
1333
|
+
if (socket[kError]) {
|
|
1334
|
+
throw socket[kError]
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
if (socket.destroyed) {
|
|
1338
|
+
return
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
if (bytesWritten === 0) {
|
|
1342
|
+
if (expectsPayload) {
|
|
1343
|
+
// https://tools.ietf.org/html/rfc7230#section-3.3.2
|
|
1344
|
+
// A user agent SHOULD send a Content-Length in a request message when
|
|
1345
|
+
// no Transfer-Encoding is sent and the request method defines a meaning
|
|
1346
|
+
// for an enclosed payload body.
|
|
1347
|
+
|
|
1348
|
+
socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1');
|
|
1349
|
+
} else {
|
|
1350
|
+
socket.write(`${header}\r\n`, 'latin1');
|
|
1351
|
+
}
|
|
1352
|
+
} else if (contentLength === null) {
|
|
1353
|
+
socket.write('\r\n0\r\n\r\n', 'latin1');
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
if (contentLength !== null && bytesWritten !== contentLength) {
|
|
1357
|
+
if (client[kStrictContentLength]) {
|
|
1358
|
+
throw new RequestContentLengthMismatchError()
|
|
1359
|
+
} else {
|
|
1360
|
+
process.emitWarning(new RequestContentLengthMismatchError());
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
|
|
1365
|
+
// istanbul ignore else: only for jest
|
|
1366
|
+
if (socket[kParser].timeout.refresh) {
|
|
1367
|
+
socket[kParser].timeout.refresh();
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
client[kResume]();
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
destroy (err) {
|
|
1375
|
+
const { socket, client, abort } = this;
|
|
1376
|
+
|
|
1377
|
+
socket[kWriting] = false;
|
|
1378
|
+
|
|
1379
|
+
if (err) {
|
|
1380
|
+
assert(client[kRunning] <= 1, 'pipeline should only contain this request');
|
|
1381
|
+
abort(err);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
clientH1 = connectH1;
|
|
1387
|
+
return clientH1;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
export { requireClientH1 as __require };
|
|
1391
|
+
//# sourceMappingURL=client-h1.js.map
|