npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sfdc-extended-metadata

v1.6.0

Published

Retrieve data from SFDC and split to many files

Downloads

43

Readme

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