sfdx-mohanc-plugins
SFDX plugins by Mohan Chinnappan
Last updated 6 months ago by mohanchinnappann2 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sfdx-mohanc-plugins 
SYNC missed versions from official npm registry.

sfdx-mohanc-plugins

SFDX plugins by Mohan Chinnappan

Version CircleCI Appveyor CI Codecov Greenkeeper Known Vulnerabilities Downloads/week License

$ npm install -g sfdx-mohanc-plugins
$ sfdx-mohanc-plugins COMMAND
running command...
$ sfdx-mohanc-plugins (-v|--version|version)
sfdx-mohanc-plugins/0.0.43 darwin-x64 node-v8.9.1
$ sfdx-mohanc-plugins --help [COMMAND]
USAGE
  $ sfdx-mohanc-plugins COMMAND
...

sfdx-mohanc-plugins mohanc:data:jq

Runs jq filter on the given JSON input file

USAGE
  $ sfdx-mohanc-plugins mohanc:data:jq

OPTIONS
  -f, --filter=filter                             jq filter  to apply
  -i, --inputfilename=inputfilename               Data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename             Output data file  (JSON) you want transformed output to go to
  --json                                          format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLE

       ** Runs jq filter on the given JSON input file **

       sfdx mohanc:data:jq -i /tmp/Accounts.json -f '.records[0]' -o /tmp/Accounts.out.json

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:jq  -i $file -o $file.out.json -f '.records[0]'
       done
       -----------

See code: src/commands/mohanc/data/jq.ts

sfdx-mohanc-plugins mohanc:data:loader [FILE]

Loads Data into the given sObject

USAGE
  $ sfdx-mohanc-plugins mohanc:data:loader [FILE]

OPTIONS
  -d, --datafile=datafile                          data input file in JSON format you want to do the data loading. CSV
                                                   file switch the mode to batch

  -l, --loginfile=loginfile                        Sandbox or Production or DE login credentials json file , 'none'
                                                   value will select the scratch-org

  -m, --mode=mode                                  batch or non-batch mode: batch|non-batch

  -n, --sobjectname=sobjectname                    name of sObject

  -o, --orgname=orgname                            Org name to login into

  -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

EXAMPLE

       ** Loads Data into the given sObject **

       sfdx mohanc:data:loader -u  mohan.chinnappan.n-hhet@force.com -d harvest_field.csv -n Harvest_Field__c -m batch

       PriceBook2:
        load: sfdx mohanc:data:loader -u TestOrg2 -d Pricebook2s.json  -n 'PriceBook2'
        query: sfdx force:data:soql:query -q 'Select Id, Name FROM PriceBook2' -u TestOrg2

       Product:
        load:  sfdx mohanc:data:loader -u TestOrg2 -d Product2s.json  -n 'Product2' -m batch
        query: sfdx force:data:soql:query -q 'Select id,Name,Description,ProductCode,isDeleted FROM Product2' -u 
  TestOrg1

See code: src/commands/mohanc/data/loader.ts

sfdx-mohanc-plugins mohanc:data:query

Execute SOQL Query

USAGE
  $ sfdx-mohanc-plugins mohanc:data:query

OPTIONS
  -f, --outputformat=outputformat                  Query results output format csv|json
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File
  -q, --queryfilename=queryfilename                Input file having SOQL query
  -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

EXAMPLE


       ** Execute SOQL Query **

         Scratch org query
           sfdx mohanc:data:query -q account.sql  -f csv

         Sandbox/DE org: org40 query
           sfdx mohanc:data:query -q account.sql  -l login.json  -o org40

See code: src/commands/mohanc/data/query.ts

sfdx-mohanc-plugins mohanc:data:transform:acct

Transforms the AccountId of the extracted json to target org AccountId

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:acct

OPTIONS
  -i, --inputfilename=inputfilename                Data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename              Output data file  (JSON) you want transformed output to go to
  -s, --simple=simple                              Need simple format (y|n)
  -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

EXAMPLE

        ** Transforms the AccountId of the extracted json to target org AccountId **

        sfdx mohanc:data:transform:acct -i /tmp/input.json -o /tmp/input.out.json -s y|n

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:acct -i $file -o $file.out.json -s y|n
       done
       -----------

See code: src/commands/mohanc/data/transform/acct.ts

sfdx-mohanc-plugins mohanc:data:transform:contact

Transforms the ContactId of the extracted json to target org ContactId

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:contact

OPTIONS
  -i, --inputfilename=inputfilename                Data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename              Output data file  (JSON) you want transformed output to go to
  -s, --simple=simple                              Need simple format (y|n)
  -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

EXAMPLE

        ** Transforms the ContactId of the extracted json to target org ContactId **

        sfdx mohanc:data:transform:contact -i /tmp/input.json -o /tmp/input.out.json -s y|n

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:contact -i $file -o $file.out.json -s y|n
       done
       -----------

See code: src/commands/mohanc/data/transform/contact.ts

sfdx-mohanc-plugins mohanc:data:transform:csv

Runs jq filter on the given JSON input file

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:csv

OPTIONS
  -f, --filter=filter                             jq filter  to apply
  -i, --inputfilename=inputfilename               Data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename             Output data file  (JSON) you want transformed output to go to
  --json                                          format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLE

       ** Runs jq filter on the given JSON input file **

       sfdx mohanc:data:jq -i /tmp/Accounts.json -f '.records[0]' -o /tmp/Accounts.out.json

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:jq  -i $file -o $file.out.json -f '.records[0]'
       done
       -----------

See code: src/commands/mohanc/data/transform/csv.ts

sfdx-mohanc-plugins mohanc:data:transform:profile

Transforms the ProfileName of the extracted json to target org ProfileId

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:profile

OPTIONS
  -i, --inputfilename=inputfilename                data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename              output data file  (JSON) you want transformed output to go to
  -s, --simple=simple                              Need simple format (y|n)
  -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

EXAMPLE

       ** Transforms the ProfileName of the extracted json to target org ProfileId **

       sfdx mohanc:data:transform:profile -i /tmp/input.json -o /tmp/output.json -s n

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:profile -i $file -o $file.out.json -s y|n
       done
       -----------

See code: src/commands/mohanc/data/transform/profile.ts

sfdx-mohanc-plugins mohanc:data:transform:rt

Transforms the RecordTypeIds of the extracted json to target org RecordTypeIds

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:rt

OPTIONS
  -e, --sobjectname=sobjectname                    Object to simplify
  -i, --inputfilename=inputfilename                data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename              output data file  (JSON) you want transformed output to go to
  -s, --simple=simple                              Need simple format (y|n)
  -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

EXAMPLE

       ** Transforms the RecordTypeIds of the extracted json to target org RecordTypeIds **

       sfdx mohanc:data:transform:rt -i /tmp/Accounts.json -o /tmp/Accounts.out.json -s n -e <sobjectName>

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:rt -i $file -o $file.out.json -s y|n -e Account
       done
       -----------

See code: src/commands/mohanc/data/transform/rt.ts

sfdx-mohanc-plugins mohanc:data:transform:simplify

Transforms the given object into simple key:value format

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:simplify

OPTIONS
  -a, --aliasname=aliasname                        Alias name for the object
  -e, --sobjectname=sobjectname                    Object to simplify
  -i, --inputfilename=inputfilename                Data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename              Output data file  (JSON) you want transformed output to go to
  -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

EXAMPLE

        ** Transforms the given object into simple key:value format **

        sfdx mohanc:data:transform:simplify -i /tmp/input.json -o /tmp/input.out.json -e sobjectName -a aliasName

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:simplify -i $file -o $file.out.json -e sobjectName -a aliasName
       done
       -----------

See code: src/commands/mohanc/data/transform/simplify.ts

sfdx-mohanc-plugins mohanc:data:transform:un

Transforms the given Usernames to unique Usernames

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:un

OPTIONS
  -i, --inputfilename=inputfilename               data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename             output data file  (JSON) you want transformed output to go to
  --json                                          format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLE

        ** Transforms the given Usernames to unique Usernames **

       sfdx mohanc:data:transform:un -i /tmp/input.json -o /tmp/input.out.json

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:un -i $file -o $file.out.json
       done
       -----------

