Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dappworks/urpc

Package Overview
Dependencies
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dappworks/urpc - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

2

dist/index.d.ts

@@ -45,3 +45,3 @@ // Generated by dts-bundle-generator v9.5.1

get: T;
actions?: () => ActionType<Item<ReturnType<T>>>;
actions?: ActionType<Item<ReturnType<T>>>;
patch?: {

@@ -48,0 +48,0 @@ allowCreate?: Boolean;

@@ -9,2 +9,2 @@ var xZ=Object.create;var{defineProperty:gU,getPrototypeOf:gZ,getOwnPropertyNames:mZ}=Object;var jZ=Object.prototype.hasOwnProperty;var mU=(U,$,Z)=>{Z=U!=null?xZ(gZ(U)):{};const Q=$||!U||!U.__esModule?gU(Z,"default",{value:U,enumerable:!0}):Z;for(let R of mZ(U))if(!jZ.call(Q,R))gU(Q,R,{get:()=>U[R],enumerable:!0});return Q};var jU=(U,$)=>()=>($||U(($={exports:{}}).exports,$),$.exports);var dU=(U,$)=>{for(var Z in $)gU(U,Z,{get:$[Z],enumerable:!0,configurable:!0,set:(Q)=>$[Z]=()=>Q})};var T$=jU((p6,P$)=>{var tZ=function(U,$){return U==null?void 0:U[$]},aZ=function(U){var $=!1;if(U!=null&&typeof U.toString!="function")try{$=!!(U+"")}catch(Z){}return $},f=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},RQ=function(){this.__data__=r?r(null):{}},XQ=function(U){return this.has(U)&&delete this.__data__[U]},YQ=function(U){var $=this.__data__;if(r){var Z=$[U];return Z===_$?void 0:Z}return RU.call($,U)?$[U]:void 0},BQ=function(U){var $=this.__data__;return r?$[U]!==void 0:RU.call($,U)},WQ=function(U,$){var Z=this.__data__;return Z[U]=r&&$===void 0?_$:$,this},p=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},JQ=function(){this.__data__=[]},GQ=function(U){var $=this.__data__,Z=XU($,U);if(Z<0)return!1;var Q=$.length-1;if(Z==Q)$.pop();else ZQ.call($,Z,1);return!0},KQ=function(U){var $=this.__data__,Z=XU($,U);return Z<0?void 0:$[Z][1]},wQ=function(U){return XU(this.__data__,U)>-1},qQ=function(U,$){var Z=this.__data__,Q=XU(Z,U);if(Q<0)Z.push([U,$]);else Z[Q][1]=$;return this},x=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},NQ=function(){this.__data__={hash:new f,map:new(QQ||p),string:new f}},FQ=function(U){return YU(this,U).delete(U)},zQ=function(U){return YU(this,U).get(U)},LQ=function(U){return YU(this,U).has(U)},HQ=function(U,$){return YU(this,U).set(U,$),this},_Q=function(U,$,Z){var Q=U[$];if(!(RU.call(U,$)&&A$(Q,Z))||Z===void 0&&!($ in U))U[$]=Z},XU=function(U,$){var Z=U.length;while(Z--)if(A$(U[Z][0],$))return Z;return-1},SQ=function(U){if(!QU(U)||PQ(U))return!1;var $=fQ(U)||aZ(U)?$Q:sZ;return $.test(VQ(U))},DQ=function(U,$,Z,Q){if(!QU(U))return U;$=AQ($,U)?[$]:EQ($);var R=-1,X=$.length,Y=X-1,B=U;while(B!=null&&++R<X){var W=CQ($[R]),G=Z;if(R!=Y){var J=B[W];if(G=Q?Q(J,W,B):void 0,G===void 0)G=QU(J)?J:IQ($[R+1])?[]:{}}_Q(B,W,G),B=B[W]}return U},MQ=function(U){if(typeof U=="string")return U;if(yU(U))return H$?H$.call(U):"";var $=U+"";return $=="0"&&1/U==-S$?"-0":$},EQ=function(U){return O$(U)?U:TQ(U)},YU=function(U,$){var Z=U.__data__;return OQ($)?Z[typeof $=="string"?"string":"hash"]:Z.map},I$=function(U,$){var Z=tZ(U,$);return SQ(Z)?Z:void 0},IQ=function(U,$){return $=$==null?kZ:$,!!$&&(typeof U=="number"||lZ.test(U))&&(U>-1&&U%1==0&&U<$)},AQ=function(U,$){if(O$(U))return!1;var Z=typeof U;if(Z=="number"||Z=="symbol"||Z=="boolean"||U==null||yU(U))return!0;return bZ.test(U)||!hZ.test(U)||$!=null&&U in Object($)},OQ=function(U){var $=typeof U;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?U!=="__proto__":U===null},PQ=function(U){return!!F$&&F$ in U},CQ=function(U){if(typeof U=="string"||yU(U))return U;var $=U+"";return $=="0"&&1/U==-S$?"-0":$},VQ=function(U){if(U!=null){try{return M$.call(U)}catch($){}try{return U+""}catch($){}}return""},vU=function(U,$){if(typeof U!="function"||$&&typeof $!="function")throw new TypeError(dZ);var Z=function(){var Q=arguments,R=$?$.apply(this,Q):Q[0],X=Z.cache;if(X.has(R))return X.get(R);var Y=U.apply(this,Q);return Z.cache=X.set(R,Y),Y};return Z.cache=new(vU.Cache||x),Z},A$=function(U,$){return U===$||U!==U&&$!==$},fQ=function(U){var $=QU(U)?E$.call(U):"";return $==pZ||$==vZ},QU=function(U){var $=typeof U;return!!U&&($=="object"||$=="function")},xQ=function(U){return!!U&&typeof U=="object"},yU=function(U){return typeof U=="symbol"||xQ(U)&&E$.call(U)==yZ},gQ=function(U){return U==null?"":MQ(U)},mQ=function(U,$,Z){return U==null?U:DQ(U,$,Z)},dZ="Expected a function",_$="__lodash_hash_undefined__",S$=Infinity,kZ=9007199254740991,pZ="[object Function]",vZ="[object GeneratorFunction]",yZ="[object Symbol]",hZ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bZ=/^\w*$/,nZ=/^\./,iZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cZ=/[\\^$.*+?()[\]{}|]/g,uZ=/\\(\\)?/g,sZ=/^\[object .+?Constructor\]$/,lZ=/^(?:0|[1-9]\d*)$/,rZ=typeof global=="object"&&global&&global.Object===Object&&global,oZ=typeof self=="object"&&self&&self.Object===Object&&self,pU=rZ||oZ||Function("return this")(),eZ=Array.prototype,UQ=Function.prototype,D$=Object.prototype,kU=pU["__core-js_shared__"],F$=function(){var U=/[^.]+$/.exec(kU&&kU.keys&&kU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),M$=UQ.toString,RU=D$.hasOwnProperty,E$=D$.toString,$Q=RegExp("^"+M$.call(RU).replace(cZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z$=pU.Symbol,ZQ=eZ.splice,QQ=I$(pU,"Map"),r=I$(Object,"create"),L$=z$?z$.prototype:void 0,H$=L$?L$.toString:void 0;f.prototype.clear=RQ;f.prototype.delete=XQ;f.prototype.get=YQ;f.prototype.has=BQ;f.prototype.set=WQ;p.prototype.clear=JQ;p.prototype.delete=GQ;p.prototype.get=KQ;p.prototype.has=wQ;p.prototype.set=qQ;x.prototype.clear=NQ;x.prototype.delete=FQ;x.prototype.get=zQ;x.prototype.has=LQ;x.prototype.set=HQ;var TQ=vU(function(U){U=gQ(U);var $=[];if(nZ.test(U))$.push("");return U.replace(iZ,function(Z,Q,R,X){$.push(R?X.replace(uZ,"$1"):Q||Z)}),$});vU.Cache=x;var O$=Array.isArray;P$.exports=mQ});var JZ=jU((GU,y)=>{var YR=function(U,$,Z,Q){var R=-1,X=U?U.length:0;while(++R<X){var Y=U[R];$(Q,Y,Z(Y),U)}return Q},BR=function(U,$){var Z=-1,Q=U?U.length:0;while(++Z<Q)if($(U[Z],Z,U))return!0;return!1},WR=function(U){return function($){return $==null?void 0:$[U]}},JR=function(U,$){var Z=-1,Q=Array(U);while(++Z<U)Q[Z]=$(Z);return Q},GR=function(U){return function($){return U($)}},KR=function(U,$){return U==null?void 0:U[$]},sU=function(U){var $=!1;if(U!=null&&typeof U.toString!="function")try{$=!!(U+"")}catch(Z){}return $},wR=function(U){var $=-1,Z=Array(U.size);return U.forEach(function(Q,R){Z[++$]=[R,Q]}),Z},qR=function(U,$){return function(Z){return U($(Z))}},NR=function(U){var $=-1,Z=Array(U.size);return U.forEach(function(Q){Z[++$]=Q}),Z},g=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},OR=function(){this.__data__=t?t(null):{}},PR=function(U){return this.has(U)&&delete this.__data__[U]},TR=function(U){var $=this.__data__;if(t){var Z=$[U];return Z===aU?void 0:Z}return M.call($,U)?$[U]:void 0},CR=function(U){var $=this.__data__;return t?$[U]!==void 0:M.call($,U)},VR=function(U,$){var Z=this.__data__;return Z[U]=t&&$===void 0?aU:$,this},E=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},fR=function(){this.__data__=[]},xR=function(U){var $=this.__data__,Z=SU($,U);if(Z<0)return!1;var Q=$.length-1;if(Z==Q)$.pop();else _R.call($,Z,1);return!0},gR=function(U){var $=this.__data__,Z=SU($,U);return Z<0?void 0:$[Z][1]},mR=function(U){return SU(this.__data__,U)>-1},jR=function(U,$){var Z=this.__data__,Q=SU(Z,U);if(Q<0)Z.push([U,$]);else Z[Q][1]=$;return this},I=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},dR=function(){this.__data__={hash:new g,map:new(o||E),string:new g}},kR=function(U){return DU(this,U).delete(U)},pR=function(U){return DU(this,U).get(U)},vR=function(U){return DU(this,U).has(U)},yR=function(U,$){return DU(this,U).set(U,$),this},zU=function(U){var $=-1,Z=U?U.length:0;this.__data__=new I;while(++$<Z)this.add(U[$])},hR=function(U){return this.__data__.set(U,aU),this},bR=function(U){return this.__data__.has(U)},D=function(U){this.__data__=new E(U)},nR=function(){this.__data__=new E},iR=function(U){return this.__data__.delete(U)},cR=function(U){return this.__data__.get(U)},uR=function(U){return this.__data__.has(U)},sR=function(U,$){var Z=this.__data__;if(Z instanceof E){var Q=Z.__data__;if(!o||Q.length<pQ-1)return Q.push([U,$]),this;Z=this.__data__=new I(Q)}return Z.set(U,$),this},lR=function(U,$){var Z=P(U)||BZ(U)?JR(U.length,String):[],Q=Z.length,R=!!Q;for(var X in U)if(($||M.call(U,X))&&!(R&&(X=="length"||QZ(X,Q))))Z.push(X);return Z},SU=function(U,$){var Z=U.length;while(Z--)if(YZ(U[Z][0],$))return Z;return-1},rR=function(U,$,Z,Q){return oR(U,function(R,X,Y){$(Q,R,Z(R),Y)}),Q},aR=function(U,$){return U&&tR(U,$,LU)},UZ=function(U,$){$=MU($,U)?[$]:$Z($);var Z=0,Q=$.length;while(U!=null&&Z<Q)U=U[EU($[Z++])];return Z&&Z==Q?U:void 0},eR=function(U){return b.call(U)},U1=function(U,$){return U!=null&&$ in Object(U)},eU=function(U,$,Z,Q,R){if(U===$)return!0;if(U==null||$==null||!IU(U)&&!AU($))return U!==U&&$!==$;return $1(U,$,eU,Z,Q,R)},$1=function(U,$,Z,Q,R,X){var Y=P(U),B=P($),W=cU,G=cU;if(!Y)W=O(U),W=W==KU?v:W;if(!B)G=O($),G=G==KU?v:G;var J=W==v&&!sU(U),q=G==v&&!sU($),K=W==G;if(K&&!J)return X||(X=new D),Y||I1(U)?ZZ(U,$,Z,Q,R,X):N1(U,$,W,Z,Q,R,X);if(!(R&h)){var w=J&&M.call(U,"__wrapped__"),H=q&&M.call($,"__wrapped__");if(w||H){var A=w?U.value():U,S=H?$.value():$;return X||(X=new D),Z(A,S,Q,R,X)}}if(!K)return!1;return X||(X=new D),F1(U,$,Z,Q,R,X)},Z1=function(U,$,Z,Q){var R=Z.length,X=R,Y=!Q;if(U==null)return!X;U=Object(U);while(R--){var B=Z[R];if(Y&&B[2]?B[1]!==U[B[0]]:!(B[0]in U))return!1}while(++R<X){B=Z[R];var W=B[0],G=U[W],J=B[1];if(Y&&B[2]){if(G===void 0&&!(W in U))return!1}else{var q=new D;if(Q)var K=Q(G,J,W,U,$,q);if(!(K===void 0?eU(J,G,Q,HU|h,q):K))return!1}}return!0},Q1=function(U){if(!IU(U)||_1(U))return!1;var $=WZ(U)||sU(U)?LR:ZR;return $.test(m(U))},R1=function(U){return AU(U)&&Z$(U.length)&&!!N[b.call(U)]},X1=function(U){if(typeof U=="function")return U;if(U==null)return T1;if(typeof U=="object")return P(U)?W1(U[0],U[1]):B1(U);return C1(U)},Y1=function(U){if(!S1(U))return SR(U);var $=[];for(var Z in Object(U))if(M.call(U,Z)&&Z!="constructor")$.push(Z);return $},B1=function(U){var $=z1(U);if($.length==1&&$[0][2])return XZ($[0][0],$[0][1]);return function(Z){return Z===U||Z1(Z,U,$)}},W1=function(U,$){if(MU(U)&&RZ($))return XZ(EU(U),$);return function(Z){var Q=O1(Z,U);return Q===void 0&&Q===$?P1(Z,U):eU($,Q,void 0,HU|h)}},J1=function(U){return function($){return UZ($,U)}},G1=function(U){if(typeof U=="string")return U;if(Q$(U))return v$?v$.call(U):"";var $=U+"";return $=="0"&&1/U==-y$?"-0":$},$Z=function(U){return P(U)?U:D1(U)},K1=function(U,$){return function(Z,Q){var R=P(Z)?YR:rR,X=$?$():{};return R(Z,U,X1(Q,2),X)}},w1=function(U,$){return function(Z,Q){if(Z==null)return Z;if(!$$(Z))return U(Z,Q);var R=Z.length,X=$?R:-1,Y=Object(Z);while($?X--:++X<R)if(Q(Y[X],X,Y)===!1)break;return Z}},q1=function(U){return function($,Z,Q){var R=-1,X=Object($),Y=Q($),B=Y.length;while(B--){var W=Y[U?B:++R];if(Z(X[W],W,X)===!1)break}return $}},ZZ=function(U,$,Z,Q,R,X){var Y=R&h,B=U.length,W=$.length;if(B!=W&&!(Y&&W>B))return!1;var G=X.get(U);if(G&&X.get($))return G==$;var J=-1,q=!0,K=R&HU?new zU:void 0;X.set(U,$),X.set($,U);while(++J<B){var w=U[J],H=$[J];if(Q)var A=Y?Q(H,w,J,$,U,X):Q(w,H,J,U,$,X);if(A!==void 0){if(A)continue;q=!1;break}if(K){if(!BR($,function(S,V){if(!K.has(V)&&(w===S||Z(w,S,Q,R,X)))return K.add(V)})){q=!1;break}}else if(!(w===H||Z(w,H,Q,R,X))){q=!1;break}}return X.delete(U),X.delete($),q},N1=function(U,$,Z,Q,R,X,Y){switch(Z){case NU:if(U.byteLength!=$.byteLength||U.byteOffset!=$.byteOffset)return!1;U=U.buffer,$=$.buffer;case o$:if(U.byteLength!=$.byteLength||!Q(new p$(U),new p$($)))return!1;return!0;case b$:case n$:case u$:return YZ(+U,+$);case i$:return U.name==$.name&&U.message==$.message;case s$:case l$:return U==$+"";case wU:var B=wR;case qU:var W=X&h;if(B||(B=NR),U.size!=$.size&&!W)return!1;var G=Y.get(U);if(G)return G==$;X|=HU,Y.set(U,$);var J=ZZ(B(U),B($),Q,R,X,Y);return Y.delete(U),J;case r$:if(iU)return iU.call(U)==iU.call($)}return!1},F1=function(U,$,Z,Q,R,X){var Y=R&h,B=LU(U),W=B.length,G=LU($),J=G.length;if(W!=J&&!Y)return!1;var q=W;while(q--){var K=B[q];if(!(Y?K in $:M.call($,K)))return!1}var w=X.get(U);if(w&&X.get($))return w==$;var H=!0;X.set(U,$),X.set($,U);var A=Y;while(++q<W){K=B[q];var S=U[K],V=$[K];if(Q)var N$=Y?Q(V,S,K,$,U,X):Q(S,V,K,U,$,X);if(!(N$===void 0?S===V||Z(S,V,Q,R,X):N$)){H=!1;break}A||(A=K=="constructor")}if(H&&!A){var $U=U.constructor,ZU=$.constructor;if($U!=ZU&&(("constructor"in U)&&("constructor"in $))&&!(typeof $U=="function"&&$U instanceof $U&&typeof ZU=="function"&&ZU instanceof ZU))H=!1}return X.delete(U),X.delete($),H},DU=function(U,$){var Z=U.__data__;return H1($)?Z[typeof $=="string"?"string":"hash"]:Z.map},z1=function(U){var $=LU(U),Z=$.length;while(Z--){var Q=$[Z],R=U[Q];$[Z]=[Q,R,RZ(R)]}return $},n=function(U,$){var Z=KR(U,$);return Q1(Z)?Z:void 0},L1=function(U,$,Z){$=MU($,U)?[$]:$Z($);var Q,R=-1,Y=$.length;while(++R<Y){var X=EU($[R]);if(!(Q=U!=null&&Z(U,X)))break;U=U[X]}if(Q)return Q;var Y=U?U.length:0;return!!Y&&Z$(Y)&&QZ(X,Y)&&(P(U)||BZ(U))},QZ=function(U,$){return $=$==null?h$:$,!!$&&(typeof U=="number"||QR.test(U))&&(U>-1&&U%1==0&&U<$)},MU=function(U,$){if(P(U))return!1;var Z=typeof U;if(Z=="number"||Z=="symbol"||Z=="boolean"||U==null||Q$(U))return!0;return tQ.test(U)||!oQ.test(U)||$!=null&&U in Object($)},H1=function(U){var $=typeof U;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?U!=="__proto__":U===null},_1=function(U){return!!d$&&d$ in U},S1=function(U){var $=U&&U.constructor,Z=typeof $=="function"&&$.prototype||_U;return U===Z},RZ=function(U){return U===U&&!IU(U)},XZ=function(U,$){return function(Z){if(Z==null)return!1;return Z[U]===$&&($!==void 0||(U in Object(Z)))}},EU=function(U){if(typeof U=="string"||Q$(U))return U;var $=U+"";return $=="0"&&1/U==-y$?"-0":$},m=function(U){if(U!=null){try{return e$.call(U)}catch($){}try{return U+""}catch($){}}return""},U$=function(U,$){if(typeof U!="function"||$&&typeof $!="function")throw new TypeError(vQ);var Z=function(){var Q=arguments,R=$?$.apply(this,Q):Q[0],X=Z.cache;if(X.has(R))return X.get(R);var Y=U.apply(this,Q);return Z.cache=X.set(R,Y),Y};return Z.cache=new(U$.Cache||I),Z},YZ=function(U,$){return U===$||U!==U&&$!==$},BZ=function(U){return E1(U)&&M.call(U,"callee")&&(!HR.call(U,"callee")||b.call(U)==KU)},$$=function(U){return U!=null&&Z$(U.length)&&!WZ(U)},E1=function(U){return AU(U)&&$$(U)},WZ=function(U){var $=IU(U)?b.call(U):"";return $==c$||$==yQ},Z$=function(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=h$},IU=function(U){var $=typeof U;return!!U&&($=="object"||$=="function")},AU=function(U){return!!U&&typeof U=="object"},Q$=function(U){return typeof U=="symbol"||AU(U)&&b.call(U)==r$},A1=function(U){return U==null?"":G1(U)},O1=function(U,$,Z){var Q=U==null?void 0:UZ(U,$);return Q===void 0?Z:Q},P1=function(U,$){return U!=null&&L1(U,$,U1)},LU=function(U){return $$(U)?lR(U):Y1(U)},T1=function(U){return U},C1=function(U){return MU(U)?WR(EU(U)):J1(U)},pQ=200,vQ="Expected a function",aU="__lodash_hash_undefined__",HU=1,h=2,y$=Infinity,h$=9007199254740991,KU="[object Arguments]",cU="[object Array]",b$="[object Boolean]",n$="[object Date]",i$="[object Error]",c$="[object Function]",yQ="[object GeneratorFunction]",wU="[object Map]",u$="[object Number]",v="[object Object]",f$="[object Promise]",s$="[object RegExp]",qU="[object Set]",l$="[object String]",r$="[object Symbol]",uU="[object WeakMap]",o$="[object ArrayBuffer]",NU="[object DataView]",hQ="[object Float32Array]",bQ="[object Float64Array]",nQ="[object Int8Array]",iQ="[object Int16Array]",cQ="[object Int32Array]",uQ="[object Uint8Array]",sQ="[object Uint8ClampedArray]",lQ="[object Uint16Array]",rQ="[object Uint32Array]",oQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tQ=/^\w*$/,aQ=/^\./,eQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,UR=/[\\^$.*+?()[\]{}|]/g,$R=/\\(\\)?/g,ZR=/^\[object .+?Constructor\]$/,QR=/^(?:0|[1-9]\d*)$/,N={};N[hQ]=N[bQ]=N[nQ]=N[iQ]=N[cQ]=N[uQ]=N[sQ]=N[lQ]=N[rQ]=!0;N[KU]=N[cU]=N[o$]=N[b$]=N[NU]=N[n$]=N[i$]=N[c$]=N[wU]=N[u$]=N[v]=N[s$]=N[qU]=N[l$]=N[uU]=!1;var t$=typeof global=="object"&&global&&global.Object===Object&&global,RR=typeof self=="object"&&self&&self.Object===Object&&self,T=t$||RR||Function("return this")(),a$=typeof GU=="object"&&GU&&!GU.nodeType&&GU,x$=a$&&typeof y=="object"&&y&&!y.nodeType&&y,XR=x$&&x$.exports===a$,g$=XR&&t$.process,m$=function(){try{return g$&&g$.binding("util")}catch(U){}}(),j$=m$&&m$.isTypedArray,FR=Array.prototype,zR=Function.prototype,_U=Object.prototype,nU=T["__core-js_shared__"],d$=function(){var U=/[^.]+$/.exec(nU&&nU.keys&&nU.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),e$=zR.toString,M=_U.hasOwnProperty,b=_U.toString,LR=RegExp("^"+e$.call(M).replace(UR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k$=T.Symbol,p$=T.Uint8Array,HR=_U.propertyIsEnumerable,_R=FR.splice,SR=qR(Object.keys,Object),lU=n(T,"DataView"),o=n(T,"Map"),rU=n(T,"Promise"),oU=n(T,"Set"),tU=n(T,"WeakMap"),t=n(Object,"create"),DR=m(lU),MR=m(o),ER=m(rU),IR=m(oU),AR=m(tU),FU=k$?k$.prototype:void 0,iU=FU?FU.valueOf:void 0,v$=FU?FU.toString:void 0;g.prototype.clear=OR;g.prototype.delete=PR;g.prototype.get=TR;g.prototype.has=CR;g.prototype.set=VR;E.prototype.clear=fR;E.prototype.delete=xR;E.prototype.get=gR;E.prototype.has=mR;E.prototype.set=jR;I.prototype.clear=dR;I.prototype.delete=kR;I.prototype.get=pR;I.prototype.has=vR;I.prototype.set=yR;zU.prototype.add=zU.prototype.push=hR;zU.prototype.has=bR;D.prototype.clear=nR;D.prototype.delete=iR;D.prototype.get=cR;D.prototype.has=uR;D.prototype.set=sR;var oR=w1(aR),tR=q1(),O=eR;if(lU&&O(new lU(new ArrayBuffer(1)))!=NU||o&&O(new o)!=wU||rU&&O(rU.resolve())!=f$||oU&&O(new oU)!=qU||tU&&O(new tU)!=uU)O=function(U){var $=b.call(U),Z=$==v?U.constructor:void 0,Q=Z?m(Z):void 0;if(Q)switch(Q){case DR:return NU;case MR:return wU;case ER:return f$;case IR:return qU;case AR:return uU}return $};var D1=U$(function(U){U=A1(U);var $=[];if(aQ.test(U))$.push("");return U.replace(eQ,function(Z,Q,R,X){$.push(R?X.replace($R,"$1"):Q||Z)}),$}),M1=K1(function(U,$,Z){U[Z]=$});U$.Cache=I;var P=Array.isArray,I1=j$?GR(j$):R1;y.exports=M1});var VZ=jU((W8,CZ)=>{var U6=function(U,$){return U==null?void 0:U[$]},$6=function(U){var $=!1;if(U!=null&&typeof U.toString!="function")try{$=!!(U+"")}catch(Z){}return $},d=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},B6=function(){this.__data__=UU?UU(null):{}},W6=function(U){return this.has(U)&&delete this.__data__[U]},J6=function(U){var $=this.__data__;if(UU){var Z=$[U];return Z===DZ?void 0:Z}return K$.call($,U)?$[U]:void 0},G6=function(U){var $=this.__data__;return UU?$[U]!==void 0:K$.call($,U)},K6=function(U,$){var Z=this.__data__;return Z[U]=UU&&$===void 0?DZ:$,this},l=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},w6=function(){this.__data__=[]},q6=function(U){var $=this.__data__,Z=fU($,U);if(Z<0)return!1;var Q=$.length-1;if(Z==Q)$.pop();else X6.call($,Z,1);return!0},N6=function(U){var $=this.__data__,Z=fU($,U);return Z<0?void 0:$[Z][1]},F6=function(U){return fU(this.__data__,U)>-1},z6=function(U,$){var Z=this.__data__,Q=fU(Z,U);if(Q<0)Z.push([U,$]);else Z[Q][1]=$;return this},k=function(U){var $=-1,Z=U?U.length:0;this.clear();while(++$<Z){var Q=U[$];this.set(Q[0],Q[1])}},L6=function(){this.__data__={hash:new d,map:new(Y6||l),string:new d}},H6=function(U){return xU(this,U).delete(U)},_6=function(U){return xU(this,U).get(U)},S6=function(U){return xU(this,U).has(U)},D6=function(U,$){return xU(this,U).set(U,$),this},fU=function(U,$){var Z=U.length;while(Z--)if(x6(U[Z][0],$))return Z;return-1},M6=function(U,$){$=O6($,U)?[$]:A6($);var Z=0,Q=$.length;while(U!=null&&Z<Q)U=U[V6($[Z++])];return Z&&Z==Q?U:void 0},E6=function(U){if(!TZ(U)||T6(U))return!1;var $=g6(U)||$6(U)?R6:t1;return $.test(f6(U))},I6=function(U){if(typeof U=="string")return U;if(q$(U))return SZ?SZ.call(U):"";var $=U+"";return $=="0"&&1/U==-MZ?"-0":$},A6=function(U){return PZ(U)?U:C6(U)},xU=function(U,$){var Z=U.__data__;return P6($)?Z[typeof $=="string"?"string":"hash"]:Z.map},OZ=function(U,$){var Z=U6(U,$);return E6(Z)?Z:void 0},O6=function(U,$){if(PZ(U))return!1;var Z=typeof U;if(Z=="number"||Z=="symbol"||Z=="boolean"||U==null||q$(U))return!0;return u1.test(U)||!c1.test(U)||$!=null&&U in Object($)},P6=function(U){var $=typeof U;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?U!=="__proto__":U===null},T6=function(U){return!!LZ&&LZ in U},V6=function(U){if(typeof U=="string"||q$(U))return U;var $=U+"";return $=="0"&&1/U==-MZ?"-0":$},f6=function(U){if(U!=null){try{return IZ.call(U)}catch($){}try{return U+""}catch($){}}return""},w$=function(U,$){if(typeof U!="function"||$&&typeof $!="function")throw new TypeError(h1);var Z=function(){var Q=arguments,R=$?$.apply(this,Q):Q[0],X=Z.cache;if(X.has(R))return X.get(R);var Y=U.apply(this,Q);return Z.cache=X.set(R,Y),Y};return Z.cache=new(w$.Cache||k),Z},x6=function(U,$){return U===$||U!==U&&$!==$},g6=function(U){var $=TZ(U)?AZ.call(U):"";return $==b1||$==n1},TZ=function(U){var $=typeof U;return!!U&&($=="object"||$=="function")},m6=function(U){return!!U&&typeof U=="object"},q$=function(U){return typeof U=="symbol"||m6(U)&&AZ.call(U)==i1},j6=function(U){return U==null?"":I6(U)},d6=function(U,$,Z){var Q=U==null?void 0:M6(U,$);return Q===void 0?Z:Q},h1="Expected a function",DZ="__lodash_hash_undefined__",MZ=Infinity,b1="[object Function]",n1="[object GeneratorFunction]",i1="[object Symbol]",c1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u1=/^\w*$/,s1=/^\./,l1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r1=/[\\^$.*+?()[\]{}|]/g,o1=/\\(\\)?/g,t1=/^\[object .+?Constructor\]$/,a1=typeof global=="object"&&global&&global.Object===Object&&global,e1=typeof self=="object"&&self&&self.Object===Object&&self,G$=a1||e1||Function("return this")(),Z6=Array.prototype,Q6=Function.prototype,EZ=Object.prototype,J$=G$["__core-js_shared__"],LZ=function(){var U=/[^.]+$/.exec(J$&&J$.keys&&J$.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),IZ=Q6.toString,K$=EZ.hasOwnProperty,AZ=EZ.toString,R6=RegExp("^"+IZ.call(K$).replace(r1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),HZ=G$.Symbol,X6=Z6.splice,Y6=OZ(G$,"Map"),UU=OZ(Object,"create"),_Z=HZ?HZ.prototype:void 0,SZ=_Z?_Z.toString:void 0;d.prototype.clear=B6;d.prototype.delete=W6;d.prototype.get=J6;d.prototype.has=G6;d.prototype.set=K6;l.prototype.clear=w6;l.prototype.delete=q6;l.prototype.get=N6;l.prototype.has=F6;l.prototype.set=z6;k.prototype.clear=L6;k.prototype.delete=H6;k.prototype.get=_6;k.prototype.has=S6;k.prototype.set=D6;var C6=w$(function(U){U=j6(U);var $=[];if(s1.test(U))$.push("");return U.replace(l1,function(Z,Q,R,X){$.push(R?X.replace(o1,"$1"):Q||Z)}),$});w$.Cache=k;var PZ=Array.isArray;CZ.exports=d6});var C$=mU(T$(),1),BU={isNamespace:(U)=>U&&!U.type,flattenSchema(U,$){return Object.entries(U).reduce((Z,[Q,R])=>{const X=$?`${$}.${Q}`:Q;if(BU.isNamespace(R))Z={...Z,...BU.flattenSchema(R,X)};else Object.assign(R,{name:X}),Z[X]=R;return Z},{})},wrapSchema(U){return Object.values(U).reduce(($,Z)=>{return C$.default($,Z.path,Z),$},{})}};var WU,jQ=new Uint8Array(16);function hU(){if(!WU){if(WU=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!WU)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return WU(jQ)}function V$(U,$=0){return L[U[$+0]]+L[U[$+1]]+L[U[$+2]]+L[U[$+3]]+"-"+L[U[$+4]]+L[U[$+5]]+"-"+L[U[$+6]]+L[U[$+7]]+"-"+L[U[$+8]]+L[U[$+9]]+"-"+L[U[$+10]]+L[U[$+11]]+L[U[$+12]]+L[U[$+13]]+L[U[$+14]]+L[U[$+15]]}var L=[];for(let U=0;U<256;++U)L.push((U+256).toString(16).slice(1));var dQ=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bU={randomUUID:dQ};var kQ=function(U,$,Z){if(bU.randomUUID&&!$&&!U)return bU.randomUUID();U=U||{};const Q=U.random||(U.rng||hU)();if(Q[6]=Q[6]&15|64,Q[8]=Q[8]&63|128,$){Z=Z||0;for(let R=0;R<16;++R)$[Z+R]=Q[R];return $}return V$(Q)},JU=kQ;var zZ=mU(JZ(),1);var FZ={};dU(FZ,{validator:()=>{{return e}},validate:()=>{{return R$}},unobserve:()=>{{return wZ}},unescapePathComponent:()=>{{return i}},observe:()=>{{return qZ}},getValueByPointer:()=>{{return a}},generate:()=>{{return VU}},escapePathComponent:()=>{{return _}},default:()=>{{return v1}},deepClone:()=>{{return z}},compare:()=>{{return NZ}},applyReducer:()=>{{return KZ}},applyPatch:()=>{{return j}},applyOperation:()=>{{return C}},_areEquals:()=>{{return s}},JsonPatchError:()=>{{return c}}});var X$={};dU(X$,{validator:()=>{{return e}},validate:()=>{{return R$}},getValueByPointer:()=>{{return a}},deepClone:()=>{{return x1}},applyReducer:()=>{{return KZ}},applyPatch:()=>{{return j}},applyOperation:()=>{{return C}},_areEquals:()=>{{return s}},JsonPatchError:()=>{{return F}}});function PU(U,$){return f1.call(U,$)}function TU(U){if(Array.isArray(U)){var $=new Array(U.length);for(var Z=0;Z<$.length;Z++)$[Z]=""+Z;return $}if(Object.keys)return Object.keys(U);var Q=[];for(var R in U)if(PU(U,R))Q.push(R);return Q}function z(U){switch(typeof U){case"object":return JSON.parse(JSON.stringify(U));case"undefined":return null;default:return U}}function CU(U){var $=0,Z=U.length,Q;while($<Z){if(Q=U.charCodeAt($),Q>=48&&Q<=57){$++;continue}return!1}return!0}function _(U){if(U.indexOf("/")===-1&&U.indexOf("~")===-1)return U;return U.replace(/~/g,"~0").replace(/\//g,"~1")}function i(U){return U.replace(/~1/g,"/").replace(/~0/g,"~")}function OU(U){if(U===void 0)return!0;if(U){if(Array.isArray(U)){for(var $=0,Z=U.length;$<Z;$++)if(OU(U[$]))return!0}else if(typeof U==="object"){var Q=TU(U),R=Q.length;for(var X=0;X<R;X++)if(OU(U[Q[X]]))return!0}}return!1}var GZ=function(U,$){var Z=[U];for(var Q in $){var R=typeof $[Q]==="object"?JSON.stringify($[Q],null,2):$[Q];if(typeof R!=="undefined")Z.push(Q+": "+R)}return Z.join("\n")};/*!

* MIT license
*/var Y$=new WeakMap,m1=function(){function U($){this.observers=new Map,this.obj=$}return U}(),j1=function(){function U($,Z){this.callback=$,this.observer=Z}return U}();var v1=Object.assign({},X$,W$,{JsonPatchError:c,deepClone:z,escapePathComponent:_,unescapePathComponent:i});class y1{schemas;falttenSchema;uidSchemas;static Var(U){return U.patch=Object.assign({},{allowCreate:!0,allowDelete:!0,allowUpdate:!0,onPatch:($)=>{return j(U.get(),$)}},U.patch||{}),{...U,type:"var",uid:JU()}}static Func(U){return{...U,type:"func",uid:JU()}}constructor(U={}){Object.assign(this,U),this.falttenSchema=BU.flattenSchema(this.schemas),this.uidSchemas=zZ.default(Object.values(this.falttenSchema),"uid")}loadFull(){return Object.entries(this.falttenSchema).map(([U,$])=>{if($.type=="func"){const{uid:Z,type:Q,input:R,name:X,uiConfig:Y}=$;return{uid:Z,type:Q,name:X,input:R,uiConfig:Y?Y():null}}if($.type=="var"){const{uid:Z,type:Q,get:R,set:X,name:Y,patch:B}=$,W=$.uiConfig?$.uiConfig():null,G=R(),J=$.actions?Object.keys($.actions()):null;return{uid:Z,type:Q,name:Y,value:G,uiConfig:W,actions:J,set:!!X,patch:B}}return{type:"unknown",name:U}})}loadVars(){return Object.entries(this.falttenSchema).filter(([U,$])=>$.type=="var").map(([U,$])=>{const{get:Z,name:Q}=$;return{name:Q,value:Z()}})}}var fZ=mU(VZ(),1),J8=(U)=>{return{schema:{async loadFull(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull"})}).then(($)=>$.json())},async loadVars(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars"})}).then(($)=>$.json())}},func:{async call($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:$})}).then((Z)=>Z.json())}},var:{async set($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:$})}).then((Z)=>Z.json())},async patch($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.patch",params:$})}).then((Z)=>Z.json())},async action($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.action",params:$})}).then((Z)=>Z.json())}}}},G8=({urpc:U})=>{const $={urpc:U,handle({name:Z,params:Q}){const R=fZ.default($,Z);if(!R)throw new Error("invalid name");return R(Q)},schema:{async loadFull(){return U.loadFull()},async loadVars(){return U.loadVars()}},func:{async call(Z){const Q=U.uidSchemas[Z.method]||U.falttenSchema[Z.method];if(!Q)throw new Error("invalid func name");return Q.func({input:Z.input})}},var:{async set(Z){const Q=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!Q)throw new Error("invalid var name");if(!Q.set)throw new Error("variable can't be set");return Q.set(Z.value)},async patch(Z){const Q=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!Q)throw new Error("invalid var name");if(!Q.patch)throw new Error("variable can't be set");return(Q.patch?.onPatch(Z.ops)).newDocument},async action(Z){const Q=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!Q)throw new Error("invalid var name");const R=Q.actions[Z.action];if(!R)throw new Error("invalid action name");return R(Q.get())}}};return $};export{BU as utils,FZ as jsonPatch,J8 as createSimpleHttpClient,G8 as createServerClient,y1 as URPC};
*/var Y$=new WeakMap,m1=function(){function U($){this.observers=new Map,this.obj=$}return U}(),j1=function(){function U($,Z){this.callback=$,this.observer=Z}return U}();var v1=Object.assign({},X$,W$,{JsonPatchError:c,deepClone:z,escapePathComponent:_,unescapePathComponent:i});class y1{schemas;falttenSchema;uidSchemas;static Var(U){return U.patch=Object.assign({},{allowCreate:!0,allowDelete:!0,allowUpdate:!0,onPatch:($)=>{return j(U.get(),$)}},U.patch||{}),{...U,type:"var",uid:JU()}}static Func(U){return{...U,type:"func",uid:JU()}}constructor(U={}){Object.assign(this,U),this.falttenSchema=BU.flattenSchema(this.schemas),this.uidSchemas=zZ.default(Object.values(this.falttenSchema),"uid")}loadFull(){return Object.entries(this.falttenSchema).map(([U,$])=>{if($.type=="func"){const{uid:Z,type:Q,input:R,name:X,uiConfig:Y}=$;return{uid:Z,type:Q,name:X,input:R,uiConfig:Y?Y():null}}if($.type=="var"){const{uid:Z,type:Q,get:R,set:X,name:Y,patch:B}=$,W=$.uiConfig?$.uiConfig():null,G=R(),J=$.actions?Object.keys($.actions):null;return{uid:Z,type:Q,name:Y,value:G,uiConfig:W,actions:J,set:!!X,patch:B}}return{type:"unknown",name:U}})}loadVars(){return Object.entries(this.falttenSchema).filter(([U,$])=>$.type=="var").map(([U,$])=>{const{get:Z,name:Q}=$;return{name:Q,value:Z()}})}}var fZ=mU(VZ(),1),J8=(U)=>{return{schema:{async loadFull(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull"})}).then(($)=>$.json())},async loadVars(){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars"})}).then(($)=>$.json())}},func:{async call($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:$})}).then((Z)=>Z.json())}},var:{async set($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:$})}).then((Z)=>Z.json())},async patch($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.patch",params:$})}).then((Z)=>Z.json())},async action($){return fetch(`${U.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.action",params:$})}).then((Z)=>Z.json())}}}},G8=({urpc:U})=>{const $={urpc:U,handle({name:Z,params:Q}){const R=fZ.default($,Z);if(!R)throw new Error("invalid name");return R(Q)},schema:{async loadFull(){return U.loadFull()},async loadVars(){return U.loadVars()}},func:{async call(Z){const Q=U.uidSchemas[Z.method]||U.falttenSchema[Z.method];if(!Q)throw new Error("invalid func name");return Q.func({input:Z.input})}},var:{async set(Z){const Q=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!Q)throw new Error("invalid var name");if(!Q.set)throw new Error("variable can't be set");return Q.set(Z.value)},async patch(Z){const Q=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!Q)throw new Error("invalid var name");if(!Q.patch)throw new Error("variable can't be set");return(Q.patch?.onPatch(Z.ops)).newDocument},async action(Z){const Q=U.uidSchemas[Z.name]||U.falttenSchema[Z.name];if(!Q)throw new Error("invalid var name");const R=Q.actions[Z.action];if(!R)throw new Error("invalid action name");return R(Q.get())}}};return $};export{BU as utils,FZ as jsonPatch,J8 as createSimpleHttpClient,G8 as createServerClient,y1 as URPC};
{
"name": "@dappworks/urpc",
"version": "0.0.20",
"version": "0.0.21",
"module": "index.ts",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc