@simplysf/simply-aep 0.3.1 → 0.4.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.
Files changed (38) hide show
  1. package/README.md +2 -2
  2. package/lib/commands/simply/aep/at4dx/binding/list.d.ts +1 -1
  3. package/lib/commands/simply/aep/at4dx/binding/list.js +1 -4
  4. package/lib/commands/simply/aep/at4dx/binding/list.js.map +1 -1
  5. package/lib/commands/simply/aep/at4dx/domain-process-binding/list.d.ts +1 -1
  6. package/lib/commands/simply/aep/at4dx/domain-process-binding/list.js +1 -3
  7. package/lib/commands/simply/aep/at4dx/domain-process-binding/list.js.map +1 -1
  8. package/lib/index.d.ts +2 -8
  9. package/lib/index.js +1 -12
  10. package/lib/index.js.map +1 -1
  11. package/package.json +3 -3
  12. package/lib/common/at4dxBindingTypes.d.ts +0 -49
  13. package/lib/common/at4dxBindingTypes.js +0 -50
  14. package/lib/common/at4dxBindingTypes.js.map +0 -1
  15. package/lib/common/at4dxDomainProcessBindingTypes.d.ts +0 -55
  16. package/lib/common/at4dxDomainProcessBindingTypes.js +0 -29
  17. package/lib/common/at4dxDomainProcessBindingTypes.js.map +0 -1
  18. package/lib/common/at4dxDomainProcessLocalScan.d.ts +0 -15
  19. package/lib/common/at4dxDomainProcessLocalScan.js +0 -95
  20. package/lib/common/at4dxDomainProcessLocalScan.js.map +0 -1
  21. package/lib/common/at4dxDomainProcessOrgScan.d.ts +0 -16
  22. package/lib/common/at4dxDomainProcessOrgScan.js +0 -78
  23. package/lib/common/at4dxDomainProcessOrgScan.js.map +0 -1
  24. package/lib/common/at4dxDomainProcessResolve.d.ts +0 -17
  25. package/lib/common/at4dxDomainProcessResolve.js +0 -70
  26. package/lib/common/at4dxDomainProcessResolve.js.map +0 -1
  27. package/lib/common/at4dxLocalScan.d.ts +0 -17
  28. package/lib/common/at4dxLocalScan.js +0 -97
  29. package/lib/common/at4dxLocalScan.js.map +0 -1
  30. package/lib/common/at4dxOrgScan.d.ts +0 -22
  31. package/lib/common/at4dxOrgScan.js +0 -87
  32. package/lib/common/at4dxOrgScan.js.map +0 -1
  33. package/lib/common/at4dxResolve.d.ts +0 -9
  34. package/lib/common/at4dxResolve.js +0 -92
  35. package/lib/common/at4dxResolve.js.map +0 -1
  36. package/lib/common/customMetadataXml.d.ts +0 -21
  37. package/lib/common/customMetadataXml.js +0 -41
  38. package/lib/common/customMetadataXml.js.map +0 -1
package/README.md CHANGED
@@ -79,7 +79,7 @@ FLAG DESCRIPTIONS
79
79
  Comma-separated list of binding types to include. If not specified, all four are included.
80
80
  ```
81
81
 
82
- _See code: [lib/commands/simply/aep/at4dx/binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.3.0/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/list.js)_
82
+ _See code: [lib/commands/simply/aep/at4dx/binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.3.1/packages/simply-aep/lib/commands/simply/aep/at4dx/binding/list.js)_
83
83
 
84
84
  ## `sf simply aep at4dx domain-process-binding list`
85
85
 
@@ -125,5 +125,5 @@ EXAMPLES
125
125
  $ sf simply aep at4dx domain-process-binding list --target-org myOrg --active-only --json
126
126
  ```
127
127
 
128
- _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.3.0/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/list.js)_
128
+ _See code: [lib/commands/simply/aep/at4dx/domain-process-binding/list.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-aep@0.3.1/packages/simply-aep/lib/commands/simply/aep/at4dx/domain-process-binding/list.js)_
129
129
  <!-- commandsstop -->
@@ -1,5 +1,5 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
- import { type At4dxBindingListResult, type BindingTypeFlag } from '../../../../../common/at4dxBindingTypes.js';
2
+ import { type At4dxBindingListResult, type BindingTypeFlag } from '@simplysf/simply-aep-core';
3
3
  /**
4
4
  * Lists the AT4DX Application Factory bindings (`ApplicationFactory_ServiceBinding__mdt`,
5
5
  * `ApplicationFactory_SelectorBinding__mdt`, `ApplicationFactory_DomainBinding__mdt`,
@@ -15,10 +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, } from '../../../../../common/at4dxBindingTypes.js';
19
- import { scanLocalBindings } from '../../../../../common/at4dxLocalScan.js';
20
- import { scanOrgBindings } from '../../../../../common/at4dxOrgScan.js';
21
- import { resolveBindings } from '../../../../../common/at4dxResolve.js';
18
+ import { ALL_BINDING_TYPES, BINDING_TYPE_BY_FLAG, resolveBindings, scanLocalBindings, scanOrgBindings, } from '@simplysf/simply-aep-core';
22
19
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
23
20
  const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.binding.list');
24
21
  const BINDING_TYPE_FLAG_OPTIONS = ['service', 'selector', 'domain', 'unit-of-work'];
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../../src/commands/simply/aep/at4dx/binding/list.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,GAKrB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GA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,OAAO,EAAE;gBACP,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE;gBACpC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;gBAC3B,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;gBACzB,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;gBAC/B,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE;gBACvC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;aAClC;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QAE3E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
- import { type At4dxDomainProcessBindingListResult } from '../../../../../common/at4dxDomainProcessBindingTypes.js';
2
+ import { type At4dxDomainProcessBindingListResult } from '@simplysf/simply-aep-core';
3
3
  /**
4
4
  * Lists the AT4DX Trigger Action Framework bindings (`DomainProcessBinding__mdt`) configured in a
5
5
  * target org or local DX source — the criteria/action classes bound to each SObject's trigger events
@@ -15,9 +15,7 @@
15
15
  */
16
16
  import { Messages } from '@salesforce/core';
17
17
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
18
- import { scanLocalDomainProcessBindings } from '../../../../../common/at4dxDomainProcessLocalScan.js';
19
- import { scanOrgDomainProcessBindings } from '../../../../../common/at4dxDomainProcessOrgScan.js';
20
- import { resolveDomainProcessBindings } from '../../../../../common/at4dxDomainProcessResolve.js';
18
+ import { resolveDomainProcessBindings, scanLocalDomainProcessBindings, scanOrgDomainProcessBindings, } from '@simplysf/simply-aep-core';
21
19
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
22
20
  const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.domain-process-binding.list');
