@graffy/server 0.15.25 → 0.16.0-alpha.1

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.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.mjs +2 -2
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -15,7 +15,7 @@ function server$1(store, { auth } = {}) {
15
15
  const parsed = url__default.default.parse(req.url, true);
16
16
  const options = parsed.query.opts && !Array.isArray(parsed.query.opts) && common.deserialize(decodeURIComponent(parsed.query.opts)) || void 0;
17
17
  if (req.method === "GET") {
18
- const query = parsed.query.q && common.decodeUrl(parsed.query.q);
18
+ const query = parsed.query.q && common.deserialize(decodeURIComponent(parsed.query.q));
19
19
  try {
20
20
  if (req.headers["accept"] === "text/event-stream") {
21
21
  res.setHeader("content-type", "text/event-stream");
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import url from "url";
2
- import { deserialize, decodeUrl, serialize } from "@graffy/common";
2
+ import { deserialize, serialize } from "@graffy/common";
3
3
  import debug from "debug";
4
4
  import { WebSocketServer } from "ws";
5
5
  const log$1 = debug("graffy:server:http");
@@ -10,7 +10,7 @@ function server$1(store, { auth } = {}) {
10
10
  const parsed = url.parse(req.url, true);
11
11
  const options = parsed.query.opts && !Array.isArray(parsed.query.opts) && deserialize(decodeURIComponent(parsed.query.opts)) || void 0;
12
12
  if (req.method === "GET") {
13
- const query = parsed.query.q && decodeUrl(parsed.query.q);
13
+ const query = parsed.query.q && deserialize(decodeURIComponent(parsed.query.q));
14
14
  try {
15
15
  if (req.headers["accept"] === "text/event-stream") {
16
16
  res.setHeader("content-type", "text/event-stream");
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.15.25",
5
+ "version": "0.16.0-alpha.1",
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.15.25",
19
+ "@graffy/common": "0.16.0-alpha.1",
20
20
  "debug": "^4.3.3",
21
21
  "ws": "^8.4.2"
22
22
  }