fable 3.0.98 → 3.0.102
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.
- package/dist/fable.compatible.js +5 -3
- package/dist/fable.compatible.min.js +1 -1
- package/dist/fable.compatible.min.js.map +1 -1
- package/dist/fable.js +5 -3
- package/dist/fable.min.js +1 -1
- package/dist/fable.min.js.map +1 -1
- package/package.json +1 -1
- package/source/services/Fable-Service-Anticipate.js +2 -2
- package/source/services/Fable-Service-MetaTemplate/MetaTemplate-StringParser.js +0 -1
package/dist/fable.compatible.js
CHANGED
|
@@ -2875,9 +2875,11 @@ if(this.servicesMap[pServiceType].hasOwnProperty(pServiceHash)){if(!this.hasOwnP
|
|
|
2875
2875
|
function autoConstruct(pSettings){return new Fable(pSettings);}module.exports=Fable;module.exports["new"]=autoConstruct;module.exports.LogProviderBase=libFableLog.LogProviderBase;module.exports.ServiceProviderBase=libFableServiceBase;module.exports.CoreServiceProviderBase=libFableServiceBase.CoreServiceProviderBase;module.exports.precedent=libFableSettings.precedent;},{"./services/Fable-Service-Anticipate.js":120,"./services/Fable-Service-CSVParser.js":121,"./services/Fable-Service-DataFormat.js":122,"./services/Fable-Service-DataGeneration.js":124,"./services/Fable-Service-DateManipulation.js":125,"./services/Fable-Service-EnvironmentData.js":126,"./services/Fable-Service-FilePersistence.js":127,"./services/Fable-Service-MetaTemplate.js":128,"./services/Fable-Service-Operation.js":132,"./services/Fable-Service-RestClient.js":133,"./services/Fable-Service-Template.js":134,"./services/Fable-Service-Utility.js":135,"cachetrax":22,"fable-log":43,"fable-serviceproviderbase":44,"fable-settings":47,"fable-uuid":49,"manyfest":72}],120:[function(require,module,exports){var libFableServiceBase=require('fable-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.
|
|
2876
2876
|
_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.
|
|
2877
2877
|
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.
|
|
2878
|
-
for(var i=0;i<this.waitingFunctions.length;i++){this.log.trace('Calling waiting function.')
|
|
2878
|
+
for(var i=0;i<this.waitingFunctions.length;i++){//this.log.trace('Calling waiting function.')
|
|
2879
|
+
this.waitingFunctions[i](this.lastError);}// Reset our state
|
|
2879
2880
|
this.lastError=undefined;this.waitingFunctions=[];}}// Expects a function fAsynchronousFunction(fCallback)
|
|
2880
|
-
},{key:"anticipate",value:function anticipate(fAsynchronousFunction){this.log.trace('Adding a function...')
|
|
2881
|
+
},{key:"anticipate",value:function anticipate(fAsynchronousFunction){//this.log.trace('Adding a function...')
|
|
2882
|
+
this.operationQueue.push(fAsynchronousFunction);this.checkQueue();}},{key:"buildAnticipatorCallback",value:function buildAnticipatorCallback(){// This uses closure-scoped state to track the callback state
|
|
2881
2883
|
var tmpCallbackState={Called:false,Error:undefined,OperationSet:this};return hoistedCallback;function hoistedCallback(pError){if(tmpCallbackState.Called){// If they call the callback twice, throw an error
|
|
2882
2884
|
throw new Error("Anticipation async callback called twice...");}tmpCallbackState.Called=true;tmpCallbackState.error=pError;tmpCallbackState.OperationSet.executingOperationCount-=1;tmpCallbackState.OperationSet.completedOperationCount+=1;tmpCallbackState.OperationSet.checkQueue();}}},{key:"wait",value:function wait(fCallback){this.waitingFunctions.push(fCallback);this.checkQueue();}}]);return FableServiceAnticipate;}(libFableServiceBase);module.exports=FableServiceAnticipate;},{"fable-serviceproviderbase":44}],121:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/**
|
|
2883
2885
|
* Parsing CSVs. Why? Because it's a thing that needs to be done.
|
|
@@ -3226,7 +3228,7 @@ return fCallback();}/**
|
|
|
3226
3228
|
* @param {function} fCallback - The callback function to call when the parse is complete
|
|
3227
3229
|
*/},{key:"parseString",value:function parseString(pString,pParseTree,pData,fCallback){var _this28=this;if(typeof fCallback!=='function'){var tmpParserState=this.newParserState(pParseTree);for(var i=0;i<pString.length;i++){// TODO: This is not fast.
|
|
3228
3230
|
this.parseCharacter(pString[i],tmpParserState,pData,fCallback);}this.flushOutputBuffer(tmpParserState);return tmpParserState.Output;}else{// This is the async mode
|
|
3229
|
-
var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');var _loop=function _loop(_i12){tmpAnticipate.anticipate(function(fCallback){
|
|
3231
|
+
var _tmpParserState=this.newParserState(pParseTree);_tmpParserState.Asynchronous=true;var tmpAnticipate=this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');var _loop=function _loop(_i12){tmpAnticipate.anticipate(function(fCallback){_this28.parseCharacterAsync(pString[_i12],_tmpParserState,pData,fCallback);});};for(var _i12=0;_i12<pString.length;_i12++){_loop(_i12);}tmpAnticipate.wait(function(pError){// Flush the remaining data
|
|
3230
3232
|
_this28.flushOutputBuffer(_tmpParserState);return fCallback(pError,_tmpParserState.Output);});}}}]);return StringParser;}();module.exports=StringParser;},{}],130:[function(require,module,exports){/**
|
|
3231
3233
|
* Word Tree
|
|
3232
3234
|
* @author Steven Velozo <steven@velozo.com>
|