23
21
  function toDisplayRow(row) {
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../../src/commands/simply/aep/at4dx/domain-process-binding/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAM/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAClG,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAElG,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,8CAA8C,CAAC,CAAC;AAc/G,SAAS,YAAY,CAAC,GAA4B;IAChD,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,OAAO,EAAE,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,iBAAiB,IAAI,EAAE;QAChF,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,KAAK,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;QAC1E,KAAK,EAAE,GAAG,CAAC,aAAa;QACxB,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC;QACtC,MAAM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, bindingTypeForLocalObjectName, type At4dxBindingListResult, type At4dxBindingRow, type BindingType, type BindingTypeFlag, type RawBindingRecord, } from './common/at4dxBindingTypes.js';
2
- export { scanLocalBindings } from './common/at4dxLocalScan.js';
3
- export { scanOrgBindings, type OrgScanResult } from './common/at4dxOrgScan.js';
4
- export { resolveBindings } from './common/at4dxResolve.js';
5
- export { ALL_TRIGGER_OPERATIONS, DOMAIN_PROCESS_BINDING_OBJECT, DOMAIN_PROCESS_BINDING_LOCAL_OBJECT_NAME, type At4dxDomainProcessBindingListResult, type DomainProcessBindingRow, type DomainProcessType, type ProcessContext, type RawDomainProcessBindingRecord, type TriggerOperation, } from './common/at4dxDomainProcessBindingTypes.js';
6
- export { scanLocalDomainProcessBindings } from './common/at4dxDomainProcessLocalScan.js';
7
- export { scanOrgDomainProcessBindings, type DomainProcessOrgScanResult } from './common/at4dxDomainProcessOrgScan.js';
8
- export { resolveDomainProcessBindings } from './common/at4dxDomainProcessResolve.js';
1
+ declare const _default: {};
2
+ export default _default;
package/lib/index.js CHANGED
@@ -13,16 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- // Unlike other `simply-*` command packages, this barrel isn't an empty oclif-plugin stub — the
17
- // binding scan/resolve logic is meant to be consumed directly by a future VS Code extension, not
18
- // just by this package's own command. See docs/design/0007-at4dx-binding-list.md's "Decision"
19
- // section for why.
20
- export { ALL_BINDING_TYPES, AT4DX_BINDING_OBJECTS, AT4DX_BINDING_LOCAL_OBJECT_NAMES, BINDING_TYPE_BY_FLAG, bindingTypeForLocalObjectName, } from './common/at4dxBindingTypes.js';
21
- export { scanLocalBindings } from './common/at4dxLocalScan.js';
22
- export { scanOrgBindings } from './common/at4dxOrgScan.js';
23
- export { resolveBindings } from './common/at4dxResolve.js';
24
- export { ALL_TRIGGER_OPERATIONS, DOMAIN_PROCESS_BINDING_OBJECT, DOMAIN_PROCESS_BINDING_LOCAL_OBJECT_NAME, } from './common/at4dxDomainProcessBindingTypes.js';
25
- export { scanLocalDomainProcessBindings } from './common/at4dxDomainProcessLocalScan.js';
26
- export { scanOrgDomainProcessBindings } from './common/at4dxDomainProcessOrgScan.js';
27
- export { resolveDomainProcessBindings } from './common/at4dxDomainProcessResolve.js';
16
+ export default {};
28
17
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,+FAA+F;AAC/F,iGAAiG;AACjG,8FAA8F;AAC9F,mBAAmB;AAEnB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gCAAgC,EAChC,oBAAoB,EACpB,6BAA6B,GAM9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAsB,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,wCAAwC,GAOzC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,4BAA4B,EAAmC,MAAM,uCAAuC,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAe,EAAE,CAAC"}
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.3.1",
4
+ "version": "0.4.0",
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
- "@salesforce/source-deploy-retrieve": "^12.37.2",
62
+ "@simplysf/simply-aep-core": "^0.2.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": "4fca2ac0e338eb2221758a5eca8cca3497fb24af"
209
+ "gitHead": "a1be2a6757d52f5baace32f68b4dacf707e9e7c2"
210
210
  }
