UNPKG

serverless-aliyun-function-compute-wnj

Version:

Provider plugin for the Serverless Framework v1.x which adds support for Aliyun Function Compute

36 lines (28 loc) 841 B
'use strict'; const BbPromise = require('bluebird'); const validate = require('../shared/validate'); const utils = require('../shared/utils'); const displayServiceInfo = require('./lib/displayServiceInfo'); class AliyunInfo { constructor(serverless, options) { this.serverless = serverless; this.options = options; this.provider = this.serverless.getProvider('aliyun'); Object.assign( this, validate, utils, displayServiceInfo ); this.hooks = { 'before:info:info': () => BbPromise.bind(this) .then(this.validate) .then(this.setDefaults), // 'deploy:deploy': () => BbPromise.bind(this) // .then(this.displayServiceInfo), 'info:info': () => BbPromise.bind(this) .then(this.displayServiceInfo), }; } } module.exports = AliyunInfo;