@faasjs/request 5.0.0 → 6.0.0-beta.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/dist/{index.js → index.cjs} +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +7 -12
|
@@ -26,7 +26,7 @@ function querystringify(obj) {
|
|
|
26
26
|
for (key in obj) {
|
|
27
27
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
28
28
|
value = obj[key];
|
|
29
|
-
if (!value && (value === null || value ===
|
|
29
|
+
if (!value && (value === null || value === undefined || Number.isNaN(value))) {
|
|
30
30
|
value = "";
|
|
31
31
|
}
|
|
32
32
|
key = encodeURIComponent(key);
|
|
@@ -112,7 +112,7 @@ async function request(url$1, options = { headers: {} }) {
|
|
|
112
112
|
res.headers["content-type"]
|
|
113
113
|
);
|
|
114
114
|
options.downloadStream.end();
|
|
115
|
-
resolve(
|
|
115
|
+
resolve(undefined);
|
|
116
116
|
});
|
|
117
117
|
res.pipe(options.downloadStream, { end: true });
|
|
118
118
|
return;
|
|
@@ -130,7 +130,7 @@ async function request(url$1, options = { headers: {} }) {
|
|
|
130
130
|
res.headers["content-type"],
|
|
131
131
|
stream2.bytesWritten
|
|
132
132
|
);
|
|
133
|
-
resolve(
|
|
133
|
+
resolve(undefined);
|
|
134
134
|
});
|
|
135
135
|
res.pipe(stream2, { end: true });
|
|
136
136
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ function querystringify(obj) {
|
|
|
19
19
|
for (key in obj) {
|
|
20
20
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
21
21
|
value = obj[key];
|
|
22
|
-
if (!value && (value === null || value ===
|
|
22
|
+
if (!value && (value === null || value === undefined || Number.isNaN(value))) {
|
|
23
23
|
value = "";
|
|
24
24
|
}
|
|
25
25
|
key = encodeURIComponent(key);
|
|
@@ -105,7 +105,7 @@ async function request(url, options = { headers: {} }) {
|
|
|
105
105
|
res.headers["content-type"]
|
|
106
106
|
);
|
|
107
107
|
options.downloadStream.end();
|
|
108
|
-
resolve(
|
|
108
|
+
resolve(undefined);
|
|
109
109
|
});
|
|
110
110
|
res.pipe(options.downloadStream, { end: true });
|
|
111
111
|
return;
|
|
@@ -123,7 +123,7 @@ async function request(url, options = { headers: {} }) {
|
|
|
123
123
|
res.headers["content-type"],
|
|
124
124
|
stream2.bytesWritten
|
|
125
125
|
);
|
|
126
|
-
resolve(
|
|
126
|
+
resolve(undefined);
|
|
127
127
|
});
|
|
128
128
|
res.pipe(stream2, { end: true });
|
|
129
129
|
return;
|
package/package.json
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/request",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
17
|
-
"default": "./dist/index.js"
|
|
18
|
-
}
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
19
14
|
}
|
|
20
15
|
},
|
|
21
16
|
"homepage": "https://faasjs.com/doc/request",
|
|
@@ -35,10 +30,10 @@
|
|
|
35
30
|
"dist"
|
|
36
31
|
],
|
|
37
32
|
"peerDependencies": {
|
|
38
|
-
"@faasjs/logger": "
|
|
33
|
+
"@faasjs/logger": "6.0.0-beta.0"
|
|
39
34
|
},
|
|
40
35
|
"devDependencies": {
|
|
41
|
-
"@faasjs/logger": "
|
|
36
|
+
"@faasjs/logger": "6.0.0-beta.0"
|
|
42
37
|
},
|
|
43
38
|
"engines": {
|
|
44
39
|
"node": ">=22.0.0",
|