@kb-labs/workflow-daemon 2.117.0 → 2.118.1

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/index.js CHANGED
@@ -2260,7 +2260,7 @@ var WorkflowHostService = class {
2260
2260
  (run) => run.name === workflowId || workflowName && run.name === workflowName
2261
2261
  );
2262
2262
  if (filters?.status) {
2263
- runs = runs.filter((run) => run.status === filters.status);
2263
+ runs = runs.filter((run) => mapRunStatusToJobStatus(run.status) === filters.status);
2264
2264
  }
2265
2265
  runs.sort((a, b) => new Date(b.createdAt ?? 0).getTime() - new Date(a.createdAt ?? 0).getTime());
2266
2266
  const start = filters?.offset ?? 0;
@@ -2271,7 +2271,7 @@ var WorkflowHostService = class {
2271
2271
  runs: page.map((run) => ({
2272
2272
  id: run.id,
2273
2273
  workflowId,
2274
- status: run.status,
2274
+ status: mapRunStatusToJobStatus(run.status),
2275
2275
  trigger: {
2276
2276
  type: run.trigger?.type ?? "manual",
2277
2277
  user: run.trigger?.actor
@@ -2314,7 +2314,11 @@ var WorkflowHostService = class {
2314
2314
  if (!resolved) {
2315
2315
  return null;
2316
2316
  }
2317
- return await this.options.engine.getRun(resolved);
2317
+ const run = await this.options.engine.getRun(resolved);
2318
+ if (!run) {
2319
+ return null;
2320
+ }
2321
+ return { ...run, status: mapRunStatusToJobStatus(run.status) };
2318
2322
  }
2319
2323
  async listRuns(filters) {
2320
2324
  const allRuns = await this.options.engine.getAllRuns();