bajo-extra 0.3.5 → 0.3.7
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/bajo/helper/fetch.js +5 -0
- package/package.json +1 -3
package/bajo/helper/fetch.js
CHANGED
|
@@ -38,6 +38,11 @@ async function fetchUrl (url, opts = {}, extra = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
opts.body = formData
|
|
40
40
|
}
|
|
41
|
+
if (opts.query) {
|
|
42
|
+
// todo: what if url already contain query string?
|
|
43
|
+
const query = new URLSearchParams(opts.query)
|
|
44
|
+
url += '?' + query
|
|
45
|
+
}
|
|
41
46
|
const resp = await fetch(url, opts)
|
|
42
47
|
if (extra.rawResponse) return resp
|
|
43
48
|
return await resp.json()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bajo-extra",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Extra package for Bajo Framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,12 +28,10 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"async": "^3.2.4",
|
|
30
30
|
"bcrypt": "^5.1.1",
|
|
31
|
-
"email-addresses": "^5.0.0",
|
|
32
31
|
"fast-jwt": "^4.0.1",
|
|
33
32
|
"fast-xml-parser": "^4.3.6",
|
|
34
33
|
"numbro": "^2.5.0",
|
|
35
34
|
"performant-array-to-tree": "^1.11.0",
|
|
36
|
-
"query-string": "^8.1.0",
|
|
37
35
|
"undici": "^6.16.1"
|
|
38
36
|
}
|
|
39
37
|
}
|