See code: src/commands/mohanc/data/transform/un.ts

sfdx-mohanc-plugins mohanc:data:transform:ur

Transforms the UserRoleIds of the extracted json to target org UserRoleIds

USAGE
  $ sfdx-mohanc-plugins mohanc:data:transform:ur

OPTIONS
  -i, --inputfilename=inputfilename                data file in JSON format you want to do the transformation
  -o, --outputfilename=outputfilename              output data file  (JSON) you want transformed output to go to
  -s, --simple=simple                              Need simple format (y|n)
  -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

EXAMPLE

       ** Transforms the UserRoleIds of the extracted json to target org UserRoleIds **

       sfdx mohanc:data:transform:ur -i /tmp/input.json -o /tmp/input.out.json -s y|n

       bash script to process all the files in a folder:
       ------------
       for file in /tmp/*
       do
           echo Processing "$file" ...
           sfdx mohanc:data:transform:ur -i $file -o $file.out.json -s y|n
       done
       -----------

See code: src/commands/mohanc/data/transform/ur.ts

sfdx-mohanc-plugins mohanc:data:tx

Runs data transformation on the given csv/psv input file

USAGE
  $ sfdx-mohanc-plugins mohanc:data:tx

OPTIONS
  -d, --delim=delim                               Field Delimiter (, or | )
  -i, --inputfilename=inputfilename               Data file in csv/psv format you want to do the transformation
  -t, --txfilename=txfilename                     data transformation file in JSON format to apply
  --json                                          format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLE

       ** Runs data transformation on the given csv/psv input file **

       sfdx mohanc:data:tx -i /tmp/input.psv  -t /tmp/tx.json  -d  '|'

See code: src/commands/mohanc/data/tx.ts

sfdx-mohanc-plugins mohanc:data:vlookup

Runs VLookup on the given map and input files

USAGE
  $ sfdx-mohanc-plugins mohanc:data:vlookup

OPTIONS
  -d, --delim=delim                               Field Delimiter

  -f, --mapfrom=mapfrom                           Number for field for Map From ( e.g 'Fruit|1' record, Map From is 0
                                                  and Map is 1 )

  -i, --inputfilename=inputfilename               Input Data file you want to do the vlookup

  -m, --mapfilename=mapfilename                   Map data file  you want use to read the mapping

  -t, --mapto=mapto                               Number for field for Map From ( e.g 'Fruit|1' record, Map From is 0
                                                  and Map is 1 )

  --json                                          format output as json

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

EXAMPLE

       ** Runs VLookup on the given map and input files **

       sfdx mohanc:data:vlookup -m /tmp/cats.psv  -i /tmp/items.psv -d '|'

See code: src/commands/mohanc/data/vlookup.ts

sfdx-mohanc-plugins mohanc:ea:query

Query a EA

USAGE
  $ sfdx-mohanc-plugins mohanc:ea:query

OPTIONS
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File

  -r, --resource=resource                          EA resource :
                                                   dashboards|dataConnectors|dataConnectorsTypes|dataflowJobs|datasets|f
                                                   olders|lenses|recipes|templates|trendedreports

  -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

EXAMPLE
 
         sfdx force:auth:web:login -r https://login.salesforce.com
         $ sfdx force:org:list
         === Orgs
        ALIAS     USERNAME                            ORG ID              CONNECTED STATUS
                  mohan.chinnappan.n_ea@gmail.com     00D1N000001Tjk2UAC  Connected

         sfdx mohanc:ea:query  -u  mohan.chinnappan.n_ea@gmail.com    -r dashboards > dashboards.json

         resources:
         1. dashboards
         2. dataConnectorTypes
         3. dataConnectors
         4. dataflowjobs
         5. folders
         6. lenses
         7. query
         8. recipes
         9. templates
         10. trendedreports

See code: src/commands/mohanc/ea/query.ts

sfdx-mohanc-plugins mohanc:hello:org [FILE]

Prints a greeting and your org id(s)!

USAGE
  $ sfdx-mohanc-plugins mohanc: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/mohanc/hello/org.ts

sfdx-mohanc-plugins mohanc:md:describe

Describe SObject

USAGE
  $ sfdx-mohanc-plugins mohanc:md:describe

OPTIONS
  -e, --erdfilename=erdfilename                    ERD output filename
  -i, --sobjectlistfilename=sobjectlistfilename    SObjects (comma separated) file name
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File
  -s, --sobjectnames=sobjectnames                  SObjects  (comma separated) for which we need Describe
  -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

EXAMPLE

      ## for scratch-org:
      sfdx mohanc:md:describe -s RecordType
      # For Sandbox/DE/PROD: Establish connection with:
      #   In case of sandbox  use :    sfdx force:auth:web:login -r https://test.salesforce.com
      #   In case of  PROD or DE use : sfdx force:auth:web:login -r https://login.salesforce.com
   
      ## for DE or sandbox or PROD, when you do not want to use OAUTH2:
      # Sample login.json :https://mohan-chinnappan-n.github.io/dx/samples/login-sample.json
      # sfdx mohanc:md:describe -s RecordType -l login.json -o org40
   
      ## ---- For full org metadata export: scratch org ----
      sfdx mohanc:md:describeGlobal   > ObjectList.txt
      sfdx mohanc:md:describe  -i ObjectList.txt
      ## For full org metadata export: sandbox/DE/PROD org
      sfdx mohanc:md:describeGlobal -u username   > ObjectList.txt
      sfdx mohanc:md:describe -u username -i ObjectList.txt > org-md.csv

      #-----------------------------------------------------------------------
      ## ---- how to draw ER Diagram for the given SObjects along with model export for them ----
      ## SObjects list is comma-separated as shown below:
      ### If you have dot program installed in your OS, ERD will be drawn in svg format :
      sfdx mohanc:md:describe -s Contact,Account -e contact-account.svg > contact-account.csv

      ### for Sandbox/DE/PROD
      sfdx mohanc:md:describe  -u USERNAME -s Contact,Account -e contact-account.svg > contact-account.csv

      ### If you do NOT have dot program installed in your OS, ERD will be drawn in dot format :
      sfdx mohanc:md:describe -s Contact,Account -e contact-account.dot > contact-account.csv
      ### You can use our online dot-viewer: https://mohan-chinnappan-n.github.io/viz/viz.html  to view the model

See code: src/commands/mohanc/md/describe.ts

sfdx-mohanc-plugins mohanc:md:describeGlobal

Describe Global

USAGE
  $ sfdx-mohanc-plugins mohanc:md:describeGlobal

OPTIONS
  -f, --outputformat=outputformat                  Query results output format
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File
  -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

EXAMPLE
 
         # Scratch org query
         sfdx mohanc:md:describeGlobal   > ObjectList.txt

         // sandbox org: org40
         sfdx mohanc:md:describeGlobal  -l login.json  -o org40 > ObjectList.txt

See code: src/commands/mohanc/md/describeGlobal.ts

sfdx-mohanc-plugins mohanc:md:rename

Rename metadata

USAGE
  $ sfdx-mohanc-plugins mohanc:md:rename

OPTIONS
  -r, --renamefile=renamefile                     Rename input json file
  -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

EXAMPLE

            Renames the given metadata type as given in the input file
            sfdx mohanc:md:rename -r update.json

            $ cat update.json | jq
               {
               "updates": [
                   {
                   "mdtype": "CustomField",
                   "fullName": "Account.Hot_Status__c",
                   "label": "HOT STAT",
                   "type": "Text",
                   "length": 12
                   }
               ]
               }

See code: src/commands/mohanc/md/rename.ts

sfdx-mohanc-plugins mohanc:projectFile:gen

Create project json file to provide sequencing of source:push

USAGE
  $ sfdx-mohanc-plugins mohanc:projectFile:gen

OPTIONS
  -p, --projectfile=projectfile                   project file
  --json                                          format output as json
  --loglevel=(trace|debug|info|warn|error|fatal)  logging level for this command invocation

EXAMPLE

  ** Creates project json files for the given sfdx-project.json
  ** Creates deploy.sh to run the source:push in sequence

  sfdx mohanc:projectFile:gen -p ./sfdx-project.json
  ----------------------------------------------------
  projectFile: ./sfdx-project.json
  { packageDirectories: 
      [ { path: 'force-app/schema', default: true },
        { path: 'force-app/bl' },
        { path: 'force-app/ui' },
        { path: 'force-app/perms' } ],
     namespace: '',
     sfdcLoginUrl: 'https://login.salesforce.com',
     sourceApiVersion: '42.0' }
  Number of project files: 4 
  Creating project file: ./sfdx-project.json.0.json...
  Creating project file: ./sfdx-project.json.1.json...
  Creating project file: ./sfdx-project.json.2.json...
  Creating project file: ./sfdx-project.json.3.json...
  Writing deploy.sh script file...
  ~/sfdx/test:
  $ sfdx mohanc:projectFile:gen -p ./sfdx-project.json
  projectFile: ./sfdx-project.json
  ----------------------------------------------------
  { packageDirectories:
      [ { path: 'force-app/schema', default: true },
        { path: 'force-app/bl' },
        { path: 'force-app/ui' },
        { path: 'force-app/perms' } ],
     namespace: '',
     sfdcLoginUrl: 'https://login.salesforce.com',
     sourceApiVersion: '42.0' }
  Number of project files: 4 
  Creating project file: ./sfdx-project.json.0.json...
  Creating project file: ./sfdx-project.json.1.json...
  Creating project file: ./sfdx-project.json.2.json...
  Creating project file: ./sfdx-project.json.3.json...
  Writing deploy.sh script file...
  ----------------------------------------------------
  ** NEXT STEPS **
  ** View the script: deploy.sh: cat deploy.sh
  ** Run bash    deploy.sh -u targetusername in the bash shell to do the source:push **
  ** Run bash -x deploy.sh -u targetusername in the bash shell to do the source:push in verbose mode **

See code: src/commands/mohanc/projectFile/gen.ts

sfdx-mohanc-plugins mohanc:tooling:crud

Tooling API CRUD

USAGE
  $ sfdx-mohanc-plugins mohanc:tooling:crud

OPTIONS
  -a, --objcontentfilename=objcontentfilename      Object Content File Name
  -l, --aurabundlelabel=aurabundlelabel            Lightning Aura Bundle Label
  -m, --method=method                              CRUD method
  -o, --toolingobj=toolingobj                      Tooling SObject Name: ApexClass | COMPONENT | APPLICATION
  -t, --auratype=auratype                          Aura Type: COMPONENT | APPLICATION
  -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

EXAMPLE

       $ sfdx  mohanc:tooling:crud -u TestOrg2 -o ApexClass -m create

See code: src/commands/mohanc/tooling/crud.ts

sfdx-mohanc-plugins mohanc:tooling:describe

Describe Tooling Object

USAGE
  $ sfdx-mohanc-plugins mohanc:tooling:describe

OPTIONS
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File
  -s, --sobjectname=sobjectname                    Tooling Object to Describe
  -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

EXAMPLE
 
         # Scratch org query
         sfdx mohanc:tooling:describe  -s

See code: src/commands/mohanc/tooling/describe.ts

sfdx-mohanc-plugins mohanc:tooling:describeGlobal

Describe Global

USAGE
  $ sfdx-mohanc-plugins mohanc:tooling:describeGlobal

OPTIONS
  -f, --outputformat=outputformat                  Query results output format
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File
  -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

EXAMPLE
 
         # Scratch org query
         sfdx mohanc:tooling:describeGlobal   > ObjectList.txt

         // sandbox org: org40
         sfdx mohanc:tooling:describeGlobal  -l login.json  -o org40 > ObjectList.txt

See code: src/commands/mohanc/tooling/describeGlobal.ts

sfdx-mohanc-plugins mohanc:tooling:execute

Execute Anonymous Apex

USAGE
  $ sfdx-mohanc-plugins mohanc:tooling:execute

OPTIONS
  -a, --apexcodefilename=apexcodefilename          Apex Code Input File Name
  -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

EXAMPLE


     ** Execute Anonymous Apex **
  
     $ sfdx  mohanc:tooling:execute -u TestOrg2 -a apexCode.cls

See code: src/commands/mohanc/tooling/execute.ts

sfdx-mohanc-plugins mohanc:tooling:lightning:create

Tooling API CRUD

USAGE
  $ sfdx-mohanc-plugins mohanc:tooling:lightning:create

OPTIONS
  -f, --folder=folder                              Folder to write bundle files
  -k, --kind=kind                                  COMPONENT or APPLICATION or EVENT
  -l, --aurabundlelabel=aurabundlelabel            Lightning Aura Bundle Label
  -t, --template=template                          Component bundle template: helloWord|farmers
  -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

EXAMPLE

       $ sfdx  mohanc:tooling:lightning:create -l greeter  -k COMPONENT|APPLICATION|EVENT -t helloWorld|farmers

See code: src/commands/mohanc/tooling/lightning/create.ts

sfdx-mohanc-plugins mohanc:tooling:query

Query Tooling Object

USAGE
  $ sfdx-mohanc-plugins mohanc:tooling:query

OPTIONS
  -f, --outputformat=outputformat                  Query results output format csv|json
  -l, --loginfilename=loginfilename                Name of file containing login credentials
  -o, --orgname=orgname                            Org name in the Login File
  -q, --queryfilename=queryfilename                Input file having SOQL query
  -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

EXAMPLE


       ** Query Tooling Object **

         Scratch org query
           sfdx mohanc:tooling:query -q LookupFilter.sql  -f csv

See code: src/commands/mohanc/tooling/query.ts

Debugging your plugin

We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the .vscode directory of this plugin is a launch.json config file, which allows you to attach a debugger to the node process when running your commands.

To debug the hello:org command:

  1. Start the inspector

If you linked your plugin to the sfdx cli, call your command with the dev-suspend switch:

$ sfdx hello:org -u myOrg@example.com --dev-suspend

Alternatively, to call your command using the bin/run script, set the NODE_OPTIONS environment variable to --inspect-brk when starting the debugger:

$ NODE_OPTIONS=--inspect-brk bin/run hello:org -u myOrg@example.com
  1. Set some breakpoints in your command code
  2. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view.
  3. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen.
  4. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program.
  5. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5).

    Congrats, you are debugging!

Current Tags

  • 0.0.43                                ...           latest (6 months ago)

38 Versions

  • 0.0.43                                ...           6 months ago
  • 0.0.40                                ...           7 months ago
  • 0.0.39                                ...           7 months ago
  • 0.0.38                                ...           8 months ago
  • 0.0.37                                ...           8 months ago
  • 0.0.35                                ...           8 months ago
  • 0.0.34                                ...           9 months ago
  • 0.0.33                                ...           9 months ago
  • 0.0.32                                ...           9 months ago
  • 0.0.31                                ...           9 months ago
  • 0.0.30                                ...           9 months ago
  • 0.0.29                                ...           9 months ago
  • 0.0.28                                ...           9 months ago
  • 0.0.27                                ...           9 months ago
  • 0.0.26                                ...           9 months ago
  • 0.0.25                                ...           9 months ago
  • 0.0.24                                ...           9 months ago
  • 0.0.23                                ...           10 months ago
  • 0.0.22                                ...           10 months ago
  • 0.0.21                                ...           10 months ago
  • 0.0.20                                ...           10 months ago
  • 0.0.19                                ...           10 months ago
  • 0.0.18                                ...           10 months ago
  • 0.0.17                                ...           10 months ago
  • 0.0.16                                ...           10 months ago
  • 0.0.15                                ...           10 months ago
  • 0.0.14                                ...           10 months ago
  • 0.0.12                                ...           10 months ago
  • 0.0.10                                ...           10 months ago
  • 0.0.9                                ...           10 months ago
  • 0.0.8                                ...           10 months ago
  • 0.0.7                                ...           10 months ago
  • 0.0.6                                ...           10 months ago
  • 0.0.5                                ...           10 months ago
  • 0.0.4                                ...           10 months ago
  • 0.0.3                                ...           10 months ago
  • 0.0.2                                ...           10 months ago
  • 0.0.1                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |