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

cob-cli

v2.45.0

Published

A command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.

Downloads

233

Readme

COB-CLI: customizing CoB servers

cob-cli is a command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.

Installing cob-cli

npm i -g cob-cli

Available commands

There are 4 main commands. The first, init, is to be run once in the beginning of customization of each server. The three other should be used sequentially serveral times during development (1.customize, 2.test, 3.deploy).

  • cob-cli init <servername> [-l,--legacy <folder>] [-a,--repoaccount <git acount url>]
  • cob-cli customize
  • cob-cli test [-d --dashboard <name>, --localOnly, --servername <servername>]
  • cob-cli deploy [-f,--force, --servername <servername>]

An aditional command is available to get the repo updated with files from server, which shouldn't be necessary unless changes are made directly to the server and outside of the cob-cli process.

  • cob-cli updateFromServer [--servername <servername>]

Finally you can always get this help with:

  • cob-cli help [command]

Where aplicable the --servername <servername> option will alow you to run the command agains a diferent server then the standard production one.


cob-cli init <servername> [-l,--legacy ] [-a,--repoaccount <git acount url>]

This command has two diferent behaviors, depending on the circumstances:

  1. If already exists a repo in https:/gitlab/cob/ (or the specified --repoaccount) for this server just do a git clone of that repo.
  2. Otherwise, creates all the infrastucture to suport the server customization. In this last option, if the --legacy is used, in addition to creating the infrastructure it will try to rebuild the server customization history, existing on the legacy repo (old ClientConfs).

By default a new repo will be created in the cob gitlab account, https://gitlab.com/cob. The --repoaccount option allows the use of a different account.

In adition to setting up the local repository cob-cli init also creates the .git/hooks/commit-msg file. This will make set mandatory the use of conventionalcommits for the commit messages to the project.


cob-cli customize

This is an interactive command. It allows you to browse the diferent customizations possible and select one. Depending on the choice mode additional details might be requested, and so on. Some examples of customizations:

  • General
  • Totals dashboard
  • Kibana dashboard
  • Calculations
  • Customize the color of a state field on search result lists
  • ...

It also helps you manage the correct git workflow and provide help links to relevante trainning of each customization.


cob-cli test [--dashboard , --localOnly, --servername ]

After running the test command you'll enter a livereload state were you can instantly see the effect of the changes being made. To stop this state just press any key.

Many of the changes are serverd locally from the development machine and are not propagated to the production server. These are all files that reside inside the diferent customUI folders.

All other files imply a copy to the server. Each of the files copied to the server has a backup of any pre-existing one. Once the test command ends all copied files are removed and any existing backups are restored.

While in testing you can press o or O to open your default browser with the url for the local tests. You can also use enter to space your logs, if you want.

If you specify a -d <name> the corresponding dashboard will be served from source (instead of built files) and will also provide livereload.

Aditionally you can specify --localOnly if you just want to test frontend configurations without changing other files on server during testing.


cob-cli deploy [-f,--force, --servername ]

This last command alows you to deploy your finished developmentto the server, garanting that there are no conflicts with changes made by other. In adition it promotes the management of adequate and updated documentation.

The --force option allows to bypass the conflict test and deploy the local configuration independently of the existing conditions. It should be used with extreme caution and only to resolve problems not possible to resolve in other ways.

Note: This command might not be available to the whole development team and hence some member might just pre-deploy to git hub and it's up to priveledge member of the this to finalize the deploy process after, typically after review.