sfdx-wry-plugin
Utilities for SFDX JSON data files
Last updated a year ago by billryoung .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sfdx-wry-plugin 
SYNC missed versions from official npm registry.

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 myScratchOrg@example.com -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 myScratchOrg@example.com -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 myScratchOrg@example.com --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 myScratchOrg@example.com -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 myOrg@example.com --targetdevhubusername devhub@org.com
     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 myOrg@example.com
     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 myScratchOrg@example.com
  ConcurrentAsyncGetReportInstances: 200 of 200
  ConcurrentSyncReportRuns: 20 of 20
  DailyAnalyticsDataflowJobExecutions: 40 of 40
  DailyApiRequests: 14419 of 15000
  ...

  $ sfdx wry:org:limits -u myScratchOrg@example.com -l MassEmail,DailyApiRequests,SingleEmail
  MassEmail: 10 of 10
  DailyApiRequests: 14408 of 15000
  SingleEmail: 15 of 15

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

Current Tags

  • 0.0.9                                ...           latest (a year ago)

9 Versions

  • 0.0.9                                ...           a year ago
  • 0.0.8                                ...           a year ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |