Flowcore CLI configuration plugin
npm install @flowcore/cli-plugin-configFlowcore CLI Plugin - Config
=================
A plugin for the flowcore cli to configure the cli



sh-session
$ 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 valuescreateDefaultConfig: a function that creates a default configuration objectloadConfig: a function that loads the configuration from the file systemgetObjectPaths: a function that returns all the paths in an objectLOGIN_CODES: an enum that contains the possible login codesUserInfo: a type that represents the user informationValidateLogin: a function that validates the login responseBaseCommand: a base class that can be used to access the configurationBaseFlags: a type that can be used to access the base flagsBaseArgs: a type that can be used to access the base argsto use this plugin in your plugin, you can add it as a dependency in your package.json file:
``sh-session`
$ npm install @flowcore/cli-plugin-config
or if you are using yarn:
`sh-session`
$ yarn add @flowcore/cli-plugin-config
and then just extend the BaseCommand class in your command:
`typescript
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
}
}
`
Configure the cli
`
USAGE
$ conf config set [--profile
FLAGS
-b, --baseUrl=
-c, --clientId=
-l, --loginUrl=
-n, --clientSecret=
-p, --port prompt for port to listen for the callback
-u, --url=
--profile=
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_
Show the configured login url
`
USAGE
$ conf config show [--profile
FLAGS
--profile=
DESCRIPTION
Show the configured login url
EXAMPLES
$ conf config show
`
_See code: src/commands/config/show.ts_
login to the Flowcore Platform
`
USAGE
$ conf login [--profile
FLAGS
-p, --port=
--profile=
DESCRIPTION
login to the Flowcore Platform
EXAMPLES
$ conf login
$ conf login --port 8080
`
_See code: src/commands/login.ts_
Check what user you are logged in as
`
USAGE
$ conf whoami [--profile
FLAGS
--profile=
DESCRIPTION
Check what user you are logged in as
``
_See code: src/commands/whoami.ts_