@graffy/server 0.17.2 → 0.17.6
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 +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -12,9 +12,9 @@ function server$1(store, { auth } = {}) {
|
|
|
12
12
|
const optParam = parsed.query.opts && String(parsed.query.opts);
|
|
13
13
|
const options = optParam && JSON.parse(decodeURIComponent(optParam));
|
|
14
14
|
if (req.method === "GET") {
|
|
15
|
-
const qParam = parsed.query.q && String(parsed.query.q);
|
|
16
|
-
const query = qParam && common.unpack(JSON.parse(decodeURIComponent(qParam)));
|
|
17
15
|
try {
|
|
16
|
+
const qParam = parsed.query.q && String(parsed.query.q);
|
|
17
|
+
const query = qParam && common.unpack(JSON.parse(decodeURIComponent(qParam)));
|
|
18
18
|
if (req.headers.accept === "text/event-stream") {
|
|
19
19
|
res.setHeader("content-type", "text/event-stream");
|
|
20
20
|
const keepAlive = setInterval(() => {
|
package/index.mjs
CHANGED
|
@@ -10,9 +10,9 @@ function server$1(store, { auth } = {}) {
|
|
|
10
10
|
const optParam = parsed.query.opts && String(parsed.query.opts);
|
|
11
11
|
const options = optParam && JSON.parse(decodeURIComponent(optParam));
|
|
12
12
|
if (req.method === "GET") {
|
|
13
|
-
const qParam = parsed.query.q && String(parsed.query.q);
|
|
14
|
-
const query = qParam && unpack(JSON.parse(decodeURIComponent(qParam)));
|
|
15
13
|
try {
|
|
14
|
+
const qParam = parsed.query.q && String(parsed.query.q);
|
|
15
|
+
const query = qParam && unpack(JSON.parse(decodeURIComponent(qParam)));
|
|
16
16
|
if (req.headers.accept === "text/event-stream") {
|
|
17
17
|
res.setHeader("content-type", "text/event-stream");
|
|
18
18
|
const keepAlive = setInterval(() => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graffy/server",
|
|
3
3
|
"description": "Node.js library for building an API for a Graffy store.",
|
|
4
4
|
"author": "aravind (https://github.com/aravindet)",
|
|
5
|
-
"version": "0.17.
|
|
5
|
+
"version": "0.17.6",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@graffy/common": "0.17.
|
|
19
|
+
"@graffy/common": "0.17.6",
|
|
20
20
|
"debug": "^4.4.1",
|
|
21
21
|
"ws": "^8.18.2"
|
|
22
22
|
}
|