UNPKG

serverless

Version:

Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more

17 lines (13 loc) 450 B
'use strict'; const homedir = require('os').homedir(); const path = require('path'); const crypto = require('crypto'); const getCacheFilePath = function(srvcPath) { const servicePath = srvcPath || process.cwd(); const servicePathHash = crypto .createHash('sha256') .update(servicePath) .digest('hex'); return path.join(homedir, '.serverless', 'cache', servicePathHash, 'autocomplete.json'); }; module.exports = getCacheFilePath;