@@ -1,49 +0,0 @@
1
- /** The four AT4DX Application Factory binding types this command reads. */
2
- export type BindingType = 'Service' | 'Selector' | 'Domain' | 'UnitOfWork';
3
- export declare const ALL_BINDING_TYPES: BindingType[];
4
- /** The `--type` flag's CLI-facing spelling for each binding type. */
5
- export type BindingTypeFlag = 'service' | 'selector' | 'domain' | 'unit-of-work';
6
- export declare const BINDING_TYPE_BY_FLAG: Record<BindingTypeFlag, BindingType>;
7
- /**
8
- * The Custom Metadata Type API name AT4DX stores each binding type's records in.
9
- *
10
- * This is the single source of truth `at4dxOrgScan`, `at4dxLocalScan`, and `at4dxResolve` all key
11
- * off of, so the four binding types can't drift out of sync with each other.
12
- */
13
- export declare const AT4DX_BINDING_OBJECTS: Record<BindingType, string>;
14
- /**
15
- * The local-source component name AT4DX's Custom Metadata Type records use — the CMDT API name
16
- * without its `__mdt` suffix, e.g. `ApplicationFactory_ServiceBinding.CampaignSObjectBinding` is a
17
- * `CustomMetadata` component named `ApplicationFactory_ServiceBinding.<record>`.
18
- */
19
- export declare const AT4DX_BINDING_LOCAL_OBJECT_NAMES: Record<BindingType, string>;
20
- /** @returns The binding type whose local object name is `localObjectName`, or `undefined` if none matches. */
21
- export declare function bindingTypeForLocalObjectName(localObjectName: string): BindingType | undefined;
22
- /**
23
- * One binding record, normalized from either an org query or local source, before resolution.
24
- *
25
- * `key` is the interface name (Service) or SObject API name (Selector/Domain/UnitOfWork) the
26
- * binding resolves for. `to` is the implementing Apex class — absent for UnitOfWork, which has no
27
- * `To__c` field (see `at4dxResolve` for why).
28
- */
29
- export type RawBindingRecord = {
30
- bindingType: BindingType;
31
- developerName: string;
32
- key: string;
33
- to?: string;
34
- priority?: number;
35
- sequence?: number;
36
- /** Local package directory name, or the org username when read from `--target-org`. */
37
- source: string;
38
- };
39
- /** A `RawBindingRecord` annotated with the resolution outcome `at4dxResolve` computed for it. */
40
- export type At4dxBindingRow = RawBindingRecord & {
41
- /** Whether this row is the one AT4DX actually resolves to for its key. Always `true` for UnitOfWork. */
42
- effective: boolean;
43
- /** Domain only: `true` when >1 row shares this key and AT4DX doesn't guarantee which one wins. */
44
- ambiguous?: boolean;
45
- };
46
- export type At4dxBindingListResult = {
47
- source: string;
48
- bindings: At4dxBindingRow[];
49
- };
@@ -1,50 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export const ALL_BINDING_TYPES = ['Service', 'Selector', 'Domain', 'UnitOfWork'];
17
- export const BINDING_TYPE_BY_FLAG = {
18
- service: 'Service',
19
- selector: 'Selector',
20
- domain: 'Domain',
21
- 'unit-of-work': 'UnitOfWork',
22
- };
23
- /**
24
- * The Custom Metadata Type API name AT4DX stores each binding type's records in.
25
- *
26
- * This is the single source of truth `at4dxOrgScan`, `at4dxLocalScan`, and `at4dxResolve` all key
27
- * off of, so the four binding types can't drift out of sync with each other.
28
- */
29
- export const AT4DX_BINDING_OBJECTS = {
30
- Service: 'ApplicationFactory_ServiceBinding__mdt',
31
- Selector: 'ApplicationFactory_SelectorBinding__mdt',
32
- Domain: 'ApplicationFactory_DomainBinding__mdt',
33
- UnitOfWork: 'ApplicationFactory_UnitOfWorkBinding__mdt',
34
- };
35
- /**
36
- * The local-source component name AT4DX's Custom Metadata Type records use — the CMDT API name
37
- * without its `__mdt` suffix, e.g. `ApplicationFactory_ServiceBinding.CampaignSObjectBinding` is a
38
- * `CustomMetadata` component named `ApplicationFactory_ServiceBinding.<record>`.
39
- */
40
- export const AT4DX_BINDING_LOCAL_OBJECT_NAMES = {
41
- Service: 'ApplicationFactory_ServiceBinding',
42
- Selector: 'ApplicationFactory_SelectorBinding',
43
- Domain: 'ApplicationFactory_DomainBinding',
44
- UnitOfWork: 'ApplicationFactory_UnitOfWorkBinding',
45
- };
46
- /** @returns The binding type whose local object name is `localObjectName`, or `undefined` if none matches. */
47
- export function bindingTypeForLocalObjectName(localObjectName) {
48
- return ALL_BINDING_TYPES.find((type) => AT4DX_BINDING_LOCAL_OBJECT_NAMES[type] === localObjectName);
49
- }
50
- //# sourceMappingURL=at4dxBindingTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxBindingTypes.js","sourceRoot":"","sources":["../../src/common/at4dxBindingTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM,CAAC,MAAM,iBAAiB,GAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AAKhG,MAAM,CAAC,MAAM,oBAAoB,GAAyC;IACxE,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,cAAc,EAAE,YAAY;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAgC;IAChE,OAAO,EAAE,wCAAwC;IACjD,QAAQ,EAAE,yCAAyC;IACnD,MAAM,EAAE,uCAAuC;IAC/C,UAAU,EAAE,2CAA2C;CACxD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAgC;IAC3E,OAAO,EAAE,mCAAmC;IAC5C,QAAQ,EAAE,oCAAoC;IAC9C,MAAM,EAAE,kCAAkC;IAC1C,UAAU,EAAE,sCAAsC;CACnD,CAAC;AAEF,8GAA8G;AAC9G,MAAM,UAAU,6BAA6B,CAAC,eAAuB;IACnE,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gCAAgC,CAAC,IAAI,CAAC,KAAK,eAAe,CAAC,CAAC;AACtG,CAAC"}
@@ -1,55 +0,0 @@
1
- /** Whether a `DomainProcessBinding__mdt` record contributes a criteria filter or an action. */
2
- export type DomainProcessType = 'Action' | 'Criteria';
3
- /** What kind of process invokes this binding: a trigger event, or a domain method's explicit process token. */
4
- export type ProcessContext = 'TriggerExecution' | 'DomainMethodExecution';
5
- /** `TriggerOperation__c`'s picklist values, meaningful only when `processContext` is `TriggerExecution`. */
6
- export type TriggerOperation = 'Before_Insert' | 'After_Insert' | 'Before_Update' | 'After_Update' | 'Before_Delete' | 'After_Delete' | 'After_Undelete';
7
- export declare const ALL_TRIGGER_OPERATIONS: TriggerOperation[];
8
- /** The Custom Metadata Type API name AT4DX's Trigger Action Framework stores its bindings in. */
9
- export declare const DOMAIN_PROCESS_BINDING_OBJECT = "DomainProcessBinding__mdt";
10
- /** The local-source component object name for `DomainProcessBinding__mdt` records — the CMDT API name without its `__mdt` suffix. */
11
- export declare const DOMAIN_PROCESS_BINDING_LOCAL_OBJECT_NAME = "DomainProcessBinding";
12
- /**
13
- * One `DomainProcessBinding__mdt` record, normalized from either an org query or local source.
14
- *
15
- * Unlike `RawBindingRecord` (Application Factory bindings), there's no interface/SObject "key" a
16
- * record resolves for and no priority-based winner — every active record actually runs, ordered by
17
- * `order`. `sobject` is `undefined` only for a malformed record with neither
18
- * `RelatedDomainBindingSObject__c` nor `RelatedDomainBindingSObjectAlternate__c` set; such records
19
- * are dropped by the scanners rather than surfaced with a missing SObject.
20
- */
21
- export type RawDomainProcessBindingRecord = {
22
- developerName: string;
23
- sobject: string;
24
- processContext: ProcessContext;
25
- /** `TriggerOperation__c`. Present when `processContext` is `TriggerExecution`. */
26
- triggerOperation?: TriggerOperation;
27
- /** `DomainMethodToken__c`. Present when `processContext` is `DomainMethodExecution`. */
28
- domainMethodToken?: string;
29
- type: DomainProcessType;
30
- classToInject: string;
31
- /** `OrderOfExecution__c`. */
32
- order: number;
33
- isActive: boolean;
34
- executeAsynchronous: boolean;
35
- logicalInverse: boolean;
36
- preventRecursive: boolean;
37
- description?: string;
38
- /** Local package directory name, or the org username when read from `--target-org`. */
39
- source: string;
40
- };
41
- /** A `RawDomainProcessBindingRecord` annotated with the resolution outcome `resolveDomainProcessBindings` computed for it. */
42
- export type DomainProcessBindingRow = RawDomainProcessBindingRecord & {
43
- /**
44
- * `true` when more than one *active* record in the same group (same `sobject`, `processContext`,
45
- * and `triggerOperation`/`domainMethodToken`) shares this record's `order` — AT4DX's Custom
46
- * Metadata query has no `ORDER BY` tiebreak for equal `OrderOfExecution__c` values, so which one
47
- * actually runs first isn't something this command can determine, the same "flag it, don't guess"
48
- * precedent `at4dxResolve.ts` applies to ambiguous Domain bindings.
49
- */
50
- orderCollision?: boolean;
51
- };
52
- export type At4dxDomainProcessBindingListResult = {
53
- source: string;
54
- bindings: DomainProcessBindingRow[];
55
- };
@@ -1,29 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export const ALL_TRIGGER_OPERATIONS = [
17
- 'Before_Insert',
18
- 'After_Insert',
19
- 'Before_Update',
20
- 'After_Update',
21
- 'Before_Delete',
22
- 'After_Delete',
23
- 'After_Undelete',
24
- ];
25
- /** The Custom Metadata Type API name AT4DX's Trigger Action Framework stores its bindings in. */
26
- export const DOMAIN_PROCESS_BINDING_OBJECT = 'DomainProcessBinding__mdt';
27
- /** The local-source component object name for `DomainProcessBinding__mdt` records — the CMDT API name without its `__mdt` suffix. */
28
- export const DOMAIN_PROCESS_BINDING_LOCAL_OBJECT_NAME = 'DomainProcessBinding';
29
- //# sourceMappingURL=at4dxDomainProcessBindingTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxDomainProcessBindingTypes.js","sourceRoot":"","sources":["../../src/common/at4dxDomainProcessBindingTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkBH,MAAM,CAAC,MAAM,sBAAsB,GAAuB;IACxD,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;IACd,gBAAgB;CACjB,CAAC;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,6BAA6B,GAAG,2BAA2B,CAAC;AAEzE,qIAAqI;AACrI,MAAM,CAAC,MAAM,wCAAwC,GAAG,sBAAsB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { type RawDomainProcessBindingRecord } from './at4dxDomainProcessBindingTypes.js';
2
- /**
3
- * Scan local Salesforce DX source directories for AT4DX `DomainProcessBinding__mdt` records, parsing
4
- * each `CustomMetadata` component's `<values>` pairs directly — the same approach `at4dxLocalScan.ts`
5
- * uses for Application Factory bindings.
6
- *
7
- * Unlike an org (see `at4dxDomainProcessOrgScan.ts`), local source gives no signal for "this Custom
8
- * Metadata Type doesn't exist" independent of "zero records exist for it" — a missing
9
- * `customMetadata` folder and an empty one look identical to `ComponentSet.fromSource`. Callers treat
10
- * an empty result as "AT4DX's Trigger Action Framework isn't configured here."
11
- *
12
- * @param sourceDirs - The source directories to scan.
13
- * @returns The discovered bindings.
14
- */
15
- export declare function scanLocalDomainProcessBindings(sourceDirs: string[]): RawDomainProcessBindingRecord[];
@@ -1,95 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import path from 'node:path';
17
- import { ComponentSet } from '@salesforce/source-deploy-retrieve';
18
- import { DOMAIN_PROCESS_BINDING_LOCAL_OBJECT_NAME, } from './at4dxDomainProcessBindingTypes.js';
19
- import { extractValues, fieldValue, toBoolean, toNumber } from './customMetadataXml.js';
20
- /** @returns The source-format package/project directory name a metadata file belongs to (the directory containing `customMetadata`), same convention `at4dxLocalScan.ts` uses. */
21
- function deriveProjectName(filePath) {
22
- if (!filePath) {
23
- return 'local';
24
- }
25
- const normalized = filePath.replace(/\\/g, '/');
26
- const index = normalized.indexOf('/customMetadata/');
27
- if (index === -1) {
28
- return 'local';
29
- }
30
- return path.basename(normalized.slice(0, index));
31
- }
32
- /** @returns The normalized binding record for one `DomainProcessBinding.*` `CustomMetadata` component, or `undefined` if it has no resolvable SObject. */
33
- function toRawRecord(component, developerName) {
34
- const xml = component.parseXmlSync();
35
- const values = extractValues(xml);
36
- const sobject = fieldValue(values, 'RelatedDomainBindingSObject__c') ??
37
- fieldValue(values, 'RelatedDomainBindingSObjectAlternate__c');
38
- if (!sobject) {
39
- return undefined;
40
- }
41
- return {
42
- developerName,
43
- sobject,
44
- processContext: fieldValue(values, 'ProcessContext__c'),
45
- triggerOperation: fieldValue(values, 'TriggerOperation__c'),
46
- domainMethodToken: fieldValue(values, 'DomainMethodToken__c'),
47
- type: fieldValue(values, 'Type__c'),
48
- classToInject: fieldValue(values, 'ClassToInject__c') ?? '',
49
- order: toNumber(fieldValue(values, 'OrderOfExecution__c')) ?? 0,
50
- isActive: toBoolean(fieldValue(values, 'IsActive__c'), true),
51
- executeAsynchronous: toBoolean(fieldValue(values, 'ExecuteAsynchronous__c'), false),
52
- logicalInverse: toBoolean(fieldValue(values, 'LogicalInverse__c'), false),
53
- preventRecursive: toBoolean(fieldValue(values, 'PreventRecursive__c'), false),
54
- description: fieldValue(values, 'Description__c'),
55
- source: deriveProjectName(component.xml),
56
- };
57
- }
58
- /**
59
- * Scan local Salesforce DX source directories for AT4DX `DomainProcessBinding__mdt` records, parsing
60
- * each `CustomMetadata` component's `<values>` pairs directly — the same approach `at4dxLocalScan.ts`
61
- * uses for Application Factory bindings.
62
- *
63
- * Unlike an org (see `at4dxDomainProcessOrgScan.ts`), local source gives no signal for "this Custom
64
- * Metadata Type doesn't exist" independent of "zero records exist for it" — a missing
65
- * `customMetadata` folder and an empty one look identical to `ComponentSet.fromSource`. Callers treat
66
- * an empty result as "AT4DX's Trigger Action Framework isn't configured here."
67
- *
68
- * @param sourceDirs - The source directories to scan.
69
- * @returns The discovered bindings.
70
- */
71
- export function scanLocalDomainProcessBindings(sourceDirs) {
72
- const records = [];
73
- const components = ComponentSet.fromSource(sourceDirs);
74
- for (const rawComponent of components) {
75
- const component = rawComponent;
76
- if (component.type.id !== 'custommetadata') {
77
- continue;
78
- }
79
- const separatorIndex = component.name.indexOf('.');
80
- if (separatorIndex === -1) {
81
- continue;
82
- }
83
- const localObjectName = component.name.slice(0, separatorIndex);
84
- if (localObjectName !== DOMAIN_PROCESS_BINDING_LOCAL_OBJECT_NAME) {
85
- continue;
86
- }
87
- const developerName = component.name.slice(separatorIndex + 1);
88
- const record = toRawRecord(component, developerName);
89
- if (record) {
90
- records.push(record);
91
- }
92
- }
93
- return records;
94
- }
95
- //# sourceMappingURL=at4dxDomainProcessLocalScan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxDomainProcessLocalScan.js","sourceRoot":"","sources":["../../src/common/at4dxDomainProcessLocalScan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAwB,MAAM,oCAAoC,CAAC;AACxF,OAAO,EACL,wCAAwC,GAKzC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAA0B,MAAM,wBAAwB,CAAC;AAEhH,kLAAkL;AAClL,SAAS,iBAAiB,CAAC,QAA4B;IACrD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,0JAA0J;AAC1J,SAAS,WAAW,CAAC,SAA0B,EAAE,aAAqB;IACpE,MAAM,GAAG,GAAG,SAAS,CAAC,YAAY,EAAqB,CAAC;IACxD,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAElC,MAAM,OAAO,GACX,UAAU,CAAC,MAAM,EAAE,gCAAgC,CAAC;QACpD,UAAU,CAAC,MAAM,EAAE,yCAAyC,CAAC,CAAC;IAChE,IAAI,CAAC,OAAO,EAAE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C,IAAI,CAAC,EAAE,KAAK,gBAAgB,EAAE,CAAC;YAC3C,SAAS;QACX,CAAC;QAED,MAAM,cAAc,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC;YAC1B,SAAS;QACX,CAAC;QACD,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAChE,IAAI,eAAe,KAAK,wCAAwC,EAAE,CAAC;YACjE,SAAS;QACX,CAAC;QACD,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;QAE/D,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACrD,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,16 +0,0 @@
1
- import { type Connection } from '@salesforce/core';
2
- import { type RawDomainProcessBindingRecord } from './at4dxDomainProcessBindingTypes.js';
3
- export type DomainProcessOrgScanResult = {
4
- records: RawDomainProcessBindingRecord[];
5
- /** `true` when the `DomainProcessBinding__mdt` Custom Metadata Type doesn't exist in this org. */
6
- missing: boolean;
7
- };
8
- /**
9
- * Query the target org for AT4DX `DomainProcessBinding__mdt` records — an ordinary queryable Custom
10
- * Metadata Type, plain REST (`connection.autoFetchQuery`), no Tooling API, no chunking (row counts
11
- * are inherently small).
12
- *
13
- * @param connection - The org connection to query against.
14
- * @returns The discovered bindings, and whether the Custom Metadata Type exists in this org at all.
15
- */
16
- export declare function scanOrgDomainProcessBindings(connection: Connection): Promise<DomainProcessOrgScanResult>;
@@ -1,78 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { DOMAIN_PROCESS_BINDING_OBJECT, } from './at4dxDomainProcessBindingTypes.js';
17
- /**
18
- * SOQL for `DomainProcessBinding__mdt`, including the `RelatedDomainBindingSObject__r.QualifiedApiName`
19
- * relationship traversal — like `ApplicationFactory_*Binding__mdt`'s `BindingSObject__c`, this field
20
- * holds an EntityDefinition reference, not a usable API name, when read from an org (local source XML
21
- * stores the API name directly; see `at4dxDomainProcessLocalScan.ts`).
22
- */
23
- const SOQL = `SELECT DeveloperName, RelatedDomainBindingSObject__c, RelatedDomainBindingSObject__r.QualifiedApiName, RelatedDomainBindingSObjectAlternate__c, ProcessContext__c, TriggerOperation__c, DomainMethodToken__c, Type__c, ClassToInject__c, OrderOfExecution__c, IsActive__c, ExecuteAsynchronous__c, LogicalInverse__c, PreventRecursive__c, Description__c FROM ${DOMAIN_PROCESS_BINDING_OBJECT}`;
24
- /** @returns The SObject API name, preferring `RelatedDomainBindingSObject__c`'s resolved API name and falling back to `RelatedDomainBindingSObjectAlternate__c`, matching the same fallback order `at4dxOrgScan.ts` uses for `BindingSObject__c`. */
25
- function resolveSObject(record) {
26
- if (record.RelatedDomainBindingSObject__c) {
27
- return record.RelatedDomainBindingSObject__r?.QualifiedApiName ?? undefined;
28
- }
29
- return record.RelatedDomainBindingSObjectAlternate__c ?? undefined;
30
- }
31
- /** @returns The normalized binding record, or `undefined` if the record has no resolvable SObject. */
32
- function toRawRecord(record, source) {
33
- const sobject = resolveSObject(record);
34
- if (!sobject) {
35
- return undefined;
36
- }
37
- return {
38
- developerName: record.DeveloperName,
39
- sobject,
40
- processContext: record.ProcessContext__c,
41
- triggerOperation: record.TriggerOperation__c ?? undefined,
42
- domainMethodToken: record.DomainMethodToken__c ?? undefined,
43
- type: record.Type__c,
44
- classToInject: record.ClassToInject__c,
45
- order: record.OrderOfExecution__c,
46
- isActive: record.IsActive__c,
47
- executeAsynchronous: record.ExecuteAsynchronous__c,
48
- logicalInverse: record.LogicalInverse__c,
49
- preventRecursive: record.PreventRecursive__c,
50
- description: record.Description__c ?? undefined,
51
- source,
52
- };
53
- }
54
- /**
55
- * Query the target org for AT4DX `DomainProcessBinding__mdt` records — an ordinary queryable Custom
56
- * Metadata Type, plain REST (`connection.autoFetchQuery`), no Tooling API, no chunking (row counts
57
- * are inherently small).
58
- *
59
- * @param connection - The org connection to query against.
60
- * @returns The discovered bindings, and whether the Custom Metadata Type exists in this org at all.
61
- */
62
- export async function scanOrgDomainProcessBindings(connection) {
63
- const source = connection.getUsername() ?? 'org';
64
- try {
65
- const result = await connection.autoFetchQuery(SOQL);
66
- const records = result.records
67
- .map((record) => toRawRecord(record, source))
68
- .filter((record) => record !== undefined);
69
- return { records, missing: false };
70
- }
71
- catch (error) {
72
- if (error.name === 'INVALID_TYPE') {
73
- return { records: [], missing: true };
74
- }
75
- throw error;
76
- }
77
- }
78
- //# sourceMappingURL=at4dxDomainProcessOrgScan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxDomainProcessOrgScan.js","sourceRoot":"","sources":["../../src/common/at4dxDomainProcessOrgScan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,6BAA6B,GAK9B,MAAM,qCAAqC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,IAAI,GAAG,kWAAkW,6BAA6B,EAAE,CAAC;AAoB/Y,qPAAqP;AACrP,SAAS,cAAc,CAAC,MAAqC;IAC3D,IAAI,MAAM,CAAC,8BAA8B,EAAE,CAAC;QAC1C,OAAO,MAAM,CAAC,8BAA8B,EAAE,gBAA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EAA2C,EAAE,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;QACrF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAAe,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;YAC7C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { DomainProcessBindingRow, RawDomainProcessBindingRecord } from './at4dxDomainProcessBindingTypes.js';
2
- /**
3
- * Resolve raw `DomainProcessBinding__mdt` records into rows sorted by execution order within each
4
- * (SObject, process context, trigger operation/domain method token, type) group, flagging
5
- * `orderCollision` where AT4DX itself doesn't guarantee a deterministic tiebreak.
6
- *
7
- * Unlike Application Factory bindings, there's no "winner" here — every active record in a group
8
- * runs, in `OrderOfExecution__c` order. Two *active* records sharing the same order within a group is
9
- * the one thing worth flagging: AT4DX's Custom Metadata query has no `ORDER BY` tiebreak for equal
10
- * order values, so which one actually runs first isn't something this command can determine (the same
11
- * "flag it, don't guess" precedent `at4dxResolve.ts` applies to ambiguous Domain bindings). Inactive
12
- * records never contribute to a collision, since AT4DX skips them entirely.
13
- *
14
- * @param records - The raw binding records to resolve, as returned by `scanOrgDomainProcessBindings`/`scanLocalDomainProcessBindings`.
15
- * @returns The resolved rows, grouped in first-seen order, sorted by `order` ascending within each group.
16
- */
17
- export declare function resolveDomainProcessBindings(records: RawDomainProcessBindingRecord[]): DomainProcessBindingRow[];
@@ -1,70 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Groups records by the same (SObject, process context, trigger operation/domain method token, type)
18
- * scope AT4DX's `DomainProcessCoordinator` map contends over. `type` matters: AT4DX's runtime map keys
19
- * `Criteria` and `Action` records separately, so a Criteria and an Action sharing the same
20
- * `OrderOfExecution__c` — a normal, common configuration — never contend for the same slot and must
21
- * not be flagged as a collision.
22
- */
23
- function groupKey(record) {
24
- return [
25
- record.sobject,
26
- record.processContext,
27
- record.triggerOperation ?? record.domainMethodToken ?? '',
28
- record.type,
29
- ].join(' ');
30
- }
31
- /**
32
- * Resolve raw `DomainProcessBinding__mdt` records into rows sorted by execution order within each
33
- * (SObject, process context, trigger operation/domain method token, type) group, flagging
34
- * `orderCollision` where AT4DX itself doesn't guarantee a deterministic tiebreak.
35
- *
36
- * Unlike Application Factory bindings, there's no "winner" here — every active record in a group
37
- * runs, in `OrderOfExecution__c` order. Two *active* records sharing the same order within a group is
38
- * the one thing worth flagging: AT4DX's Custom Metadata query has no `ORDER BY` tiebreak for equal
39
- * order values, so which one actually runs first isn't something this command can determine (the same
40
- * "flag it, don't guess" precedent `at4dxResolve.ts` applies to ambiguous Domain bindings). Inactive
41
- * records never contribute to a collision, since AT4DX skips them entirely.
42
- *
43
- * @param records - The raw binding records to resolve, as returned by `scanOrgDomainProcessBindings`/`scanLocalDomainProcessBindings`.
44
- * @returns The resolved rows, grouped in first-seen order, sorted by `order` ascending within each group.
45
- */
46
- export function resolveDomainProcessBindings(records) {
47
- const byGroup = new Map();
48
- for (const record of records) {
49
- const key = groupKey(record);
50
- const group = byGroup.get(key) ?? [];
51
- group.push(record);
52
- byGroup.set(key, group);
53
- }
54
- const rows = [];
55
- for (const group of byGroup.values()) {
56
- const activeOrderCounts = new Map();
57
- for (const record of group) {
58
- if (record.isActive) {
59
- activeOrderCounts.set(record.order, (activeOrderCounts.get(record.order) ?? 0) + 1);
60
- }
61
- }
62
- const sorted = [...group].sort((a, b) => a.order - b.order);
63
- for (const record of sorted) {
64
- const orderCollision = record.isActive && (activeOrderCounts.get(record.order) ?? 0) > 1;
65
- rows.push({ ...record, ...(orderCollision ? { orderCollision: true } : {}) });
66
- }
67
- }
68
- return rows;
69
- }
70
- //# sourceMappingURL=at4dxDomainProcessResolve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxDomainProcessResolve.js","sourceRoot":"","sources":["../../src/common/at4dxDomainProcessResolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;;;;GAMG;AACH,SAAS,QAAQ,CAAC,MAAqC;IACrD,OAAO;QACL,MAAM,CAAC,OAAO;QACd,MAAM,CAAC,cAAc;QACrB,MAAM,CAAC,gBAAgB,IAAI,MAAM,CAAC,iBAAiB,IAAI,EAAE;QACzD,MAAM,CAAC,IAAI;KACZ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAwC;IACnF,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2C,CAAC;IACnE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,IAAI,GAA8B,EAAE,CAAC;IAE3C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACrC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;QACpD,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE,CAAC;YAC3B,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACpB,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5D,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YACzF,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,17 +0,0 @@
1
- import { type BindingType, type RawBindingRecord } from './at4dxBindingTypes.js';
2
- /**
3
- * Scan local Salesforce DX source directories for AT4DX Application Factory binding records,
4
- * parsing each `CustomMetadata` component's `<values>` pairs directly — the same "read the
5
- * metadata XML" approach `simply schema visualize`'s local scan uses for `CustomField`/
6
- * `CustomObject`.
7
- *
8
- * Unlike an org (see `at4dxOrgScan`), local source gives no signal for "this Custom Metadata Type
9
- * doesn't exist" independent of "zero records exist for it" — a missing `customMetadata` folder
10
- * and an empty one look identical to `ComponentSet.fromSource`. Callers treat a fully empty result
11
- * across every requested type as "AT4DX not detected here."
12
- *
13
- * @param sourceDirs - The source directories to scan.
14
- * @param types - Which binding types to include.
15
- * @returns The discovered bindings.
16
- */
17
- export declare function scanLocalBindings(sourceDirs: string[], types: BindingType[]): RawBindingRecord[];
@@ -1,97 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import path from 'node:path';
17
- import { ComponentSet } from '@salesforce/source-deploy-retrieve';
18
- import { bindingTypeForLocalObjectName } from './at4dxBindingTypes.js';
19
- import { extractValues, fieldValue, toNumber } from './customMetadataXml.js';
20
- /**
21
- * @returns The source-format package/project directory name a metadata file belongs to (the
22
- * directory containing `customMetadata`) — the same convention `simply schema visualize` uses for
23
- * `objects`.
24
- */
25
- function deriveProjectName(filePath) {
26
- if (!filePath) {
27
- return 'local';
28
- }
29
- const normalized = filePath.replace(/\\/g, '/');
30
- const index = normalized.indexOf('/customMetadata/');
31
- if (index === -1) {
32
- return 'local';
33
- }
34
- return path.basename(normalized.slice(0, index));
35
- }
36
- /** @returns The normalized binding record for one `CustomMetadata` component, or `undefined` if it has no resolvable key. */
37
- function toRawRecord(bindingType, component, developerName) {
38
- const xml = component.parseXmlSync();
39
- const values = extractValues(xml);
40
- const bindingSObject = fieldValue(values, 'BindingSObject__c');
41
- const bindingSObjectAlternate = fieldValue(values, 'BindingSObjectAlternate__c');
42
- const key = bindingType === 'Service' ? fieldValue(values, 'BindingInterface__c') : (bindingSObject ?? bindingSObjectAlternate);
43
- if (!key) {
44
- return undefined;
45
- }
46
- return {
47
- bindingType,
48
- developerName,
49
- key,
50
- to: fieldValue(values, 'To__c'),
51
- priority: toNumber(fieldValue(values, 'Priority__c')),
52
- sequence: toNumber(fieldValue(values, 'BindingSequence__c')),
53
- source: deriveProjectName(component.xml),
54
- };
55
- }
56
- /**
57
- * Scan local Salesforce DX source directories for AT4DX Application Factory binding records,
58
- * parsing each `CustomMetadata` component's `<values>` pairs directly — the same "read the
59
- * metadata XML" approach `simply schema visualize`'s local scan uses for `CustomField`/
60
- * `CustomObject`.
61
- *
62
- * Unlike an org (see `at4dxOrgScan`), local source gives no signal for "this Custom Metadata Type
63
- * doesn't exist" independent of "zero records exist for it" — a missing `customMetadata` folder
64
- * and an empty one look identical to `ComponentSet.fromSource`. Callers treat a fully empty result
65
- * across every requested type as "AT4DX not detected here."
66
- *
67
- * @param sourceDirs - The source directories to scan.
68
- * @param types - Which binding types to include.
69
- * @returns The discovered bindings.
70
- */
71
- export function scanLocalBindings(sourceDirs, types) {
72
- const requestedTypes = new Set(types);
73
- const records = [];
74
- const components = ComponentSet.fromSource(sourceDirs);
75
- for (const rawComponent of components) {
76
- const component = rawComponent;
77
- if (component.type.id !== 'custommetadata') {
78
- continue;
79
- }
80
- const separatorIndex = component.name.indexOf('.');
81
- if (separatorIndex === -1) {
82
- continue;
83
- }
84
- const localObjectName = component.name.slice(0, separatorIndex);
85
- const developerName = component.name.slice(separatorIndex + 1);
86
- const bindingType = bindingTypeForLocalObjectName(localObjectName);
87
- if (!bindingType || !requestedTypes.has(bindingType)) {
88
- continue;
89
- }
90
- const record = toRawRecord(bindingType, component, developerName);
91
- if (record) {
92
- records.push(record);
93
- }
94
- }
95
- return records;
96
- }
97
- //# sourceMappingURL=at4dxLocalScan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxLocalScan.js","sourceRoot":"","sources":["../../src/common/at4dxLocalScan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,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AAC,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAClE,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,22 +0,0 @@
1
- import { type Connection } from '@salesforce/core';
2
- import { type BindingType, type RawBindingRecord } from './at4dxBindingTypes.js';
3
- export type OrgScanResult = {
4
- records: RawBindingRecord[];
5
- /** Binding types whose query failed with `INVALID_TYPE` — the Custom Metadata Type doesn't exist in this org. */
6
- missingTypes: BindingType[];
7
- };
8
- /**
9
- * Query the target org for AT4DX Application Factory bindings, one SOQL query per requested
10
- * binding type, run in parallel. These are ordinary queryable Custom Metadata records — plain
11
- * REST (`connection.autoFetchQuery`), no Tooling API, no chunking (row counts are inherently
12
- * small).
13
- *
14
- * A type whose Custom Metadata Type doesn't exist in this org fails with `INVALID_TYPE`; that's
15
- * reported via `missingTypes` rather than thrown, so the caller can distinguish "AT4DX isn't here
16
- * at all" from "AT4DX is here, this type just has no records configured yet."
17
- *
18
- * @param connection - The org connection to query against.
19
- * @param types - Which binding types to query for.
20
- * @returns The discovered bindings and which requested types don't exist in this org.
21
- */
22
- export declare function scanOrgBindings(connection: Connection, types: BindingType[]): Promise<OrgScanResult>;
@@ -1,87 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { AT4DX_BINDING_OBJECTS } from './at4dxBindingTypes.js';
17
- /**
18
- * SOQL per binding type, mirroring the exact queries AT4DX's own `di_Module` subclasses run
19
- * (`ApplicationServiceDIModule`, `ApplicationSObjectSelectorDIModule`,
20
- * `ApplicationSObjectDomainDIModule`, `ApplicationSObjectUnitOfWorkDIProvider`) — including the
21
- * `BindingSObject__r.QualifiedApiName` relationship traversal, since `BindingSObject__c` alone
22
- * holds an EntityDefinition reference, not a usable API name.
23
- */
24
- const SOQL_BY_TYPE = {
25
- Service: `SELECT DeveloperName, To__c, BindingInterface__c, Priority__c FROM ${AT4DX_BINDING_OBJECTS.Service}`,
26
- Selector: `SELECT DeveloperName, To__c, BindingSObject__c, BindingSObject__r.QualifiedApiName, BindingSObjectAlternate__c, Priority__c FROM ${AT4DX_BINDING_OBJECTS.Selector}`,
27
- Domain: `SELECT DeveloperName, To__c, BindingSObject__c, BindingSObject__r.QualifiedApiName, BindingSObjectAlternate__c FROM ${AT4DX_BINDING_OBJECTS.Domain}`,
28
- UnitOfWork: `SELECT DeveloperName, BindingSequence__c, BindingSObject__c, BindingSObject__r.QualifiedApiName, BindingSObjectAlternate__c FROM ${AT4DX_BINDING_OBJECTS.UnitOfWork}`,
29
- };
30
- /** @returns The SObject key for a Selector/Domain/UnitOfWork record, preferring `BindingSObject__c`'s resolved API name and falling back to `BindingSObjectAlternate__c`, matching AT4DX's own fallback order. */
31
- function resolveSObjectKey(record) {
32
- if (record.BindingSObject__c) {
33
- return record.BindingSObject__r?.QualifiedApiName ?? undefined;
34
- }
35
- return record.BindingSObjectAlternate__c ?? undefined;
36
- }
37
- /** @returns The normalized binding record, or `undefined` if the record has no resolvable key (and so can't be bound to anything). */
38
- function toRawRecord(bindingType, record, source) {
39
- const key = bindingType === 'Service' ? (record.BindingInterface__c ?? undefined) : resolveSObjectKey(record);
40
- if (!key) {
41
- return undefined;
42
- }
43
- return {
44
- bindingType,
45
- developerName: record.DeveloperName,
46
- key,
47
- to: record.To__c ?? undefined,
48
- priority: record.Priority__c ?? undefined,
49
- sequence: record.BindingSequence__c ?? undefined,
50
- source,
51
- };
52
- }
53
- /**
54
- * Query the target org for AT4DX Application Factory bindings, one SOQL query per requested
55
- * binding type, run in parallel. These are ordinary queryable Custom Metadata records — plain
56
- * REST (`connection.autoFetchQuery`), no Tooling API, no chunking (row counts are inherently
57
- * small).
58
- *
59
- * A type whose Custom Metadata Type doesn't exist in this org fails with `INVALID_TYPE`; that's
60
- * reported via `missingTypes` rather than thrown, so the caller can distinguish "AT4DX isn't here
61
- * at all" from "AT4DX is here, this type just has no records configured yet."
62
- *
63
- * @param connection - The org connection to query against.
64
- * @param types - Which binding types to query for.
65
- * @returns The discovered bindings and which requested types don't exist in this org.
66
- */
67
- export async function scanOrgBindings(connection, types) {
68
- const source = connection.getUsername() ?? 'org';
69
- const missingTypes = [];
70
- const perType = await Promise.all(types.map(async (bindingType) => {
71
- try {
72
- const result = await connection.autoFetchQuery(SOQL_BY_TYPE[bindingType]);
73
- return result.records
74
- .map((record) => toRawRecord(bindingType, record, source))
75
- .filter((record) => record !== undefined);
76
- }
77
- catch (error) {
78
- if (error.name === 'INVALID_TYPE') {
79
- missingTypes.push(bindingType);
80
- return [];
81
- }
82
- throw error;
83
- }
84
- }));
85
- return { records: perType.flat(), missingTypes };
86
- }
87
- //# sourceMappingURL=at4dxOrgScan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxOrgScan.js","sourceRoot":"","sources":["../../src/common/at4dxOrgScan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,qBAAqB,EAA2C,MAAM,wBAAwB,CAAC;AAcxG;;;;;;GAMG;AACH,MAAM,YAAY,GAAgC;IAChD,OAAO,EAAE,sEAAsE,qBAAqB,CAAC,OAAO,EAAE;IAC9G,QAAQ,EAAE,oIAAoI,qBAAqB,CAAC,QAAQ,EAAE;IAC9K,MAAM,EAAE,uHAAuH,qBAAqB,CAAC,MAAM,EAAE;IAC7J,UAAU,EAAE,oIAAoI,qBAAqB,CAAC,UAAU,EAAE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,OAAyC;iBACrD,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;iBACzD,MAAM,CAAC,CAAC,MAAM,EAA8B,EAAE,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;QAC1E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAK,KAAe,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBAC7C,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC/B,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CACH,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,YAAY,EAAE,CAAC;AACnD,CAAC"}
@@ -1,9 +0,0 @@
1
- import { type At4dxBindingRow, type RawBindingRecord } from './at4dxBindingTypes.js';
2
- /**
3
- * Resolve raw binding records into rows annotated with which one AT4DX actually resolves to for
4
- * each key, applying the per-binding-type rules documented on {@link resolveByType}.
5
- *
6
- * @param records - The raw binding records to resolve, as returned by `scanOrgBindings`/`scanLocalBindings`.
7
- * @returns The resolved rows, grouped by binding type in `ALL_BINDING_TYPES` order.
8
- */
9
- export declare function resolveBindings(records: RawBindingRecord[]): At4dxBindingRow[];
@@ -1,92 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { ALL_BINDING_TYPES, } from './at4dxBindingTypes.js';
17
- /**
18
- * Resolve one binding type's records, keyed by `record.key`.
19
- *
20
- * **UnitOfWork** has no winner concept at all: `ApplicationSObjectUnitOfWorkDIProvider` builds one
21
- * ordered SObjectType list for the shared Unit of Work, ordered by `BindingSequence__c` ascending
22
- * (nulls last, SOQL's default). Every record contributes.
23
- *
24
- * **Domain** has no `Priority__c` field and no `ORDER BY` in AT4DX's query — a key with more than
25
- * one record resolves in an org-defined order this command can't predict, so every record for that
26
- * key is flagged `ambiguous` rather than one being asserted as the winner.
27
- *
28
- * **Service/Selector** resolve deterministically: AT4DX orders its query
29
- * `Priority__c DESC NULLS FIRST` and overwrites a map keyed by the binding key, so the
30
- * *highest*-priority record (nulls treated as lowest) is written last and wins.
31
- */
32
- function resolveByType(bindingType, records) {
33
- if (bindingType === 'UnitOfWork') {
34
- return [...records]
35
- .sort((a, b) => (a.sequence ?? Number.POSITIVE_INFINITY) - (b.sequence ?? Number.POSITIVE_INFINITY))
36
- .map((record) => ({ ...record, effective: true }));
37
- }
38
- const byKey = new Map();
39
- for (const record of records) {
40
- const group = byKey.get(record.key) ?? [];
41
- group.push(record);
42
- byKey.set(record.key, group);
43
- }
44
- const rows = [];
45
- for (const group of byKey.values()) {
46
- if (bindingType === 'Domain') {
47
- const isAmbiguous = group.length > 1;
48
- for (const record of group) {
49
- rows.push({ ...record, effective: !isAmbiguous, ...(isAmbiguous ? { ambiguous: true } : {}) });
50
- }
51
- continue;
52
- }
53
- // Service/Selector: the record with the highest Priority__c wins; undefined/null sorts lowest.
54
- // A genuine tie is exactly as indeterminate here as it is in AT4DX's own map-overwrite (see
55
- // ApplicationServiceDIModule's `prioritizeBindings` comment) — this picks the last record
56
- // encountered among the tied maximum, which is as valid a choice as any other.
57
- let winner = group[0];
58
- for (const record of group) {
59
- if ((record.priority ?? Number.NEGATIVE_INFINITY) >= (winner.priority ?? Number.NEGATIVE_INFINITY)) {
60
- winner = record;
61
- }
62
- }
63
- for (const record of group) {
64
- rows.push({ ...record, effective: record === winner });
65
- }
66
- }
67
- return rows;
68
- }
69
- /**
70
- * Resolve raw binding records into rows annotated with which one AT4DX actually resolves to for
71
- * each key, applying the per-binding-type rules documented on {@link resolveByType}.
72
- *
73
- * @param records - The raw binding records to resolve, as returned by `scanOrgBindings`/`scanLocalBindings`.
74
- * @returns The resolved rows, grouped by binding type in `ALL_BINDING_TYPES` order.
75
- */
76
- export function resolveBindings(records) {
77
- const byType = new Map();
78
- for (const record of records) {
79
- const group = byType.get(record.bindingType) ?? [];
80
- group.push(record);
81
- byType.set(record.bindingType, group);
82
- }
83
- const rows = [];
84
- for (const bindingType of ALL_BINDING_TYPES) {
85
- const typeRecords = byType.get(bindingType);
86
- if (typeRecords) {
87
- rows.push(...resolveByType(bindingType, typeRecords));
88
- }
89
- }
90
- return rows;
91
- }
92
- //# sourceMappingURL=at4dxResolve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"at4dxResolve.js","sourceRoot":"","sources":["../../src/common/at4dxResolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,GAIlB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;GAcG;AACH,SAAS,aAAa,CAAC,WAAwB,EAAE,OAA2B;IAC1E,IAAI,WAAW,KAAK,YAAY,EAAE,CAAC;QACjC,OAAO,CAAC,GAAG,OAAO,CAAC;aAChB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;aACnG,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,GAAG,EAA8B,CAAC;IACpD,KAA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E,MAAM,KAAK,MAAM,EAAE,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAA2B;IACzD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC1D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,IAAI,GAAsB,EAAE,CAAC;IACnC,KAAK,MAAM,WAAW,IAAI,iBAAiB,EAAE,CAAC;QAC5C,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,21 +0,0 @@
1
- /** One `<values><field>.../field><value>.../value></values>` entry from a `CustomMetadata` record's parsed XML. */
2
- export type RawMetadataValue = {
3
- field: string;
4
- value?: {
5
- '#text'?: string;
6
- '@_xsi:nil'?: string;
7
- };
8
- };
9
- export type CustomMetadataXml = {
10
- CustomMetadata?: {
11
- values?: RawMetadataValue | RawMetadataValue[];
12
- };
13
- };
14
- /** @returns The plain-text value for `field` in `values`, or `undefined` if the field is absent or explicitly nil. */
15
- export declare function fieldValue(values: RawMetadataValue[], field: string): string | undefined;
16
- /** @returns `value` parsed as a number, or `undefined` if `value` is absent or not numeric. */
17
- export declare function toNumber(value: string | undefined): number | undefined;
18
- /** @returns `value` parsed as a boolean (`"true"`/`"false"` as Salesforce serializes Checkbox fields), or `defaultValue` if `value` is absent. */
19
- export declare function toBoolean(value: string | undefined, defaultValue: boolean): boolean;
20
- /** @returns The `values` array from a parsed `CustomMetadata` component's XML, normalizing the single-vs-array shape `fast-xml-parser` produces. */
21
- export declare function extractValues(xml: CustomMetadataXml): RawMetadataValue[];
@@ -1,41 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, Clay Chipps.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /** @returns The plain-text value for `field` in `values`, or `undefined` if the field is absent or explicitly nil. */
17
- export function fieldValue(values, field) {
18
- const entry = values.find((value) => value.field === field);
19
- if (!entry?.value || entry.value['@_xsi:nil'] === 'true') {
20
- return undefined;
21
- }
22
- return entry.value['#text'];
23
- }
24
- /** @returns `value` parsed as a number, or `undefined` if `value` is absent or not numeric. */
25
- export function toNumber(value) {
26
- if (value === undefined) {
27
- return undefined;
28
- }
29
- const parsed = Number(value);
30
- return Number.isNaN(parsed) ? undefined : parsed;
31
- }
32
- /** @returns `value` parsed as a boolean (`"true"`/`"false"` as Salesforce serializes Checkbox fields), or `defaultValue` if `value` is absent. */
33
- export function toBoolean(value, defaultValue) {
34
- return value === undefined ? defaultValue : value === 'true';
35
- }
36
- /** @returns The `values` array from a parsed `CustomMetadata` component's XML, normalizing the single-vs-array shape `fast-xml-parser` produces. */
37
- export function extractValues(xml) {
38
- const rawValues = xml.CustomMetadata?.values;
39
- return rawValues === undefined ? [] : Array.isArray(rawValues) ? rawValues : [rawValues];
40
- }
41
- //# sourceMappingURL=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