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

@siddhanthm/koa

v1.1.3

Published

Build Tool for Salesforce CPQ

Downloads

5

Readme

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!