Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awsass

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awsass - npm Package Compare versions

Comparing version 0.0.26 to 0.0.27

4

awsass.js

@@ -14,2 +14,3 @@ const { program } = require("commander");

.option("--ecs-list-revision", "lists all ecs revisions")
.option("--scheduled-lambda-list-revision", "lists all lambda revisions")
.option("--scheduled-lambda-set-revision", "sets revision for a scheduled lambda function")

@@ -89,2 +90,5 @@ .option("--ecs-run-on-fargate", "run ecs task on fargate")

if (options["scheduledLambdaListRevision"])
Lib.scheduledLambdaListRevision(resultFunc);
if (options["ecsRunOnFargate"])

@@ -91,0 +95,0 @@ Lib.ecsRunOnFargate(options["taskDefinition"], options["clusterName"], options["environmentVariable"], resultFunc);

2

package.json
{
"name": "awsass",
"description": "AWSASS is an assistant to AWS, mostly for running better scripts.",
"version": "0.0.26",
"version": "0.0.27",
"author": "Jsonize",

@@ -6,0 +6,0 @@ "repository": "https://github.com/jsonize/awsass",

@@ -86,3 +86,52 @@ const AWS = require("aws-sdk");

nextTokenHelper: function (obj, func, opts, callback, acc) {
func.call(obj, opts, function (err, data) {
if (err) {
callback(err);
return;
}
if (acc) {
for (var key in data) {
if (key in acc) {
if (acc[key].concat)
acc[key] = acc[key].concat(data[key]);
} else
acc.key = data[key];
}
} else
acc = data;
if (data.NextToken) {
opts.NextToken = data.NextToken;
Module.nextTokenHelper(obj, func, opts, callback, acc);
} else
callback(undefined, acc);
});
},
scheduledLambdaListRevision: function (callback) {
const events = new AWS.CloudWatchEvents({apiVersion: '2015-10-07'});
Module.nextTokenHelper(events, events.listRules, {Limit:100}, function (err, listRules) {
if (err) {
callback(err);
return;
}
let result = [];
let iter = function (idx) {
if (idx >= listRules.Rules.length)
callback(undefined, result);
events.listTargetsByRule({Rule: listRules.Rules[idx].Name}, function (err, listTargetsByRule) {
if (err) {
callback(err);
return;
}
let target = listTargetsByRule.Targets.find(target => target.Arn.indexOf('arn:aws:lambda') === 0);
if (target)
result.push(target.Arn);
iter(idx+1);
});
}
iter(0);
});
},
ecrEcsSetRevision: function (taskDefinition, containerName, revisionString, callback) {

@@ -89,0 +138,0 @@ let findImageIndex = function (images, searchString) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc