@graffy/server 0.16.0-alpha.9 → 0.16.0

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
@@ -69,7 +69,7 @@ data: ${e.message}
69
69
  const payload = common.unpack(JSON.parse(Buffer.concat(chunks).toString()));
70
70
  if (auth && !await auth(
71
71
  op,
72
- (op === "write" ? common.encodeGraph : common.encodeQuery)(payload),
72
+ (op === "write" ? common.decodeGraph : common.decodeQuery)(payload),
73
73
  options
74
74
  )) {
75
75
  res.writeHead(401);
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import url from "url";
2
- import { unpack, pack, encodeGraph, encodeQuery } from "@graffy/common";
2
+ import { unpack, pack, decodeGraph, decodeQuery } from "@graffy/common";
3
3
  import debug from "debug";
4
4
  import { WebSocketServer } from "ws";
5
5
  const log$1 = debug("graffy:server:http");
@@ -64,7 +64,7 @@ data: ${e.message}
64
64
  const payload = unpack(JSON.parse(Buffer.concat(chunks).toString()));
65
65
  if (auth && !await auth(
66
66
  op,
67
- (op === "write" ? encodeGraph : encodeQuery)(payload),
67
+ (op === "write" ? decodeGraph : decodeQuery)(payload),
68
68
  options
69
69
  )) {
70
70
  res.writeHead(401);
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.16.0-alpha.9",
5
+ "version": "0.16.0",
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.16.0-alpha.9",
19
+ "@graffy/common": "0.16.0",
20
20
  "debug": "^4.3.3",
21
21
  "ws": "^8.4.2"
22
22
  }