@compoze/compoze-framework v0.17.4
compoze-framework
The compoze-framework is a tool to make modifications to existing code bases to support the compoze development model.
Use Cases
- Connect SQS queue to Lambda function
- Connect Lambda function to SQS queue
- Connect React app to API
- Connect lambda function to dynamodb table
compoze-framework
The compoze-framework is a tool to make modifications to existing code bases to support the compoze development model.
Usage
$ npm install -g @compoze/compoze-framework
$ compoze COMMAND
running command...
$ compoze (-v|--version|version)
@compoze/compoze-framework/0.17.4 darwin-x64 node-v14.15.4
$ compoze --help [COMMAND]
USAGE
  $ compoze COMMAND
...Commands
- compoze api.generation
- compoze environment [NAME]
- compoze help [COMMAND]
- compoze lambda.api.http
- compoze lambda.dynamodb
- compoze lambda.eventbridge.listener [FILE]
- compoze lambda.eventbus.cron
- compoze lambda.eventbus.writer
- compoze lambda.listener [FILE]
- compoze lambda.secrets [FILE]
- compoze lambda.writer
compoze api.generation
Generate API Client for endpoint
USAGE
  $ compoze api.generation
OPTIONS
  -e, --environments=environments  list of environment variables to add to env files
  -h, --help                       show CLI help
  -p, --path=path                  path to generate client
  -u, --url=url                    (required) Url of OpenAPI Spec
EXAMPLE
  $ compoze api.generation -e "{"environments": [{"environment": "dev", "configPath": "./environments/dev.env", 
  "environmentVariables": {"API_NAME_URL": "https://api.example.com"}}]}""
           API client successfully generated!See code: src/commands/api.generation.ts
compoze environment [NAME]
Create environment file
USAGE
  $ compoze environment [NAME]
OPTIONS
  -e, --environmentVariables=environmentVariables  (required) Environment variables to add to env
  -h, --help                                       show CLI help
  -n, --name=name                                  (required) Name of environment
EXAMPLE
  $ compoze environment -n <env> -e key=value
             environment <env> successfully created!See code: src/commands/environment.ts
compoze help [COMMAND]
display help for compoze
USAGE
  $ compoze help [COMMAND]
ARGUMENTS
  COMMAND  command to show help for
OPTIONS
  --all  see all commands in CLISee code: @oclif/plugin-help
compoze lambda.api.http
Add http lambda endpoint
USAGE
  $ compoze lambda.api.http
OPTIONS
  -f, --templateFile=templateFile  File path to AWS SAM template YAML file
  -h, --help                       show CLI help
  -m, --httpMethod=httpMethod      (required) HTTP method
  -n, --name=name                  (required) Name of http API
  -p, --path=path                  (required) Path of HTTP resource
EXAMPLE
  $ compoze lambda.api.http -n name -p hello -m POST
           successfully created Lambda HTTP API! <name>See code: src/commands/lambda.api.http.ts
compoze lambda.dynamodb
Add DynamoDB table connection to Lambda function
USAGE
  $ compoze lambda.dynamodb
OPTIONS
  -e, --environmentVariables=environmentVariables  (required) environment variables for Dynamodb
  -h, --help                                       show CLI help
  -n, --tableName=tableName                        (required) Name of dynamodb table
  -t, --templateFile=templateFile                  template file path
EXAMPLE
  $ ./bin/run lambda.dynamodb -n TestTable -e "{"environments": [{"environment": "dev", "configPath": 
  "./environments/dev.env", "environmentVariables": {"TableName": "TableNameDev"}}]}"
           lambda listener <name> successfully added!See code: src/commands/lambda.dynamodb.ts
compoze lambda.eventbridge.listener [FILE]
Add lambda listener for eventbridge
USAGE
  $ compoze lambda.eventbridge.listener [FILE]
OPTIONS
  -b, --eventBusName=eventBusName                  (required) Name of event bus
  -e, --environmentVariables=environmentVariables  (required) environment variables to add to env
  -f, --templateFile=templateFile                  template file path
  -h, --help                                       show CLI help
  -n, --name=name                                  (required) Name of listener
EXAMPLE
  $ compoze lambda.eventbridge.listener -t <name>
         Lambda Event Bridge listener <name> successfully added!See code: src/commands/lambda.eventbridge.listener.ts
compoze lambda.eventbus.cron
Add lambda cron handler to write to an event bus
USAGE
  $ compoze lambda.eventbus.cron
OPTIONS
  -e, --environmentVariables=environmentVariables  (required) environment variables to add to env
  -f, --templateFile=templateFile                  template file path
  -h, --help                                       show CLI help
  -n, --name=name                                  (required) name of the eventbus
  -r, --rate=rate                                  (required) rate to execute cron
EXAMPLE
  $ compoze lambda.eventbus.cron -n <name> -r <rate> -e 
  "{"environments":[{"environment":"prod","configPath":"./environments/prod.env","environmentVariables":{"eventBridgeEnv
  VarName":"eventBridgeName-prod"}}]}"
           lambda cron <name> successfully added!See code: src/commands/lambda.eventbus.cron.ts
compoze lambda.eventbus.writer
Add lambda writer for an eventbus to lambda app
USAGE
  $ compoze lambda.eventbus.writer
OPTIONS
  -b, --eventBusName=eventBusName                  (required) name of the eventbus
  -e, --environmentVariables=environmentVariables  (required) environment variables to add to env
  -f, --templateFile=templateFile                  template file path
  -h, --help                                       show CLI help
  -n, --name=name                                  (required) name of the eventbus writer
EXAMPLE
  $ compoze lambda.eventbus.writer -t type
           lambda writer <name> successfully added!See code: src/commands/lambda.eventbus.writer.ts
compoze lambda.listener [FILE]
Add lambda listener to lambda app
USAGE
  $ compoze lambda.listener [FILE]
OPTIONS
  -e, --environmentVariables=environmentVariables  (required) environment variables to add to env
  -f, --templateFile=templateFile                  template file path
  -h, --help                                       show CLI help
  -t, --type=type                                  (required) Queue type; support types: (SQS)
EXAMPLE
  $ compoze lambda.listener -t <name>
         lambda listener <name> successfully added!See code: src/commands/lambda.listener.ts
compoze lambda.secrets [FILE]
Add Secrets for Lambda functions
USAGE
  $ compoze lambda.secrets [FILE]
OPTIONS
  -a, --secretArnName=secretArnName                (required) ARN of Secret
  -e, --environmentVariables=environmentVariables  (required) environment variables to add to env
  -f, --templateFile=templateFile                  template file path
  -h, --help                                       show CLI help
  -n, --secretName=secretName                      (required) Name of secretSee code: src/commands/lambda.secrets.ts
compoze lambda.writer
Add lambda writer to lambda app
USAGE
  $ compoze lambda.writer
OPTIONS
  -e, --environmentVariables=environmentVariables  (required) environment variables to add to env
  -f, --templateFile=templateFile                  template file path
  -h, --help                                       show CLI help
  -t, --type=type                                  (required) Queue type; support types: (SQS)
EXAMPLE
  $ compoze lambda.writer -t type
           lambda writer <name> successfully added!See code: src/commands/lambda.writer.ts
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago