@univer-cli/generic-keyed-instance-pool 1.0.4 → 1.1.0

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- (function(_0x5786df,_0x379462){const _0x23320f=_0x46f7,_0x54feff=_0x5786df();while(!![]){try{const _0x160251=-parseInt(_0x23320f(0x13e))/0x1+parseInt(_0x23320f(0x16f))/0x2*(parseInt(_0x23320f(0x165))/0x3)+-parseInt(_0x23320f(0x147))/0x4*(-parseInt(_0x23320f(0x143))/0x5)+-parseInt(_0x23320f(0x156))/0x6+parseInt(_0x23320f(0x141))/0x7*(-parseInt(_0x23320f(0x15e))/0x8)+-parseInt(_0x23320f(0x175))/0x9*(parseInt(_0x23320f(0x14f))/0xa)+parseInt(_0x23320f(0x16e))/0xb;if(_0x160251===_0x379462)break;else _0x54feff['push'](_0x54feff['shift']());}catch(_0x98fced){_0x54feff['push'](_0x54feff['shift']());}}}(_0x397c,0x555e5));var e=class extends Error{['code'];constructor(_0x56fd2f,_0xe429d0,_0x3ea989){const _0x12ca6f=_0x46f7;super(_0xe429d0,_0x3ea989),this[_0x12ca6f(0x13c)]=_0x12ca6f(0x16a),this[_0x12ca6f(0x15c)]=_0x56fd2f;}},t=0x493e0,n=0x14;function r(_0x46351c){const _0x52d3f0=_0x46f7;let _0x423796=new Map(),_0x4b7ea7=new Set(),_0x35c068=new Map(),_0xd2b7be=_0x46351c[_0x52d3f0(0x163)]?.['idleTtlMs']??t,_0x1cb687=_0x46351c[_0x52d3f0(0x163)]?.['maxEntries']??n,_0x3b7b67=!0x1,_0xdf7347,_0x569ea=0x0;i(_0xd2b7be,_0x1cb687);let _0x23edc0={async 'acquire'(_0x491452){const _0x1191e1=_0x52d3f0;_0x11b2db(),a(_0x491452);let _0x11e6a1=_0x423796['get'](_0x491452['key']);if(_0x11e6a1)return _0x11e6a1[_0x1191e1(0x138)]?await o(_0x491452,_0x11e6a1['waiters']):(c(_0x11e6a1),_0x11e6a1[_0x1191e1(0x138)]=!0x0,_0x4f2b1d({'key':_0x491452['key'],'type':_0x1191e1(0x158)}),_0x63094d(_0x491452[_0x1191e1(0x16d)],_0x11e6a1));let _0x41dc38=_0x35c068[_0x1191e1(0x13d)](_0x491452[_0x1191e1(0x16d)]);if(_0x41dc38)return await o(_0x491452,_0x41dc38);let _0x182db5,_0x271d50=new Promise(_0x49fbe2=>{_0x182db5=_0x49fbe2;});_0x4b7ea7[_0x1191e1(0x151)](_0x271d50),_0x35c068['set'](_0x491452['key'],[]);let _0x4a64fe=Date['now']();_0x4f2b1d({'key':_0x491452[_0x1191e1(0x16d)],'type':'create-start'});try{await _0x587f19();let _0x4205a2=await _0x46351c[_0x1191e1(0x14e)]['create'](_0x491452);if(_0x3b7b67)throw await _0x46351c[_0x1191e1(0x14e)][_0x1191e1(0x140)]({'instance':_0x4205a2,'key':_0x491452[_0x1191e1(0x16d)]}),l();let _0x4b45aa={'busy':!0x0,'closed':!0x1,'instance':_0x4205a2,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x35c068['get'](_0x491452[_0x1191e1(0x16d)])??[]};return _0x423796[_0x1191e1(0x172)](_0x491452[_0x1191e1(0x16d)],_0x4b45aa),_0x4f2b1d({'durationMs':Date[_0x1191e1(0x16c)]()-_0x4a64fe,'key':_0x491452[_0x1191e1(0x16d)],'type':'create-complete'}),_0x63094d(_0x491452[_0x1191e1(0x16d)],_0x4b45aa);}catch(_0x32e886){throw s(_0x35c068[_0x1191e1(0x13d)](_0x491452['key'])??[],_0x32e886),_0x32e886;}finally{_0x35c068['delete'](_0x491452[_0x1191e1(0x16d)]),_0x4b7ea7['delete'](_0x271d50),_0x182db5();}},async 'close'(){if(_0xdf7347)return await _0xdf7347;_0x3b7b67=!0x0,_0xdf7347=_0x403f0c(),await _0xdf7347;}};return _0x23edc0;function _0x63094d(_0x4e9440,_0x881e94){const _0x21c9e1=_0x52d3f0;let _0x7286b7=!0x1;return{'instance':_0x881e94[_0x21c9e1(0x136)],'key':_0x4e9440,async 'invalidate'(){const _0x425850=_0x21c9e1;_0x7286b7||(_0x7286b7=!0x0,_0x881e94[_0x425850(0x142)]=!0x0,await _0x538bfa(_0x4e9440,_0x881e94,_0x425850(0x149)));},async 'release'(){const _0x242073=_0x21c9e1;if(_0x7286b7||(_0x7286b7=!0x0,_0x881e94[_0x242073(0x170)]))return;if(_0x881e94[_0x242073(0x142)]){await _0x538bfa(_0x4e9440,_0x881e94,_0x242073(0x149));return;}let _0x291432=_0x881e94[_0x242073(0x169)][_0x242073(0x159)]();_0x291432?_0x291432['resolve'](_0x63094d(_0x4e9440,_0x881e94)):(_0x881e94[_0x242073(0x138)]=!0x1,_0x881e94['lastIdleSequence']=++_0x569ea,_0x4d67fb(_0x4e9440,_0x881e94));}};}async function _0x538bfa(_0x250890,_0x537442,_0x4bbc79){const _0x1dfbf1=_0x52d3f0;let _0x397204=_0x537442[_0x1dfbf1(0x169)][_0x1dfbf1(0x150)](0x0);_0x423796[_0x1dfbf1(0x13d)](_0x250890)===_0x537442&&_0x423796[_0x1dfbf1(0x168)](_0x250890);try{await _0x2a8cbb(_0x250890,_0x537442,_0x4bbc79);}finally{_0x4bbc79&&_0x4f2b1d({'key':_0x250890,'reason':_0x4bbc79,'type':_0x1dfbf1(0x139)}),_0x3b7b67?s(_0x397204,l()):_0x3fbd77(_0x397204);}}function _0x4d67fb(_0x478c17,_0x46e37a){const _0x55038f=_0x52d3f0;c(_0x46e37a),_0x46e37a[_0x55038f(0x137)]=setTimeout(()=>{const _0x1d4da9=_0x55038f;_0x46e37a['busy']||_0x423796[_0x1d4da9(0x13d)](_0x478c17)!==_0x46e37a||(_0x423796['delete'](_0x478c17),_0x2a8cbb(_0x478c17,_0x46e37a,_0x1d4da9(0x167))[_0x1d4da9(0x148)](()=>_0x4f2b1d({'key':_0x478c17,'reason':_0x1d4da9(0x167),'type':'evicted'}))['catch'](()=>void 0x0));},_0xd2b7be),_0x46e37a[_0x55038f(0x137)][_0x55038f(0x14a)]?.();}async function _0x587f19(){const _0xdc015d=_0x52d3f0;for(;_0x423796[_0xdc015d(0x13f)]+_0x35c068[_0xdc015d(0x13f)]>_0x1cb687;){let _0x27d993;for(let _0x28a69e of _0x423796)_0x28a69e[0x1][_0xdc015d(0x138)]||(!_0x27d993||_0x28a69e[0x1]['lastIdleSequence']<_0x27d993[0x1][_0xdc015d(0x173)])&&(_0x27d993=_0x28a69e);if(!_0x27d993)throw new e(_0xdc015d(0x15f),_0xdc015d(0x157)+_0x1cb687+_0xdc015d(0x154));_0x423796[_0xdc015d(0x168)](_0x27d993[0x0]),await _0x2a8cbb(_0x27d993[0x0],_0x27d993[0x1],_0xdc015d(0x15b)),_0x4f2b1d({'key':_0x27d993[0x0],'reason':'lru','type':_0xdc015d(0x139)});}}async function _0x403f0c(){const _0x3c175e=_0x52d3f0;let _0x431854=l(),_0x17ade7=[..._0x423796['entries']()];for(let [,_0x2874b0]of _0x17ade7)s(_0x2874b0[_0x3c175e(0x169)],_0x431854);for(let _0x13e8d2 of _0x35c068[_0x3c175e(0x145)]())s(_0x13e8d2,_0x431854);_0x423796[_0x3c175e(0x152)]();let _0xea7be0=(await Promise[_0x3c175e(0x166)]([..._0x17ade7[_0x3c175e(0x161)](async([_0x2b877d,_0x4bc12c])=>await _0x2a8cbb(_0x2b877d,_0x4bc12c)),..._0x4b7ea7]))[_0x3c175e(0x14b)](_0x807238=>_0x807238['status']===_0x3c175e(0x155));if(_0xea7be0?.['status']==='rejected')throw _0xea7be0[_0x3c175e(0x15a)];}function _0x4f2b1d(_0xf9e6f0){const _0x3eb512=_0x52d3f0;try{_0x46351c[_0x3eb512(0x160)]?.(_0xf9e6f0);}catch{}}function _0x11b2db(){if(_0x3b7b67)throw l();}function _0x3fbd77(_0x2fa9d6){const _0x3853e7=_0x52d3f0;for(let _0x34d86e of _0x2fa9d6)_0x23edc0['acquire'](_0x34d86e[_0x3853e7(0x15d)])['then'](_0x34d86e[_0x3853e7(0x174)],_0x34d86e['reject']);}async function _0x2a8cbb(_0x32d44e,_0x4786f0,_0x2345cd){const _0x2fc6f1=_0x52d3f0;_0x4786f0[_0x2fc6f1(0x170)]||(_0x4786f0[_0x2fc6f1(0x170)]=!0x0,c(_0x4786f0),_0x2345cd&&_0x4f2b1d({'key':_0x32d44e,'reason':_0x2345cd,'type':_0x2fc6f1(0x153)}),await _0x46351c['factory'][_0x2fc6f1(0x140)]({'instance':_0x4786f0[_0x2fc6f1(0x136)],'key':_0x32d44e}));}}function _0x46f7(_0x26cdb4,_0x2dee3c){_0x26cdb4=_0x26cdb4-0x136;const _0x397cd9=_0x397c();let _0x46f785=_0x397cd9[_0x26cdb4];return _0x46f785;}function i(_0x456287,_0x4c3e04){const _0xdad0a9=_0x46f7;if(!Number[_0xdad0a9(0x13b)](_0x456287)||_0x456287<0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0xdad0a9(0x146));if(!Number[_0xdad0a9(0x14d)](_0x4c3e04)||_0x4c3e04<=0x0)throw new e(_0xdad0a9(0x164),_0xdad0a9(0x144));}function a(_0x558d2b){const _0x2303c5=_0x46f7;if(_0x558d2b[_0x2303c5(0x16d)][_0x2303c5(0x13a)]===0x0)throw new e(_0x2303c5(0x164),_0x2303c5(0x14c));}function o(_0x22260a,_0x14ed7){return new Promise((_0x5cb685,_0x21d01)=>{const _0x217f86=_0x46f7;_0x14ed7[_0x217f86(0x171)]({'input':_0x22260a,'reject':_0x21d01,'resolve':_0x5cb685});});}function s(_0x398ddf,_0x3a43c5){const _0x14749e=_0x46f7;for(let _0x40b639 of _0x398ddf[_0x14749e(0x150)](0x0))_0x40b639[_0x14749e(0x162)](_0x3a43c5);}function c(_0x5e8e6d){const _0x256411=_0x46f7;_0x5e8e6d[_0x256411(0x137)]!==void 0x0&&(clearTimeout(_0x5e8e6d[_0x256411(0x137)]),delete _0x5e8e6d[_0x256411(0x137)]);}function l(){const _0x1e9143=_0x46f7;return new e('INSTANCE_POOL_CLOSED',_0x1e9143(0x16b));}function _0x397c(){const _0x521dcd=['name','get','403297vFOnuz','size','destroy','4837eTnLtm','invalidated','365wvDQbK','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','values','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','27532UeVXpN','then','invalidate','unref','find','key\x20must\x20not\x20be\x20empty','isSafeInteger','factory','70YGJsXH','splice','add','clear','destroy-start','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','rejected','3129714NMDJXF','Instance\x20pool\x20capacity\x20','cache-hit','shift','reason','lru','code','input','7704NkGurO','INSTANCE_POOL_CAPACITY_EXCEEDED','onEvent','map','reject','cache','INSTANCE_POOL_INVALID_INPUT','693uahGdM','allSettled','ttl','delete','waiters','InstancePoolError','Instance\x20pool\x20is\x20closed','now','key','11810535FaoYYV','3430otcMXE','closed','push','set','lastIdleSequence','resolve','41517fUscDq','instance','idleTimer','busy','evicted','length','isFinite'];_0x397c=function(){return _0x521dcd;};return _0x397c();}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ const _0x3de2d2=_0x3858;(function(_0x484604,_0x2c8b7c){const _0x342572=_0x3858,_0x13fd5a=_0x484604();while(!![]){try{const _0x5ba447=parseInt(_0x342572(0x1e6))/0x1*(-parseInt(_0x342572(0x1be))/0x2)+-parseInt(_0x342572(0x1ee))/0x3+parseInt(_0x342572(0x1c0))/0x4*(-parseInt(_0x342572(0x1bd))/0x5)+parseInt(_0x342572(0x1e7))/0x6+-parseInt(_0x342572(0x1f3))/0x7*(parseInt(_0x342572(0x1ea))/0x8)+parseInt(_0x342572(0x1d6))/0x9+parseInt(_0x342572(0x1c1))/0xa;if(_0x5ba447===_0x2c8b7c)break;else _0x13fd5a['push'](_0x13fd5a['shift']());}catch(_0x54d0ac){_0x13fd5a['push'](_0x13fd5a['shift']());}}}(_0x2be5,0x96fe5));var e=class extends Error{[_0x3de2d2(0x1bb)];constructor(_0x3a1b6b,_0x51ea43,_0xd76070){const _0x419886=_0x3de2d2;super(_0x51ea43,_0xd76070),this[_0x419886(0x1ca)]=_0x419886(0x1db),this[_0x419886(0x1bb)]=_0x3a1b6b;}},t=0x493e0,n=0x14;function _0x3858(_0x19b83e,_0x2d6fbe){_0x19b83e=_0x19b83e-0x1b3;const _0x2be543=_0x2be5();let _0x3858e3=_0x2be543[_0x19b83e];return _0x3858e3;}function r(_0x17afed){const _0x5ce462=_0x3de2d2;let _0x263fda=new Map(),_0x5ad3a9=new Set(),_0x1a764c=new Map(),_0x15ee1e=_0x17afed[_0x5ce462(0x1c8)]?.['idleTtlMs']??t,_0x2af3ce=_0x17afed[_0x5ce462(0x1c8)]?.[_0x5ce462(0x1f2)]??n,_0xfc81f5=!0x1,_0x135331,_0x3b52d2=0x0;i(_0x15ee1e,_0x2af3ce);let _0x401ee6={async 'acquire'(_0x4fc06f){const _0x511bd4=_0x5ce462;_0x1bccd4(),a(_0x4fc06f);let _0x518c59=_0x263fda[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)]);if(_0x518c59)return _0x518c59[_0x511bd4(0x1ce)]?await o(_0x4fc06f,_0x518c59[_0x511bd4(0x1dd)]):(c(_0x518c59),_0x518c59['busy']=!0x0,_0x4e025b({'key':_0x4fc06f[_0x511bd4(0x1d3)],'type':_0x511bd4(0x1d7)}),_0x20fb6d(_0x4fc06f[_0x511bd4(0x1d3)],_0x518c59));let _0x3f1c47=_0x1a764c[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)]);if(_0x3f1c47)return await o(_0x4fc06f,_0x3f1c47);let _0x5eb47e,_0x53a97b=new Promise(_0x53e202=>{_0x5eb47e=_0x53e202;});_0x5ad3a9[_0x511bd4(0x1e3)](_0x53a97b),_0x1a764c[_0x511bd4(0x1ba)](_0x4fc06f['key'],[]);let _0x3f39fe=Date[_0x511bd4(0x1d0)]();_0x4e025b({'key':_0x4fc06f[_0x511bd4(0x1d3)],'type':_0x511bd4(0x1c3)});try{await _0x1838a6();let _0x154d35=await _0x17afed[_0x511bd4(0x1c4)][_0x511bd4(0x1e4)](_0x4fc06f);if(_0xfc81f5)throw await _0x17afed[_0x511bd4(0x1c4)]['destroy']({'instance':_0x154d35,'key':_0x4fc06f[_0x511bd4(0x1d3)]}),l();let _0x2497d1={'busy':!0x0,'closed':!0x1,'instance':_0x154d35,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x1a764c[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)])??[]};return _0x263fda[_0x511bd4(0x1ba)](_0x4fc06f['key'],_0x2497d1),_0x4e025b({'durationMs':Date[_0x511bd4(0x1d0)]()-_0x3f39fe,'key':_0x4fc06f[_0x511bd4(0x1d3)],'type':_0x511bd4(0x1c7)}),_0x20fb6d(_0x4fc06f[_0x511bd4(0x1d3)],_0x2497d1);}catch(_0x380cd7){throw s(_0x1a764c[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)])??[],_0x380cd7),_0x380cd7;}finally{_0x1a764c['delete'](_0x4fc06f[_0x511bd4(0x1d3)]),_0x5ad3a9[_0x511bd4(0x1b6)](_0x53a97b),_0x5eb47e();}},async 'close'(){if(_0x135331)return await _0x135331;_0xfc81f5=!0x0,_0x135331=_0x3c52a8(),await _0x135331;}};return _0x401ee6;function _0x20fb6d(_0x4f921a,_0x463545){const _0x3f710c=_0x5ce462;let _0x2f5640=!0x1;return{'instance':_0x463545[_0x3f710c(0x1c5)],'key':_0x4f921a,async 'invalidate'(){const _0x3fd66c=_0x3f710c;_0x2f5640||(_0x2f5640=!0x0,_0x463545[_0x3fd66c(0x1ef)]=!0x0,await _0x18d7c7(_0x4f921a,_0x463545,_0x3fd66c(0x1ec)));},async 'release'(){const _0x114fc0=_0x3f710c;if(_0x2f5640||(_0x2f5640=!0x0,_0x463545[_0x114fc0(0x1e1)]))return;if(_0x463545['invalidated']){await _0x18d7c7(_0x4f921a,_0x463545,_0x114fc0(0x1ec));return;}let _0x2691a7=_0x463545[_0x114fc0(0x1dd)][_0x114fc0(0x1b4)]();_0x2691a7?_0x2691a7['resolve'](_0x20fb6d(_0x4f921a,_0x463545)):(_0x463545['busy']=!0x1,_0x463545[_0x114fc0(0x1b8)]=++_0x3b52d2,_0x5819f5(_0x4f921a,_0x463545));}};}async function _0x18d7c7(_0x372df0,_0x4c0e8a,_0x40f520){const _0x79210a=_0x5ce462;let _0x100fba=_0x4c0e8a['waiters'][_0x79210a(0x1f1)](0x0);_0x263fda[_0x79210a(0x1d1)](_0x372df0)===_0x4c0e8a&&_0x263fda[_0x79210a(0x1b6)](_0x372df0);try{await _0x32a079(_0x372df0,_0x4c0e8a,_0x40f520);}finally{_0x40f520&&_0x4e025b({'key':_0x372df0,'reason':_0x40f520,'type':_0x79210a(0x1f5)}),_0xfc81f5?s(_0x100fba,l()):_0x50e3a6(_0x100fba);}}function _0x5819f5(_0x16bfea,_0x4cd137){const _0x4cad34=_0x5ce462;c(_0x4cd137),_0x4cd137[_0x4cad34(0x1cf)]=setTimeout(()=>{const _0x212a2f=_0x4cad34;_0x4cd137[_0x212a2f(0x1ce)]||_0x263fda[_0x212a2f(0x1d1)](_0x16bfea)!==_0x4cd137||(_0x263fda[_0x212a2f(0x1b6)](_0x16bfea),_0x32a079(_0x16bfea,_0x4cd137,_0x212a2f(0x1f0))[_0x212a2f(0x1e5)](()=>_0x4e025b({'key':_0x16bfea,'reason':_0x212a2f(0x1f0),'type':_0x212a2f(0x1f5)}))[_0x212a2f(0x1f4)](()=>void 0x0));},_0x15ee1e),_0x4cd137[_0x4cad34(0x1cf)]['unref']?.();}async function _0x1838a6(){const _0x7c0d68=_0x5ce462;for(;_0x263fda[_0x7c0d68(0x1dc)]+_0x1a764c[_0x7c0d68(0x1dc)]>_0x2af3ce;){let _0x32a48a;for(let _0x5f36dd of _0x263fda)_0x5f36dd[0x1]['busy']||(!_0x32a48a||_0x5f36dd[0x1]['lastIdleSequence']<_0x32a48a[0x1][_0x7c0d68(0x1b8)])&&(_0x32a48a=_0x5f36dd);if(!_0x32a48a)throw new e(_0x7c0d68(0x1e0),_0x7c0d68(0x1b7)+_0x2af3ce+_0x7c0d68(0x1d9));_0x263fda['delete'](_0x32a48a[0x0]),await _0x32a079(_0x32a48a[0x0],_0x32a48a[0x1],_0x7c0d68(0x1d4)),_0x4e025b({'key':_0x32a48a[0x0],'reason':_0x7c0d68(0x1d4),'type':'evicted'});}}async function _0x3c52a8(){const _0x24a444=_0x5ce462;let _0x205e8a=l(),_0x2b89e4=[..._0x263fda[_0x24a444(0x1eb)]()];for(let [,_0x141f4b]of _0x2b89e4)s(_0x141f4b[_0x24a444(0x1dd)],_0x205e8a);for(let _0x553f3d of _0x1a764c['values']())s(_0x553f3d,_0x205e8a);_0x263fda[_0x24a444(0x1b3)]();let _0x5dc8a1=(await Promise['allSettled']([..._0x2b89e4[_0x24a444(0x1e8)](async([_0x3840ad,_0x3fccdf])=>await _0x32a079(_0x3840ad,_0x3fccdf)),..._0x5ad3a9]))[_0x24a444(0x1c9)](_0x40d28a=>_0x40d28a[_0x24a444(0x1d2)]===_0x24a444(0x1d5));if(_0x5dc8a1?.['status']===_0x24a444(0x1d5))throw _0x5dc8a1[_0x24a444(0x1ed)];}function _0x4e025b(_0x3f34ab){const _0x3cea08=_0x5ce462;try{_0x17afed[_0x3cea08(0x1c6)]?.(_0x3f34ab);}catch{}}function _0x1bccd4(){if(_0xfc81f5)throw l();}function _0x50e3a6(_0xfcb50d){const _0x57c0c6=_0x5ce462;for(let _0x1f6f26 of _0xfcb50d)_0x401ee6[_0x57c0c6(0x1e2)](_0x1f6f26[_0x57c0c6(0x1de)])[_0x57c0c6(0x1e5)](_0x1f6f26[_0x57c0c6(0x1cc)],_0x1f6f26['reject']);}async function _0x32a079(_0x146b4e,_0x3fe512,_0x288f0e){const _0x5c9440=_0x5ce462;_0x3fe512[_0x5c9440(0x1e1)]||(_0x3fe512['closed']=!0x0,c(_0x3fe512),_0x288f0e&&_0x4e025b({'key':_0x146b4e,'reason':_0x288f0e,'type':_0x5c9440(0x1b5)}),await _0x17afed[_0x5c9440(0x1c4)][_0x5c9440(0x1d8)]({'instance':_0x3fe512[_0x5c9440(0x1c5)],'key':_0x146b4e}));}}function i(_0xdb0969,_0x495104){const _0x22d6e0=_0x3de2d2;if(!Number[_0x22d6e0(0x1cd)](_0xdb0969)||_0xdb0969<0x0)throw new e(_0x22d6e0(0x1b9),_0x22d6e0(0x1c2));if(!Number[_0x22d6e0(0x1df)](_0x495104)||_0x495104<=0x0)throw new e('INSTANCE_POOL_INVALID_INPUT','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function a(_0x9ab5bc){const _0x49042e=_0x3de2d2;if(_0x9ab5bc[_0x49042e(0x1d3)][_0x49042e(0x1e9)]===0x0)throw new e(_0x49042e(0x1b9),_0x49042e(0x1da));}function o(_0xc50cc2,_0x3ffbcb){return new Promise((_0x5333fa,_0x3cbd76)=>{const _0x47fab0=_0x3858;_0x3ffbcb[_0x47fab0(0x1bc)]({'input':_0xc50cc2,'reject':_0x3cbd76,'resolve':_0x5333fa});});}function _0x2be5(){const _0x1d46c5=['push','2752595XeTKxr','28530VXjChU','INSTANCE_POOL_CLOSED','4ScOCVV','22326080czEvHE','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','create-start','factory','instance','onEvent','create-complete','cache','find','name','reject','resolve','isFinite','busy','idleTimer','now','get','status','key','lru','rejected','1572993UqxrHN','cache-hit','destroy','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','key\x20must\x20not\x20be\x20empty','InstancePoolError','size','waiters','input','isSafeInteger','INSTANCE_POOL_CAPACITY_EXCEEDED','closed','acquire','add','create','then','45TcOyfL','3232164XRpSgF','map','length','8BzwOEF','entries','invalidate','reason','2347431QHlVgP','invalidated','ttl','splice','maxEntries','2468823xQWrYc','catch','evicted','clear','shift','destroy-start','delete','Instance\x20pool\x20capacity\x20','lastIdleSequence','INSTANCE_POOL_INVALID_INPUT','set','code'];_0x2be5=function(){return _0x1d46c5;};return _0x2be5();}function s(_0x14ea8f,_0x9968c0){const _0x1ada25=_0x3de2d2;for(let _0x300063 of _0x14ea8f['splice'](0x0))_0x300063[_0x1ada25(0x1cb)](_0x9968c0);}function c(_0x39d811){const _0x345628=_0x3de2d2;_0x39d811[_0x345628(0x1cf)]!==void 0x0&&(clearTimeout(_0x39d811[_0x345628(0x1cf)]),delete _0x39d811[_0x345628(0x1cf)]);}function l(){const _0xcf7438=_0x3de2d2;return new e(_0xcf7438(0x1bf),'Instance\x20pool\x20is\x20closed');}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/generic-keyed-instance-pool",
3
3
  "type": "module",
4
- "version": "1.0.4",
4
+ "version": "1.1.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",