@simplysf/simply-aep 0.14.4 → 0.15.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 CHANGED
@@ -117,7 +117,7 @@ EXAMPLES
117
117
  $ sf simply aep at4dx binding create --source-dir sfdx-source/core --type unit-of-work --developer-name Account_UOW --sobject Account --sequence 10
118
118
  ```
119
119
 
120
- _See code: [lib/commands/simply/aep/at4dx/binding/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/create.js)_
120
+ _See code: [lib/commands/simply/aep/at4dx/binding/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/create.js)_
121
121
 
122
122
  ## `sf simply aep at4dx binding list`
123
123
 
@@ -173,7 +173,7 @@ FLAG DESCRIPTIONS
173
173
  Comma-separated list of binding types to include. If not specified, all four are included.
174
174
  ```
175
175
 
176
- _See code: [lib/commands/simply/aep/at4dx/binding/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/list.js)_
176
+ _See code: [lib/commands/simply/aep/at4dx/binding/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/list.js)_
177
177
 
178
178
  ## `sf simply aep at4dx binding update`
179
179
 
@@ -246,7 +246,7 @@ EXAMPLES
246
246
  $ sf simply aep at4dx binding update --target-org myOrg --type unit-of-work --developer-name Account_UOW --sequence 20
247
247
  ```
248
248
 
249
- _See code: [lib/commands/simply/aep/at4dx/binding/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/update.js)_
249
+ _See code: [lib/commands/simply/aep/at4dx/binding/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/update.js)_
250
250
 
251
251
  ## `sf simply aep at4dx binding validate`
252
252
 
@@ -279,8 +279,10 @@ DESCRIPTION
279
279
  binding with no resolvable key, a Selector/Domain/UnitOfWork binding whose SObject reference is ambiguous or names a
280
280
  standard object that can't actually go through an EntityDefinition metadata relationship, two Service/Selector/Domain
281
281
  records sharing a platform-unique `To__c`, two Domain (or two UnitOfWork) records resolving to the same SObject, two
282
- UnitOfWork records sharing a `BindingSequence__c`, and the same DeveloperName defined more than once within one
283
- binding type. Exactly one of `--target-org` or `--source-dir` must be specified.
282
+ UnitOfWork records sharing a `BindingSequence__c`, the same DeveloperName defined more than once within one binding
283
+ type, and — when `Domain` is among the requested types — a `Domain` binding whose SObject has no Active Apex trigger
284
+ wiring it up via `fflib_SObjectDomain.triggerHandler(...)`. Exactly one of `--target-org` or `--source-dir` must be
285
+ specified.
284
286
 
285
287
  Prints a table of every issue found. Exits non-zero when any issue is an error (a warning alone doesn't fail the
286
288
  command) — use this in CI to gate on AT4DX Application Factory wiring problems before they reach an org.
@@ -302,7 +304,7 @@ FLAG DESCRIPTIONS
302
304
  Comma-separated list of binding types to include. If not specified, all four are included.
303
305
  ```
304
306
 
305
- _See code: [lib/commands/simply/aep/at4dx/binding/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/validate.js)_
307
+ _See code: [lib/commands/simply/aep/at4dx/binding/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/validate.js)_
306
308
 
307
309
  ## `sf simply aep at4dx domain-process-binding create`
308
310
 
@@ -383,7 +385,7 @@ EXAMPLES
383
385
  $ sf simply aep at4dx domain-process-binding create --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
384
386
  ```
385
387
 
386
- _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/create.js)_
388
+ _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/create.js)_
387
389
 
388
390
  ## `sf simply aep at4dx domain-process-binding list`
389
391
 
@@ -429,7 +431,7 @@ EXAMPLES
429
431
  $ sf simply aep at4dx domain-process-binding list --target-org myOrg --active-only --json
430
432
  ```
431
433
 
432
- _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/list.js)_
434
+ _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/list.js)_
433
435
 
434
436
  ## `sf simply aep at4dx domain-process-binding update`
435
437
 
@@ -508,7 +510,7 @@ EXAMPLES
508
510
  $ sf simply aep at4dx domain-process-binding update --target-org myOrg --developer-name Account_Before_Insert_Assign_Owner --class-to-inject AccountAssignOwnerActionV2
