Comparing version 10.0.0 to 10.1.0
14
app.js
@@ -42,2 +42,3 @@ /* @author Jim Manton: jrman@risebroadband.net | ||
t.getObjs = t.getObjs.bind(this) | ||
t.logMsg = t.logMsg.bind(this) | ||
return t | ||
@@ -112,2 +113,6 @@ } catch (e) { | ||
logMsg(msg, props = {}) { | ||
console.log(msg) | ||
} | ||
load(props) { | ||
@@ -119,5 +124,2 @@ try { | ||
if (typeof props != `undefined`) { | ||
if (typeof props.log != `undefined`) { | ||
console.log = props.log | ||
} | ||
if (typeof props.appender != `undefined` && | ||
@@ -159,3 +161,3 @@ typeof props.appender == 'string') { | ||
e.message = "queueObj app.js load error: " + e.message | ||
console.log(e.message) | ||
t.logMsg(e.message) | ||
throw (e) | ||
@@ -215,3 +217,3 @@ } | ||
e.message = "queueObj app.js add error: " + e.message | ||
console.log(e.message.red) | ||
t.logMsg(e.message.red) | ||
throw (e) | ||
@@ -253,3 +255,3 @@ } | ||
e.message = "queueObj app.js load error: " + e.message | ||
console.log(e.message.red) | ||
t.logMsg(e.message.red) | ||
throw (e) | ||
@@ -256,0 +258,0 @@ } |
@@ -46,3 +46,3 @@ /* | ||
} catch (e) { | ||
console.log(`pro error: (${e.message})`.red) | ||
t.parent.getParent()(`pro error: (${e.message})`.red) | ||
throw e | ||
@@ -72,5 +72,5 @@ } | ||
t.any_errors = true | ||
console.log(`${JSON.stringify(obj_props)}`.red) | ||
t.parent.getParent().logMsg(`${JSON.stringify(obj_props)}`.red) | ||
} else { | ||
console.log(`${JSON.stringify(obj_props)}`.green) | ||
t.parent.getParent().logMsg(`${JSON.stringify(obj_props)}`.green) | ||
} | ||
@@ -80,3 +80,3 @@ t.parent.results_array.push(obj_props) | ||
} catch (e) { | ||
console.log(`pro obj error: (${e.message})`.red) | ||
t.parent.getParent().logMsg(`pro obj error: (${e.message})`.red) | ||
throw e | ||
@@ -86,3 +86,3 @@ } | ||
} catch (e) { | ||
e.message = `10.01 error: ${e.message} ` | ||
e.message = `error: ${e.message} ` | ||
throw e | ||
@@ -89,0 +89,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
}, | ||
"version": "10.0.0", | ||
"version": "10.1.0", | ||
"bundleDependencies": false, | ||
@@ -8,0 +8,0 @@ "dependencies": { |
@@ -34,11 +34,11 @@ var colors = require('colors') | ||
qObj.load(props).add(new test1()).add(new test2()).add(new test3()).add(new test4()).process({}).then(res => { | ||
console.log(`success with all processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with all processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
// console.log(`error with all processing: (${JSON.stringify(err)})`.red) //show all results | ||
console.log(`error with all processing: (${err.execution_time})`.red) //show the execution time | ||
// qObj.logMsg(`error with all processing: (${JSON.stringify(err)})`.red) //show all results | ||
qObj.logMsg(`error with all processing: (${err})`.red) //show the execution time | ||
err.responses.map((jItem, i) => { | ||
if (typeof jItem.error != 'undefined' && typeof jItem.error.msg != 'undefined') { | ||
console.log(`error: ${jItem.error.msg}`.red) //show the error | ||
qObj.logMsg(`error: ${jItem.error.msg}`.red) //show the error | ||
} | ||
}) | ||
}) |
@@ -26,5 +26,5 @@ var colors = require('colors') | ||
qObj.load(props).add(new test1()).add(new test2(qObj)).add(new test3()).process({}).then(res => { | ||
console.log(`success with all sync processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with all sync processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
console.log(`errors with all sync processing: (${JSON.stringify(err)})`.red) | ||
qObj.logMsg(`errors with all sync processing: (${JSON.stringify(err)})`.red) | ||
}) |
@@ -40,6 +40,6 @@ var colors = require('colors') | ||
qObj.load(props).add(tst1.some_function).add(tst2.a_func).add(tst3.cool).process().then(res => { | ||
console.log(`success with func_all processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with func_all processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
console.log(`errors with func_all processing: (${JSON.stringify(err)})`.red) | ||
qObj.logMsg(`errors with func_all processing: (${JSON.stringify(err)})`.red) | ||
}) | ||
@@ -40,3 +40,3 @@ /* | ||
ping() { | ||
console.log('hello from test2'.rainbow) | ||
qObj.logMsg('hello from test2'.rainbow) | ||
} | ||
@@ -78,11 +78,11 @@ } | ||
qObj.process({ property: 'status', items: ['init'] }).then(res => { | ||
console.log(`success with status processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with status processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
console.log(`errors with status processing: (${JSON.stringify(err)})`.red) | ||
qObj.logMsg(`errors with status processing: (${JSON.stringify(err)})`.red) | ||
}) | ||
// qObj.process({ property: 'status', items: ['error'] }).then(res => { | ||
// console.log(`success with status error processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
// qObj.logMsg(`success with status error processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
// }, err => { | ||
// console.log(`errors with status error processing: (${JSON.stringify(err)})`.red) | ||
// qObj.logMsg(`errors with status error processing: (${JSON.stringify(err)})`.red) | ||
// }) |
@@ -18,4 +18,4 @@ /* | ||
setTimeout(() => { | ||
console.log(`processing test1`.cyan) | ||
console.log(`some async process`) | ||
qObj.logMsg(`processing test1`.cyan) | ||
qObj.logMsg(`some async process`) | ||
callback({success: {msg: `processing all (${this.id})`}}) | ||
@@ -39,3 +39,3 @@ }, 3000) | ||
ping() { | ||
console.log('hello from test2'.rainbow) | ||
qObj.logMsg('hello from test2'.rainbow) | ||
} | ||
@@ -76,7 +76,7 @@ } | ||
qObj.process().then(res => { | ||
console.log(`success with all sync processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with all sync processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
console.log(`errors with all sync processing: (${JSON.stringify(err)})`.red) | ||
qObj.logMsg(`errors with all sync processing: (${JSON.stringify(err)})`.red) | ||
}) | ||
@@ -26,6 +26,6 @@ var colors = require('colors') | ||
qObj.load(props).add(new test1()).add(new test2(qObj)).add(new test3()).process({}).then(res => { | ||
console.log(`success with all sync processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with all sync processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
console.log(`errors with all sync processing: (${JSON.stringify(err)})`.red) | ||
qObj.logMsg(`errors with all sync processing: (${JSON.stringify(err)})`.red) | ||
}) | ||
@@ -38,3 +38,3 @@ /* | ||
ping() { | ||
console.log('hello from test2'.rainbow) | ||
qObj.logMsg('hello from test2'.rainbow) | ||
} | ||
@@ -89,11 +89,11 @@ } | ||
qObj.process({ property: 'version', items: ['dev', 'test'] }).then(res => { | ||
console.log(`success with status processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
qObj.logMsg(`success with status processing: (${JSON.stringify(res)})`.bold.italic.green) | ||
}, err => { | ||
console.log(`errors with status processing: (${JSON.stringify(err)})`.red) | ||
qObj.logMsg(`errors with status processing: (${JSON.stringify(err)})`.red) | ||
}) | ||
// qObj.process({ property: 'version', items: ['v1234'] }).then(res => { | ||
// console.log(`4) done with version synchronous processing: (${res})`.bold.italic.green) | ||
// qObj.logMsg(`4) done with version synchronous processing: (${res})`.bold.italic.green) | ||
// }, err => { | ||
// console.log(`4) errors with version synchronous processing: (${err})`.red) | ||
// qObj.logMsg(`4) errors with version synchronous processing: (${err})`.red) | ||
// }) |
@@ -9,3 +9,3 @@ const assert = require('assert'), | ||
}, | ||
"version": "10.0.0", | ||
"version": "10.1.0", | ||
"bundleDependencies": false, | ||
@@ -12,0 +12,0 @@ "dependencies": { |
33998
917