|  |  | @@ -39,6 +39,23 @@ var getCredentials = function(){ | 
		
	
		
			
			|  |  |  | return getCredentials(); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function getCurrentFolder(){ | 
		
	
		
			
			|  |  |  | var tasks = [ | 
		
	
		
			
			|  |  |  | // () => { | 
		
	
		
			
			|  |  |  | //   // Use junctions to avoid npm package issues | 
		
	
		
			
			|  |  |  | //   var p = nodeShellExec('cd').then((result)=>{ | 
		
	
		
			
			|  |  |  | //     console.dir(result) | 
		
	
		
			
			|  |  |  | //   }).catch((e) => { console.error(e) }) | 
		
	
		
			
			|  |  |  | //   return p; | 
		
	
		
			
			|  |  |  | // } | 
		
	
		
			
			|  |  |  | ()=>{ | 
		
	
		
			
			|  |  |  | return Promise.resolve(process.cwd()) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | ]; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | return any(tasks); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | const __ALIAS__STAMP__ = '9e7bebe0-1f57-11ec-8f88-778ffeea9d1b' | 
		
	
		
			
			|  |  |  | const BUILD_VERSION = '[VI]Version: {version} - built on {date}[/VI]'; | 
		
	
		
			
			|  |  |  | const runtimestamp = (new Date()).getTime(); | 
		
	
	
		
			
			|  |  | @@ -2053,6 +2070,62 @@ var cmds = { | 
		
	
		
			
			|  |  |  | , noprerequisites : true | 
		
	
		
			
			|  |  |  | , getPossiblePrompts(){ return {} } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | , 'link' : { | 
		
	
		
			
			|  |  |  | 'cmd' : 'link' | 
		
	
		
			
			|  |  |  | // , cmdFn : function( sourecpath, filename, dir ){ | 
		
	
		
			
			|  |  |  | //   var afterTargetPath = (dir)=>{ | 
		
	
		
			
			|  |  |  | //     console.dir(dir); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | //     // var tasks = [ | 
		
	
		
			
			|  |  |  | //     //   () => { | 
		
	
		
			
			|  |  |  | //     //     // Use junctions to avoid npm package issues | 
		
	
		
			
			|  |  |  | //     //     var p = nodeShellExec('mklink', ['/J', filename, sourecpath], { | 
		
	
		
			
			|  |  |  | //     //       inherit: true, shell: true | 
		
	
		
			
			|  |  |  | //     //       , cwd : dir || instanceroot | 
		
	
		
			
			|  |  |  | //     //       , env: process.env | 
		
	
		
			
			|  |  |  | //     //     }).catch((e) => { console.error(e) }) | 
		
	
		
			
			|  |  |  | //     //     return p; | 
		
	
		
			
			|  |  |  | //     //   } | 
		
	
		
			
			|  |  |  | //     // ]; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | //   } | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | //   // console.dir(process.env) | 
		
	
		
			
			|  |  |  | //   if(!dir) getCurrentFolder().then(afterTargetPath); | 
		
	
		
			
			|  |  |  | //   else afterTargetPath(dir) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | // } | 
		
	
		
			
			|  |  |  | , cmdFn : function( cmdopts ){ | 
		
	
		
			
			|  |  |  | // sourecpathandfile should include name of file name | 
		
	
		
			
			|  |  |  | targetfilename = cmdopts.targetfilename || processedArgs._[1] | 
		
	
		
			
			|  |  |  | // console.log(processedArgs) | 
		
	
		
			
			|  |  |  | if(!targetfilename) Promise.reject('error no file provided for linking') | 
		
	
		
			
			|  |  |  | targetdir = cmdopts.targetdir || process.env.wd | 
		
	
		
			
			|  |  |  | sourecpathandfile = cmdopts.sourecpathandfile || path.normalize(`../../node_modules/chess-server-lib/common/models/${targetfilename}`) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var tasks = [ | 
		
	
		
			
			|  |  |  | () => { | 
		
	
		
			
			|  |  |  | // Use junctions to avoid npm package issues | 
		
	
		
			
			|  |  |  | var p = nodeShellExec('mklink', [path.normalize(`${targetdir + '/' + targetfilename}`), sourecpathandfile], { | 
		
	
		
			
			|  |  |  | inherit: true, shell: true | 
		
	
		
			
			|  |  |  | , cwd : targetdir | 
		
	
		
			
			|  |  |  | , env: process.env | 
		
	
		
			
			|  |  |  | }).catch((e) => { console.error(e) }) | 
		
	
		
			
			|  |  |  | return p; | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | ]; | 
		
	
		
			
			|  |  |  | if (__isElevated) { | 
		
	
		
			
			|  |  |  | return any(tasks).then(() => { | 
		
	
		
			
			|  |  |  | fs.writeFileSync('run.done', 'success') | 
		
	
		
			
			|  |  |  | }).catch(() => { | 
		
	
		
			
			|  |  |  | fs.writeFileSync('run.done', 'error') | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | else return op['runas']() | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | , noprerequisites : true | 
		
	
		
			
			|  |  |  | , privileged : true | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var elxrcmd = (function(){ | 
		
	
	
		
			
			|  |  | @@ -2090,6 +2163,7 @@ var elxrcmd = (function(){ | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | elxrcmd.create(cmds['users']) | 
		
	
		
			
			|  |  |  | elxrcmd.create(cmds['g']) | 
		
	
		
			
			|  |  |  | elxrcmd.create(cmds['link']) | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var interpretrun = function(){ | 
		
	
		
			
			|  |  |  | 
 |