@relative-ci/core 5.3.4-alpha.0 → 6.0.0-beta.3

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 (189) hide show
  1. package/lib/cjs/__/@actions/http-client/lib/index.js +1 -1
  2. package/lib/cjs/__/@octokit/core/dist-src/version.js +1 -1
  3. package/lib/cjs/__/@octokit/core/dist-src/version.js.map +1 -1
  4. package/lib/cjs/__/@octokit/graphql/dist-bundle/index.js +4 -0
  5. package/lib/cjs/__/@octokit/graphql/dist-bundle/index.js.map +1 -1
  6. package/lib/cjs/__/@octokit/request/dist-bundle/index.js +10 -6
  7. package/lib/cjs/__/@octokit/request/dist-bundle/index.js.map +1 -1
  8. package/lib/cjs/__/content-type/dist/index.js +183 -0
  9. package/lib/cjs/__/content-type/dist/index.js.map +1 -0
  10. package/lib/cjs/__/cross-spawn/index.js +1 -1
  11. package/lib/cjs/__/{execa → env-ci/__/execa}/index.js +1 -1
  12. package/lib/cjs/__/env-ci/__/execa/index.js.map +1 -0
  13. package/lib/cjs/__/env-ci/__/execa/lib/command.js.map +1 -0
  14. package/lib/cjs/__/env-ci/__/execa/lib/error.js.map +1 -0
  15. package/lib/cjs/__/env-ci/__/execa/lib/promise.js.map +1 -0
  16. package/lib/cjs/__/env-ci/__/execa/lib/stdio.js.map +1 -0
  17. package/lib/cjs/__/{execa → env-ci/__/execa}/lib/stream.js +1 -1
  18. package/lib/cjs/__/env-ci/__/execa/lib/stream.js.map +1 -0
  19. package/lib/cjs/__/env-ci/__/execa/lib/verbose.js.map +1 -0
  20. package/lib/cjs/__/env-ci/__/get-stream/source/array-buffer.js.map +1 -0
  21. package/lib/cjs/__/env-ci/__/human-signals/build/src/core.js.map +1 -0
  22. package/lib/cjs/__/env-ci/__/human-signals/build/src/main.js.map +1 -0
  23. package/lib/cjs/__/env-ci/__/human-signals/build/src/realtime.js.map +1 -0
  24. package/lib/cjs/__/env-ci/__/human-signals/build/src/signals.js.map +1 -0
  25. package/lib/cjs/__/env-ci/__/is-stream/index.js.map +1 -0
  26. package/lib/cjs/__/{npm-run-path → env-ci/__/npm-run-path}/index.js +1 -1
  27. package/lib/cjs/__/env-ci/__/npm-run-path/index.js.map +1 -0
  28. package/lib/cjs/__/env-ci/__/path-key/index.js.map +1 -0
  29. package/lib/cjs/__/env-ci/__/signal-exit/dist/mjs/index.js.map +1 -0
  30. package/lib/cjs/__/env-ci/__/signal-exit/dist/mjs/signals.js.map +1 -0
  31. package/lib/cjs/__/env-ci/__/strip-final-newline/index.js.map +1 -0
  32. package/lib/cjs/__/env-ci/lib/git.js +1 -1
  33. package/lib/cjs/__/json-with-bigint/json-with-bigint.js +419 -60
  34. package/lib/cjs/__/json-with-bigint/json-with-bigint.js.map +1 -1
  35. package/lib/cjs/__/undici/lib/core/request.js +12 -1
  36. package/lib/cjs/__/undici/lib/core/request.js.map +1 -1
  37. package/lib/cjs/__/undici/lib/dispatcher/agent.js +0 -1
  38. package/lib/cjs/__/undici/lib/dispatcher/agent.js.map +1 -1
  39. package/lib/cjs/__/undici/lib/dispatcher/client-h1.js +151 -25
  40. package/lib/cjs/__/undici/lib/dispatcher/client-h1.js.map +1 -1
  41. package/lib/cjs/__/undici/lib/dispatcher/dispatcher-base.js +1 -0
  42. package/lib/cjs/__/undici/lib/dispatcher/dispatcher-base.js.map +1 -1
  43. package/lib/cjs/__/undici/lib/handler/retry-handler.js +34 -0
  44. package/lib/cjs/__/undici/lib/handler/retry-handler.js.map +1 -1
  45. package/lib/cjs/__/undici/lib/web/cookies/parse.js +16 -23
  46. package/lib/cjs/__/undici/lib/web/cookies/parse.js.map +1 -1
  47. package/lib/cjs/__/undici/lib/web/cookies/util.js +79 -9
  48. package/lib/cjs/__/undici/lib/web/cookies/util.js.map +1 -1
  49. package/lib/cjs/__/undici/lib/web/websocket/receiver.js +31 -8
  50. package/lib/cjs/__/undici/lib/web/websocket/receiver.js.map +1 -1
  51. package/lib/cjs/__/undici/lib/web/websocket/websocket.js +4 -1
  52. package/lib/cjs/__/undici/lib/web/websocket/websocket.js.map +1 -1
  53. package/lib/cjs/_virtual/_commonjsHelpers.js +1 -1
  54. package/lib/cjs/_virtual/index10.js +2 -2
  55. package/lib/cjs/_virtual/index11.js +2 -2
  56. package/lib/cjs/_virtual/index13.js +2 -2
  57. package/lib/cjs/_virtual/index9.js +3 -3
  58. package/lib/cjs/env/load.js +1 -1
  59. package/lib/cjs/env/load.js.map +1 -1
  60. package/lib/esm/__/@actions/http-client/lib/index.js +1 -1
  61. package/lib/esm/__/@octokit/core/dist-src/version.js +1 -1
  62. package/lib/esm/__/@octokit/core/dist-src/version.js.map +1 -1
  63. package/lib/esm/__/@octokit/graphql/dist-bundle/index.js +4 -0
  64. package/lib/esm/__/@octokit/graphql/dist-bundle/index.js.map +1 -1
  65. package/lib/esm/__/@octokit/request/dist-bundle/index.js +11 -7
  66. package/lib/esm/__/@octokit/request/dist-bundle/index.js.map +1 -1
  67. package/lib/esm/__/content-type/dist/index.js +181 -0
  68. package/lib/esm/__/content-type/dist/index.js.map +1 -0
  69. package/lib/esm/__/cross-spawn/index.js +1 -1
  70. package/lib/esm/__/{execa → env-ci/__/execa}/index.js +1 -1
  71. package/lib/esm/__/env-ci/__/execa/index.js.map +1 -0
  72. package/lib/esm/__/env-ci/__/execa/lib/command.js.map +1 -0
  73. package/lib/esm/__/env-ci/__/execa/lib/error.js.map +1 -0
  74. package/lib/esm/__/env-ci/__/execa/lib/promise.js.map +1 -0
  75. package/lib/esm/__/env-ci/__/execa/lib/stdio.js.map +1 -0
  76. package/lib/esm/__/{execa → env-ci/__/execa}/lib/stream.js +1 -1
  77. package/lib/esm/__/env-ci/__/execa/lib/stream.js.map +1 -0
  78. package/lib/esm/__/env-ci/__/execa/lib/verbose.js.map +1 -0
  79. package/lib/esm/__/env-ci/__/get-stream/source/array-buffer.js.map +1 -0
  80. package/lib/esm/__/env-ci/__/human-signals/build/src/core.js.map +1 -0
  81. package/lib/esm/__/env-ci/__/human-signals/build/src/main.js.map +1 -0
  82. package/lib/esm/__/env-ci/__/human-signals/build/src/realtime.js.map +1 -0
  83. package/lib/esm/__/env-ci/__/human-signals/build/src/signals.js.map +1 -0
  84. package/lib/esm/__/env-ci/__/is-stream/index.js.map +1 -0
  85. package/lib/esm/__/{npm-run-path → env-ci/__/npm-run-path}/index.js +1 -1
  86. package/lib/esm/__/env-ci/__/npm-run-path/index.js.map +1 -0
  87. package/lib/esm/__/env-ci/__/path-key/index.js.map +1 -0
  88. package/lib/esm/__/env-ci/__/signal-exit/dist/mjs/index.js.map +1 -0
  89. package/lib/esm/__/env-ci/__/signal-exit/dist/mjs/signals.js.map +1 -0
  90. package/lib/esm/__/env-ci/__/strip-final-newline/index.js.map +1 -0
  91. package/lib/esm/__/env-ci/lib/git.js +1 -1
  92. package/lib/esm/__/json-with-bigint/json-with-bigint.js +419 -60
  93. package/lib/esm/__/json-with-bigint/json-with-bigint.js.map +1 -1
  94. package/lib/esm/__/undici/lib/core/request.js +12 -1
  95. package/lib/esm/__/undici/lib/core/request.js.map +1 -1
  96. package/lib/esm/__/undici/lib/dispatcher/agent.js +0 -1
  97. package/lib/esm/__/undici/lib/dispatcher/agent.js.map +1 -1
  98. package/lib/esm/__/undici/lib/dispatcher/client-h1.js +151 -25
  99. package/lib/esm/__/undici/lib/dispatcher/client-h1.js.map +1 -1
  100. package/lib/esm/__/undici/lib/dispatcher/dispatcher-base.js +1 -0
  101. package/lib/esm/__/undici/lib/dispatcher/dispatcher-base.js.map +1 -1
  102. package/lib/esm/__/undici/lib/handler/retry-handler.js +34 -0
  103. package/lib/esm/__/undici/lib/handler/retry-handler.js.map +1 -1
  104. package/lib/esm/__/undici/lib/web/cookies/parse.js +16 -23
  105. package/lib/esm/__/undici/lib/web/cookies/parse.js.map +1 -1
  106. package/lib/esm/__/undici/lib/web/cookies/util.js +79 -9
  107. package/lib/esm/__/undici/lib/web/cookies/util.js.map +1 -1
  108. package/lib/esm/__/undici/lib/web/websocket/receiver.js +31 -8
  109. package/lib/esm/__/undici/lib/web/websocket/receiver.js.map +1 -1
  110. package/lib/esm/__/undici/lib/web/websocket/websocket.js +4 -1
  111. package/lib/esm/__/undici/lib/web/websocket/websocket.js.map +1 -1
  112. package/lib/esm/_virtual/_commonjsHelpers.js +1 -1
  113. package/lib/esm/_virtual/index10.js +2 -2
  114. package/lib/esm/_virtual/index11.js +2 -2
  115. package/lib/esm/_virtual/index13.js +2 -2
  116. package/lib/esm/_virtual/index9.js +3 -3
  117. package/lib/esm/env/load.js +1 -1
  118. package/lib/esm/env/load.js.map +1 -1
  119. package/package.json +12 -12
  120. package/lib/cjs/__/execa/index.js.map +0 -1
  121. package/lib/cjs/__/execa/lib/command.js.map +0 -1
  122. package/lib/cjs/__/execa/lib/error.js.map +0 -1
  123. package/lib/cjs/__/execa/lib/promise.js.map +0 -1
  124. package/lib/cjs/__/execa/lib/stdio.js.map +0 -1
  125. package/lib/cjs/__/execa/lib/stream.js.map +0 -1
  126. package/lib/cjs/__/execa/lib/verbose.js.map +0 -1
  127. package/lib/cjs/__/fast-content-type-parse/index.js +0 -182
  128. package/lib/cjs/__/fast-content-type-parse/index.js.map +0 -1
  129. package/lib/cjs/__/get-stream/source/array-buffer.js.map +0 -1
  130. package/lib/cjs/__/human-signals/build/src/core.js.map +0 -1
  131. package/lib/cjs/__/human-signals/build/src/main.js.map +0 -1
  132. package/lib/cjs/__/human-signals/build/src/realtime.js.map +0 -1
  133. package/lib/cjs/__/human-signals/build/src/signals.js.map +0 -1
  134. package/lib/cjs/__/is-stream/index.js.map +0 -1
  135. package/lib/cjs/__/npm-run-path/__/path-key/index.js.map +0 -1
  136. package/lib/cjs/__/npm-run-path/index.js.map +0 -1
  137. package/lib/cjs/__/signal-exit/dist/mjs/index.js.map +0 -1
  138. package/lib/cjs/__/signal-exit/dist/mjs/signals.js.map +0 -1
  139. package/lib/cjs/__/strip-final-newline/index.js.map +0 -1
  140. package/lib/esm/__/execa/index.js.map +0 -1
  141. package/lib/esm/__/execa/lib/command.js.map +0 -1
  142. package/lib/esm/__/execa/lib/error.js.map +0 -1
  143. package/lib/esm/__/execa/lib/promise.js.map +0 -1
  144. package/lib/esm/__/execa/lib/stdio.js.map +0 -1
  145. package/lib/esm/__/execa/lib/stream.js.map +0 -1
  146. package/lib/esm/__/execa/lib/verbose.js.map +0 -1
  147. package/lib/esm/__/fast-content-type-parse/index.js +0 -180
  148. package/lib/esm/__/fast-content-type-parse/index.js.map +0 -1
  149. package/lib/esm/__/get-stream/source/array-buffer.js.map +0 -1
  150. package/lib/esm/__/human-signals/build/src/core.js.map +0 -1
  151. package/lib/esm/__/human-signals/build/src/main.js.map +0 -1
  152. package/lib/esm/__/human-signals/build/src/realtime.js.map +0 -1
  153. package/lib/esm/__/human-signals/build/src/signals.js.map +0 -1
  154. package/lib/esm/__/is-stream/index.js.map +0 -1
  155. package/lib/esm/__/npm-run-path/__/path-key/index.js.map +0 -1
  156. package/lib/esm/__/npm-run-path/index.js.map +0 -1
  157. package/lib/esm/__/signal-exit/dist/mjs/index.js.map +0 -1
  158. package/lib/esm/__/signal-exit/dist/mjs/signals.js.map +0 -1
  159. package/lib/esm/__/strip-final-newline/index.js.map +0 -1
  160. /package/lib/cjs/__/{execa → env-ci/__/execa}/lib/command.js +0 -0
  161. /package/lib/cjs/__/{execa → env-ci/__/execa}/lib/error.js +0 -0
  162. /package/lib/cjs/__/{execa → env-ci/__/execa}/lib/promise.js +0 -0
  163. /package/lib/cjs/__/{execa → env-ci/__/execa}/lib/stdio.js +0 -0
  164. /package/lib/cjs/__/{execa → env-ci/__/execa}/lib/verbose.js +0 -0
  165. /package/lib/cjs/__/{get-stream → env-ci/__/get-stream}/source/array-buffer.js +0 -0
  166. /package/lib/cjs/__/{human-signals → env-ci/__/human-signals}/build/src/core.js +0 -0
  167. /package/lib/cjs/__/{human-signals → env-ci/__/human-signals}/build/src/main.js +0 -0
  168. /package/lib/cjs/__/{human-signals → env-ci/__/human-signals}/build/src/realtime.js +0 -0
  169. /package/lib/cjs/__/{human-signals → env-ci/__/human-signals}/build/src/signals.js +0 -0
  170. /package/lib/cjs/__/{is-stream → env-ci/__/is-stream}/index.js +0 -0
  171. /package/lib/cjs/__/{npm-run-path → env-ci}/__/path-key/index.js +0 -0
  172. /package/lib/cjs/__/{signal-exit → env-ci/__/signal-exit}/dist/mjs/index.js +0 -0
  173. /package/lib/cjs/__/{signal-exit → env-ci/__/signal-exit}/dist/mjs/signals.js +0 -0
  174. /package/lib/cjs/__/{strip-final-newline → env-ci/__/strip-final-newline}/index.js +0 -0
  175. /package/lib/esm/__/{execa → env-ci/__/execa}/lib/command.js +0 -0
  176. /package/lib/esm/__/{execa → env-ci/__/execa}/lib/error.js +0 -0
  177. /package/lib/esm/__/{execa → env-ci/__/execa}/lib/promise.js +0 -0
  178. /package/lib/esm/__/{execa → env-ci/__/execa}/lib/stdio.js +0 -0
  179. /package/lib/esm/__/{execa → env-ci/__/execa}/lib/verbose.js +0 -0
  180. /package/lib/esm/__/{get-stream → env-ci/__/get-stream}/source/array-buffer.js +0 -0
  181. /package/lib/esm/__/{human-signals → env-ci/__/human-signals}/build/src/core.js +0 -0
  182. /package/lib/esm/__/{human-signals → env-ci/__/human-signals}/build/src/main.js +0 -0
  183. /package/lib/esm/__/{human-signals → env-ci/__/human-signals}/build/src/realtime.js +0 -0
  184. /package/lib/esm/__/{human-signals → env-ci/__/human-signals}/build/src/signals.js +0 -0
  185. /package/lib/esm/__/{is-stream → env-ci/__/is-stream}/index.js +0 -0
  186. /package/lib/esm/__/{npm-run-path → env-ci}/__/path-key/index.js +0 -0
  187. /package/lib/esm/__/{signal-exit → env-ci/__/signal-exit}/dist/mjs/index.js +0 -0
  188. /package/lib/esm/__/{signal-exit → env-ci/__/signal-exit}/dist/mjs/signals.js +0 -0
  189. /package/lib/esm/__/{strip-final-newline → env-ci/__/strip-final-newline}/index.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"websocket.js","sources":["../../../../../../../../../node_modules/undici/lib/web/websocket/websocket.js"],"sourcesContent":["'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { environmentSettingsObject } = require('../fetch/util')\nconst { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require('./constants')\nconst {\n kWebSocketURL,\n kReadyState,\n kController,\n kBinaryType,\n kResponse,\n kSentClose,\n kByteParser\n} = require('./symbols')\nconst {\n isConnecting,\n isEstablished,\n isClosing,\n isValidSubprotocol,\n fireEvent\n} = require('./util')\nconst { establishWebSocketConnection, closeWebSocketConnection } = require('./connection')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty, isBlobLike } = require('../../core/util')\nconst { getGlobalDispatcher } = require('../../global')\nconst { types } = require('node:util')\nconst { ErrorEvent, CloseEvent } = require('./events')\nconst { SendQueue } = require('./sender')\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /** @type {SendQueue} */\n #sendQueue\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'WebSocket constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n const options = webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'](protocols, prefix, 'options')\n\n url = webidl.converters.USVString(url, prefix, 'url')\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL.\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n // 3. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 4. If urlRecord’s scheme is \"http\", then set urlRecord’s scheme to \"ws\".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n // 5. Otherwise, if urlRecord’s scheme is \"https\", set urlRecord’s scheme to \"wss\".\n urlRecord.protocol = 'wss:'\n }\n\n // 6. If urlRecord’s scheme is not \"ws\" or \"wss\", then throw a \"SyntaxError\" DOMException.\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException(\n `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,\n 'SyntaxError'\n )\n }\n\n // 7. If urlRecord’s fragment is non-null, then throw a \"SyntaxError\"\n // DOMException.\n if (urlRecord.hash || urlRecord.href.endsWith('#')) {\n throw new DOMException('Got fragment', 'SyntaxError')\n }\n\n // 8. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 9. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 10. Set this's url to urlRecord.\n this[kWebSocketURL] = new URL(urlRecord.href)\n\n // 11. Let client be this's relevant settings object.\n const client = environmentSettingsObject.settingsObject\n\n // 12. Run this step in parallel:\n\n // 1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this[kController] = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this,\n (response, extensions) => this.#onConnectionEstablished(response, extensions),\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this[kReadyState] = WebSocket.CONNECTING\n\n this[kSentClose] = sentCloseFrameState.NOT_SENT\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this[kBinaryType] = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.close'\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true })\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason, prefix, 'reason')\n }\n\n // 1. If code is present, but is neither an integer equal to 1000 nor an\n // integer in the range 3000 to 4999, inclusive, throw an\n // \"InvalidAccessError\" DOMException.\n if (code !== undefined) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n let reasonByteLength = 0\n\n // 2. If reason is present, then run these substeps:\n if (reason !== undefined) {\n // 1. Let reasonBytes be the result of encoding reason.\n // 2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n reasonByteLength = Buffer.byteLength(reason)\n\n if (reasonByteLength > 123) {\n throw new DOMException(\n `Reason must be less than 123 bytes; received ${reasonByteLength}`,\n 'SyntaxError'\n )\n }\n }\n\n // 3. Run the first matching steps from the following list:\n closeWebSocketConnection(this, code, reason, reasonByteLength)\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.send'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n data = webidl.converters.WebSocketSendData(data, prefix, 'data')\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (isConnecting(this)) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this) || isClosing(this)) {\n return\n }\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const length = Buffer.byteLength(data)\n\n this.#bufferedAmount += length\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= length\n }, sendHints.string)\n } else if (types.isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.arrayBuffer)\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data’s buffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.typedArray)\n } else if (isBlobLike(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object’s raw data, in bytes.\n\n this.#bufferedAmount += data.size\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.size\n }, sendHints.blob)\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this[kReadyState]\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this[kWebSocketURL])\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n if (typeof fn === 'function') {\n this.#events.close = fn\n this.addEventListener('close', fn)\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this[kBinaryType]\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this[kBinaryType] = 'blob'\n } else {\n this[kBinaryType] = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response, parsedExtensions) {\n // processResponse is called when the \"response's header list has been received and initialized.\"\n // once this happens, the connection is open\n this[kResponse] = response\n\n const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize\n\n const parser = new ByteParser(this, parsedExtensions, {\n maxPayloadSize\n })\n parser.on('drain', onParserDrain)\n parser.on('error', onParserError.bind(this))\n\n response.socket.ws = this\n this[kByteParser] = parser\n\n this.#sendQueue = new SendQueue(response.socket)\n\n // 1. Change the ready state to OPEN (1).\n this[kReadyState] = states.OPEN\n\n // 2. Change the extensions attribute’s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute’s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n }\n}\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence<DOMString>'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence<DOMString>'] = function (V, prefix, argument) {\n if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {\n return webidl.converters['sequence<DOMString>'](V)\n }\n\n return webidl.converters.DOMString(V, prefix, argument)\n}\n\n// This implements the proposal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence<DOMString>'],\n defaultValue: () => new Array(0)\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any,\n defaultValue: () => getGlobalDispatcher()\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence<DOMString> or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence<DOMString>'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) {\n return webidl.converters.BufferSource(V)\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nfunction onParserDrain () {\n this.ws[kResponse].socket.resume()\n}\n\nfunction onParserError (err) {\n let message\n let code\n\n if (err instanceof CloseEvent) {\n message = err.reason\n code = err.code\n } else {\n message = err.message\n }\n\n fireEvent('error', this, () => new ErrorEvent('error', { error: err, message }))\n\n closeWebSocketConnection(this, code)\n}\n\nmodule.exports = {\n WebSocket\n}\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12"],"mappings":";;;;;;;;;;;;;;;;;;;;;CAEA,MAAM,EAAE,MAAM,EAAE,GAAGA,aAAA;CACnB,MAAM,EAAE,aAAa,EAAE,GAAGC,cAAA;CAC1B,MAAM,EAAE,yBAAyB,EAAE,GAAGC,WAAA;CACtC,MAAM,EAAE,yBAAyB,EAAE,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAGC,gBAAA;CAC9E,MAAM;AACN,GAAE,aAAa;AACf,GAAE,WAAW;AACb,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AC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;AACxC,KAAI,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE;AACvB,OAAM,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;AACxD,KAAA;;AAEA,KAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;AACzD,OAAM,OAAO,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAC7C,KAAA;AACA,GAAA;;AAEA,GAAE,OAAO,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACtC,CAAA;;AAEA,CAAA,SAAS,aAAa,IAAI;GACxB,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM;AAClC,CAAA;;CAEA,SAAS,aAAa,EAAE,GAAG,EAAE;AAC7B,GAAE,IAAI;AACN,GAAE,IAAI;;AAEN,GAAE,IAAI,GAAG,YAAY,UAAU,EAAE;KAC7B,OAAO,GAAG,GAAG,CAAC;KACd,IAAI,GAAG,GAAG,CAAC;AACf,GAAA,CAAG,MAAM;KACL,OAAO,GAAG,GAAG,CAAC;AAClB,GAAA;;AAEA,GAAE,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;;AAEjF,GAAE,wBAAwB,CAAC,IAAI,EAAE,IAAI;AACrC,CAAA;;AAEA,CAAA,SAAc,GAAG;GACf;AACF;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"websocket.js","sources":["../../../../../../../../../node_modules/undici/lib/web/websocket/websocket.js"],"sourcesContent":["'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { environmentSettingsObject } = require('../fetch/util')\nconst { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require('./constants')\nconst {\n kWebSocketURL,\n kReadyState,\n kController,\n kBinaryType,\n kResponse,\n kSentClose,\n kByteParser\n} = require('./symbols')\nconst {\n isConnecting,\n isEstablished,\n isClosing,\n isValidSubprotocol,\n fireEvent\n} = require('./util')\nconst { establishWebSocketConnection, closeWebSocketConnection } = require('./connection')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty, isBlobLike } = require('../../core/util')\nconst { getGlobalDispatcher } = require('../../global')\nconst { types } = require('node:util')\nconst { ErrorEvent, CloseEvent } = require('./events')\nconst { SendQueue } = require('./sender')\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /** @type {SendQueue} */\n #sendQueue\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'WebSocket constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n const options = webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'](protocols, prefix, 'options')\n\n url = webidl.converters.USVString(url, prefix, 'url')\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL.\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n // 3. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 4. If urlRecord’s scheme is \"http\", then set urlRecord’s scheme to \"ws\".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n // 5. Otherwise, if urlRecord’s scheme is \"https\", set urlRecord’s scheme to \"wss\".\n urlRecord.protocol = 'wss:'\n }\n\n // 6. If urlRecord’s scheme is not \"ws\" or \"wss\", then throw a \"SyntaxError\" DOMException.\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException(\n `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,\n 'SyntaxError'\n )\n }\n\n // 7. If urlRecord’s fragment is non-null, then throw a \"SyntaxError\"\n // DOMException.\n if (urlRecord.hash || urlRecord.href.endsWith('#')) {\n throw new DOMException('Got fragment', 'SyntaxError')\n }\n\n // 8. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 9. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 10. Set this's url to urlRecord.\n this[kWebSocketURL] = new URL(urlRecord.href)\n\n // 11. Let client be this's relevant settings object.\n const client = environmentSettingsObject.settingsObject\n\n // 12. Run this step in parallel:\n\n // 1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this[kController] = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this,\n (response, extensions) => this.#onConnectionEstablished(response, extensions),\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this[kReadyState] = WebSocket.CONNECTING\n\n this[kSentClose] = sentCloseFrameState.NOT_SENT\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this[kBinaryType] = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.close'\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true })\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason, prefix, 'reason')\n }\n\n // 1. If code is present, but is neither an integer equal to 1000 nor an\n // integer in the range 3000 to 4999, inclusive, throw an\n // \"InvalidAccessError\" DOMException.\n if (code !== undefined) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n let reasonByteLength = 0\n\n // 2. If reason is present, then run these substeps:\n if (reason !== undefined) {\n // 1. Let reasonBytes be the result of encoding reason.\n // 2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n reasonByteLength = Buffer.byteLength(reason)\n\n if (reasonByteLength > 123) {\n throw new DOMException(\n `Reason must be less than 123 bytes; received ${reasonByteLength}`,\n 'SyntaxError'\n )\n }\n }\n\n // 3. Run the first matching steps from the following list:\n closeWebSocketConnection(this, code, reason, reasonByteLength)\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.send'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n data = webidl.converters.WebSocketSendData(data, prefix, 'data')\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (isConnecting(this)) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this) || isClosing(this)) {\n return\n }\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const length = Buffer.byteLength(data)\n\n this.#bufferedAmount += length\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= length\n }, sendHints.string)\n } else if (types.isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.arrayBuffer)\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data’s buffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.typedArray)\n } else if (isBlobLike(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object’s raw data, in bytes.\n\n this.#bufferedAmount += data.size\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.size\n }, sendHints.blob)\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this[kReadyState]\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this[kWebSocketURL])\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n if (typeof fn === 'function') {\n this.#events.close = fn\n this.addEventListener('close', fn)\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this[kBinaryType]\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this[kBinaryType] = 'blob'\n } else {\n this[kBinaryType] = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response, parsedExtensions) {\n // processResponse is called when the \"response's header list has been received and initialized.\"\n // once this happens, the connection is open\n this[kResponse] = response\n\n const webSocketOptions = this[kController]?.dispatcher?.webSocketOptions\n const maxFragments = webSocketOptions?.maxFragments\n const maxPayloadSize = webSocketOptions?.maxPayloadSize\n\n const parser = new ByteParser(this, parsedExtensions, {\n maxFragments,\n maxPayloadSize\n })\n parser.on('drain', onParserDrain)\n parser.on('error', onParserError.bind(this))\n\n response.socket.ws = this\n this[kByteParser] = parser\n\n this.#sendQueue = new SendQueue(response.socket)\n\n // 1. Change the ready state to OPEN (1).\n this[kReadyState] = states.OPEN\n\n // 2. Change the extensions attribute’s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute’s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n }\n}\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence<DOMString>'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence<DOMString>'] = function (V, prefix, argument) {\n if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {\n return webidl.converters['sequence<DOMString>'](V)\n }\n\n return webidl.converters.DOMString(V, prefix, argument)\n}\n\n// This implements the proposal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence<DOMString>'],\n defaultValue: () => new Array(0)\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any,\n defaultValue: () => getGlobalDispatcher()\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence<DOMString> or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence<DOMString>'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) {\n return webidl.converters.BufferSource(V)\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nfunction onParserDrain () {\n this.ws[kResponse].socket.resume()\n}\n\nfunction onParserError (err) {\n let message\n let code\n\n if (err instanceof CloseEvent) {\n message = err.reason\n code = err.code\n } else {\n message = err.message\n }\n\n fireEvent('error', this, () => new ErrorEvent('error', { error: err, message }))\n\n closeWebSocketConnection(this, code)\n}\n\nmodule.exports = {\n WebSocket\n}\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12"],"mappings":";;;;;;;;;;;;;;;;;;;;;CAEA,MAAM,EAAE,MAAM,EAAE,GAAGA,aAAA;CACnB,MAAM,EAAE,aAAa,EAAE,GAAGC,cAAA;CAC1B,MAAM,EAAE,yBAAyB,EAAE,GAAGC,WAAA;CACtC,MAAM,EAAE,yBAAyB,EAAE,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAGC,gBAAA;CAC9E,MAAM;AACN,GAAE,aAAa;AACf,GAAE,WAAW;AACb,GAAE,WAAW;AACb,GAAE,WAAW;AACb,GAAE,SA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AAC,iBAAiB,GAAG,UAAU,CAAC,EAAE;GACjD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;AACxC,KAAI,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE;AACvB,OAAM,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;AACxD,KAAA;;AAEA,KAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;AACzD,OAAM,OAAO,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAC7C,KAAA;AACA,GAAA;;AAEA,GAAE,OAAO,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACtC,CAAA;;AAEA,CAAA,SAAS,aAAa,IAAI;GACxB,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM;AAClC,CAAA;;CAEA,SAAS,aAAa,EAAE,GAAG,EAAE;AAC7B,GAAE,IAAI;AACN,GAAE,IAAI;;AAEN,GAAE,IAAI,GAAG,YAAY,UAAU,EAAE;KAC7B,OAAO,GAAG,GAAG,CAAC;KACd,IAAI,GAAG,GAAG,CAAC;AACf,GAAA,CAAG,MAAM;KACL,OAAO,GAAG,GAAG,CAAC;AAClB,GAAA;;AAEA,GAAE,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;;AAEjF,GAAE,wBAAwB,CAAC,IAAI,EAAE,IAAI;AACrC,CAAA;;AAEA,CAAA,SAAc,GAAG;GACf;AACF;;;;;;","x_google_ignoreList":[0]}
