Pārlūkot izejas kodu

Merge branch 'master' of http://git.bbh.org.in/chess/elxr

pull/10/head
pb pirms 2 gadiem
vecāks
revīzija
8ba3f9f4f7
5 mainītis faili ar 3499 papildinājumiem un 3075 dzēšanām
  1. 1
    1
      cliverse.js
  2. 3433
    3037
      index.js
  3. 10
    3
      lin_verse.js
  4. 42
    29
      repo-manifest.js
  5. 13
    5
      win_verse.js

+ 1
- 1
cliverse.js Parādīt failu

@@ -84,7 +84,7 @@ function nodeShellExec() {
}
else {
// console.log( messages.join('') )
process.stdout.write( messages.join('') )
// process.stdout.write( JSON.stringify(logEntry) )
}
}
else if(opts.evaluateResult) {

+ 3433
- 3037
index.js
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 10
- 3
lin_verse.js Parādīt failu

@@ -135,14 +135,21 @@ var shell_verse = {
return Promise.resolve(false).then(( elevationstate ) => {
__isElevated ? console.log('Elevated') : console.log('Not Elevated')
__isElevated = elevationstate;
shell_verse.acquireElevationState = ()=> Promise.resolve(__isElevated);
shell_verse.isElevated = () => { return Promise.resolve(__isElevated)}
return __isElevated
}).catch(() => {
__isElevated = false;
console.log('Not Elevated');
}).finally(()=>{
shell_verse.acquireElevationState = ()=> Promise.resolve(__isElevated);
shell_verse.isElevated = () => { return Promise.resolve(__isElevated)}
return __isElevated;
console.log('Not Elevated');
return __isElevated
})
// .finally(()=>{
// shell_verse.acquireElevationState = ()=> Promise.resolve(__isElevated);
// shell_verse.isElevated = () => { return Promise.resolve(__isElevated)}
// return __isElevated; // Value returned from finally is not supported by node.
// })
}

, getTaskCheckExists : cli.createTask('getTaskCheckExists', 'which')

+ 42
- 29
repo-manifest.js Parādīt failu

@@ -1,6 +1,6 @@
module.exports = ((name, options)=>{

options = options || { username : ``, reposerver : `https://git.bbh.org.in` }
options = options || { username : `guest`, reposerver : `https://git.bbh.org.in`, password : `noneforguest` }
utils = options.utils

// Default set of users in main repos.
@@ -19,32 +19,40 @@ module.exports = ((name, options)=>{
'chess' : {
priority : 0,
// PB : TODO -- Handle cases where a repository url can be accessed by multiple users...
server : `${options.reposerver}`, user : options.username || '', path : ``
, get url(){ return `${this.server}/chess/${this.path}`} // fetch
server : `${options.reposerver}`, user : { username : options.username || ''}, path : ``
, get url(){ return `${this.server}/${this.owner}`} // fetch
, push : 'no-pushing'
, title : 'chess'
, get username(){ return this.user.username }
, owner : 'chess'
}
, 'chess-public' : { priority : 1,
server : `https://git.bbh.org.in`, user : options.username || '', path : ``
, get url(){ return `${this.server}/chess/${this.path}`}
server : `https://git.bbh.org.in`, user : { username : options.username || ''}, path : ``
, get url(){ return `${this.server}/${this.owner}`}
, title : 'chess-public' // PB : TODO -- rename...
, accessibility : ['public']
, push : 'no-pushing'
, get username(){ return this.user.username }
, owner : 'chess'
}
// PB : TODO -- Load private repositories from private config...
, 'chess-private' : { priority : 2,
server : `http://git.bbh`, user : options.username || '', path : ``
, get url(){ return `${this.server}/chess/${this.path}`}
server : `http://git.bbh`, user : { username : options.username || ''}, path : ``
, get url(){ return `${this.server}/${this.owner}`}
, title : 'chess-private'
, accessibility : ['private']
, push : 'no-pushing', private : true
}
, get username(){ return this.user.username }
, owner : 'chess'
}
, 'chess-github' : { priority : 3,
server : `https://github.com`, user : 'baptistdev', path : ``
, get url(){ return `${this.server}/${this.user}/${this.path}`} // fetch
server : `https://github.com`, user : { username : 'baptistdev'}, path : ``
, get url(){ return `${this.server}/${this.owner}`} // fetch
, title : 'chess-github'
, accessibility : ['public']
, push : 'no-pushing' //, external : true, public : true
, push : 'no-pushing' //, external : true, public : true
, get username(){ return this.user.username }
, owner : 'chess'
}
}
@@ -57,34 +65,45 @@ module.exports = ((name, options)=>{
utils.assign_core( { arraymergetype : utils.assign_core.DISTINCT_UNION }
, remotes
, { 'userfork' : {
priority : 1,
server : `${options.reposerver}`, user : `${options.username}`, path : ``
, get url(){ return `${this.server}/${this.user}/${this.path}`} // fetch
, title : 'userfork'
priority : 1,
server : `${options.reposerver}`, user : { username : `${options.username}`}, path : ``
, get url(){ return `${this.server}/${this.user.username}`} // fetch
, title : 'userfork'
, get username(){ return this.user.username }
, get owner(){ return this.username }
, pushable : true
}
, 'userfork-public' : {
priority : 1,
server : `https://git.bbh.org.in`, user : `${options.username}`, path : ``
, get url(){ return `${this.server}/${this.user}/${this.path}`}
server : `https://git.bbh.org.in`, user : {username : `${options.username}`}, path : ``
, get url(){ return `${this.server}/${this.user.username}`}
// PB : TODO - Other users may have access to this users repo. However that needs to be defined as a new remote
, title : 'userfork-public'
, accessibility : ['public'] /*public : true, external: true */
, get username(){ return this.user.username }
, get owner(){ return this.username }
, pushable : true
}
// PB : TODO -- Load private repositories from private config...
, 'userfork-private' : { priority : 2,
server : `http://git.bbh`, user : options.username || '', path : ``
, get url(){ return `${this.server}/${options.username}/${this.path}`}
server : `http://git.bbh`, user : { username : options.username || ''}, path : ``
, get url(){ return `${this.server}/${this.user.username}`}
, title : 'userfork-private'
, accessibility : ['private']
}
, get username(){ return this.user.username }
, get owner(){ return this.username }
}
, 'userfork-unc' : {
priority : 3,
server : `//172.16.0.27/repos`, user : `${options.username}`, path : ``
, get url(){ return `${this.server}/${this.user}/${this.path}`} // fetch
server : `//172.16.0.27/repos`, user : { username : `${options.username}`}, path : ``
, get url(){ return `${this.server}/${this.user.username}`} // fetch
, title : 'userfork-unc'
, accessibility : ['unc']
// , unc : true, private : true
}
, get username(){ return this.user.username }
, get owner(){ return this.username }
, pushable : true
}
}
)
}
@@ -142,12 +161,6 @@ module.exports = ((name, options)=>{
reposervers : Object.keys(reposerverinstances)
, reposerverinstances
, remotes
, get reposindexed(){
// PB : TODO -- Implement -- One time gettor and then cached...
var indexed = {}
this.repos.forEach(r => { indexed[r.repo] = r })
return indexed;
}
, repos : [
{ repo : 'elxr' }
]

+ 13
- 5
win_verse.js Parādīt failu

@@ -1,5 +1,6 @@
const { any } = require('bbhverse');
const fs = require('fs')
var path = require('path');

var cli = require('./cliverse')
var nodeShellExec = cli.nodeShellExec;
@@ -138,14 +139,21 @@ var shell_verse = {
}).then((exitcode) => {
console.log('Elevated')
__isElevated = true;
}).catch(() => {
shell_verse.acquireElevationState = ()=> Promise.resolve(__isElevated);
shell_verse.isElevated = () => { return Promise.resolve(__isElevated)}
return __isElevated
}).catch((e) => {
__isElevated = false;
console.log('Not Elevated');
}).finally(()=>{
shell_verse.acquireElevationState = ()=> Promise.resolve(__isElevated);
shell_verse.isElevated = () => { return Promise.resolve(__isElevated)}
return __isElevated;
console.log('Not Elevated');
return __isElevated
})
// .finally(()=>{
// shell_verse.acquireElevationState = ()=> Promise.resolve(__isElevated);
// shell_verse.isElevated = () => { return Promise.resolve(__isElevated)}
// // return __isElevated; // Value returned from finally is not supported by node.
// })
}
, getTaskCheckExists : cli.createTask('getTaskCheckExists', 'where')
@@ -175,7 +183,7 @@ var shell_verse = {
console.log('result : ' + JSON.stringify(r))
Object.keys(processedArgs).forEach((v) => { v != '_' ? namedArgs.push('--' + v + '=' + processedArgs[v]) : null; })
// PB : TODO -- Convert all the cli args back to string.
var args = [`${selectedinstance.root}/.elxr/run-${taskToRun.runtimestamp}/windowselevate.hta`].concat(processedArgs._)
var args = [ path.normalize(`${selectedinstance.root}/.elxr/run-${taskToRun.runtimestamp}/windowselevate.hta`) ].concat(processedArgs._)
namedArgs.length > 0 ? args = args.concat(namedArgs.join(' ')) : null;
args.push('--runas=self');
var elevatedruntimestamp = (new Date()).getTime()

Notiek ielāde…
Atcelt
Saglabāt