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.
- package/Dockerfile_LUXURYCode +4 -5
- package/dist/fable.compatible.js +4 -2
- package/dist/fable.compatible.min.js +2 -2
- package/dist/fable.compatible.min.js.map +1 -1
- package/dist/fable.js +4 -2
- package/dist/fable.min.js +2 -2
- package/dist/fable.min.js.map +1 -1
- package/package.json +4 -3
- package/retold-harness/bookstore-serve-api.js +41 -0
- package/retold-harness/configuration-bookstore-serve-api.js +30 -0
- package/retold-harness/model/manual_scripts/MySQL-Laden-Entry.sh +17 -0
- package/retold-harness/model/manual_scripts/my.cnf +4 -0
- package/retold-harness/model/sql_create/BookStore-DeleteAndRepopulateTables.sql +194 -0
- package/retold-harness/model/sql_create/MySQL-Security.sql +5 -0
- package/source/services/Fable-Service-Operation-DefaultSettings.js +1 -1
- package/source/services/Fable-Service-Operation.js +4 -11
- package/test/RestClient_test.js +1 -1
- package/retold-harness/Bookstore-Import-Books.sh +0 -4
- package/retold-harness/bookstore-configuration.json +0 -28
- package/retold-harness/bookstore-import-books-run.js +0 -9
- package/retold-harness/bookstore-import-books.js +0 -214
- package/retold-harness/bookstore-serve-meadow-endpoint-apis-IPC.js +0 -137
- package/retold-harness/bookstore-serve-meadow-endpoint-apis-run.js +0 -6
- package/retold-harness/bookstore-serve-meadow-endpoint-apis.js +0 -129
- package/retold-harness/data/books.csv +0 -10001
- package/retold-harness/model/json_schema/README.md +0 -1
- package/retold-harness/package.json +0 -22
- package/retold-harness/test_old/Tests.js +0 -3243
- package/retold-harness/test_old/untitled.js +0 -88
- /package/retold-harness/{MySQL-Laden-Entry.sh → docker_scripts/MySQL-Laden-Entry.sh} +0 -0
- /package/retold-harness/model/{json_schema/BookStore-Extended.json → Model-Extended.json} +0 -0
- /package/retold-harness/model/{json_schema/BookStore-PICT.json → Model-PICT.json} +0 -0
- /package/retold-harness/model/{json_schema/BookStore.json → Model.json} +0 -0
- /package/retold-harness/{bookstore-api-endpoint-exercises.paw → model/bookstore-api-endpoint-exercises.paw} +0 -0
- /package/retold-harness/{MySQL-Security.sql → model/manual_scripts/MySQL-Security.sql} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Author.json → meadow/Model-MeadowSchema-Author.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Book.json → meadow/Model-MeadowSchema-Book.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-BookAuthorJoin.json → meadow/Model-MeadowSchema-BookAuthorJoin.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-BookPrice.json → meadow/Model-MeadowSchema-BookPrice.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Review.json → meadow/Model-MeadowSchema-Review.json} +0 -0
- /package/retold-harness/model/{meadow_schema → meadow}/README.md +0 -0
package/Dockerfile_LUXURYCode
CHANGED
|
@@ -56,14 +56,16 @@ RUN code-server --install-extension mtxr.sqltools-driver-mysql
|
|
|
56
56
|
RUN echo "...configuring mariadb (mysql) server...."
|
|
57
57
|
RUN sudo apt install default-mysql-server default-mysql-client -y
|
|
58
58
|
RUN sudo sed -i "s|bind-address|#bind-address|g" /etc/mysql/mariadb.conf.d/50-server.cnf
|
|
59
|
-
ADD ./retold-harness/MySQL-Security.sql /home/coder/MySQL-Configure-Security.sql
|
|
60
|
-
ADD ./retold-harness/MySQL-Laden-Entry.sh /usr/bin/MySQL-Laden-Entry.sh
|
|
59
|
+
ADD ./retold-harness/model/sql_create/MySQL-Security.sql /home/coder/MySQL-Configure-Security.sql
|
|
60
|
+
ADD ./retold-harness/docker_scripts/MySQL-Laden-Entry.sh /usr/bin/MySQL-Laden-Entry.sh
|
|
61
61
|
RUN ( sudo mysqld_safe --skip-grant-tables --skip-networking & ) && sleep 5 && mysql -u root < /home/coder/MySQL-Configure-Security.sql
|
|
62
62
|
|
|
63
63
|
# Import the initial database
|
|
64
64
|
COPY ./retold-harness/model/sql_create/BookStore-CreateDatabase.mysql.sql /home/coder/MySQL-Create-Databases.sql
|
|
65
|
+
COPY ./retold-harness/model/sql_create/BookStore-DeleteAndRepopulateTables.sql /home/coder/MySQL-Repopulate-Databases.sql
|
|
65
66
|
RUN sudo service mariadb restart && sleep 5 && mysql -u root -p"123456789" -e "CREATE DATABASE bookstore;"
|
|
66
67
|
RUN sudo service mariadb restart && sleep 5 && mysql -u root -p"123456789" bookstore < /home/coder/MySQL-Create-Databases.sql
|
|
68
|
+
RUN sudo service mariadb restart && sleep 5 && mysql -u root -p"123456789" bookstore < /home/coder/MySQL-Repopulate-Databases.sql
|
|
67
69
|
|
|
68
70
|
RUN echo "...mapping library specific volumes..."
|
|
69
71
|
|
|
@@ -84,7 +86,4 @@ RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm alias default 14
|
|
|
84
86
|
|
|
85
87
|
WORKDIR /home/coder/fable
|
|
86
88
|
|
|
87
|
-
# RUN . ~/.nvm/nvm.sh && source ~/.bashrc && npm install
|
|
88
|
-
# RUN . /home/coder/fable/retold-harness/Bookstore-Import-Books.sh
|
|
89
|
-
|
|
90
89
|
ENTRYPOINT ["/usr/bin/MySQL-Laden-Entry.sh"]
|
package/dist/fable.compatible.js
CHANGED
|
@@ -360,7 +360,8 @@ this.UUID="CORESVC-".concat(Math.floor(Math.random()*(99999-10000)+10000));this.
|
|
|
360
360
|
function connectFable(pFable){this.fable=pFable;return true;}}]);return FableCoreServiceProviderBase;}();_defineProperty2(FableCoreServiceProviderBase,"isFableService",true);module.exports=FableCoreServiceProviderBase;},{}],32:[function(require,module,exports){/**
|
|
361
361
|
* Fable Service Base
|
|
362
362
|
* @author <steven@velozo.com>
|
|
363
|
-
*/var FableServiceProviderBase=/*#__PURE__*/_createClass2(function FableServiceProviderBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,FableServiceProviderBase);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)
|
|
363
|
+
*/var FableServiceProviderBase=/*#__PURE__*/_createClass2(function FableServiceProviderBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,FableServiceProviderBase);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
|
*/},{key:"addPatternAsync",value:function addPatternAsync(pPatternStart,pPatternEnd,pParserAsync){if(pPatternStart.length<1)return false;if(typeof pPatternEnd==='string'&&pPatternEnd.length<1)return false;var 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'?function(pHash,pData,fCallback){fCallback(pParserPromise);}:function(pHash,pData,fCallback){return fCallback(pHash);};tmpLeaf.isAsync=true;return true;}}]);return WordTree;}();module.exports=WordTree;},{}],100:[function(require,module,exports){module.exports={"Metadata":{"
|
|
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'?function(pHash,pData,fCallback){fCallback(pParserPromise);}:function(pHash,pData,fCallback){return fCallback(pHash);};tmpLeaf.isAsync=true;return true;}}]);return WordTree;}();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){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 _super13=_createSuper(FableOperation);function FableOperation(pFable,pOptions,pServiceHash){var _this23;_classCallCheck2(this,FableOperation);_this23=_super13.call(this,pFable,pOptions,pServiceHash);_this23.serviceType='PhasedOperation';_this23.state=JSON.parse(_OperationStatePrototypeString);// Match the service instantiation to the operation.
|
|
2773
|
+
_this23.state.Metadata.Hash=_this23.Hash;_this23.state.Metadata.UUID=_this23.UUID;_this23.name=typeof _this23.options.Name=='string'?_this23.options.Name:"Unnamed Operation ".concat(_this23.state.Metadata.UUID);_this23.log=_assertThisInitialized(_this23);return _this23;}_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":92,"./Fable-Service-Operation-DefaultSettings.js":100}],102:[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 _super14=_createSuper(FableServiceRestClient);function FableServiceRestClient(pFable,pOptions,pServiceHash){var _this24;_classCallCheck2(this,FableServiceRestClient);_this24=_super14.call(this,pFable,pOptions,pServiceHash);_this24.TraceLog=false;if(_this24.options.TraceLog||_this24.fable.TraceLog){_this24.TraceLog=true;}_this24.dataFormat=_this24.fable.defaultServices.DataFormat;_this24.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
|
_this24.prepareRequestOptions=function(pOptions){return pOptions;};return _this24;}_createClass2(FableServiceRestClient,[{key:"preRequest",value:function preRequest(pOptions){// Validate the options object
|
|
2774
2776
|
return this.prepareRequestOptions(pOptions);}},{key:"executeChunkedRequest",value:function executeChunkedRequest(pOptions,fCallback){var _this25=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(_this25.TraceLog){var tmpConnectTime=_this25.fable.log.getTimeStamp();_this25.fable.log.debug("--> ".concat(tmpOptions.method," connected in ").concat(_this25.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.
|