From 06345246e9c21d08f4e0836dc73ba7903db63032 Mon Sep 17 00:00:00 2001 From: taevas Date: Wed, 6 Apr 2022 19:54:11 +0800 Subject: [PATCH] 3.4.6 --- dist/upyun.common.js | 4 ++-- dist/upyun.esm.js | 14 ++++++-------- dist/upyun.js | 14 ++++++-------- dist/upyun.min.js | 4 ++-- package.json | 2 +- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/dist/upyun.common.js b/dist/upyun.common.js index 8beb7e3..db52ddd 100644 --- a/dist/upyun.common.js +++ b/dist/upyun.common.js @@ -1,5 +1,5 @@ /** - * UPYUN js-sdk 3.4.5 + * UPYUN js-sdk 3.4.6 * (c) 2022 * @license MIT */ @@ -188,7 +188,7 @@ function formUpload(remoteUrl, localFile, _ref) { } var name = "upyun"; -var version = "3.4.5"; +var version = "3.4.6"; var description = "UPYUN js sdk"; var main = "dist/upyun.common.js"; var module$1 = "dist/upyun.esm.js"; diff --git a/dist/upyun.esm.js b/dist/upyun.esm.js index 7c4545f..750caa7 100644 --- a/dist/upyun.esm.js +++ b/dist/upyun.esm.js @@ -1,5 +1,5 @@ /** - * UPYUN js-sdk 3.4.5 + * UPYUN js-sdk 3.4.6 * (c) 2022 * @license MIT */ @@ -13,14 +13,11 @@ var isBrowser = typeof window !== 'undefined' && (typeof process === 'undefined' var PARTSIZE = 1024 * 1024; var isPromise_1 = isPromise; -var default_1 = isPromise; function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } -isPromise_1.default = default_1; - var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -1815,7 +1812,7 @@ function b64_hmac_sha1(k,d,_p,_z){ var hmacsha1 = b64_hmac_sha1; var base64 = createCommonjsModule(function (module, exports) { -/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ +/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */ (function(root) { // Detect free variables `exports`. @@ -1908,6 +1905,7 @@ var base64 = createCommonjsModule(function (module, exports) { var a; var b; var c; + var d; var buffer; // Make sure any padding is handled outside of the loop. var length = input.length - padding; @@ -1953,7 +1951,7 @@ var base64 = createCommonjsModule(function (module, exports) { var base64 = { 'encode': encode, 'decode': decode, - 'version': '1.0.0' + 'version': '0.1.0' }; // Some AMD build optimizers, like r.js, check for specific condition patterns @@ -1982,7 +1980,7 @@ var base64 = createCommonjsModule(function (module, exports) { }); var name = "upyun"; -var version = "3.4.5"; +var version = "3.4.6"; var description = "UPYUN js sdk"; var main = "dist/upyun.common.js"; var module$1 = "dist/upyun.esm.js"; @@ -2190,7 +2188,7 @@ var md5 = createCommonjsModule(function (module) { message = utf8.stringToBytes(message); else if (isBuffer(message)) message = Array.prototype.slice.call(message, 0); - else if (!Array.isArray(message) && message.constructor !== Uint8Array) + else if (!Array.isArray(message)) message = message.toString(); // else, assume byte array already diff --git a/dist/upyun.js b/dist/upyun.js index e48145e..817f3bb 100644 --- a/dist/upyun.js +++ b/dist/upyun.js @@ -1,5 +1,5 @@ /** - * UPYUN js-sdk 3.4.5 + * UPYUN js-sdk 3.4.6 * (c) 2022 * @license MIT */ @@ -19,14 +19,11 @@ var isBrowser = typeof window !== 'undefined' && (typeof process === 'undefined' var PARTSIZE = 1024 * 1024; var isPromise_1 = isPromise; -var default_1 = isPromise; function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } -isPromise_1.default = default_1; - var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -1821,7 +1818,7 @@ function b64_hmac_sha1(k,d,_p,_z){ var hmacsha1 = b64_hmac_sha1; var base64 = createCommonjsModule(function (module, exports) { -/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ +/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */ (function(root) { // Detect free variables `exports`. @@ -1914,6 +1911,7 @@ var base64 = createCommonjsModule(function (module, exports) { var a; var b; var c; + var d; var buffer; // Make sure any padding is handled outside of the loop. var length = input.length - padding; @@ -1959,7 +1957,7 @@ var base64 = createCommonjsModule(function (module, exports) { var base64 = { 'encode': encode, 'decode': decode, - 'version': '1.0.0' + 'version': '0.1.0' }; // Some AMD build optimizers, like r.js, check for specific condition patterns @@ -1988,7 +1986,7 @@ var base64 = createCommonjsModule(function (module, exports) { }); var name = "upyun"; -var version = "3.4.5"; +var version = "3.4.6"; var description = "UPYUN js sdk"; var main = "dist/upyun.common.js"; var module$1 = "dist/upyun.esm.js"; @@ -2196,7 +2194,7 @@ var md5 = createCommonjsModule(function (module) { message = utf8.stringToBytes(message); else if (isBuffer(message)) message = Array.prototype.slice.call(message, 0); - else if (!Array.isArray(message) && message.constructor !== Uint8Array) + else if (!Array.isArray(message)) message = message.toString(); // else, assume byte array already diff --git a/dist/upyun.min.js b/dist/upyun.min.js index 404acfe..612a2e6 100644 --- a/dist/upyun.min.js +++ b/dist/upyun.min.js @@ -1,6 +1,6 @@ /** - * UPYUN js-sdk 3.4.5 + * UPYUN js-sdk 3.4.6 * (c) 2022 * @license MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("axios")):"function"==typeof define&&define.amd?define(["axios"],t):e.upyun=t(e.axios)}(this,function(f){"use strict";f="default"in f?f.default:f;var l="undefined"!=typeof window&&("undefined"==typeof process||"browser"===process.title),a=1048576,p=e;function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}p.default=e;var P="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var N=t(function(e,t){var r=P,n=t&&!t.nodeType&&t,t=e&&!e.nodeType&&e,o="object"==typeof P&&P;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var i,s,y=2147483647,m=36,g=26,a=38,u=700,h=/^xn--/,l=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=m-1,b=Math.floor,x=String.fromCharCode;function w(e){throw RangeError(f[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function d(e,t){var r=e.split("@"),n="",r=(1>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function j(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,r){var n=0;for(e=r?b(e/u):e>>1,e+=b(e/t);p*g>>1b((y-l)/i))&&w("overflow"),l+=a*i,!(a<(a=s<=f?1:f+g<=s?g:s-f));s+=m)i>b(y/(a=m-a))&&w("overflow"),i*=a;f=k(l-o,t=u.length+1,0==o),b(l/t)>y-c&&w("overflow"),c+=b(l/t),l%=t,u.splice(l++,0,c)}return C(u)}function O(e){for(var t,r,n,o,i,s,a,u,h,l,c=[],f=(e=A(e)).length,p=128,v=72,d=t=0;db((y-t)/(u=r+1))&&w("overflow"),t+=(o-p)*u,p=o,d=0;dy&&w("overflow"),a==p){for(i=t,s=m;!(i<(h=s<=v?1:v+g<=s?g:s-v));s+=m)c.push(x(j(h+(l=i-h)%(h=m-h),0))),i=b(l/h);c.push(x(j(i,0))),v=k(t,u,r==n),t=0,++r}++t,++p}return c.join("")}if(i={version:"1.3.2",ucs2:{decode:A,encode:C},decode:S,encode:O,toASCII:function(e){return d(e,function(e){return l.test(e)?"xn--"+O(e):e})},toUnicode:function(e){return d(e,function(e){return h.test(e)?S(e.slice(4).toLowerCase()):e})}},n&&t)if(e.exports==n)t.exports=i;else for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);else r.punycode=i}),C=function(e){return"string"==typeof e},s=function(e){return"object"==typeof e&&null!==e},w=function(e){return null===e},M=function(e){return null==e};function R(e,t,r,n){r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g,t=(e=e.split(t=t||"&"),1e3),s=(n&&"number"==typeof n.maxKeys&&(t=n.maxKeys),e.length);0",'"',"`"," ","\r","\n","\t"]),k=["'"].concat(r),S=["%","/","?",";","#"].concat(k),O=["/","?","#"],q=/^[+a-z0-9A-Z_-]{0,63}$/,K=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,W={javascript:!0,"javascript:":!0},T={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function n(e,t,r){if(e&&s(e)&&e instanceof A)return e;var n=new A;return n.parse(e,t,r),n}A.prototype.parse=function(e,t,r){if(!C(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),n=-1!==n&&n>16)+(t>>16)+(r>>16)<<16|65535&r}function x(e,t){return e<>>32-t}function a(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,o,i=[80],s=1732584193,a=-271733879,u=-1732584194,h=271733878,l=-1009589776,c=0;c>5]|=(e.charCodeAt(n/8)&r)<<32-s-n%32;return t}r=r||"=",s=s||8;for(var n=function(e,t){for(var r=u(e),n=(16>2]>>8*(3-i%4)&255)<<16|(n[i+1>>2]>>8*(3-(i+1)%4)&255)<<8|n[i+2>>2]>>8*(3-(i+2)%4)&255,l=0;l<4;l++)8*i+6*l>32*n.length?o+=r:o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h>>6*(3-l)&63);return o},te=t(function(e,t){var r=P;function h(e){throw new o(e)}var n=t,t=e&&e.exports==n&&e,e="object"==typeof P&&P,o=(e.global!==e&&e.window!==e||(r=e),function(e){this.message=e}),l=(o.prototype=new Error,o.prototype.name="InvalidCharacterError","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a=/[\t\n\f\r ]/g,i={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&h("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,o,i=e.length%3,s="",a=-1,u=e.length-i;++a>18&63)+l.charAt(o>>12&63)+l.charAt(o>>6&63)+l.charAt(63&o);return 2==i?(t=e.charCodeAt(a)<<8,r=e.charCodeAt(++a),s+=l.charAt((o=t+r)>>10)+l.charAt(o>>4&63)+l.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(a),s+=l.charAt(o>>2)+l.charAt(o<<4&63)+"=="),s},decode:function(e){for(var t,r,n=(e=String(e).replace(a,"")).length,o=((n=n%4==0?(e=e.replace(/==?$/,"")).length:n)%4!=1&&!/[^+a-zA-Z0-9/]/.test(e)||h("Invalid character: the string to be decoded is not correctly encoded."),0),i="",s=-1;++s>(-2*o&6)));return i},version:"1.0.0"};if(n&&!n.nodeType)if(t)t.exports=i;else for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);else r.base64=i}),re="3.4.5",ne=t(function(e){var i,r;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,n=0;r>>6-2*n);return t}},e.exports=r}),g={utf8:{stringToBytes:function(e){return g.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(g.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r>>24)|4278255360&(r[a]<<24|r[a]>>>8);r[t>>>5]|=128<>>9<<4)]=t;for(var u=y._ff,h=y._gg,l=y._hh,c=y._ii,a=0;a>>0,o=o+p>>>0,i=i+v>>>0,s=s+d>>>0}return m.endian([n,o,i,s])}var m,g,b,x;m=ne,g=oe.utf8,b=V,x=oe.bin,y._ff=function(e,t,r,n,o,i,s){e=e+(t&r|~t&n)+(o>>>0)+s;return(e<>>32-i)+t},y._gg=function(e,t,r,n,o,i,s){e=e+(t&n|r&~n)+(o>>>0)+s;return(e<>>32-i)+t},y._hh=function(e,t,r,n,o,i,s){e=e+(t^r^n)+(o>>>0)+s;return(e<>>32-i)+t},y._ii=function(e,t,r,n,o,i,s){e=e+(r^(t|~n))+(o>>>0)+s;return(e<>>32-i)+t},y._blocksize=16,y._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);e=m.wordsToBytes(y(e,t));return t&&t.asBytes?e:t&&t.asString?x.bytesToString(e):m.bytesToHex(e)}});function b(e,t){var r=[t.method,t.path],n=(["date","policy","contentMd5"].forEach(function(e){t[e]&&r.push(t[e])}),ee(e.password,r.join("&")));return"UPYUN "+e.operatorName+":"+n}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var x={genSign:b,getHeaderSign:function(e,t,r){var n=3= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=g-b,C=Math.floor,k=String.fromCharCode;function S(e){throw RangeError(c[e])}function p(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function v(e,t){var r=e.split("@"),n="";return 1>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function q(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?C(e/a):e>>1,e+=C(e/t);f*x>>1C((m-v)/s))&&S("overflow"),v+=u*s,!(u<(h=a<=y?b:y+x<=a?x:a-y));a+=g)s>C(m/(l=g-h))&&S("overflow"),s*=l;y=T(v-i,t=f.length+1,0==i),C(v/t)>m-d&&S("overflow"),d+=C(v/t),v%=t,f.splice(v++,0,d)}return P(f)}function y(e){var t,r,n,o,i,s,a,u,h,l,c,f,p,v,d,y=[];for(f=(e=O(e)).length,t=A,i=w,s=r=0;sC((m-r)/(p=n+1))&&S("overflow"),r+=(a-t)*p,t=a,s=0;sm&&S("overflow"),c==t){for(u=r,h=g;!(u<(l=h<=i?b:i+x<=h?x:h-i));h+=g)d=u-l,v=g-l,y.push(k(q(l+d%v,0))),u=C(d/v);y.push(k(q(u,0))),i=T(r,p,n==o),r=0,++n}++r,++t}return y.join("")}if(o={version:"1.3.2",ucs2:{decode:O,encode:P},decode:d,encode:y,toASCII:function(e){return v(e,function(e){return h.test(e)?"xn--"+y(e):e})},toUnicode:function(e){return v(e,function(e){return u.test(e)?d(e.slice(4).toLowerCase()):e})}},t&&r)if(I.exports==t)r.exports=o;else for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);else e.punycode=o}(U)}),N={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}};function r(e,t,r,n){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(t);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var a,u,h=e.length;0",'"',"`"," ","\r","\n","\t"]),F=["'"].concat(f),_=["%","/","?",";","#"].concat(F),L=["/","?","#"],D=/^[+a-z0-9A-Z_-]{0,63}$/,H=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Z={javascript:!0,"javascript:":!0},G={javascript:!0,"javascript:":!0},$={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function d(e,t,r){if(e&&N.isObject(e)&&e instanceof O)return e;var n=new O;return n.parse(e,t,r),n}O.prototype.parse=function(e,t,r){if(!N.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=-1!==n&&n>16)+(t>>16)+(r>>16)<<16|65535&r}function A(e,t){return e<>>32-t}function u(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,o,i,s,a=[80],u=1732584193,h=-271733879,l=-1732584194,c=271733878,f=-1009589776,p=0;p>5]|=(e.charCodeAt(n/8)&r)<<32-a-n%32;return t}return i||(i="="),a||(a=8),function(e){for(var t="",r=0;r<4*e.length;r+=3)for(var n=(e[r>>2]>>8*(3-r%4)&255)<<16|(e[r+1>>2]>>8*(3-(r+1)%4)&255)<<8|e[r+2>>2]>>8*(3-(r+2)%4)&255,o=0;o<4;o++)8*r+6*o>32*e.length?t+=i:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-o)&63);return t}(function(e,t){var r=h(e);16>18&63)+l.charAt(o>>12&63)+l.charAt(o>>6&63)+l.charAt(63&o);return 2==i?(t=e.charCodeAt(a)<<8,r=e.charCodeAt(++a),s+=l.charAt((o=t+r)>>10)+l.charAt(o>>4&63)+l.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(a),s+=l.charAt(o>>2)+l.charAt(o<<4&63)+"=="),s},decode:function(e){var t=(e=String(e).replace(a,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),t%4!=1&&!/[^+a-zA-Z0-9/]/.test(e)||h("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",s=-1;++s>(-2*o&6)));return i},version:"0.1.0"};if(t&&!t.nodeType)if(r)r.exports=i;else for(var s in i)i.hasOwnProperty(s)&&(t[s]=i[s]);else e.base64=i}(U)}),B="3.4.6",J=e(function(e){var i,r;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,n=0;r>>6-2*n);return t}},e.exports=r}),K={utf8:{stringToBytes:function(e){return K.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(K.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r>>24)|4278255360&(r[u]<<24|r[u]>>>8);r[n>>>5]|=128<>>9<<4)]=n;var h=w._ff,l=w._gg,c=w._hh,f=w._ii;for(u=0;u>>0,i=i+v>>>0,s=s+d>>>0,a=a+y>>>0}return m.endian([o,i,s,a])})._ff=function(e,t,r,n,o,i,s){var a=e+(t&r|~t&n)+(o>>>0)+s;return(a<>>32-i)+t},w._gg=function(e,t,r,n,o,i,s){var a=e+(t&n|r&~n)+(o>>>0)+s;return(a<>>32-i)+t},w._hh=function(e,t,r,n,o,i,s){var a=e+(t^r^n)+(o>>>0)+s;return(a<>>32-i)+t},w._ii=function(e,t,r,n,o,i,s){var a=e+(r^(t|~n))+(o>>>0)+s;return(a<>>32-i)+t},w._blocksize=16,w._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=m.wordsToBytes(w(e,t));return t&&t.asBytes?r:t&&t.asString?x.bytesToString(r):m.bytesToHex(r)}});function Q(e,t){var r=[t.method,t.path];["date","policy","contentMd5"].forEach(function(e){t[e]&&r.push(t[e])});var n=T(e.password,r.join("&"));return"UPYUN "+e.operatorName+":"+n}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ee={genSign:Q,getHeaderSign:function(e,t,r){var n=3