serverless/lib/plugins/aws/lib/getServiceState.js
2021-04-16 13:32:13 +02:00

15 lines
432 B
JavaScript

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