@terafina/tffa-sfdx-plugin 16.0.0-rc.9 → 17.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ $ npm install -g @terafina/tffa-sfdx-plugin
|
|
|
41
41
|
$ sfdx COMMAND
|
|
42
42
|
running command...
|
|
43
43
|
$ sfdx (--version|-v)
|
|
44
|
-
@terafina/tffa-sfdx-plugin/
|
|
44
|
+
@terafina/tffa-sfdx-plugin/17.0.0-rc.1 linux-x64 node-v16.13.1
|
|
45
45
|
$ sfdx --help [COMMAND]
|
|
46
46
|
USAGE
|
|
47
47
|
$ sfdx COMMAND
|
|
@@ -111,7 +111,7 @@ EXAMPLES
|
|
|
111
111
|
$ sfdx tffa:apexdoc
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
_See code: [src/commands/tffa/apexdoc.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
114
|
+
_See code: [src/commands/tffa/apexdoc.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/apexdoc.ts)_
|
|
115
115
|
|
|
116
116
|
## `sfdx tffa:data:export -s <array> [-d <string>] [-g <string>] [-o <array>] [-c <array>] [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
117
117
|
|
|
@@ -180,7 +180,7 @@ EXAMPLES
|
|
|
180
180
|
Writing 144 records to ./data/configuration/DisclosureMatrix__c.json
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
_See code: [src/commands/tffa/data/export.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
183
|
+
_See code: [src/commands/tffa/data/export.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/data/export.ts)_
|
|
184
184
|
|
|
185
185
|
## `sfdx tffa:data:import [-f <array>] [-p <string>] [-s <array>] [-i] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
186
186
|
|
|
@@ -268,7 +268,7 @@ EXAMPLES
|
|
|
268
268
|
Importing record(s) and relationships of tffa__AddOnService__c... done
|
|
269
269
|
```
|
|
270
270
|
|
|
271
|
-
_See code: [src/commands/tffa/data/import.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
271
|
+
_See code: [src/commands/tffa/data/import.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/data/import.ts)_
|
|
272
272
|
|
|
273
273
|
## `sfdx tffa:lint [-s <directory>] [-m <integer>] [-r <filepath>] [-e] [-f] [-j] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
274
274
|
|
|
@@ -327,7 +327,7 @@ EXAMPLES
|
|
|
327
327
|
$sfdx tffa:lint
|
|
328
328
|
```
|
|
329
329
|
|
|
330
|
-
_See code: [src/commands/tffa/lint.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
330
|
+
_See code: [src/commands/tffa/lint.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/lint.ts)_
|
|
331
331
|
|
|
332
332
|
## `sfdx tffa:meta [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
333
333
|
|
|
@@ -356,7 +356,7 @@ EXAMPLES
|
|
|
356
356
|
$ sfdx tffa:meta
|
|
357
357
|
```
|
|
358
358
|
|
|
359
|
-
_See code: [src/commands/tffa/meta.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
359
|
+
_See code: [src/commands/tffa/meta.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/meta.ts)_
|
|
360
360
|
|
|
361
361
|
## `sfdx tffa:ping [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
362
362
|
|
|
@@ -378,7 +378,7 @@ EXAMPLES
|
|
|
378
378
|
$ sfdx tffa:ping
|
|
379
379
|
```
|
|
380
380
|
|
|
381
|
-
_See code: [src/commands/tffa/ping.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
381
|
+
_See code: [src/commands/tffa/ping.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/ping.ts)_
|
|
382
382
|
|
|
383
383
|
## `sfdx tffa:source:apiset [-h <help>] [-s <directory>] [-a <integer>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
384
384
|
|
|
@@ -406,7 +406,7 @@ EXAMPLES
|
|
|
406
406
|
$ sfdx tffa:source:apiset
|
|
407
407
|
```
|
|
408
408
|
|
|
409
|
-
_See code: [src/commands/tffa/source/apiset.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
409
|
+
_See code: [src/commands/tffa/source/apiset.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/source/apiset.ts)_
|
|
410
410
|
|
|
411
411
|
## `sfdx tffa:source:createfield -s <string> -n <string> -t checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich [-r] [-l <number>] [-d <string>] [-p <array>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
412
412
|
|
|
@@ -493,7 +493,7 @@ EXAMPLES
|
|
|
493
493
|
Creates a long textarea field
|
|
494
494
|
```
|
|
495
495
|
|
|
496
|
-
_See code: [src/commands/tffa/source/createfield.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/
|
|
496
|
+
_See code: [src/commands/tffa/source/createfield.ts](https://github.com/terafina/tffa-sfdx-plugin/blob/v17.0.0-rc.1/src/commands/tffa/source/createfield.ts)_
|
|
497
497
|
|
|
498
498
|
## `sfdx version`
|
|
499
499
|
|
|
@@ -29,6 +29,12 @@ class UpsertRequest {
|
|
|
29
29
|
*/
|
|
30
30
|
const EXTERNAL_ID_FIELDS = ['tffa__ExternalId__c', 'ExternalId__c', 'tffa__Code__c', 'Code__c'];
|
|
31
31
|
const TFFA_NAMESPACE = 'tffa';
|
|
32
|
+
/**
|
|
33
|
+
* Empty field values are ignored when you update records. To set a field value to null, use a field value of #N/A.
|
|
34
|
+
* https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_valid_record_rows.htm
|
|
35
|
+
*/
|
|
36
|
+
const NULL_VALUE = '#N/A';
|
|
37
|
+
const BOOLEAN_TYPE = 'boolean';
|
|
32
38
|
class DataImport extends command_1.SfdxCommand {
|
|
33
39
|
constructor() {
|
|
34
40
|
super(...arguments);
|
|
@@ -131,7 +137,7 @@ class DataImport extends command_1.SfdxCommand {
|
|
|
131
137
|
for (const record of records) {
|
|
132
138
|
const externalId = record[externalIdFieldName];
|
|
133
139
|
if (!externalId) {
|
|
134
|
-
this.ux.log(
|
|
140
|
+
this.ux.log(`ERROR: External id (${externalIdFieldName}) not set for record ${record.attributes.type} ${record.attributes.referenceId}`);
|
|
135
141
|
throw new Error('RECORD_ERROR');
|
|
136
142
|
}
|
|
137
143
|
}
|
|
@@ -145,21 +151,29 @@ class DataImport extends command_1.SfdxCommand {
|
|
|
145
151
|
async execute(request) {
|
|
146
152
|
const describeResult = await this.org.getConnection().describe$(request.object);
|
|
147
153
|
const childrenMap = new Map();
|
|
154
|
+
const fieldNullValueMap = new Map();
|
|
148
155
|
for (const record of request.input) {
|
|
149
156
|
for (const field of describeResult.fields) {
|
|
150
|
-
|
|
157
|
+
const fvalue = record[field.name];
|
|
158
|
+
if (fvalue === undefined) {
|
|
151
159
|
continue;
|
|
152
160
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (lookupId?.startsWith('@')) {
|
|
156
|
-
const externalId = this.referenceIdExternalIdMap.get(lookupId.slice(1));
|
|
161
|
+
if (field.relationshipName && fvalue?.startsWith('@')) {
|
|
162
|
+
const externalId = this.referenceIdExternalIdMap.get(fvalue.slice(1));
|
|
157
163
|
if (!externalId) {
|
|
158
|
-
this.ux.error(
|
|
164
|
+
this.ux.error(`ERROR: Unable to resolve external id for reference id ${fvalue}`);
|
|
159
165
|
throw new Error(`ERROR`);
|
|
160
166
|
}
|
|
161
|
-
|
|
162
|
-
|
|
167
|
+
const externalIdFQN = `${field.relationshipName}.${externalId.fieldName}`;
|
|
168
|
+
record[externalIdFQN] = externalId.value;
|
|
169
|
+
delete record[field.name];
|
|
170
|
+
// setting null_value is not working when the field is an external ID for a related object.
|
|
171
|
+
// setting to empty string, so that it is ignored by the bulk API
|
|
172
|
+
// https://trailblazer.salesforce.com/issues_view?id=a1p30000000T4SJAA0
|
|
173
|
+
fieldNullValueMap.set(externalIdFQN, '');
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
fieldNullValueMap.set(field.name, field.type === BOOLEAN_TYPE ? false : NULL_VALUE);
|
|
163
177
|
}
|
|
164
178
|
}
|
|
165
179
|
for (const childRelationship of describeResult.childRelationships || []) {
|
|
@@ -176,6 +190,15 @@ class DataImport extends command_1.SfdxCommand {
|
|
|
176
190
|
}
|
|
177
191
|
}
|
|
178
192
|
}
|
|
193
|
+
// bulk API treats the first record in input as the fields definition for the rest of the records
|
|
194
|
+
// as a workaround, we add all the fields seen across all records to each record with default value as null
|
|
195
|
+
for (const [fieldName, nullValue] of fieldNullValueMap.entries()) {
|
|
196
|
+
for (const record of request.input) {
|
|
197
|
+
if (record[fieldName] === undefined) {
|
|
198
|
+
record[fieldName] = nullValue;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
179
202
|
this.ux.setSpinnerStatus(`importing ${request.input.length} record(s) of ${request.object} using ${request.externalIdFieldName} as external id`);
|
|
180
203
|
const result = await this.org.getConnection().bulk2.loadAndWaitForResults({ ...request, pollTimeout: 1800000 });
|
|
181
204
|
this.logResult(result, request);
|
|
@@ -201,15 +224,15 @@ class DataImport extends command_1.SfdxCommand {
|
|
|
201
224
|
}
|
|
202
225
|
}
|
|
203
226
|
if (createdCount) {
|
|
204
|
-
this.ux.log(
|
|
227
|
+
this.ux.log(`INFO: Created ${createdCount} record(s) of ${request.object}`);
|
|
205
228
|
}
|
|
206
229
|
if (updatedCount) {
|
|
207
|
-
this.ux.log(
|
|
230
|
+
this.ux.log(`INFO: Updated ${updatedCount} record(s) of ${request.object}`);
|
|
208
231
|
}
|
|
209
232
|
}
|
|
210
233
|
if (result.failedResults?.length) {
|
|
211
234
|
for (const failedResult of result.failedResults) {
|
|
212
|
-
this.ux.error(
|
|
235
|
+
this.ux.error(`ERROR: ${failedResult.sf__Error} id=${failedResult.sf__Id}`);
|
|
213
236
|
}
|
|
214
237
|
throw new Error(`RECORD_ERROR`);
|
|
215
238
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/commands/tffa/data/import.ts"],"names":[],"mappings":";;AAAA;;IAEI;AACJ,iDAAsE;AACtE,2CAA4C;AAC5C,uCAAyE;AACzE,+BAAqC;AAErC,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC;AAgBnF;;GAEG;AACH,MAAM,aAAa;IAEjB,YAAmB,MAAc,EAAS,KAAe,EAAS,mBAA2B;QAA1E,WAAM,GAAN,MAAM,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAU;QAAS,wBAA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AAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAChD,sBAAW,GAAgB;IAC1C,YAAY,EAAE,eAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAC1H,IAAI,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,OAAO,EAAE,0CAA0C;KACpD,CAAC;IACF,YAAY,EAAE,eAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC,EAAE,CAAC;IAC1H,WAAW,EAAE,eAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;KAC/D,CAAC;CACH,CAAC"}
|
|
@@ -16,6 +16,8 @@ const messages = core_1.Messages.loadMessages('@terafina/tffa-sfdx-plugin', 'cre
|
|
|
16
16
|
const STRING_DECAMELIZE_REGEXP = /([a-z\d])([A-Z])/g;
|
|
17
17
|
const STRING_DECAMELIZE_REGEXP2 = /([A-Z])([A-Z][a-z])/g;
|
|
18
18
|
const NON_ALPHANUMERIC_REGEX = /[^a-zA-Z0-9]+/g;
|
|
19
|
+
const CZ_PREFIX = 'CZ';
|
|
20
|
+
const TFFA_NAMESPACE = 'tffa';
|
|
19
21
|
/**
|
|
20
22
|
* Copyright (c) NCR Terafina
|
|
21
23
|
**/
|
|
@@ -27,7 +29,10 @@ class CreateField extends command_1.SfdxCommand {
|
|
|
27
29
|
const required = this.flags.required;
|
|
28
30
|
const permissionSets = this.flags.permissionsets || (await (0, fs_extra_1.readdir)((0, path_1.join)(this.projectdir, 'permissionsets'))).map(f => f.split('.')[0]);
|
|
29
31
|
const simpleName = (name.toLowerCase().endsWith('__c') ? name.slice(0, -3) : name).replace(NON_ALPHANUMERIC_REGEX, '');
|
|
30
|
-
|
|
32
|
+
let fieldName = `${simpleName}__c`;
|
|
33
|
+
if (sObjectType.startsWith(TFFA_NAMESPACE) && !fieldName.startsWith(CZ_PREFIX)) {
|
|
34
|
+
fieldName = CZ_PREFIX + fieldName;
|
|
35
|
+
}
|
|
31
36
|
this.ux.startSpinner(`Adding field ${fieldName} to object ${sObjectType}`);
|
|
32
37
|
try {
|
|
33
38
|
await this.createField(sObjectType, fieldName);
|
|
@@ -55,7 +60,11 @@ class CreateField extends command_1.SfdxCommand {
|
|
|
55
60
|
const valueSetName = this.flags.valuesetname || '';
|
|
56
61
|
const length = this.flags.length;
|
|
57
62
|
const required = this.flags.required;
|
|
58
|
-
|
|
63
|
+
let label = fieldName.slice(0, -3);
|
|
64
|
+
if (label.startsWith(CZ_PREFIX)) {
|
|
65
|
+
label = label.slice(2);
|
|
66
|
+
}
|
|
67
|
+
label = label.replace(STRING_DECAMELIZE_REGEXP, '$1 $2').replace(STRING_DECAMELIZE_REGEXP2, '$1 $2');
|
|
59
68
|
const ftype = type.charAt(0).toUpperCase() + type.slice(1);
|
|
60
69
|
const trackHistory = false;
|
|
61
70
|
const trackTrending = false;
|
|
@@ -112,7 +121,7 @@ class CreateField extends command_1.SfdxCommand {
|
|
|
112
121
|
await this.writeXml(filename, {
|
|
113
122
|
CustomField: { $: { xmlns: 'http://soap.sforce.com/2006/04/metadata' }, ...field2 }
|
|
114
123
|
});
|
|
115
|
-
this.ux.log(
|
|
124
|
+
this.ux.log(`INFO: Created file - ${filename}`);
|
|
116
125
|
}
|
|
117
126
|
/**
|
|
118
127
|
* Adds a field permission entry for the field to the specified permission sets.
|
|
@@ -135,9 +144,10 @@ class CreateField extends command_1.SfdxCommand {
|
|
|
135
144
|
const fieldPermissions = permissionSetXml.PermissionSet.fieldPermissions || (permissionSetXml.PermissionSet.fieldPermissions = []);
|
|
136
145
|
if (!fieldPermissions.some(fp => fp.field[0] === field)) {
|
|
137
146
|
fieldPermissions.push(fieldPermission);
|
|
147
|
+
fieldPermissions.sort((a, b) => (a.field < b.field ? -1 : a.field > b.field ? 1 : 0));
|
|
138
148
|
}
|
|
139
149
|
await this.writeXml(filename, permissionSetXml);
|
|
140
|
-
this.ux.log(
|
|
150
|
+
this.ux.log(`INFO: Added field permission to permission set ${permissionSet}`);
|
|
141
151
|
}
|
|
142
152
|
}
|
|
143
153
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createfield.js","sourceRoot":"","sources":["../../../../src/commands/tffa/source/createfield.ts"],"names":[],"mappings":";;AAAA;;IAEI;AACJ,iDAAsE;AACtE,2CAA4C;AAC5C,uCAAgE;AAChE,+BAAqC;AACrC,mCAAqD;AAErD,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,aAAa,CAAC,CAAC;AAmCpF,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AACrD,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AACzD,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"createfield.js","sourceRoot":"","sources":["../../../../src/commands/tffa/source/createfield.ts"],"names":[],"mappings":";;AAAA;;IAEI;AACJ,iDAAsE;AACtE,2CAA4C;AAC5C,uCAAgE;AAChE,+BAAqC;AACrC,mCAAqD;AAErD,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE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AAE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC,EAAE,CAAC;IAC9H,YAAY,EAAE,eAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC,EAAE,CAAC;CAC5H,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"16.0.0-rc.9","commands":{"tffa:apexdoc":{"id":"tffa:apexdoc","description":"Command to generate apex documentation similar to javadoc based on the comments in apex classes.\nPlease read more at [Documenting Apex Classes](development-guidelines/documentation).\nOnce generated you can use vscode plugin [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) and select index.html from generated folder and run Open with LiveServer to render the html","strict":true,"usage":"<%= command.id %> [-s <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:apexdoc"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destfolder":{"name":"destfolder","type":"option","char":"d","description":"directory to generate the api docs","multiple":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destfolder":{"kind":"directory","char":"d","description":"directory to generate the api docs","input":[],"multiple":false,"type":"option"}}},"tffa:lint":{"id":"tffa:lint","description":"Scans a sfdx project and provide a violations report based on defined standards.\nPerforms static analysis of source code with a command-line interface and report output.\nThe command creates \"Rule Violations\" when the it identifies issues. Developers use this information as feedback to fix their code.\n\nThe rules used in the lint command are:\n\n- [Apex PMD](https://pmd.github.io/latest/pmd_rules_apex.html) to statically analyse Apex Code to find design, performance and security vulnerabilities. It allowes us to have a better quality and avoid maintenance, performance and bug problems in our Apex code. for Salesforce apex classes are scans during build and development process.\n- Custom rules\n - Custom Objects should have a description\n - Custom Fields should have a description'\n - Custom fields should not contain underscores.\n - Custom fields in managed object should start with CZ.\n - Custom objects should start with CZ.\n - Using Metadata API Version and Project source api version should be the latest supported.\n - Files violating naming conventions\n - Do not use isCreateable, isAccessible, isUpdateable, CRUD/FLS Checks are checked by tffa.AbstractRepository\n - Do not call methods directly of an abstract class. Call methods from Repository classes extending tffa.AbstractRepository\n - Do not call methods directly of an abstract class. Call methods from Controllers classes extending tffa.AbstractController',\n - Do not call methods directly of an abstract class. Call methods from RESTService classes extending tffa.AbstractRESTService\n - Any SOQL should be encapsulated into Repository classes extending tffa.AbstractRepository. Use doQuery method\n - Do not supress PMD warnings using @SupressWarnings\n\nThe lint command is integrated into the jenkins build to report violations and fail builds\n","strict":true,"usage":"<%= command.id %> [-s <directory>] [-m <integer>] [-r <filepath>] [-e] [-f] [-j] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$sfdx tffa:lint"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"generate json output","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"minapi":{"name":"minapi","type":"option","char":"m","description":"minimum api version to use during quality checks","multiple":false,"default":56},"rulesetpath":{"name":"rulesetpath","type":"option","char":"r","description":"path to pmd ruleset","multiple":false},"eject":{"name":"eject","type":"boolean","char":"e","description":"update local pmd ruleset","allowNo":false},"level":{"name":"level","type":"boolean","char":"f","description":"emit fatal violations only","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"minapi":{"kind":"integer","char":"m","description":"minimum api version to use during quality checks","default":56,"input":[],"multiple":false,"type":"option"},"json":{"kind":"boolean","char":"j","description":"generate json output","allowNo":false,"type":"boolean"},"rulesetpath":{"kind":"filepath","char":"r","description":"path to pmd ruleset","input":[],"multiple":false,"type":"option"},"eject":{"kind":"boolean","char":"e","description":"update local pmd ruleset","allowNo":false,"type":"boolean"},"level":{"kind":"boolean","char":"f","description":"emit fatal violations only","allowNo":false,"type":"boolean"}}},"tffa:meta":{"id":"tffa:meta","description":"Scan a sfdx project for generating metadata summary information","strict":true,"usage":"<%= command.id %> [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:meta"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destpath":{"name":"destpath","type":"option","char":"d","description":"full path output file","multiple":false,"default":"."},"clientname":{"name":"clientname","type":"option","char":"c","description":"name of the client","multiple":false,"default":"."},"output":{"name":"output","type":"option","char":"o","description":"output format json csv human","helpValue":"(json|csv|human)","multiple":false,"options":["json","csv","human"]},"fields":{"name":"fields","type":"boolean","char":"f","description":"generate field output","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destpath":{"kind":"directory","char":"d","description":"full path output file","default":".","input":[],"multiple":false,"type":"option"},"clientname":{"kind":"directory","char":"c","description":"name of the client","default":".","input":[],"multiple":false,"type":"option"},"output":{"kind":"enum","helpValue":"(json|csv|human)","char":"o","options":["json","csv","human"],"description":"output format json csv human","input":[],"multiple":false,"type":"option"},"fields":{"kind":"boolean","char":"f","description":"generate field output","allowNo":false,"type":"boolean"}}},"tffa:ping":{"id":"tffa:ping","description":"Ping and test the plugin","strict":true,"usage":"<%= command.id %> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:ping "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"}},"args":[{"name":"file"}],"flagsConfig":{}},"tffa:data:export":{"id":"tffa:data:export","description":"Exports records of specified sobject types from target org into JSON file(s). Primarily used for exporting business configurations.\nThe export command requires a target org for exporting records. Run this command from within a sfdx project containing a default username or specify targetusername explicitly.","strict":true,"usage":"<%= command.id %> -s <array> [-d <string>] [-g <string>] [-o <array>] [-c <array>] [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:data:export --sobjecttype tffa__Product__c\n Fetched 101 records of tffa__Product__c\n Writing 24 records to ./data/configuration/Product__c.json\n Writing 30 records to ./data/configuration/Product__c1.json\n Writing 20 records to ./data/configuration/Product__c2.json\n Writing 27 records to ./data/configuration/Product__c3.json\n ","$ sfdx tffa:data:export --sobjecttype tffa__DisclosureTemplate__c,tffa__DisclosureChecklist__c,tffa__DisclosureMatrix__c\n Fetched 81 records of tffa__DisclosureTemplate__c\n Writing 81 records to ./data/configuration/DisclosureTemplate__c.json\n Fetched 57 records of tffa__DisclosureChecklist__c\n Writing 57 records to ./data/configuration/DisclosureChecklist__c.json\n Fetched 144 records of tffa__DisclosureMatrix__c\n Writing 144 records to ./data/configuration/DisclosureMatrix__c.json\n "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sobjecttypes":{"name":"sobjecttypes","type":"option","char":"s","description":"sobject types of records to be exported","required":true,"multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"output directory where the JSON files of exported records will be placed","multiple":false,"default":"./data/configuration"},"groupby":{"name":"groupby","type":"option","char":"g","description":"the field to be used for grouping the exported records; records belonging to each group are placed in separate JSON files (filename suffixed by group name)","required":false,"multiple":false},"orderby":{"name":"orderby","type":"option","char":"o","description":"the fields to be used for sorting the exported records","required":false,"multiple":false},"children":{"name":"children","type":"option","char":"c","description":"the child relationships to be included in the exported records; this is not required for tffa package objects. e.g. tffa__Features__r,tffa__Terms__r child relationships are auto included when running export command for tffa__Product__c","required":false,"multiple":false},"skipconfigplan":{"name":"skipconfigplan","type":"boolean","char":"s","description":"skip import of exported record JSON files into configuration plan","required":false,"allowNo":false}},"args":[],"requiresUsername":true,"flagsConfig":{"sobjecttypes":{"kind":"array","char":"s","required":true,"description":"sobject types of records to be exported","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"string","char":"d","description":"output directory where the JSON files of exported records will be placed","default":"./data/configuration","input":[],"multiple":false,"type":"option"},"groupby":{"kind":"string","char":"g","required":false,"description":"the field to be used for grouping the exported records; records belonging to each group are placed in separate JSON files (filename suffixed by group name)","input":[],"multiple":false,"type":"option"},"orderby":{"kind":"array","char":"o","required":false,"description":"the fields to be used for sorting the exported records","input":[],"multiple":false,"type":"option"},"children":{"kind":"array","char":"c","required":false,"description":"the child relationships to be included in the exported records; this is not required for tffa package objects. e.g. tffa__Features__r,tffa__Terms__r child relationships are auto included when running export command for tffa__Product__c","input":[],"multiple":false,"type":"option"},"skipconfigplan":{"kind":"boolean","char":"s","required":false,"description":"skip import of exported record JSON files into configuration plan","allowNo":false,"type":"boolean"}}},"tffa:data:import":{"id":"tffa:data:import","description":"Imports data into an org using the SObject Bulk Upsert API. This data can include master-detail relationships. Primarily used for importing business configurations.\n \n To generate JSON files for use with tffa:data:import, run \"sfdx tffa:data:export\"\n \n In scratch orgs, by default, sobject files are tracked for changes. When doing full plan imports (without the sobjecttypes parameter), individual sobject files are tracked for changes and excluded from import if the file content remained unchanged since the last time it was imported. This behaviour can be suppressed by including the forceimport flag when doing full plan imports.","strict":true,"usage":"<%= command.id %> [-f <array>] [-p <string>] [-s <array>] [-i] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:data:import\n (Imports all records from default plan - data/configuration/config-data-plan.json\n - Updated 101 record(s) of tffa__Product__c\n - Updated 532 record(s) of tffa__ProductFeature__c\n - Updated 143 record(s) of tffa__ProductTerm__c\n Importing record(s) and relationships of tffa__Product__c... done\n \n - Updated 5 record(s) of tffa__DependentProductEligibility__c\n Importing record(s) and relationships of tffa__DependentProductEligibility__c... done","$ sfdx tffa:data:import -p data/configuration/config-data-plan.json\n (Imports all records from default plan - data/configuration/config-data-plan.json\n - Updated 101 record(s) of tffa__Product__c\n - Updated 532 record(s) of tffa__ProductFeature__c\n - Updated 143 record(s) of tffa__ProductTerm__c\n Importing record(s) and relationships of tffa__Product__c... done\n ... \n ","$ sfdx tffa:data:import -s tffa__Product__c\n (Imports only tffa__Product__c from data/configuration/config-data-plan.json)\n - Updated 101 record(s) of tffa__Product__c\n - Updated 532 record(s) of tffa__ProductFeature__c\n - Updated 143 record(s) of tffa__ProductTerm__c\n Importing record(s) and relationships of tffa__Product__c... done\n ...\n ","$ sfdx tffa:data:import -f data/configuration/DisclosureTemplate__c.json,data/configuration/AddOnService__c.json\n (Imports tffa__DisclosureTemplate__c and tffa__AddOnService__c from the files; ignores config data plan)\n - Updated 82 record(s) of tffa__DisclosureTemplate__c\n Importing record(s) and relationships of tffa__DisclosureTemplate__c... done\n \n - Updated 30 record(s) of tffa__AddOnService__c\n Importing record(s) and relationships of tffa__AddOnService__c... done"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sobjectfiles":{"name":"sobjectfiles","type":"option","char":"f","description":"comma-delimited, ordered paths of json files containing collection of record trees to upsert","required":false,"multiple":false},"plan":{"name":"plan","type":"option","char":"p","description":"path to plan to upsert multiple data files that have master-detail relationships; to restrict the sobject types imported using the plan, specify sobjecttypes along with plan","multiple":false,"default":"data/configuration/config-data-plan.json"},"sobjecttypes":{"name":"sobjecttypes","type":"option","char":"s","description":"comma-delimited, list of sobject types to be imported when using a plan","required":false,"multiple":false},"forceimport":{"name":"forceimport","type":"boolean","char":"i","description":"force import all sobject files in a plan ignoring any internal file change tracking; applicable to scratch orgs only; forceimport is automatically set if sobjecttypes parameter is specified","required":false,"allowNo":false}},"args":[],"requiresUsername":true,"requiresProject":true,"flagsConfig":{"sobjectfiles":{"kind":"array","char":"f","required":false,"description":"comma-delimited, ordered paths of json files containing collection of record trees to upsert","input":[],"multiple":false,"type":"option"},"plan":{"kind":"string","char":"p","description":"path to plan to upsert multiple data files that have master-detail relationships; to restrict the sobject types imported using the plan, specify sobjecttypes along with plan","default":"data/configuration/config-data-plan.json","input":[],"multiple":false,"type":"option"},"sobjecttypes":{"kind":"array","char":"s","required":false,"description":"comma-delimited, list of sobject types to be imported when using a plan","input":[],"multiple":false,"type":"option"},"forceimport":{"kind":"boolean","char":"i","required":false,"description":"force import all sobject files in a plan ignoring any internal file change tracking; applicable to scratch orgs only; forceimport is automatically set if sobjecttypes parameter is specified","allowNo":false,"type":"boolean"}}},"tffa:source:apiset":{"id":"tffa:source:apiset","description":"Upgrades the current project and all metadata to the latest API version","strict":true,"usage":"<%= command.id %> [-h <help>] [-s <directory>] [-a <integer>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:source:apiset "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"api":{"name":"api","type":"option","char":"a","description":"specify the API version ","multiple":false,"default":56}},"args":[],"flagsConfig":{"help":{"kind":"help","description":"Show CLI help.","char":"h","allowNo":false,"type":"boolean"},"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"api":{"kind":"integer","char":"a","description":"specify the API version ","default":56,"input":[],"multiple":false,"type":"option"}}},"tffa:source:createfield":{"id":"tffa:source:createfield","description":"Creates an SObject field from the specified parameters.\n By default, created fields (except required) are added to all permission sets in the project. Use the permissionsets parameter to explicitly specify the permission sets.\n \n NOTE: this command does not create the field in the org, it only creates the field meta xml file in the project. source push is required for the field to be created in the org.\n ","strict":true,"usage":"<%= command.id %> -s <string> -n <string> -t checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich [-r] [-l <number>] [-d <string>] [-p <array>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\"\n Creates a text field","sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\" --required\n Creates a required text field; does not add update permission sets as field is required","sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\" --length 80\n Creates a text field with length 80","sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\" --permissionsets Administrator\n Creates a text field and adds the field permission to Administrator permission set only","sfdx tffa:source:createfield -s Product__c -n CheckboxField -t checkbox -d \"Test Checkbox Field\"\n Creates a checkbox field","sfdx tffa:source:createfield -s Product__c -n CurrencyField -t currency -d \"Test Currency Field\"\n Creates a currency field","sfdx tffa:source:createfield -s Product__c -n PicklistField -t picklist -v ProductCategory -d \"Test Picklist Field\"\n Creates a picklist field with global value set ProductCategory","sfdx tffa:source:createfield -s Product__c -n LongTextAreaField -t textarea-long -d \"Test LongTextArea Field\"\n Creates a long textarea field"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sobjecttype":{"name":"sobjecttype","type":"option","char":"s","description":"the API name of the object for which the field needs to be created","required":true,"multiple":false},"name":{"name":"name","type":"option","char":"n","description":"the API name of the field","required":true,"multiple":false},"type":{"name":"type","type":"option","char":"t","description":"type of the field","required":true,"helpValue":"(checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich)","multiple":false,"options":["checkbox","currency","date","datetime","email","number","percent","phone","picklist","picklist-multi","text","textarea","textarea-long","textarea-rich"],"default":"text"},"required":{"name":"required","type":"boolean","char":"r","description":"whether field is required; skips addition to permission sets","required":false,"allowNo":false},"length":{"name":"length","type":"option","char":"l","description":"length of text field or textarea (long|rich) field; defaults to 255 for text field and 1024 for textarea field","required":false,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"description of the field","required":false,"multiple":false},"permissionsets":{"name":"permissionsets","type":"option","char":"p","description":"comma-separated list of permission sets to which the field needs to be added; defaults to all permission sets in the project","required":false,"multiple":false},"valuesetname":{"name":"valuesetname","type":"option","char":"v","description":"name of the global value set if the field is a picklist or multi-select picklist type","required":false,"multiple":false}},"args":[],"requiresUsername":true,"requiresProject":true,"flagsConfig":{"sobjecttype":{"kind":"string","char":"s","required":true,"description":"the API name of the object for which the field needs to be created","input":[],"multiple":false,"type":"option"},"name":{"kind":"string","char":"n","required":true,"description":"the API name of the field","input":[],"multiple":false,"type":"option"},"type":{"kind":"enum","helpValue":"(checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich)","char":"t","required":true,"description":"type of the field","default":"text","options":["checkbox","currency","date","datetime","email","number","percent","phone","picklist","picklist-multi","text","textarea","textarea-long","textarea-rich"],"input":[],"multiple":false,"type":"option"},"required":{"kind":"boolean","char":"r","required":false,"description":"whether field is required; skips addition to permission sets","default":false,"allowNo":false,"type":"boolean"},"length":{"kind":"number","char":"l","required":false,"description":"length of text field or textarea (long|rich) field; defaults to 255 for text field and 1024 for textarea field","input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","required":false,"description":"description of the field","input":[],"multiple":false,"type":"option"},"permissionsets":{"kind":"array","char":"p","required":false,"description":"comma-separated list of permission sets to which the field needs to be added; defaults to all permission sets in the project","input":[],"multiple":false,"type":"option"},"valuesetname":{"kind":"string","char":"v","required":false,"description":"name of the global value set if the field is a picklist or multi-select picklist type","input":[],"multiple":false,"type":"option"}}}}}
|
|
1
|
+
{"version":"17.0.0-rc.1","commands":{"tffa:apexdoc":{"id":"tffa:apexdoc","description":"Command to generate apex documentation similar to javadoc based on the comments in apex classes.\nPlease read more at [Documenting Apex Classes](development-guidelines/documentation).\nOnce generated you can use vscode plugin [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) and select index.html from generated folder and run Open with LiveServer to render the html","strict":true,"usage":"<%= command.id %> [-s <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:apexdoc"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destfolder":{"name":"destfolder","type":"option","char":"d","description":"directory to generate the api docs","multiple":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destfolder":{"kind":"directory","char":"d","description":"directory to generate the api docs","input":[],"multiple":false,"type":"option"}}},"tffa:lint":{"id":"tffa:lint","description":"Scans a sfdx project and provide a violations report based on defined standards.\nPerforms static analysis of source code with a command-line interface and report output.\nThe command creates \"Rule Violations\" when the it identifies issues. Developers use this information as feedback to fix their code.\n\nThe rules used in the lint command are:\n\n- [Apex PMD](https://pmd.github.io/latest/pmd_rules_apex.html) to statically analyse Apex Code to find design, performance and security vulnerabilities. It allowes us to have a better quality and avoid maintenance, performance and bug problems in our Apex code. for Salesforce apex classes are scans during build and development process.\n- Custom rules\n - Custom Objects should have a description\n - Custom Fields should have a description'\n - Custom fields should not contain underscores.\n - Custom fields in managed object should start with CZ.\n - Custom objects should start with CZ.\n - Using Metadata API Version and Project source api version should be the latest supported.\n - Files violating naming conventions\n - Do not use isCreateable, isAccessible, isUpdateable, CRUD/FLS Checks are checked by tffa.AbstractRepository\n - Do not call methods directly of an abstract class. Call methods from Repository classes extending tffa.AbstractRepository\n - Do not call methods directly of an abstract class. Call methods from Controllers classes extending tffa.AbstractController',\n - Do not call methods directly of an abstract class. Call methods from RESTService classes extending tffa.AbstractRESTService\n - Any SOQL should be encapsulated into Repository classes extending tffa.AbstractRepository. Use doQuery method\n - Do not supress PMD warnings using @SupressWarnings\n\nThe lint command is integrated into the jenkins build to report violations and fail builds\n","strict":true,"usage":"<%= command.id %> [-s <directory>] [-m <integer>] [-r <filepath>] [-e] [-f] [-j] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$sfdx tffa:lint"],"flags":{"json":{"name":"json","type":"boolean","char":"j","description":"generate json output","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"minapi":{"name":"minapi","type":"option","char":"m","description":"minimum api version to use during quality checks","multiple":false,"default":56},"rulesetpath":{"name":"rulesetpath","type":"option","char":"r","description":"path to pmd ruleset","multiple":false},"eject":{"name":"eject","type":"boolean","char":"e","description":"update local pmd ruleset","allowNo":false},"level":{"name":"level","type":"boolean","char":"f","description":"emit fatal violations only","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"minapi":{"kind":"integer","char":"m","description":"minimum api version to use during quality checks","default":56,"input":[],"multiple":false,"type":"option"},"json":{"kind":"boolean","char":"j","description":"generate json output","allowNo":false,"type":"boolean"},"rulesetpath":{"kind":"filepath","char":"r","description":"path to pmd ruleset","input":[],"multiple":false,"type":"option"},"eject":{"kind":"boolean","char":"e","description":"update local pmd ruleset","allowNo":false,"type":"boolean"},"level":{"kind":"boolean","char":"f","description":"emit fatal violations only","allowNo":false,"type":"boolean"}}},"tffa:meta":{"id":"tffa:meta","description":"Scan a sfdx project for generating metadata summary information","strict":true,"usage":"<%= command.id %> [-s <directory>] [-d <directory>] [-c <directory>] [-o json|csv|human] [-f] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:meta"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"destpath":{"name":"destpath","type":"option","char":"d","description":"full path output file","multiple":false,"default":"."},"clientname":{"name":"clientname","type":"option","char":"c","description":"name of the client","multiple":false,"default":"."},"output":{"name":"output","type":"option","char":"o","description":"output format json csv human","helpValue":"(json|csv|human)","multiple":false,"options":["json","csv","human"]},"fields":{"name":"fields","type":"boolean","char":"f","description":"generate field output","allowNo":false}},"args":[],"flagsConfig":{"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"destpath":{"kind":"directory","char":"d","description":"full path output file","default":".","input":[],"multiple":false,"type":"option"},"clientname":{"kind":"directory","char":"c","description":"name of the client","default":".","input":[],"multiple":false,"type":"option"},"output":{"kind":"enum","helpValue":"(json|csv|human)","char":"o","options":["json","csv","human"],"description":"output format json csv human","input":[],"multiple":false,"type":"option"},"fields":{"kind":"boolean","char":"f","description":"generate field output","allowNo":false,"type":"boolean"}}},"tffa:ping":{"id":"tffa:ping","description":"Ping and test the plugin","strict":true,"usage":"<%= command.id %> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:ping "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"}},"args":[{"name":"file"}],"flagsConfig":{}},"tffa:data:export":{"id":"tffa:data:export","description":"Exports records of specified sobject types from target org into JSON file(s). Primarily used for exporting business configurations.\nThe export command requires a target org for exporting records. Run this command from within a sfdx project containing a default username or specify targetusername explicitly.","strict":true,"usage":"<%= command.id %> -s <array> [-d <string>] [-g <string>] [-o <array>] [-c <array>] [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:data:export --sobjecttype tffa__Product__c\n Fetched 101 records of tffa__Product__c\n Writing 24 records to ./data/configuration/Product__c.json\n Writing 30 records to ./data/configuration/Product__c1.json\n Writing 20 records to ./data/configuration/Product__c2.json\n Writing 27 records to ./data/configuration/Product__c3.json\n ","$ sfdx tffa:data:export --sobjecttype tffa__DisclosureTemplate__c,tffa__DisclosureChecklist__c,tffa__DisclosureMatrix__c\n Fetched 81 records of tffa__DisclosureTemplate__c\n Writing 81 records to ./data/configuration/DisclosureTemplate__c.json\n Fetched 57 records of tffa__DisclosureChecklist__c\n Writing 57 records to ./data/configuration/DisclosureChecklist__c.json\n Fetched 144 records of tffa__DisclosureMatrix__c\n Writing 144 records to ./data/configuration/DisclosureMatrix__c.json\n "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sobjecttypes":{"name":"sobjecttypes","type":"option","char":"s","description":"sobject types of records to be exported","required":true,"multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"output directory where the JSON files of exported records will be placed","multiple":false,"default":"./data/configuration"},"groupby":{"name":"groupby","type":"option","char":"g","description":"the field to be used for grouping the exported records; records belonging to each group are placed in separate JSON files (filename suffixed by group name)","required":false,"multiple":false},"orderby":{"name":"orderby","type":"option","char":"o","description":"the fields to be used for sorting the exported records","required":false,"multiple":false},"children":{"name":"children","type":"option","char":"c","description":"the child relationships to be included in the exported records; this is not required for tffa package objects. e.g. tffa__Features__r,tffa__Terms__r child relationships are auto included when running export command for tffa__Product__c","required":false,"multiple":false},"skipconfigplan":{"name":"skipconfigplan","type":"boolean","char":"s","description":"skip import of exported record JSON files into configuration plan","required":false,"allowNo":false}},"args":[],"requiresUsername":true,"flagsConfig":{"sobjecttypes":{"kind":"array","char":"s","required":true,"description":"sobject types of records to be exported","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"string","char":"d","description":"output directory where the JSON files of exported records will be placed","default":"./data/configuration","input":[],"multiple":false,"type":"option"},"groupby":{"kind":"string","char":"g","required":false,"description":"the field to be used for grouping the exported records; records belonging to each group are placed in separate JSON files (filename suffixed by group name)","input":[],"multiple":false,"type":"option"},"orderby":{"kind":"array","char":"o","required":false,"description":"the fields to be used for sorting the exported records","input":[],"multiple":false,"type":"option"},"children":{"kind":"array","char":"c","required":false,"description":"the child relationships to be included in the exported records; this is not required for tffa package objects. e.g. tffa__Features__r,tffa__Terms__r child relationships are auto included when running export command for tffa__Product__c","input":[],"multiple":false,"type":"option"},"skipconfigplan":{"kind":"boolean","char":"s","required":false,"description":"skip import of exported record JSON files into configuration plan","allowNo":false,"type":"boolean"}}},"tffa:data:import":{"id":"tffa:data:import","description":"Imports data into an org using the SObject Bulk Upsert API. This data can include master-detail relationships. Primarily used for importing business configurations.\n \n To generate JSON files for use with tffa:data:import, run \"sfdx tffa:data:export\"\n \n In scratch orgs, by default, sobject files are tracked for changes. When doing full plan imports (without the sobjecttypes parameter), individual sobject files are tracked for changes and excluded from import if the file content remained unchanged since the last time it was imported. This behaviour can be suppressed by including the forceimport flag when doing full plan imports.","strict":true,"usage":"<%= command.id %> [-f <array>] [-p <string>] [-s <array>] [-i] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:data:import\n (Imports all records from default plan - data/configuration/config-data-plan.json\n - Updated 101 record(s) of tffa__Product__c\n - Updated 532 record(s) of tffa__ProductFeature__c\n - Updated 143 record(s) of tffa__ProductTerm__c\n Importing record(s) and relationships of tffa__Product__c... done\n \n - Updated 5 record(s) of tffa__DependentProductEligibility__c\n Importing record(s) and relationships of tffa__DependentProductEligibility__c... done","$ sfdx tffa:data:import -p data/configuration/config-data-plan.json\n (Imports all records from default plan - data/configuration/config-data-plan.json\n - Updated 101 record(s) of tffa__Product__c\n - Updated 532 record(s) of tffa__ProductFeature__c\n - Updated 143 record(s) of tffa__ProductTerm__c\n Importing record(s) and relationships of tffa__Product__c... done\n ... \n ","$ sfdx tffa:data:import -s tffa__Product__c\n (Imports only tffa__Product__c from data/configuration/config-data-plan.json)\n - Updated 101 record(s) of tffa__Product__c\n - Updated 532 record(s) of tffa__ProductFeature__c\n - Updated 143 record(s) of tffa__ProductTerm__c\n Importing record(s) and relationships of tffa__Product__c... done\n ...\n ","$ sfdx tffa:data:import -f data/configuration/DisclosureTemplate__c.json,data/configuration/AddOnService__c.json\n (Imports tffa__DisclosureTemplate__c and tffa__AddOnService__c from the files; ignores config data plan)\n - Updated 82 record(s) of tffa__DisclosureTemplate__c\n Importing record(s) and relationships of tffa__DisclosureTemplate__c... done\n \n - Updated 30 record(s) of tffa__AddOnService__c\n Importing record(s) and relationships of tffa__AddOnService__c... done"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sobjectfiles":{"name":"sobjectfiles","type":"option","char":"f","description":"comma-delimited, ordered paths of json files containing collection of record trees to upsert","required":false,"multiple":false},"plan":{"name":"plan","type":"option","char":"p","description":"path to plan to upsert multiple data files that have master-detail relationships; to restrict the sobject types imported using the plan, specify sobjecttypes along with plan","multiple":false,"default":"data/configuration/config-data-plan.json"},"sobjecttypes":{"name":"sobjecttypes","type":"option","char":"s","description":"comma-delimited, list of sobject types to be imported when using a plan","required":false,"multiple":false},"forceimport":{"name":"forceimport","type":"boolean","char":"i","description":"force import all sobject files in a plan ignoring any internal file change tracking; applicable to scratch orgs only; forceimport is automatically set if sobjecttypes parameter is specified","required":false,"allowNo":false}},"args":[],"requiresUsername":true,"requiresProject":true,"flagsConfig":{"sobjectfiles":{"kind":"array","char":"f","required":false,"description":"comma-delimited, ordered paths of json files containing collection of record trees to upsert","input":[],"multiple":false,"type":"option"},"plan":{"kind":"string","char":"p","description":"path to plan to upsert multiple data files that have master-detail relationships; to restrict the sobject types imported using the plan, specify sobjecttypes along with plan","default":"data/configuration/config-data-plan.json","input":[],"multiple":false,"type":"option"},"sobjecttypes":{"kind":"array","char":"s","required":false,"description":"comma-delimited, list of sobject types to be imported when using a plan","input":[],"multiple":false,"type":"option"},"forceimport":{"kind":"boolean","char":"i","required":false,"description":"force import all sobject files in a plan ignoring any internal file change tracking; applicable to scratch orgs only; forceimport is automatically set if sobjecttypes parameter is specified","allowNo":false,"type":"boolean"}}},"tffa:source:apiset":{"id":"tffa:source:apiset","description":"Upgrades the current project and all metadata to the latest API version","strict":true,"usage":"<%= command.id %> [-h <help>] [-s <directory>] [-a <integer>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx tffa:source:apiset "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"sourcefolder":{"name":"sourcefolder","type":"option","char":"s","description":"directory containing sfdx project","multiple":false,"default":"."},"api":{"name":"api","type":"option","char":"a","description":"specify the API version ","multiple":false,"default":56}},"args":[],"flagsConfig":{"help":{"kind":"help","description":"Show CLI help.","char":"h","allowNo":false,"type":"boolean"},"sourcefolder":{"kind":"directory","char":"s","description":"directory containing sfdx project","default":".","input":[],"multiple":false,"type":"option"},"api":{"kind":"integer","char":"a","description":"specify the API version ","default":56,"input":[],"multiple":false,"type":"option"}}},"tffa:source:createfield":{"id":"tffa:source:createfield","description":"Creates an SObject field from the specified parameters.\n By default, created fields (except required) are added to all permission sets in the project. Use the permissionsets parameter to explicitly specify the permission sets.\n \n NOTE: this command does not create the field in the org, it only creates the field meta xml file in the project. source push is required for the field to be created in the org.\n ","strict":true,"usage":"<%= command.id %> -s <string> -n <string> -t checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich [-r] [-l <number>] [-d <string>] [-p <array>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@terafina/tffa-sfdx-plugin","pluginAlias":"@terafina/tffa-sfdx-plugin","pluginType":"core","aliases":[],"examples":["sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\"\n Creates a text field","sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\" --required\n Creates a required text field; does not add update permission sets as field is required","sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\" --length 80\n Creates a text field with length 80","sfdx tffa:source:createfield -s Product__c -n TextField -t text -d \"Test Text Field\" --permissionsets Administrator\n Creates a text field and adds the field permission to Administrator permission set only","sfdx tffa:source:createfield -s Product__c -n CheckboxField -t checkbox -d \"Test Checkbox Field\"\n Creates a checkbox field","sfdx tffa:source:createfield -s Product__c -n CurrencyField -t currency -d \"Test Currency Field\"\n Creates a currency field","sfdx tffa:source:createfield -s Product__c -n PicklistField -t picklist -v ProductCategory -d \"Test Picklist Field\"\n Creates a picklist field with global value set ProductCategory","sfdx tffa:source:createfield -s Product__c -n LongTextAreaField -t textarea-long -d \"Test LongTextArea Field\"\n Creates a long textarea field"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"sobjecttype":{"name":"sobjecttype","type":"option","char":"s","description":"the API name of the object for which the field needs to be created","required":true,"multiple":false},"name":{"name":"name","type":"option","char":"n","description":"the API name of the field","required":true,"multiple":false},"type":{"name":"type","type":"option","char":"t","description":"type of the field","required":true,"helpValue":"(checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich)","multiple":false,"options":["checkbox","currency","date","datetime","email","number","percent","phone","picklist","picklist-multi","text","textarea","textarea-long","textarea-rich"],"default":"text"},"required":{"name":"required","type":"boolean","char":"r","description":"whether field is required; skips addition to permission sets","required":false,"allowNo":false},"length":{"name":"length","type":"option","char":"l","description":"length of text field or textarea (long|rich) field; defaults to 255 for text field and 1024 for textarea field","required":false,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"description of the field","required":false,"multiple":false},"permissionsets":{"name":"permissionsets","type":"option","char":"p","description":"comma-separated list of permission sets to which the field needs to be added; defaults to all permission sets in the project","required":false,"multiple":false},"valuesetname":{"name":"valuesetname","type":"option","char":"v","description":"name of the global value set if the field is a picklist or multi-select picklist type","required":false,"multiple":false}},"args":[],"requiresUsername":true,"requiresProject":true,"flagsConfig":{"sobjecttype":{"kind":"string","char":"s","required":true,"description":"the API name of the object for which the field needs to be created","input":[],"multiple":false,"type":"option"},"name":{"kind":"string","char":"n","required":true,"description":"the API name of the field","input":[],"multiple":false,"type":"option"},"type":{"kind":"enum","helpValue":"(checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|textarea-rich)","char":"t","required":true,"description":"type of the field","default":"text","options":["checkbox","currency","date","datetime","email","number","percent","phone","picklist","picklist-multi","text","textarea","textarea-long","textarea-rich"],"input":[],"multiple":false,"type":"option"},"required":{"kind":"boolean","char":"r","required":false,"description":"whether field is required; skips addition to permission sets","default":false,"allowNo":false,"type":"boolean"},"length":{"kind":"number","char":"l","required":false,"description":"length of text field or textarea (long|rich) field; defaults to 255 for text field and 1024 for textarea field","input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","required":false,"description":"description of the field","input":[],"multiple":false,"type":"option"},"permissionsets":{"kind":"array","char":"p","required":false,"description":"comma-separated list of permission sets to which the field needs to be added; defaults to all permission sets in the project","input":[],"multiple":false,"type":"option"},"valuesetname":{"kind":"string","char":"v","required":false,"description":"name of the global value set if the field is a picklist or multi-select picklist type","input":[],"multiple":false,"type":"option"}}}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terafina/tffa-sfdx-plugin",
|
|
3
3
|
"description": "sfdx plugin from Terafina containing tools for scanning and extending digital applications for the financial services industry.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-rc.1",
|
|
5
5
|
"author": "Terafina Inc",
|
|
6
6
|
"bugs": "https://github.com/terafinainc/tffa-sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|