fable 3.1.11 → 3.1.13
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.js +13 -6
- package/dist/fable.js.map +1 -1
- package/dist/fable.min.js +2 -2
- package/dist/fable.min.js.map +1 -1
- package/package.json +3 -3
- package/source/services/Fable-Service-Math.js +3 -1
package/dist/fable.js
CHANGED
|
@@ -1413,8 +1413,10 @@ if(Array.isArray(pObject[tmpBoxedPropertyName])==isNaN(tmpBoxedPropertyNumber)){
|
|
|
1413
1413
|
// otherwise we will try to treat it as a dynamic object property.
|
|
1414
1414
|
if(isNaN(tmpBoxedPropertyNumber)){// This isn't a number ... let's treat it as a dynamic object property.
|
|
1415
1415
|
// We would expect the property to be wrapped in some kind of quotes so strip them
|
|
1416
|
-
tmpBoxedPropertyReference=this.cleanWrapCharacters('"',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters('`',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters("'",tmpBoxedPropertyReference)
|
|
1417
|
-
pObject[tmpBoxedPropertyName][tmpBoxedPropertyReference]=
|
|
1416
|
+
tmpBoxedPropertyReference=this.cleanWrapCharacters('"',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters('`',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters("'",tmpBoxedPropertyReference);if(!(tmpBoxedPropertyReference in pObject[tmpBoxedPropertyName])){// If the subobject doesn't exist, create it
|
|
1417
|
+
pObject[tmpBoxedPropertyName][tmpBoxedPropertyReference]={};}// Return the value in the property
|
|
1418
|
+
pObject[tmpBoxedPropertyName][tmpBoxedPropertyReference]=pValue;return true;}else{while(pObject[tmpBoxedPropertyName].length<tmpBoxedPropertyNumber+1){// If the subobject doesn't exist, create it
|
|
1419
|
+
pObject[tmpBoxedPropertyName].push({});}pObject[tmpBoxedPropertyName][tmpBoxedPropertyNumber]=pValue;return true;}}else{// Now is the time in recursion to set the value in the object
|
|
1418
1420
|
pObject[pAddress]=pValue;return true;}}else{let tmpSubObjectName=pAddress.substring(0,tmpSeparatorIndex);let tmpNewAddress=pAddress.substring(tmpSeparatorIndex+1);// Test if the tmpNewAddress is an array or object
|
|
1419
1421
|
// Check if it's a boxed property
|
|
1420
1422
|
let tmpBracketStartIndex=tmpSubObjectName.indexOf('[');let tmpBracketStopIndex=tmpSubObjectName.indexOf(']');// Boxed elements look like this:
|
|
@@ -1446,8 +1448,10 @@ if(Array.isArray(pObject[tmpBoxedPropertyName])==isNaN(tmpBoxedPropertyNumber)){
|
|
|
1446
1448
|
// 4) If the middle part is *only* a number (no single, double or backtick quotes) it is an array element,
|
|
1447
1449
|
// otherwise we will try to reat it as a dynamic object property.
|
|
1448
1450
|
if(isNaN(tmpBoxedPropertyNumber)){// This isn't a number ... let's treat it as a dynanmic object property.
|
|
1449
|
-
tmpBoxedPropertyReference=this.cleanWrapCharacters('"',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters('`',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters("'",tmpBoxedPropertyReference)
|
|
1450
|
-
|
|
1451
|
+
tmpBoxedPropertyReference=this.cleanWrapCharacters('"',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters('`',tmpBoxedPropertyReference);tmpBoxedPropertyReference=this.cleanWrapCharacters("'",tmpBoxedPropertyReference);if(!(tmpBoxedPropertyReference in pObject[tmpBoxedPropertyName])){// If the subobject doesn't exist, create it
|
|
1452
|
+
pObject[tmpBoxedPropertyName][tmpBoxedPropertyReference]={};}// Recurse directly into the subobject
|
|
1453
|
+
return this.setValueAtAddress(pObject[tmpBoxedPropertyName][tmpBoxedPropertyReference],tmpNewAddress,pValue);}else{while(pObject[tmpBoxedPropertyName].length<tmpBoxedPropertyNumber+1){// If the subobject doesn't exist, create it
|
|
1454
|
+
pObject[tmpBoxedPropertyName].push({});}// We parsed a valid number out of the boxed property name, so recurse into the array
|
|
1451
1455
|
return this.setValueAtAddress(pObject[tmpBoxedPropertyName][tmpBoxedPropertyNumber],tmpNewAddress,pValue);}}// If there is an object property already named for the sub object, but it isn't an object
|
|
1452
1456
|
// then the system can't set the value in there. Error and abort!
|
|
1453
1457
|
if(tmpSubObjectName in pObject&&typeof pObject[tmpSubObjectName]!=='object'){if(!('__ERROR'in pObject))pObject['__ERROR']={};// Put it in an error object so data isn't lost
|
|
@@ -3012,7 +3016,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
3012
3016
|
// presumably different callback function.
|
|
3013
3017
|
// This makes sure that own properties are retained, so that
|
|
3014
3018
|
// decorations and such are not lost along the way.
|
|
3015
|
-
module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],130:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],131:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.
|
|
3019
|
+
module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],130:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],131:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.13","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","test":"./node_modules/.bin/mocha -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"quackage":"^1.0.42"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.39","simple-get":"^4.0.1"}};},{}],132:[function(require,module,exports){/**
|
|
3016
3020
|
* Fable Application Services Support Library
|
|
3017
3021
|
* @author <steven@velozo.com>
|
|
3018
3022
|
*/ // Pre-init services
|
|
@@ -3910,7 +3914,10 @@ this.euler='2.718281828459045235360287471352662497757247093699959574966967627724
|
|
|
3910
3914
|
* @param {number} pValue - The value to parse.
|
|
3911
3915
|
* @param {any} pNonNumberValue - The value to use if parsing fails.
|
|
3912
3916
|
* @returns {string} - The parsed number as a string.
|
|
3913
|
-
*/parsePrecise(pValue,pNonNumberValue){let tmpNumber;try{tmpNumber=new this.fable.Utility.bigNumber(pValue);}catch(pError){
|
|
3917
|
+
*/parsePrecise(pValue,pNonNumberValue){let tmpNumber;try{tmpNumber=new this.fable.Utility.bigNumber(pValue);}catch(pError){// TODO: This seems more correct -- we can add a silent or noisy parameter if we want this to export.
|
|
3918
|
+
// Reason: Currently this is absolutely obliterating logs in the data integrations from bad data sources.
|
|
3919
|
+
//this.log.warn(`Error parsing number (type ${typeof (pValue)}): ${pError}`);
|
|
3920
|
+
tmpNumber=typeof pNonNumberValue==='undefined'?"0.0":pNonNumberValue;}return tmpNumber?tmpNumber.toString():tmpNumber;}/**
|
|
3914
3921
|
* Assigns the given value. For equals operations in the solver.
|
|
3915
3922
|
* @param {*} pValue - The value to be assigned.
|
|
3916
3923
|
* @returns {*} The assigned value.
|