* Convert all JSON configurations (*.json) to HJSON (*.hjson) which is much more flexible for a human readable and editable configuration format
* WIP "next" vs "action" changes * options.cls is now defaulted in config.js/config.hjson (default = true) * Notes/etc.
This commit is contained in:
parent
052cf5c490
commit
ca4b99a83e
|
@ -8,6 +8,7 @@ var _ = require('lodash');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
|
||||||
exports.parseAsset = parseAsset;
|
exports.parseAsset = parseAsset;
|
||||||
|
exports.getAssetWithShorthand = getAssetWithShorthand;
|
||||||
exports.getArtAsset = getArtAsset;
|
exports.getArtAsset = getArtAsset;
|
||||||
exports.getModuleAsset = getModuleAsset;
|
exports.getModuleAsset = getModuleAsset;
|
||||||
exports.resolveConfigAsset = resolveConfigAsset;
|
exports.resolveConfigAsset = resolveConfigAsset;
|
||||||
|
@ -42,6 +43,25 @@ function parseAsset(s) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAssetWithShorthand(spec, defaultType) {
|
||||||
|
if(!_.isString(spec)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if('@' === spec[0]) {
|
||||||
|
var asset = parseAsset(spec);
|
||||||
|
assert(_.isString(asset.type));
|
||||||
|
|
||||||
|
return asset;
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
type : defaultType,
|
||||||
|
asset : spec,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// :TODO: Convert these to getAssetWithShorthand()
|
||||||
function getArtAsset(art) {
|
function getArtAsset(art) {
|
||||||
if(!_.isString(art)) {
|
if(!_.isString(art)) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -5,9 +5,9 @@ var miscUtil = require('./misc_util.js');
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var paths = require('path');
|
var paths = require('path');
|
||||||
var stripJsonComments = require('strip-json-comments');
|
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
var hjson = require('hjson');
|
||||||
|
|
||||||
exports.init = init;
|
exports.init = init;
|
||||||
exports.getDefaultPath = getDefaultPath;
|
exports.getDefaultPath = getDefaultPath;
|
||||||
|
@ -22,9 +22,10 @@ function init(configPath, cb) {
|
||||||
callback(null, { } );
|
callback(null, { } );
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
var configJson = JSON.parse(stripJsonComments(data));
|
var configJson = hjson.parse(data);
|
||||||
callback(null, configJson);
|
callback(null, configJson);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
console.log(e)
|
||||||
callback(e);
|
callback(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +54,7 @@ function init(configPath, cb) {
|
||||||
function getDefaultPath() {
|
function getDefaultPath() {
|
||||||
var base = miscUtil.resolvePath('~/');
|
var base = miscUtil.resolvePath('~/');
|
||||||
if(base) {
|
if(base) {
|
||||||
return paths.join(base, '.enigma-bbs', 'config.json');
|
return paths.join(base, '.enigma-bbs', 'config.hjson');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +81,16 @@ function getDefaultConfig() {
|
||||||
defaultGroups : [ 'users' ] // default groups new users belong to
|
defaultGroups : [ 'users' ] // default groups new users belong to
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// :TODO: better name for "defaults"... which is redundant here!
|
||||||
|
/*
|
||||||
|
Concept
|
||||||
|
"theme" : {
|
||||||
|
"default" : "defaultThemeName", // or "*"
|
||||||
|
"preLogin" : "*",
|
||||||
|
"passwordChar" : "*",
|
||||||
|
...
|
||||||
|
}
|
||||||
|
*/
|
||||||
defaults : {
|
defaults : {
|
||||||
theme : 'NU-MAYA', // :TODO: allow "*" here
|
theme : 'NU-MAYA', // :TODO: allow "*" here
|
||||||
passwordChar : '*', // TODO: move to user ?
|
passwordChar : '*', // TODO: move to user ?
|
||||||
|
@ -94,14 +105,9 @@ function getDefaultConfig() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
menus : {
|
||||||
Concept
|
cls : true, // Clear screen before each menu by default?
|
||||||
"theme" : {
|
},
|
||||||
"default" : "defaultThemeName", // or "*"
|
|
||||||
"passwordChar" : "*",
|
|
||||||
...
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
paths : {
|
paths : {
|
||||||
mods : paths.join(__dirname, './../mods/'),
|
mods : paths.join(__dirname, './../mods/'),
|
||||||
|
|
|
@ -9,6 +9,7 @@ var fs = require('fs');
|
||||||
var Gaze = require('gaze').Gaze;
|
var Gaze = require('gaze').Gaze;
|
||||||
var stripJsonComments = require('strip-json-comments');
|
var stripJsonComments = require('strip-json-comments');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
var hjson = require('hjson');
|
||||||
|
|
||||||
module.exports = exports = new JSONCache();
|
module.exports = exports = new JSONCache();
|
||||||
|
|
||||||
|
@ -21,9 +22,11 @@ function JSONCache() {
|
||||||
this.reCacheJSONFromFile = function(filePath, cb) {
|
this.reCacheJSONFromFile = function(filePath, cb) {
|
||||||
fs.readFile(filePath, { encoding : 'utf-8' }, function fileRead(err, data) {
|
fs.readFile(filePath, { encoding : 'utf-8' }, function fileRead(err, data) {
|
||||||
try {
|
try {
|
||||||
self.cache[filePath] = JSON.parse(stripJsonComments(data));
|
//self.cache[filePath] = JSON.parse(stripJsonComments(data));
|
||||||
|
self.cache[filePath] = hjson.parse(data);
|
||||||
cb(null, self.cache[filePath]);
|
cb(null, self.cache[filePath]);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
console.log(e)
|
||||||
cb(e);
|
cb(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@ var ansi = require('./ansi_term.js');
|
||||||
var asset = require('./asset.js');
|
var asset = require('./asset.js');
|
||||||
var ViewController = require('./view_controller.js').ViewController;
|
var ViewController = require('./view_controller.js').ViewController;
|
||||||
var menuUtil = require('./menu_util.js');
|
var menuUtil = require('./menu_util.js');
|
||||||
|
var Config = require('./config.js').config;
|
||||||
|
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
@ -27,6 +28,10 @@ function MenuModule(options) {
|
||||||
this.menuConfig.options = options.menuConfig.options || {};
|
this.menuConfig.options = options.menuConfig.options || {};
|
||||||
this.menuMethods = {}; // methods called from @method's
|
this.menuMethods = {}; // methods called from @method's
|
||||||
|
|
||||||
|
this.cls = _.isBoolean(this.menuConfig.options.cls) ?
|
||||||
|
this.menuConfig.options.cls :
|
||||||
|
Config.menus.cls;
|
||||||
|
|
||||||
this.initViewControllers();
|
this.initViewControllers();
|
||||||
|
|
||||||
this.initSequence = function() {
|
this.initSequence = function() {
|
||||||
|
@ -133,6 +138,7 @@ function MenuModule(options) {
|
||||||
return 'end' === self.menuConfig.options.pause || true === self.menuConfig.options.pause;
|
return 'end' === self.menuConfig.options.pause || true === self.menuConfig.options.pause;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// :TODO: Convert this to process "next" instead of "action"
|
||||||
this.nextAction = function() {
|
this.nextAction = function() {
|
||||||
if(!_.isObject(self.menuConfig.form) && !_.isString(self.menuConfig.prompt) &&
|
if(!_.isObject(self.menuConfig.form) && !_.isString(self.menuConfig.prompt) &&
|
||||||
_.isString(self.menuConfig.action))
|
_.isString(self.menuConfig.action))
|
||||||
|
@ -164,7 +170,7 @@ MenuModule.prototype.leave = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
MenuModule.prototype.beforeArt = function() {
|
MenuModule.prototype.beforeArt = function() {
|
||||||
if(this.menuConfig.options.cls) {
|
if(this.cls) {
|
||||||
this.client.term.write(ansi.resetScreen());
|
this.client.term.write(ansi.resetScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +246,8 @@ MenuModule.prototype.finishedLoading = function() {
|
||||||
_.isString(this.menuConfig.next))
|
_.isString(this.menuConfig.next))
|
||||||
{
|
{
|
||||||
setTimeout(function nextTimeout() {
|
setTimeout(function nextTimeout() {
|
||||||
self.client.gotoMenuModule( { name : self.menuConfig.next } );
|
menuUtil.handleNext(self.client, self.menuConfig.next);
|
||||||
|
//self.client.gotoMenuModule( { name : self.menuConfig.next } );
|
||||||
}, this.menuConfig.options.nextTimeout);
|
}, this.menuConfig.options.nextTimeout);
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -17,11 +17,10 @@ var async = require('async');
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
|
||||||
var stripJsonComments = require('strip-json-comments');
|
|
||||||
|
|
||||||
exports.loadMenu = loadMenu;
|
exports.loadMenu = loadMenu;
|
||||||
exports.getFormConfigByIDAndMap = getFormConfigByIDAndMap;
|
exports.getFormConfigByIDAndMap = getFormConfigByIDAndMap;
|
||||||
exports.handleAction = handleAction;
|
exports.handleAction = handleAction;
|
||||||
|
exports.handleNext = handleNext;
|
||||||
exports.applyThemeCustomization = applyThemeCustomization;
|
exports.applyThemeCustomization = applyThemeCustomization;
|
||||||
|
|
||||||
function getMenuConfig(name, cb) {
|
function getMenuConfig(name, cb) {
|
||||||
|
@ -30,7 +29,7 @@ function getMenuConfig(name, cb) {
|
||||||
async.waterfall(
|
async.waterfall(
|
||||||
[
|
[
|
||||||
function loadMenuJSON(callback) {
|
function loadMenuJSON(callback) {
|
||||||
jsonCache.getJSON('menu.json', function loaded(err, menuJson) {
|
jsonCache.getJSON('menu.hjson', function loaded(err, menuJson) {
|
||||||
callback(err, menuJson);
|
callback(err, menuJson);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -44,7 +43,7 @@ function getMenuConfig(name, cb) {
|
||||||
},
|
},
|
||||||
function loadPromptJSON(callback) {
|
function loadPromptJSON(callback) {
|
||||||
if(_.isString(menuConfig.prompt)) {
|
if(_.isString(menuConfig.prompt)) {
|
||||||
jsonCache.getJSON('prompt.json', function loaded(err, promptJson, reCached) {
|
jsonCache.getJSON('prompt.hjson', function loaded(err, promptJson, reCached) {
|
||||||
callback(err, promptJson);
|
callback(err, promptJson);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -166,6 +165,20 @@ function getFormConfigByIDAndMap(menuConfig, formId, mciMap, cb) {
|
||||||
cb(new Error('No matching form configuration found for key \'' + mciReqKey + '\''));
|
cb(new Error('No matching form configuration found for key \'' + mciReqKey + '\''));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// :TODO: Most of this should be moved elsewhere .... DRY...
|
||||||
|
function callModuleMenuMethod(client, asset, path, formData) {
|
||||||
|
if('' === paths.extname(path)) {
|
||||||
|
path += '.js';
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
var methodMod = require(path);
|
||||||
|
methodMod[asset.asset](client.currentMenuModule, formData || { }, conf.extraArgs);
|
||||||
|
} catch(e) {
|
||||||
|
client.log.error( { error : e.toString(), methodName : asset.asset }, 'Failed to execute asset method');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleAction(client, formData, conf) {
|
function handleAction(client, formData, conf) {
|
||||||
assert(_.isObject(conf));
|
assert(_.isObject(conf));
|
||||||
assert(_.isString(conf.action));
|
assert(_.isString(conf.action));
|
||||||
|
@ -173,30 +186,16 @@ function handleAction(client, formData, conf) {
|
||||||
var actionAsset = asset.parseAsset(conf.action);
|
var actionAsset = asset.parseAsset(conf.action);
|
||||||
assert(_.isObject(actionAsset));
|
assert(_.isObject(actionAsset));
|
||||||
|
|
||||||
// :TODO: Most of this should be moved elsewhere .... DRY...
|
|
||||||
function callModuleMenuMethod(path) {
|
|
||||||
if('' === paths.extname(path)) {
|
|
||||||
path += '.js';
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
var methodMod = require(path);
|
|
||||||
methodMod[actionAsset.asset](client.currentMenuModule, formData, conf.extraArgs);
|
|
||||||
} catch(e) {
|
|
||||||
Log.error( { error : e.toString(), methodName : actionAsset.asset }, 'Failed to execute asset method');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(actionAsset.type) {
|
switch(actionAsset.type) {
|
||||||
case 'method' :
|
case 'method' :
|
||||||
case 'systemMethod' :
|
case 'systemMethod' :
|
||||||
if(_.isString(actionAsset.location)) {
|
if(_.isString(actionAsset.location)) {
|
||||||
callModuleMenuMethod(paths.join(Config.paths.mods, actionAsset.location));
|
callModuleMenuMethod(client, actionAsset, paths.join(Config.paths.mods, actionAsset.location, formData));
|
||||||
} else {
|
} else {
|
||||||
if('systemMethod' === actionAsset.type) {
|
if('systemMethod' === actionAsset.type) {
|
||||||
// :TODO: Need to pass optional args here -- conf.extraArgs and args between e.g. ()
|
// :TODO: Need to pass optional args here -- conf.extraArgs and args between e.g. ()
|
||||||
// :TODO: Probably better as system_method.js
|
// :TODO: Probably better as system_method.js
|
||||||
callModuleMenuMethod(paths.join(__dirname, 'system_menu_method.js'));
|
callModuleMenuMethod(client, actionAsset, paths.join(__dirname, 'system_menu_method.js'), formData);
|
||||||
} else {
|
} else {
|
||||||
// local to current module
|
// local to current module
|
||||||
var currentModule = client.currentMenuModule;
|
var currentModule = client.currentMenuModule;
|
||||||
|
@ -213,6 +212,40 @@ function handleAction(client, formData, conf) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleNext(client, nextSpec) {
|
||||||
|
assert(_.isString(nextSpec));
|
||||||
|
|
||||||
|
var nextAsset = asset.getAssetWithShorthand(nextSpec, 'menu');
|
||||||
|
|
||||||
|
switch(nextAsset.type) {
|
||||||
|
case 'method' :
|
||||||
|
case 'systemMethod' :
|
||||||
|
if(_.isString(nextAsset.location)) {
|
||||||
|
callModuleMenuMethod(client, nextAsset, paths.join(Config.paths.mods, actionAsset.location));
|
||||||
|
} else {
|
||||||
|
if('systemMethod' === nextAsset.type) {
|
||||||
|
// :TODO: see other notes about system_menu_method.js here
|
||||||
|
callModuleMenuMethod(client, nextAsset, paths.join(__dirname, 'system_menu_method.js'));
|
||||||
|
} else {
|
||||||
|
// local to current module
|
||||||
|
var currentModule = client.currentMenuModule;
|
||||||
|
if(_.isFunction(currentModule.menuMethods[actionAsset.asset])) {
|
||||||
|
currentModule.menuMethods[actionAsset.asset]( { }, { } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'menu' :
|
||||||
|
client.gotoMenuModule( { name : nextAsset.asset } );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default :
|
||||||
|
client.log.error( { nextSpec : nextSpec }, 'Invalid asset type for "next"');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// :TODO: This should be in theme.js
|
// :TODO: This should be in theme.js
|
||||||
|
|
||||||
// :TODO: Need to take (optional) form ID to search for (e.g. for multi-form menus)
|
// :TODO: Need to take (optional) form ID to search for (e.g. for multi-form menus)
|
||||||
|
|
|
@ -29,4 +29,5 @@ function getUserLoginHistory(numRequested, cb) {
|
||||||
cb(err, loginHistory);
|
cb(err, loginHistory);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ function displayThemedPause(options, cb) {
|
||||||
async.series(
|
async.series(
|
||||||
[
|
[
|
||||||
function loadPromptJSON(callback) {
|
function loadPromptJSON(callback) {
|
||||||
jsonCache.getJSON('prompt.json', function loaded(err, promptJson) {
|
jsonCache.getJSON('prompt.hjson', function loaded(err, promptJson) {
|
||||||
if(err) {
|
if(err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
ENiGMA½ Menu Configuration
|
||||||
|
|
||||||
|
See http://hjson.org/ for syntax
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
Menu Configuration
|
Menu Configuration
|
||||||
|
|
||||||
|
@ -42,7 +47,6 @@
|
||||||
"art" : "CONNECT",
|
"art" : "CONNECT",
|
||||||
"next" : "matrix",
|
"next" : "matrix",
|
||||||
"options" : {
|
"options" : {
|
||||||
"cls" : true,
|
|
||||||
"nextTimeout" : 1500
|
"nextTimeout" : 1500
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -77,38 +81,28 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"options" : {
|
|
||||||
"cls" : true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"login" : {
|
"login" : {
|
||||||
// :TODO: may want { "prompt" : { "name" : "blah", "action" : ... }}
|
"prompt" : "userLoginCredentials",
|
||||||
"prompt" : "userCredentials",
|
|
||||||
"fallback" : "matrix",
|
"fallback" : "matrix",
|
||||||
"next" : "fullLoginSequenceLoginArt",
|
"next" : "fullLoginSequenceLoginArt",
|
||||||
//"next" : "messageArea",
|
|
||||||
"action" : "@systemMethod:login",
|
"action" : "@systemMethod:login",
|
||||||
|
|
||||||
// :TODO: support alt submit method for prompts
|
// :TODO: support alt submit method for prompts
|
||||||
// if present, standard filters apply. No need for multiple submit ID's
|
// if present, standard filters apply. No need for multiple submit ID's
|
||||||
// since a prompt can only utilize one:
|
// since a prompt can only utilize one:
|
||||||
"submit" : [
|
/*"submit" : [
|
||||||
{
|
{
|
||||||
"value" : { "1" : "thing" },
|
"value" : { "password" : null },
|
||||||
"action" : "@method:doThings"
|
"action" : "@systemMethod:login"
|
||||||
}
|
}
|
||||||
],
|
]*/
|
||||||
|
|
||||||
"options" : {
|
|
||||||
"cls" : true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"login2" : {
|
"login2" : {
|
||||||
"art" : "USRCRED",
|
"art" : "USRCRED",
|
||||||
"fallback" : "matrix",
|
"fallback" : "matrix",
|
||||||
"next" : "fullLoginSequenceLoginArt",
|
"next" : "fullLoginSequenceLoginArt",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"mci" : {
|
"mci" : {
|
||||||
|
@ -146,7 +140,6 @@
|
||||||
"logoff" : {
|
"logoff" : {
|
||||||
"art" : "LOGOFF",
|
"art" : "LOGOFF",
|
||||||
"action" : "@systemMethod:logoff",
|
"action" : "@systemMethod:logoff",
|
||||||
"options" : { "cls" : true }
|
|
||||||
},
|
},
|
||||||
"apply" : {
|
"apply" : {
|
||||||
"art" : "APPLY",
|
"art" : "APPLY",
|
||||||
|
@ -227,20 +220,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"options" : {
|
|
||||||
"cls" : true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fullLoginSequenceLoginArt" : {
|
"fullLoginSequenceLoginArt" : {
|
||||||
"art" : "LOGIN",
|
"art" : "LOGIN",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"action" : "@menu:fullLoginSequenceLastCallers"
|
"action" : "@menu:fullLoginSequenceLastCallers"
|
||||||
},
|
},
|
||||||
"fullLoginSequenceLastCallers": {
|
"fullLoginSequenceLastCallers": {
|
||||||
"module" : "last_callers",
|
"module" : "last_callers",
|
||||||
"art" : "LASTCALL",
|
"art" : "LASTCALL",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"config" : {
|
"config" : {
|
||||||
"dateTimeFormat" : "ddd MMM Do h:mm a"
|
"dateTimeFormat" : "ddd MMM Do h:mm a"
|
||||||
},
|
},
|
||||||
|
@ -248,28 +238,27 @@
|
||||||
},
|
},
|
||||||
"fullLoginSequenceSysStats" : {
|
"fullLoginSequenceSysStats" : {
|
||||||
"art" : "SYSSTAT",
|
"art" : "SYSSTAT",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"action" : "@menu:fullLoginSequenceUserStats"
|
"action" : "@menu:fullLoginSequenceUserStats"
|
||||||
},
|
},
|
||||||
"fullLoginSequenceUserStats" : {
|
"fullLoginSequenceUserStats" : {
|
||||||
"art" : "USRSTAT",
|
"art" : "USRSTAT",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"action" : "@menu:mainMenu"
|
"action" : "@menu:mainMenu"
|
||||||
},
|
},
|
||||||
"newUserActive" : {
|
"newUserActive" : {
|
||||||
"art" : "SO-CC1.ANS",
|
"art" : "SO-CC1.ANS",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"action" : "@menu:currentUserStats"
|
"action" : "@menu:currentUserStats"
|
||||||
},
|
},
|
||||||
"currentUserStats" : {
|
"currentUserStats" : {
|
||||||
"art" : "userstats",
|
"art" : "userstats",
|
||||||
"options" : { "cls" : true, "pause" : true }
|
"options" : { "pause" : true }
|
||||||
//"action" : "@menu:lastCallers"
|
//"action" : "@menu:lastCallers"
|
||||||
},
|
},
|
||||||
"mainMenu" : {
|
"mainMenu" : {
|
||||||
"art" : "MMENU1",
|
"art" : "MMENU1",
|
||||||
"desc" : "Main Menu",
|
"desc" : "Main Menu",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"prompt" : "menuCommand",
|
"prompt" : "menuCommand",
|
||||||
"submit" : [
|
"submit" : [
|
||||||
{
|
{
|
||||||
|
@ -307,7 +296,7 @@
|
||||||
"mainMenuLastCallers" : {
|
"mainMenuLastCallers" : {
|
||||||
"module" : "last_callers",
|
"module" : "last_callers",
|
||||||
"art" : "LASTCALL",
|
"art" : "LASTCALL",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"config" : {
|
"config" : {
|
||||||
"dateTimeFormat" : "ddd MMM Do h:mm a"
|
"dateTimeFormat" : "ddd MMM Do h:mm a"
|
||||||
},
|
},
|
||||||
|
@ -315,7 +304,7 @@
|
||||||
},
|
},
|
||||||
"mainMenuUserStats" : {
|
"mainMenuUserStats" : {
|
||||||
"art" : "USRSTAT",
|
"art" : "USRSTAT",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"action" : "@menu:mainMenu"
|
"action" : "@menu:mainMenu"
|
||||||
},
|
},
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
@ -325,7 +314,6 @@
|
||||||
"module" : "msg_area",
|
"module" : "msg_area",
|
||||||
"art" : "MSGAREA",
|
"art" : "MSGAREA",
|
||||||
"desc" : "Message Area",
|
"desc" : "Message Area",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"prompt" : "menuCommand",
|
"prompt" : "menuCommand",
|
||||||
"submit" : [
|
"submit" : [
|
||||||
{
|
{
|
||||||
|
@ -359,7 +347,6 @@
|
||||||
"messageAreaChangeCurrentArea" : {
|
"messageAreaChangeCurrentArea" : {
|
||||||
"art" : "msg_area_list.ans",
|
"art" : "msg_area_list.ans",
|
||||||
"module" : "msg_area_list",
|
"module" : "msg_area_list",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"fallback" : "messageArea",
|
"fallback" : "messageArea",
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
|
@ -394,7 +381,6 @@
|
||||||
"messageAreaMessageList" : {
|
"messageAreaMessageList" : {
|
||||||
"module" : "msg_list",
|
"module" : "msg_list",
|
||||||
"art" : "msg_list",
|
"art" : "msg_list",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"fallback" : "messageArea",
|
"fallback" : "messageArea",
|
||||||
"config" : {
|
"config" : {
|
||||||
"listType" : "public"
|
"listType" : "public"
|
||||||
|
@ -430,7 +416,6 @@
|
||||||
},
|
},
|
||||||
"messageAreaViewPost" : {
|
"messageAreaViewPost" : {
|
||||||
"module" : "msg_area_view_fse",
|
"module" : "msg_area_view_fse",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"fallback" : "messageArea", // :TODO: remove once default fallback is in place
|
"fallback" : "messageArea", // :TODO: remove once default fallback is in place
|
||||||
"config" : {
|
"config" : {
|
||||||
"art" : {
|
"art" : {
|
||||||
|
@ -559,7 +544,6 @@
|
||||||
"messageAreaNewPost" : {
|
"messageAreaNewPost" : {
|
||||||
"status" : "Posting message",
|
"status" : "Posting message",
|
||||||
"module" : "msg_area_post_fse",
|
"module" : "msg_area_post_fse",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"fallback" : "messageArea", // :TODO: remove once default fallback is in place
|
"fallback" : "messageArea", // :TODO: remove once default fallback is in place
|
||||||
"config" : {
|
"config" : {
|
||||||
"art" : {
|
"art" : {
|
||||||
|
@ -732,7 +716,6 @@
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
"idleLogoff" : {
|
"idleLogoff" : {
|
||||||
"art" : "IDLELOG",
|
"art" : "IDLELOG",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"action" : "@systemMethod:logoff"
|
"action" : "@systemMethod:logoff"
|
||||||
},
|
},
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -741,7 +724,7 @@
|
||||||
"lastCallers" :{
|
"lastCallers" :{
|
||||||
"module" : "last_callers",
|
"module" : "last_callers",
|
||||||
"art" : "LASTCALL.ANS",
|
"art" : "LASTCALL.ANS",
|
||||||
"options" : { "cls" : true, "pause" : true },
|
"options" : { "pause" : true },
|
||||||
"config" : {
|
"config" : {
|
||||||
"dateTimeFormat" : "ddd MMM Do H:mm a"
|
"dateTimeFormat" : "ddd MMM Do H:mm a"
|
||||||
},
|
},
|
||||||
|
@ -774,7 +757,6 @@
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
"demoMain" : {
|
"demoMain" : {
|
||||||
"art" : "demo_selection_vm.ans",
|
"art" : "demo_selection_vm.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"VM" : {
|
"VM" : {
|
||||||
|
@ -838,7 +820,6 @@
|
||||||
},
|
},
|
||||||
"demoEditTextView" : {
|
"demoEditTextView" : {
|
||||||
"art" : "demo_edit_text_view1.ans",
|
"art" : "demo_edit_text_view1.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"BTETETETET" : {
|
"BTETETETET" : {
|
||||||
|
@ -888,7 +869,6 @@
|
||||||
},
|
},
|
||||||
"demoSpinAndToggleView" : {
|
"demoSpinAndToggleView" : {
|
||||||
"art" : "demo_spin_and_toggle.ans",
|
"art" : "demo_spin_and_toggle.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"BTSMSMTM" : {
|
"BTSMSMTM" : {
|
||||||
|
@ -928,7 +908,6 @@
|
||||||
},
|
},
|
||||||
"demoMaskEditView" : {
|
"demoMaskEditView" : {
|
||||||
"art" : "demo_mask_edit_text_view1.ans",
|
"art" : "demo_mask_edit_text_view1.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"BTMEME" : {
|
"BTMEME" : {
|
||||||
|
@ -964,7 +943,6 @@
|
||||||
},
|
},
|
||||||
"demoMultiLineEditTextView" : {
|
"demoMultiLineEditTextView" : {
|
||||||
"art" : "demo_multi_line_edit_text_view1.ans",
|
"art" : "demo_multi_line_edit_text_view1.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"BTMT" : {
|
"BTMT" : {
|
||||||
|
@ -1001,7 +979,6 @@
|
||||||
},
|
},
|
||||||
"demoHorizontalMenuView" : {
|
"demoHorizontalMenuView" : {
|
||||||
"art" : "demo_horizontal_menu_view1.ans",
|
"art" : "demo_horizontal_menu_view1.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"BTHMHM" : {
|
"BTHMHM" : {
|
||||||
|
@ -1038,7 +1015,6 @@
|
||||||
},
|
},
|
||||||
"demoVerticalMenuView" : {
|
"demoVerticalMenuView" : {
|
||||||
"art" : "demo_vertical_menu_view1.ans",
|
"art" : "demo_vertical_menu_view1.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"BTVM" : {
|
"BTVM" : {
|
||||||
|
@ -1085,7 +1061,6 @@
|
||||||
},
|
},
|
||||||
"demoArtDisplay" : {
|
"demoArtDisplay" : {
|
||||||
"art" : "demo_selection_vm.ans",
|
"art" : "demo_selection_vm.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"VM" : {
|
"VM" : {
|
||||||
|
@ -1123,20 +1098,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"demoDefaultsDosAnsi" : {
|
"demoDefaultsDosAnsi" : {
|
||||||
"art" : "DM-ENIG2.ANS",
|
"art" : "DM-ENIG2.ANS"
|
||||||
"options" : { "cls" : true }
|
|
||||||
},
|
},
|
||||||
"demoDefaultsDosAnsi_bw_mindgames" : {
|
"demoDefaultsDosAnsi_bw_mindgames" : {
|
||||||
"art" : "bw_mindgames.ans",
|
"art" : "bw_mindgames.ans"
|
||||||
"options" : { "cls" : true }
|
|
||||||
},
|
},
|
||||||
"demoDefaultsDosAnsi_test" : {
|
"demoDefaultsDosAnsi_test" : {
|
||||||
"art" : "test.ans",
|
"art" : "test.ans"
|
||||||
"options" : { "cls" : true }
|
|
||||||
},
|
},
|
||||||
"demoFullScreenEditor" : {
|
"demoFullScreenEditor" : {
|
||||||
"module" : "@systemModule:fse",
|
"module" : "@systemModule:fse",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"config" : {
|
"config" : {
|
||||||
"editorType" : "netMail",
|
"editorType" : "netMail",
|
||||||
"art" : {
|
"art" : {
|
||||||
|
@ -1322,7 +1293,6 @@
|
||||||
/*
|
/*
|
||||||
"demoEditTextView" : {
|
"demoEditTextView" : {
|
||||||
"art" : "demo_edit_text_view.ans",
|
"art" : "demo_edit_text_view.ans",
|
||||||
"options" : { "cls" : true },
|
|
||||||
"form" : {
|
"form" : {
|
||||||
"0" : {
|
"0" : {
|
||||||
"ET1ET2ET3ET5SM4TM6" : {
|
"ET1ET2ET3ET5SM4TM6" : {
|
|
@ -15,6 +15,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"userLoginCredentials" : {
|
||||||
|
"art" : "USRCRED",
|
||||||
|
"mci" : {
|
||||||
|
"ET1" : {
|
||||||
|
"argName" : "username",
|
||||||
|
"maxLength" : "@config:users.usernameMax"
|
||||||
|
},
|
||||||
|
"ET2" : {
|
||||||
|
"submit" : true,
|
||||||
|
"argName" : "password",
|
||||||
|
"password" : true,
|
||||||
|
"maxLength" : "@config:users.passwordMax"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"menuCommand" : {
|
"menuCommand" : {
|
||||||
"art" : "menu_prompt.ans",
|
"art" : "menu_prompt.ans",
|
||||||
"mci" : {
|
"mci" : {
|
40
package.json
40
package.json
|
@ -1,24 +1,24 @@
|
||||||
{
|
{
|
||||||
"name" : "enigma-bbs",
|
"name" : "enigma-bbs",
|
||||||
"version" : "0.0.1-beta",
|
"version" : "0.0.1-beta",
|
||||||
"description" : "ENiGMA½ Bulletin Board System",
|
"description" : "ENiGMA½ Bulletin Board System",
|
||||||
"author" : "Bryan Ashby <bryan@l33t.codes>",
|
"author" : "Bryan Ashby <bryan@l33t.codes>",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"async" : "0.9.x",
|
"async" : "0.9.x",
|
||||||
"binary" : "0.3.x",
|
"binary" : "0.3.x",
|
||||||
"buffers" : "0.1.x",
|
"buffers" : "0.1.x",
|
||||||
"bunyan" : "1.3.x",
|
"bunyan" : "1.3.x",
|
||||||
"iconv-lite" : "0.4.x",
|
"iconv-lite" : "0.4.x",
|
||||||
"lodash" : "3.10.x",
|
"lodash" : "3.10.x",
|
||||||
"sqlite3" : "3.0.x",
|
"sqlite3" : "3.0.x",
|
||||||
"ssh2" : "0.4.x",
|
"ssh2" : "0.4.x",
|
||||||
"strip-json-comments" : "1.0.x",
|
"node-uuid" : "1.4.x",
|
||||||
"node-uuid" : "1.4.x",
|
"moment" : "2.10.x",
|
||||||
"moment" : "2.10.x",
|
"gaze" : "0.5.x",
|
||||||
"gaze" : "0.5.x",
|
"mkdirp" : "0.5.x",
|
||||||
"mkdirp" : "0.5.x",
|
"pty.js" : "0.2.x",
|
||||||
"pty.js" : "0.2.x",
|
"string-format" : "0.5.x",
|
||||||
"string-format" : "0.5.x"
|
"hjson" : "1.7.x"
|
||||||
},
|
},
|
||||||
"engine" : "node >= 0.12.2"
|
"engine" : "node >= 0.12.2"
|
||||||
}
|
}
|
Loading…
Reference in New Issue