fable 3.0.119 → 3.0.120
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
CHANGED
|
@@ -2840,7 +2840,7 @@ _this17.connectFable(_assertThisInitialized(_this17));// --> Bootstrapping of fa
|
|
|
2840
2840
|
// Initialization Phase 2: Map in the default services.
|
|
2841
2841
|
// They will then be available in the Default service provider set as well.
|
|
2842
2842
|
_this17.connectPreinitServiceProviderInstance(_this17.UUID);_this17.connectPreinitServiceProviderInstance(_this17.Logging);_this17.connectPreinitServiceProviderInstance(_this17.SettingsManager);// Initialize and instantiate the default baked-in Data Arithmatic service
|
|
2843
|
-
_this17.addAndInstantiateServiceType('EnvironmentData',require('./services/Fable-Service-EnvironmentData.js'));_this17.addServiceType('Template',require('./services/Fable-Service-Template.js'));_this17.addServiceType('MetaTemplate',require('./services/Fable-Service-MetaTemplate.js'));_this17.addServiceType('Anticipate',require('./services/Fable-Service-Anticipate.js'));_this17.addAndInstantiateServiceType('Dates',require('./services/Fable-Service-DateManipulation.js'));_this17.addAndInstantiateServiceType('DataFormat',require('./services/Fable-Service-DataFormat.js'));_this17.addAndInstantiateServiceType('DataGeneration',require('./services/Fable-Service-DataGeneration.js'));_this17.addAndInstantiateServiceType('Utility',require('./services/Fable-Service-Utility.js'));_this17.addAndInstantiateServiceType('Math',require('./services/Fable-Service-Math.js'));_this17.addServiceType('RestClient',require('./services/Fable-Service-RestClient.js'));_this17.addServiceType('Manifest',require('manyfest'));_this17.addServiceType('ObjectCache',require('cachetrax'));_this17.
|
|
2843
|
+
_this17.addAndInstantiateServiceType('EnvironmentData',require('./services/Fable-Service-EnvironmentData.js'));_this17.addServiceType('Template',require('./services/Fable-Service-Template.js'));_this17.addServiceType('MetaTemplate',require('./services/Fable-Service-MetaTemplate.js'));_this17.addServiceType('Anticipate',require('./services/Fable-Service-Anticipate.js'));_this17.addAndInstantiateServiceType('Dates',require('./services/Fable-Service-DateManipulation.js'));_this17.addAndInstantiateServiceType('DataFormat',require('./services/Fable-Service-DataFormat.js'));_this17.addAndInstantiateServiceType('DataGeneration',require('./services/Fable-Service-DataGeneration.js'));_this17.addAndInstantiateServiceType('Utility',require('./services/Fable-Service-Utility.js'));_this17.addAndInstantiateServiceType('Math',require('./services/Fable-Service-Math.js'));_this17.addServiceType('RestClient',require('./services/Fable-Service-RestClient.js'));_this17.addServiceType('Manifest',require('manyfest'));_this17.addServiceType('ObjectCache',require('cachetrax'));_this17.addAndInstantiateServiceType('ProgressTime',require('./services/Fable-Service-ProgressTime.js'));_this17.addServiceType('ProgressTrackerSet',require('./services/Fable-Service-ProgressTrackerSet.js'));_this17.addServiceType('Operation',require('./services/Fable-Service-Operation.js'));_this17.addServiceType('CSVParser',require('./services/Fable-Service-CSVParser.js'));_this17.addServiceType('FilePersistence',require('./services/Fable-Service-FilePersistence.js'));return _this17;}/* State Accessors */_createClass2(Fable,[{key:"isFable",get:function get(){return true;}},{key:"settings",get:function get(){return this.SettingsManager.settings;}},{key:"settingsManager",get:function get(){return this.SettingsManager;}// For backwards compatibility
|
|
2844
2844
|
},{key:"getUUID",value:function getUUID(){return this.UUID.getUUID();}},{key:"newAnticipate",value:function newAnticipate(){return this.instantiateServiceProviderWithoutRegistration('Anticipate');}/* Service Manager Methods */},{key:"addServiceType",value:function addServiceType(pServiceType,pServiceClass){if(this.servicesMap.hasOwnProperty(pServiceType)){// TODO: Check if any services are running?
|
|
2845
2845
|
this.log.warn("Adding a service type [".concat(pServiceType,"] that already exists."));}else{// Add the container for instantiated services to go in
|
|
2846
2846
|
this.servicesMap[pServiceType]={};// Add the type to the list of types
|
|
@@ -3297,7 +3297,7 @@ tmpStep.GUIDStep=typeof pGUIDStep!=='undefined'?pGUIDStep:"STEP-".concat(this.st
|
|
|
3297
3297
|
tmpStep.Name=typeof pStepName!=='undefined'?pStepName:"Step [".concat(tmpStep.GUIDStep,"]");tmpStep.Description=typeof pStepDescription!=='undefined'?pStepDescription:"Step execution of ".concat(tmpStep.Name,".");tmpStep.ProgressTracker=this.progressTrackerSet.createProgressTracker(tmpStep.GUIDStep);tmpStep.Metadata=_typeof(pStepMetadata)==='object'?pStepMetadata:{};// There is an array of steps, in the Operation State itself ... push a step there
|
|
3298
3298
|
this.state.Steps.push(tmpStep);this.stepMap[tmpStep.GUIDStep]=tmpStep;this.stepFunctions[tmpStep.GUIDStep]=typeof fStepFunction=='function'?fStepFunction:function(fDone){return fDone();};this.state.Status.StepCount++;return tmpStep;}},{key:"setStepTotalOperations",value:function setStepTotalOperations(pGUIDStep,pTotalOperationCount){if(!this.stepMap.hasOwnProperty(pGUIDStep)){return new Error("Step [".concat(pGUIDStep,"] does not exist in operation [").concat(this.state.Metadata.UUID,"] ").concat(this.state.Metadata.Name," when attempting to set total operations to ").concat(pTotalOperationCount,"."));}this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[pGUIDStep].ProgressTracker.Hash,pTotalOperationCount);}},{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-Service-Operation-DefaultSettings.js":139,"big.js":17,"fable-serviceproviderbase":51}],141:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var FableServiceProgressTime=/*#__PURE__*/function(_libFableServiceBase8){_inherits(FableServiceProgressTime,_libFableServiceBase8);function FableServiceProgressTime(pFable,pOptions,pServiceHash){var _this32;_classCallCheck2(this,FableServiceProgressTime);_this32=_callSuper(this,FableServiceProgressTime,[pFable,pOptions,pServiceHash]);_this32.serviceType='ProgressTime';_this32.timeStamps={};return _this32;}_createClass2(FableServiceProgressTime,[{key:"formatTimeDuration",value:function formatTimeDuration(pTimeDurationInMilliseconds){var tmpTimeDuration=typeof pTimeDurationInMilliseconds=='number'?pTimeDurationInMilliseconds:0;if(pTimeDurationInMilliseconds<0){return'unknown';}var tmpTimeDurationString='';if(tmpTimeDuration>3600000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/3600000)+'h ';tmpTimeDuration=tmpTimeDuration%3600000;}if(tmpTimeDuration>60000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/60000)+'m ';tmpTimeDuration=tmpTimeDuration%60000;}if(tmpTimeDuration>1000){tmpTimeDurationString+=Math.floor(tmpTimeDuration/1000)+'s ';tmpTimeDuration=tmpTimeDuration%1000;}tmpTimeDurationString+=Math.round(tmpTimeDuration)+'ms';return tmpTimeDurationString;}},{key:"createTimeStamp",value:function createTimeStamp(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';this.timeStamps[tmpTimeStampHash]=+new Date();return this.timeStamps[tmpTimeStampHash];}},{key:"getTimeStampValue",value:function getTimeStampValue(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';return this.timeStamps.hasOwnProperty(tmpTimeStampHash)?this.timeStamps[tmpTimeStampHash]:-1;}},{key:"updateTimeStampValue",value:function updateTimeStampValue(pTimeStampHash,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpReferenceTime=false;// This function allows the user to pass in either a reference time in ms, or, a hash of a timestamp.
|
|
3299
3299
|
if(typeof pReferenceTime=='string'){tmpReferenceTime=this.timeStamps.hasOwnProperty(tmpReference)?this.timeStamps[tmpReference]:false;}else if(typeof pReferenceTime=='number'){tmpReferenceTime=pReferenceTime;}else{tmpReferenceTime=+new Date();}if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)&&tmpReferenceTime){this.timeStamps[tmpTimeStampHash]=tmpReferenceTime;return this.timeStamps[tmpTimeStampHash];}else{return-1;}}},{key:"removeTimeStamp",value:function removeTimeStamp(pTimeStampHash){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)){delete this.timeStamps[tmpTimeStampHash];return true;}else{return false;}}},{key:"getTimeStampDelta",value:function getTimeStampDelta(pTimeStampHash,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpReferenceTime=false;// This function allows the user to pass in either a reference time in ms, or, a hash of a timestamp.
|
|
3300
|
-
if(typeof pReferenceTime=='string'){tmpReferenceTime=this.timeStamps.hasOwnProperty(tmpReference)?this.timeStamps[tmpReference]:false;}else if(typeof pReferenceTime=='number'){tmpReferenceTime=pReferenceTime;}else{tmpReferenceTime=+new Date();}if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)&&tmpReferenceTime){return tmpReferenceTime-this.timeStamps[tmpTimeStampHash];}else{return-1;}}},{key:"getDurationBetweenTimestamps",value:function getDurationBetweenTimestamps(pTimeStampHashStart,pTimeStampHashEnd){var tmpTimeStampHashStart=typeof pTimeStampHashStart=='string'?pTimeStampHashStart:'Default';var tmpTimeStampHashEnd=typeof pTimeStampHashEnd=='string'?pTimeStampHashEnd:'Default';if(this.timeStamps.hasOwnProperty(tmpTimeStampHashStart)&&this.timeStamps.hasOwnProperty(tmpTimeStampHashEnd)){return this.timeStamps[tmpTimeStampHashEnd]-this.timeStamps[tmpTimeStampHashStart];}else{return-1;}}},{key:"getTimeStampDeltaMessage",value:function getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpMessage=typeof pMessage!=='undefined'?pMessage:"Elapsed for ".concat(tmpTimeStampHash,": ");var tmpOperationTime=this.getTimeStampDelta(tmpTimeStampHash,pReferenceTime);return"".concat(tmpMessage," ").concat(this.formatTimeDuration(tmpOperationTime));}},{key:"logTimeStampDelta",value:function logTimeStampDelta(pTimeStampHash,pMessage,pReferenceTime){this.fable.log.info(this.getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime));}}]);return FableServiceProgressTime;}(libFableServiceBase);module.exports=FableServiceProgressTime;},{"fable-serviceproviderbase":51}],142:[function(require,module,exports){var ProgressTracker=/*#__PURE__*/function(){function ProgressTracker(pProgressTrackerSet,pProgressTrackerHash){_classCallCheck2(this,ProgressTracker);this.progressTrackerSet=pProgressTrackerSet;this.progressTrackerHash=pProgressTrackerHash;}_createClass2(ProgressTracker,[{key:"updateProgressTracker",value:function updateProgressTracker(pProgressAmount){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,pProgressAmount);}},{key:"incrementProgressTracker",value:function incrementProgressTracker(pProgressIncrementAmount){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,pProgressIncrementAmount);}},{key:"setProgressTrackerTotalOperations",value:function setProgressTrackerTotalOperations(pTotalOperationCount){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,pTotalOperationCount);}},{key:"getProgressTrackerStatusString",value:function getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash);}}]);return ProgressTracker;}();module.exports=ProgressTracker;},{}],143:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libProgressTrackerClass=require('./Fable-Service-ProgressTracker/ProgressTracker.js');var FableServiceProgressTrackerSet=/*#__PURE__*/function(_libFableServiceBase9){_inherits(FableServiceProgressTrackerSet,_libFableServiceBase9);function FableServiceProgressTrackerSet(pFable,pOptions,pServiceHash){var _this33;_classCallCheck2(this,FableServiceProgressTrackerSet);_this33=_callSuper(this,FableServiceProgressTrackerSet,[pFable,pOptions,pServiceHash]);_this33.serviceType='ProgressTrackerSet';_this33.progressTrackers={};// Create an internal PorgressTime service to track timestamps
|
|
3300
|
+
if(typeof pReferenceTime=='string'){tmpReferenceTime=this.timeStamps.hasOwnProperty(tmpReference)?this.timeStamps[tmpReference]:false;}else if(typeof pReferenceTime=='number'){tmpReferenceTime=pReferenceTime;}else{tmpReferenceTime=+new Date();}if(this.timeStamps.hasOwnProperty(tmpTimeStampHash)&&tmpReferenceTime){return tmpReferenceTime-this.timeStamps[tmpTimeStampHash];}else{return-1;}}},{key:"getDurationBetweenTimestamps",value:function getDurationBetweenTimestamps(pTimeStampHashStart,pTimeStampHashEnd){var tmpTimeStampHashStart=typeof pTimeStampHashStart=='string'?pTimeStampHashStart:'Default';var tmpTimeStampHashEnd=typeof pTimeStampHashEnd=='string'?pTimeStampHashEnd:'Default';if(this.timeStamps.hasOwnProperty(tmpTimeStampHashStart)&&this.timeStamps.hasOwnProperty(tmpTimeStampHashEnd)){return this.timeStamps[tmpTimeStampHashEnd]-this.timeStamps[tmpTimeStampHashStart];}else{return-1;}}},{key:"getTimeStampDeltaMessage",value:function getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime){var tmpTimeStampHash=typeof pTimeStampHash=='string'?pTimeStampHash:'Default';var tmpMessage=typeof pMessage!=='undefined'?pMessage:"Elapsed for ".concat(tmpTimeStampHash,": ");var tmpOperationTime=this.getTimeStampDelta(tmpTimeStampHash,pReferenceTime);return"".concat(tmpMessage," ").concat(this.formatTimeDuration(tmpOperationTime));}},{key:"logTimeStampDelta",value:function logTimeStampDelta(pTimeStampHash,pMessage,pReferenceTime){this.fable.log.info(this.getTimeStampDeltaMessage(pTimeStampHash,pMessage,pReferenceTime));}}]);return FableServiceProgressTime;}(libFableServiceBase);module.exports=FableServiceProgressTime;},{"fable-serviceproviderbase":51}],142:[function(require,module,exports){var ProgressTracker=/*#__PURE__*/function(){function ProgressTracker(pProgressTrackerSet,pProgressTrackerHash){_classCallCheck2(this,ProgressTracker);this.progressTrackerSet=pProgressTrackerSet;this.progressTrackerHash=pProgressTrackerHash;this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash);}_createClass2(ProgressTracker,[{key:"updateProgressTracker",value:function updateProgressTracker(pProgressAmount){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,pProgressAmount);}},{key:"incrementProgressTracker",value:function incrementProgressTracker(pProgressIncrementAmount){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,pProgressIncrementAmount);}},{key:"setProgressTrackerTotalOperations",value:function setProgressTrackerTotalOperations(pTotalOperationCount){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,pTotalOperationCount);}},{key:"getProgressTrackerStatusString",value:function getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash);}}]);return ProgressTracker;}();module.exports=ProgressTracker;},{}],143:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libProgressTrackerClass=require('./Fable-Service-ProgressTracker/ProgressTracker.js');var FableServiceProgressTrackerSet=/*#__PURE__*/function(_libFableServiceBase9){_inherits(FableServiceProgressTrackerSet,_libFableServiceBase9);function FableServiceProgressTrackerSet(pFable,pOptions,pServiceHash){var _this33;_classCallCheck2(this,FableServiceProgressTrackerSet);_this33=_callSuper(this,FableServiceProgressTrackerSet,[pFable,pOptions,pServiceHash]);_this33.serviceType='ProgressTrackerSet';_this33.progressTrackers={};// Create an internal PorgressTime service to track timestamps
|
|
3301
3301
|
_this33.progressTimes=_this33.fable.instantiateServiceProviderWithoutRegistration('ProgressTime');// This timestamp is used and updated by *all* progress trackers.
|
|
3302
3302
|
_this33.progressTimes.createTimeStamp('CurrentTime');return _this33;}_createClass2(FableServiceProgressTrackerSet,[{key:"getProgressTracker",value:function getProgressTracker(pProgressTrackerHash){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';if(!this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("ProgressTracker ".concat(tmpProgressTrackerHash," does not exist! Creating a new tracker..."));this.createProgressTracker(tmpProgressTrackerHash,100);}return new libProgressTrackerClass(this,pProgressTrackerHash);}},{key:"getProgressTrackerData",value:function getProgressTrackerData(pProgressTrackerHash){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';if(!this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("ProgressTracker ".concat(tmpProgressTrackerHash," does not exist! Creating a new tracker..."));this.createProgressTracker(tmpProgressTrackerHash,100);}return this.progressTrackers[tmpProgressTrackerHash];}},{key:"createProgressTracker",value:function createProgressTracker(pProgressTrackerHash,pTotalOperations){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';var tmpTotalOperations=typeof pTotalOperations=='number'?pTotalOperations:100;var tmpProgressTracker={Hash:tmpProgressTrackerHash,StartTimeHash:"".concat(tmpProgressTrackerHash,"-Start"),StartTimeStamp:-1,CurrentTimeStamp:-1,EndTimeHash:"".concat(tmpProgressTrackerHash,"-End"),EndTimeStamp:-1,PercentComplete:-1,// If this is set to true, PercentComplete will be calculated as CurrentCount / TotalCount even if it goes over 100%
|
|
3303
3303
|
AllowTruePercentComplete:false,ElapsedTime:-1,AverageOperationTime:-1,EstimatedCompletionTime:-1,TotalCount:tmpTotalOperations,CurrentCount:-1};if(this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("ProgressTracker ".concat(tmpProgressTrackerHash," already exists! Overwriting with a new tracker..."));this.progressTimes.removeTimeStamp(tmpProgressTracker.StartTimeHash);this.progressTimes.removeTimeStamp(tmpProgressTracker.EndTimeHash);}this.progressTrackers[tmpProgressTrackerHash]=tmpProgressTracker;return tmpProgressTracker;}},{key:"setProgressTrackerTotalOperations",value:function setProgressTrackerTotalOperations(pProgressTrackerHash,pTotalOperations){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';var tmpTotalOperations=typeof pTotalOperations=='number'?pTotalOperations:100;if(!this.progressTrackers.hasOwnProperty(tmpProgressTrackerHash)){this.fable.log.warn("Attempted to set the total operations of ProgressTracker ".concat(tmpProgressTrackerHash," but it does not exist! Creating a new tracker..."));this.createProgressTracker(tmpProgressTrackerHash,tmpTotalOperations);}this.progressTrackers[tmpProgressTrackerHash].TotalCount=tmpTotalOperations;return this.progressTrackers[tmpProgressTrackerHash];}},{key:"startProgressTracker",value:function startProgressTracker(pProgressTrackerHash){var tmpProgressTrackerHash=typeof pProgressTrackerHash=='string'?pProgressTrackerHash:'Default';// This is the only method to lazily create ProgressTrackers now
|
|
@@ -3320,7 +3320,7 @@ this.solveProgressTrackerStatus(tmpProgressTrackerHash);if(!this.progressTracker
|
|
|
3320
3320
|
if(tmpProgressTracker.StartTimeStamp<1){return"ProgressTracker ".concat(tmpProgressTracker.Hash," has not been started yet.");}// 2. Started, but no operations completed
|
|
3321
3321
|
if(tmpProgressTracker.CurrentCount<1&&tmpProgressTracker.EndTimeStamp<1){return"ProgressTracker ".concat(tmpProgressTracker.Hash," has no completed operations. ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," have elapsed since it was started.");}// 3. Started, some operations completed
|
|
3322
3322
|
else if(tmpProgressTracker.EndTimeStamp<1){return"ProgressTracker ".concat(tmpProgressTracker.Hash," is ").concat(tmpProgressTracker.PercentComplete.toFixed(3),"% completed - ").concat(tmpProgressTracker.CurrentCount," / ").concat(tmpProgressTracker.TotalCount," operations over ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.AverageOperationTime)," per). Estimated completion: ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.EstimatedCompletionTime));}// 4. Done
|
|
3323
|
-
else{return"ProgressTracker ".concat(tmpProgressTracker.Hash," is done.
|
|
3323
|
+
else{return"ProgressTracker ".concat(tmpProgressTracker.Hash," is done. ").concat(tmpProgressTracker.CurrentCount," / ").concat(tmpProgressTracker.TotalCount," operations were completed in ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.ElapsedTime)," (median ").concat(this.progressTimes.formatTimeDuration(tmpProgressTracker.AverageOperationTime)," per).");}}}},{key:"logProgressTrackerStatus",value:function logProgressTrackerStatus(pProgressTrackerHash){this.fable.log.info(this.getProgressTrackerStatusString(pProgressTrackerHash));}}]);return FableServiceProgressTrackerSet;}(libFableServiceBase);module.exports=FableServiceProgressTrackerSet;},{"./Fable-Service-ProgressTracker/ProgressTracker.js":142,"fable-serviceproviderbase":51}],144:[function(require,module,exports){(function(Buffer){(function(){var libFableServiceBase=require('fable-serviceproviderbase');var libSimpleGet=require('simple-get');var libCookie=require('cookie');var FableServiceRestClient=/*#__PURE__*/function(_libFableServiceBase10){_inherits(FableServiceRestClient,_libFableServiceBase10);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this34;_classCallCheck2(this,FableServiceRestClient);_this34=_callSuper(this,FableServiceRestClient,[pFable,pOptions,pServiceHash]);_this34.TraceLog=false;if(_this34.options.TraceLog||_this34.fable.TraceLog){_this34.TraceLog=true;}_this34.dataFormat=_this34.fable.services.DataFormat;_this34.serviceType='RestClient';_this34.cookie=false;// This is a function that can be overridden, to allow the management
|
|
3324
3324
|
// of the request options before they are passed to the request library.
|
|
3325
3325
|
_this34.prepareRequestOptions=function(pOptions){return pOptions;};return _this34;}_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.
|
|
3326
3326
|
pRequestOptions.headers.cookie=libCookie.serialize(tmpCookieKeys[0],tmpCookieObject[tmpCookieKeys[0]]);}}return pRequestOptions;}},{key:"preRequest",value:function preRequest(pOptions){// Validate the options object
|