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

@pacificpoint/pplib

v1.0.4

Published

A variety of helpful dev tools for the pacific point team

Downloads

41

Readme

pplib

NPM Downloads/week License

Usage

The pplib commands deliver an easy way to produce some basic files used in Pacific Point's extension of the fflib library (fflibe).

In addition, there are two commands for building and combining manifest files.

Install

sf plugins install [email protected]

Issues

Please report any issues at https://github.com/forcedotcom/cli/issues

Contributing

  1. Please read our Code of Conduct
  2. Create a new issue before starting your project so that we can keep track of what you are trying to add/fix. That way, we can also offer suggestions or let you know if there is already an effort in progress.
  3. Fork this repository.
  4. Build the plugin locally
  5. Create a topic branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
  6. Edit the code in your fork.
  7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
  8. Sign CLA (see CLA below).
  9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.

CLA

External contributors will be required to sign a Contributor's License Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.

Build

To build the plugin locally, make sure to have yarn installed and run the following commands:

# Clone the repository
git clone [email protected]:salesforcecli/pplib

# Install the dependencies and compile
yarn && yarn build

To use your plugin, run using the local ./bin/dev or ./bin/dev.cmd file.

# Run using local run file.
./bin/dev hello world

There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.

# Link your plugin to the sf cli
sf plugins link .
# To verify
sf plugins

Commands

sf pplib generate

Generates the full suite of class files for a new sobject type.

USAGE
  $ sf pplib generate -s <value> [--json] [-d <value>] [--ignore-errors]

FLAGS
  -d, --output-dir=<value>  [default: force-app] The output directory of the items. List only the top level directory.
                            i.e. force-app.
  -s, --sobject=<value>     (required) API Name of the SObject.
      --ignore-errors       Ignore errors outputted by the script.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Generates the full suite of class files for a new sobject type.

  Generates the full suite of class files for a new sobject type.

EXAMPLES
  $ sf pplib generate

sf pplib generate domain

Generates a new domain class using the fflibe_Application implementation for a given sobject.

USAGE
  $ sf pplib generate domain -s <value> [--json] [-d <value>] [--ignore-errors]

FLAGS
  -d, --output-dir=<value>  [default: force-app] The output directory of the items. List only the top level directory.
                            i.e. force-app
  -s, --sobject=<value>     (required) The SObjectType of the sobject to create
      --ignore-errors       Ignore errors outputted by the script.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Generates a new domain class using the fflibe_Application implementation for a given sobject.

  Description of a command.

EXAMPLES
  $ sf pplib generate domain

sf pplib generate handler

Generates a new handler file for a give sobject type.

USAGE
  $ sf pplib generate handler -s <value> [--json] [-d <value>] [--ignore-errors]

FLAGS
  -d, --output-dir=<value>  [default: force-app] The output directory of the items. List only the top level directory.
                            i.e. force-app
  -s, --sobject=<value>     (required) API Name of the SObject.
      --ignore-errors       Ignore errors outputted by the script.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Generates a new handler file for a give sobject type.

  Description of a command.

EXAMPLES
  $ sf pplib generate handler

sf pplib generate selector

Generates a selector using the fflibe design pattern with necessary supporting files

USAGE
  $ sf pplib generate selector -s <value> [--json] [-d <value>] [--ignore-errors]

FLAGS
  -d, --output-dir=<value>  [default: force-app] The output directory of the items. List only the top level directory.
                            i.e. force-app
  -s, --sobject=<value>     (required) The SObjectType of the sobject to create
      --ignore-errors       Ignore errors outputted by the script.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Generates a selector using the fflibe design pattern with necessary supporting files

  Generates a selector class implementing the fflibe_selector class. Will also generate the metadata and field set
  necessary to support the base implementation

EXAMPLES
  $ sf pplib generate selector --sobject Account

  $ sf pplib generate selector --sobject Account --output-dir force-app

sf pplib generate service

Create a new Service class in the style of fflib-extensions.

USAGE
  $ sf pplib generate service -s <value> [--json] [-d <value>] [--ignore-errors]

FLAGS
  -d, --output-dir=<value>  [default: force-app] Description of a flag.
  -s, --sobject=<value>     (required) Description of a flag.
      --ignore-errors       Ignore errors outputted by the script.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Create a new Service class in the style of fflib-extensions.

  Description of a command.

EXAMPLES
  $ sf pplib generate service

sf pplib manifest build

Create a manifest file from the difference in commit hashes or from the working directory

USAGE
  $ sf pplib manifest build -p <value> -i <value> [--json] [-f <value> [-c <value> | -W]]

FLAGS
  -W, --include-working-directory  If declared, will generate a manifest of items in the staged and changed indexes.
  -c, --to-commit=<value>          [default: HEAD] The git object of the upper bound of changes.
  -f, --from-commit=<value>        The git object of the lower bound of changes.
  -i, --iteration=<value>          (required) The name or iteration of the generated manifest.
  -p, --filepath=<value>           (required) The directory to write the generated manifest.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Create a manifest file from the difference in commit hashes or from the working directory

  Assuming your project leverages git, this command will create a manifest file at the location that you provide. The
  manifest can be generated from the difference between to commit hashes (if the `--to-commit` is omitted, `HEAD` will
  be used instead). Alternatively, declaring the `--include-working-directory` will build a manifest from your staged
  and changed items.

EXAMPLES
  $ sf manifest build -W --iteration=tempWorkingFiles --output-dir=manifest/workingManifests

  $ sf manifest build --from-commit 737a5ee --to-commit=HEAD --iteration=release1 --output-dir=manifest/releases

sf pplib manifest merge

Combine one or more manifests into a single manifest file.

USAGE
  $ sf pplib manifest merge -f <value> [--json] [-m <value> | -d <value>]

FLAGS
  -d, --manifest-directory=<value>  The absolute or relative filepath of a directory containing one or more manifest to
                                    merge into the source manifest.
  -f, --source-manifest=<value>     (required) The absolute or relative filepath of the manifest that other manifests
                                    will be merged into.
  -m, --manifests=<value>...        The absolute or relative filepath of a manifest to merge into the source manifest.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Combine one or more manifests into a single manifest file.

  Will combine individual declared manifests using the `--manifests` flag or all manifests located in a directory using
  the `--manifest-directory` flag

EXAMPLES
  $ sf manifest merge --source-manifest=manifest/package.xml --manifests=manifest/cases/00123.xml --manifests=manifest/cases/000456.xml

  $ sf manifest merge --source-manifest=manifest/package.xml --manifest-directory=manifest/releases