miolo-cli 3.0.0-beta.181 → 3.0.0-beta.183
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/package.json +2 -2
- package/src/fetcher/fetcher.mjs +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miolo-cli",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.183",
|
|
4
4
|
"description": "cli utils for miolo",
|
|
5
5
|
"author": "Donato Lorenzo <donato@afialapis.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prepublishOnly": "npm run lint"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"qs": "^6.15.
|
|
33
|
+
"qs": "^6.15.1",
|
|
34
34
|
"socket.io-client": "^4.8.3"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
package/src/fetcher/fetcher.mjs
CHANGED
|
@@ -73,6 +73,15 @@ class Fetcher {
|
|
|
73
73
|
|
|
74
74
|
const response = await fetch(wurl, request)
|
|
75
75
|
|
|
76
|
+
if (response.ok === false) {
|
|
77
|
+
return {
|
|
78
|
+
ok: false,
|
|
79
|
+
status: response.status,
|
|
80
|
+
response,
|
|
81
|
+
error: response.statusText
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
76
85
|
if (response.redirected) {
|
|
77
86
|
const isBrowser = typeof window === "object"
|
|
78
87
|
if (isBrowser) {
|