@relative-ci/core 5.2.2-beta.0 → 5.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (610) hide show
  1. package/lib/cjs/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js +57 -0
  2. package/lib/cjs/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js.map +1 -0
  3. package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/index.js +144 -0
  4. package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/index.js.map +1 -0
  5. package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/version.js +6 -0
  6. package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/version.js.map +1 -0
  7. package/lib/cjs/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js +349 -0
  8. package/lib/cjs/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js.map +1 -0
  9. package/lib/cjs/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js +125 -0
  10. package/lib/cjs/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js.map +1 -0
  11. package/lib/cjs/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js +417 -0
  12. package/lib/cjs/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +1 -0
  13. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +128 -0
  14. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +1 -0
  15. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +2295 -0
  16. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +1 -0
  17. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +24 -0
  18. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +1 -0
  19. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +6 -0
  20. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +1 -0
  21. package/lib/cjs/__/@actions/github/__/@octokit/request/dist-bundle/index.js +199 -0
  22. package/lib/cjs/__/@actions/github/__/@octokit/request/dist-bundle/index.js.map +1 -0
  23. package/lib/cjs/__/@actions/github/__/@octokit/request-error/dist-src/index.js +43 -0
  24. package/lib/cjs/__/@actions/github/__/@octokit/request-error/dist-src/index.js.map +1 -0
  25. package/lib/cjs/__/@actions/github/__/before-after-hook/index.js +41 -0
  26. package/lib/cjs/__/@actions/github/__/before-after-hook/index.js.map +1 -0
  27. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/add.js +51 -0
  28. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/add.js.map +1 -0
  29. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/register.js +32 -0
  30. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/register.js.map +1 -0
  31. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/remove.js +24 -0
  32. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/remove.js.map +1 -0
  33. package/lib/cjs/__/@actions/github/__/universal-user-agent/index.js +18 -0
  34. package/lib/cjs/__/@actions/github/__/universal-user-agent/index.js.map +1 -0
  35. package/lib/cjs/__/@actions/github/lib/context.js +76 -0
  36. package/lib/cjs/__/@actions/github/lib/context.js.map +1 -0
  37. package/lib/cjs/__/@actions/github/lib/github.js +66 -0
  38. package/lib/cjs/__/@actions/github/lib/github.js.map +1 -0
  39. package/lib/cjs/__/@actions/github/lib/internal/utils.js +94 -0
  40. package/lib/cjs/__/@actions/github/lib/internal/utils.js.map +1 -0
  41. package/lib/cjs/__/@actions/github/lib/utils.js +89 -0
  42. package/lib/cjs/__/@actions/github/lib/utils.js.map +1 -0
  43. package/lib/cjs/__/@actions/http-client/lib/index.js +760 -0
  44. package/lib/cjs/__/@actions/http-client/lib/index.js.map +1 -0
  45. package/lib/cjs/__/@actions/http-client/lib/proxy.js +107 -0
  46. package/lib/cjs/__/@actions/http-client/lib/proxy.js.map +1 -0
  47. package/lib/cjs/__/@fastify/busboy/deps/dicer/lib/Dicer.js +236 -0
  48. package/lib/cjs/__/@fastify/busboy/deps/dicer/lib/Dicer.js.map +1 -0
  49. package/lib/cjs/__/@fastify/busboy/deps/dicer/lib/HeaderParser.js +122 -0
  50. package/lib/cjs/__/@fastify/busboy/deps/dicer/lib/HeaderParser.js.map +1 -0
  51. package/lib/cjs/__/@fastify/busboy/deps/dicer/lib/PartStream.js +33 -0
  52. package/lib/cjs/__/@fastify/busboy/deps/dicer/lib/PartStream.js.map +1 -0
  53. package/lib/cjs/__/@fastify/busboy/deps/streamsearch/sbmh.js +248 -0
  54. package/lib/cjs/__/@fastify/busboy/deps/streamsearch/sbmh.js.map +1 -0
  55. package/lib/cjs/__/@fastify/busboy/lib/main.js +109 -0
  56. package/lib/cjs/__/@fastify/busboy/lib/main.js.map +1 -0
  57. package/lib/cjs/__/@fastify/busboy/lib/types/multipart.js +331 -0
  58. package/lib/cjs/__/@fastify/busboy/lib/types/multipart.js.map +1 -0
  59. package/lib/cjs/__/@fastify/busboy/lib/types/urlencoded.js +206 -0
  60. package/lib/cjs/__/@fastify/busboy/lib/types/urlencoded.js.map +1 -0
  61. package/lib/cjs/__/@fastify/busboy/lib/utils/Decoder.js +66 -0
  62. package/lib/cjs/__/@fastify/busboy/lib/utils/Decoder.js.map +1 -0
  63. package/lib/cjs/__/@fastify/busboy/lib/utils/basename.js +26 -0
  64. package/lib/cjs/__/@fastify/busboy/lib/utils/basename.js.map +1 -0
  65. package/lib/cjs/__/@fastify/busboy/lib/utils/decodeText.js +126 -0
  66. package/lib/cjs/__/@fastify/busboy/lib/utils/decodeText.js.map +1 -0
  67. package/lib/cjs/__/@fastify/busboy/lib/utils/getLimit.js +28 -0
  68. package/lib/cjs/__/@fastify/busboy/lib/utils/getLimit.js.map +1 -0
  69. package/lib/cjs/__/@fastify/busboy/lib/utils/parseParams.js +211 -0
  70. package/lib/cjs/__/@fastify/busboy/lib/utils/parseParams.js.map +1 -0
  71. package/lib/cjs/__/cross-spawn/index.js +1 -1
  72. package/lib/cjs/__/env-ci/__/execa/index.js +3 -3
  73. package/lib/cjs/__/env-ci/__/execa/index.js.map +1 -1
  74. package/lib/cjs/__/env-ci/__/execa/lib/stream.js +1 -1
  75. package/lib/cjs/__/env-ci/__/execa/lib/verbose.js +2 -2
  76. package/lib/cjs/__/env-ci/__/execa/lib/verbose.js.map +1 -1
  77. package/lib/cjs/__/env-ci/__/npm-run-path/index.js +3 -3
  78. package/lib/cjs/__/env-ci/__/npm-run-path/index.js.map +1 -1
  79. package/lib/cjs/__/fast-content-type-parse/index.js +182 -0
  80. package/lib/cjs/__/fast-content-type-parse/index.js.map +1 -0
  81. package/lib/cjs/__/java-properties/dist-node/index.js +1 -1
  82. package/lib/cjs/__/path-key/index.js +1 -1
  83. package/lib/cjs/__/tunnel/index.js +16 -0
  84. package/lib/cjs/__/tunnel/index.js.map +1 -0
  85. package/lib/cjs/__/tunnel/lib/tunnel.js +289 -0
  86. package/lib/cjs/__/tunnel/lib/tunnel.js.map +1 -0
  87. package/lib/cjs/__/undici/index.js +212 -0
  88. package/lib/cjs/__/undici/index.js.map +1 -0
  89. package/lib/cjs/__/undici/lib/agent.js +169 -0
  90. package/lib/cjs/__/undici/lib/agent.js.map +1 -0
  91. package/lib/cjs/__/undici/lib/api/abort-signal.js +70 -0
  92. package/lib/cjs/__/undici/lib/api/abort-signal.js.map +1 -0
  93. package/lib/cjs/__/undici/lib/api/api-connect.js +125 -0
  94. package/lib/cjs/__/undici/lib/api/api-connect.js.map +1 -0
  95. package/lib/cjs/__/undici/lib/api/api-pipeline.js +274 -0
  96. package/lib/cjs/__/undici/lib/api/api-pipeline.js.map +1 -0
  97. package/lib/cjs/__/undici/lib/api/api-request.js +203 -0
  98. package/lib/cjs/__/undici/lib/api/api-request.js.map +1 -0
  99. package/lib/cjs/__/undici/lib/api/api-stream.js +244 -0
  100. package/lib/cjs/__/undici/lib/api/api-stream.js.map +1 -0
  101. package/lib/cjs/__/undici/lib/api/api-upgrade.js +128 -0
  102. package/lib/cjs/__/undici/lib/api/api-upgrade.js.map +1 -0
  103. package/lib/cjs/__/undici/lib/api/index.js +25 -0
  104. package/lib/cjs/__/undici/lib/api/index.js.map +1 -0
  105. package/lib/cjs/__/undici/lib/api/readable.js +342 -0
  106. package/lib/cjs/__/undici/lib/api/readable.js.map +1 -0
  107. package/lib/cjs/__/undici/lib/api/util.js +67 -0
  108. package/lib/cjs/__/undici/lib/api/util.js.map +1 -0
  109. package/lib/cjs/__/undici/lib/balanced-pool.js +208 -0
  110. package/lib/cjs/__/undici/lib/balanced-pool.js.map +1 -0
  111. package/lib/cjs/__/undici/lib/cache/cache.js +867 -0
  112. package/lib/cjs/__/undici/lib/cache/cache.js.map +1 -0
  113. package/lib/cjs/__/undici/lib/cache/cachestorage.js +161 -0
  114. package/lib/cjs/__/undici/lib/cache/cachestorage.js.map +1 -0
  115. package/lib/cjs/__/undici/lib/cache/symbols.js +19 -0
  116. package/lib/cjs/__/undici/lib/cache/symbols.js.map +1 -0
  117. package/lib/cjs/__/undici/lib/cache/util.js +69 -0
  118. package/lib/cjs/__/undici/lib/cache/util.js.map +1 -0
  119. package/lib/cjs/__/undici/lib/client.js +2314 -0
  120. package/lib/cjs/__/undici/lib/client.js.map +1 -0
  121. package/lib/cjs/__/undici/lib/compat/dispatcher-weakref.js +63 -0
  122. package/lib/cjs/__/undici/lib/compat/dispatcher-weakref.js.map +1 -0
  123. package/lib/cjs/__/undici/lib/cookies/constants.js +24 -0
  124. package/lib/cjs/__/undici/lib/cookies/constants.js.map +1 -0
  125. package/lib/cjs/__/undici/lib/cookies/index.js +200 -0
  126. package/lib/cjs/__/undici/lib/cookies/index.js.map +1 -0
  127. package/lib/cjs/__/undici/lib/cookies/parse.js +338 -0
  128. package/lib/cjs/__/undici/lib/cookies/parse.js.map +1 -0
  129. package/lib/cjs/__/undici/lib/cookies/util.js +286 -0
  130. package/lib/cjs/__/undici/lib/cookies/util.js.map +1 -0
  131. package/lib/cjs/__/undici/lib/core/connect.js +214 -0
  132. package/lib/cjs/__/undici/lib/core/connect.js.map +1 -0
  133. package/lib/cjs/__/undici/lib/core/constants.js +130 -0
  134. package/lib/cjs/__/undici/lib/core/constants.js.map +1 -0
  135. package/lib/cjs/__/undici/lib/core/errors.js +242 -0
  136. package/lib/cjs/__/undici/lib/core/errors.js.map +1 -0
  137. package/lib/cjs/__/undici/lib/core/request.js +521 -0
  138. package/lib/cjs/__/undici/lib/core/request.js.map +1 -0
  139. package/lib/cjs/__/undici/lib/core/symbols.js +76 -0
  140. package/lib/cjs/__/undici/lib/core/symbols.js.map +1 -0
  141. package/lib/cjs/__/undici/lib/core/util.js +557 -0
  142. package/lib/cjs/__/undici/lib/core/util.js.map +1 -0
  143. package/lib/cjs/__/undici/lib/dispatcher-base.js +208 -0
  144. package/lib/cjs/__/undici/lib/dispatcher-base.js.map +1 -0
  145. package/lib/cjs/__/undici/lib/dispatcher.js +37 -0
  146. package/lib/cjs/__/undici/lib/dispatcher.js.map +1 -0
  147. package/lib/cjs/__/undici/lib/fetch/body.js +647 -0
  148. package/lib/cjs/__/undici/lib/fetch/body.js.map +1 -0
  149. package/lib/cjs/__/undici/lib/fetch/constants.js +169 -0
  150. package/lib/cjs/__/undici/lib/fetch/constants.js.map +1 -0
  151. package/lib/cjs/__/undici/lib/fetch/dataURL.js +649 -0
  152. package/lib/cjs/__/undici/lib/fetch/dataURL.js.map +1 -0
  153. package/lib/cjs/__/undici/lib/fetch/file.js +369 -0
  154. package/lib/cjs/__/undici/lib/fetch/file.js.map +1 -0
  155. package/lib/cjs/__/undici/lib/fetch/formdata.js +287 -0
  156. package/lib/cjs/__/undici/lib/fetch/formdata.js.map +1 -0
  157. package/lib/cjs/__/undici/lib/fetch/global.js +52 -0
  158. package/lib/cjs/__/undici/lib/fetch/global.js.map +1 -0
  159. package/lib/cjs/__/undici/lib/fetch/headers.js +609 -0
  160. package/lib/cjs/__/undici/lib/fetch/headers.js.map +1 -0
  161. package/lib/cjs/__/undici/lib/fetch/index.js +2114 -0
  162. package/lib/cjs/__/undici/lib/fetch/index.js.map +1 -0
  163. package/lib/cjs/__/undici/lib/fetch/request.js +979 -0
  164. package/lib/cjs/__/undici/lib/fetch/request.js.map +1 -0
  165. package/lib/cjs/__/undici/lib/fetch/response.js +604 -0
  166. package/lib/cjs/__/undici/lib/fetch/response.js.map +1 -0
  167. package/lib/cjs/__/undici/lib/fetch/symbols.js +22 -0
  168. package/lib/cjs/__/undici/lib/fetch/symbols.js.map +1 -0
  169. package/lib/cjs/__/undici/lib/fetch/util.js +1170 -0
  170. package/lib/cjs/__/undici/lib/fetch/util.js.map +1 -0
  171. package/lib/cjs/__/undici/lib/fetch/webidl.js +665 -0
  172. package/lib/cjs/__/undici/lib/fetch/webidl.js.map +1 -0
  173. package/lib/cjs/__/undici/lib/fileapi/encoding.js +302 -0
  174. package/lib/cjs/__/undici/lib/fileapi/encoding.js.map +1 -0
  175. package/lib/cjs/__/undici/lib/fileapi/filereader.js +361 -0
  176. package/lib/cjs/__/undici/lib/fileapi/filereader.js.map +1 -0
  177. package/lib/cjs/__/undici/lib/fileapi/progressevent.js +92 -0
  178. package/lib/cjs/__/undici/lib/fileapi/progressevent.js.map +1 -0
  179. package/lib/cjs/__/undici/lib/fileapi/symbols.js +22 -0
  180. package/lib/cjs/__/undici/lib/fileapi/symbols.js.map +1 -0
  181. package/lib/cjs/__/undici/lib/fileapi/util.js +419 -0
  182. package/lib/cjs/__/undici/lib/fileapi/util.js.map +1 -0
  183. package/lib/cjs/__/undici/lib/global.js +47 -0
  184. package/lib/cjs/__/undici/lib/global.js.map +1 -0
  185. package/lib/cjs/__/undici/lib/handler/DecoratorHandler.js +47 -0
  186. package/lib/cjs/__/undici/lib/handler/DecoratorHandler.js.map +1 -0
  187. package/lib/cjs/__/undici/lib/handler/RedirectHandler.js +226 -0
  188. package/lib/cjs/__/undici/lib/handler/RedirectHandler.js.map +1 -0
  189. package/lib/cjs/__/undici/lib/handler/RetryHandler.js +358 -0
  190. package/lib/cjs/__/undici/lib/handler/RetryHandler.js.map +1 -0
  191. package/lib/cjs/__/undici/lib/interceptor/redirectInterceptor.js +35 -0
  192. package/lib/cjs/__/undici/lib/interceptor/redirectInterceptor.js.map +1 -0
  193. package/lib/cjs/__/undici/lib/llhttp/constants.js +288 -0
  194. package/lib/cjs/__/undici/lib/llhttp/constants.js.map +1 -0
  195. package/lib/cjs/__/undici/lib/llhttp/llhttp-wasm.js +14 -0
  196. package/lib/cjs/__/undici/lib/llhttp/llhttp-wasm.js.map +1 -0
  197. package/lib/cjs/__/undici/lib/llhttp/llhttp_simd-wasm.js +14 -0
  198. package/lib/cjs/__/undici/lib/llhttp/llhttp_simd-wasm.js.map +1 -0
  199. package/lib/cjs/__/undici/lib/llhttp/utils.js +28 -0
  200. package/lib/cjs/__/undici/lib/llhttp/utils.js.map +1 -0
  201. package/lib/cjs/__/undici/lib/mock/mock-agent.js +194 -0
  202. package/lib/cjs/__/undici/lib/mock/mock-agent.js.map +1 -0
  203. package/lib/cjs/__/undici/lib/mock/mock-client.js +83 -0
  204. package/lib/cjs/__/undici/lib/mock/mock-client.js.map +1 -0
  205. package/lib/cjs/__/undici/lib/mock/mock-errors.js +31 -0
  206. package/lib/cjs/__/undici/lib/mock/mock-errors.js.map +1 -0
  207. package/lib/cjs/__/undici/lib/mock/mock-interceptor.js +223 -0
  208. package/lib/cjs/__/undici/lib/mock/mock-interceptor.js.map +1 -0
  209. package/lib/cjs/__/undici/lib/mock/mock-pool.js +83 -0
  210. package/lib/cjs/__/undici/lib/mock/mock-pool.js.map +1 -0
  211. package/lib/cjs/__/undici/lib/mock/mock-symbols.js +35 -0
  212. package/lib/cjs/__/undici/lib/mock/mock-symbols.js.map +1 -0
  213. package/lib/cjs/__/undici/lib/mock/mock-utils.js +374 -0
  214. package/lib/cjs/__/undici/lib/mock/mock-utils.js.map +1 -0
  215. package/lib/cjs/__/undici/lib/mock/pending-interceptors-formatter.js +60 -0
  216. package/lib/cjs/__/undici/lib/mock/pending-interceptors-formatter.js.map +1 -0
  217. package/lib/cjs/__/undici/lib/mock/pluralizer.js +41 -0
  218. package/lib/cjs/__/undici/lib/mock/pluralizer.js.map +1 -0
  219. package/lib/cjs/__/undici/lib/node/fixed-queue.js +129 -0
  220. package/lib/cjs/__/undici/lib/node/fixed-queue.js.map +1 -0
  221. package/lib/cjs/__/undici/lib/pool-base.js +211 -0
  222. package/lib/cjs/__/undici/lib/pool-base.js.map +1 -0
  223. package/lib/cjs/__/undici/lib/pool-stats.js +49 -0
  224. package/lib/cjs/__/undici/lib/pool-stats.js.map +1 -0
  225. package/lib/cjs/__/undici/lib/pool.js +127 -0
  226. package/lib/cjs/__/undici/lib/pool.js.map +1 -0
  227. package/lib/cjs/__/undici/lib/proxy-agent.js +213 -0
  228. package/lib/cjs/__/undici/lib/proxy-agent.js.map +1 -0
  229. package/lib/cjs/__/undici/lib/timers.js +109 -0
  230. package/lib/cjs/__/undici/lib/timers.js.map +1 -0
  231. package/lib/cjs/__/undici/lib/websocket/connection.js +318 -0
  232. package/lib/cjs/__/undici/lib/websocket/connection.js.map +1 -0
  233. package/lib/cjs/__/undici/lib/websocket/constants.js +63 -0
  234. package/lib/cjs/__/undici/lib/websocket/constants.js.map +1 -0
  235. package/lib/cjs/__/undici/lib/websocket/events.js +323 -0
  236. package/lib/cjs/__/undici/lib/websocket/events.js.map +1 -0
  237. package/lib/cjs/__/undici/lib/websocket/frame.js +87 -0
  238. package/lib/cjs/__/undici/lib/websocket/frame.js.map +1 -0
  239. package/lib/cjs/__/undici/lib/websocket/receiver.js +368 -0
  240. package/lib/cjs/__/undici/lib/websocket/receiver.js.map +1 -0
  241. package/lib/cjs/__/undici/lib/websocket/symbols.js +24 -0
  242. package/lib/cjs/__/undici/lib/websocket/symbols.js.map +1 -0
  243. package/lib/cjs/__/undici/lib/websocket/util.js +216 -0
  244. package/lib/cjs/__/undici/lib/websocket/util.js.map +1 -0
  245. package/lib/cjs/__/undici/lib/websocket/websocket.js +668 -0
  246. package/lib/cjs/__/undici/lib/websocket/websocket.js.map +1 -0
  247. package/lib/cjs/_virtual/_commonjsHelpers.js +30 -0
  248. package/lib/cjs/_virtual/_commonjsHelpers.js.map +1 -1
  249. package/lib/cjs/_virtual/api-request.js +6 -0
  250. package/lib/cjs/_virtual/api-request.js.map +1 -0
  251. package/lib/cjs/_virtual/constants.js +6 -0
  252. package/lib/cjs/_virtual/constants.js.map +1 -0
  253. package/lib/cjs/_virtual/context.js +6 -0
  254. package/lib/cjs/_virtual/context.js.map +1 -0
  255. package/lib/cjs/_virtual/github.js +8 -0
  256. package/lib/cjs/_virtual/github.js.map +1 -0
  257. package/lib/cjs/_virtual/github2.js +6 -0
  258. package/lib/cjs/_virtual/github2.js.map +1 -0
  259. package/lib/cjs/_virtual/index10.js +6 -0
  260. package/lib/cjs/_virtual/index10.js.map +1 -0
  261. package/lib/cjs/_virtual/index11.js +6 -0
  262. package/lib/cjs/_virtual/index11.js.map +1 -0
  263. package/lib/cjs/_virtual/index12.js +6 -0
  264. package/lib/cjs/_virtual/index12.js.map +1 -0
  265. package/lib/cjs/_virtual/index13.js +6 -0
  266. package/lib/cjs/_virtual/index13.js.map +1 -0
  267. package/lib/cjs/_virtual/index14.js +6 -0
  268. package/lib/cjs/_virtual/index14.js.map +1 -0
  269. package/lib/cjs/_virtual/index2.js +5 -2
  270. package/lib/cjs/_virtual/index2.js.map +1 -1
  271. package/lib/cjs/_virtual/index3.js +3 -4
  272. package/lib/cjs/_virtual/index3.js.map +1 -1
  273. package/lib/cjs/_virtual/index4.js +5 -2
  274. package/lib/cjs/_virtual/index4.js.map +1 -1
  275. package/lib/cjs/_virtual/index5.js +2 -2
  276. package/lib/cjs/_virtual/index6.js +6 -2
  277. package/lib/cjs/_virtual/index6.js.map +1 -1
  278. package/lib/cjs/_virtual/index7.js +6 -0
  279. package/lib/cjs/_virtual/index7.js.map +1 -0
  280. package/lib/cjs/_virtual/index8.js +6 -0
  281. package/lib/cjs/_virtual/index8.js.map +1 -0
  282. package/lib/cjs/_virtual/index9.js +8 -0
  283. package/lib/cjs/_virtual/index9.js.map +1 -0
  284. package/lib/cjs/_virtual/main.js +6 -0
  285. package/lib/cjs/_virtual/main.js.map +1 -0
  286. package/lib/cjs/_virtual/mock-interceptor.js +6 -0
  287. package/lib/cjs/_virtual/mock-interceptor.js.map +1 -0
  288. package/lib/cjs/_virtual/proxy.js +6 -0
  289. package/lib/cjs/_virtual/proxy.js.map +1 -0
  290. package/lib/cjs/_virtual/tunnel.js +6 -0
  291. package/lib/cjs/_virtual/tunnel.js.map +1 -0
  292. package/lib/cjs/_virtual/utils.js +6 -0
  293. package/lib/cjs/_virtual/utils.js.map +1 -0
  294. package/lib/cjs/_virtual/utils2.js +6 -0
  295. package/lib/cjs/_virtual/utils2.js.map +1 -0
  296. package/lib/cjs/_virtual/utils3.js +6 -0
  297. package/lib/cjs/_virtual/utils3.js.map +1 -0
  298. package/lib/cjs/artifacts/filter-artifacts.js.map +1 -1
  299. package/lib/cjs/env/ci-env.js +6 -1
  300. package/lib/cjs/env/ci-env.js.map +1 -1
  301. package/lib/cjs/env/load.js +1 -1
  302. package/lib/cjs/env/load.js.map +1 -1
  303. package/lib/cjs/env/service/github.js +3 -22
  304. package/lib/cjs/env/service/github.js.map +1 -1
  305. package/lib/cjs/ingest/ingest.js +4 -4
  306. package/lib/cjs/ingest/ingest.js.map +1 -1
  307. package/lib/cjs/locales/en.js.map +1 -1
  308. package/lib/esm/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js +55 -0
  309. package/lib/esm/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js.map +1 -0
  310. package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/index.js +142 -0
  311. package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/index.js.map +1 -0
  312. package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/version.js +4 -0
  313. package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/version.js.map +1 -0
  314. package/lib/esm/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js +347 -0
  315. package/lib/esm/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js.map +1 -0
  316. package/lib/esm/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js +122 -0
  317. package/lib/esm/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js.map +1 -0
  318. package/lib/esm/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js +412 -0
  319. package/lib/esm/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +1 -0
  320. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +126 -0
  321. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +1 -0
  322. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +2293 -0
  323. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +1 -0
  324. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +21 -0
  325. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +1 -0
  326. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +4 -0
  327. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +1 -0
  328. package/lib/esm/__/@actions/github/__/@octokit/request/dist-bundle/index.js +197 -0
  329. package/lib/esm/__/@actions/github/__/@octokit/request/dist-bundle/index.js.map +1 -0
  330. package/lib/esm/__/@actions/github/__/@octokit/request-error/dist-src/index.js +41 -0
  331. package/lib/esm/__/@actions/github/__/@octokit/request-error/dist-src/index.js.map +1 -0
  332. package/lib/esm/__/@actions/github/__/before-after-hook/index.js +39 -0
  333. package/lib/esm/__/@actions/github/__/before-after-hook/index.js.map +1 -0
  334. package/lib/esm/__/@actions/github/__/before-after-hook/lib/add.js +49 -0
  335. package/lib/esm/__/@actions/github/__/before-after-hook/lib/add.js.map +1 -0
  336. package/lib/esm/__/@actions/github/__/before-after-hook/lib/register.js +30 -0
  337. package/lib/esm/__/@actions/github/__/before-after-hook/lib/register.js.map +1 -0
  338. package/lib/esm/__/@actions/github/__/before-after-hook/lib/remove.js +22 -0
  339. package/lib/esm/__/@actions/github/__/before-after-hook/lib/remove.js.map +1 -0
  340. package/lib/esm/__/@actions/github/__/universal-user-agent/index.js +16 -0
  341. package/lib/esm/__/@actions/github/__/universal-user-agent/index.js.map +1 -0
  342. package/lib/esm/__/@actions/github/lib/context.js +69 -0
  343. package/lib/esm/__/@actions/github/lib/context.js.map +1 -0
  344. package/lib/esm/__/@actions/github/lib/github.js +64 -0
  345. package/lib/esm/__/@actions/github/lib/github.js.map +1 -0
  346. package/lib/esm/__/@actions/github/lib/internal/utils.js +92 -0
  347. package/lib/esm/__/@actions/github/lib/internal/utils.js.map +1 -0
  348. package/lib/esm/__/@actions/github/lib/utils.js +87 -0
  349. package/lib/esm/__/@actions/github/lib/utils.js.map +1 -0
  350. package/lib/esm/__/@actions/http-client/lib/index.js +753 -0
  351. package/lib/esm/__/@actions/http-client/lib/index.js.map +1 -0
  352. package/lib/esm/__/@actions/http-client/lib/proxy.js +105 -0
  353. package/lib/esm/__/@actions/http-client/lib/proxy.js.map +1 -0
  354. package/lib/esm/__/@fastify/busboy/deps/dicer/lib/Dicer.js +229 -0
  355. package/lib/esm/__/@fastify/busboy/deps/dicer/lib/Dicer.js.map +1 -0
  356. package/lib/esm/__/@fastify/busboy/deps/dicer/lib/HeaderParser.js +115 -0
  357. package/lib/esm/__/@fastify/busboy/deps/dicer/lib/HeaderParser.js.map +1 -0
  358. package/lib/esm/__/@fastify/busboy/deps/dicer/lib/PartStream.js +26 -0
  359. package/lib/esm/__/@fastify/busboy/deps/dicer/lib/PartStream.js.map +1 -0
  360. package/lib/esm/__/@fastify/busboy/deps/streamsearch/sbmh.js +241 -0
  361. package/lib/esm/__/@fastify/busboy/deps/streamsearch/sbmh.js.map +1 -0
  362. package/lib/esm/__/@fastify/busboy/lib/main.js +102 -0
  363. package/lib/esm/__/@fastify/busboy/lib/main.js.map +1 -0
  364. package/lib/esm/__/@fastify/busboy/lib/types/multipart.js +324 -0
  365. package/lib/esm/__/@fastify/busboy/lib/types/multipart.js.map +1 -0
  366. package/lib/esm/__/@fastify/busboy/lib/types/urlencoded.js +204 -0
  367. package/lib/esm/__/@fastify/busboy/lib/types/urlencoded.js.map +1 -0
  368. package/lib/esm/__/@fastify/busboy/lib/utils/Decoder.js +64 -0
  369. package/lib/esm/__/@fastify/busboy/lib/utils/Decoder.js.map +1 -0
  370. package/lib/esm/__/@fastify/busboy/lib/utils/basename.js +24 -0
  371. package/lib/esm/__/@fastify/busboy/lib/utils/basename.js.map +1 -0
  372. package/lib/esm/__/@fastify/busboy/lib/utils/decodeText.js +124 -0
  373. package/lib/esm/__/@fastify/busboy/lib/utils/decodeText.js.map +1 -0
  374. package/lib/esm/__/@fastify/busboy/lib/utils/getLimit.js +26 -0
  375. package/lib/esm/__/@fastify/busboy/lib/utils/getLimit.js.map +1 -0
  376. package/lib/esm/__/@fastify/busboy/lib/utils/parseParams.js +209 -0
  377. package/lib/esm/__/@fastify/busboy/lib/utils/parseParams.js.map +1 -0
  378. package/lib/esm/__/cross-spawn/index.js +1 -1
  379. package/lib/esm/__/env-ci/__/execa/index.js +1 -1
  380. package/lib/esm/__/env-ci/__/execa/lib/stream.js +1 -1
  381. package/lib/esm/__/fast-content-type-parse/index.js +180 -0
  382. package/lib/esm/__/fast-content-type-parse/index.js.map +1 -0
  383. package/lib/esm/__/java-properties/dist-node/index.js +1 -1
  384. package/lib/esm/__/path-key/index.js +1 -1
  385. package/lib/esm/__/tunnel/index.js +14 -0
  386. package/lib/esm/__/tunnel/index.js.map +1 -0
  387. package/lib/esm/__/tunnel/lib/tunnel.js +279 -0
  388. package/lib/esm/__/tunnel/lib/tunnel.js.map +1 -0
  389. package/lib/esm/__/undici/index.js +210 -0
  390. package/lib/esm/__/undici/index.js.map +1 -0
  391. package/lib/esm/__/undici/lib/agent.js +167 -0
  392. package/lib/esm/__/undici/lib/agent.js.map +1 -0
  393. package/lib/esm/__/undici/lib/api/abort-signal.js +68 -0
  394. package/lib/esm/__/undici/lib/api/abort-signal.js.map +1 -0
  395. package/lib/esm/__/undici/lib/api/api-connect.js +119 -0
  396. package/lib/esm/__/undici/lib/api/api-connect.js.map +1 -0
  397. package/lib/esm/__/undici/lib/api/api-pipeline.js +266 -0
  398. package/lib/esm/__/undici/lib/api/api-pipeline.js.map +1 -0
  399. package/lib/esm/__/undici/lib/api/api-request.js +197 -0
  400. package/lib/esm/__/undici/lib/api/api-request.js.map +1 -0
  401. package/lib/esm/__/undici/lib/api/api-stream.js +237 -0
  402. package/lib/esm/__/undici/lib/api/api-stream.js.map +1 -0
  403. package/lib/esm/__/undici/lib/api/api-upgrade.js +121 -0
  404. package/lib/esm/__/undici/lib/api/api-upgrade.js.map +1 -0
  405. package/lib/esm/__/undici/lib/api/index.js +23 -0
  406. package/lib/esm/__/undici/lib/api/index.js.map +1 -0
  407. package/lib/esm/__/undici/lib/api/readable.js +335 -0
  408. package/lib/esm/__/undici/lib/api/readable.js.map +1 -0
  409. package/lib/esm/__/undici/lib/api/util.js +61 -0
  410. package/lib/esm/__/undici/lib/api/util.js.map +1 -0
  411. package/lib/esm/__/undici/lib/balanced-pool.js +206 -0
  412. package/lib/esm/__/undici/lib/balanced-pool.js.map +1 -0
  413. package/lib/esm/__/undici/lib/cache/cache.js +861 -0
  414. package/lib/esm/__/undici/lib/cache/cache.js.map +1 -0
  415. package/lib/esm/__/undici/lib/cache/cachestorage.js +159 -0
  416. package/lib/esm/__/undici/lib/cache/cachestorage.js.map +1 -0
  417. package/lib/esm/__/undici/lib/cache/symbols.js +17 -0
  418. package/lib/esm/__/undici/lib/cache/symbols.js.map +1 -0
  419. package/lib/esm/__/undici/lib/cache/util.js +63 -0
  420. package/lib/esm/__/undici/lib/cache/util.js.map +1 -0
  421. package/lib/esm/__/undici/lib/client.js +2305 -0
  422. package/lib/esm/__/undici/lib/client.js.map +1 -0
  423. package/lib/esm/__/undici/lib/compat/dispatcher-weakref.js +61 -0
  424. package/lib/esm/__/undici/lib/compat/dispatcher-weakref.js.map +1 -0
  425. package/lib/esm/__/undici/lib/cookies/constants.js +22 -0
  426. package/lib/esm/__/undici/lib/cookies/constants.js.map +1 -0
  427. package/lib/esm/__/undici/lib/cookies/index.js +198 -0
  428. package/lib/esm/__/undici/lib/cookies/index.js.map +1 -0
  429. package/lib/esm/__/undici/lib/cookies/parse.js +332 -0
  430. package/lib/esm/__/undici/lib/cookies/parse.js.map +1 -0
  431. package/lib/esm/__/undici/lib/cookies/util.js +284 -0
  432. package/lib/esm/__/undici/lib/cookies/util.js.map +1 -0
  433. package/lib/esm/__/undici/lib/core/connect.js +206 -0
  434. package/lib/esm/__/undici/lib/core/connect.js.map +1 -0
  435. package/lib/esm/__/undici/lib/core/constants.js +128 -0
  436. package/lib/esm/__/undici/lib/core/constants.js.map +1 -0
  437. package/lib/esm/__/undici/lib/core/errors.js +240 -0
  438. package/lib/esm/__/undici/lib/core/errors.js.map +1 -0
  439. package/lib/esm/__/undici/lib/core/request.js +515 -0
  440. package/lib/esm/__/undici/lib/core/request.js.map +1 -0
  441. package/lib/esm/__/undici/lib/core/symbols.js +74 -0
  442. package/lib/esm/__/undici/lib/core/symbols.js.map +1 -0
  443. package/lib/esm/__/undici/lib/core/util.js +544 -0
  444. package/lib/esm/__/undici/lib/core/util.js.map +1 -0
  445. package/lib/esm/__/undici/lib/dispatcher-base.js +206 -0
  446. package/lib/esm/__/undici/lib/dispatcher-base.js.map +1 -0
  447. package/lib/esm/__/undici/lib/dispatcher.js +31 -0
  448. package/lib/esm/__/undici/lib/dispatcher.js.map +1 -0
  449. package/lib/esm/__/undici/lib/fetch/body.js +638 -0
  450. package/lib/esm/__/undici/lib/fetch/body.js.map +1 -0
  451. package/lib/esm/__/undici/lib/fetch/constants.js +163 -0
  452. package/lib/esm/__/undici/lib/fetch/constants.js.map +1 -0
  453. package/lib/esm/__/undici/lib/fetch/dataURL.js +642 -0
  454. package/lib/esm/__/undici/lib/fetch/dataURL.js.map +1 -0
  455. package/lib/esm/__/undici/lib/fetch/file.js +362 -0
  456. package/lib/esm/__/undici/lib/fetch/file.js.map +1 -0
  457. package/lib/esm/__/undici/lib/fetch/formdata.js +281 -0
  458. package/lib/esm/__/undici/lib/fetch/formdata.js.map +1 -0
  459. package/lib/esm/__/undici/lib/fetch/global.js +50 -0
  460. package/lib/esm/__/undici/lib/fetch/global.js.map +1 -0
  461. package/lib/esm/__/undici/lib/fetch/headers.js +602 -0
  462. package/lib/esm/__/undici/lib/fetch/headers.js.map +1 -0
  463. package/lib/esm/__/undici/lib/fetch/index.js +2102 -0
  464. package/lib/esm/__/undici/lib/fetch/index.js.map +1 -0
  465. package/lib/esm/__/undici/lib/fetch/request.js +971 -0
  466. package/lib/esm/__/undici/lib/fetch/request.js.map +1 -0
  467. package/lib/esm/__/undici/lib/fetch/response.js +596 -0
  468. package/lib/esm/__/undici/lib/fetch/response.js.map +1 -0
  469. package/lib/esm/__/undici/lib/fetch/symbols.js +20 -0
  470. package/lib/esm/__/undici/lib/fetch/symbols.js.map +1 -0
  471. package/lib/esm/__/undici/lib/fetch/util.js +1161 -0
  472. package/lib/esm/__/undici/lib/fetch/util.js.map +1 -0
  473. package/lib/esm/__/undici/lib/fetch/webidl.js +659 -0
  474. package/lib/esm/__/undici/lib/fetch/webidl.js.map +1 -0
  475. package/lib/esm/__/undici/lib/fileapi/encoding.js +300 -0
  476. package/lib/esm/__/undici/lib/fileapi/encoding.js.map +1 -0
  477. package/lib/esm/__/undici/lib/fileapi/filereader.js +359 -0
  478. package/lib/esm/__/undici/lib/fileapi/filereader.js.map +1 -0
  479. package/lib/esm/__/undici/lib/fileapi/progressevent.js +90 -0
  480. package/lib/esm/__/undici/lib/fileapi/progressevent.js.map +1 -0
  481. package/lib/esm/__/undici/lib/fileapi/symbols.js +20 -0
  482. package/lib/esm/__/undici/lib/fileapi/symbols.js.map +1 -0
  483. package/lib/esm/__/undici/lib/fileapi/util.js +411 -0
  484. package/lib/esm/__/undici/lib/fileapi/util.js.map +1 -0
  485. package/lib/esm/__/undici/lib/global.js +45 -0
  486. package/lib/esm/__/undici/lib/global.js.map +1 -0
  487. package/lib/esm/__/undici/lib/handler/DecoratorHandler.js +45 -0
  488. package/lib/esm/__/undici/lib/handler/DecoratorHandler.js.map +1 -0
  489. package/lib/esm/__/undici/lib/handler/RedirectHandler.js +219 -0
  490. package/lib/esm/__/undici/lib/handler/RedirectHandler.js.map +1 -0
  491. package/lib/esm/__/undici/lib/handler/RetryHandler.js +352 -0
  492. package/lib/esm/__/undici/lib/handler/RetryHandler.js.map +1 -0
  493. package/lib/esm/__/undici/lib/interceptor/redirectInterceptor.js +33 -0
  494. package/lib/esm/__/undici/lib/interceptor/redirectInterceptor.js.map +1 -0
  495. package/lib/esm/__/undici/lib/llhttp/constants.js +286 -0
  496. package/lib/esm/__/undici/lib/llhttp/constants.js.map +1 -0
  497. package/lib/esm/__/undici/lib/llhttp/llhttp-wasm.js +12 -0
  498. package/lib/esm/__/undici/lib/llhttp/llhttp-wasm.js.map +1 -0
  499. package/lib/esm/__/undici/lib/llhttp/llhttp_simd-wasm.js +12 -0
  500. package/lib/esm/__/undici/lib/llhttp/llhttp_simd-wasm.js.map +1 -0
  501. package/lib/esm/__/undici/lib/llhttp/utils.js +26 -0
  502. package/lib/esm/__/undici/lib/llhttp/utils.js.map +1 -0
  503. package/lib/esm/__/undici/lib/mock/mock-agent.js +192 -0
  504. package/lib/esm/__/undici/lib/mock/mock-agent.js.map +1 -0
  505. package/lib/esm/__/undici/lib/mock/mock-client.js +77 -0
  506. package/lib/esm/__/undici/lib/mock/mock-client.js.map +1 -0
  507. package/lib/esm/__/undici/lib/mock/mock-errors.js +29 -0
  508. package/lib/esm/__/undici/lib/mock/mock-errors.js.map +1 -0
  509. package/lib/esm/__/undici/lib/mock/mock-interceptor.js +221 -0
  510. package/lib/esm/__/undici/lib/mock/mock-interceptor.js.map +1 -0
  511. package/lib/esm/__/undici/lib/mock/mock-pool.js +77 -0
  512. package/lib/esm/__/undici/lib/mock/mock-pool.js.map +1 -0
  513. package/lib/esm/__/undici/lib/mock/mock-symbols.js +33 -0
  514. package/lib/esm/__/undici/lib/mock/mock-symbols.js.map +1 -0
  515. package/lib/esm/__/undici/lib/mock/mock-utils.js +367 -0
  516. package/lib/esm/__/undici/lib/mock/mock-utils.js.map +1 -0
  517. package/lib/esm/__/undici/lib/mock/pending-interceptors-formatter.js +53 -0
  518. package/lib/esm/__/undici/lib/mock/pending-interceptors-formatter.js.map +1 -0
  519. package/lib/esm/__/undici/lib/mock/pluralizer.js +39 -0
  520. package/lib/esm/__/undici/lib/mock/pluralizer.js.map +1 -0
  521. package/lib/esm/__/undici/lib/node/fixed-queue.js +127 -0
  522. package/lib/esm/__/undici/lib/node/fixed-queue.js.map +1 -0
  523. package/lib/esm/__/undici/lib/pool-base.js +209 -0
  524. package/lib/esm/__/undici/lib/pool-base.js.map +1 -0
  525. package/lib/esm/__/undici/lib/pool-stats.js +47 -0
  526. package/lib/esm/__/undici/lib/pool-stats.js.map +1 -0
  527. package/lib/esm/__/undici/lib/pool.js +125 -0
  528. package/lib/esm/__/undici/lib/pool.js.map +1 -0
  529. package/lib/esm/__/undici/lib/proxy-agent.js +207 -0
  530. package/lib/esm/__/undici/lib/proxy-agent.js.map +1 -0
  531. package/lib/esm/__/undici/lib/timers.js +107 -0
  532. package/lib/esm/__/undici/lib/timers.js.map +1 -0
  533. package/lib/esm/__/undici/lib/websocket/connection.js +312 -0
  534. package/lib/esm/__/undici/lib/websocket/connection.js.map +1 -0
  535. package/lib/esm/__/undici/lib/websocket/constants.js +61 -0
  536. package/lib/esm/__/undici/lib/websocket/constants.js.map +1 -0
  537. package/lib/esm/__/undici/lib/websocket/events.js +317 -0
  538. package/lib/esm/__/undici/lib/websocket/events.js.map +1 -0
  539. package/lib/esm/__/undici/lib/websocket/frame.js +85 -0
  540. package/lib/esm/__/undici/lib/websocket/frame.js.map +1 -0
  541. package/lib/esm/__/undici/lib/websocket/receiver.js +361 -0
  542. package/lib/esm/__/undici/lib/websocket/receiver.js.map +1 -0
  543. package/lib/esm/__/undici/lib/websocket/symbols.js +22 -0
  544. package/lib/esm/__/undici/lib/websocket/symbols.js.map +1 -0
  545. package/lib/esm/__/undici/lib/websocket/util.js +214 -0
  546. package/lib/esm/__/undici/lib/websocket/util.js.map +1 -0
  547. package/lib/esm/__/undici/lib/websocket/websocket.js +662 -0
  548. package/lib/esm/__/undici/lib/websocket/websocket.js.map +1 -0
  549. package/lib/esm/_virtual/_commonjsHelpers.js +30 -1
  550. package/lib/esm/_virtual/_commonjsHelpers.js.map +1 -1
  551. package/lib/esm/_virtual/api-request.js +4 -0
  552. package/lib/esm/_virtual/api-request.js.map +1 -0
  553. package/lib/esm/_virtual/constants.js +4 -0
  554. package/lib/esm/_virtual/constants.js.map +1 -0
  555. package/lib/esm/_virtual/context.js +4 -0
  556. package/lib/esm/_virtual/context.js.map +1 -0
  557. package/lib/esm/_virtual/github.js +6 -0
  558. package/lib/esm/_virtual/github.js.map +1 -0
  559. package/lib/esm/_virtual/github2.js +4 -0
  560. package/lib/esm/_virtual/github2.js.map +1 -0
  561. package/lib/esm/_virtual/index10.js +4 -0
  562. package/lib/esm/_virtual/index10.js.map +1 -0
  563. package/lib/esm/_virtual/index11.js +4 -0
  564. package/lib/esm/_virtual/index11.js.map +1 -0
  565. package/lib/esm/_virtual/index12.js +4 -0
  566. package/lib/esm/_virtual/index12.js.map +1 -0
  567. package/lib/esm/_virtual/index13.js +4 -0
  568. package/lib/esm/_virtual/index13.js.map +1 -0
  569. package/lib/esm/_virtual/index14.js +4 -0
  570. package/lib/esm/_virtual/index14.js.map +1 -0
  571. package/lib/esm/_virtual/index2.js +4 -5
  572. package/lib/esm/_virtual/index2.js.map +1 -1
  573. package/lib/esm/_virtual/index3.js +5 -2
  574. package/lib/esm/_virtual/index3.js.map +1 -1
  575. package/lib/esm/_virtual/index4.js +5 -2
  576. package/lib/esm/_virtual/index4.js.map +1 -1
  577. package/lib/esm/_virtual/index5.js +2 -2
  578. package/lib/esm/_virtual/index6.js +6 -2
  579. package/lib/esm/_virtual/index6.js.map +1 -1
  580. package/lib/esm/_virtual/index7.js +4 -0
  581. package/lib/esm/_virtual/index7.js.map +1 -0
  582. package/lib/esm/_virtual/index8.js +6 -0
  583. package/lib/esm/_virtual/index8.js.map +1 -0
  584. package/lib/esm/_virtual/index9.js +4 -0
  585. package/lib/esm/_virtual/index9.js.map +1 -0
  586. package/lib/esm/_virtual/main.js +4 -0
  587. package/lib/esm/_virtual/main.js.map +1 -0
  588. package/lib/esm/_virtual/mock-interceptor.js +4 -0
  589. package/lib/esm/_virtual/mock-interceptor.js.map +1 -0
  590. package/lib/esm/_virtual/proxy.js +4 -0
  591. package/lib/esm/_virtual/proxy.js.map +1 -0
  592. package/lib/esm/_virtual/tunnel.js +4 -0
  593. package/lib/esm/_virtual/tunnel.js.map +1 -0
  594. package/lib/esm/_virtual/utils.js +4 -0
  595. package/lib/esm/_virtual/utils.js.map +1 -0
  596. package/lib/esm/_virtual/utils2.js +4 -0
  597. package/lib/esm/_virtual/utils2.js.map +1 -0
  598. package/lib/esm/_virtual/utils3.js +4 -0
  599. package/lib/esm/_virtual/utils3.js.map +1 -0
  600. package/lib/esm/artifacts/filter-artifacts.js.map +1 -1
  601. package/lib/esm/env/ci-env.js +6 -1
  602. package/lib/esm/env/ci-env.js.map +1 -1
  603. package/lib/esm/env/load.js +1 -1
  604. package/lib/esm/env/load.js.map +1 -1
  605. package/lib/esm/env/service/github.js +3 -3
  606. package/lib/esm/env/service/github.js.map +1 -1
  607. package/lib/esm/ingest/ingest.js +1 -1
  608. package/lib/esm/ingest/ingest.js.map +1 -1
  609. package/lib/esm/locales/en.js.map +1 -1
  610. package/package.json +11 -11
