error handling, launcher ui, read-only mode, rm plot/smooth

This commit is contained in:
bordun 2020-03-09 19:12:43 +01:00
parent cee4cb81b7
commit 4f31985930
59 changed files with 1299 additions and 781 deletions

View file

@ -7,7 +7,7 @@ module.exports = {
},
'l':{alias:'load',type:'string',file:{name:'OSC Session (.json)', extensions: ['json', 'js']},describe:'session file to load'},
'state':{type:'string',file:{name:'OSC State (.state)', extensions: ['state']},describe:'state file to load'},
'b':{alias:'blank',type:'boolean',describe:'load a blank session and start the editor'},
// 'b':{alias:'blank',type:'boolean',describe:'load a blank session and start the editor'},
'c':{alias:'custom-module',type:'array',file:{name:'OSC Custom module (.js)', extensions: ['js']},describe:'custom module file to load (custom options can be passed after the filename)'},
'p':{alias:'port',type:'number',describe:'http port of the server (default to 8080)',
check: (p)=>{
@ -21,15 +21,15 @@ module.exports = {
true : 'Port must be an integer >= 1024'
}
},
'tcp-port':{type:'number', describe:'TCP server input port',
'tcp-port':{type:'number', describe:'tcp server input port',
check: (t, argv)=>{
var h = argv['port'] || 8080
if (t===h) return 'TCP input port must different from --port'
if (t===h) return 'tcp input port must different from --port'
return (!isNaN(t) && t > 1023 && parseInt(t)===t) ?
true : 'Port must be an integer >= 1024'
}
},
'tcp-targets':{type:'array',describe:'TCP servers to connect to (ip:port pairs), does not susbtitute for --send',
'tcp-targets':{type:'array',describe:'tcp servers to connect to (ip:port pairs), does not susbtitute for --send',
check: (s, argv)=>{
if (!argv['tcp-port']) return '--tcp-port must be set'
return s.some(item=>!item.match('^[^:\s\"\']*:[0-9]{4,5}[\s\"\']*$')) ?
@ -44,19 +44,19 @@ module.exports = {
true : 'no-gui and gui-only can\'s be enabled simultaneously'
}
},
'g':{alias:'gui-only',type:'string',describe:'app server\'s url. If true, local port (--port) is used',
check: (g,argv)=>{
return (!g || !argv.n) ?
true : 'no-gui and gui-only can\'s be enabled simultaneously'
}
},
// 'g':{alias:'gui-only',type:'string',describe:'app server\'s url. If true, local port (--port) is used',
// check: (g,argv)=>{
// return (!g || !argv.n) ?
// true : 'no-gui and gui-only can\'s be enabled simultaneously'
// }
// },
't':{alias:'theme',type:'array',describe:'theme name or path (mutliple values allowed)'},
'e':{alias:'examples',type:'boolean',describe:'list examples instead of recent sessions',
check: (e,argv)=>{
return (!e || !argv.l) ?
true : 'examples can\'t be listed if --load is set'
}
},
// 'e':{alias:'examples',type:'boolean',describe:'list examples instead of recent sessions',
// check: (e,argv)=>{
// return (!e || !argv.l) ?
// true : 'examples can\'t be listed if --load is set'
// }
// },
'url-options':{type:'array',describe:'url options (opt=value pairs)',
check: (u, argv)=>{
return (!u || !argv.n) ?
@ -64,7 +64,7 @@ module.exports = {
}
},
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true},
'disable-gpu':{type:'boolean',describe:'disable hardware acceleration', restart: true},
// 'disable-gpu':{type:'boolean',describe:'disable hardware acceleration', restart: true},
'force-gpu':{type:'boolean',describe:'ignore chrome\'s gpu blacklist', restart: true},
'read-only':{type:'boolean',describe:'disable session editing and session history changes',
check: (r, argv)=>{