serverless-plugin-stack-outputs
Advanced tools
Comparing version 1.2.1 to 1.3.1
@@ -17,3 +17,3 @@ { | ||
}, | ||
"version": "1.2.1", | ||
"version": "1.3.1", | ||
"dependencies": { | ||
@@ -20,0 +20,0 @@ "class.extend": "0.9.2", |
@@ -18,3 +18,2 @@ 'use strict'; | ||
if (plugin.constructor.name == 'AwsInfo') { | ||
// got the info plugin, hijack it | ||
@@ -33,2 +32,5 @@ that._SDK = plugin.sdk | ||
info: { | ||
lifecycleEvents: [ | ||
'info', | ||
], | ||
commands:{ | ||
@@ -47,4 +49,16 @@ outputs: { | ||
outputStackOutput: function() { | ||
const stackName = `${this._serverless.service.service}-${this._opts.stage}`; | ||
// find the correct stage | ||
var stage = this._serverless.service.defaults.stage; | ||
if (this._serverless.variables.options.stage) { | ||
stage = this._serverless.variables.options.stage; | ||
} | ||
// find the correct stage | ||
var region = this._serverless.service.defaults.region; | ||
if (this._serverless.variables.options.region) { | ||
region = this._serverless.variables.options.region; | ||
} | ||
const stackName = `${this._serverless.service.service}-${stage}`; | ||
// get all the outputs from AWS | ||
@@ -56,4 +70,4 @@ this._SDK.request('CloudFormation', | ||
}, | ||
this._opts.stage, | ||
this._opts.region | ||
stage, | ||
region | ||
).then((result) => { | ||
@@ -60,0 +74,0 @@ if (result) { |
115064
70