@k03mad/request 6.0.0 → 6.0.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.
@@ -22,7 +22,7 @@ const cacheGotResponseKeys = [
22
22
 
23
23
  const gotDefaultOpts = got.extend({
24
24
  dnsCache: true,
25
- headers: {'user-agent': 'curl/8.5.0'},
25
+ headers: {'user-agent': 'curl/7.81.0'},
26
26
  timeout: {request: 10_000},
27
27
  });
28
28
 
@@ -35,7 +35,7 @@ const cacheDebug = msgArr => {
35
35
  /**
36
36
  * @param {string} url
37
37
  * @param {object} opts
38
- * @returns {import('got').Response}
38
+ * @returns {Promise<import('got').Response>}
39
39
  */
40
40
  const sendRequest = async (url, opts) => {
41
41
  try {
@@ -87,7 +87,7 @@ const sendRequest = async (url, opts) => {
87
87
  * @param {number} [params.concurrency]
88
88
  * @param {number} [params.rpm]
89
89
  * @param {number} [params.rps]
90
- * @returns {import('got').Response}
90
+ * @returns {Promise<import('got').Response>}
91
91
  */
92
92
  export const request = (url, opts = {}, params = {}) => {
93
93
  const queue = getQueue(params.queueBy || new URL(url).host, params);
@@ -104,7 +104,7 @@ export const request = (url, opts = {}, params = {}) => {
104
104
  * @param {number} [params.concurrency]
105
105
  * @param {number} [params.rpm]
106
106
  * @param {number} [params.rps]
107
- * @returns {import('got').Response}
107
+ * @returns {Promise<import('got').Response>}
108
108
  */
109
109
  export const requestCache = (url, opts = {}, {cacheBy, expire = 43_200, queueBy, ...params} = {}) => {
110
110
  const queue = getQueue(queueBy || new URL(url).host, params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/request",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Request library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"