Skip to content

Commit

Permalink
changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
julianbenegas committed Mar 30, 2024
1 parent a4d7281 commit 6a9d11f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/basehub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# basehub

## 3.1.3

### Patch Changes

- Hoist pump data to prevent deduping errors

## 3.1.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/basehub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "basehub",
"description": "The first AI-native content hub.",
"author": "JB <[email protected]>",
"version": "3.1.2",
"version": "3.1.3",
"license": "MIT",
"repository": "basehub-ai/basehub",
"bugs": "https://github.com/basehub-ai/basehub/issues",
Expand Down
12 changes: 8 additions & 4 deletions packages/basehub/src-react-pump/server-pump.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -49,9 +53,6 @@ export const Pump = async <Queries extends Array<PumpQuery>>({
queries,
...basehubProps
}: PumpProps<Queries>) => {
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<ResponseCache["errors"]> = [];

Expand Down Expand Up @@ -126,12 +127,15 @@ export const Pump = async <Queries extends Array<PumpQuery>>({

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 {
Expand Down
7 changes: 7 additions & 0 deletions playground/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# playground

## 0.0.62

### Patch Changes

- Updated dependencies
- [email protected]

## 0.0.61

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "playground",
"private": true,
"version": "0.0.61",
"version": "0.0.62",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down

0 comments on commit 6a9d11f

Please sign in to comment.