Comparing version 1.2.2 to 1.3.0
@@ -0,0 +0,0 @@ let config = require("leo-config"); |
@@ -33,3 +33,11 @@ "use strict"; | ||
}, | ||
runChangeSet: function(stack, file, opts) { | ||
/** | ||
* Create a run a changeset | ||
* @param stack | ||
* @param file | ||
* @param opts (Goes directly to AWS. Options must match AWS documentation) | ||
* @param options (Options for this function) | ||
* @returns {Promise<PromiseResult<CloudFormation.CreateChangeSetOutput, AWSError>>} | ||
*/ | ||
runChangeSet: function(stack, file, opts, options = {}) { | ||
let updateOpts = Object.assign({}, opts); | ||
@@ -77,14 +85,20 @@ if (updateOpts.Parameters) { | ||
return new Promise((resolve) => { | ||
rl.question('Press [Enter] to execute change set', (data) => { | ||
rl.close(); | ||
console.log("Executing Change Set"); | ||
resolve(service.executeChangeSet({ | ||
ChangeSetName: changeSetId | ||
}).promise().then(data => { | ||
service.api.waiters["stackUpdateComplete"].delay = 10; | ||
return this.waitFor("stackUpdateComplete", { | ||
StackName: stack | ||
if (options.forceDeploy) { | ||
this.executeChangeset(rl, service, changeSetId, stack).then(data => { | ||
resolve(data); | ||
}); | ||
} else { | ||
if (options.progressInterval) { | ||
options.progressInterval.stop(); | ||
} | ||
rl.question('Press [Enter] to execute change set', (data) => { | ||
if (options.progressInterval) { | ||
options.progressInterval.start(); | ||
} | ||
this.executeChangeset(rl, service, changeSetId, stack).then(data => { | ||
resolve(data); | ||
}); | ||
})); | ||
}); | ||
}); | ||
} | ||
}) | ||
@@ -100,2 +114,24 @@ }).catch(err => { | ||
}, | ||
/** | ||
* Execute the created changeset | ||
* @param rl | ||
* @param service | ||
* @param changeSetId | ||
* @param stack | ||
* @returns {Promise<any>} | ||
*/ | ||
executeChangeset: function(rl, service, changeSetId, stack) { | ||
return new Promise(resolve => { | ||
rl.close(); | ||
console.log("Executing Change Set"); | ||
resolve(service.executeChangeSet({ | ||
ChangeSetName: changeSetId | ||
}).promise().then(data => { | ||
service.api.waiters["stackUpdateComplete"].delay = 10; | ||
return this.waitFor("stackUpdateComplete", { | ||
StackName: stack | ||
}); | ||
})); | ||
}); | ||
}, | ||
run: function(stack, file, opts) { | ||
@@ -102,0 +138,0 @@ let updateOpts = Object.assign({}, opts); |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "leo-aws", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Helper wrappers around AWS services, specifically to ease backoff retry and streaming of data into and out of AWS services", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -360,1 +360,12 @@ 'use strict'; | ||
} | ||
// example for begins_with, contains, etc… | ||
// let result = await leoaws.dynamodb.scan({ | ||
// TableName: config.aggregationTableName, | ||
// FilterExpression: 'begins_with(#id, :id)', | ||
// ExpressionAttributeNames: { | ||
// "#id": "id" | ||
// }, | ||
// ExpressionAttributeValues: { | ||
// ":id": 'weather' | ||
// } |
@@ -0,0 +0,0 @@ module.exports = function(func, opts) { |
@@ -0,0 +0,0 @@ const merge = require("lodash.merge"); |
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ const autoscale = require("./autoscale"); |
@@ -0,0 +0,0 @@ 'use strict'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2495
403957
34