@univer-cli/resource-library-command 1.5.2 → 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 +2 -2
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- (function(_0x2eb5a2,_0x4b27e4){const _0x6eaa60=_0xbbcd,_0x3985bc=_0x2eb5a2();while(!![]){try{const _0x610d23=-parseInt(_0x6eaa60(0x18d))/0x1+parseInt(_0x6eaa60(0x19f))/0x2*(-parseInt(_0x6eaa60(0x180))/0x3)+parseInt(_0x6eaa60(0x1d2))/0x4+parseInt(_0x6eaa60(0x1c8))/0x5+parseInt(_0x6eaa60(0x1cf))/0x6*(-parseInt(_0x6eaa60(0x17e))/0x7)+-parseInt(_0x6eaa60(0x1bf))/0x8*(-parseInt(_0x6eaa60(0x1b9))/0x9)+parseInt(_0x6eaa60(0x1b2))/0xa*(-parseInt(_0x6eaa60(0x1c3))/0xb);if(_0x610d23===_0x4b27e4)break;else _0x3985bc['push'](_0x3985bc['shift']());}catch(_0x3a704a){_0x3985bc['push'](_0x3985bc['shift']());}}}(_0x6dfa,0xab16f));import{isResourceLibraryError as _0x5af55f}from'@univer-cli/resource-library';import{Command as _0x4d61bb,InvalidArgumentError as _0x1a6611,Option as _0xd0cf32}from'commander';var i=0x1e;function a(_0x4ebb73){const _0x3e540f=_0xbbcd;let _0x3f6525=new _0x4d61bb(_0x3e540f(0x183))[_0x3e540f(0x1d8)](_0x3e540f(0x1a5))[_0x3e540f(0x1d7)](()=>_0x3f6525[_0x3e540f(0x194)]());_0x3f6525[_0x3e540f(0x19c)](_0x3e540f(0x1c7))[_0x3e540f(0x1d8)](_0x3e540f(0x1d4))[_0x3e540f(0x199)](_0x3e540f(0x1a7),'write\x20structured\x20JSON')[_0x3e540f(0x1d7)](async _0x2fc316=>{const _0x360abc=_0x3e540f;let _0xa88b32=await c(_0x3f6525,async()=>_0x4ebb73[_0x360abc(0x196)]()['listRegistries']());l(_0x3f6525,_0x2fc316,{'registries':_0xa88b32},d(_0xa88b32));}),_0x3f6525[_0x3e540f(0x19c)]('find')[_0x3e540f(0x1d8)]('Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword')[_0x3e540f(0x1b5)](_0x3e540f(0x17d),_0x3e540f(0x1cb))['addOption'](new _0xd0cf32(_0x3e540f(0x197),_0x3e540f(0x1c4))[_0x3e540f(0x1c2)](o)[_0x3e540f(0x1c0)]([]))['addOption'](new _0xd0cf32(_0x3e540f(0x19b),_0x3e540f(0x188))[_0x3e540f(0x1c2)](s)[_0x3e540f(0x1c0)](i))[_0x3e540f(0x199)](_0x3e540f(0x1a7),'write\x20structured\x20JSON')[_0x3e540f(0x1d7)](async(_0x280184,_0x4084a0)=>{const _0x53b543=_0x3e540f;let _0x1e0904=await c(_0x3f6525,async()=>_0x4ebb73[_0x53b543(0x196)]()[_0x53b543(0x1cd)]({'queries':_0x280184,'registries':_0x4084a0[_0x53b543(0x18b)],'limit':_0x4084a0[_0x53b543(0x189)]}));l(_0x3f6525,_0x4084a0,{'query':{'queries':_0x280184,'registries':_0x4084a0[_0x53b543(0x18b)]},'resources':_0x1e0904[_0x53b543(0x183)],'total':_0x1e0904['total'],'limit':_0x4084a0[_0x53b543(0x189)]},f(_0x1e0904[_0x53b543(0x183)],_0x1e0904[_0x53b543(0x18e)]));}),_0x3f6525[_0x3e540f(0x19c)](_0x3e540f(0x193))[_0x3e540f(0x1d8)](_0x3e540f(0x18f))[_0x3e540f(0x1b5)]('<handles...>',_0x3e540f(0x1c5))[_0x3e540f(0x199)](_0x3e540f(0x17b),_0x3e540f(0x1b0))[_0x3e540f(0x199)](_0x3e540f(0x1a7),_0x3e540f(0x1bd))[_0x3e540f(0x1d7)](async(_0x5246f2,_0xc69c89)=>{const _0x9b7e45=_0x3e540f;if(_0xc69c89[_0x9b7e45(0x1af)]===void 0x0){_0x5246f2[_0x9b7e45(0x1d6)]!==0x1&&_0x3f6525[_0x9b7e45(0x184)](_0x9b7e45(0x18c),{'code':_0x9b7e45(0x1a3),'exitCode':0x1});let _0x5b7171=await c(_0x3f6525,async()=>_0x4ebb73[_0x9b7e45(0x196)]()[_0x9b7e45(0x190)]({'handle':_0x5246f2[0x0]}));_0xc69c89[_0x9b7e45(0x192)]===!0x0?u(_0x3f6525,_0x5b7171):_0x3f6525[_0x9b7e45(0x182)]()[_0x9b7e45(0x1cc)]?.(_0x5b7171[_0x9b7e45(0x1a1)]);return;}let _0x3f9333=await c(_0x3f6525,async()=>_0x4ebb73[_0x9b7e45(0x196)]()[_0x9b7e45(0x193)]({'handles':_0x5246f2,'destination':_0xc69c89[_0x9b7e45(0x1af)]}));if(_0xc69c89[_0x9b7e45(0x192)]===!0x0)u(_0x3f6525,_0x3f9333);else{let _0xdd6cae=_0x3f6525[_0x9b7e45(0x182)]();for(let _0x9eb7d0 of _0x3f9333[_0x9b7e45(0x1a6)])_0xdd6cae[_0x9b7e45(0x1cc)]?.(_0x9eb7d0[_0x9b7e45(0x1d5)]+'\x0a');for(let _0x544409 of _0x3f9333[_0x9b7e45(0x1bb)])_0xdd6cae['writeErr']?.(_0x544409['handle']+':\x20'+_0x544409[_0x9b7e45(0x1b8)]+':\x20'+_0x544409['message']+'\x0a');}_0x3f9333[_0x9b7e45(0x1bb)][_0x9b7e45(0x1d6)]>0x0&&_0x3f6525['error'](_0x3f9333[_0x9b7e45(0x1bb)][_0x9b7e45(0x1d6)]+_0x9b7e45(0x1c9)+(_0x3f9333[_0x9b7e45(0x1bb)][_0x9b7e45(0x1d6)]===0x1?'':'s')+_0x9b7e45(0x1b4),{'code':_0x9b7e45(0x17f),'exitCode':0x1});});let _0x79741e=_0x3f6525[_0x3e540f(0x19c)](_0x3e540f(0x1b6))[_0x3e540f(0x1d8)](_0x3e540f(0x187));return _0x79741e[_0x3e540f(0x1d7)](()=>_0x79741e[_0x3e540f(0x194)]()),_0x79741e[_0x3e540f(0x19c)](_0x3e540f(0x1d5))[_0x3e540f(0x1d8)]('Show\x20the\x20resource\x20cache\x20path')[_0x3e540f(0x199)](_0x3e540f(0x1a7),_0x3e540f(0x1bd))[_0x3e540f(0x1d7)](_0x1bdb4c=>{const _0x2def23=_0x3e540f;let _0x380972=_0x4ebb73[_0x2def23(0x196)]()[_0x2def23(0x1b7)];l(_0x3f6525,_0x1bdb4c,{'path':_0x380972},_0x380972);}),_0x79741e[_0x3e540f(0x19c)](_0x3e540f(0x1a9))[_0x3e540f(0x1d8)](_0x3e540f(0x1ac))[_0x3e540f(0x199)](_0x3e540f(0x1a7),_0x3e540f(0x1bd))[_0x3e540f(0x1d7)](async _0x140d69=>{const _0x5dc10f=_0x3e540f;let _0x52cb02=await c(_0x3f6525,async()=>_0x4ebb73[_0x5dc10f(0x196)]()[_0x5dc10f(0x1d0)]());l(_0x3f6525,_0x140d69,{'cleared':_0x52cb02},_0x5dc10f(0x17c)+_0x52cb02[_0x5dc10f(0x19d)]+'\x20resources\x20('+p(_0x52cb02['byteCount'])+_0x5dc10f(0x1d1)+_0x52cb02[_0x5dc10f(0x1d5)]+'.');}),_0x3f6525;}function o(_0x5b0666,_0x274913){return[..._0x274913,_0x5b0666];}function s(_0x591e15){const _0x50c89f=_0xbbcd;let _0x11ac1a=Number(_0x591e15);if(!Number[_0x50c89f(0x195)](_0x11ac1a)||_0x11ac1a<0x1)throw new _0x1a6611(_0x50c89f(0x198)+_0x591e15+'\x22.');return _0x11ac1a;}async function c(_0x3a5df5,_0x23d392){const _0x1bf7ad=_0xbbcd;try{return await _0x23d392();}catch(_0x3e7d30){throw _0x5af55f(_0x3e7d30)&&_0x3a5df5['error'](_0x3e7d30[_0x1bf7ad(0x1b8)]+':\x20'+_0x3e7d30[_0x1bf7ad(0x1ca)],{'code':_0x1bf7ad(0x19a),'exitCode':0x1}),_0x3e7d30;}}function _0x6dfa(){const _0x1f5e35=['limit','push','registry','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','1172260SsCdfn','total','Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory','read','\x20\x20SIZE','json','export','outputHelp','isInteger','openLibrary','--registry\x20<id>','Expected\x20a\x20positive\x20integer;\x20received\x20\x22','option','resources.failed','--limit\x20<number>','command','resourceCount','RESOURCES','2krELkI','map','svg','intrinsicSize','resources.invalid-input','width','Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog','exported','--json','REGISTRY','clear','groupCount','label','Clear\x20all\x20cached\x20resources','padStart','EDITABLE','out','write\x20flat\x20<registry>--<resource>.svg\x20files','padEnd','380250wogeXR','\x20MB','\x20could\x20not\x20be\x20exported.','argument','cache','cacheLocation','code','1449arTChL','GROUPS','failed','GROUP','write\x20structured\x20JSON','HANDLE','47152gTlXHo','default','colorEditableCount','argParser','33UJtaiR','restrict\x20results\x20to\x20a\x20registry;\x20repeatable','canonical\x20<registryId>/<resourceId>\x20handles','handle','registries','4729270illEhJ','\x20resource','message','one\x20or\x20more\x20queries,\x20searched\x20independently','writeOut','find','colorEditable','232248UOllAM','clearCache',')\x20from\x20','2285172dMwNtT','No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.','List\x20available\x20resource\x20registries','path','length','action','description','tagCount','toFixed','--out\x20<directory>','Cleared\x20','<queries...>','56YyxWKD','resources.export.failed','507897rhxjez','join','configureOutput','resources','error','NAME','group','Inspect\x20or\x20clear\x20the\x20resource\x20cache','maximum\x20number\x20of\x20results'];_0x6dfa=function(){return _0x1f5e35;};return _0x6dfa();}function l(_0x485d83,_0x1bd413,_0xa57472,_0x37a852){const _0x2c8abc=_0xbbcd;_0x1bd413[_0x2c8abc(0x192)]===!0x0?u(_0x485d83,_0xa57472):_0x485d83[_0x2c8abc(0x182)]()[_0x2c8abc(0x1cc)]?.(_0x37a852+'\x0a');}function u(_0xd138fc,_0x24affd){const _0x2e709c=_0xbbcd;_0xd138fc[_0x2e709c(0x182)]()['writeOut']?.(JSON['stringify'](_0x24affd,null,0x2)+'\x0a');}function _0xbbcd(_0x5b4cc8,_0x23f06d){_0x5b4cc8=_0x5b4cc8-0x179;const _0x6dfae0=_0x6dfa();let _0xbbcd5b=_0x6dfae0[_0x5b4cc8];return _0xbbcd5b;}function d(_0x42668e){const _0x5db4ef=_0xbbcd;return[_0x5db4ef(0x1a8)[_0x5db4ef(0x1b1)](0x22)+'\x20\x20'+_0x5db4ef(0x19e)['padStart'](0x9)+'\x20\x20'+_0x5db4ef(0x1ba)[_0x5db4ef(0x1ad)](0x7)+'\x20\x20'+'TAGS'[_0x5db4ef(0x1ad)](0x6)+'\x20\x20'+_0x5db4ef(0x1ae)[_0x5db4ef(0x1ad)](0xa),..._0x42668e[_0x5db4ef(0x1a0)](_0x2ddd98=>[_0x2ddd98['id'][_0x5db4ef(0x1b1)](0x22),String(_0x2ddd98[_0x5db4ef(0x19d)])[_0x5db4ef(0x1ad)](0x9),String(_0x2ddd98[_0x5db4ef(0x1aa)])[_0x5db4ef(0x1ad)](0x7),String(_0x2ddd98[_0x5db4ef(0x179)])[_0x5db4ef(0x1ad)](0x6),(_0x2ddd98[_0x5db4ef(0x1c1)]+'/'+_0x2ddd98[_0x5db4ef(0x19d)])[_0x5db4ef(0x1ad)](0xa)][_0x5db4ef(0x181)]('\x20\x20'))][_0x5db4ef(0x181)]('\x0a');}function f(_0x5953f3,_0x2f0875){const _0x325022=_0xbbcd;if(_0x5953f3[_0x325022(0x1d6)]===0x0)return _0x325022(0x1d3);let _0x5388a5=[_0x325022(0x1be)['padEnd'](0x32)+'\x20\x20'+_0x325022(0x185)[_0x325022(0x1b1)](0x1c)+'\x20\x20'+_0x325022(0x1bc)[_0x325022(0x1b1)](0x12)+'\x20\x20'+'COLOR'[_0x325022(0x1b1)](0x8)+_0x325022(0x191),..._0x5953f3[_0x325022(0x1a0)](_0x56f78a=>{const _0xa1deb0=_0x325022;let _0x5a5f0c=_0x56f78a[_0xa1deb0(0x186)]?.[_0xa1deb0(0x1ab)]??'-',_0x18f221=_0x56f78a[_0xa1deb0(0x1ce)]?'editable':'fixed',_0x532590=_0x56f78a['intrinsicSize'][_0xa1deb0(0x1a4)]+'×'+_0x56f78a[_0xa1deb0(0x1a2)]['height'];return _0x56f78a[_0xa1deb0(0x1c6)]['padEnd'](0x32)+'\x20\x20'+_0x56f78a['name'][_0xa1deb0(0x1b1)](0x1c)+'\x20\x20'+_0x5a5f0c[_0xa1deb0(0x1b1)](0x12)+'\x20\x20'+_0x18f221['padEnd'](0x8)+'\x20\x20'+_0x532590;})];return _0x2f0875>_0x5953f3[_0x325022(0x1d6)]&&_0x5388a5[_0x325022(0x18a)]('…\x20'+(_0x2f0875-_0x5953f3[_0x325022(0x1d6)])+'\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.'),_0x5388a5['join']('\x0a');}function p(_0x21033e){const _0x1b0050=_0xbbcd;return _0x21033e<0x400?_0x21033e+'\x20B':_0x21033e<0x100000?(_0x21033e/0x400)[_0x1b0050(0x17a)](0x1)+'\x20KB':(_0x21033e/0x100000)['toFixed'](0x1)+_0x1b0050(0x1b3);}export{a as createResourcesCommand};
1
+ function _0x222c(_0xe38dcf,_0x5ebfe3){_0xe38dcf=_0xe38dcf-0x188;const _0x3d2497=_0x3d24();let _0x222c22=_0x3d2497[_0xe38dcf];return _0x222c22;}(function(_0x4dfb7d,_0xbce2a6){const _0x417fc3=_0x222c,_0x44228c=_0x4dfb7d();while(!![]){try{const _0x22426c=parseInt(_0x417fc3(0x192))/0x1+parseInt(_0x417fc3(0x1ca))/0x2*(parseInt(_0x417fc3(0x19b))/0x3)+parseInt(_0x417fc3(0x1c9))/0x4*(-parseInt(_0x417fc3(0x194))/0x5)+parseInt(_0x417fc3(0x196))/0x6+parseInt(_0x417fc3(0x1a2))/0x7+parseInt(_0x417fc3(0x1e5))/0x8*(-parseInt(_0x417fc3(0x1a4))/0x9)+parseInt(_0x417fc3(0x18c))/0xa*(-parseInt(_0x417fc3(0x1a7))/0xb);if(_0x22426c===_0xbce2a6)break;else _0x44228c['push'](_0x44228c['shift']());}catch(_0x5b6d7c){_0x44228c['push'](_0x44228c['shift']());}}}(_0x3d24,0x289e8));import{isResourceLibraryError as _0x1fb935}from'@univer-cli/resource-library';import{Command as _0x1d9b6c,InvalidArgumentError as _0x4f627f,Option as _0x3b7efb}from'commander';var i=0x1e;function a(_0xef04a){const _0x26ff67=_0x222c;let _0x4b6d35=new _0x1d9b6c(_0x26ff67(0x1e2))['description']('Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog')[_0x26ff67(0x1a0)](()=>_0x4b6d35[_0x26ff67(0x1dd)]());_0x4b6d35[_0x26ff67(0x199)]('registries')[_0x26ff67(0x1cf)]('List\x20available\x20resource\x20registries')[_0x26ff67(0x1d1)](_0x26ff67(0x1cb),_0x26ff67(0x190))[_0x26ff67(0x1a0)](async _0x922dbe=>{const _0x4aff6d=_0x26ff67;let _0x539e9f=await c(_0x4b6d35,async()=>_0xef04a[_0x4aff6d(0x18f)]()[_0x4aff6d(0x1a3)]());l(_0x4b6d35,_0x922dbe,{'registries':_0x539e9f},d(_0x539e9f));}),_0x4b6d35['command']('find')['description'](_0x26ff67(0x1c3))[_0x26ff67(0x189)]('<queries...>',_0x26ff67(0x1db))[_0x26ff67(0x1ac)](new _0x3b7efb('--registry\x20<id>',_0x26ff67(0x1b7))[_0x26ff67(0x1bc)](o)[_0x26ff67(0x1c4)]([]))['addOption'](new _0x3b7efb('--limit\x20<number>',_0x26ff67(0x18d))[_0x26ff67(0x1bc)](s)[_0x26ff67(0x1c4)](i))[_0x26ff67(0x1d1)](_0x26ff67(0x1cb),_0x26ff67(0x190))[_0x26ff67(0x1a0)](async(_0x32cf7a,_0x42acb3)=>{const _0x126fd6=_0x26ff67;let _0x502046=await c(_0x4b6d35,async()=>_0xef04a[_0x126fd6(0x18f)]()[_0x126fd6(0x1cd)]({'queries':_0x32cf7a,'registries':_0x42acb3[_0x126fd6(0x193)],'limit':_0x42acb3['limit']}));l(_0x4b6d35,_0x42acb3,{'query':{'queries':_0x32cf7a,'registries':_0x42acb3['registry']},'resources':_0x502046[_0x126fd6(0x1e2)],'total':_0x502046[_0x126fd6(0x1de)],'limit':_0x42acb3[_0x126fd6(0x1a9)]},f(_0x502046[_0x126fd6(0x1e2)],_0x502046['total']));}),_0x4b6d35['command'](_0x26ff67(0x1dc))[_0x26ff67(0x1cf)]('Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory')['argument'](_0x26ff67(0x1d9),_0x26ff67(0x1d8))[_0x26ff67(0x1d1)]('--out\x20<directory>',_0x26ff67(0x1d5))[_0x26ff67(0x1d1)](_0x26ff67(0x1cb),_0x26ff67(0x190))[_0x26ff67(0x1a0)](async(_0x31f68e,_0x5cbc8a)=>{const _0x2aad01=_0x26ff67;if(_0x5cbc8a[_0x2aad01(0x1af)]===void 0x0){_0x31f68e[_0x2aad01(0x1c2)]!==0x1&&_0x4b6d35[_0x2aad01(0x1c7)](_0x2aad01(0x1ba),{'code':_0x2aad01(0x18a),'exitCode':0x1});let _0x34c29b=await c(_0x4b6d35,async()=>_0xef04a[_0x2aad01(0x18f)]()[_0x2aad01(0x1d4)]({'handle':_0x31f68e[0x0]}));_0x5cbc8a[_0x2aad01(0x1e0)]===!0x0?u(_0x4b6d35,_0x34c29b):_0x4b6d35['configureOutput']()[_0x2aad01(0x1c0)]?.(_0x34c29b['svg']);return;}let _0x54f563=await c(_0x4b6d35,async()=>_0xef04a[_0x2aad01(0x18f)]()['export']({'handles':_0x31f68e,'destination':_0x5cbc8a[_0x2aad01(0x1af)]}));if(_0x5cbc8a[_0x2aad01(0x1e0)]===!0x0)u(_0x4b6d35,_0x54f563);else{let _0x5955f0=_0x4b6d35[_0x2aad01(0x1a1)]();for(let _0x681781 of _0x54f563['exported'])_0x5955f0[_0x2aad01(0x1c0)]?.(_0x681781['path']+'\x0a');for(let _0x4683b9 of _0x54f563['failed'])_0x5955f0[_0x2aad01(0x1ad)]?.(_0x4683b9[_0x2aad01(0x1a8)]+':\x20'+_0x4683b9['code']+':\x20'+_0x4683b9[_0x2aad01(0x1d3)]+'\x0a');}_0x54f563[_0x2aad01(0x1c5)][_0x2aad01(0x1c2)]>0x0&&_0x4b6d35['error'](_0x54f563[_0x2aad01(0x1c5)][_0x2aad01(0x1c2)]+_0x2aad01(0x1c1)+(_0x54f563['failed'][_0x2aad01(0x1c2)]===0x1?'':'s')+_0x2aad01(0x19d),{'code':'resources.export.failed','exitCode':0x1});});let _0x476727=_0x4b6d35[_0x26ff67(0x199)](_0x26ff67(0x1a5))[_0x26ff67(0x1cf)](_0x26ff67(0x1da));return _0x476727[_0x26ff67(0x1a0)](()=>_0x476727['outputHelp']()),_0x476727['command'](_0x26ff67(0x1b1))[_0x26ff67(0x1cf)](_0x26ff67(0x1bf))[_0x26ff67(0x1d1)]('--json',_0x26ff67(0x190))['action'](_0x5c2ed7=>{const _0x4e7787=_0x26ff67;let _0x76ddd3=_0xef04a[_0x4e7787(0x18f)]()[_0x4e7787(0x1ab)];l(_0x4b6d35,_0x5c2ed7,{'path':_0x76ddd3},_0x76ddd3);}),_0x476727[_0x26ff67(0x199)](_0x26ff67(0x19c))[_0x26ff67(0x1cf)](_0x26ff67(0x1bb))[_0x26ff67(0x1d1)](_0x26ff67(0x1cb),_0x26ff67(0x190))[_0x26ff67(0x1a0)](async _0x12300b=>{const _0x5d7a15=_0x26ff67;let _0x459330=await c(_0x4b6d35,async()=>_0xef04a['openLibrary']()['clearCache']());l(_0x4b6d35,_0x12300b,{'cleared':_0x459330},_0x5d7a15(0x1e4)+_0x459330[_0x5d7a15(0x1e1)]+_0x5d7a15(0x1b2)+p(_0x459330[_0x5d7a15(0x1ae)])+')\x20from\x20'+_0x459330[_0x5d7a15(0x1b1)]+'.');}),_0x4b6d35;}function o(_0x2f4dbf,_0x5ca01c){return[..._0x5ca01c,_0x2f4dbf];}function s(_0x5c83a5){const _0x1431e7=_0x222c;let _0x43a159=Number(_0x5c83a5);if(!Number['isInteger'](_0x43a159)||_0x43a159<0x1)throw new _0x4f627f(_0x1431e7(0x1e6)+_0x5c83a5+'\x22.');return _0x43a159;}async function c(_0x36c18d,_0x1fa9b2){const _0x50ecc5=_0x222c;try{return await _0x1fa9b2();}catch(_0xa9d95f){throw _0x1fb935(_0xa9d95f)&&_0x36c18d[_0x50ecc5(0x1c7)](_0xa9d95f[_0x50ecc5(0x1b3)]+':\x20'+_0xa9d95f[_0x50ecc5(0x1d3)],{'code':_0x50ecc5(0x1b4),'exitCode':0x1}),_0xa9d95f;}}function l(_0x205526,_0x483ed7,_0x1d5233,_0x53e740){const _0x239533=_0x222c;_0x483ed7['json']===!0x0?u(_0x205526,_0x1d5233):_0x205526[_0x239533(0x1a1)]()['writeOut']?.(_0x53e740+'\x0a');}function u(_0x1fa78f,_0x1db59d){const _0x2acfa2=_0x222c;_0x1fa78f[_0x2acfa2(0x1a1)]()[_0x2acfa2(0x1c0)]?.(JSON[_0x2acfa2(0x1b6)](_0x1db59d,null,0x2)+'\x0a');}function d(_0x36ba80){const _0x594e8d=_0x222c;return[_0x594e8d(0x195)['padEnd'](0x22)+'\x20\x20'+'RESOURCES'[_0x594e8d(0x1d2)](0x9)+'\x20\x20'+_0x594e8d(0x1b9)['padStart'](0x7)+'\x20\x20'+_0x594e8d(0x188)[_0x594e8d(0x1d2)](0x6)+'\x20\x20'+_0x594e8d(0x191)[_0x594e8d(0x1d2)](0xa),..._0x36ba80[_0x594e8d(0x1d7)](_0x51195d=>[_0x51195d['id']['padEnd'](0x22),String(_0x51195d[_0x594e8d(0x1e1)])[_0x594e8d(0x1d2)](0x9),String(_0x51195d[_0x594e8d(0x1c8)])['padStart'](0x7),String(_0x51195d[_0x594e8d(0x1b8)])['padStart'](0x6),(_0x51195d[_0x594e8d(0x1d0)]+'/'+_0x51195d['resourceCount'])[_0x594e8d(0x1d2)](0xa)][_0x594e8d(0x1be)]('\x20\x20'))][_0x594e8d(0x1be)]('\x0a');}function f(_0x11812b,_0x50826d){const _0x49697e=_0x222c;if(_0x11812b[_0x49697e(0x1c2)]===0x0)return _0x49697e(0x18b);let _0x4796ff=[_0x49697e(0x1d6)[_0x49697e(0x1bd)](0x32)+'\x20\x20'+'NAME'[_0x49697e(0x1bd)](0x1c)+'\x20\x20'+_0x49697e(0x1ce)[_0x49697e(0x1bd)](0x12)+'\x20\x20'+_0x49697e(0x1b0)[_0x49697e(0x1bd)](0x8)+'\x20\x20SIZE',..._0x11812b[_0x49697e(0x1d7)](_0x20f702=>{const _0x5cf152=_0x49697e;let _0x5cd852=_0x20f702[_0x5cf152(0x1df)]?.[_0x5cf152(0x1e3)]??'-',_0xf45f24=_0x20f702[_0x5cf152(0x1cc)]?_0x5cf152(0x198):_0x5cf152(0x19e),_0x52f719=_0x20f702[_0x5cf152(0x19a)][_0x5cf152(0x1b5)]+'×'+_0x20f702[_0x5cf152(0x19a)][_0x5cf152(0x19f)];return _0x20f702[_0x5cf152(0x1a8)]['padEnd'](0x32)+'\x20\x20'+_0x20f702['name'][_0x5cf152(0x1bd)](0x1c)+'\x20\x20'+_0x5cd852[_0x5cf152(0x1bd)](0x12)+'\x20\x20'+_0xf45f24['padEnd'](0x8)+'\x20\x20'+_0x52f719;})];return _0x50826d>_0x11812b['length']&&_0x4796ff[_0x49697e(0x1a6)]('…\x20'+(_0x50826d-_0x11812b[_0x49697e(0x1c2)])+_0x49697e(0x1c6)),_0x4796ff[_0x49697e(0x1be)]('\x0a');}function p(_0x33fa7f){const _0xb9e951=_0x222c;return _0x33fa7f<0x400?_0x33fa7f+'\x20B':_0x33fa7f<0x100000?(_0x33fa7f/0x400)['toFixed'](0x1)+_0xb9e951(0x1aa):(_0x33fa7f/0x100000)[_0xb9e951(0x197)](0x1)+_0xb9e951(0x18e);}function _0x3d24(){const _0x33bb67=['colorEditable','find','GROUP','description','colorEditableCount','option','padStart','message','read','write\x20flat\x20<registry>--<resource>.svg\x20files','HANDLE','map','canonical\x20<registryId>/<resourceId>\x20handles','<handles...>','Inspect\x20or\x20clear\x20the\x20resource\x20cache','one\x20or\x20more\x20queries,\x20searched\x20independently','export','outputHelp','total','group','json','resourceCount','resources','label','Cleared\x20','1352ShGnWN','Expected\x20a\x20positive\x20integer;\x20received\x20\x22','TAGS','argument','resources.invalid-input','No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.','2420rFOVKg','maximum\x20number\x20of\x20results','\x20MB','openLibrary','write\x20structured\x20JSON','EDITABLE','270853Xkgtjm','registry','458155wxmrWv','REGISTRY','614100VEIfye','toFixed','editable','command','intrinsicSize','53574oPQepM','clear','\x20could\x20not\x20be\x20exported.','fixed','height','action','configureOutput','867531VluFTK','listRegistries','2565DYWmBB','cache','push','3597PPXgdD','handle','limit','\x20KB','cacheLocation','addOption','writeErr','byteCount','out','COLOR','path','\x20resources\x20(','code','resources.failed','width','stringify','restrict\x20results\x20to\x20a\x20registry;\x20repeatable','tagCount','GROUPS','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','Clear\x20all\x20cached\x20resources','argParser','padEnd','join','Show\x20the\x20resource\x20cache\x20path','writeOut','\x20resource','length','Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword','default','failed','\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.','error','groupCount','12oEPzlN','8FjMMat','--json'];_0x3d24=function(){return _0x33bb67;};return _0x3d24();}export{a as createResourcesCommand};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/resource-library-command",
3
3
  "type": "module",
4
- "version": "1.5.2",
4
+ "version": "1.6.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "README.zh-CN.md"
19
19
  ],
20
20
  "dependencies": {
21
- "@univer-cli/resource-library": "1.5.2"
21
+ "@univer-cli/resource-library": "1.6.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"