flowscale 1.0.17-beta.2 → 1.0.17-beta.3

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/README.md CHANGED
@@ -159,28 +159,7 @@ console.log('Queue Details:', queue);
159
159
 
160
160
  ---
161
161
 
162
- ### 3. `warmUp()`
163
-
164
- **Description:**
165
- Warms up the ComfyUI instances in the cluster to prepare them for processing workflows.
166
-
167
- **Usage:**
168
- ```javascript
169
- const warmUpResult = await flowscale.warmUp();
170
- console.log('Warm-up Result:', warmUpResult);
171
- ```
172
-
173
- **Response Example:**
174
- ```json
175
- {
176
- "status": "success",
177
- "message": "ComfyUI instances warmed up successfully"
178
- }
179
- ```
180
-
181
- ---
182
-
183
- ### 4. `getWorkflows()`
162
+ ### 3. `getWorkflows()`
184
163
 
185
164
  **Description:**
186
165
  Retrieves the list of all deployed workflows available in the cluster.
@@ -216,7 +195,7 @@ console.log('Available Workflows:', workflows);
216
195
 
217
196
  ---
218
197
 
219
- ### 5. `executeWorkflow(workflowId, data, groupId?)`
198
+ ### 4. `executeWorkflow(workflowId, data, groupId?)`
220
199
 
221
200
  **Description:**
222
201
  Trigger a workflow execution using its unique `workflowId`. Input data and an optional `groupId` can be provided for better organization and tracking.
@@ -258,7 +237,7 @@ console.log('Workflow Result:', result);
258
237
 
259
238
  ---
260
239
 
261
- ### 5.1 `executeWorkflowAsync(workflowId, data, groupId?, pollIntervalMs?, timeoutMs?)`
240
+ ### 5 `executeWorkflowAsync(workflowId, data, groupId?, pollIntervalMs?, timeoutMs?)`
262
241
 
263
242
  **Description:**
264
243
  Execute a workflow and automatically wait for the result by polling the output. This is a convenience method that combines `executeWorkflow` and `getOutput` with automatic polling.
package/dist/index.js CHANGED
@@ -184,8 +184,10 @@ var FlowscaleAPI = /** @class */ (function () {
184
184
  return [4 /*yield*/, this.getOutput(outputName)];
185
185
  case 4:
186
186
  output = _c.sent();
187
- if (output !== null) {
188
- return [2 /*return*/, output];
187
+ if (output) {
188
+ if (output.status === 'success' && output.data.generation_status === 'completed') {
189
+ return [2 /*return*/, output];
190
+ }
189
191
  }
190
192
  return [3 /*break*/, 6];
191
193
  case 5:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowscale",
3
- "version": "1.0.17-beta.2",
3
+ "version": "1.0.17-beta.3",
4
4
  "description": "An NPM library for communicating with the Flowscale APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",