serverless/lib/plugins/aws/lib/getServiceState.js
2020-02-26 10:22:51 +13:00

15 lines
442 B
JavaScript

'use strict';
const path = require('path');
module.exports = {
getServiceState() {
const stateFileName = this.provider.naming.getServiceStateFileName();
const servicePath = this.serverless.config.servicePath;
const packageDirName = this.options.package || '.serverless';
const stateFilePath = path.resolve(servicePath, packageDirName, stateFileName);
return this.serverless.utils.readFileSync(stateFilePath);
},
};