@e-llm-studio/citation 0.0.86 → 0.0.87

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 (219) hide show
  1. package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js +1 -1
  2. package/dist/cjs/features/Bookemon/Bookemon.js +1 -1
  3. package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
  4. package/dist/features/Bookemon/Bookemon.js +1 -1
  5. package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts.map +1 -1
  6. package/dist/types/src/features/Bookemon/Bookemon.d.ts.map +1 -1
  7. package/package.json +156 -156
  8. package/dist/_virtual/browser.js +0 -2
  9. package/dist/_virtual/browser.js.map +0 -1
  10. package/dist/_virtual/form_data.js +0 -2
  11. package/dist/_virtual/form_data.js.map +0 -1
  12. package/dist/_virtual/index14.js +0 -2
  13. package/dist/_virtual/index14.js.map +0 -1
  14. package/dist/_virtual/index15.js +0 -2
  15. package/dist/_virtual/index15.js.map +0 -1
  16. package/dist/_virtual/index16.js +0 -2
  17. package/dist/_virtual/index16.js.map +0 -1
  18. package/dist/_virtual/index17.js +0 -2
  19. package/dist/_virtual/index17.js.map +0 -1
  20. package/dist/_virtual/index18.js +0 -2
  21. package/dist/_virtual/index18.js.map +0 -1
  22. package/dist/_virtual/index19.js +0 -2
  23. package/dist/_virtual/index19.js.map +0 -1
  24. package/dist/_virtual/node.js +0 -2
  25. package/dist/_virtual/node.js.map +0 -1
  26. package/dist/_virtual/serialOrdered.js +0 -2
  27. package/dist/_virtual/serialOrdered.js.map +0 -1
  28. package/dist/cjs/_virtual/browser.js +0 -2
  29. package/dist/cjs/_virtual/browser.js.map +0 -1
  30. package/dist/cjs/_virtual/form_data.js +0 -2
  31. package/dist/cjs/_virtual/form_data.js.map +0 -1
  32. package/dist/cjs/_virtual/index14.js +0 -2
  33. package/dist/cjs/_virtual/index14.js.map +0 -1
  34. package/dist/cjs/_virtual/index15.js +0 -2
  35. package/dist/cjs/_virtual/index15.js.map +0 -1
  36. package/dist/cjs/_virtual/index16.js +0 -2
  37. package/dist/cjs/_virtual/index16.js.map +0 -1
  38. package/dist/cjs/_virtual/index17.js +0 -2
  39. package/dist/cjs/_virtual/index17.js.map +0 -1
  40. package/dist/cjs/_virtual/index18.js +0 -2
  41. package/dist/cjs/_virtual/index18.js.map +0 -1
  42. package/dist/cjs/_virtual/index19.js +0 -2
  43. package/dist/cjs/_virtual/index19.js.map +0 -1
  44. package/dist/cjs/_virtual/node.js +0 -2
  45. package/dist/cjs/_virtual/node.js.map +0 -1
  46. package/dist/cjs/_virtual/serialOrdered.js +0 -2
  47. package/dist/cjs/_virtual/serialOrdered.js.map +0 -1
  48. package/dist/cjs/node_modules/asynckit/index.js +0 -2
  49. package/dist/cjs/node_modules/asynckit/index.js.map +0 -1
  50. package/dist/cjs/node_modules/asynckit/lib/abort.js +0 -2
  51. package/dist/cjs/node_modules/asynckit/lib/abort.js.map +0 -1
  52. package/dist/cjs/node_modules/asynckit/lib/async.js +0 -2
  53. package/dist/cjs/node_modules/asynckit/lib/async.js.map +0 -1
  54. package/dist/cjs/node_modules/asynckit/lib/defer.js +0 -2
  55. package/dist/cjs/node_modules/asynckit/lib/defer.js.map +0 -1
  56. package/dist/cjs/node_modules/asynckit/lib/iterate.js +0 -2
  57. package/dist/cjs/node_modules/asynckit/lib/iterate.js.map +0 -1
  58. package/dist/cjs/node_modules/asynckit/lib/state.js +0 -2
  59. package/dist/cjs/node_modules/asynckit/lib/state.js.map +0 -1
  60. package/dist/cjs/node_modules/asynckit/lib/terminator.js +0 -2
  61. package/dist/cjs/node_modules/asynckit/lib/terminator.js.map +0 -1
  62. package/dist/cjs/node_modules/asynckit/parallel.js +0 -2
  63. package/dist/cjs/node_modules/asynckit/parallel.js.map +0 -1
  64. package/dist/cjs/node_modules/asynckit/serial.js +0 -2
  65. package/dist/cjs/node_modules/asynckit/serial.js.map +0 -1
  66. package/dist/cjs/node_modules/asynckit/serialOrdered.js +0 -2
  67. package/dist/cjs/node_modules/asynckit/serialOrdered.js.map +0 -1
  68. package/dist/cjs/node_modules/axios/lib/adapters/http.js +0 -2
  69. package/dist/cjs/node_modules/axios/lib/adapters/http.js.map +0 -1
  70. package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
  71. package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
  72. package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
  73. package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
  74. package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js +0 -2
  75. package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
  76. package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
  77. package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
  78. package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
  79. package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
  80. package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js +0 -2
  81. package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
  82. package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
  83. package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
  84. package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
  85. package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
  86. package/dist/cjs/node_modules/axios/lib/platform/node/index.js +0 -2
  87. package/dist/cjs/node_modules/axios/lib/platform/node/index.js.map +0 -1
  88. package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js +0 -2
  89. package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
  90. package/dist/cjs/node_modules/debug/src/browser.js +0 -2
  91. package/dist/cjs/node_modules/debug/src/browser.js.map +0 -1
  92. package/dist/cjs/node_modules/debug/src/common.js +0 -2
  93. package/dist/cjs/node_modules/debug/src/common.js.map +0 -1
  94. package/dist/cjs/node_modules/debug/src/index.js +0 -2
  95. package/dist/cjs/node_modules/debug/src/index.js.map +0 -1
  96. package/dist/cjs/node_modules/debug/src/node.js +0 -2
  97. package/dist/cjs/node_modules/debug/src/node.js.map +0 -1
  98. package/dist/cjs/node_modules/decode-named-character-reference/index.js +0 -2
  99. package/dist/cjs/node_modules/decode-named-character-reference/index.js.map +0 -1
  100. package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
  101. package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
  102. package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
  103. package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
  104. package/dist/cjs/node_modules/follow-redirects/debug.js +0 -2
  105. package/dist/cjs/node_modules/follow-redirects/debug.js.map +0 -1
  106. package/dist/cjs/node_modules/follow-redirects/index.js +0 -2
  107. package/dist/cjs/node_modules/follow-redirects/index.js.map +0 -1
  108. package/dist/cjs/node_modules/form-data/lib/form_data.js +0 -2
  109. package/dist/cjs/node_modules/form-data/lib/form_data.js.map +0 -1
  110. package/dist/cjs/node_modules/form-data/lib/populate.js +0 -2
  111. package/dist/cjs/node_modules/form-data/lib/populate.js.map +0 -1
  112. package/dist/cjs/node_modules/has-flag/index.js +0 -2
  113. package/dist/cjs/node_modules/has-flag/index.js.map +0 -1
  114. package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  115. package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  116. package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  117. package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  118. package/dist/cjs/node_modules/mime-db/db.json.js +0 -2
  119. package/dist/cjs/node_modules/mime-db/db.json.js.map +0 -1
  120. package/dist/cjs/node_modules/mime-db/index.js +0 -8
  121. package/dist/cjs/node_modules/mime-db/index.js.map +0 -1
  122. package/dist/cjs/node_modules/mime-types/index.js +0 -8
  123. package/dist/cjs/node_modules/mime-types/index.js.map +0 -1
  124. package/dist/cjs/node_modules/ms/index.js +0 -2
  125. package/dist/cjs/node_modules/ms/index.js.map +0 -1
  126. package/dist/cjs/node_modules/proxy-from-env/index.js +0 -2
  127. package/dist/cjs/node_modules/proxy-from-env/index.js.map +0 -1
  128. package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  129. package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  130. package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
  131. package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
  132. package/dist/cjs/node_modules/supports-color/index.js +0 -2
  133. package/dist/cjs/node_modules/supports-color/index.js.map +0 -1
  134. package/dist/node_modules/asynckit/index.js +0 -2
  135. package/dist/node_modules/asynckit/index.js.map +0 -1
  136. package/dist/node_modules/asynckit/lib/abort.js +0 -2
  137. package/dist/node_modules/asynckit/lib/abort.js.map +0 -1
  138. package/dist/node_modules/asynckit/lib/async.js +0 -2
  139. package/dist/node_modules/asynckit/lib/async.js.map +0 -1
  140. package/dist/node_modules/asynckit/lib/defer.js +0 -2
  141. package/dist/node_modules/asynckit/lib/defer.js.map +0 -1
  142. package/dist/node_modules/asynckit/lib/iterate.js +0 -2
  143. package/dist/node_modules/asynckit/lib/iterate.js.map +0 -1
  144. package/dist/node_modules/asynckit/lib/state.js +0 -2
  145. package/dist/node_modules/asynckit/lib/state.js.map +0 -1
  146. package/dist/node_modules/asynckit/lib/terminator.js +0 -2
  147. package/dist/node_modules/asynckit/lib/terminator.js.map +0 -1
  148. package/dist/node_modules/asynckit/parallel.js +0 -2
  149. package/dist/node_modules/asynckit/parallel.js.map +0 -1
  150. package/dist/node_modules/asynckit/serial.js +0 -2
  151. package/dist/node_modules/asynckit/serial.js.map +0 -1
  152. package/dist/node_modules/asynckit/serialOrdered.js +0 -2
  153. package/dist/node_modules/asynckit/serialOrdered.js.map +0 -1
  154. package/dist/node_modules/axios/lib/adapters/http.js +0 -2
  155. package/dist/node_modules/axios/lib/adapters/http.js.map +0 -1
  156. package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
  157. package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
  158. package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
  159. package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
  160. package/dist/node_modules/axios/lib/helpers/callbackify.js +0 -2
  161. package/dist/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
  162. package/dist/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
  163. package/dist/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
  164. package/dist/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
  165. package/dist/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
  166. package/dist/node_modules/axios/lib/helpers/readBlob.js +0 -2
  167. package/dist/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
  168. package/dist/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
  169. package/dist/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
  170. package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
  171. package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
  172. package/dist/node_modules/axios/lib/platform/node/index.js +0 -2
  173. package/dist/node_modules/axios/lib/platform/node/index.js.map +0 -1
  174. package/dist/node_modules/combined-stream/lib/combined_stream.js +0 -2
  175. package/dist/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
  176. package/dist/node_modules/debug/src/browser.js +0 -2
  177. package/dist/node_modules/debug/src/browser.js.map +0 -1
  178. package/dist/node_modules/debug/src/common.js +0 -2
  179. package/dist/node_modules/debug/src/common.js.map +0 -1
  180. package/dist/node_modules/debug/src/index.js +0 -2
  181. package/dist/node_modules/debug/src/index.js.map +0 -1
  182. package/dist/node_modules/debug/src/node.js +0 -2
  183. package/dist/node_modules/debug/src/node.js.map +0 -1
  184. package/dist/node_modules/decode-named-character-reference/index.js +0 -2
  185. package/dist/node_modules/decode-named-character-reference/index.js.map +0 -1
  186. package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
  187. package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
  188. package/dist/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
  189. package/dist/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
  190. package/dist/node_modules/follow-redirects/debug.js +0 -2
  191. package/dist/node_modules/follow-redirects/debug.js.map +0 -1
  192. package/dist/node_modules/follow-redirects/index.js +0 -2
  193. package/dist/node_modules/follow-redirects/index.js.map +0 -1
  194. package/dist/node_modules/form-data/lib/form_data.js +0 -2
  195. package/dist/node_modules/form-data/lib/form_data.js.map +0 -1
  196. package/dist/node_modules/form-data/lib/populate.js +0 -2
  197. package/dist/node_modules/form-data/lib/populate.js.map +0 -1
  198. package/dist/node_modules/has-flag/index.js +0 -2
  199. package/dist/node_modules/has-flag/index.js.map +0 -1
  200. package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  201. package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  202. package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  203. package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  204. package/dist/node_modules/mime-db/db.json.js +0 -2
  205. package/dist/node_modules/mime-db/db.json.js.map +0 -1
  206. package/dist/node_modules/mime-db/index.js +0 -8
  207. package/dist/node_modules/mime-db/index.js.map +0 -1
  208. package/dist/node_modules/mime-types/index.js +0 -8
  209. package/dist/node_modules/mime-types/index.js.map +0 -1
  210. package/dist/node_modules/ms/index.js +0 -2
  211. package/dist/node_modules/ms/index.js.map +0 -1
  212. package/dist/node_modules/proxy-from-env/index.js +0 -2
  213. package/dist/node_modules/proxy-from-env/index.js.map +0 -1
  214. package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  215. package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  216. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
  217. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
  218. package/dist/node_modules/supports-color/index.js +0 -2
  219. package/dist/node_modules/supports-color/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../node_modules/follow-redirects/index.js"],"sourcesContent":["var url = require(\"url\");\nvar URL = url.URL;\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Writable = require(\"stream\").Writable;\nvar assert = require(\"assert\");\nvar debug = require(\"./debug\");\n\n// Preventive platform detection\n// istanbul ignore next\n(function detectUnsupportedEnvironment() {\n var looksLikeNode = typeof process !== \"undefined\";\n var looksLikeBrowser = typeof window !== \"undefined\" && typeof document !== \"undefined\";\n var looksLikeV8 = isFunction(Error.captureStackTrace);\n if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {\n console.warn(\"The follow-redirects package should be excluded from browser builds.\");\n }\n}());\n\n// Whether to use the native URL object or the legacy url module\nvar useNativeURL = false;\ntry {\n assert(new URL(\"\"));\n}\ncatch (error) {\n useNativeURL = error.code === \"ERR_INVALID_URL\";\n}\n\n// URL fields to preserve in copy operations\nvar preservedUrlFields = [\n \"auth\",\n \"host\",\n \"hostname\",\n \"href\",\n \"path\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"query\",\n \"search\",\n \"hash\",\n];\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n eventHandlers[event] = function (arg1, arg2, arg3) {\n this._redirectable.emit(event, arg1, arg2, arg3);\n };\n});\n\n// Error types with codes\nvar InvalidUrlError = createErrorType(\n \"ERR_INVALID_URL\",\n \"Invalid URL\",\n TypeError\n);\nvar RedirectionError = createErrorType(\n \"ERR_FR_REDIRECTION_FAILURE\",\n \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"Maximum number of redirects exceeded\",\n RedirectionError\n);\nvar MaxBodyLengthExceededError = createErrorType(\n \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n \"ERR_STREAM_WRITE_AFTER_END\",\n \"write after end\"\n);\n\n// istanbul ignore next\nvar destroy = Writable.prototype.destroy || noop;\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n this._sanitizeOptions(options);\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n try {\n self._processResponse(response);\n }\n catch (cause) {\n self.emit(\"error\", cause instanceof RedirectionError ?\n cause : new RedirectionError({ cause: cause }));\n }\n };\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n destroyRequest(this._currentRequest);\n this._currentRequest.abort();\n this.emit(\"abort\");\n};\n\nRedirectableRequest.prototype.destroy = function (error) {\n destroyRequest(this._currentRequest, error);\n destroy.call(this, error);\n return this;\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Writing is not allowed if end has been called\n if (this._ending) {\n throw new WriteAfterEndError();\n }\n\n // Validate input and shift parameters if necessary\n if (!isString(data) && !isBuffer(data)) {\n throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n }\n if (isFunction(encoding)) {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new MaxBodyLengthExceededError());\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (isFunction(data)) {\n callback = data;\n data = encoding = null;\n }\n else if (isFunction(encoding)) {\n callback = encoding;\n encoding = null;\n }\n\n // Write data if needed and end\n if (!data) {\n this._ended = this._ending = true;\n this._currentRequest.end(null, null, callback);\n }\n else {\n var self = this;\n var currentRequest = this._currentRequest;\n this.write(data, encoding, function () {\n self._ended = true;\n currentRequest.end(null, null, callback);\n });\n this._ending = true;\n }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n var self = this;\n\n // Destroys the socket on timeout\n function destroyOnTimeout(socket) {\n socket.setTimeout(msecs);\n socket.removeListener(\"timeout\", socket.destroy);\n socket.addListener(\"timeout\", socket.destroy);\n }\n\n // Sets up a timer to trigger a timeout event\n function startTimer(socket) {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout = setTimeout(function () {\n self.emit(\"timeout\");\n clearTimer();\n }, msecs);\n destroyOnTimeout(socket);\n }\n\n // Stops a timeout from triggering\n function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n self.removeListener(\"close\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }\n\n // Attach callback if passed\n if (callback) {\n this.on(\"timeout\", callback);\n }\n\n // Start the timer if or when the socket is opened\n if (this.socket) {\n startTimer(this.socket);\n }\n else {\n this._currentRequest.once(\"socket\", startTimer);\n }\n\n // Clean up on events\n this.on(\"socket\", destroyOnTimeout);\n this.on(\"abort\", clearTimer);\n this.on(\"error\", clearTimer);\n this.on(\"response\", clearTimer);\n this.on(\"close\", clearTimer);\n\n return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n // Ensure headers are always present\n if (!options.headers) {\n options.headers = {};\n }\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n throw new TypeError(\"Unsupported protocol \" + protocol);\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.slice(0, -1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request and set up its event handlers\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n request._redirectable = this;\n for (var event of events) {\n request.on(event, eventHandlers[event]);\n }\n\n // RFC7230§5.3.1: When making a request directly to an origin server, […]\n // a client MUST send only the absolute path […] as the request-target.\n this._currentUrl = /^\\//.test(this._options.path) ?\n url.format(this._options) :\n // When making a request to a proxy, […]\n // a client MUST send the target URI in absolute-form […].\n this._options.path;\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end\n var i = 0;\n var self = this;\n var buffers = this._requestBodyBuffers;\n (function writeNext(error) {\n // Only write if this request has not been redirected yet\n // istanbul ignore else\n if (request === self._currentRequest) {\n // Report any write errors\n // istanbul ignore if\n if (error) {\n self.emit(\"error\", error);\n }\n // Write the next buffer if there are still left\n else if (i < buffers.length) {\n var buffer = buffers[i++];\n // istanbul ignore else\n if (!request.finished) {\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n }\n // End the request if `end` has been called on us\n else if (self._ended) {\n request.end();\n }\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n var statusCode = response.statusCode;\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n\n // If the response is not a redirect; return it as-is\n var location = response.headers.location;\n if (!location || this._options.followRedirects === false ||\n statusCode < 300 || statusCode >= 400) {\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n return;\n }\n\n // The response is a redirect, so abort the current request\n destroyRequest(this._currentRequest);\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n throw new TooManyRedirectsError();\n }\n\n // Store the request headers if applicable\n var requestHeaders;\n var beforeRedirect = this._options.beforeRedirect;\n if (beforeRedirect) {\n requestHeaders = Object.assign({\n // The Host header was set by nativeProtocol.request\n Host: response.req.getHeader(\"host\"),\n }, this._options.headers);\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe, […]\n // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n // the request method from POST to GET for the subsequent request.\n var method = this._options.method;\n if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n // the server is redirecting the user agent to a different resource […]\n // A user agent can perform a retrieval request targeting that URI\n // (a GET or HEAD request if using HTTP) […]\n (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n removeMatchingHeaders(/^content-/i, this._options.headers);\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n // If the redirect is relative, carry over the host of the last request\n var currentUrlParts = parseUrl(this._currentUrl);\n var currentHost = currentHostHeader || currentUrlParts.host;\n var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n // Create the redirected request\n var redirectUrl = resolveUrl(location, currentUrl);\n debug(\"redirecting to\", redirectUrl.href);\n this._isRedirect = true;\n spreadUrlObject(redirectUrl, this._options);\n\n // Drop confidential headers when redirecting to a less secure protocol\n // or to a different domain that is not a superdomain\n if (redirectUrl.protocol !== currentUrlParts.protocol &&\n redirectUrl.protocol !== \"https:\" ||\n redirectUrl.host !== currentHost &&\n !isSubdomain(redirectUrl.host, currentHost)) {\n removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);\n }\n\n // Evaluate the beforeRedirect callback\n if (isFunction(beforeRedirect)) {\n var responseDetails = {\n headers: response.headers,\n statusCode: statusCode,\n };\n var requestDetails = {\n url: currentUrl,\n method: method,\n headers: requestHeaders,\n };\n beforeRedirect(this._options, responseDetails, requestDetails);\n this._sanitizeOptions(this._options);\n }\n\n // Perform the redirected request\n this._performRequest();\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n function request(input, options, callback) {\n // Parse parameters, ensuring that input is an object\n if (isURL(input)) {\n input = spreadUrlObject(input);\n }\n else if (isString(input)) {\n input = spreadUrlObject(parseUrl(input));\n }\n else {\n callback = options;\n options = validateUrl(input);\n input = { protocol: protocol };\n }\n if (isFunction(options)) {\n callback = options;\n options = null;\n }\n\n // Set defaults\n options = Object.assign({\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, input, options);\n options.nativeProtocols = nativeProtocols;\n if (!isString(options.host) && !isString(options.hostname)) {\n options.hostname = \"::1\";\n }\n\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n }\n\n // Executes a GET request, following redirects\n function get(input, options, callback) {\n var wrappedRequest = wrappedProtocol.request(input, options, callback);\n wrappedRequest.end();\n return wrappedRequest;\n }\n\n // Expose the properties on the wrapped protocol\n Object.defineProperties(wrappedProtocol, {\n request: { value: request, configurable: true, enumerable: true, writable: true },\n get: { value: get, configurable: true, enumerable: true, writable: true },\n });\n });\n return exports;\n}\n\nfunction noop() { /* empty */ }\n\nfunction parseUrl(input) {\n var parsed;\n // istanbul ignore else\n if (useNativeURL) {\n parsed = new URL(input);\n }\n else {\n // Ensure the URL is valid and absolute\n parsed = validateUrl(url.parse(input));\n if (!isString(parsed.protocol)) {\n throw new InvalidUrlError({ input });\n }\n }\n return parsed;\n}\n\nfunction resolveUrl(relative, base) {\n // istanbul ignore next\n return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));\n}\n\nfunction validateUrl(input) {\n if (/^\\[/.test(input.hostname) && !/^\\[[:0-9a-f]+\\]$/i.test(input.hostname)) {\n throw new InvalidUrlError({ input: input.href || input });\n }\n if (/^\\[/.test(input.host) && !/^\\[[:0-9a-f]+\\](:\\d+)?$/i.test(input.host)) {\n throw new InvalidUrlError({ input: input.href || input });\n }\n return input;\n}\n\nfunction spreadUrlObject(urlObject, target) {\n var spread = target || {};\n for (var key of preservedUrlFields) {\n spread[key] = urlObject[key];\n }\n\n // Fix IPv6 hostname\n if (spread.hostname.startsWith(\"[\")) {\n spread.hostname = spread.hostname.slice(1, -1);\n }\n // Ensure port is a number\n if (spread.port !== \"\") {\n spread.port = Number(spread.port);\n }\n // Concatenate path\n spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;\n\n return spread;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n var lastValue;\n for (var header in headers) {\n if (regex.test(header)) {\n lastValue = headers[header];\n delete headers[header];\n }\n }\n return (lastValue === null || typeof lastValue === \"undefined\") ?\n undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, message, baseClass) {\n // Create constructor\n function CustomError(properties) {\n // istanbul ignore else\n if (isFunction(Error.captureStackTrace)) {\n Error.captureStackTrace(this, this.constructor);\n }\n Object.assign(this, properties || {});\n this.code = code;\n this.message = this.cause ? message + \": \" + this.cause.message : message;\n }\n\n // Attach constructor and set default properties\n CustomError.prototype = new (baseClass || Error)();\n Object.defineProperties(CustomError.prototype, {\n constructor: {\n value: CustomError,\n enumerable: false,\n },\n name: {\n value: \"Error [\" + code + \"]\",\n enumerable: false,\n },\n });\n return CustomError;\n}\n\nfunction destroyRequest(request, error) {\n for (var event of events) {\n request.removeListener(event, eventHandlers[event]);\n }\n request.on(\"error\", noop);\n request.destroy(error);\n}\n\nfunction isSubdomain(subdomain, domain) {\n assert(isString(subdomain) && isString(domain));\n var dot = subdomain.length - domain.length - 1;\n return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\nfunction isString(value) {\n return typeof value === \"string\" || value instanceof String;\n}\n\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\nfunction isBuffer(value) {\n return typeof value === \"object\" && (\"length\" in value);\n}\n\nfunction isURL(value) {\n return URL && value instanceof URL;\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n"],"names":["looksLikeNode","looksLikeBrowser","looksLikeV8","url","require$$0","URL","http","require$$1","https","require$$2","Writable","require$$3","assert","require$$4","debug","require$$5","process","window","document","isFunction","Error","captureStackTrace","console","warn","useNativeURL","error","code","preservedUrlFields","events","eventHandlers","Object","create","forEach","event","arg1","arg2","arg3","this","_redirectable","emit","InvalidUrlError","createErrorType","TypeError","RedirectionError","TooManyRedirectsError","MaxBodyLengthExceededError","WriteAfterEndError","destroy","prototype","noop","RedirectableRequest","options","responseCallback","call","_sanitizeOptions","_options","_ended","_ending","_redirectCount","_redirects","_requestBodyLength","_requestBodyBuffers","on","self","_onNativeResponse","response","_processResponse","cause","_performRequest","wrap","protocols","exports","maxRedirects","maxBodyLength","nativeProtocols","keys","scheme","protocol","nativeProtocol","wrappedProtocol","defineProperties","request","value","input","callback","spreadUrlObject","isString","parseUrl","validateUrl","assign","host","hostname","equal","configurable","enumerable","writable","get","wrappedRequest","end","parsed","parse","test","href","urlObject","target","spread","key","startsWith","slice","port","Number","path","search","pathname","removeMatchingHeaders","regex","headers","lastValue","header","undefined","String","trim","message","baseClass","CustomError","properties","constructor","name","destroyRequest","removeListener","abort","_currentRequest","write","data","encoding","length","push","currentRequest","setHeader","removeHeader","setTimeout","msecs","destroyOnTimeout","socket","addListener","startTimer","_timeout","clearTimeout","clearTimer","once","method","a","b","property","defineProperty","searchPos","indexOf","substring","agents","agent","_currentUrl","format","_isRedirect","i","buffers","writeNext","buffer","finished","statusCode","trackRedirects","requestHeaders","location","followRedirects","responseUrl","redirects","beforeRedirect","Host","req","getHeader","relative","base","currentHostHeader","currentUrlParts","currentHost","currentUrl","redirectUrl","resolve","subdomain","domain","dot","endsWith","isSubdomain","responseDetails","requestDetails","followRedirectsModule"],"mappings":"sZAAA,IAWMA,EACAC,EACAC,EAbFC,EAAMC,EAAAA,QACNC,EAAMF,EAAIE,IACVC,EAAOC,EAAAA,QACPC,EAAQC,EAAAA,QACRC,EAAWC,EAAiB,QAACD,SAC7BE,EAASC,EAAAA,QACTC,EAAQC,EAAAA,YAKNf,EAAmC,oBAAZgB,QACvBf,EAAqC,oBAAXgB,QAA8C,oBAAbC,SAC3DhB,EAAciB,EAAWC,MAAMC,mBAC9BrB,IAAkBC,GAAqBC,GAC1CoB,QAAQC,KAAK,wE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F,EACjE,CAhMMG,CAAYN,EAAY/F,KAAM6F,KAChCrE,EAAsB,yCAA0C7E,KAAKkB,SAAS6D,SAI5EjG,EAAW4J,GAAiB,CAC9B,IAAIiB,EAAkB,CACpB5E,QAASnD,EAASmD,QAClBoD,WAAYA,GAEVyB,EAAiB,CACnB9L,IAAKqL,EACLlC,OAAQA,EACRlC,QAASsD,GAEXK,EAAe1I,KAAKkB,SAAUyI,EAAiBC,GAC/C5J,KAAKiB,iBAAiBjB,KAAKkB,SAC/B,CAGElB,KAAK+B,mBA+LP8H,WAAA3H,QAAiBF,EAAK,CAAE/D,KAAMA,EAAME,MAAOA,IAC3C0L,WAAA3H,QAAAF,KAAsBA"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../combined-stream/lib/combined_stream.js"),e=require("util"),r=require("path"),n=require("http"),o=require("https"),a=require("url"),s=require("fs"),i=require("stream"),u=require("../../mime-types/index.js"),h=require("../../asynckit/index.js"),p=require("./populate.js");function f(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l,c,y=f(e),_=f(r),d=f(n),g=f(o),m=f(a),v=f(s),B=f(i);exports.__require=function(){if(c)return l;c=1;var e=t.__require(),r=y.default,n=_.default,o=d.default,a=g.default,s=m.default.parse,i=v.default,f=B.default.Stream,L=u.__require(),b=h.__require(),E=p.__require();function w(t){if(!(this instanceof w))return new w(t);for(var r in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e.call(this),t=t||{})this[r]=t[r]}return l=w,r.inherits(w,e),w.LINE_BREAK="\r\n",w.DEFAULT_CONTENT_TYPE="application/octet-stream",w.prototype.append=function(t,r,n){"string"==typeof(n=n||{})&&(n={filename:n});var o=e.prototype.append.bind(this);if("number"==typeof r&&(r=""+r),Array.isArray(r))this._error(new Error("Arrays are not supported."));else{var a=this._multiPartHeader(t,r,n),s=this._multiPartFooter();o(a),o(r),o(s),this._trackLength(a,r,n)}},w.prototype._trackLength=function(t,e,r){var n=0;null!=r.knownLength?n+=+r.knownLength:Buffer.isBuffer(e)?n=e.length:"string"==typeof e&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+w.LINE_BREAK.length,e&&(e.path||e.readable&&e.hasOwnProperty("httpVersion")||e instanceof f)&&(r.knownLength||this._valuesToMeasure.push(e))},w.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?null!=t.end&&t.end!=1/0&&null!=t.start?e(null,t.end+1-(t.start?t.start:0)):i.stat(t.path,(function(r,n){var o;r?e(r):(o=n.size-(t.start?t.start:0),e(null,o))})):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",(function(r){t.pause(),e(null,+r.headers["content-length"])})),t.resume()):e("Unknown stream")},w.prototype._multiPartHeader=function(t,e,r){if("string"==typeof r.header)return r.header;var n,o=this._getContentDisposition(e,r),a=this._getContentType(e,r),s="",i={"Content-Disposition":["form-data",'name="'+t+'"'].concat(o||[]),"Content-Type":[].concat(a||[])};for(var u in"object"==typeof r.header&&E(i,r.header),i)i.hasOwnProperty(u)&&null!=(n=i[u])&&(Array.isArray(n)||(n=[n]),n.length&&(s+=u+": "+n.join("; ")+w.LINE_BREAK));return"--"+this.getBoundary()+w.LINE_BREAK+s+w.LINE_BREAK},w.prototype._getContentDisposition=function(t,e){var r,o;return"string"==typeof e.filepath?r=n.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?r=n.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(r=n.basename(t.client._httpMessage.path||"")),r&&(o='filename="'+r+'"'),o},w.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t.name&&(r=L.lookup(t.name)),!r&&t.path&&(r=L.lookup(t.path)),!r&&t.readable&&t.hasOwnProperty("httpVersion")&&(r=t.headers["content-type"]),r||!e.filepath&&!e.filename||(r=L.lookup(e.filepath||e.filename)),r||"object"!=typeof t||(r=w.DEFAULT_CONTENT_TYPE),r},w.prototype._multiPartFooter=function(){return function(t){var e=w.LINE_BREAK;0===this._streams.length&&(e+=this._lastBoundary()),t(e)}.bind(this)},w.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+w.LINE_BREAK},w.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(r[e.toLowerCase()]=t[e]);return r},w.prototype.setBoundary=function(t){this._boundary=t},w.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},w.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)"function"!=typeof this._streams[r]&&(t=Buffer.isBuffer(this._streams[r])?Buffer.concat([t,this._streams[r]]):Buffer.concat([t,Buffer.from(this._streams[r])]),"string"==typeof this._streams[r]&&this._streams[r].substring(2,e.length+2)===e||(t=Buffer.concat([t,Buffer.from(w.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])},w.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(10*Math.random()).toString(16);this._boundary=t},w.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t},w.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t},w.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;this._streams.length&&(e+=this._lastBoundary().length),this._valuesToMeasure.length?b.parallel(this._valuesToMeasure,this._lengthRetriever,(function(r,n){r?t(r):(n.forEach((function(t){e+=t})),t(null,e))})):process.nextTick(t.bind(this,null,e))},w.prototype.submit=function(t,e){var r,n,i={method:"post"};return"string"==typeof t?(t=s(t),n=E({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=E(t,i)).port||(n.port="https:"==n.protocol?443:80),n.headers=this.getHeaders(t.headers),r="https:"==n.protocol?a.request(n):o.request(n),this.getLength(function(t,n){if(t&&"Unknown stream"!==t)this._error(t);else if(n&&r.setHeader("Content-Length",n),this.pipe(r),e){var o,a=function(t,n){return r.removeListener("error",a),r.removeListener("response",o),e.call(this,t,n)};o=a.bind(this,null),r.on("error",a),r.on("response",o)}}.bind(this)),r},w.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))},w.prototype.toString=function(){return"[object FormData]"},l};
