Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsforce/jsforce-metadata-tools
Tools for deploying/retrieving package files using Metadata API via JSforce
https://github.com/jsforce/jsforce-metadata-tools
jsforce metadata-api salesforce
Last synced: about 1 month ago
JSON representation
Tools for deploying/retrieving package files using Metadata API via JSforce
- Host: GitHub
- URL: https://github.com/jsforce/jsforce-metadata-tools
- Owner: jsforce
- Created: 2015-08-14T03:08:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-22T16:32:36.000Z (almost 6 years ago)
- Last Synced: 2024-11-07T23:58:26.847Z (about 2 months ago)
- Topics: jsforce, metadata-api, salesforce
- Language: JavaScript
- Size: 47.9 KB
- Stars: 38
- Watchers: 6
- Forks: 26
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jsforce-metadata-tools [![Build Status](https://travis-ci.org/jsforce/jsforce-metadata-tools.svg)](https://travis-ci.org/jsforce/jsforce-metadata-tools)
Tools for deploying/retrieving package files using Salesforce Metadata API via [JSforce](https://jsforce.github.io/).
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
```