Lightning.ExportUtils (Lightning v2.19.0-pre)

View Source

Module that expose a function generating a complete and valid yaml string from a project and its workflows.

Summary

Functions

build_yaml_tree(workflows, project)

generate_new_yaml(project, snapshots \\ nil)

@spec generate_new_yaml(
  Lightning.Projects.Project.t(),
  [Lightning.Workflows.Snapshot.t()] | nil
) ::
  {:ok, binary()} | {:error, binary()}

Builds the project spec.

Returns {:error, message} when two entities in the project would be written under the same spec key. That is refused rather than exported, because the key is what the CLI addresses the entity by. The message names both.