zmp-sdk 2.44.1-beta.1 → 2.44.2

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.
@@ -1 +1 @@
1
- import e from'./../../../../external/@swc/helpers/src/_assert_this_initialized.mjs.js';import t from'./../../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import r from'./../../../../external/@swc/helpers/src/_class_call_check.mjs.js';import s from'./../../../../external/@swc/helpers/src/_class_private_field_get.mjs.js';import n from'./../../../../external/@swc/helpers/src/_class_private_field_init.mjs.js';import o from'./../../../../external/@swc/helpers/src/_class_private_field_set.mjs.js';import i from'./../../../../external/@swc/helpers/src/_inherits.mjs.js';import c from'./../../../../external/@swc/helpers/src/_sliced_to_array.mjs.js';import a from'./../../../../external/@swc/helpers/src/_create_super.mjs.js';import{ResourceStorage as m}from"./storage.js";import u from"../../../../utils/lodash.js";import{calcLocalStorageSize as l}from"../../../../utils/common.js";import{STORAGE_LIMIT as f}from"../../../../constants.js";import{__generator as h}from'./../../../../external/tslib/tslib.es6.js';var _=new WeakMap,p=new WeakMap,d=new WeakMap,v=function(m){i(y,m);var v=a(y);function y(t){var s;return r(this,y),s=v.call(this),n(e(s),_,{writable:!0,value:localStorage}),n(e(s),p,{writable:!0,value:void 0}),n(e(s),d,{writable:!0,value:void 0}),o(e(s),d,{keys:new Set,currentSize:0,limitSize:f}),o(e(s),p,t),s.findAllCurrentDataByApp(t),s}var j=y.prototype;return j.findAllCurrentDataByApp=function(e){try{var t;for(t in s(this,_)){if(e)if(t.split("_")[0]!==e)continue;s(this,d).keys.add(t)}}catch(e){}},j.get=function(e){var t=this,r=new Map;return e.forEach((function(e){r.set(e,t.getSync(e))})),Promise.resolve(r)},j.getSync=function(e){return s(this,p)&&(e="".concat(s(this,p),"_").concat(e)),s(this,d).keys.has(e)?s(this,_).getItem(e):null},j.set=function(e){var r=this;return t((function(){return h(this,(function(t){return Object.entries(e).forEach((function(e){var t=c(e,2),s=t[0],n=t[1];r.setSync(s,n.replace(/\\"/g,'"'))})),[2,Promise.resolve({errorKeys:[]})]}))}))()},j.setSync=function(e,t){s(this,p)&&(e="".concat(s(this,p),"_").concat(e)),s(this,_).setItem(e,t),s(this,d).keys.add(e)},j.getInfo=function(){var e=this;return t((function(){return h(this,(function(t){return[2,Promise.resolve(e.getInfoSync())]}))}))()},j.getInfoSync=function(){var e=l(s(this,_),s(this,p));return{currentSize:u.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number((f/1024).toFixed(2))}},j.remove=function(e){var r=this;return t((function(){return h(this,(function(t){return e.forEach((function(e){r.removeSync(e)})),[2,Promise.resolve({errorKeys:[]})]}))}))()},j.removeSync=function(e){s(this,p)&&(e="".concat(s(this,p),"_").concat(e)),s(this,d).keys.has(e)&&(s(this,_).removeItem(e),s(this,d).keys.delete(e))},j.clearAsync=function(){var e=this;return t((function(){return h(this,(function(t){return[2,Promise.resolve(e.clearSync())]}))}))()},j.clearSync=function(){var e=this;s(this,d).keys.forEach((function(t){s(e,p)&&t.indexOf(s(e,p))<0||(s(e,_).removeItem(t),s(e,d).keys.delete(t))}))},y}(m);export{v as LocalResourceStorage};
1
+ import e from'./../../../../external/@swc/helpers/src/_assert_this_initialized.mjs.js';import t from'./../../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import r from'./../../../../external/@swc/helpers/src/_class_call_check.mjs.js';import s from'./../../../../external/@swc/helpers/src/_class_private_field_get.mjs.js';import n from'./../../../../external/@swc/helpers/src/_class_private_field_init.mjs.js';import o from'./../../../../external/@swc/helpers/src/_class_private_field_set.mjs.js';import i from'./../../../../external/@swc/helpers/src/_inherits.mjs.js';import c from'./../../../../external/@swc/helpers/src/_sliced_to_array.mjs.js';import a from'./../../../../external/@swc/helpers/src/_create_super.mjs.js';import{ResourceStorage as u}from"./storage.js";import m from"../../../../utils/lodash.js";import{calcLocalStorageSize as l}from"../../../../utils/common.js";import{STORAGE_LIMIT as f}from"../../../../constants.js";import{__generator as h}from'./../../../../external/tslib/tslib.es6.js';var p=new WeakMap,_=new WeakMap,d=new WeakMap,y=function(u){i(v,u);var y=a(v);function v(t){var s;return r(this,v),s=y.call(this),n(e(s),p,{writable:!0,value:localStorage}),n(e(s),_,{writable:!0,value:void 0}),n(e(s),d,{writable:!0,value:void 0}),o(e(s),d,{keys:new Set,currentSize:0,limitSize:f}),o(e(s),_,t),s.findAllCurrentDataByApp(t),s}var j=v.prototype;return j.findAllCurrentDataByApp=function(e){try{var t;for(t in s(this,p)){if(e)if(t.split("_")[0]!==e)continue;s(this,d).keys.add(t)}}catch(e){}},j.get=function(e){var t=this,r=new Map;return e.forEach((function(e){r.set(e,t.getSync(e))})),Promise.resolve(r)},j.getSync=function(e){return s(this,_)&&(e="".concat(s(this,_),"_").concat(e)),s(this,d).keys.has(e)?s(this,p).getItem(e):null},j.set=function(e){var r=this;return t((function(){return h(this,(function(t){return Object.entries(e).forEach((function(e){var t=c(e,2),s=t[0],n=t[1];r.setSync(s,n.replace(/\\"/g,'"'))})),[2,Promise.resolve({errorKeys:[]})]}))}))()},j.setSync=function(e,t){s(this,_)&&(e="".concat(s(this,_),"_").concat(e)),s(this,p).setItem(e,t),s(this,d).keys.add(e)},j.getInfo=function(){var e=this;return t((function(){return h(this,(function(t){return[2,Promise.resolve(e.getInfoSync())]}))}))()},j.getInfoSync=function(){var e=l(s(this,p),s(this,_));return{currentSize:m.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number((f/1024).toFixed(2))}},j.remove=function(e){var r=this;return t((function(){return h(this,(function(t){return e.forEach((function(e){r.removeSync(e)})),[2,Promise.resolve({errorKeys:[]})]}))}))()},j.removeSync=function(e){s(this,_)&&(e="".concat(s(this,_),"_").concat(e)),s(this,d).keys.has(e)&&(s(this,p).removeItem(e),s(this,d).keys.delete(e))},j.clearAsync=function(){var e=this;return t((function(){return h(this,(function(t){return[2,Promise.resolve(e.clearSync())]}))}))()},j.clearSync=function(){var e=this;s(this,d).keys.forEach((function(t){s(e,_)&&t.indexOf(s(e,_))<0||(s(e,p).removeItem(t),s(e,d).keys.delete(t))}))},j.setSynchronize=function(e){var t=this;return Object.entries(e).forEach((function(e){var r=c(e,2),s=r[0],n=r[1];t.setSync(s,n)})),{errorKeys:[]}},j.getSynchronize=function(e){var t=this,r=new Map;return e.forEach((function(e){r.set(e,t.getSync(e))})),r},j.getInfoSynchronize=function(){return this.getInfoSync()},j.clearSynchronize=function(){this.clearSync()},v}(u);export{y as LocalResourceStorage};
@@ -1 +1 @@
1
- var a="2.44.1-beta.1";export{a as version};
1
+ var r="2.44.2";export{r as version};