@simplysf/simply-aep 0.5.0 → 0.6.0
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 +478 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/create.d.ts +35 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/create.js +147 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/create.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/set.d.ts +36 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/set.js +141 -0
- package/lib/commands/simply/aep/at4dx/domain-process-binding/set.js.map +1 -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/lib/common/domainProcessBindingWriteError.d.ts +15 -0
- package/lib/common/domainProcessBindingWriteError.js +59 -0
- package/lib/common/domainProcessBindingWriteError.js.map +1 -0
- package/messages/simply.aep.at4dx.domain-process-binding.create.md +159 -0
- package/messages/simply.aep.at4dx.domain-process-binding.set.md +149 -0
- package/messages/simply.aep.at4dx.domain-process-binding.validate.md +6 -2
- package/package.json +5 -3
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Create a new AT4DX Trigger Action Framework binding (DomainProcessBinding__mdt) in local source and/or a connected org.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Generates a `DomainProcessBinding.<DeveloperName>.md-meta.xml` file from the given flags and writes it under --source-dir, deploys it to --target-org, or both. Validates the resulting binding — alongside everything else already in scope — with the same rules `simply aep at4dx domain-process-binding validate` uses, and refuses to write if that introduces an error-severity issue unless --force is passed. At least one of --source-dir/--target-org is required; unlike `list`/`validate`, both may be given at once (write to source and deploy it live in the same run). Given --target-org alone, the file is written to a temporary directory, deployed, and discarded — no working-tree footprint.
|
|
8
|
+
|
|
9
|
+
Writes RelatedDomainBindingSObject__c by default. Pass --sobject-alternate to write RelatedDomainBindingSObjectAlternate__c instead, for a SObject (such as ServiceResource and other Setup objects) that can't be referenced through an EntityDefinition field at all.
|
|
10
|
+
|
|
11
|
+
# flags.source-dir.summary
|
|
12
|
+
|
|
13
|
+
The package directory to create customMetadata/DomainProcessBinding.<name>.md-meta.xml under. Created if the customMetadata folder doesn't exist yet.
|
|
14
|
+
|
|
15
|
+
# flags.target-org.summary
|
|
16
|
+
|
|
17
|
+
Deploy the generated binding to this org after writing it.
|
|
18
|
+
|
|
19
|
+
# flags.wait.summary
|
|
20
|
+
|
|
21
|
+
Deploy poll timeout, in minutes. Only meaningful with --target-org.
|
|
22
|
+
|
|
23
|
+
# flags.developer-name.summary
|
|
24
|
+
|
|
25
|
+
The binding's DeveloperName. Must start with a letter, contain only letters, numbers, and single underscores, not end with an underscore, and be 40 characters or fewer.
|
|
26
|
+
|
|
27
|
+
# flags.label.summary
|
|
28
|
+
|
|
29
|
+
The binding's label. Defaults to --developer-name. Must be 40 characters or fewer.
|
|
30
|
+
|
|
31
|
+
# flags.sobject.summary
|
|
32
|
+
|
|
33
|
+
The SObject API name to bind against.
|
|
34
|
+
|
|
35
|
+
# flags.sobject-alternate.summary
|
|
36
|
+
|
|
37
|
+
Write --sobject to RelatedDomainBindingSObjectAlternate__c instead of RelatedDomainBindingSObject__c. Use this for a SObject that can't be referenced through an EntityDefinition field at all (for example ServiceResource and other Setup objects).
|
|
38
|
+
|
|
39
|
+
# flags.process-context.summary
|
|
40
|
+
|
|
41
|
+
What kind of process invokes this binding: TriggerExecution or DomainMethodExecution.
|
|
42
|
+
|
|
43
|
+
# flags.trigger-operation.summary
|
|
44
|
+
|
|
45
|
+
The trigger event this binding fires on. Required, and only allowed, when --process-context is TriggerExecution.
|
|
46
|
+
|
|
47
|
+
# flags.domain-method-token.summary
|
|
48
|
+
|
|
49
|
+
The domain method's process token this binding matches. Required, and only allowed, when --process-context is DomainMethodExecution.
|
|
50
|
+
|
|
51
|
+
# flags.type.summary
|
|
52
|
+
|
|
53
|
+
Whether this binding contributes a Criteria filter or an Action.
|
|
54
|
+
|
|
55
|
+
# flags.class-to-inject.summary
|
|
56
|
+
|
|
57
|
+
The Apex class this binding wires in.
|
|
58
|
+
|
|
59
|
+
# flags.order.summary
|
|
60
|
+
|
|
61
|
+
OrderOfExecution__c. Numeric; decimals are allowed.
|
|
62
|
+
|
|
63
|
+
# flags.active.summary
|
|
64
|
+
|
|
65
|
+
IsActive__c.
|
|
66
|
+
|
|
67
|
+
# flags.execute-asynchronous.summary
|
|
68
|
+
|
|
69
|
+
ExecuteAsynchronous__c.
|
|
70
|
+
|
|
71
|
+
# flags.logical-inverse.summary
|
|
72
|
+
|
|
73
|
+
LogicalInverse__c.
|
|
74
|
+
|
|
75
|
+
# flags.prevent-recursive.summary
|
|
76
|
+
|
|
77
|
+
PreventRecursive__c.
|
|
78
|
+
|
|
79
|
+
# flags.description.summary
|
|
80
|
+
|
|
81
|
+
Description__c.
|
|
82
|
+
|
|
83
|
+
# flags.force.summary
|
|
84
|
+
|
|
85
|
+
Write (and deploy) even if validation finds an error-severity issue. Validation still runs and its issues are still printed and returned.
|
|
86
|
+
|
|
87
|
+
# examples
|
|
88
|
+
|
|
89
|
+
- <%= config.bin %> <%= command.id %> --source-dir sfdx-source/core --developer-name Account_Before_Insert_Assign_Owner --sobject Account --process-context TriggerExecution --trigger-operation Before_Insert --type Action --class-to-inject AccountAssignOwnerAction --order 10
|
|
90
|
+
|
|
91
|
+
- <%= config.bin %> <%= command.id %> --target-org myOrg --developer-name Account_Before_Insert_Assign_Owner --sobject Account --process-context TriggerExecution --trigger-operation Before_Insert --type Action --class-to-inject AccountAssignOwnerAction --order 10
|
|
92
|
+
|
|
93
|
+
- <%= config.bin %> <%= command.id %> --source-dir sfdx-source/core --target-org myOrg --developer-name Account_Before_Insert_Assign_Owner --sobject Account --process-context TriggerExecution --trigger-operation Before_Insert --type Action --class-to-inject AccountAssignOwnerAction --order 10
|
|
94
|
+
|
|
95
|
+
- <%= config.bin %> <%= command.id %> --source-dir sfdx-source/core --developer-name ServiceResource_Before_Update_Sync --sobject ServiceResource --sobject-alternate --process-context TriggerExecution --trigger-operation Before_Update --type Action --class-to-inject ServiceResourceSyncAction --order 10
|
|
96
|
+
|
|
97
|
+
# error.sourceDirOrTargetOrgRequired
|
|
98
|
+
|
|
99
|
+
You must specify at least one of --source-dir or --target-org.
|
|
100
|
+
|
|
101
|
+
# error.triggerOperationRequired
|
|
102
|
+
|
|
103
|
+
--trigger-operation is required when --process-context is TriggerExecution.
|
|
104
|
+
|
|
105
|
+
# error.domainMethodTokenRequired
|
|
106
|
+
|
|
107
|
+
--domain-method-token is required when --process-context is DomainMethodExecution.
|
|
108
|
+
|
|
109
|
+
# error.invalidOrder
|
|
110
|
+
|
|
111
|
+
"%s" is not a valid --order: it must be a number.
|
|
112
|
+
|
|
113
|
+
# error.contextFieldMismatch
|
|
114
|
+
|
|
115
|
+
%s
|
|
116
|
+
|
|
117
|
+
# error.invalidDeveloperName
|
|
118
|
+
|
|
119
|
+
%s
|
|
120
|
+
|
|
121
|
+
# error.labelTooLong
|
|
122
|
+
|
|
123
|
+
%s
|
|
124
|
+
|
|
125
|
+
# error.developerNameAlreadyExists
|
|
126
|
+
|
|
127
|
+
%s
|
|
128
|
+
|
|
129
|
+
# error.developerNameNotFound
|
|
130
|
+
|
|
131
|
+
%s
|
|
132
|
+
|
|
133
|
+
# error.noFieldsToUpdate
|
|
134
|
+
|
|
135
|
+
At least one field besides --developer-name must be given to update.
|
|
136
|
+
|
|
137
|
+
# error.at4dxNotDetected
|
|
138
|
+
|
|
139
|
+
AT4DX's Trigger Action Framework doesn't appear to be present in this org: the DomainProcessBinding__mdt Custom Metadata Type wasn't found.
|
|
140
|
+
|
|
141
|
+
# error.validationFailed
|
|
142
|
+
|
|
143
|
+
Writing this binding would introduce a wiring problem AT4DX validation already knows how to catch. Pass --force to write anyway.
|
|
144
|
+
|
|
145
|
+
# error.deployFailed
|
|
146
|
+
|
|
147
|
+
%s
|
|
148
|
+
|
|
149
|
+
# info.created
|
|
150
|
+
|
|
151
|
+
Created %s
|
|
152
|
+
|
|
153
|
+
# info.createdInOrg
|
|
154
|
+
|
|
155
|
+
Created %s in the org
|
|
156
|
+
|
|
157
|
+
# info.deployed
|
|
158
|
+
|
|
159
|
+
Deployed (id: %s)
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Update an existing AT4DX Trigger Action Framework binding (DomainProcessBinding__mdt) in local source and/or a connected org.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Finds the binding named --developer-name in local source and/or a connected org, applies only the fields given as flags — everything else, including which SObject reference field the binding uses, is preserved from the found record — and rewrites the `DomainProcessBinding.<DeveloperName>.md-meta.xml` file. Validates the resulting binding — alongside everything else already in scope — with the same rules `simply aep at4dx domain-process-binding validate` uses, and refuses to write if that introduces an error-severity issue unless --force is passed.
|
|
8
|
+
|
|
9
|
+
When --source-dir is given, the binding is located there (searched across every directory given, same as `list`/`validate`) and that exact file is rewritten; the found file is also deployed if --target-org is given. When only --target-org is given, the binding is located and updated directly in the org via a temporary file, deployed, then discarded — no working-tree footprint.
|
|
10
|
+
|
|
11
|
+
--developer-name identifies the binding to update and can't itself be changed by this command.
|
|
12
|
+
|
|
13
|
+
# flags.source-dir.summary
|
|
14
|
+
|
|
15
|
+
One or more paths to directories containing Salesforce DX source, searched for the binding to update.
|
|
16
|
+
|
|
17
|
+
# flags.target-org.summary
|
|
18
|
+
|
|
19
|
+
Locate (when --source-dir isn't given) and/or deploy the binding to this org.
|
|
20
|
+
|
|
21
|
+
# flags.wait.summary
|
|
22
|
+
|
|
23
|
+
Deploy poll timeout, in minutes. Only meaningful with --target-org.
|
|
24
|
+
|
|
25
|
+
# flags.developer-name.summary
|
|
26
|
+
|
|
27
|
+
The DeveloperName of the binding to update.
|
|
28
|
+
|
|
29
|
+
# flags.label.summary
|
|
30
|
+
|
|
31
|
+
The binding's label. If not given, the existing label is kept.
|
|
32
|
+
|
|
33
|
+
# flags.sobject.summary
|
|
34
|
+
|
|
35
|
+
The SObject API name to bind against. If not given, the existing value is kept.
|
|
36
|
+
|
|
37
|
+
# flags.sobject-alternate.summary
|
|
38
|
+
|
|
39
|
+
Write --sobject to RelatedDomainBindingSObjectAlternate__c instead of RelatedDomainBindingSObject__c, for a SObject that can't be referenced through an EntityDefinition field at all (for example ServiceResource and other Setup objects). If not given, the binding keeps whichever field it already uses — this flag only needs to be passed to change it.
|
|
40
|
+
|
|
41
|
+
# flags.process-context.summary
|
|
42
|
+
|
|
43
|
+
What kind of process invokes this binding: TriggerExecution or DomainMethodExecution. If not given, the existing value is kept.
|
|
44
|
+
|
|
45
|
+
# flags.trigger-operation.summary
|
|
46
|
+
|
|
47
|
+
The trigger event this binding fires on. If you change --process-context to TriggerExecution, pass this too.
|
|
48
|
+
|
|
49
|
+
# flags.domain-method-token.summary
|
|
50
|
+
|
|
51
|
+
The domain method's process token this binding matches. If you change --process-context to DomainMethodExecution, pass this too.
|
|
52
|
+
|
|
53
|
+
# flags.type.summary
|
|
54
|
+
|
|
55
|
+
Whether this binding contributes a Criteria filter or an Action. If not given, the existing value is kept.
|
|
56
|
+
|
|
57
|
+
# flags.class-to-inject.summary
|
|
58
|
+
|
|
59
|
+
The Apex class this binding wires in. If not given, the existing value is kept.
|
|
60
|
+
|
|
61
|
+
# flags.order.summary
|
|
62
|
+
|
|
63
|
+
OrderOfExecution__c. Numeric; decimals are allowed. If not given, the existing value is kept.
|
|
64
|
+
|
|
65
|
+
# flags.active.summary
|
|
66
|
+
|
|
67
|
+
IsActive__c. If not given, the existing value is kept.
|
|
68
|
+
|
|
69
|
+
# flags.execute-asynchronous.summary
|
|
70
|
+
|
|
71
|
+
ExecuteAsynchronous__c. If not given, the existing value is kept.
|
|
72
|
+
|
|
73
|
+
# flags.logical-inverse.summary
|
|
74
|
+
|
|
75
|
+
LogicalInverse__c. If not given, the existing value is kept.
|
|
76
|
+
|
|
77
|
+
# flags.prevent-recursive.summary
|
|
78
|
+
|
|
79
|
+
PreventRecursive__c. If not given, the existing value is kept.
|
|
80
|
+
|
|
81
|
+
# flags.description.summary
|
|
82
|
+
|
|
83
|
+
Description__c. If not given, the existing value is kept.
|
|
84
|
+
|
|
85
|
+
# flags.force.summary
|
|
86
|
+
|
|
87
|
+
Write (and deploy) even if validation finds an error-severity issue. Validation still runs and its issues are still printed and returned.
|
|
88
|
+
|
|
89
|
+
# examples
|
|
90
|
+
|
|
91
|
+
- <%= config.bin %> <%= command.id %> --source-dir sfdx-source/core --source-dir sfdx-source/app --developer-name Account_Before_Insert_Assign_Owner --order 20 --no-active
|
|
92
|
+
|
|
93
|
+
- <%= config.bin %> <%= command.id %> --target-org myOrg --developer-name Account_Before_Insert_Assign_Owner --class-to-inject AccountAssignOwnerActionV2
|
|
94
|
+
|
|
95
|
+
# error.sourceDirOrTargetOrgRequired
|
|
96
|
+
|
|
97
|
+
You must specify at least one of --source-dir or --target-org.
|
|
98
|
+
|
|
99
|
+
# error.invalidOrder
|
|
100
|
+
|
|
101
|
+
"%s" is not a valid --order: it must be a number.
|
|
102
|
+
|
|
103
|
+
# error.contextFieldMismatch
|
|
104
|
+
|
|
105
|
+
%s
|
|
106
|
+
|
|
107
|
+
# error.invalidDeveloperName
|
|
108
|
+
|
|
109
|
+
%s
|
|
110
|
+
|
|
111
|
+
# error.labelTooLong
|
|
112
|
+
|
|
113
|
+
%s
|
|
114
|
+
|
|
115
|
+
# error.developerNameAlreadyExists
|
|
116
|
+
|
|
117
|
+
%s
|
|
118
|
+
|
|
119
|
+
# error.developerNameNotFound
|
|
120
|
+
|
|
121
|
+
%s
|
|
122
|
+
|
|
123
|
+
# error.noFieldsToUpdate
|
|
124
|
+
|
|
125
|
+
At least one field besides --developer-name must be given to update.
|
|
126
|
+
|
|
127
|
+
# error.at4dxNotDetected
|
|
128
|
+
|
|
129
|
+
AT4DX's Trigger Action Framework doesn't appear to be present in this source or org: the DomainProcessBinding__mdt Custom Metadata Type wasn't found.
|
|
130
|
+
|
|
131
|
+
# error.validationFailed
|
|
132
|
+
|
|
133
|
+
Writing this binding would introduce a wiring problem AT4DX validation already knows how to catch. Pass --force to write anyway.
|
|
134
|
+
|
|
135
|
+
# error.deployFailed
|
|
136
|
+
|
|
137
|
+
%s
|
|
138
|
+
|
|
139
|
+
# info.updated
|
|
140
|
+
|
|
141
|
+
Updated %s
|
|
142
|
+
|
|
143
|
+
# info.updatedInOrg
|
|
144
|
+
|
|
145
|
+
Updated %s in the org
|
|
146
|
+
|
|
147
|
+
# info.deployed
|
|
148
|
+
|
|
149
|
+
Deployed (id: %s)
|
|
@@ -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.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"author": "@ClayChipps",
|
|
6
6
|
"homepage": "https://github.com/SimplySF/simply-node",
|
|
7
7
|
"bugs": "https://github.com/SimplySF/simply-node/issues",
|
|
@@ -58,13 +58,15 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@oclif/core": "^4.11.2",
|
|
60
60
|
"@salesforce/core": "^8.30.0",
|
|
61
|
+
"@salesforce/kit": "^3.2.6",
|
|
61
62
|
"@salesforce/sf-plugins-core": "^12.2.16",
|
|
62
|
-
"@simplysf/simply-aep-core": "^0.
|
|
63
|
+
"@simplysf/simply-aep-core": "^0.5.0",
|
|
63
64
|
"@simplysf/simply-core": "^1.4.0"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@oclif/plugin-command-snapshot": "^5.3.19",
|
|
67
68
|
"@salesforce/plugin-command-reference": "^3.1.99",
|
|
69
|
+
"@salesforce/source-deploy-retrieve": "^12.37.2",
|
|
68
70
|
"@vitest/coverage-v8": "^4.1.10",
|
|
69
71
|
"vitest": "^4.1.10"
|
|
70
72
|
},
|
|
@@ -206,5 +208,5 @@
|
|
|
206
208
|
"output": []
|
|
207
209
|
}
|
|
208
210
|
},
|
|
209
|
-
"gitHead": "
|
|
211
|
+
"gitHead": "885986e2736aba9ff318431e08064890b2946b03"
|
|
210
212
|
}
|