mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Add a validation step so that validation checks don't need to be rewritten in each compile method / step.
17 lines
335 B
JavaScript
17 lines
335 B
JavaScript
'use strict';
|
|
|
|
const BbPromise = require('bluebird');
|
|
|
|
module.exports = {
|
|
validateInput() {
|
|
if (!this.serverless.service.resources.aws.Resources) {
|
|
throw new this.serverless.Error(
|
|
'This plugin needs access to Resources section of the AWS CloudFormation template');
|
|
}
|
|
|
|
return BbPromise.resolve();
|
|
},
|
|
};
|
|
|
|
|