@k03mad/request 5.6.3 → 5.7.0
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.
- package/.github/workflows/publish.yml +1 -1
- package/app/lib/curl.js +1 -1
- package/app/lib/queue.js +1 -1
- package/app/lib/request.js +2 -2
- package/package.json +2 -2
package/app/lib/curl.js
CHANGED
|
@@ -31,7 +31,7 @@ const SKIP_HEADERS = new Set(['accept-encoding: gzip, deflate, br']);
|
|
|
31
31
|
* @param {boolean} [params.skipResponse]
|
|
32
32
|
* @returns {string}
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export const getCurl = (res, {body, form, json}, {skipResponse} = {}) => {
|
|
35
35
|
const msg = [];
|
|
36
36
|
|
|
37
37
|
const response = res?.response || res;
|
package/app/lib/queue.js
CHANGED
|
@@ -47,7 +47,7 @@ const getLoggedQueue = (host, opts) => {
|
|
|
47
47
|
* @param {number} [params.rps]
|
|
48
48
|
* @returns {object}
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
50
|
+
export const getQueue = (host, params = {}) => {
|
|
51
51
|
if (requestQueue[host]?._events) {
|
|
52
52
|
return requestQueue[host];
|
|
53
53
|
}
|
package/app/lib/request.js
CHANGED
|
@@ -3,8 +3,8 @@ import _debug from 'debug';
|
|
|
3
3
|
import got from 'got';
|
|
4
4
|
import stripAnsi from 'strip-ansi';
|
|
5
5
|
|
|
6
|
-
import getCurl from './curl.js';
|
|
7
|
-
import getQueue from './queue.js';
|
|
6
|
+
import {getCurl} from './curl.js';
|
|
7
|
+
import {getQueue} from './queue.js';
|
|
8
8
|
|
|
9
9
|
const {blue, cyan, dim, green, red, yellow} = chalk;
|
|
10
10
|
const debug = _debug('mad:request');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/request",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Request library",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"strip-ansi": "7.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@k03mad/eslint-config": "20.
|
|
27
|
+
"@k03mad/eslint-config": "20.8.0",
|
|
28
28
|
"eslint": "8.57.0",
|
|
29
29
|
"husky": "9.0.11"
|
|
30
30
|
},
|