@simplysf/simply-aep 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +158 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/validate.d.ts +6 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/validate.js +39 -22
- package/lib/commands/simply/aep/at4dx/domain-process-binding/validate.js.map +1 -1
- package/messages/simply.aep.at4dx.domain-process-binding.validate.md +6 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -80,6 +80,164 @@ FLAG DESCRIPTIONS
|
|
|
80
80
|
Comma-separated list of binding types to include. If not specified, all four are included.
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
+
_See code: [lib/commands/simply/aep/at4dx/binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.5.0/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/list.js)_
|
|
84
|
+
|
|
85
|
+
## `sf simply aep at4dx domain-process-binding list`
|
|
86
|
+
|
|
87
|
+
List the AT4DX Trigger Action Framework bindings configured in an org or local source, in execution order.
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
USAGE
|
|
91
|
+
$ sf simply aep at4dx domain-process-binding list [--json] [--flags-dir <value>] [-o <value>] [--api-version <value>] [-d <value>...] [-s
|
|
92
|
+
<value>...] [--active-only]
|
|
93
|
+
|
|
94
|
+
FLAGS
|
|
95
|
+
-d, --source-dir=<value>... One or more paths to directories containing Salesforce DX source. Use this for
|
|
96
|
+
local-source discovery.
|
|
97
|
+
-o, --target-org=<value> Username or alias of the org to read bindings from. Use this for live-org discovery.
|
|
98
|
+
-s, --sobject=<value>... SObject API name(s) to filter to. If not specified, bindings for every SObject are
|
|
99
|
+
included.
|
|
100
|
+
--active-only Only show active bindings; hide inactive records.
|
|
101
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
102
|
+
|
|
103
|
+
GLOBAL FLAGS
|
|
104
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
105
|
+
--json Format output as json.
|
|
106
|
+
|
|
107
|
+
DESCRIPTION
|
|
108
|
+
List the AT4DX Trigger Action Framework bindings configured in an org or local source, in execution order.
|
|
109
|
+
|
|
110
|
+
Reads AT4DX's Trigger Action Framework Custom Metadata Type — `DomainProcessBinding__mdt` — either from a live org or
|
|
111
|
+
from local Salesforce DX source, showing which criteria/action classes are bound to each SObject's trigger events (or
|
|
112
|
+
domain method tokens), and the order they run in. Exactly one of `--target-org` or `--source-dir` must be specified.
|
|
113
|
+
|
|
114
|
+
Unlike `simply aep at4dx binding list`, there's no "winner" here — every active record in a group (same SObject,
|
|
115
|
+
process context, and trigger operation or domain method token) runs, in `OrderOfExecution__c` order. Two active
|
|
116
|
+
records sharing the same order within a group are flagged as a collision, since AT4DX doesn't guarantee which one runs
|
|
117
|
+
first in that case.
|
|
118
|
+
|
|
119
|
+
EXAMPLES
|
|
120
|
+
$ sf simply aep at4dx domain-process-binding list --target-org myOrg
|
|
121
|
+
|
|
122
|
+
$ sf simply aep at4dx domain-process-binding list --source-dir sfdx-source/core --source-dir sfdx-source/app
|
|
123
|
+
|
|
124
|
+
$ sf simply aep at4dx domain-process-binding list --target-org myOrg --sobject Account
|
|
125
|
+
|
|
126
|
+
$ sf simply aep at4dx domain-process-binding list --target-org myOrg --active-only --json
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
_See code: [lib/commands/simply/aep/at4dx/domain-process-binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.5.0/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/list.js)_
|
|
130
|
+
|
|
131
|
+
## `sf simply aep at4dx domain-process-binding validate`
|
|
132
|
+
|
|
133
|
+
Validate the AT4DX Trigger Action Framework bindings configured in an org or local source, failing when a wiring problem is found.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
USAGE
|
|
137
|
+
$ sf simply aep at4dx domain-process-binding validate [--json] [--flags-dir <value>] [-o <value>] [--api-version <value>] [-d <value>...] [-s
|
|
138
|
+
<value>...]
|
|
139
|
+
|
|
140
|
+
FLAGS
|
|
141
|
+
-d, --source-dir=<value>... One or more paths to directories containing Salesforce DX source. Use this for
|
|
142
|
+
local-source discovery.
|
|
143
|
+
-o, --target-org=<value> Username or alias of the org to read bindings from. Use this for live-org discovery.
|
|
144
|
+
-s, --sobject=<value>... SObject API name(s) to filter to. Applies only to issues that name an SObject; issues
|
|
145
|
+
that span the whole scan (a duplicate DeveloperName, or a binding with no resolvable
|
|
146
|
+
SObject) are always reported, since filtering could hide the exact conflict they exist to
|
|
147
|
+
catch. If not specified, every issue is included.
|
|
148
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
149
|
+
|
|
150
|
+
GLOBAL FLAGS
|
|
151
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
152
|
+
--json Format output as json.
|
|
153
|
+
|
|
154
|
+
DESCRIPTION
|
|
155
|
+
Validate the AT4DX Trigger Action Framework bindings configured in an org or local source, failing when a wiring
|
|
156
|
+
problem is found.
|
|
157
|
+
|
|
158
|
+
Reads AT4DX's Trigger Action Framework Custom Metadata Type — `DomainProcessBinding__mdt` — either from a live org or
|
|
159
|
+
from local Salesforce DX source, and checks it for problems `simply aep at4dx domain-process-binding list` doesn't
|
|
160
|
+
fail on: two active records silently fighting over the same execution slot, a binding with no resolvable SObject, a
|
|
161
|
+
binding whose declared process context doesn't match the field that's actually populated (so it never runs), the same
|
|
162
|
+
DeveloperName defined more than once, and an ambiguous SObject reference. Exactly one of `--target-org` or
|
|
163
|
+
`--source-dir` must be specified.
|
|
164
|
+
|
|
165
|
+
Prints a table of every issue found. When --sobject is specified, scan-wide issues (a duplicate DeveloperName, or a
|
|
166
|
+
binding with no resolvable SObject) print in their own section below the filtered table, since they can't be
|
|
167
|
+
attributed to one SObject. Exits non-zero when any issue is an error (a warning alone doesn't fail the command) — use
|
|
168
|
+
this in CI to gate on AT4DX wiring problems before they reach an org.
|
|
169
|
+
|
|
170
|
+
EXAMPLES
|
|
171
|
+
$ sf simply aep at4dx domain-process-binding validate --target-org myOrg
|
|
172
|
+
|
|
173
|
+
$ sf simply aep at4dx domain-process-binding validate --source-dir sfdx-source/core --source-dir sfdx-source/app
|
|
174
|
+
|
|
175
|
+
$ sf simply aep at4dx domain-process-binding validate --target-org myOrg --sobject Account
|
|
176
|
+
|
|
177
|
+
$ sf simply aep at4dx domain-process-binding validate --target-org myOrg --json
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
_See code: [lib/commands/simply/aep/at4dx/domain-process-binding/validate.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.5.0/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/validate.js)_
|
|
181
|
+
<!-- commandsstop -->
|
|
182
|
+
|
|
183
|
+
- [`sf simply aep at4dx binding list`](#sf-simply-aep-at4dx-binding-list)
|
|
184
|
+
- [`sf simply aep at4dx domain-process-binding list`](#sf-simply-aep-at4dx-domain-process-binding-list)
|
|
185
|
+
- [`sf simply aep at4dx domain-process-binding validate`](#sf-simply-aep-at4dx-domain-process-binding-validate)
|
|
186
|
+
|
|
187
|
+
## `sf simply aep at4dx binding list`
|
|
188
|
+
|
|
189
|
+
List the AT4DX Application Factory bindings configured in an org or local source, resolved to show which record wins for each binding key.
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
USAGE
|
|
193
|
+
$ sf simply aep at4dx binding list [--json] [--flags-dir <value>] [-o <value>] [--api-version <value>] [-d <value>...] [-t
|
|
194
|
+
service|selector|domain|unit-of-work...] [--effective-only]
|
|
195
|
+
|
|
196
|
+
FLAGS
|
|
197
|
+
-d, --source-dir=<value>... One or more paths to directories containing Salesforce DX source. Use this for
|
|
198
|
+
local-source discovery.
|
|
199
|
+
-o, --target-org=<value> Username or alias of the org to read bindings from. Use this for live-org discovery.
|
|
200
|
+
-t, --type=<option>... Binding type(s) to include: service, selector, domain, unit-of-work.
|
|
201
|
+
<options: service|selector|domain|unit-of-work>
|
|
202
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
203
|
+
--effective-only Only show the bindings that actually win for their key; hide shadowed/non-winning
|
|
204
|
+
records.
|
|
205
|
+
|
|
206
|
+
GLOBAL FLAGS
|
|
207
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
208
|
+
--json Format output as json.
|
|
209
|
+
|
|
210
|
+
DESCRIPTION
|
|
211
|
+
List the AT4DX Application Factory bindings configured in an org or local source, resolved to show which record wins
|
|
212
|
+
for each binding key.
|
|
213
|
+
|
|
214
|
+
Reads the four AT4DX Application Factory Custom Metadata Types — `ApplicationFactory_ServiceBinding__mdt`,
|
|
215
|
+
`ApplicationFactory_SelectorBinding__mdt`, `ApplicationFactory_DomainBinding__mdt`, and
|
|
216
|
+
`ApplicationFactory_UnitOfWorkBinding__mdt` — either from a live org or from local Salesforce DX source, and
|
|
217
|
+
reproduces the resolution rules AT4DX applies at runtime so you can see which record actually wins for a given
|
|
218
|
+
interface or SObject, and which ones are shadowed. Exactly one of `--target-org` or `--source-dir` must be specified.
|
|
219
|
+
|
|
220
|
+
Service and Selector bindings resolve deterministically on `Priority__c` (highest wins). Domain bindings have no
|
|
221
|
+
priority field, so a duplicated key is flagged `ambiguous` rather than reporting a guessed winner. UnitOfWork bindings
|
|
222
|
+
have no winner concept at all — every record contributes to one ordered registration list.
|
|
223
|
+
|
|
224
|
+
EXAMPLES
|
|
225
|
+
$ sf simply aep at4dx binding list --target-org myOrg
|
|
226
|
+
|
|
227
|
+
$ sf simply aep at4dx binding list --source-dir sfdx-source/core --source-dir sfdx-source/app
|
|
228
|
+
|
|
229
|
+
$ sf simply aep at4dx binding list --target-org myOrg --type service,selector
|
|
230
|
+
|
|
231
|
+
$ sf simply aep at4dx binding list --target-org myOrg --effective-only --json
|
|
232
|
+
|
|
233
|
+
FLAG DESCRIPTIONS
|
|
234
|
+
-t, --type=service|selector|domain|unit-of-work...
|
|
235
|
+
|
|
236
|
+
Binding type(s) to include: service, selector, domain, unit-of-work.
|
|
237
|
+
|
|
238
|
+
Comma-separated list of binding types to include. If not specified, all four are included.
|
|
239
|
+
```
|
|
240
|
+
|
|
83
241
|
_See code: [lib/commands/simply/aep/at4dx/binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.4.1/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/list.js)_
|
|
84
242
|
|
|
85
243
|
## `sf simply aep at4dx domain-process-binding list`
|
|
@@ -19,4 +19,10 @@ export default class At4dxDomainProcessBindingValidate extends SfCommand<At4dxDo
|
|
|
19
19
|
};
|
|
20
20
|
/** @returns The validation issues found for the requested source, optionally filtered to specific SObjects. Sets `process.exitCode = 1` when any issue is severity `error`. */
|
|
21
21
|
run(): Promise<At4dxDomainProcessBindingValidateResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Prints `inScope` and `scanWide` as one table when no `--sobject` filter is active (there's no
|
|
24
|
+
* distinction worth drawing), or as two separate tables — with a header on the second — when a
|
|
25
|
+
* filter is active, per docs/design/0011-domain-process-binding-issue-scoping.md.
|
|
26
|
+
*/
|
|
27
|
+
private printIssues;
|
|
22
28
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Messages } from '@salesforce/core';
|
|
17
17
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
18
|
-
import { validateDomainProcessBindings, scanLocalDomainProcessBindings, scanOrgDomainProcessBindings, } from '@simplysf/simply-aep-core';
|
|
18
|
+
import { filterDomainProcessBindingIssues, validateDomainProcessBindings, scanLocalDomainProcessBindings, scanOrgDomainProcessBindings, } from '@simplysf/simply-aep-core';
|
|
19
19
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
20
|
const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.domain-process-binding.validate');
|
|
21
21
|
function toDisplayRow(issue) {
|
|
@@ -28,6 +28,14 @@ function toDisplayRow(issue) {
|
|
|
28
28
|
message: issue.message,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
const ISSUE_TABLE_COLUMNS = [
|
|
32
|
+
{ key: 'severity', name: 'SEVERITY' },
|
|
33
|
+
{ key: 'rule', name: 'RULE' },
|
|
34
|
+
{ key: 'sobject', name: 'SOBJECT' },
|
|
35
|
+
{ key: 'developerName', name: 'DEVELOPER NAME' },
|
|
36
|
+
{ key: 'source', name: 'SOURCE' },
|
|
37
|
+
{ key: 'message', name: 'MESSAGE' },
|
|
38
|
+
];
|
|
31
39
|
/**
|
|
32
40
|
* Validates the AT4DX Trigger Action Framework bindings (`DomainProcessBinding__mdt`) configured in a
|
|
33
41
|
* target org or local DX source — order collisions, dead bindings, and other wiring problems that are
|
|
@@ -104,30 +112,39 @@ export default class At4dxDomainProcessBindingValidate extends SfCommand {
|
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
const filteredRecords = sobjectFilter ? records.filter((record) => sobjectFilter.has(record.sobject)) : records;
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
this.table({
|
|
113
|
-
data: issues.map(toDisplayRow),
|
|
114
|
-
columns: [
|
|
115
|
-
{ key: 'severity', name: 'SEVERITY' },
|
|
116
|
-
{ key: 'rule', name: 'RULE' },
|
|
117
|
-
{ key: 'sobject', name: 'SOBJECT' },
|
|
118
|
-
{ key: 'developerName', name: 'DEVELOPER NAME' },
|
|
119
|
-
{ key: 'source', name: 'SOURCE' },
|
|
120
|
-
{ key: 'message', name: 'MESSAGE' },
|
|
121
|
-
],
|
|
122
|
-
});
|
|
115
|
+
const { inScope, scanWide } = filterDomainProcessBindingIssues(validateDomainProcessBindings(records, { malformed, ambiguous }), { sobjects: flags.sobject });
|
|
116
|
+
const allIssues = [...inScope, ...scanWide];
|
|
117
|
+
this.printIssues(sobjectFilter, inScope, scanWide, messages.getMessage('info.valid', [filteredRecords.length, source]));
|
|
118
|
+
if (allIssues.some((issue) => issue.severity === 'error')) {
|
|
119
|
+
process.exitCode = 1;
|
|
123
120
|
}
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
return { source, bindingCount: filteredRecords.length, issues: allIssues };
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Prints `inScope` and `scanWide` as one table when no `--sobject` filter is active (there's no
|
|
125
|
+
* distinction worth drawing), or as two separate tables — with a header on the second — when a
|
|
126
|
+
* filter is active, per docs/design/0011-domain-process-binding-issue-scoping.md.
|
|
127
|
+
*/
|
|
128
|
+
printIssues(sobjectFilter, inScope, scanWide, emptyMessage) {
|
|
129
|
+
if (!sobjectFilter) {
|
|
130
|
+
if (inScope.length + scanWide.length > 0) {
|
|
131
|
+
this.table({ data: [...inScope, ...scanWide].map(toDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
this.info(emptyMessage);
|
|
135
|
+
}
|
|
136
|
+
return;
|
|
126
137
|
}
|
|
127
|
-
if (
|
|
128
|
-
|
|
138
|
+
if (inScope.length > 0) {
|
|
139
|
+
this.table({ data: inScope.map(toDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
140
|
+
}
|
|
141
|
+
if (scanWide.length > 0) {
|
|
142
|
+
this.info(messages.getMessage('info.scanWideHeader'));
|
|
143
|
+
this.table({ data: scanWide.map(toDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
144
|
+
}
|
|
145
|
+
if (inScope.length === 0 && scanWide.length === 0) {
|
|
146
|
+
this.info(emptyMessage);
|
|
129
147
|
}
|
|
130
|
-
return { source, bindingCount: filteredRecords.length, issues };
|
|
131
148
|
}
|
|
132
149
|
}
|
|
133
150
|
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../../src/commands/simply/aep/at4dx/domain-process-binding/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA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,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;YACtD,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACjF,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC"}
|
|
@@ -6,7 +6,7 @@ Validate the AT4DX Trigger Action Framework bindings configured in an org or loc
|
|
|
6
6
|
|
|
7
7
|
Reads AT4DX's Trigger Action Framework Custom Metadata Type — `DomainProcessBinding__mdt` — either from a live org or from local Salesforce DX source, and checks it for problems `simply aep at4dx domain-process-binding list` doesn't fail on: two active records silently fighting over the same execution slot, a binding with no resolvable SObject, a binding whose declared process context doesn't match the field that's actually populated (so it never runs), the same DeveloperName defined more than once, and an ambiguous SObject reference. Exactly one of `--target-org` or `--source-dir` must be specified.
|
|
8
8
|
|
|
9
|
-
Prints a table of every issue found. Exits non-zero when any issue is an error (a warning alone doesn't fail the command) — use this in CI to gate on AT4DX wiring problems before they reach an org.
|
|
9
|
+
Prints a table of every issue found. When --sobject is specified, scan-wide issues (a duplicate DeveloperName, or a binding with no resolvable SObject) print in their own section below the filtered table, since they can't be attributed to one SObject. Exits non-zero when any issue is an error (a warning alone doesn't fail the command) — use this in CI to gate on AT4DX wiring problems before they reach an org.
|
|
10
10
|
|
|
11
11
|
# flags.target-org.summary
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ One or more paths to directories containing Salesforce DX source. Use this for l
|
|
|
18
18
|
|
|
19
19
|
# flags.sobject.summary
|
|
20
20
|
|
|
21
|
-
SObject API name(s) to filter to.
|
|
21
|
+
SObject API name(s) to filter to. Applies only to issues that name an SObject; issues that span the whole scan (a duplicate DeveloperName, or a binding with no resolvable SObject) are always reported, since filtering could hide the exact conflict they exist to catch. If not specified, every issue is included.
|
|
22
22
|
|
|
23
23
|
# examples
|
|
24
24
|
|
|
@@ -57,3 +57,7 @@ Scanning local source for bindings...
|
|
|
57
57
|
# info.valid
|
|
58
58
|
|
|
59
59
|
No issues found across %s binding(s) in %s
|
|
60
|
+
|
|
61
|
+
# info.scanWideHeader
|
|
62
|
+
|
|
63
|
+
Scan-wide issues (not limited to the --sobject filter above):
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysf/simply-aep",
|
|
3
3
|
"description": "Commands for Apex Enterprise Patterns tooling (fflib, force-di, AT4DX)",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"author": "@ClayChipps",
|
|
6
6
|
"homepage": "https://github.com/SimplySF/simply-node",
|
|
7
7
|
"bugs": "https://github.com/SimplySF/simply-node/issues",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@oclif/core": "^4.11.2",
|
|
60
60
|
"@salesforce/core": "^8.30.0",
|
|
61
61
|
"@salesforce/sf-plugins-core": "^12.2.16",
|
|
62
|
-
"@simplysf/simply-aep-core": "^0.
|
|
62
|
+
"@simplysf/simply-aep-core": "^0.4.0",
|
|
63
63
|
"@simplysf/simply-core": "^1.4.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -206,5 +206,5 @@
|
|
|
206
206
|
"output": []
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
|
-
"gitHead": "
|
|
209
|
+
"gitHead": "d14043949bc320a0740f710c6716407b3e92871e"
|
|
210
210
|
}
|