pict 1.0.273 → 1.0.274
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/pict.compatible.js +2 -2
- package/dist/pict.compatible.js.map +1 -1
- package/dist/pict.compatible.min.js +1 -1
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +2 -2
- package/dist/pict.js.map +1 -1
- package/dist/pict.min.js +1 -1
- package/dist/pict.min.js.map +1 -1
- package/package.json +1 -1
- package/source/Pict-Meadow-EntityProvider.js +1 -1
package/dist/pict.compatible.js
CHANGED
|
@@ -5027,7 +5027,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
5027
5027
|
// presumably different callback function.
|
|
5028
5028
|
// This makes sure that own properties are retained, so that
|
|
5029
5029
|
// decorations and such are not lost along the way.
|
|
5030
|
-
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;}}},{}],190:[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;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.
|
|
5030
|
+
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;}}},{}],190:[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;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.274","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"types":"types/source/Pict.d.ts","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"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4","eslint":"^9.27.0","globals":"^16.2.0","quackage":"^1.0.41","sinon":"^20.0.0"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.11","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.11","pict-view":"^1.0.61","typescript":"^5.8.3"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
5031
5031
|
/* global Pict, _Pict: writeable *//**
|
|
5032
5032
|
* Simple function to load a pict Application
|
|
5033
5033
|
*
|
|
@@ -5251,7 +5251,7 @@ this.fable.manifest.setValueByHash(tmpDestinationEntity,tmpBucketAddress,tmpSour
|
|
|
5251
5251
|
* }
|
|
5252
5252
|
* }
|
|
5253
5253
|
*/},{key:"projectDataset",value:function projectDataset(pConfiguration,pContext){var tmpInputRecordset=this.fable.manifest.getValueByHash(pContext,pConfiguration.InputRecordsetAddress);if(!Array.isArray(tmpInputRecordset)){throw new Error("EntityBundleRequest failed to project dataset because the input recordset [".concat(pConfiguration.InputRecordsetAddress,"] did not return an array."));}var tmpDefaultOutputRecordset=this.fable.manifest.getValueByHash(pContext,pConfiguration.OutputRecordsetAddress);if(!tmpDefaultOutputRecordset){tmpDefaultOutputRecordset=[];this.fable.manifest.setValueByHash(pContext,pConfiguration.OutputRecordsetAddress,tmpDefaultOutputRecordset);}var _iterator12=_createForOfIteratorHelper(tmpInputRecordset),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var tmpInputRecord=_step12.value;var tmpOutputRecordset=tmpDefaultOutputRecordset;var tmpOutputRecordsetAddressOverride=void 0;if(_typeof(pConfiguration.OutputRecordsetAddressMapping)==='object'){tmpOutputRecordsetAddressOverride=this._resolveOutputRecordsetAddressMapping(pConfiguration,pContext,tmpInputRecord);if(tmpOutputRecordsetAddressOverride){tmpOutputRecordset=this.fable.manifest.getValueByHash(pContext,tmpOutputRecordsetAddressOverride);if(!tmpOutputRecordset){tmpOutputRecordset=[];this.fable.manifest.setValueByHash(pContext,tmpOutputRecordsetAddressOverride,tmpOutputRecordset);}}if(!tmpOutputRecordset||!Array.isArray(tmpOutputRecordset)){tmpOutputRecordset=tmpDefaultOutputRecordset;}}var tmpPrototypeAddress=this.fable.parseTemplate(pConfiguration.RecordPrototypeAddress,Object.assign({InputRecord:tmpInputRecord},pContext));var tmpRecordPrototype=this.fable.manifest.getValueByHash(Object.assign({InputRecord:tmpInputRecord,OutputRecordset:tmpOutputRecordset},pContext),tmpPrototypeAddress);var tmpOutputRecord={};if(Array.isArray(tmpRecordPrototype)&&tmpRecordPrototype.length>0){tmpOutputRecord=tmpRecordPrototype[0];}else{tmpOutputRecordset.push(tmpOutputRecord);}var tmpRecordFieldMapping=pConfiguration.RecordFieldMapping[tmpOutputRecordsetAddressOverride]||pConfiguration.RecordFieldMapping.Default;if(!tmpRecordFieldMapping){tmpRecordFieldMapping=pConfiguration.RecordFieldMapping[Object.keys(pConfiguration.RecordFieldMapping)[0]];}if(!tmpRecordFieldMapping){throw new Error("EntityBundleRequest failed to project dataset because the record field mapping for [".concat(tmpOutputRecordsetAddressOverride,"] did not return a mapping."));}for(var _i66=0,_Object$keys2=Object.keys(tmpRecordFieldMapping);_i66<_Object$keys2.length;_i66++){var tmpInputFieldAddress=_Object$keys2[_i66];var tmpOutputFieldAddress=tmpRecordFieldMapping[tmpInputFieldAddress];var tmpInputFieldValue=this.fable.manifest.getValueByHash(Object.assign({InputRecord:tmpInputRecord},pContext),tmpInputFieldAddress);this.fable.manifest.setValueByHash(Object.assign({OutputRecord:tmpOutputRecord},pContext),tmpOutputFieldAddress,tmpInputFieldValue);}}}catch(err){_iterator12.e(err);}finally{_iterator12.f();}}},{key:"_resolveOutputRecordsetAddressMapping",value:function _resolveOutputRecordsetAddressMapping(pConfiguration,pContext,pInputRecord){var tmpAddressSpace=Object.assign({InputRecord:pInputRecord},pContext);for(var _i67=0,_Object$keys3=Object.keys(pConfiguration.OutputRecordsetAddressMapping);_i67<_Object$keys3.length;_i67++){var tmpRule=_Object$keys3[_i67];var _tmpRule$split=tmpRule.split(','),_tmpRule$split2=_slicedToArray(_tmpRule$split,3),tmpLHSAddress=_tmpRule$split2[0],tmpOperator=_tmpRule$split2[1],tmpMatchValue=_tmpRule$split2[2];var tmpLHS=this.fable.manifest.getValueByHash(tmpAddressSpace,tmpLHSAddress);if(!tmpLHS){if(this.fable.LogNoisiness>0){this.log.warn("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return a value."));}continue;}switch(tmpOperator){case'AnyContains':if(!Array.isArray(tmpLHS)){//TODO: consider making this use objects as well?
|
|
5254
|
-
this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return an array."));continue;}var _iterator13=_createForOfIteratorHelper(tmpLHS),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var tmpLHSValue=_step13.value;if(String(tmpLHSValue).includes(tmpMatchValue)){return pConfiguration.OutputRecordsetAddressMapping[tmpRule];}}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}return null;}}
|
|
5254
|
+
this.log.error("EntityBundleRequest failed to project dataset because the LHS address [".concat(tmpLHSAddress,"] did not return an array."));continue;}var _iterator13=_createForOfIteratorHelper(tmpLHS),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var tmpLHSValue=_step13.value;if(String(tmpLHSValue).includes(tmpMatchValue)){return pConfiguration.OutputRecordsetAddressMapping[tmpRule];}}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}}}return null;}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,pContext,fCallback){var _this79=this;// First sanity check the pCustomRequestInformation
|
|
5255
5255
|
if(!('URL'in pCustomRequestInformation)||typeof pCustomRequestInformation.URL!='string'){this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string.");return fCallback();}if(!('URLData'in pCustomRequestInformation)||_typeof(pCustomRequestInformation.URLData)!='object'){pCustomRequestInformation.URLData={};}pContext.StepData=pCustomRequestInformation.URLData;// Parse the filter template
|
|
5256
5256
|
var tmpURLTemplateString=this.fable.parseTemplate(pCustomRequestInformation.URL,pContext);if(tmpURLTemplateString==''){// We may want to continue, but for now let's say nah and nope out.
|
|
5257
5257
|
this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");}var tmpURLPrefix='';// This will only be true if the "Host" is set.
|