Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugin-datakit

Version License

plugin-datakit is a Salesforce CLI plugin that automates the deployment of DataKit objects to a Salesforce org. A DataKit bundles a set of data components—defined in a DataPackageDefinition metadata record—that need to be provisioned together. This plugin reads that definition from the org's Metadata API, constructs the deployment payload, and invokes the sfdatakit__DeployDataKitComponents flow API to deploy all components in one step. Long-running deployments are polled automatically, and a separate report command lets you resume checking the status of any deployment that was still in progress when a prior run timed out.

Installation

sf plugins install @salesforce/plugin-datakit

Contributing

To work on this plugin locally, clone the repo and link it into your Salesforce CLI installation:

git clone https://github.com/salesforce/plugin-datakit.git
cd plugin-datakit
npm install
sf plugins link .

Changes to TypeScript source must be compiled before they take effect:

npm run build

Commands

sf datakit deploy report

Check the status of an in-progress DataKit deployment.

USAGE
  $ sf datakit deploy report -i <value> [-o <value>] [--api-version <value>] [-w <value>]

FLAGS
  -i, --interview-guid=<value>  (required) Interview GUID returned by the original deploy command.
  -o, --target-org=<value>      Username or alias of the target org.
  -w, --wait=<value>            [default: 10 minutes] Number of minutes to wait for the deployment to complete before
                                timing out.
  --api-version=<value>         Override the api version used for api requests made by this command

DESCRIPTION
  Check the status of an in-progress DataKit deployment.

  Polls the DataKitDeploymentLog until the deployment identified by the interview GUID reaches a terminal status.

sf datakit deploy start

Deploy a DataKit to the target org.

USAGE
  $ sf datakit deploy start -n <value> -p <value> [-o <value>] [--api-version <value>] [-w <value>]

FLAGS
  -n, --developer-name=<value>  (required) Developer name of the DataPackageKitDefinition to deploy.
  -o, --target-org=<value>      Username or alias of the target org.
  -p, --source-path=<value>     (required) Path to the local directory containing the DataKit metadata
                                (dataPackageKitDefinitions, DataPackageKitObjects, dataSourceBundleDefinitions).
  -w, --wait=<value>            [default: 10 minutes] Number of minutes to wait for the deployment to complete before
                                timing out.
  --api-version=<value>         Override the api version used for api requests made by this command

DESCRIPTION
  Deploy a DataKit to the target org.

  Reads a DataPackageKitDefinition by developer name via the Metadata API, builds the component payload, and calls the
  sfdatakit__DeployDataKitComponents flow API to deploy all components to the connected Salesforce org.

EXAMPLES
  Deploy a DataKit to the default org:

    $ sf datakit deploy start --developer-name MyDataKit

  Deploy a DataKit to a specific org:

    $ sf datakit deploy start --developer-name MyDataKit --target-org myOrg

  Deploy using a specific API version:

    $ sf datakit deploy start --developer-name MyDataKit --target-org myOrg --api-version 62.0

License

This plugin is licensed under the Apache License 2.0.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages