graphlit-client 1.0.20250611004 → 1.0.20250611006

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 (2) hide show
  1. package/dist/client.js +2 -2
  2. package/package.json +5 -1
package/dist/client.js CHANGED
@@ -4,7 +4,7 @@ const require = createRequire(import.meta.url);
4
4
  const apolloCore = require("@apollo/client/core/core.cjs");
5
5
  export const { ApolloClient, InMemoryCache, createHttpLink, ApolloLink, ApolloError, // runtime value
6
6
  } = apolloCore;
7
- import * as jwt from "jsonwebtoken";
7
+ import { sign } from "jsonwebtoken";
8
8
  import * as Types from "./generated/graphql-types.js";
9
9
  import * as Documents from "./generated/graphql-documents.js";
10
10
  import * as dotenv from "dotenv";
@@ -184,7 +184,7 @@ class Graphlit {
184
184
  iss: "graphlit",
185
185
  aud: "https://portal.graphlit.io",
186
186
  };
187
- this.token = jwt.sign(payload, this.jwtSecret, { algorithm: "HS256" });
187
+ this.token = sign(payload, this.jwtSecret, { algorithm: "HS256" });
188
188
  }
189
189
  async getProject() {
190
190
  return this.queryAndCheckError(Documents.GetProject, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20250611004",
3
+ "version": "1.0.20250611006",
4
4
  "description": "Graphlit API Client for TypeScript",
5
5
  "main": "dist/client.js",
6
6
  "types": "dist/client.d.ts",
@@ -46,6 +46,9 @@
46
46
  "jsonwebtoken": "^9.0.2",
47
47
  "prettier": "^3.5.3"
48
48
  },
49
+ "peerDependencies": {
50
+ "jsonwebtoken": ">=9"
51
+ },
49
52
  "peerDependenciesMeta": {
50
53
  "openai": {
51
54
  "optional": true
@@ -63,6 +66,7 @@
63
66
  "@types/node": "^20.0.0",
64
67
  "@vitest/coverage-v8": "^1.0.0",
65
68
  "dotenv": "^16.5.0",
69
+ "react": "^19.1.0",
66
70
  "typescript": "^5.8.2",
67
71
  "vitest": "^1.0.0"
68
72
  },