fable 3.0.46 → 3.0.47

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.
Files changed (41) hide show
  1. package/Dockerfile_LUXURYCode +4 -5
  2. package/dist/fable.compatible.js +4 -2
  3. package/dist/fable.compatible.min.js +2 -2
  4. package/dist/fable.compatible.min.js.map +1 -1
  5. package/dist/fable.js +4 -2
  6. package/dist/fable.min.js +2 -2
  7. package/dist/fable.min.js.map +1 -1
  8. package/package.json +4 -3
  9. package/retold-harness/bookstore-serve-api.js +41 -0
  10. package/retold-harness/configuration-bookstore-serve-api.js +30 -0
  11. package/retold-harness/model/manual_scripts/MySQL-Laden-Entry.sh +17 -0
  12. package/retold-harness/model/manual_scripts/my.cnf +4 -0
  13. package/retold-harness/model/sql_create/BookStore-DeleteAndRepopulateTables.sql +194 -0
  14. package/retold-harness/model/sql_create/MySQL-Security.sql +5 -0
  15. package/source/services/Fable-Service-Operation-DefaultSettings.js +1 -1
  16. package/source/services/Fable-Service-Operation.js +4 -11
  17. package/test/RestClient_test.js +1 -1
  18. package/retold-harness/Bookstore-Import-Books.sh +0 -4
  19. package/retold-harness/bookstore-configuration.json +0 -28
  20. package/retold-harness/bookstore-import-books-run.js +0 -9
  21. package/retold-harness/bookstore-import-books.js +0 -214
  22. package/retold-harness/bookstore-serve-meadow-endpoint-apis-IPC.js +0 -137
  23. package/retold-harness/bookstore-serve-meadow-endpoint-apis-run.js +0 -6
  24. package/retold-harness/bookstore-serve-meadow-endpoint-apis.js +0 -129
  25. package/retold-harness/data/books.csv +0 -10001
  26. package/retold-harness/model/json_schema/README.md +0 -1
  27. package/retold-harness/package.json +0 -22
  28. package/retold-harness/test_old/Tests.js +0 -3243
  29. package/retold-harness/test_old/untitled.js +0 -88
  30. /package/retold-harness/{MySQL-Laden-Entry.sh → docker_scripts/MySQL-Laden-Entry.sh} +0 -0
  31. /package/retold-harness/model/{json_schema/BookStore-Extended.json → Model-Extended.json} +0 -0
  32. /package/retold-harness/model/{json_schema/BookStore-PICT.json → Model-PICT.json} +0 -0
  33. /package/retold-harness/model/{json_schema/BookStore.json → Model.json} +0 -0
  34. /package/retold-harness/{bookstore-api-endpoint-exercises.paw → model/bookstore-api-endpoint-exercises.paw} +0 -0
  35. /package/retold-harness/{MySQL-Security.sql → model/manual_scripts/MySQL-Security.sql} +0 -0
  36. /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Author.json → meadow/Model-MeadowSchema-Author.json} +0 -0
  37. /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Book.json → meadow/Model-MeadowSchema-Book.json} +0 -0
  38. /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-BookAuthorJoin.json → meadow/Model-MeadowSchema-BookAuthorJoin.json} +0 -0
  39. /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-BookPrice.json → meadow/Model-MeadowSchema-BookPrice.json} +0 -0
  40. /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Review.json → meadow/Model-MeadowSchema-Review.json} +0 -0
  41. /package/retold-harness/model/{meadow_schema → meadow}/README.md +0 -0
