You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@salesforce/source-deploy-retrieve

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
s

@salesforce/source-deploy-retrieve

JavaScript library to run Salesforce metadata deploys and retrieves

2.1.4
96

Supply Chain Security

100

Vulnerability

89

Quality

100

Maintenance

100

License

Version published
Weekly downloads
283K
6.81%
Maintainers
64
Weekly downloads
 
Created

What is @salesforce/source-deploy-retrieve?

@salesforce/source-deploy-retrieve is an npm package that provides tools for interacting with Salesforce metadata. It allows users to retrieve, deploy, and manage Salesforce source code and metadata from a Salesforce org. This package is particularly useful for developers and administrators who need to automate and streamline their Salesforce development and deployment processes.

What are @salesforce/source-deploy-retrieve's main functionalities?

Retrieve Metadata

This feature allows you to retrieve metadata from a Salesforce org. The code sample demonstrates how to use the SourceClient to retrieve metadata for a specific package and save it to an output directory.

const { SourceClient } = require('@salesforce/source-deploy-retrieve');
const client = new SourceClient();
client.retrieve({
  packageNames: ['MyPackage'],
  output: './outputDir'
}).then(result => {
  console.log('Retrieve Result:', result);
}).catch(error => {
  console.error('Error:', error);
});

Deploy Metadata

This feature allows you to deploy metadata to a Salesforce org. The code sample demonstrates how to use the SourceClient to deploy metadata from a specified source directory.

const { SourceClient } = require('@salesforce/source-deploy-retrieve');
const client = new SourceClient();
client.deploy({
  sourcePath: './sourceDir'
}).then(result => {
  console.log('Deploy Result:', result);
}).catch(error => {
  console.error('Error:', error);
});

Convert Metadata

This feature allows you to convert metadata between different formats. The code sample demonstrates how to use the SourceClient to convert metadata from a source directory to an output directory.

const { SourceClient } = require('@salesforce/source-deploy-retrieve');
const client = new SourceClient();
client.convert({
  sourcePath: './sourceDir',
  outputDir: './outputDir'
}).then(result => {
  console.log('Convert Result:', result);
}).catch(error => {
  console.error('Error:', error);
});

Other packages similar to @salesforce/source-deploy-retrieve

FAQs

Package last updated on 24 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts