Coder Social home page Coder Social logo

jsforce-metadata-tools's Introduction

jsforce-metadata-tools Build Status

Tools for deploying/retrieving package files using Salesforce Metadata API via JSforce.

Provides command line interface (CLI) to easily deploy/retrieve packages.

Install

$ npm install jsforce-metadata-tools -g

Usage

Deploy

Deploy package from local directory

$ jsforce-deploy -u [email protected] -p ${SF_PASSWORD} -D ./path/to/packageDir

Deploy package from ZIP archive file

$ jsforce-deploy -u [email protected] -p ${SF_PASSWORD} -Z ./path/to/package.zip

Retrieve

Retrieve package files and write them under the directory

(Assuming that ./path/to/packageDir directory has a package.xml file inside)

$ jsforce-retrieve -u [email protected] -p ${SF_PASSWORD} -D ./path/to/packageDir

Retrieve package files by specifying metadata types/members to retrieve

$ jsforce-retrieve -u [email protected] -p ${SF_PASSWORD} --memberTypes "ApexClass:Class1,Class2;ApexPage:*" -D ./path/to/distDir

Retrieve package files by specifying package names to retrieve

$ jsforce-retrieve -u [email protected] -p ${SF_PASSWORD} --packageNames "Package1,Package2" -D "./path/to/distDir1,./path/to/distDir2"

Retrieve package files by specifying package.xml file

$ jsforce-retrieve -u [email protected] -p ${SF_PASSWORD} -P ./path/to/package.xml -D ./path/to/distDir

Retrieve package and output as a ZIP archive file

$ jsforce-retrieve -u [email protected] -p ${SF_PASSWORD} --packageName Package1 -Z ./path/to/package.zip

OAuth-based Authorization

Once the authorization is done in JSforce REPL, the same connection is also valid here (no password required)

$ jsforce
> .authorize

...
(OAuth authorization flow)
...

Received authorization code. Please close the opened browser window.
Authorized. Fetching user info...
Logged in as : [email protected]
> .exit

$ jsforce-deploy -c [email protected] -D ./path/to/packageDir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.