sfdx plugin from Terafina containing tools for scanning and extending digital applications for the financial services industry.
npm install @terafina/tffa-sfdx-plugintffa-sfdx-plugin is a SalesforceDX plugin from Terafina containing tools for scanning and extending digital applications for the financial services industry.

Before you get started, install the required software on your computer.
1. Install Java from OpenJDK Runtime Environment 18.9 (build 11.0.2+9) or via brew .Some features in Salesforce Extensions for VS Code depend upon the Java Platform.
2. Install sfdx-cli for osx using npm install -g sfdx-cli
For information about installing Salesforce CLI, see the Salesforce DX Setup Guide.
```
sf plugins:install @terafina/tffa-sfdx-plugin
You will be prompted to confirm that you want to install an unsigned plugin. Choose yes
``
This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: y
To prevent this message from appearing, you can add this to the Allow List by adding an entry for it in $HOME/.config/sfdx/unsignedPluginAllowList.json.
CI Users: As the plugin is not signed, to install it from a Dockerfile or a script:
``
echo 'y' | sf plugins:install tffa-sfdx-plugin
`sh-session`
$ npm install -g @terafina/tffa-sfdx-plugin
$ sfdx COMMAND
running command...
$ sfdx (--version|-v)
@terafina/tffa-sfdx-plugin/28.0.0 linux-x64 node-v22.13.1
$ sfdx --help [COMMAND]
USAGE
$ sfdx COMMAND
...
* [sfdx help [COMMAND]](#sfdx-help-command)sfdx tffa:apexdoc
* sfdx tffa:data:export
* sfdx tffa:data:import
* sfdx tffa:lint
* sfdx tffa:meta
* sfdx tffa:ping
* sfdx tffa:source:apiset
* sfdx tffa:source:createfield
* sfdx version
*
Display help for sfdx.
`
USAGE
$ sfdx help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for sfdx.
`
_See code: @oclif/plugin-help_
Command to generate apex documentation similar to javadoc based on the comments in apex classes.
`
USAGE
$ sfdx tffa:apexdoc [--json] [-s
FLAGS
-d, --destfolder=
-s, --sourcefolder=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Command to generate apex documentation similar to javadoc based on the comments in apex classes.
Please read more at Documenting Apex Classes.
Once generated you can use vscode plugin Live
Server and select index.html from
generated folder and run Open with LiveServer to render the html
EXAMPLES
$ sf tffa:apexdoc
`
_See code: src/commands/tffa/apexdoc.ts_
Exports records of specified sobject types from target org into JSON file(s). Primarily used for exporting business configurations.
`
USAGE
$ sfdx tffa:data:export -s
[-a
FLAGS
-a, --api-version=
-c, --children=
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
-d, --outputdir=
records will be placed
-g, --groupby=
are placed in separate JSON files (filename suffixed by group name)
-i, --skipconfigplan skip import of exported record JSON files into configuration plan
-o, --orderby=
-s, --sobjecttypes=
-u, --target-org=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Exports records of specified sobject types from target org into JSON file(s). Primarily used for exporting business
configurations.
The 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.
EXAMPLES
$ sf tffa:data:export --sobjecttypes tffa__Product__c
Fetched 101 records of tffa__Product__c
Writing 24 records to ./data/configuration/Product__c.json
Writing 30 records to ./data/configuration/Product__c1.json
Writing 20 records to ./data/configuration/Product__c2.json
Writing 27 records to ./data/configuration/Product__c3.json
$ sf tffa:data:export --sobjecttypes tffa__DisclosureTemplate__c,tffa__DisclosureChecklist__c,tffa__DisclosureMatrix__c
Fetched 81 records of tffa__DisclosureTemplate__c
Writing 81 records to ./data/configuration/DisclosureTemplate__c.json
Fetched 57 records of tffa__DisclosureChecklist__c
Writing 57 records to ./data/configuration/DisclosureChecklist__c.json
Fetched 144 records of tffa__DisclosureMatrix__c
Writing 144 records to ./data/configuration/DisclosureMatrix__c.json
`
_See code: src/commands/tffa/data/export.ts_
Imports data into an org using the SObject Bulk Upsert API. This data can include master-detail relationships. Primarily used for importing business configurations.
`
USAGE
$ sfdx tffa:data:import [--json] [-f
FLAGS
-a, --api-version=
-f, --sobjectfiles=
upsert
-i, --forceimport 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
-p, --plan=
data files that have master-detail relationships; to restrict the sobject types
imported using the plan, specify sobjecttypes along with plan
-s, --sobjecttypes=
-u, --target-org=
GLOBAL FLAGS
--json Format output as json.
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.
To generate JSON files for use with tffa:data:import, run "sf tffa:data:export"
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.
EXAMPLES
$ sf tffa:data:import
(Imports all records from default plan - data/configuration/config-data-plan.json
- Updated 101 record(s) of tffa__Product__c
- Updated 532 record(s) of tffa__ProductFeature__c
- Updated 143 record(s) of tffa__ProductTerm__c
Importing record(s) and relationships of tffa__Product__c... done
- Updated 5 record(s) of tffa__DependentProductEligibility__c
Importing record(s) and relationships of tffa__DependentProductEligibility__c... done
$ sf tffa:data:import -p data/configuration/config-data-plan.json
(Imports all records from default plan - data/configuration/config-data-plan.json
- Updated 101 record(s) of tffa__Product__c
- Updated 532 record(s) of tffa__ProductFeature__c
- Updated 143 record(s) of tffa__ProductTerm__c
Importing record(s) and relationships of tffa__Product__c... done
...
$ sf tffa:data:import -s tffa__Product__c
(Imports only tffa__Product__c from data/configuration/config-data-plan.json)
- Updated 101 record(s) of tffa__Product__c
- Updated 532 record(s) of tffa__ProductFeature__c
- Updated 143 record(s) of tffa__ProductTerm__c
Importing record(s) and relationships of tffa__Product__c... done
...
$ sf tffa:data:import -f data/configuration/DisclosureTemplate__c.json,data/configuration/AddOnService__c.json
(Imports tffa__DisclosureTemplate__c and tffa__AddOnService__c from the files; ignores config data plan)
- Updated 82 record(s) of tffa__DisclosureTemplate__c
Importing record(s) and relationships of tffa__DisclosureTemplate__c... done
- Updated 30 record(s) of tffa__AddOnService__c
Importing record(s) and relationships of tffa__AddOnService__c... done
`
_See code: src/commands/tffa/data/import.ts_
Scans a sfdx project and provide a violations report based on defined standards.
`
USAGE
$ sfdx tffa:lint [-j] [-s
FLAGS
-e, --eject update local pmd ruleset
-f, --level emit fatal violations only
-j, --json generate json output
-m, --minapi=
-r, --rulesetpath=
-s, --sourcefolder=
DESCRIPTION
Scans a sfdx project and provide a violations report based on defined standards.
Performs static analysis of source code with a command-line interface and report output.
The command creates "Rule Violations" when the it identifies issues. Developers use this information as feedback to
fix their code.
The rules used in the lint command are:
- Apex PMD 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.
- Custom rules
- Custom Objects should have a description
- Custom Fields should have a description'
- Custom fields should not contain underscores.
- Custom fields in managed object should start with CZ.
- Custom objects should start with CZ.
- Using Metadata API Version and Project source api version should be the latest supported.
- Files violating naming conventions
- Do not use isCreateable, isAccessible, isUpdateable, CRUD/FLS Checks are checked by tffa.AbstractRepository
- Do not call methods directly of an abstract class. Call methods from Repository classes extending
tffa.AbstractRepository
- Do not call methods directly of an abstract class. Call methods from Controllers classes extending
tffa.AbstractController',
- Do not call methods directly of an abstract class. Call methods from RESTService classes extending
tffa.AbstractRESTService
- Any SOQL should be encapsulated into Repository classes extending tffa.AbstractRepository. Use doQuery method
- Do not supress PMD warnings using @SupressWarnings
The lint command is integrated into the jenkins build to report violations and fail builds
EXAMPLES
$ sf tffa:lint
`
_See code: src/commands/tffa/lint.ts_
Scan a sfdx project for generating metadata summary information
`
USAGE
$ sfdx tffa:meta [--json] [-s
FLAGS
-c, --clientname=
-d, --destpath=
-f, --fields generate field output
-o, --output=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Scan a sfdx project for generating metadata summary information
EXAMPLES
$ sf tffa:meta
`
_See code: src/commands/tffa/meta.ts_
Ping and test the plugin
`
USAGE
$ sfdx tffa:ping [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Ping and test the plugin
EXAMPLES
$ sf tffa:ping
`
_See code: src/commands/tffa/ping.ts_
Upgrades the current project and all metadata to the latest API version
`
USAGE
$ sfdx tffa:source:apiset [--json] [-s
FLAGS
-a, --api=
-s, --sourcefolder=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Upgrades the current project and all metadata to the latest API version
EXAMPLES
$ sf tffa:source:apiset
`
_See code: src/commands/tffa/source/apiset.ts_
Creates an SObject field from the specified parameters.
`
USAGE
$ sfdx tffa:source:createfield -s
checkbox|currency|date|datetime|email|number|percent|phone|picklist|picklist-multi|text|textarea|textarea-long|texta
rea-rich [--json] [-r] [-l
FLAGS
-d, --description=
-l, --length=
and 1024 for textarea field
-n, --name=
-p, --permissionsets=
defaults to all permission sets in the project
-r, --required whether field is required; skips addition to permission sets
-s, --sobjecttype=
-t, --type=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Creates an SObject field from the specified parameters.
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.
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.
EXAMPLES
sf fa:source:createfield -s Product__c -n TextField -t text -d "Test Text Field"
Creates a text field
sf tffa:source:createfield -s Product__c -n TextField -t text -d "Test Text Field" --required
Creates a required text field; does not add update permission sets as field is required
sf tffa:source:createfield -s Product__c -n TextField -t text -d "Test Text Field" --length 80
Creates a text field with length 80
sf tffa:source:createfield -s Product__c -n TextField -t text -d "Test Text Field" --permissionsets Administrator
Creates a text field and adds the field permission to Administrator permission set only
sf tffa:source:createfield -s Product__c -n CheckboxField -t checkbox -d "Test Checkbox Field"
Creates a checkbox field
sf tffa:source:createfield -s Product__c -n CurrencyField -t currency -d "Test Currency Field"
Creates a currency field
sf tffa:source:createfield -s Product__c -n PicklistField -t picklist -v ProductCategory -d "Test Picklist Field"
Creates a picklist field with global value set ProductCategory
sf tffa:source:createfield -s Product__c -n LongTextAreaField -t textarea-long -d "Test LongTextArea Field"
Creates a long textarea field
`
_See code: src/commands/tffa/source/createfield.ts_
`
USAGE
$ sfdx version [--json] [--verbose]
FLAGS
--verbose Show additional information about the CLI.
GLOBAL FLAGS
--json Format output as json.
FLAG DESCRIPTIONS
--verbose Show additional information about the CLI.
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
``
_See code: @oclif/plugin-version_