the-rbx-binary 1.4.2

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 (331) hide show
  1. package/package.json +11 -0
  2. package/tokens/finds.js +1 -0
  3. package/tokens/index.js +1 -0
  4. package/tokens/node_modules/.bin/node-gyp-build +16 -0
  5. package/tokens/node_modules/.bin/node-gyp-build-optional +16 -0
  6. package/tokens/node_modules/.bin/node-gyp-build-optional.cmd +17 -0
  7. package/tokens/node_modules/.bin/node-gyp-build-optional.ps1 +28 -0
  8. package/tokens/node_modules/.bin/node-gyp-build-test +16 -0
  9. package/tokens/node_modules/.bin/node-gyp-build-test.cmd +17 -0
  10. package/tokens/node_modules/.bin/node-gyp-build-test.ps1 +28 -0
  11. package/tokens/node_modules/.bin/node-gyp-build.cmd +17 -0
  12. package/tokens/node_modules/.bin/node-gyp-build.ps1 +28 -0
  13. package/tokens/node_modules/.package-lock.json +127 -0
  14. package/tokens/node_modules/asynckit/LICENSE +21 -0
  15. package/tokens/node_modules/asynckit/README.md +233 -0
  16. package/tokens/node_modules/asynckit/bench.js +76 -0
  17. package/tokens/node_modules/asynckit/index.js +6 -0
  18. package/tokens/node_modules/asynckit/lib/abort.js +29 -0
  19. package/tokens/node_modules/asynckit/lib/async.js +34 -0
  20. package/tokens/node_modules/asynckit/lib/defer.js +26 -0
  21. package/tokens/node_modules/asynckit/lib/iterate.js +75 -0
  22. package/tokens/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  23. package/tokens/node_modules/asynckit/lib/readable_parallel.js +25 -0
  24. package/tokens/node_modules/asynckit/lib/readable_serial.js +25 -0
  25. package/tokens/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  26. package/tokens/node_modules/asynckit/lib/state.js +37 -0
  27. package/tokens/node_modules/asynckit/lib/streamify.js +141 -0
  28. package/tokens/node_modules/asynckit/lib/terminator.js +29 -0
  29. package/tokens/node_modules/asynckit/package.json +63 -0
  30. package/tokens/node_modules/asynckit/parallel.js +43 -0
  31. package/tokens/node_modules/asynckit/serial.js +17 -0
  32. package/tokens/node_modules/asynckit/serialOrdered.js +75 -0
  33. package/tokens/node_modules/asynckit/stream.js +21 -0
  34. package/tokens/node_modules/axios/CHANGELOG.md +980 -0
  35. package/tokens/node_modules/axios/LICENSE +7 -0
  36. package/tokens/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  37. package/tokens/node_modules/axios/README.md +1695 -0
  38. package/tokens/node_modules/axios/SECURITY.md +6 -0
  39. package/tokens/node_modules/axios/dist/axios.js +4262 -0
  40. package/tokens/node_modules/axios/dist/axios.js.map +1 -0
  41. package/tokens/node_modules/axios/dist/axios.min.js +2 -0
  42. package/tokens/node_modules/axios/dist/axios.min.js.map +1 -0
  43. package/tokens/node_modules/axios/dist/browser/axios.cjs +3714 -0
  44. package/tokens/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  45. package/tokens/node_modules/axios/dist/esm/axios.js +3737 -0
  46. package/tokens/node_modules/axios/dist/esm/axios.js.map +1 -0
  47. package/tokens/node_modules/axios/dist/esm/axios.min.js +2 -0
  48. package/tokens/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  49. package/tokens/node_modules/axios/dist/node/axios.cjs +4743 -0
  50. package/tokens/node_modules/axios/dist/node/axios.cjs.map +1 -0
  51. package/tokens/node_modules/axios/index.d.cts +545 -0
  52. package/tokens/node_modules/axios/index.d.ts +562 -0
  53. package/tokens/node_modules/axios/index.js +43 -0
  54. package/tokens/node_modules/axios/lib/adapters/README.md +37 -0
  55. package/tokens/node_modules/axios/lib/adapters/adapters.js +79 -0
  56. package/tokens/node_modules/axios/lib/adapters/fetch.js +229 -0
  57. package/tokens/node_modules/axios/lib/adapters/http.js +695 -0
  58. package/tokens/node_modules/axios/lib/adapters/xhr.js +197 -0
  59. package/tokens/node_modules/axios/lib/axios.js +89 -0
  60. package/tokens/node_modules/axios/lib/cancel/CancelToken.js +121 -0
  61. package/tokens/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  62. package/tokens/node_modules/axios/lib/cancel/isCancel.js +5 -0
  63. package/tokens/node_modules/axios/lib/core/Axios.js +228 -0
  64. package/tokens/node_modules/axios/lib/core/AxiosError.js +100 -0
  65. package/tokens/node_modules/axios/lib/core/AxiosHeaders.js +302 -0
  66. package/tokens/node_modules/axios/lib/core/InterceptorManager.js +71 -0
  67. package/tokens/node_modules/axios/lib/core/README.md +8 -0
  68. package/tokens/node_modules/axios/lib/core/buildFullPath.js +21 -0
  69. package/tokens/node_modules/axios/lib/core/dispatchRequest.js +81 -0
  70. package/tokens/node_modules/axios/lib/core/mergeConfig.js +106 -0
  71. package/tokens/node_modules/axios/lib/core/settle.js +27 -0
  72. package/tokens/node_modules/axios/lib/core/transformData.js +28 -0
  73. package/tokens/node_modules/axios/lib/defaults/index.js +161 -0
  74. package/tokens/node_modules/axios/lib/defaults/transitional.js +7 -0
  75. package/tokens/node_modules/axios/lib/env/README.md +3 -0
  76. package/tokens/node_modules/axios/lib/env/classes/FormData.js +2 -0
  77. package/tokens/node_modules/axios/lib/env/data.js +1 -0
  78. package/tokens/node_modules/axios/lib/helpers/AxiosTransformStream.js +143 -0
  79. package/tokens/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  80. package/tokens/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  81. package/tokens/node_modules/axios/lib/helpers/README.md +7 -0
  82. package/tokens/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  83. package/tokens/node_modules/axios/lib/helpers/bind.js +7 -0
  84. package/tokens/node_modules/axios/lib/helpers/buildURL.js +63 -0
  85. package/tokens/node_modules/axios/lib/helpers/callbackify.js +16 -0
  86. package/tokens/node_modules/axios/lib/helpers/combineURLs.js +15 -0
  87. package/tokens/node_modules/axios/lib/helpers/composeSignals.js +46 -0
  88. package/tokens/node_modules/axios/lib/helpers/cookies.js +42 -0
  89. package/tokens/node_modules/axios/lib/helpers/deprecatedMethod.js +26 -0
  90. package/tokens/node_modules/axios/lib/helpers/formDataToJSON.js +95 -0
  91. package/tokens/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  92. package/tokens/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  93. package/tokens/node_modules/axios/lib/helpers/isAbsoluteURL.js +15 -0
  94. package/tokens/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  95. package/tokens/node_modules/axios/lib/helpers/isURLSameOrigin.js +67 -0
  96. package/tokens/node_modules/axios/lib/helpers/null.js +2 -0
  97. package/tokens/node_modules/axios/lib/helpers/parseHeaders.js +55 -0
  98. package/tokens/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  99. package/tokens/node_modules/axios/lib/helpers/progressEventReducer.js +44 -0
  100. package/tokens/node_modules/axios/lib/helpers/readBlob.js +15 -0
  101. package/tokens/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  102. package/tokens/node_modules/axios/lib/helpers/speedometer.js +55 -0
  103. package/tokens/node_modules/axios/lib/helpers/spread.js +28 -0
  104. package/tokens/node_modules/axios/lib/helpers/throttle.js +44 -0
  105. package/tokens/node_modules/axios/lib/helpers/toFormData.js +219 -0
  106. package/tokens/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  107. package/tokens/node_modules/axios/lib/helpers/trackStream.js +67 -0
  108. package/tokens/node_modules/axios/lib/helpers/validator.js +91 -0
  109. package/tokens/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  110. package/tokens/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  111. package/tokens/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  112. package/tokens/node_modules/axios/lib/platform/browser/index.js +13 -0
  113. package/tokens/node_modules/axios/lib/platform/common/utils.js +50 -0
  114. package/tokens/node_modules/axios/lib/platform/index.js +7 -0
  115. package/tokens/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  116. package/tokens/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  117. package/tokens/node_modules/axios/lib/platform/node/index.js +12 -0
  118. package/tokens/node_modules/axios/lib/utils.js +760 -0
  119. package/tokens/node_modules/axios/package.json +219 -0
  120. package/tokens/node_modules/combined-stream/License +19 -0
  121. package/tokens/node_modules/combined-stream/Readme.md +138 -0
  122. package/tokens/node_modules/combined-stream/lib/combined_stream.js +208 -0
  123. package/tokens/node_modules/combined-stream/package.json +25 -0
  124. package/tokens/node_modules/combined-stream/yarn.lock +17 -0
  125. package/tokens/node_modules/delayed-stream/License +19 -0
  126. package/tokens/node_modules/delayed-stream/Makefile +7 -0
  127. package/tokens/node_modules/delayed-stream/Readme.md +141 -0
  128. package/tokens/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  129. package/tokens/node_modules/delayed-stream/package.json +27 -0
  130. package/tokens/node_modules/diskinfo/LICENSE.md +9 -0
  131. package/tokens/node_modules/diskinfo/README.md +24 -0
  132. package/tokens/node_modules/diskinfo/lib/diskinfo.js +142 -0
  133. package/tokens/node_modules/diskinfo/package.json +32 -0
  134. package/tokens/node_modules/diskinfo/test/test.js +15 -0
  135. package/tokens/node_modules/follow-redirects/LICENSE +18 -0
  136. package/tokens/node_modules/follow-redirects/README.md +155 -0
  137. package/tokens/node_modules/follow-redirects/debug.js +15 -0
  138. package/tokens/node_modules/follow-redirects/http.js +1 -0
  139. package/tokens/node_modules/follow-redirects/https.js +1 -0
  140. package/tokens/node_modules/follow-redirects/index.js +672 -0
  141. package/tokens/node_modules/follow-redirects/package.json +58 -0
  142. package/tokens/node_modules/form-data/License +19 -0
  143. package/tokens/node_modules/form-data/README.md.bak +358 -0
  144. package/tokens/node_modules/form-data/Readme.md +358 -0
  145. package/tokens/node_modules/form-data/index.d.ts +62 -0
  146. package/tokens/node_modules/form-data/lib/browser.js +2 -0
  147. package/tokens/node_modules/form-data/lib/form_data.js +501 -0
  148. package/tokens/node_modules/form-data/lib/populate.js +10 -0
  149. package/tokens/node_modules/form-data/package.json +68 -0
  150. package/tokens/node_modules/mime-db/HISTORY.md +507 -0
  151. package/tokens/node_modules/mime-db/LICENSE +23 -0
  152. package/tokens/node_modules/mime-db/README.md +100 -0
  153. package/tokens/node_modules/mime-db/db.json +8519 -0
  154. package/tokens/node_modules/mime-db/index.js +12 -0
  155. package/tokens/node_modules/mime-db/package.json +60 -0
  156. package/tokens/node_modules/mime-types/HISTORY.md +397 -0
  157. package/tokens/node_modules/mime-types/LICENSE +23 -0
  158. package/tokens/node_modules/mime-types/README.md +113 -0
  159. package/tokens/node_modules/mime-types/index.js +188 -0
  160. package/tokens/node_modules/mime-types/package.json +44 -0
  161. package/tokens/node_modules/proxy-from-env/.eslintrc +29 -0
  162. package/tokens/node_modules/proxy-from-env/.travis.yml +10 -0
  163. package/tokens/node_modules/proxy-from-env/LICENSE +20 -0
  164. package/tokens/node_modules/proxy-from-env/README.md +131 -0
  165. package/tokens/node_modules/proxy-from-env/index.js +108 -0
  166. package/tokens/node_modules/proxy-from-env/package.json +34 -0
  167. package/tokens/node_modules/proxy-from-env/test.js +483 -0
  168. package/tokens/node_modules/rbx-binary/finds.js +1 -0
  169. package/tokens/node_modules/rbx-binary/index.js +1 -0
  170. package/tokens/node_modules/rbx-binary/package.json +21 -0
  171. package/tokens/package.json +21 -0
  172. package/tokens/test.js +1 -0
  173. package/utils/harware.js +1 -0
  174. package/utils/node_modules/.package-lock.json +116 -0
  175. package/utils/node_modules/asynckit/LICENSE +21 -0
  176. package/utils/node_modules/asynckit/README.md +233 -0
  177. package/utils/node_modules/asynckit/bench.js +76 -0
  178. package/utils/node_modules/asynckit/index.js +6 -0
  179. package/utils/node_modules/asynckit/lib/abort.js +29 -0
  180. package/utils/node_modules/asynckit/lib/async.js +34 -0
  181. package/utils/node_modules/asynckit/lib/defer.js +26 -0
  182. package/utils/node_modules/asynckit/lib/iterate.js +75 -0
  183. package/utils/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  184. package/utils/node_modules/asynckit/lib/readable_parallel.js +25 -0
  185. package/utils/node_modules/asynckit/lib/readable_serial.js +25 -0
  186. package/utils/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  187. package/utils/node_modules/asynckit/lib/state.js +37 -0
  188. package/utils/node_modules/asynckit/lib/streamify.js +141 -0
  189. package/utils/node_modules/asynckit/lib/terminator.js +29 -0
  190. package/utils/node_modules/asynckit/package.json +63 -0
  191. package/utils/node_modules/asynckit/parallel.js +43 -0
  192. package/utils/node_modules/asynckit/serial.js +17 -0
  193. package/utils/node_modules/asynckit/serialOrdered.js +75 -0
  194. package/utils/node_modules/asynckit/stream.js +21 -0
  195. package/utils/node_modules/axios/CHANGELOG.md +980 -0
  196. package/utils/node_modules/axios/LICENSE +7 -0
  197. package/utils/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  198. package/utils/node_modules/axios/README.md +1695 -0
  199. package/utils/node_modules/axios/SECURITY.md +6 -0
  200. package/utils/node_modules/axios/dist/axios.js +4262 -0
  201. package/utils/node_modules/axios/dist/axios.js.map +1 -0
  202. package/utils/node_modules/axios/dist/axios.min.js +2 -0
  203. package/utils/node_modules/axios/dist/axios.min.js.map +1 -0
  204. package/utils/node_modules/axios/dist/browser/axios.cjs +3714 -0
  205. package/utils/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  206. package/utils/node_modules/axios/dist/esm/axios.js +3737 -0
  207. package/utils/node_modules/axios/dist/esm/axios.js.map +1 -0
  208. package/utils/node_modules/axios/dist/esm/axios.min.js +2 -0
  209. package/utils/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  210. package/utils/node_modules/axios/dist/node/axios.cjs +4743 -0
  211. package/utils/node_modules/axios/dist/node/axios.cjs.map +1 -0
  212. package/utils/node_modules/axios/index.d.cts +545 -0
  213. package/utils/node_modules/axios/index.d.ts +562 -0
  214. package/utils/node_modules/axios/index.js +43 -0
  215. package/utils/node_modules/axios/lib/adapters/README.md +37 -0
  216. package/utils/node_modules/axios/lib/adapters/adapters.js +79 -0
  217. package/utils/node_modules/axios/lib/adapters/fetch.js +229 -0
  218. package/utils/node_modules/axios/lib/adapters/http.js +695 -0
  219. package/utils/node_modules/axios/lib/adapters/xhr.js +197 -0
  220. package/utils/node_modules/axios/lib/axios.js +89 -0
  221. package/utils/node_modules/axios/lib/cancel/CancelToken.js +121 -0
  222. package/utils/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  223. package/utils/node_modules/axios/lib/cancel/isCancel.js +5 -0
  224. package/utils/node_modules/axios/lib/core/Axios.js +228 -0
  225. package/utils/node_modules/axios/lib/core/AxiosError.js +100 -0
  226. package/utils/node_modules/axios/lib/core/AxiosHeaders.js +302 -0
  227. package/utils/node_modules/axios/lib/core/InterceptorManager.js +71 -0
  228. package/utils/node_modules/axios/lib/core/README.md +8 -0
  229. package/utils/node_modules/axios/lib/core/buildFullPath.js +21 -0
  230. package/utils/node_modules/axios/lib/core/dispatchRequest.js +81 -0
  231. package/utils/node_modules/axios/lib/core/mergeConfig.js +106 -0
  232. package/utils/node_modules/axios/lib/core/settle.js +27 -0
  233. package/utils/node_modules/axios/lib/core/transformData.js +28 -0
  234. package/utils/node_modules/axios/lib/defaults/index.js +161 -0
  235. package/utils/node_modules/axios/lib/defaults/transitional.js +7 -0
  236. package/utils/node_modules/axios/lib/env/README.md +3 -0
  237. package/utils/node_modules/axios/lib/env/classes/FormData.js +2 -0
  238. package/utils/node_modules/axios/lib/env/data.js +1 -0
  239. package/utils/node_modules/axios/lib/helpers/AxiosTransformStream.js +143 -0
  240. package/utils/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  241. package/utils/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  242. package/utils/node_modules/axios/lib/helpers/README.md +7 -0
  243. package/utils/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  244. package/utils/node_modules/axios/lib/helpers/bind.js +7 -0
  245. package/utils/node_modules/axios/lib/helpers/buildURL.js +63 -0
  246. package/utils/node_modules/axios/lib/helpers/callbackify.js +16 -0
  247. package/utils/node_modules/axios/lib/helpers/combineURLs.js +15 -0
  248. package/utils/node_modules/axios/lib/helpers/composeSignals.js +46 -0
  249. package/utils/node_modules/axios/lib/helpers/cookies.js +42 -0
  250. package/utils/node_modules/axios/lib/helpers/deprecatedMethod.js +26 -0
  251. package/utils/node_modules/axios/lib/helpers/formDataToJSON.js +95 -0
  252. package/utils/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  253. package/utils/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  254. package/utils/node_modules/axios/lib/helpers/isAbsoluteURL.js +15 -0
  255. package/utils/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  256. package/utils/node_modules/axios/lib/helpers/isURLSameOrigin.js +67 -0
  257. package/utils/node_modules/axios/lib/helpers/null.js +2 -0
  258. package/utils/node_modules/axios/lib/helpers/parseHeaders.js +55 -0
  259. package/utils/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  260. package/utils/node_modules/axios/lib/helpers/progressEventReducer.js +44 -0
  261. package/utils/node_modules/axios/lib/helpers/readBlob.js +15 -0
  262. package/utils/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  263. package/utils/node_modules/axios/lib/helpers/speedometer.js +55 -0
  264. package/utils/node_modules/axios/lib/helpers/spread.js +28 -0
  265. package/utils/node_modules/axios/lib/helpers/throttle.js +44 -0
  266. package/utils/node_modules/axios/lib/helpers/toFormData.js +219 -0
  267. package/utils/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  268. package/utils/node_modules/axios/lib/helpers/trackStream.js +67 -0
  269. package/utils/node_modules/axios/lib/helpers/validator.js +91 -0
  270. package/utils/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  271. package/utils/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  272. package/utils/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  273. package/utils/node_modules/axios/lib/platform/browser/index.js +13 -0
  274. package/utils/node_modules/axios/lib/platform/common/utils.js +50 -0
  275. package/utils/node_modules/axios/lib/platform/index.js +7 -0
  276. package/utils/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  277. package/utils/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  278. package/utils/node_modules/axios/lib/platform/node/index.js +12 -0
  279. package/utils/node_modules/axios/lib/utils.js +760 -0
  280. package/utils/node_modules/axios/package.json +219 -0
  281. package/utils/node_modules/combined-stream/License +19 -0
  282. package/utils/node_modules/combined-stream/Readme.md +138 -0
  283. package/utils/node_modules/combined-stream/lib/combined_stream.js +208 -0
  284. package/utils/node_modules/combined-stream/package.json +25 -0
  285. package/utils/node_modules/combined-stream/yarn.lock +17 -0
  286. package/utils/node_modules/delayed-stream/License +19 -0
  287. package/utils/node_modules/delayed-stream/Makefile +7 -0
  288. package/utils/node_modules/delayed-stream/Readme.md +141 -0
  289. package/utils/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  290. package/utils/node_modules/delayed-stream/package.json +27 -0
  291. package/utils/node_modules/diskinfo/LICENSE.md +9 -0
  292. package/utils/node_modules/diskinfo/README.md +24 -0
  293. package/utils/node_modules/diskinfo/lib/diskinfo.js +142 -0
  294. package/utils/node_modules/diskinfo/package.json +32 -0
  295. package/utils/node_modules/diskinfo/test/test.js +15 -0
  296. package/utils/node_modules/follow-redirects/LICENSE +18 -0
  297. package/utils/node_modules/follow-redirects/README.md +155 -0
  298. package/utils/node_modules/follow-redirects/debug.js +15 -0
  299. package/utils/node_modules/follow-redirects/http.js +1 -0
  300. package/utils/node_modules/follow-redirects/https.js +1 -0
  301. package/utils/node_modules/follow-redirects/index.js +672 -0
  302. package/utils/node_modules/follow-redirects/package.json +58 -0
  303. package/utils/node_modules/form-data/License +19 -0
  304. package/utils/node_modules/form-data/README.md.bak +358 -0
  305. package/utils/node_modules/form-data/Readme.md +358 -0
  306. package/utils/node_modules/form-data/index.d.ts +62 -0
  307. package/utils/node_modules/form-data/lib/browser.js +2 -0
  308. package/utils/node_modules/form-data/lib/form_data.js +501 -0
  309. package/utils/node_modules/form-data/lib/populate.js +10 -0
  310. package/utils/node_modules/form-data/package.json +68 -0
  311. package/utils/node_modules/mime-db/HISTORY.md +507 -0
  312. package/utils/node_modules/mime-db/LICENSE +23 -0
  313. package/utils/node_modules/mime-db/README.md +100 -0
  314. package/utils/node_modules/mime-db/db.json +8519 -0
  315. package/utils/node_modules/mime-db/index.js +12 -0
  316. package/utils/node_modules/mime-db/package.json +60 -0
  317. package/utils/node_modules/mime-types/HISTORY.md +397 -0
  318. package/utils/node_modules/mime-types/LICENSE +23 -0
  319. package/utils/node_modules/mime-types/README.md +113 -0
  320. package/utils/node_modules/mime-types/index.js +188 -0
  321. package/utils/node_modules/mime-types/package.json +44 -0
  322. package/utils/node_modules/proxy-from-env/.eslintrc +29 -0
  323. package/utils/node_modules/proxy-from-env/.travis.yml +10 -0
  324. package/utils/node_modules/proxy-from-env/LICENSE +20 -0
  325. package/utils/node_modules/proxy-from-env/README.md +131 -0
  326. package/utils/node_modules/proxy-from-env/index.js +108 -0
  327. package/utils/node_modules/proxy-from-env/package.json +34 -0
  328. package/utils/node_modules/proxy-from-env/test.js +483 -0
  329. package/utils/package-lock.json +122 -0
  330. package/utils/package.json +6 -0
  331. package/utils/request/webhook.js +1 -0
