diff --git a/index.js b/index.js index fa8aa36..274ac36 100755 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ require("@mhlabs/aws-sdk-sso"); require("./src/commands/lambda"); require("./src/commands/dynamodb"); require("./src/commands/apigateway"); -require("./src/commands/application-monitor"); +require("./src/commands/stack"); program.version(package.version, "-v, --version", "output the current version"); program.parse(process.argv); diff --git a/package.json b/package.json index 2507d0e..7f1cc0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mhlabs/awscii-cli", - "version": "1.0.3", + "version": "1.0.4", "description": "Tool that renders ASCII-art graphs of AWS resource's metrics", "main": "index.js", "scripts": { diff --git a/src/commands/application-monitor/graph-type-mapping.js b/src/commands/stack/graph-type-mapping.js similarity index 100% rename from src/commands/application-monitor/graph-type-mapping.js rename to src/commands/stack/graph-type-mapping.js diff --git a/src/commands/application-monitor/index.js b/src/commands/stack/index.js similarity index 95% rename from src/commands/application-monitor/index.js rename to src/commands/stack/index.js index f873e41..76f6faa 100644 --- a/src/commands/application-monitor/index.js +++ b/src/commands/stack/index.js @@ -14,8 +14,8 @@ const spinner = new Spinner(); spinner.setSpinnerString("⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈"); program - .command("application-monitor") - .alias("am") + .command("stack") + .alias("s") .option( "--resource-type [stackName]", "Name of the CloudFormation stack to monitor. Optional - defaults to UI selector." @@ -112,7 +112,7 @@ program [ `https://${AWS.config.region}.console.aws.amazon.com/lambda/home?region=${AWS.config.region}#/applications/${inputUtil.reverseObfuscatedName(stackName)}?tab=monitoring`, ], - `awscii am --resource-type ${resourceType} --names ${resourceNames.map(p=>inputUtil.reverseObfuscatedName(p)).join( + `awscii stack --resource-type ${resourceType} --names ${resourceNames.map(p=>inputUtil.reverseObfuscatedName(p)).join( "," )} --graph-types "#graphtypes#" --profile ${cmd.profile}` ); diff --git a/src/commands/application-monitor/resourceTypes/dynamodb.js b/src/commands/stack/resourceTypes/dynamodb.js similarity index 100% rename from src/commands/application-monitor/resourceTypes/dynamodb.js rename to src/commands/stack/resourceTypes/dynamodb.js diff --git a/src/commands/application-monitor/resourceTypes/events.js b/src/commands/stack/resourceTypes/events.js similarity index 100% rename from src/commands/application-monitor/resourceTypes/events.js rename to src/commands/stack/resourceTypes/events.js diff --git a/src/commands/application-monitor/resourceTypes/lambda.js b/src/commands/stack/resourceTypes/lambda.js similarity index 100% rename from src/commands/application-monitor/resourceTypes/lambda.js rename to src/commands/stack/resourceTypes/lambda.js diff --git a/src/commands/application-monitor/resourceTypes/s3.js b/src/commands/stack/resourceTypes/s3.js similarity index 100% rename from src/commands/application-monitor/resourceTypes/s3.js rename to src/commands/stack/resourceTypes/s3.js diff --git a/src/commands/application-monitor/resourceTypes/sns.js b/src/commands/stack/resourceTypes/sns.js similarity index 100% rename from src/commands/application-monitor/resourceTypes/sns.js rename to src/commands/stack/resourceTypes/sns.js diff --git a/src/commands/application-monitor/resourceTypes/sqs.js b/src/commands/stack/resourceTypes/sqs.js similarity index 100% rename from src/commands/application-monitor/resourceTypes/sqs.js rename to src/commands/stack/resourceTypes/sqs.js