@puckeditor/cloud-client 0.8.0-canary.06341da7 → 0.8.0-canary.0b0a5df7

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.
@@ -22183,7 +22183,7 @@ async function* iterateSSE(body) {
22183
22183
 
22184
22184
  // src/lib/cloud-api.ts
22185
22185
  var DEFAULT_API_VERSION = "v2";
22186
- var CLOUD_CLIENT_VERSION = true ? "0.8.0-canary.06341da7" : "unknown";
22186
+ var CLOUD_CLIENT_VERSION = true ? "0.8.0-canary.0b0a5df7" : "unknown";
22187
22187
  var cloudApi = async (path, body, options = {}, onChunk, forwardHeaders) => {
22188
22188
  const {
22189
22189
  ai = {},
@@ -22299,6 +22299,9 @@ async function generate({
22299
22299
  throw new Error(chunk.errorText);
22300
22300
  }
22301
22301
  });
22302
+ if (result === null) {
22303
+ throw new Error("Puck generate did not return any data");
22304
+ }
22302
22305
  return result;
22303
22306
  }
22304
22307
 
@@ -22226,7 +22226,7 @@ async function* iterateSSE(body) {
22226
22226
 
22227
22227
  // src/lib/cloud-api.ts
22228
22228
  var DEFAULT_API_VERSION = "v2";
22229
- var CLOUD_CLIENT_VERSION = true ? "0.8.0-canary.06341da7" : "unknown";
22229
+ var CLOUD_CLIENT_VERSION = true ? "0.8.0-canary.0b0a5df7" : "unknown";
22230
22230
  var cloudApi = async (path, body, options = {}, onChunk, forwardHeaders) => {
22231
22231
  const {
22232
22232
  ai = {},
@@ -22828,6 +22828,9 @@ async function generate({
22828
22828
  throw new Error(chunk.errorText);
22829
22829
  }
22830
22830
  });
22831
+ if (result === null) {
22832
+ throw new Error("Puck generate did not return any data");
22833
+ }
22831
22834
  return result;
22832
22835
  }
22833
22836
 
@@ -11,7 +11,7 @@ import {
11
11
  getAttachment,
12
12
  handlePuckRequest,
13
13
  tool
14
- } from "./chunk-6RVH4CHC.mjs";
14
+ } from "./chunk-DH24P63C.mjs";
15
15
  import {
16
16
  init_react_import
17
17
  } from "./chunk-O6DC5HI2.mjs";
package/dist/index.d.mts CHANGED
@@ -78,7 +78,7 @@ type GenerateParams = {
78
78
  apiKey?: string;
79
79
  onFinish?: OnFinishCallback;
80
80
  };
81
- declare function generate({ prompt, config, pageData, context, tools, apiKey, host, onFinish, }: GenerateParams): Promise<null>;
81
+ declare function generate({ prompt, config, pageData, context, tools, apiKey, host, onFinish, }: GenerateParams): Promise<Data>;
82
82
 
83
83
  declare function puckHandler(request: Request, options?: PuckCloudOptions): Promise<Response>;
84
84
 
package/dist/index.d.ts CHANGED
@@ -78,7 +78,7 @@ type GenerateParams = {
78
78
  apiKey?: string;
79
79
  onFinish?: OnFinishCallback;
80
80
  };
81
- declare function generate({ prompt, config, pageData, context, tools, apiKey, host, onFinish, }: GenerateParams): Promise<null>;
81
+ declare function generate({ prompt, config, pageData, context, tools, apiKey, host, onFinish, }: GenerateParams): Promise<Data>;
82
82
 
83
83
  declare function puckHandler(request: Request, options?: PuckCloudOptions): Promise<Response>;
84
84
 
package/dist/index.js CHANGED
@@ -22228,7 +22228,7 @@ async function* iterateSSE(body) {
22228
22228
 
22229
22229
  // src/lib/cloud-api.ts
22230
22230
  var DEFAULT_API_VERSION = "v2";
22231
- var CLOUD_CLIENT_VERSION = true ? "0.8.0-canary.06341da7" : "unknown";
22231
+ var CLOUD_CLIENT_VERSION = true ? "0.8.0-canary.0b0a5df7" : "unknown";
22232
22232
  var cloudApi = async (path, body, options = {}, onChunk, forwardHeaders) => {
22233
22233
  const {
22234
22234
  ai = {},
@@ -22344,6 +22344,9 @@ async function generate({
22344
22344
  throw new Error(chunk.errorText);
22345
22345
  }
22346
22346
  });
22347
+ if (result === null) {
22348
+ throw new Error("Puck generate did not return any data");
22349
+ }
22347
22350
  return result;
22348
22351
  }
22349
22352
 
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  generate,
5
5
  puckHandler,
6
6
  tool
7
- } from "./chunk-6RVH4CHC.mjs";
7
+ } from "./chunk-DH24P63C.mjs";
8
8
  import "./chunk-O6DC5HI2.mjs";
9
9
  export {
10
10
  chat,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/cloud-client",
3
- "version": "0.8.0-canary.06341da7",
3
+ "version": "0.8.0-canary.0b0a5df7",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",