From 0a688d3d9fb39e32802aed0c7d0c7b494061b277 Mon Sep 17 00:00:00 2001 From: what Date: Sat, 25 May 2024 22:47:20 +0800 Subject: [PATCH] v0.9.9 --- dist/ff-request.js | 6 +++--- dist/ff-request.umd.cjs | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/ff-request.js b/dist/ff-request.js index ed47c44..d002a62 100644 --- a/dist/ff-request.js +++ b/dist/ff-request.js @@ -417,7 +417,7 @@ class Z { A(this, "request", ({ url: e = "/", method: r = "GET", ...n }, u = !1) => { var x; const v = r.toUpperCase(), c = de(JSON.stringify([e, v, n])), U = (x = e == null ? void 0 : e.includes) != null && x.call(e, "/_/") ? "#" : "$", { promise: B, resolve: D, reject: q } = Promise.withResolvers(); - return h(this, m)[U].has(c) ? (console.log("缓存命中", e), D(h(this, m)[U].get(c))) : h(this, $).has(c) ? h(this, $).get(c).push([D, q]) : h(this, $).set(c, [[D, q]]), h(this, $).get(c).length === 1 && h(this, F).call(this, { url: e, method: v, ...n }).then((p) => { + return h(this, m)[U].has(c) ? (console.log("缓存命中", e), D(h(this, m)[U].get(c))) : h(this, $).has(c) ? h(this, $).get(c).push([D, q]) : (h(this, $).set(c, [[D, q]]), h(this, F).call(this, { url: e, method: v, ...n }).then((p) => { if (![0, 1].includes(p.code)) throw W(p.code, p.msg, p.data, e, p == null ? void 0 : p.res); return [p.code, p.msg, p.data, e, p == null ? void 0 : p.res]; @@ -428,8 +428,8 @@ class Z { i && i[1](p instanceof X ? p : W(-1, p, null, e)), delete s[a]; }); }).finally(() => { - console.log(1111, h(this, $).get(c)); - }), new Proxy(B, { + console.log(1111, h(this, $).get(c)), h(this, $).delete(c); + })), new Proxy(B, { get: (p, i) => (...a) => p.then((s) => W(...s)[i](...a)).catch((s) => { if (!s instanceof X) throw s; diff --git a/dist/ff-request.umd.cjs b/dist/ff-request.umd.cjs index 32f3b25..6a22f49 100644 --- a/dist/ff-request.umd.cjs +++ b/dist/ff-request.umd.cjs @@ -1 +1 @@ -(function(p,w){typeof exports=="object"&&typeof module<"u"?w(exports):typeof define=="function"&&define.amd?define(["exports"],w):(p=typeof globalThis<"u"?globalThis:p||self,w(p["ff-request"]={}))})(this,function(p){"use strict";var ye=Object.defineProperty;var be=(p,w,A)=>w in p?ye(p,w,{enumerable:!0,configurable:!0,writable:!0,value:A}):p[w]=A;var _=(p,w,A)=>(be(p,typeof w!="symbol"?w+"":w,A),A),ue=(p,w,A)=>{if(!w.has(p))throw TypeError("Cannot "+A)};var h=(p,w,A)=>(ue(p,w,"read from private field"),A?A.call(p):w.get(p)),N=(p,w,A)=>{if(w.has(p))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(p):w.set(p,A)},D=(p,w,A,Y)=>(ue(p,w,"write to private field"),Y?Y.call(p,A):w.set(p,A),A);var G,B,J,q,Q,W,L,X,Z,H,K,k,I,$;function w(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function A(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,d=new Uint8Array(l);g!==f;){for(var P=a[g],T=0,b=l-1;(P!==0||T>>0,d[b]=P%c>>>0,P=P/c>>>0;if(P!==0)throw new Error("Non-zero carry");n=T,g++}for(var s=l-n;s!==l&&d[s]===0;)s++;for(var E=m.repeat(o);s>>0,l=new Uint8Array(f);a[o];){var d=e[a.charCodeAt(o)];if(d===255)return;for(var P=0,T=f-1;(d!==0||P>>0,l[T]=d%256>>>0,d=d/256>>>0;if(d!==0)throw new Error("Non-zero carry");g=P,o++}for(var b=f-g;b!==f&&l[b]===0;)b++;for(var s=new Uint8Array(n+(f-b)),E=n;b!==f;)s[E++]=l[b++];return s}function v(a){var o=M(a);if(o)return o;throw new Error("Non-base"+c+" character")}return{encode:F,decodeUnsafe:M,decode:v}}var Y=A;const ce=w(Y);var ne={};(function(t){(function(e){e([],function(){var r=-1,i=-2,u=-3,y=-4,c=-5,m=function(o,n){n=n||{};var g=n.verbose||!1;g&&console.log("Normalize the JSON Object"),o=typeof o=="string"?this.JSON.parse(o):o,g&&console.log("Creating a empty dictionary");var f={strings:[],integers:[],floats:[]};g&&console.log("Creating the AST");var l=function b(s){g&&console.log("Calling recursiveAstBuilder with "+this.JSON.stringify(s));var E=typeof s;if(s===null)return{type:"null",index:u};if(typeof s>"u")return{type:"undefined",index:c};if(s instanceof Array){var U=["@"];for(var S in s)s.hasOwnProperty(S)&&U.push(b(s[S]));return U}if(E==="object"){var U=["$"];for(var j in s)s.hasOwnProperty(j)&&(U.push(b(j)),U.push(b(s[j])));return U}if(s==="")return{type:"empty",index:y};if(E==="string"){var C=a.call(f.strings,s);return C==-1&&(f.strings.push(z(s)),C=f.strings.length-1),{type:"strings",index:C}}if(E==="number"&&s%1===0){var C=a.call(f.integers,s);return C==-1&&(f.integers.push(M(s)),C=f.integers.length-1),{type:"integers",index:C}}if(E==="number"){var C=a.call(f.floats,s);return C==-1&&(f.floats.push(s),C=f.floats.length-1),{type:"floats",index:C}}if(E==="boolean")return{type:"boolean",index:s?r:i};throw new Error("Unexpected argument of type "+typeof s)}(o),d=f.strings.length,P=f.integers.length;f.floats.length,g&&console.log("Parsing the dictionary");var T=f.strings.join("|");return T+="^"+f.integers.join("|"),T+="^"+f.floats.join("|"),g&&console.log("Parsing the structure"),T+="^"+function b(s){if(g&&console.log("Calling a recursiveParser with "+this.JSON.stringify(s)),s instanceof Array){var E=s.shift();for(var U in s)s.hasOwnProperty(U)&&(E+=b(s[U])+"|");return(E[E.length-1]==="|"?E.slice(0,-1):E)+"]"}var S=s.type,j=s.index;if(S==="strings")return M(j);if(S==="integers")return M(d+j);if(S==="floats")return M(d+P+j);if(S==="boolean")return s.index;if(S==="null")return u;if(S==="undefined")return c;if(S==="empty")return y;throw new TypeError("The item is alien!")}(l),g&&console.log("Ending parser"),n.debug?{dictionary:f,ast:l,packed:T}:T},V=function(o,n){n=n||{};var g=o.split("^");n.verbose&&console.log("Building dictionary");var f=[],l=g[0];if(l!==""){l=l.split("|"),n.verbose&&console.log("Parse the strings dictionary");for(var d=0,P=l.length;dh(this,Q).call(this,r),ownKeys:()=>Object.keys(h(this,q).getPrototypeOf()||{}),getPrototypeOf:()=>h(this,B)?this:this.data,getOwnPropertyDescriptor:()=>({configurable:!0,enumerable:!0,writable:!0,value:h(this,q).getPrototypeOf()})});N(this,Q,e=>e==="$toast"?h(this,L):e==="msg"?h(this,W):e==="then"||e==="resp"?(D(this,J,!0),D(this,B,e==="resp"),h(this,X)):e==="catch"?h(this,Z):e==="IS_ECHO_MSG"?h(this,J):Reflect.get(this,e));N(this,W,(e=i=>i,r=!1)=>(h(this,L).call(this),D(this,B,r),Promise.resolve(e==null?void 0:e(h(this,q).getPrototypeOf()))));N(this,L,()=>{h(this,J)&&(D(this,J,!1),le.onToast(this.code,this.message))});N(this,X,e=>[0,1].includes(this.code)?Promise.resolve(e==null?void 0:e(h(this,q).getPrototypeOf())):Promise.reject(h(this,G)));N(this,Z,e=>Promise.resolve(e(h(this,G))));return this.code=e,this.message=r,this.data=i,this.url=u,this.res=y,D(this,G,new Proxy(this,h(this,q)))}}G=new WeakMap,B=new WeakMap,J=new WeakMap,q=new WeakMap,Q=new WeakMap,W=new WeakMap,L=new WeakMap,X=new WeakMap,Z=new WeakMap;const te=(t,e,r,i="/",u="")=>new ee(t,e,r,i,u);var ie=["utf8","utf-8","unicode-1-1-utf-8"];function ge(t){if(ie.indexOf(t)<0&&typeof t<"u"&&t!=null)throw new RangeError("Invalid encoding type. Only utf-8 is supported");this.encoding="utf-8",this.encode=function(e){if(typeof e!="string")throw new TypeError("passed argument must be of tye string");var r=unescape(encodeURIComponent(e)),i=new Uint8Array(r.length);const u=r.split("");for(let y=0;y"u")return"";var i=typeof r<"u"&&i in r?r.stream:!1;if(typeof i!="boolean")throw new TypeError("stream option must be boolean");if(ArrayBuffer.isView(e)){var u=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),y=new Array(u.length);for(let c=0;c{let e=5381;for(let r=0;r>>0).toString(16)},we=(t,e)=>t.replace(new RegExp(`^${e}+|${e}+$`,"g"),""),fe=t=>pe.encode(t||""),he=t=>ve.decode(new DataView(t),{});class re{constructor(e,r,i=({})=>Promise.reject({code:-1,msg:"请初始化HTTP请求方法主体"})){N(this,H,void 0);N(this,K,void 0);N(this,k,void 0);N(this,I,{"#":new Map,$:new Map});N(this,$,new Map);_(this,"request",({url:e="/",method:r="GET",...i},u=!1)=>{var M;const y=r.toUpperCase(),c=ae(JSON.stringify([e,y,i])),m=(M=e==null?void 0:e.includes)!=null&&M.call(e,"/_/")?"#":"$",{promise:V,resolve:z,reject:F}=Promise.withResolvers();return h(this,I)[m].has(c)?(console.log("缓存命中",e),z(h(this,I)[m].get(c))):h(this,$).has(c)?h(this,$).get(c).push([z,F]):h(this,$).set(c,[[z,F]]),h(this,$).get(c).length===1&&h(this,H).call(this,{url:e,method:y,...i}).then(v=>{if(![0,1].includes(v.code))throw te(v.code,v.msg,v.data,e,v==null?void 0:v.res);return[v.code,v.msg,v.data,e,v==null?void 0:v.res]}).then(v=>((m=="#"||u&&y==="GET")&&h(this,I)[m].set(c,v),v)).then(v=>h(this,$).get(c).forEach((a,o,n)=>{a&&a[0](v),delete n[o]})).catch(v=>{h(this,I)[m].delete(c),h(this,$).get(c).forEach((a,o,n)=>{a&&a[1](v instanceof ee?v:te(-1,v,null,e)),delete n[o]})}).finally(()=>{console.log(1111,h(this,$).get(c))}),new Proxy(V,{get:(v,a)=>(...o)=>v.then(n=>te(...n)[a](...o)).catch(n=>{if(!n instanceof ee)throw n;return typeof n[a]=="function"?n[a](...o):n[a]})})});_(this,"get",(e,r={})=>this.request({url:e,method:"GET",params:r}));_(this,"post",(e,r={},i={})=>this.request({url:e,method:"POST",data:r,params:i}));_(this,"put",(e,r={},i={})=>this.request({url:e,method:"PUT",data:r,params:i}));_(this,"del",(e,r={},i={})=>this.request({url:e,method:"DELETE",data:r,params:i}));_(this,"download",(e,r)=>{});_(this,"cache",(e,r={})=>this.request({url:e,method:"GET",params:r},!0));_(this,"list",(e,r={})=>this.get(`/api/${e}/${this.encode(r)}`));_(this,"getAppInfo",()=>{});_(this,"refreshCache",(e=!1)=>{e&&h(this,I)["#"].clear(),h(this,I).$.clear()});_(this,"decode",(e="",r={})=>{if(e===void 0||e===""||e===null)return r;try{const i=h(this,K).decode(e).buffer;return se.unpack(he(i))}catch{return console.warn("core.decode",e),r}});_(this,"encode",(e={})=>{const r=JSON.stringify(e,(i,u)=>u===void 0?null:u);return h(this,K).encode(fe(se.pack(r)))});D(this,k,e),D(this,H,i),D(this,K,ce(r))}}H=new WeakMap,K=new WeakMap,k=new WeakMap,I=new WeakMap,$=new WeakMap;const le=re;re.onUnhandledRejection=t=>{var e,r,i,u,y,c;t!=null&&t.IS_ECHO_MSG?((e=t==null?void 0:t.$toast)==null||e.call(t),(r=t==null?void 0:t.preventDefault)==null||r.call(t)):(i=t.reason)!=null&&i.IS_ECHO_MSG&&((y=(u=t.reason)==null?void 0:u.$toast)==null||y.call(u),(c=t==null?void 0:t.preventDefault)==null||c.call(t))},re.onToast=(t,e)=>[0,1].includes(t)?console.log(e):console.warn(e),p.default=le,p.signature=ae,p.str2uint8array=fe,p.trim=we,p.uint8array2str=he,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); +(function(p,w){typeof exports=="object"&&typeof module<"u"?w(exports):typeof define=="function"&&define.amd?define(["exports"],w):(p=typeof globalThis<"u"?globalThis:p||self,w(p["ff-request"]={}))})(this,function(p){"use strict";var ye=Object.defineProperty;var be=(p,w,A)=>w in p?ye(p,w,{enumerable:!0,configurable:!0,writable:!0,value:A}):p[w]=A;var _=(p,w,A)=>(be(p,typeof w!="symbol"?w+"":w,A),A),ue=(p,w,A)=>{if(!w.has(p))throw TypeError("Cannot "+A)};var h=(p,w,A)=>(ue(p,w,"read from private field"),A?A.call(p):w.get(p)),N=(p,w,A)=>{if(w.has(p))throw TypeError("Cannot add the same private member more than once");w instanceof WeakSet?w.add(p):w.set(p,A)},D=(p,w,A,Y)=>(ue(p,w,"write to private field"),Y?Y.call(p,A):w.set(p,A),A);var G,B,J,q,Q,W,L,X,Z,H,K,k,I,$;function w(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function A(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,g=new Uint8Array(l);d!==f;){for(var P=a[d],T=0,b=l-1;(P!==0||T>>0,g[b]=P%c>>>0,P=P/c>>>0;if(P!==0)throw new Error("Non-zero carry");n=T,d++}for(var s=l-n;s!==l&&g[s]===0;)s++;for(var E=m.repeat(o);s>>0,l=new Uint8Array(f);a[o];){var g=e[a.charCodeAt(o)];if(g===255)return;for(var P=0,T=f-1;(g!==0||P>>0,l[T]=g%256>>>0,g=g/256>>>0;if(g!==0)throw new Error("Non-zero carry");d=P,o++}for(var b=f-d;b!==f&&l[b]===0;)b++;for(var s=new Uint8Array(n+(f-b)),E=n;b!==f;)s[E++]=l[b++];return s}function v(a){var o=M(a);if(o)return o;throw new Error("Non-base"+c+" character")}return{encode:F,decodeUnsafe:M,decode:v}}var Y=A;const ce=w(Y);var ne={};(function(t){(function(e){e([],function(){var r=-1,i=-2,u=-3,y=-4,c=-5,m=function(o,n){n=n||{};var d=n.verbose||!1;d&&console.log("Normalize the JSON Object"),o=typeof o=="string"?this.JSON.parse(o):o,d&&console.log("Creating a empty dictionary");var f={strings:[],integers:[],floats:[]};d&&console.log("Creating the AST");var l=function b(s){d&&console.log("Calling recursiveAstBuilder with "+this.JSON.stringify(s));var E=typeof s;if(s===null)return{type:"null",index:u};if(typeof s>"u")return{type:"undefined",index:c};if(s instanceof Array){var U=["@"];for(var S in s)s.hasOwnProperty(S)&&U.push(b(s[S]));return U}if(E==="object"){var U=["$"];for(var j in s)s.hasOwnProperty(j)&&(U.push(b(j)),U.push(b(s[j])));return U}if(s==="")return{type:"empty",index:y};if(E==="string"){var C=a.call(f.strings,s);return C==-1&&(f.strings.push(z(s)),C=f.strings.length-1),{type:"strings",index:C}}if(E==="number"&&s%1===0){var C=a.call(f.integers,s);return C==-1&&(f.integers.push(M(s)),C=f.integers.length-1),{type:"integers",index:C}}if(E==="number"){var C=a.call(f.floats,s);return C==-1&&(f.floats.push(s),C=f.floats.length-1),{type:"floats",index:C}}if(E==="boolean")return{type:"boolean",index:s?r:i};throw new Error("Unexpected argument of type "+typeof s)}(o),g=f.strings.length,P=f.integers.length;f.floats.length,d&&console.log("Parsing the dictionary");var T=f.strings.join("|");return T+="^"+f.integers.join("|"),T+="^"+f.floats.join("|"),d&&console.log("Parsing the structure"),T+="^"+function b(s){if(d&&console.log("Calling a recursiveParser with "+this.JSON.stringify(s)),s instanceof Array){var E=s.shift();for(var U in s)s.hasOwnProperty(U)&&(E+=b(s[U])+"|");return(E[E.length-1]==="|"?E.slice(0,-1):E)+"]"}var S=s.type,j=s.index;if(S==="strings")return M(j);if(S==="integers")return M(g+j);if(S==="floats")return M(g+P+j);if(S==="boolean")return s.index;if(S==="null")return u;if(S==="undefined")return c;if(S==="empty")return y;throw new TypeError("The item is alien!")}(l),d&&console.log("Ending parser"),n.debug?{dictionary:f,ast:l,packed:T}:T},V=function(o,n){n=n||{};var d=o.split("^");n.verbose&&console.log("Building dictionary");var f=[],l=d[0];if(l!==""){l=l.split("|"),n.verbose&&console.log("Parse the strings dictionary");for(var g=0,P=l.length;gh(this,Q).call(this,r),ownKeys:()=>Object.keys(h(this,q).getPrototypeOf()||{}),getPrototypeOf:()=>h(this,B)?this:this.data,getOwnPropertyDescriptor:()=>({configurable:!0,enumerable:!0,writable:!0,value:h(this,q).getPrototypeOf()})});N(this,Q,e=>e==="$toast"?h(this,L):e==="msg"?h(this,W):e==="then"||e==="resp"?(D(this,J,!0),D(this,B,e==="resp"),h(this,X)):e==="catch"?h(this,Z):e==="IS_ECHO_MSG"?h(this,J):Reflect.get(this,e));N(this,W,(e=i=>i,r=!1)=>(h(this,L).call(this),D(this,B,r),Promise.resolve(e==null?void 0:e(h(this,q).getPrototypeOf()))));N(this,L,()=>{h(this,J)&&(D(this,J,!1),le.onToast(this.code,this.message))});N(this,X,e=>[0,1].includes(this.code)?Promise.resolve(e==null?void 0:e(h(this,q).getPrototypeOf())):Promise.reject(h(this,G)));N(this,Z,e=>Promise.resolve(e(h(this,G))));return this.code=e,this.message=r,this.data=i,this.url=u,this.res=y,D(this,G,new Proxy(this,h(this,q)))}}G=new WeakMap,B=new WeakMap,J=new WeakMap,q=new WeakMap,Q=new WeakMap,W=new WeakMap,L=new WeakMap,X=new WeakMap,Z=new WeakMap;const te=(t,e,r,i="/",u="")=>new ee(t,e,r,i,u);var ie=["utf8","utf-8","unicode-1-1-utf-8"];function de(t){if(ie.indexOf(t)<0&&typeof t<"u"&&t!=null)throw new RangeError("Invalid encoding type. Only utf-8 is supported");this.encoding="utf-8",this.encode=function(e){if(typeof e!="string")throw new TypeError("passed argument must be of tye string");var r=unescape(encodeURIComponent(e)),i=new Uint8Array(r.length);const u=r.split("");for(let y=0;y"u")return"";var i=typeof r<"u"&&i in r?r.stream:!1;if(typeof i!="boolean")throw new TypeError("stream option must be boolean");if(ArrayBuffer.isView(e)){var u=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),y=new Array(u.length);for(let c=0;c{let e=5381;for(let r=0;r>>0).toString(16)},we=(t,e)=>t.replace(new RegExp(`^${e}+|${e}+$`,"g"),""),fe=t=>pe.encode(t||""),he=t=>ve.decode(new DataView(t),{});class re{constructor(e,r,i=({})=>Promise.reject({code:-1,msg:"请初始化HTTP请求方法主体"})){N(this,H,void 0);N(this,K,void 0);N(this,k,void 0);N(this,I,{"#":new Map,$:new Map});N(this,$,new Map);_(this,"request",({url:e="/",method:r="GET",...i},u=!1)=>{var M;const y=r.toUpperCase(),c=ae(JSON.stringify([e,y,i])),m=(M=e==null?void 0:e.includes)!=null&&M.call(e,"/_/")?"#":"$",{promise:V,resolve:z,reject:F}=Promise.withResolvers();return h(this,I)[m].has(c)?(console.log("缓存命中",e),z(h(this,I)[m].get(c))):h(this,$).has(c)?h(this,$).get(c).push([z,F]):(h(this,$).set(c,[[z,F]]),h(this,H).call(this,{url:e,method:y,...i}).then(v=>{if(![0,1].includes(v.code))throw te(v.code,v.msg,v.data,e,v==null?void 0:v.res);return[v.code,v.msg,v.data,e,v==null?void 0:v.res]}).then(v=>((m=="#"||u&&y==="GET")&&h(this,I)[m].set(c,v),v)).then(v=>h(this,$).get(c).forEach((a,o,n)=>{a&&a[0](v),delete n[o]})).catch(v=>{h(this,I)[m].delete(c),h(this,$).get(c).forEach((a,o,n)=>{a&&a[1](v instanceof ee?v:te(-1,v,null,e)),delete n[o]})}).finally(()=>{console.log(1111,h(this,$).get(c)),h(this,$).delete(c)})),new Proxy(V,{get:(v,a)=>(...o)=>v.then(n=>te(...n)[a](...o)).catch(n=>{if(!n instanceof ee)throw n;return typeof n[a]=="function"?n[a](...o):n[a]})})});_(this,"get",(e,r={})=>this.request({url:e,method:"GET",params:r}));_(this,"post",(e,r={},i={})=>this.request({url:e,method:"POST",data:r,params:i}));_(this,"put",(e,r={},i={})=>this.request({url:e,method:"PUT",data:r,params:i}));_(this,"del",(e,r={},i={})=>this.request({url:e,method:"DELETE",data:r,params:i}));_(this,"download",(e,r)=>{});_(this,"cache",(e,r={})=>this.request({url:e,method:"GET",params:r},!0));_(this,"list",(e,r={})=>this.get(`/api/${e}/${this.encode(r)}`));_(this,"getAppInfo",()=>{});_(this,"refreshCache",(e=!1)=>{e&&h(this,I)["#"].clear(),h(this,I).$.clear()});_(this,"decode",(e="",r={})=>{if(e===void 0||e===""||e===null)return r;try{const i=h(this,K).decode(e).buffer;return se.unpack(he(i))}catch{return console.warn("core.decode",e),r}});_(this,"encode",(e={})=>{const r=JSON.stringify(e,(i,u)=>u===void 0?null:u);return h(this,K).encode(fe(se.pack(r)))});D(this,k,e),D(this,H,i),D(this,K,ce(r))}}H=new WeakMap,K=new WeakMap,k=new WeakMap,I=new WeakMap,$=new WeakMap;const le=re;re.onUnhandledRejection=t=>{var e,r,i,u,y,c;t!=null&&t.IS_ECHO_MSG?((e=t==null?void 0:t.$toast)==null||e.call(t),(r=t==null?void 0:t.preventDefault)==null||r.call(t)):(i=t.reason)!=null&&i.IS_ECHO_MSG&&((y=(u=t.reason)==null?void 0:u.$toast)==null||y.call(u),(c=t==null?void 0:t.preventDefault)==null||c.call(t))},re.onToast=(t,e)=>[0,1].includes(t)?console.log(e):console.warn(e),p.default=le,p.signature=ae,p.str2uint8array=fe,p.trim=we,p.uint8array2str=he,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/package.json b/package.json index 2ba8800..2d08b52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff-request", "private": true, - "version": "0.9.8", + "version": "0.9.9", "type": "module", "files": [ "dist"