@univer-cli/generic-keyed-instance-pool 1.4.0 → 1.6.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
- const _0x1ee478=_0xafff;(function(_0x2035ee,_0x3d358f){const _0x3b5d0f=_0xafff,_0x584d4b=_0x2035ee();while(!![]){try{const _0x4e368d=parseInt(_0x3b5d0f(0x1ba))/0x1+parseInt(_0x3b5d0f(0x1b4))/0x2+-parseInt(_0x3b5d0f(0x1af))/0x3*(parseInt(_0x3b5d0f(0x1b0))/0x4)+-parseInt(_0x3b5d0f(0x18a))/0x5*(-parseInt(_0x3b5d0f(0x1b3))/0x6)+-parseInt(_0x3b5d0f(0x1c6))/0x7+-parseInt(_0x3b5d0f(0x1a2))/0x8+-parseInt(_0x3b5d0f(0x1a1))/0x9*(parseInt(_0x3b5d0f(0x1a6))/0xa);if(_0x4e368d===_0x3d358f)break;else _0x584d4b['push'](_0x584d4b['shift']());}catch(_0x228607){_0x584d4b['push'](_0x584d4b['shift']());}}}(_0x2348,0x54235));var e=class extends Error{[_0x1ee478(0x19c)];constructor(_0x17ebe3,_0x397f5c,_0x3d4c79){const _0x518525=_0x1ee478;super(_0x397f5c,_0x3d4c79),this[_0x518525(0x1aa)]=_0x518525(0x1ae),this[_0x518525(0x19c)]=_0x17ebe3;}},t=0x493e0,n=0x14;function _0xafff(_0x2b8d2d,_0x5daf3f){_0x2b8d2d=_0x2b8d2d-0x185;const _0x2348f3=_0x2348();let _0xafff13=_0x2348f3[_0x2b8d2d];return _0xafff13;}function _0x2348(){const _0x271056=['length','destroy-start','214806YLGjip','999708nqHPMl','entries','then','reject','INSTANCE_POOL_CAPACITY_EXCEEDED','idleTimer','477721gJdvcy','create','INSTANCE_POOL_CLOSED','key\x20must\x20not\x20be\x20empty','splice','unref','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','cache-hit','INSTANCE_POOL_INVALID_INPUT','idleTtlMs','delete','lru','139321kWjbyd','create-complete','maxEntries','lastIdleSequence','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','waiters','shift','15pqGWPP','acquire','find','isSafeInteger','invalidate','push','key','evicted','invalidated','add','values','clear','factory','allSettled','ttl','status','destroy','set','code','Instance\x20pool\x20is\x20closed','resolve','rejected','size','142119rMZumi','263248uLvLTz','now','get','cache','110NKKjyO','reason','closed','instance','name','busy','map','onEvent','InstancePoolError','3GGWnSR','2055356KedFxX'];_0x2348=function(){return _0x271056;};return _0x2348();}function r(_0x50d293){const _0x183c9b=_0x1ee478;let _0x4829c2=new Map(),_0x54bf93=new Set(),_0x45ad11=new Map(),_0x94f9b7=_0x50d293[_0x183c9b(0x1a5)]?.[_0x183c9b(0x1c3)]??t,_0x250b9e=_0x50d293['cache']?.[_0x183c9b(0x185)]??n,_0x46e4b1=!0x1,_0x529f97,_0x53806a=0x0;i(_0x94f9b7,_0x250b9e);let _0x1fe61b={async 'acquire'(_0x333a03){const _0x350f5b=_0x183c9b;_0x6b66d4(),a(_0x333a03);let _0x2029e=_0x4829c2[_0x350f5b(0x1a4)](_0x333a03[_0x350f5b(0x190)]);if(_0x2029e)return _0x2029e[_0x350f5b(0x1ab)]?await o(_0x333a03,_0x2029e[_0x350f5b(0x188)]):(c(_0x2029e),_0x2029e[_0x350f5b(0x1ab)]=!0x0,_0x625f8d({'key':_0x333a03[_0x350f5b(0x190)],'type':_0x350f5b(0x1c1)}),_0x433216(_0x333a03[_0x350f5b(0x190)],_0x2029e));let _0xcf8679=_0x45ad11[_0x350f5b(0x1a4)](_0x333a03[_0x350f5b(0x190)]);if(_0xcf8679)return await o(_0x333a03,_0xcf8679);let _0x469293,_0x1b2971=new Promise(_0x55fc7e=>{_0x469293=_0x55fc7e;});_0x54bf93[_0x350f5b(0x193)](_0x1b2971),_0x45ad11[_0x350f5b(0x19b)](_0x333a03[_0x350f5b(0x190)],[]);let _0x5e4fa4=Date['now']();_0x625f8d({'key':_0x333a03['key'],'type':'create-start'});try{await _0x2cbf86();let _0x12fae4=await _0x50d293[_0x350f5b(0x196)][_0x350f5b(0x1bb)](_0x333a03);if(_0x46e4b1)throw await _0x50d293[_0x350f5b(0x196)][_0x350f5b(0x19a)]({'instance':_0x12fae4,'key':_0x333a03[_0x350f5b(0x190)]}),l();let _0x2df8b9={'busy':!0x0,'closed':!0x1,'instance':_0x12fae4,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x45ad11[_0x350f5b(0x1a4)](_0x333a03[_0x350f5b(0x190)])??[]};return _0x4829c2[_0x350f5b(0x19b)](_0x333a03['key'],_0x2df8b9),_0x625f8d({'durationMs':Date[_0x350f5b(0x1a3)]()-_0x5e4fa4,'key':_0x333a03[_0x350f5b(0x190)],'type':_0x350f5b(0x1c7)}),_0x433216(_0x333a03[_0x350f5b(0x190)],_0x2df8b9);}catch(_0x2b87ab){throw s(_0x45ad11[_0x350f5b(0x1a4)](_0x333a03[_0x350f5b(0x190)])??[],_0x2b87ab),_0x2b87ab;}finally{_0x45ad11[_0x350f5b(0x1c4)](_0x333a03['key']),_0x54bf93[_0x350f5b(0x1c4)](_0x1b2971),_0x469293();}},async 'close'(){if(_0x529f97)return await _0x529f97;_0x46e4b1=!0x0,_0x529f97=_0x53f219(),await _0x529f97;}};return _0x1fe61b;function _0x433216(_0x4992ca,_0x4b4269){const _0xed21f8=_0x183c9b;let _0x3a83ab=!0x1;return{'instance':_0x4b4269[_0xed21f8(0x1a9)],'key':_0x4992ca,async 'invalidate'(){const _0x244a05=_0xed21f8;_0x3a83ab||(_0x3a83ab=!0x0,_0x4b4269[_0x244a05(0x192)]=!0x0,await _0x3a7a9f(_0x4992ca,_0x4b4269,_0x244a05(0x18e)));},async 'release'(){const _0x405272=_0xed21f8;if(_0x3a83ab||(_0x3a83ab=!0x0,_0x4b4269['closed']))return;if(_0x4b4269['invalidated']){await _0x3a7a9f(_0x4992ca,_0x4b4269,_0x405272(0x18e));return;}let _0x494f48=_0x4b4269['waiters'][_0x405272(0x189)]();_0x494f48?_0x494f48[_0x405272(0x19e)](_0x433216(_0x4992ca,_0x4b4269)):(_0x4b4269['busy']=!0x1,_0x4b4269['lastIdleSequence']=++_0x53806a,_0x427971(_0x4992ca,_0x4b4269));}};}async function _0x3a7a9f(_0x10536b,_0x239b9f,_0x2bc227){const _0x3c2b4a=_0x183c9b;let _0x1b88ba=_0x239b9f[_0x3c2b4a(0x188)][_0x3c2b4a(0x1be)](0x0);_0x4829c2['get'](_0x10536b)===_0x239b9f&&_0x4829c2['delete'](_0x10536b);try{await _0x2a4c3b(_0x10536b,_0x239b9f,_0x2bc227);}finally{_0x2bc227&&_0x625f8d({'key':_0x10536b,'reason':_0x2bc227,'type':_0x3c2b4a(0x191)}),_0x46e4b1?s(_0x1b88ba,l()):_0x5ed20e(_0x1b88ba);}}function _0x427971(_0x195b4b,_0x1e12fe){const _0x5e9925=_0x183c9b;c(_0x1e12fe),_0x1e12fe[_0x5e9925(0x1b9)]=setTimeout(()=>{const _0x123e45=_0x5e9925;_0x1e12fe['busy']||_0x4829c2[_0x123e45(0x1a4)](_0x195b4b)!==_0x1e12fe||(_0x4829c2['delete'](_0x195b4b),_0x2a4c3b(_0x195b4b,_0x1e12fe,_0x123e45(0x198))[_0x123e45(0x1b6)](()=>_0x625f8d({'key':_0x195b4b,'reason':_0x123e45(0x198),'type':_0x123e45(0x191)}))['catch'](()=>void 0x0));},_0x94f9b7),_0x1e12fe[_0x5e9925(0x1b9)][_0x5e9925(0x1bf)]?.();}async function _0x2cbf86(){const _0x3bad9f=_0x183c9b;for(;_0x4829c2[_0x3bad9f(0x1a0)]+_0x45ad11[_0x3bad9f(0x1a0)]>_0x250b9e;){let _0x34498d;for(let _0x137083 of _0x4829c2)_0x137083[0x1][_0x3bad9f(0x1ab)]||(!_0x34498d||_0x137083[0x1][_0x3bad9f(0x186)]<_0x34498d[0x1][_0x3bad9f(0x186)])&&(_0x34498d=_0x137083);if(!_0x34498d)throw new e(_0x3bad9f(0x1b8),'Instance\x20pool\x20capacity\x20'+_0x250b9e+_0x3bad9f(0x187));_0x4829c2[_0x3bad9f(0x1c4)](_0x34498d[0x0]),await _0x2a4c3b(_0x34498d[0x0],_0x34498d[0x1],_0x3bad9f(0x1c5)),_0x625f8d({'key':_0x34498d[0x0],'reason':_0x3bad9f(0x1c5),'type':_0x3bad9f(0x191)});}}async function _0x53f219(){const _0x53d24b=_0x183c9b;let _0x484885=l(),_0x33df1b=[..._0x4829c2[_0x53d24b(0x1b5)]()];for(let [,_0x3d29ce]of _0x33df1b)s(_0x3d29ce['waiters'],_0x484885);for(let _0x5ad5a2 of _0x45ad11[_0x53d24b(0x194)]())s(_0x5ad5a2,_0x484885);_0x4829c2[_0x53d24b(0x195)]();let _0x2d4f4a=(await Promise[_0x53d24b(0x197)]([..._0x33df1b[_0x53d24b(0x1ac)](async([_0xeb7270,_0x3639c3])=>await _0x2a4c3b(_0xeb7270,_0x3639c3)),..._0x54bf93]))[_0x53d24b(0x18c)](_0x2572e1=>_0x2572e1['status']===_0x53d24b(0x19f));if(_0x2d4f4a?.[_0x53d24b(0x199)]===_0x53d24b(0x19f))throw _0x2d4f4a[_0x53d24b(0x1a7)];}function _0x625f8d(_0x4152b7){const _0x56d7c0=_0x183c9b;try{_0x50d293[_0x56d7c0(0x1ad)]?.(_0x4152b7);}catch{}}function _0x6b66d4(){if(_0x46e4b1)throw l();}function _0x5ed20e(_0x371c0a){const _0x44c495=_0x183c9b;for(let _0x26203d of _0x371c0a)_0x1fe61b[_0x44c495(0x18b)](_0x26203d['input'])[_0x44c495(0x1b6)](_0x26203d['resolve'],_0x26203d[_0x44c495(0x1b7)]);}async function _0x2a4c3b(_0x219fbd,_0xf30f09,_0x17defd){const _0x4928ff=_0x183c9b;_0xf30f09['closed']||(_0xf30f09[_0x4928ff(0x1a8)]=!0x0,c(_0xf30f09),_0x17defd&&_0x625f8d({'key':_0x219fbd,'reason':_0x17defd,'type':_0x4928ff(0x1b2)}),await _0x50d293['factory'][_0x4928ff(0x19a)]({'instance':_0xf30f09[_0x4928ff(0x1a9)],'key':_0x219fbd}));}}function i(_0x4ef0f8,_0x3350bf){const _0x12d3c0=_0x1ee478;if(!Number['isFinite'](_0x4ef0f8)||_0x4ef0f8<0x0)throw new e(_0x12d3c0(0x1c2),_0x12d3c0(0x1c0));if(!Number[_0x12d3c0(0x18d)](_0x3350bf)||_0x3350bf<=0x0)throw new e(_0x12d3c0(0x1c2),'cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function a(_0x20fa29){const _0x44cd6c=_0x1ee478;if(_0x20fa29[_0x44cd6c(0x190)][_0x44cd6c(0x1b1)]===0x0)throw new e(_0x44cd6c(0x1c2),_0x44cd6c(0x1bd));}function o(_0x8d2dc,_0x500b16){return new Promise((_0x2fe1cb,_0x535858)=>{const _0xf468c7=_0xafff;_0x500b16[_0xf468c7(0x18f)]({'input':_0x8d2dc,'reject':_0x535858,'resolve':_0x2fe1cb});});}function s(_0xc2c5d6,_0x103da7){const _0x2115fc=_0x1ee478;for(let _0x172907 of _0xc2c5d6['splice'](0x0))_0x172907[_0x2115fc(0x1b7)](_0x103da7);}function c(_0x5643eb){const _0x5d0b28=_0x1ee478;_0x5643eb[_0x5d0b28(0x1b9)]!==void 0x0&&(clearTimeout(_0x5643eb[_0x5d0b28(0x1b9)]),delete _0x5643eb['idleTimer']);}function l(){const _0x1cfea8=_0x1ee478;return new e(_0x1cfea8(0x1bc),_0x1cfea8(0x19d));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ const _0x1c83e2=_0xfd6e;(function(_0x3c76c9,_0xa7b337){const _0xdf9352=_0xfd6e,_0x1e48f4=_0x3c76c9();while(!![]){try{const _0x5ec824=-parseInt(_0xdf9352(0x11f))/0x1+-parseInt(_0xdf9352(0x136))/0x2*(parseInt(_0xdf9352(0x10c))/0x3)+-parseInt(_0xdf9352(0xff))/0x4+-parseInt(_0xdf9352(0x120))/0x5+parseInt(_0xdf9352(0x117))/0x6*(-parseInt(_0xdf9352(0x128))/0x7)+-parseInt(_0xdf9352(0x122))/0x8+parseInt(_0xdf9352(0x110))/0x9*(parseInt(_0xdf9352(0x138))/0xa);if(_0x5ec824===_0xa7b337)break;else _0x1e48f4['push'](_0x1e48f4['shift']());}catch(_0x33a9f9){_0x1e48f4['push'](_0x1e48f4['shift']());}}}(_0x49dc,0x79952));var e=class extends Error{[_0x1c83e2(0x101)];constructor(_0x4392a6,_0x508fcc,_0x357e59){const _0x3b2b21=_0x1c83e2;super(_0x508fcc,_0x357e59),this[_0x3b2b21(0x125)]='InstancePoolError',this[_0x3b2b21(0x101)]=_0x4392a6;}},t=0x493e0,n=0x14;function r(_0x1dc56a){const _0x36cc4c=_0x1c83e2;let _0x48f1ce=new Map(),_0x37ccbe=new Set(),_0x5d06bb=new Map(),_0x105f3a=_0x1dc56a['cache']?.['idleTtlMs']??t,_0x17e2f7=_0x1dc56a['cache']?.[_0x36cc4c(0x10e)]??n,_0x4fc7f0=!0x1,_0x2d7d16,_0x18e2a7=0x0;i(_0x105f3a,_0x17e2f7);let _0xd9329a={async 'acquire'(_0x4ce204){const _0x15ed89=_0x36cc4c;_0xee3a27(),a(_0x4ce204);let _0xbf269b=_0x48f1ce[_0x15ed89(0x102)](_0x4ce204[_0x15ed89(0x112)]);if(_0xbf269b)return _0xbf269b[_0x15ed89(0x119)]?await o(_0x4ce204,_0xbf269b[_0x15ed89(0x108)]):(c(_0xbf269b),_0xbf269b[_0x15ed89(0x119)]=!0x0,_0x1c143f({'key':_0x4ce204[_0x15ed89(0x112)],'type':'cache-hit'}),_0x1bc676(_0x4ce204[_0x15ed89(0x112)],_0xbf269b));let _0x1a3729=_0x5d06bb[_0x15ed89(0x102)](_0x4ce204['key']);if(_0x1a3729)return await o(_0x4ce204,_0x1a3729);let _0x40e1b2,_0x54b425=new Promise(_0x1647d4=>{_0x40e1b2=_0x1647d4;});_0x37ccbe[_0x15ed89(0x11a)](_0x54b425),_0x5d06bb[_0x15ed89(0x10d)](_0x4ce204[_0x15ed89(0x112)],[]);let _0x2a7b30=Date[_0x15ed89(0x132)]();_0x1c143f({'key':_0x4ce204[_0x15ed89(0x112)],'type':_0x15ed89(0x106)});try{await _0x757412();let _0x4dacb0=await _0x1dc56a[_0x15ed89(0x115)]['create'](_0x4ce204);if(_0x4fc7f0)throw await _0x1dc56a['factory'][_0x15ed89(0x11c)]({'instance':_0x4dacb0,'key':_0x4ce204['key']}),l();let _0x478495={'busy':!0x0,'closed':!0x1,'instance':_0x4dacb0,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x5d06bb['get'](_0x4ce204[_0x15ed89(0x112)])??[]};return _0x48f1ce[_0x15ed89(0x10d)](_0x4ce204[_0x15ed89(0x112)],_0x478495),_0x1c143f({'durationMs':Date[_0x15ed89(0x132)]()-_0x2a7b30,'key':_0x4ce204[_0x15ed89(0x112)],'type':_0x15ed89(0x12c)}),_0x1bc676(_0x4ce204[_0x15ed89(0x112)],_0x478495);}catch(_0x267aa0){throw s(_0x5d06bb[_0x15ed89(0x102)](_0x4ce204[_0x15ed89(0x112)])??[],_0x267aa0),_0x267aa0;}finally{_0x5d06bb[_0x15ed89(0x121)](_0x4ce204[_0x15ed89(0x112)]),_0x37ccbe['delete'](_0x54b425),_0x40e1b2();}},async 'close'(){if(_0x2d7d16)return await _0x2d7d16;_0x4fc7f0=!0x0,_0x2d7d16=_0x529dc4(),await _0x2d7d16;}};return _0xd9329a;function _0x1bc676(_0x1458ba,_0x3ccb32){const _0x2940ac=_0x36cc4c;let _0x458730=!0x1;return{'instance':_0x3ccb32[_0x2940ac(0x126)],'key':_0x1458ba,async 'invalidate'(){const _0x4949c1=_0x2940ac;_0x458730||(_0x458730=!0x0,_0x3ccb32[_0x4949c1(0x105)]=!0x0,await _0x5e0eef(_0x1458ba,_0x3ccb32,_0x4949c1(0x10a)));},async 'release'(){const _0x284a1d=_0x2940ac;if(_0x458730||(_0x458730=!0x0,_0x3ccb32[_0x284a1d(0x133)]))return;if(_0x3ccb32[_0x284a1d(0x105)]){await _0x5e0eef(_0x1458ba,_0x3ccb32,_0x284a1d(0x10a));return;}let _0x4fd01c=_0x3ccb32[_0x284a1d(0x108)][_0x284a1d(0x134)]();_0x4fd01c?_0x4fd01c[_0x284a1d(0x111)](_0x1bc676(_0x1458ba,_0x3ccb32)):(_0x3ccb32[_0x284a1d(0x119)]=!0x1,_0x3ccb32[_0x284a1d(0x137)]=++_0x18e2a7,_0x468b43(_0x1458ba,_0x3ccb32));}};}async function _0x5e0eef(_0x4ea28e,_0x55550f,_0x33be2a){const _0x3b195e=_0x36cc4c;let _0x14bd97=_0x55550f[_0x3b195e(0x108)][_0x3b195e(0x10b)](0x0);_0x48f1ce[_0x3b195e(0x102)](_0x4ea28e)===_0x55550f&&_0x48f1ce[_0x3b195e(0x121)](_0x4ea28e);try{await _0x40e268(_0x4ea28e,_0x55550f,_0x33be2a);}finally{_0x33be2a&&_0x1c143f({'key':_0x4ea28e,'reason':_0x33be2a,'type':_0x3b195e(0x124)}),_0x4fc7f0?s(_0x14bd97,l()):_0x137249(_0x14bd97);}}function _0x468b43(_0x2fcf3a,_0x42419e){const _0x3bdbda=_0x36cc4c;c(_0x42419e),_0x42419e[_0x3bdbda(0x135)]=setTimeout(()=>{const _0x4f78d9=_0x3bdbda;_0x42419e[_0x4f78d9(0x119)]||_0x48f1ce[_0x4f78d9(0x102)](_0x2fcf3a)!==_0x42419e||(_0x48f1ce[_0x4f78d9(0x121)](_0x2fcf3a),_0x40e268(_0x2fcf3a,_0x42419e,_0x4f78d9(0x113))[_0x4f78d9(0x130)](()=>_0x1c143f({'key':_0x2fcf3a,'reason':_0x4f78d9(0x113),'type':_0x4f78d9(0x124)}))[_0x4f78d9(0x12d)](()=>void 0x0));},_0x105f3a),_0x42419e[_0x3bdbda(0x135)][_0x3bdbda(0x100)]?.();}async function _0x757412(){const _0x2deac0=_0x36cc4c;for(;_0x48f1ce[_0x2deac0(0x12b)]+_0x5d06bb['size']>_0x17e2f7;){let _0x36f1ab;for(let _0x318a53 of _0x48f1ce)_0x318a53[0x1][_0x2deac0(0x119)]||(!_0x36f1ab||_0x318a53[0x1][_0x2deac0(0x137)]<_0x36f1ab[0x1][_0x2deac0(0x137)])&&(_0x36f1ab=_0x318a53);if(!_0x36f1ab)throw new e(_0x2deac0(0x12a),'Instance\x20pool\x20capacity\x20'+_0x17e2f7+_0x2deac0(0x109));_0x48f1ce[_0x2deac0(0x121)](_0x36f1ab[0x0]),await _0x40e268(_0x36f1ab[0x0],_0x36f1ab[0x1],'lru'),_0x1c143f({'key':_0x36f1ab[0x0],'reason':_0x2deac0(0x131),'type':_0x2deac0(0x124)});}}async function _0x529dc4(){const _0x2bfb89=_0x36cc4c;let _0x56fe11=l(),_0x8fafd0=[..._0x48f1ce['entries']()];for(let [,_0x42b659]of _0x8fafd0)s(_0x42b659[_0x2bfb89(0x108)],_0x56fe11);for(let _0x5c0a8e of _0x5d06bb[_0x2bfb89(0x13a)]())s(_0x5c0a8e,_0x56fe11);_0x48f1ce[_0x2bfb89(0x104)]();let _0x224298=(await Promise[_0x2bfb89(0x11d)]([..._0x8fafd0[_0x2bfb89(0x118)](async([_0x4863ab,_0x213b77])=>await _0x40e268(_0x4863ab,_0x213b77)),..._0x37ccbe]))[_0x2bfb89(0x129)](_0x40fc16=>_0x40fc16[_0x2bfb89(0xfe)]===_0x2bfb89(0x116));if(_0x224298?.[_0x2bfb89(0xfe)]===_0x2bfb89(0x116))throw _0x224298[_0x2bfb89(0x12e)];}function _0x1c143f(_0x10aa99){try{_0x1dc56a['onEvent']?.(_0x10aa99);}catch{}}function _0xee3a27(){if(_0x4fc7f0)throw l();}function _0x137249(_0x548daf){const _0x59d6b4=_0x36cc4c;for(let _0x45513e of _0x548daf)_0xd9329a['acquire'](_0x45513e[_0x59d6b4(0x11b)])[_0x59d6b4(0x130)](_0x45513e[_0x59d6b4(0x111)],_0x45513e['reject']);}async function _0x40e268(_0x1ecebc,_0x166897,_0x5a0066){const _0x1385ef=_0x36cc4c;_0x166897['closed']||(_0x166897[_0x1385ef(0x133)]=!0x0,c(_0x166897),_0x5a0066&&_0x1c143f({'key':_0x1ecebc,'reason':_0x5a0066,'type':_0x1385ef(0x123)}),await _0x1dc56a['factory']['destroy']({'instance':_0x166897['instance'],'key':_0x1ecebc}));}}function i(_0x6e7992,_0x4da3d4){const _0x2e1dac=_0x1c83e2;if(!Number[_0x2e1dac(0xfd)](_0x6e7992)||_0x6e7992<0x0)throw new e(_0x2e1dac(0x107),_0x2e1dac(0x10f));if(!Number[_0x2e1dac(0x12f)](_0x4da3d4)||_0x4da3d4<=0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0x2e1dac(0x114));}function a(_0x1d5e5a){const _0x49be0c=_0x1c83e2;if(_0x1d5e5a[_0x49be0c(0x112)][_0x49be0c(0x103)]===0x0)throw new e(_0x49be0c(0x107),'key\x20must\x20not\x20be\x20empty');}function o(_0x265bd1,_0x7dc053){return new Promise((_0x4b0423,_0x2067fc)=>{_0x7dc053['push']({'input':_0x265bd1,'reject':_0x2067fc,'resolve':_0x4b0423});});}function s(_0x39b593,_0x4bf63c){const _0x2a2af6=_0x1c83e2;for(let _0x9ebaab of _0x39b593[_0x2a2af6(0x10b)](0x0))_0x9ebaab[_0x2a2af6(0x139)](_0x4bf63c);}function c(_0x2a0255){const _0x896d78=_0x1c83e2;_0x2a0255['idleTimer']!==void 0x0&&(clearTimeout(_0x2a0255['idleTimer']),delete _0x2a0255[_0x896d78(0x135)]);}function _0x49dc(){const _0x3ffc9=['isFinite','status','1064056KWuVLh','unref','code','get','length','clear','invalidated','create-start','INSTANCE_POOL_INVALID_INPUT','waiters','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','invalidate','splice','39EKfxVp','set','maxEntries','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','13854978RbqslK','resolve','key','ttl','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','factory','rejected','222xljLoq','map','busy','add','input','destroy','allSettled','Instance\x20pool\x20is\x20closed','219692iDHhCV','1437130BEumuG','delete','3242216CMiyIh','destroy-start','evicted','name','instance','INSTANCE_POOL_CLOSED','105581mOCPBa','find','INSTANCE_POOL_CAPACITY_EXCEEDED','size','create-complete','catch','reason','isSafeInteger','then','lru','now','closed','shift','idleTimer','129908RrMqvF','lastIdleSequence','20llNPEL','reject','values'];_0x49dc=function(){return _0x3ffc9;};return _0x49dc();}function l(){const _0x5c7644=_0x1c83e2;return new e(_0x5c7644(0x127),_0x5c7644(0x11e));}function _0xfd6e(_0xc7c25a,_0x1edd40){_0xc7c25a=_0xc7c25a-0xfd;const _0x49dcf3=_0x49dc();let _0xfd6eb=_0x49dcf3[_0xc7c25a];return _0xfd6eb;}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.4.0",
4
+ "version": "1.6.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",