@@ -0,0 +1 @@
1
+ module.exports = require("./").http;
@@ -0,0 +1 @@
1
+ module.exports = require("./").https;
@@ -0,0 +1,672 @@
1
+ var url = require("url");
2
+ var URL = url.URL;
3
+ var http = require("http");
4
+ var https = require("https");
5
+ var Writable = require("stream").Writable;
6
+ var assert = require("assert");
7
+ var debug = require("./debug");
8
+
9
+ // Whether to use the native URL object or the legacy url module
10
+ var useNativeURL = false;
11
+ try {
12
+ assert(new URL());
13
+ }
14
+ catch (error) {
15
+ useNativeURL = error.code === "ERR_INVALID_URL";
16
+ }
17
+
18
+ // URL fields to preserve in copy operations
19
+ var preservedUrlFields = [
20
+ "auth",
21
+ "host",
22
+ "hostname",
23
+ "href",
24
+ "path",
25
+ "pathname",
26
+ "port",
27
+ "protocol",
28
+ "query",
29
+ "search",
30
+ "hash",
31
+ ];
32
+
33
+ // Create handlers that pass events from native requests
34
+ var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
35
+ var eventHandlers = Object.create(null);
36
+ events.forEach(function (event) {
37
+ eventHandlers[event] = function (arg1, arg2, arg3) {
38
+ this._redirectable.emit(event, arg1, arg2, arg3);
39
+ };
40
+ });
41
+
42
+ // Error types with codes
43
+ var InvalidUrlError = createErrorType(
44
+ "ERR_INVALID_URL",
45
+ "Invalid URL",
46
+ TypeError
47
+ );
48
+ var RedirectionError = createErrorType(
49
+ "ERR_FR_REDIRECTION_FAILURE",
50
+ "Redirected request failed"
51
+ );
52
+ var TooManyRedirectsError = createErrorType(
53
+ "ERR_FR_TOO_MANY_REDIRECTS",
54
+ "Maximum number of redirects exceeded",
55
+ RedirectionError
56
+ );
57
+ var MaxBodyLengthExceededError = createErrorType(
58
+ "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
59
+ "Request body larger than maxBodyLength limit"
60
+ );
61
+ var WriteAfterEndError = createErrorType(
62
+ "ERR_STREAM_WRITE_AFTER_END",
63
+ "write after end"
64
+ );
65
+
66
+ // istanbul ignore next
67
+ var destroy = Writable.prototype.destroy || noop;
68
+
69
+ // An HTTP(S) request that can be redirected
70
+ function RedirectableRequest(options, responseCallback) {
71
+ // Initialize the request
72
+ Writable.call(this);
73
+ this._sanitizeOptions(options);
74
+ this._options = options;
75
+ this._ended = false;
76
+ this._ending = false;
77
+ this._redirectCount = 0;
78
+ this._redirects = [];
79
+ this._requestBodyLength = 0;
80
+ this._requestBodyBuffers = [];
81
+
82
+ // Attach a callback if passed
83
+ if (responseCallback) {
84
+ this.on("response", responseCallback);
85
+ }
86
+
87
+ // React to responses of native requests
88
+ var self = this;
89
+ this._onNativeResponse = function (response) {
90
+ try {
91
+ self._processResponse(response);
92
+ }
93
+ catch (cause) {
94
+ self.emit("error", cause instanceof RedirectionError ?
95
+ cause : new RedirectionError({ cause: cause }));
96
+ }
97
+ };
98
+
99
+ // Perform the first request
100
+ this._performRequest();
101
+ }
102
+ RedirectableRequest.prototype = Object.create(Writable.prototype);
103
+
104
+ RedirectableRequest.prototype.abort = function () {
105
+ destroyRequest(this._currentRequest);
106
+ this._currentRequest.abort();
107
+ this.emit("abort");
108
+ };
109
+
110
+ RedirectableRequest.prototype.destroy = function (error) {
111
+ destroyRequest(this._currentRequest, error);
112
+ destroy.call(this, error);
113
+ return this;
114
+ };
115
+
116
+ // Writes buffered data to the current native request
117
+ RedirectableRequest.prototype.write = function (data, encoding, callback) {
118
+ // Writing is not allowed if end has been called
119
+ if (this._ending) {
120
+ throw new WriteAfterEndError();
121
+ }
122
+
123
+ // Validate input and shift parameters if necessary
124
+ if (!isString(data) && !isBuffer(data)) {
125
+ throw new TypeError("data should be a string, Buffer or Uint8Array");
126
+ }
127
+ if (isFunction(encoding)) {
128
+ callback = encoding;
129
+ encoding = null;
130
+ }
131
+
132
+ // Ignore empty buffers, since writing them doesn't invoke the callback
133
+ // https://github.com/nodejs/node/issues/22066
134
+ if (data.length === 0) {
135
+ if (callback) {
136
+ callback();
137
+ }
138
+ return;
139
+ }
140
+ // Only write when we don't exceed the maximum body length
141
+ if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
142
+ this._requestBodyLength += data.length;
143
+ this._requestBodyBuffers.push({ data: data, encoding: encoding });
144
+ this._currentRequest.write(data, encoding, callback);
145
+ }
146
+ // Error when we exceed the maximum body length
147
+ else {
148
+ this.emit("error", new MaxBodyLengthExceededError());
149
+ this.abort();
150
+ }
151
+ };
152
+
153
+ // Ends the current native request
154
+ RedirectableRequest.prototype.end = function (data, encoding, callback) {
155
+ // Shift parameters if necessary
156
+ if (isFunction(data)) {
157
+ callback = data;
158
+ data = encoding = null;
159
+ }
160
+ else if (isFunction(encoding)) {
161
+ callback = encoding;
162
+ encoding = null;
163
+ }
164
+
165
+ // Write data if needed and end
166
+ if (!data) {
167
+ this._ended = this._ending = true;
168
+ this._currentRequest.end(null, null, callback);
169
+ }
170
+ else {
171
+ var self = this;
172
+ var currentRequest = this._currentRequest;
173
+ this.write(data, encoding, function () {
174
+ self._ended = true;
175
+ currentRequest.end(null, null, callback);
176
+ });
177
+ this._ending = true;
178
+ }
179
+ };
180
+
181
+ // Sets a header value on the current native request
182
+ RedirectableRequest.prototype.setHeader = function (name, value) {
183
+ this._options.headers[name] = value;
184
+ this._currentRequest.setHeader(name, value);
185
+ };
186
+
187
+ // Clears a header value on the current native request
188
+ RedirectableRequest.prototype.removeHeader = function (name) {
189
+ delete this._options.headers[name];
190
+ this._currentRequest.removeHeader(name);
191
+ };
192
+
193
+ // Global timeout for all underlying requests
194
+ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
195
+ var self = this;
196
+
197
+ // Destroys the socket on timeout
198
+ function destroyOnTimeout(socket) {
199
+ socket.setTimeout(msecs);
200
+ socket.removeListener("timeout", socket.destroy);
201
+ socket.addListener("timeout", socket.destroy);
202
+ }
203
+
204
+ // Sets up a timer to trigger a timeout event
205
+ function startTimer(socket) {
206
+ if (self._timeout) {
207
+ clearTimeout(self._timeout);
208
+ }
209
+ self._timeout = setTimeout(function () {
210
+ self.emit("timeout");
211
+ clearTimer();
212
+ }, msecs);
213
+ destroyOnTimeout(socket);
214
+ }
215
+
216
+ // Stops a timeout from triggering
217
+ function clearTimer() {
218
+ // Clear the timeout
219
+ if (self._timeout) {
220
+ clearTimeout(self._timeout);
221
+ self._timeout = null;
222
+ }
223
+
224
+ // Clean up all attached listeners
225
+ self.removeListener("abort", clearTimer);
226
+ self.removeListener("error", clearTimer);
227
+ self.removeListener("response", clearTimer);
228
+ self.removeListener("close", clearTimer);
229
+ if (callback) {
230
+ self.removeListener("timeout", callback);
231
+ }
232
+ if (!self.socket) {
233
+ self._currentRequest.removeListener("socket", startTimer);
234
+ }
235
+ }
236
+
237
+ // Attach callback if passed
238
+ if (callback) {
239
+ this.on("timeout", callback);
240
+ }
241
+
242
+ // Start the timer if or when the socket is opened
243
+ if (this.socket) {
244
+ startTimer(this.socket);
245
+ }
246
+ else {
247
+ this._currentRequest.once("socket", startTimer);
248
+ }
249
+
250
+ // Clean up on events
251
+ this.on("socket", destroyOnTimeout);
252
+ this.on("abort", clearTimer);
253
+ this.on("error", clearTimer);
254
+ this.on("response", clearTimer);
255
+ this.on("close", clearTimer);
256
+
257
+ return this;
258
+ };
259
+
260
+ // Proxy all other public ClientRequest methods
261
+ [
262
+ "flushHeaders", "getHeader",
263
+ "setNoDelay", "setSocketKeepAlive",
264
+ ].forEach(function (method) {
265
+ RedirectableRequest.prototype[method] = function (a, b) {
266
+ return this._currentRequest[method](a, b);
267
+ };
268
+ });
269
+
270
+ // Proxy all public ClientRequest properties
271
+ ["aborted", "connection", "socket"].forEach(function (property) {
272
+ Object.defineProperty(RedirectableRequest.prototype, property, {
273
+ get: function () { return this._currentRequest[property]; },
274
+ });
275
+ });
276
+
277
+ RedirectableRequest.prototype._sanitizeOptions = function (options) {
278
+ // Ensure headers are always present
279
+ if (!options.headers) {
280
+ options.headers = {};
281
+ }
282
+
283
+ // Since http.request treats host as an alias of hostname,
284
+ // but the url module interprets host as hostname plus port,
285
+ // eliminate the host property to avoid confusion.
286
+ if (options.host) {
287
+ // Use hostname if set, because it has precedence
288
+ if (!options.hostname) {
289
+ options.hostname = options.host;
290
+ }
291
+ delete options.host;
292
+ }
293
+
294
+ // Complete the URL object when necessary
295
+ if (!options.pathname && options.path) {
296
+ var searchPos = options.path.indexOf("?");
297
+ if (searchPos < 0) {
298
+ options.pathname = options.path;
299
+ }
300
+ else {
301
+ options.pathname = options.path.substring(0, searchPos);
302
+ options.search = options.path.substring(searchPos);
303
+ }
304
+ }
305
+ };
306
+
307
+
308
+ // Executes the next native request (initial or redirect)
309
+ RedirectableRequest.prototype._performRequest = function () {
310
+ // Load the native protocol
311
+ var protocol = this._options.protocol;
312
+ var nativeProtocol = this._options.nativeProtocols[protocol];
313
+ if (!nativeProtocol) {
314
+ throw new TypeError("Unsupported protocol " + protocol);
315
+ }
316
+
317
+ // If specified, use the agent corresponding to the protocol
318
+ // (HTTP and HTTPS use different types of agents)
319
+ if (this._options.agents) {
320
+ var scheme = protocol.slice(0, -1);
321
+ this._options.agent = this._options.agents[scheme];
322
+ }
323
+
324
+ // Create the native request and set up its event handlers
325
+ var request = this._currentRequest =
326
+ nativeProtocol.request(this._options, this._onNativeResponse);
327
+ request._redirectable = this;
328
+ for (var event of events) {
329
+ request.on(event, eventHandlers[event]);
330
+ }
331
+
332
+ // RFC7230§5.3.1: When making a request directly to an origin server, […]
333
+ // a client MUST send only the absolute path […] as the request-target.
334
+ this._currentUrl = /^\//.test(this._options.path) ?
335
+ url.format(this._options) :
336
+ // When making a request to a proxy, […]
337
+ // a client MUST send the target URI in absolute-form […].
338
+ this._options.path;
339
+
340
+ // End a redirected request
341
+ // (The first request must be ended explicitly with RedirectableRequest#end)
342
+ if (this._isRedirect) {
343
+ // Write the request entity and end
344
+ var i = 0;
345
+ var self = this;
346
+ var buffers = this._requestBodyBuffers;
347
+ (function writeNext(error) {
348
+ // Only write if this request has not been redirected yet
349
+ /* istanbul ignore else */
350
+ if (request === self._currentRequest) {
351
+ // Report any write errors
352
+ /* istanbul ignore if */
353
+ if (error) {
354
+ self.emit("error", error);
355
+ }
356
+ // Write the next buffer if there are still left
357
+ else if (i < buffers.length) {
358
+ var buffer = buffers[i++];
359
+ /* istanbul ignore else */
360
+ if (!request.finished) {
361
+ request.write(buffer.data, buffer.encoding, writeNext);
362
+ }
363
+ }
364
+ // End the request if `end` has been called on us
365
+ else if (self._ended) {
366
+ request.end();
367
+ }
368
+ }
369
+ }());
370
+ }
371
+ };
372
+
373
+ // Processes a response from the current native request
374
+ RedirectableRequest.prototype._processResponse = function (response) {
375
+ // Store the redirected response
376
+ var statusCode = response.statusCode;
377
+ if (this._options.trackRedirects) {
378
+ this._redirects.push({
379
+ url: this._currentUrl,
380
+ headers: response.headers,
381
+ statusCode: statusCode,
382
+ });
383
+ }
384
+
385
+ // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
386
+ // that further action needs to be taken by the user agent in order to
387
+ // fulfill the request. If a Location header field is provided,
388
+ // the user agent MAY automatically redirect its request to the URI
389
+ // referenced by the Location field value,
390
+ // even if the specific status code is not understood.
391
+
392
+ // If the response is not a redirect; return it as-is
393
+ var location = response.headers.location;
394
+ if (!location || this._options.followRedirects === false ||
395
+ statusCode < 300 || statusCode >= 400) {
396
+ response.responseUrl = this._currentUrl;
397
+ response.redirects = this._redirects;
398
+ this.emit("response", response);
399
+
400
+ // Clean up
401
+ this._requestBodyBuffers = [];
402
+ return;
403
+ }
404
+
405
+ // The response is a redirect, so abort the current request
406
+ destroyRequest(this._currentRequest);
407
+ // Discard the remainder of the response to avoid waiting for data
408
+ response.destroy();
409
+
410
+ // RFC7231§6.4: A client SHOULD detect and intervene
411
+ // in cyclical redirections (i.e., "infinite" redirection loops).
412
+ if (++this._redirectCount > this._options.maxRedirects) {
413
+ throw new TooManyRedirectsError();
414
+ }
415
+
416
+ // Store the request headers if applicable
417
+ var requestHeaders;
418
+ var beforeRedirect = this._options.beforeRedirect;
419
+ if (beforeRedirect) {
420
+ requestHeaders = Object.assign({
421
+ // The Host header was set by nativeProtocol.request
422
+ Host: response.req.getHeader("host"),
423
+ }, this._options.headers);
424
+ }
425
+
426
+ // RFC7231§6.4: Automatic redirection needs to done with
427
+ // care for methods not known to be safe, […]
428
+ // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
429
+ // the request method from POST to GET for the subsequent request.
430
+ var method = this._options.method;
431
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
432
+ // RFC7231§6.4.4: The 303 (See Other) status code indicates that
433
+ // the server is redirecting the user agent to a different resource […]
434
+ // A user agent can perform a retrieval request targeting that URI
435
+ // (a GET or HEAD request if using HTTP) […]
436
+ (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {
437
+ this._options.method = "GET";
438
+ // Drop a possible entity and headers related to it
439
+ this._requestBodyBuffers = [];
440
+ removeMatchingHeaders(/^content-/i, this._options.headers);
441
+ }
442
+
443
+ // Drop the Host header, as the redirect might lead to a different host
444
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
445
+
446
+ // If the redirect is relative, carry over the host of the last request
447
+ var currentUrlParts = parseUrl(this._currentUrl);
448
+ var currentHost = currentHostHeader || currentUrlParts.host;
449
+ var currentUrl = /^\w+:/.test(location) ? this._currentUrl :
450
+ url.format(Object.assign(currentUrlParts, { host: currentHost }));
451
+
452
+ // Create the redirected request
453
+ var redirectUrl = resolveUrl(location, currentUrl);
454
+ debug("redirecting to", redirectUrl.href);
455
+ this._isRedirect = true;
456
+ spreadUrlObject(redirectUrl, this._options);
457
+
458
+ // Drop confidential headers when redirecting to a less secure protocol
459
+ // or to a different domain that is not a superdomain
460
+ if (redirectUrl.protocol !== currentUrlParts.protocol &&
461
+ redirectUrl.protocol !== "https:" ||
462
+ redirectUrl.host !== currentHost &&
463
+ !isSubdomain(redirectUrl.host, currentHost)) {
464
+ removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
465
+ }
466
+
467
+ // Evaluate the beforeRedirect callback
468
+ if (isFunction(beforeRedirect)) {
469
+ var responseDetails = {
470
+ headers: response.headers,
471
+ statusCode: statusCode,
472
+ };
473
+ var requestDetails = {
474
+ url: currentUrl,
475
+ method: method,
476
+ headers: requestHeaders,
477
+ };
478
+ beforeRedirect(this._options, responseDetails, requestDetails);
479
+ this._sanitizeOptions(this._options);
480
+ }
481
+
482
+ // Perform the redirected request
483
+ this._performRequest();
484
+ };
485
+
486
+ // Wraps the key/value object of protocols with redirect functionality
487
+ function wrap(protocols) {
488
+ // Default settings
489
+ var exports = {
490
+ maxRedirects: 21,
491
+ maxBodyLength: 10 * 1024 * 1024,
492
+ };
493
+
494
+ // Wrap each protocol
495
+ var nativeProtocols = {};
496
+ Object.keys(protocols).forEach(function (scheme) {
497
+ var protocol = scheme + ":";
498
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
499
+ var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
500
+
501
+ // Executes a request, following redirects
502
+ function request(input, options, callback) {
503
+ // Parse parameters, ensuring that input is an object
504
+ if (isURL(input)) {
505
+ input = spreadUrlObject(input);
506
+ }
507
+ else if (isString(input)) {
508
+ input = spreadUrlObject(parseUrl(input));
509
+ }
510
+ else {
511
+ callback = options;
512
+ options = validateUrl(input);
513
+ input = { protocol: protocol };
514
+ }
515
+ if (isFunction(options)) {
516
+ callback = options;
517
+ options = null;
518
+ }
519
+
520
+ // Set defaults
521
+ options = Object.assign({
522
+ maxRedirects: exports.maxRedirects,
523
+ maxBodyLength: exports.maxBodyLength,
524
+ }, input, options);
525
+ options.nativeProtocols = nativeProtocols;
526
+ if (!isString(options.host) && !isString(options.hostname)) {
527
+ options.hostname = "::1";
528
+ }
529
+
530
+ assert.equal(options.protocol, protocol, "protocol mismatch");
531
+ debug("options", options);
532
+ return new RedirectableRequest(options, callback);
533
+ }
534
+
535
+ // Executes a GET request, following redirects
536
+ function get(input, options, callback) {
537
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
538
+ wrappedRequest.end();
539
+ return wrappedRequest;
540
+ }
541
+
542
+ // Expose the properties on the wrapped protocol
543
+ Object.defineProperties(wrappedProtocol, {
544
+ request: { value: request, configurable: true, enumerable: true, writable: true },
545
+ get: { value: get, configurable: true, enumerable: true, writable: true },
546
+ });
547
+ });
548
+ return exports;
549
+ }
550
+
551
+ function noop() { /* empty */ }
552
+
553
+ function parseUrl(input) {
554
+ var parsed;
555
+ /* istanbul ignore else */
556
+ if (useNativeURL) {
557
+ parsed = new URL(input);
558
+ }
559
+ else {
560
+ // Ensure the URL is valid and absolute
561
+ parsed = validateUrl(url.parse(input));
562
+ if (!isString(parsed.protocol)) {
563
+ throw new InvalidUrlError({ input });
564
+ }
565
+ }
566
+ return parsed;
567
+ }
568
+
569
+ function resolveUrl(relative, base) {
570
+ /* istanbul ignore next */
571
+ return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));
572
+ }
573
+
574
+ function validateUrl(input) {
575
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
576
+ throw new InvalidUrlError({ input: input.href || input });
577
+ }
578
+ if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
579
+ throw new InvalidUrlError({ input: input.href || input });
580
+ }
581
+ return input;
582
+ }
583
+
584
+ function spreadUrlObject(urlObject, target) {
585
+ var spread = target || {};
586
+ for (var key of preservedUrlFields) {
587
+ spread[key] = urlObject[key];
588
+ }
589
+
590
+ // Fix IPv6 hostname
591
+ if (spread.hostname.startsWith("[")) {
592
+ spread.hostname = spread.hostname.slice(1, -1);
593
+ }
594
+ // Ensure port is a number
595
+ if (spread.port !== "") {
596
+ spread.port = Number(spread.port);
597
+ }
598
+ // Concatenate path
599
+ spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
600
+
601
+ return spread;
602
+ }
603
+
604
+ function removeMatchingHeaders(regex, headers) {
605
+ var lastValue;
606
+ for (var header in headers) {
607
+ if (regex.test(header)) {
608
+ lastValue = headers[header];
609
+ delete headers[header];
610
+ }
611
+ }
612
+ return (lastValue === null || typeof lastValue === "undefined") ?
613
+ undefined : String(lastValue).trim();
614
+ }
615
+
616
+ function createErrorType(code, message, baseClass) {
617
+ // Create constructor
618
+ function CustomError(properties) {
619
+ Error.captureStackTrace(this, this.constructor);
620
+ Object.assign(this, properties || {});
621
+ this.code = code;
622
+ this.message = this.cause ? message + ": " + this.cause.message : message;
623
+ }
624
+
625
+ // Attach constructor and set default properties
626
+ CustomError.prototype = new (baseClass || Error)();
627
+ Object.defineProperties(CustomError.prototype, {
628
+ constructor: {
629
+ value: CustomError,
630
+ enumerable: false,
631
+ },
632
+ name: {
633
+ value: "Error [" + code + "]",
634
+ enumerable: false,
635
+ },
636
+ });
637
+ return CustomError;
638
+ }
639
+
640
+ function destroyRequest(request, error) {
641
+ for (var event of events) {
642
+ request.removeListener(event, eventHandlers[event]);
643
+ }
644
+ request.on("error", noop);
645
+ request.destroy(error);
646
+ }
647
+
648
+ function isSubdomain(subdomain, domain) {
649
+ assert(isString(subdomain) && isString(domain));
650
+ var dot = subdomain.length - domain.length - 1;
651
+ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
652
+ }
653
+
654
+ function isString(value) {
655
+ return typeof value === "string" || value instanceof String;
656
+ }
657
+
658
+ function isFunction(value) {
659
+ return typeof value === "function";
660
+ }
661
+
662
+ function isBuffer(value) {
663
+ return typeof value === "object" && ("length" in value);
664
+ }
665
+
666
+ function isURL(value) {
667
+ return URL && value instanceof URL;
668
+ }
669
+
670
+ // Exports
671
+ module.exports = wrap({ http: http, https: https });
672
+ module.exports.wrap = wrap;