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

@flowcore/cli-plugin-config

v2.4.1

Published

Flowcore CLI configuration plugin

Downloads

1,308

Readme

Flowcore CLI Plugin - Config

A plugin for the flowcore cli to configure the cli

Version oclif Build and Release

Usage

$ npm install -g @flowcore/cli-plugin-config
$ conf COMMAND
running command...
$ conf (--version)
@flowcore/cli-plugin-config/1.0.5 darwin-arm64 node-v18.18.0
$ conf --help [COMMAND]
USAGE
  $ conf COMMAND
...

this plugin exposes these main components that can be added as a dependency to your plugin:

  • CliConfiguration: a configuration service that can be used to store and retrieve configuration values`
  • createDefaultConfig: a function that creates a default configuration object
  • loadConfig: a function that loads the configuration from the file system
  • getObjectPaths: a function that returns all the paths in an object
  • LOGIN_CODES: an enum that contains the possible login codes
  • UserInfo: a type that represents the user information
  • ValidateLogin: a function that validates the login response
  • BaseCommand: a base class that can be used to access the configuration
  • BaseFlags: a type that can be used to access the base flags
  • BaseArgs: a type that can be used to access the base args

to use this plugin in your plugin, you can add it as a dependency in your package.json file:

$ npm install @flowcore/cli-plugin-config

or if you are using yarn:

$ yarn add @flowcore/cli-plugin-config

and then just extend the BaseCommand class in your command:

import { BaseCommand } from '@flowcore/cli-plugin-config'

export default class MyCommand extends BaseCommand {
  async run() {
    const { flags } = this.parse(MyCommand)
    const config = this.cliConfiguration.getConfig();
    // do something with the config
  }
}

Commands

conf config set

Configure the cli

USAGE
  $ conf config set [--profile <value>] [-b <value>] [-c <value>] [-n <value>] [-l <value>] [-p] [-u <value>]

FLAGS
  -b, --baseUrl=<value>       base url to the flowcore platform
  -c, --clientId=<value>      client id to use for the login
  -l, --loginUrl=<value>      url to discover the openid configuration
  -n, --clientSecret=<value>  name to print
  -p, --port                  prompt for port to listen for the callback
  -u, --url=<value>           url to the flowcore platform api
      --profile=<value>       Specify the configuration profile to use

DESCRIPTION
  Configure the cli

EXAMPLES
  $ conf config set -l https://auth.flowcore.io/realms/flowcore/.well-known/openid-configuration -c my-client-id -s my-client-secret

  $ conf config set -u https://graph.api.flowcore.io/graphql

  $ conf config set -l https://auth.flowcore.io/realms/flowcore/.well-known/openid-configuration -c my-client-id -p

See code: src/commands/config/set.ts

conf config show

Show the configured login url

USAGE
  $ conf config show [--profile <value>]

FLAGS
  --profile=<value>  Specify the configuration profile to use

DESCRIPTION
  Show the configured login url

EXAMPLES
  $ conf config show

See code: src/commands/config/show.ts

conf login

login to the Flowcore Platform

USAGE
  $ conf login [--profile <value>] [-p <value>]

FLAGS
  -p, --port=<value>     [default: 3000] port to listen for the callback
      --profile=<value>  Specify the configuration profile to use

DESCRIPTION
  login to the Flowcore Platform

EXAMPLES
  $ conf login

  $ conf login --port 8080

See code: src/commands/login.ts

conf whoami

Check what user you are logged in as

USAGE
  $ conf whoami [--profile <value>]

FLAGS
  --profile=<value>  Specify the configuration profile to use

DESCRIPTION
  Check what user you are logged in as

See code: src/commands/whoami.ts