@simplysf/simply-aep 0.7.0 → 0.9.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 +405 -5
- package/lib/commands/simply/aep/at4dx/binding/create.d.ts +28 -0
- package/lib/commands/simply/aep/at4dx/binding/create.js +116 -0
- package/lib/commands/simply/aep/at4dx/binding/create.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/binding/list.js +1 -1
- package/lib/commands/simply/aep/at4dx/binding/list.js.map +1 -1
- package/lib/commands/simply/aep/at4dx/binding/update.d.ts +29 -0
- package/lib/commands/simply/aep/at4dx/binding/update.js +119 -0
- package/lib/commands/simply/aep/at4dx/binding/update.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/binding/validate.d.ts +23 -0
- package/lib/commands/simply/aep/at4dx/binding/validate.js +143 -0
- package/lib/commands/simply/aep/at4dx/binding/validate.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/create.d.ts +26 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/create.js +112 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/create.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/list.d.ts +20 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/list.js +110 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/list.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/update.d.ts +27 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/update.js +109 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/update.js.map +1 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/validate.d.ts +21 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/validate.js +129 -0
- package/lib/commands/simply/aep/at4dx/field-set-inclusion/validate.js.map +1 -0
- package/lib/common/bindingWriteError.d.ts +14 -0
- package/lib/common/bindingWriteError.js +58 -0
- package/lib/common/bindingWriteError.js.map +1 -0
- package/lib/common/fieldSetInclusionWriteError.d.ts +14 -0
- package/lib/common/fieldSetInclusionWriteError.js +56 -0
- package/lib/common/fieldSetInclusionWriteError.js.map +1 -0
- package/messages/simply.aep.at4dx.binding.create.md +123 -0
- package/messages/simply.aep.at4dx.binding.update.md +121 -0
- package/messages/simply.aep.at4dx.binding.validate.md +65 -0
- package/messages/simply.aep.at4dx.field-set-inclusion.create.md +103 -0
- package/messages/simply.aep.at4dx.field-set-inclusion.list.md +51 -0
- package/messages/simply.aep.at4dx.field-set-inclusion.update.md +105 -0
- package/messages/simply.aep.at4dx.field-set-inclusion.validate.md +53 -0
- package/package.json +3 -3
|
@@ -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,EACpB,eAAe,EACf,iBAAiB,EACjB,eAAe,
|
|
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,EACpB,eAAe,EACf,iBAAiB,EACjB,eAAe,GAMhB,MAAM,2BAA2B,CAAC;AAEnC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAA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AAM,EAAE,QAAQ,EAAE,CAAC;IAC9B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type At4dxBindingUpdateResult, type WritableBindingTypeFlag } from '@simplysf/simply-aep-core';
|
|
3
|
+
/**
|
|
4
|
+
* Updates an existing AT4DX Application Factory binding (Service/Selector/Domain) in local DX source
|
|
5
|
+
* and/or a connected org — only the fields given change; everything else, including which SObject
|
|
6
|
+
* reference field a Selector/Domain binding uses, is preserved from the found record.
|
|
7
|
+
*/
|
|
8
|
+
export default class At4dxBindingUpdate extends SfCommand<At4dxBindingUpdateResult> {
|
|
9
|
+
static readonly summary: string;
|
|
10
|
+
static readonly description: string;
|
|
11
|
+
static readonly examples: string[];
|
|
12
|
+
static readonly flags: {
|
|
13
|
+
'source-dir': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
wait: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
type: import("@oclif/core/interfaces").OptionFlag<WritableBindingTypeFlag, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'developer-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
to: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'binding-interface': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
sobject: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
'sobject-alternate': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
priority: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
};
|
|
28
|
+
run(): Promise<At4dxBindingUpdateResult>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 { Duration } from '@salesforce/kit';
|
|
17
|
+
import { Messages } from '@salesforce/core';
|
|
18
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
|
+
import { updateBinding, WRITABLE_BINDING_TYPE_BY_FLAG, } from '@simplysf/simply-aep-core';
|
|
20
|
+
import { toBindingCliError } from '../../../../../common/bindingWriteError.js';
|
|
21
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
|
+
const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.binding.update');
|
|
23
|
+
const WRITABLE_TYPE_OPTIONS = ['service', 'selector', 'domain'];
|
|
24
|
+
const ISSUE_TABLE_COLUMNS = [
|
|
25
|
+
{ key: 'severity', name: 'SEVERITY' },
|
|
26
|
+
{ key: 'rule', name: 'RULE' },
|
|
27
|
+
{ key: 'message', name: 'MESSAGE' },
|
|
28
|
+
];
|
|
29
|
+
function toIssueDisplayRow(issue) {
|
|
30
|
+
return { severity: issue.severity, rule: issue.rule, message: issue.message };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Updates an existing AT4DX Application Factory binding (Service/Selector/Domain) in local DX source
|
|
34
|
+
* and/or a connected org — only the fields given change; everything else, including which SObject
|
|
35
|
+
* reference field a Selector/Domain binding uses, is preserved from the found record.
|
|
36
|
+
*/
|
|
37
|
+
export default class At4dxBindingUpdate extends SfCommand {
|
|
38
|
+
static summary = messages.getMessage('summary');
|
|
39
|
+
static description = messages.getMessage('description');
|
|
40
|
+
static examples = messages.getMessages('examples');
|
|
41
|
+
static flags = {
|
|
42
|
+
...SfCommand.baseFlags,
|
|
43
|
+
'source-dir': Flags.directory({
|
|
44
|
+
summary: messages.getMessage('flags.source-dir.summary'),
|
|
45
|
+
char: 'd',
|
|
46
|
+
exists: true,
|
|
47
|
+
multiple: true,
|
|
48
|
+
}),
|
|
49
|
+
'target-org': Flags.optionalOrg({
|
|
50
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
51
|
+
char: 'o',
|
|
52
|
+
}),
|
|
53
|
+
'api-version': Flags.orgApiVersion(),
|
|
54
|
+
wait: Flags.string({ summary: messages.getMessage('flags.wait.summary'), default: '33' }),
|
|
55
|
+
type: Flags.custom({ options: WRITABLE_TYPE_OPTIONS })({
|
|
56
|
+
summary: messages.getMessage('flags.type.summary'),
|
|
57
|
+
char: 't',
|
|
58
|
+
required: true,
|
|
59
|
+
}),
|
|
60
|
+
'developer-name': Flags.string({
|
|
61
|
+
summary: messages.getMessage('flags.developer-name.summary'),
|
|
62
|
+
char: 'n',
|
|
63
|
+
required: true,
|
|
64
|
+
}),
|
|
65
|
+
label: Flags.string({ summary: messages.getMessage('flags.label.summary') }),
|
|
66
|
+
to: Flags.string({ summary: messages.getMessage('flags.to.summary'), char: 'c' }),
|
|
67
|
+
'binding-interface': Flags.string({ summary: messages.getMessage('flags.binding-interface.summary') }),
|
|
68
|
+
sobject: Flags.string({ summary: messages.getMessage('flags.sobject.summary'), char: 's' }),
|
|
69
|
+
'sobject-alternate': Flags.boolean({
|
|
70
|
+
summary: messages.getMessage('flags.sobject-alternate.summary'),
|
|
71
|
+
allowNo: true,
|
|
72
|
+
}),
|
|
73
|
+
priority: Flags.string({ summary: messages.getMessage('flags.priority.summary') }),
|
|
74
|
+
force: Flags.boolean({ summary: messages.getMessage('flags.force.summary'), default: false }),
|
|
75
|
+
};
|
|
76
|
+
async run() {
|
|
77
|
+
const { flags } = await this.parse(At4dxBindingUpdate);
|
|
78
|
+
const sourceDirs = flags['source-dir'] ?? [];
|
|
79
|
+
const targetOrg = flags['target-org'];
|
|
80
|
+
if (sourceDirs.length === 0 && !targetOrg) {
|
|
81
|
+
throw messages.createError('error.sourceDirOrTargetOrgRequired');
|
|
82
|
+
}
|
|
83
|
+
let priority;
|
|
84
|
+
if (flags.priority !== undefined) {
|
|
85
|
+
priority = Number(flags.priority);
|
|
86
|
+
if (Number.isNaN(priority)) {
|
|
87
|
+
throw messages.createError('error.invalidPriority', [flags.priority]);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const connection = targetOrg?.getConnection(flags['api-version']);
|
|
91
|
+
try {
|
|
92
|
+
const result = await updateBinding({
|
|
93
|
+
bindingType: WRITABLE_BINDING_TYPE_BY_FLAG[flags.type],
|
|
94
|
+
developerName: flags['developer-name'],
|
|
95
|
+
label: flags.label,
|
|
96
|
+
to: flags.to,
|
|
97
|
+
bindingInterface: flags['binding-interface'],
|
|
98
|
+
sobject: flags.sobject,
|
|
99
|
+
sobjectAlternate: flags['sobject-alternate'],
|
|
100
|
+
priority,
|
|
101
|
+
force: flags.force,
|
|
102
|
+
}, { sourceDirs, connection, wait: Duration.minutes(Number(flags.wait)) });
|
|
103
|
+
if (result.issues.length > 0) {
|
|
104
|
+
this.table({ data: result.issues.map(toIssueDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
105
|
+
}
|
|
106
|
+
this.info(messages.getMessage(result.filePath ? 'info.updated' : 'info.updatedInOrg', [result.developerName]));
|
|
107
|
+
if (result.deploy) {
|
|
108
|
+
this.info(messages.getMessage('info.deployed', [result.deploy.id]));
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
throw toBindingCliError(error, messages, (issues) => {
|
|
114
|
+
this.table({ data: issues.map(toIssueDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../../src/commands/simply/aep/at4dx/binding/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,aAAa,EACb,6BAA6B,GAI9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,iCAAiC,CAAC,CAAC;AAElG,MAAM,qBAAqB,GAA8B,CAAC,SAAS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ysf/simply-aep-core';
|
|
3
|
+
/**
|
|
4
|
+
* Validates the AT4DX Application Factory bindings (Service/Selector/Domain) configured in a target org
|
|
5
|
+
* or local DX source — wiring problems that are invisible to `binding list` — and fails (non-zero exit)
|
|
6
|
+
* when any of them is a real bug, for use as a CI gate. `UnitOfWork` records are scanned when requested
|
|
7
|
+
* (to keep `--type`'s meaning consistent with `list`) but never contribute issues — see
|
|
8
|
+
* docs/design/0015-at4dx-binding-validate-create-set.md's Problem section for why.
|
|
9
|
+
*/
|
|
10
|
+
export default class At4dxBindingValidate extends SfCommand<At4dxBindingValidateResult> {
|
|
11
|
+
static readonly summary: string;
|
|
12
|
+
static readonly description: string;
|
|
13
|
+
static readonly examples: string[];
|
|
14
|
+
static readonly flags: {
|
|
15
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'source-dir': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
type: import("@oclif/core/interfaces").OptionFlag<BindingTypeFlag[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
/** @returns The validation issues found for the requested source and type(s). Sets `process.exitCode = 1` when any issue is severity `error`. */
|
|
22
|
+
run(): Promise<At4dxBindingValidateResult>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
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 { Messages } from '@salesforce/core';
|
|
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';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.binding.validate');
|
|
21
|
+
const BINDING_TYPE_FLAG_OPTIONS = ['service', 'selector', 'domain', 'unit-of-work'];
|
|
22
|
+
function toDisplayRow(issue) {
|
|
23
|
+
return {
|
|
24
|
+
bindingType: issue.bindingType,
|
|
25
|
+
severity: issue.severity,
|
|
26
|
+
rule: issue.rule,
|
|
27
|
+
key: issue.key ?? '',
|
|
28
|
+
developerName: issue.developerName ?? '',
|
|
29
|
+
source: issue.source,
|
|
30
|
+
message: issue.message,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const ISSUE_TABLE_COLUMNS = [
|
|
34
|
+
{ key: 'bindingType', name: 'TYPE' },
|
|
35
|
+
{ key: 'severity', name: 'SEVERITY' },
|
|
36
|
+
{ key: 'rule', name: 'RULE' },
|
|
37
|
+
{ key: 'key', name: 'KEY' },
|
|
38
|
+
{ key: 'developerName', name: 'DEVELOPER NAME' },
|
|
39
|
+
{ key: 'source', name: 'SOURCE' },
|
|
40
|
+
{ key: 'message', name: 'MESSAGE' },
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Validates the AT4DX Application Factory bindings (Service/Selector/Domain) configured in a target org
|
|
44
|
+
* or local DX source — wiring problems that are invisible to `binding list` — and fails (non-zero exit)
|
|
45
|
+
* when any of them is a real bug, for use as a CI gate. `UnitOfWork` records are scanned when requested
|
|
46
|
+
* (to keep `--type`'s meaning consistent with `list`) but never contribute issues — see
|
|
47
|
+
* docs/design/0015-at4dx-binding-validate-create-set.md's Problem section for why.
|
|
48
|
+
*/
|
|
49
|
+
export default class At4dxBindingValidate extends SfCommand {
|
|
50
|
+
static summary = messages.getMessage('summary');
|
|
51
|
+
static description = messages.getMessage('description');
|
|
52
|
+
static examples = messages.getMessages('examples');
|
|
53
|
+
static flags = {
|
|
54
|
+
...SfCommand.baseFlags,
|
|
55
|
+
'target-org': Flags.optionalOrg({
|
|
56
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
57
|
+
char: 'o',
|
|
58
|
+
}),
|
|
59
|
+
'api-version': Flags.orgApiVersion(),
|
|
60
|
+
'source-dir': Flags.directory({
|
|
61
|
+
summary: messages.getMessage('flags.source-dir.summary'),
|
|
62
|
+
char: 'd',
|
|
63
|
+
exists: true,
|
|
64
|
+
multiple: true,
|
|
65
|
+
}),
|
|
66
|
+
type: Flags.custom({ options: BINDING_TYPE_FLAG_OPTIONS })({
|
|
67
|
+
summary: messages.getMessage('flags.type.summary'),
|
|
68
|
+
description: messages.getMessage('flags.type.description'),
|
|
69
|
+
char: 't',
|
|
70
|
+
multiple: true,
|
|
71
|
+
delimiter: ',',
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
74
|
+
/** @returns The validation issues found for the requested source and type(s). Sets `process.exitCode = 1` when any issue is severity `error`. */
|
|
75
|
+
async run() {
|
|
76
|
+
const { flags } = await this.parse(At4dxBindingValidate);
|
|
77
|
+
const targetOrg = flags['target-org'];
|
|
78
|
+
const sourceDirs = flags['source-dir'] ?? [];
|
|
79
|
+
if ((targetOrg && sourceDirs.length > 0) || (!targetOrg && sourceDirs.length === 0)) {
|
|
80
|
+
throw messages.createError('error.targetOrgOrSourceDirRequired');
|
|
81
|
+
}
|
|
82
|
+
const requestedTypes = flags.type?.length
|
|
83
|
+
? [...new Set(flags.type.map((flag) => BINDING_TYPE_BY_FLAG[flag]))]
|
|
84
|
+
: ALL_BINDING_TYPES;
|
|
85
|
+
let source;
|
|
86
|
+
let issues;
|
|
87
|
+
let bindingCount;
|
|
88
|
+
if (targetOrg) {
|
|
89
|
+
const connection = targetOrg.getConnection(flags['api-version']);
|
|
90
|
+
source = targetOrg.getUsername() ?? 'org';
|
|
91
|
+
this.spinner.start(messages.getMessage('info.queryingOrg', [source]));
|
|
92
|
+
let scanResult;
|
|
93
|
+
try {
|
|
94
|
+
scanResult = await scanOrgBindings(connection, requestedTypes);
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
this.spinner.stop();
|
|
98
|
+
throw messages.createError('error.orgQueryFailed', [error.message]);
|
|
99
|
+
}
|
|
100
|
+
this.spinner.stop();
|
|
101
|
+
if (scanResult.missingTypes.length === requestedTypes.length) {
|
|
102
|
+
throw messages.createError('error.at4dxNotDetected');
|
|
103
|
+
}
|
|
104
|
+
bindingCount = scanResult.records.length;
|
|
105
|
+
issues = validateBindings(scanResult.records, {
|
|
106
|
+
malformed: scanResult.malformed,
|
|
107
|
+
ambiguous: scanResult.ambiguous,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
source = 'local';
|
|
112
|
+
this.spinner.start(messages.getMessage('info.scanningLocalSource'));
|
|
113
|
+
let scanResult;
|
|
114
|
+
try {
|
|
115
|
+
scanResult = scanLocalBindings(sourceDirs, requestedTypes);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
this.spinner.stop();
|
|
119
|
+
throw messages.createError('error.localScanFailed', [error.message]);
|
|
120
|
+
}
|
|
121
|
+
this.spinner.stop();
|
|
122
|
+
if (scanResult.records.length === 0 && scanResult.malformed.length === 0) {
|
|
123
|
+
throw messages.createError('error.at4dxNotDetected');
|
|
124
|
+
}
|
|
125
|
+
bindingCount = scanResult.records.length;
|
|
126
|
+
issues = validateBindings(scanResult.records, {
|
|
127
|
+
malformed: scanResult.malformed,
|
|
128
|
+
ambiguous: scanResult.ambiguous,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (issues.length > 0) {
|
|
132
|
+
this.table({ data: issues.map(toDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
this.info(messages.getMessage('info.valid', [bindingCount, source]));
|
|
136
|
+
}
|
|
137
|
+
if (issues.some((issue) => issue.severity === 'error')) {
|
|
138
|
+
process.exitCode = 1;
|
|
139
|
+
}
|
|
140
|
+
return { source, bindingCount, issues };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +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,C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,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IAC1C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type At4dxFieldSetInclusionCreateResult } from '@simplysf/simply-aep-core';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new AT4DX Selector field set inclusion (`SelectorConfig_FieldSetInclusion__mdt`) in local
|
|
5
|
+
* DX source and/or a connected org, validating it against everything already scanned before writing.
|
|
6
|
+
*/
|
|
7
|
+
export default class At4dxFieldSetInclusionCreate extends SfCommand<At4dxFieldSetInclusionCreateResult> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
'source-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
wait: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'developer-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
sobject: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'sobject-alternate': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
'fieldset-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
active: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
};
|
|
25
|
+
run(): Promise<At4dxFieldSetInclusionCreateResult>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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 { Duration } from '@salesforce/kit';
|
|
17
|
+
import { Messages } from '@salesforce/core';
|
|
18
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
|
+
import { createFieldSetInclusion, } from '@simplysf/simply-aep-core';
|
|
20
|
+
import { toFieldSetInclusionCliError } from '../../../../../common/fieldSetInclusionWriteError.js';
|
|
21
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
|
+
const messages = Messages.loadMessages('@simplysf/simply-aep', 'simply.aep.at4dx.field-set-inclusion.create');
|
|
23
|
+
const ISSUE_TABLE_COLUMNS = [
|
|
24
|
+
{ key: 'severity', name: 'SEVERITY' },
|
|
25
|
+
{ key: 'rule', name: 'RULE' },
|
|
26
|
+
{ key: 'message', name: 'MESSAGE' },
|
|
27
|
+
];
|
|
28
|
+
function toIssueDisplayRow(issue) {
|
|
29
|
+
return { severity: issue.severity, rule: issue.rule, message: issue.message };
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new AT4DX Selector field set inclusion (`SelectorConfig_FieldSetInclusion__mdt`) in local
|
|
33
|
+
* DX source and/or a connected org, validating it against everything already scanned before writing.
|
|
34
|
+
*/
|
|
35
|
+
export default class At4dxFieldSetInclusionCreate extends SfCommand {
|
|
36
|
+
static summary = messages.getMessage('summary');
|
|
37
|
+
static description = messages.getMessage('description');
|
|
38
|
+
static examples = messages.getMessages('examples');
|
|
39
|
+
static flags = {
|
|
40
|
+
...SfCommand.baseFlags,
|
|
41
|
+
'source-dir': Flags.directory({
|
|
42
|
+
summary: messages.getMessage('flags.source-dir.summary'),
|
|
43
|
+
char: 'd',
|
|
44
|
+
}),
|
|
45
|
+
'target-org': Flags.optionalOrg({
|
|
46
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
47
|
+
char: 'o',
|
|
48
|
+
}),
|
|
49
|
+
'api-version': Flags.orgApiVersion(),
|
|
50
|
+
wait: Flags.string({ summary: messages.getMessage('flags.wait.summary'), default: '33' }),
|
|
51
|
+
'developer-name': Flags.string({
|
|
52
|
+
summary: messages.getMessage('flags.developer-name.summary'),
|
|
53
|
+
char: 'n',
|
|
54
|
+
required: true,
|
|
55
|
+
}),
|
|
56
|
+
label: Flags.string({ summary: messages.getMessage('flags.label.summary') }),
|
|
57
|
+
sobject: Flags.string({
|
|
58
|
+
summary: messages.getMessage('flags.sobject.summary'),
|
|
59
|
+
char: 's',
|
|
60
|
+
required: true,
|
|
61
|
+
}),
|
|
62
|
+
'sobject-alternate': Flags.boolean({
|
|
63
|
+
summary: messages.getMessage('flags.sobject-alternate.summary'),
|
|
64
|
+
allowNo: true,
|
|
65
|
+
}),
|
|
66
|
+
'fieldset-name': Flags.string({
|
|
67
|
+
summary: messages.getMessage('flags.fieldset-name.summary'),
|
|
68
|
+
char: 'f',
|
|
69
|
+
required: true,
|
|
70
|
+
}),
|
|
71
|
+
active: Flags.boolean({
|
|
72
|
+
summary: messages.getMessage('flags.active.summary'),
|
|
73
|
+
allowNo: true,
|
|
74
|
+
default: true,
|
|
75
|
+
}),
|
|
76
|
+
force: Flags.boolean({ summary: messages.getMessage('flags.force.summary'), default: false }),
|
|
77
|
+
};
|
|
78
|
+
async run() {
|
|
79
|
+
const { flags } = await this.parse(At4dxFieldSetInclusionCreate);
|
|
80
|
+
const sourceDir = flags['source-dir'];
|
|
81
|
+
const targetOrg = flags['target-org'];
|
|
82
|
+
if (!sourceDir && !targetOrg) {
|
|
83
|
+
throw messages.createError('error.sourceDirOrTargetOrgRequired');
|
|
84
|
+
}
|
|
85
|
+
const connection = targetOrg?.getConnection(flags['api-version']);
|
|
86
|
+
try {
|
|
87
|
+
const result = await createFieldSetInclusion({
|
|
88
|
+
developerName: flags['developer-name'],
|
|
89
|
+
label: flags.label,
|
|
90
|
+
sobject: flags.sobject,
|
|
91
|
+
sobjectAlternate: flags['sobject-alternate'],
|
|
92
|
+
fieldsetName: flags['fieldset-name'],
|
|
93
|
+
isActive: flags.active,
|
|
94
|
+
force: flags.force,
|
|
95
|
+
}, { sourceDir, connection, wait: Duration.minutes(Number(flags.wait)) });
|
|
96
|
+
if (result.issues.length > 0) {
|
|
97
|
+
this.table({ data: result.issues.map(toIssueDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
98
|
+
}
|
|
99
|
+
this.info(messages.getMessage(result.filePath ? 'info.created' : 'info.createdInOrg', [result.developerName]));
|
|
100
|
+
if (result.deploy) {
|
|
101
|
+
this.info(messages.getMessage('info.deployed', [result.deploy.id]));
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
throw toFieldSetInclusionCliError(error, messages, (issues) => {
|
|
107
|
+
this.table({ data: issues.map(toIssueDisplayRow), columns: ISSUE_TABLE_COLUMNS });
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../../src/commands/simply/aep/at4dx/field-set-inclusion/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,uBAAuB,GAGxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AAEnG,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,6CAA6C,CAAC,CAAC;AAI9G,MAAM,mBAAmB,GAAwD;IAC/E,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE;IACrC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;IAC7B,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CACpC,CAAC;AAEF,SAAS,iBAAiB,CAAC,KAA6B;IACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;AAChF,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,SAA6C;IAC9F,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAA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,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CACtE,CAAC;YAEF,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC7B,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;YAC3F,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC/G,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBAClB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACtE,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,2BAA2B,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;gBAC5D,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;YACpF,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type At4dxFieldSetInclusionListResult } from '@simplysf/simply-aep-core';
|
|
3
|
+
/**
|
|
4
|
+
* Lists the AT4DX Selector field set inclusions (`SelectorConfig_FieldSetInclusion__mdt`) configured
|
|
5
|
+
* in a target org or local DX source. Unlike `binding list`, there's no priority/winner concept — every
|
|
6
|
+
* active record contributes its field set to its SObject's selector.
|
|
7
|
+
*/
|
|
8
|
+
export default class At4dxFieldSetInclusionList extends SfCommand<At4dxFieldSetInclusionListResult> {
|
|
9
|
+
static readonly summary: string;
|
|
10
|
+
static readonly description: string;
|
|
11
|
+
static readonly examples: string[];
|
|
12
|
+
static readonly flags: {
|
|
13
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'source-dir': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
/** @returns The field set inclusion records found for the requested source. */
|
|
19
|
+
run(): Promise<At4dxFieldSetInclusionListResult>;
|
|
20
|
+
}
|