ActionBlockDependencies.analyze constructor

ActionBlockDependencies.analyze(
  1. FFActionComponent actionBlock
)

Analyze an action block to extract its dependencies.

Traverses the action chain recursively to find all:

  • Custom function calls (FFFunctionCall.customFunction)
  • Custom action calls (FFAction.customAction)
  • Action block calls (FFAction.executeActionComponent)

Implementation

factory ActionBlockDependencies.analyze(FFActionComponent actionBlock) {
  final deps = ActionBlockDependencies._();

  if (!actionBlock.hasActions()) {
    return deps;
  }

  // Traverse the action chain starting from the root
  _traverseActionNode(actionBlock.actions.rootAction, deps);

  return deps;
}