Skip to content

Accenture/DX-Mate

Repository files navigation

DX-Mate

Breaking change

From version 2.0.6 new dependencies need to be installed. See Requirements.

DX-Mate is an extension that provides a set of UI actions to improve SFDX development efficiency. Note, when installing a new version using vsix the previous version should be uninstalled first.

Extension Screenshot

Features

Key features includes:

  • Fetch scratch org from a pool
  • Import dummy data to your scratch org using either sfdx data:tree:import or SFDMU
  • Export data from a .soql file
  • Create new scratch org
  • Assign default permission sets
  • Deploy unpackagable metadata
  • Push/pull source
  • Open scratch org

In addition the create scratch org command automatically chains the following actions:

  1. Creating scratch org with alias as input
  2. Installing package dependencies
  3. Pushing project source to scratch org
  4. Deploy unpackagable (For i.e. metadata that do not support packaging or should not be included in the package being developed)
  5. Open scratch org
  6. Assigning default permission sets
  7. Importing dummy data

Requirements

  1. Salesforce CLI
npm install sfdx-cli --global #Needed for backwards compatability
npm install @salesforce/cli --global
  1. sfpowerkit plugin
sfdx plugins:install sfpowerkit

Scratch org pooling is supported using DX-Mate and adheres to functionality from the DX@Scale framework. To activates these function your DebHub needs to have the unlocked package installed as described here. Also, run following commands to install dx@scale utilities and the sfdmu plugin:

npm i -g @dxatscale/sfpowerscripts  #include --force to overwrite existing plugin
sfdx plugins:install sfdmu  

Download the latest version of dxmate-x.x.x.vsix folder from https://github.com/Accenture/DX-Mate/releases. Then open VS-Code and press F1 -> install from vsix.

Extension Settings

This extension contributes the following settings:

  • dependency.keys: Installation keys for all known dependencies only available in user settings
  • dummy.user.location: Set the workspace relative directory for dummy users to create in scratch orgs
  • dummy.data.location: Set the workspace relative directory for the dummy data
  • dummy.data.sfdmu: Enable dummy data import using sfdmu plugin
  • unpackagable.location: Set the workspace relative directory for unpackagable metadata
  • scratch.default.permissionsets: Set the list of default permission sets to be assigned for the workspace
  • multi.scratch.default.permissionsets: Set the list of default permission sets per package directory for the workspace

The settings can be located in the VS code ui by pressing cmd + , on mac or Ctrl + , on windows. Select workspace as the setting scope and findt DX-mate below extensions.

Extension Settings

Dummy data

To enable automatic import of dummy data after scratch org creation/fetch from org pool update the dummy data location setting and select whether dummy data is on the required sfdmu format. For SFDMU import a single export.json file is required in the dummy data directory, along with x-amount of .csv files generated using the sfdmu export command.

SFDMU export