serverless-step-functions
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -138,21 +138,25 @@ 'use strict'; | ||
message += `${chalk.yellow('endpoints:')}`; | ||
_.forEach(this.getAllStateMachines(), (stateMachineName) => { | ||
const stateMachineObj = this.getStateMachine(stateMachineName); | ||
stateMachineObj.events.forEach(event => { | ||
if (event.http) { | ||
let method; | ||
let path; | ||
if (this.isStateMachines()) { | ||
_.forEach(this.getAllStateMachines(), (stateMachineName) => { | ||
const stateMachineObj = this.getStateMachine(stateMachineName); | ||
if (stateMachineObj.events != null && _.isArray(stateMachineObj.events)) { | ||
stateMachineObj.events.forEach(event => { | ||
if (event.http) { | ||
let method; | ||
let path; | ||
if (typeof event.http === 'object') { | ||
method = event.http.method.toUpperCase(); | ||
path = event.http.path; | ||
} else { | ||
method = event.http.split(' ')[0].toUpperCase(); | ||
path = event.http.split(' ')[1]; | ||
} | ||
path = path !== '/' ? `/${path.split('/').filter(p => p !== '').join('/')}` : ''; | ||
message += `\n ${method} - ${endpointInfo}${path}`; | ||
if (typeof event.http === 'object') { | ||
method = event.http.method.toUpperCase(); | ||
path = event.http.path; | ||
} else { | ||
method = event.http.split(' ')[0].toUpperCase(); | ||
path = event.http.split(' ')[1]; | ||
} | ||
path = path !== '/' ? `/${path.split('/').filter(p => p !== '').join('/')}` : ''; | ||
message += `\n ${method} - ${endpointInfo}${path}`; | ||
} | ||
}); | ||
} | ||
}); | ||
}); | ||
} | ||
message += '\n'; | ||
@@ -159,0 +163,0 @@ this.serverless.cli.consoleLog(message); |
{ | ||
"name": "serverless-step-functions", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "The module is AWS Step Functions plugin for Serverless Framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
99196
2561