package/dist/fable.js CHANGED
@@ -360,7 +360,8 @@ this.UUID="CORESVC-".concat(Math.floor(Math.random()*(99999-10000)+10000));this.
360
360
  connectFable(pFable){this.fable=pFable;return true;}}_defineProperty2(FableCoreServiceProviderBase,"isFableService",true);module.exports=FableCoreServiceProviderBase;},{}],32:[function(require,module,exports){/**
361
361
  * Fable Service Base
362
362
  * @author <steven@velozo.com>
363
- */class FableServiceProviderBase{constructor(pFable,pOptions,pServiceHash){this.fable=pFable;this.options=typeof pOptions==='object'?pOptions:typeof pFable==='object'&&!pFable.isFable?pFable:{};this.serviceType='Unknown';if(typeof pFable.getUUID=='function'){this.UUID=pFable.getUUID();}else{this.UUID="NoFABLESVC-".concat(Math.floor(Math.random()*(99999-10000)+10000));}this.Hash=typeof pServiceHash==='string'?pServiceHash:"".concat(this.UUID);}}_defineProperty2(FableServiceProviderBase,"isFableService",true);module.exports=FableServiceProviderBase;module.exports.CoreServiceProviderBase=require('./Fable-ServiceProviderBase-Preinit.js');},{"./Fable-ServiceProviderBase-Preinit.js":31}],33:[function(require,module,exports){module.exports={"Product":"ApplicationNameHere","ProductVersion":"0.0.0","ConfigFile":false,"LogStreams":[{"level":"trace"}]};},{}],34:[function(require,module,exports){(function(process){(function(){/**
363
+ */class FableServiceProviderBase{constructor(pFable,pOptions,pServiceHash){this.fable=pFable;this.options=typeof pOptions==='object'?pOptions:typeof pFable==='object'&&!pFable.isFable?pFable:{};this.serviceType='Unknown';if(typeof pFable.getUUID=='function'){this.UUID=pFable.getUUID();}else{this.UUID="NoFABLESVC-".concat(Math.floor(Math.random()*(99999-10000)+10000));}this.Hash=typeof pServiceHash==='string'?pServiceHash:"".concat(this.UUID);// Pull back a few things
364
+ this.log=this.fable.log;this.services=this.fable.services;this.defaultServices=this.fable.defaultServices;}}_defineProperty2(FableServiceProviderBase,"isFableService",true);module.exports=FableServiceProviderBase;module.exports.CoreServiceProviderBase=require('./Fable-ServiceProviderBase-Preinit.js');},{"./Fable-ServiceProviderBase-Preinit.js":31}],33:[function(require,module,exports){module.exports={"Product":"ApplicationNameHere","ProductVersion":"0.0.0","ConfigFile":false,"LogStreams":[{"level":"trace"}]};},{}],34:[function(require,module,exports){(function(process){(function(){/**
364
365
  * Fable Settings Template Processor
365
366
  *
366
367
  * This class allows environment variables to come in via templated expressions, and defaults to be set.
@@ -2768,7 +2769,8 @@ for(var i=0;i<pPatternStart.length;i++)tmpLeaf=this.addChild(tmpLeaf,pPatternSta
2768
2769
  * @param {number} pParserAsync - The function (with an asynchronous callback) to parse if this is the matched pattern, once the Pattern End is met. If this is a string, a simple replacement occurs.
2769
2770
  * @return {bool} True if adding the pattern was successful
2770
2771
  */addPatternAsync(pPatternStart,pPatternEnd,pParserAsync){if(pPatternStart.length<1)return false;if(typeof pPatternEnd==='string'&&pPatternEnd.length<1)return false;let tmpLeaf=this.ParseTree;// Add the tree of leaves iteratively
2771
- for(var i=0;i<pPatternStart.length;i++)tmpLeaf=this.addChild(tmpLeaf,pPatternStart,i);tmpLeaf.PatternStart=pPatternStart;tmpLeaf.PatternEnd=typeof pPatternEnd==='string'&&pPatternEnd.length>0?pPatternEnd:pPatternStart;tmpLeaf.Parse=typeof pParserAsync==='function'?pParserAsync:typeof pParserAsync==='string'?(pHash,pData,fCallback)=>{fCallback(pParserPromise);}:(pHash,pData,fCallback)=>{return fCallback(pHash);};tmpLeaf.isAsync=true;return true;}}module.exports=WordTree;},{}],100:[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":[]};},{}],101:[function(require,module,exports){const libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;const _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));class FableOperation extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='PhasedOperation';this.state=JSON.parse(_OperationStatePrototypeString);this.state.Metadata.GUID=this.fable.getUUID();this.state.Metadata.Hash=this.Hash;this.name=typeof this.options.Name=='string'?this.options.Name:"Unnamed Operation ".concat(this.state.Metadata.GUID);}get GUID(){return this.state.Metadata.GUID;}get log(){return this;}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));}}writeOperationErrors(pLogText,pLogObject){this.state.Errors.push("".concat(pLogText));if(typeof pLogObject=='object'){this.state.Errors.push(JSON.stringify(pLogObject));}}trace(pLogText,pLogObject){this.writeOperationLog('TRACE',pLogText,pLogObject);this.fable.log.trace(pLogText,pLogObject);}debug(pLogText,pLogObject){this.writeOperationLog('DEBUG',pLogText,pLogObject);this.fable.log.debug(pLogText,pLogObject);}info(pLogText,pLogObject){this.writeOperationLog('INFO',pLogText,pLogObject);this.fable.log.info(pLogText,pLogObject);}warn(pLogText,pLogObject){this.writeOperationLog('WARN',pLogText,pLogObject);this.fable.log.warn(pLogText,pLogObject);}error(pLogText,pLogObject){this.writeOperationLog('ERROR',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.error(pLogText,pLogObject);}fatal(pLogText,pLogObject){this.writeOperationLog('FATAL',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.fatal(pLogText,pLogObject);}}module.exports=FableOperation;},{"../Fable-ServiceManager.js":92,"./Fable-Service-Operation-DefaultSettings.js":100}],102:[function(require,module,exports){const libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;const libSimpleGet=require('simple-get');class FableServiceRestClient extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.TraceLog=false;if(this.options.TraceLog||this.fable.TraceLog){this.TraceLog=true;}this.dataFormat=this.fable.defaultServices.DataFormat;this.serviceType='RestClient';// This is a function that can be overridden, to allow the management
2772
+ for(var i=0;i<pPatternStart.length;i++)tmpLeaf=this.addChild(tmpLeaf,pPatternStart,i);tmpLeaf.PatternStart=pPatternStart;tmpLeaf.PatternEnd=typeof pPatternEnd==='string'&&pPatternEnd.length>0?pPatternEnd:pPatternStart;tmpLeaf.Parse=typeof pParserAsync==='function'?pParserAsync:typeof pParserAsync==='string'?(pHash,pData,fCallback)=>{fCallback(pParserPromise);}:(pHash,pData,fCallback)=>{return fCallback(pHash);};tmpLeaf.isAsync=true;return true;}}module.exports=WordTree;},{}],100:[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":[]};},{}],101:[function(require,module,exports){const libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;const _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));class FableOperation extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='PhasedOperation';this.state=JSON.parse(_OperationStatePrototypeString);// Match the service instantiation to the operation.
2773
+ this.state.Metadata.Hash=this.Hash;this.state.Metadata.UUID=this.UUID;this.name=typeof this.options.Name=='string'?this.options.Name:"Unnamed Operation ".concat(this.state.Metadata.UUID);this.log=this;}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));}}writeOperationErrors(pLogText,pLogObject){this.state.Errors.push("".concat(pLogText));if(typeof pLogObject=='object'){this.state.Errors.push(JSON.stringify(pLogObject));}}trace(pLogText,pLogObject){this.writeOperationLog('TRACE',pLogText,pLogObject);this.fable.log.trace(pLogText,pLogObject);}debug(pLogText,pLogObject){this.writeOperationLog('DEBUG',pLogText,pLogObject);this.fable.log.debug(pLogText,pLogObject);}info(pLogText,pLogObject){this.writeOperationLog('INFO',pLogText,pLogObject);this.fable.log.info(pLogText,pLogObject);}warn(pLogText,pLogObject){this.writeOperationLog('WARN',pLogText,pLogObject);this.fable.log.warn(pLogText,pLogObject);}error(pLogText,pLogObject){this.writeOperationLog('ERROR',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.error(pLogText,pLogObject);}fatal(pLogText,pLogObject){this.writeOperationLog('FATAL',pLogText,pLogObject);this.writeOperationErrors(pLogText,pLogObject);this.fable.log.fatal(pLogText,pLogObject);}}module.exports=FableOperation;},{"../Fable-ServiceManager.js":92,"./Fable-Service-Operation-DefaultSettings.js":100}],102:[function(require,module,exports){const libFableServiceBase=require('../Fable-ServiceManager.js').ServiceProviderBase;const libSimpleGet=require('simple-get');class FableServiceRestClient extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.TraceLog=false;if(this.options.TraceLog||this.fable.TraceLog){this.TraceLog=true;}this.dataFormat=this.fable.defaultServices.DataFormat;this.serviceType='RestClient';// This is a function that can be overridden, to allow the management
2772
2774
  // of the request options before they are passed to the request library.
2773
2775
  this.prepareRequestOptions=pOptions=>{return pOptions;};}preRequest(pOptions){// Validate the options object
2774
2776
  return this.prepareRequestOptions(pOptions);}executeChunkedRequest(pOptions,fCallback){let 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,(pError,pResponse)=>{if(pError){return fCallback(pError,pResponse);}if(this.TraceLog){let tmpConnectTime=this.fable.log.getTimeStamp();this.fable.log.debug("--> ".concat(tmpOptions.method," connected in ").concat(this.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime),"ms code ").concat(pResponse.statusCode));}let tmpData='';pResponse.on('data',pChunk=>{// For JSON, the chunk is the serialized object.