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

sfdx-wry-plugin-rebuilt

v0.0.12

Published

Utilities for SFDX JSON data files

Downloads

38

Readme

sfdx-wry-plugin

Utilities for SFDX JSON data files

Version Appveyor CI Codecov Known Vulnerabilities Downloads/week License

Install

sfdx plugins:install sfdx-wry-plugin

Docs

Allows you to use Record Type developer names in JSON files for sfdx's data:tree:import.

The intent is that you first run tool on your JSON data files. It creates a copy with scratch org specific ID values put in place. Then you run data:tree:import against that output copy.

Within your JSON files, Record Types can be referenced in one of two ways: First way, you can use a syntax of $R{RecordType.SobjectType.DeveloperName} such as $R{RecordType.Account.Vendor} This is a very concise way, good for adding in to pre-existing or manually maintained JSON data files.

Second way, in the data:tree:export command include "RecordType.DeveloperName" in the select fields along with other fields, such as "select Name, BillingState, RecordType.DeveloperName from Account". This leaves you with a very verbose RecordType reference in the JSON file, but one that this tool can recognize and replace.

Commands

sfdx wry:data:count

Counts rows in data objects

USAGE
  $ sfdx wry:data:count

OPTIONS
  -o, --objects=objects                           List of objects to check (CSV seperated for multiple) (defaults to
                                                  ALL)

  -u, --targetusername=targetusername             username or alias for the target org; overrides default target org

  --apiversion=apiversion                         override the api version used for api requests made by this command

  --json                                          format output as json

  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLES
  $ sfdx wry:data:count --targetusername [email protected] -o Account,Opportunity,User
  Account: 14 records
  Account.Vendor: 2 records
  Account.Customer: 12 records
  Opportunity: 38 records
  User: 5 records
  
  $ sfdx wry:data:count -u [email protected] -o ALL
  Account: 14 records
  Account.Vendor: 2 records
  Account.Customer: 12 records
  Opportunity: 38 records
  User: 5 records

See code: src/commands/wry/data/count.ts

sfdx wry:file:replace

Replaces RecordType and UserRole references with Id values

USAGE
  $ sfdx wry:file:replace

OPTIONS
  -f, --force                                     Force overwrite output directory (not supported yet)
  -i, --inputdir=inputdir                         Directory containing JSON data files

  -o, --outputdir=outputdir                       Target directory for new versions of data files (default:
                                                  $inputdir.out)

  -u, --targetusername=targetusername             username or alias for the target org; overrides default target org

  --apiversion=apiversion                         override the api version used for api requests made by this command

  --json                                          format output as json

  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLES
  $ sfdx wry:file:replace --targetusername [email protected] --inputdir dataFiles --outputdir dataFiles.replaced  

     Copying dataFiles/* to dataFiles.replaced/*
     Account.json: Replacing $R{RecordType.Account.Vendor} with 0125C000000IGVIQA4
     Account.json: Replacing $R{RecordType.Account.Customer} with 0125C000000IGVSQA4
     NewUser.json: Replacing $R{UserRole.CEO} with 00E5C000000UZSmUAO
     QAUser.json: Replacing $R{UserRole.MarketingTeam} with 00E5C000000UZSxUAO
  
  $ sfdx wry:file:replace -u [email protected] -i data  
     Copying data/* to data.out/*
     Account.json: Replacing $R{RecordType.Account.Vendor} with 0125C000000IGVIQA4
     Account.json: Replacing $R{RecordType.Account.Customer} with 0125C000000IGVSQA4
     NewUser.json: Replacing $R{UserRole.CEO} with 00E5C000000UZSmUAO
     QAUser.json: Replacing $R{UserRole.MarketingTeam} with 00E5C000000UZSxUAO

See code: src/commands/wry/file/replace.ts

sfdx wry:hello:org [FILE]

Prints a greeting and your org id(s)!

USAGE
  $ sfdx wry:hello:org [FILE]

OPTIONS
  -f, --force                                      example boolean flag
  -n, --name=name                                  name to print
  -u, --targetusername=targetusername              username or alias for the target org; overrides default target org
  -v, --targetdevhubusername=targetdevhubusername  username or alias for the dev hub org; overrides default dev hub org
  --apiversion=apiversion                          override the api version used for api requests made by this command
  --json                                           format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)   logging level for this command invocation

EXAMPLES
  $ sfdx hello:org --targetusername [email protected] --targetdevhubusername [email protected]
     Hello world! This is org: MyOrg and I will be around until Tue Mar 20 2018!
     My hub org id is: 00Dxx000000001234
  
  $ sfdx hello:org --name myname --targetusername [email protected]
     Hello myname! This is org: MyOrg and I will be around until Tue Mar 20 2018!

See code: src/commands/wry/hello/org.ts

sfdx wry:org:limits

Reports limits in a Salesforce instance

USAGE
  $ sfdx wry:org:limits

OPTIONS
  -l, --limits=limits                             List of limits to check (CSV seperated for multiple) (defaults to ALL)
  -u, --targetusername=targetusername             username or alias for the target org; overrides default target org
  --apiversion=apiversion                         override the api version used for api requests made by this command
  --json                                          format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLES
  $ sfdx wry:org:limits --targetusername [email protected]
  ConcurrentAsyncGetReportInstances: 200 of 200
  ConcurrentSyncReportRuns: 20 of 20
  DailyAnalyticsDataflowJobExecutions: 40 of 40
  DailyApiRequests: 14419 of 15000
  ...

  $ sfdx wry:org:limits -u [email protected] -l MassEmail,DailyApiRequests,SingleEmail
  MassEmail: 10 of 10
  DailyApiRequests: 14408 of 15000
  SingleEmail: 15 of 15

See code: src/commands/wry/org/limits.ts