graphlit-client 1.0.20250611006 → 1.0.20250611008

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,3 @@
1
- export declare const ApolloClient: any, InMemoryCache: any, createHttpLink: any, ApolloLink: any, ApolloError: any;
2
1
  import type { ApolloClient as ApolloClientType, NormalizedCacheObject } from "@apollo/client";
3
2
  import * as Types from "./generated/graphql-types.js";
4
3
  import { AgentOptions, AgentResult, StreamAgentOptions, ToolHandler } from "./types/agent.js";
package/dist/client.js CHANGED
@@ -1,10 +1,9 @@
1
+ // jwt v9 – use named export
2
+ import { sign } from "jsonwebtoken";
3
+ // Apollo core (React-free) via createRequire
1
4
  import { createRequire } from "node:module";
2
5
  const require = createRequire(import.meta.url);
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";
6
+ const { ApolloClient, InMemoryCache, createHttpLink, ApolloLink, ApolloError, } = require("@apollo/client/core/core.cjs");
8
7
  import * as Types from "./generated/graphql-types.js";
9
8
  import * as Documents from "./generated/graphql-documents.js";
10
9
  import * as dotenv from "dotenv";
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20250611006",
3
+ "version": "1.0.20250611008",
4
4
  "description": "Graphlit API Client for TypeScript",
5
- "main": "dist/client.js",
6
- "types": "dist/client.d.ts",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
7
8
  "repository": {
8
9
  "type": "git",
9
10
  "url": "git+https://github.com/graphlit/graphlit-client-typescript.git"
@@ -12,12 +13,13 @@
12
13
  "Kirk Marple (https://github.com/kirk-marple)"
13
14
  ],
14
15
  "engines": {
15
- "node": ">=14.0.0"
16
+ "node": ">=18.0.0"
16
17
  },
17
18
  "scripts": {
18
19
  "generate": "graphql-codegen --config codegen.yml",
19
20
  "format": "prettier --write .",
20
21
  "build": "tsc -p tsconfig.json",
22
+ "prepublishOnly": "npm run build",
21
23
  "test": "vitest",
22
24
  "test:watch": "vitest --watch",
23
25
  "test:coverage": "vitest --coverage",
@@ -46,9 +48,6 @@
46
48
  "jsonwebtoken": "^9.0.2",
47
49
  "prettier": "^3.5.3"
48
50
  },
49
- "peerDependencies": {
50
- "jsonwebtoken": ">=9"
51
- },
52
51
  "peerDependenciesMeta": {
53
52
  "openai": {
54
53
  "optional": true
@@ -60,19 +59,18 @@
60
59
  "optional": true
61
60
  }
62
61
  },
62
+ "optionalDependencies": {
63
+ "@anthropic-ai/sdk": "^0.53.0",
64
+ "@google/generative-ai": "^0.24.1",
65
+ "openai": "^5.2.0"
66
+ },
63
67
  "devDependencies": {
64
68
  "@graphql-codegen/typescript-document-nodes": "^4.0.16",
65
69
  "@types/jsonwebtoken": "^9.0.9",
66
70
  "@types/node": "^20.0.0",
67
71
  "@vitest/coverage-v8": "^1.0.0",
68
72
  "dotenv": "^16.5.0",
69
- "react": "^19.1.0",
70
73
  "typescript": "^5.8.2",
71
74
  "vitest": "^1.0.0"
72
- },
73
- "optionalDependencies": {
74
- "@anthropic-ai/sdk": "^0.53.0",
75
- "@google/generative-ai": "^0.24.1",
76
- "openai": "^5.2.0"
77
75
  }
78
76
  }