509
511
  ```
510
512
 
511
- _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/update.js)_
513
+ _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/update.js)_
512
514
 
513
515
  ## `sf simply aep at4dx domain-process-binding validate`
514
516
 
@@ -561,7 +563,7 @@ EXAMPLES
561
563
  $ sf simply aep at4dx domain-process-binding validate --target-org myOrg --json
562
564
  ```
563
565
 
564
- _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/validate.js)_
566
+ _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/validate.js)_
565
567
 
566
568
  ## `sf simply aep at4dx field-set-inclusion create`
567
569
 
@@ -619,7 +621,7 @@ EXAMPLES
619
621
  $ sf simply aep at4dx field-set-inclusion create --target-org myOrg --developer-name ServiceResource_Skills --sobject ServiceResource --sobject-alternate --fieldset-name SkillFields
620
622
  ```
621
623
 
622
- _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/create.js)_
624
+ _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/create.js)_
623
625
 
624
626
  ## `sf simply aep at4dx field-set-inclusion list`
625
627
 
@@ -657,7 +659,7 @@ EXAMPLES
657
659
  $ sf simply aep at4dx field-set-inclusion list --target-org myOrg --json
658
660
  ```
659
661
 
660
- _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/list.js)_
662
+ _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/list.js)_
661
663
 
662
664
  ## `sf simply aep at4dx field-set-inclusion update`
663
665
 
@@ -714,7 +716,7 @@ EXAMPLES
714
716
  $ sf simply aep at4dx field-set-inclusion update --target-org myOrg --developer-name Account_Contact_Fields --fieldset-name ContactRelatedFieldsV2
715
717
  ```
716
718
 
717
- _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/update.js)_
719
+ _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/update.js)_
718
720
 
719
721
  ## `sf simply aep at4dx field-set-inclusion validate`
720
722
 
@@ -758,7 +760,7 @@ EXAMPLES
758
760
  $ sf simply aep at4dx field-set-inclusion validate --target-org myOrg --json
759
761
  ```
760
762
 
761
- _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/validate.js)_
763
+ _See code: [lib/commands/simply/aep/at4dx/field-set-inclusion/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/field-set-inclusion/validate.js)_
762
764
 
763
765
  ## `sf simply aep at4dx platform-event-subscription create`
764
766
 
@@ -854,7 +856,7 @@ EXAMPLES
854
856
  $ sf simply aep at4dx platform-event-subscription create --target-org myOrg --developer-name Account_Change_Subscriber --event-bus Account_Change__e --consumer AccountChangeConsumer --matcher-rule MatchEventBusAndCategoryAndEventName --event-category Finance --event-name AccountUpdated
855
857
  ```
856
858
 
857
- _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/create.js)_
859
+ _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/create.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/create.js)_
858
860
 
859
861
  ## `sf simply aep at4dx platform-event-subscription list`
860
862
 
@@ -892,7 +894,7 @@ EXAMPLES
892
894
  $ sf simply aep at4dx platform-event-subscription list --target-org myOrg --json
893
895
  ```
894
896
 
895
- _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/list.js)_
897
+ _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/list.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/list.js)_
896
898
 
897
899
  ## `sf simply aep at4dx platform-event-subscription simulate`
898
900
 
@@ -948,7 +950,7 @@ EXAMPLES
948
950
  $ sf simply aep at4dx platform-event-subscription simulate --target-org myOrg --event-bus Account_Change__e --json
949
951
  ```
950
952
 
951
- _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/simulate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/simulate.js)_
953
+ _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/simulate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/simulate.js)_
952
954
 
953
955
  ## `sf simply aep at4dx platform-event-subscription update`
954
956
 
@@ -1017,7 +1019,7 @@ EXAMPLES
1017
1019
  $ sf simply aep at4dx platform-event-subscription update --target-org myOrg --developer-name Account_Change_Subscriber --consumer AccountChangeConsumerV2
1018
1020
  ```
1019
1021
 
1020
- _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/update.js)_
1022
+ _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/update.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/update.js)_
1021
1023
 
1022
1024
  ## `sf simply aep at4dx platform-event-subscription validate`
