eddi-cli
Version:
Command line interface to make project-based editing of EDDI personalities possible.
44 lines (38 loc) • 1.37 kB
JavaScript
const path = require('path');
exports.PERSONALITIES_FOLDER = path.join(process.env.APPDATA, 'EDDI', 'personalities');
exports.PERSONALITY_FILENAME = '_personality.json';
exports.CONFIG_FILENAME = '.eddi-cli-config.json';
// list of personalities that can't be edited. Only add to this list.
exports.DEFAULT_PERSONALITIES = ['default unedited'];
exports.GENERATED_MESSAGE = '{_ Generated by eddi-cli _}';
exports.CLI_COMMENT_SETTINGS = {
'personality': {
value: (script, personality) => personality.name,
readOnly: true,
},
'description': {
readOnly: (script) => script.responder,
},
'enabled': {
include: (script) => script.responder,
readOnly: (script) => !script.responder,
validator: (value) => typeof value === 'boolean',
validationMessage: 'The "enabled" setting must be a boolean. Supported values include true, false, yes, no.'
},
'priority': {
include: (script) => script.responder,
readOnly: (script) => !script.responder,
validator: (value) => typeof value === 'number' && value > 0 && value < 6,
validationMessage: 'The "priority" setting must be a number, with minimum value 1 and maximum value 5.'
},
};
exports.BATCH_FILES = [
'build',
'watch',
'create',
'reconcile'
];
exports.ERROR_CODES = {
GENERIC_ERROR: -1,
NO_PERSONALITIES: -2,
};