@db-lyon/flowkit 0.5.3 → 0.6.0

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
@@ -182,6 +182,54 @@ flows:
182
182
  2: { task: deploy }
183
183
  ```
184
184
 
185
+ A flow step's `options` override the options of tasks **inside** the nested
186
+ flow, keyed by task name. Precedence, low → high: task default → enclosing-flow
187
+ override → step's own inline options → runtime `params`.
188
+
189
+ ```yaml
190
+ release:
191
+ steps:
192
+ 1:
193
+ flow: ci
194
+ options:
195
+ test: { coverage: 90 } # overrides the `test` task's options inside `ci`
196
+ 2: { task: deploy }
197
+ ```
198
+
199
+ ### Conditional steps (`when`)
200
+
201
+ A step runs only when its `when` is truthy. It accepts a boolean, or a string
202
+ expression evaluated at run time. With no `conditionEvaluator` configured, a
203
+ string is resolved for `${...}` references and tested for truthiness; supply a
204
+ `conditionEvaluator` to plug in a real expression language. A falsy result skips
205
+ the step (`skipReason: 'when'`) without failing the flow.
206
+
207
+ ```yaml
208
+ steps:
209
+ 1: { task: build }
210
+ 2: { task: deploy, when: '${steps.1.shouldDeploy}' }
211
+ 3: { task: notify, when: false }
212
+ ```
213
+
214
+ ```typescript
215
+ new FlowRunner({
216
+ // ...
217
+ conditionEvaluator: (expr, ctx) => evalMyDsl(expr, ctx), // ctx: { steps, params, context, error }
218
+ });
219
+ ```
220
+
221
+ ### Continue on failure (`ignore_failure`)
222
+
223
+ By default any failed step aborts the flow. Mark a step `ignore_failure: true`
224
+ to record the failure but keep going (the step result has `ignoredFailure: true`).
225
+
226
+ ```yaml
227
+ steps:
228
+ 1: { task: deploy }
229
+ 2: { task: publish_release_notes, ignore_failure: true }
230
+ 3: { task: announce }
231
+ ```
232
+
185
233
  ### Skip steps
186
234
 
187
235
  Skip by task name or step number:
@@ -210,6 +258,13 @@ result.steps.forEach(s =>
210
258
  );
211
259
  ```
212
260
 
261
+ Pass `expandNestedFlows: true` to recursively expand nested-flow steps into
262
+ their child steps, each annotated with a hierarchical `path` (e.g. `2/1`):
263
+
264
+ ```typescript
265
+ await runner.run({ flowName: 'release', plan: true, expandNestedFlows: true });
266
+ ```
267
+
213
268
  ### Lifecycle hooks
214
269
 
215
270
  Attach hooks to observe or react to flow execution: