botpress
Version:
The world's first CMS for bots. Easily create, manage and extend chatbots.
27 lines (20 loc) • 864 B
JavaScript
;
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _util = require('./util');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = projectLocation => {
const getBotInformation = () => {
const packageJsonPath = (0, _util.resolveProjectFile)('package.json', projectLocation, true);
const packageJson = JSON.parse(_fs2.default.readFileSync(packageJsonPath));
return {
name: packageJson.name,
version: packageJson.version,
description: packageJson.description || '<no description>',
author: (typeof packageJson.author === 'object' ? packageJson.author.name : packageJson.author) || '<no author>',
license: packageJson.license || 'AGPL-3.0-only'
};
};
return { getBotInformation };
};
//# sourceMappingURL=about.js.map