feat: add domain-process-binding create/set commands - #131
Merged
Conversation
… 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-orgalone writes to a temp dir, deploys, and leaves no working-tree footprint).sf simply aep at4dx domain-process-binding set— updates an existing binding byDeveloperName; only the flags given change, everything else (including which SObject reference field the binding uses) is preserved.validateDomainProcessBindingsbefore writing anything, and refuse to write on anyerror-severity issue unless--forceis passed.--sobject-alternatesupports binding against Setup objects (e.g.ServiceResource) that can't be referenced throughEntityDefinitionat all — see the design doc's Decision section for why this isn't just the legacy field it looks like.@simplysf/simply-aep-core(createDomainProcessBinding/setDomainProcessBinding) sosimply-vscode/extensions/simply-at4dxcan 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:
RawDomainProcessBindingRecordneeded alabelfield sosetdoesn'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-retrievedevDep); no dependency versions changed beyond the two additions.Test plan
pnpm run buildandpnpm testpass forsimply-aep-coreandsimply-aeppnpm run build/pnpm testacross all 15 packages passes (ran as part of the pre-push hook)pnpm run readmeregenerated for both packagesat4dxDomainProcessBuildXml.test.ts(XML round-trip incl.sobjectField),at4dxDomainProcessWrite.test.ts(create/set orchestration, validation blocking +--force, org-only temp-write-and-discard,sobjectFieldpreservation onset)create.test.ts,set.test.ts🤖 Generated with Claude Code