@@ -12,7 +12,7 @@ function getAugmentedNamespace(n) {
12
12
  var isInstance = false;
13
13
  try {
14
14
  isInstance = this instanceof a;
15
- } catch {}
15
+ } catch (e) {}
16
16
  if (isInstance) {
17
17
  return Reflect.construct(f, arguments, this.constructor);
18
18
  }
@@ -1,4 +1,4 @@
1
- var crossSpawn = {exports: {}};
1
+ var lib = {};
2
2
 
3
- export { crossSpawn as __module };
3
+ export { lib as __exports };
4
4
  //# sourceMappingURL=index10.js.map
@@ -1,4 +1,4 @@
1
- var lib = {};
1
+ var crossSpawn = {exports: {}};
2
2
 
3
- export { lib as __exports };
3
+ export { crossSpawn as __module };
4
4
  //# sourceMappingURL=index11.js.map
@@ -1,4 +1,4 @@
1
- var fastContentTypeParse = {};
1
+ var dist = {};
2
2
 
3
- export { fastContentTypeParse as __exports };
3
+ export { dist as __exports };
4
4
  //# sourceMappingURL=index13.js.map
@@ -1,6 +1,6 @@
1
- import { __require as requireFastContentTypeParse } from '../__/fast-content-type-parse/index.js';
1
+ import { __require as requireDist } from '../__/content-type/dist/index.js';
2
2
 
3
- var fastContentTypeParseExports = requireFastContentTypeParse();
3
+ var distExports = requireDist();
4
4
 
5
- export { fastContentTypeParseExports as f };
5
+ export { distExports as d };
6
6
  //# sourceMappingURL=index9.js.map
@@ -22,7 +22,7 @@ async function loadEnv(args, config = {}, logger$1 = logger) {
22
22
  debug('RELATIVE_CI env', maskObjectProperties(agentEnv, ['key']));
23
23
  const params = {
24
24
  isCi: ciEnv.isCi,
25
- agentVersion: "5.3.4-alpha.0",
25
+ agentVersion: "6.0.0-beta.3",
26
26
  agentType: args.agentType,
27
27
  key: agentEnv.key,
28
28
  endpoint: agentEnv.endpoint || DEFAULT_ENDPOINT,
@@ -1 +1 @@
1
- {"version":3,"file":"load.js","sources":["../../../../src/env/load.ts"],"sourcesContent":[null],"names":["logger","defaultLogger","LOCALES.AGENT_MISSING_KEY_ERROR","LOCALES.AGENT_MISSING_SLUG_ERROR","LOCALES.AGENT_MISSING_COMMIT_ERROR","LOCALES.AGENT_MISSING_BRANCH_ERROR"],"mappings":";;;;;;;;;AAaA;;;;;;AAMG;AACI,eAAe,OA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AAClF,QAAA,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK;AACpC,QAAA,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ;KAC9C;AAED;;;AAGG;AACH,IAAA,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,oBAAoB,EAAE;AACjD,QAAA,MAAM,CAAC,aAAa,GAAG,mBAAmB,EAAE;IAC9C;AAEA,IAAA,KAAK,CAAC,KAAK,EAAE,oBAAoB,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;;AAGnD,IAAA,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;AACf,QAAA,MAAM,IAAI,KAAK,CAACE,uBAA+B,CAAC;IAClD;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AAChB,QAAA,MAAM,IAAI,KAAK,CAACC,wBAAgC,CAAC;IACnD;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAClB,QAAA,MAAM,IAAI,KAAK,CAACC,0BAAkC,CAAC;IACrD;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAClB,QAAA,MAAM,IAAI,KAAK,CAACC,0BAAkC,CAAC;IACrD;;IAGA,OAAO;AACL,QAAA,GAAG,MAAM;QACT,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB;AACH;;;;"}
1
+ {"version":3,"file":"load.js","sources":["../../../../src/env/load.ts"],"sourcesContent":[null],"names":["logger","defaultLogger","LOCALES.AGENT_MISSING_KEY_ERROR","LOCALES.AGENT_MISSING_SLUG_ERROR","LOCALES.AGENT_MISSING_COMMIT_ERROR","LOCALES.AGENT_MISSING_BRANCH_ERROR"],"mappings":";;;;;;;;;AAaA;;;;;;AAMG;AACI,eAAe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Aa;AAClF,QAAA,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK;AACpC,QAAA,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ;KAC9C;AAED;;;AAGG;AACH,IAAA,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,oBAAoB,EAAE;AACjD,QAAA,MAAM,CAAC,aAAa,GAAG,mBAAmB,EAAE;IAC9C;AAEA,IAAA,KAAK,CAAC,KAAK,EAAE,oBAAoB,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;;AAGnD,IAAA,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;AACf,QAAA,MAAM,IAAI,KAAK,CAACE,uBAA+B,CAAC;IAClD;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AAChB,QAAA,MAAM,IAAI,KAAK,CAACC,wBAAgC,CAAC;IACnD;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAClB,QAAA,MAAM,IAAI,KAAK,CAACC,0BAAkC,CAAC;IACrD;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAClB,QAAA,MAAM,IAAI,KAAK,CAACC,0BAAkC,CAAC;IACrD;;IAGA,OAAO;AACL,QAAA,GAAG,MAAM;QACT,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relative-ci/core",
3
- "version": "5.3.4-alpha.0",
3
+ "version": "6.0.0-beta.3",
4
4
  "description": "Core library for RelativeCI agent - send bundle stats and CI build information to RelativeCI",
5
5
  "keywords": [
6
6
  "relative-ci",
@@ -34,7 +34,7 @@
34
34
  "url": "https://relative-ci.com"
35
35
  },
36
36
  "engines": {
37
- "node": ">= 18.0.0"
37
+ "node": ">= 22.0.0"
38
38
  },
39
39
  "main": "./lib/cjs/index.js",
40
40
  "module": "./lib/esm/index.js",
@@ -81,31 +81,31 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@octokit/webhooks-types": "7.6.1",
84
- "@rollup/plugin-commonjs": "29.0.2",
84
+ "@rollup/plugin-commonjs": "29.0.3",
85
85
  "@rollup/plugin-node-resolve": "16.0.3",
86
86
  "@rollup/plugin-replace": "6.0.3",
87
87
  "@rollup/plugin-typescript": "12.3.0",
88
- "@tsconfig/node18": "18.2.6",
88
+ "@tsconfig/node22": "22.0.6",
89
89
  "@types/debug": "4.1.13",
90
90
  "@types/env-ci": "3.1.4",
91
91
  "@types/fs-extra": "11.0.4",
92
- "@types/lodash": "4.17.24",
92
+ "@types/lodash": "4.17.25",
93
93
  "env-ci": "11.2.0",
94
94
  "rimraf": "6.1.3",
95
- "rollup": "4.60.4",
95
+ "rollup": "4.62.5",
96
96
  "rollup-plugin-node-externals": "9.0.1",
97
97
  "typescript": "5.9.3",
98
- "typescript-eslint": "8.60.0",
99
- "vitest": "4.1.7"
98
+ "typescript-eslint": "8.67.0",
99
+ "vitest": "4.1.11"
100
100
  },
101
101
  "dependencies": {
102
102
  "@actions/github": "8.0.1",
103
- "@bundle-stats/plugin-webpack-filter": "4.22.1",
104
- "@bundle-stats/plugin-webpack-validate": "4.22.1",
103
+ "@bundle-stats/plugin-webpack-filter": "4.22.2",
104
+ "@bundle-stats/plugin-webpack-validate": "4.22.2",
105
105
  "debug": "4.4.3",
106
106
  "dotenv": "17.4.2",
107
- "fs-extra": "11.3.5",
107
+ "fs-extra": "^11.3.6",
108
108
  "lodash": "4.18.1"
109
109
  },
110
- "gitHead": "69e26c5358110cc3664896224e421f28bdad3c06"
110
+ "gitHead": "a53523758635a90675e6f367cc6b34ae76c4ebe9"
111
111
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../node_modules/execa/index.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n"],"names":["process","npmRunPathEnv","crossSpawn","verboseDefault","normalizeStdio","path","Buffer","stripFinalNewline","command","joinCommand","getEscapedCommand","logCommand","handleInputSync","childProcess","error","makeError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG;;AAE5C,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACjF,CAAC,MAAM,GAAG,GAAG,SAAS,GAAG,CAAC,GAAGA,wBAAO,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS;;AAEnE,CAAC,IAAI,WAAW,EAAE;AAClB,EAAE,OAAOC,qBAAa,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC;;AAED,CAAC,OAAO,GAAG;AACX,CAAC;;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAG,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;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.js","sources":["../../../../../../../node_modules/execa/lib/command.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replaceAll('\"', '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens.at(-1);\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens.at(-1)}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n"],"names":[],"mappings":";;AAGA,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,KAAK;AAC3C,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAC3B,EAAE,OAAO,CAAC,IAAI,CAAC;AACf,CAAC;;AAED,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;AACvB,CAAC;;AAED,MAAM,gBAAgB,GAAG,WAAW;;AAEpC,MAAM,SAAS,GAAG,GAAG,IAAI;AACzB,CAAC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5D,EAAE,OAAO,GAAG;AACZ,CAAC;;AAED,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;;AAEW,MAAC,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG;;AAEjE,MAAC,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG;;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sources":["../../../../../../../node_modules/execa/lib/error.js"],"sourcesContent":["import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n"],"names":["process","signalsByName"],"mappings":";;;;;;;;;AAGA,MAAM,cAAc,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK;AAC5G,CAAC,IAAI,QAAQ,EAAE;AACf,EAAE,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAAC;AAClD,CAAC;;AAMD,CAAC,IAAI,SAAS,KAAK,SAAS,EAAE;AAC9B,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnC,CAAC;;AAED,CAAC,IAAI,MAAM,KAAK,SAAS,EAAE;AAC3B,EA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AC,KAAK,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ;;AAEnC,CAAC,OAAO,KAAK;AACb;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"promise.js","sources":["../../../../../../../node_modules/execa/lib/promise.js"],"sourcesContent":["// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n"],"names":[],"mappings":";;AAAA;AACA,MAAM,sBAAsB,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS;;AAEnD,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI;AACjE,CAAC,QAAQ;AACT,CAAC,OAAO,CAAC,wBAAwB,CAAC,sBAAsB,EAAE,QAAQ,CAAC;AACnE,CAAC;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stdio.js","sources":["../../../../../../../node_modules/execa/lib/stdio.js"],"sourcesContent":["const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n"],"names":[],"mappings":";;AAAA,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;;AAE7C,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;;AAEnE,MAAC,cAAc,GAAG,OAAO,IAAI;AACzC,CAAC,IAAI,CAAC,OAAO,EAAE;AACf,EAAE;AACF,CAAC;;AAED,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO;;AAExB,CAAC,IAAI,KAAK,KAAK,SAAS,EAAE;AAC1B,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC;;AAED,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;AACxB,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,kEAAkE,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACzI,CAAC;;AAED,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAChC,EAAE,OAAO,KAAK;AACd,CAAC;;AAED,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC5B,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,gEAAgE,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;AAC1G,CAAC;;AAED,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;AACtD,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5D;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.js","sources":["../../../../../../../node_modules/execa/lib/stream.js"],"sourcesContent":["import {createReadStream, readFileSync} from 'node:fs';\nimport {setTimeout} from 'node:timers/promises';\nimport {isStream} from 'is-stream';\nimport getStream, {getStreamAsBuffer} from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\t// Wait for the `all` stream to receive the last chunk before destroying the stream\n\tawait setTimeout(0);\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case\n\tif (encoding === 'utf8' || encoding === 'utf-8') {\n\t\treturn getStream(stream, {maxBuffer});\n\t}\n\n\tif (encoding === null || encoding === 'buffer') {\n\t\treturn getStreamAsBuffer(stream, {maxBuffer});\n\t}\n\n\treturn applyEncoding(stream, maxBuffer, encoding);\n};\n\nconst applyEncoding = async (stream, maxBuffer, encoding) => {\n\tconst buffer = await getStreamAsBuffer(stream, {maxBuffer});\n\treturn buffer.toString(encoding);\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n"],"names":["readFileSync","isStream"],"mappings":";;;;;;;AAMA,MAAM,oBAAoB,GAAG,KAAK,IAAI;AACtC,CAAC,IAAI,KAAK,KAAK,SAAS,EAAE;AAC1B,EAAE,MAAM,IAAI,SAAS,CAAC,yDAAyD,CAAC;AAChF,CAAC;AACD,CAAC;;AAED,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK;AAC7C,CAAC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;AACpC,EAAE,OAAO,KAAK;AACd,CAAC;;AAED,CAAC,oBAAoB,CAAC,KAAK,CAAC;AAC5B,CAAC,OAAOA,uBAAY,CAAC,SAAS,CAAC;AAC/B,CAAC;;AAED;AACY,MAAC,eAAe,GAAG,OAAO,IAAI;AAC1C,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC;;AAEpC,CAAC,IAAIC,cAAQ,CAAC,KAAK,CAAC,EAAE;AACtB,EAAE,MAAM,IAAI,SAAS,CAAC,oDAAoD,CAAC;AAC3E,CAAC;;AAED,CAAC,OAAO,KAAK;AACb;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"verbose.js","sources":["../../../../../../../node_modules/execa/lib/verbose.js"],"sourcesContent":["import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n"],"names":["debuglog","process"],"mappings":";;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAQ,CAAC,OAAO,CAAC,CAAC;;AAEhD,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;;AAEzE,MAAM,YAAY,GAAG,MAAM;AAC3B,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE;AACxB,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AACpJ,CAAC;;AAEW,MAAC,UAAU,GAAG,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,KAAK;AACzD,CAAC,IAAI,CAAC,OAAO,EAAE;AACf,EAAE;AACF,CAAC;;AAED,CAACC,wBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;AAChE;;;;;","x_google_ignoreList":[0]}
@@ -1,182 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('../../_virtual/index13.js');
4
-
5
- var hasRequiredFastContentTypeParse;
6
-
7
- function requireFastContentTypeParse () {
8
- if (hasRequiredFastContentTypeParse) return index.__exports;
9
- hasRequiredFastContentTypeParse = 1;
10
-
11
- const NullObject = function NullObject () { };
12
- NullObject.prototype = Object.create(null);
13
-
14
- /**
15
- * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
16
- *
17
- * parameter = token "=" ( token / quoted-string )
18
- * token = 1*tchar
19
- * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
20
- * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
21
- * / DIGIT / ALPHA
22
- * ; any VCHAR, except delimiters
23
- * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
24
- * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
25
- * obs-text = %x80-FF
26
- * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
27
- */
28
- const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
29
-
30
- /**
31
- * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
32
- *
33
- * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
34
- * obs-text = %x80-FF
35
- */
36
- const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
37
-
38
- /**
39
- * RegExp to match type in RFC 7231 sec 3.1.1.1
40
- *
41
- * media-type = type "/" subtype
42
- * type = token
43
- * subtype = token
44
- */
45
- const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
46
-
47
- // default ContentType to prevent repeated object creation
48
- const defaultContentType = { type: '', parameters: new NullObject() };
49
- Object.freeze(defaultContentType.parameters);
50
- Object.freeze(defaultContentType);
51
-
52
- /**
53
- * Parse media type to object.
54
- *
55
- * @param {string|object} header
56
- * @return {Object}
57
- * @public
58
- */
59
-
60
- function parse (header) {
61
- if (typeof header !== 'string') {
62
- throw new TypeError('argument header is required and must be a string')
63
- }
64
-
65
- let index = header.indexOf(';');
66
- const type = index !== -1
67
- ? header.slice(0, index).trim()
68
- : header.trim();
69
-
70
- if (mediaTypeRE.test(type) === false) {
71
- throw new TypeError('invalid media type')
72
- }
73
-
74
- const result = {
75
- type: type.toLowerCase(),
76
- parameters: new NullObject()
77
- };
78
-
79
- // parse parameters
80
- if (index === -1) {
81
- return result
82
- }
83
-
84
- let key;
85
- let match;
86
- let value;
87
-
88
- paramRE.lastIndex = index;
89
-
90
- while ((match = paramRE.exec(header))) {
91
- if (match.index !== index) {
92
- throw new TypeError('invalid parameter format')
93
- }
94
-
95
- index += match[0].length;
96
- key = match[1].toLowerCase();
97
- value = match[2];
98
-
99
- if (value[0] === '"') {
100
- // remove quotes and escapes
101
- value = value
102
- .slice(1, value.length - 1);
103
-
104
- quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
105
- }
106
-
107
- result.parameters[key] = value;
108
- }
109
-
110
- if (index !== header.length) {
111
- throw new TypeError('invalid parameter format')
112
- }
113
-
114
- return result
115
- }
116
-
117
- function safeParse (header) {
118
- if (typeof header !== 'string') {
119
- return defaultContentType
120
- }
121
-
122
- let index = header.indexOf(';');
123
- const type = index !== -1
124
- ? header.slice(0, index).trim()
125
- : header.trim();
126
-
127
- if (mediaTypeRE.test(type) === false) {
128
- return defaultContentType
129
- }
130
-
131
- const result = {
132
- type: type.toLowerCase(),
133
- parameters: new NullObject()
134
- };
135
-
136
- // parse parameters
137
- if (index === -1) {
138
- return result
139
- }
140
-
141
- let key;
142
- let match;
143
- let value;
144
-
145
- paramRE.lastIndex = index;
146
-
147
- while ((match = paramRE.exec(header))) {
148
- if (match.index !== index) {
149
- return defaultContentType
150
- }
151
-
152
- index += match[0].length;
153
- key = match[1].toLowerCase();
154
- value = match[2];
155
-
156
- if (value[0] === '"') {
157
- // remove quotes and escapes
158
- value = value
159
- .slice(1, value.length - 1);
160
-
161
- quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
162
- }
163
-
164
- result.parameters[key] = value;
165
- }
166
-
167
- if (index !== header.length) {
168
- return defaultContentType
169
- }
170
-
171
- return result
172
- }
173
-
174
- index.__exports.default = { parse, safeParse };
175
- index.__exports.parse = parse;
176
- index.__exports.safeParse = safeParse;
177
- index.__exports.defaultContentType = defaultContentType;
178
- return index.__exports;
179
- }
180
-
181
- exports.__require = requireFastContentTypeParse;
182
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../node_modules/fast-content-type-parse/index.js"],"sourcesContent":["'use strict'\n\nconst NullObject = function NullObject () { }\nNullObject.prototype = Object.create(null)\n\n/**\n * RegExp to match *( \";\" parameter ) in RFC 7231 sec 3.1.1.1\n *\n * parameter = token \"=\" ( token / quoted-string )\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n * / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n * / DIGIT / ALPHA\n * ; any VCHAR, except delimiters\n * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text\n * obs-text = %x80-FF\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n */\nconst paramRE = /; *([!#$%&'*+.^\\w`|~-]+)=(\"(?:[\\v\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\v\\u0020-\\u00ff])*\"|[!#$%&'*+.^\\w`|~-]+) */gu\n\n/**\n * RegExp to match quoted-pair in RFC 7230 sec 3.2.6\n *\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n * obs-text = %x80-FF\n */\nconst quotedPairRE = /\\\\([\\v\\u0020-\\u00ff])/gu\n\n/**\n * RegExp to match type in RFC 7231 sec 3.1.1.1\n *\n * media-type = type \"/\" subtype\n * type = token\n * subtype = token\n */\nconst mediaTypeRE = /^[!#$%&'*+.^\\w|~-]+\\/[!#$%&'*+.^\\w|~-]+$/u\n\n// default ContentType to prevent repeated object creation\nconst defaultContentType = { type: '', parameters: new NullObject() }\nObject.freeze(defaultContentType.parameters)\nObject.freeze(defaultContentType)\n\n/**\n * Parse media type to object.\n *\n * @param {string|object} header\n * @return {Object}\n * @public\n */\n\nfunction parse (header) {\n if (typeof header !== 'string') {\n throw new TypeError('argument header is required and must be a string')\n }\n\n let index = header.indexOf(';')\n const type = index !== -1\n ? header.slice(0, index).trim()\n : header.trim()\n\n if (mediaTypeRE.test(type) === false) {\n throw new TypeError('invalid media type')\n }\n\n const result = {\n type: type.toLowerCase(),\n parameters: new NullObject()\n }\n\n // parse parameters\n if (index === -1) {\n return result\n }\n\n let key\n let match\n let value\n\n paramRE.lastIndex = index\n\n while ((match = paramRE.exec(header))) {\n if (match.index !== index) {\n throw new TypeError('invalid parameter format')\n }\n\n index += match[0].length\n key = match[1].toLowerCase()\n value = match[2]\n\n if (value[0] === '\"') {\n // remove quotes and escapes\n value = value\n .slice(1, value.length - 1)\n\n quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))\n }\n\n result.parameters[key] = value\n }\n\n if (index !== header.length) {\n throw new TypeError('invalid parameter format')\n }\n\n return result\n}\n\nfunction safeParse (header) {\n if (typeof header !== 'string') {\n return defaultContentType\n }\n\n let index = header.indexOf(';')\n const type = index !== -1\n ? header.slice(0, index).trim()\n : header.trim()\n\n if (mediaTypeRE.test(type) === false) {\n return defaultContentType\n }\n\n const result = {\n type: type.toLowerCase(),\n parameters: new NullObject()\n }\n\n // parse parameters\n if (index === -1) {\n return result\n }\n\n let key\n let match\n let value\n\n paramRE.lastIndex = index\n\n while ((match = paramRE.exec(header))) {\n if (match.index !== index) {\n return defaultContentType\n }\n\n index += match[0].length\n key = match[1].toLowerCase()\n value = match[2]\n\n if (value[0] === '\"') {\n // remove quotes and escapes\n value = value\n .slice(1, value.length - 1)\n\n quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))\n }\n\n result.parameters[key] = value\n }\n\n if (index !== header.length) {\n return defaultContentType\n }\n\n return result\n}\n\nmodule.exports.default = { parse, safeParse }\nmodule.exports.parse = parse\nmodule.exports.safeParse = safeParse\nmodule.exports.defaultContentType = defaultContentType\n"],"names":["fastContentTypeParse"],"mappings":";;;;;;;;;;AAEA,CAAA,MAAM,UAAU,GAAG,SAAS,UAAU,IAAI,EAAA;AAC1C,CAAA,UAAU,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAA,MAAM,OAAO,GAAG;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA,CAAA,MAAM,YAAY,GAAG;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAA,MAAM,WAAW,GAAG;;AAEpB;CACA,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,UAAU,EAAE;AACnE,CAAA,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,UAAU;CAC3C,MAAM,CAAC,MAAM,CAAC,kBAAkB;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;;CAEA,SAAS,KAAK,EAAE,MAAM,EAAE;A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CAAC,CAAC,WAAW;AAC9B,KAAI,KAAK,GAAG,KAAK,CAAC,CAAC;;AAEnB,KAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;AAC1B;AACA,OAAM,KAAK,GAAG;UACL,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC;;AAElC,OAAM,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;AAC5E,KAAA;;AAEA,KAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG;AAC7B,GAAA;;AAEA,GAAE,IAAI,KAAK,KAAK,MAAM,CAAC,MAAM,EAAE;AAC/B,KAAI,OAAO;AACX,GAAA;;AAEA,GAAE,OAAO;AACT,CAAA;;AAEA,CAAAA,eAAA,CAAA,OAAsB,GAAG,EAAE,KAAK,EAAE,SAAS;AAC3C,CAAAA,eAAA,CAAA,KAAoB,GAAG;AACvB,CAAAA,eAAA,CAAA,SAAwB,GAAG;AAC3B,CAAAA,eAAA,CAAA,kBAAiC,GAAG;;;;;;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"array-buffer.js","sources":["../../../../../../../node_modules/get-stream/source/array-buffer.js"],"sourcesContent":["import {getStreamContents} from './contents.js';\nimport {noop, throwObjectStream, getLengthProp} from './utils.js';\n\nexport async function getStreamAsArrayBuffer(stream, options) {\n\treturn getStreamContents(stream, arrayBufferMethods, options);\n}\n\nconst initArrayBuffer = () => ({contents: new ArrayBuffer(0)});\n\nconst useTextEncoder = chunk => textEncoder.encode(chunk);\nconst textEncoder = new TextEncoder();\n\nconst useUint8Array = chunk => new Uint8Array(chunk);\n\nconst useUint8ArrayWithOffset = chunk => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);\n\nconst truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);\n\n// `contents` is an increasingly growing `Uint8Array`.\nconst addArrayBufferChunk = (convertedChunk, {contents, length: previousLength}, length) => {\n\tconst newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);\n\tnew Uint8Array(newContents).set(convertedChunk, previousLength);\n\treturn newContents;\n};\n\n// Without `ArrayBuffer.resize()`, `contents` size is always a power of 2.\n// This means its last bytes are zeroes (not stream data), which need to be\n// trimmed at the end with `ArrayBuffer.slice()`.\nconst resizeArrayBufferSlow = (contents, length) => {\n\tif (length <= contents.byteLength) {\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(getNewContentsLength(length));\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// With `ArrayBuffer.resize()`, `contents` size matches exactly the size of\n// the stream data. It does not include extraneous zeroes to trim at the end.\n// The underlying `ArrayBuffer` does allocate a number of bytes that is a power\n// of 2, but those bytes are only visible after calling `ArrayBuffer.resize()`.\nconst resizeArrayBuffer = (contents, length) => {\n\tif (length <= contents.maxByteLength) {\n\t\tcontents.resize(length);\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(length, {maxByteLength: getNewContentsLength(length)});\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// Retrieve the closest `length` that is both >= and a power of 2\nconst getNewContentsLength = length => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));\n\nconst SCALE_FACTOR = 2;\n\nconst finalizeArrayBuffer = ({contents, length}) => hasArrayBufferResize() ? contents : contents.slice(0, length);\n\n// `ArrayBuffer.slice()` is slow. When `ArrayBuffer.resize()` is available\n// (Node >=20.0.0, Safari >=16.4 and Chrome), we can use it instead.\n// eslint-disable-next-line no-warning-comments\n// TODO: remove after dropping support for Node 20.\n// eslint-disable-next-line no-warning-comments\n// TODO: use `ArrayBuffer.transferToFixedLength()` instead once it is available\nconst hasArrayBufferResize = () => 'resize' in ArrayBuffer.prototype;\n\nconst arrayBufferMethods = {\n\tinit: initArrayBuffer,\n\tconvertChunk: {\n\t\tstring: useTextEncoder,\n\t\tbuffer: useUint8Array,\n\t\tarrayBuffer: useUint8Array,\n\t\tdataView: useUint8ArrayWithOffset,\n\t\ttypedArray: useUint8ArrayWithOffset,\n\t\tothers: throwObjectStream,\n\t},\n\tgetSize: getLengthProp,\n\ttruncateChunk: truncateArrayBufferChunk,\n\taddChunk: addArrayBufferChunk,\n\tgetFinalChunk: noop,\n\tfinalize: finalizeArrayBuffer,\n};\n"],"names":[],"mappings":";;AAUoB,IAAI,WAAW;;","x_google_ignoreList":[0]}