Quellcode durchsuchen

Elevated Fixes

production
chess vor 3 Jahren
Ursprung
Commit
37255a9f72
2 geänderte Dateien mit 39 neuen und 31 gelöschten Zeilen
  1. 34
    26
      i.js
  2. 5
    5
      index.js

+ 34
- 26
i.js Datei anzeigen

// Version: 1.0.0 - May 7, 2021 10:41:16
/* Version: 1.0.0 - May 8, 2021 11:38:39 */
'use strict'; 'use strict';


var path$1 = require('path'); var path$1 = require('path');
function bytesToUuid(buf, offset) { function bytesToUuid(buf, offset) {
var i = offset || 0; var i = offset || 0;
var bth = byteToHex; var bth = byteToHex;
return bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]];
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
return ([
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]]
]).join('');
} }


var bytesToUuid_1 = bytesToUuid; var bytesToUuid_1 = bytesToUuid;
var _lastMSecs = 0; var _lastMSecs = 0;
var _lastNSecs = 0; var _lastNSecs = 0;


// See https://github.com/broofa/node-uuid for API details
// See https://github.com/uuidjs/uuid for API details
function v1(options, buf, offset) { function v1(options, buf, offset) {
var i = buf && offset || 0; var i = buf && offset || 0;
var b = buf || []; var b = buf || [];
var i = ai; var i = ai;


if (ai >= 0 && bi > 0) { if (ai >= 0 && bi > 0) {
if(a===b) {
return [ai, bi];
}
begs = []; begs = [];
left = str.length; left = str.length;


pathIsAbsolute.posix = posix_1; pathIsAbsolute.posix = posix_1;
pathIsAbsolute.win32 = win32_1; pathIsAbsolute.win32 = win32_1;


var alphasort_1 = alphasort;
var alphasorti_1 = alphasorti;
var setopts_1 = setopts$2; var setopts_1 = setopts$2;
var ownProp_1 = ownProp$2; var ownProp_1 = ownProp$2;
var makeAbs_1 = makeAbs; var makeAbs_1 = makeAbs;


var Minimatch = minimatch_1.Minimatch; var Minimatch = minimatch_1.Minimatch;


function alphasorti (a, b) {
return a.toLowerCase().localeCompare(b.toLowerCase())
}

function alphasort (a, b) { function alphasort (a, b) {
return a.localeCompare(b)
return a.localeCompare(b, 'en')
} }


function setupIgnores (self, options) { function setupIgnores (self, options) {
all = Object.keys(all); all = Object.keys(all);


if (!self.nosort) if (!self.nosort)
all = all.sort(self.nocase ? alphasorti : alphasort);
all = all.sort(alphasort);


// at *some* point we statted all of these // at *some* point we statted all of these
if (self.mark) { if (self.mark) {
} }


var common = { var common = {
alphasort: alphasort_1,
alphasorti: alphasorti_1,
setopts: setopts_1, setopts: setopts_1,
ownProp: ownProp_1, ownProp: ownProp_1,
makeAbs: makeAbs_1, makeAbs: makeAbs_1,


var sync = globSync; var sync = globSync;
globSync.GlobSync = GlobSync$1; globSync.GlobSync = GlobSync$1;





var setopts$1 = common.setopts; var setopts$1 = common.setopts;
var ownProp$1 = common.ownProp; var ownProp$1 = common.ownProp;
var childrenIgnored$1 = common.childrenIgnored; var childrenIgnored$1 = common.childrenIgnored;
} }


var EE = require$$0__default$1['default'].EventEmitter; var EE = require$$0__default$1['default'].EventEmitter;





var setopts = common.setopts; var setopts = common.setopts;
var ownProp = common.ownProp; var ownProp = common.ownProp;








const BUILD_VERSION = 'Version: 1.0.0 - built on May 7, 2021 10:41:16';
const BUILD_VERSION = 'Version: 1.0.0 - built on May 8, 2021 11:38:39';
function getVersion() { return BUILD_VERSION; } function getVersion() { return BUILD_VERSION; }
console.log(getVersion()); console.log(getVersion());


} }
return any(tasks).then(()=>{ return any(tasks).then(()=>{
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch})))
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch, requiresElevation : true})))
// pull or clone target branch // pull or clone target branch
.then( () => any(elevatedRunasRepos.map((repo) => performPullAll({repo}))) ) .then( () => any(elevatedRunasRepos.map((repo) => performPullAll({repo}))) )
// switch to source branch // switch to source branch
.then( () => { .then( () => {
if(mergesource) return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch: mergesource})))
if(mergesource) return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch: mergesource, requiresElevation : true})))
else return Promise.resolve(true) // Dont do anything if there is no source to merge from. else return Promise.resolve(true) // Dont do anything if there is no source to merge from.
}) })
//Pull on merge source branch //Pull on merge source branch
.then( () => { .then( () => {
if(!mergesource) return Promise.resolve(true) if(!mergesource) return Promise.resolve(true)
return any(elevatedRunasRepos.map((repo) => performPullAll({repo})))
return any(elevatedRunasRepos.map((repo) => performPullAll({repo, requiresElevation : true })))
}) })
//Switch to target branch //Switch to target branch
.then( () => { .then( () => {
if(!mergesource) return Promise.resolve(true) if(!mergesource) return Promise.resolve(true)
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch})))
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch, requiresElevation : true})))
}) })
.then( //Merge source branch to target branch .then( //Merge source branch to target branch
() => { () => {
if(!mergesource) return Promise.resolve(true) if(!mergesource) return Promise.resolve(true)
return any(elevatedRunasRepos.map((repo) => performMerge({ repo }))).catch(err => { console.error('error in performMerge ' + err); })
return any(elevatedRunasRepos.map((repo) => performMerge({ repo, requiresElevation : true }))).catch(err => { console.error('error in performMerge ' + err); })
}) })
.then(() => { .then(() => {
fs.writeFileSync('run.done', 'success'); fs.writeFileSync('run.done', 'success');

+ 5
- 5
index.js Datei anzeigen

} }
return any(tasks).then(()=>{ return any(tasks).then(()=>{
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch})))
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch, requiresElevation : true})))
// pull or clone target branch // pull or clone target branch
.then( () => any(elevatedRunasRepos.map((repo) => performPullAll({repo}))) ) .then( () => any(elevatedRunasRepos.map((repo) => performPullAll({repo}))) )
// switch to source branch // switch to source branch
.then( () => { .then( () => {
if(mergesource) return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch: mergesource})))
if(mergesource) return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch: mergesource, requiresElevation : true})))
else return Promise.resolve(true) // Dont do anything if there is no source to merge from. else return Promise.resolve(true) // Dont do anything if there is no source to merge from.
}) })
//Pull on merge source branch //Pull on merge source branch
.then( () => { .then( () => {
if(!mergesource) return Promise.resolve(true) if(!mergesource) return Promise.resolve(true)
return any(elevatedRunasRepos.map((repo) => performPullAll({repo})))
return any(elevatedRunasRepos.map((repo) => performPullAll({repo, requiresElevation : true })))
}) })
//Switch to target branch //Switch to target branch
.then( () => { .then( () => {
if(!mergesource) return Promise.resolve(true) if(!mergesource) return Promise.resolve(true)
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch})))
return any(elevatedRunasRepos.map((repo) => performCheckout({ repo, branch, requiresElevation : true})))
}) })
.then( //Merge source branch to target branch .then( //Merge source branch to target branch
() => { () => {
if(!mergesource) return Promise.resolve(true) if(!mergesource) return Promise.resolve(true)
return any(elevatedRunasRepos.map((repo) => performMerge({ repo }))).catch(err => { console.error('error in performMerge ' + err) })
return any(elevatedRunasRepos.map((repo) => performMerge({ repo, requiresElevation : true }))).catch(err => { console.error('error in performMerge ' + err) })
}) })
.then(() => { .then(() => {
fs.writeFileSync('run.done', 'success') fs.writeFileSync('run.done', 'success')

Laden…
Abbrechen
Speichern