|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(clioverrides.reconfirm) { |
|
|
|
|
|
var reconfirm = { 'instanceName' : clioverrides['instanceName'] === 'chess' } |
|
|
|
|
|
} |
|
|
|
|
|
else { var reconfirm = {}; } |
|
|
|
|
|
|
|
|
var getBoundEachPrompt = function(target, mustPrompt, promptables, choices) { |
|
|
var getBoundEachPrompt = function(target, mustPrompt, promptables, choices) { |
|
|
return function(prompts, k, i, a){ |
|
|
return function(prompts, k, i, a){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var __interactve_promts = function( target, choices ){ |
|
|
|
|
|
|
|
|
var __interactive_prompts = function( target, choices ){ |
|
|
|
|
|
|
|
|
Object.defineProperty(target, 'node_env', { get : function(){ return this.instanceType } }); |
|
|
Object.defineProperty(target, 'node_env', { get : function(){ return this.instanceType } }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chessinstances[instanceName][node_env] |
|
|
chessinstances[instanceName][node_env] |
|
|
, clioverrides |
|
|
, clioverrides |
|
|
, selected_overrides |
|
|
, selected_overrides |
|
|
// , __interactve_promts -- Cant just override. Also need selectedinstance to be ready... |
|
|
|
|
|
|
|
|
// , __interactive_prompts -- Cant just override. Also need selectedinstance to be ready... |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
// chessinstances[instanceName] = chessinstances[instanceName] || {} |
|
|
// chessinstances[instanceName] = chessinstances[instanceName] || {} |
|
|
|
|
|
|
|
|
selectedinstance = utils.assign( ...detectedinstanceoptions.slice(-2) ) |
|
|
selectedinstance = utils.assign( ...detectedinstanceoptions.slice(-2) ) |
|
|
promptkeys = utils.assign(promptkeys, clioverrides) |
|
|
promptkeys = utils.assign(promptkeys, clioverrides) |
|
|
|
|
|
|
|
|
if(clioverrides.reconfirm) { |
|
|
|
|
|
var reconfirm = { 'instanceName' : selectedinstance['instanceName'] === 'chess' } |
|
|
|
|
|
} |
|
|
|
|
|
else { var reconfirm = {}; } |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
chessinstances = acquirelocalinstances(selectedinstance); |
|
|
chessinstances = acquirelocalinstances(selectedinstance); |
|
|
findlocalinstances(chessinstances, detectedinstanceoptions) |
|
|
findlocalinstances(chessinstances, detectedinstanceoptions) |
|
|
|
|
|
|
|
|
|
|
|
initinstances(selectedinstance) // use the local instances for defaults if at all possible. |
|
|
var choices = getchoices(detectedinstanceoptions, promptkeys) |
|
|
var choices = getchoices(detectedinstanceoptions, promptkeys) |
|
|
var todo = any( __interactve_promts(selectedinstance, choices) ).then(()=>{ |
|
|
|
|
|
|
|
|
var todo = any( __interactive_prompts(selectedinstance, choices) ).then(()=>{ |
|
|
return initinstances(selectedinstance) |
|
|
return initinstances(selectedinstance) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
catch (e) { |
|
|
catch (e) { |
|
|
// PB : TODO -- verbose mode warning.. console.warn(e) // Missing chessinstances is not an error... |
|
|
// PB : TODO -- verbose mode warning.. console.warn(e) // Missing chessinstances is not an error... |
|
|
var choices = getchoices(detectedinstanceoptions, promptkeys) |
|
|
var choices = getchoices(detectedinstanceoptions, promptkeys) |
|
|
var todo = any( __interactve_promts(selectedinstance, choices) ).then(()=>{ |
|
|
|
|
|
|
|
|
var todo = any( __interactive_prompts(selectedinstance, choices) ).then(()=>{ |
|
|
return initinstances(selectedinstance) |
|
|
return initinstances(selectedinstance) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|