1023
1025
 
@@ -1066,5 +1068,5 @@ EXAMPLES
1066
1068
  $ sf simply aep at4dx platform-event-subscription validate --target-org myOrg --json
1067
1069
  ```
1068
1070
 
1069
- _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.3/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/validate.js)_
1071
+ _See code: [lib/commands/simply/aep/at4dx/platform-event-subscription/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-aep@0.14.4/packages/simply-aep/lib/commands/simply/aep/at4dx/platform-event-subscription/validate.js)_
1070
1072
  <!-- commandsstop -->
@@ -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 { ALL_BINDING_TYPES, BINDING_TYPE_BY_FLAG, scanLocalBindings, scanOrgBindings, validateBindings, } from '@simplysf/simply-aep-core';
18
+ import { ALL_BINDING_TYPES, BINDING_TYPE_BY_FLAG, scanLocalApexTriggers, scanLocalBindings, scanOrgApexTriggers, scanOrgBindings, validateBindings, } from '@simplysf/simply-aep-core';
19
19
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
20
20
  const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.binding.validate');
21
21
  const BINDING_TYPE_FLAG_OPTIONS = ['service', 'selector', 'domain', 'unit-of-work'];
@@ -39,6 +39,30 @@ const ISSUE_TABLE_COLUMNS = [
39
39
  { key: 'source', name: 'SOURCE' },
40
40
  { key: 'message', name: 'MESSAGE' },
41
41
  ];
42
+ /** `missing-domain-trigger` is the only rule that consumes a trigger scan, so skip it entirely when `Domain` isn't among the requested types. */
43
+ async function scanOrgTriggersIfNeeded(requestedTypes, connection) {
44
+ if (!requestedTypes.includes('Domain')) {
45
+ return undefined;
46
+ }
47
+ try {
48
+ return await scanOrgApexTriggers(connection);
49
+ }
50
+ catch (error) {
51
+ throw messages.createError('error.orgQueryFailed', [error.message]);
52
+ }
53
+ }
54
+ /** Local-source counterpart of {@link scanOrgTriggersIfNeeded}. */
55
+ function scanLocalTriggersIfNeeded(requestedTypes, sourceDirs) {
56
+ if (!requestedTypes.includes('Domain')) {
57
+ return undefined;
58
+ }
59
+ try {
60
+ return scanLocalApexTriggers(sourceDirs);
61
+ }
62
+ catch (error) {
63
+ throw messages.createError('error.localScanFailed', [error.message]);
64
+ }
65
+ }
42
66
  /**
43
67
  * Validates the AT4DX Application Factory bindings (Service/Selector/Domain/UnitOfWork) configured in a
44
68
  * target org or local DX source — wiring problems that are invisible to `binding list` — and fails
@@ -101,11 +125,12 @@ export default class At4dxBindingValidate extends SfCommand {
101
125
  if (scanResult.missingTypes.length === requestedTypes.length) {
102
126
  throw messages.createError('error.at4dxNotDetected');
103
127
  }
128
+ const triggers = await scanOrgTriggersIfNeeded(requestedTypes, connection);
104
129
  bindingCount = scanResult.records.length;
105
130
  issues = validateBindings(scanResult.records, {
106
131
  malformed: scanResult.malformed,
107
132
  ambiguous: scanResult.ambiguous,
108
- });
133
+ }, triggers);
109
134
  }
110
135
  else {
111
136
  source = 'local';
@@ -122,11 +147,12 @@ export default class At4dxBindingValidate extends SfCommand {
122
147
  if (scanResult.records.length === 0 && scanResult.malformed.length === 0) {
123
148
  throw messages.createError('error.at4dxNotDetected');
124
149
  }
150
+ const triggers = scanLocalTriggersIfNeeded(requestedTypes, sourceDirs);
125
151
  bindingCount = scanResult.records.length;
126
152
  issues = validateBindings(scanResult.records, {
127
153
  malformed: scanResult.malformed,
128
154
  ambiguous: scanResult.ambiguous,
129
- });
155
+ }, triggers);
130
156
  }
131
157
  if (issues.length > 0) {
132
158
  this.table({ data: issues.map(toDisplayRow), columns: ISSUE_TABLE_COLUMNS });
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../../src/commands/simply/aep/at4dx/binding/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GAKjB,MAAM,2BAA2B,CAAC;AAEnC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,mCAAmC,CAAC,CAAC;AAEpG,MAAM,yBAAyB,GAAsB,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AAavG,SAAS,YAAY,CAAC,KAAmB;IACvC,OAAO;QACL,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,EAAE;QACpB,aAAa,EAAE,KAAK,CAAC,aAAa,IA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AAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAC/E,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,EAAE,CAAC;YACvD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IAC1C,CAAC"}
@@ -4,7 +4,7 @@ Validate the AT4DX Application Factory bindings configured in an org or local so
4
4
 
5
5
  # description
6
6
 
7
- Reads `ApplicationFactory_ServiceBinding__mdt`, `ApplicationFactory_SelectorBinding__mdt`, `ApplicationFactory_DomainBinding__mdt`, and `ApplicationFactory_UnitOfWorkBinding__mdt` — either from a live org or from local Salesforce DX source — and checks them for problems `simply aep at4dx binding list` doesn't fail on: a binding with no resolvable key, a Selector/Domain/UnitOfWork binding whose SObject reference is ambiguous or names a standard object that can't actually go through an EntityDefinition metadata relationship, two Service/Selector/Domain records sharing a platform-unique `To__c`, two Domain (or two UnitOfWork) records resolving to the same SObject, two UnitOfWork records sharing a `BindingSequence__c`, and the same DeveloperName defined more than once within one binding type. Exactly one of `--target-org` or `--source-dir` must be specified.
7
+ Reads `ApplicationFactory_ServiceBinding__mdt`, `ApplicationFactory_SelectorBinding__mdt`, `ApplicationFactory_DomainBinding__mdt`, and `ApplicationFactory_UnitOfWorkBinding__mdt` — either from a live org or from local Salesforce DX source — and checks them for problems `simply aep at4dx binding list` doesn't fail on: a binding with no resolvable key, a Selector/Domain/UnitOfWork binding whose SObject reference is ambiguous or names a standard object that can't actually go through an EntityDefinition metadata relationship, two Service/Selector/Domain records sharing a platform-unique `To__c`, two Domain (or two UnitOfWork) records resolving to the same SObject, two UnitOfWork records sharing a `BindingSequence__c`, the same DeveloperName defined more than once within one binding type, and — when `Domain` is among the requested types — a `Domain` binding whose SObject has no Active Apex trigger wiring it up via `fflib_SObjectDomain.triggerHandler(...)`. Exactly one of `--target-org` or `--source-dir` must be specified.
8
8
 
9
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 Application Factory wiring problems before they reach an org.
10
10
 
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.14.4",
4
+ "version": "0.15.1",
5
5
  "author": "@ClayChipps",
6
6
  "homepage": "https://github.com/SimplySF/simply-plugins",
7
7
  "bugs": "https://github.com/SimplySF/simply-plugins/issues",
@@ -60,12 +60,12 @@
60
60
  "@salesforce/core": "^8.30.0",
61
61
  "@salesforce/kit": "^3.2.6",
62
62
  "@salesforce/sf-plugins-core": "^12.2.16",
63
- "@simplysf/simply-aep-core": "^0.13.1",
63
+ "@simplysf/simply-aep-core": "^0.14.0",
64
64
  "@simplysf/simply-core": "^1.5.1"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@oclif/plugin-command-snapshot": "^5.4.0",
68
- "@salesforce/plugin-command-reference": "^3.1.99",
68
+ "@salesforce/plugin-command-reference": "^3.1.133",
69
69
  "@salesforce/source-deploy-retrieve": "^12.37.2",
70
70
  "@vitest/coverage-v8": "^4.1.10",
71
71
  "vitest": "^4.1.10"
@@ -197,5 +197,5 @@
197
197
  "output": []
198
198
  }
199
199
  },
200
- "gitHead": "a836763b64db560efdb2a62784d5115f3e7b5509"
200
+ "gitHead": "28a6740666151b0d5b923e35a9a0ca06d07608aa"
201
201
  }