@dishantlangayan/sc-cli-core
v0.5.3
Published
Base library for the Solace Cloud CLI and plugins
Readme
@dishantlangayan/sc-cli-core
Core library for the Solace Cloud CLI
Description
The @dishantlangayan/sc-cli-core provides utilities for the Solace Cloud CLI and it's plugins.
ScCommand Abstract Class
The ScCommand abstract class extends @oclif/core's Command class.
- ScCommand takes a generic type that defines the success JSON result
- Enable the json flag support by default
- Sets the base URL for making Solace Cloud API calls
- Checks if the access token is set for authentication with Solace Cloud APIs
ScConnection Class
The ScConnection class provide abstraction functions for Solace Cloud API REST calls. It handles the access token and base URL for each REST call, avoiding the need to set these on each Command.
OrgManager
The OrgManager class provides utility functions to store and retrieve Solace Cloud authentication information from user's home directory: ~/.sc/ or %USERPROFILE%\sc\. The implementation uses AES-256-GCM for authenticated encryption and provides machine-bound encryption that combines OS-level security (keychain) with machine-specific identifiers, making credentials non-transferable between machines.
Supports changing of the Solace Cloud REST API base url using the environment variable SC_BASE_URL and API version using SC_API_VERSION.
BrokerAuthManager
The BrokerAuthManager class provides utility functions to store and retrieve broker SEMP management authentication information similar to the OrgManager class. It supports Basic and OAuth authentication schemes.
Contributing
Contributions are encouraged! Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Authors
See the list of contributors who participated in this project.
License
See the LICENSE file for details.
