@frontoose/browser
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -28,3 +28,3 @@ import { BrowserOptions } from '.././interfaces/browser-options'; | ||
count(): Observable<number>; | ||
run<T>(name: string, payload: any): Observable<T>; | ||
run<T>(payload: any): Observable<T>; | ||
protected call$<T>(action: ActionOptions, payload?: any, path?: string): Observable<T>; | ||
@@ -31,0 +31,0 @@ /** |
@@ -426,4 +426,4 @@ (function (global, factory) { | ||
}; | ||
Browser.prototype.run = function (name, payload) { | ||
return this.call$('run', payload, name); | ||
Browser.prototype.run = function (payload) { | ||
return this.call$('run', payload, this.options.collection); | ||
}; | ||
@@ -430,0 +430,0 @@ Browser.prototype.call$ = function (action, payload, path) { |
@@ -1,2 +0,2 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("axios"),require("lodash"),require("rxjs")):"function"==typeof define&&define.amd?define("@frontoose/browser",["exports","@angular/core","axios","lodash","rxjs"],n):n(((t="undefined"!=typeof globalThis?globalThis:t||self).frontoose=t.frontoose||{},t.frontoose.browser={}),t.ng.core,t.axios,t._,t.rxjs)}(this,(function(t,n,e,i,o){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=r(e),c=function(){function t(t){this.init(t)}return t.prototype.getInstance=function(){return this.instance},t.prototype.init=function(t){this.options=t,this.instance=s.default.create(t.httpConfig)},t.prototype.executeRequest=function(t,n,e,r){var s=this;void 0===e&&(e={}),void 0===r&&(r="");var c=""+(this.options.baseURL||i.get(this.options,"httpConfig.baseURL")||"")+((this.options.endpoint?this.options.endpoint:"")||""),a={};return"run"!==n?(c+=this.options.classesURI+"/"+this.options.collection,a.chain=t,a.action=n,a.collection=this.options.collection,a.params=e):(c+=this.options.cloudURI+"/"+r,a.action=n,a.params=e),new o.Observable((function(t){o.from(s.instance.post(c,a)).toPromise().then((function(n){return function(n){t.next(n&&n.data),t.complete()}(n)})).catch((function(n){t.error(n),t.complete()}))}))},t}(),a={options:{silent:!0,httpConfig:{timeout:6e4,baseURL:"",headers:{}},classesURI:"/classes",cloudURI:"/cloud"},actions:["find","findOne","set","updateMany","deleteMany","count","run"],chaining:["key","query","where","sort","limit","skip","doc","select","populate"],operators:["$eq","$gt","$gte","$lt","$lte","$ne","$nin","$all","$size","$exists"],http:new c({})},u=function(t){for(var n in this.options=t,t)a.options[n]=t[n]};u.decorators=[{type:n.Injectable}],u.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:["FrontooseSetup"]}]}]};var h=function(){function t(t){this.angular=t}return t.forRoot=function(n){return void 0===n&&(n={}),{ngModule:t,providers:[u,{provide:"FrontooseSetup",useValue:n}]}},t}();h.decorators=[{type:n.NgModule}],h.ctorParameters=function(){return[{type:u}]};var l=function(){function t(t){this.silent=!1,this.subject=new o.Subject,Object.assign(this,t)}return t.prototype.enabled=function(t){return t||!1===t?this.silent=!t:!this.silent},t.prototype.success=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("green"))}:function(t){return n.add(t,"green")}},t.prototype.info=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("deepskyblue"))}:function(t){return n.add(t,"deepskyblue")}},t.prototype.danger=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("red"))}:function(t){return n.add(t,"red")}},t.prototype.warn=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("yellow"))}:function(t){return n.add(t,"yellow")}},t.prototype.add=function(t,n){void 0===n&&(n="green");var e=this.style(n),i=' <span style="'+e+'">'+t+"</span> ";this.silent||(this.log(t,e),this.subject.next({created:(new Date).toISOString(),message:i}))},t.prototype.log=function(t,n){return console.log("%c "+t+" ",n)},t.prototype.style=function(t){return"background: "+t+"; color: "+("yellow"===t||"deepskyblue"===t?"#333333":"#ffffff")+"; display: block"},t}();var p=function(){function t(t,n){this.chain={},this.$log=new o.Subject,this.init(t,n)}return t.prototype.init=function(t,n){this.options=Object.assign(Object.assign(Object.assign({collection:t},a.options),n),{httpConfig:Object.assign(Object.assign({},a.options.httpConfig),n.httpConfig)}),this.logger=new l({subject:this.$log,silent:this.options.silent}),this.initHttp()},t.prototype.log=function(){return this.logger},t.prototype.initHttp=function(){a.http=new c(this.options)},t.prototype.createKey=function(t,n,e){if(this.chain.key)return this.chain.key;var o=Object.assign({},this.chain),r=Object.assign({},this.options),s=JSON.stringify(Object.assign(Object.assign(Object.assign({action:t},n),{path:e}),i.omit(o,["key"])));return(r.collection+":/"+r.endpoint+e+"/"+function(t){function n(t,n){var e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}function e(t,n){return t>>>n|t<<32-n}function i(t,n){return t>>>n}function o(t,n,e){return t&n^~t&e}function r(t,n,e){return t&n^t&e^n&e}function s(t){return e(t,2)^e(t,13)^e(t,22)}function c(t){return e(t,6)^e(t,11)^e(t,25)}function a(t){return e(t,7)^e(t,18)^i(t,3)}return function(t){for(var n="0123456789abcdef",e="",i=0;i<4*t.length;i++)e+=n.charAt(t[i>>2]>>8*(3-i%4)+4&15)+n.charAt(t[i>>2]>>8*(3-i%4)&15);return e}(function(t,u){var h,l,p,f,y,d,g,v,b,C,k,j=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),A=new Array(64);t[u>>5]|=128<<24-u%32,t[15+(u+64>>9<<4)]=u;for(var m=0;m<t.length;m+=16){h=w[0],l=w[1],p=w[2],f=w[3],y=w[4],d=w[5],g=w[6],v=w[7];for(var O=0;O<64;O++)A[O]=O<16?t[O+m]:n(n(n(e(k=A[O-2],17)^e(k,19)^i(k,10),A[O-7]),a(A[O-15])),A[O-16]),b=n(n(n(n(v,c(y)),o(y,d,g)),j[O]),A[O]),C=n(s(h),r(h,l,p)),v=g,g=d,d=y,y=n(f,b),f=p,p=l,l=h,h=n(b,C);w[0]=n(h,w[0]),w[1]=n(l,w[1]),w[2]=n(p,w[2]),w[3]=n(f,w[3]),w[4]=n(y,w[4]),w[5]=n(d,w[5]),w[6]=n(g,w[6]),w[7]=n(v,w[7])}return w}(function(t){for(var n=Array(),e=0;e<8*t.length;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<24-e%32;return n}(t=function(t){t=t.replace(/\r\n/g,"\n");for(var n="",e=0;e<t.length;e++){var i=t.charCodeAt(e);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(63&i|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(63&i|128))}return n}(t)),8*t.length))}(s)).split("///").join("//")},t.prototype.checkActionAvailability=function(t){var n="["+t+"] action method unavailable";if(!1===a.actions.includes(t))throw new Error(n)},t.prototype.checkChainAvailability=function(t){var n="["+t+"] chaining method unavailable";if(!1===a.chaining.includes(t))return this.log().danger()(n)},t.prototype.checkOperatorAvailability=function(t){var n="["+t+"] operator is unavailable";if(!1===a.operators.includes(t))return this.log().danger()(n)},t.prototype.find=function(){return this.call$("find")},t.prototype.findOne=function(){return this.call$("findOne")},t.prototype.set=function(t){return this.call$("set",t)},t.prototype.updateMany=function(t){return this.call$("updateMany",t)},t.prototype.deleteMany=function(){return this.call$("deleteMany")},t.prototype.count=function(){return this.call$("count")},t.prototype.run=function(t,n){return this.call$("run",n,t)},t.prototype.call$=function(t,n,e){void 0===n&&(n={}),void 0===e&&(e=""),this.checkActionAvailability(t);this.createKey(t,n,e);var i=Object.assign({},this.chain);return this.resetChain(),a.http.executeRequest(i,t,n,e)},t.prototype.resetChain=function(){return this.chain={key:""},this},t.prototype.key=function(t){return this.chain.key=t,this.checkChainAvailability("key"),this},t.prototype.query=function(t){return this.chain.query=t,this.checkChainAvailability("query"),this},t.prototype.where=function(t,n,e){return i.isArray(this.chain.where)||(this.chain.where=[]),this.chain.where.push({field:t,operator:n,value:e}),this.checkChainAvailability("where"),this.checkOperatorAvailability(n),this},t.prototype.sort=function(t){return this.chain.sort=t,this.checkChainAvailability("sort"),this},t.prototype.limit=function(t){return this.chain.limit=t,this.checkChainAvailability("limit"),this},t.prototype.skip=function(t){return this.chain.skip=t,this.checkChainAvailability("skip"),this},t.prototype.doc=function(t){return this.chain.doc=t,this.checkChainAvailability("doc"),this},t.prototype.select=function(t){return this.chain.select=t,this.checkChainAvailability("select"),this},t.prototype.populate=function(t){return i.isArray(this.chain.populate)||(this.chain.populate=[]),this.chain.populate.push(t),this.checkChainAvailability("populate"),this},t}();t.Browser=p,t.FrontooseModule=h,t.FrontooseSetup=u,t.Http=c,t.collection=function(t,n){return void 0===n&&(n={}),new p(t,n)},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("axios"),require("lodash"),require("rxjs")):"function"==typeof define&&define.amd?define("@frontoose/browser",["exports","@angular/core","axios","lodash","rxjs"],n):n(((t="undefined"!=typeof globalThis?globalThis:t||self).frontoose=t.frontoose||{},t.frontoose.browser={}),t.ng.core,t.axios,t._,t.rxjs)}(this,(function(t,n,e,i,o){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=r(e),c=function(){function t(t){this.init(t)}return t.prototype.getInstance=function(){return this.instance},t.prototype.init=function(t){this.options=t,this.instance=s.default.create(t.httpConfig)},t.prototype.executeRequest=function(t,n,e,r){var s=this;void 0===e&&(e={}),void 0===r&&(r="");var c=""+(this.options.baseURL||i.get(this.options,"httpConfig.baseURL")||"")+((this.options.endpoint?this.options.endpoint:"")||""),a={};return"run"!==n?(c+=this.options.classesURI+"/"+this.options.collection,a.chain=t,a.action=n,a.collection=this.options.collection,a.params=e):(c+=this.options.cloudURI+"/"+r,a.action=n,a.params=e),new o.Observable((function(t){o.from(s.instance.post(c,a)).toPromise().then((function(n){return function(n){t.next(n&&n.data),t.complete()}(n)})).catch((function(n){t.error(n),t.complete()}))}))},t}(),a={options:{silent:!0,httpConfig:{timeout:6e4,baseURL:"",headers:{}},classesURI:"/classes",cloudURI:"/cloud"},actions:["find","findOne","set","updateMany","deleteMany","count","run"],chaining:["key","query","where","sort","limit","skip","doc","select","populate"],operators:["$eq","$gt","$gte","$lt","$lte","$ne","$nin","$all","$size","$exists"],http:new c({})},u=function(t){for(var n in this.options=t,t)a.options[n]=t[n]};u.decorators=[{type:n.Injectable}],u.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:["FrontooseSetup"]}]}]};var h=function(){function t(t){this.angular=t}return t.forRoot=function(n){return void 0===n&&(n={}),{ngModule:t,providers:[u,{provide:"FrontooseSetup",useValue:n}]}},t}();h.decorators=[{type:n.NgModule}],h.ctorParameters=function(){return[{type:u}]};var l=function(){function t(t){this.silent=!1,this.subject=new o.Subject,Object.assign(this,t)}return t.prototype.enabled=function(t){return t||!1===t?this.silent=!t:!this.silent},t.prototype.success=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("green"))}:function(t){return n.add(t,"green")}},t.prototype.info=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("deepskyblue"))}:function(t){return n.add(t,"deepskyblue")}},t.prototype.danger=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("red"))}:function(t){return n.add(t,"red")}},t.prototype.warn=function(t){var n=this;return void 0===t&&(t=!1),t?function(t){return n.log(t,n.style("yellow"))}:function(t){return n.add(t,"yellow")}},t.prototype.add=function(t,n){void 0===n&&(n="green");var e=this.style(n),i=' <span style="'+e+'">'+t+"</span> ";this.silent||(this.log(t,e),this.subject.next({created:(new Date).toISOString(),message:i}))},t.prototype.log=function(t,n){return console.log("%c "+t+" ",n)},t.prototype.style=function(t){return"background: "+t+"; color: "+("yellow"===t||"deepskyblue"===t?"#333333":"#ffffff")+"; display: block"},t}();var p=function(){function t(t,n){this.chain={},this.$log=new o.Subject,this.init(t,n)}return t.prototype.init=function(t,n){this.options=Object.assign(Object.assign(Object.assign({collection:t},a.options),n),{httpConfig:Object.assign(Object.assign({},a.options.httpConfig),n.httpConfig)}),this.logger=new l({subject:this.$log,silent:this.options.silent}),this.initHttp()},t.prototype.log=function(){return this.logger},t.prototype.initHttp=function(){a.http=new c(this.options)},t.prototype.createKey=function(t,n,e){if(this.chain.key)return this.chain.key;var o=Object.assign({},this.chain),r=Object.assign({},this.options),s=JSON.stringify(Object.assign(Object.assign(Object.assign({action:t},n),{path:e}),i.omit(o,["key"])));return(r.collection+":/"+r.endpoint+e+"/"+function(t){function n(t,n){var e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}function e(t,n){return t>>>n|t<<32-n}function i(t,n){return t>>>n}function o(t,n,e){return t&n^~t&e}function r(t,n,e){return t&n^t&e^n&e}function s(t){return e(t,2)^e(t,13)^e(t,22)}function c(t){return e(t,6)^e(t,11)^e(t,25)}function a(t){return e(t,7)^e(t,18)^i(t,3)}return function(t){for(var n="0123456789abcdef",e="",i=0;i<4*t.length;i++)e+=n.charAt(t[i>>2]>>8*(3-i%4)+4&15)+n.charAt(t[i>>2]>>8*(3-i%4)&15);return e}(function(t,u){var h,l,p,f,y,d,g,v,b,C,k,j=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),A=new Array(64);t[u>>5]|=128<<24-u%32,t[15+(u+64>>9<<4)]=u;for(var m=0;m<t.length;m+=16){h=w[0],l=w[1],p=w[2],f=w[3],y=w[4],d=w[5],g=w[6],v=w[7];for(var O=0;O<64;O++)A[O]=O<16?t[O+m]:n(n(n(e(k=A[O-2],17)^e(k,19)^i(k,10),A[O-7]),a(A[O-15])),A[O-16]),b=n(n(n(n(v,c(y)),o(y,d,g)),j[O]),A[O]),C=n(s(h),r(h,l,p)),v=g,g=d,d=y,y=n(f,b),f=p,p=l,l=h,h=n(b,C);w[0]=n(h,w[0]),w[1]=n(l,w[1]),w[2]=n(p,w[2]),w[3]=n(f,w[3]),w[4]=n(y,w[4]),w[5]=n(d,w[5]),w[6]=n(g,w[6]),w[7]=n(v,w[7])}return w}(function(t){for(var n=Array(),e=0;e<8*t.length;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<24-e%32;return n}(t=function(t){t=t.replace(/\r\n/g,"\n");for(var n="",e=0;e<t.length;e++){var i=t.charCodeAt(e);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(63&i|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(63&i|128))}return n}(t)),8*t.length))}(s)).split("///").join("//")},t.prototype.checkActionAvailability=function(t){var n="["+t+"] action method unavailable";if(!1===a.actions.includes(t))throw new Error(n)},t.prototype.checkChainAvailability=function(t){var n="["+t+"] chaining method unavailable";if(!1===a.chaining.includes(t))return this.log().danger()(n)},t.prototype.checkOperatorAvailability=function(t){var n="["+t+"] operator is unavailable";if(!1===a.operators.includes(t))return this.log().danger()(n)},t.prototype.find=function(){return this.call$("find")},t.prototype.findOne=function(){return this.call$("findOne")},t.prototype.set=function(t){return this.call$("set",t)},t.prototype.updateMany=function(t){return this.call$("updateMany",t)},t.prototype.deleteMany=function(){return this.call$("deleteMany")},t.prototype.count=function(){return this.call$("count")},t.prototype.run=function(t){return this.call$("run",t,this.options.collection)},t.prototype.call$=function(t,n,e){void 0===n&&(n={}),void 0===e&&(e=""),this.checkActionAvailability(t);this.createKey(t,n,e);var i=Object.assign({},this.chain);return this.resetChain(),a.http.executeRequest(i,t,n,e)},t.prototype.resetChain=function(){return this.chain={key:""},this},t.prototype.key=function(t){return this.chain.key=t,this.checkChainAvailability("key"),this},t.prototype.query=function(t){return this.chain.query=t,this.checkChainAvailability("query"),this},t.prototype.where=function(t,n,e){return i.isArray(this.chain.where)||(this.chain.where=[]),this.chain.where.push({field:t,operator:n,value:e}),this.checkChainAvailability("where"),this.checkOperatorAvailability(n),this},t.prototype.sort=function(t){return this.chain.sort=t,this.checkChainAvailability("sort"),this},t.prototype.limit=function(t){return this.chain.limit=t,this.checkChainAvailability("limit"),this},t.prototype.skip=function(t){return this.chain.skip=t,this.checkChainAvailability("skip"),this},t.prototype.doc=function(t){return this.chain.doc=t,this.checkChainAvailability("doc"),this},t.prototype.select=function(t){return this.chain.select=t,this.checkChainAvailability("select"),this},t.prototype.populate=function(t){return i.isArray(this.chain.populate)||(this.chain.populate=[]),this.chain.populate.push(t),this.checkChainAvailability("populate"),this},t}();t.Browser=p,t.FrontooseModule=h,t.FrontooseSetup=u,t.Http=c,t.collection=function(t,n){return void 0===n&&(n={}),new p(t,n)},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=frontoose-browser.umd.min.js.map |
@@ -87,4 +87,4 @@ import { Subject } from 'rxjs'; | ||
} | ||
run(name, payload) { | ||
return this.call$('run', payload, name); | ||
run(payload) { | ||
return this.call$('run', payload, this.options.collection); | ||
} | ||
@@ -240,2 +240,2 @@ call$(action, payload = {}, path = '') { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJvd3Nlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Zyb250b29zZS1icm93c2VyL3NyYy9icm93c2VyL2Jyb3dzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFrQixPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFL0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUczQyxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sUUFBUSxDQUFDO0FBQzlCLE9BQU8sRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sUUFBUSxDQUFDO0FBQ3ZDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUl4QyxNQUFNLE9BQU8sT0FBTztJQU9oQixZQUFZLFVBQWtCLEVBQUUsT0FBdUI7UUFOaEQsVUFBSyxHQUFpQixFQUFFLENBQUM7UUFJdEIsU0FBSSxHQUFpQixJQUFJLE9BQU8sRUFBRSxDQUFDO1FBR3pDLElBQUksQ0FBQyxJQUFJLENBQUMsVUFBVSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ25DLENBQUM7SUFFUyxJQUFJLENBQUMsVUFBa0IsRUFBRSxjQUE4QjtRQUM3RCxFQUFFO1FBQ0YsY0FBYztRQUNkLElBQUksQ0FBQyxPQUFPLCtDQUNSLFVBQVUsSUFDUCxXQUFXLENBQUMsT0FBTyxHQUNuQixjQUFjLEtBQ2pCLFVBQVUs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xuXG4gICAgcHJvdGVjdGVkIGluaXQoY29sbGVjdGlvbjogc3RyaW5nLCBydW50aW1lT3B0aW9uczogQnJvd3Nlck9wdGlvbnMpIHtcbiAgICAgICAgLy9cbiAgICAgICAgLy8gU2V0IG9wdGlvbnNcbiAgICAgICAgdGhpcy5vcHRpb25zID0ge1xuICAgICAgICAgICAgY29sbGVjdGlvbixcbiAgICAgICAgICAgIC4uLkJyb3dzZXJDb3JlLm9wdGlvbnMsXG4gICAgICAgICAgICAuLi5ydW50aW1lT3B0aW9ucyxcbiAgICAgICAgICAgIGh0dHBDb25maWc6IHtcbiAgICAgICAgICAgICAgICAuLi5Ccm93c2VyQ29yZS5vcHRpb25zLmh0dHBDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ucnVudGltZU9wdGlvbnMuaHR0cENvbmZpZyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH07XG5cbiAgICAgICAgLy9cbiAgICAgICAgLy8gaW5pdCBsb2dnZXJcbiAgICAgICAgdGhpcy5sb2dnZXIgPSBuZXcgTG9nZ2VyKHtcbiAgICAgICAgICAgIHN1YmplY3Q6IHRoaXMuJGxvZyxcbiAgICAgICAgICAgIHNpbGVudDogdGhpcy5vcHRpb25zLnNpbGVudCxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy9cbiAgICAgICAgLy8gU3RhcnQgaHR0cFxuICAgICAgICB0aGlzLmluaXRIdHRwKCk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGxvZygpOiBMb2dnZXIge1xuICAgICAgICByZXR1cm4gdGhpcy5sb2dnZXI7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGluaXRIdHRwKCkge1xuICAgICAgICAvL1xuICAgICAgICAvLyBOZXcgaHR0cCBpbnN0YW5jZVxuICAgICAgICBCcm93c2VyQ29yZS5odHRwID0gbmV3IEh0dHAodGhpcy5vcHRpb25zKTtcbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgY3JlYXRlS2V5KGFjdGl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0aGlzLmNoZWNrQ2hhaW5BdmFpbGFiaWxpdHkoJ3NlbGVjdCcpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBQb3B1bGF0ZVxuICAgICAqXG4gICAgICogQHBhcmFtIHtzdHJpbmdbXSB8IG9iamVjdH0gdmFsdWVcbiAgICAgKiBAcmV0dXJucyB7QnJvd3Nlcn1cbiAgICAgKiBAbWVtYmVyb2YgQnJvd3NlclxuICAgICAqL1xuICAgIHB1YmxpYyBwb3B1bGF0ZSh2YWx1ZTogc3RyaW5nW10gfCBQb3B1bGF0ZU9wdGlvbnMgfCBBcnJheTxQb3B1bGF0ZU9wdGlvbnM+KTogQnJvd3NlciB7XG4gICAgICAgIGlmICghaXNBcnJheSh0aGlzLmNoYWluLnBvcHVsYXRlKSkge1xuICAgICAgICAgICAgdGhpcy5jaGFpbi5wb3B1bGF0ZSA9IFtdO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY2hhaW4ucG9wdWxhdGUucHVzaCh2YWx1ZSk7XG4gICAgICAgIHRoaXMuY2hlY2tDaGFpbkF2YWlsYWJpbGl0eSgncG9wdWxhdGUnKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxufVxuIl19 |
@@ -404,4 +404,4 @@ import { Injectable, Inject, NgModule } from '@angular/core'; | ||
} | ||
run(name, payload) { | ||
return this.call$('run', payload, name); | ||
run(payload) { | ||
return this.call$('run', payload, this.options.collection); | ||
} | ||
@@ -408,0 +408,0 @@ call$(action, payload = {}, path = '') { |
{ | ||
"name": "@frontoose/browser", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^11.2.8", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
251137