@withone/cli 1.47.4 → 1.47.5

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
@@ -3405,6 +3405,7 @@ function validateSelectorReferences(flow2, rootDir) {
3405
3405
  }
3406
3406
  }
3407
3407
  function checkStep(step, pathPrefix, preceding2) {
3408
+ const subtreeIds = /* @__PURE__ */ new Set();
3408
3409
  if (step.if) checkSelectors(extractSelectors(step.if), `${pathPrefix}.if`, preceding2);
3409
3410
  if (step.unless) checkSelectors(extractSelectors(step.unless), `${pathPrefix}.unless`, preceding2);
3410
3411
  if (Array.isArray(step.requires)) {
@@ -3460,18 +3461,23 @@ function validateSelectorReferences(flow2, rootDir) {
3460
3461
  if (c && Array.isArray(c[fieldName])) {
3461
3462
  const childPreceding = new Set(preceding2);
3462
3463
  c[fieldName].forEach((s, i) => {
3463
- checkStep(s, `${pathPrefix}.${configKey}.${fieldName}[${i}]`, childPreceding);
3464
+ const childSubtree = checkStep(s, `${pathPrefix}.${configKey}.${fieldName}[${i}]`, childPreceding);
3464
3465
  childPreceding.add(s.id);
3466
+ for (const id of childSubtree) childPreceding.add(id);
3467
+ subtreeIds.add(s.id);
3468
+ for (const id of childSubtree) subtreeIds.add(id);
3465
3469
  });
3466
3470
  }
3467
3471
  }
3468
3472
  }
3469
3473
  }
3474
+ return subtreeIds;
3470
3475
  }
3471
3476
  const preceding = /* @__PURE__ */ new Set();
3472
3477
  flow2.steps.forEach((step, i) => {
3473
- checkStep(step, `steps[${i}]`, preceding);
3478
+ const subtree = checkStep(step, `steps[${i}]`, preceding);
3474
3479
  preceding.add(step.id);
3480
+ for (const id of subtree) preceding.add(id);
3475
3481
  });
3476
3482
  return errors;
3477
3483
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withone/cli",
3
- "version": "1.47.4",
3
+ "version": "1.47.5",
4
4
  "description": "CLI for managing One",
5
5
  "type": "module",
6
6
  "files": [
@@ -391,7 +391,7 @@ Use when fetching from 2+ independent data sources before combining results. Eac
391
391
  }
392
392
  ```
393
393
 
394
- After a parallel step, access each substep's output by its `id`: `$.steps.fetchEmails.response`, `$.steps.fetchEvents.response`.
394
+ After a parallel step, access each substep's output by its `id`: `$.steps.fetchEmails.response`, `$.steps.fetchEvents.response`. Each substep also carries its own result metadata — `$.steps.<id>.status` (`"success"` | `"failed"` | `"timeout"` | `"skipped"`), `.error`, `.errorCode` (e.g. `"TIMEOUT"`), `.durationMs` — so a downstream gate can tell a timed-out substep (retry-able) from one that genuinely returned nothing: `$.steps.fetchEvents.status === 'timeout'`. These substep references resolve at runtime (the engine stores each child in the context) and `flow validate` recognizes them — referencing a parallel/`loop`/`while`/`condition` child from a later step is not a forward-reference error.
395
395
 
396
396
  ### `file-read` / `file-write` — Filesystem access
397
397