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 +1 -1
- package/dist/client.js +6 -7
- package/package.json +1 -1
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
|
-
|
5
|
-
|
6
|
-
const { ApolloError
|
7
|
-
|
8
|
-
import
|
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 =
|
187
|
+
this.token = sign(payload, this.jwtSecret, { algorithm: "HS256" });
|
189
188
|
}
|
190
189
|
async getProject() {
|
191
190
|
return this.queryAndCheckError(Documents.GetProject, {});
|