Skip to content

feat: add domain-process-binding create/set commands - #131

Merged
ClayChipps merged 2 commits into
mainfrom
feat/at4dx-domain-process-binding-create-set
Aug 27, 2026
Merged

feat: add domain-process-binding create/set commands#131
ClayChipps merged 2 commits into
mainfrom
feat/at4dx-domain-process-binding-create-set

Conversation

@ClayChipps

Copy link
Copy Markdown
Contributor

Summary

Implements docs/design/0012-at4dx-domain-process-binding-create-set.md: two new commands for authoring AT4DX Trigger Action Framework bindings (DomainProcessBinding__mdt), which until now could only be listed/validated, never created or modified.

  • sf simply aep at4dx domain-process-binding create — creates a new binding in local DX source and/or a connected org (both destinations may be given at once; --target-org alone writes to a temp dir, deploys, and leaves no working-tree footprint).
  • sf simply aep at4dx domain-process-binding set — updates an existing binding by DeveloperName; only the flags given change, everything else (including which SObject reference field the binding uses) is preserved.
  • Both validate the full resulting record set with the existing validateDomainProcessBindings before writing anything, and refuse to write on any error-severity issue unless --force is passed.
  • --sobject-alternate supports binding against Setup objects (e.g. ServiceResource) that can't be referenced through EntityDefinition at all — see the design doc's Decision section for why this isn't just the legacy field it looks like.
  • New write-capable functions live in @simplysf/simply-aep-core (createDomainProcessBinding/setDomainProcessBinding) so simply-vscode/extensions/simply-at4dx can call them directly, matching this package's existing direct-import convention.

The design doc has a post-implementation "Implementation notes" section covering a few things the build taught that the original spec didn't anticipate (notably: RawDomainProcessBindingRecord needed a label field so set doesn't blow away an existing binding's label on every update).

Note: pnpm-lock.yaml's diff is large but purely cosmetic — pnpm reformatted every entry's YAML style when re-resolving for the two new dependencies (@salesforce/kit, @salesforce/source-deploy-retrieve devDep); no dependency versions changed beyond the two additions.

Test plan

  • pnpm run build and pnpm test pass for simply-aep-core and simply-aep
  • Root pnpm run build/pnpm test across all 15 packages passes (ran as part of the pre-push hook)
  • pnpm run readme regenerated for both packages
  • New unit tests: at4dxDomainProcessBuildXml.test.ts (XML round-trip incl. sobjectField), at4dxDomainProcessWrite.test.ts (create/set orchestration, validation blocking + --force, org-only temp-write-and-discard, sobjectField preservation on set)
  • New command tests: create.test.ts, set.test.ts

🤖 Generated with Claude Code

… functions

Adds createDomainProcessBinding/setDomainProcessBinding, buildDomainProcessBindingXml,
and deployMetadataFile so a DomainProcessBinding__mdt record can be authored or
updated in local DX source and/or a connected org, validated against everything
already scanned before anything is written.

RawDomainProcessBindingRecord gains sobjectField (so a write can target
RelatedDomainBindingSObjectAlternate__c for Setup objects like ServiceResource
that can't be referenced through an EntityDefinition field) and label (so `set`
can preserve an existing binding's label when --label isn't passed). Both
scanners are updated accordingly.

See docs/design/0012-at4dx-domain-process-binding-create-set.md.
Adds `sf simply aep at4dx domain-process-binding create` and `.../set`, backed
by simply-aep-core's new write functions. Both validate the resulting binding
before writing anything and refuse to write an error-severity wiring problem
unless --force is passed. --source-dir and --target-org are not mutually
exclusive here (unlike list/validate): either, or both, may be given, and
--target-org alone deploys via a discarded temp file with no working-tree
footprint.

Also regenerates command-snapshot.json (this + the bundled simply orchestrator)
and the lockfile for the new @salesforce/kit and @salesforce/source-deploy-retrieve
dependencies, and records a few implementation-taught refinements in the design
doc (docs/design/0012-at4dx-domain-process-binding-create-set.md).
@ClayChipps
ClayChipps enabled auto-merge August 27, 2026 01:13
@ClayChipps
ClayChipps merged commit 05b85d1 into main Aug 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant