fable 3.0.78 → 3.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -615,30 +615,30 @@ if(flags.once){emitter.removeEventListener(name,wrapListener);}listener(arg);});
615
615
  *
616
616
  *
617
617
  * @author Steven Velozo <steven@velozo.com>
618
- */var BaseLogger=/*#__PURE__*/function(){function BaseLogger(pLogStreamSettings,pFableLog){_classCallCheck2(this,BaseLogger);// This should not possibly be able to be instantiated without a settings object
619
- this._Settings=_typeof(pLogStreamSettings)=='object'?pLogStreamSettings:{};// The base logger does nothing but associate a UUID with itself
618
+ */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;var BaseLogger=/*#__PURE__*/function(_libFableServiceProvi2){_inherits(BaseLogger,_libFableServiceProvi2);var _super2=_createSuper(BaseLogger);function BaseLogger(pLogStreamSettings,pLogStreamHash){var _this6;_classCallCheck2(this,BaseLogger);_this6=_super2.call(this,pLogStreamSettings,pLogStreamHash);// This should not possibly be able to be instantiated without a settings object
619
+ _this6._Settings=_typeof(pLogStreamSettings)=='object'?pLogStreamSettings:{};_this6.serviceType='Logging-Provider';// The base logger does nothing but associate a UUID with itself
620
620
  // We added this as the mechanism for tracking loggers to allow multiple simultaneous streams
621
621
  // to the same provider.
622
- this.loggerUUID=this.generateInsecureUUID();// Eventually we can use this array to ompute which levels the provider allows.
622
+ _this6.loggerUUID=_this6.generateInsecureUUID();// Eventually we can use this array to ompute which levels the provider allows.
623
623
  // For now it's just used to precompute some string concatenations.
624
- this.levels=["trace","debug","info","warn","error","fatal"];}// This is meant to generate programmatically insecure UUIDs to identify loggers
624
+ _this6.levels=["trace","debug","info","warn","error","fatal"];return _this6;}// This is meant to generate programmatically insecure UUIDs to identify loggers
625
625
  _createClass2(BaseLogger,[{key:"generateInsecureUUID",value:function generateInsecureUUID(){var tmpDate=new Date().getTime();var tmpUUID='LOGSTREAM-xxxxxx-yxxxxx'.replace(/[xy]/g,function(pCharacter){// Funny algorithm from w3resource that is twister-ish without the deep math and security
626
626
  // ..but good enough for unique log stream identifiers
627
627
  var tmpRandomData=(tmpDate+Math.random()*16)%16|0;tmpDate=Math.floor(tmpDate/16);return(pCharacter=='x'?tmpRandomData:tmpRandomData&0x3|0x8).toString(16);});return tmpUUID;}},{key:"initialize",value:function initialize(){// No operation.
628
628
  }},{key:"trace",value:function trace(pLogText,pLogObject){this.write("trace",pLogText,pLogObject);}},{key:"debug",value:function debug(pLogText,pLogObject){this.write("debug",pLogText,pLogObject);}},{key:"info",value:function info(pLogText,pLogObject){this.write("info",pLogText,pLogObject);}},{key:"warn",value:function warn(pLogText,pLogObject){this.write("warn",pLogText,pLogObject);}},{key:"error",value:function error(pLogText,pLogObject){this.write("error",pLogText,pLogObject);}},{key:"fatal",value:function fatal(pLogText,pLogObject){this.write("fatal",pLogText,pLogObject);}},{key:"write",value:function write(pLogLevel,pLogText,pLogObject){// The base logger does nothing.
629
- return true;}}]);return BaseLogger;}();module.exports=BaseLogger;},{}],30:[function(require,module,exports){/**
629
+ return true;}}]);return BaseLogger;}(libFableServiceProviderBase);module.exports=BaseLogger;},{"fable-serviceproviderbase":36}],30:[function(require,module,exports){/**
630
630
  * Default Logger Provider Function
631
631
  *
632
632
  *
633
633
  * @author Steven Velozo <steven@velozo.com>
634
634
  */ // Return the providers that are available without extensions loaded
635
- var getDefaultProviders=function getDefaultProviders(){var tmpDefaultProviders={};tmpDefaultProviders.console=require('./Fable-Log-Logger-Console.js');tmpDefaultProviders["default"]=tmpDefaultProviders.console;return tmpDefaultProviders;};module.exports=getDefaultProviders();},{"./Fable-Log-Logger-Console.js":32}],31:[function(require,module,exports){module.exports=[{"loggertype":"console","streamtype":"console","level":"trace"}];},{}],32:[function(require,module,exports){var libBaseLogger=require('./Fable-Log-BaseLogger.js');var ConsoleLogger=/*#__PURE__*/function(_libBaseLogger){_inherits(ConsoleLogger,_libBaseLogger);var _super2=_createSuper(ConsoleLogger);function ConsoleLogger(pLogStreamSettings,pFableLog){var _this6;_classCallCheck2(this,ConsoleLogger);_this6=_super2.call(this,pLogStreamSettings);_this6._ShowTimeStamps=_this6._Settings.hasOwnProperty('showtimestamps')?_this6._Settings.showtimestamps==true:true;_this6._FormattedTimeStamps=_this6._Settings.hasOwnProperty('formattedtimestamps')?_this6._Settings.formattedtimestamps==true:true;_this6._ContextMessage=_this6._Settings.hasOwnProperty('Context')?"(".concat(_this6._Settings.Context,")"):pFableLog._Settings.hasOwnProperty('Product')?"(".concat(pFableLog._Settings.Product,")"):'Unnamed_Log_Context';// Allow the user to decide what gets output to the console
636
- _this6._OutputLogLinesToConsole=_this6._Settings.hasOwnProperty('outputloglinestoconsole')?_this6._Settings.outputloglinestoconsole:true;_this6._OutputObjectsToConsole=_this6._Settings.hasOwnProperty('outputobjectstoconsole')?_this6._Settings.outputobjectstoconsole:true;// Precompute the prefix for each level
637
- _this6.prefixCache={};for(var i=0;i<=_this6.levels.length;i++){_this6.prefixCache[_this6.levels[i]]="[".concat(_this6.levels[i],"] ").concat(_this6._ContextMessage,": ");if(_this6._ShowTimeStamps){// If there is a timestamp we need a to prepend space before the prefixcache string, since the timestamp comes first
638
- _this6.prefixCache[_this6.levels[i]]=' '+_this6.prefixCache[_this6.levels[i]];}}return _this6;}_createClass2(ConsoleLogger,[{key:"write",value:function write(pLevel,pLogText,pObject){var tmpTimeStamp='';if(this._ShowTimeStamps&&this._FormattedTimeStamps){tmpTimeStamp=new Date().toISOString();}else if(this._ShowTimeStamps){tmpTimeStamp=+new Date();}var tmpLogLine="".concat(tmpTimeStamp).concat(this.prefixCache[pLevel]).concat(pLogText);if(this._OutputLogLinesToConsole){console.log(tmpLogLine);}// Write out the object on a separate line if it is passed in
635
+ var getDefaultProviders=function getDefaultProviders(){var tmpDefaultProviders={};tmpDefaultProviders.console=require('./Fable-Log-Logger-Console.js');tmpDefaultProviders["default"]=tmpDefaultProviders.console;return tmpDefaultProviders;};module.exports=getDefaultProviders();},{"./Fable-Log-Logger-Console.js":32}],31:[function(require,module,exports){module.exports=[{"loggertype":"console","streamtype":"console","level":"trace"}];},{}],32:[function(require,module,exports){var libBaseLogger=require('./Fable-Log-BaseLogger.js');var ConsoleLogger=/*#__PURE__*/function(_libBaseLogger){_inherits(ConsoleLogger,_libBaseLogger);var _super3=_createSuper(ConsoleLogger);function ConsoleLogger(pLogStreamSettings,pFableLog){var _this7;_classCallCheck2(this,ConsoleLogger);_this7=_super3.call(this,pLogStreamSettings);_this7._ShowTimeStamps=_this7._Settings.hasOwnProperty('showtimestamps')?_this7._Settings.showtimestamps==true:true;_this7._FormattedTimeStamps=_this7._Settings.hasOwnProperty('formattedtimestamps')?_this7._Settings.formattedtimestamps==true:true;_this7._ContextMessage=_this7._Settings.hasOwnProperty('Context')?"(".concat(_this7._Settings.Context,")"):pFableLog._Settings.hasOwnProperty('Product')?"(".concat(pFableLog._Settings.Product,")"):'Unnamed_Log_Context';// Allow the user to decide what gets output to the console
636
+ _this7._OutputLogLinesToConsole=_this7._Settings.hasOwnProperty('outputloglinestoconsole')?_this7._Settings.outputloglinestoconsole:true;_this7._OutputObjectsToConsole=_this7._Settings.hasOwnProperty('outputobjectstoconsole')?_this7._Settings.outputobjectstoconsole:true;// Precompute the prefix for each level
637
+ _this7.prefixCache={};for(var i=0;i<=_this7.levels.length;i++){_this7.prefixCache[_this7.levels[i]]="[".concat(_this7.levels[i],"] ").concat(_this7._ContextMessage,": ");if(_this7._ShowTimeStamps){// If there is a timestamp we need a to prepend space before the prefixcache string, since the timestamp comes first
638
+ _this7.prefixCache[_this7.levels[i]]=' '+_this7.prefixCache[_this7.levels[i]];}}return _this7;}_createClass2(ConsoleLogger,[{key:"write",value:function write(pLevel,pLogText,pObject){var tmpTimeStamp='';if(this._ShowTimeStamps&&this._FormattedTimeStamps){tmpTimeStamp=new Date().toISOString();}else if(this._ShowTimeStamps){tmpTimeStamp=+new Date();}var tmpLogLine="".concat(tmpTimeStamp).concat(this.prefixCache[pLevel]).concat(pLogText);if(this._OutputLogLinesToConsole){console.log(tmpLogLine);}// Write out the object on a separate line if it is passed in
639
639
  if(this._OutputObjectsToConsole&&typeof pObject!=='undefined'){console.log(JSON.stringify(pObject,null,2));}// Provide an easy way to be overridden and be consistent
640
- return tmpLogLine;}}]);return ConsoleLogger;}(libBaseLogger);module.exports=ConsoleLogger;},{"./Fable-Log-BaseLogger.js":29}],33:[function(require,module,exports){var libConsoleLog=require('./Fable-Log-Logger-Console.js');var libFS=require('fs');var libPath=require('path');var SimpleFlatFileLogger=/*#__PURE__*/function(_libConsoleLog){_inherits(SimpleFlatFileLogger,_libConsoleLog);var _super3=_createSuper(SimpleFlatFileLogger);function SimpleFlatFileLogger(pLogStreamSettings,pFableLog){var _this7;_classCallCheck2(this,SimpleFlatFileLogger);_this7=_super3.call(this,pLogStreamSettings,pFableLog);// If a path isn't provided for the logfile, it tries to use the ProductName or Context
641
- _this7.logFileRawPath=_this7._Settings.hasOwnProperty('path')?_this7._Settings.path:"./".concat(_this7._ContextMessage,".log");_this7.logFilePath=libPath.normalize(_this7.logFileRawPath);_this7.logFileStreamOptions=_this7._Settings.hasOwnProperty('fileStreamoptions')?_this7._Settings.fileStreamOptions:{"flags":"a","encoding":"utf8"};_this7.fileWriter=libFS.createWriteStream(_this7.logFilePath,_this7.logFileStreamOptions);_this7.activelyWriting=false;_this7.logLineStrings=[];_this7.logObjectStrings=[];_this7.defaultWriteCompleteCallback=function(){};_this7.defaultBufferFlushCallback=function(){};return _this7;}_createClass2(SimpleFlatFileLogger,[{key:"closeWriter",value:function closeWriter(fCloseComplete){var tmpCloseComplete=typeof fCloseComplete=='function'?fCloseComplete:function(){};if(this.fileWriter){this.fileWriter.end('\n');return this.fileWriter.once('finish',tmpCloseComplete.bind(this));}}},{key:"completeBufferFlushToLogFile",value:function completeBufferFlushToLogFile(fFlushComplete){this.activelyWriting=false;var tmpFlushComplete=typeof fFlushComplete=='function'?fFlushComplete:this.defaultBufferFlushCallback;if(this.logLineStrings.length>0){this.flushBufferToLogFile(tmpFlushComplete);}else{return tmpFlushComplete();}}},{key:"flushBufferToLogFile",value:function flushBufferToLogFile(fFlushComplete){if(!this.activelyWriting){// Only want to be writing one thing at a time....
640
+ return tmpLogLine;}}]);return ConsoleLogger;}(libBaseLogger);module.exports=ConsoleLogger;},{"./Fable-Log-BaseLogger.js":29}],33:[function(require,module,exports){var libConsoleLog=require('./Fable-Log-Logger-Console.js');var libFS=require('fs');var libPath=require('path');var SimpleFlatFileLogger=/*#__PURE__*/function(_libConsoleLog){_inherits(SimpleFlatFileLogger,_libConsoleLog);var _super4=_createSuper(SimpleFlatFileLogger);function SimpleFlatFileLogger(pLogStreamSettings,pFableLog){var _this8;_classCallCheck2(this,SimpleFlatFileLogger);_this8=_super4.call(this,pLogStreamSettings,pFableLog);// If a path isn't provided for the logfile, it tries to use the ProductName or Context
641
+ _this8.logFileRawPath=_this8._Settings.hasOwnProperty('path')?_this8._Settings.path:"./".concat(_this8._ContextMessage,".log");_this8.logFilePath=libPath.normalize(_this8.logFileRawPath);_this8.logFileStreamOptions=_this8._Settings.hasOwnProperty('fileStreamoptions')?_this8._Settings.fileStreamOptions:{"flags":"a","encoding":"utf8"};_this8.fileWriter=libFS.createWriteStream(_this8.logFilePath,_this8.logFileStreamOptions);_this8.activelyWriting=false;_this8.logLineStrings=[];_this8.logObjectStrings=[];_this8.defaultWriteCompleteCallback=function(){};_this8.defaultBufferFlushCallback=function(){};return _this8;}_createClass2(SimpleFlatFileLogger,[{key:"closeWriter",value:function closeWriter(fCloseComplete){var tmpCloseComplete=typeof fCloseComplete=='function'?fCloseComplete:function(){};if(this.fileWriter){this.fileWriter.end('\n');return this.fileWriter.once('finish',tmpCloseComplete.bind(this));}}},{key:"completeBufferFlushToLogFile",value:function completeBufferFlushToLogFile(fFlushComplete){this.activelyWriting=false;var tmpFlushComplete=typeof fFlushComplete=='function'?fFlushComplete:this.defaultBufferFlushCallback;if(this.logLineStrings.length>0){this.flushBufferToLogFile(tmpFlushComplete);}else{return tmpFlushComplete();}}},{key:"flushBufferToLogFile",value:function flushBufferToLogFile(fFlushComplete){if(!this.activelyWriting){// Only want to be writing one thing at a time....
642
642
  this.activelyWriting=true;var tmpFlushComplete=typeof fFlushComplete=='function'?fFlushComplete:this.defaultBufferFlushCallback;// Get the current buffer arrays. These should always have matching number of elements.
643
643
  var tmpLineStrings=this.logLineStrings;var tmpObjectStrings=this.logObjectStrings;// Reset these to be filled while we process this queue...
644
644
  this.logLineStrings=[];this.logObjectStrings=[];// This is where we will put each line before writing it to the file...
@@ -648,18 +648,17 @@ this.fileWriter.once('drain',this.completeBufferFlushToLogFile.bind(this,tmpFlus
648
648
  this.logLineStrings.push(tmpLogLine);// Write out the object on a separate line if it is passed in
649
649
  if(typeof pObject!=='undefined'){this.logObjectStrings.push(JSON.stringify(pObject,null,4));}else{this.logObjectStrings.push(false);}this.flushBufferToLogFile();}}]);return SimpleFlatFileLogger;}(libConsoleLog);module.exports=SimpleFlatFileLogger;},{"./Fable-Log-Logger-Console.js":32,"fs":19,"path":65}],34:[function(require,module,exports){/**
650
650
  * Fable Logging Service
651
- */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;var FableLog=/*#__PURE__*/function(_libFableServiceProvi2){_inherits(FableLog,_libFableServiceProvi2);var _super4=_createSuper(FableLog);function FableLog(pSettings,pServiceHash){var _this8;_classCallCheck2(this,FableLog);_this8=_super4.call(this,pSettings,pServiceHash);_this8.serviceType='Logging';var tmpSettings=_typeof(pSettings)==='object'?pSettings:{};_this8._Settings=tmpSettings;_this8._Providers=require('./Fable-Log-DefaultProviders-Node.js');_this8._StreamDefinitions=tmpSettings.hasOwnProperty('LogStreams')?tmpSettings.LogStreams:require('./Fable-Log-DefaultStreams.json');_this8.logStreams=[];// This object gets decorated for one-time instantiated providers that
651
+ */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;var FableLog=/*#__PURE__*/function(_libFableServiceProvi3){_inherits(FableLog,_libFableServiceProvi3);var _super5=_createSuper(FableLog);function FableLog(pSettings,pServiceHash){var _this9;_classCallCheck2(this,FableLog);_this9=_super5.call(this,pSettings,pServiceHash);_this9.serviceType='Logging';var tmpSettings=_typeof(pSettings)==='object'?pSettings:{};_this9._Settings=tmpSettings;_this9._Providers=require('./Fable-Log-DefaultProviders-Node.js');_this9._StreamDefinitions=tmpSettings.hasOwnProperty('LogStreams')?tmpSettings.LogStreams:require('./Fable-Log-DefaultStreams.json');_this9.logStreams=[];// This object gets decorated for one-time instantiated providers that
652
652
  // have multiple outputs, such as bunyan.
653
- _this8.logProviders={};// A hash list of the GUIDs for each log stream, so they can't be added to the set more than one time
654
- _this8.activeLogStreams={};_this8.logStreamsTrace=[];_this8.logStreamsDebug=[];_this8.logStreamsInfo=[];_this8.logStreamsWarn=[];_this8.logStreamsError=[];_this8.logStreamsFatal=[];_this8.datumDecorator=function(pDatum){return pDatum;};_this8.uuid=typeof tmpSettings.Product==='string'?tmpSettings.Product:'Default';return _this8;}_createClass2(FableLog,[{key:"addLogger",value:function addLogger(pLogger,pLevel){// Bail out if we've already created one.
653
+ _this9.logProviders={};// A hash list of the GUIDs for each log stream, so they can't be added to the set more than one time
654
+ _this9.activeLogStreams={};_this9.logStreamsTrace=[];_this9.logStreamsDebug=[];_this9.logStreamsInfo=[];_this9.logStreamsWarn=[];_this9.logStreamsError=[];_this9.logStreamsFatal=[];_this9.datumDecorator=function(pDatum){return pDatum;};_this9.uuid=typeof tmpSettings.Product==='string'?tmpSettings.Product:'Default';return _this9;}_createClass2(FableLog,[{key:"addLogger",value:function addLogger(pLogger,pLevel){// Bail out if we've already created one.
655
655
  if(this.activeLogStreams.hasOwnProperty(pLogger.loggerUUID)){return false;}// Add it to the streams and to the mutex
656
656
  this.logStreams.push(pLogger);this.activeLogStreams[pLogger.loggerUUID]=true;// Make sure a kosher level was passed in
657
657
  switch(pLevel){case'trace':this.logStreamsTrace.push(pLogger);case'debug':this.logStreamsDebug.push(pLogger);case'info':this.logStreamsInfo.push(pLogger);case'warn':this.logStreamsWarn.push(pLogger);case'error':this.logStreamsError.push(pLogger);case'fatal':this.logStreamsFatal.push(pLogger);break;}return true;}},{key:"setDatumDecorator",value:function setDatumDecorator(fDatumDecorator){if(typeof fDatumDecorator==='function'){this.datumDecorator=fDatumDecorator;}else{this.datumDecorator=function(pDatum){return pDatum;};}}},{key:"trace",value:function trace(pMessage,pDatum){var tmpDecoratedDatum=this.datumDecorator(pDatum);for(var i=0;i<this.logStreamsTrace.length;i++){this.logStreamsTrace[i].trace(pMessage,tmpDecoratedDatum);}}},{key:"debug",value:function debug(pMessage,pDatum){var tmpDecoratedDatum=this.datumDecorator(pDatum);for(var i=0;i<this.logStreamsDebug.length;i++){this.logStreamsDebug[i].debug(pMessage,tmpDecoratedDatum);}}},{key:"info",value:function info(pMessage,pDatum){var tmpDecoratedDatum=this.datumDecorator(pDatum);for(var i=0;i<this.logStreamsInfo.length;i++){this.logStreamsInfo[i].info(pMessage,tmpDecoratedDatum);}}},{key:"warn",value:function warn(pMessage,pDatum){var tmpDecoratedDatum=this.datumDecorator(pDatum);for(var i=0;i<this.logStreamsWarn.length;i++){this.logStreamsWarn[i].warn(pMessage,tmpDecoratedDatum);}}},{key:"error",value:function error(pMessage,pDatum){var tmpDecoratedDatum=this.datumDecorator(pDatum);for(var i=0;i<this.logStreamsError.length;i++){this.logStreamsError[i].error(pMessage,tmpDecoratedDatum);}}},{key:"fatal",value:function fatal(pMessage,pDatum){var tmpDecoratedDatum=this.datumDecorator(pDatum);for(var i=0;i<this.logStreamsFatal.length;i++){this.logStreamsFatal[i].fatal(pMessage,tmpDecoratedDatum);}}},{key:"initialize",value:function initialize(){// "initialize" each logger as defined in the logging parameters
658
658
  for(var i=0;i<this._StreamDefinitions.length;i++){var tmpStreamDefinition=Object.assign({loggertype:'default',streamtype:'console',level:'info'},this._StreamDefinitions[i]);if(!this._Providers.hasOwnProperty(tmpStreamDefinition.loggertype)){console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(tmpStreamDefinition)));}else{this.addLogger(new this._Providers[tmpStreamDefinition.loggertype](tmpStreamDefinition,this),tmpStreamDefinition.level);}}// Now initialize each one.
659
659
  for(var _i=0;_i<this.logStreams.length;_i++){this.logStreams[_i].initialize();}}},{key:"logTime",value:function logTime(pMessage,pDatum){var tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time';var tmpTime=new Date();this.info("".concat(tmpMessage," ").concat(tmpTime," (epoch ").concat(+tmpTime,")"),pDatum);}// Get a timestamp
660
660
  },{key:"getTimeStamp",value:function getTimeStamp(){return+new Date();}},{key:"getTimeDelta",value:function getTimeDelta(pTimeStamp){var tmpEndTime=+new Date();return tmpEndTime-pTimeStamp;}// Log the delta between a timestamp, and now with a message
661
- },{key:"logTimeDelta",value:function logTimeDelta(pTimeDelta,pMessage,pDatum){var tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';var tmpDatum=_typeof(pDatum)==='object'?pDatum:{};var tmpEndTime=+new Date();this.info("".concat(tmpMessage," logged at (epoch ").concat(+tmpEndTime,") took (").concat(pTimeDelta,"ms)"),pDatum);}},{key:"logTimeDeltaHuman",value:function logTimeDeltaHuman(pTimeDelta,pMessage,pDatum){var tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';var tmpEndTime=+new Date();var tmpMs=parseInt(pTimeDelta%1000);var tmpSeconds=parseInt(pTimeDelta/1000%60);var tmpMinutes=parseInt(pTimeDelta/(1000*60)%60);var tmpHours=parseInt(pTimeDelta/(1000*60*60));tmpMs=tmpMs<10?"00"+tmpMs:tmpMs<100?"0"+tmpMs:tmpMs;tmpSeconds=tmpSeconds<10?"0"+tmpSeconds:tmpSeconds;tmpMinutes=tmpMinutes<10?"0"+tmpMinutes:tmpMinutes;tmpHours=tmpHours<10?"0"+tmpHours:tmpHours;this.info("".concat(tmpMessage," logged at (epoch ").concat(+tmpEndTime,") took (").concat(pTimeDelta,"ms) or (").concat(tmpHours,":").concat(tmpMinutes,":").concat(tmpSeconds,".").concat(tmpMs,")"),pDatum);}},{key:"logTimeDeltaRelative",value:function logTimeDeltaRelative(pStartTime,pMessage,pDatum){this.logTimeDelta(this.getTimeDelta(pStartTime),pMessage,pDatum);}},{key:"logTimeDeltaRelativeHuman",value:function logTimeDeltaRelativeHuman(pStartTime,pMessage,pDatum){this.logTimeDeltaHuman(this.getTimeDelta(pStartTime),pMessage,pDatum);}}]);return FableLog;}(libFableServiceProviderBase);// This is for backwards compatibility
662
- function autoConstruct(pSettings){return new FableLog(pSettings);}module.exports=FableLog;module.exports["new"]=autoConstruct;module.exports.LogProviderBase=require('./Fable-Log-BaseLogger.js');module.exports.LogProviderConsole=require('./Fable-Log-Logger-Console.js');module.exports.LogProviderConsole=require('./Fable-Log-Logger-SimpleFlatFile.js');},{"./Fable-Log-BaseLogger.js":29,"./Fable-Log-DefaultProviders-Node.js":30,"./Fable-Log-DefaultStreams.json":31,"./Fable-Log-Logger-Console.js":32,"./Fable-Log-Logger-SimpleFlatFile.js":33,"fable-serviceproviderbase":36}],35:[function(require,module,exports){/**
661
+ },{key:"logTimeDelta",value:function logTimeDelta(pTimeDelta,pMessage,pDatum){var tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';var tmpDatum=_typeof(pDatum)==='object'?pDatum:{};var tmpEndTime=+new Date();this.info("".concat(tmpMessage," logged at (epoch ").concat(+tmpEndTime,") took (").concat(pTimeDelta,"ms)"),pDatum);}},{key:"logTimeDeltaHuman",value:function logTimeDeltaHuman(pTimeDelta,pMessage,pDatum){var tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';var tmpEndTime=+new Date();var tmpMs=parseInt(pTimeDelta%1000);var tmpSeconds=parseInt(pTimeDelta/1000%60);var tmpMinutes=parseInt(pTimeDelta/(1000*60)%60);var tmpHours=parseInt(pTimeDelta/(1000*60*60));tmpMs=tmpMs<10?"00"+tmpMs:tmpMs<100?"0"+tmpMs:tmpMs;tmpSeconds=tmpSeconds<10?"0"+tmpSeconds:tmpSeconds;tmpMinutes=tmpMinutes<10?"0"+tmpMinutes:tmpMinutes;tmpHours=tmpHours<10?"0"+tmpHours:tmpHours;this.info("".concat(tmpMessage," logged at (epoch ").concat(+tmpEndTime,") took (").concat(pTimeDelta,"ms) or (").concat(tmpHours,":").concat(tmpMinutes,":").concat(tmpSeconds,".").concat(tmpMs,")"),pDatum);}},{key:"logTimeDeltaRelative",value:function logTimeDeltaRelative(pStartTime,pMessage,pDatum){this.logTimeDelta(this.getTimeDelta(pStartTime),pMessage,pDatum);}},{key:"logTimeDeltaRelativeHuman",value:function logTimeDeltaRelativeHuman(pStartTime,pMessage,pDatum){this.logTimeDeltaHuman(this.getTimeDelta(pStartTime),pMessage,pDatum);}}]);return FableLog;}(libFableServiceProviderBase);module.exports=FableLog;module.exports.LogProviderBase=require('./Fable-Log-BaseLogger.js');module.exports.LogProviderConsole=require('./Fable-Log-Logger-Console.js');module.exports.LogProviderFlatfile=require('./Fable-Log-Logger-SimpleFlatFile.js');},{"./Fable-Log-BaseLogger.js":29,"./Fable-Log-DefaultProviders-Node.js":30,"./Fable-Log-DefaultStreams.json":31,"./Fable-Log-Logger-Console.js":32,"./Fable-Log-Logger-SimpleFlatFile.js":33,"fable-serviceproviderbase":36}],35:[function(require,module,exports){/**
663
662
  * Fable Core Pre-initialization Service Base
664
663
  *
665
664
  * For a couple services, we need to be able to instantiate them before the Fable object is fully initialized.
@@ -688,17 +687,17 @@ this.templateProcessor.addPattern('${','}',function(pTemplateValue){var tmpTempl
688
687
  *
689
688
  * @author Steven Velozo <steven@velozo.com>
690
689
  * @module Fable Settings
691
- */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;var libFableSettingsTemplateProcessor=require('./Fable-Settings-TemplateProcessor.js');var FableSettings=/*#__PURE__*/function(_libFableServiceProvi3){_inherits(FableSettings,_libFableServiceProvi3);var _super5=_createSuper(FableSettings);function FableSettings(pSettings,pServiceHash){var _this9;_classCallCheck2(this,FableSettings);_this9=_super5.call(this,pSettings,pServiceHash);_this9.serviceType='SettingsManager';// Initialize the settings value template processor
692
- _this9.settingsTemplateProcessor=new libFableSettingsTemplateProcessor();// set straight away so anything that uses it respects the initial setting
693
- _this9._configureEnvTemplating(pSettings);_this9["default"]=_this9.buildDefaultSettings();// Construct a new settings object
694
- var tmpSettings=_this9.merge(pSettings,_this9.buildDefaultSettings());// The base settings object (what they were on initialization, before other actors have altered them)
695
- _this9.base=JSON.parse(JSON.stringify(tmpSettings));if(tmpSettings.DefaultConfigFile){try{// If there is a DEFAULT configuration file, try to load and merge it.
696
- tmpSettings=_this9.merge(require(tmpSettings.DefaultConfigFile),tmpSettings);}catch(pException){// Why this? Often for an app we want settings to work out of the box, but
690
+ */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;var libFableSettingsTemplateProcessor=require('./Fable-Settings-TemplateProcessor.js');var FableSettings=/*#__PURE__*/function(_libFableServiceProvi4){_inherits(FableSettings,_libFableServiceProvi4);var _super6=_createSuper(FableSettings);function FableSettings(pSettings,pServiceHash){var _this10;_classCallCheck2(this,FableSettings);_this10=_super6.call(this,pSettings,pServiceHash);_this10.serviceType='SettingsManager';// Initialize the settings value template processor
691
+ _this10.settingsTemplateProcessor=new libFableSettingsTemplateProcessor();// set straight away so anything that uses it respects the initial setting
692
+ _this10._configureEnvTemplating(pSettings);_this10["default"]=_this10.buildDefaultSettings();// Construct a new settings object
693
+ var tmpSettings=_this10.merge(pSettings,_this10.buildDefaultSettings());// The base settings object (what they were on initialization, before other actors have altered them)
694
+ _this10.base=JSON.parse(JSON.stringify(tmpSettings));if(tmpSettings.DefaultConfigFile){try{// If there is a DEFAULT configuration file, try to load and merge it.
695
+ tmpSettings=_this10.merge(require(tmpSettings.DefaultConfigFile),tmpSettings);}catch(pException){// Why this? Often for an app we want settings to work out of the box, but
697
696
  // would potentially want to have a config file for complex settings.
698
697
  console.log('Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base.');console.log(' Loading Exception: '+pException);}}if(tmpSettings.ConfigFile){try{// If there is a configuration file, try to load and merge it.
699
- tmpSettings=_this9.merge(require(tmpSettings.ConfigFile),tmpSettings);}catch(pException){// Why this? Often for an app we want settings to work out of the box, but
698
+ tmpSettings=_this10.merge(require(tmpSettings.ConfigFile),tmpSettings);}catch(pException){// Why this? Often for an app we want settings to work out of the box, but
700
699
  // would potentially want to have a config file for complex settings.
701
- console.log('Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base.');console.log(' Loading Exception: '+pException);}}_this9.settings=tmpSettings;return _this9;}// Build a default settings object. Use the JSON jimmy to ensure it is always a new object.
700
+ console.log('Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base.');console.log(' Loading Exception: '+pException);}}_this10.settings=tmpSettings;return _this10;}// Build a default settings object. Use the JSON jimmy to ensure it is always a new object.
702
701
  _createClass2(FableSettings,[{key:"buildDefaultSettings",value:function buildDefaultSettings(){return JSON.parse(JSON.stringify(require('./Fable-Settings-Default')));}// Update the configuration for environment variable templating based on the current settings object
703
702
  },{key:"_configureEnvTemplating",value:function _configureEnvTemplating(pSettings){// default environment variable templating to on
704
703
  this._PerformEnvTemplating=!pSettings||pSettings.NoEnvReplacement!==true;}// Resolve (recursive) any environment variables found in settings object.
@@ -706,8 +705,8 @@ this._PerformEnvTemplating=!pSettings||pSettings.NoEnvReplacement!==true;}// Res
706
705
  * Check to see if a value is an object (but not an array).
707
706
  */},{key:"_isObject",value:function _isObject(value){return _typeof(value)==='object'&&!Array.isArray(value);}/**
708
707
  * Merge two plain objects. Keys that are objects in both will be merged property-wise.
709
- */},{key:"_deepMergeObjects",value:function _deepMergeObjects(toObject,fromObject){var _this10=this;if(!fromObject||!this._isObject(fromObject)){return;}Object.keys(fromObject).forEach(function(key){var fromValue=fromObject[key];if(_this10._isObject(fromValue)){var toValue=toObject[key];if(toValue&&_this10._isObject(toValue)){// both are objects, so do a recursive merge
710
- _this10._deepMergeObjects(toValue,fromValue);return;}}toObject[key]=fromValue;});return toObject;}// Merge some new object into the existing settings.
708
+ */},{key:"_deepMergeObjects",value:function _deepMergeObjects(toObject,fromObject){var _this11=this;if(!fromObject||!this._isObject(fromObject)){return;}Object.keys(fromObject).forEach(function(key){var fromValue=fromObject[key];if(_this11._isObject(fromValue)){var toValue=toObject[key];if(toValue&&_this11._isObject(toValue)){// both are objects, so do a recursive merge
709
+ _this11._deepMergeObjects(toValue,fromValue);return;}}toObject[key]=fromValue;});return toObject;}// Merge some new object into the existing settings.
711
710
  },{key:"merge",value:function merge(pSettingsFrom,pSettingsTo){// If an invalid settings from object is passed in (e.g. object constructor without passing in anything) this should still work
712
711
  var tmpSettingsFrom=_typeof(pSettingsFrom)==='object'?pSettingsFrom:{};// Default to the settings object if none is passed in for the merge.
713
712
  var tmpSettingsTo=_typeof(pSettingsTo)==='object'?pSettingsTo:this.settings;// do not mutate the From object property values
@@ -736,13 +735,13 @@ this.getRandomValues(tmpBuffer);return tmpBuffer;}// Math.random()-based (RNG)
736
735
  var tmpBuffer=new Uint8Array(16);// eslint-disable-line no-undef
737
736
  for(var i=0,tmpValue;i<16;i++){if((i&0x03)===0){tmpValue=Math.random()*0x100000000;}tmpBuffer[i]=tmpValue>>>((i&0x03)<<3)&0xff;}return tmpBuffer;}},{key:"generate",value:function generate(){if(this.getRandomValues){return this.generateWhatWGBytes();}else{return this.generateRandomBytes();}}}]);return RandomBytes;}();module.exports=RandomBytes;},{}],41:[function(require,module,exports){/**
738
737
  * Fable UUID Generator
739
- */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;0;var libRandomByteGenerator=require('./Fable-UUID-Random.js');var FableUUID=/*#__PURE__*/function(_libFableServiceProvi4){_inherits(FableUUID,_libFableServiceProvi4);var _super6=_createSuper(FableUUID);function FableUUID(pSettings,pServiceHash){var _this11;_classCallCheck2(this,FableUUID);_this11=_super6.call(this,pSettings,pServiceHash);_this11.serviceType='UUID';// Determine if the module is in "Random UUID Mode" which means just use the random character function rather than the v4 random UUID spec.
738
+ */var libFableServiceProviderBase=require('fable-serviceproviderbase').CoreServiceProviderBase;0;var libRandomByteGenerator=require('./Fable-UUID-Random.js');var FableUUID=/*#__PURE__*/function(_libFableServiceProvi5){_inherits(FableUUID,_libFableServiceProvi5);var _super7=_createSuper(FableUUID);function FableUUID(pSettings,pServiceHash){var _this12;_classCallCheck2(this,FableUUID);_this12=_super7.call(this,pSettings,pServiceHash);_this12.serviceType='UUID';// Determine if the module is in "Random UUID Mode" which means just use the random character function rather than the v4 random UUID spec.
740
739
  // Note this allows UUIDs of various lengths (including very short ones) although guaranteed uniqueness goes downhill fast.
741
- _this11._UUIDModeRandom=_typeof(pSettings)==='object'&&pSettings.hasOwnProperty('UUIDModeRandom')?pSettings.UUIDModeRandom==true:false;// These two properties are only useful if we are in Random mode. Otherwise it generates a v4 spec
740
+ _this12._UUIDModeRandom=_typeof(pSettings)==='object'&&pSettings.hasOwnProperty('UUIDModeRandom')?pSettings.UUIDModeRandom==true:false;// These two properties are only useful if we are in Random mode. Otherwise it generates a v4 spec
742
741
  // Length for "Random UUID Mode" is set -- if not set it to 8
743
- _this11._UUIDLength=_typeof(pSettings)==='object'&&pSettings.hasOwnProperty('UUIDLength')?pSettings.UUIDLength+0:8;// Dictionary for "Random UUID Mode"
744
- _this11._UUIDRandomDictionary=_typeof(pSettings)==='object'&&pSettings.hasOwnProperty('UUIDDictionary')?pSettings.UUIDDictionary+0:'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';_this11.randomByteGenerator=new libRandomByteGenerator();// Lookup table for hex codes
745
- _this11._HexLookup=[];for(var i=0;i<256;++i){_this11._HexLookup[i]=(i+0x100).toString(16).substr(1);}return _this11;}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
742
+ _this12._UUIDLength=_typeof(pSettings)==='object'&&pSettings.hasOwnProperty('UUIDLength')?pSettings.UUIDLength+0:8;// Dictionary for "Random UUID Mode"
743
+ _this12._UUIDRandomDictionary=_typeof(pSettings)==='object'&&pSettings.hasOwnProperty('UUIDDictionary')?pSettings.UUIDDictionary+0:'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';_this12.randomByteGenerator=new libRandomByteGenerator();// Lookup table for hex codes
744
+ _this12._HexLookup=[];for(var i=0;i<256;++i){_this12._HexLookup[i]=(i+0x100).toString(16).substr(1);}return _this12;}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
746
745
  _createClass2(FableUUID,[{key:"bytesToUUID",value:function bytesToUUID(pBuffer){var i=0;// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
747
746
  return[this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],'-',this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],'-',this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],'-',this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],'-',this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]]].join('');}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
748
747
  },{key:"generateUUIDv4",value:function generateUUIDv4(){var tmpBuffer=new Array(16);var tmpRandomBytes=this.randomByteGenerator.generate();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
@@ -806,12 +805,12 @@ var cleanWrapCharacters=function cleanWrapCharacters(pCharacter,pString){if(pStr
806
805
  *
807
806
  * @class ManyfestHashTranslation
808
807
  */var ManyfestHashTranslation=/*#__PURE__*/function(){function ManyfestHashTranslation(pInfoLog,pErrorLog){_classCallCheck2(this,ManyfestHashTranslation);// Wire in logging
809
- this.logInfo=typeof pInfoLog==='function'?pInfoLog:libSimpleLog;this.logError=typeof pErrorLog==='function'?pErrorLog:libSimpleLog;this.translationTable={};}_createClass2(ManyfestHashTranslation,[{key:"translationCount",value:function translationCount(){return Object.keys(this.translationTable).length;}},{key:"addTranslation",value:function addTranslation(pTranslation){var _this12=this;// This adds a translation in the form of:
808
+ this.logInfo=typeof pInfoLog==='function'?pInfoLog:libSimpleLog;this.logError=typeof pErrorLog==='function'?pErrorLog:libSimpleLog;this.translationTable={};}_createClass2(ManyfestHashTranslation,[{key:"translationCount",value:function translationCount(){return Object.keys(this.translationTable).length;}},{key:"addTranslation",value:function addTranslation(pTranslation){var _this13=this;// This adds a translation in the form of:
810
809
  // { "SourceHash": "DestinationHash", "SecondSourceHash":"SecondDestinationHash" }
811
- if(_typeof(pTranslation)!='object'){this.logError("Hash translation addTranslation expected a translation be type object but was passed in ".concat(_typeof(pTranslation)));return false;}var tmpTranslationSources=Object.keys(pTranslation);tmpTranslationSources.forEach(function(pTranslationSource){if(typeof pTranslation[pTranslationSource]!='string'){_this12.logError("Hash translation addTranslation expected a translation destination hash for [".concat(pTranslationSource,"] to be a string but the referrant was a ").concat(_typeof(pTranslation[pTranslationSource])));}else{_this12.translationTable[pTranslationSource]=pTranslation[pTranslationSource];}});}},{key:"removeTranslationHash",value:function removeTranslationHash(pTranslationHash){if(this.translationTable.hasOwnProperty(pTranslationHash)){delete this.translationTable[pTranslationHash];}}// This removes translations.
810
+ if(_typeof(pTranslation)!='object'){this.logError("Hash translation addTranslation expected a translation be type object but was passed in ".concat(_typeof(pTranslation)));return false;}var tmpTranslationSources=Object.keys(pTranslation);tmpTranslationSources.forEach(function(pTranslationSource){if(typeof pTranslation[pTranslationSource]!='string'){_this13.logError("Hash translation addTranslation expected a translation destination hash for [".concat(pTranslationSource,"] to be a string but the referrant was a ").concat(_typeof(pTranslation[pTranslationSource])));}else{_this13.translationTable[pTranslationSource]=pTranslation[pTranslationSource];}});}},{key:"removeTranslationHash",value:function removeTranslationHash(pTranslationHash){if(this.translationTable.hasOwnProperty(pTranslationHash)){delete this.translationTable[pTranslationHash];}}// This removes translations.
812
811
  // If passed a string, just removes the single one.
813
812
  // If passed an object, it does all the source keys.
814
- },{key:"removeTranslation",value:function removeTranslation(pTranslation){var _this13=this;if(typeof pTranslation=='string'){this.removeTranslationHash(pTranslation);return true;}else if(_typeof(pTranslation)=='object'){var tmpTranslationSources=Object.keys(pTranslation);tmpTranslationSources.forEach(function(pTranslationSource){_this13.removeTranslation(pTranslationSource);});return true;}else{this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(_typeof(pTranslation)));return false;}}},{key:"clearTranslations",value:function clearTranslations(){this.translationTable={};}},{key:"translate",value:function translate(pTranslation){if(this.translationTable.hasOwnProperty(pTranslation)){return this.translationTable[pTranslation];}else{return pTranslation;}}}]);return ManyfestHashTranslation;}();module.exports=ManyfestHashTranslation;},{"./Manyfest-LogToConsole.js":54}],54:[function(require,module,exports){/**
813
+ },{key:"removeTranslation",value:function removeTranslation(pTranslation){var _this14=this;if(typeof pTranslation=='string'){this.removeTranslationHash(pTranslation);return true;}else if(_typeof(pTranslation)=='object'){var tmpTranslationSources=Object.keys(pTranslation);tmpTranslationSources.forEach(function(pTranslationSource){_this14.removeTranslation(pTranslationSource);});return true;}else{this.logError("Hash translation removeTranslation expected either a string or an object but the passed-in translation was type ".concat(_typeof(pTranslation)));return false;}}},{key:"clearTranslations",value:function clearTranslations(){this.translationTable={};}},{key:"translate",value:function translate(pTranslation){if(this.translationTable.hasOwnProperty(pTranslation)){return this.translationTable[pTranslation];}else{return pTranslation;}}}]);return ManyfestHashTranslation;}();module.exports=ManyfestHashTranslation;},{"./Manyfest-LogToConsole.js":54}],54:[function(require,module,exports){/**
815
814
  * @author <steven@velozo.com>
816
815
  */ /**
817
816
  * Manyfest simple logging shim (for browser and dependency-free running)
@@ -1359,9 +1358,9 @@ var tmpDescriptorAddresses=Object.keys(tmpSource);tmpDescriptorAddresses.forEach
1359
1358
  * Manyfest object address-based descriptions and manipulations.
1360
1359
  *
1361
1360
  * @class Manyfest
1362
- */var Manyfest=/*#__PURE__*/function(_libFableServiceProvi5){_inherits(Manyfest,_libFableServiceProvi5);var _super7=_createSuper(Manyfest);function Manyfest(pFable,pManifest,pServiceHash){var _this14;_classCallCheck2(this,Manyfest);if(pFable===undefined){_this14=_super7.call(this,{});}else{_this14=_super7.call(this,pFable,pManifest,pServiceHash);}_this14.serviceType='Manifest';// Wire in logging
1363
- _this14.logInfo=libSimpleLog;_this14.logError=libSimpleLog;// Create an object address resolver and map in the functions
1364
- _this14.objectAddressCheckAddressExists=new libObjectAddressCheckAddressExists(_this14.logInfo,_this14.logError);_this14.objectAddressGetValue=new libObjectAddressGetValue(_this14.logInfo,_this14.logError);_this14.objectAddressSetValue=new libObjectAddressSetValue(_this14.logInfo,_this14.logError);_this14.objectAddressDeleteValue=new libObjectAddressDeleteValue(_this14.logInfo,_this14.logError);if(!_this14.options.hasOwnProperty('defaultValues')){_this14.options.defaultValues={"String":"","Number":0,"Float":0.0,"Integer":0,"Boolean":false,"Binary":0,"DateTime":0,"Array":[],"Object":{},"Null":null};}if(!_this14.options.hasOwnProperty('strict')){_this14.options.strict=false;}_this14.scope=undefined;_this14.elementAddresses=undefined;_this14.elementHashes=undefined;_this14.elementDescriptors=undefined;_this14.reset();if(_typeof(_this14.options)==='object'){_this14.loadManifest(_this14.options);}_this14.schemaManipulations=new libSchemaManipulation(_this14.logInfo,_this14.logError);_this14.objectAddressGeneration=new libObjectAddressGeneration(_this14.logInfo,_this14.logError);_this14.hashTranslations=new libHashTranslation(_this14.logInfo,_this14.logError);return _possibleConstructorReturn(_this14);}/*************************************************************************
1361
+ */var Manyfest=/*#__PURE__*/function(_libFableServiceProvi6){_inherits(Manyfest,_libFableServiceProvi6);var _super8=_createSuper(Manyfest);function Manyfest(pFable,pManifest,pServiceHash){var _this15;_classCallCheck2(this,Manyfest);if(pFable===undefined){_this15=_super8.call(this,{});}else{_this15=_super8.call(this,pFable,pManifest,pServiceHash);}_this15.serviceType='Manifest';// Wire in logging
1362
+ _this15.logInfo=libSimpleLog;_this15.logError=libSimpleLog;// Create an object address resolver and map in the functions
1363
+ _this15.objectAddressCheckAddressExists=new libObjectAddressCheckAddressExists(_this15.logInfo,_this15.logError);_this15.objectAddressGetValue=new libObjectAddressGetValue(_this15.logInfo,_this15.logError);_this15.objectAddressSetValue=new libObjectAddressSetValue(_this15.logInfo,_this15.logError);_this15.objectAddressDeleteValue=new libObjectAddressDeleteValue(_this15.logInfo,_this15.logError);if(!_this15.options.hasOwnProperty('defaultValues')){_this15.options.defaultValues={"String":"","Number":0,"Float":0.0,"Integer":0,"Boolean":false,"Binary":0,"DateTime":0,"Array":[],"Object":{},"Null":null};}if(!_this15.options.hasOwnProperty('strict')){_this15.options.strict=false;}_this15.scope=undefined;_this15.elementAddresses=undefined;_this15.elementHashes=undefined;_this15.elementDescriptors=undefined;_this15.reset();if(_typeof(_this15.options)==='object'){_this15.loadManifest(_this15.options);}_this15.schemaManipulations=new libSchemaManipulation(_this15.logInfo,_this15.logError);_this15.objectAddressGeneration=new libObjectAddressGeneration(_this15.logInfo,_this15.logError);_this15.hashTranslations=new libHashTranslation(_this15.logInfo,_this15.logError);return _possibleConstructorReturn(_this15);}/*************************************************************************
1365
1364
  * Schema Manifest Loading, Reading, Manipulation and Serialization Functions
1366
1365
  */ // Reset critical manifest properties
1367
1366
  _createClass2(Manyfest,[{key:"reset",value:function reset(){this.scope='DEFAULT';this.elementAddresses=[];this.elementHashes={};this.elementDescriptors={};}},{key:"clone",value:function clone(){// Make a copy of the options in-place
@@ -1412,13 +1411,13 @@ return null;}}}// Enumerate through the schema and populate default values if th
1412
1411
  },{key:"populateDefaults",value:function populateDefaults(pObject,pOverwriteProperties){return this.populateObject(pObject,pOverwriteProperties,// This just sets up a simple filter to see if there is a default set.
1413
1412
  function(pDescriptor){return pDescriptor.hasOwnProperty('Default');});}// Forcefully populate all values even if they don't have defaults.
1414
1413
  // Based on type, this can do unexpected things.
1415
- },{key:"populateObject",value:function populateObject(pObject,pOverwriteProperties,fFilter){var _this15=this;// Automatically create an object if one isn't passed in.
1414
+ },{key:"populateObject",value:function populateObject(pObject,pOverwriteProperties,fFilter){var _this16=this;// Automatically create an object if one isn't passed in.
1416
1415
  var tmpObject=_typeof(pObject)==='object'?pObject:{};// Default to *NOT OVERWRITING* properties
1417
1416
  var tmpOverwriteProperties=typeof pOverwriteProperties=='undefined'?false:pOverwriteProperties;// This is a filter function, which is passed the schema and allows complex filtering of population
1418
1417
  // The default filter function just returns true, populating everything.
1419
- var tmpFilterFunction=typeof fFilter=='function'?fFilter:function(pDescriptor){return true;};this.elementAddresses.forEach(function(pAddress){var tmpDescriptor=_this15.getDescriptor(pAddress);// Check the filter function to see if this is an address we want to set the value for.
1418
+ var tmpFilterFunction=typeof fFilter=='function'?fFilter:function(pDescriptor){return true;};this.elementAddresses.forEach(function(pAddress){var tmpDescriptor=_this16.getDescriptor(pAddress);// Check the filter function to see if this is an address we want to set the value for.
1420
1419
  if(tmpFilterFunction(tmpDescriptor)){// If we are overwriting properties OR the property does not exist
1421
- if(tmpOverwriteProperties||!_this15.checkAddressExists(tmpObject,pAddress)){_this15.setValueAtAddress(tmpObject,pAddress,_this15.getDefaultValue(tmpDescriptor));}}});return tmpObject;}}]);return Manyfest;}(libFableServiceProviderBase);;module.exports=Manyfest;},{"./Manyfest-HashTranslation.js":53,"./Manyfest-LogToConsole.js":54,"./Manyfest-ObjectAddress-CheckAddressExists.js":55,"./Manyfest-ObjectAddress-DeleteValue.js":56,"./Manyfest-ObjectAddress-GetValue.js":57,"./Manyfest-ObjectAddress-SetValue.js":58,"./Manyfest-ObjectAddressGeneration.js":59,"./Manyfest-SchemaManipulation.js":61,"fable-serviceproviderbase":36}],63:[function(require,module,exports){var hasMap=typeof Map==='function'&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,'size'):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==='function'?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==='function'&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,'size'):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==='function'?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==='function'&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==='function'&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==='function'&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==='function'?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='symbol'?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='object';// ie, `has-tostringtag/shams
1420
+ if(tmpOverwriteProperties||!_this16.checkAddressExists(tmpObject,pAddress)){_this16.setValueAtAddress(tmpObject,pAddress,_this16.getDefaultValue(tmpDescriptor));}}});return tmpObject;}}]);return Manyfest;}(libFableServiceProviderBase);;module.exports=Manyfest;},{"./Manyfest-HashTranslation.js":53,"./Manyfest-LogToConsole.js":54,"./Manyfest-ObjectAddress-CheckAddressExists.js":55,"./Manyfest-ObjectAddress-DeleteValue.js":56,"./Manyfest-ObjectAddress-GetValue.js":57,"./Manyfest-ObjectAddress-SetValue.js":58,"./Manyfest-ObjectAddressGeneration.js":59,"./Manyfest-SchemaManipulation.js":61,"fable-serviceproviderbase":36}],63:[function(require,module,exports){var hasMap=typeof Map==='function'&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,'size'):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==='function'?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==='function'&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,'size'):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==='function'?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==='function'&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==='function'&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==='function'&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==='function'?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='symbol'?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==='function'&&_typeof(Symbol.iterator)==='object';// ie, `has-tostringtag/shams
1422
1421
  var toStringTag=typeof Symbol==='function'&&Symbol.toStringTag&&(_typeof(Symbol.toStringTag)===hasShammedSymbols?'object':'symbol')?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==='function'?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype// eslint-disable-line no-proto
1423
1422
  ?function(O){return O.__proto__;// eslint-disable-line no-proto
1424
1423
  }:null);function addNumericSeparator(num,str){if(num===Infinity||num===-Infinity||num!==num||num&&num>-1000&&num<1000||$test.call(/e/,str)){return str;}var sepRegex=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof num==='number'){var _int=num<0?-$floor(-num):$floor(num);// trunc(num)
@@ -2818,11 +2817,11 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
2818
2817
  module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],107:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],108:[function(require,module,exports){/**
2819
2818
  * Fable Application Services Management
2820
2819
  * @author <steven@velozo.com>
2821
- */var libFableServiceBase=require('fable-serviceproviderbase');var FableService=/*#__PURE__*/function(_libFableServiceBase$){_inherits(FableService,_libFableServiceBase$);var _super8=_createSuper(FableService);function FableService(pSettings,pServiceHash){var _this16;_classCallCheck2(this,FableService);_this16=_super8.call(this,pSettings,pServiceHash);_this16.serviceType='ServiceManager';_this16.serviceTypes=[];// A map of instantiated services
2822
- _this16.servicesMap={};// A map of the default instantiated service by type
2823
- _this16.services={};// A map of class constructors for services
2824
- _this16.serviceClasses={};// If we need extra service initialization capabilities
2825
- _this16.extraServiceInitialization=false;return _this16;}_createClass2(FableService,[{key:"addServiceType",value:function addServiceType(pServiceType,pServiceClass){if(this.servicesMap.hasOwnProperty(pServiceType)){// TODO: Check if any services are running?
2820
+ */var libFableServiceBase=require('fable-serviceproviderbase');var FableService=/*#__PURE__*/function(_libFableServiceBase$){_inherits(FableService,_libFableServiceBase$);var _super9=_createSuper(FableService);function FableService(pSettings,pServiceHash){var _this17;_classCallCheck2(this,FableService);_this17=_super9.call(this,pSettings,pServiceHash);_this17.serviceType='ServiceManager';_this17.serviceTypes=[];// A map of instantiated services
2821
+ _this17.servicesMap={};// A map of the default instantiated service by type
2822
+ _this17.services={};// A map of class constructors for services
2823
+ _this17.serviceClasses={};// If we need extra service initialization capabilities
2824
+ _this17.extraServiceInitialization=false;return _this17;}_createClass2(FableService,[{key:"addServiceType",value:function addServiceType(pServiceType,pServiceClass){if(this.servicesMap.hasOwnProperty(pServiceType)){// TODO: Check if any services are running?
2826
2825
  this.fable.log.warn("Adding a service type [".concat(pServiceType,"] that already exists."));}else{// Add the container for instantiated services to go in
2827
2826
  this.servicesMap[pServiceType]={};// Add the type to the list of types
2828
2827
  this.serviceTypes.push(pServiceType);}// Using the static member of the class is a much more reliable way to check if it is a service class than instanceof
@@ -2862,8 +2861,8 @@ this._coreServices.ServiceManager=new libFableServiceManager(this);this.serviceM
2862
2861
  // They will then be available in the Default service provider set as well.
2863
2862
  this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.ServiceManager);this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.UUID);this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.Logging);this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.SettingsManager);// Initialize and instantiate the default baked-in Data Arithmatic service
2864
2863
  this.serviceManager.addAndInstantiateServiceType('EnvironmentData',require('./services/Fable-Service-EnvironmentData.js'));this.serviceManager.addServiceType('Template',require('./services/Fable-Service-Template.js'));this.serviceManager.addServiceType('MetaTemplate',require('./services/Fable-Service-MetaTemplate.js'));this.serviceManager.addServiceType('Anticipate',require('./services/Fable-Service-Anticipate.js'));this.serviceManager.addAndInstantiateServiceType('DataFormat',require('./services/Fable-Service-DataFormat.js'));this.serviceManager.addAndInstantiateServiceType('DataGeneration',require('./services/Fable-Service-DataGeneration.js'));this.serviceManager.addAndInstantiateServiceType('Utility',require('./services/Fable-Service-Utility.js'));this.serviceManager.addServiceType('Operation',require('./services/Fable-Service-Operation.js'));this.serviceManager.addServiceType('RestClient',require('./services/Fable-Service-RestClient.js'));this.serviceManager.addServiceType('CSVParser',require('./services/Fable-Service-CSVParser.js'));this.serviceManager.addServiceType('Manifest',require('manyfest'));this.serviceManager.addServiceType('ObjectCache',require('cachetrax'));this.serviceManager.addServiceType('FilePersistence',require('./services/Fable-Service-FilePersistence.js'));}_createClass2(Fable,[{key:"isFable",get:function get(){return true;}},{key:"settings",get:function get(){return this._coreServices.SettingsManager.settings;}},{key:"settingsManager",get:function get(){return this._coreServices.SettingsManager;}},{key:"log",get:function get(){return this._coreServices.Logging;}},{key:"services",get:function get(){return this._coreServices.ServiceManager.services;}},{key:"servicesMap",get:function get(){return this._coreServices.ServiceManager.servicesMap;}},{key:"getUUID",value:function getUUID(){return this._coreServices.UUID.getUUID();}},{key:"fable",get:function get(){return this;}}]);return Fable;}();// This is for backwards compatibility
2865
- function autoConstruct(pSettings){return new Fable(pSettings);}module.exports=Fable;module.exports["new"]=autoConstruct;module.exports.LogProviderBase=libFableLog.LogProviderBase;module.exports.ServiceProviderBase=libFableServiceManager.ServiceProviderBase;module.exports.CoreServiceProviderBase=libFableServiceManager.CoreServiceProviderBase;module.exports.precedent=libFableSettings.precedent;},{"./Fable-ServiceManager.js":108,"./services/Fable-Service-Anticipate.js":110,"./services/Fable-Service-CSVParser.js":111,"./services/Fable-Service-DataFormat.js":112,"./services/Fable-Service-DataGeneration.js":114,"./services/Fable-Service-EnvironmentData.js":115,"./services/Fable-Service-FilePersistence.js":116,"./services/Fable-Service-MetaTemplate.js":117,"./services/Fable-Service-Operation.js":121,"./services/Fable-Service-RestClient.js":122,"./services/Fable-Service-Template.js":123,"./services/Fable-Service-Utility.js":124,"cachetrax":22,"fable-log":34,"fable-settings":39,"fable-uuid":41,"manyfest":62}],110:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceAnticipate=/*#__PURE__*/function(_libFableServiceBase){_inherits(FableServiceAnticipate,_libFableServiceBase);var _super9=_createSuper(FableServiceAnticipate);function FableServiceAnticipate(pFable,pOptions,pServiceHash){var _this17;_classCallCheck2(this,FableServiceAnticipate);_this17=_super9.call(this,pFable,pOptions,pServiceHash);_this17.serviceType='AsyncAnticipate';// The queue of operations waiting to run.
2866
- _this17.operationQueue=[];_this17.erroredOperations=[];_this17.executingOperationCount=0;_this17.completedOperationCount=0;_this17.maxOperations=1;_this17.lastError=undefined;_this17.waitingFunctions=[];return _this17;}_createClass2(FableServiceAnticipate,[{key:"checkQueue",value:function checkQueue(){// This checks to see if we need to start any operations.
2864
+ function autoConstruct(pSettings){return new Fable(pSettings);}module.exports=Fable;module.exports["new"]=autoConstruct;module.exports.LogProviderBase=libFableLog.LogProviderBase;module.exports.ServiceProviderBase=libFableServiceManager.ServiceProviderBase;module.exports.CoreServiceProviderBase=libFableServiceManager.CoreServiceProviderBase;module.exports.precedent=libFableSettings.precedent;},{"./Fable-ServiceManager.js":108,"./services/Fable-Service-Anticipate.js":110,"./services/Fable-Service-CSVParser.js":111,"./services/Fable-Service-DataFormat.js":112,"./services/Fable-Service-DataGeneration.js":114,"./services/Fable-Service-EnvironmentData.js":115,"./services/Fable-Service-FilePersistence.js":116,"./services/Fable-Service-MetaTemplate.js":117,"./services/Fable-Service-Operation.js":121,"./services/Fable-Service-RestClient.js":122,"./services/Fable-Service-Template.js":123,"./services/Fable-Service-Utility.js":124,"cachetrax":22,"fable-log":34,"fable-settings":39,"fable-uuid":41,"manyfest":62}],110:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceAnticipate=/*#__PURE__*/function(_libFableServiceBase){_inherits(FableServiceAnticipate,_libFableServiceBase);var _super10=_createSuper(FableServiceAnticipate);function FableServiceAnticipate(pFable,pOptions,pServiceHash){var _this18;_classCallCheck2(this,FableServiceAnticipate);_this18=_super10.call(this,pFable,pOptions,pServiceHash);_this18.serviceType='AsyncAnticipate';// The queue of operations waiting to run.
2865
+ _this18.operationQueue=[];_this18.erroredOperations=[];_this18.executingOperationCount=0;_this18.completedOperationCount=0;_this18.maxOperations=1;_this18.lastError=undefined;_this18.waitingFunctions=[];return _this18;}_createClass2(FableServiceAnticipate,[{key:"checkQueue",value:function checkQueue(){// This checks to see if we need to start any operations.
2867
2866
  if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){var tmpOperation=this.operationQueue.shift();this.executingOperationCount+=1;tmpOperation(this.buildAnticipatorCallback());}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){// If there are no operations left, and we have waiting functions, call them.
2868
2867
  for(var i=0;i<this.waitingFunctions.length;i++){this.waitingFunctions[i](this.lastError);}// Reset our state
2869
2868
  this.lastError=undefined;this.waitingFunctions=[];}}// Expects a function fAsynchronousFunction(fCallback)
@@ -2881,8 +2880,8 @@ throw new Error("Anticipation async callback called twice...");}tmpCallbackState
2881
2880
  * do anything; unfortunately some files have a sequence issue with that.
2882
2881
  *
2883
2882
  * @class CSVParser
2884
- */var CSVParser=/*#__PURE__*/function(_libFableServiceProvi6){_inherits(CSVParser,_libFableServiceProvi6);var _super10=_createSuper(CSVParser);function CSVParser(pFable,pOptions,pServiceHash){var _this18;_classCallCheck2(this,CSVParser);_this18=_super10.call(this,pFable,pOptions,pServiceHash);_this18.serviceType='CSVParser';_this18.Header=[];_this18.HeaderFieldNames=[];_this18.Delimiter=',';_this18.QuoteCharacter='"';_this18.CleanCharacters=['\r'];_this18.HeaderLineIndex=0;_this18.HasHeader=true;_this18.HasSetHeader=false;_this18.EmitHeader=false;_this18.EmitJSON=true;_this18.EscapedQuoteString='&quot;';// Current Line Parsing State
2885
- _this18.CurrentLine='';_this18.CurrentRecord=[];_this18.InQuote=false;_this18.InEscapedQuote=false;_this18.LinesParsed=0;_this18.RowsEmitted=0;return _this18;}_createClass2(CSVParser,[{key:"marshalRowToJSON",value:function marshalRowToJSON(pRowArray){if(!Array.isArray(pRowArray)){return false;}for(var i=this.HeaderFieldNames.length;i<pRowArray.length;i++){this.HeaderFieldNames[i]="".concat(i);}var tmpObject={};for(var _i11=0;_i11<pRowArray.length;_i11++){tmpObject[this.HeaderFieldNames[_i11]]=pRowArray[_i11];}return tmpObject;}// Set the header data, for use in marshalling to JSON.
2883
+ */var CSVParser=/*#__PURE__*/function(_libFableServiceProvi7){_inherits(CSVParser,_libFableServiceProvi7);var _super11=_createSuper(CSVParser);function CSVParser(pFable,pOptions,pServiceHash){var _this19;_classCallCheck2(this,CSVParser);_this19=_super11.call(this,pFable,pOptions,pServiceHash);_this19.serviceType='CSVParser';_this19.Header=[];_this19.HeaderFieldNames=[];_this19.Delimiter=',';_this19.QuoteCharacter='"';_this19.CleanCharacters=['\r'];_this19.HeaderLineIndex=0;_this19.HasHeader=true;_this19.HasSetHeader=false;_this19.EmitHeader=false;_this19.EmitJSON=true;_this19.EscapedQuoteString='&quot;';// Current Line Parsing State
2884
+ _this19.CurrentLine='';_this19.CurrentRecord=[];_this19.InQuote=false;_this19.InEscapedQuote=false;_this19.LinesParsed=0;_this19.RowsEmitted=0;return _this19;}_createClass2(CSVParser,[{key:"marshalRowToJSON",value:function marshalRowToJSON(pRowArray){if(!Array.isArray(pRowArray)){return false;}for(var i=this.HeaderFieldNames.length;i<pRowArray.length;i++){this.HeaderFieldNames[i]="".concat(i);}var tmpObject={};for(var _i11=0;_i11<pRowArray.length;_i11++){tmpObject[this.HeaderFieldNames[_i11]]=pRowArray[_i11];}return tmpObject;}// Set the header data, for use in marshalling to JSON.
2886
2885
  },{key:"setHeader",value:function setHeader(pHeaderArray){this.Header=pHeaderArray;for(var i=0;i<this.Header.length;i++){if(typeof this.Header[i]=='undefined'){this.HeaderFieldNames[i]="".concat(i);}else{this.HeaderFieldNames[i]=this.Header[i].toString();}}}},{key:"resetRowState",value:function resetRowState(){this.CurrentRecord=[];}},{key:"pushLine",value:function pushLine(){for(var i=0;i<this.CleanCharacters.length;i++){this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[i],'');}this.CurrentRecord.push(this.CurrentLine);this.CurrentLine='';}},{key:"emitRow",value:function emitRow(pFormatAsJSON){var tmpFormatAsJSON=typeof pFormatAsJSON=='undefined'?this.EmitJSON:pFormatAsJSON;this.RowsEmitted++;var tmpCompletedRecord=this.CurrentRecord;this.CurrentRecord=[];if(tmpFormatAsJSON){return this.marshalRowToJSON(tmpCompletedRecord);}else{return tmpCompletedRecord;}}},{key:"parseCSVLine",value:function parseCSVLine(pLineString){this.LinesParsed++;for(var i=0;i<pLineString.length;i++){if(!this.InQuote&&pLineString[i]==this.Delimiter){this.pushLine();}else if(pLineString[i]==this.QuoteCharacter){// If we are in the second part of an escaped quote, ignore it.
2887
2886
  if(this.InEscapedQuote){this.InEscapedQuote=false;}// If we aren't in a quote, enter quote
2888
2887
  else if(!this.InQuote){this.InQuote=true;}// We are in a quote, so peek forward to see if this is an "escaped" quote pair
@@ -2896,26 +2895,26 @@ if(this.EmitHeader){return this.Header;}else{return false;}}else{return this.emi
2896
2895
  * Data Formatting and Translation Functions
2897
2896
  *
2898
2897
  * @class DataFormat
2899
- */var DataFormat=/*#__PURE__*/function(_libFableServiceProvi7){_inherits(DataFormat,_libFableServiceProvi7);var _super11=_createSuper(DataFormat);function DataFormat(pFable,pOptions,pServiceHash){var _this19;_classCallCheck2(this,DataFormat);_this19=_super11.call(this,pFable,pOptions,pServiceHash);/**
2898
+ */var DataFormat=/*#__PURE__*/function(_libFableServiceProvi8){_inherits(DataFormat,_libFableServiceProvi8);var _super12=_createSuper(DataFormat);function DataFormat(pFable,pOptions,pServiceHash){var _this20;_classCallCheck2(this,DataFormat);_this20=_super12.call(this,pFable,pOptions,pServiceHash);/**
2900
2899
  * Pad the start of a string.
2901
2900
  *
2902
2901
  * @param {*} pString
2903
2902
  * @param {number} pTargetLength
2904
2903
  * @returns {string} pPadString
2905
- */_defineProperty2(_assertThisInitialized(_this19),"stringPadStart",function(pString,pTargetLength,pPadString){var tmpString=pString.toString();return this.stringGeneratePaddingString(tmpString,pTargetLength,pPadString)+tmpString;});/**
2904
+ */_defineProperty2(_assertThisInitialized(_this20),"stringPadStart",function(pString,pTargetLength,pPadString){var tmpString=pString.toString();return this.stringGeneratePaddingString(tmpString,pTargetLength,pPadString)+tmpString;});/**
2906
2905
  * Pad the end of a string.
2907
2906
  *
2908
2907
  * @param {*} pString
2909
2908
  * @param {number} pTargetLength
2910
2909
  * @returns {string} pPadString
2911
- */_defineProperty2(_assertThisInitialized(_this19),"stringPadEnd",function(pString,pTargetLength,pPadString){var tmpString=pString.toString();return tmpString+this.stringGeneratePaddingString(tmpString,pTargetLength,pPadString);});_this19.serviceType='DataArithmatic';// Regular Expressions (so they don't have to be recompiled every time)
2910
+ */_defineProperty2(_assertThisInitialized(_this20),"stringPadEnd",function(pString,pTargetLength,pPadString){var tmpString=pString.toString();return tmpString+this.stringGeneratePaddingString(tmpString,pTargetLength,pPadString);});_this20.serviceType='DataArithmatic';// Regular Expressions (so they don't have to be recompiled every time)
2912
2911
  // These could be defined as static, but I'm not sure if that will work with browserify ... and specifically the QT browser.
2913
- _this19._Regex_formatterInsertCommas=/.{1,3}/g;// Match Function:
2912
+ _this20._Regex_formatterInsertCommas=/.{1,3}/g;// Match Function:
2914
2913
  // function(pMatch, pSign, pZeros, pBefore, pDecimal, pAfter)
2915
2914
  // Thoughts about below: /^([+-]?)(0*)(\d+)(\.(\d+))?$/;
2916
- _this19._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g;_this19._Regex_formatterDollarsRemoveCommas=/,/gi;_this19._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi;_this19._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g;// TODO: Potentially pull these in from a configuration.
2915
+ _this20._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g;_this20._Regex_formatterDollarsRemoveCommas=/,/gi;_this20._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi;_this20._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g;// TODO: Potentially pull these in from a configuration.
2917
2916
  // TODO: Use locale data for this if it's defaults all the way down.
2918
- _this19._Value_MoneySign_Currency='$';_this19._Value_NaN_Currency='--';_this19._Value_GroupSeparator_Number=',';_this19._Value_Prefix_StringHash='HSH';_this19._Value_Clean_formatterCleanNonAlpha='';_this19._UseEngineStringStartsWith=typeof String.prototype.startsWith==='function';_this19._UseEngineStringEndsWith=typeof String.prototype.endsWith==='function';return _this19;}/*************************************************************************
2917
+ _this20._Value_MoneySign_Currency='$';_this20._Value_NaN_Currency='--';_this20._Value_GroupSeparator_Number=',';_this20._Value_Prefix_StringHash='HSH';_this20._Value_Clean_formatterCleanNonAlpha='';_this20._UseEngineStringStartsWith=typeof String.prototype.startsWith==='function';_this20._UseEngineStringEndsWith=typeof String.prototype.endsWith==='function';return _this20;}/*************************************************************************
2919
2918
  * String Manipulation and Comparison Functions
2920
2919
  *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ /**
2921
2920
  * Reverse a string
@@ -3088,12 +3087,12 @@ return'';}if(tmpEnclosedValueEndIndex>0&&tmpEnclosedValueEndIndex>tmpEnclosedVal
3088
3087
  * @param {number} pEnclosureEnd
3089
3088
  * @returns {string}
3090
3089
  */},{key:"stringRemoveEnclosureByIndex",value:function stringRemoveEnclosureByIndex(pString,pEnclosureIndexToRemove,pEnclosureStart,pEnclosureEnd){var tmpString=typeof pString=='string'?pString:'';var tmpEnclosureIndexToRemove=typeof pEnclosureIndexToRemove=='number'?pEnclosureIndexToRemove:0;var tmpEnclosureStart=typeof pEnclosureStart=='string'?pEnclosureStart:'(';var tmpEnclosureEnd=typeof pEnclosureEnd=='string'?pEnclosureEnd:')';var tmpEnclosureCount=0;var tmpEnclosureDepth=0;var tmpMatchedEnclosureIndex=false;var tmpEnclosureStartIndex=0;var tmpEnclosureEndIndex=0;for(var i=0;i<tmpString.length;i++){// This is the start of an enclosure
3091
- if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;if(tmpEnclosureDepth==1){tmpEnclosureCount++;if(tmpEnclosureIndexToRemove==tmpEnclosureCount-1){tmpMatchedEnclosureIndex=true;tmpEnclosureStartIndex=i;}}}else if(tmpString[i]==tmpEnclosureEnd){tmpEnclosureDepth--;if(tmpEnclosureDepth==0&&tmpMatchedEnclosureIndex&&tmpEnclosureEndIndex<=tmpEnclosureStartIndex){tmpEnclosureEndIndex=i;tmpMatchedEnclosureIndex=false;}}}if(tmpEnclosureCount<=tmpEnclosureIndexToRemove){return tmpString;}var tmpReturnString='';if(tmpEnclosureStartIndex>1){tmpReturnString=tmpString.substring(0,tmpEnclosureStartIndex);}if(tmpString.length>tmpEnclosureEndIndex+1&&tmpEnclosureEndIndex>tmpEnclosureStartIndex){tmpReturnString+=tmpString.substring(tmpEnclosureEndIndex+1);}return tmpReturnString;}}]);return DataFormat;}(libFableServiceProviderBase);module.exports=DataFormat;},{"fable-serviceproviderbase":36}],113:[function(require,module,exports){module.exports={"DefaultIntegerMinimum":0,"DefaultIntegerMaximum":9999999,"DefaultNumericStringLength":10,"MonthSet":["January","February","March","April","May","June","July","August","September","October","November","December"],"WeekDaySet":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"ColorSet":["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],"SurNameSet":["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],"NameSet":["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]};},{}],114:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceDataGeneration=/*#__PURE__*/function(_libFableServiceBase2){_inherits(FableServiceDataGeneration,_libFableServiceBase2);var _super12=_createSuper(FableServiceDataGeneration);function FableServiceDataGeneration(pFable,pOptions,pServiceHash){var _this20;_classCallCheck2(this,FableServiceDataGeneration);_this20=_super12.call(this,pFable,pOptions,pServiceHash);_this20.serviceType='DataGeneration';_this20.defaultData=require('./Fable-Service-DataGeneration-DefaultValues.json');return _this20;}// Return a random integer between pMinimum and pMaximum
3090
+ if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;if(tmpEnclosureDepth==1){tmpEnclosureCount++;if(tmpEnclosureIndexToRemove==tmpEnclosureCount-1){tmpMatchedEnclosureIndex=true;tmpEnclosureStartIndex=i;}}}else if(tmpString[i]==tmpEnclosureEnd){tmpEnclosureDepth--;if(tmpEnclosureDepth==0&&tmpMatchedEnclosureIndex&&tmpEnclosureEndIndex<=tmpEnclosureStartIndex){tmpEnclosureEndIndex=i;tmpMatchedEnclosureIndex=false;}}}if(tmpEnclosureCount<=tmpEnclosureIndexToRemove){return tmpString;}var tmpReturnString='';if(tmpEnclosureStartIndex>1){tmpReturnString=tmpString.substring(0,tmpEnclosureStartIndex);}if(tmpString.length>tmpEnclosureEndIndex+1&&tmpEnclosureEndIndex>tmpEnclosureStartIndex){tmpReturnString+=tmpString.substring(tmpEnclosureEndIndex+1);}return tmpReturnString;}}]);return DataFormat;}(libFableServiceProviderBase);module.exports=DataFormat;},{"fable-serviceproviderbase":36}],113:[function(require,module,exports){module.exports={"DefaultIntegerMinimum":0,"DefaultIntegerMaximum":9999999,"DefaultNumericStringLength":10,"MonthSet":["January","February","March","April","May","June","July","August","September","October","November","December"],"WeekDaySet":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"ColorSet":["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],"SurNameSet":["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],"NameSet":["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]};},{}],114:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceDataGeneration=/*#__PURE__*/function(_libFableServiceBase2){_inherits(FableServiceDataGeneration,_libFableServiceBase2);var _super13=_createSuper(FableServiceDataGeneration);function FableServiceDataGeneration(pFable,pOptions,pServiceHash){var _this21;_classCallCheck2(this,FableServiceDataGeneration);_this21=_super13.call(this,pFable,pOptions,pServiceHash);_this21.serviceType='DataGeneration';_this21.defaultData=require('./Fable-Service-DataGeneration-DefaultValues.json');return _this21;}// Return a random integer between pMinimum and pMaximum
3092
3091
  _createClass2(FableServiceDataGeneration,[{key:"randomIntegerBetween",value:function randomIntegerBetween(pMinimum,pMaximum){return Math.floor(Math.random()*(pMaximum-pMinimum))+pMinimum;}// Return a random integer up to the passed-in maximum
3093
3092
  },{key:"randomIntegerUpTo",value:function randomIntegerUpTo(pMaximum){return this.randomIntegerBetween(0,pMaximum);}// Return a random integer between 0 and 9999999
3094
- },{key:"randomInteger",value:function randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum);}},{key:"randomNumericString",value:function randomNumericString(pLength,pMaxNumber){var tmpLength=typeof pLength==='undefined'?10:pLength;var tmpMaxNumber=typeof pMaxNumber==='undefined'?Math.pow(10,tmpLength)-1:pMaxNumber;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(tmpMaxNumber),pLength,'0');}},{key:"randomMonth",value:function randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)];}},{key:"randomDayOfWeek",value:function randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)];}},{key:"randomColor",value:function randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)];}},{key:"randomName",value:function randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)];}},{key:"randomSurname",value:function randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)];}}]);return FableServiceDataGeneration;}(libFableServiceBase);module.exports=FableServiceDataGeneration;},{"../Fable-ServiceManager.js":108,"./Fable-Service-DataGeneration-DefaultValues.json":113}],115:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceEnvironmentData=/*#__PURE__*/function(_libFableServiceBase3){_inherits(FableServiceEnvironmentData,_libFableServiceBase3);var _super13=_createSuper(FableServiceEnvironmentData);function FableServiceEnvironmentData(pFable,pOptions,pServiceHash){var _this21;_classCallCheck2(this,FableServiceEnvironmentData);_this21=_super13.call(this,pFable,pOptions,pServiceHash);_this21.serviceType='EnvironmentData';_this21.Environment="node.js";return _this21;}return _createClass2(FableServiceEnvironmentData);}(libFableServiceBase);module.exports=FableServiceEnvironmentData;},{"../Fable-ServiceManager.js":108}],116:[function(require,module,exports){(function(process){(function(){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libFS=require('fs');var libPath=require('path');var FableServiceFilePersistence=/*#__PURE__*/function(_libFableServiceBase4){_inherits(FableServiceFilePersistence,_libFableServiceBase4);var _super14=_createSuper(FableServiceFilePersistence);function FableServiceFilePersistence(pFable,pOptions,pServiceHash){var _this22;_classCallCheck2(this,FableServiceFilePersistence);_this22=_super14.call(this,pFable,pOptions,pServiceHash);_this22.serviceType='FilePersistence';if(!_this22.options.hasOwnProperty('Mode')){_this22.options.Mode=parseInt('0777',8)&~process.umask();}_this22.currentInputFolder="/tmp";_this22.currentOutputFolder="/tmp";return _this22;}_createClass2(FableServiceFilePersistence,[{key:"joinPath",value:function joinPath(){return libPath.resolve.apply(libPath,arguments);}},{key:"existsSync",value:function existsSync(pPath){return libFS.existsSync(pPath);}},{key:"exists",value:function exists(pPath,fCallback){var tmpFileExists=this.existsSync(pPath);;return fCallback(null,tmpFileExists);}},{key:"writeFileSync",value:function writeFileSync(pFileName,pFileContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.writeFileSync(pFileName,pFileContent,tmpOptions);}},{key:"appendFileSync",value:function appendFileSync(pFileName,pAppendContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.appendFileSync(pFileName,pAppendContent,tmpOptions);}},{key:"deleteFileSync",value:function deleteFileSync(pFileName){return libFS.unlinkSync(pFileName);}},{key:"deleteFolderSync",value:function deleteFolderSync(pFileName){return libFS.rmdirSync(pFileName);}},{key:"writeFileSyncFromObject",value:function writeFileSyncFromObject(pFileName,pObject){return this.writeFileSync(pFileName,JSON.stringify(pObject,null,4));}},{key:"writeFileSyncFromArray",value:function writeFileSyncFromArray(pFileName,pFileArray){if(!Array.isArray(pFileArray)){this.log.error("File Persistence Service attempted to write ".concat(pFileName," from array but the expected array was not an array (it was a ").concat(_typeof(pFileArray),")."));return Error('Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).');}else{for(var i=0;i<pFileArray.length;i++){return this.appendFileSync(pFileName,"".concat(pFileArray[i],"\n"));}}}// Default folder behaviors
3093
+ },{key:"randomInteger",value:function randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum);}},{key:"randomNumericString",value:function randomNumericString(pLength,pMaxNumber){var tmpLength=typeof pLength==='undefined'?10:pLength;var tmpMaxNumber=typeof pMaxNumber==='undefined'?Math.pow(10,tmpLength)-1:pMaxNumber;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(tmpMaxNumber),pLength,'0');}},{key:"randomMonth",value:function randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)];}},{key:"randomDayOfWeek",value:function randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)];}},{key:"randomColor",value:function randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)];}},{key:"randomName",value:function randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)];}},{key:"randomSurname",value:function randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)];}}]);return FableServiceDataGeneration;}(libFableServiceBase);module.exports=FableServiceDataGeneration;},{"../Fable-ServiceManager.js":108,"./Fable-Service-DataGeneration-DefaultValues.json":113}],115:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceEnvironmentData=/*#__PURE__*/function(_libFableServiceBase3){_inherits(FableServiceEnvironmentData,_libFableServiceBase3);var _super14=_createSuper(FableServiceEnvironmentData);function FableServiceEnvironmentData(pFable,pOptions,pServiceHash){var _this22;_classCallCheck2(this,FableServiceEnvironmentData);_this22=_super14.call(this,pFable,pOptions,pServiceHash);_this22.serviceType='EnvironmentData';_this22.Environment="node.js";return _this22;}return _createClass2(FableServiceEnvironmentData);}(libFableServiceBase);module.exports=FableServiceEnvironmentData;},{"../Fable-ServiceManager.js":108}],116:[function(require,module,exports){(function(process){(function(){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libFS=require('fs');var libPath=require('path');var FableServiceFilePersistence=/*#__PURE__*/function(_libFableServiceBase4){_inherits(FableServiceFilePersistence,_libFableServiceBase4);var _super15=_createSuper(FableServiceFilePersistence);function FableServiceFilePersistence(pFable,pOptions,pServiceHash){var _this23;_classCallCheck2(this,FableServiceFilePersistence);_this23=_super15.call(this,pFable,pOptions,pServiceHash);_this23.serviceType='FilePersistence';if(!_this23.options.hasOwnProperty('Mode')){_this23.options.Mode=parseInt('0777',8)&~process.umask();}_this23.currentInputFolder="/tmp";_this23.currentOutputFolder="/tmp";return _this23;}_createClass2(FableServiceFilePersistence,[{key:"joinPath",value:function joinPath(){return libPath.resolve.apply(libPath,arguments);}},{key:"existsSync",value:function existsSync(pPath){return libFS.existsSync(pPath);}},{key:"exists",value:function exists(pPath,fCallback){var tmpFileExists=this.existsSync(pPath);;return fCallback(null,tmpFileExists);}},{key:"writeFileSync",value:function writeFileSync(pFileName,pFileContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.writeFileSync(pFileName,pFileContent,tmpOptions);}},{key:"appendFileSync",value:function appendFileSync(pFileName,pAppendContent,pOptions){var tmpOptions=typeof pOptions==='undefined'?'utf8':pOptions;return libFS.appendFileSync(pFileName,pAppendContent,tmpOptions);}},{key:"deleteFileSync",value:function deleteFileSync(pFileName){return libFS.unlinkSync(pFileName);}},{key:"deleteFolderSync",value:function deleteFolderSync(pFileName){return libFS.rmdirSync(pFileName);}},{key:"writeFileSyncFromObject",value:function writeFileSyncFromObject(pFileName,pObject){return this.writeFileSync(pFileName,JSON.stringify(pObject,null,4));}},{key:"writeFileSyncFromArray",value:function writeFileSyncFromArray(pFileName,pFileArray){if(!Array.isArray(pFileArray)){this.log.error("File Persistence Service attempted to write ".concat(pFileName," from array but the expected array was not an array (it was a ").concat(_typeof(pFileArray),")."));return Error('Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).');}else{for(var i=0;i<pFileArray.length;i++){return this.appendFileSync(pFileName,"".concat(pFileArray[i],"\n"));}}}// Default folder behaviors
3095
3094
  },{key:"getDefaultOutputPath",value:function getDefaultOutputPath(pFileName){return libPath.join(this.currentOutputFolder,pFileName);}},{key:"dataFolderWriteSync",value:function dataFolderWriteSync(pFileName,pFileContent){return this.writeFileSync(this.getDefaultOutputPath(pFileName),pFileContent);}},{key:"dataFolderWriteSyncFromObject",value:function dataFolderWriteSyncFromObject(pFileName,pObject){return this.writeFileSyncFromObject(this.getDefaultOutputPath(pFileName),pObject);}},{key:"dataFolderWriteSyncFromArray",value:function dataFolderWriteSyncFromArray(pFileName,pFileArray){return this.writeFileSyncFromArray(this.getDefaultOutputPath(pFileName),pFileArray);}// Folder management
3096
- },{key:"makeFolderRecursive",value:function makeFolderRecursive(pParameters,fCallback){var _this23=this;var tmpParameters=pParameters;if(typeof pParameters=='string'){tmpParameters={Path:pParameters};}else if(_typeof(pParameters)!=='object'){fCallback(new Error('Parameters object or string not properly passed to recursive folder create.'));return false;}if(typeof tmpParameters.Path!=='string'){fCallback(new Error('Parameters object needs a path to run the folder create operation.'));return false;}if(!tmpParameters.hasOwnProperty('Mode')){tmpParameters.Mode=this.options.Mode;}// Check if we are just starting .. if so, build the initial state for our recursive function
3095
+ },{key:"makeFolderRecursive",value:function makeFolderRecursive(pParameters,fCallback){var _this24=this;var tmpParameters=pParameters;if(typeof pParameters=='string'){tmpParameters={Path:pParameters};}else if(_typeof(pParameters)!=='object'){fCallback(new Error('Parameters object or string not properly passed to recursive folder create.'));return false;}if(typeof tmpParameters.Path!=='string'){fCallback(new Error('Parameters object needs a path to run the folder create operation.'));return false;}if(!tmpParameters.hasOwnProperty('Mode')){tmpParameters.Mode=this.options.Mode;}// Check if we are just starting .. if so, build the initial state for our recursive function
3097
3096
  if(typeof tmpParameters.CurrentPathIndex==='undefined'){// Build the tools to start recursing
3098
3097
  tmpParameters.ActualPath=libPath.normalize(tmpParameters.Path);tmpParameters.ActualPathParts=tmpParameters.ActualPath.split(libPath.sep);tmpParameters.CurrentPathIndex=0;tmpParameters.CurrentPath='';}else{// This is not our first run, so we will continue the recursion.
3099
3098
  // Build the new base path
@@ -3101,13 +3100,13 @@ if(tmpParameters.CurrentPath==libPath.sep){tmpParameters.CurrentPath=tmpParamete
3101
3100
  tmpParameters.CurrentPathIndex++;}// Check if the path is fully complete
3102
3101
  if(tmpParameters.CurrentPathIndex>=tmpParameters.ActualPathParts.length){return fCallback(null);}// Check if the path exists (and is a folder)
3103
3102
  libFS.open(tmpParameters.CurrentPath+libPath.sep+tmpParameters.ActualPathParts[tmpParameters.CurrentPathIndex],'r',function(pError,pFileDescriptor){if(pFileDescriptor){libFS.closeSync(pFileDescriptor);}if(pError&&pError.code=='ENOENT'){/* Path doesn't exist, create it */libFS.mkdir(tmpParameters.CurrentPath+libPath.sep+tmpParameters.ActualPathParts[tmpParameters.CurrentPathIndex],tmpParameters.Mode,function(pCreateError){if(!pCreateError){// We have now created our folder and there was no error -- continue.
3104
- return _this23.makeFolderRecursive(tmpParameters,fCallback);}else if(pCreateError.code=='EEXIST'){// The folder exists -- our dev might be running this in parallel/async/whatnot.
3105
- return _this23.makeFolderRecursive(tmpParameters,fCallback);}else{console.log(pCreateError.code);return fCallback(pCreateError);}});}else{return _this23.makeFolderRecursive(tmpParameters,fCallback);}});}}]);return FableServiceFilePersistence;}(libFableServiceBase);module.exports=FableServiceFilePersistence;}).call(this);}).call(this,require('_process'));},{"../Fable-ServiceManager.js":108,"_process":69,"fs":19,"path":65}],117:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;/**
3103
+ return _this24.makeFolderRecursive(tmpParameters,fCallback);}else if(pCreateError.code=='EEXIST'){// The folder exists -- our dev might be running this in parallel/async/whatnot.
3104
+ return _this24.makeFolderRecursive(tmpParameters,fCallback);}else{console.log(pCreateError.code);return fCallback(pCreateError);}});}else{return _this24.makeFolderRecursive(tmpParameters,fCallback);}});}}]);return FableServiceFilePersistence;}(libFableServiceBase);module.exports=FableServiceFilePersistence;}).call(this);}).call(this,require('_process'));},{"../Fable-ServiceManager.js":108,"_process":69,"fs":19,"path":65}],117:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;/**
3106
3105
  * Precedent Meta-Templating
3107
3106
  * @author Steven Velozo <steven@velozo.com>
3108
3107
  * @description Process text stream trie and postfix tree, parsing out meta-template expression functions.
3109
- */var libWordTree=require("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js");var libStringParser=require("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js");var FableServiceMetaTemplate=/*#__PURE__*/function(_libFableServiceBase5){_inherits(FableServiceMetaTemplate,_libFableServiceBase5);var _super15=_createSuper(FableServiceMetaTemplate);function FableServiceMetaTemplate(pFable,pOptions,pServiceHash){var _this24;_classCallCheck2(this,FableServiceMetaTemplate);_this24=_super15.call(this,pFable,pOptions,pServiceHash);_this24.serviceType='MetaTemplate';_this24.WordTree=new libWordTree();// In order to allow asynchronous template processing we need to use the async.eachLimit function
3110
- _this24.StringParser=new libStringParser(_this24.fable.services.Utility.eachLimit);_this24.ParseTree=_this24.WordTree.ParseTree;return _this24;}/**
3108
+ */var libWordTree=require("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js");var libStringParser=require("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js");var FableServiceMetaTemplate=/*#__PURE__*/function(_libFableServiceBase5){_inherits(FableServiceMetaTemplate,_libFableServiceBase5);var _super16=_createSuper(FableServiceMetaTemplate);function FableServiceMetaTemplate(pFable,pOptions,pServiceHash){var _this25;_classCallCheck2(this,FableServiceMetaTemplate);_this25=_super16.call(this,pFable,pOptions,pServiceHash);_this25.serviceType='MetaTemplate';_this25.WordTree=new libWordTree();// In order to allow asynchronous template processing we need to use the async.eachLimit function
3109
+ _this25.StringParser=new libStringParser(_this25.fable.services.Utility.eachLimit);_this25.ParseTree=_this25.WordTree.ParseTree;return _this25;}/**
3111
3110
  * Add a Pattern to the Parse Tree
3112
3111
  * @method addPattern
3113
3112
  * @param {Object} pTree - A node on the parse tree to push the characters into
@@ -3173,7 +3172,7 @@ this.resetOutputBuffer(pParserState);this.appendOutputBuffer(pCharacter,pParserS
3173
3172
  * @param {string} pCharacter - The character to append
3174
3173
  * @param {Object} pParserState - The state object for the current parsing task
3175
3174
  * @private
3176
- */},{key:"parseCharacterAsync",value:function parseCharacterAsync(pCharacter,pParserState,pData,fCallback){var _this25=this;// If we are already in a pattern match traversal
3175
+ */},{key:"parseCharacterAsync",value:function parseCharacterAsync(pCharacter,pParserState,pData,fCallback){var _this26=this;// If we are already in a pattern match traversal
3177
3176
  if(pParserState.PatternMatch){// If the pattern is still matching the start and we haven't passed the buffer
3178
3177
  if(!pParserState.StartPatternMatchComplete&&pParserState.Pattern.hasOwnProperty(pCharacter)){pParserState.Pattern=pParserState.Pattern[pCharacter];this.appendOutputBuffer(pCharacter,pParserState);}else if(pParserState.EndPatternMatchBegan){if(pParserState.Pattern.PatternEnd.hasOwnProperty(pCharacter)){// This leaf has a PatternEnd tree, so we will wait until that end is met.
3179
3178
  pParserState.Pattern=pParserState.Pattern.PatternEnd[pCharacter];// Flush the output buffer.
@@ -3181,7 +3180,7 @@ this.appendOutputBuffer(pCharacter,pParserState);// If this last character is th
3181
3180
  if(pParserState.Pattern.hasOwnProperty('Parse')){// ... this is the end of a pattern, cut off the end tag and parse it.
3182
3181
  // Trim the start and end tags off the output buffer now
3183
3182
  if(pParserState.Pattern.isAsync){// Run the function
3184
- return pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){console.log("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this25.resetOutputBuffer(pParserState);return fCallback();});}else{// Run the t*mplate function
3183
+ return pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){console.log("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this26.resetOutputBuffer(pParserState);return fCallback();});}else{// Run the t*mplate function
3185
3184
  pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData);this.resetOutputBuffer(pParserState);return fCallback();}}}else if(pParserState.PatternStartNode.PatternEnd.hasOwnProperty(pCharacter)){// We broke out of the end -- see if this is a new start of the end.
3186
3185
  pParserState.Pattern=pParserState.PatternStartNode.PatternEnd[pCharacter];this.appendOutputBuffer(pCharacter,pParserState);}else{pParserState.EndPatternMatchBegan=false;this.appendOutputBuffer(pCharacter,pParserState);}}else if(pParserState.Pattern.hasOwnProperty('PatternEnd')){if(!pParserState.StartPatternMatchComplete){pParserState.StartPatternMatchComplete=true;pParserState.PatternStartNode=pParserState.Pattern;}this.appendOutputBuffer(pCharacter,pParserState);if(pParserState.Pattern.PatternEnd.hasOwnProperty(pCharacter)){// This is the first character of the end pattern.
3187
3186
  pParserState.EndPatternMatchBegan=true;// This leaf has a PatternEnd tree, so we will wait until that end is met.
@@ -3189,7 +3188,7 @@ pParserState.Pattern=pParserState.Pattern.PatternEnd[pCharacter];// If this last
3189
3188
  if(pParserState.Pattern.hasOwnProperty('Parse')){// ... this is the end of a pattern, cut off the end tag and parse it.
3190
3189
  // Trim the start and end tags off the output buffer now
3191
3190
  if(pParserState.Pattern.isAsync){// Run the function
3192
- return pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){console.log("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this25.resetOutputBuffer(pParserState);return fCallback();});}else{// Run the t*mplate function
3191
+ return pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData,function(pError,pAsyncOutput){if(pError){console.log("Precedent ERROR: Async template error happened parsing ".concat(pParserState.Pattern.PatternStart," ... ").concat(pParserState.Pattern.PatternEnd,": ").concat(pError));}pParserState.OutputBuffer=pAsyncOutput;_this26.resetOutputBuffer(pParserState);return fCallback();});}else{// Run the t*mplate function
3193
3192
  pParserState.OutputBuffer=pParserState.Pattern.Parse(pParserState.OutputBuffer.substr(pParserState.Pattern.PatternStartString.length,pParserState.OutputBuffer.length-(pParserState.Pattern.PatternStartString.length+pParserState.Pattern.PatternEndString.length)),pData);this.resetOutputBuffer(pParserState);return fCallback();}}}}else{// We are in a pattern start but didn't match one; reset and start trying again from this character.
3194
3193
  this.resetOutputBuffer(pParserState);return fCallback();}}// If we aren't in a pattern match or pattern, and this isn't the start of a new pattern (RAW mode)....
3195
3194
  if(!pParserState.PatternMatch){// This may be the start of a new pattern....
@@ -3201,10 +3200,10 @@ this.resetOutputBuffer(pParserState);this.appendOutputBuffer(pCharacter,pParserS
3201
3200
  * @param {Object} pParseTree - The parse tree to begin parsing from (usually root)
3202
3201
  * @param {Object} pData - The data to pass to the function as a second parameter
3203
3202
  * @param {function} fCallback - The callback function to call when the parse is complete
3204
- */},{key:"parseString",value:function parseString(pString,pParseTree,pData,fCallback){var _this26=this;if(typeof fCallback!=='function'){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){// TODO: This is not fast.
3203
+ */},{key:"parseString",value:function parseString(pString,pParseTree,pData,fCallback){var _this27=this;if(typeof fCallback!=='function'){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){// TODO: This is not fast.
3205
3204
  this.parseCharacter(pString[i],tmpParserState,pData,fCallback);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}else{// This is the async mode
3206
- var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;this.eachLimit(pString,1,function(pCharacter,fCharacterCallback){_this26.parseCharacterAsync(pCharacter,_tmpParserState,pData,fCharacterCallback);},function(pError){// Flush the remaining data
3207
- _this26.flushOutputBuffer(_tmpParserState);fCallback(pError,_tmpParserState.Output);});}}}]);return StringParser;}();module.exports=StringParser;},{}],119:[function(require,module,exports){/**
3205
+ var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;this.eachLimit(pString,1,function(pCharacter,fCharacterCallback){_this27.parseCharacterAsync(pCharacter,_tmpParserState,pData,fCharacterCallback);},function(pError){// Flush the remaining data
3206
+ _this27.flushOutputBuffer(_tmpParserState);fCallback(pError,_tmpParserState.Output);});}}}]);return StringParser;}();module.exports=StringParser;},{}],119:[function(require,module,exports){/**
3208
3207
  * Word Tree
3209
3208
  * @author Steven Velozo <steven@velozo.com>
3210
3209
  * @description Create a tree (directed graph) of Javascript objects, one character per object.
@@ -3237,20 +3236,20 @@ for(var i=0;i<pPatternStart.length;i++){tmpLeaf=this.addChild(tmpLeaf,pPatternSt
3237
3236
  * @param {string} pPatternEnd - The ending string for the pattern (e.g. "}")
3238
3237
  * @param {function} fParser - The function to parse if this is the matched pattern, once the Pattern End is met. If this is a string, a simple replacement occurs.
3239
3238
  * @return {bool} True if adding the pattern was successful
3240
- */},{key:"addPatternAsync",value:function addPatternAsync(pPatternStart,pPatternEnd,fParser){var tmpLeaf=this.addPattern(pPatternStart,pPatternEnd,fParser);if(tmpLeaf){tmpLeaf.isAsync=true;}}}]);return WordTree;}();module.exports=WordTree;},{}],120:[function(require,module,exports){module.exports={"Metadata":{"UUID":false,"Hash":false,"Title":"","Summary":"","Version":0},"Status":{"Completed":false,"CompletionProgress":0,"CompletionTimeElapsed":0,"Steps":1,"StepsCompleted":0,"StartTime":0,"EndTime":0},"Errors":[],"Log":[]};},{}],121:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));var FableOperation=/*#__PURE__*/function(_libFableServiceBase6){_inherits(FableOperation,_libFableServiceBase6);var _super16=_createSuper(FableOperation);function FableOperation(pFable,pOptions,pServiceHash){var _this27;_classCallCheck2(this,FableOperation);_this27=_super16.call(this,pFable,pOptions,pServiceHash);_this27.serviceType='PhasedOperation';_this27.state=JSON.parse(_OperationStatePrototypeString);// Match the service instantiation to the operation.
3241
- _this27.state.Metadata.Hash=_this27.Hash;_this27.state.Metadata.UUID=_this27.UUID;_this27.name=typeof _this27.options.Name=='string'?_this27.options.Name:"Unnamed Operation ".concat(_this27.state.Metadata.UUID);_this27.log=_assertThisInitialized(_this27);return _this27;}_createClass2(FableOperation,[{key:"writeOperationLog",value:function writeOperationLog(pLogLevel,pLogText,pLogObject){this.state.Log.push("".concat(new Date().toUTCString()," [").concat(pLogLevel,"]: ").concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Log.push(JSON.stringify(pLogObject));}}},{key:"writeOperationErrors",value:function writeOperationErrors(pLogText,pLogObject){this.state.Errors.push("".concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Errors.push(JSON.stringify(pLogObject));}}},{key:"trace",value:function trace(pLogText,pLogObject){this.writeOperationLog('TRACE',pLogText,pLogObject);this.fable.log.trace(pLogText,pLogObject);}},{key:"debug",value:function debug(pLogText,pLogObject){this.writeOperationLog('DEBUG',pLogText,pLogObject);this.fable.log.debug(pLogText,pLogObject);}},{key:"info",value:function info(pLogText,pLogObject){this.writeOperationLog('INFO',pLogText,pLogObject);this.fable.log.info(pLogText,pLogObject);}},{key:"warn",value:function warn(pLogText,pLogObject){this.writeOperationLog('WARN',pLogText,pLogObject);this.fable.log.warn(pLogText,pLogObject);}},{key:"error",value:function error(pLogText,pLogObject){this.writeOperationLog('ERROR',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.error(pLogText,pLogObject);}},{key:"fatal",value:function fatal(pLogText,pLogObject){this.writeOperationLog('FATAL',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.fatal(pLogText,pLogObject);}}]);return FableOperation;}(libFableServiceBase);module.exports=FableOperation;},{"../Fable-ServiceManager.js":108,"./Fable-Service-Operation-DefaultSettings.js":120}],122:[function(require,module,exports){(function(Buffer){(function(){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libSimpleGet=require('simple-get');var libCookie=require('cookie');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase7){_inherits(FableServiceRestClient,_libFableServiceBase7);var _super17=_createSuper(FableServiceRestClient);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this28;_classCallCheck2(this,FableServiceRestClient);_this28=_super17.call(this,pFable,pOptions,pServiceHash);_this28.TraceLog=false;if(_this28.options.TraceLog||_this28.fable.TraceLog){_this28.TraceLog=true;}_this28.dataFormat=_this28.fable.services.DataFormat;_this28.serviceType='RestClient';_this28.cookie=false;// This is a function that can be overridden, to allow the management
3239
+ */},{key:"addPatternAsync",value:function addPatternAsync(pPatternStart,pPatternEnd,fParser){var tmpLeaf=this.addPattern(pPatternStart,pPatternEnd,fParser);if(tmpLeaf){tmpLeaf.isAsync=true;}}}]);return WordTree;}();module.exports=WordTree;},{}],120:[function(require,module,exports){module.exports={"Metadata":{"UUID":false,"Hash":false,"Title":"","Summary":"","Version":0},"Status":{"Completed":false,"CompletionProgress":0,"CompletionTimeElapsed":0,"Steps":1,"StepsCompleted":0,"StartTime":0,"EndTime":0},"Errors":[],"Log":[]};},{}],121:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));var FableOperation=/*#__PURE__*/function(_libFableServiceBase6){_inherits(FableOperation,_libFableServiceBase6);var _super17=_createSuper(FableOperation);function FableOperation(pFable,pOptions,pServiceHash){var _this28;_classCallCheck2(this,FableOperation);_this28=_super17.call(this,pFable,pOptions,pServiceHash);_this28.serviceType='PhasedOperation';_this28.state=JSON.parse(_OperationStatePrototypeString);// Match the service instantiation to the operation.
3240
+ _this28.state.Metadata.Hash=_this28.Hash;_this28.state.Metadata.UUID=_this28.UUID;_this28.name=typeof _this28.options.Name=='string'?_this28.options.Name:"Unnamed Operation ".concat(_this28.state.Metadata.UUID);_this28.log=_assertThisInitialized(_this28);return _this28;}_createClass2(FableOperation,[{key:"writeOperationLog",value:function writeOperationLog(pLogLevel,pLogText,pLogObject){this.state.Log.push("".concat(new Date().toUTCString()," [").concat(pLogLevel,"]: ").concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Log.push(JSON.stringify(pLogObject));}}},{key:"writeOperationErrors",value:function writeOperationErrors(pLogText,pLogObject){this.state.Errors.push("".concat(pLogText));if(_typeof(pLogObject)=='object'){this.state.Errors.push(JSON.stringify(pLogObject));}}},{key:"trace",value:function trace(pLogText,pLogObject){this.writeOperationLog('TRACE',pLogText,pLogObject);this.fable.log.trace(pLogText,pLogObject);}},{key:"debug",value:function debug(pLogText,pLogObject){this.writeOperationLog('DEBUG',pLogText,pLogObject);this.fable.log.debug(pLogText,pLogObject);}},{key:"info",value:function info(pLogText,pLogObject){this.writeOperationLog('INFO',pLogText,pLogObject);this.fable.log.info(pLogText,pLogObject);}},{key:"warn",value:function warn(pLogText,pLogObject){this.writeOperationLog('WARN',pLogText,pLogObject);this.fable.log.warn(pLogText,pLogObject);}},{key:"error",value:function error(pLogText,pLogObject){this.writeOperationLog('ERROR',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.error(pLogText,pLogObject);}},{key:"fatal",value:function fatal(pLogText,pLogObject){this.writeOperationLog('FATAL',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.fatal(pLogText,pLogObject);}}]);return FableOperation;}(libFableServiceBase);module.exports=FableOperation;},{"../Fable-ServiceManager.js":108,"./Fable-Service-Operation-DefaultSettings.js":120}],122:[function(require,module,exports){(function(Buffer){(function(){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libSimpleGet=require('simple-get');var libCookie=require('cookie');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase7){_inherits(FableServiceRestClient,_libFableServiceBase7);var _super18=_createSuper(FableServiceRestClient);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this29;_classCallCheck2(this,FableServiceRestClient);_this29=_super18.call(this,pFable,pOptions,pServiceHash);_this29.TraceLog=false;if(_this29.options.TraceLog||_this29.fable.TraceLog){_this29.TraceLog=true;}_this29.dataFormat=_this29.fable.services.DataFormat;_this29.serviceType='RestClient';_this29.cookie=false;// This is a function that can be overridden, to allow the management
3242
3241
  // of the request options before they are passed to the request library.
3243
- _this28.prepareRequestOptions=function(pOptions){return pOptions;};return _this28;}_createClass2(FableServiceRestClient,[{key:"simpleGet",get:function get(){return libSimpleGet;}},{key:"prepareCookies",value:function prepareCookies(pRequestOptions){if(this.cookie){var tmpCookieObject=this.cookie;if(!pRequestOptions.hasOwnProperty('headers')){pRequestOptions.headers={};}var tmpCookieKeys=Object.keys(tmpCookieObject);if(tmpCookieKeys.length>0){// Only grab the first for now.
3242
+ _this29.prepareRequestOptions=function(pOptions){return pOptions;};return _this29;}_createClass2(FableServiceRestClient,[{key:"simpleGet",get:function get(){return libSimpleGet;}},{key:"prepareCookies",value:function prepareCookies(pRequestOptions){if(this.cookie){var tmpCookieObject=this.cookie;if(!pRequestOptions.hasOwnProperty('headers')){pRequestOptions.headers={};}var tmpCookieKeys=Object.keys(tmpCookieObject);if(tmpCookieKeys.length>0){// Only grab the first for now.
3244
3243
  pRequestOptions.headers.cookie=libCookie.serialize(tmpCookieKeys[0],tmpCookieObject[tmpCookieKeys[0]]);}}return pRequestOptions;}},{key:"preRequest",value:function preRequest(pOptions){// Validate the options object
3245
- var tmpOptions=this.prepareCookies(pOptions);return this.prepareRequestOptions(tmpOptions);}},{key:"executeChunkedRequest",value:function executeChunkedRequest(pOptions,fCallback){var _this29=this;var tmpOptions=this.preRequest(pOptions);tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this29.TraceLog){var tmpConnectTime=_this29.fable.log.getTimeStamp();_this29.fable.log.debug("--> ".concat(tmpOptions.method," connected in ").concat(_this29.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpData='';pResponse.on('data',function(pChunk){// For JSON, the chunk is the serialized object.
3246
- if(_this29.TraceLog){var tmpChunkTime=_this29.fable.log.getTimeStamp();_this29.fable.log.debug("--> ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this29.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}tmpData+=pChunk;});pResponse.on('end',function(){if(_this29.TraceLog){var tmpCompletionTime=_this29.fable.log.getTimeStamp();_this29.fable.log.debug("==> ".concat(tmpOptions.method," completed data size ").concat(tmpData.length,"b received in ").concat(_this29.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,tmpData);});});}},{key:"executeChunkedRequestBinary",value:function executeChunkedRequestBinary(pOptions,fCallback){var _this30=this;var tmpOptions=this.preRequest(pOptions);tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}tmpOptions.json=false;tmpOptions.encoding=null;return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this30.TraceLog){var tmpConnectTime=_this30.fable.log.getTimeStamp();_this30.fable.log.debug("--> ".concat(tmpOptions.method," connected in ").concat(_this30.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpDataBuffer=false;pResponse.on('data',function(pChunk){// For JSON, the chunk is the serialized object.
3247
- if(_this30.TraceLog){var tmpChunkTime=_this30.fable.log.getTimeStamp();_this30.fable.log.debug("--> ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this30.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}// TODO: Potentially create a third option that streams this to a file? So it doesn't have to hold it all in memory.
3248
- if(!tmpDataBuffer){tmpDataBuffer=Buffer.from(pChunk);}else{tmpDataBuffer=Buffer.concat([tmpDataBuffer,pChunk]);}});pResponse.on('end',function(){if(_this30.TraceLog){var tmpCompletionTime=_this30.fable.log.getTimeStamp();_this30.fable.log.debug("==> ".concat(tmpOptions.method," completed data size ").concat(tmpDataBuffer.length,"b received in ").concat(_this30.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,tmpDataBuffer);});});}},{key:"executeJSONRequest",value:function executeJSONRequest(pOptions,fCallback){var _this31=this;pOptions.json=true;var tmpOptions=this.preRequest(pOptions);if(!tmpOptions.hasOwnProperty('headers')){tmpOptions.headers={};}/* Automated headers break some APIs
3244
+ var tmpOptions=this.prepareCookies(pOptions);return this.prepareRequestOptions(tmpOptions);}},{key:"executeChunkedRequest",value:function executeChunkedRequest(pOptions,fCallback){var _this30=this;var tmpOptions=this.preRequest(pOptions);tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this30.TraceLog){var tmpConnectTime=_this30.fable.log.getTimeStamp();_this30.fable.log.debug("--> ".concat(tmpOptions.method," connected in ").concat(_this30.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpData='';pResponse.on('data',function(pChunk){// For JSON, the chunk is the serialized object.
3245
+ if(_this30.TraceLog){var tmpChunkTime=_this30.fable.log.getTimeStamp();_this30.fable.log.debug("--> ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this30.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}tmpData+=pChunk;});pResponse.on('end',function(){if(_this30.TraceLog){var tmpCompletionTime=_this30.fable.log.getTimeStamp();_this30.fable.log.debug("==> ".concat(tmpOptions.method," completed data size ").concat(tmpData.length,"b received in ").concat(_this30.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,tmpData);});});}},{key:"executeChunkedRequestBinary",value:function executeChunkedRequestBinary(pOptions,fCallback){var _this31=this;var tmpOptions=this.preRequest(pOptions);tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}tmpOptions.json=false;tmpOptions.encoding=null;return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this31.TraceLog){var tmpConnectTime=_this31.fable.log.getTimeStamp();_this31.fable.log.debug("--> ".concat(tmpOptions.method," connected in ").concat(_this31.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpDataBuffer=false;pResponse.on('data',function(pChunk){// For JSON, the chunk is the serialized object.
3246
+ if(_this31.TraceLog){var tmpChunkTime=_this31.fable.log.getTimeStamp();_this31.fable.log.debug("--> ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this31.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}// TODO: Potentially create a third option that streams this to a file? So it doesn't have to hold it all in memory.
3247
+ if(!tmpDataBuffer){tmpDataBuffer=Buffer.from(pChunk);}else{tmpDataBuffer=Buffer.concat([tmpDataBuffer,pChunk]);}});pResponse.on('end',function(){if(_this31.TraceLog){var tmpCompletionTime=_this31.fable.log.getTimeStamp();_this31.fable.log.debug("==> ".concat(tmpOptions.method," completed data size ").concat(tmpDataBuffer.length,"b received in ").concat(_this31.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,tmpDataBuffer);});});}},{key:"executeJSONRequest",value:function executeJSONRequest(pOptions,fCallback){var _this32=this;pOptions.json=true;var tmpOptions=this.preRequest(pOptions);if(!tmpOptions.hasOwnProperty('headers')){tmpOptions.headers={};}/* Automated headers break some APIs
3249
3248
  if (!tmpOptions.headers.hasOwnProperty('Content-Type'))
3250
3249
  {
3251
3250
  tmpOptions.headers['Content-Type'] = 'application/json';
3252
3251
  }
3253
- */tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," JSON request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this31.TraceLog){var tmpConnectTime=_this31.fable.log.getTimeStamp();_this31.fable.log.debug("--> JSON ".concat(tmpOptions.method," connected in ").concat(_this31.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpJSONData='';pResponse.on('data',function(pChunk){if(_this31.TraceLog){var tmpChunkTime=_this31.fable.log.getTimeStamp();_this31.fable.log.debug("--> JSON ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this31.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}tmpJSONData+=pChunk;});pResponse.on('end',function(){if(_this31.TraceLog){var tmpCompletionTime=_this31.fable.log.getTimeStamp();_this31.fable.log.debug("==> JSON ".concat(tmpOptions.method," completed - received in ").concat(_this31.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,JSON.parse(tmpJSONData));});});}},{key:"getJSON",value:function getJSON(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeJSONRequest(tmpRequestOptions,fCallback);}},{key:"putJSON",value:function putJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PUT JSON Error Invalid options object"));}pOptions.method='PUT';return this.executeJSONRequest(pOptions,fCallback);}},{key:"postJSON",value:function postJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("POST JSON Error Invalid options object"));}pOptions.method='POST';return this.executeJSONRequest(pOptions,fCallback);}},{key:"patchJSON",value:function patchJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PATCH JSON Error Invalid options object"));}pOptions.method='PATCH';return this.executeJSONRequest(pOptions,fCallback);}},{key:"headJSON",value:function headJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("HEAD JSON Error Invalid options object"));}pOptions.method='HEAD';return this.executeJSONRequest(pOptions,fCallback);}},{key:"delJSON",value:function delJSON(pOptions,fCallback){pOptions.method='DELETE';return this.executeJSONRequest(pOptions,fCallback);}},{key:"getRawText",value:function getRawText(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeChunkedRequest(tmpRequestOptions,fCallback);}}]);return FableServiceRestClient;}(libFableServiceBase);module.exports=FableServiceRestClient;}).call(this);}).call(this,require("buffer").Buffer);},{"../Fable-ServiceManager.js":108,"buffer":20,"cookie":27,"simple-get":82}],123:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceTemplate=/*#__PURE__*/function(_libFableServiceBase8){_inherits(FableServiceTemplate,_libFableServiceBase8);var _super18=_createSuper(FableServiceTemplate);// Underscore and lodash have a behavior, _.template, which compiles a
3252
+ */tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug("Beginning ".concat(tmpOptions.method," JSON request to ").concat(tmpOptions.url," at ").concat(tmpOptions.RequestStartTime));}return libSimpleGet(tmpOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse);}if(_this32.TraceLog){var tmpConnectTime=_this32.fable.log.getTimeStamp();_this32.fable.log.debug("--> JSON ".concat(tmpOptions.method," connected in ").concat(_this32.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpJSONData='';pResponse.on('data',function(pChunk){if(_this32.TraceLog){var tmpChunkTime=_this32.fable.log.getTimeStamp();_this32.fable.log.debug("--> JSON ".concat(tmpOptions.method," data chunk size ").concat(pChunk.length,"b received in ").concat(_this32.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime),"ms"));}tmpJSONData+=pChunk;});pResponse.on('end',function(){if(_this32.TraceLog){var tmpCompletionTime=_this32.fable.log.getTimeStamp();_this32.fable.log.debug("==> JSON ".concat(tmpOptions.method," completed - received in ").concat(_this32.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,JSON.parse(tmpJSONData));});});}},{key:"getJSON",value:function getJSON(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeJSONRequest(tmpRequestOptions,fCallback);}},{key:"putJSON",value:function putJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PUT JSON Error Invalid options object"));}pOptions.method='PUT';return this.executeJSONRequest(pOptions,fCallback);}},{key:"postJSON",value:function postJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("POST JSON Error Invalid options object"));}pOptions.method='POST';return this.executeJSONRequest(pOptions,fCallback);}},{key:"patchJSON",value:function patchJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("PATCH JSON Error Invalid options object"));}pOptions.method='PATCH';return this.executeJSONRequest(pOptions,fCallback);}},{key:"headJSON",value:function headJSON(pOptions,fCallback){if(_typeof(pOptions.body)!='object'){return fCallback(new Error("HEAD JSON Error Invalid options object"));}pOptions.method='HEAD';return this.executeJSONRequest(pOptions,fCallback);}},{key:"delJSON",value:function delJSON(pOptions,fCallback){pOptions.method='DELETE';return this.executeJSONRequest(pOptions,fCallback);}},{key:"getRawText",value:function getRawText(pOptionsOrURL,fCallback){var tmpRequestOptions=_typeof(pOptionsOrURL)=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeChunkedRequest(tmpRequestOptions,fCallback);}}]);return FableServiceRestClient;}(libFableServiceBase);module.exports=FableServiceRestClient;}).call(this);}).call(this,require("buffer").Buffer);},{"../Fable-ServiceManager.js":108,"buffer":20,"cookie":27,"simple-get":82}],123:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceTemplate=/*#__PURE__*/function(_libFableServiceBase8){_inherits(FableServiceTemplate,_libFableServiceBase8);var _super19=_createSuper(FableServiceTemplate);// Underscore and lodash have a behavior, _.template, which compiles a
3254
3253
  // string-based template with code snippets into simple executable pieces,
3255
3254
  // with the added twist of returning a precompiled function ready to go.
3256
3255
  //
@@ -3259,19 +3258,19 @@ if(!tmpDataBuffer){tmpDataBuffer=Buffer.from(pChunk);}else{tmpDataBuffer=Buffer.
3259
3258
  //
3260
3259
  // This is an implementation of that.
3261
3260
  // TODO: Make this use precedent, add configuration, add debugging.
3262
- function FableServiceTemplate(pFable,pOptions,pServiceHash){var _this32;_classCallCheck2(this,FableServiceTemplate);_this32=_super18.call(this,pFable,pOptions,pServiceHash);_this32.serviceType='Template';// These are the exact regex's used in lodash/underscore
3261
+ function FableServiceTemplate(pFable,pOptions,pServiceHash){var _this33;_classCallCheck2(this,FableServiceTemplate);_this33=_super19.call(this,pFable,pOptions,pServiceHash);_this33.serviceType='Template';// These are the exact regex's used in lodash/underscore
3263
3262
  // TODO: Switch this to precedent
3264
- _this32.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,// This is how underscore does it, so we are keeping it for now.
3263
+ _this33.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,// This is how underscore does it, so we are keeping it for now.
3265
3264
  GuaranteedNonMatch:/.^/};// This is a helper for the escaper and unescaper functions.
3266
3265
  // Right now we are going to keep what underscore is doing, but, not forever.
3267
- _this32.templateEscapes={'\\':'\\',"'":"'",'r':'\r','\r':'r','n':'\n','\n':'n','t':'\t','\t':'t','u2028':"\u2028","\u2028":'u2028','u2029':"\u2029","\u2029":'u2029'};// This is defined as such to underscore that it is a dynamic programming
3266
+ _this33.templateEscapes={'\\':'\\',"'":"'",'r':'\r','\r':'r','n':'\n','\n':'n','t':'\t','\t':'t','u2028':"\u2028","\u2028":'u2028','u2029':"\u2029","\u2029":'u2029'};// This is defined as such to underscore that it is a dynamic programming
3268
3267
  // function on this class.
3269
- _this32.renderFunction=false;_this32.templateString=false;return _this32;}_createClass2(FableServiceTemplate,[{key:"renderTemplate",value:function renderTemplate(pData){return this.renderFunction(pData);}},{key:"templateFunction",value:function templateFunction(pData){var fRenderTemplateBound=this.renderTemplate.bind(this);return fRenderTemplateBound;}},{key:"buildTemplateFunction",value:function buildTemplateFunction(pTemplateText,pData){var _this33=this;// For now this is being kept in a weird form ... this is to mimic the old
3268
+ _this33.renderFunction=false;_this33.templateString=false;return _this33;}_createClass2(FableServiceTemplate,[{key:"renderTemplate",value:function renderTemplate(pData){return this.renderFunction(pData);}},{key:"templateFunction",value:function templateFunction(pData){var fRenderTemplateBound=this.renderTemplate.bind(this);return fRenderTemplateBound;}},{key:"buildTemplateFunction",value:function buildTemplateFunction(pTemplateText,pData){var _this34=this;// For now this is being kept in a weird form ... this is to mimic the old
3270
3269
  // underscore code until this is rewritten using precedent.
3271
- this.TemplateSource="__p+='"+pTemplateText.replace(this.Matchers.Escaper,function(pMatch){return"\\".concat(_this33.templateEscapes[pMatch]);}).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,function(pMatch,pCode){return"'+\n(".concat(decodeURIComponent(pCode),")+\n'");}).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,function(pMatch,pCode){return"';\n".concat(decodeURIComponent(pCode),"\n;__p+='");})+"';\n";this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n");this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n");this.renderFunction=new Function('pTemplateDataObject',this.TemplateSource);if(typeof pData!='undefined'){return this.renderFunction(pData);}// Provide the compiled function source as a convenience for build time
3270
+ this.TemplateSource="__p+='"+pTemplateText.replace(this.Matchers.Escaper,function(pMatch){return"\\".concat(_this34.templateEscapes[pMatch]);}).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,function(pMatch,pCode){return"'+\n(".concat(decodeURIComponent(pCode),")+\n'");}).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,function(pMatch,pCode){return"';\n".concat(decodeURIComponent(pCode),"\n;__p+='");})+"';\n";this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n");this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n");this.renderFunction=new Function('pTemplateDataObject',this.TemplateSource);if(typeof pData!='undefined'){return this.renderFunction(pData);}// Provide the compiled function source as a convenience for build time
3272
3271
  // precompilation.
3273
3272
  this.TemplateSourceCompiled='function(obj){\n'+this.TemplateSource+'}';return this.templateFunction();}}]);return FableServiceTemplate;}(libFableServiceBase);module.exports=FableServiceTemplate;},{"../Fable-ServiceManager.js":108}],124:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;// TODO: These are still pretty big -- consider the smaller polyfills
