serverless/lib/plugins/aws/lib/getServiceState.js
2019-05-29 13:34:27 +02:00

15 lines
439 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.join(servicePath, packageDirName, stateFileName);
return this.serverless.utils.readFileSync(stateFilePath);
},
};