1.1.3 ā€¢ Published 5 years ago

@siddhanthm/koa v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Koa is a swiss army knife for Salesforce CPQ engineering tasks from the Terminal to improve engineering productivity. The goal is to reduce toil and manual clicking work in the GUI that slows down actual work.

Getting Started

Prerequisites

Disclaimer: Koa works best on macOS and Linux.

  • Unix-like operating system (macOS or Linux)
  • git should be installed
  • python should be installed

Basic Installation

koa is installed by running the following commands in your terminal.

npm install -g @siddhanthm/koa

Using Koa

koa briki

Open the salesforce cpq briki

$ koa briki

koa build

Builds and transpiles the Javascript client-side code with Gulp.js.

$ koa build
Running gulp build...

Run this command with -f to fix node and bower dependecy issues automatically. This is helpful if you get ERROR: Path is undefined errors when pushing to scratch orgs.

$ koa build -f
Installing bower dependencies...
Installing npm dependencies...
Running gulp build...

koa clean

Cleans all the merged github branches and expired sfdx orgs

$ koa clean

koa connect

Connects a TeamCity-created scratch org to local SFDX environment, allowing changes to be pushed to those orgs.

$ koa connect

koa console

Koa contains an APEX console that reads each line one at a time and then executes all lines when run or print is entered. To start the console, run:

From there APEX commands run them on your scratch org. SOQL commands that start with a "[" will get executed immediately.

[511] > [SELECT Id FROM Product2]
(Product2:{Id=01t19000004ceAgAAI}, Product2:{Id=01t19000004ceAhAAI}, Product2:{Id=01t19000004ceAiAAI}, Product2:{Id=01t19000004ceAjAAI}, Product2:{Id=01t19000004ceAkAAI}, Product2:{Id=01t19000004ceAlAAI}, Product2:{Id=01t19000004ceAmAAI}, Product2:{Id=01t19000004ceAnAAI}, Product2:{Id=01t19000004ceAoAAI}, Product2:{Id=01t19000004ceApAAI}, ...)
[511] > List<Product2> products = new List<Product2>();
[511] > products.add(new Product2(Name='Nick'));
[511] > print(products);
(Product2:{Name=Nick})
[511] >

koa delete

Delete a local scratch org.

koa display

Display information about a scratch org.

koa log

Tail live logs for a scratch org. These logs only show SOQL queries and user debug statements, filtering out a lot of junk logs provided by sfdx.

koa open

Opens a given scratch org and logs in.

koa org

Create a scratch org off the current branch, push default CPQ configurations and data.

koa orgs

To see all local scratch orgs, run:

$ koa orgs

koa package

Generates a SFDX package and package version.

$ koa package

koa push

Pushes local changes to given scratch org.

koa revive

Automatically create a scratch org from any version of CPQ with a version number or git SHA. This can be useful if you need to reproduce an issue in a v26 scratch org for instance.

To revive an old CPQ version, navigate outside your CPQ repo into another folder you'd like to clone an older version of CPQ. Then run:

$ koa revive 
23.0.20         25.0.9          27.0            208.1           212.0           216.10.1
23.0.23         25.0.10         27.0.1          208.1.1         212.1           216.10.2
23.0.24         25.0.11         27.0.3          208.2           212.2           216.10.3
23.0.25         25.0.12         27.0.4          208.3           212.3           216.10.4
23.0.26         25.0.13         27.0.5          208.4           212.4           218.1.0
23.1            25.0.14         27.0.7          208.5           212.5           218.2.0
23.1.1          25.0.15         27.0.7.1        208.6           212.6           218.3.0
23.2.1          25.0.16         27.0.7.2        208.6.1         212.8           218.5.0
23.2.3          25.0.19         27.0.14         208.6.2         212.9           218.6.0
23.4.1          25.0.20         27.0.15         208.7           212.10          218.7.0
23.5            25.1            27.0.16         208.8           212.11          218.8.0
Which version would you like to revive from? 27.0
Checking out git SHA (877deea76a891d64f782cc7f18fea788af138b84)...
...

To revive from a specific git SHA commit, run:

koa run

Run APEX scripts on a scratch org.

koa service-cloud

Create a CPQ Service Cloud scratch org.

koa set-default

Sets the scratch-org-name as the default scratch org

koa sfm

Automatically clicks the SFM tile in Aloha for you.

koa test

Run APEX tests. Provide either the test class name or additionally specify the exact test methods to run as well in a comma-separated list.

koa trustmaster

Spins up multiple scratch orgs at the same time in various CPQ versions, allowing you to QA bugs in different CPQ versions as a Trustmaster.

koa user

Creates a new user for a given scratch org.

koa userinfo

Displays user information for a given user.

koa users

Displays all the users for a given scratch org.

koa web-test

Automatically setup and run the Selenium web test environment with the following command:

koa web-test

Specific tests can be run with:

Updates

TODO: Koa will automatically update itself every few weeks. If you'd like to upgrade at any point in time you just need to run:

koa upgrade

Magic! šŸŽ‰

Contributions

I'm far from being a CPQ expert and suspect there are many ways to improve ā€“ if you have ideas on how to make the tool easier to maintain (and faster), don't hesitate to fork and send pull requests!

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago