FlowDelta Documentation
FlowDelta documentation
Guides for using, understanding, and extending FlowDelta.
Start here
New to the project? Read these three in order:
- Getting started: set up locally, run the tests, find your way around the code.
- Salesforce Flow primer: what a
.flow-meta.xmlfile is and how it’s structured. - Architecture: the pipeline, from parser to model to diff or snapshot to render.
Using FlowDelta
- CLI usage: file, git, Salesforce org, and as-built modes, with all options and output formats.
- Using FlowDelta from an agent covers compact reports, explain outlines, and exit codes.
- Shared metadata and Git IO: how both CLIs read local files and Git history.
- CI integration: GitLab and GitHub pipelines, MR and PR comments, and viewing artifacts in private repos.
- FlexiPageDelta: semantic diffs and wireframes for Lightning pages.
Understanding the system
- Data model reference: the core types (
GraphModel,GraphNode,FlowDiff) and how they move through the pipeline. - Architecture: what each module does, how properties are canonicalized, and the invariants that must hold.
- Rendering: the interactive HTML, element cards, layout strategy, and side panel.
Extending FlowDelta
- Section schema authoring: group a node type’s properties into meaningful sections.
- Adding new node types: support a new Salesforce Flow element.
- Publishing: build, package, and release to npm.
Working on the project
- Testing: test layout, fixtures, and how to add a case.
- Debugging and troubleshooting: parse errors, unexpected diffs, and layout problems.
- Vendoring policy: the Apache-2.0 parser, where it came from, and why you don’t edit it.
- Documentation site: preview locally, write links, and publish.
I want to
Compare flows locally or from Salesforce → Getting started, then CLI usage
Render a current Flow as an as-built snapshot → CLI usage, then Rendering
Set up CI reporting in GitLab or GitHub → CI integration, plus examples/gitlab-ci.yml or examples/github-actions.yml
Work out why a diff looks wrong → Debugging and troubleshooting, then Data model reference
Support a new Salesforce element type → Adding new node types, then Section schema authoring
Improve how changes look → Section schema authoring, then Rendering
Understand the code → Architecture, then Data model reference, then the module you care about
Write a test → Testing, then Debugging and troubleshooting
Cut a release → Publishing
Build or update the docs site → Documentation site
Which doc covers which module
| Module | Doc |
|---|---|
src/parser/ | Vendoring policy (read-only, Apache-2.0) |
src/io/ | Shared metadata and Git IO, CLI usage |
src/model/ | Data model reference, Architecture |
src/diff/ | Architecture |
src/render/ | Rendering, Section schema authoring, CLI usage (compact.ts, outline.ts, --format) |
src/ci/ | CI integration |
test/ | Testing, Debugging and troubleshooting |
Key terms
- Canonicalization: cleaning up properties before diffing: dropping coordinates and connectors, and sorting unordered arrays. See Architecture.
- Section schema: per-node-type settings that group property changes into meaningful sections, such as “Outcomes” for a decision. See Section schema authoring.
- GraphModel: the normalized form of a Flow after parsing: nodes and edges, without coordinates or connectors. See Data model reference.
- FlowDiff: the result of a comparison or an as-built snapshot: nodes and edges marked added, deleted, modified, unchanged, or present, with their properties. See Data model reference.
- Fixture: a before-and-after pair of flows used to test behavior. See Testing.
- Vendored parser: Google’s Flow Lens parser (Apache-2.0), copied in as-is and never edited. See Vendoring policy.
Conventions
- File paths are relative to the project root, for example
src/cli.ts. - Code examples use
npmandnpm runscripts. See package.json. - Terminal examples use bash. On Windows, use PowerShell or Git Bash.
- Links to source assume you have the repo cloned and open.
Contributing and license
See CONTRIBUTING.md for code style, PR expectations, and workflow.
FlowDelta’s code is MIT. The vendored parser is Apache-2.0. See LICENSE and LICENSE-APACHE.