sfdc-extended-metadata
Retrieve data from SFDC and split to many files
Last updated 2 years ago by baptistebieber .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sfdc-extended-metadata 
SYNC missed versions from official npm registry.

sfdc-extended-metadata

Build Status Codacy Badge

Inspired from sfdc-generate-package by Sebastien Colladon

/!\ The Gulp Sequence functionality doesn't work /!\

sfdc-extended-metadata is a package to add mor functionalities to jsforce-metadata-tools.

Why ?

There are many Salesforce project using versionning. Theses projects used the Metadata API. It's perfect for classes ou tiggers but not for the CustomObject or CustomLabel because to send to Salesforce we need to tell what information contain the CustomObject. sfdc-extended-metadata split the metadata to small part of metadata.

Getting Started

Installing

$ cd /your//repo
$ git clone https://github.com/baptistebieber/sfdc-extended-metadata.git
# Or :
$ wget https://github.com/baptistebieber/sfdc-extended-metadata/archive/master.zip
$ unzip master.zip

# Then :
$ npm install

Tasks prepackaged

"scripts": {
  "retrieve": "gulp retrieve",
  "deploy": "gulp deploy",
  "parse-data": "gulp parse-data",
  "compose-data": "gulp compose-data",
  "generate-package": "gulp generate-package"
}
  • retrieve: Retrieve data from the SF_SRC + /package.xml (or from a file passed using relative path with the option -p or -package) to SF_TMP
  • deploy: Deploy data from SF_TMP
  • parse-data: Parse data (split) from SF_TMP to SF_SRC
  • compose-data: Combine data from SF_SRC to SF_TMP
  • generate-package: Generate package.xml from SF_TMP

Methods available

"scripts": {
  "deploy": deploy,
  "retrieve": retrieve,
  "gulpRetrieve": gulpRetrieve,
  "gulpDeploy": gulpDeploy,
  "parseData": parseData,
  "composeData": composeData,
  "generatePackage": generatePackage,
  "generatePackageFromList": generatePackageFromList,
  "diff": diff,
  "selectFromPackage": selectFromPackage,
}
  • deploy

  • retrieve: Retrieve data from the SF_SRC + /package.xml (or from a file passed using relative path with the option -p or -package) to SF_TMP

  • parse-data: Parse data (split) from SF_TMP to SF_SRC

  • compose-data: Combine data from SF_SRC to SF_TMP

  • generate-package: Generate package.xml from SF_TMP

  • deploy: Deploy data from a folder (packageSrc)

  • retrieve: Retrieve data from a package.xml (packageXmlPath) to a folder (folderToExtract)

  • parseData: Split & move metadata from a folder (inputFolder) to an other (outputFolder)

  • composeData: Merge & move metadata from a folder (inputFolder) to an other (outputFolder)

  • generatePackage: Generate file "package.xml" from all metadata parsed from a folder (inputFolder) to a folder (outputFolder)

  • generatePackageFromList: Generate file package.xml (outputFile) from a list of filepath (filepaths) in a folder (inputFolder)

  • diff: Make a diff between commit or branch (commitFrom) and an other (commitTo) into the local repository path (repo) and move and compose data from (inputFolder) to (outputFolder)

  • selectFromPackage: Not working yet Select files from a specific package.xml file (inputPackage) from a folder (inputFolder) to an other (outputFolder)

Usage Example

Retrieve data and parse

You need to have the file package.xml into the SRC folder. Then:

$ gulp retrieve
$ gulp parse-data

After having done modifications: deploy

$ gulp compose-data
$ gulp generate-package
$ gulp deploy

Retrieve data from a specific package

You need to have the file ./package-perso.xml into the SRC folder. Then:

$ gulp retrieve -p ./package-perso.xml

Configuration

copy the .env_sample file to a .env file in the root directory. It contains the definition of each required parameters with aen example value. Here is what each line is used for and where:

SF_VERSION Used for: defining the Salesforce API version used Type of value: float one decimal precision (ex: 43.0) Used in:

  • retrieve
  • deploy
  • generate-package

SF_USERNAME Used for: connecting to Salesforce Type of value: string email format Used in:

  • retrieve
  • deploy

SF_PASSWORD Used for: connecting to Salesforce. Combine Password + Token Type of value: string Used in:

  • retrieve
  • deploy

SF_SERVERURL Used for: connecting to Salesforce Type of value: string url format Used in:

  • retrieve
  • deploy

SF_SRC_PATH Used for: defining the path to the src folder Type of value: string absolute or relative path from this folder Used in:

  • retrieve
  • deploy
  • generate-package
  • parse-data
  • compose-data

SF_TMP_PATH Used for: defining the path to the temporary folder Type of value: string absolute or relative path from this folder Used in:

  • retrieve
  • deploy
  • generate-package
  • parse-data
  • compose-data

Here is the list of optional parameters with their default value :

  • SF_VERBOSE : (boolean) used in deploy. Default: true

Built With

Versioning

SemVer is used for versioning.

Authors

Special Thanks

  • Sebastien Colladon - Base of the structure - scolladon

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Current Tags

  • 1.6.0                                ...           latest (2 years ago)

20 Versions

  • 1.6.0                                ...           2 years ago
  • 1.5.4                                ...           2 years ago
  • 1.5.3                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 1.5.1                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.5.0-alpha.4                                ...           2 years ago
  • 1.5.0-alpha.3                                ...           2 years ago
  • 1.5.0-alpha.2                                ...           2 years ago
  • 1.5.0-alpha.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (22)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |