graphlit-client 1.0.20250611003 → 1.0.20250611005

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/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ApolloClient: any, InMemoryCache: any, createHttpLink: any, ApolloLink: any;
1
+ export declare const ApolloClient: any, InMemoryCache: any, createHttpLink: any, ApolloLink: any, ApolloError: any;
2
2
  import type { ApolloClient as ApolloClientType, NormalizedCacheObject } from "@apollo/client";
3
3
  import * as Types from "./generated/graphql-types.js";
4
4
  import { AgentOptions, AgentResult, StreamAgentOptions, ToolHandler } from "./types/agent.js";
package/dist/client.js CHANGED
@@ -1,11 +1,10 @@
1
- // Runtime import via createRequire
2
1
  import { createRequire } from "node:module";
3
2
  const require = createRequire(import.meta.url);
4
- const apollo = require("@apollo/client");
5
- // Runtime value import
6
- const { ApolloError } = require("@apollo/client/core/core.cjs");
7
- export const { ApolloClient, InMemoryCache, createHttpLink, ApolloLink } = apollo;
8
- import * as jwt from "jsonwebtoken";
3
+ // Load the core-only CommonJS build (no React, no rehackt)
4
+ const apolloCore = require("@apollo/client/core/core.cjs");
5
+ export const { ApolloClient, InMemoryCache, createHttpLink, ApolloLink, ApolloError, // runtime value
6
+ } = apolloCore;
7
+ import { sign } from "jsonwebtoken";
9
8
  import * as Types from "./generated/graphql-types.js";
10
9
  import * as Documents from "./generated/graphql-documents.js";
11
10
  import * as dotenv from "dotenv";
@@ -185,7 +184,7 @@ class Graphlit {
185
184
  iss: "graphlit",
186
185
  aud: "https://portal.graphlit.io",
187
186
  };
188
- this.token = jwt.sign(payload, this.jwtSecret, { algorithm: "HS256" });
187
+ this.token = sign(payload, this.jwtSecret, { algorithm: "HS256" });
189
188
  }
190
189
  async getProject() {
191
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.20250611003",
3
+ "version": "1.0.20250611005",
4
4
  "description": "Graphlit API Client for TypeScript",
5
5
  "main": "dist/client.js",
6
6
  "types": "dist/client.d.ts",