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

slappforge-sigma-cli

v2.0.1

Published

CLI based toolkit to be used with SLAppForge Sigma projects

Downloads

15

Readme

SLAppForge Sigma CLI

 ██████╗██╗ ██████╗ ███╗   ███╗ █████╗      ██████╗██╗     ██╗
██╔════╝██║██╔════╝ ████╗ ████║██╔══██╗    ██╔════╝██║     ██║
███████╗██║██║  ███╗██╔████╔██║███████║    ██║     ██║     ██║
╚════██║██║██║   ██║██║╚██╔╝██║██╔══██║    ██║     ██║     ██║
███████║██║╚██████╔╝██║ ╚═╝ ██║██║  ██║    ╚██████╗███████╗██║
╚══════╝╚═╝ ╚═════╝ ╚═╝     ╚═╝╚═╝  ╚═╝     ╚═════╝╚══════╝╚═╝

SLAppForge Sigma CLI is a command line based toolkit that can be used to,

  • Validate
  • Build
  • Deploy

a serverless application project created using SLAppForge Sigma Serverless IDE.

⚠️ This toolkit is still in beta and hence not recommended for any production critical use cases.

ℹ️ This toolkit only supports AWS based deployments at the moment. GCP based deployments will be supported in the future.

Installation

Prerequisites

Following should be installed in the system where this toolkit is executed

  • NodeJS (version 10 or newer)

    Currently installed node version can be checked using the below command.

    node -v
  • NPM

    Currently installed npm version can be checked using the below command.

    npm -v

In case NodeJS and NPM are not installed, you can follow this guide to install them on your system.

🔧 Installing Sigma CLI

Sigma CLI can be installed as a global node module using the below command.

npm install slappforge-sigma-cli -g

Once installed, the sigma command will be available system-wide.

Usage

This toolkit can be used to validate, build or deploy a SLAppForge Sigma generated project. In each case, the toolkit should be invoked from the root directory of the Sigma project (i.e. the directory that contains the appState.json file).

All the operation logs will be written to the stderr of the console, while the final operation output will be written to the stdout of the console.

📖 help command

sigma help

This command lists all the available commands of this toolkit.

AWS Commands

🔍 validate command

sigma aws validate

This command validates whether the current directory has a valid AWS based Sigma serverless project and also if it is a version supported by this Sigma CLI.

Sigma CLI only supports building and deploying projects created by Sigma 1.4.0 or newer versions. If your project was created using an older Sigma version, please open the project using a newer Sigma version and re-save it into your VCS repository.

Command Options

This command does not have any options

Command Output stdout

This command does not output any value upon the successful completion

🔨 build command

sigma aws build [-opts]

This command builds the project in the current directory and generates the deployment package as a zip file into a given location on the local file system. The name of the generated zip file will be of the following format.

build_projectName_version_buildTimestamp.zip (e.g.: build_MyProject_1.0.0_1593063620507.zip)

Optionally this command can upload the generated deployment package into a given S3 bucket as well.

Command Options

|Option | Required | Description | Default Value| |--- |:---: |--- |---| |--buildDir | :x: | File system location to save the generated deployment package | ./sigma-builds| |--s3Bucket | :x: | S3 bucket to upload the generated deployment package. If this is not provided, S3 upload will not be attempted. |- | |--s3Prefix | :x: | S3 prefix to be added for the generated deployment package name |- | |--awsProfile | :x: | AWS profile to be used for uploading the generated deployment package to S3 |default | |--awsKey | :x: | AWS access key to be used for uploading the generated deployment package to S3. This will be ignored if the --awsProfile option is provided. |- | |--awsSecret | :x: | AWS access secret to be used for uploading the generated deployment package to S3. This is required if --awsKey is provided. | -|

Command Output stdout

  • If only the local build was executed (without attempting S3 upload), relative file path of the generated deployment artifact will be the output. e.g.: ./sigma_builds/build_MyProject_1.0.0_1593063620507.zip

  • If S3 upload was also successful, S3 URL of the generated deployment artifact will be the output. e.g.: s3://myBucket/my-sigma-builds/build_MyProject_1.0.0_1593063620507.zip

🚀 deploy command

sigma aws deploy [-opts]

This command deploys the project in the current directory to the given AWS account. Prior to the deployment step, this will automatically invoke the build step as well.

Command Options

|Option | Required | Description | Default Value| |--- |:---: |--- |---| |--depPackage | :x: | S3 URL of a pre-built deployment package. e.g.: s3://myBucket/my-sigma-builds/build_MyProject_1.0.0_1593063620507.zip If this is provided, project build stage will be skipped and --buildDir, --s3Bucket, --s3Prefix options will be ignored. |-| |--buildDir | :x: | File system location to save the generated deployment package | ./sigma-builds| |--s3Bucket | :x: | S3 bucket to upload the generated deployment package and to upload the CloudFormation template if it is larger than 50kB. This is required if --depPackage is not provided or the CloudFormation template is larger than 50kB. |- | |--s3Prefix | :x: | S3 prefix to be added for the generated deployment package name and to the CloudFormation template file name if the template is larger than 50kB. |- | |--awsProfile | :x: | AWS profile to be used for uploading the generated deployment package to S3 |default | |--awsKey | :x: | AWS access key to be used for uploading the generated deployment package to S3. This will be ignored if the --awsProfile option is provided. |- | |--awsSecret | :x: | AWS access secret to be used for uploading the generated deployment package to S3. This is required if --awsKey is provided. |-| |--stackName | :x: | Name of the CloudFormation stack to be created. This can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can't be longer than 128 characters. |Will be of the format ProjectName-ProjectVersion-Stack (e.g.: MyProject-1-0-0-Stack)| |--autoDepMode | :x: | Whether to automatically carry out the deployment without waiting for any user confirmation. If this is set to true, CLI will not prompt for user confirmation in any of the deployment steps. Instead it will take the following actions, unless any of them were overridden by specific command line arguments. - Change set deployment will start automatically, just after the generation. - In case the stack is in an unrecoverable (non-updatable) state, deployment will be aborted. (This can be overridden by providing the --deleteUnrecoverable option.) |false| |--deleteUnrecoverable | :x: | In case the stack is in an unrecoverable (non-updatable) state, whether to delete the existing stack and retry the deployment. |false| |--templateParam | :x: | A CloudFormation template parameter to be used during the deployment. The value of this option should be in the format paramKey:paramValue. This option can be provided multiple times for multiple parameters. |-| |--templateParamFile | :x: | A path to a JSON file containing the CloudFormation template parameters to be used during the deployment. Parameters provided from this file will be overridden by parameters provided as --templateParam, if the key is same. |-|

Command Output stdout

The final status of the CloudFormation stack, followed by the list of CloudFormation outputs of the stack. e.g.:

CREATE_COMPLETE
 MyLambda                             arn:aws:lambda:us-east-1:123456789123:function:MyLambda               ARN of Lambda function MyLambda
 httpApigMyEventAPIRoutePOSTnotify    https://abcd123efg.execute-api.us-east-1.amazonaws.com/prod/notify    POST endpoint for route /notify on API MyEventAPI
 snsusEast1MyNotificationTopic        arn:aws:sns:us-east-1:123456789123:MyNotificationTopic                ARN of SNS topic MyNotificationTopic