@cloudbase/js-sdk 3.3.14-alpha.2 → 3.3.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -40
- package/dist/index.cjs.js.LICENSE.txt +37 -0
- package/dist/index.esm.js +2 -35
- package/dist/index.esm.js.LICENSE.txt +37 -0
- package/dist/packages/ai/index.cjs.js +2 -0
- package/dist/packages/ai/index.cjs.js.LICENSE.txt +22 -0
- package/dist/packages/ai/index.esm.js +2 -0
- package/dist/packages/ai/index.esm.js.LICENSE.txt +22 -0
- package/dist/packages/analytics/index.cjs.js +1 -0
- package/dist/packages/analytics/index.esm.js +1 -0
- package/dist/packages/apis/index.cjs.js +1 -0
- package/dist/packages/apis/index.esm.js +1 -0
- package/dist/packages/app/index.cjs.js +2 -0
- package/dist/packages/app/index.cjs.js.LICENSE.txt +7 -0
- package/dist/packages/app/index.esm.js +2 -0
- package/dist/packages/app/index.esm.js.LICENSE.txt +7 -0
- package/dist/packages/auth/index.cjs.js +2 -0
- package/dist/packages/auth/index.cjs.js.LICENSE.txt +22 -0
- package/dist/packages/auth/index.esm.js +2 -0
- package/dist/packages/auth/index.esm.js.LICENSE.txt +22 -0
- package/dist/packages/cloudrun/index.cjs.js +1 -0
- package/dist/packages/cloudrun/index.esm.js +1 -0
- package/dist/packages/container/index.cjs.js +1 -0
- package/dist/packages/container/index.esm.js +1 -0
- package/dist/packages/functions/index.cjs.js +1 -0
- package/dist/packages/functions/index.esm.js +1 -0
- package/dist/packages/model/index.cjs.js +1 -0
- package/dist/packages/model/index.esm.js +1 -0
- package/dist/packages/mysql/index.cjs.js +1 -0
- package/dist/packages/mysql/index.esm.js +1 -0
- package/dist/packages/oauth/index.cjs.js +2 -0
- package/dist/packages/oauth/index.cjs.js.LICENSE.txt +14 -0
- package/dist/packages/oauth/index.esm.js +2 -0
- package/dist/packages/oauth/index.esm.js.LICENSE.txt +14 -0
- package/dist/packages/realtime/index.cjs.js +1 -0
- package/dist/packages/realtime/index.esm.js +1 -0
- package/dist/packages/storage/index.cjs.js +1 -0
- package/dist/packages/storage/index.esm.js +1 -0
- package/dist/packages/utilities/index.cjs.js +1 -0
- package/dist/packages/utilities/index.esm.js +1 -0
- package/miniprogram_dist/app.js +1 -1
- package/miniprogram_dist/database.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/miniprogram_dist/storage.js +1 -1
- package/package.json +68 -17
- package/ai/dist/index.esm.js +0 -3
- package/ai/dist/index.js +0 -21
- package/ai/package.json +0 -6
- package/analytics/dist/index.esm.js +0 -4
- package/analytics/dist/index.js +0 -9
- package/analytics/package.json +0 -6
- package/apis/dist/index.esm.js +0 -3
- package/apis/dist/index.js +0 -21
- package/apis/package.json +0 -6
- package/app/dist/index.esm.js +0 -11
- package/app/dist/index.js +0 -18
- package/app/package.json +0 -6
- package/auth/dist/index.esm.js +0 -8
- package/auth/dist/index.js +0 -13
- package/auth/package.json +0 -6
- package/cloudrun/dist/index.esm.js +0 -3
- package/cloudrun/dist/index.js +0 -21
- package/cloudrun/package.json +0 -6
- package/container/dist/index.esm.js +0 -8
- package/container/dist/index.js +0 -13
- package/container/package.json +0 -6
- package/database/dist/index.d.ts +0 -3
- package/database/dist/index.esm.js +0 -503
- package/database/dist/index.js +0 -509
- package/database/package.json +0 -6
- package/functions/dist/index.esm.js +0 -8
- package/functions/dist/index.js +0 -13
- package/functions/package.json +0 -6
- package/model/dist/index.esm.js +0 -3
- package/model/dist/index.js +0 -21
- package/model/package.json +0 -6
- package/mysql/dist/index.esm.js +0 -3
- package/mysql/dist/index.js +0 -21
- package/mysql/package.json +0 -6
- package/oauth/dist/index.esm.js +0 -3
- package/oauth/dist/index.js +0 -21
- package/oauth/package.json +0 -6
- package/realtime/dist/index.esm.js +0 -8
- package/realtime/dist/index.js +0 -13
- package/realtime/package.json +0 -6
- package/storage/dist/index.esm.js +0 -4
- package/storage/dist/index.js +0 -9
- package/storage/package.json +0 -6
- /package/{ai/dist → dist/packages/ai}/index.d.ts +0 -0
- /package/{analytics/dist → dist/packages/analytics}/index.d.ts +0 -0
- /package/{apis/dist → dist/packages/apis}/index.d.ts +0 -0
- /package/{app/dist → dist/packages/app}/index.d.ts +0 -0
- /package/{auth/dist → dist/packages/auth}/index.d.ts +0 -0
- /package/{cloudrun/dist → dist/packages/cloudrun}/index.d.ts +0 -0
- /package/{container/dist → dist/packages/container}/index.d.ts +0 -0
- /package/{functions/dist → dist/packages/functions}/index.d.ts +0 -0
- /package/{model/dist → dist/packages/model}/index.d.ts +0 -0
- /package/{mysql/dist → dist/packages/mysql}/index.d.ts +0 -0
- /package/{oauth/dist → dist/packages/oauth}/index.d.ts +0 -0
- /package/{realtime/dist → dist/packages/realtime}/index.d.ts +0 -0
- /package/{storage/dist → dist/packages/storage}/index.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase_storage",[],e):"object"==typeof exports?exports.cloudbase_storage=e():t.cloudbase_storage=e()}("undefined"!=typeof window?window:this,(()=>(()=>{"use strict";var t={272:(t,e,r)=>{r.r(e),r.d(e,{COMPONENT_NAME:()=>V,CloudbaseStorage:()=>K,SupabaseFileAPILikeStorage:()=>Q,registerStorage:()=>Z});var n,o,i=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=function(t){function e(e){var r=t.call(this,e)||this;return r.__isStorageError=!0,r.name="StorageError",r}return i(e,t),e}(Error);function a(t){return"object"==typeof t&&null!==t&&"__isStorageError"in t}(function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.name="StorageApiError",o.status=r,o.statusCode=n,o}i(e,t),e.prototype.toJSON=function(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}})(s),i((function(t,e){var r=o.call(this,t)||this;return r.name="StorageUnknownError",r.originalError=e,r}),o=s);var c="@cloudbase/js-sdk";function u(){return c}var l,d={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"};!function(t){t.local="local",t.none="none",t.session="session"}(l||(l={}));function f(t){return"string"==typeof t}function p(t,e){console.warn("[".concat(u(),"][").concat(t,"]:").concat(e))}var h,y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},m.apply(this,arguments)},g=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},v=function(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};!function(t){function e(e){var r=t.call(this)||this,n=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return r.timeout=n||0,r.timeoutMsg=o||"请求超时",r.restrictedMethods=i||["get","post","upload","download"],r}y(e,t),e.prototype.get=function(t){return this.request(m(m({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(m(m({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(m(m({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,r=t.file,n=t.name,o=t.method,i=t.headers,s=void 0===i?{}:i,a={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",c=new FormData;return"post"===a?(Object.keys(e).forEach((function(t){c.append(t,e[t])})),c.append("key",n),c.append("file",r),this.request(m(m({},t),{data:c,method:a}),this.restrictedMethods.includes("upload"))):this.request(m(m({},t),{method:"put",headers:s,body:r}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return g(this,void 0,void 0,(function(){var e,r,n,o;return v(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(m(m({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,r=window.URL.createObjectURL(new Blob([e])),n=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=r,o.setAttribute("download",n),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return g(this,void 0,void 0,(function(){var r,n,o,i,s,a,c,u,l,d,f,p,h,y=this;return v(this,(function(w){switch(w.label){case 0:return r=new AbortController,n=t.url,o=t.enableAbort,i=void 0!==o&&o,s=t.stream,a=void 0!==s&&s,c=t.signal,u=t.timeout,l=t.shouldThrowOnError,d=void 0===l||l,f=null!=u?u:this.timeout,c&&(c.aborted&&r.abort(),c.addEventListener("abort",(function(){return r.abort()}))),p=null,i&&f&&(p=setTimeout((function(){console.warn(y.timeoutMsg),r.abort(new Error(y.timeoutMsg))}),f)),[4,fetch(n,m(m({},t),{signal:r.signal})).then((function(t){return g(y,void 0,void 0,(function(){var e,r,n;return v(this,(function(o){switch(o.label){case 0:return clearTimeout(p),d?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return n=(r=Promise).reject,[4,t.json()];case 2:e=n.apply(r,[o.sent()]),o.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){if(clearTimeout(p),d)return Promise.reject(t)}))];case 1:return h=w.sent(),[2,{data:a?h.body:(null===(e=h.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?h.json():h.text(),statusCode:h.status,header:h.headers}]}}))}))},e.prototype.request=function(t,e){var r=this;void 0===e&&(e=!1);var n=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,s,a,c=t.url,u=t.headers,l=void 0===u?{}:u,d=t.data,f=t.responseType,p=t.withCredentials,h=t.body,y=t.onUploadProgress,m=function(t,e,r){void 0===r&&(r={});var n=/\?/.test(e),o="";return Object.keys(r).forEach((function(t){""===o?!n&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(r[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)}("https:",c,"get"===n?d:{}),g=new XMLHttpRequest;g.open(n,m),f&&(g.responseType=f),Object.keys(l).forEach((function(t){g.setRequestHeader(t,l[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};e.forEach((function(t){var e=t.split(": "),n=e.shift().toLowerCase(),o=e.join(": ");r[n]=o})),t.header=r,t.statusCode=g.status;try{t.data="blob"===f?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===f?g.response:g.responseText}clearTimeout(i),o(t)}},e&&r.timeout&&(i=setTimeout((function(){console.warn(r.timeoutMsg),g.abort()}),r.timeout)),a=d,s="[object FormData]"===Object.prototype.toString.call(a)?d:"application/x-www-form-urlencoded"===l["content-type"]?function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(r){e.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),e.join("&")}(d):h||(d?JSON.stringify(d):void 0),p&&(g.withCredentials=!0),g.send(s)}))}}((function(){})),function(t){t.WEB="web",t.WX_MP="wx_mp"}(h||(h={}));var w=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},I=function(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},O=function(t){function e(e){var r=t.call(this)||this;return r.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),r}return w(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}((function(){}));!function(){function t(t){this.keys={};var e=t.persistence,r=t.platformInfo,n=void 0===r?{}:r,o=t.keys,i=void 0===o?{}:o;this.platformInfo=n,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:(p(d.INVALID_PARAMS,"localStorage is not supported on current platform"),new O(e.root));case"none":return new O(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,r){if("async"!==this.mode){if(this.storage)try{var n={version:r||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(n))}catch(t){throw new Error(JSON.stringify({code:d.OPERATION_FAIL,msg:"[".concat(u(),"][").concat(d.OPERATION_FAIL,"]setStore failed"),info:t}))}}else p(d.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,r){return b(this,void 0,void 0,(function(){var n;return I(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),n={version:r||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(n))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var r;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(r={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===r?void 0:r.tcb_token))return{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var n=this.storage.getItem(t);return n&&n.indexOf(e)>=0?JSON.parse(n).content:""}p(d.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var r;return b(this,void 0,void 0,(function(){var n;return I(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(r={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===r?void 0:r.tcb_token))return[2,{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(n=o.sent())&&n.indexOf(e)>=0?[2,JSON.parse(n).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):p(d.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return b(this,void 0,void 0,(function(){return I(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))}}();var _=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=function(t,e){this.data=e||null,this.name=t},L=function(t){function e(e,r){var n=t.call(this,"error",{error:e,data:r})||this;return n.error=e,n}return _(e,t),e}(S),F=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,r){r[t]=r[t]||[],r[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,r){if(null==r?void 0:r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(t instanceof L)return console.error(t.error),this;var r=f(t)?new S(t,e||{}):t,n=r.name;if(this.listens(n)){r.target=this;for(var o=0,i=this.listeners[n]?function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}([],this.listeners[n],!0):[];o<i.length;o++)i[o].call(this,r)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();function P(t){this.message=t}function A(t){this.message=t}new F,new F,"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox"),P.prototype=new Error,P.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),A.prototype=new Error,A.prototype.name="InvalidTokenError";var R,E=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),C=function(){return C=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},C.apply(this,arguments)},U=function(t,e,r,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},j=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},N=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},T=function(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};!function(t){t.put="put",t.post="post"}(R||(R={}));var D=u,x=d,M="https://support.qq.com/products/148793",k=function(t){return"[object Array]"===Object.prototype.toString.call(t)},q=f,B=function(t,e,r){if(void 0===r&&(r=null),t&&"function"==typeof t)return t(e,r);if(e)throw e;return r},W=function(t){return t.mode,t.customInfo,t.title,t.messages,function(t,e,r){}},V="storage",J=function(t,e,r){return N(void 0,void 0,void 0,(function(){var n,o,i;return T(this,(function(s){switch(s.label){case 0:return[4,t.gateWay({path:"storages",name:"get-objects-upload-info",data:[C({objectId:e.path},e.headers?{signedHeader:Object.keys(e.headers).reduce((function(t,r){var n;return C(C({},t),((n={})[r]=[e.headers[r]],n))}),{})}:{})]},r)];case 1:return n=s.sent(),o=(null===(i=n.data)||void 0===i?void 0:i[0])||{},[2,n=C(C({},n),{data:C(C({},o.code?C({},o):{}),{authorization:o.authorization,token:o.token,url:o.uploadUrl,fileId:o.cloudObjectId,cosFileId:o.cloudObjectMeta,download_url:o.downloadUrl})})]}}))}))},z=function(t,e,r){return N(void 0,void 0,void 0,(function(){var n,o;return T(this,(function(i){switch(i.label){case 0:return[4,t.gateWay({path:"storages",name:"get-objects-download-info",data:e.convertedFileList.map((function(t){return{cloudObjectId:t.fileid}}))},r)];case 1:return n=i.sent(),[2,n=C(C({},n),{data:{download_list:null===(o=n.data)||void 0===o?void 0:o.map((function(t){return{code:t.code||"SUCCESS",message:t.message,fileid:t.cloudObjectId,download_url:t.downloadUrl,fileID:t.cloudObjectId,tempFileURL:t.downloadUrl}}))}})]}}))}))},G=function(t,e,r){return N(void 0,void 0,void 0,(function(){var n,o;return T(this,(function(i){switch(i.label){case 0:return[4,t.gateWay({path:"storages",name:"delete-objects",data:e.fileList.map((function(t){return{cloudObjectId:t}}))},r)];case 1:return n=i.sent(),[2,n=C(C({},n),{data:{delete_list:null===(o=n.data)||void 0===o?void 0:o.map((function(t){return{code:t.code||"SUCCESS",fileID:t.cloudObjectId,message:t.message}}))}})]}}))}))},H=function(t,e,r){return N(void 0,void 0,void 0,(function(){var n,o;return T(this,(function(i){switch(i.label){case 0:return[4,t.gateWay({path:"storages",name:"copy-objects",data:e.convertedFileList.map((function(t){return{srcPath:t.src_path,dstPath:t.dst_path,overwrite:t.overwrite,removeOriginal:t.remove_original}}))},r)];case 1:return n=i.sent(),[2,n=C(C({},n),{data:{copy_list:null===(o=n.data)||void 0===o?void 0:o.map((function(t){return{code:t.code||"SUCCESS",fileID:t.cloudObjectId,message:t.message}}))}})]}}))}))},K=function(){function t(){}return t.prototype.isGateWay=function(){return"GATEWAY"===(this.config.endPointMode||"CLOUD_API")},t.prototype.uploadFile=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o,i,s,a,c,u,l,d,f,p,h,y,m,g,v,w,b,I,O,_,S,L,F;return T(this,(function(P){switch(P.label){case 0:if(r=t.cloudPath,n=t.filePath,o=t.onUploadProgress,S=t.method,i=void 0===S?"put":S,L=t.headers,s=void 0===L?{}:L,a=t.fileContent,!q(r)||!n&&!a)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".uploadFile] invalid params")}));return c={put:R.put,post:R.post}[i.toLocaleLowerCase()]||R.put,this.isGateWay()&&c===R.post&&(c=R.put),c===R.put&&this.isGateWay()&&(Object.keys(s).some((function(t){return"content-length"===t.toLowerCase()}))||void 0!==(u=function(t){if(null!=t)return"undefined"!=typeof Blob&&t instanceof Blob?t.size:"undefined"!=typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer||"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t)?t.byteLength:void 0}(null!=a?a:n))&&(s["content-length"]=String(u))),[4,this.getUploadMetadata({cloudPath:r,method:c,headers:c===R.put?s:void 0,customReqOpts:t.customReqOpts})];case 1:return l=P.sent(),d=l.data,f=l.requestId,p=d.url,h=d.authorization,y=d.token,m=d.fileId,g=d.cosFileId,v=d.download_url,b=C(C({},w={url:p,file:n,name:r,onUploadProgress:o,fileContent:a,fileId:m,requestId:f}),{method:R.put,headers:C(C({},s),{authorization:h,"x-cos-meta-fileid":g,"x-cos-security-token":y})}),I=C(C({},w),{method:R.post,data:{key:r,signature:h,"x-cos-meta-fileid":g,success_action_status:"201","x-cos-security-token":y}}),(F={})[R.put]={params:b,isSuccess:function(t){return t>=200&&t<300}},F[R.post]={params:I,isSuccess:function(t){return 201===t}},O=F,[4,this.request.upload(O[c].params)];case 2:return _=P.sent(),O[c].isSuccess(_.statusCode)?[2,B(e,null,{fileID:m,download_url:v,requestId:f})]:[2,B(e,new Error("[".concat(D(),"][").concat(x.OPERATION_FAIL,"][").concat(V,"]:").concat(_.data)))]}}))}))},t.prototype.getUploadMetadata=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o,i,s,a,c,u;return T(this,(function(l){switch(l.label){case 0:if(r=t.cloudPath,n=t.method,o=t.headers,!q(r))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".getUploadMetadata] invalid cloudPath")}));i=this.request,s="storage.getUploadMetadata",l.label=1;case 1:return l.trys.push([1,6,,7]),a=void 0,c={path:r},n&&(c.method=n),n===R.put&&o&&(c.headers=o),this.isGateWay()?[4,J(i,c,t.customReqOpts)]:[3,3];case 2:return a=l.sent(),[3,5];case 3:return[4,i.send(s,c,t.customReqOpts)];case 4:a=l.sent(),l.label=5;case 5:return[2,B(e,null,a)];case 6:return u=l.sent(),[2,B(e,u)];case 7:return[2]}}))}))},t.prototype.deleteFile=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o,i,s,a,c,u;return T(this,(function(l){switch(l.label){case 0:if(!(r=t.fileList)||!k(r)||0===r.length)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".deleteFile] fileList must not be empty")}));for(n=0,o=r;n<o.length;n++)if(!(i=o[n])||!q(i))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".deleteFile] fileID must be string")}));return s="storage.batchDeleteFile",a=this.request,c={},this.isGateWay()?[4,G(a,{fileList:r},t.customReqOpts)]:[3,2];case 1:return c=l.sent(),[3,4];case 2:return[4,a.send(s,{fileid_list:r},t.customReqOpts)];case 3:c=l.sent(),l.label=4;case 4:return c.code?[2,B(e,null,c)]:(u={fileList:c.data.delete_list,requestId:c.requestId},[2,B(e,null,u)])}}))}))},t.prototype.getTempFileURL=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o,i,s,a,c,u;return T(this,(function(l){switch(l.label){case 0:if(!(r=t.fileList)||!k(r)||0===r.length)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".getTempFileURL] fileList must not be empty")}));for(n=[],o=0,i=r;o<i.length;o++)if(s=i[o],d=s,"[object Object]"===Object.prototype.toString.call(d)){if(!Object.prototype.hasOwnProperty.call(s,"fileID"))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".getTempFileURL] file info must include fileID")}));n.push({fileid:s.fileID,max_age:s.maxAge||7200})}else{if(!q(s))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".getTempFileURL] invalid fileList")}));n.push({fileid:s})}return a="storage.batchGetDownloadUrl",c=this.request,u={},this.isGateWay()?[4,z(c,{convertedFileList:n},t.customReqOpts)]:[3,2];case 1:return u=l.sent(),[3,4];case 2:return[4,c.send(a,{file_list:n},t.customReqOpts)];case 3:u=l.sent(),l.label=4;case 4:return u.code?[2,B(e,null,u)]:[2,B(e,null,{fileList:u.data.download_list,requestId:u.requestId})]}var d}))}))},t.prototype.downloadFile=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o,i,s,a;return T(this,(function(c){switch(c.label){case 0:if(r=t.fileID,!q(r))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".getTempFileURL] fileID must be string")}));return[4,this.getTempFileURL.call(this,{fileList:[{fileID:r,maxAge:600}],customReqOpts:t.customReqOpts})];case 1:return n=c.sent(),"SUCCESS"!==(o=n.fileList[0]).code?[2,B(e,o)]:(i=this.request,s=encodeURI(o.download_url),[4,i.download({url:s,tempFilePath:t.tempFilePath})]);case 2:return a=c.sent(),[2,B(e,null,a)]}}))}))},t.prototype.copyFile=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o,i,s,a,c,u,l;return T(this,(function(d){switch(d.label){case 0:if(!(r=t.fileList)||!k(r)||0===r.length)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".copyFile] fileList must not be empty")}));for(n=[],o=0,i=r;o<i.length;o++){if(s=i[o],a=s.srcPath,c=s.dstPath,!a||!c||"string"!=typeof a||"string"!=typeof c)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".copyFile] srcPath and dstPath may not be empty")}));if(a===c)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(V,".copyFile] srcPath and dstPath can not be the same")}));n.push({src_path:a,dst_path:c,overwrite:s.overwrite,remove_original:s.removeOriginal})}return u=this.request,l={},this.isGateWay()?[4,H(u,{convertedFileList:n},t.customReqOpts)]:[3,2];case 1:return l=d.sent(),[3,4];case 2:return[4,u.send("storage.batchCopyFile",{file_list:n},t.customReqOpts)];case 3:l=d.sent(),d.label=4;case 4:return l.code?[2,B(e,null,l)]:[2,B(e,null,{fileList:l.data.copy_list,requestId:l.requestId})]}}))}))},t.prototype.getFileInfo=function(t){var e;return N(this,void 0,void 0,(function(){var r,n=this;return T(this,(function(o){switch(o.label){case 0:return[4,this.getTempFileURL(t)];case 1:return(null==(r=o.sent())?void 0:r.fileList)&&(null===(e=null==r?void 0:r.fileList)||void 0===e?void 0:e.length)>0?[4,Promise.all(r.fileList.map((function(t){return N(n,void 0,void 0,(function(){var e,r,n,o,i;return T(this,(function(s){switch(s.label){case 0:if("SUCCESS"!==t.code)return[2,{code:t.code,fileID:t.fileID,tempFileURL:t.tempFileURL,message:t.message}];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request.fetch({url:t.tempFileURL,method:"HEAD"})];case 2:return e=s.sent(),r=e.header,Headers&&r instanceof Headers&&(r=Object.fromEntries(e.header.entries())),n=parseInt(r["content-length"])||0,o=r["content-type"]||"",[400,404].includes(Number(e.statusCode))?[2,{code:"FILE_NOT_FOUND",fileID:t.fileID,tempFileURL:t.tempFileURL,message:"file not found"}]:[2,{code:t.code,fileID:t.fileID,tempFileURL:t.tempFileURL,cloudId:t.fileID,fileName:t.fileID.split("/").pop(),contentType:o,mime:o.split(";")[0].trim(),size:n,etag:r.etag||"",lastModified:r["last-modified"]||"",cacheControl:r["cache-control"]||""}];case 3:return i=s.sent(),[2,{code:"FETCH_FILE_INFO_ERROR",fileID:t.fileID,tempFileURL:t.tempFileURL,message:i.message}];case 4:return[2]}}))}))})))]:[3,3];case 2:return[2,{fileList:o.sent(),requestId:r.requestId}];case 3:return[2,{fileList:[],requestId:r.requestId}]}}))}))},U([W({customInfo:{className:"Cloudbase",methodName:"uploadFile"},title:"上传文件失败",messages:["请确认以下各项:"," 1 - 调用 uploadFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"uploadFile",null),U([W({customInfo:{className:"Cloudbase",methodName:"getUploadMetadata"},title:"获取上传元信息失败",messages:["请确认以下各项:"," 1 - 调用 getUploadMetadata() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"getUploadMetadata",null),U([W({customInfo:{className:"Cloudbase",methodName:"deleteFile"},title:"删除文件失败",messages:["请确认以下各项:"," 1 - 调用 deleteFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"deleteFile",null),U([W({customInfo:{className:"Cloudbase",methodName:"getTempFileURL"},title:"获取文件下载链接",messages:["请确认以下各项:"," 1 - 调用 getTempFileURL() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"getTempFileURL",null),U([W({customInfo:{className:"Cloudbase",methodName:"downloadFile"},title:"下载文件失败",messages:["请确认以下各项:"," 1 - 调用 downloadFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"downloadFile",null),U([W({customInfo:{className:"Cloudbase",methodName:"copyFile"},title:"批量复制文件",messages:["请确认以下各项:"," 1 - 调用 copyFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"copyFile",null),t}(),X=new K,Y={name:V,entity:{uploadFile:X.uploadFile,deleteFile:X.deleteFile,getTempFileURL:X.getTempFileURL,downloadFile:X.downloadFile,getUploadMetadata:X.getUploadMetadata,copyFile:X.copyFile,getFileInfo:X.getFileInfo,isGateWay:X.isGateWay}},Q=function(t){function e(e){var r=t.call(this)||this;return r.shouldThrowOnError=!1,r.bucketId="",r.context=e,r}return E(e,t),Object.defineProperty(e.prototype,"config",{get:function(){var t;return null===(t=this.context)||void 0===t?void 0:t.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){var t;return null===(t=this.context)||void 0===t?void 0:t.request},enumerable:!1,configurable:!0}),e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.from=function(t){return this.bucketId=t||"",this},e.prototype.upload=function(t,e,r){return N(this,void 0,void 0,(function(){var n,o,i,s,c,u,l,d,f;return T(this,(function(p){switch(p.label){case 0:n=C({upsert:!0},r),o=n.cacheControl,i=n.contentType,s=n.metadata,p.label=1;case 1:return p.trys.push([1,3,,4]),c=this._getCloudPath(t),u={cloudPath:c,filePath:e},(o||i||s)&&(l={},o&&(l["cache-control"]=o),i&&(l["content-type"]=i),s&&(l["x-cos-metadata-metadata"]=this.toBase64(JSON.stringify(s))),u.headers=l),[4,this.uploadFile(u)];case 2:if(!(d=p.sent()).fileID)throw new Error(JSON.stringify({code:x.OPERATION_FAIL,msg:"[".concat(V,".update] no fileID returned")}));return[2,{data:{id:d.fileID,path:t,fullPath:t},error:null}];case 3:if(f=p.sent(),this.shouldThrowOnError)throw f;if(a(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}}))}))},e.prototype.uploadToSignedUrl=function(t,e,r,n){return N(this,void 0,void 0,(function(){return T(this,(function(e){return[2,this.upload(t,r,n)]}))}))},e.prototype.createSignedUploadUrl=function(t){return N(this,void 0,void 0,(function(){var e,r,n;return T(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=this._getCloudPath(t),[4,this.getUploadMetadata({cloudPath:e})];case 1:return[2,{data:{signedUrl:(r=o.sent().data).url,token:r.token,path:t,authorization:r.authorization,id:r.fileId,cosFileId:r.cosFileId,downloadUrl:r.download_url},error:null}];case 2:if(n=o.sent(),this.shouldThrowOnError)throw n;return[2,{data:null,error:n instanceof s?n:new s(n.message)}];case 3:return[2]}}))}))},e.prototype.update=function(t,e,r){return N(this,void 0,void 0,(function(){return T(this,(function(n){return[2,this.upload(t,e,C(C({},r),{upsert:!0}))]}))}))},e.prototype.move=function(t,e){return N(this,void 0,void 0,(function(){var r,n;return T(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.copyFile({fileList:[{srcPath:this._getCloudPath(t),dstPath:this._getCloudPath(e),overwrite:!0,removeOriginal:!0}]})];case 1:if((r=o.sent()).fileList[0].code&&"SUCCESS"!==r.fileList[0].code)throw new s(r.fileList[0].message||"Move failed");return[2,{data:{message:"File moved from ".concat(t," to ").concat(e)},error:null}];case 2:if(n=o.sent(),this.shouldThrowOnError)throw n;if(a(n))return[2,{data:null,error:n}];throw n;case 3:return[2]}}))}))},e.prototype.copy=function(t,e){return N(this,void 0,void 0,(function(){var r,n;return T(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.copyFile({fileList:[{srcPath:this._getCloudPath(t),dstPath:this._getCloudPath(e),overwrite:!0,removeOriginal:!1}]})];case 1:if((r=o.sent()).fileList[0].code&&"SUCCESS"!==r.fileList[0].code)throw new s(r.fileList[0].message||"Copy failed");return[2,{data:{path:this._getCloudPath(e)},error:null}];case 2:if(n=o.sent(),this.shouldThrowOnError)throw n;if(a(n))return[2,{data:null,error:n}];throw n;case 3:return[2]}}))}))},e.prototype.createSignedUrl=function(t,e,r){return N(this,void 0,void 0,(function(){var n,o,i,c,u,l,d;return T(this,(function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),n=this._normalizeCloudId(t),[4,this.getTempFileURL({fileList:[{fileID:n,maxAge:e}]})];case 1:if("SUCCESS"!==(o=f.sent()).fileList[0].code)throw new s("Failed to create signed URL: [".concat(o.fileList[0].code,"] ").concat(o.fileList[0].fileID));return i=o.fileList[0].download_url,c=[],void 0!==(null==r?void 0:r.download)&&("string"==typeof r.download?c.push("download=".concat(encodeURIComponent(r.download))):!0===r.download&&c.push("download=true")),(null==r?void 0:r.transform)&&(u=this._transformOptsToQueryString(r.transform))&&c.push(u),c.length>0&&(l=i.includes("?")?"&":"?",i="".concat(i).concat(l).concat(c.join("&"))),[2,{data:{signedUrl:i},error:null}];case 2:if(d=f.sent(),this.shouldThrowOnError)throw d;if(a(d))return[2,{data:null,error:d}];throw d;case 3:return[2]}}))}))},e.prototype.createSignedUrls=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o=this;return T(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),r=t.map((function(t){return{fileID:o._normalizeCloudId(t),maxAge:e}})),[4,this.getTempFileURL({fileList:r})];case 1:return[2,{data:i.sent().fileList.map((function(e,r){return{path:t[r],signedUrl:e.tempFileURL||"",error:"SUCCESS"===e.code?null:e.message}})),error:null}];case 2:if(n=i.sent(),this.shouldThrowOnError)throw n;if(a(n))return[2,{data:null,error:n}];throw n;case 3:return[2]}}))}))},e.prototype.download=function(t,e){return N(this,void 0,void 0,(function(){var r,n,o=this;return T(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),n={},[4,N(o,void 0,void 0,(function(){var r,n,o,i;return T(this,(function(a){switch(a.label){case 0:return[4,this.createSignedUrl(t,600,{transform:e})];case 1:if((r=a.sent()).error)throw r.error;return n=encodeURI(null===(i=r.data)||void 0===i?void 0:i.signedUrl),[4,this.request.reqClass.get({url:n,headers:{},responseType:"blob"})];case 2:if(!(o=a.sent().data))throw new s("Download failed: no file content");return[2,new Blob([o])]}}))}))];case 1:return[2,(n.data=i.sent(),n.error=null,n)];case 2:if(r=i.sent(),this.shouldThrowOnError)throw r;if(a(r))return[2,{data:null,error:r}];throw r;case 3:return[2]}}))}))},e.prototype.info=function(t){return N(this,void 0,void 0,(function(){var e,r,n,o,i,a,c,u;return T(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),e=t.startsWith("cloud://"),r=e?this._extractPathFromFileId(t):t,n=e?this._extractBucketFromFileId(t):this.bucketId,[4,this.getFileInfo({fileList:[this._normalizeCloudId(t)]})];case 1:if(o=l.sent(),"SUCCESS"!==(i=o.fileList[0]).code)throw new s(i.message);return a=(new Date).toISOString(),c=(i.lastModified?new Date(i.lastModified):new Date).toISOString(),[2,{data:{id:i.fileID,version:"1",name:r,bucketId:n,updatedAt:c,createdAt:c,lastAccessedAt:a,size:i.size,cacheControl:i.cacheControl,contentType:i.contentType,etag:i.etag,lastModified:c,metadata:{}},error:null}];case 2:if(u=l.sent(),this.shouldThrowOnError)throw u;return[2,{data:null,error:u instanceof s?u:new s(u.message)}];case 3:return[2]}}))}))},e.prototype.exists=function(t){return N(this,void 0,void 0,(function(){var e,r,n;return T(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getFileInfo({fileList:[this._normalizeCloudId(t)]})];case 1:if(e=o.sent(),"FILE_NOT_FOUND"===(r=e.fileList[0]).code)return[2,{data:!1,error:null}];if("SUCCESS"!==r.code)throw new s(r.message);return[2,{data:!0,error:null}];case 2:if(n=o.sent(),this.shouldThrowOnError)throw n;if(a(n))return[2,{data:null,error:n}];throw n;case 3:return[2]}}))}))},e.prototype.getPublicUrl=function(t,e){return N(this,void 0,void 0,(function(){var r;return T(this,(function(n){switch(n.label){case 0:return[4,this.createSignedUrl(t,600,e)];case 1:return(r=n.sent()).data?[2,{data:{publicUrl:r.data.signedUrl}}]:[2,{data:null,error:r.error}]}}))}))},e.prototype.remove=function(t){return N(this,void 0,void 0,(function(){var e,r,n,o,i,c,u,l,d,f,p=this;return T(this,(function(h){switch(h.label){case 0:for(h.trys.push([0,3,,4]),e=10,r=[],n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return[4,Promise.all(r.map((function(t){return Promise.all(t.map((function(t){return p.info(t)})))})))];case 1:return o=h.sent(),i=new Map,o.flat().forEach((function(r,n){r.data&&i.set(t[Math.floor(n/e)*e+n%e],r.data)})),c=t.map((function(t){return p._normalizeCloudId(t)})),[4,this.deleteFile({fileList:c})];case 2:if(u=h.sent(),(l=u.fileList.filter((function(t){return"SUCCESS"!==t.code}))).length>0)throw new s("Delete failed for ".concat(l.length," file(s)"));return d=(new Date).toISOString(),[2,{data:t.map((function(t){var e=i.get(t);return{name:null==e?void 0:e.name,id:null==e?void 0:e.id,bucket_id:null==e?void 0:e.bucketId,owner:void 0,updated_at:(null==e?void 0:e.updatedAt)||d,created_at:null==e?void 0:e.createdAt,last_accessed_at:(null==e?void 0:e.lastAccessedAt)||d,metadata:(null==e?void 0:e.metadata)||{},buckets:{id:null==e?void 0:e.bucketId,name:null==e?void 0:e.bucketId,owner:void 0,public:!1,created_at:"",updated_at:d}}})),error:null}];case 3:if(f=h.sent(),this.shouldThrowOnError)throw f;if(a(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}}))}))},e.prototype.list=function(){return N(this,void 0,void 0,(function(){return T(this,(function(t){throw new s("Not implemented")}))}))},e.prototype._getCloudPath=function(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")},e.prototype._normalizeCloudId=function(t){var e;if(/^cloud:\/\//.test(t))return t;var r=this._getCloudPath(t);if(!this.bucketId)throw new s("bucketId is not set");var n=(null===(e=this.config)||void 0===e?void 0:e.env)||"";return n?"cloud://".concat(n,".").concat(this.bucketId,"/").concat(r):void 0},e.prototype.toBase64=function(t){return"undefined"!=typeof Buffer?Buffer.from(t).toString("base64"):btoa(t)},e.prototype._transformOptsToQueryString=function(t){var e=["imageMogr2"];if(t.width||t.height){var r=t.width||"",n=t.height||"";"fill"===t.resize?e.push("thumbnail/".concat(r,"x").concat(n,"!")):"contain"===t.resize?e.push("thumbnail/".concat(r,"x").concat(n)):e.push("thumbnail/".concat(r,"x").concat(n,"^"))}if(t.format&&"origin"!==t.format&&e.push("format/".concat(t.format)),void 0!==t.quality){var o=Math.max(1,Math.min(100,t.quality));e.push("quality/".concat(o))}return e.join("/")},e.prototype._extractPathFromFileId=function(t){var e=t.replace(/^cloud:\/\//,"").split("/");return e.length<2?t:e.slice(1).join("/")},e.prototype._extractBucketFromFileId=function(t){var e=t.replace(/^cloud:\/\//,"").split("/");if(e.length<1)return"";var r=e[0],n=r.indexOf(".");return-1===n?r:r.substring(n+1)},e}(K),$={name:"".concat(V,"/supabase"),IIFE:!0,entity:function(){var t=new WeakMap;Object.defineProperty(this.prototype,"storage",{get:function(){if(t.has(this))return t.get(this);var e=this,r=new Proxy({},{get:function(t,r){return"config"===r?e.config:"request"===r?e.request:void 0}}),n=new Q(r);return t.set(this,n),n},configurable:!0,enumerable:!0})}};try{cloudbase.registerComponent(Y),cloudbase.registerComponent($)}catch(P){}function Z(t){try{t.registerComponent(Y),t.registerComponent($)}catch(t){console.warn(t)}}try{window.registerStorage=Z}catch(P){}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.registerStorage=void 0;var e=r(272);t.registerStorage=e.registerStorage})(),n})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cloudbase_storage",[],e):"object"==typeof exports?exports.cloudbase_storage=e():t.cloudbase_storage=e()}("undefined"!=typeof window?window:this,(()=>(()=>{"use strict";var t={272:(t,e,r)=>{r.r(e),r.d(e,{COMPONENT_NAME:()=>J,CloudbaseStorage:()=>K,SupabaseFileAPILikeStorage:()=>Q,registerStorage:()=>Z});var o,n,i=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=function(t){function e(e){var r=t.call(this,e)||this;return r.__isStorageError=!0,r.name="StorageError",r}return i(e,t),e}(Error);function a(t){return"object"==typeof t&&null!==t&&"__isStorageError"in t}(function(t){function e(e,r,o){var n=t.call(this,e)||this;return n.name="StorageApiError",n.status=r,n.statusCode=o,n}i(e,t),e.prototype.toJSON=function(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}})(s),i((function(t,e){var r=n.call(this,t)||this;return r.name="StorageUnknownError",r.originalError=e,r}),n=s);var c="@cloudbase/js-sdk";function u(){return c}var l,d={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"};!function(t){t.local="local",t.none="none",t.session="session"}(l||(l={}));function f(t){return"string"==typeof t}function p(t,e){console.warn("[".concat(u(),"][").concat(t,"]:").concat(e))}var h,y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),m=function(){return m=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},m.apply(this,arguments)},g=function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))},v=function(t,e){var r,o,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(6===a[0]&&s.label<n[1]){s.label=n[1],n=a;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(a);break}n[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],o=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};!function(t){function e(e){var r=t.call(this)||this,o=e.timeout,n=e.timeoutMsg,i=e.restrictedMethods;return r.timeout=o||0,r.timeoutMsg=n||"请求超时",r.restrictedMethods=i||["get","post","upload","download"],r}y(e,t),e.prototype.get=function(t){return this.request(m(m({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(m(m({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(m(m({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,r=t.file,o=t.name,n=t.method,i=t.headers,s=void 0===i?{}:i,a={post:"post",put:"put"}[null==n?void 0:n.toLowerCase()]||"put",c=new FormData;return"post"===a?(Object.keys(e).forEach((function(t){c.append(t,e[t])})),c.append("key",o),c.append("file",r),this.request(m(m({},t),{data:c,method:a}),this.restrictedMethods.includes("upload"))):this.request(m(m({},t),{method:"put",headers:s,body:r}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return g(this,void 0,void 0,(function(){var e,r,o,n;return v(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.get(m(m({},t),{headers:{},responseType:"blob"}))];case 1:return e=i.sent().data,r=window.URL.createObjectURL(new Blob([e])),o=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(n=document.createElement("a")).href=r,n.setAttribute("download",o),n.style.display="none",document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n),[3,3];case 2:return i.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return g(this,void 0,void 0,(function(){var r,o,n,i,s,a,c,u,l,d,f,p,h,y=this;return v(this,(function(w){switch(w.label){case 0:return r=new AbortController,o=t.url,n=t.enableAbort,i=void 0!==n&&n,s=t.stream,a=void 0!==s&&s,c=t.signal,u=t.timeout,l=t.shouldThrowOnError,d=void 0===l||l,f=null!=u?u:this.timeout,c&&(c.aborted&&r.abort(),c.addEventListener("abort",(function(){return r.abort()}))),p=null,i&&f&&(p=setTimeout((function(){console.warn(y.timeoutMsg),r.abort(new Error(y.timeoutMsg))}),f)),[4,fetch(o,m(m({},t),{signal:r.signal})).then((function(t){return g(y,void 0,void 0,(function(){var e,r,o;return v(this,(function(n){switch(n.label){case 0:return clearTimeout(p),d?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return o=(r=Promise).reject,[4,t.json()];case 2:e=o.apply(r,[n.sent()]),n.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){if(clearTimeout(p),d)return Promise.reject(t)}))];case 1:return h=w.sent(),[2,{data:a?h.body:(null===(e=h.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?h.json():h.text(),statusCode:h.status,header:h.headers}]}}))}))},e.prototype.request=function(t,e){var r=this;void 0===e&&(e=!1);var o=String(t.method).toLowerCase()||"get";return new Promise((function(n){var i,s,a,c=t.url,u=t.headers,l=void 0===u?{}:u,d=t.data,f=t.responseType,p=t.withCredentials,h=t.body,y=t.onUploadProgress,m=function(t,e,r){void 0===r&&(r={});var o=/\?/.test(e),n="";return Object.keys(r).forEach((function(t){""===n?!o&&(e+="?"):n+="&",n+="".concat(t,"=").concat(encodeURIComponent(r[t]))})),/^http(s)?:\/\//.test(e+=n)?e:"".concat(t).concat(e)}("https:",c,"get"===o?d:{}),g=new XMLHttpRequest;g.open(o,m),f&&(g.responseType=f),Object.keys(l).forEach((function(t){g.setRequestHeader(t,l[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};e.forEach((function(t){var e=t.split(": "),o=e.shift().toLowerCase(),n=e.join(": ");r[o]=n})),t.header=r,t.statusCode=g.status;try{t.data="blob"===f?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===f?g.response:g.responseText}clearTimeout(i),n(t)}},e&&r.timeout&&(i=setTimeout((function(){console.warn(r.timeoutMsg),g.abort()}),r.timeout)),a=d,s="[object FormData]"===Object.prototype.toString.call(a)?d:"application/x-www-form-urlencoded"===l["content-type"]?function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(r){e.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),e.join("&")}(d):h||(d?JSON.stringify(d):void 0),p&&(g.withCredentials=!0),g.send(s)}))}}((function(){})),function(t){t.WEB="web",t.WX_MP="wx_mp"}(h||(h={}));var w=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),b=function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))},I=function(t,e){var r,o,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(6===a[0]&&s.label<n[1]){s.label=n[1],n=a;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(a);break}n[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],o=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},O=function(t){function e(e){var r=t.call(this)||this;return r.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),r}return w(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}((function(){}));!function(){function t(t){this.keys={};var e=t.persistence,r=t.platformInfo,o=void 0===r?{}:r,n=t.keys,i=void 0===n?{}:n;this.platformInfo=o,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:(p(d.INVALID_PARAMS,"localStorage is not supported on current platform"),new O(e.root));case"none":return new O(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,r){if("async"!==this.mode){if(this.storage)try{var o={version:r||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(o))}catch(t){throw new Error(JSON.stringify({code:d.OPERATION_FAIL,msg:"[".concat(u(),"][").concat(d.OPERATION_FAIL,"]setStore failed"),info:t}))}}else p(d.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,r){return b(this,void 0,void 0,(function(){var o;return I(this,(function(n){switch(n.label){case 0:if(!this.storage)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),o={version:r||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(o))];case 2:return n.sent(),[3,4];case 3:return n.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var r;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(r={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===r?void 0:r.tcb_token))return{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var o=this.storage.getItem(t);return o&&o.indexOf(e)>=0?JSON.parse(o).content:""}p(d.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var r;return b(this,void 0,void 0,(function(){var o;return I(this,(function(n){switch(n.label){case 0:try{if("undefined"!=typeof process&&(null===(r={IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0})||void 0===r?void 0:r.tcb_token))return[2,{IS_MP_BUILD:!0,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(o=n.sent())&&o.indexOf(e)>=0?[2,JSON.parse(o).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):p(d.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return b(this,void 0,void 0,(function(){return I(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))}}();var _=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),S=function(t,e){this.data=e||null,this.name=t},L=function(t){function e(e,r){var o=t.call(this,"error",{error:e,data:r})||this;return o.error=e,o}return _(e,t),e}(S),F=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,r){r[t]=r[t]||[],r[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,r){if(null==r?void 0:r[t]){var o=r[t].indexOf(e);-1!==o&&r[t].splice(o,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if(t instanceof L)return console.error(t.error),this;var r=f(t)?new S(t,e||{}):t,o=r.name;if(this.listens(o)){r.target=this;for(var n=0,i=this.listeners[o]?function(t,e,r){if(r||2===arguments.length)for(var o,n=0,i=e.length;n<i;n++)!o&&n in e||(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}([],this.listeners[o],!0):[];n<i.length;n++)i[n].call(this,r)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();function P(t){this.message=t}function R(t){this.message=t}new F,new F,"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox"),P.prototype=new Error,P.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),R.prototype=new Error,R.prototype.name="InvalidTokenError";var A,E=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),C=function(){return C=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},C.apply(this,arguments)},U=function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},j=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},N=function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))},T=function(t,e){var r,o,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(6===a[0]&&s.label<n[1]){s.label=n[1],n=a;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(a);break}n[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],o=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};!function(t){t.put="put",t.post="post"}(A||(A={}));var D=u,x=d,M="https://support.qq.com/products/148793",k=function(t){return"[object Array]"===Object.prototype.toString.call(t)},q=f,W=function(t,e,r){if(void 0===r&&(r=null),t&&"function"==typeof t)return t(e,r);if(e)throw e;return r},B=function(t){return t.mode,t.customInfo,t.title,t.messages,function(t,e,r){}},J="storage",V=function(t,e,r){return N(void 0,void 0,void 0,(function(){var o,n,i;return T(this,(function(s){switch(s.label){case 0:return[4,t.gateWay({path:"storages",name:"get-objects-upload-info",data:[C({objectId:e.path},e.headers?{signedHeader:Object.keys(e.headers).reduce((function(t,r){var o;return C(C({},t),((o={})[r]=[e.headers[r]],o))}),{})}:{})]},r)];case 1:return o=s.sent(),n=(null===(i=o.data)||void 0===i?void 0:i[0])||{},[2,o=C(C({},o),{data:C(C({},n.code?C({},n):{}),{authorization:n.authorization,token:n.token,url:n.uploadUrl,fileId:n.cloudObjectId,cosFileId:n.cloudObjectMeta,download_url:n.downloadUrl})})]}}))}))},z=function(t,e,r){return N(void 0,void 0,void 0,(function(){var o,n;return T(this,(function(i){switch(i.label){case 0:return[4,t.gateWay({path:"storages",name:"get-objects-download-info",data:e.convertedFileList.map((function(t){return{cloudObjectId:t.fileid}}))},r)];case 1:return o=i.sent(),[2,o=C(C({},o),{data:{download_list:null===(n=o.data)||void 0===n?void 0:n.map((function(t){return{code:t.code||"SUCCESS",message:t.message,fileid:t.cloudObjectId,download_url:t.downloadUrl,fileID:t.cloudObjectId,tempFileURL:t.downloadUrl}}))}})]}}))}))},G=function(t,e,r){return N(void 0,void 0,void 0,(function(){var o,n;return T(this,(function(i){switch(i.label){case 0:return[4,t.gateWay({path:"storages",name:"delete-objects",data:e.fileList.map((function(t){return{cloudObjectId:t}}))},r)];case 1:return o=i.sent(),[2,o=C(C({},o),{data:{delete_list:null===(n=o.data)||void 0===n?void 0:n.map((function(t){return{code:t.code||"SUCCESS",fileID:t.cloudObjectId,message:t.message}}))}})]}}))}))},H=function(t,e,r){return N(void 0,void 0,void 0,(function(){var o,n;return T(this,(function(i){switch(i.label){case 0:return[4,t.gateWay({path:"storages",name:"copy-objects",data:e.convertedFileList.map((function(t){return{srcPath:t.src_path,dstPath:t.dst_path,overwrite:t.overwrite,removeOriginal:t.remove_original}}))},r)];case 1:return o=i.sent(),[2,o=C(C({},o),{data:{copy_list:null===(n=o.data)||void 0===n?void 0:n.map((function(t){return{code:t.code||"SUCCESS",fileID:t.cloudObjectId,message:t.message}}))}})]}}))}))},K=function(){function t(){}return t.prototype.isGateWay=function(){return"GATEWAY"===(this.config.endPointMode||"CLOUD_API")},t.prototype.uploadFile=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n,i,s,a,c,u,l,d,f,p,h,y,m,g,v,w,b,I,O,_,S,L;return T(this,(function(F){switch(F.label){case 0:if(r=t.cloudPath,o=t.filePath,n=t.onUploadProgress,_=t.method,i=void 0===_?"put":_,S=t.headers,s=void 0===S?{}:S,a=t.fileContent,!q(r)||!o&&!a)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".uploadFile] invalid params")}));return c={put:A.put,post:A.post}[i.toLocaleLowerCase()]||A.put,[4,this.getUploadMetadata({cloudPath:r,method:c,headers:c===A.put?s:void 0,customReqOpts:t.customReqOpts})];case 1:return u=F.sent(),l=u.data,d=u.requestId,f=l.url,p=l.authorization,h=l.token,y=l.fileId,m=l.cosFileId,g=l.download_url,w=C(C({},v={url:f,file:o,name:r,onUploadProgress:n,fileContent:a,fileId:y,requestId:d}),{method:A.put,headers:C(C({},s),{authorization:p,"x-cos-meta-fileid":m,"x-cos-security-token":h})}),b=C(C({},v),{method:A.post,data:{key:r,signature:p,"x-cos-meta-fileid":m,success_action_status:"201","x-cos-security-token":h}}),(L={})[A.put]={params:w,isSuccess:function(t){return t>=200&&t<300}},L[A.post]={params:b,isSuccess:function(t){return 201===t}},I=L,[4,this.request.upload(I[c].params)];case 2:return O=F.sent(),I[c].isSuccess(O.statusCode)?[2,W(e,null,{fileID:y,download_url:g,requestId:d})]:[2,W(e,new Error("[".concat(D(),"][").concat(x.OPERATION_FAIL,"][").concat(J,"]:").concat(O.data)))]}}))}))},t.prototype.getUploadMetadata=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n,i,s,a,c,u;return T(this,(function(l){switch(l.label){case 0:if(r=t.cloudPath,o=t.method,n=t.headers,!q(r))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".getUploadMetadata] invalid cloudPath")}));i=this.request,s="storage.getUploadMetadata",l.label=1;case 1:return l.trys.push([1,6,,7]),a=void 0,c={path:r},o&&(c.method=o),o===A.put&&n&&(c.headers=n),this.isGateWay()?[4,V(i,c,t.customReqOpts)]:[3,3];case 2:return a=l.sent(),[3,5];case 3:return[4,i.send(s,c,t.customReqOpts)];case 4:a=l.sent(),l.label=5;case 5:return[2,W(e,null,a)];case 6:return u=l.sent(),[2,W(e,u)];case 7:return[2]}}))}))},t.prototype.deleteFile=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n,i,s,a,c,u;return T(this,(function(l){switch(l.label){case 0:if(!(r=t.fileList)||!k(r)||0===r.length)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".deleteFile] fileList must not be empty")}));for(o=0,n=r;o<n.length;o++)if(!(i=n[o])||!q(i))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".deleteFile] fileID must be string")}));return s="storage.batchDeleteFile",a=this.request,c={},this.isGateWay()?[4,G(a,{fileList:r},t.customReqOpts)]:[3,2];case 1:return c=l.sent(),[3,4];case 2:return[4,a.send(s,{fileid_list:r},t.customReqOpts)];case 3:c=l.sent(),l.label=4;case 4:return c.code?[2,W(e,null,c)]:(u={fileList:c.data.delete_list,requestId:c.requestId},[2,W(e,null,u)])}}))}))},t.prototype.getTempFileURL=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n,i,s,a,c,u;return T(this,(function(l){switch(l.label){case 0:if(!(r=t.fileList)||!k(r)||0===r.length)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".getTempFileURL] fileList must not be empty")}));for(o=[],n=0,i=r;n<i.length;n++)if(s=i[n],d=s,"[object Object]"===Object.prototype.toString.call(d)){if(!Object.prototype.hasOwnProperty.call(s,"fileID"))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".getTempFileURL] file info must include fileID")}));o.push({fileid:s.fileID,max_age:s.maxAge||7200})}else{if(!q(s))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".getTempFileURL] invalid fileList")}));o.push({fileid:s})}return a="storage.batchGetDownloadUrl",c=this.request,u={},this.isGateWay()?[4,z(c,{convertedFileList:o},t.customReqOpts)]:[3,2];case 1:return u=l.sent(),[3,4];case 2:return[4,c.send(a,{file_list:o},t.customReqOpts)];case 3:u=l.sent(),l.label=4;case 4:return u.code?[2,W(e,null,u)]:[2,W(e,null,{fileList:u.data.download_list,requestId:u.requestId})]}var d}))}))},t.prototype.downloadFile=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n,i,s,a;return T(this,(function(c){switch(c.label){case 0:if(r=t.fileID,!q(r))throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".getTempFileURL] fileID must be string")}));return[4,this.getTempFileURL.call(this,{fileList:[{fileID:r,maxAge:600}],customReqOpts:t.customReqOpts})];case 1:return o=c.sent(),"SUCCESS"!==(n=o.fileList[0]).code?[2,W(e,n)]:(i=this.request,s=encodeURI(n.download_url),[4,i.download({url:s,tempFilePath:t.tempFilePath})]);case 2:return a=c.sent(),[2,W(e,null,a)]}}))}))},t.prototype.copyFile=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n,i,s,a,c,u,l;return T(this,(function(d){switch(d.label){case 0:if(!(r=t.fileList)||!k(r)||0===r.length)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".copyFile] fileList must not be empty")}));for(o=[],n=0,i=r;n<i.length;n++){if(s=i[n],a=s.srcPath,c=s.dstPath,!a||!c||"string"!=typeof a||"string"!=typeof c)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".copyFile] srcPath and dstPath may not be empty")}));if(a===c)throw new Error(JSON.stringify({code:x.INVALID_PARAMS,msg:"[".concat(J,".copyFile] srcPath and dstPath can not be the same")}));o.push({src_path:a,dst_path:c,overwrite:s.overwrite,remove_original:s.removeOriginal})}return u=this.request,l={},this.isGateWay()?[4,H(u,{convertedFileList:o},t.customReqOpts)]:[3,2];case 1:return l=d.sent(),[3,4];case 2:return[4,u.send("storage.batchCopyFile",{file_list:o},t.customReqOpts)];case 3:l=d.sent(),d.label=4;case 4:return l.code?[2,W(e,null,l)]:[2,W(e,null,{fileList:l.data.copy_list,requestId:l.requestId})]}}))}))},t.prototype.getFileInfo=function(t){var e;return N(this,void 0,void 0,(function(){var r,o=this;return T(this,(function(n){switch(n.label){case 0:return[4,this.getTempFileURL(t)];case 1:return(null==(r=n.sent())?void 0:r.fileList)&&(null===(e=null==r?void 0:r.fileList)||void 0===e?void 0:e.length)>0?[4,Promise.all(r.fileList.map((function(t){return N(o,void 0,void 0,(function(){var e,r,o,n,i;return T(this,(function(s){switch(s.label){case 0:if("SUCCESS"!==t.code)return[2,{code:t.code,fileID:t.fileID,tempFileURL:t.tempFileURL,message:t.message}];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request.fetch({url:t.tempFileURL,method:"HEAD"})];case 2:return e=s.sent(),r=e.header,Headers&&r instanceof Headers&&(r=Object.fromEntries(e.header.entries())),o=parseInt(r["content-length"])||0,n=r["content-type"]||"",[400,404].includes(Number(e.statusCode))?[2,{code:"FILE_NOT_FOUND",fileID:t.fileID,tempFileURL:t.tempFileURL,message:"file not found"}]:[2,{code:t.code,fileID:t.fileID,tempFileURL:t.tempFileURL,cloudId:t.fileID,fileName:t.fileID.split("/").pop(),contentType:n,mime:n.split(";")[0].trim(),size:o,etag:r.etag||"",lastModified:r["last-modified"]||"",cacheControl:r["cache-control"]||""}];case 3:return i=s.sent(),[2,{code:"FETCH_FILE_INFO_ERROR",fileID:t.fileID,tempFileURL:t.tempFileURL,message:i.message}];case 4:return[2]}}))}))})))]:[3,3];case 2:return[2,{fileList:n.sent(),requestId:r.requestId}];case 3:return[2,{fileList:[],requestId:r.requestId}]}}))}))},U([B({customInfo:{className:"Cloudbase",methodName:"uploadFile"},title:"上传文件失败",messages:["请确认以下各项:"," 1 - 调用 uploadFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"uploadFile",null),U([B({customInfo:{className:"Cloudbase",methodName:"getUploadMetadata"},title:"获取上传元信息失败",messages:["请确认以下各项:"," 1 - 调用 getUploadMetadata() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"getUploadMetadata",null),U([B({customInfo:{className:"Cloudbase",methodName:"deleteFile"},title:"删除文件失败",messages:["请确认以下各项:"," 1 - 调用 deleteFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"deleteFile",null),U([B({customInfo:{className:"Cloudbase",methodName:"getTempFileURL"},title:"获取文件下载链接",messages:["请确认以下各项:"," 1 - 调用 getTempFileURL() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"getTempFileURL",null),U([B({customInfo:{className:"Cloudbase",methodName:"downloadFile"},title:"下载文件失败",messages:["请确认以下各项:"," 1 - 调用 downloadFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"downloadFile",null),U([B({customInfo:{className:"Cloudbase",methodName:"copyFile"},title:"批量复制文件",messages:["请确认以下各项:"," 1 - 调用 copyFile() 的语法或参数是否正确"," 2 - 当前域名是否在安全域名列表中:https://console.cloud.tencent.com/tcb/env/safety"," 3 - 云存储安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(M)]}),j("design:type",Function),j("design:paramtypes",[Object,Function]),j("design:returntype",Promise)],t.prototype,"copyFile",null),t}(),X=new K,Y={name:J,entity:{uploadFile:X.uploadFile,deleteFile:X.deleteFile,getTempFileURL:X.getTempFileURL,downloadFile:X.downloadFile,getUploadMetadata:X.getUploadMetadata,copyFile:X.copyFile,getFileInfo:X.getFileInfo,isGateWay:X.isGateWay}},Q=function(t){function e(e){var r=t.call(this)||this;return r.shouldThrowOnError=!1,r.bucketId="",r.context=e,r}return E(e,t),Object.defineProperty(e.prototype,"config",{get:function(){var t;return null===(t=this.context)||void 0===t?void 0:t.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){var t;return null===(t=this.context)||void 0===t?void 0:t.request},enumerable:!1,configurable:!0}),e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.from=function(t){return this.bucketId=t||"",this},e.prototype.upload=function(t,e,r){return N(this,void 0,void 0,(function(){var o,n,i,s,c,u,l,d,f;return T(this,(function(p){switch(p.label){case 0:o=C({upsert:!0},r),n=o.cacheControl,i=o.contentType,s=o.metadata,p.label=1;case 1:return p.trys.push([1,3,,4]),c=this._getCloudPath(t),u={cloudPath:c,filePath:e},(n||i||s)&&(l={},n&&(l["cache-control"]=n),i&&(l["content-type"]=i),s&&(l["x-cos-metadata-metadata"]=this.toBase64(JSON.stringify(s))),u.headers=l),[4,this.uploadFile(u)];case 2:if(!(d=p.sent()).fileID)throw new Error(JSON.stringify({code:x.OPERATION_FAIL,msg:"[".concat(J,".update] no fileID returned")}));return[2,{data:{id:d.fileID,path:t,fullPath:t},error:null}];case 3:if(f=p.sent(),this.shouldThrowOnError)throw f;if(a(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}}))}))},e.prototype.uploadToSignedUrl=function(t,e,r,o){return N(this,void 0,void 0,(function(){return T(this,(function(e){return[2,this.upload(t,r,o)]}))}))},e.prototype.createSignedUploadUrl=function(t){return N(this,void 0,void 0,(function(){var e,r,o;return T(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this._getCloudPath(t),[4,this.getUploadMetadata({cloudPath:e})];case 1:return[2,{data:{signedUrl:(r=n.sent().data).url,token:r.token,path:t,authorization:r.authorization,id:r.fileId,cosFileId:r.cosFileId,downloadUrl:r.download_url},error:null}];case 2:if(o=n.sent(),this.shouldThrowOnError)throw o;return[2,{data:null,error:o instanceof s?o:new s(o.message)}];case 3:return[2]}}))}))},e.prototype.update=function(t,e,r){return N(this,void 0,void 0,(function(){return T(this,(function(o){return[2,this.upload(t,e,C(C({},r),{upsert:!0}))]}))}))},e.prototype.move=function(t,e){return N(this,void 0,void 0,(function(){var r,o;return T(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.copyFile({fileList:[{srcPath:this._getCloudPath(t),dstPath:this._getCloudPath(e),overwrite:!0,removeOriginal:!0}]})];case 1:if((r=n.sent()).fileList[0].code&&"SUCCESS"!==r.fileList[0].code)throw new s(r.fileList[0].message||"Move failed");return[2,{data:{message:"File moved from ".concat(t," to ").concat(e)},error:null}];case 2:if(o=n.sent(),this.shouldThrowOnError)throw o;if(a(o))return[2,{data:null,error:o}];throw o;case 3:return[2]}}))}))},e.prototype.copy=function(t,e){return N(this,void 0,void 0,(function(){var r,o;return T(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.copyFile({fileList:[{srcPath:this._getCloudPath(t),dstPath:this._getCloudPath(e),overwrite:!0,removeOriginal:!1}]})];case 1:if((r=n.sent()).fileList[0].code&&"SUCCESS"!==r.fileList[0].code)throw new s(r.fileList[0].message||"Copy failed");return[2,{data:{path:this._getCloudPath(e)},error:null}];case 2:if(o=n.sent(),this.shouldThrowOnError)throw o;if(a(o))return[2,{data:null,error:o}];throw o;case 3:return[2]}}))}))},e.prototype.createSignedUrl=function(t,e,r){return N(this,void 0,void 0,(function(){var o,n,i,c,u,l,d;return T(this,(function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),o=this._normalizeCloudId(t),[4,this.getTempFileURL({fileList:[{fileID:o,maxAge:e}]})];case 1:if("SUCCESS"!==(n=f.sent()).fileList[0].code)throw new s("Failed to create signed URL: [".concat(n.fileList[0].code,"] ").concat(n.fileList[0].fileID));return i=n.fileList[0].download_url,c=[],void 0!==(null==r?void 0:r.download)&&("string"==typeof r.download?c.push("download=".concat(encodeURIComponent(r.download))):!0===r.download&&c.push("download=true")),(null==r?void 0:r.transform)&&(u=this._transformOptsToQueryString(r.transform))&&c.push(u),c.length>0&&(l=i.includes("?")?"&":"?",i="".concat(i).concat(l).concat(c.join("&"))),[2,{data:{signedUrl:i},error:null}];case 2:if(d=f.sent(),this.shouldThrowOnError)throw d;if(a(d))return[2,{data:null,error:d}];throw d;case 3:return[2]}}))}))},e.prototype.createSignedUrls=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n=this;return T(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),r=t.map((function(t){return{fileID:n._normalizeCloudId(t),maxAge:e}})),[4,this.getTempFileURL({fileList:r})];case 1:return[2,{data:i.sent().fileList.map((function(e,r){return{path:t[r],signedUrl:e.tempFileURL||"",error:"SUCCESS"===e.code?null:e.message}})),error:null}];case 2:if(o=i.sent(),this.shouldThrowOnError)throw o;if(a(o))return[2,{data:null,error:o}];throw o;case 3:return[2]}}))}))},e.prototype.download=function(t,e){return N(this,void 0,void 0,(function(){var r,o,n=this;return T(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),o={},[4,N(n,void 0,void 0,(function(){var r,o,n,i;return T(this,(function(a){switch(a.label){case 0:return[4,this.createSignedUrl(t,600,{transform:e})];case 1:if((r=a.sent()).error)throw r.error;return o=encodeURI(null===(i=r.data)||void 0===i?void 0:i.signedUrl),[4,this.request.reqClass.get({url:o,headers:{},responseType:"blob"})];case 2:if(!(n=a.sent().data))throw new s("Download failed: no file content");return[2,new Blob([n])]}}))}))];case 1:return[2,(o.data=i.sent(),o.error=null,o)];case 2:if(r=i.sent(),this.shouldThrowOnError)throw r;if(a(r))return[2,{data:null,error:r}];throw r;case 3:return[2]}}))}))},e.prototype.info=function(t){return N(this,void 0,void 0,(function(){var e,r,o,n,i,a,c,u;return T(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),e=t.startsWith("cloud://"),r=e?this._extractPathFromFileId(t):t,o=e?this._extractBucketFromFileId(t):this.bucketId,[4,this.getFileInfo({fileList:[this._normalizeCloudId(t)]})];case 1:if(n=l.sent(),"SUCCESS"!==(i=n.fileList[0]).code)throw new s(i.message);return a=(new Date).toISOString(),c=(i.lastModified?new Date(i.lastModified):new Date).toISOString(),[2,{data:{id:i.fileID,version:"1",name:r,bucketId:o,updatedAt:c,createdAt:c,lastAccessedAt:a,size:i.size,cacheControl:i.cacheControl,contentType:i.contentType,etag:i.etag,lastModified:c,metadata:{}},error:null}];case 2:if(u=l.sent(),this.shouldThrowOnError)throw u;return[2,{data:null,error:u instanceof s?u:new s(u.message)}];case 3:return[2]}}))}))},e.prototype.exists=function(t){return N(this,void 0,void 0,(function(){var e,r,o;return T(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getFileInfo({fileList:[this._normalizeCloudId(t)]})];case 1:if(e=n.sent(),"FILE_NOT_FOUND"===(r=e.fileList[0]).code)return[2,{data:!1,error:null}];if("SUCCESS"!==r.code)throw new s(r.message);return[2,{data:!0,error:null}];case 2:if(o=n.sent(),this.shouldThrowOnError)throw o;if(a(o))return[2,{data:null,error:o}];throw o;case 3:return[2]}}))}))},e.prototype.getPublicUrl=function(t,e){return N(this,void 0,void 0,(function(){var r;return T(this,(function(o){switch(o.label){case 0:return[4,this.createSignedUrl(t,600,e)];case 1:return(r=o.sent()).data?[2,{data:{publicUrl:r.data.signedUrl}}]:[2,{data:null,error:r.error}]}}))}))},e.prototype.remove=function(t){return N(this,void 0,void 0,(function(){var e,r,o,n,i,c,u,l,d,f,p=this;return T(this,(function(h){switch(h.label){case 0:for(h.trys.push([0,3,,4]),e=10,r=[],o=0;o<t.length;o+=e)r.push(t.slice(o,o+e));return[4,Promise.all(r.map((function(t){return Promise.all(t.map((function(t){return p.info(t)})))})))];case 1:return n=h.sent(),i=new Map,n.flat().forEach((function(r,o){r.data&&i.set(t[Math.floor(o/e)*e+o%e],r.data)})),c=t.map((function(t){return p._normalizeCloudId(t)})),[4,this.deleteFile({fileList:c})];case 2:if(u=h.sent(),(l=u.fileList.filter((function(t){return"SUCCESS"!==t.code}))).length>0)throw new s("Delete failed for ".concat(l.length," file(s)"));return d=(new Date).toISOString(),[2,{data:t.map((function(t){var e=i.get(t);return{name:null==e?void 0:e.name,id:null==e?void 0:e.id,bucket_id:null==e?void 0:e.bucketId,owner:void 0,updated_at:(null==e?void 0:e.updatedAt)||d,created_at:null==e?void 0:e.createdAt,last_accessed_at:(null==e?void 0:e.lastAccessedAt)||d,metadata:(null==e?void 0:e.metadata)||{},buckets:{id:null==e?void 0:e.bucketId,name:null==e?void 0:e.bucketId,owner:void 0,public:!1,created_at:"",updated_at:d}}})),error:null}];case 3:if(f=h.sent(),this.shouldThrowOnError)throw f;if(a(f))return[2,{data:null,error:f}];throw f;case 4:return[2]}}))}))},e.prototype.list=function(){return N(this,void 0,void 0,(function(){return T(this,(function(t){throw new s("Not implemented")}))}))},e.prototype._getCloudPath=function(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")},e.prototype._normalizeCloudId=function(t){var e;if(/^cloud:\/\//.test(t))return t;var r=this._getCloudPath(t);if(!this.bucketId)throw new s("bucketId is not set");var o=(null===(e=this.config)||void 0===e?void 0:e.env)||"";return o?"cloud://".concat(o,".").concat(this.bucketId,"/").concat(r):void 0},e.prototype.toBase64=function(t){return"undefined"!=typeof Buffer?Buffer.from(t).toString("base64"):btoa(t)},e.prototype._transformOptsToQueryString=function(t){var e=["imageMogr2"];if(t.width||t.height){var r=t.width||"",o=t.height||"";"fill"===t.resize?e.push("thumbnail/".concat(r,"x").concat(o,"!")):"contain"===t.resize?e.push("thumbnail/".concat(r,"x").concat(o)):e.push("thumbnail/".concat(r,"x").concat(o,"^"))}if(t.format&&"origin"!==t.format&&e.push("format/".concat(t.format)),void 0!==t.quality){var n=Math.max(1,Math.min(100,t.quality));e.push("quality/".concat(n))}return e.join("/")},e.prototype._extractPathFromFileId=function(t){var e=t.replace(/^cloud:\/\//,"").split("/");return e.length<2?t:e.slice(1).join("/")},e.prototype._extractBucketFromFileId=function(t){var e=t.replace(/^cloud:\/\//,"").split("/");if(e.length<1)return"";var r=e[0],o=r.indexOf(".");return-1===o?r:r.substring(o+1)},e}(K),$={name:"".concat(J,"/supabase"),IIFE:!0,entity:function(){var t=new WeakMap;Object.defineProperty(this.prototype,"storage",{get:function(){if(t.has(this))return t.get(this);var e=this,r=new Proxy({},{get:function(t,r){return"config"===r?e.config:"request"===r?e.request:void 0}}),o=new Q(r);return t.set(this,o),o},configurable:!0,enumerable:!0})}};try{cloudbase.registerComponent(Y),cloudbase.registerComponent($)}catch(P){}function Z(t){try{t.registerComponent(Y),t.registerComponent($)}catch(t){console.warn(t)}}try{window.registerStorage=Z}catch(P){}}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{var t=o;Object.defineProperty(t,"__esModule",{value:!0}),t.registerStorage=void 0;var e=r(272);t.registerStorage=e.registerStorage})(),o})()));
|
package/package.json
CHANGED
|
@@ -1,11 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/js-sdk",
|
|
3
|
-
"version": "3.3.14-
|
|
3
|
+
"version": "3.3.14-beta.1",
|
|
4
4
|
"description": "cloudbase javascript sdk",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"miniprogram": "miniprogram_dist",
|
|
8
8
|
"typings": "./index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.esm.js",
|
|
13
|
+
"require": "./dist/index.cjs.js",
|
|
14
|
+
"default": "./dist/index.cjs.js"
|
|
15
|
+
},
|
|
16
|
+
"./auth": {
|
|
17
|
+
"import": "./dist/packages/auth/index.esm.js",
|
|
18
|
+
"require": "./dist/packages/auth/index.cjs.js",
|
|
19
|
+
"default": "./dist/packages/auth/index.cjs.js"
|
|
20
|
+
},
|
|
21
|
+
"./storage": {
|
|
22
|
+
"import": "./dist/packages/storage/index.esm.js",
|
|
23
|
+
"require": "./dist/packages/storage/index.cjs.js",
|
|
24
|
+
"default": "./dist/packages/storage/index.cjs.js"
|
|
25
|
+
},
|
|
26
|
+
"./functions": {
|
|
27
|
+
"import": "./dist/packages/functions/index.esm.js",
|
|
28
|
+
"require": "./dist/packages/functions/index.cjs.js",
|
|
29
|
+
"default": "./dist/packages/functions/index.cjs.js"
|
|
30
|
+
},
|
|
31
|
+
"./realtime": {
|
|
32
|
+
"import": "./dist/packages/realtime/index.esm.js",
|
|
33
|
+
"require": "./dist/packages/realtime/index.cjs.js",
|
|
34
|
+
"default": "./dist/packages/realtime/index.cjs.js"
|
|
35
|
+
},
|
|
36
|
+
"./analytics": {
|
|
37
|
+
"import": "./dist/packages/analytics/index.esm.js",
|
|
38
|
+
"require": "./dist/packages/analytics/index.cjs.js",
|
|
39
|
+
"default": "./dist/packages/analytics/index.cjs.js"
|
|
40
|
+
},
|
|
41
|
+
"./model": {
|
|
42
|
+
"import": "./dist/packages/model/index.esm.js",
|
|
43
|
+
"require": "./dist/packages/model/index.cjs.js",
|
|
44
|
+
"default": "./dist/packages/model/index.cjs.js"
|
|
45
|
+
},
|
|
46
|
+
"./ai": {
|
|
47
|
+
"import": "./dist/packages/ai/index.esm.js",
|
|
48
|
+
"require": "./dist/packages/ai/index.cjs.js",
|
|
49
|
+
"default": "./dist/packages/ai/index.cjs.js"
|
|
50
|
+
},
|
|
51
|
+
"./cloudrun": {
|
|
52
|
+
"import": "./dist/packages/cloudrun/index.esm.js",
|
|
53
|
+
"require": "./dist/packages/cloudrun/index.cjs.js",
|
|
54
|
+
"default": "./dist/packages/cloudrun/index.cjs.js"
|
|
55
|
+
},
|
|
56
|
+
"./package.json": "./package.json"
|
|
57
|
+
},
|
|
9
58
|
"scripts": {
|
|
10
59
|
"lint": "eslint --fix \"./src/**/*.ts\"",
|
|
11
60
|
"build": "rm -rf dist/ && gulp build",
|
|
@@ -31,9 +80,8 @@
|
|
|
31
80
|
],
|
|
32
81
|
"files": [
|
|
33
82
|
"miniprogram_dist",
|
|
34
|
-
"
|
|
83
|
+
"dist/",
|
|
35
84
|
"/index.d.ts",
|
|
36
|
-
"**/package.json",
|
|
37
85
|
"CHANGELOG.md"
|
|
38
86
|
],
|
|
39
87
|
"components": [
|
|
@@ -47,25 +95,28 @@
|
|
|
47
95
|
"license": "Apache-2.0",
|
|
48
96
|
"dependencies": {
|
|
49
97
|
"@cloudbase/adapter-interface": "^0.7.1",
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"@cloudbase/
|
|
54
|
-
"@cloudbase/
|
|
55
|
-
"@cloudbase/
|
|
98
|
+
"bson": "^7.2.0"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@cloudbase/ai": "3.3.14-beta.1",
|
|
102
|
+
"@cloudbase/analytics": "3.3.14-beta.1",
|
|
103
|
+
"@cloudbase/apis": "3.3.14-beta.1",
|
|
104
|
+
"@cloudbase/app": "3.3.14-beta.1",
|
|
105
|
+
"@cloudbase/auth": "3.3.14-beta.1",
|
|
106
|
+
"@cloudbase/cloudrun": "3.3.14-beta.1",
|
|
56
107
|
"@cloudbase/database": "0.12.1",
|
|
57
|
-
"@cloudbase/functions": "3.3.14-
|
|
58
|
-
"@cloudbase/model": "3.3.14-
|
|
59
|
-
"@cloudbase/mysql": "3.3.14-
|
|
60
|
-
"@cloudbase/realtime": "3.3.14-
|
|
61
|
-
"@cloudbase/storage": "3.3.14-
|
|
62
|
-
"@cloudbase/types": "3.3.14-
|
|
63
|
-
"@cloudbase/utilities": "3.3.14-
|
|
108
|
+
"@cloudbase/functions": "3.3.14-beta.1",
|
|
109
|
+
"@cloudbase/model": "3.3.14-beta.1",
|
|
110
|
+
"@cloudbase/mysql": "3.3.14-beta.1",
|
|
111
|
+
"@cloudbase/realtime": "3.3.14-beta.1",
|
|
112
|
+
"@cloudbase/storage": "3.3.14-beta.1",
|
|
113
|
+
"@cloudbase/types": "3.3.14-beta.1",
|
|
114
|
+
"@cloudbase/utilities": "3.3.14-beta.1"
|
|
64
115
|
},
|
|
65
116
|
"browserslist": [
|
|
66
117
|
"last 2 version",
|
|
67
118
|
"> 1%",
|
|
68
119
|
"chrome 53"
|
|
69
120
|
],
|
|
70
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "1ca1f938002b0ee752e6c62726b11d43e84aa2c4"
|
|
71
122
|
}
|
package/ai/dist/index.esm.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from '@cloudbase/ai';
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFBIiwiZmlsZSI6ImluZGV4LmVzbS5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJ0BjbG91ZGJhc2UvYWknXG4iXX0=
|
package/ai/dist/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("@cloudbase/ai"), exports);
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxnREFBNkIiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAY2xvdWRiYXNlL2FpJ1xuIl19
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxnREFBNkIiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAY2xvdWRiYXNlL2FpJ1xuIl19
|
package/ai/package.json
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { registerAnalytics as registerAnalyticsOrigin } from '@cloudbase/analytics';
|
|
2
|
-
export var registerAnalytics = registerAnalyticsOrigin;
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsSUFBSSx1QkFBdUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBR3BGLE1BQU0sQ0FBQyxJQUFNLGlCQUFpQixHQUFHLHVCQUEwRCxDQUFDIiwiZmlsZSI6ImluZGV4LmVzbS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHJlZ2lzdGVyQW5hbHl0aWNzIGFzIHJlZ2lzdGVyQW5hbHl0aWNzT3JpZ2luIH0gZnJvbSAnQGNsb3VkYmFzZS9hbmFseXRpY3MnO1xuaW1wb3J0IGNsb3VkYmFzZSBmcm9tICcuLi8uLi9pbmRleCc7XG5cbmV4cG9ydCBjb25zdCByZWdpc3RlckFuYWx5dGljcyA9IHJlZ2lzdGVyQW5hbHl0aWNzT3JpZ2luIGFzIChhcHA6IHR5cGVvZiBjbG91ZGJhc2UpID0+IHZvaWQ7Il19
|
package/analytics/dist/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerAnalytics = void 0;
|
|
4
|
-
var analytics_1 = require("@cloudbase/analytics");
|
|
5
|
-
exports.registerAnalytics = analytics_1.registerAnalytics;
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtEQUFvRjtBQUd2RSxRQUFBLGlCQUFpQixHQUFHLDZCQUEwRCxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVnaXN0ZXJBbmFseXRpY3MgYXMgcmVnaXN0ZXJBbmFseXRpY3NPcmlnaW4gfSBmcm9tICdAY2xvdWRiYXNlL2FuYWx5dGljcyc7XG5pbXBvcnQgY2xvdWRiYXNlIGZyb20gJy4uLy4uL2luZGV4JztcblxuZXhwb3J0IGNvbnN0IHJlZ2lzdGVyQW5hbHl0aWNzID0gcmVnaXN0ZXJBbmFseXRpY3NPcmlnaW4gYXMgKGFwcDogdHlwZW9mIGNsb3VkYmFzZSkgPT4gdm9pZDsiXX0=
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtEQUFvRjtBQUd2RSxRQUFBLGlCQUFpQixHQUFHLDZCQUEwRCxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVnaXN0ZXJBbmFseXRpY3MgYXMgcmVnaXN0ZXJBbmFseXRpY3NPcmlnaW4gfSBmcm9tICdAY2xvdWRiYXNlL2FuYWx5dGljcyc7XG5pbXBvcnQgY2xvdWRiYXNlIGZyb20gJy4uLy4uL2luZGV4JztcblxuZXhwb3J0IGNvbnN0IHJlZ2lzdGVyQW5hbHl0aWNzID0gcmVnaXN0ZXJBbmFseXRpY3NPcmlnaW4gYXMgKGFwcDogdHlwZW9mIGNsb3VkYmFzZSkgPT4gdm9pZDsiXX0=
|
package/analytics/package.json
DELETED
package/apis/dist/index.esm.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from '@cloudbase/apis';
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsaUJBQWlCLENBQUEiLCJmaWxlIjoiaW5kZXguZXNtLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnQGNsb3VkYmFzZS9hcGlzJ1xuIl19
|
package/apis/dist/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("@cloudbase/apis"), exports);
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxrREFBK0IiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAY2xvdWRiYXNlL2FwaXMnXG4iXX0=
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxrREFBK0IiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAY2xvdWRiYXNlL2FwaXMnXG4iXX0=
|
package/apis/package.json
DELETED
package/app/dist/index.esm.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import cloudbase from '@cloudbase/app';
|
|
2
|
-
import pkg from '@cloudbase/app/package.json';
|
|
3
|
-
cloudbase.registerVersion(pkg.version);
|
|
4
|
-
try {
|
|
5
|
-
;
|
|
6
|
-
window.cloudbase = cloudbase;
|
|
7
|
-
}
|
|
8
|
-
catch (e) { }
|
|
9
|
-
export default cloudbase;
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sU0FBUyxNQUFNLGdCQUFnQixDQUFBO0FBRXRDLE9BQU8sR0FBRyxNQUFNLDZCQUE2QixDQUFBO0FBRTdDLFNBQVMsQ0FBQyxlQUFlLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFBO0FBT3RDLElBQUk7SUFDRixDQUFDO0lBQUMsTUFBaUIsQ0FBQyxTQUFTLEdBQUcsU0FBUyxDQUFBO0NBQzFDO0FBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRTtBQUdkLGVBQWUsU0FBUyxDQUFBIiwiZmlsZSI6ImluZGV4LmVzbS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjbG91ZGJhc2UgZnJvbSAnQGNsb3VkYmFzZS9hcHAnXG5pbXBvcnQgeyBJQ2xvdWRiYXNlIH0gZnJvbSAnQGNsb3VkYmFzZS90eXBlcydcbmltcG9ydCBwa2cgZnJvbSAnQGNsb3VkYmFzZS9hcHAvcGFja2FnZS5qc29uJ1xuXG5jbG91ZGJhc2UucmVnaXN0ZXJWZXJzaW9uKHBrZy52ZXJzaW9uKVxuXG5kZWNsYXJlIGdsb2JhbCB7XG4gIGludGVyZmFjZSBXaW5kb3cge1xuICAgIGNsb3VkYmFzZTogSUNsb3VkYmFzZVxuICB9XG59XG50cnkge1xuICA7KHdpbmRvdyBhcyBXaW5kb3cpLmNsb3VkYmFzZSA9IGNsb3VkYmFzZVxufSBjYXRjaCAoZSkge31cbi8vIEB0cy1pZ25vcmVcbmV4cG9ydCA9IGNsb3VkYmFzZVxuZXhwb3J0IGRlZmF1bHQgY2xvdWRiYXNlXG4iXX0=
|
package/app/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var app_1 = __importDefault(require("@cloudbase/app"));
|
|
6
|
-
var package_json_1 = __importDefault(require("@cloudbase/app/package.json"));
|
|
7
|
-
app_1.default.registerVersion(package_json_1.default.version);
|
|
8
|
-
try {
|
|
9
|
-
;
|
|
10
|
-
window.cloudbase = app_1.default;
|
|
11
|
-
}
|
|
12
|
-
catch (e) { }
|
|
13
|
-
exports.default = app_1.default;
|
|
14
|
-
module.exports = app_1.default;
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSx1REFBc0M7QUFFdEMsNkVBQTZDO0FBRTdDLGFBQVMsQ0FBQyxlQUFlLENBQUMsc0JBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtBQU90QyxJQUFJO0lBQ0YsQ0FBQztJQUFDLE1BQWlCLENBQUMsU0FBUyxHQUFHLGFBQVMsQ0FBQTtDQUMxQztBQUFDLE9BQU8sQ0FBQyxFQUFFLEdBQUU7QUFHZCxrQkFBZSxhQUFTLENBQUE7QUFEeEIsaUJBQVMsYUFBUyxDQUFBIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNsb3VkYmFzZSBmcm9tICdAY2xvdWRiYXNlL2FwcCdcbmltcG9ydCB7IElDbG91ZGJhc2UgfSBmcm9tICdAY2xvdWRiYXNlL3R5cGVzJ1xuaW1wb3J0IHBrZyBmcm9tICdAY2xvdWRiYXNlL2FwcC9wYWNrYWdlLmpzb24nXG5cbmNsb3VkYmFzZS5yZWdpc3RlclZlcnNpb24ocGtnLnZlcnNpb24pXG5cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgaW50ZXJmYWNlIFdpbmRvdyB7XG4gICAgY2xvdWRiYXNlOiBJQ2xvdWRiYXNlXG4gIH1cbn1cbnRyeSB7XG4gIDsod2luZG93IGFzIFdpbmRvdykuY2xvdWRiYXNlID0gY2xvdWRiYXNlXG59IGNhdGNoIChlKSB7fVxuLy8gQHRzLWlnbm9yZVxuZXhwb3J0ID0gY2xvdWRiYXNlXG5leHBvcnQgZGVmYXVsdCBjbG91ZGJhc2VcbiJdfQ==
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSx1REFBc0M7QUFFdEMsNkVBQTZDO0FBRTdDLGFBQVMsQ0FBQyxlQUFlLENBQUMsc0JBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtBQU90QyxJQUFJO0lBQ0YsQ0FBQztJQUFDLE1BQWlCLENBQUMsU0FBUyxHQUFHLGFBQVMsQ0FBQTtDQUMxQztBQUFDLE9BQU8sQ0FBQyxFQUFFLEdBQUU7QUFHZCxrQkFBZSxhQUFTLENBQUE7QUFEeEIsaUJBQVMsYUFBUyxDQUFBIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNsb3VkYmFzZSBmcm9tICdAY2xvdWRiYXNlL2FwcCdcbmltcG9ydCB7IElDbG91ZGJhc2UgfSBmcm9tICdAY2xvdWRiYXNlL3R5cGVzJ1xuaW1wb3J0IHBrZyBmcm9tICdAY2xvdWRiYXNlL2FwcC9wYWNrYWdlLmpzb24nXG5cbmNsb3VkYmFzZS5yZWdpc3RlclZlcnNpb24ocGtnLnZlcnNpb24pXG5cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgaW50ZXJmYWNlIFdpbmRvdyB7XG4gICAgY2xvdWRiYXNlOiBJQ2xvdWRiYXNlXG4gIH1cbn1cbnRyeSB7XG4gIDsod2luZG93IGFzIFdpbmRvdykuY2xvdWRiYXNlID0gY2xvdWRiYXNlXG59IGNhdGNoIChlKSB7fVxuLy8gQHRzLWlnbm9yZVxuZXhwb3J0ID0gY2xvdWRiYXNlXG5leHBvcnQgZGVmYXVsdCBjbG91ZGJhc2VcbiJdfQ==
|
package/app/package.json
DELETED
package/auth/dist/index.esm.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { registerAuth as registerAuthOrigin } from '@cloudbase/auth';
|
|
2
|
-
export var registerAuth = registerAuthOrigin;
|
|
3
|
-
try {
|
|
4
|
-
window.registerAuth = registerAuth;
|
|
5
|
-
}
|
|
6
|
-
catch (e) { }
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLElBQUksa0JBQWtCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUdyRSxNQUFNLENBQUMsSUFBTSxZQUFZLEdBQUcsa0JBQXFELENBQUM7QUFFbEYsSUFBSTtJQUNELE1BQWMsQ0FBQyxZQUFZLEdBQUcsWUFBWSxDQUFBO0NBQzVDO0FBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRSIsImZpbGUiOiJpbmRleC5lc20uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyByZWdpc3RlckF1dGggYXMgcmVnaXN0ZXJBdXRoT3JpZ2luIH0gZnJvbSAnQGNsb3VkYmFzZS9hdXRoJztcbmltcG9ydCBjbG91ZGJhc2UgZnJvbSAnLi4vLi4vaW5kZXgnO1xuXG5leHBvcnQgY29uc3QgcmVnaXN0ZXJBdXRoID0gcmVnaXN0ZXJBdXRoT3JpZ2luIGFzIChhcHA6IHR5cGVvZiBjbG91ZGJhc2UpID0+IHZvaWQ7XG5cbnRyeSB7XG4gICh3aW5kb3cgYXMgYW55KS5yZWdpc3RlckF1dGggPSByZWdpc3RlckF1dGhcbn0gY2F0Y2ggKGUpIHt9Il19
|
package/auth/dist/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerAuth = void 0;
|
|
4
|
-
var auth_1 = require("@cloudbase/auth");
|
|
5
|
-
exports.registerAuth = auth_1.registerAuth;
|
|
6
|
-
try {
|
|
7
|
-
window.registerAuth = exports.registerAuth;
|
|
8
|
-
}
|
|
9
|
-
catch (e) { }
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHdDQUFxRTtBQUd4RCxRQUFBLFlBQVksR0FBRyxtQkFBcUQsQ0FBQztBQUVsRixJQUFJO0lBQ0QsTUFBYyxDQUFDLFlBQVksR0FBRyxvQkFBWSxDQUFBO0NBQzVDO0FBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHJlZ2lzdGVyQXV0aCBhcyByZWdpc3RlckF1dGhPcmlnaW4gfSBmcm9tICdAY2xvdWRiYXNlL2F1dGgnO1xuaW1wb3J0IGNsb3VkYmFzZSBmcm9tICcuLi8uLi9pbmRleCc7XG5cbmV4cG9ydCBjb25zdCByZWdpc3RlckF1dGggPSByZWdpc3RlckF1dGhPcmlnaW4gYXMgKGFwcDogdHlwZW9mIGNsb3VkYmFzZSkgPT4gdm9pZDtcblxudHJ5IHtcbiAgKHdpbmRvdyBhcyBhbnkpLnJlZ2lzdGVyQXV0aCA9IHJlZ2lzdGVyQXV0aFxufSBjYXRjaCAoZSkge30iXX0=
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHdDQUFxRTtBQUd4RCxRQUFBLFlBQVksR0FBRyxtQkFBcUQsQ0FBQztBQUVsRixJQUFJO0lBQ0QsTUFBYyxDQUFDLFlBQVksR0FBRyxvQkFBWSxDQUFBO0NBQzVDO0FBQUMsT0FBTyxDQUFDLEVBQUUsR0FBRSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHJlZ2lzdGVyQXV0aCBhcyByZWdpc3RlckF1dGhPcmlnaW4gfSBmcm9tICdAY2xvdWRiYXNlL2F1dGgnO1xuaW1wb3J0IGNsb3VkYmFzZSBmcm9tICcuLi8uLi9pbmRleCc7XG5cbmV4cG9ydCBjb25zdCByZWdpc3RlckF1dGggPSByZWdpc3RlckF1dGhPcmlnaW4gYXMgKGFwcDogdHlwZW9mIGNsb3VkYmFzZSkgPT4gdm9pZDtcblxudHJ5IHtcbiAgKHdpbmRvdyBhcyBhbnkpLnJlZ2lzdGVyQXV0aCA9IHJlZ2lzdGVyQXV0aFxufSBjYXRjaCAoZSkge30iXX0=
|
package/auth/package.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from '@cloudbase/cloudrun';
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMscUJBQXFCLENBQUEiLCJmaWxlIjoiaW5kZXguZXNtLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnQGNsb3VkYmFzZS9jbG91ZHJ1bidcbiJdfQ==
|
package/cloudrun/dist/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("@cloudbase/cloudrun"), exports);
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzREFBbUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAY2xvdWRiYXNlL2Nsb3VkcnVuJ1xuIl19
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzREFBbUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAY2xvdWRiYXNlL2Nsb3VkcnVuJ1xuIl19
|
package/cloudrun/package.json
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { registerContainers as origin } from '@cloudbase/container';
|
|
2
|
-
export var registerContainers = origin;
|
|
3
|
-
try {
|
|
4
|
-
window.registerContainers = registerContainers;
|
|
5
|
-
}
|
|
6
|
-
catch (e) { }
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsSUFBSSxNQUFNLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUdwRSxNQUFNLENBQUMsSUFBTSxrQkFBa0IsR0FBRyxNQUFzQyxDQUFDO0FBRXpFLElBQUk7SUFDRCxNQUFjLENBQUMsa0JBQWtCLEdBQUcsa0JBQWtCLENBQUE7Q0FDeEQ7QUFBQyxPQUFPLENBQUMsRUFBRSxHQUFFIiwiZmlsZSI6ImluZGV4LmVzbS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHJlZ2lzdGVyQ29udGFpbmVycyBhcyBvcmlnaW4gfSBmcm9tICdAY2xvdWRiYXNlL2NvbnRhaW5lcic7XG5pbXBvcnQgY2xvdWRiYXNlIGZyb20gJy4uLy4uL2luZGV4JztcblxuZXhwb3J0IGNvbnN0IHJlZ2lzdGVyQ29udGFpbmVycyA9IG9yaWdpbiBhcyAoYXBwOnR5cGVvZiBjbG91ZGJhc2UpPT52b2lkO1xuXG50cnkge1xuICAod2luZG93IGFzIGFueSkucmVnaXN0ZXJDb250YWluZXJzID0gcmVnaXN0ZXJDb250YWluZXJzXG59IGNhdGNoIChlKSB7fSJdfQ==
|
package/container/dist/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerContainers = void 0;
|
|
4
|
-
var container_1 = require("@cloudbase/container");
|
|
5
|
-
exports.registerContainers = container_1.registerContainers;
|
|
6
|
-
try {
|
|
7
|
-
window.registerContainers = exports.registerContainers;
|
|
8
|
-
}
|
|
9
|
-
catch (e) { }
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtEQUFvRTtBQUd2RCxRQUFBLGtCQUFrQixHQUFHLDhCQUFzQyxDQUFDO0FBRXpFLElBQUk7SUFDRCxNQUFjLENBQUMsa0JBQWtCLEdBQUcsMEJBQWtCLENBQUE7Q0FDeEQ7QUFBQyxPQUFPLENBQUMsRUFBRSxHQUFFIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVnaXN0ZXJDb250YWluZXJzIGFzIG9yaWdpbiB9IGZyb20gJ0BjbG91ZGJhc2UvY29udGFpbmVyJztcbmltcG9ydCBjbG91ZGJhc2UgZnJvbSAnLi4vLi4vaW5kZXgnO1xuXG5leHBvcnQgY29uc3QgcmVnaXN0ZXJDb250YWluZXJzID0gb3JpZ2luIGFzIChhcHA6dHlwZW9mIGNsb3VkYmFzZSk9PnZvaWQ7XG5cbnRyeSB7XG4gICh3aW5kb3cgYXMgYW55KS5yZWdpc3RlckNvbnRhaW5lcnMgPSByZWdpc3RlckNvbnRhaW5lcnNcbn0gY2F0Y2ggKGUpIHt9Il19
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGtEQUFvRTtBQUd2RCxRQUFBLGtCQUFrQixHQUFHLDhCQUFzQyxDQUFDO0FBRXpFLElBQUk7SUFDRCxNQUFjLENBQUMsa0JBQWtCLEdBQUcsMEJBQWtCLENBQUE7Q0FDeEQ7QUFBQyxPQUFPLENBQUMsRUFBRSxHQUFFIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVnaXN0ZXJDb250YWluZXJzIGFzIG9yaWdpbiB9IGZyb20gJ0BjbG91ZGJhc2UvY29udGFpbmVyJztcbmltcG9ydCBjbG91ZGJhc2UgZnJvbSAnLi4vLi4vaW5kZXgnO1xuXG5leHBvcnQgY29uc3QgcmVnaXN0ZXJDb250YWluZXJzID0gb3JpZ2luIGFzIChhcHA6dHlwZW9mIGNsb3VkYmFzZSk9PnZvaWQ7XG5cbnRyeSB7XG4gICh3aW5kb3cgYXMgYW55KS5yZWdpc3RlckNvbnRhaW5lcnMgPSByZWdpc3RlckNvbnRhaW5lcnNcbn0gY2F0Y2ggKGUpIHt9Il19
|
package/container/package.json
DELETED
package/database/dist/index.d.ts
DELETED