@relative-ci/core 5.3.0-beta.1 → 5.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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,183 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var symbols = require('../core/symbols.js');
|
|
4
|
+
var agent = require('../dispatcher/agent.js');
|
|
5
|
+
var mockSymbols = require('./mock-symbols.js');
|
|
6
|
+
var mockClient = require('./mock-client.js');
|
|
7
|
+
var mockPool = require('./mock-pool.js');
|
|
8
|
+
var mockUtils = require('./mock-utils.js');
|
|
9
|
+
var errors = require('../core/errors.js');
|
|
10
|
+
var dispatcher = require('../dispatcher/dispatcher.js');
|
|
11
|
+
var pluralizer = require('./pluralizer.js');
|
|
12
|
+
var pendingInterceptorsFormatter = require('./pending-interceptors-formatter.js');
|
|
13
|
+
|
|
14
|
+
var mockAgent;
|
|
15
|
+
var hasRequiredMockAgent;
|
|
16
|
+
|
|
17
|
+
function requireMockAgent () {
|
|
18
|
+
if (hasRequiredMockAgent) return mockAgent;
|
|
19
|
+
hasRequiredMockAgent = 1;
|
|
20
|
+
|
|
21
|
+
const { kClients } = symbols.__require();
|
|
22
|
+
const Agent = agent.__require();
|
|
23
|
+
const {
|
|
24
|
+
kAgent,
|
|
25
|
+
kMockAgentSet,
|
|
26
|
+
kMockAgentGet,
|
|
27
|
+
kDispatches,
|
|
28
|
+
kIsMockActive,
|
|
29
|
+
kNetConnect,
|
|
30
|
+
kGetNetConnect,
|
|
31
|
+
kOptions,
|
|
32
|
+
kFactory
|
|
33
|
+
} = mockSymbols.__require();
|
|
34
|
+
const MockClient = mockClient.__require();
|
|
35
|
+
const MockPool = mockPool.__require();
|
|
36
|
+
const { matchValue, buildMockOptions } = mockUtils.__require();
|
|
37
|
+
const { InvalidArgumentError, UndiciError } = errors.__require();
|
|
38
|
+
const Dispatcher = dispatcher.__require();
|
|
39
|
+
const Pluralizer = pluralizer.__require();
|
|
40
|
+
const PendingInterceptorsFormatter = pendingInterceptorsFormatter.__require();
|
|
41
|
+
|
|
42
|
+
class MockAgent extends Dispatcher {
|
|
43
|
+
constructor (opts) {
|
|
44
|
+
super(opts);
|
|
45
|
+
|
|
46
|
+
this[kNetConnect] = true;
|
|
47
|
+
this[kIsMockActive] = true;
|
|
48
|
+
|
|
49
|
+
// Instantiate Agent and encapsulate
|
|
50
|
+
if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) {
|
|
51
|
+
throw new InvalidArgumentError('Argument opts.agent must implement Agent')
|
|
52
|
+
}
|
|
53
|
+
const agent = opts?.agent ? opts.agent : new Agent(opts);
|
|
54
|
+
this[kAgent] = agent;
|
|
55
|
+
|
|
56
|
+
this[kClients] = agent[kClients];
|
|
57
|
+
this[kOptions] = buildMockOptions(opts);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get (origin) {
|
|
61
|
+
let dispatcher = this[kMockAgentGet](origin);
|
|
62
|
+
|
|
63
|
+
if (!dispatcher) {
|
|
64
|
+
dispatcher = this[kFactory](origin);
|
|
65
|
+
this[kMockAgentSet](origin, dispatcher);
|
|
66
|
+
}
|
|
67
|
+
return dispatcher
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
dispatch (opts, handler) {
|
|
71
|
+
// Call MockAgent.get to perform additional setup before dispatching as normal
|
|
72
|
+
this.get(opts.origin);
|
|
73
|
+
return this[kAgent].dispatch(opts, handler)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async close () {
|
|
77
|
+
await this[kAgent].close();
|
|
78
|
+
this[kClients].clear();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
deactivate () {
|
|
82
|
+
this[kIsMockActive] = false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
activate () {
|
|
86
|
+
this[kIsMockActive] = true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
enableNetConnect (matcher) {
|
|
90
|
+
if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {
|
|
91
|
+
if (Array.isArray(this[kNetConnect])) {
|
|
92
|
+
this[kNetConnect].push(matcher);
|
|
93
|
+
} else {
|
|
94
|
+
this[kNetConnect] = [matcher];
|
|
95
|
+
}
|
|
96
|
+
} else if (typeof matcher === 'undefined') {
|
|
97
|
+
this[kNetConnect] = true;
|
|
98
|
+
} else {
|
|
99
|
+
throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
disableNetConnect () {
|
|
104
|
+
this[kNetConnect] = false;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// This is required to bypass issues caused by using global symbols - see:
|
|
108
|
+
// https://github.com/nodejs/undici/issues/1447
|
|
109
|
+
get isMockActive () {
|
|
110
|
+
return this[kIsMockActive]
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[kMockAgentSet] (origin, dispatcher) {
|
|
114
|
+
this[kClients].set(origin, dispatcher);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[kFactory] (origin) {
|
|
118
|
+
const mockOptions = Object.assign({ agent: this }, this[kOptions]);
|
|
119
|
+
return this[kOptions] && this[kOptions].connections === 1
|
|
120
|
+
? new MockClient(origin, mockOptions)
|
|
121
|
+
: new MockPool(origin, mockOptions)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[kMockAgentGet] (origin) {
|
|
125
|
+
// First check if we can immediately find it
|
|
126
|
+
const client = this[kClients].get(origin);
|
|
127
|
+
if (client) {
|
|
128
|
+
return client
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// If the origin is not a string create a dummy parent pool and return to user
|
|
132
|
+
if (typeof origin !== 'string') {
|
|
133
|
+
const dispatcher = this[kFactory]('http://localhost:9999');
|
|
134
|
+
this[kMockAgentSet](origin, dispatcher);
|
|
135
|
+
return dispatcher
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// If we match, create a pool and assign the same dispatches
|
|
139
|
+
for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) {
|
|
140
|
+
if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {
|
|
141
|
+
const dispatcher = this[kFactory](origin);
|
|
142
|
+
this[kMockAgentSet](origin, dispatcher);
|
|
143
|
+
dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches];
|
|
144
|
+
return dispatcher
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
[kGetNetConnect] () {
|
|
150
|
+
return this[kNetConnect]
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
pendingInterceptors () {
|
|
154
|
+
const mockAgentClients = this[kClients];
|
|
155
|
+
|
|
156
|
+
return Array.from(mockAgentClients.entries())
|
|
157
|
+
.flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin })))
|
|
158
|
+
.filter(({ pending }) => pending)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {
|
|
162
|
+
const pending = this.pendingInterceptors();
|
|
163
|
+
|
|
164
|
+
if (pending.length === 0) {
|
|
165
|
+
return
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length);
|
|
169
|
+
|
|
170
|
+
throw new UndiciError(`
|
|
171
|
+
${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:
|
|
172
|
+
|
|
173
|
+
${pendingInterceptorsFormatter.format(pending)}
|
|
174
|
+
`.trim())
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
mockAgent = MockAgent;
|
|
179
|
+
return mockAgent;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
exports.__require = requireMockAgent;
|
|
183
|
+
//# sourceMappingURL=mock-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-agent.js","sources":["../../../../../../../../../../../node_modules/@actions/http-client/node_modules/undici/lib/mock/mock-agent.js"],"sourcesContent":["'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../dispatcher/agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, buildMockOptions } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher/dispatcher')\nconst Pluralizer = require('./pluralizer')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\n\nclass MockAgent extends Dispatcher {\n constructor (opts) {\n super(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n\n // Instantiate Agent and encapsulate\n if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts?.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = buildMockOptions(opts)\n }\n\n get (origin) {\n let dispatcher = this[kMockAgentGet](origin)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n return this[kAgent].dispatch(opts, handler)\n }\n\n async close () {\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, dispatcher)\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const client = this[kClients].get(origin)\n if (client) {\n return client\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) {\n if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length)\n\n throw new UndiciError(`\n${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:\n\n${pendingInterceptorsFormatter.format(pending)}\n`.trim())\n }\n}\n\nmodule.exports = MockAgent\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9"],"mappings":";;;;;;;;;;;;;;;;;;;;CAEA,MAAM,EAAE,QAAQ,EAAE,GAAGA,iBAAA;AACrB,CAAA,MAAM,KAAK,GAAGC,eAAA;CACd,MAAM;AACN,GAAE,MAAM;AACR,GAAE,aAAa;AACf,GAAE,aAAa;AACf,GAAE,WAAW;AACb,GAAE,aAAa;AACf,GAAE,WAAW;AACb,GAAE,cAAc;AAChB,GAAE,QAAQ;GACR;AACF,EAAC,GAAGC,qBAAA;AACJ,CAAA,MAAM,UAAU,GAAGC,oBAAA;AACnB,CAAA,MAAM,QAAQ,GAAGC,kBAAA;AACjB,CAAA,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAGC,mBAAA;AACzC,CAAA,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,GAAGC,gBAAA;AAC9C,CAAA,MAAM,UAAU,GAAGC,oBAAA;AACnB,CAAA,MAAM,UAAU,G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AAA;;GAEE,mBAAmB,CAAC,GAAG;AACzB,KAAI,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ;;KAEtC,OAAO,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE;QACzC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,KAAK,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AACjG,QAAO,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO;AACtC,GAAA;;AAEA,GAAE,2BAA2B,CAAC,CAAC,EAAE,4BAA4B,GAAG,IAAI,4BAA4B,EAAE,EAAE,GAAG,EAAE,EAAE;AAC3G,KAAI,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB;;AAE5C,KAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;OACxB;AACN,KAAA;;AAEA,KAAI,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;;KAEzF,MAAM,IAAI,WAAW,CAAC;AAC1B,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC;;AAEvD,EAAE,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC;AAC9C,CAAC,CAAC,IAAI,EAAE;AACR,GAAA;AACA;;AAEA,CAAA,SAAc,GAAG;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var require$$1 = require('node:util');
|
|
4
|
+
var client = require('../dispatcher/client.js');
|
|
5
|
+
var mockUtils = require('./mock-utils.js');
|
|
6
|
+
var mockSymbols = require('./mock-symbols.js');
|
|
7
|
+
var mockInterceptor = require('./mock-interceptor.js');
|
|
8
|
+
var symbols = require('../core/symbols.js');
|
|
9
|
+
var errors = require('../core/errors.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var require$$1__default = /*#__PURE__*/_interopDefault(require$$1);
|
|
14
|
+
|
|
15
|
+
var mockClient;
|
|
16
|
+
var hasRequiredMockClient;
|
|
17
|
+
|
|
18
|
+
function requireMockClient () {
|
|
19
|
+
if (hasRequiredMockClient) return mockClient;
|
|
20
|
+
hasRequiredMockClient = 1;
|
|
21
|
+
|
|
22
|
+
const { promisify } = require$$1__default.default;
|
|
23
|
+
const Client = client.__require();
|
|
24
|
+
const { buildMockDispatch } = mockUtils.__require();
|
|
25
|
+
const {
|
|
26
|
+
kDispatches,
|
|
27
|
+
kMockAgent,
|
|
28
|
+
kClose,
|
|
29
|
+
kOriginalClose,
|
|
30
|
+
kOrigin,
|
|
31
|
+
kOriginalDispatch,
|
|
32
|
+
kConnected
|
|
33
|
+
} = mockSymbols.__require();
|
|
34
|
+
const { MockInterceptor } = mockInterceptor.__require();
|
|
35
|
+
const Symbols = symbols.__require();
|
|
36
|
+
const { InvalidArgumentError } = errors.__require();
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* MockClient provides an API that extends the Client to influence the mockDispatches.
|
|
40
|
+
*/
|
|
41
|
+
class MockClient extends Client {
|
|
42
|
+
constructor (origin, opts) {
|
|
43
|
+
super(origin, opts);
|
|
44
|
+
|
|
45
|
+
if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {
|
|
46
|
+
throw new InvalidArgumentError('Argument opts.agent must implement Agent')
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
this[kMockAgent] = opts.agent;
|
|
50
|
+
this[kOrigin] = origin;
|
|
51
|
+
this[kDispatches] = [];
|
|
52
|
+
this[kConnected] = 1;
|
|
53
|
+
this[kOriginalDispatch] = this.dispatch;
|
|
54
|
+
this[kOriginalClose] = this.close.bind(this);
|
|
55
|
+
|
|
56
|
+
this.dispatch = buildMockDispatch.call(this);
|
|
57
|
+
this.close = this[kClose];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get [Symbols.kConnected] () {
|
|
61
|
+
return this[kConnected]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Sets up the base interceptor for mocking replies from undici.
|
|
66
|
+
*/
|
|
67
|
+
intercept (opts) {
|
|
68
|
+
return new MockInterceptor(opts, this[kDispatches])
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async [kClose] () {
|
|
72
|
+
await promisify(this[kOriginalClose])();
|
|
73
|
+
this[kConnected] = 0;
|
|
74
|
+
this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
mockClient = MockClient;
|
|
79
|
+
return mockClient;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
exports.__require = requireMockClient;
|
|
83
|
+
//# sourceMappingURL=mock-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-client.js","sources":["../../../../../../../../../../../node_modules/@actions/http-client/node_modules/undici/lib/mock/mock-client.js"],"sourcesContent":["'use strict'\n\nconst { promisify } = require('node:util')\nconst Client = require('../dispatcher/client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6"],"mappings":";;;;;;;;;;;;;;;;;;;;;CAEA,MAAM,EAAE,SAAS,EAAE,GAAGA;AACtB,CAAA,MAAM,MAAM,GAAGC,gBAAA;CACf,MAAM,EAAE,iBAAiB,EAAE,GAAGC,mBAAA;CAC9B,MAAM;AACN,GAAE,WAAW;AACb,GAAE,UAAU;AACZ,GAAE,MAAM;AACR,GAAE,cAAc;AAChB,GAAE,OAAO;AACT,GAAE,iBAAiB;GACjB;AACF,EAAC,GAAGC,qBAAA;CACJ,MAAM,EAAE,eAAe,EAAE,GAAGC,yBAAA;AAC5B,CAAA,MAAM,OAAO,GAAGC,iBAAA;CAChB,MAAM,EAAE,oBAAoB,EAAE,GAAGC,gBAAA;;AAEjC;AACA;AACA;CACA,MAAM,UAAU,SAAS,MAAM,CAAC;AAChC,GAAE,WAAW,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE;AAC7B,KAAI,KAAK,CAAC,MAAM,EAAE,IAAI;;AAEtB,KAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,UAAU,EAAE;AAC3E,OAAM,MAAM,IAAI,oBAAoB,CAAC,0CAA0C;AAC/E,KAAA;;AAEA,KAAI,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;AAC5B,KAAI,IAAI,CAAC,OAAO,CAAC,GAAG;AACpB,KAAI,IAAI,CAAC,WAAW,CAAC,GAAG;AACxB,KAAI,IAAI,CAAC,UAAU,CAAC,GAAG;AACvB,KAAI,IAAI,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;KAC/B,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;;KAE3C,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI;AAC/C,KAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM;AAC5B,GAAA;;AAEA,GAAE,KAAK,OAAO,CAAC,UAAU,EAAE,GAAG;KAC1B,OAAO,IAAI,CAAC,UAAU;AAC1B,GAAA;;AAEA;AACA;AACA;AACA,GAAE,SAAS,CAAC,CAAC,IAAI,EAAE;KACf,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC;AACtD,GAAA;;GAEE,OAAO,MAAM,EAAE,GAAG;AACpB,KAAI,MAAM,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACzC,KAAI,IAAI,CAAC,UAAU,CAAC,GAAG;AACvB,KAAI,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAC3D,GAAA;AACA;;AAEA,CAAA,UAAc,GAAG;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var errors = require('../core/errors.js');
|
|
4
|
+
|
|
5
|
+
var mockErrors;
|
|
6
|
+
var hasRequiredMockErrors;
|
|
7
|
+
|
|
8
|
+
function requireMockErrors () {
|
|
9
|
+
if (hasRequiredMockErrors) return mockErrors;
|
|
10
|
+
hasRequiredMockErrors = 1;
|
|
11
|
+
|
|
12
|
+
const { UndiciError } = errors.__require();
|
|
13
|
+
|
|
14
|
+
const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The request does not match any registered mock dispatches.
|
|
18
|
+
*/
|
|
19
|
+
class MockNotMatchedError extends UndiciError {
|
|
20
|
+
constructor (message) {
|
|
21
|
+
super(message);
|
|
22
|
+
Error.captureStackTrace(this, MockNotMatchedError);
|
|
23
|
+
this.name = 'MockNotMatchedError';
|
|
24
|
+
this.message = message || 'The request does not match any registered mock dispatches';
|
|
25
|
+
this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static [Symbol.hasInstance] (instance) {
|
|
29
|
+
return instance && instance[kMockNotMatchedError] === true
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[kMockNotMatchedError] = true
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
mockErrors = {
|
|
36
|
+
MockNotMatchedError
|
|
37
|
+
};
|
|
38
|
+
return mockErrors;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
exports.__require = requireMockErrors;
|
|
42
|
+
//# sourceMappingURL=mock-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-errors.js","sources":["../../../../../../../../../../../node_modules/@actions/http-client/node_modules/undici/lib/mock/mock-errors.js"],"sourcesContent":["'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nconst kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED')\n\n/**\n * The request does not match any registered mock dispatches.\n */\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, MockNotMatchedError)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMockNotMatchedError] === true\n }\n\n [kMockNotMatchedError] = true\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n"],"names":["require$$0"],"mappings":";;;;;;;;;;;CAEA,MAAM,EAAE,WAAW,EAAE,GAAGA,gBAAA;;AAExB,CAAA,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,4CAA4C;;AAEpF;AACA;AACA;CACA,MAAM,mBAAmB,SAAS,WAAW,CAAC;AAC9C,GAAE,WAAW,CAAC,CAAC,OAAO,EAAE;KACpB,KAAK,CAAC,OAAO;AACjB,KAAI,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,mBAAmB;KACjD,IAAI,CAAC,IAAI,GAAG;AAChB,KAAI,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI;KAC1B,IAAI,CAAC,IAAI,GAAG;AAChB,GAAA;;AAEA,GAAE,QAAQ,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;AACzC,KAAI,OAAO,QAAQ,IAAI,QAAQ,CAAC,oBAAoB,CAAC,KAAK;AAC1D,GAAA;;GAEE,CAAC,oBAAoB,IAAI;AAC3B;;AAEA,CAAA,UAAc,GAAG;GACf;AACF;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var mockInterceptor = require('../../../../../../../_virtual/mock-interceptor2.js');
|
|
4
|
+
var mockUtils = require('./mock-utils.js');
|
|
5
|
+
var mockSymbols = require('./mock-symbols.js');
|
|
6
|
+
var errors = require('../core/errors.js');
|
|
7
|
+
var util = require('../core/util.js');
|
|
8
|
+
|
|
9
|
+
var hasRequiredMockInterceptor;
|
|
10
|
+
|
|
11
|
+
function requireMockInterceptor () {
|
|
12
|
+
if (hasRequiredMockInterceptor) return mockInterceptor.__exports;
|
|
13
|
+
hasRequiredMockInterceptor = 1;
|
|
14
|
+
|
|
15
|
+
const { getResponseData, buildKey, addMockDispatch } = mockUtils.__require();
|
|
16
|
+
const {
|
|
17
|
+
kDispatches,
|
|
18
|
+
kDispatchKey,
|
|
19
|
+
kDefaultHeaders,
|
|
20
|
+
kDefaultTrailers,
|
|
21
|
+
kContentLength,
|
|
22
|
+
kMockDispatch
|
|
23
|
+
} = mockSymbols.__require();
|
|
24
|
+
const { InvalidArgumentError } = errors.__require();
|
|
25
|
+
const { buildURL } = util.__require();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Defines the scope API for an interceptor reply
|
|
29
|
+
*/
|
|
30
|
+
class MockScope {
|
|
31
|
+
constructor (mockDispatch) {
|
|
32
|
+
this[kMockDispatch] = mockDispatch;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Delay a reply by a set amount in ms.
|
|
37
|
+
*/
|
|
38
|
+
delay (waitInMs) {
|
|
39
|
+
if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {
|
|
40
|
+
throw new InvalidArgumentError('waitInMs must be a valid integer > 0')
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this[kMockDispatch].delay = waitInMs;
|
|
44
|
+
return this
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* For a defined reply, never mark as consumed.
|
|
49
|
+
*/
|
|
50
|
+
persist () {
|
|
51
|
+
this[kMockDispatch].persist = true;
|
|
52
|
+
return this
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Allow one to define a reply for a set amount of matching requests.
|
|
57
|
+
*/
|
|
58
|
+
times (repeatTimes) {
|
|
59
|
+
if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {
|
|
60
|
+
throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
this[kMockDispatch].times = repeatTimes;
|
|
64
|
+
return this
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Defines an interceptor for a Mock
|
|
70
|
+
*/
|
|
71
|
+
class MockInterceptor {
|
|
72
|
+
constructor (opts, mockDispatches) {
|
|
73
|
+
if (typeof opts !== 'object') {
|
|
74
|
+
throw new InvalidArgumentError('opts must be an object')
|
|
75
|
+
}
|
|
76
|
+
if (typeof opts.path === 'undefined') {
|
|
77
|
+
throw new InvalidArgumentError('opts.path must be defined')
|
|
78
|
+
}
|
|
79
|
+
if (typeof opts.method === 'undefined') {
|
|
80
|
+
opts.method = 'GET';
|
|
81
|
+
}
|
|
82
|
+
// See https://github.com/nodejs/undici/issues/1245
|
|
83
|
+
// As per RFC 3986, clients are not supposed to send URI
|
|
84
|
+
// fragments to servers when they retrieve a document,
|
|
85
|
+
if (typeof opts.path === 'string') {
|
|
86
|
+
if (opts.query) {
|
|
87
|
+
opts.path = buildURL(opts.path, opts.query);
|
|
88
|
+
} else {
|
|
89
|
+
// Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811
|
|
90
|
+
const parsedURL = new URL(opts.path, 'data://');
|
|
91
|
+
opts.path = parsedURL.pathname + parsedURL.search;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (typeof opts.method === 'string') {
|
|
95
|
+
opts.method = opts.method.toUpperCase();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
this[kDispatchKey] = buildKey(opts);
|
|
99
|
+
this[kDispatches] = mockDispatches;
|
|
100
|
+
this[kDefaultHeaders] = {};
|
|
101
|
+
this[kDefaultTrailers] = {};
|
|
102
|
+
this[kContentLength] = false;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
createMockScopeDispatchData ({ statusCode, data, responseOptions }) {
|
|
106
|
+
const responseData = getResponseData(data);
|
|
107
|
+
const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {};
|
|
108
|
+
const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers };
|
|
109
|
+
const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers };
|
|
110
|
+
|
|
111
|
+
return { statusCode, data, headers, trailers }
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
validateReplyParameters (replyParameters) {
|
|
115
|
+
if (typeof replyParameters.statusCode === 'undefined') {
|
|
116
|
+
throw new InvalidArgumentError('statusCode must be defined')
|
|
117
|
+
}
|
|
118
|
+
if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) {
|
|
119
|
+
throw new InvalidArgumentError('responseOptions must be an object')
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Mock an undici request with a defined reply.
|
|
125
|
+
*/
|
|
126
|
+
reply (replyOptionsCallbackOrStatusCode) {
|
|
127
|
+
// Values of reply aren't available right now as they
|
|
128
|
+
// can only be available when the reply callback is invoked.
|
|
129
|
+
if (typeof replyOptionsCallbackOrStatusCode === 'function') {
|
|
130
|
+
// We'll first wrap the provided callback in another function,
|
|
131
|
+
// this function will properly resolve the data from the callback
|
|
132
|
+
// when invoked.
|
|
133
|
+
const wrappedDefaultsCallback = (opts) => {
|
|
134
|
+
// Our reply options callback contains the parameter for statusCode, data and options.
|
|
135
|
+
const resolvedData = replyOptionsCallbackOrStatusCode(opts);
|
|
136
|
+
|
|
137
|
+
// Check if it is in the right format
|
|
138
|
+
if (typeof resolvedData !== 'object' || resolvedData === null) {
|
|
139
|
+
throw new InvalidArgumentError('reply options callback must return an object')
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const replyParameters = { data: '', responseOptions: {}, ...resolvedData };
|
|
143
|
+
this.validateReplyParameters(replyParameters);
|
|
144
|
+
// Since the values can be obtained immediately we return them
|
|
145
|
+
// from this higher order function that will be resolved later.
|
|
146
|
+
return {
|
|
147
|
+
...this.createMockScopeDispatchData(replyParameters)
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.
|
|
152
|
+
const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback);
|
|
153
|
+
return new MockScope(newMockDispatch)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// We can have either one or three parameters, if we get here,
|
|
157
|
+
// we should have 1-3 parameters. So we spread the arguments of
|
|
158
|
+
// this function to obtain the parameters, since replyData will always
|
|
159
|
+
// just be the statusCode.
|
|
160
|
+
const replyParameters = {
|
|
161
|
+
statusCode: replyOptionsCallbackOrStatusCode,
|
|
162
|
+
data: arguments[1] === undefined ? '' : arguments[1],
|
|
163
|
+
responseOptions: arguments[2] === undefined ? {} : arguments[2]
|
|
164
|
+
};
|
|
165
|
+
this.validateReplyParameters(replyParameters);
|
|
166
|
+
|
|
167
|
+
// Send in-already provided data like usual
|
|
168
|
+
const dispatchData = this.createMockScopeDispatchData(replyParameters);
|
|
169
|
+
const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData);
|
|
170
|
+
return new MockScope(newMockDispatch)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Mock an undici request with a defined error.
|
|
175
|
+
*/
|
|
176
|
+
replyWithError (error) {
|
|
177
|
+
if (typeof error === 'undefined') {
|
|
178
|
+
throw new InvalidArgumentError('error must be defined')
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error });
|
|
182
|
+
return new MockScope(newMockDispatch)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Set default reply headers on the interceptor for subsequent replies
|
|
187
|
+
*/
|
|
188
|
+
defaultReplyHeaders (headers) {
|
|
189
|
+
if (typeof headers === 'undefined') {
|
|
190
|
+
throw new InvalidArgumentError('headers must be defined')
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
this[kDefaultHeaders] = headers;
|
|
194
|
+
return this
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Set default reply trailers on the interceptor for subsequent replies
|
|
199
|
+
*/
|
|
200
|
+
defaultReplyTrailers (trailers) {
|
|
201
|
+
if (typeof trailers === 'undefined') {
|
|
202
|
+
throw new InvalidArgumentError('trailers must be defined')
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
this[kDefaultTrailers] = trailers;
|
|
206
|
+
return this
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Set reply content length header for replies on the interceptor
|
|
211
|
+
*/
|
|
212
|
+
replyContentLength () {
|
|
213
|
+
this[kContentLength] = true;
|
|
214
|
+
return this
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
mockInterceptor.__exports.MockInterceptor = MockInterceptor;
|
|
219
|
+
mockInterceptor.__exports.MockScope = MockScope;
|
|
220
|
+
return mockInterceptor.__exports;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
exports.__require = requireMockInterceptor;
|
|
224
|
+
//# sourceMappingURL=mock-interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-interceptor.js","sources":["../../../../../../../../../../../node_modules/@actions/http-client/node_modules/undici/lib/mock/mock-interceptor.js"],"sourcesContent":["'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { buildURL } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = buildURL(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData ({ statusCode, data, responseOptions }) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (replyParameters) {\n if (typeof replyParameters.statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyOptionsCallbackOrStatusCode) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyOptionsCallbackOrStatusCode === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyOptionsCallbackOrStatusCode(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object' || resolvedData === null) {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const replyParameters = { data: '', responseOptions: {}, ...resolvedData }\n this.validateReplyParameters(replyParameters)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(replyParameters)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const replyParameters = {\n statusCode: replyOptionsCallbackOrStatusCode,\n data: arguments[1] === undefined ? '' : arguments[1],\n responseOptions: arguments[2] === undefined ? {} : arguments[2]\n }\n this.validateReplyParameters(replyParameters)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(replyParameters)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n"],"names":["require$$0","require$$1","require$$2","require$$3","mockInterceptor"],"mappings":";;;;;;;;;;;;;;AAEA,CAAA,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAGA,mBAAA;CACvD,MAAM;AACN,GAAE,WAAW;AACb,GAAE,YAAY;AACd,GAAE,eAAe;AACjB,GAAE,gBAAgB;AAClB,GAAE,cAAc;GACd;AACF,EAAC,GAAGC,qBAAA;CACJ,MAAM,EAAE,oBAAoB,EAAE,GAAGC,gBAAA;CACjC,MAAM,EAAE,QAAQ,EAAE,GAAGC,cAAA;;AAErB;AACA;AACA;AACA,CAAA,MAAM,SAAS,CAAC;AAChB,GAAE,WAAW,CAAC,CAAC,YAAY,EAAE;AAC7B,KAAI,IAAI,CAAC,aAAa,CAAC,GAAG;AAC1B,GAAA;;AAEA;AACA;AACA;AACA,GAAE,KAAK,CAAC,CAAC,QAAQ,EAAE;AACnB,KAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE;AACtF,OAAM,MAAM,IAAI,oBAAoB,CAAC,sCAAsC;AAC3E,KAAA;;AAEA,KAAI,IAAI,CAAC,aAAa,CAAC,CAAC,KAAK,G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