2
- //# sourceMappingURL=form_data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form_data.js","sources":["../../../../../node_modules/form-data/lib/form_data.js"],"sourcesContent":["var CombinedStream = require('combined-stream');\nvar util = require('util');\nvar path = require('path');\nvar http = require('http');\nvar https = require('https');\nvar parseUrl = require('url').parse;\nvar fs = require('fs');\nvar Stream = require('stream').Stream;\nvar mime = require('mime-types');\nvar asynckit = require('asynckit');\nvar populate = require('./populate.js');\n\n// Public API\nmodule.exports = FormData;\n\n// make it a Stream\nutil.inherits(FormData, CombinedStream);\n\n/**\n * Create readable \"multipart/form-data\" streams.\n * Can be used to submit forms\n * and file uploads to other web applications.\n *\n * @constructor\n * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream\n */\nfunction FormData(options) {\n if (!(this instanceof FormData)) {\n return new FormData(options);\n }\n\n this._overheadLength = 0;\n this._valueLength = 0;\n this._valuesToMeasure = [];\n\n CombinedStream.call(this);\n\n options = options || {};\n for (var option in options) {\n this[option] = options[option];\n }\n}\n\nFormData.LINE_BREAK = '\\r\\n';\nFormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\nFormData.prototype.append = function(field, value, options) {\n\n options = options || {};\n\n // allow filename as single option\n if (typeof options == 'string') {\n options = {filename: options};\n }\n\n var append = CombinedStream.prototype.append.bind(this);\n\n // all that streamy business can't handle numbers\n if (typeof value == 'number') {\n value = '' + value;\n }\n\n // https://github.com/felixge/node-form-data/issues/38\n if (Array.isArray(value)) {\n // Please convert your array into string\n // the way web server expects it\n this._error(new Error('Arrays are not supported.'));\n return;\n }\n\n var header = this._multiPartHeader(field, value, options);\n var footer = this._multiPartFooter();\n\n append(header);\n append(value);\n append(footer);\n\n // pass along options.knownLength\n this._trackLength(header, value, options);\n};\n\nFormData.prototype._trackLength = function(header, value, options) {\n var valueLength = 0;\n\n // used w/ getLengthSync(), when length is known.\n // e.g. for streaming directly from a remote server,\n // w/ a known file a size, and not wanting to wait for\n // incoming file to finish to get its size.\n if (options.knownLength != null) {\n valueLength += +options.knownLength;\n } else if (Buffer.isBuffer(value)) {\n valueLength = value.length;\n } else if (typeof value === 'string') {\n valueLength = Buffer.byteLength(value);\n }\n\n this._valueLength += valueLength;\n\n // @check why add CRLF? does this account for custom/multiple CRLFs?\n this._overheadLength +=\n Buffer.byteLength(header) +\n FormData.LINE_BREAK.length;\n\n // empty or either doesn't have path or not an http response or not a stream\n if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {\n return;\n }\n\n // no need to bother with the length\n if (!options.knownLength) {\n this._valuesToMeasure.push(value);\n }\n};\n\nFormData.prototype._lengthRetriever = function(value, callback) {\n\n if (value.hasOwnProperty('fd')) {\n\n // take read range into a account\n // `end` = Infinity –> read file till the end\n //\n // TODO: Looks like there is bug in Node fs.createReadStream\n // it doesn't respect `end` options without `start` options\n // Fix it when node fixes it.\n // https://github.com/joyent/node/issues/7819\n if (value.end != undefined && value.end != Infinity && value.start != undefined) {\n\n // when end specified\n // no need to calculate range\n // inclusive, starts with 0\n callback(null, value.end + 1 - (value.start ? value.start : 0));\n\n // not that fast snoopy\n } else {\n // still need to fetch file size from fs\n fs.stat(value.path, function(err, stat) {\n\n var fileSize;\n\n if (err) {\n callback(err);\n return;\n }\n\n // update final size based on the range options\n fileSize = stat.size - (value.start ? value.start : 0);\n callback(null, fileSize);\n });\n }\n\n // or http response\n } else if (value.hasOwnProperty('httpVersion')) {\n callback(null, +value.headers['content-length']);\n\n // or request stream http://github.com/mikeal/request\n } else if (value.hasOwnProperty('httpModule')) {\n // wait till response come back\n value.on('response', function(response) {\n value.pause();\n callback(null, +response.headers['content-length']);\n });\n value.resume();\n\n // something else\n } else {\n callback('Unknown stream');\n }\n};\n\nFormData.prototype._multiPartHeader = function(field, value, options) {\n // custom header specified (as string)?\n // it becomes responsible for boundary\n // (e.g. to handle extra CRLFs on .NET servers)\n if (typeof options.header == 'string') {\n return options.header;\n }\n\n var contentDisposition = this._getContentDisposition(value, options);\n var contentType = this._getContentType(value, options);\n\n var contents = '';\n var headers = {\n // add custom disposition as third element or keep it two elements if not\n 'Content-Disposition': ['form-data', 'name=\"' + field + '\"'].concat(contentDisposition || []),\n // if no content type. allow it to be empty array\n 'Content-Type': [].concat(contentType || [])\n };\n\n // allow custom headers.\n if (typeof options.header == 'object') {\n populate(headers, options.header);\n }\n\n var header;\n for (var prop in headers) {\n if (!headers.hasOwnProperty(prop)) continue;\n header = headers[prop];\n\n // skip nullish headers.\n if (header == null) {\n continue;\n }\n\n // convert all headers to arrays.\n if (!Array.isArray(header)) {\n header = [header];\n }\n\n // add non-empty headers.\n if (header.length) {\n contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;\n }\n }\n\n return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;\n};\n\nFormData.prototype._getContentDisposition = function(value, options) {\n\n var filename\n , contentDisposition\n ;\n\n if (typeof options.filepath === 'string') {\n // custom filepath for relative paths\n filename = path.normalize(options.filepath).replace(/\\\\/g, '/');\n } else if (options.filename || value.name || value.path) {\n // custom filename take precedence\n // formidable and the browser add a name property\n // fs- and request- streams have path property\n filename = path.basename(options.filename || value.name || value.path);\n } else if (value.readable && value.hasOwnProperty('httpVersion')) {\n // or try http response\n filename = path.basename(value.client._httpMessage.path || '');\n }\n\n if (filename) {\n contentDisposition = 'filename=\"' + filename + '\"';\n }\n\n return contentDisposition;\n};\n\nFormData.prototype._getContentType = function(value, options) {\n\n // use custom content-type above all\n var contentType = options.contentType;\n\n // or try `name` from formidable, browser\n if (!contentType && value.name) {\n contentType = mime.lookup(value.name);\n }\n\n // or try `path` from fs-, request- streams\n if (!contentType && value.path) {\n contentType = mime.lookup(value.path);\n }\n\n // or if it's http-reponse\n if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {\n contentType = value.headers['content-type'];\n }\n\n // or guess it from the filepath or filename\n if (!contentType && (options.filepath || options.filename)) {\n contentType = mime.lookup(options.filepath || options.filename);\n }\n\n // fallback to the default content type if `value` is not simple value\n if (!contentType && typeof value == 'object') {\n contentType = FormData.DEFAULT_CONTENT_TYPE;\n }\n\n return contentType;\n};\n\nFormData.prototype._multiPartFooter = function() {\n return function(next) {\n var footer = FormData.LINE_BREAK;\n\n var lastPart = (this._streams.length === 0);\n if (lastPart) {\n footer += this._lastBoundary();\n }\n\n next(footer);\n }.bind(this);\n};\n\nFormData.prototype._lastBoundary = function() {\n return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;\n};\n\nFormData.prototype.getHeaders = function(userHeaders) {\n var header;\n var formHeaders = {\n 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()\n };\n\n for (header in userHeaders) {\n if (userHeaders.hasOwnProperty(header)) {\n formHeaders[header.toLowerCase()] = userHeaders[header];\n }\n }\n\n return formHeaders;\n};\n\nFormData.prototype.setBoundary = function(boundary) {\n this._boundary = boundary;\n};\n\nFormData.prototype.getBoundary = function() {\n if (!this._boundary) {\n this._generateBoundary();\n }\n\n return this._boundary;\n};\n\nFormData.prototype.getBuffer = function() {\n var dataBuffer = new Buffer.alloc( 0 );\n var boundary = this.getBoundary();\n\n // Create the form content. Add Line breaks to the end of data.\n for (var i = 0, len = this._streams.length; i < len; i++) {\n if (typeof this._streams[i] !== 'function') {\n\n // Add content to the buffer.\n if(Buffer.isBuffer(this._streams[i])) {\n dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);\n }else {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);\n }\n\n // Add break after content.\n if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );\n }\n }\n }\n\n // Add the footer and return the Buffer object.\n return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );\n};\n\nFormData.prototype._generateBoundary = function() {\n // This generates a 50 character boundary similar to those used by Firefox.\n // They are optimized for boyer-moore parsing.\n var boundary = '--------------------------';\n for (var i = 0; i < 24; i++) {\n boundary += Math.floor(Math.random() * 10).toString(16);\n }\n\n this._boundary = boundary;\n};\n\n// Note: getLengthSync DOESN'T calculate streams length\n// As workaround one can calculate file size manually\n// and add it as knownLength option\nFormData.prototype.getLengthSync = function() {\n var knownLength = this._overheadLength + this._valueLength;\n\n // Don't get confused, there are 3 \"internal\" streams for each keyval pair\n // so it basically checks if there is any value added to the form\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n // https://github.com/form-data/form-data/issues/40\n if (!this.hasKnownLength()) {\n // Some async length retrievers are present\n // therefore synchronous length calculation is false.\n // Please use getLength(callback) to get proper length\n this._error(new Error('Cannot calculate proper length in synchronous way.'));\n }\n\n return knownLength;\n};\n\n// Public API to check if length of added values is known\n// https://github.com/form-data/form-data/issues/196\n// https://github.com/form-data/form-data/issues/262\nFormData.prototype.hasKnownLength = function() {\n var hasKnownLength = true;\n\n if (this._valuesToMeasure.length) {\n hasKnownLength = false;\n }\n\n return hasKnownLength;\n};\n\nFormData.prototype.getLength = function(cb) {\n var knownLength = this._overheadLength + this._valueLength;\n\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n if (!this._valuesToMeasure.length) {\n process.nextTick(cb.bind(this, null, knownLength));\n return;\n }\n\n asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {\n if (err) {\n cb(err);\n return;\n }\n\n values.forEach(function(length) {\n knownLength += length;\n });\n\n cb(null, knownLength);\n });\n};\n\nFormData.prototype.submit = function(params, cb) {\n var request\n , options\n , defaults = {method: 'post'}\n ;\n\n // parse provided url if it's string\n // or treat it as options object\n if (typeof params == 'string') {\n\n params = parseUrl(params);\n options = populate({\n port: params.port,\n path: params.pathname,\n host: params.hostname,\n protocol: params.protocol\n }, defaults);\n\n // use custom params\n } else {\n\n options = populate(params, defaults);\n // if no port provided use default one\n if (!options.port) {\n options.port = options.protocol == 'https:' ? 443 : 80;\n }\n }\n\n // put that good code in getHeaders to some use\n options.headers = this.getHeaders(params.headers);\n\n // https if specified, fallback to http in any other case\n if (options.protocol == 'https:') {\n request = https.request(options);\n } else {\n request = http.request(options);\n }\n\n // get content length and fire away\n this.getLength(function(err, length) {\n if (err && err !== 'Unknown stream') {\n this._error(err);\n return;\n }\n\n // add content length\n if (length) {\n request.setHeader('Content-Length', length);\n }\n\n this.pipe(request);\n if (cb) {\n var onResponse;\n\n var callback = function (error, responce) {\n request.removeListener('error', callback);\n request.removeListener('response', onResponse);\n\n return cb.call(this, error, responce);\n };\n\n onResponse = callback.bind(this, null);\n\n request.on('error', callback);\n request.on('response', onResponse);\n }\n }.bind(this));\n\n return request;\n};\n\nFormData.prototype._error = function(err) {\n if (!this.error) {\n this.error = err;\n this.pause();\n this.emit('error', err);\n }\n};\n\nFormData.prototype.toString = function () {\n return '[object FormData]';\n};\n"],"names":["CombinedStream","require$$0","util","require$$1","path","require$$2","http","require$$3","https","require$$4","parseUrl","require$$5","parse","fs","require$$6","Stream","require$$7","mime","require$$8","asynckit","require$$9","populate","require$$10","FormData","options","this","option","_overheadLength","_valueLength","_valuesToMeasure","call","form_data","inherits","LINE_BREAK","DEFAULT_CONTENT_TYPE","prototype","append","field","value","filename","bind","Array","isArray","_error","Error","header","_multiPartHeader","footer","_multiPartFooter","_trackLength","valueLength","knownLength","Buffer","isBuffer","length","byteLength","readable","hasOwnProperty","push","_lengthRetriever","callback","undefined","end","Infinity","start","stat","err","fileSize","size","headers","on","response","pause","resume","contentDisposition","_getContentDisposition","contentType","_getContentType","contents","concat","prop","join","getBoundary","filepath","normalize","replace","name","basename","client","_httpMessage","lookup","next","_streams","_lastBoundary","getHeaders","userHeaders","formHeaders","toLowerCase","setBoundary","boundary","_boundary","_generateBoundary","getBuffer","dataBuffer","alloc","i","len","from","substring","Math","floor","random","toString","getLengthSync","hasKnownLength","getLength","cb","parallel","values","forEach","process","nextTick","submit","params","request","defaults","method","port","pathname","host","hostname","protocol","setHeader","pipe","onResponse","error","responce","removeListener","emit"],"mappings":"uhBAAA,IAAIA,EAAiBC,EAAAA,YACjBC,EAAOC,EAAAA,QACPC,EAAOC,EAAAA,QACPC,EAAOC,EAAAA,QACPC,EAAQC,EAAAA,QACRC,EAAWC,EAAc,QAACC,MAC1BC,EAAKC,EAAAA,QACLC,EAASC,EAAiB,QAACD,OAC3BE,EAAOC,EAAAA,YACPC,EAAWC,EAAAA,YACXC,EAAWC,EAAAA,YAgBf,SAASC,EAASC,GAChB,KAAMC,gBAAgBF,GACpB,OAAO,IAAIA,EAASC,GAUtB,IAAK,IAAIE,KAPTD,KAAKE,gBAAkB,EACvBF,KAAKG,aAAe,EACpBH,KAAKI,iBAAmB,GAExB7B,EAAe8B,KAAKL,MAEpBD,EAAUA,GAAW,GAEnBC,KAAKC,GAAUF,EAAQE,EAE3B,QA5BAK,EAAiBR,EAGjBrB,EAAK8B,SAAST,EAAUvB,GA2BxBuB,EAASU,WAAa,OACtBV,EAASW,qBAAuB,2BAEhCX,EAASY,UAAUC,OAAS,SAASC,EAAOC,EAAOd,GAK3B,iBAHtBA,EAAUA,GAAW,MAInBA,EAAU,CAACe,SAAUf,IAGvB,IAAIY,EAASpC,EAAemC,UAAUC,OAAOI,KAAKf,MAQlD,GALoB,iBAATa,IACTA,EAAQ,GAAKA,GAIXG,MAAMC,QAAQJ,GAGhBb,KAAKkB,OAAO,IAAIC,MAAM,kCAHxB,CAOA,IAAIC,EAASpB,KAAKqB,iBAAiBT,EAAOC,EAAOd,GAC7CuB,EAAStB,KAAKuB,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,EAASiH,GAClBnG,EAAUH,EAAS,CACjB0G,KAAMJ,EAAOI,KACb3H,KAAMuH,EAAOK,SACbC,KAAMN,EAAOO,SACbC,SAAUR,EAAOQ,UAChBN,KAKHrG,EAAUH,EAASsG,EAAQE,IAEdE,OACXvG,EAAQuG,KAA2B,UAApBvG,EAAQ2G,SAAuB,IAAM,IAKxD3G,EAAQ6C,QAAU5C,KAAKqE,WAAW6B,EAAOtD,SAIvCuD,EADsB,UAApBpG,EAAQ2G,SACA3H,EAAMoH,QAAQpG,GAEdlB,EAAKsH,QAAQpG,GAIzBC,KAAK0F,UAAU,SAASjD,EAAKZ,GAC3B,GAAIY,GAAe,mBAARA,EACTzC,KAAKkB,OAAOuB,QAUd,GALIZ,GACFsE,EAAQQ,UAAU,iBAAkB9E,GAGtC7B,KAAK4G,KAAKT,GACNR,EAAI,CACN,IAAIkB,EAEA1E,EAAW,SAAU2E,EAAOC,GAI9B,OAHAZ,EAAQa,eAAe,QAAS7E,GAChCgE,EAAQa,eAAe,WAAYH,GAE5BlB,EAAGtF,KAAKL,KAAM8G,EAAOC,IAG9BF,EAAa1E,EAASpB,KAAKf,KAAM,MAEjCmG,EAAQtD,GAAG,QAASV,GACpBgE,EAAQtD,GAAG,WAAYgE,EAC7B,CACA,EAAI9F,KAAKf,OAEAmG,GAGTrG,EAASY,UAAUQ,OAAS,SAASuB,GAC9BzC,KAAK8G,QACR9G,KAAK8G,MAAQrE,EACbzC,KAAK+C,QACL/C,KAAKiH,KAAK,QAASxE,KAIvB3C,EAASY,UAAU6E,SAAW,WAC5B,MAAO"}
@@ -1,2 +0,0 @@
1
- "use strict";var e,r;Object.defineProperty(exports,"__esModule",{value:!0}),exports.__require=function(){return r?e:(r=1,e=function(e,r){return Object.keys(r).forEach((function(t){e[t]=e[t]||r[t]})),e})};
2
- //# sourceMappingURL=populate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"populate.js","sources":["../../../../../node_modules/form-data/lib/populate.js"],"sourcesContent":["// populates missing values\nmodule.exports = function(dst, src) {\n\n Object.keys(src).forEach(function(prop)\n {\n dst[prop] = dst[prop] || src[prop];\n });\n\n return dst;\n};\n"],"names":["populate","dst","src","Object","keys","forEach","prop"],"mappings":"yHACAA,EAAiB,SAASC,EAAKC,GAO7B,OALAC,OAAOC,KAAKF,GAAKG,SAAQ,SAASC,GAEhCL,EAAIK,GAAQL,EAAIK,IAASJ,EAAII,EACjC,IAESL"}
@@ -1,2 +0,0 @@
1
- "use strict";var e,r;Object.defineProperty(exports,"__esModule",{value:!0}),exports.__require=function(){return r?e:(r=1,e=(e,r=process.argv)=>{const t=e.startsWith("-")?"":1===e.length?"-":"--",s=r.indexOf(t+e),n=r.indexOf("--");return-1!==s&&(-1===n||s<n)})};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../node_modules/has-flag/index.js"],"sourcesContent":["'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n"],"names":["hasFlag","flag","argv","process","prefix","startsWith","length","position","indexOf","terminatorPosition"],"mappings":"yHAEcA,EAAG,CAACC,EAAMC,EAAOC,QAAQD,QACtC,MAAME,EAASH,EAAKI,WAAW,KAAO,GAAsB,IAAhBJ,EAAKK,OAAe,IAAM,KAChEC,EAAWL,EAAKM,QAAQJ,EAASH,GACjCQ,EAAqBP,EAAKM,QAAQ,MACxC,OAAqB,IAAdD,KAA4C,IAAxBE,GAA6BF,EAAWE,EAAmB"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.color=function(e){return""+e+""};
2
- //# sourceMappingURL=color.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.js","sources":["../../../../../../../node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js"],"sourcesContent":["/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return '\\u001B[33m' + d + '\\u001B[39m'\n}\n"],"names":["d"],"mappings":"kFAIO,SAAeA,GACpB,MAAO,QAAeA,EAAI,OAC5B"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.color=function(e){return""+e+""};
2
- //# sourceMappingURL=color.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.js","sources":["../../../../../../../node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js"],"sourcesContent":["/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return '\\u001B[33m' + d + '\\u001B[39m'\n}\n"],"names":["d"],"mappings":"kFAIO,SAAeA,GACpB,MAAO,QAAeA,EAAI,OAC5B"}