@graffy/client 0.16.0-alpha.3 → 0.16.0-alpha.4
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/index.cjs +3 -3
- package/index.mjs +3 -3
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -47,7 +47,7 @@ class AggregateQuery {
|
|
|
47
47
|
}
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
const data = await response.
|
|
50
|
+
const data = common.deserialize(await response.text());
|
|
51
51
|
for (const reader of this.readers) {
|
|
52
52
|
reader.resolve(data);
|
|
53
53
|
}
|
|
@@ -116,9 +116,9 @@ const httpClient = (baseUrl, {
|
|
|
116
116
|
method: "POST",
|
|
117
117
|
headers: { "Content-Type": "application/json" },
|
|
118
118
|
body: common.serialize(change)
|
|
119
|
-
}).then((res) => {
|
|
119
|
+
}).then(async (res) => {
|
|
120
120
|
if (res.status === 200)
|
|
121
|
-
return res.
|
|
121
|
+
return common.deserialize(await res.text());
|
|
122
122
|
return res.text().then((message) => {
|
|
123
123
|
throw Error("server." + message);
|
|
124
124
|
});
|
package/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ class AggregateQuery {
|
|
|
44
44
|
}
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
const data = await response.
|
|
47
|
+
const data = deserialize(await response.text());
|
|
48
48
|
for (const reader of this.readers) {
|
|
49
49
|
reader.resolve(data);
|
|
50
50
|
}
|
|
@@ -113,9 +113,9 @@ const httpClient = (baseUrl, {
|
|
|
113
113
|
method: "POST",
|
|
114
114
|
headers: { "Content-Type": "application/json" },
|
|
115
115
|
body: serialize(change)
|
|
116
|
-
}).then((res) => {
|
|
116
|
+
}).then(async (res) => {
|
|
117
117
|
if (res.status === 200)
|
|
118
|
-
return res.
|
|
118
|
+
return deserialize(await res.text());
|
|
119
119
|
return res.text().then((message) => {
|
|
120
120
|
throw Error("server." + message);
|
|
121
121
|
});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graffy/client",
|
|
3
3
|
"description": "Graffy client library for the browser, usin the `fetch()` or `WebSocket` APIs. This module is intended to be used with a Node.js server running Graffy Server.",
|
|
4
4
|
"author": "aravind (https://github.com/aravindet)",
|
|
5
|
-
"version": "0.16.0-alpha.
|
|
5
|
+
"version": "0.16.0-alpha.4",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./index.mjs",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@graffy/common": "0.16.0-alpha.
|
|
20
|
-
"@graffy/stream": "0.16.0-alpha.
|
|
19
|
+
"@graffy/common": "0.16.0-alpha.4",
|
|
20
|
+
"@graffy/stream": "0.16.0-alpha.4",
|
|
21
21
|
"debug": "^4.3.3"
|
|
22
22
|
}
|
|
23
23
|
}
|