How flxbl-io/sfp works
sfp is a Salesforce CLI for artifact-centric development and release management. The central workflow validates a project, builds package artifacts in dependency-aware order, publishes or fetches artifacts, and deploys or releases them to Salesforce orgs. Separate command families support validation, scratch-org pools, impact analysis, profile reconciliation, changelogs, and Apex testing. The graph emphasizes documented workflow and major README capabilities; unsampled command implementations are represented by their exact enclosing paths, and their internal call links are omitted where evidence is unavailable.
Main entry points: commands CLI commands · DeployImpl.ts Deploy artifacts · SfpCommand.ts Command setup · SfpPackageBuilder.ts Package builder
Components 26
CLI workflow
- CLI commands
src/commands - Command setup
src/SfpCommand.ts - Project config
src/core/project/ProjectConfig.ts - Impact analysis
src/impl/impact - Profile tools
src/commands/profile
Packages and artifacts
- Dependency build
src/impl/parallelBuilder/BuildImpl.ts - Package builder
src/core/package/SfpPackageBuilder.ts - Package model
src/core/package/SfpPackage.ts - Package creation
src/PackageCreateCommand.ts - Artifact generation
src/core/artifacts/generators/ArtifactGenerator.ts - Artifact fetch
src/core/artifacts/ArtifactFetcher.ts - Publish artifacts
src/commands/publish.ts
Deployment and release
- Deploy artifacts
src/impl/deploy/DeployImpl.ts - Release orchestration
src/impl/release/ReleaseImpl.ts - Release definitions
src/impl/release - Org validation
src/impl/validate/ValidateImpl.ts - Changelogs
src/impl/changelog
Org lifecycle
- Salesforce orgs
- Org access
src/core/org/SFPOrg.ts - Scratch org pools
src/core/scratchorg/pool - Salesforce query
src/core/queryHelper/QueryHelper.ts
Testing and observability
- Apex testing
src/core/apextest - Package coverage
src/core/package/coverage/PackageTestCoverage.ts - Metrics sender
src/core/stats/SFPStatsSender.ts - Metric integrations
src/core/stats/nativeMetricSenderImpl
Other components
- Engineer / CI
Connections 29
- Engineer / CI → CLI commands: invokes
README.md - CLI commands → Command setup: initializes
src/SfpCommand.ts - Command setup → Project config: validates project
src/SfpCommand.ts - CLI commands → Dependency build: builds packages
- Dependency build → Package builder: builds package
src/impl/parallelBuilder/BuildImpl.ts - Package builder → Package model: creates
src/core/package/SfpPackageBuilder.ts - CLI commands → Package creation: creates packages
- Package creation → Artifact generation: generates artifacts
src/PackageCreateCommand.ts - CLI commands → Publish artifacts: publishes
README.md - Publish artifacts → Artifact fetch: fetches artifacts
src/commands/publish.ts - CLI commands → Deploy artifacts: deploys
- Deploy artifacts → Artifact fetch: fetches artifacts
src/impl/deploy/DeployImpl.ts - CLI commands → Release orchestration: runs release
- Release orchestration → Deploy artifacts: orchestrates deployment
src/impl/release/ReleaseImpl.ts - Release orchestration → Release definitions: loads definitions
src/impl/release/ReleaseImpl.ts - CLI commands → Org validation: validates orgs
- Org validation → Dependency build: builds packages
src/impl/validate/ValidateImpl.ts - Org validation → Deploy artifacts: deploys validation
src/impl/validate/ValidateImpl.ts - Deploy artifacts → Org access: uses org access
src/impl/deploy/DeployImpl.ts - Org access → Salesforce orgs: queries org
src/core/org/SFPOrg.ts - Org access → Salesforce query: runs queries
src/core/org/SFPOrg.ts - CLI commands → Scratch org pools: manages pools
- CLI commands → Impact analysis: analyzes changes
- CLI commands → Profile tools: reconciles profiles
- CLI commands → Changelogs: generates changelogs
- CLI commands → Apex testing: runs Apex tests
- Package builder → Package coverage: coverage capability
- Command setup → Metrics sender: initializes metrics
src/SfpCommand.ts - Metrics sender → Metric integrations: dispatches metrics
src/core/stats/SFPStatsSender.ts