The official VsCode extension from Catalyst by Zoho
Features
- Project setup - Initialize a Catalyst project directory.
- Functions creation - Create new Catalyst functions.
- Client Setup - Create new Catalyst web client.
- Local serve - Serve and test the Basic I/O, Advanced I/O and the Web Client locally.
- Deploy - Deploy the local Catalyst resources to Catalyst remote console.
- Pull - Pull resources from Catalyst console (development environment).
- Token operations - Generate, view and revoke the tokens that can authenticate accessing the Catalyst-CLI from a remote system.
Getting around the extension
Here we'll see the parts of the Catalyst Tools extension.
Catalyst explorer view
This view contains the Catalyst resources that are present in the local machine and allows you to perform some actions on them. This view is divided into four sections.
Catalyst Configs: Provides the options to do generalized operations.
Catalyst:
This sections provides the options to perform the following operations.
Functions Add
& Client Setup
- Resource initialization
Serve
- Serve resources in local machine.
Deploy
- Deploy resources to Catalyst Console (development environment)
Project
- To Open the Catalyst Project view.
APIG:
This section provides the options to perform certain operation on the API Gateway implementation in your local machine.
Deploy
- Deploy APIG rules to Catalyst console development environment.
Status
- To enable or disable the APIG rules in local.
HTTP functions: Provides the options to perform certain operations on HTTP based functions. This includes Basic I/O and Advanced I/O functions. This section contains all valid HTTP functions and options to perform the operations on them which includes
Run/Debug
- To run or debug the function.
Deploy
- Deploy the specific function to Catalyst Console.
Delete
- Delete the specific function from your local machine.
NON HTTP functions: Provides the options to perform certain operations on NON HTTP based functions. This includes Event, Cron and Integration functions. This section contains all valid NON HTTP functions and options to perform the operations on them which includes
Run/Debug
- To run or debug the function (needs catalyst-inputs.json
)
Deploy
- Deploy the specific function to Catalyst Console.
Delete
- Delete the specific function from your local machine.
Client: Provides the options to perform certain operations on Catalyst Web Client. The options includes.
Serve
- To serve the Catalyst Web Client in local.
Deploy
- Deploy the Catalyst Web Client to Catalyst Console.
Delete
- Delete the Catalyst Web Client from your local machine.
Catalyst Project view
This view contains general informations such as the user details, project informations and options to pull the resources from Catalyst remote console to local machine and options to manage Catalyst CLI tokens that can be used in CI/CD environments.
Get Started
Here we'll see how to get started with the Catalyst Tools extension and initialize a Catalyst project.
- Open the folder in VsCode where you want to initialize your Catalyst project. Preferably an empty directory.
- Now click the Catalyst logo on the left panel to active the Catalyst Tools extension.
- Wait few seconds for the Catalyst Tools extension to start up.
Login to Catalyst
- Login to your Catalyst account by clicking the
Login
button in the Catalyst explorer. This button will be displayed only when no users are currently logged in.
Initialize a Catalyst Project
- After logging into your Catalyst account successfully, you'll see the
Initialize
button in the Catalyst explorer. If there's no Catalyst project present in the workspace directory.
- Click on the button and choose a default project for the current workspace directory.
- After choosing the project you can choose to initialize resources such as functions or client to the current project directory. This step is optional.
Initializing resources
- Functions: To add functions click on the
Add functions
button under Catalyst configs section in the Catalyst Explorer view.
- Client: To create new Catalyst web client, click on the
Client Setup
button under Catalyst configs section in the Catalyst Explorer view.
Serving resources locally
- Serve all HTTP resources: Click on the
Serve
button present in Catalyst under the Catalyst configs section in the Catalyst explorer
- Serve individual HTTP resource: You can choose to serve individual HTTP components by clicking the
Run/Debug
button present under the specific component.
Note: Debug only works with individual serve. Enable the debug option in the extension's configuration to start debugging your Catalyst functions.
- Serve Non HTTP resources You can choose to serve individual Non HTTP components by clicking the
Run/Debug
button present under the specific component.
Note: The inputs to the functions need to be passed using a file named catalsyt-inputs.json
present in the functions root directory parallel to the catalsyt-config.json
file.
// catalyst-inputs.json
- sample
{
"input_1": {
"test_input": "test value"
}
}
Deploy resources to Catalyst console - development environment
Deploy all resources: Deploy the Catalyst resources from your local machine to the Catalyst console by clicking the Deploy
button under the Catalyst configs section in the Catalyst explorer view.
Deploy individual resource: You can choose to deploy individual components by clicking the Deploy
button present under the specific component.
Pull resources to local machine.
You can pull the resources present in the Catalyst console development environment using the Catalyst Project view. This view can be accessed by clicking the Project
button present under the Catalyst Configs section in the Catalyst explorer view.