@univer-cli/generic-keyed-instance-pool 1.2.0 → 1.3.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.
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 _0x3470(_0x1fbfa3,_0x49d6a4){_0x1fbfa3=_0x1fbfa3-0x1e2;const _0x20ea51=_0x20ea();let _0x34708b=_0x20ea51[_0x1fbfa3];return _0x34708b;}(function(_0x32bb74,_0x1f89bd){const _0x34a1e1=_0x3470,_0x421c1d=_0x32bb74();while(!![]){try{const _0x461236=parseInt(_0x34a1e1(0x1ee))/0x1+parseInt(_0x34a1e1(0x201))/0x2+parseInt(_0x34a1e1(0x21d))/0x3+parseInt(_0x34a1e1(0x21b))/0x4*(parseInt(_0x34a1e1(0x205))/0x5)+parseInt(_0x34a1e1(0x20a))/0x6+parseInt(_0x34a1e1(0x21e))/0x7*(parseInt(_0x34a1e1(0x1f9))/0x8)+-parseInt(_0x34a1e1(0x1ed))/0x9;if(_0x461236===_0x1f89bd)break;else _0x421c1d['push'](_0x421c1d['shift']());}catch(_0x249e03){_0x421c1d['push'](_0x421c1d['shift']());}}}(_0x20ea,0xe7240));function _0x20ea(){const _0x54bd27=['clear','rejected','3737612BddiTr','then','123336uPGzYM','973IeGfBP','shift','get','lastIdleSequence','key\x20must\x20not\x20be\x20empty','splice','length','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','catch','entries','Instance\x20pool\x20capacity\x20','find','status','ttl','unref','busy','27268488lDqNxq','923908LncCCc','isFinite','resolve','maxEntries','factory','destroy','reject','cache','closed','values','create-start','57016AzIheM','InstancePoolError','now','create-complete','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','create','key','map','1484638wLwSpr','code','INSTANCE_POOL_INVALID_INPUT','input','5eHuIrz','delete','set','invalidated','allSettled','2065134bFIlFQ','lru','evicted','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','waiters','instance','INSTANCE_POOL_CLOSED','Instance\x20pool\x20is\x20closed','isSafeInteger','idleTimer','name','size','reason','add','invalidate'];_0x20ea=function(){return _0x54bd27;};return _0x20ea();}var e=class extends Error{['code'];constructor(_0x3c2738,_0x5e7853,_0xf7c0af){const _0x4670d3=_0x3470;super(_0x5e7853,_0xf7c0af),this[_0x4670d3(0x214)]=_0x4670d3(0x1fa),this[_0x4670d3(0x202)]=_0x3c2738;}},t=0x493e0,n=0x14;function r(_0xefe6b4){const _0x295f7a=_0x3470;let _0xf2ad7d=new Map(),_0xb483e3=new Set(),_0xf1dad2=new Map(),_0xc0ce5e=_0xefe6b4[_0x295f7a(0x1f5)]?.['idleTtlMs']??t,_0x52a02f=_0xefe6b4[_0x295f7a(0x1f5)]?.[_0x295f7a(0x1f1)]??n,_0x3a4123=!0x1,_0x684a1,_0x2e8cbf=0x0;i(_0xc0ce5e,_0x52a02f);let _0x1a5cd9={async 'acquire'(_0x3b0283){const _0x1af351=_0x295f7a;_0x5132b4(),a(_0x3b0283);let _0x49a7df=_0xf2ad7d['get'](_0x3b0283['key']);if(_0x49a7df)return _0x49a7df[_0x1af351(0x1ec)]?await o(_0x3b0283,_0x49a7df[_0x1af351(0x20e)]):(c(_0x49a7df),_0x49a7df[_0x1af351(0x1ec)]=!0x0,_0x3504fc({'key':_0x3b0283[_0x1af351(0x1ff)],'type':'cache-hit'}),_0x30d9cc(_0x3b0283['key'],_0x49a7df));let _0x4ca41b=_0xf1dad2['get'](_0x3b0283[_0x1af351(0x1ff)]);if(_0x4ca41b)return await o(_0x3b0283,_0x4ca41b);let _0x4a58bd,_0x57d0d5=new Promise(_0x3e6d68=>{_0x4a58bd=_0x3e6d68;});_0xb483e3[_0x1af351(0x217)](_0x57d0d5),_0xf1dad2[_0x1af351(0x207)](_0x3b0283[_0x1af351(0x1ff)],[]);let _0x1e7ab5=Date[_0x1af351(0x1fb)]();_0x3504fc({'key':_0x3b0283[_0x1af351(0x1ff)],'type':_0x1af351(0x1f8)});try{await _0x549955();let _0x278f89=await _0xefe6b4[_0x1af351(0x1f2)][_0x1af351(0x1fe)](_0x3b0283);if(_0x3a4123)throw await _0xefe6b4[_0x1af351(0x1f2)][_0x1af351(0x1f3)]({'instance':_0x278f89,'key':_0x3b0283[_0x1af351(0x1ff)]}),l();let _0x5ce187={'busy':!0x0,'closed':!0x1,'instance':_0x278f89,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0xf1dad2['get'](_0x3b0283[_0x1af351(0x1ff)])??[]};return _0xf2ad7d['set'](_0x3b0283[_0x1af351(0x1ff)],_0x5ce187),_0x3504fc({'durationMs':Date['now']()-_0x1e7ab5,'key':_0x3b0283['key'],'type':_0x1af351(0x1fc)}),_0x30d9cc(_0x3b0283[_0x1af351(0x1ff)],_0x5ce187);}catch(_0x264691){throw s(_0xf1dad2[_0x1af351(0x220)](_0x3b0283[_0x1af351(0x1ff)])??[],_0x264691),_0x264691;}finally{_0xf1dad2['delete'](_0x3b0283[_0x1af351(0x1ff)]),_0xb483e3['delete'](_0x57d0d5),_0x4a58bd();}},async 'close'(){if(_0x684a1)return await _0x684a1;_0x3a4123=!0x0,_0x684a1=_0x56195b(),await _0x684a1;}};return _0x1a5cd9;function _0x30d9cc(_0x47b057,_0x4c75f5){const _0x1dfde9=_0x295f7a;let _0x2edf9a=!0x1;return{'instance':_0x4c75f5[_0x1dfde9(0x20f)],'key':_0x47b057,async 'invalidate'(){const _0x2a6379=_0x1dfde9;_0x2edf9a||(_0x2edf9a=!0x0,_0x4c75f5['invalidated']=!0x0,await _0x323f18(_0x47b057,_0x4c75f5,_0x2a6379(0x218)));},async 'release'(){const _0x57934e=_0x1dfde9;if(_0x2edf9a||(_0x2edf9a=!0x0,_0x4c75f5[_0x57934e(0x1f6)]))return;if(_0x4c75f5[_0x57934e(0x208)]){await _0x323f18(_0x47b057,_0x4c75f5,_0x57934e(0x218));return;}let _0x1fc751=_0x4c75f5[_0x57934e(0x20e)][_0x57934e(0x21f)]();_0x1fc751?_0x1fc751[_0x57934e(0x1f0)](_0x30d9cc(_0x47b057,_0x4c75f5)):(_0x4c75f5[_0x57934e(0x1ec)]=!0x1,_0x4c75f5[_0x57934e(0x221)]=++_0x2e8cbf,_0x5a23dd(_0x47b057,_0x4c75f5));}};}async function _0x323f18(_0x3f20ec,_0x399853,_0x1a18fe){const _0x59b1fc=_0x295f7a;let _0x4c8f27=_0x399853[_0x59b1fc(0x20e)][_0x59b1fc(0x1e2)](0x0);_0xf2ad7d['get'](_0x3f20ec)===_0x399853&&_0xf2ad7d['delete'](_0x3f20ec);try{await _0x2af5d3(_0x3f20ec,_0x399853,_0x1a18fe);}finally{_0x1a18fe&&_0x3504fc({'key':_0x3f20ec,'reason':_0x1a18fe,'type':'evicted'}),_0x3a4123?s(_0x4c8f27,l()):_0x531aa5(_0x4c8f27);}}function _0x5a23dd(_0x168bb8,_0x4bb0c9){const _0x1e3118=_0x295f7a;c(_0x4bb0c9),_0x4bb0c9[_0x1e3118(0x213)]=setTimeout(()=>{const _0x1e48cc=_0x1e3118;_0x4bb0c9['busy']||_0xf2ad7d[_0x1e48cc(0x220)](_0x168bb8)!==_0x4bb0c9||(_0xf2ad7d[_0x1e48cc(0x206)](_0x168bb8),_0x2af5d3(_0x168bb8,_0x4bb0c9,'ttl')[_0x1e48cc(0x21c)](()=>_0x3504fc({'key':_0x168bb8,'reason':_0x1e48cc(0x1ea),'type':_0x1e48cc(0x20c)}))[_0x1e48cc(0x1e5)](()=>void 0x0));},_0xc0ce5e),_0x4bb0c9['idleTimer'][_0x1e3118(0x1eb)]?.();}async function _0x549955(){const _0x5453bc=_0x295f7a;for(;_0xf2ad7d[_0x5453bc(0x215)]+_0xf1dad2[_0x5453bc(0x215)]>_0x52a02f;){let _0x140477;for(let _0xf5bcb7 of _0xf2ad7d)_0xf5bcb7[0x1][_0x5453bc(0x1ec)]||(!_0x140477||_0xf5bcb7[0x1][_0x5453bc(0x221)]<_0x140477[0x1]['lastIdleSequence'])&&(_0x140477=_0xf5bcb7);if(!_0x140477)throw new e('INSTANCE_POOL_CAPACITY_EXCEEDED',_0x5453bc(0x1e7)+_0x52a02f+_0x5453bc(0x1fd));_0xf2ad7d['delete'](_0x140477[0x0]),await _0x2af5d3(_0x140477[0x0],_0x140477[0x1],_0x5453bc(0x20b)),_0x3504fc({'key':_0x140477[0x0],'reason':_0x5453bc(0x20b),'type':_0x5453bc(0x20c)});}}async function _0x56195b(){const _0x5c83e7=_0x295f7a;let _0x715c96=l(),_0x198371=[..._0xf2ad7d[_0x5c83e7(0x1e6)]()];for(let [,_0x2d94fc]of _0x198371)s(_0x2d94fc['waiters'],_0x715c96);for(let _0x2a9c2d of _0xf1dad2[_0x5c83e7(0x1f7)]())s(_0x2a9c2d,_0x715c96);_0xf2ad7d[_0x5c83e7(0x219)]();let _0x4df899=(await Promise[_0x5c83e7(0x209)]([..._0x198371[_0x5c83e7(0x200)](async([_0x26bf10,_0x262910])=>await _0x2af5d3(_0x26bf10,_0x262910)),..._0xb483e3]))[_0x5c83e7(0x1e8)](_0x3ee192=>_0x3ee192[_0x5c83e7(0x1e9)]===_0x5c83e7(0x21a));if(_0x4df899?.[_0x5c83e7(0x1e9)]===_0x5c83e7(0x21a))throw _0x4df899[_0x5c83e7(0x216)];}function _0x3504fc(_0x5db225){try{_0xefe6b4['onEvent']?.(_0x5db225);}catch{}}function _0x5132b4(){if(_0x3a4123)throw l();}function _0x531aa5(_0x3c6ca2){const _0x1f5bd1=_0x295f7a;for(let _0x6c4f91 of _0x3c6ca2)_0x1a5cd9['acquire'](_0x6c4f91[_0x1f5bd1(0x204)])[_0x1f5bd1(0x21c)](_0x6c4f91['resolve'],_0x6c4f91[_0x1f5bd1(0x1f4)]);}async function _0x2af5d3(_0x276ae7,_0x4297b7,_0x2b2e8a){const _0x1c6e3d=_0x295f7a;_0x4297b7[_0x1c6e3d(0x1f6)]||(_0x4297b7[_0x1c6e3d(0x1f6)]=!0x0,c(_0x4297b7),_0x2b2e8a&&_0x3504fc({'key':_0x276ae7,'reason':_0x2b2e8a,'type':'destroy-start'}),await _0xefe6b4[_0x1c6e3d(0x1f2)]['destroy']({'instance':_0x4297b7[_0x1c6e3d(0x20f)],'key':_0x276ae7}));}}function i(_0x4ef97a,_0x484008){const _0x25bfba=_0x3470;if(!Number[_0x25bfba(0x1ef)](_0x4ef97a)||_0x4ef97a<0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0x25bfba(0x1e4));if(!Number[_0x25bfba(0x212)](_0x484008)||_0x484008<=0x0)throw new e(_0x25bfba(0x203),_0x25bfba(0x20d));}function a(_0x49c5b9){const _0x3009b1=_0x3470;if(_0x49c5b9['key'][_0x3009b1(0x1e3)]===0x0)throw new e(_0x3009b1(0x203),_0x3009b1(0x222));}function o(_0xf1601a,_0x5ab5f1){return new Promise((_0x25fefd,_0x6536ae)=>{_0x5ab5f1['push']({'input':_0xf1601a,'reject':_0x6536ae,'resolve':_0x25fefd});});}function s(_0x195c77,_0x3cc301){const _0x29f110=_0x3470;for(let _0xd97174 of _0x195c77['splice'](0x0))_0xd97174[_0x29f110(0x1f4)](_0x3cc301);}function c(_0x570ac1){const _0x1009b7=_0x3470;_0x570ac1[_0x1009b7(0x213)]!==void 0x0&&(clearTimeout(_0x570ac1['idleTimer']),delete _0x570ac1[_0x1009b7(0x213)]);}function l(){const _0x38cc92=_0x3470;return new e(_0x38cc92(0x210),_0x38cc92(0x211));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ const _0xa543cc=_0x1f80;(function(_0x550fd3,_0x276ad3){const _0x1edfcc=_0x1f80,_0x3372b4=_0x550fd3();while(!![]){try{const _0x4ffd94=parseInt(_0x1edfcc(0x10d))/0x1*(-parseInt(_0x1edfcc(0x117))/0x2)+-parseInt(_0x1edfcc(0x126))/0x3+parseInt(_0x1edfcc(0x122))/0x4*(parseInt(_0x1edfcc(0x13c))/0x5)+-parseInt(_0x1edfcc(0x11d))/0x6*(-parseInt(_0x1edfcc(0x120))/0x7)+parseInt(_0x1edfcc(0x11a))/0x8*(parseInt(_0x1edfcc(0x106))/0x9)+parseInt(_0x1edfcc(0x11b))/0xa*(-parseInt(_0x1edfcc(0x104))/0xb)+parseInt(_0x1edfcc(0x102))/0xc*(-parseInt(_0x1edfcc(0x128))/0xd);if(_0x4ffd94===_0x276ad3)break;else _0x3372b4['push'](_0x3372b4['shift']());}catch(_0x4570e6){_0x3372b4['push'](_0x3372b4['shift']());}}}(_0xcb3d,0x9dca6));var e=class extends Error{[_0xa543cc(0x109)];constructor(_0xd749ff,_0x36553c,_0x262fe4){const _0x129c28=_0xa543cc;super(_0x36553c,_0x262fe4),this[_0x129c28(0x125)]=_0x129c28(0x115),this['code']=_0xd749ff;}},t=0x493e0,n=0x14;function r(_0x5d7c51){const _0x12d7a0=_0xa543cc;let _0x467321=new Map(),_0x8a05b4=new Set(),_0x5ce54a=new Map(),_0x4dc02e=_0x5d7c51[_0x12d7a0(0x131)]?.[_0x12d7a0(0x105)]??t,_0x214299=_0x5d7c51[_0x12d7a0(0x131)]?.[_0x12d7a0(0x10c)]??n,_0x15c52a=!0x1,_0x20d347,_0x4d45b0=0x0;i(_0x4dc02e,_0x214299);let _0x13c5b0={async 'acquire'(_0x3ecef0){const _0x7193c2=_0x12d7a0;_0xdaf66a(),a(_0x3ecef0);let _0x193366=_0x467321[_0x7193c2(0x136)](_0x3ecef0[_0x7193c2(0x10e)]);if(_0x193366)return _0x193366[_0x7193c2(0x119)]?await o(_0x3ecef0,_0x193366[_0x7193c2(0x10b)]):(c(_0x193366),_0x193366[_0x7193c2(0x119)]=!0x0,_0xe3dc52({'key':_0x3ecef0[_0x7193c2(0x10e)],'type':_0x7193c2(0x108)}),_0xc32583(_0x3ecef0[_0x7193c2(0x10e)],_0x193366));let _0x48c9db=_0x5ce54a[_0x7193c2(0x136)](_0x3ecef0['key']);if(_0x48c9db)return await o(_0x3ecef0,_0x48c9db);let _0x38000b,_0xa6729d=new Promise(_0x3370a7=>{_0x38000b=_0x3370a7;});_0x8a05b4['add'](_0xa6729d),_0x5ce54a[_0x7193c2(0x138)](_0x3ecef0['key'],[]);let _0x3d92c7=Date[_0x7193c2(0x13a)]();_0xe3dc52({'key':_0x3ecef0[_0x7193c2(0x10e)],'type':'create-start'});try{await _0x22beb4();let _0x4f51b7=await _0x5d7c51['factory']['create'](_0x3ecef0);if(_0x15c52a)throw await _0x5d7c51['factory'][_0x7193c2(0x100)]({'instance':_0x4f51b7,'key':_0x3ecef0['key']}),l();let _0x1e0e0c={'busy':!0x0,'closed':!0x1,'instance':_0x4f51b7,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x5ce54a['get'](_0x3ecef0[_0x7193c2(0x10e)])??[]};return _0x467321['set'](_0x3ecef0[_0x7193c2(0x10e)],_0x1e0e0c),_0xe3dc52({'durationMs':Date[_0x7193c2(0x13a)]()-_0x3d92c7,'key':_0x3ecef0[_0x7193c2(0x10e)],'type':'create-complete'}),_0xc32583(_0x3ecef0['key'],_0x1e0e0c);}catch(_0x5c7bcf){throw s(_0x5ce54a[_0x7193c2(0x136)](_0x3ecef0[_0x7193c2(0x10e)])??[],_0x5c7bcf),_0x5c7bcf;}finally{_0x5ce54a[_0x7193c2(0x135)](_0x3ecef0[_0x7193c2(0x10e)]),_0x8a05b4[_0x7193c2(0x135)](_0xa6729d),_0x38000b();}},async 'close'(){if(_0x20d347)return await _0x20d347;_0x15c52a=!0x0,_0x20d347=_0x4713b6(),await _0x20d347;}};return _0x13c5b0;function _0xc32583(_0x5eca1d,_0x596bc2){const _0x42591c=_0x12d7a0;let _0x4a7db7=!0x1;return{'instance':_0x596bc2[_0x42591c(0x107)],'key':_0x5eca1d,async 'invalidate'(){const _0x30d95e=_0x42591c;_0x4a7db7||(_0x4a7db7=!0x0,_0x596bc2[_0x30d95e(0x139)]=!0x0,await _0x3d54aa(_0x5eca1d,_0x596bc2,_0x30d95e(0x112)));},async 'release'(){const _0x2d05e0=_0x42591c;if(_0x4a7db7||(_0x4a7db7=!0x0,_0x596bc2[_0x2d05e0(0x114)]))return;if(_0x596bc2[_0x2d05e0(0x139)]){await _0x3d54aa(_0x5eca1d,_0x596bc2,'invalidate');return;}let _0x2ff056=_0x596bc2[_0x2d05e0(0x10b)][_0x2d05e0(0x12e)]();_0x2ff056?_0x2ff056['resolve'](_0xc32583(_0x5eca1d,_0x596bc2)):(_0x596bc2[_0x2d05e0(0x119)]=!0x1,_0x596bc2[_0x2d05e0(0x12a)]=++_0x4d45b0,_0x3c9a46(_0x5eca1d,_0x596bc2));}};}async function _0x3d54aa(_0x2b8020,_0x53c8a3,_0x1c48d7){const _0x3c13f1=_0x12d7a0;let _0x5b1ab7=_0x53c8a3[_0x3c13f1(0x10b)][_0x3c13f1(0x137)](0x0);_0x467321['get'](_0x2b8020)===_0x53c8a3&&_0x467321[_0x3c13f1(0x135)](_0x2b8020);try{await _0x5504ea(_0x2b8020,_0x53c8a3,_0x1c48d7);}finally{_0x1c48d7&&_0xe3dc52({'key':_0x2b8020,'reason':_0x1c48d7,'type':'evicted'}),_0x15c52a?s(_0x5b1ab7,l()):_0x2b6a2a(_0x5b1ab7);}}function _0x3c9a46(_0x2e5fe3,_0x7679e0){const _0x1a6537=_0x12d7a0;c(_0x7679e0),_0x7679e0[_0x1a6537(0x12b)]=setTimeout(()=>{const _0x4cdbe0=_0x1a6537;_0x7679e0['busy']||_0x467321['get'](_0x2e5fe3)!==_0x7679e0||(_0x467321['delete'](_0x2e5fe3),_0x5504ea(_0x2e5fe3,_0x7679e0,_0x4cdbe0(0x129))['then'](()=>_0xe3dc52({'key':_0x2e5fe3,'reason':_0x4cdbe0(0x129),'type':_0x4cdbe0(0x133)}))['catch'](()=>void 0x0));},_0x4dc02e),_0x7679e0['idleTimer']['unref']?.();}async function _0x22beb4(){const _0x5e5d24=_0x12d7a0;for(;_0x467321['size']+_0x5ce54a[_0x5e5d24(0x12c)]>_0x214299;){let _0x21b329;for(let _0x34b2a of _0x467321)_0x34b2a[0x1][_0x5e5d24(0x119)]||(!_0x21b329||_0x34b2a[0x1][_0x5e5d24(0x12a)]<_0x21b329[0x1]['lastIdleSequence'])&&(_0x21b329=_0x34b2a);if(!_0x21b329)throw new e(_0x5e5d24(0x111),_0x5e5d24(0x118)+_0x214299+'\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances');_0x467321[_0x5e5d24(0x135)](_0x21b329[0x0]),await _0x5504ea(_0x21b329[0x0],_0x21b329[0x1],'lru'),_0xe3dc52({'key':_0x21b329[0x0],'reason':_0x5e5d24(0x12d),'type':_0x5e5d24(0x133)});}}async function _0x4713b6(){const _0x382787=_0x12d7a0;let _0xe912f6=l(),_0xe23c61=[..._0x467321[_0x382787(0x10f)]()];for(let [,_0x157cc1]of _0xe23c61)s(_0x157cc1['waiters'],_0xe912f6);for(let _0xc3d6ee of _0x5ce54a[_0x382787(0x10a)]())s(_0xc3d6ee,_0xe912f6);_0x467321['clear']();let _0x23e88d=(await Promise[_0x382787(0x132)]([..._0xe23c61['map'](async([_0x5cb927,_0x5eaf8e])=>await _0x5504ea(_0x5cb927,_0x5eaf8e)),..._0x8a05b4]))[_0x382787(0x101)](_0x562ba8=>_0x562ba8[_0x382787(0x116)]===_0x382787(0x113));if(_0x23e88d?.['status']===_0x382787(0x113))throw _0x23e88d['reason'];}function _0xe3dc52(_0x12a96c){const _0x1c8fce=_0x12d7a0;try{_0x5d7c51[_0x1c8fce(0x127)]?.(_0x12a96c);}catch{}}function _0xdaf66a(){if(_0x15c52a)throw l();}function _0x2b6a2a(_0x48edf1){const _0x1ed87f=_0x12d7a0;for(let _0x5d48c0 of _0x48edf1)_0x13c5b0[_0x1ed87f(0x123)](_0x5d48c0[_0x1ed87f(0x13d)])[_0x1ed87f(0x110)](_0x5d48c0[_0x1ed87f(0x124)],_0x5d48c0[_0x1ed87f(0x134)]);}async function _0x5504ea(_0xa64422,_0x58fb92,_0x5404a6){const _0x2f3c9d=_0x12d7a0;_0x58fb92[_0x2f3c9d(0x114)]||(_0x58fb92[_0x2f3c9d(0x114)]=!0x0,c(_0x58fb92),_0x5404a6&&_0xe3dc52({'key':_0xa64422,'reason':_0x5404a6,'type':'destroy-start'}),await _0x5d7c51[_0x2f3c9d(0x121)]['destroy']({'instance':_0x58fb92['instance'],'key':_0xa64422}));}}function i(_0xc8ed99,_0x38bc27){const _0x48734a=_0xa543cc;if(!Number[_0x48734a(0x13b)](_0xc8ed99)||_0xc8ed99<0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0x48734a(0x103));if(!Number[_0x48734a(0x11f)](_0x38bc27)||_0x38bc27<=0x0)throw new e(_0x48734a(0x12f),'cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function _0x1f80(_0x2e9c7b,_0x5f15b9){_0x2e9c7b=_0x2e9c7b-0x100;const _0xcb3dc9=_0xcb3d();let _0x1f80f9=_0xcb3dc9[_0x2e9c7b];return _0x1f80f9;}function a(_0x4d165b){const _0x223b7e=_0xa543cc;if(_0x4d165b[_0x223b7e(0x10e)][_0x223b7e(0x11c)]===0x0)throw new e(_0x223b7e(0x12f),'key\x20must\x20not\x20be\x20empty');}function _0xcb3d(){const _0x2f474c=['1260525mvRQtz','onEvent','195aFszEB','ttl','lastIdleSequence','idleTimer','size','lru','shift','INSTANCE_POOL_INVALID_INPUT','INSTANCE_POOL_CLOSED','cache','allSettled','evicted','reject','delete','get','splice','set','invalidated','now','isFinite','46090EMBvBG','input','destroy','find','761388BHUOnQ','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','2023351HOrbUd','idleTtlMs','69768kaTApw','instance','cache-hit','code','values','waiters','maxEntries','8057iOpqGA','key','entries','then','INSTANCE_POOL_CAPACITY_EXCEEDED','invalidate','rejected','closed','InstancePoolError','status','74wMvSix','Instance\x20pool\x20capacity\x20','busy','1272OzVign','10WxgYmb','length','2005596liePJC','Instance\x20pool\x20is\x20closed','isSafeInteger','14BszaQq','factory','260JWIzGj','acquire','resolve','name'];_0xcb3d=function(){return _0x2f474c;};return _0xcb3d();}function o(_0x75a569,_0x15b5ff){return new Promise((_0x6cb28a,_0x12f934)=>{_0x15b5ff['push']({'input':_0x75a569,'reject':_0x12f934,'resolve':_0x6cb28a});});}function s(_0x5c07ba,_0xf1046c){const _0x5cd64b=_0xa543cc;for(let _0x202394 of _0x5c07ba[_0x5cd64b(0x137)](0x0))_0x202394[_0x5cd64b(0x134)](_0xf1046c);}function c(_0x2cd934){const _0xfd2168=_0xa543cc;_0x2cd934[_0xfd2168(0x12b)]!==void 0x0&&(clearTimeout(_0x2cd934[_0xfd2168(0x12b)]),delete _0x2cd934[_0xfd2168(0x12b)]);}function l(){const _0x3be586=_0xa543cc;return new e(_0x3be586(0x130),_0x3be586(0x11e));}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.2.0",
4
+ "version": "1.3.1",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",