diff --git a/packages/basehub/CHANGELOG.md b/packages/basehub/CHANGELOG.md index fc066a1..c4a7869 100644 --- a/packages/basehub/CHANGELOG.md +++ b/packages/basehub/CHANGELOG.md @@ -1,5 +1,11 @@ # basehub +## 3.1.3 + +### Patch Changes + +- Hoist pump data to prevent deduping errors + ## 3.1.2 ### Patch Changes diff --git a/packages/basehub/package.json b/packages/basehub/package.json index 0639b04..364eefe 100644 --- a/packages/basehub/package.json +++ b/packages/basehub/package.json @@ -2,7 +2,7 @@ "name": "basehub", "description": "The first AI-native content hub.", "author": "JB ", - "version": "3.1.2", + "version": "3.1.3", "license": "MIT", "repository": "basehub-ai/basehub", "bugs": "https://github.com/basehub-ai/basehub/issues", diff --git a/packages/basehub/src-react-pump/server-pump.tsx b/packages/basehub/src-react-pump/server-pump.tsx index f3110dd..7f76e62 100644 --- a/packages/basehub/src-react-pump/server-pump.tsx +++ b/packages/basehub/src-react-pump/server-pump.tsx @@ -28,6 +28,10 @@ const cache = new Map< } >(); +let pumpToken: string | null = null; +let spaceID: string | null = null; +let pusherData: ResponseCache["pusherData"] | null = null; + const DEDUPE_TIME_MS = 500; let logDone = false; @@ -49,9 +53,6 @@ export const Pump = async >({ queries, ...basehubProps }: PumpProps) => { - let pumpToken: string | null = null; - let spaceID: string | null = null; - let pusherData: ResponseCache["pusherData"] | null = null; // passed to the client to toast const errors: Array = []; @@ -126,12 +127,15 @@ export const Pump = async >({ if (draft) { if (!pumpToken || !spaceID || !pusherData) { + console.log("Results (length):", results?.length); console.log("Errors:", JSON.stringify(errors, null, 2)); console.log("Pump Endpoint:", pumpEndpoint); console.log("Pump Token:", pumpToken); console.log("Space ID:", spaceID); console.log("Pusher Data:", pusherData); - throw new Error("Pump did not return the necessary data"); + throw new Error( + "Pump did not return the necessary data. Look at the logs to see what's missing." + ); } try { diff --git a/playground/CHANGELOG.md b/playground/CHANGELOG.md index 63ad62d..9769271 100644 --- a/playground/CHANGELOG.md +++ b/playground/CHANGELOG.md @@ -1,5 +1,12 @@ # playground +## 0.0.62 + +### Patch Changes + +- Updated dependencies + - basehub@3.1.3 + ## 0.0.61 ### Patch Changes diff --git a/playground/package.json b/playground/package.json index 2ccb725..13c3449 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,7 +1,7 @@ { "name": "playground", "private": true, - "version": "0.0.61", + "version": "0.0.62", "scripts": { "dev": "next dev", "build": "next build",