2019-02-24 20:37:11 +03:00
|
|
|
const {isPlainObject} = require('lodash');
|
2020-05-27 20:47:53 +03:00
|
|
|
const config = require('../../../shared/config');
|
2019-02-24 20:37:11 +03:00
|
|
|
const labs = require('../../services/labs');
|
|
|
|
const ghostVersion = require('../../lib/ghost-version');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
docName: 'config',
|
|
|
|
|
|
|
|
read: {
|
|
|
|
permissions: false,
|
|
|
|
query() {
|
|
|
|
return {
|
|
|
|
version: ghostVersion.full,
|
|
|
|
environment: config.get('env'),
|
|
|
|
database: config.get('database').client,
|
|
|
|
mail: isPlainObject(config.get('mail')) ? config.get('mail').transport : '',
|
2019-02-25 17:39:47 +03:00
|
|
|
useGravatar: !config.isPrivacyDisabled('useGravatar'),
|
2019-02-24 20:37:11 +03:00
|
|
|
labs: labs.getAll(),
|
|
|
|
clientExtensions: config.get('clientExtensions') || {},
|
|
|
|
enableDeveloperExperiments: config.get('enableDeveloperExperiments') || false
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|