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

@springtree/eva-cli

v1.27.2

Published

This command line tool will be used to switch environments within eva cli projects.

Downloads

1,443

Readme

eva-cli Build Status

This command line tool will be used to switch environments within eva cli projects.

Installation

Te begin using the eva-cli you can either install it globally or on project level:

Globally

npm install -g @springtree/eva-cli

Which can be invoked like so

eva

On project level

npm install @springtree/eva-cli

Which can be invoked like so

npx eva

Known Issues

Windows

On Windows you can encounter the following error while trying to execute eva-cli:

ps1 cannot be loaded because running scripts is disabled on this machine

See here for a step-by-step guide to change the Execution Policy.

More information is available on the Microsoft Windows PowerShell documentation on excution policies

Getting started

To use this tool, you will need to setup authentication with github tokens first.

  1. Have access to the SpringTree Solutions organization on github
  2. Create a github personal access token for the eva-cli to confirm you have access. The token will require the read:org and read:user scopes, see github creating a personal token guide for more information here
  3. Once you have the token, store it using the set-token command like so
eva set-token --token=TOKEN_HERE

If you ever need to verify if your token is still valid you can use the verify-token command like so.

eva verify-token

You can now use the tool in any eva cli project, which require a eva-cli.json in root of the project. Which looks like so, every key in this object is explained in the eva-cli section down below.

{
    "version": 1,
    "assets": {
        "appIcon": "src/assets",
        "appLogo": "src/assets",
        "appSplashScreen": "src/assets",
        "appSplashScreenGif": "src/assets",
        "colors": "src/theme",
        "eva-config": "src/assets/env"
    },
    "framework": "ionic",
    "projectName": "eva-companion-app"
}

Usage

Once the eva-cli.json is configured correctly, and you are authenticated successfully you can use this tool by running the switch command.

eva switch

This will let you choose interactively choose a customer and target.

CI setup

For CI, you won't be calling set-token but the switch:ci command with same flags as the regular switch command. For authentication it will either look at the EVA_SWITCH_TOKEN environment variable or you can pass the token as a flag like so.

eva switch:ci --token=TOKEN_HERE

eva-cli.json file

The eva-cli.json file holds the configuration which the eva-cli will look at once executed, it will help the tool determine which project its being used in and which assets to fetch.

'assets' key

The assets object key will represent any project's assets defined in on the customer manager here. The key will essentially be used as an identefier to find the matching customer project asset which will be uploaded on the customer manager as well under https://eva-customer-manager.firebaseapp.com/customers/details/:customerId/:projectId The value of any key under assets will be the path where you would like to copy the uploaded asset. The copied file name will be equal to the asset id regardless of the original uploaded file name.

'eva-config' Asset key

The eva-config key here is a special one, as its a preserved key for the selected target which gets written under the file name eva-config.json

'framework' key

The framework key can be any of the values of 'ionic' | 'angular' | 'flutter' | 'react' | 'xcode' to help collect usage data and have framework specific behavior in the future.

'projectName' key

the projectName needs to be an existing project under projects in the customer manager. It will be used by the eva-cli to show you relevant customers for this project.

'postSwitchScriptPath' key

The postSwitchScriptPath needs to be a relative path of an executable script which will be executed once the switch mechanism is finished. This script will be passed the eva-cli.json as argument.

Commands

These are the possible commands in a nutshell as outlined here above.

Usage: eva [options] [command]

Commands:
  set-token [options] [args]     Sets the github personal access token
  switch:ci [options] [args]     Switches environment, to be used in a CI environment
  switch                         Switch eva environment interactively
  verify-token [options] [args]  Verifies the currently saved token or the passed token is valid