@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.
Files changed (704) hide show
  1. package/lib/cjs/__/@actions/http-client/__/undici/index.js +226 -0
  2. package/lib/cjs/__/@actions/http-client/__/undici/index.js.map +1 -0
  3. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/abort-signal.js +73 -0
  4. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/abort-signal.js.map +1 -0
  5. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-connect.js +131 -0
  6. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-connect.js.map +1 -0
  7. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-pipeline.js +276 -0
  8. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-pipeline.js.map +1 -0
  9. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-request.js +238 -0
  10. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-request.js.map +1 -0
  11. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-stream.js +246 -0
  12. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-stream.js.map +1 -0
  13. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-upgrade.js +131 -0
  14. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/api-upgrade.js.map +1 -0
  15. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/index.js +25 -0
  16. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/index.js.map +1 -0
  17. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/readable.js +405 -0
  18. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/readable.js.map +1 -0
  19. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/util.js +114 -0
  20. package/lib/cjs/__/@actions/http-client/__/undici/lib/api/util.js.map +1 -0
  21. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/connect.js +266 -0
  22. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/connect.js.map +1 -0
  23. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/constants.js +130 -0
  24. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/constants.js.map +1 -0
  25. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/diagnostics.js +222 -0
  26. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/diagnostics.js.map +1 -0
  27. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/errors.js +418 -0
  28. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/errors.js.map +1 -0
  29. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/request.js +417 -0
  30. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/request.js.map +1 -0
  31. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/symbols.js +80 -0
  32. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/symbols.js.map +1 -0
  33. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/tree.js +166 -0
  34. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/tree.js.map +1 -0
  35. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/util.js +755 -0
  36. package/lib/cjs/__/@actions/http-client/__/undici/lib/core/util.js.map +1 -0
  37. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/agent.js +149 -0
  38. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/agent.js.map +1 -0
  39. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js +227 -0
  40. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js.map +1 -0
  41. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js +1397 -0
  42. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js.map +1 -0
  43. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js +768 -0
  44. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js.map +1 -0
  45. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client.js +650 -0
  46. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/client.js.map +1 -0
  47. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js +206 -0
  48. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js.map +1 -0
  49. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js +83 -0
  50. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js.map +1 -0
  51. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js +177 -0
  52. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js.map +1 -0
  53. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js +129 -0
  54. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js.map +1 -0
  55. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js +211 -0
  56. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js.map +1 -0
  57. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js +49 -0
  58. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js.map +1 -0
  59. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool.js +126 -0
  60. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/pool.js.map +1 -0
  61. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js +299 -0
  62. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js.map +1 -0
  63. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js +50 -0
  64. package/lib/cjs/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js.map +1 -0
  65. package/lib/cjs/__/@actions/http-client/__/undici/lib/global.js +47 -0
  66. package/lib/cjs/__/@actions/http-client/__/undici/lib/global.js.map +1 -0
  67. package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js +56 -0
  68. package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js.map +1 -0
  69. package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js +237 -0
  70. package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js.map +1 -0
  71. package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/retry-handler.js +395 -0
  72. package/lib/cjs/__/@actions/http-client/__/undici/lib/handler/retry-handler.js.map +1 -0
  73. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dns.js +397 -0
  74. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dns.js.map +1 -0
  75. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dump.js +139 -0
  76. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/dump.js.map +1 -0
  77. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js +35 -0
  78. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js.map +1 -0
  79. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect.js +38 -0
  80. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/redirect.js.map +1 -0
  81. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/retry.js +33 -0
  82. package/lib/cjs/__/@actions/http-client/__/undici/lib/interceptor/retry.js.map +1 -0
  83. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/constants.js +288 -0
  84. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/constants.js.map +1 -0
  85. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js +23 -0
  86. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js.map +1 -0
  87. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js +23 -0
  88. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js.map +1 -0
  89. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/utils.js +28 -0
  90. package/lib/cjs/__/@actions/http-client/__/undici/lib/llhttp/utils.js.map +1 -0
  91. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-agent.js +183 -0
  92. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-agent.js.map +1 -0
  93. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-client.js +83 -0
  94. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-client.js.map +1 -0
  95. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-errors.js +42 -0
  96. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-errors.js.map +1 -0
  97. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js +224 -0
  98. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js.map +1 -0
  99. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-pool.js +83 -0
  100. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-pool.js.map +1 -0
  101. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js +35 -0
  102. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js.map +1 -0
  103. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-utils.js +390 -0
  104. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/mock-utils.js.map +1 -0
  105. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js +63 -0
  106. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js.map +1 -0
  107. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pluralizer.js +41 -0
  108. package/lib/cjs/__/@actions/http-client/__/undici/lib/mock/pluralizer.js.map +1 -0
  109. package/lib/cjs/__/@actions/http-client/__/undici/lib/util/timers.js +435 -0
  110. package/lib/cjs/__/@actions/http-client/__/undici/lib/util/timers.js.map +1 -0
  111. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cache.js +886 -0
  112. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cache.js.map +1 -0
  113. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js +169 -0
  114. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js.map +1 -0
  115. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/symbols.js +19 -0
  116. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/symbols.js.map +1 -0
  117. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/util.js +65 -0
  118. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cache/util.js.map +1 -0
  119. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/constants.js +24 -0
  120. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/constants.js.map +1 -0
  121. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/index.js +201 -0
  122. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/index.js.map +1 -0
  123. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/parse.js +338 -0
  124. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/parse.js.map +1 -0
  125. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/util.js +294 -0
  126. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/cookies/util.js.map +1 -0
  127. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js +417 -0
  128. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js.map +1 -0
  129. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js +508 -0
  130. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js.map +1 -0
  131. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/util.js +49 -0
  132. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/eventsource/util.js.map +1 -0
  133. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/body.js +560 -0
  134. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/body.js.map +1 -0
  135. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/constants.js +136 -0
  136. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/constants.js.map +1 -0
  137. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js +762 -0
  138. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js.map +1 -0
  139. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js +60 -0
  140. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js.map +1 -0
  141. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/file.js +146 -0
  142. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/file.js.map +1 -0
  143. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js +499 -0
  144. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js.map +1 -0
  145. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js +275 -0
  146. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js.map +1 -0
  147. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/global.js +52 -0
  148. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/global.js.map +1 -0
  149. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/headers.js +709 -0
  150. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/headers.js.map +1 -0
  151. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/index.js +2235 -0
  152. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/index.js.map +1 -0
  153. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/request.js +1069 -0
  154. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/request.js.map +1 -0
  155. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/response.js +640 -0
  156. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/response.js.map +1 -0
  157. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js +21 -0
  158. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js.map +1 -0
  159. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/util.js +1662 -0
  160. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/util.js.map +1 -0
  161. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js +716 -0
  162. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js.map +1 -0
  163. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js +302 -0
  164. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js.map +1 -0
  165. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js +361 -0
  166. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js.map +1 -0
  167. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js +92 -0
  168. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js.map +1 -0
  169. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js +22 -0
  170. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js.map +1 -0
  171. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/util.js +417 -0
  172. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/fileapi/util.js.map +1 -0
  173. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/connection.js +391 -0
  174. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/connection.js.map +1 -0
  175. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/constants.js +78 -0
  176. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/constants.js.map +1 -0
  177. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/events.js +350 -0
  178. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/events.js.map +1 -0
  179. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/frame.js +110 -0
  180. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/frame.js.map +1 -0
  181. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js +89 -0
  182. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js.map +1 -0
  183. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js +451 -0
  184. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js.map +1 -0
  185. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/sender.js +120 -0
  186. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/sender.js.map +1 -0
  187. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js +24 -0
  188. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js.map +1 -0
  189. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/util.js +336 -0
  190. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/util.js.map +1 -0
  191. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js +618 -0
  192. package/lib/cjs/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js.map +1 -0
  193. package/lib/cjs/__/@actions/http-client/lib/index.js +2 -2
  194. package/lib/cjs/__/@octokit/auth-token/dist-bundle/index.js.map +1 -0
  195. package/lib/cjs/__/@octokit/core/dist-src/index.js.map +1 -0
  196. package/lib/cjs/__/@octokit/core/dist-src/version.js.map +1 -0
  197. package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/endpoint/dist-bundle/index.js +1 -1
  198. package/lib/cjs/__/@octokit/endpoint/dist-bundle/index.js.map +1 -0
  199. package/lib/cjs/__/@octokit/graphql/dist-bundle/index.js.map +1 -0
  200. package/lib/cjs/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +1 -0
  201. package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +1 -0
  202. package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +1 -0
  203. package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +1 -0
  204. package/lib/cjs/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +1 -0
  205. package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/request/dist-bundle/index.js +5 -4
  206. package/lib/cjs/__/@octokit/request/dist-bundle/index.js.map +1 -0
  207. package/lib/cjs/__/@octokit/request-error/dist-src/index.js.map +1 -0
  208. package/lib/cjs/__/before-after-hook/index.js.map +1 -0
  209. package/lib/cjs/__/before-after-hook/lib/add.js.map +1 -0
  210. package/lib/cjs/__/before-after-hook/lib/register.js.map +1 -0
  211. package/lib/cjs/__/before-after-hook/lib/remove.js.map +1 -0
  212. package/lib/cjs/__/cross-spawn/index.js +1 -1
  213. package/lib/cjs/__/env-ci/lib/git.js +1 -1
  214. package/lib/cjs/__/{env-ci/__/execa → execa}/index.js +3 -3
  215. package/lib/cjs/__/execa/index.js.map +1 -0
  216. package/lib/cjs/__/execa/lib/command.js.map +1 -0
  217. package/lib/cjs/__/execa/lib/error.js.map +1 -0
  218. package/lib/cjs/__/execa/lib/promise.js.map +1 -0
  219. package/lib/cjs/__/execa/lib/stdio.js.map +1 -0
  220. package/lib/cjs/__/{env-ci/__/execa → execa}/lib/stream.js +1 -1
  221. package/lib/cjs/__/execa/lib/stream.js.map +1 -0
  222. package/lib/cjs/__/execa/lib/verbose.js.map +1 -0
  223. package/lib/cjs/__/get-stream/source/array-buffer.js.map +1 -0
  224. package/lib/cjs/__/human-signals/build/src/core.js.map +1 -0
  225. package/lib/cjs/__/human-signals/build/src/main.js.map +1 -0
  226. package/lib/cjs/__/human-signals/build/src/realtime.js.map +1 -0
  227. package/lib/cjs/__/human-signals/build/src/signals.js.map +1 -0
  228. package/lib/cjs/__/is-stream/index.js.map +1 -0
  229. package/lib/cjs/__/json-with-bigint/json-with-bigint.js +151 -0
  230. package/lib/cjs/__/json-with-bigint/json-with-bigint.js.map +1 -0
  231. package/lib/cjs/__/npm-run-path/__/path-key/index.js.map +1 -0
  232. package/lib/cjs/__/{env-ci/__/npm-run-path → npm-run-path}/index.js +1 -1
  233. package/lib/cjs/__/npm-run-path/index.js.map +1 -0
  234. package/lib/cjs/__/path-key/index.js +1 -1
  235. package/lib/cjs/__/signal-exit/dist/mjs/index.js.map +1 -0
  236. package/lib/cjs/__/signal-exit/dist/mjs/signals.js.map +1 -0
  237. package/lib/cjs/__/strip-final-newline/index.js.map +1 -0
  238. package/lib/cjs/__/undici/index.js +1 -1
  239. package/lib/cjs/__/undici/lib/api/api-connect.js +3 -3
  240. package/lib/cjs/__/undici/lib/api/api-pipeline.js +3 -3
  241. package/lib/cjs/__/undici/lib/api/api-request.js +3 -3
  242. package/lib/cjs/__/undici/lib/api/api-stream.js +3 -3
  243. package/lib/cjs/__/undici/lib/api/api-upgrade.js +3 -3
  244. package/lib/cjs/__/undici/lib/core/util.js +14 -14
  245. package/lib/cjs/__/undici/lib/fetch/body.js +8 -8
  246. package/lib/cjs/__/undici/lib/fetch/constants.js +3 -3
  247. package/lib/cjs/__/undici/lib/fetch/dataURL.js +5 -5
  248. package/lib/cjs/__/undici/lib/fetch/file.js +3 -3
  249. package/lib/cjs/__/undici/lib/fetch/formdata.js +3 -3
  250. package/lib/cjs/__/undici/lib/fetch/index.js +3 -3
  251. package/lib/cjs/__/undici/lib/fetch/index.js.map +1 -1
  252. package/lib/cjs/__/undici/lib/fetch/util.js +6 -6
  253. package/lib/cjs/__/undici/lib/fileapi/util.js +6 -6
  254. package/lib/cjs/__/undici/lib/websocket/events.js +3 -3
  255. package/lib/cjs/__/universal-user-agent/index.js.map +1 -0
  256. package/lib/cjs/_virtual/api-request2.js +6 -0
  257. package/lib/cjs/_virtual/api-request2.js.map +1 -0
  258. package/lib/cjs/_virtual/constants2.js +6 -0
  259. package/lib/cjs/_virtual/constants2.js.map +1 -0
  260. package/lib/cjs/_virtual/index10.js +2 -2
  261. package/lib/cjs/_virtual/index11.js +2 -2
  262. package/lib/cjs/_virtual/index14.js +2 -2
  263. package/lib/cjs/_virtual/index15.js +6 -0
  264. package/lib/cjs/_virtual/index15.js.map +1 -0
  265. package/lib/cjs/_virtual/index16.js +6 -0
  266. package/lib/cjs/_virtual/index16.js.map +1 -0
  267. package/lib/cjs/_virtual/index2.js +1 -1
  268. package/lib/cjs/_virtual/index3.js +1 -1
  269. package/lib/cjs/_virtual/index4.js +1 -1
  270. package/lib/cjs/_virtual/index8.js +2 -2
  271. package/lib/cjs/_virtual/mock-interceptor2.js +6 -0
  272. package/lib/cjs/_virtual/mock-interceptor2.js.map +1 -0
  273. package/lib/cjs/_virtual/utils4.js +6 -0
  274. package/lib/cjs/_virtual/utils4.js.map +1 -0
  275. package/lib/cjs/env/load.js +1 -1
  276. package/lib/cjs/env/load.js.map +1 -1
  277. package/lib/esm/__/@actions/http-client/__/undici/index.js +220 -0
  278. package/lib/esm/__/@actions/http-client/__/undici/index.js.map +1 -0
  279. package/lib/esm/__/@actions/http-client/__/undici/lib/api/abort-signal.js +71 -0
  280. package/lib/esm/__/@actions/http-client/__/undici/lib/api/abort-signal.js.map +1 -0
  281. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-connect.js +124 -0
  282. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-connect.js.map +1 -0
  283. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-pipeline.js +268 -0
  284. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-pipeline.js.map +1 -0
  285. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-request.js +231 -0
  286. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-request.js.map +1 -0
  287. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-stream.js +238 -0
  288. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-stream.js.map +1 -0
  289. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-upgrade.js +124 -0
  290. package/lib/esm/__/@actions/http-client/__/undici/lib/api/api-upgrade.js.map +1 -0
  291. package/lib/esm/__/@actions/http-client/__/undici/lib/api/index.js +23 -0
  292. package/lib/esm/__/@actions/http-client/__/undici/lib/api/index.js.map +1 -0
  293. package/lib/esm/__/@actions/http-client/__/undici/lib/api/readable.js +398 -0
  294. package/lib/esm/__/@actions/http-client/__/undici/lib/api/readable.js.map +1 -0
  295. package/lib/esm/__/@actions/http-client/__/undici/lib/api/util.js +108 -0
  296. package/lib/esm/__/@actions/http-client/__/undici/lib/api/util.js.map +1 -0
  297. package/lib/esm/__/@actions/http-client/__/undici/lib/core/connect.js +258 -0
  298. package/lib/esm/__/@actions/http-client/__/undici/lib/core/connect.js.map +1 -0
  299. package/lib/esm/__/@actions/http-client/__/undici/lib/core/constants.js +128 -0
  300. package/lib/esm/__/@actions/http-client/__/undici/lib/core/constants.js.map +1 -0
  301. package/lib/esm/__/@actions/http-client/__/undici/lib/core/diagnostics.js +215 -0
  302. package/lib/esm/__/@actions/http-client/__/undici/lib/core/diagnostics.js.map +1 -0
  303. package/lib/esm/__/@actions/http-client/__/undici/lib/core/errors.js +416 -0
  304. package/lib/esm/__/@actions/http-client/__/undici/lib/core/errors.js.map +1 -0
  305. package/lib/esm/__/@actions/http-client/__/undici/lib/core/request.js +411 -0
  306. package/lib/esm/__/@actions/http-client/__/undici/lib/core/request.js.map +1 -0
  307. package/lib/esm/__/@actions/http-client/__/undici/lib/core/symbols.js +78 -0
  308. package/lib/esm/__/@actions/http-client/__/undici/lib/core/symbols.js.map +1 -0
  309. package/lib/esm/__/@actions/http-client/__/undici/lib/core/tree.js +164 -0
  310. package/lib/esm/__/@actions/http-client/__/undici/lib/core/tree.js.map +1 -0
  311. package/lib/esm/__/@actions/http-client/__/undici/lib/core/util.js +742 -0
  312. package/lib/esm/__/@actions/http-client/__/undici/lib/core/util.js.map +1 -0
  313. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/agent.js +147 -0
  314. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/agent.js.map +1 -0
  315. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js +225 -0
  316. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/balanced-pool.js.map +1 -0
  317. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js +1391 -0
  318. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h1.js.map +1 -0
  319. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js +761 -0
  320. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client-h2.js.map +1 -0
  321. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client.js +642 -0
  322. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/client.js.map +1 -0
  323. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js +204 -0
  324. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher-base.js.map +1 -0
  325. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js +77 -0
  326. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/dispatcher.js.map +1 -0
  327. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js +175 -0
  328. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/env-http-proxy-agent.js.map +1 -0
  329. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js +127 -0
  330. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/fixed-queue.js.map +1 -0
  331. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js +209 -0
  332. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-base.js.map +1 -0
  333. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js +47 -0
  334. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool-stats.js.map +1 -0
  335. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool.js +124 -0
  336. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/pool.js.map +1 -0
  337. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js +293 -0
  338. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/proxy-agent.js.map +1 -0
  339. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js +48 -0
  340. package/lib/esm/__/@actions/http-client/__/undici/lib/dispatcher/retry-agent.js.map +1 -0
  341. package/lib/esm/__/@actions/http-client/__/undici/lib/global.js +45 -0
  342. package/lib/esm/__/@actions/http-client/__/undici/lib/global.js.map +1 -0
  343. package/lib/esm/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js +54 -0
  344. package/lib/esm/__/@actions/http-client/__/undici/lib/handler/decorator-handler.js.map +1 -0
  345. package/lib/esm/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js +230 -0
  346. package/lib/esm/__/@actions/http-client/__/undici/lib/handler/redirect-handler.js.map +1 -0
  347. package/lib/esm/__/@actions/http-client/__/undici/lib/handler/retry-handler.js +389 -0
  348. package/lib/esm/__/@actions/http-client/__/undici/lib/handler/retry-handler.js.map +1 -0
  349. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dns.js +390 -0
  350. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dns.js.map +1 -0
  351. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dump.js +137 -0
  352. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/dump.js.map +1 -0
  353. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js +33 -0
  354. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect-interceptor.js.map +1 -0
  355. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect.js +36 -0
  356. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/redirect.js.map +1 -0
  357. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/retry.js +31 -0
  358. package/lib/esm/__/@actions/http-client/__/undici/lib/interceptor/retry.js.map +1 -0
  359. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/constants.js +286 -0
  360. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/constants.js.map +1 -0
  361. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js +17 -0
  362. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp-wasm.js.map +1 -0
  363. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js +17 -0
  364. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/llhttp_simd-wasm.js.map +1 -0
  365. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/utils.js +26 -0
  366. package/lib/esm/__/@actions/http-client/__/undici/lib/llhttp/utils.js.map +1 -0
  367. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-agent.js +181 -0
  368. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-agent.js.map +1 -0
  369. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-client.js +77 -0
  370. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-client.js.map +1 -0
  371. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-errors.js +40 -0
  372. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-errors.js.map +1 -0
  373. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js +222 -0
  374. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-interceptor.js.map +1 -0
  375. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-pool.js +77 -0
  376. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-pool.js.map +1 -0
  377. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js +33 -0
  378. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-symbols.js.map +1 -0
  379. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-utils.js +383 -0
  380. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/mock-utils.js.map +1 -0
  381. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js +56 -0
  382. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pending-interceptors-formatter.js.map +1 -0
  383. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pluralizer.js +39 -0
  384. package/lib/esm/__/@actions/http-client/__/undici/lib/mock/pluralizer.js.map +1 -0
  385. package/lib/esm/__/@actions/http-client/__/undici/lib/util/timers.js +433 -0
  386. package/lib/esm/__/@actions/http-client/__/undici/lib/util/timers.js.map +1 -0
  387. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cache.js +880 -0
  388. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cache.js.map +1 -0
  389. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js +167 -0
  390. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/cachestorage.js.map +1 -0
  391. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/symbols.js +17 -0
  392. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/symbols.js.map +1 -0
  393. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/util.js +59 -0
  394. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cache/util.js.map +1 -0
  395. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/constants.js +22 -0
  396. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/constants.js.map +1 -0
  397. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/index.js +199 -0
  398. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/index.js.map +1 -0
  399. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/parse.js +332 -0
  400. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/parse.js.map +1 -0
  401. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/util.js +292 -0
  402. package/lib/esm/__/@actions/http-client/__/undici/lib/web/cookies/util.js.map +1 -0
  403. package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js +411 -0
  404. package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource-stream.js.map +1 -0
  405. package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js +502 -0
  406. package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/eventsource.js.map +1 -0
  407. package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/util.js +47 -0
  408. package/lib/esm/__/@actions/http-client/__/undici/lib/web/eventsource/util.js.map +1 -0
  409. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/body.js +551 -0
  410. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/body.js.map +1 -0
  411. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/constants.js +134 -0
  412. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/constants.js.map +1 -0
  413. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js +756 -0
  414. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/data-url.js.map +1 -0
  415. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js +58 -0
  416. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/dispatcher-weakref.js.map +1 -0
  417. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/file.js +140 -0
  418. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/file.js.map +1 -0
  419. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js +492 -0
  420. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata-parser.js.map +1 -0
  421. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js +268 -0
  422. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/formdata.js.map +1 -0
  423. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/global.js +50 -0
  424. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/global.js.map +1 -0
  425. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/headers.js +702 -0
  426. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/headers.js.map +1 -0
  427. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/index.js +2224 -0
  428. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/index.js.map +1 -0
  429. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/request.js +1061 -0
  430. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/request.js.map +1 -0
  431. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/response.js +633 -0
  432. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/response.js.map +1 -0
  433. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js +19 -0
  434. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/symbols.js.map +1 -0
  435. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/util.js +1652 -0
  436. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/util.js.map +1 -0
  437. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js +709 -0
  438. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fetch/webidl.js.map +1 -0
  439. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js +300 -0
  440. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/encoding.js.map +1 -0
  441. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js +359 -0
  442. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/filereader.js.map +1 -0
  443. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js +90 -0
  444. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/progressevent.js.map +1 -0
  445. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js +20 -0
  446. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/symbols.js.map +1 -0
  447. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/util.js +409 -0
  448. package/lib/esm/__/@actions/http-client/__/undici/lib/web/fileapi/util.js.map +1 -0
  449. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/connection.js +389 -0
  450. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/connection.js.map +1 -0
  451. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/constants.js +76 -0
  452. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/constants.js.map +1 -0
  453. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/events.js +344 -0
  454. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/events.js.map +1 -0
  455. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/frame.js +108 -0
  456. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/frame.js.map +1 -0
  457. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js +83 -0
  458. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/permessage-deflate.js.map +1 -0
  459. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js +444 -0
  460. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/receiver.js.map +1 -0
  461. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/sender.js +118 -0
  462. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/sender.js.map +1 -0
  463. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js +22 -0
  464. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/symbols.js.map +1 -0
  465. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/util.js +330 -0
  466. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/util.js.map +1 -0
  467. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js +612 -0
  468. package/lib/esm/__/@actions/http-client/__/undici/lib/web/websocket/websocket.js.map +1 -0
  469. package/lib/esm/__/@actions/http-client/lib/index.js +2 -2
  470. package/lib/esm/__/@octokit/auth-token/dist-bundle/index.js.map +1 -0
  471. package/lib/esm/__/@octokit/core/dist-src/index.js.map +1 -0
  472. package/lib/esm/__/@octokit/core/dist-src/version.js.map +1 -0
  473. package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/endpoint/dist-bundle/index.js +1 -1
  474. package/lib/esm/__/@octokit/endpoint/dist-bundle/index.js.map +1 -0
  475. package/lib/esm/__/@octokit/graphql/dist-bundle/index.js.map +1 -0
  476. package/lib/esm/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +1 -0
  477. package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +1 -0
  478. package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +1 -0
  479. package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +1 -0
  480. package/lib/esm/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +1 -0
  481. package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/request/dist-bundle/index.js +5 -4
  482. package/lib/esm/__/@octokit/request/dist-bundle/index.js.map +1 -0
  483. package/lib/esm/__/@octokit/request-error/dist-src/index.js.map +1 -0
  484. package/lib/esm/__/before-after-hook/index.js.map +1 -0
  485. package/lib/esm/__/before-after-hook/lib/add.js.map +1 -0
  486. package/lib/esm/__/before-after-hook/lib/register.js.map +1 -0
  487. package/lib/esm/__/before-after-hook/lib/remove.js.map +1 -0
  488. package/lib/esm/__/cross-spawn/index.js +1 -1
  489. package/lib/esm/__/env-ci/lib/git.js +1 -1
  490. package/lib/esm/__/{env-ci/__/execa → execa}/index.js +1 -1
  491. package/lib/esm/__/execa/index.js.map +1 -0
  492. package/lib/esm/__/execa/lib/command.js.map +1 -0
  493. package/lib/esm/__/execa/lib/error.js.map +1 -0
  494. package/lib/esm/__/execa/lib/promise.js.map +1 -0
  495. package/lib/esm/__/execa/lib/stdio.js.map +1 -0
  496. package/lib/esm/__/{env-ci/__/execa → execa}/lib/stream.js +1 -1
  497. package/lib/esm/__/execa/lib/stream.js.map +1 -0
  498. package/lib/esm/__/execa/lib/verbose.js.map +1 -0
  499. package/lib/esm/__/get-stream/source/array-buffer.js.map +1 -0
  500. package/lib/esm/__/human-signals/build/src/core.js.map +1 -0
  501. package/lib/esm/__/human-signals/build/src/main.js.map +1 -0
  502. package/lib/esm/__/human-signals/build/src/realtime.js.map +1 -0
  503. package/lib/esm/__/human-signals/build/src/signals.js.map +1 -0
  504. package/lib/esm/__/is-stream/index.js.map +1 -0
  505. package/lib/esm/__/java-properties/dist-node/index.js +1 -1
  506. package/lib/esm/__/json-with-bigint/json-with-bigint.js +148 -0
  507. package/lib/esm/__/json-with-bigint/json-with-bigint.js.map +1 -0
  508. package/lib/esm/__/npm-run-path/__/path-key/index.js.map +1 -0
  509. package/lib/esm/__/{env-ci/__/npm-run-path → npm-run-path}/index.js +1 -1
  510. package/lib/esm/__/npm-run-path/index.js.map +1 -0
  511. package/lib/esm/__/path-key/index.js +1 -1
  512. package/lib/esm/__/signal-exit/dist/mjs/index.js.map +1 -0
  513. package/lib/esm/__/signal-exit/dist/mjs/signals.js.map +1 -0
  514. package/lib/esm/__/strip-final-newline/index.js.map +1 -0
  515. package/lib/esm/__/undici/index.js +1 -1
  516. package/lib/esm/__/undici/lib/api/api-connect.js +2 -2
  517. package/lib/esm/__/undici/lib/api/api-pipeline.js +2 -2
  518. package/lib/esm/__/undici/lib/api/api-request.js +2 -2
  519. package/lib/esm/__/undici/lib/api/api-request.js.map +1 -1
  520. package/lib/esm/__/undici/lib/api/api-stream.js +2 -2
  521. package/lib/esm/__/undici/lib/api/api-stream.js.map +1 -1
  522. package/lib/esm/__/undici/lib/api/api-upgrade.js +2 -2
  523. package/lib/esm/__/undici/lib/api/api-upgrade.js.map +1 -1
  524. package/lib/esm/__/undici/lib/core/util.js +10 -10
  525. package/lib/esm/__/undici/lib/core/util.js.map +1 -1
  526. package/lib/esm/__/undici/lib/fetch/body.js +6 -6
  527. package/lib/esm/__/undici/lib/fetch/body.js.map +1 -1
  528. package/lib/esm/__/undici/lib/fetch/constants.js +2 -2
  529. package/lib/esm/__/undici/lib/fetch/constants.js.map +1 -1
  530. package/lib/esm/__/undici/lib/fetch/dataURL.js +4 -4
  531. package/lib/esm/__/undici/lib/fetch/dataURL.js.map +1 -1
  532. package/lib/esm/__/undici/lib/fetch/file.js +2 -2
  533. package/lib/esm/__/undici/lib/fetch/file.js.map +1 -1
  534. package/lib/esm/__/undici/lib/fetch/formdata.js +2 -2
  535. package/lib/esm/__/undici/lib/fetch/index.js +2 -2
  536. package/lib/esm/__/undici/lib/fetch/index.js.map +1 -1
  537. package/lib/esm/__/undici/lib/fetch/util.js +4 -4
  538. package/lib/esm/__/undici/lib/fetch/util.js.map +1 -1
  539. package/lib/esm/__/undici/lib/fileapi/util.js +4 -4
  540. package/lib/esm/__/undici/lib/fileapi/util.js.map +1 -1
  541. package/lib/esm/__/undici/lib/websocket/events.js +2 -2
  542. package/lib/esm/__/universal-user-agent/index.js.map +1 -0
  543. package/lib/esm/_virtual/api-request2.js +4 -0
  544. package/lib/esm/_virtual/api-request2.js.map +1 -0
  545. package/lib/esm/_virtual/constants2.js +4 -0
  546. package/lib/esm/_virtual/constants2.js.map +1 -0
  547. package/lib/esm/_virtual/index10.js +4 -2
  548. package/lib/esm/_virtual/index10.js.map +1 -1
  549. package/lib/esm/_virtual/index11.js +2 -2
  550. package/lib/esm/_virtual/index14.js +2 -2
  551. package/lib/esm/_virtual/index15.js +4 -0
  552. package/lib/esm/_virtual/index15.js.map +1 -0
  553. package/lib/esm/_virtual/index16.js +4 -0
  554. package/lib/esm/_virtual/index16.js.map +1 -0
  555. package/lib/esm/_virtual/index2.js +1 -1
  556. package/lib/esm/_virtual/index3.js +1 -1
  557. package/lib/esm/_virtual/index4.js +1 -1
  558. package/lib/esm/_virtual/index5.js +2 -6
  559. package/lib/esm/_virtual/index5.js.map +1 -1
  560. package/lib/esm/_virtual/index6.js +6 -2
  561. package/lib/esm/_virtual/index6.js.map +1 -1
  562. package/lib/esm/_virtual/index8.js +2 -4
  563. package/lib/esm/_virtual/index8.js.map +1 -1
  564. package/lib/esm/_virtual/index9.js +2 -2
  565. package/lib/esm/_virtual/mock-interceptor2.js +4 -0
  566. package/lib/esm/_virtual/mock-interceptor2.js.map +1 -0
  567. package/lib/esm/_virtual/utils4.js +4 -0
  568. package/lib/esm/_virtual/utils4.js.map +1 -0
  569. package/lib/esm/env/load.js +1 -1
  570. package/lib/esm/env/load.js.map +1 -1
  571. package/lib/types/env/load.d.ts +5 -5
  572. package/lib/types/utils/log-response.d.ts +5 -5
  573. package/lib/types/utils/logger.d.ts +5 -5
  574. package/package.json +9 -9
  575. package/lib/cjs/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js.map +0 -1
  576. package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/index.js.map +0 -1
  577. package/lib/cjs/__/@actions/github/__/@octokit/core/dist-src/version.js.map +0 -1
  578. package/lib/cjs/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js.map +0 -1
  579. package/lib/cjs/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js.map +0 -1
  580. package/lib/cjs/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +0 -1
  581. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +0 -1
  582. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +0 -1
  583. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +0 -1
  584. package/lib/cjs/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +0 -1
  585. package/lib/cjs/__/@actions/github/__/@octokit/request/dist-bundle/index.js.map +0 -1
  586. package/lib/cjs/__/@actions/github/__/@octokit/request-error/dist-src/index.js.map +0 -1
  587. package/lib/cjs/__/@actions/github/__/before-after-hook/index.js.map +0 -1
  588. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/add.js.map +0 -1
  589. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/register.js.map +0 -1
  590. package/lib/cjs/__/@actions/github/__/before-after-hook/lib/remove.js.map +0 -1
  591. package/lib/cjs/__/@actions/github/__/universal-user-agent/index.js.map +0 -1
  592. package/lib/cjs/__/env-ci/__/execa/index.js.map +0 -1
  593. package/lib/cjs/__/env-ci/__/execa/lib/command.js.map +0 -1
  594. package/lib/cjs/__/env-ci/__/execa/lib/error.js.map +0 -1
  595. package/lib/cjs/__/env-ci/__/execa/lib/promise.js.map +0 -1
  596. package/lib/cjs/__/env-ci/__/execa/lib/stdio.js.map +0 -1
  597. package/lib/cjs/__/env-ci/__/execa/lib/stream.js.map +0 -1
  598. package/lib/cjs/__/env-ci/__/execa/lib/verbose.js.map +0 -1
  599. package/lib/cjs/__/env-ci/__/get-stream/source/array-buffer.js.map +0 -1
  600. package/lib/cjs/__/env-ci/__/human-signals/build/src/core.js.map +0 -1
  601. package/lib/cjs/__/env-ci/__/human-signals/build/src/main.js.map +0 -1
  602. package/lib/cjs/__/env-ci/__/human-signals/build/src/realtime.js.map +0 -1
  603. package/lib/cjs/__/env-ci/__/human-signals/build/src/signals.js.map +0 -1
  604. package/lib/cjs/__/env-ci/__/is-stream/index.js.map +0 -1
  605. package/lib/cjs/__/env-ci/__/npm-run-path/index.js.map +0 -1
  606. package/lib/cjs/__/env-ci/__/path-key/index.js.map +0 -1
  607. package/lib/cjs/__/env-ci/__/signal-exit/dist/mjs/index.js.map +0 -1
  608. package/lib/cjs/__/env-ci/__/signal-exit/dist/mjs/signals.js.map +0 -1
  609. package/lib/cjs/__/env-ci/__/strip-final-newline/index.js.map +0 -1
  610. package/lib/esm/__/@actions/github/__/@octokit/auth-token/dist-bundle/index.js.map +0 -1
  611. package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/index.js.map +0 -1
  612. package/lib/esm/__/@actions/github/__/@octokit/core/dist-src/version.js.map +0 -1
  613. package/lib/esm/__/@actions/github/__/@octokit/endpoint/dist-bundle/index.js.map +0 -1
  614. package/lib/esm/__/@actions/github/__/@octokit/graphql/dist-bundle/index.js.map +0 -1
  615. package/lib/esm/__/@actions/github/__/@octokit/plugin-paginate-rest/dist-bundle/index.js.map +0 -1
  616. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js.map +0 -1
  617. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js.map +0 -1
  618. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/index.js.map +0 -1
  619. package/lib/esm/__/@actions/github/__/@octokit/plugin-rest-endpoint-methods/dist-src/version.js.map +0 -1
  620. package/lib/esm/__/@actions/github/__/@octokit/request/dist-bundle/index.js.map +0 -1
  621. package/lib/esm/__/@actions/github/__/@octokit/request-error/dist-src/index.js.map +0 -1
  622. package/lib/esm/__/@actions/github/__/before-after-hook/index.js.map +0 -1
  623. package/lib/esm/__/@actions/github/__/before-after-hook/lib/add.js.map +0 -1
  624. package/lib/esm/__/@actions/github/__/before-after-hook/lib/register.js.map +0 -1
  625. package/lib/esm/__/@actions/github/__/before-after-hook/lib/remove.js.map +0 -1
  626. package/lib/esm/__/@actions/github/__/universal-user-agent/index.js.map +0 -1
  627. package/lib/esm/__/env-ci/__/execa/index.js.map +0 -1
  628. package/lib/esm/__/env-ci/__/execa/lib/command.js.map +0 -1
  629. package/lib/esm/__/env-ci/__/execa/lib/error.js.map +0 -1
  630. package/lib/esm/__/env-ci/__/execa/lib/promise.js.map +0 -1
  631. package/lib/esm/__/env-ci/__/execa/lib/stdio.js.map +0 -1
  632. package/lib/esm/__/env-ci/__/execa/lib/stream.js.map +0 -1
  633. package/lib/esm/__/env-ci/__/execa/lib/verbose.js.map +0 -1
  634. package/lib/esm/__/env-ci/__/get-stream/source/array-buffer.js.map +0 -1
  635. package/lib/esm/__/env-ci/__/human-signals/build/src/core.js.map +0 -1
  636. package/lib/esm/__/env-ci/__/human-signals/build/src/main.js.map +0 -1
  637. package/lib/esm/__/env-ci/__/human-signals/build/src/realtime.js.map +0 -1
  638. package/lib/esm/__/env-ci/__/human-signals/build/src/signals.js.map +0 -1
  639. package/lib/esm/__/env-ci/__/is-stream/index.js.map +0 -1
  640. package/lib/esm/__/env-ci/__/npm-run-path/index.js.map +0 -1
  641. package/lib/esm/__/env-ci/__/path-key/index.js.map +0 -1
  642. package/lib/esm/__/env-ci/__/signal-exit/dist/mjs/index.js.map +0 -1
  643. package/lib/esm/__/env-ci/__/signal-exit/dist/mjs/signals.js.map +0 -1
  644. package/lib/esm/__/env-ci/__/strip-final-newline/index.js.map +0 -1
  645. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/auth-token/dist-bundle/index.js +0 -0
  646. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/index.js +0 -0
  647. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/version.js +0 -0
  648. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/graphql/dist-bundle/index.js +0 -0
  649. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-paginate-rest/dist-bundle/index.js +0 -0
  650. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +0 -0
  651. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +0 -0
  652. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/index.js +0 -0
  653. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/version.js +0 -0
  654. /package/lib/cjs/__/{@actions/github/__/@octokit → @octokit}/request-error/dist-src/index.js +0 -0
  655. /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/index.js +0 -0
  656. /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/add.js +0 -0
  657. /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/register.js +0 -0
  658. /package/lib/cjs/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/remove.js +0 -0
  659. /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/command.js +0 -0
  660. /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/error.js +0 -0
  661. /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/promise.js +0 -0
  662. /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/stdio.js +0 -0
  663. /package/lib/cjs/__/{env-ci/__/execa → execa}/lib/verbose.js +0 -0
  664. /package/lib/cjs/__/{env-ci/__/get-stream → get-stream}/source/array-buffer.js +0 -0
  665. /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/core.js +0 -0
  666. /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/main.js +0 -0
  667. /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/realtime.js +0 -0
  668. /package/lib/cjs/__/{env-ci/__/human-signals → human-signals}/build/src/signals.js +0 -0
  669. /package/lib/cjs/__/{env-ci/__/is-stream → is-stream}/index.js +0 -0
  670. /package/lib/cjs/__/{env-ci → npm-run-path}/__/path-key/index.js +0 -0
  671. /package/lib/cjs/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/index.js +0 -0
  672. /package/lib/cjs/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/signals.js +0 -0
  673. /package/lib/cjs/__/{env-ci/__/strip-final-newline → strip-final-newline}/index.js +0 -0
  674. /package/lib/cjs/__/{@actions/github/__/universal-user-agent → universal-user-agent}/index.js +0 -0
  675. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/auth-token/dist-bundle/index.js +0 -0
  676. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/index.js +0 -0
  677. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/core/dist-src/version.js +0 -0
  678. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/graphql/dist-bundle/index.js +0 -0
  679. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-paginate-rest/dist-bundle/index.js +0 -0
  680. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +0 -0
  681. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +0 -0
  682. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/index.js +0 -0
  683. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/plugin-rest-endpoint-methods/dist-src/version.js +0 -0
  684. /package/lib/esm/__/{@actions/github/__/@octokit → @octokit}/request-error/dist-src/index.js +0 -0
  685. /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/index.js +0 -0
  686. /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/add.js +0 -0
  687. /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/register.js +0 -0
  688. /package/lib/esm/__/{@actions/github/__/before-after-hook → before-after-hook}/lib/remove.js +0 -0
  689. /package/lib/esm/__/{env-ci/__/execa → execa}/lib/command.js +0 -0
  690. /package/lib/esm/__/{env-ci/__/execa → execa}/lib/error.js +0 -0
  691. /package/lib/esm/__/{env-ci/__/execa → execa}/lib/promise.js +0 -0
  692. /package/lib/esm/__/{env-ci/__/execa → execa}/lib/stdio.js +0 -0
  693. /package/lib/esm/__/{env-ci/__/execa → execa}/lib/verbose.js +0 -0
  694. /package/lib/esm/__/{env-ci/__/get-stream → get-stream}/source/array-buffer.js +0 -0
  695. /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/core.js +0 -0
  696. /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/main.js +0 -0
  697. /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/realtime.js +0 -0
  698. /package/lib/esm/__/{env-ci/__/human-signals → human-signals}/build/src/signals.js +0 -0
  699. /package/lib/esm/__/{env-ci/__/is-stream → is-stream}/index.js +0 -0
  700. /package/lib/esm/__/{env-ci → npm-run-path}/__/path-key/index.js +0 -0
  701. /package/lib/esm/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/index.js +0 -0
  702. /package/lib/esm/__/{env-ci/__/signal-exit → signal-exit}/dist/mjs/signals.js +0 -0
  703. /package/lib/esm/__/{env-ci/__/strip-final-newline → strip-final-newline}/index.js +0 -0
  704. /package/lib/esm/__/{@actions/github/__/universal-user-agent → universal-user-agent}/index.js +0 -0
@@ -0,0 +1,1662 @@
1
+ 'use strict';
2
+
3
+ var require$$0 = require('node:stream');
4
+ var require$$3 = require('node:zlib');
5
+ var constants = require('./constants.js');
6
+ var global = require('./global.js');
7
+ var dataUrl = require('./data-url.js');
8
+ var require$$5 = require('node:perf_hooks');
9
+ var util$1 = require('../../core/util.js');
10
+ var require$$0$1 = require('node:assert');
11
+ var require$$8 = require('node:util/types');
12
+ var webidl = require('./webidl.js');
13
+
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
+
16
+ var require$$0__default = /*#__PURE__*/_interopDefault(require$$0);
17
+ var require$$3__default = /*#__PURE__*/_interopDefault(require$$3);
18
+ var require$$5__default = /*#__PURE__*/_interopDefault(require$$5);
19
+ var require$$0__default$1 = /*#__PURE__*/_interopDefault(require$$0$1);
20
+ var require$$8__default = /*#__PURE__*/_interopDefault(require$$8);
21
+
22
+ var util;
23
+ var hasRequiredUtil;
24
+
25
+ function requireUtil () {
26
+ if (hasRequiredUtil) return util;
27
+ hasRequiredUtil = 1;
28
+
29
+ const { Transform } = require$$0__default.default;
30
+ const zlib = require$$3__default.default;
31
+ const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = constants.__require();
32
+ const { getGlobalOrigin } = global.__require();
33
+ const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = dataUrl.__require();
34
+ const { performance } = require$$5__default.default;
35
+ const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = util$1.__require();
36
+ const assert = require$$0__default$1.default;
37
+ const { isUint8Array } = require$$8__default.default;
38
+ const { webidl: webidl$1 } = webidl.__require();
39
+
40
+ let supportedHashes = [];
41
+
42
+ // https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
43
+ /** @type {import('crypto')} */
44
+ let crypto;
45
+ try {
46
+ crypto = require('node:crypto');
47
+ const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'];
48
+ supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash));
49
+ /* c8 ignore next 3 */
50
+ } catch {
51
+
52
+ }
53
+
54
+ function responseURL (response) {
55
+ // https://fetch.spec.whatwg.org/#responses
56
+ // A response has an associated URL. It is a pointer to the last URL
57
+ // in response’s URL list and null if response’s URL list is empty.
58
+ const urlList = response.urlList;
59
+ const length = urlList.length;
60
+ return length === 0 ? null : urlList[length - 1].toString()
61
+ }
62
+
63
+ // https://fetch.spec.whatwg.org/#concept-response-location-url
64
+ function responseLocationURL (response, requestFragment) {
65
+ // 1. If response’s status is not a redirect status, then return null.
66
+ if (!redirectStatusSet.has(response.status)) {
67
+ return null
68
+ }
69
+
70
+ // 2. Let location be the result of extracting header list values given
71
+ // `Location` and response’s header list.
72
+ let location = response.headersList.get('location', true);
73
+
74
+ // 3. If location is a header value, then set location to the result of
75
+ // parsing location with response’s URL.
76
+ if (location !== null && isValidHeaderValue(location)) {
77
+ if (!isValidEncodedURL(location)) {
78
+ // Some websites respond location header in UTF-8 form without encoding them as ASCII
79
+ // and major browsers redirect them to correctly UTF-8 encoded addresses.
80
+ // Here, we handle that behavior in the same way.
81
+ location = normalizeBinaryStringToUtf8(location);
82
+ }
83
+ location = new URL(location, responseURL(response));
84
+ }
85
+
86
+ // 4. If location is a URL whose fragment is null, then set location’s
87
+ // fragment to requestFragment.
88
+ if (location && !location.hash) {
89
+ location.hash = requestFragment;
90
+ }
91
+
92
+ // 5. Return location.
93
+ return location
94
+ }
95
+
96
+ /**
97
+ * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2
98
+ * @param {string} url
99
+ * @returns {boolean}
100
+ */
101
+ function isValidEncodedURL (url) {
102
+ for (let i = 0; i < url.length; ++i) {
103
+ const code = url.charCodeAt(i);
104
+
105
+ if (
106
+ code > 0x7E || // Non-US-ASCII + DEL
107
+ code < 0x20 // Control characters NUL - US
108
+ ) {
109
+ return false
110
+ }
111
+ }
112
+ return true
113
+ }
114
+
115
+ /**
116
+ * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it.
117
+ * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well.
118
+ * @param {string} value
119
+ * @returns {string}
120
+ */
121
+ function normalizeBinaryStringToUtf8 (value) {
122
+ return Buffer.from(value, 'binary').toString('utf8')
123
+ }
124
+
125
+ /** @returns {URL} */
126
+ function requestCurrentURL (request) {
127
+ return request.urlList[request.urlList.length - 1]
128
+ }
129
+
130
+ function requestBadPort (request) {
131
+ // 1. Let url be request’s current URL.
132
+ const url = requestCurrentURL(request);
133
+
134
+ // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port,
135
+ // then return blocked.
136
+ if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {
137
+ return 'blocked'
138
+ }
139
+
140
+ // 3. Return allowed.
141
+ return 'allowed'
142
+ }
143
+
144
+ function isErrorLike (object) {
145
+ return object instanceof Error || (
146
+ object?.constructor?.name === 'Error' ||
147
+ object?.constructor?.name === 'DOMException'
148
+ )
149
+ }
150
+
151
+ // Check whether |statusText| is a ByteString and
152
+ // matches the Reason-Phrase token production.
153
+ // RFC 2616: https://tools.ietf.org/html/rfc2616
154
+ // RFC 7230: https://tools.ietf.org/html/rfc7230
155
+ // "reason-phrase = *( HTAB / SP / VCHAR / obs-text )"
156
+ // https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116
157
+ function isValidReasonPhrase (statusText) {
158
+ for (let i = 0; i < statusText.length; ++i) {
159
+ const c = statusText.charCodeAt(i);
160
+ if (
161
+ !(
162
+ (
163
+ c === 0x09 || // HTAB
164
+ (c >= 0x20 && c <= 0x7e) || // SP / VCHAR
165
+ (c >= 0x80 && c <= 0xff)
166
+ ) // obs-text
167
+ )
168
+ ) {
169
+ return false
170
+ }
171
+ }
172
+ return true
173
+ }
174
+
175
+ /**
176
+ * @see https://fetch.spec.whatwg.org/#header-name
177
+ * @param {string} potentialValue
178
+ */
179
+ const isValidHeaderName = isValidHTTPToken;
180
+
181
+ /**
182
+ * @see https://fetch.spec.whatwg.org/#header-value
183
+ * @param {string} potentialValue
184
+ */
185
+ function isValidHeaderValue (potentialValue) {
186
+ // - Has no leading or trailing HTTP tab or space bytes.
187
+ // - Contains no 0x00 (NUL) or HTTP newline bytes.
188
+ return (
189
+ potentialValue[0] === '\t' ||
190
+ potentialValue[0] === ' ' ||
191
+ potentialValue[potentialValue.length - 1] === '\t' ||
192
+ potentialValue[potentialValue.length - 1] === ' ' ||
193
+ potentialValue.includes('\n') ||
194
+ potentialValue.includes('\r') ||
195
+ potentialValue.includes('\0')
196
+ ) === false
197
+ }
198
+
199
+ // https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect
200
+ function setRequestReferrerPolicyOnRedirect (request, actualResponse) {
201
+ // Given a request request and a response actualResponse, this algorithm
202
+ // updates request’s referrer policy according to the Referrer-Policy
203
+ // header (if any) in actualResponse.
204
+
205
+ // 1. Let policy be the result of executing § 8.1 Parse a referrer policy
206
+ // from a Referrer-Policy header on actualResponse.
207
+
208
+ // 8.1 Parse a referrer policy from a Referrer-Policy header
209
+ // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list.
210
+ const { headersList } = actualResponse;
211
+ // 2. Let policy be the empty string.
212
+ // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.
213
+ // 4. Return policy.
214
+ const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',');
215
+
216
+ // Note: As the referrer-policy can contain multiple policies
217
+ // separated by comma, we need to loop through all of them
218
+ // and pick the first valid one.
219
+ // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy
220
+ let policy = '';
221
+ if (policyHeader.length > 0) {
222
+ // The right-most policy takes precedence.
223
+ // The left-most policy is the fallback.
224
+ for (let i = policyHeader.length; i !== 0; i--) {
225
+ const token = policyHeader[i - 1].trim();
226
+ if (referrerPolicyTokens.has(token)) {
227
+ policy = token;
228
+ break
229
+ }
230
+ }
231
+ }
232
+
233
+ // 2. If policy is not the empty string, then set request’s referrer policy to policy.
234
+ if (policy !== '') {
235
+ request.referrerPolicy = policy;
236
+ }
237
+ }
238
+
239
+ // https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check
240
+ function crossOriginResourcePolicyCheck () {
241
+ // TODO
242
+ return 'allowed'
243
+ }
244
+
245
+ // https://fetch.spec.whatwg.org/#concept-cors-check
246
+ function corsCheck () {
247
+ // TODO
248
+ return 'success'
249
+ }
250
+
251
+ // https://fetch.spec.whatwg.org/#concept-tao-check
252
+ function TAOCheck () {
253
+ // TODO
254
+ return 'success'
255
+ }
256
+
257
+ function appendFetchMetadata (httpRequest) {
258
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header
259
+ // TODO
260
+
261
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header
262
+
263
+ // 1. Assert: r’s url is a potentially trustworthy URL.
264
+ // TODO
265
+
266
+ // 2. Let header be a Structured Header whose value is a token.
267
+ let header = null;
268
+
269
+ // 3. Set header’s value to r’s mode.
270
+ header = httpRequest.mode;
271
+
272
+ // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list.
273
+ httpRequest.headersList.set('sec-fetch-mode', header, true);
274
+
275
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header
276
+ // TODO
277
+
278
+ // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header
279
+ // TODO
280
+ }
281
+
282
+ // https://fetch.spec.whatwg.org/#append-a-request-origin-header
283
+ function appendRequestOriginHeader (request) {
284
+ // 1. Let serializedOrigin be the result of byte-serializing a request origin
285
+ // with request.
286
+ // TODO: implement "byte-serializing a request origin"
287
+ let serializedOrigin = request.origin;
288
+
289
+ // - "'client' is changed to an origin during fetching."
290
+ // This doesn't happen in undici (in most cases) because undici, by default,
291
+ // has no concept of origin.
292
+ // - request.origin can also be set to request.client.origin (client being
293
+ // an environment settings object), which is undefined without using
294
+ // setGlobalOrigin.
295
+ if (serializedOrigin === 'client' || serializedOrigin === undefined) {
296
+ return
297
+ }
298
+
299
+ // 2. If request’s response tainting is "cors" or request’s mode is "websocket",
300
+ // then append (`Origin`, serializedOrigin) to request’s header list.
301
+ // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then:
302
+ if (request.responseTainting === 'cors' || request.mode === 'websocket') {
303
+ request.headersList.append('origin', serializedOrigin, true);
304
+ } else if (request.method !== 'GET' && request.method !== 'HEAD') {
305
+ // 1. Switch on request’s referrer policy:
306
+ switch (request.referrerPolicy) {
307
+ case 'no-referrer':
308
+ // Set serializedOrigin to `null`.
309
+ serializedOrigin = null;
310
+ break
311
+ case 'no-referrer-when-downgrade':
312
+ case 'strict-origin':
313
+ case 'strict-origin-when-cross-origin':
314
+ // If request’s origin is a tuple origin, its scheme is "https", and
315
+ // request’s current URL’s scheme is not "https", then set
316
+ // serializedOrigin to `null`.
317
+ if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {
318
+ serializedOrigin = null;
319
+ }
320
+ break
321
+ case 'same-origin':
322
+ // If request’s origin is not same origin with request’s current URL’s
323
+ // origin, then set serializedOrigin to `null`.
324
+ if (!sameOrigin(request, requestCurrentURL(request))) {
325
+ serializedOrigin = null;
326
+ }
327
+ break
328
+ // Do nothing.
329
+ }
330
+
331
+ // 2. Append (`Origin`, serializedOrigin) to request’s header list.
332
+ request.headersList.append('origin', serializedOrigin, true);
333
+ }
334
+ }
335
+
336
+ // https://w3c.github.io/hr-time/#dfn-coarsen-time
337
+ function coarsenTime (timestamp, crossOriginIsolatedCapability) {
338
+ // TODO
339
+ return timestamp
340
+ }
341
+
342
+ // https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info
343
+ function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {
344
+ if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) {
345
+ return {
346
+ domainLookupStartTime: defaultStartTime,
347
+ domainLookupEndTime: defaultStartTime,
348
+ connectionStartTime: defaultStartTime,
349
+ connectionEndTime: defaultStartTime,
350
+ secureConnectionStartTime: defaultStartTime,
351
+ ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol
352
+ }
353
+ }
354
+
355
+ return {
356
+ domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime),
357
+ domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime),
358
+ connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime),
359
+ connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime),
360
+ secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime),
361
+ ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol
362
+ }
363
+ }
364
+
365
+ // https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time
366
+ function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {
367
+ return coarsenTime(performance.now())
368
+ }
369
+
370
+ // https://fetch.spec.whatwg.org/#create-an-opaque-timing-info
371
+ function createOpaqueTimingInfo (timingInfo) {
372
+ return {
373
+ startTime: timingInfo.startTime ?? 0,
374
+ redirectStartTime: 0,
375
+ redirectEndTime: 0,
376
+ postRedirectStartTime: timingInfo.startTime ?? 0,
377
+ finalServiceWorkerStartTime: 0,
378
+ finalNetworkResponseStartTime: 0,
379
+ finalNetworkRequestStartTime: 0,
380
+ endTime: 0,
381
+ encodedBodySize: 0,
382
+ decodedBodySize: 0,
383
+ finalConnectionTimingInfo: null
384
+ }
385
+ }
386
+
387
+ // https://html.spec.whatwg.org/multipage/origin.html#policy-container
388
+ function makePolicyContainer () {
389
+ // Note: the fetch spec doesn't make use of embedder policy or CSP list
390
+ return {
391
+ referrerPolicy: 'strict-origin-when-cross-origin'
392
+ }
393
+ }
394
+
395
+ // https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container
396
+ function clonePolicyContainer (policyContainer) {
397
+ return {
398
+ referrerPolicy: policyContainer.referrerPolicy
399
+ }
400
+ }
401
+
402
+ // https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer
403
+ function determineRequestsReferrer (request) {
404
+ // 1. Let policy be request's referrer policy.
405
+ const policy = request.referrerPolicy;
406
+
407
+ // Note: policy cannot (shouldn't) be null or an empty string.
408
+ assert(policy);
409
+
410
+ // 2. Let environment be request’s client.
411
+
412
+ let referrerSource = null;
413
+
414
+ // 3. Switch on request’s referrer:
415
+ if (request.referrer === 'client') {
416
+ // Note: node isn't a browser and doesn't implement document/iframes,
417
+ // so we bypass this step and replace it with our own.
418
+
419
+ const globalOrigin = getGlobalOrigin();
420
+
421
+ if (!globalOrigin || globalOrigin.origin === 'null') {
422
+ return 'no-referrer'
423
+ }
424
+
425
+ // note: we need to clone it as it's mutated
426
+ referrerSource = new URL(globalOrigin);
427
+ } else if (request.referrer instanceof URL) {
428
+ // Let referrerSource be request’s referrer.
429
+ referrerSource = request.referrer;
430
+ }
431
+
432
+ // 4. Let request’s referrerURL be the result of stripping referrerSource for
433
+ // use as a referrer.
434
+ let referrerURL = stripURLForReferrer(referrerSource);
435
+
436
+ // 5. Let referrerOrigin be the result of stripping referrerSource for use as
437
+ // a referrer, with the origin-only flag set to true.
438
+ const referrerOrigin = stripURLForReferrer(referrerSource, true);
439
+
440
+ // 6. If the result of serializing referrerURL is a string whose length is
441
+ // greater than 4096, set referrerURL to referrerOrigin.
442
+ if (referrerURL.toString().length > 4096) {
443
+ referrerURL = referrerOrigin;
444
+ }
445
+
446
+ const areSameOrigin = sameOrigin(request, referrerURL);
447
+ const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) &&
448
+ !isURLPotentiallyTrustworthy(request.url);
449
+
450
+ // 8. Execute the switch statements corresponding to the value of policy:
451
+ switch (policy) {
452
+ case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true)
453
+ case 'unsafe-url': return referrerURL
454
+ case 'same-origin':
455
+ return areSameOrigin ? referrerOrigin : 'no-referrer'
456
+ case 'origin-when-cross-origin':
457
+ return areSameOrigin ? referrerURL : referrerOrigin
458
+ case 'strict-origin-when-cross-origin': {
459
+ const currentURL = requestCurrentURL(request);
460
+
461
+ // 1. If the origin of referrerURL and the origin of request’s current
462
+ // URL are the same, then return referrerURL.
463
+ if (sameOrigin(referrerURL, currentURL)) {
464
+ return referrerURL
465
+ }
466
+
467
+ // 2. If referrerURL is a potentially trustworthy URL and request’s
468
+ // current URL is not a potentially trustworthy URL, then return no
469
+ // referrer.
470
+ if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {
471
+ return 'no-referrer'
472
+ }
473
+
474
+ // 3. Return referrerOrigin.
475
+ return referrerOrigin
476
+ }
477
+ case 'strict-origin': // eslint-disable-line
478
+ /**
479
+ * 1. If referrerURL is a potentially trustworthy URL and
480
+ * request’s current URL is not a potentially trustworthy URL,
481
+ * then return no referrer.
482
+ * 2. Return referrerOrigin
483
+ */
484
+ case 'no-referrer-when-downgrade': // eslint-disable-line
485
+ /**
486
+ * 1. If referrerURL is a potentially trustworthy URL and
487
+ * request’s current URL is not a potentially trustworthy URL,
488
+ * then return no referrer.
489
+ * 2. Return referrerOrigin
490
+ */
491
+
492
+ default: // eslint-disable-line
493
+ return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin
494
+ }
495
+ }
496
+
497
+ /**
498
+ * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url
499
+ * @param {URL} url
500
+ * @param {boolean|undefined} originOnly
501
+ */
502
+ function stripURLForReferrer (url, originOnly) {
503
+ // 1. Assert: url is a URL.
504
+ assert(url instanceof URL);
505
+
506
+ url = new URL(url);
507
+
508
+ // 2. If url’s scheme is a local scheme, then return no referrer.
509
+ if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {
510
+ return 'no-referrer'
511
+ }
512
+
513
+ // 3. Set url’s username to the empty string.
514
+ url.username = '';
515
+
516
+ // 4. Set url’s password to the empty string.
517
+ url.password = '';
518
+
519
+ // 5. Set url’s fragment to null.
520
+ url.hash = '';
521
+
522
+ // 6. If the origin-only flag is true, then:
523
+ if (originOnly) {
524
+ // 1. Set url’s path to « the empty string ».
525
+ url.pathname = '';
526
+
527
+ // 2. Set url’s query to null.
528
+ url.search = '';
529
+ }
530
+
531
+ // 7. Return url.
532
+ return url
533
+ }
534
+
535
+ function isURLPotentiallyTrustworthy (url) {
536
+ if (!(url instanceof URL)) {
537
+ return false
538
+ }
539
+
540
+ // If child of about, return true
541
+ if (url.href === 'about:blank' || url.href === 'about:srcdoc') {
542
+ return true
543
+ }
544
+
545
+ // If scheme is data, return true
546
+ if (url.protocol === 'data:') return true
547
+
548
+ // If file, return true
549
+ if (url.protocol === 'file:') return true
550
+
551
+ return isOriginPotentiallyTrustworthy(url.origin)
552
+
553
+ function isOriginPotentiallyTrustworthy (origin) {
554
+ // If origin is explicitly null, return false
555
+ if (origin == null || origin === 'null') return false
556
+
557
+ const originAsURL = new URL(origin);
558
+
559
+ // If secure, return true
560
+ if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') {
561
+ return true
562
+ }
563
+
564
+ // If localhost or variants, return true
565
+ if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) ||
566
+ (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) ||
567
+ (originAsURL.hostname.endsWith('.localhost'))) {
568
+ return true
569
+ }
570
+
571
+ // If any other, return false
572
+ return false
573
+ }
574
+ }
575
+
576
+ /**
577
+ * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist
578
+ * @param {Uint8Array} bytes
579
+ * @param {string} metadataList
580
+ */
581
+ function bytesMatch (bytes, metadataList) {
582
+ // If node is not built with OpenSSL support, we cannot check
583
+ // a request's integrity, so allow it by default (the spec will
584
+ // allow requests if an invalid hash is given, as precedence).
585
+ /* istanbul ignore if: only if node is built with --without-ssl */
586
+ if (crypto === undefined) {
587
+ return true
588
+ }
589
+
590
+ // 1. Let parsedMetadata be the result of parsing metadataList.
591
+ const parsedMetadata = parseMetadata(metadataList);
592
+
593
+ // 2. If parsedMetadata is no metadata, return true.
594
+ if (parsedMetadata === 'no metadata') {
595
+ return true
596
+ }
597
+
598
+ // 3. If response is not eligible for integrity validation, return false.
599
+ // TODO
600
+
601
+ // 4. If parsedMetadata is the empty set, return true.
602
+ if (parsedMetadata.length === 0) {
603
+ return true
604
+ }
605
+
606
+ // 5. Let metadata be the result of getting the strongest
607
+ // metadata from parsedMetadata.
608
+ const strongest = getStrongestMetadata(parsedMetadata);
609
+ const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest);
610
+
611
+ // 6. For each item in metadata:
612
+ for (const item of metadata) {
613
+ // 1. Let algorithm be the alg component of item.
614
+ const algorithm = item.algo;
615
+
616
+ // 2. Let expectedValue be the val component of item.
617
+ const expectedValue = item.hash;
618
+
619
+ // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
620
+ // "be liberal with padding". This is annoying, and it's not even in the spec.
621
+
622
+ // 3. Let actualValue be the result of applying algorithm to bytes.
623
+ let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64');
624
+
625
+ if (actualValue[actualValue.length - 1] === '=') {
626
+ if (actualValue[actualValue.length - 2] === '=') {
627
+ actualValue = actualValue.slice(0, -2);
628
+ } else {
629
+ actualValue = actualValue.slice(0, -1);
630
+ }
631
+ }
632
+
633
+ // 4. If actualValue is a case-sensitive match for expectedValue,
634
+ // return true.
635
+ if (compareBase64Mixed(actualValue, expectedValue)) {
636
+ return true
637
+ }
638
+ }
639
+
640
+ // 7. Return false.
641
+ return false
642
+ }
643
+
644
+ // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
645
+ // https://www.w3.org/TR/CSP2/#source-list-syntax
646
+ // https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
647
+ const parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;
648
+
649
+ /**
650
+ * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
651
+ * @param {string} metadata
652
+ */
653
+ function parseMetadata (metadata) {
654
+ // 1. Let result be the empty set.
655
+ /** @type {{ algo: string, hash: string }[]} */
656
+ const result = [];
657
+
658
+ // 2. Let empty be equal to true.
659
+ let empty = true;
660
+
661
+ // 3. For each token returned by splitting metadata on spaces:
662
+ for (const token of metadata.split(' ')) {
663
+ // 1. Set empty to false.
664
+ empty = false;
665
+
666
+ // 2. Parse token as a hash-with-options.
667
+ const parsedToken = parseHashWithOptions.exec(token);
668
+
669
+ // 3. If token does not parse, continue to the next token.
670
+ if (
671
+ parsedToken === null ||
672
+ parsedToken.groups === undefined ||
673
+ parsedToken.groups.algo === undefined
674
+ ) {
675
+ // Note: Chromium blocks the request at this point, but Firefox
676
+ // gives a warning that an invalid integrity was given. The
677
+ // correct behavior is to ignore these, and subsequently not
678
+ // check the integrity of the resource.
679
+ continue
680
+ }
681
+
682
+ // 4. Let algorithm be the hash-algo component of token.
683
+ const algorithm = parsedToken.groups.algo.toLowerCase();
684
+
685
+ // 5. If algorithm is a hash function recognized by the user
686
+ // agent, add the parsed token to result.
687
+ if (supportedHashes.includes(algorithm)) {
688
+ result.push(parsedToken.groups);
689
+ }
690
+ }
691
+
692
+ // 4. Return no metadata if empty is true, otherwise return result.
693
+ if (empty === true) {
694
+ return 'no metadata'
695
+ }
696
+
697
+ return result
698
+ }
699
+
700
+ /**
701
+ * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList
702
+ */
703
+ function getStrongestMetadata (metadataList) {
704
+ // Let algorithm be the algo component of the first item in metadataList.
705
+ // Can be sha256
706
+ let algorithm = metadataList[0].algo;
707
+ // If the algorithm is sha512, then it is the strongest
708
+ // and we can return immediately
709
+ if (algorithm[3] === '5') {
710
+ return algorithm
711
+ }
712
+
713
+ for (let i = 1; i < metadataList.length; ++i) {
714
+ const metadata = metadataList[i];
715
+ // If the algorithm is sha512, then it is the strongest
716
+ // and we can break the loop immediately
717
+ if (metadata.algo[3] === '5') {
718
+ algorithm = 'sha512';
719
+ break
720
+ // If the algorithm is sha384, then a potential sha256 or sha384 is ignored
721
+ } else if (algorithm[3] === '3') {
722
+ continue
723
+ // algorithm is sha256, check if algorithm is sha384 and if so, set it as
724
+ // the strongest
725
+ } else if (metadata.algo[3] === '3') {
726
+ algorithm = 'sha384';
727
+ }
728
+ }
729
+ return algorithm
730
+ }
731
+
732
+ function filterMetadataListByAlgorithm (metadataList, algorithm) {
733
+ if (metadataList.length === 1) {
734
+ return metadataList
735
+ }
736
+
737
+ let pos = 0;
738
+ for (let i = 0; i < metadataList.length; ++i) {
739
+ if (metadataList[i].algo === algorithm) {
740
+ metadataList[pos++] = metadataList[i];
741
+ }
742
+ }
743
+
744
+ metadataList.length = pos;
745
+
746
+ return metadataList
747
+ }
748
+
749
+ /**
750
+ * Compares two base64 strings, allowing for base64url
751
+ * in the second string.
752
+ *
753
+ * @param {string} actualValue always base64
754
+ * @param {string} expectedValue base64 or base64url
755
+ * @returns {boolean}
756
+ */
757
+ function compareBase64Mixed (actualValue, expectedValue) {
758
+ if (actualValue.length !== expectedValue.length) {
759
+ return false
760
+ }
761
+ for (let i = 0; i < actualValue.length; ++i) {
762
+ if (actualValue[i] !== expectedValue[i]) {
763
+ if (
764
+ (actualValue[i] === '+' && expectedValue[i] === '-') ||
765
+ (actualValue[i] === '/' && expectedValue[i] === '_')
766
+ ) {
767
+ continue
768
+ }
769
+ return false
770
+ }
771
+ }
772
+
773
+ return true
774
+ }
775
+
776
+ // https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
777
+ function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
778
+ // TODO
779
+ }
780
+
781
+ /**
782
+ * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}
783
+ * @param {URL} A
784
+ * @param {URL} B
785
+ */
786
+ function sameOrigin (A, B) {
787
+ // 1. If A and B are the same opaque origin, then return true.
788
+ if (A.origin === B.origin && A.origin === 'null') {
789
+ return true
790
+ }
791
+
792
+ // 2. If A and B are both tuple origins and their schemes,
793
+ // hosts, and port are identical, then return true.
794
+ if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {
795
+ return true
796
+ }
797
+
798
+ // 3. Return false.
799
+ return false
800
+ }
801
+
802
+ function createDeferredPromise () {
803
+ let res;
804
+ let rej;
805
+ const promise = new Promise((resolve, reject) => {
806
+ res = resolve;
807
+ rej = reject;
808
+ });
809
+
810
+ return { promise, resolve: res, reject: rej }
811
+ }
812
+
813
+ function isAborted (fetchParams) {
814
+ return fetchParams.controller.state === 'aborted'
815
+ }
816
+
817
+ function isCancelled (fetchParams) {
818
+ return fetchParams.controller.state === 'aborted' ||
819
+ fetchParams.controller.state === 'terminated'
820
+ }
821
+
822
+ /**
823
+ * @see https://fetch.spec.whatwg.org/#concept-method-normalize
824
+ * @param {string} method
825
+ */
826
+ function normalizeMethod (method) {
827
+ return normalizedMethodRecordsBase[method.toLowerCase()] ?? method
828
+ }
829
+
830
+ // https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string
831
+ function serializeJavascriptValueToJSONString (value) {
832
+ // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »).
833
+ const result = JSON.stringify(value);
834
+
835
+ // 2. If result is undefined, then throw a TypeError.
836
+ if (result === undefined) {
837
+ throw new TypeError('Value is not JSON serializable')
838
+ }
839
+
840
+ // 3. Assert: result is a string.
841
+ assert(typeof result === 'string');
842
+
843
+ // 4. Return result.
844
+ return result
845
+ }
846
+
847
+ // https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object
848
+ const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));
849
+
850
+ /**
851
+ * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object
852
+ * @param {string} name name of the instance
853
+ * @param {symbol} kInternalIterator
854
+ * @param {string | number} [keyIndex]
855
+ * @param {string | number} [valueIndex]
856
+ */
857
+ function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) {
858
+ class FastIterableIterator {
859
+ /** @type {any} */
860
+ #target
861
+ /** @type {'key' | 'value' | 'key+value'} */
862
+ #kind
863
+ /** @type {number} */
864
+ #index
865
+
866
+ /**
867
+ * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object
868
+ * @param {unknown} target
869
+ * @param {'key' | 'value' | 'key+value'} kind
870
+ */
871
+ constructor (target, kind) {
872
+ this.#target = target;
873
+ this.#kind = kind;
874
+ this.#index = 0;
875
+ }
876
+
877
+ next () {
878
+ // 1. Let interface be the interface for which the iterator prototype object exists.
879
+ // 2. Let thisValue be the this value.
880
+ // 3. Let object be ? ToObject(thisValue).
881
+ // 4. If object is a platform object, then perform a security
882
+ // check, passing:
883
+ // 5. If object is not a default iterator object for interface,
884
+ // then throw a TypeError.
885
+ if (typeof this !== 'object' || this === null || !(#target in this)) {
886
+ throw new TypeError(
887
+ `'next' called on an object that does not implement interface ${name} Iterator.`
888
+ )
889
+ }
890
+
891
+ // 6. Let index be object’s index.
892
+ // 7. Let kind be object’s kind.
893
+ // 8. Let values be object’s target's value pairs to iterate over.
894
+ const index = this.#index;
895
+ const values = this.#target[kInternalIterator];
896
+
897
+ // 9. Let len be the length of values.
898
+ const len = values.length;
899
+
900
+ // 10. If index is greater than or equal to len, then return
901
+ // CreateIterResultObject(undefined, true).
902
+ if (index >= len) {
903
+ return {
904
+ value: undefined,
905
+ done: true
906
+ }
907
+ }
908
+
909
+ // 11. Let pair be the entry in values at index index.
910
+ const { [keyIndex]: key, [valueIndex]: value } = values[index];
911
+
912
+ // 12. Set object’s index to index + 1.
913
+ this.#index = index + 1;
914
+
915
+ // 13. Return the iterator result for pair and kind.
916
+
917
+ // https://webidl.spec.whatwg.org/#iterator-result
918
+
919
+ // 1. Let result be a value determined by the value of kind:
920
+ let result;
921
+ switch (this.#kind) {
922
+ case 'key':
923
+ // 1. Let idlKey be pair’s key.
924
+ // 2. Let key be the result of converting idlKey to an
925
+ // ECMAScript value.
926
+ // 3. result is key.
927
+ result = key;
928
+ break
929
+ case 'value':
930
+ // 1. Let idlValue be pair’s value.
931
+ // 2. Let value be the result of converting idlValue to
932
+ // an ECMAScript value.
933
+ // 3. result is value.
934
+ result = value;
935
+ break
936
+ case 'key+value':
937
+ // 1. Let idlKey be pair’s key.
938
+ // 2. Let idlValue be pair’s value.
939
+ // 3. Let key be the result of converting idlKey to an
940
+ // ECMAScript value.
941
+ // 4. Let value be the result of converting idlValue to
942
+ // an ECMAScript value.
943
+ // 5. Let array be ! ArrayCreate(2).
944
+ // 6. Call ! CreateDataProperty(array, "0", key).
945
+ // 7. Call ! CreateDataProperty(array, "1", value).
946
+ // 8. result is array.
947
+ result = [key, value];
948
+ break
949
+ }
950
+
951
+ // 2. Return CreateIterResultObject(result, false).
952
+ return {
953
+ value: result,
954
+ done: false
955
+ }
956
+ }
957
+ }
958
+
959
+ // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object
960
+ // @ts-ignore
961
+ delete FastIterableIterator.prototype.constructor;
962
+
963
+ Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype);
964
+
965
+ Object.defineProperties(FastIterableIterator.prototype, {
966
+ [Symbol.toStringTag]: {
967
+ writable: false,
968
+ enumerable: false,
969
+ configurable: true,
970
+ value: `${name} Iterator`
971
+ },
972
+ next: { writable: true, enumerable: true, configurable: true }
973
+ });
974
+
975
+ /**
976
+ * @param {unknown} target
977
+ * @param {'key' | 'value' | 'key+value'} kind
978
+ * @returns {IterableIterator<any>}
979
+ */
980
+ return function (target, kind) {
981
+ return new FastIterableIterator(target, kind)
982
+ }
983
+ }
984
+
985
+ /**
986
+ * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object
987
+ * @param {string} name name of the instance
988
+ * @param {any} object class
989
+ * @param {symbol} kInternalIterator
990
+ * @param {string | number} [keyIndex]
991
+ * @param {string | number} [valueIndex]
992
+ */
993
+ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) {
994
+ const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex);
995
+
996
+ const properties = {
997
+ keys: {
998
+ writable: true,
999
+ enumerable: true,
1000
+ configurable: true,
1001
+ value: function keys () {
1002
+ webidl$1.brandCheck(this, object);
1003
+ return makeIterator(this, 'key')
1004
+ }
1005
+ },
1006
+ values: {
1007
+ writable: true,
1008
+ enumerable: true,
1009
+ configurable: true,
1010
+ value: function values () {
1011
+ webidl$1.brandCheck(this, object);
1012
+ return makeIterator(this, 'value')
1013
+ }
1014
+ },
1015
+ entries: {
1016
+ writable: true,
1017
+ enumerable: true,
1018
+ configurable: true,
1019
+ value: function entries () {
1020
+ webidl$1.brandCheck(this, object);
1021
+ return makeIterator(this, 'key+value')
1022
+ }
1023
+ },
1024
+ forEach: {
1025
+ writable: true,
1026
+ enumerable: true,
1027
+ configurable: true,
1028
+ value: function forEach (callbackfn, thisArg = globalThis) {
1029
+ webidl$1.brandCheck(this, object);
1030
+ webidl$1.argumentLengthCheck(arguments, 1, `${name}.forEach`);
1031
+ if (typeof callbackfn !== 'function') {
1032
+ throw new TypeError(
1033
+ `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`
1034
+ )
1035
+ }
1036
+ for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) {
1037
+ callbackfn.call(thisArg, value, key, this);
1038
+ }
1039
+ }
1040
+ }
1041
+ };
1042
+
1043
+ return Object.defineProperties(object.prototype, {
1044
+ ...properties,
1045
+ [Symbol.iterator]: {
1046
+ writable: true,
1047
+ enumerable: false,
1048
+ configurable: true,
1049
+ value: properties.entries.value
1050
+ }
1051
+ })
1052
+ }
1053
+
1054
+ /**
1055
+ * @see https://fetch.spec.whatwg.org/#body-fully-read
1056
+ */
1057
+ async function fullyReadBody (body, processBody, processBodyError) {
1058
+ // 1. If taskDestination is null, then set taskDestination to
1059
+ // the result of starting a new parallel queue.
1060
+
1061
+ // 2. Let successSteps given a byte sequence bytes be to queue a
1062
+ // fetch task to run processBody given bytes, with taskDestination.
1063
+ const successSteps = processBody;
1064
+
1065
+ // 3. Let errorSteps be to queue a fetch task to run processBodyError,
1066
+ // with taskDestination.
1067
+ const errorSteps = processBodyError;
1068
+
1069
+ // 4. Let reader be the result of getting a reader for body’s stream.
1070
+ // If that threw an exception, then run errorSteps with that
1071
+ // exception and return.
1072
+ let reader;
1073
+
1074
+ try {
1075
+ reader = body.stream.getReader();
1076
+ } catch (e) {
1077
+ errorSteps(e);
1078
+ return
1079
+ }
1080
+
1081
+ // 5. Read all bytes from reader, given successSteps and errorSteps.
1082
+ try {
1083
+ successSteps(await readAllBytes(reader));
1084
+ } catch (e) {
1085
+ errorSteps(e);
1086
+ }
1087
+ }
1088
+
1089
+ function isReadableStreamLike (stream) {
1090
+ return stream instanceof ReadableStream || (
1091
+ stream[Symbol.toStringTag] === 'ReadableStream' &&
1092
+ typeof stream.tee === 'function'
1093
+ )
1094
+ }
1095
+
1096
+ /**
1097
+ * @param {ReadableStreamController<Uint8Array>} controller
1098
+ */
1099
+ function readableStreamClose (controller) {
1100
+ try {
1101
+ controller.close();
1102
+ controller.byobRequest?.respond(0);
1103
+ } catch (err) {
1104
+ // TODO: add comment explaining why this error occurs.
1105
+ if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) {
1106
+ throw err
1107
+ }
1108
+ }
1109
+ }
1110
+
1111
+ const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; // eslint-disable-line
1112
+
1113
+ /**
1114
+ * @see https://infra.spec.whatwg.org/#isomorphic-encode
1115
+ * @param {string} input
1116
+ */
1117
+ function isomorphicEncode (input) {
1118
+ // 1. Assert: input contains no code points greater than U+00FF.
1119
+ assert(!invalidIsomorphicEncodeValueRegex.test(input));
1120
+
1121
+ // 2. Return a byte sequence whose length is equal to input’s code
1122
+ // point length and whose bytes have the same values as the
1123
+ // values of input’s code points, in the same order
1124
+ return input
1125
+ }
1126
+
1127
+ /**
1128
+ * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes
1129
+ * @see https://streams.spec.whatwg.org/#read-loop
1130
+ * @param {ReadableStreamDefaultReader} reader
1131
+ */
1132
+ async function readAllBytes (reader) {
1133
+ const bytes = [];
1134
+ let byteLength = 0;
1135
+
1136
+ while (true) {
1137
+ const { done, value: chunk } = await reader.read();
1138
+
1139
+ if (done) {
1140
+ // 1. Call successSteps with bytes.
1141
+ return Buffer.concat(bytes, byteLength)
1142
+ }
1143
+
1144
+ // 1. If chunk is not a Uint8Array object, call failureSteps
1145
+ // with a TypeError and abort these steps.
1146
+ if (!isUint8Array(chunk)) {
1147
+ throw new TypeError('Received non-Uint8Array chunk')
1148
+ }
1149
+
1150
+ // 2. Append the bytes represented by chunk to bytes.
1151
+ bytes.push(chunk);
1152
+ byteLength += chunk.length;
1153
+
1154
+ // 3. Read-loop given reader, bytes, successSteps, and failureSteps.
1155
+ }
1156
+ }
1157
+
1158
+ /**
1159
+ * @see https://fetch.spec.whatwg.org/#is-local
1160
+ * @param {URL} url
1161
+ */
1162
+ function urlIsLocal (url) {
1163
+ assert('protocol' in url); // ensure it's a url object
1164
+
1165
+ const protocol = url.protocol;
1166
+
1167
+ return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'
1168
+ }
1169
+
1170
+ /**
1171
+ * @param {string|URL} url
1172
+ * @returns {boolean}
1173
+ */
1174
+ function urlHasHttpsScheme (url) {
1175
+ return (
1176
+ (
1177
+ typeof url === 'string' &&
1178
+ url[5] === ':' &&
1179
+ url[0] === 'h' &&
1180
+ url[1] === 't' &&
1181
+ url[2] === 't' &&
1182
+ url[3] === 'p' &&
1183
+ url[4] === 's'
1184
+ ) ||
1185
+ url.protocol === 'https:'
1186
+ )
1187
+ }
1188
+
1189
+ /**
1190
+ * @see https://fetch.spec.whatwg.org/#http-scheme
1191
+ * @param {URL} url
1192
+ */
1193
+ function urlIsHttpHttpsScheme (url) {
1194
+ assert('protocol' in url); // ensure it's a url object
1195
+
1196
+ const protocol = url.protocol;
1197
+
1198
+ return protocol === 'http:' || protocol === 'https:'
1199
+ }
1200
+
1201
+ /**
1202
+ * @see https://fetch.spec.whatwg.org/#simple-range-header-value
1203
+ * @param {string} value
1204
+ * @param {boolean} allowWhitespace
1205
+ */
1206
+ function simpleRangeHeaderValue (value, allowWhitespace) {
1207
+ // 1. Let data be the isomorphic decoding of value.
1208
+ // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string,
1209
+ // nothing more. We obviously don't need to do that if value is a string already.
1210
+ const data = value;
1211
+
1212
+ // 2. If data does not start with "bytes", then return failure.
1213
+ if (!data.startsWith('bytes')) {
1214
+ return 'failure'
1215
+ }
1216
+
1217
+ // 3. Let position be a position variable for data, initially pointing at the 5th code point of data.
1218
+ const position = { position: 5 };
1219
+
1220
+ // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,
1221
+ // from data given position.
1222
+ if (allowWhitespace) {
1223
+ collectASequenceOfCodePoints(
1224
+ (char) => char === '\t' || char === ' ',
1225
+ data,
1226
+ position
1227
+ );
1228
+ }
1229
+
1230
+ // 5. If the code point at position within data is not U+003D (=), then return failure.
1231
+ if (data.charCodeAt(position.position) !== 0x3D) {
1232
+ return 'failure'
1233
+ }
1234
+
1235
+ // 6. Advance position by 1.
1236
+ position.position++;
1237
+
1238
+ // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from
1239
+ // data given position.
1240
+ if (allowWhitespace) {
1241
+ collectASequenceOfCodePoints(
1242
+ (char) => char === '\t' || char === ' ',
1243
+ data,
1244
+ position
1245
+ );
1246
+ }
1247
+
1248
+ // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits,
1249
+ // from data given position.
1250
+ const rangeStart = collectASequenceOfCodePoints(
1251
+ (char) => {
1252
+ const code = char.charCodeAt(0);
1253
+
1254
+ return code >= 0x30 && code <= 0x39
1255
+ },
1256
+ data,
1257
+ position
1258
+ );
1259
+
1260
+ // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the
1261
+ // empty string; otherwise null.
1262
+ const rangeStartValue = rangeStart.length ? Number(rangeStart) : null;
1263
+
1264
+ // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,
1265
+ // from data given position.
1266
+ if (allowWhitespace) {
1267
+ collectASequenceOfCodePoints(
1268
+ (char) => char === '\t' || char === ' ',
1269
+ data,
1270
+ position
1271
+ );
1272
+ }
1273
+
1274
+ // 11. If the code point at position within data is not U+002D (-), then return failure.
1275
+ if (data.charCodeAt(position.position) !== 0x2D) {
1276
+ return 'failure'
1277
+ }
1278
+
1279
+ // 12. Advance position by 1.
1280
+ position.position++;
1281
+
1282
+ // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab
1283
+ // or space, from data given position.
1284
+ // Note from Khafra: its the same step as in #8 again lol
1285
+ if (allowWhitespace) {
1286
+ collectASequenceOfCodePoints(
1287
+ (char) => char === '\t' || char === ' ',
1288
+ data,
1289
+ position
1290
+ );
1291
+ }
1292
+
1293
+ // 14. Let rangeEnd be the result of collecting a sequence of code points that are
1294
+ // ASCII digits, from data given position.
1295
+ // Note from Khafra: you wouldn't guess it, but this is also the same step as #8
1296
+ const rangeEnd = collectASequenceOfCodePoints(
1297
+ (char) => {
1298
+ const code = char.charCodeAt(0);
1299
+
1300
+ return code >= 0x30 && code <= 0x39
1301
+ },
1302
+ data,
1303
+ position
1304
+ );
1305
+
1306
+ // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd
1307
+ // is not the empty string; otherwise null.
1308
+ // Note from Khafra: THE SAME STEP, AGAIN!!!
1309
+ // Note: why interpret as a decimal if we only collect ascii digits?
1310
+ const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null;
1311
+
1312
+ // 16. If position is not past the end of data, then return failure.
1313
+ if (position.position < data.length) {
1314
+ return 'failure'
1315
+ }
1316
+
1317
+ // 17. If rangeEndValue and rangeStartValue are null, then return failure.
1318
+ if (rangeEndValue === null && rangeStartValue === null) {
1319
+ return 'failure'
1320
+ }
1321
+
1322
+ // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is
1323
+ // greater than rangeEndValue, then return failure.
1324
+ // Note: ... when can they not be numbers?
1325
+ if (rangeStartValue > rangeEndValue) {
1326
+ return 'failure'
1327
+ }
1328
+
1329
+ // 19. Return (rangeStartValue, rangeEndValue).
1330
+ return { rangeStartValue, rangeEndValue }
1331
+ }
1332
+
1333
+ /**
1334
+ * @see https://fetch.spec.whatwg.org/#build-a-content-range
1335
+ * @param {number} rangeStart
1336
+ * @param {number} rangeEnd
1337
+ * @param {number} fullLength
1338
+ */
1339
+ function buildContentRange (rangeStart, rangeEnd, fullLength) {
1340
+ // 1. Let contentRange be `bytes `.
1341
+ let contentRange = 'bytes ';
1342
+
1343
+ // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange.
1344
+ contentRange += isomorphicEncode(`${rangeStart}`);
1345
+
1346
+ // 3. Append 0x2D (-) to contentRange.
1347
+ contentRange += '-';
1348
+
1349
+ // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange.
1350
+ contentRange += isomorphicEncode(`${rangeEnd}`);
1351
+
1352
+ // 5. Append 0x2F (/) to contentRange.
1353
+ contentRange += '/';
1354
+
1355
+ // 6. Append fullLength, serialized and isomorphic encoded to contentRange.
1356
+ contentRange += isomorphicEncode(`${fullLength}`);
1357
+
1358
+ // 7. Return contentRange.
1359
+ return contentRange
1360
+ }
1361
+
1362
+ // A Stream, which pipes the response to zlib.createInflate() or
1363
+ // zlib.createInflateRaw() depending on the first byte of the Buffer.
1364
+ // If the lower byte of the first byte is 0x08, then the stream is
1365
+ // interpreted as a zlib stream, otherwise it's interpreted as a
1366
+ // raw deflate stream.
1367
+ class InflateStream extends Transform {
1368
+ #zlibOptions
1369
+
1370
+ /** @param {zlib.ZlibOptions} [zlibOptions] */
1371
+ constructor (zlibOptions) {
1372
+ super();
1373
+ this.#zlibOptions = zlibOptions;
1374
+ }
1375
+
1376
+ _transform (chunk, encoding, callback) {
1377
+ if (!this._inflateStream) {
1378
+ if (chunk.length === 0) {
1379
+ callback();
1380
+ return
1381
+ }
1382
+ this._inflateStream = (chunk[0] & 0x0F) === 0x08
1383
+ ? zlib.createInflate(this.#zlibOptions)
1384
+ : zlib.createInflateRaw(this.#zlibOptions);
1385
+
1386
+ this._inflateStream.on('data', this.push.bind(this));
1387
+ this._inflateStream.on('end', () => this.push(null));
1388
+ this._inflateStream.on('error', (err) => this.destroy(err));
1389
+ }
1390
+
1391
+ this._inflateStream.write(chunk, encoding, callback);
1392
+ }
1393
+
1394
+ _final (callback) {
1395
+ if (this._inflateStream) {
1396
+ this._inflateStream.end();
1397
+ this._inflateStream = null;
1398
+ }
1399
+ callback();
1400
+ }
1401
+ }
1402
+
1403
+ /**
1404
+ * @param {zlib.ZlibOptions} [zlibOptions]
1405
+ * @returns {InflateStream}
1406
+ */
1407
+ function createInflate (zlibOptions) {
1408
+ return new InflateStream(zlibOptions)
1409
+ }
1410
+
1411
+ /**
1412
+ * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type
1413
+ * @param {import('./headers').HeadersList} headers
1414
+ */
1415
+ function extractMimeType (headers) {
1416
+ // 1. Let charset be null.
1417
+ let charset = null;
1418
+
1419
+ // 2. Let essence be null.
1420
+ let essence = null;
1421
+
1422
+ // 3. Let mimeType be null.
1423
+ let mimeType = null;
1424
+
1425
+ // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers.
1426
+ const values = getDecodeSplit('content-type', headers);
1427
+
1428
+ // 5. If values is null, then return failure.
1429
+ if (values === null) {
1430
+ return 'failure'
1431
+ }
1432
+
1433
+ // 6. For each value of values:
1434
+ for (const value of values) {
1435
+ // 6.1. Let temporaryMimeType be the result of parsing value.
1436
+ const temporaryMimeType = parseMIMEType(value);
1437
+
1438
+ // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue.
1439
+ if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') {
1440
+ continue
1441
+ }
1442
+
1443
+ // 6.3. Set mimeType to temporaryMimeType.
1444
+ mimeType = temporaryMimeType;
1445
+
1446
+ // 6.4. If mimeType’s essence is not essence, then:
1447
+ if (mimeType.essence !== essence) {
1448
+ // 6.4.1. Set charset to null.
1449
+ charset = null;
1450
+
1451
+ // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to
1452
+ // mimeType’s parameters["charset"].
1453
+ if (mimeType.parameters.has('charset')) {
1454
+ charset = mimeType.parameters.get('charset');
1455
+ }
1456
+
1457
+ // 6.4.3. Set essence to mimeType’s essence.
1458
+ essence = mimeType.essence;
1459
+ } else if (!mimeType.parameters.has('charset') && charset !== null) {
1460
+ // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and
1461
+ // charset is non-null, set mimeType’s parameters["charset"] to charset.
1462
+ mimeType.parameters.set('charset', charset);
1463
+ }
1464
+ }
1465
+
1466
+ // 7. If mimeType is null, then return failure.
1467
+ if (mimeType == null) {
1468
+ return 'failure'
1469
+ }
1470
+
1471
+ // 8. Return mimeType.
1472
+ return mimeType
1473
+ }
1474
+
1475
+ /**
1476
+ * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split
1477
+ * @param {string|null} value
1478
+ */
1479
+ function gettingDecodingSplitting (value) {
1480
+ // 1. Let input be the result of isomorphic decoding value.
1481
+ const input = value;
1482
+
1483
+ // 2. Let position be a position variable for input, initially pointing at the start of input.
1484
+ const position = { position: 0 };
1485
+
1486
+ // 3. Let values be a list of strings, initially empty.
1487
+ const values = [];
1488
+
1489
+ // 4. Let temporaryValue be the empty string.
1490
+ let temporaryValue = '';
1491
+
1492
+ // 5. While position is not past the end of input:
1493
+ while (position.position < input.length) {
1494
+ // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (")
1495
+ // or U+002C (,) from input, given position, to temporaryValue.
1496
+ temporaryValue += collectASequenceOfCodePoints(
1497
+ (char) => char !== '"' && char !== ',',
1498
+ input,
1499
+ position
1500
+ );
1501
+
1502
+ // 5.2. If position is not past the end of input, then:
1503
+ if (position.position < input.length) {
1504
+ // 5.2.1. If the code point at position within input is U+0022 ("), then:
1505
+ if (input.charCodeAt(position.position) === 0x22) {
1506
+ // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue.
1507
+ temporaryValue += collectAnHTTPQuotedString(
1508
+ input,
1509
+ position
1510
+ );
1511
+
1512
+ // 5.2.1.2. If position is not past the end of input, then continue.
1513
+ if (position.position < input.length) {
1514
+ continue
1515
+ }
1516
+ } else {
1517
+ // 5.2.2. Otherwise:
1518
+
1519
+ // 5.2.2.1. Assert: the code point at position within input is U+002C (,).
1520
+ assert(input.charCodeAt(position.position) === 0x2C);
1521
+
1522
+ // 5.2.2.2. Advance position by 1.
1523
+ position.position++;
1524
+ }
1525
+ }
1526
+
1527
+ // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue.
1528
+ temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20);
1529
+
1530
+ // 5.4. Append temporaryValue to values.
1531
+ values.push(temporaryValue);
1532
+
1533
+ // 5.6. Set temporaryValue to the empty string.
1534
+ temporaryValue = '';
1535
+ }
1536
+
1537
+ // 6. Return values.
1538
+ return values
1539
+ }
1540
+
1541
+ /**
1542
+ * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split
1543
+ * @param {string} name lowercase header name
1544
+ * @param {import('./headers').HeadersList} list
1545
+ */
1546
+ function getDecodeSplit (name, list) {
1547
+ // 1. Let value be the result of getting name from list.
1548
+ const value = list.get(name, true);
1549
+
1550
+ // 2. If value is null, then return null.
1551
+ if (value === null) {
1552
+ return null
1553
+ }
1554
+
1555
+ // 3. Return the result of getting, decoding, and splitting value.
1556
+ return gettingDecodingSplitting(value)
1557
+ }
1558
+
1559
+ const textDecoder = new TextDecoder();
1560
+
1561
+ /**
1562
+ * @see https://encoding.spec.whatwg.org/#utf-8-decode
1563
+ * @param {Buffer} buffer
1564
+ */
1565
+ function utf8DecodeBytes (buffer) {
1566
+ if (buffer.length === 0) {
1567
+ return ''
1568
+ }
1569
+
1570
+ // 1. Let buffer be the result of peeking three bytes from
1571
+ // ioQueue, converted to a byte sequence.
1572
+
1573
+ // 2. If buffer is 0xEF 0xBB 0xBF, then read three
1574
+ // bytes from ioQueue. (Do nothing with those bytes.)
1575
+ if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {
1576
+ buffer = buffer.subarray(3);
1577
+ }
1578
+
1579
+ // 3. Process a queue with an instance of UTF-8’s
1580
+ // decoder, ioQueue, output, and "replacement".
1581
+ const output = textDecoder.decode(buffer);
1582
+
1583
+ // 4. Return output.
1584
+ return output
1585
+ }
1586
+
1587
+ class EnvironmentSettingsObjectBase {
1588
+ get baseUrl () {
1589
+ return getGlobalOrigin()
1590
+ }
1591
+
1592
+ get origin () {
1593
+ return this.baseUrl?.origin
1594
+ }
1595
+
1596
+ policyContainer = makePolicyContainer()
1597
+ }
1598
+
1599
+ class EnvironmentSettingsObject {
1600
+ settingsObject = new EnvironmentSettingsObjectBase()
1601
+ }
1602
+
1603
+ const environmentSettingsObject = new EnvironmentSettingsObject();
1604
+
1605
+ util = {
1606
+ isAborted,
1607
+ isCancelled,
1608
+ isValidEncodedURL,
1609
+ createDeferredPromise,
1610
+ ReadableStreamFrom,
1611
+ tryUpgradeRequestToAPotentiallyTrustworthyURL,
1612
+ clampAndCoarsenConnectionTimingInfo,
1613
+ coarsenedSharedCurrentTime,
1614
+ determineRequestsReferrer,
1615
+ makePolicyContainer,
1616
+ clonePolicyContainer,
1617
+ appendFetchMetadata,
1618
+ appendRequestOriginHeader,
1619
+ TAOCheck,
1620
+ corsCheck,
1621
+ crossOriginResourcePolicyCheck,
1622
+ createOpaqueTimingInfo,
1623
+ setRequestReferrerPolicyOnRedirect,
1624
+ isValidHTTPToken,
1625
+ requestBadPort,
1626
+ requestCurrentURL,
1627
+ responseURL,
1628
+ responseLocationURL,
1629
+ isBlobLike,
1630
+ isURLPotentiallyTrustworthy,
1631
+ isValidReasonPhrase,
1632
+ sameOrigin,
1633
+ normalizeMethod,
1634
+ serializeJavascriptValueToJSONString,
1635
+ iteratorMixin,
1636
+ createIterator,
1637
+ isValidHeaderName,
1638
+ isValidHeaderValue,
1639
+ isErrorLike,
1640
+ fullyReadBody,
1641
+ bytesMatch,
1642
+ isReadableStreamLike,
1643
+ readableStreamClose,
1644
+ isomorphicEncode,
1645
+ urlIsLocal,
1646
+ urlHasHttpsScheme,
1647
+ urlIsHttpHttpsScheme,
1648
+ readAllBytes,
1649
+ simpleRangeHeaderValue,
1650
+ buildContentRange,
1651
+ parseMetadata,
1652
+ createInflate,
1653
+ extractMimeType,
1654
+ getDecodeSplit,
1655
+ utf8DecodeBytes,
1656
+ environmentSettingsObject
1657
+ };
1658
+ return util;
1659
+ }
1660
+
1661
+ exports.__require = requireUtil;
1662
+ //# sourceMappingURL=util.js.map