fable 3.0.35 → 3.0.36

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.
@@ -0,0 +1,4 @@
1
+ #/bin/bash
2
+
3
+ # Eventually this will delete the database too!
4
+ node ./bookstore-import-books-run.js
@@ -1 +1,9 @@
1
- let tmpRun = require('./bookstore-import-books.js')();
1
+ let tmpRun = require('./bookstore-import-books.js')(
2
+ (pError)=>
3
+ {
4
+ if (pError)
5
+ {
6
+ console.log(`ERROR: ${pError}`, pError);
7
+ }
8
+ process.exit();
9
+ });
@@ -10,10 +10,11 @@
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "async": "^3.2.4",
13
- "fable": "^3.0.33",
13
+ "fable": "^3.0.35",
14
14
  "meadow": "^2.0.4",
15
15
  "meadow-endpoints": "^3.0.7",
16
16
  "mysql2": "^3.3.0",
17
- "orator": "^3.0.11"
17
+ "orator": "^3.0.11",
18
+ "papaparse": "^5.4.1"
18
19
  }
19
20
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "numericVersion": 10000,
3
3
  "releaseNotes": "https://vscode-sqltools.mteixeira.dev/changelog#v-1-0-0",
4
- "run": 1683755329222,
4
+ "run": 1683758393396,
5
5
  "updated": false,
6
6
  "version": "1.0.0",
7
7
  "lastNotificationDate": 0,
@@ -54,7 +54,7 @@ RUN code-server --install-extension mtxr.sqltools-driver-mysql
54
54
  # An easy on the eyes color theme
55
55
  # RUN code-server --install-extension daylerees.rainglow
56
56
 
57
- RUN echo "...configuring mariadb (mysql) server..."
57
+ RUN echo "...configuring mariadb (mysql) server...."
58
58
  RUN sudo sed -i "s|bind-address|#bind-address|g" /etc/mysql/mariadb.conf.d/50-server.cnf
59
59
  ADD ./.config/retold-harness/MySQL-Security.sql /home/coder/MySQL-Configure-Security.sql
60
60
  ADD ./.config/retold-harness/MySQL-Laden-Entry.sh /usr/bin/MySQL-Laden-Entry.sh
@@ -82,6 +82,11 @@ RUN echo "...installing node version 14 as the default..."
82
82
  RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm install 14
83
83
  RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm alias default 14
84
84
 
85
+ WORKDIR /home/coder/fable/.config/retold-harness
86
+
87
+ RUN . ~/.nvm/nvm.sh && source ~/.bashrc && npm install
88
+ # RUN ./Bookstore-Import-Books.sh
89
+
85
90
  WORKDIR /home/coder/fable
86
91
 
87
92
  ENTRYPOINT ["/usr/bin/MySQL-Laden-Entry.sh"]
@@ -1677,7 +1677,7 @@ if(!this.defaultServices.hasOwnProperty(tmpServiceType)){this.setDefaultServiceI
1677
1677
  * @author <steven@velozo.com>
1678
1678
  */ // Pre-init services
1679
1679
  var libFableSettings=require('fable-settings');var libFableUUID=require('fable-uuid');var libFableLog=require('fable-log');var libFableServiceManager=require('./Fable-ServiceManager.js');// Default Services
1680
- var libFableServiceDataFormat=require('./services/Fable-Service-DataFormat.js');var libFableServiceMetaTemplate=require('./services/Fable-Service-MetaTemplate.js');var libFableServiceOperation=require('./services/Fable-Service-Operation.js');var libFableServiceRestClient=require('./services/Fable-Service-RestClient.js');var libFableServiceTemplate=require('./services/Fable-Service-Template.js');var libFableServiceUtility=require('./services/Fable-Service-Utility.js');var Fable=/*#__PURE__*/function(){function Fable(pSettings){_classCallCheck2(this,Fable);// Initialization Phase 0: Set up the lowest level state (core services)
1680
+ var libFableServiceEnvironmentData=require('./services/Fable-Service-EnvironmentData.js');var libFableServiceDataFormat=require('./services/Fable-Service-DataFormat.js');var libFableServiceMetaTemplate=require('./services/Fable-Service-MetaTemplate.js');var libFableServiceOperation=require('./services/Fable-Service-Operation.js');var libFableServiceRestClient=require('./services/Fable-Service-RestClient.js');var libFableServiceTemplate=require('./services/Fable-Service-Template.js');var libFableServiceUtility=require('./services/Fable-Service-Utility.js');var Fable=/*#__PURE__*/function(){function Fable(pSettings){_classCallCheck2(this,Fable);// Initialization Phase 0: Set up the lowest level state (core services)
1681
1681
  // Container for the core services prototypes.
1682
1682
  // This is here so if an API consumer changes the default for a core service,
1683
1683
  // fable still runs with what was initialized.
@@ -1690,8 +1690,8 @@ this._coreServices.ServiceManager=new libFableServiceManager(this);this.serviceM
1690
1690
  // Initialization Phase 2: Map in the default services.
1691
1691
  // They will then be available in the Default service provider set as well.
1692
1692
  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
1693
- this.serviceManager.addServiceType('Template',libFableServiceTemplate);this.serviceManager.addServiceType('MetaTemplate',libFableServiceMetaTemplate);this.serviceManager.addAndInstantiateServiceType('DataFormat',libFableServiceDataFormat);this.serviceManager.addAndInstantiateServiceType('Utility',libFableServiceUtility);this.serviceManager.addServiceType('Operation',libFableServiceOperation);this.serviceManager.addServiceType('RestClient',libFableServiceRestClient);}_createClass2(Fable,[{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:"defaultServices",get:function get(){return this._coreServices.ServiceManager.defaultServices;}},{key:"getUUID",value:function getUUID(){return this._coreServices.UUID.getUUID();}},{key:"fable",get:function get(){return this;}}]);return Fable;}();// This is for backwards compatibility
1694
- 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":78,"./services/Fable-Service-DataFormat.js":80,"./services/Fable-Service-MetaTemplate.js":81,"./services/Fable-Service-Operation.js":83,"./services/Fable-Service-RestClient.js":84,"./services/Fable-Service-Template.js":85,"./services/Fable-Service-Utility.js":86,"fable-log":27,"fable-settings":32,"fable-uuid":34}],80:[function(require,module,exports){/**
1693
+ this.serviceManager.addAndInstantiateServiceType('EnvironmentData',libFableServiceEnvironmentData);this.serviceManager.addServiceType('Template',libFableServiceTemplate);this.serviceManager.addServiceType('MetaTemplate',libFableServiceMetaTemplate);this.serviceManager.addAndInstantiateServiceType('DataFormat',libFableServiceDataFormat);this.serviceManager.addAndInstantiateServiceType('Utility',libFableServiceUtility);this.serviceManager.addServiceType('Operation',libFableServiceOperation);this.serviceManager.addServiceType('RestClient',libFableServiceRestClient);}_createClass2(Fable,[{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:"defaultServices",get:function get(){return this._coreServices.ServiceManager.defaultServices;}},{key:"getUUID",value:function getUUID(){return this._coreServices.UUID.getUUID();}},{key:"fable",get:function get(){return this;}}]);return Fable;}();// This is for backwards compatibility
1694
+ 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":78,"./services/Fable-Service-DataFormat.js":80,"./services/Fable-Service-EnvironmentData.js":81,"./services/Fable-Service-MetaTemplate.js":82,"./services/Fable-Service-Operation.js":84,"./services/Fable-Service-RestClient.js":85,"./services/Fable-Service-Template.js":86,"./services/Fable-Service-Utility.js":87,"fable-log":27,"fable-settings":32,"fable-uuid":34}],80:[function(require,module,exports){/**
1695
1695
  */var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
1696
1696
  * Data Formatting and Translation Functions
1697
1697
  *
@@ -1887,7 +1887,7 @@ return'';}if(tmpEnclosedValueEndIndex>0&&tmpEnclosedValueEndIndex>tmpEnclosedVal
1887
1887
  * @param {number} pEnclosureEnd
1888
1888
  * @returns {string}
1889
1889
  */},{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
1890
- 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":29}],81:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libPrecedent=require('precedent');var FableServiceMetaTemplate=/*#__PURE__*/function(_libFableServiceBase){_inherits(FableServiceMetaTemplate,_libFableServiceBase);var _super8=_createSuper(FableServiceMetaTemplate);function FableServiceMetaTemplate(pFable,pOptions,pServiceHash){var _this11;_classCallCheck2(this,FableServiceMetaTemplate);_this11=_super8.call(this,pFable,pOptions,pServiceHash);_this11.serviceType='MetaTemplate';_this11._MetaTemplateLibrary=new libPrecedent(_this11.options);return _this11;}/**
1890
+ 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":29}],81:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceEnvironmentData=/*#__PURE__*/function(_libFableServiceBase){_inherits(FableServiceEnvironmentData,_libFableServiceBase);var _super8=_createSuper(FableServiceEnvironmentData);function FableServiceEnvironmentData(pFable,pOptions,pServiceHash){var _this11;_classCallCheck2(this,FableServiceEnvironmentData);_this11=_super8.call(this,pFable,pOptions,pServiceHash);_this11.serviceType='EnvironmentData';_this11.Environment="node.js";return _this11;}return _createClass2(FableServiceEnvironmentData);}(libFableServiceBase);module.exports=FableServiceEnvironmentData;},{"../Fable-ServiceManager.js":78}],82:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libPrecedent=require('precedent');var FableServiceMetaTemplate=/*#__PURE__*/function(_libFableServiceBase2){_inherits(FableServiceMetaTemplate,_libFableServiceBase2);var _super9=_createSuper(FableServiceMetaTemplate);function FableServiceMetaTemplate(pFable,pOptions,pServiceHash){var _this12;_classCallCheck2(this,FableServiceMetaTemplate);_this12=_super9.call(this,pFable,pOptions,pServiceHash);_this12.serviceType='MetaTemplate';_this12._MetaTemplateLibrary=new libPrecedent(_this12.options);return _this12;}/**
1891
1891
  * Add a Pattern to the Parse Tree
1892
1892
  * @method addPattern
1893
1893
  * @param {Object} pTree - A node on the parse tree to push the characters into
@@ -1899,7 +1899,7 @@ if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;if(tmpEnclosureDepth==1)
1899
1899
  * @method parseString
1900
1900
  * @param {string} pString - The string to parse
1901
1901
  * @return {string} The result from the parser
1902
- */},{key:"parseString",value:function parseString(pString,pData){return this._MetaTemplateLibrary.parseString(pString,pData);}}]);return FableServiceMetaTemplate;}(libFableServiceBase);module.exports=FableServiceMetaTemplate;},{"../Fable-ServiceManager.js":78,"precedent":40}],82:[function(require,module,exports){module.exports={"Metadata":{"GUID":false,"Hash":false,"Title":"","Summary":"","Version":0},"Status":{"Completed":false,"CompletionProgress":0,"CompletionTimeElapsed":0,"Steps":1,"StepsCompleted":0,"StartTime":0,"EndTime":0},"Errors":[],"Log":[]};},{}],83:[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(_libFableServiceBase2){_inherits(FableOperation,_libFableServiceBase2);var _super9=_createSuper(FableOperation);function FableOperation(pFable,pOptions,pServiceHash){var _this12;_classCallCheck2(this,FableOperation);_this12=_super9.call(this,pFable,pOptions,pServiceHash);_this12.serviceType='PhasedOperation';_this12.state=JSON.parse(_OperationStatePrototypeString);_this12.state.Metadata.GUID=_this12.fable.getUUID();_this12.state.Metadata.Hash=_this12.Hash;_this12.name=typeof _this12.options.Name=='string'?_this12.options.Name:"Unnamed Operation ".concat(_this12.state.Metadata.GUID);return _this12;}_createClass2(FableOperation,[{key:"GUID",get:function get(){return this.state.Metadata.GUID;}},{key:"log",get:function get(){return this;}},{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":78,"./Fable-Service-Operation-DefaultSettings.js":82}],84:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libSimpleGet=require('simple-get');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase3){_inherits(FableServiceRestClient,_libFableServiceBase3);var _super10=_createSuper(FableServiceRestClient);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this13;_classCallCheck2(this,FableServiceRestClient);_this13=_super10.call(this,pFable,pOptions,pServiceHash);_this13.TraceLog=false;if(_this13.options.TraceLog||_this13.fable.TraceLog){_this13.TraceLog=true;}_this13.dataFormat=_this13.fable.defaultServices.DataFormat;_this13.serviceType='RestClient';return _this13;}_createClass2(FableServiceRestClient,[{key:"getJSON",value:function getJSON(pOptionsOrURL,fCallback){return this.getRaw(pOptionsOrURL,function(pError,pResponse,pResult){if(pError){return fCallback(pError,pResponse,pResult);}if(pResponse.statusCode!=200){return fCallback(new Error("Invalid status code ".concat(pResponse.statusCode)),pResponse,pResult);}return fCallback(pError,pResponse,JSON.parse(pResult));});}},{key:"getRaw",value:function getRaw(pOptionsOrURL,fCallback){var _this14=this;var tmpRequestOptions=(typeof pOptions==="undefined"?"undefined":_typeof(pOptions))=='object'?pOptions:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}var tmpRequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){var tmpConnectTime=this.fable.log.getTimeStamp();this.fable.log.debug("Beginning GET request to ".concat(tmpRequestOptions.url," at ").concat(tmpRequestStartTime));}libSimpleGet.get(tmpRequestOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse,tmpRequestOptions);}if(_this14.TraceLog){var _tmpConnectTime=_this14.fable.log.getTimeStamp();_this14.fable.log.debug("--> GET connected in ".concat(_this14.dataFormat.formatTimeDelta(tmpRequestStartTime,_tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpData='';pResponse.on('data',function(pChunk){if(_this14.TraceLog){var tmpChunkTime=_this14.fable.log.getTimeStamp();_this14.fable.log.debug("--> GET data chunk size ".concat(pChunk.length,"b received in ").concat(_this14.dataFormat.formatTimeDelta(tmpRequestStartTime,tmpChunkTime),"ms"));}tmpData+=pChunk;});pResponse.on('end',function(){if(_this14.TraceLog){var tmpCompletionTime=_this14.fable.log.getTimeStamp();_this14.fable.log.debug("==> GET completed data size ".concat(tmpData.length,"b received in ").concat(_this14.dataFormat.formatTimeDelta(tmpRequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,tmpData);});});}}]);return FableServiceRestClient;}(libFableServiceBase);module.exports=FableServiceRestClient;},{"../Fable-ServiceManager.js":78,"simple-get":50}],85:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceTemplate=/*#__PURE__*/function(_libFableServiceBase4){_inherits(FableServiceTemplate,_libFableServiceBase4);var _super11=_createSuper(FableServiceTemplate);// Underscore and lodash have a behavior, _.template, which compiles a
1902
+ */},{key:"parseString",value:function parseString(pString,pData){return this._MetaTemplateLibrary.parseString(pString,pData);}}]);return FableServiceMetaTemplate;}(libFableServiceBase);module.exports=FableServiceMetaTemplate;},{"../Fable-ServiceManager.js":78,"precedent":40}],83:[function(require,module,exports){module.exports={"Metadata":{"GUID":false,"Hash":false,"Title":"","Summary":"","Version":0},"Status":{"Completed":false,"CompletionProgress":0,"CompletionTimeElapsed":0,"Steps":1,"StepsCompleted":0,"StartTime":0,"EndTime":0},"Errors":[],"Log":[]};},{}],84:[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(_libFableServiceBase3){_inherits(FableOperation,_libFableServiceBase3);var _super10=_createSuper(FableOperation);function FableOperation(pFable,pOptions,pServiceHash){var _this13;_classCallCheck2(this,FableOperation);_this13=_super10.call(this,pFable,pOptions,pServiceHash);_this13.serviceType='PhasedOperation';_this13.state=JSON.parse(_OperationStatePrototypeString);_this13.state.Metadata.GUID=_this13.fable.getUUID();_this13.state.Metadata.Hash=_this13.Hash;_this13.name=typeof _this13.options.Name=='string'?_this13.options.Name:"Unnamed Operation ".concat(_this13.state.Metadata.GUID);return _this13;}_createClass2(FableOperation,[{key:"GUID",get:function get(){return this.state.Metadata.GUID;}},{key:"log",get:function get(){return this;}},{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":78,"./Fable-Service-Operation-DefaultSettings.js":83}],85:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var libSimpleGet=require('simple-get');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase4){_inherits(FableServiceRestClient,_libFableServiceBase4);var _super11=_createSuper(FableServiceRestClient);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this14;_classCallCheck2(this,FableServiceRestClient);_this14=_super11.call(this,pFable,pOptions,pServiceHash);_this14.TraceLog=false;if(_this14.options.TraceLog||_this14.fable.TraceLog){_this14.TraceLog=true;}_this14.dataFormat=_this14.fable.defaultServices.DataFormat;_this14.serviceType='RestClient';return _this14;}_createClass2(FableServiceRestClient,[{key:"getJSON",value:function getJSON(pOptionsOrURL,fCallback){return this.getRaw(pOptionsOrURL,function(pError,pResponse,pResult){if(pError){return fCallback(pError,pResponse,pResult);}if(pResponse.statusCode!=200){return fCallback(new Error("Invalid status code ".concat(pResponse.statusCode)),pResponse,pResult);}return fCallback(pError,pResponse,JSON.parse(pResult));});}},{key:"getRaw",value:function getRaw(pOptionsOrURL,fCallback){var _this15=this;var tmpRequestOptions=(typeof pOptions==="undefined"?"undefined":_typeof(pOptions))=='object'?pOptions:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}var tmpRequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){var tmpConnectTime=this.fable.log.getTimeStamp();this.fable.log.debug("Beginning GET request to ".concat(tmpRequestOptions.url," at ").concat(tmpRequestStartTime));}libSimpleGet.get(tmpRequestOptions,function(pError,pResponse){if(pError){return fCallback(pError,pResponse,tmpRequestOptions);}if(_this15.TraceLog){var _tmpConnectTime=_this15.fable.log.getTimeStamp();_this15.fable.log.debug("--> GET connected in ".concat(_this15.dataFormat.formatTimeDelta(tmpRequestStartTime,_tmpConnectTime),"ms code ").concat(pResponse.statusCode));}var tmpData='';pResponse.on('data',function(pChunk){if(_this15.TraceLog){var tmpChunkTime=_this15.fable.log.getTimeStamp();_this15.fable.log.debug("--> GET data chunk size ".concat(pChunk.length,"b received in ").concat(_this15.dataFormat.formatTimeDelta(tmpRequestStartTime,tmpChunkTime),"ms"));}tmpData+=pChunk;});pResponse.on('end',function(){if(_this15.TraceLog){var tmpCompletionTime=_this15.fable.log.getTimeStamp();_this15.fable.log.debug("==> GET completed data size ".concat(tmpData.length,"b received in ").concat(_this15.dataFormat.formatTimeDelta(tmpRequestStartTime,tmpCompletionTime),"ms"));}return fCallback(pError,pResponse,tmpData);});});}}]);return FableServiceRestClient;}(libFableServiceBase);module.exports=FableServiceRestClient;},{"../Fable-ServiceManager.js":78,"simple-get":50}],86:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;var FableServiceTemplate=/*#__PURE__*/function(_libFableServiceBase5){_inherits(FableServiceTemplate,_libFableServiceBase5);var _super12=_createSuper(FableServiceTemplate);// Underscore and lodash have a behavior, _.template, which compiles a
1903
1903
  // string-based template with code snippets into simple executable pieces,
1904
1904
  // with the added twist of returning a precompiled function ready to go.
1905
1905
  //
@@ -1908,19 +1908,19 @@ if(tmpString[i]==tmpEnclosureStart){tmpEnclosureDepth++;if(tmpEnclosureDepth==1)
1908
1908
  //
1909
1909
  // This is an implementation of that.
1910
1910
  // TODO: Make this use precedent, add configuration, add debugging.
1911
- function FableServiceTemplate(pFable,pOptions,pServiceHash){var _this15;_classCallCheck2(this,FableServiceTemplate);_this15=_super11.call(this,pFable,pOptions,pServiceHash);_this15.serviceType='Template';// These are the exact regex's used in lodash/underscore
1911
+ function FableServiceTemplate(pFable,pOptions,pServiceHash){var _this16;_classCallCheck2(this,FableServiceTemplate);_this16=_super12.call(this,pFable,pOptions,pServiceHash);_this16.serviceType='Template';// These are the exact regex's used in lodash/underscore
1912
1912
  // TODO: Switch this to precedent
1913
- _this15.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.
1913
+ _this16.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.
1914
1914
  GuaranteedNonMatch:/.^/};// This is a helper for the escaper and unescaper functions.
1915
1915
  // Right now we are going to keep what underscore is doing, but, not forever.
1916
- _this15.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
1916
+ _this16.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
1917
1917
  // function on this class.
1918
- _this15.renderFunction=false;_this15.templateString=false;return _this15;}_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 _this16=this;// For now this is being kept in a weird form ... this is to mimic the old
1918
+ _this16.renderFunction=false;_this16.templateString=false;return _this16;}_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 _this17=this;// For now this is being kept in a weird form ... this is to mimic the old
1919
1919
  // underscore code until this is rewritten using precedent.
1920
- this.TemplateSource="__p+='"+pTemplateText.replace(this.Matchers.Escaper,function(pMatch){return"\\".concat(_this16.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
1920
+ this.TemplateSource="__p+='"+pTemplateText.replace(this.Matchers.Escaper,function(pMatch){return"\\".concat(_this17.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
1921
1921
  // precompilation.
1922
- this.TemplateSourceCompiled='function(obj){\n'+this.TemplateSource+'}';return this.templateFunction();}}]);return FableServiceTemplate;}(libFableServiceBase);module.exports=FableServiceTemplate;},{"../Fable-ServiceManager.js":78}],86:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;// TODO: These are still pretty big -- consider the smaller polyfills
1923
- var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('async.eachlimit');var FableServiceUtility=/*#__PURE__*/function(_libFableServiceBase5){_inherits(FableServiceUtility,_libFableServiceBase5);var _super12=_createSuper(FableServiceUtility);// Underscore and lodash have a behavior, _.template, which compiles a
1922
+ this.TemplateSourceCompiled='function(obj){\n'+this.TemplateSource+'}';return this.templateFunction();}}]);return FableServiceTemplate;}(libFableServiceBase);module.exports=FableServiceTemplate;},{"../Fable-ServiceManager.js":78}],87:[function(require,module,exports){var libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;// TODO: These are still pretty big -- consider the smaller polyfills
1923
+ var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('async.eachlimit');var FableServiceUtility=/*#__PURE__*/function(_libFableServiceBase6){_inherits(FableServiceUtility,_libFableServiceBase6);var _super13=_createSuper(FableServiceUtility);// Underscore and lodash have a behavior, _.template, which compiles a
1924
1924
  // string-based template with code snippets into simple executable pieces,
1925
1925
  // with the added twist of returning a precompiled function ready to go.
1926
1926
  //
@@ -1929,8 +1929,8 @@ var libAsyncWaterfall=require('async.waterfall');var libAsyncEachLimit=require('
1929
1929
  //
1930
1930
  // This is an implementation of that.
1931
1931
  // TODO: Make this use precedent, add configuration, add debugging.
1932
- function FableServiceUtility(pFable,pOptions,pServiceHash){var _this17;_classCallCheck2(this,FableServiceUtility);_this17=_super12.call(this,pFable,pOptions,pServiceHash);_this17.templates={};// These two functions are used extensively throughout
1933
- _this17.waterfall=libAsyncWaterfall;_this17.eachLimit=libAsyncEachLimit;return _this17;}// Underscore and lodash have a behavior, _.extend, which merges objects.
1932
+ function FableServiceUtility(pFable,pOptions,pServiceHash){var _this18;_classCallCheck2(this,FableServiceUtility);_this18=_super13.call(this,pFable,pOptions,pServiceHash);_this18.templates={};// These two functions are used extensively throughout
1933
+ _this18.waterfall=libAsyncWaterfall;_this18.eachLimit=libAsyncEachLimit;return _this18;}// Underscore and lodash have a behavior, _.extend, which merges objects.
1934
1934
  // Now that es6 gives us this, use the native thingy.
1935
1935
  _createClass2(FableServiceUtility,[{key:"extend",value:function extend(pDestinationObject){for(var _len2=arguments.length,pSourceObjects=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){pSourceObjects[_key2-1]=arguments[_key2];}return Object.assign.apply(Object,[pDestinationObject].concat(pSourceObjects));}// Underscore and lodash have a behavior, _.template, which compiles a
1936
1936
  // string-based template with code snippets into simple executable pieces,