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 🙏

© 2026 – Pkg Stats / Ryan Hefner

salesforce-source-gen

v0.0.10

Published

Generate Salesforce source files directly from your source.

Readme

salesforce-source-gen

npm version

Generate Salesforce source files directly from your source. Currently, only DX projects are supported.

This project is not official Salesforce product.

Usage

$ npm install -g salesforce-source-gen
$ salesforce-source-gen COMMAND
running command...
$ salesforce-source-gen (-v|--version|version)
salesforce-source-gen/0.0.10 linux-x64 node-v8.10.0
$ salesforce-source-gen --help [COMMAND]
USAGE
  $ salesforce-source-gen COMMAND
...

Optionally, you can configure scripts in your package.json file.

{
  "scripts": {
    "record-types": "salesforce-source-gen record-types",
    "picklists": "salesforce-source-gen picklists"
  }
}

Commands

salesforce-source-gen help [COMMAND]

display help for salesforce-source-gen

USAGE
  $ salesforce-source-gen help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

salesforce-source-gen picklists

Generate Apex constants from field picklists and standard value sets.

USAGE
  $ salesforce-source-gen picklists

OPTIONS
  -h, --help                                       show CLI help
  --customFieldInfix=customFieldInfix              String between sobject name and field name. Default: '_'.
  --customFieldPrefix=customFieldPrefix            Prefix for classes generated from custom fields. Default: empty.
  --customFieldSuffix=customFieldSuffix            Suffix for classes generated from custom fields. Default: empty.
  --globalValueSetPrefix=globalValueSetPrefix      Suffix for classes generated from global value sets. Default: empty.
  --globalValueSetSuffix=globalValueSetSuffix      Suffix for classes generated from global value sets. Default: empty.
  --ignoreGlobalValueSets                          Ignore global value sets.
  --ignorePicklists                                Ignore custom fields.
  --ignoreStandardValueSets                        Ignore standard value sets.
  --outputDir=outputDir                            Default: default package directory.
  --projectDir=projectDir                          Default: current working directory.
  --sourceApiVersion=sourceApiVersion              Default: from sfdx-project.json.

  --standardValueSetPrefix=standardValueSetPrefix  Prefix for classes generated from standard value sets. Default:
                                                   empty.

  --standardValueSetSuffix=standardValueSetSuffix  Suffix for classes generated from standard value sets. Default:
                                                   empty.

DESCRIPTION
  To filter only specific picklists, add to your package.json 'include'.
  Only picklists defined in include will be generated.
  Include can contain:
       I)   ObjectApiName - all custom fields of that object will be used
       II)  ObjectApiName.FieldApiName - custom field will be used
       III) StandardValueSetName - standard value set will be used
       IV)  GlobalValueSetName - global value set will be used
  {
       "sourceGen": {
           "picklists": {
               "include": [
                   "Account",
                   "Building__c.Phase__c",
                   "Industry"
               ]
           }
       }
  }

See code: src/commands/picklists.ts

salesforce-source-gen record-types

Generate Apex constants from record types defined in your source.

USAGE
  $ salesforce-source-gen record-types

OPTIONS
  -h, --help                           show CLI help
  --ignoreTestClass                    Do not generate test class.
  --includeInactive                    Include inactive record types.
  --outputClassName=outputClassName    Default: 'RecordTypes'.
  --outputDir=outputDir                Default: default package directory from sfdx-project.json.
  --projectDir=projectDir              Default: current working directory
  --sourceApiVersion=sourceApiVersion  Default: from sfdx-project.json.

DESCRIPTION
  You can use `RecordTypes.ACCOUNT_AGENT_ID`instead of 
  `Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agent');`
  or `RecordTypes.ACCOUNT_AGENT` to access RecordTypeInfo.

See code: src/commands/record-types.ts