0.1.7 • Published 3 years ago
@retgits/akkasls-nodewrapper v0.1.7
Akka Serverless CLI - Node Wrapper
A NodeJS wrapper for the Akka Serverless CLI
Illustration by Freepik Stories
Getting started
Prerequisites
The Akka Serverless CLI - Node Wrapper requires the akkasls
command line tool.
Install
npm install --save @retgits/akkasls-nodewrapper
Usage examples
// List all projects
import { listProjects } from '@retgits/akkasls-nodewrapper';
(async () => {
const res = await listProjects({dryrun: false, silent: true});
console.log(res.stdout);
})();
Returns
Each command returns a promise of a ShellResult
object that contains:
code
: The result code from the command (usually 0 when a command completes successfully);stdout
: The result from the command that was printed to the standard output;stderr
: The result from the command that was printed to the standard error;response
: An optional element that contains the parsed result object (CurrentLogin | Token[] | Credential[] | Project[] | Invite[] | Member[] | Service[]
)
CommandInput
Each command accepts a CommandInput
object as parameter together with the inputs needed to perform the command. The CommandInput
object gives you the ability to specify additional configuration:
dryrun
: boolean, returns the command to be executed asstdout
if set to true (default isfalse
)silent
: boolean, prints no command output to stdout or stderr if set to false (default isfalse
)context
: string, configuration context to use (default is no value)configFile
: string, location of config file
Available commands
currentLogin
: Get details for the current logged in userlistAuthTokens
: List all server managed Akka Serverless tokenslogin
: Login to Akka Serverlesslogout
: Logout the current userrevokeAuthToken
: Revoke an Akka Serverless tokenaddDockerCredentials
: Add docker credentials to a projectdeleteDockerCredentials
: Delete docker credentials for given IDlistDockerCredentials
: List all docker credentialslistProjects
: List all projectsnewProject
: Create a new projectdeleteInvite
: Delete an invitation from a projectaddInvite
: Invite a user to a projectlistInvites
: List invitations to a projectlistMembers
: List all project membersdeployService
: Deploy a serviceexposeService
: Expose a servicegetService
: Describe a specific service.listService
: List all services.undeployService
: Undeploy a serviceunexposeService
: Unexpose a service
Release notes
See the changelog
License
See the LICENSE