3274
- var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('async.eachlimit');var libBigNumber=require('big.js');var FableServiceUtility=/*#__PURE__*/function(_libFableServiceBase9){_inherits(FableServiceUtility,_libFableServiceBase9);var _super19=_createSuper(FableServiceUtility);// Underscore and lodash have a behavior, _.template, which compiles a
3273
+ var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('async.eachlimit');var libBigNumber=require('big.js');var FableServiceUtility=/*#__PURE__*/function(_libFableServiceBase9){_inherits(FableServiceUtility,_libFableServiceBase9);var _super20=_createSuper(FableServiceUtility);// Underscore and lodash have a behavior, _.template, which compiles a
3275
3274
  // string-based template with code snippets into simple executable pieces,
3276
3275
  // with the added twist of returning a precompiled function ready to go.
3277
3276
  //
@@ -3280,8 +3279,8 @@ var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('
3280
3279
  //
3281
3280
  // This is an implementation of that.
3282
3281
  // TODO: Make this use precedent, add configuration, add debugging.
3283
- function FableServiceUtility(pFable,pOptions,pServiceHash){var _this34;_classCallCheck2(this,FableServiceUtility);_this34=_super19.call(this,pFable,pOptions,pServiceHash);_this34.templates={};// These two functions are used extensively throughout
3284
- _this34.waterfall=libAsyncWaterfall;_this34.eachLimit=libAsyncEachLimit;_this34.bigNumber=libBigNumber;return _this34;}// Underscore and lodash have a behavior, _.extend, which merges objects.
3282
+ function FableServiceUtility(pFable,pOptions,pServiceHash){var _this35;_classCallCheck2(this,FableServiceUtility);_this35=_super20.call(this,pFable,pOptions,pServiceHash);_this35.templates={};// These two functions are used extensively throughout
3283
+ _this35.waterfall=libAsyncWaterfall;_this35.eachLimit=libAsyncEachLimit;_this35.bigNumber=libBigNumber;return _this35;}// Underscore and lodash have a behavior, _.extend, which merges objects.
3285
3284
  // Now that es6 gives us this, use the native thingy.
3286
3285
  // Nevermind, the native thing is not stable enough across environments
3287
3286
  // Basic shallow copy