@@ -0,0 +1,213 @@
1
+ 'use strict';
2
+
3
+ var symbols = require('./core/symbols.js');
4
+ var require$$1 = require('node:url');
5
+ var agent = require('./agent.js');
6
+ var pool = require('./pool.js');
7
+ var dispatcherBase = require('./dispatcher-base.js');
8
+ var errors = require('./core/errors.js');
9
+ var connect = require('./core/connect.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 proxyAgent;
16
+ var hasRequiredProxyAgent;
17
+
18
+ function requireProxyAgent () {
19
+ if (hasRequiredProxyAgent) return proxyAgent;
20
+ hasRequiredProxyAgent = 1;
21
+
22
+ const { kProxy, kClose, kDestroy, kInterceptors } = symbols.__require();
23
+ const { URL } = require$$1__default.default;
24
+ const Agent = agent.__require();
25
+ const Pool = pool.__require();
26
+ const DispatcherBase = dispatcherBase.__require();
27
+ const { InvalidArgumentError, RequestAbortedError } = errors.__require();
28
+ const buildConnector = connect.__require();
29
+
30
+ const kAgent = Symbol('proxy agent');
31
+ const kClient = Symbol('proxy client');
32
+ const kProxyHeaders = Symbol('proxy headers');
33
+ const kRequestTls = Symbol('request tls settings');
34
+ const kProxyTls = Symbol('proxy tls settings');
35
+ const kConnectEndpoint = Symbol('connect endpoint function');
36
+
37
+ function defaultProtocolPort (protocol) {
38
+ return protocol === 'https:' ? 443 : 80
39
+ }
40
+
41
+ function buildProxyOptions (opts) {
42
+ if (typeof opts === 'string') {
43
+ opts = { uri: opts };
44
+ }
45
+
46
+ if (!opts || !opts.uri) {
47
+ throw new InvalidArgumentError('Proxy opts.uri is mandatory')
48
+ }
49
+
50
+ return {
51
+ uri: opts.uri,
52
+ protocol: opts.protocol || 'https'
53
+ }
54
+ }
55
+
56
+ function defaultFactory (origin, opts) {
57
+ return new Pool(origin, opts)
58
+ }
59
+
60
+ class ProxyAgent extends DispatcherBase {
61
+ constructor (opts) {
62
+ super(opts);
63
+ this[kProxy] = buildProxyOptions(opts);
64
+ this[kAgent] = new Agent(opts);
65
+ this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)
66
+ ? opts.interceptors.ProxyAgent
67
+ : [];
68
+
69
+ if (typeof opts === 'string') {
70
+ opts = { uri: opts };
71
+ }
72
+
73
+ if (!opts || !opts.uri) {
74
+ throw new InvalidArgumentError('Proxy opts.uri is mandatory')
75
+ }
76
+
77
+ const { clientFactory = defaultFactory } = opts;
78
+
79
+ if (typeof clientFactory !== 'function') {
80
+ throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')
81
+ }
82
+
83
+ this[kRequestTls] = opts.requestTls;
84
+ this[kProxyTls] = opts.proxyTls;
85
+ this[kProxyHeaders] = opts.headers || {};
86
+
87
+ const resolvedUrl = new URL(opts.uri);
88
+ const { origin, port, host, username, password } = resolvedUrl;
89
+
90
+ if (opts.auth && opts.token) {
91
+ throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')
92
+ } else if (opts.auth) {
93
+ /* @deprecated in favour of opts.token */
94
+ this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`;
95
+ } else if (opts.token) {
96
+ this[kProxyHeaders]['proxy-authorization'] = opts.token;
97
+ } else if (username && password) {
98
+ this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`;
99
+ }
100
+
101
+ const connect = buildConnector({ ...opts.proxyTls });
102
+ this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
103
+ this[kClient] = clientFactory(resolvedUrl, { connect });
104
+ this[kAgent] = new Agent({
105
+ ...opts,
106
+ connect: async (opts, callback) => {
107
+ let requestedHost = opts.host;
108
+ if (!opts.port) {
109
+ requestedHost += `:${defaultProtocolPort(opts.protocol)}`;
110
+ }
111
+ try {
112
+ const { socket, statusCode } = await this[kClient].connect({
113
+ origin,
114
+ port,
115
+ path: requestedHost,
116
+ signal: opts.signal,
117
+ headers: {
118
+ ...this[kProxyHeaders],
119
+ host
120
+ }
121
+ });
122
+ if (statusCode !== 200) {
123
+ socket.on('error', () => {}).destroy();
124
+ callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`));
125
+ }
126
+ if (opts.protocol !== 'https:') {
127
+ callback(null, socket);
128
+ return
129
+ }
130
+ let servername;
131
+ if (this[kRequestTls]) {
132
+ servername = this[kRequestTls].servername;
133
+ } else {
134
+ servername = opts.servername;
135
+ }
136
+ this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback);
137
+ } catch (err) {
138
+ callback(err);
139
+ }
140
+ }
141
+ });
142
+ }
143
+
144
+ dispatch (opts, handler) {
145
+ const { host } = new URL(opts.origin);
146
+ const headers = buildHeaders(opts.headers);
147
+ throwIfProxyAuthIsSent(headers);
148
+ return this[kAgent].dispatch(
149
+ {
150
+ ...opts,
151
+ headers: {
152
+ ...headers,
153
+ host
154
+ }
155
+ },
156
+ handler
157
+ )
158
+ }
159
+
160
+ async [kClose] () {
161
+ await this[kAgent].close();
162
+ await this[kClient].close();
163
+ }
164
+
165
+ async [kDestroy] () {
166
+ await this[kAgent].destroy();
167
+ await this[kClient].destroy();
168
+ }
169
+ }
170
+
171
+ /**
172
+ * @param {string[] | Record<string, string>} headers
173
+ * @returns {Record<string, string>}
174
+ */
175
+ function buildHeaders (headers) {
176
+ // When using undici.fetch, the headers list is stored
177
+ // as an array.
178
+ if (Array.isArray(headers)) {
179
+ /** @type {Record<string, string>} */
180
+ const headersPair = {};
181
+
182
+ for (let i = 0; i < headers.length; i += 2) {
183
+ headersPair[headers[i]] = headers[i + 1];
184
+ }
185
+
186
+ return headersPair
187
+ }
188
+
189
+ return headers
190
+ }
191
+
192
+ /**
193
+ * @param {Record<string, string>} headers
194
+ *
195
+ * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers
196
+ * Nevertheless, it was changed and to avoid a security vulnerability by end users
197
+ * this check was created.
198
+ * It should be removed in the next major version for performance reasons
199
+ */
200
+ function throwIfProxyAuthIsSent (headers) {
201
+ const existProxyAuth = headers && Object.keys(headers)
202
+ .find((key) => key.toLowerCase() === 'proxy-authorization');
203
+ if (existProxyAuth) {
204
+ throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')
205
+ }
206
+ }
207
+
208
+ proxyAgent = ProxyAgent;
209
+ return proxyAgent;
210
+ }
211
+
212
+ exports.__require = requireProxyAgent;
213
+ //# sourceMappingURL=proxy-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-agent.js","sources":["../../../../../../../node_modules/undici/lib/proxy-agent.js"],"sourcesContent":["'use strict'\n\nconst { kProxy, kClose, kDestroy, kInterceptors } = require('./core/symbols')\nconst { URL } = require('url')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError } = require('./core/errors')\nconst buildConnector = require('./core/connect')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction buildProxyOptions (opts) {\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n return {\n uri: opts.uri,\n protocol: opts.protocol || 'https'\n }\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n super(opts)\n this[kProxy] = buildProxyOptions(opts)\n this[kAgent] = new Agent(opts)\n this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)\n ? opts.interceptors.ProxyAgent\n : []\n\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n\n const resolvedUrl = new URL(opts.uri)\n const { origin, port, host, username, password } = resolvedUrl\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n this[kClient] = clientFactory(resolvedUrl, { connect })\n this[kAgent] = new Agent({\n ...opts,\n connect: async (opts, callback) => {\n let requestedHost = opts.host\n if (!opts.port) {\n requestedHost += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const { socket, statusCode } = await this[kClient].connect({\n origin,\n port,\n path: requestedHost,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host\n }\n })\n if (statusCode !== 200) {\n socket.on('error', () => {}).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n }\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n callback(err)\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const { host } = new URL(opts.origin)\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n return this[kAgent].dispatch(\n {\n ...opts,\n headers: {\n ...headers,\n host\n }\n },\n handler\n )\n }\n\n async [kClose] () {\n await this[kAgent].close()\n await this[kClient].close()\n }\n\n async [kDestroy] () {\n await this[kAgent].destroy()\n await this[kClient].destroy()\n }\n}\n\n/**\n * @param {string[] | Record<string, string>} headers\n * @returns {Record<string, string>}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record<string, string>} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record<string, string>} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6"],"mappings":";;;;;;;;;;;;;;;;;;;;;CAEA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAGA,iBAAA;CACpD,MAAM,EAAE,GAAG,EAAE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'use strict';
2
+
3
+ var timers;
4
+ var hasRequiredTimers;
5
+
6
+ function requireTimers () {
7
+ if (hasRequiredTimers) return timers;
8
+ hasRequiredTimers = 1;
9
+
10
+ let fastNow = Date.now();
11
+ let fastNowTimeout;
12
+
13
+ const fastTimers = [];
14
+
15
+ function onTimeout () {
16
+ fastNow = Date.now();
17
+
18
+ let len = fastTimers.length;
19
+ let idx = 0;
20
+ while (idx < len) {
21
+ const timer = fastTimers[idx];
22
+
23
+ if (timer.state === 0) {
24
+ timer.state = fastNow + timer.delay;
25
+ } else if (timer.state > 0 && fastNow >= timer.state) {
26
+ timer.state = -1;
27
+ timer.callback(timer.opaque);
28
+ }
29
+
30
+ if (timer.state === -1) {
31
+ timer.state = -2;
32
+ if (idx !== len - 1) {
33
+ fastTimers[idx] = fastTimers.pop();
34
+ } else {
35
+ fastTimers.pop();
36
+ }
37
+ len -= 1;
38
+ } else {
39
+ idx += 1;
40
+ }
41
+ }
42
+
43
+ if (fastTimers.length > 0) {
44
+ refreshTimeout();
45
+ }
46
+ }
47
+
48
+ function refreshTimeout () {
49
+ if (fastNowTimeout && fastNowTimeout.refresh) {
50
+ fastNowTimeout.refresh();
51
+ } else {
52
+ clearTimeout(fastNowTimeout);
53
+ fastNowTimeout = setTimeout(onTimeout, 1e3);
54
+ if (fastNowTimeout.unref) {
55
+ fastNowTimeout.unref();
56
+ }
57
+ }
58
+ }
59
+
60
+ class Timeout {
61
+ constructor (callback, delay, opaque) {
62
+ this.callback = callback;
63
+ this.delay = delay;
64
+ this.opaque = opaque;
65
+
66
+ // -2 not in timer list
67
+ // -1 in timer list but inactive
68
+ // 0 in timer list waiting for time
69
+ // > 0 in timer list waiting for time to expire
70
+ this.state = -2;
71
+
72
+ this.refresh();
73
+ }
74
+
75
+ refresh () {
76
+ if (this.state === -2) {
77
+ fastTimers.push(this);
78
+ if (!fastNowTimeout || fastTimers.length === 1) {
79
+ refreshTimeout();
80
+ }
81
+ }
82
+
83
+ this.state = 0;
84
+ }
85
+
86
+ clear () {
87
+ this.state = -1;
88
+ }
89
+ }
90
+
91
+ timers = {
92
+ setTimeout (callback, delay, opaque) {
93
+ return delay < 1e3
94
+ ? setTimeout(callback, delay, opaque)
95
+ : new Timeout(callback, delay, opaque)
96
+ },
97
+ clearTimeout (timeout) {
98
+ if (timeout instanceof Timeout) {
99
+ timeout.clear();
100
+ } else {
101
+ clearTimeout(timeout);
102
+ }
103
+ }
104
+ };
105
+ return timers;
106
+ }
107
+
108
+ exports.__require = requireTimers;
109
+ //# sourceMappingURL=timers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timers.js","sources":["../../../../../../../node_modules/undici/lib/timers.js"],"sourcesContent":["'use strict'\n\nlet fastNow = Date.now()\nlet fastNowTimeout\n\nconst fastTimers = []\n\nfunction onTimeout () {\n fastNow = Date.now()\n\n let len = fastTimers.length\n let idx = 0\n while (idx < len) {\n const timer = fastTimers[idx]\n\n if (timer.state === 0) {\n timer.state = fastNow + timer.delay\n } else if (timer.state > 0 && fastNow >= timer.state) {\n timer.state = -1\n timer.callback(timer.opaque)\n }\n\n if (timer.state === -1) {\n timer.state = -2\n if (idx !== len - 1) {\n fastTimers[idx] = fastTimers.pop()\n } else {\n fastTimers.pop()\n }\n len -= 1\n } else {\n idx += 1\n }\n }\n\n if (fastTimers.length > 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n if (fastNowTimeout && fastNowTimeout.refresh) {\n fastNowTimeout.refresh()\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTimeout, 1e3)\n if (fastNowTimeout.unref) {\n fastNowTimeout.unref()\n }\n }\n}\n\nclass Timeout {\n constructor (callback, delay, opaque) {\n this.callback = callback\n this.delay = delay\n this.opaque = opaque\n\n // -2 not in timer list\n // -1 in timer list but inactive\n // 0 in timer list waiting for time\n // > 0 in timer list waiting for time to expire\n this.state = -2\n\n this.refresh()\n }\n\n refresh () {\n if (this.state === -2) {\n fastTimers.push(this)\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n }\n\n this.state = 0\n }\n\n clear () {\n this.state = -1\n }\n}\n\nmodule.exports = {\n setTimeout (callback, delay, opaque) {\n return delay < 1e3\n ? setTimeout(callback, delay, opaque)\n : new Timeout(callback, delay, opaque)\n },\n clearTimeout (timeout) {\n if (timeout instanceof Timeout) {\n timeout.clear()\n } else {\n clearTimeout(timeout)\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAEA,CAAA,IAAI,OAAO,GAAG,IAAI,CAAC,GAAG;CACtB,IAAI;;AAEJ,CAAA,MAAM,UAAU,GAAG;;AAEnB,CAAA,SAAS,SAAS,IAAI;AACtB,GAAE,OAAO,GAAG,IAAI,CAAC,GAAG;;AAEpB,GAAE,IAAI,GAAG,GAAG,UAAU,CAAC;GACrB,IAAI,GAAG,GAAG;AACZ,GAAE,OAAO,GAAG,GAAG,GAAG,EAAE;AACpB,KAAI,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG;;AAEhC,KAAI,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC,EAAE;AAC3B,OAAM,KAAK,CAAC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;AACpC,KAAA,CAAK,MAAM,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,IAAI,OAAO,IAAI,KAAK,CAAC,KAAK,EAAE;AAC1D,OAAM,KAAK,CAAC,KAAK,GAAG;AACpB,OAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM;AACjC,KAAA;;AAEA,KAAI,IAAI,KAAK,CAAC,KAAK,KAAK,EAAE,EAAE;AAC5B,OAAM,KAAK,CAAC,KAAK,GAAG;AACpB,OAAM,IAAI,GAAG,KAAK,GAAG,GAAG,CAAC,EAAE;AAC3B,SAAQ,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG;AACxC,OAAA,CAAO,MAAM;SACL,UAAU,CAAC,GAAG;AACtB,OAAA;AACA,OAAM,GAAG,I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AQ,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM;AAC1C,SAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM;GAC3C,CAAG;AACH,GAAE,YAAY,CAAC,CAAC,OAAO,EAAE;AACzB,KAAI,IAAI,OAAO,YAAY,OAAO,EAAE;OAC9B,OAAO,CAAC,KAAK;AACnB,KAAA,CAAK,MAAM;OACL,YAAY,CAAC,OAAO;AAC1B,KAAA;AACA,GAAA;AACA;;;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,318 @@
1
+ 'use strict';
2
+
3
+ var require$$0 = require('node:diagnostics_channel');
4
+ var constants = require('./constants.js');
5
+ var symbols = require('./symbols.js');
6
+ var util = require('./util.js');
7
+ var events = require('./events.js');
8
+ var request = require('../fetch/request.js');
9
+ var index = require('../fetch/index.js');
10
+ var headers = require('../fetch/headers.js');
11
+ var global = require('../global.js');
12
+ var symbols$1 = require('../core/symbols.js');
13
+
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
+
16
+ var require$$0__default = /*#__PURE__*/_interopDefault(require$$0);
17
+
18
+ var connection;
19
+ var hasRequiredConnection;
20
+
21
+ function requireConnection () {
22
+ if (hasRequiredConnection) return connection;
23
+ hasRequiredConnection = 1;
24
+
25
+ const diagnosticsChannel = require$$0__default.default;
26
+ const { uid, states } = constants.__require();
27
+ const {
28
+ kReadyState,
29
+ kSentClose,
30
+ kByteParser,
31
+ kReceivedClose
32
+ } = symbols.__require();
33
+ const { fireEvent, failWebsocketConnection } = util.__require();
34
+ const { CloseEvent } = events.__require();
35
+ const { makeRequest } = request.__require();
36
+ const { fetching } = index.__require();
37
+ const { Headers } = headers.__require();
38
+ const { getGlobalDispatcher } = global.__require();
39
+ const { kHeadersList } = symbols$1.__require();
40
+
41
+ const channels = {};
42
+ channels.open = diagnosticsChannel.channel('undici:websocket:open');
43
+ channels.close = diagnosticsChannel.channel('undici:websocket:close');
44
+ channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error');
45
+
46
+ /** @type {import('crypto')} */
47
+ let crypto;
48
+ try {
49
+ crypto = require('crypto');
50
+ } catch {
51
+
52
+ }
53
+
54
+ /**
55
+ * @see https://websockets.spec.whatwg.org/#concept-websocket-establish
56
+ * @param {URL} url
57
+ * @param {string|string[]} protocols
58
+ * @param {import('./websocket').WebSocket} ws
59
+ * @param {(response: any) => void} onEstablish
60
+ * @param {Partial<import('../../types/websocket').WebSocketInit>} options
61
+ */
62
+ function establishWebSocketConnection (url, protocols, ws, onEstablish, options) {
63
+ // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s
64
+ // scheme is "ws", and to "https" otherwise.
65
+ const requestURL = url;
66
+
67
+ requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:';
68
+
69
+ // 2. Let request be a new request, whose URL is requestURL, client is client,
70
+ // service-workers mode is "none", referrer is "no-referrer", mode is
71
+ // "websocket", credentials mode is "include", cache mode is "no-store" ,
72
+ // and redirect mode is "error".
73
+ const request = makeRequest({
74
+ urlList: [requestURL],
75
+ serviceWorkers: 'none',
76
+ referrer: 'no-referrer',
77
+ mode: 'websocket',
78
+ credentials: 'include',
79
+ cache: 'no-store',
80
+ redirect: 'error'
81
+ });
82
+
83
+ // Note: undici extension, allow setting custom headers.
84
+ if (options.headers) {
85
+ const headersList = new Headers(options.headers)[kHeadersList];
86
+
87
+ request.headersList = headersList;
88
+ }
89
+
90
+ // 3. Append (`Upgrade`, `websocket`) to request’s header list.
91
+ // 4. Append (`Connection`, `Upgrade`) to request’s header list.
92
+ // Note: both of these are handled by undici currently.
93
+ // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397
94
+
95
+ // 5. Let keyValue be a nonce consisting of a randomly selected
96
+ // 16-byte value that has been forgiving-base64-encoded and
97
+ // isomorphic encoded.
98
+ const keyValue = crypto.randomBytes(16).toString('base64');
99
+
100
+ // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s
101
+ // header list.
102
+ request.headersList.append('sec-websocket-key', keyValue);
103
+
104
+ // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s
105
+ // header list.
106
+ request.headersList.append('sec-websocket-version', '13');
107
+
108
+ // 8. For each protocol in protocols, combine
109
+ // (`Sec-WebSocket-Protocol`, protocol) in request’s header
110
+ // list.
111
+ for (const protocol of protocols) {
112
+ request.headersList.append('sec-websocket-protocol', protocol);
113
+ }
114
+
115
+ // 9. Let permessageDeflate be a user-agent defined
116
+ // "permessage-deflate" extension header value.
117
+ // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673
118
+ // TODO: enable once permessage-deflate is supported
119
+ const permessageDeflate = ''; // 'permessage-deflate; 15'
120
+
121
+ // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to
122
+ // request’s header list.
123
+ // request.headersList.append('sec-websocket-extensions', permessageDeflate)
124
+
125
+ // 11. Fetch request with useParallelQueue set to true, and
126
+ // processResponse given response being these steps:
127
+ const controller = fetching({
128
+ request,
129
+ useParallelQueue: true,
130
+ dispatcher: options.dispatcher ?? getGlobalDispatcher(),
131
+ processResponse (response) {
132
+ // 1. If response is a network error or its status is not 101,
133
+ // fail the WebSocket connection.
134
+ if (response.type === 'error' || response.status !== 101) {
135
+ failWebsocketConnection(ws, 'Received network error or non-101 status code.');
136
+ return
137
+ }
138
+
139
+ // 2. If protocols is not the empty list and extracting header
140
+ // list values given `Sec-WebSocket-Protocol` and response’s
141
+ // header list results in null, failure, or the empty byte
142
+ // sequence, then fail the WebSocket connection.
143
+ if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {
144
+ failWebsocketConnection(ws, 'Server did not respond with sent protocols.');
145
+ return
146
+ }
147
+
148
+ // 3. Follow the requirements stated step 2 to step 6, inclusive,
149
+ // of the last set of steps in section 4.1 of The WebSocket
150
+ // Protocol to validate response. This either results in fail
151
+ // the WebSocket connection or the WebSocket connection is
152
+ // established.
153
+
154
+ // 2. If the response lacks an |Upgrade| header field or the |Upgrade|
155
+ // header field contains a value that is not an ASCII case-
156
+ // insensitive match for the value "websocket", the client MUST
157
+ // _Fail the WebSocket Connection_.
158
+ if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {
159
+ failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".');
160
+ return
161
+ }
162
+
163
+ // 3. If the response lacks a |Connection| header field or the
164
+ // |Connection| header field doesn't contain a token that is an
165
+ // ASCII case-insensitive match for the value "Upgrade", the client
166
+ // MUST _Fail the WebSocket Connection_.
167
+ if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {
168
+ failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".');
169
+ return
170
+ }
171
+
172
+ // 4. If the response lacks a |Sec-WebSocket-Accept| header field or
173
+ // the |Sec-WebSocket-Accept| contains a value other than the
174
+ // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-
175
+ // Key| (as a string, not base64-decoded) with the string "258EAFA5-
176
+ // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and
177
+ // trailing whitespace, the client MUST _Fail the WebSocket
178
+ // Connection_.
179
+ const secWSAccept = response.headersList.get('Sec-WebSocket-Accept');
180
+ const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64');
181
+ if (secWSAccept !== digest) {
182
+ failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.');
183
+ return
184
+ }
185
+
186
+ // 5. If the response includes a |Sec-WebSocket-Extensions| header
187
+ // field and this header field indicates the use of an extension
188
+ // that was not present in the client's handshake (the server has
189
+ // indicated an extension not requested by the client), the client
190
+ // MUST _Fail the WebSocket Connection_. (The parsing of this
191
+ // header field to determine which extensions are requested is
192
+ // discussed in Section 9.1.)
193
+ const secExtension = response.headersList.get('Sec-WebSocket-Extensions');
194
+
195
+ if (secExtension !== null && secExtension !== permessageDeflate) {
196
+ failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.');
197
+ return
198
+ }
199
+
200
+ // 6. If the response includes a |Sec-WebSocket-Protocol| header field
201
+ // and this header field indicates the use of a subprotocol that was
202
+ // not present in the client's handshake (the server has indicated a
203
+ // subprotocol not requested by the client), the client MUST _Fail
204
+ // the WebSocket Connection_.
205
+ const secProtocol = response.headersList.get('Sec-WebSocket-Protocol');
206
+
207
+ if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) {
208
+ failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.');
209
+ return
210
+ }
211
+
212
+ response.socket.on('data', onSocketData);
213
+ response.socket.on('close', onSocketClose);
214
+ response.socket.on('error', onSocketError);
215
+
216
+ if (channels.open.hasSubscribers) {
217
+ channels.open.publish({
218
+ address: response.socket.address(),
219
+ protocol: secProtocol,
220
+ extensions: secExtension
221
+ });
222
+ }
223
+
224
+ onEstablish(response);
225
+ }
226
+ });
227
+
228
+ return controller
229
+ }
230
+
231
+ /**
232
+ * @param {Buffer} chunk
233
+ */
234
+ function onSocketData (chunk) {
235
+ if (!this.ws[kByteParser].write(chunk)) {
236
+ this.pause();
237
+ }
238
+ }
239
+
240
+ /**
241
+ * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
242
+ * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4
243
+ */
244
+ function onSocketClose () {
245
+ const { ws } = this;
246
+
247
+ // If the TCP connection was closed after the
248
+ // WebSocket closing handshake was completed, the WebSocket connection
249
+ // is said to have been closed _cleanly_.
250
+ const wasClean = ws[kSentClose] && ws[kReceivedClose];
251
+
252
+ let code = 1005;
253
+ let reason = '';
254
+
255
+ const result = ws[kByteParser].closingInfo;
256
+
257
+ if (result) {
258
+ code = result.code ?? 1005;
259
+ reason = result.reason;
260
+ } else if (!ws[kSentClose]) {
261
+ // If _The WebSocket
262
+ // Connection is Closed_ and no Close control frame was received by the
263
+ // endpoint (such as could occur if the underlying transport connection
264
+ // is lost), _The WebSocket Connection Close Code_ is considered to be
265
+ // 1006.
266
+ code = 1006;
267
+ }
268
+
269
+ // 1. Change the ready state to CLOSED (3).
270
+ ws[kReadyState] = states.CLOSED;
271
+
272
+ // 2. If the user agent was required to fail the WebSocket
273
+ // connection, or if the WebSocket connection was closed
274
+ // after being flagged as full, fire an event named error
275
+ // at the WebSocket object.
276
+ // TODO
277
+
278
+ // 3. Fire an event named close at the WebSocket object,
279
+ // using CloseEvent, with the wasClean attribute
280
+ // initialized to true if the connection closed cleanly
281
+ // and false otherwise, the code attribute initialized to
282
+ // the WebSocket connection close code, and the reason
283
+ // attribute initialized to the result of applying UTF-8
284
+ // decode without BOM to the WebSocket connection close
285
+ // reason.
286
+ fireEvent('close', ws, CloseEvent, {
287
+ wasClean, code, reason
288
+ });
289
+
290
+ if (channels.close.hasSubscribers) {
291
+ channels.close.publish({
292
+ websocket: ws,
293
+ code,
294
+ reason
295
+ });
296
+ }
297
+ }
298
+
299
+ function onSocketError (error) {
300
+ const { ws } = this;
301
+
302
+ ws[kReadyState] = states.CLOSING;
303
+
304
+ if (channels.socketError.hasSubscribers) {
305
+ channels.socketError.publish(error);
306
+ }
307
+
308
+ this.destroy();
309
+ }
310
+
311
+ connection = {
312
+ establishWebSocketConnection
313
+ };
314
+ return connection;
315
+ }
316
+
317
+ exports.__require = requireConnection;
318
+ //# sourceMappingURL=connection.js.map