@graffy/server 0.16.14 → 0.16.15-alpha.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const url = require("url");
3
+ const url = require("node:url");
4
4
  const common = require("@graffy/common");
5
5
  const debug = require("debug");
6
6
  const ws = require("ws");
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import url from "url";
1
+ import url from "node:url";
2
2
  import { unpack, pack, decodeGraph, decodeQuery } from "@graffy/common";
3
3
  import debug from "debug";
4
4
  import { WebSocketServer } from "ws";
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.14",
5
+ "version": "0.16.15-alpha.3",
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.14",
19
+ "@graffy/common": "0.16.15-alpha.3",
20
20
  "debug": "^4.3.3",
21
21
  "ws": "^8.11.0"
22
22
  }
@@ -6,7 +6,7 @@
6
6
  * } | undefined} options
7
7
  * @returns
8
8
  */
9
- export default function server(store: any, { auth }?: {
9
+ export default function server(store: GraffyStore, { auth }?: {
10
10
  auth?: (operation: string, payload: any, options: any) => Promise<boolean>;
11
- }): (req: any, res: any) => Promise<void>;
12
- export type GraffyStore = any;
11
+ } | undefined): (req: any, res: any) => Promise<void>;
12
+ export type GraffyStore = import('@graffy/core').default;