@univer-cli/resource-library-command 1.3.0 → 1.4.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(_0x5bb6b8,_0x1a7a28){const _0x3d2d80=_0x52e3,_0x1d4a7f=_0x5bb6b8();while(!![]){try{const _0x3a80d0=-parseInt(_0x3d2d80(0xba))/0x1*(-parseInt(_0x3d2d80(0xb0))/0x2)+-parseInt(_0x3d2d80(0xe0))/0x3+-parseInt(_0x3d2d80(0xa4))/0x4*(parseInt(_0x3d2d80(0xb7))/0x5)+-parseInt(_0x3d2d80(0xc9))/0x6+-parseInt(_0x3d2d80(0xe5))/0x7*(parseInt(_0x3d2d80(0xda))/0x8)+parseInt(_0x3d2d80(0xa6))/0x9*(-parseInt(_0x3d2d80(0xcf))/0xa)+-parseInt(_0x3d2d80(0xcc))/0xb*(-parseInt(_0x3d2d80(0xc1))/0xc);if(_0x3a80d0===_0x1a7a28)break;else _0x1d4a7f['push'](_0x1d4a7f['shift']());}catch(_0x3ada38){_0x1d4a7f['push'](_0x1d4a7f['shift']());}}}(_0x505d,0x28230));import{isResourceLibraryError as _0x388b0d}from'@univer-cli/resource-library';import{Command as _0x558f9d,InvalidArgumentError as _0x2ace21,Option as _0x12d0cf}from'commander';var i=0x1e;function a(_0x519a7a){const _0x1ae51e=_0x52e3;let _0x1c2b66=new _0x558f9d('resources')[_0x1ae51e(0xcb)](_0x1ae51e(0x93))[_0x1ae51e(0x9b)](()=>_0x1c2b66[_0x1ae51e(0xe3)]());_0x1c2b66[_0x1ae51e(0xe2)](_0x1ae51e(0x96))[_0x1ae51e(0xcb)](_0x1ae51e(0xac))[_0x1ae51e(0xdf)](_0x1ae51e(0xd3),'write\x20structured\x20JSON')[_0x1ae51e(0x9b)](async _0x3170db=>{const _0xac81a0=_0x1ae51e;let _0x42d446=await c(_0x1c2b66,async()=>_0x519a7a[_0xac81a0(0xb2)]()['listRegistries']());l(_0x1c2b66,_0x3170db,{'registries':_0x42d446},d(_0x42d446));}),_0x1c2b66['command'](_0x1ae51e(0xbe))['description'](_0x1ae51e(0x99))[_0x1ae51e(0xc0)](_0x1ae51e(0xb9),'one\x20or\x20more\x20queries,\x20searched\x20independently')[_0x1ae51e(0xc6)](new _0x12d0cf(_0x1ae51e(0xb6),_0x1ae51e(0xb8))['argParser'](o)[_0x1ae51e(0xdb)]([]))[_0x1ae51e(0xc6)](new _0x12d0cf(_0x1ae51e(0xd0),_0x1ae51e(0xd6))[_0x1ae51e(0xe8)](s)[_0x1ae51e(0xdb)](i))[_0x1ae51e(0xdf)]('--json',_0x1ae51e(0xa7))[_0x1ae51e(0x9b)](async(_0x3defcb,_0x4e6e71)=>{const _0x3fa0e2=_0x1ae51e;let _0x3cee51=await c(_0x1c2b66,async()=>_0x519a7a[_0x3fa0e2(0xb2)]()[_0x3fa0e2(0xbe)]({'queries':_0x3defcb,'registries':_0x4e6e71[_0x3fa0e2(0xe9)],'limit':_0x4e6e71[_0x3fa0e2(0xc8)]}));l(_0x1c2b66,_0x4e6e71,{'query':{'queries':_0x3defcb,'registries':_0x4e6e71[_0x3fa0e2(0xe9)]},'resources':_0x3cee51[_0x3fa0e2(0xd5)],'total':_0x3cee51[_0x3fa0e2(0xaf)],'limit':_0x4e6e71[_0x3fa0e2(0xc8)]},f(_0x3cee51['resources'],_0x3cee51[_0x3fa0e2(0xaf)]));}),_0x1c2b66['command'](_0x1ae51e(0x9f))[_0x1ae51e(0xcb)](_0x1ae51e(0xc2))[_0x1ae51e(0xc0)]('<handles...>','canonical\x20<registryId>/<resourceId>\x20handles')[_0x1ae51e(0xdf)]('--out\x20<directory>','write\x20flat\x20<registry>--<resource>.svg\x20files')['option']('--json',_0x1ae51e(0xa7))[_0x1ae51e(0x9b)](async(_0x57c4df,_0x47d0ea)=>{const _0xc9f2ff=_0x1ae51e;if(_0x47d0ea['out']===void 0x0){_0x57c4df['length']!==0x1&&_0x1c2b66[_0xc9f2ff(0x92)](_0xc9f2ff(0xd7),{'code':_0xc9f2ff(0xab),'exitCode':0x1});let _0x24d1d9=await c(_0x1c2b66,async()=>_0x519a7a[_0xc9f2ff(0xb2)]()[_0xc9f2ff(0xb1)]({'handle':_0x57c4df[0x0]}));_0x47d0ea[_0xc9f2ff(0x91)]===!0x0?u(_0x1c2b66,_0x24d1d9):_0x1c2b66['configureOutput']()[_0xc9f2ff(0xb3)]?.(_0x24d1d9[_0xc9f2ff(0xdd)]);return;}let _0x2206af=await c(_0x1c2b66,async()=>_0x519a7a['openLibrary']()[_0xc9f2ff(0x9f)]({'handles':_0x57c4df,'destination':_0x47d0ea[_0xc9f2ff(0xbf)]}));if(_0x47d0ea['json']===!0x0)u(_0x1c2b66,_0x2206af);else{let _0x501964=_0x1c2b66[_0xc9f2ff(0xbd)]();for(let _0x1b5ca9 of _0x2206af['exported'])_0x501964[_0xc9f2ff(0xb3)]?.(_0x1b5ca9['path']+'\x0a');for(let _0x31adf4 of _0x2206af['failed'])_0x501964['writeErr']?.(_0x31adf4[_0xc9f2ff(0xad)]+':\x20'+_0x31adf4[_0xc9f2ff(0xd9)]+':\x20'+_0x31adf4['message']+'\x0a');}_0x2206af[_0xc9f2ff(0xe6)][_0xc9f2ff(0xa8)]>0x0&&_0x1c2b66[_0xc9f2ff(0x92)](_0x2206af[_0xc9f2ff(0xe6)]['length']+'\x20resource'+(_0x2206af['failed'][_0xc9f2ff(0xa8)]===0x1?'':'s')+_0xc9f2ff(0xb5),{'code':_0xc9f2ff(0x90),'exitCode':0x1});});let _0x116993=_0x1c2b66['command'](_0x1ae51e(0xe4))['description']('Inspect\x20or\x20clear\x20the\x20resource\x20cache');return _0x116993[_0x1ae51e(0x9b)](()=>_0x116993[_0x1ae51e(0xe3)]()),_0x116993[_0x1ae51e(0xe2)](_0x1ae51e(0xbc))[_0x1ae51e(0xcb)](_0x1ae51e(0xd8))['option'](_0x1ae51e(0xd3),'write\x20structured\x20JSON')[_0x1ae51e(0x9b)](_0x580088=>{let _0x446603=_0x519a7a['openLibrary']()['cacheLocation'];l(_0x1c2b66,_0x580088,{'path':_0x446603},_0x446603);}),_0x116993[_0x1ae51e(0xe2)](_0x1ae51e(0xdc))[_0x1ae51e(0xcb)]('Clear\x20all\x20cached\x20resources')[_0x1ae51e(0xdf)](_0x1ae51e(0xd3),_0x1ae51e(0xa7))['action'](async _0x3b0c55=>{const _0x5803bf=_0x1ae51e;let _0x40565c=await c(_0x1c2b66,async()=>_0x519a7a[_0x5803bf(0xb2)]()[_0x5803bf(0xc4)]());l(_0x1c2b66,_0x3b0c55,{'cleared':_0x40565c},_0x5803bf(0xce)+_0x40565c[_0x5803bf(0xcd)]+'\x20resources\x20('+p(_0x40565c['byteCount'])+_0x5803bf(0xa9)+_0x40565c['path']+'.');}),_0x1c2b66;}function o(_0x2ef585,_0x26bf5e){return[..._0x26bf5e,_0x2ef585];}function s(_0x28ebc0){const _0x5e8e10=_0x52e3;let _0x26059e=Number(_0x28ebc0);if(!Number[_0x5e8e10(0xa3)](_0x26059e)||_0x26059e<0x1)throw new _0x2ace21(_0x5e8e10(0xde)+_0x28ebc0+'\x22.');return _0x26059e;}async function c(_0x773e51,_0x32c31d){const _0x2d4c46=_0x52e3;try{return await _0x32c31d();}catch(_0x28e241){throw _0x388b0d(_0x28e241)&&_0x773e51['error'](_0x28e241[_0x2d4c46(0xd9)]+':\x20'+_0x28e241[_0x2d4c46(0xaa)],{'code':_0x2d4c46(0xd2),'exitCode':0x1}),_0x28e241;}}function l(_0x521693,_0x3fdbca,_0x2a45c6,_0x653733){const _0x5b0bdd=_0x52e3;_0x3fdbca[_0x5b0bdd(0x91)]===!0x0?u(_0x521693,_0x2a45c6):_0x521693[_0x5b0bdd(0xbd)]()[_0x5b0bdd(0xb3)]?.(_0x653733+'\x0a');}function u(_0x25c4b8,_0x3c24ba){const _0x8587ec=_0x52e3;_0x25c4b8[_0x8587ec(0xbd)]()[_0x8587ec(0xb3)]?.(JSON[_0x8587ec(0x9e)](_0x3c24ba,null,0x2)+'\x0a');}function d(_0xdaab08){const _0x37c1f9=_0x52e3;return[_0x37c1f9(0xa5)[_0x37c1f9(0x9d)](0x22)+'\x20\x20'+'RESOURCES'['padStart'](0x9)+'\x20\x20'+_0x37c1f9(0xa0)[_0x37c1f9(0xb4)](0x7)+'\x20\x20'+_0x37c1f9(0x95)[_0x37c1f9(0xb4)](0x6)+'\x20\x20'+'EDITABLE'[_0x37c1f9(0xb4)](0xa),..._0xdaab08[_0x37c1f9(0x9c)](_0x560475=>[_0x560475['id'][_0x37c1f9(0x9d)](0x22),String(_0x560475[_0x37c1f9(0xcd)])[_0x37c1f9(0xb4)](0x9),String(_0x560475[_0x37c1f9(0xe1)])[_0x37c1f9(0xb4)](0x7),String(_0x560475[_0x37c1f9(0x98)])[_0x37c1f9(0xb4)](0x6),(_0x560475[_0x37c1f9(0xd4)]+'/'+_0x560475[_0x37c1f9(0xcd)])[_0x37c1f9(0xb4)](0xa)][_0x37c1f9(0xae)]('\x20\x20'))][_0x37c1f9(0xae)]('\x0a');}function _0x52e3(_0x5e11f4,_0x4d0be5){_0x5e11f4=_0x5e11f4-0x90;const _0x505de1=_0x505d();let _0x52e340=_0x505de1[_0x5e11f4];return _0x52e340;}function f(_0x804137,_0x41b619){const _0x239301=_0x52e3;if(_0x804137[_0x239301(0xa8)]===0x0)return'No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.';let _0x57e662=['HANDLE'[_0x239301(0x9d)](0x32)+'\x20\x20'+_0x239301(0xe7)[_0x239301(0x9d)](0x1c)+'\x20\x20'+_0x239301(0xc5)[_0x239301(0x9d)](0x12)+'\x20\x20'+'COLOR'['padEnd'](0x8)+'\x20\x20SIZE',..._0x804137[_0x239301(0x9c)](_0x2cf711=>{const _0x49494c=_0x239301;let _0x37ff79=_0x2cf711[_0x49494c(0xa1)]?.[_0x49494c(0xbb)]??'-',_0x5177d4=_0x2cf711[_0x49494c(0x97)]?'editable':_0x49494c(0xca),_0x4edf30=_0x2cf711[_0x49494c(0xc7)]['width']+'×'+_0x2cf711['intrinsicSize'][_0x49494c(0x94)];return _0x2cf711[_0x49494c(0xad)]['padEnd'](0x32)+'\x20\x20'+_0x2cf711[_0x49494c(0xc3)]['padEnd'](0x1c)+'\x20\x20'+_0x37ff79[_0x49494c(0x9d)](0x12)+'\x20\x20'+_0x5177d4['padEnd'](0x8)+'\x20\x20'+_0x4edf30;})];return _0x41b619>_0x804137[_0x239301(0xa8)]&&_0x57e662[_0x239301(0xd1)]('…\x20'+(_0x41b619-_0x804137[_0x239301(0xa8)])+'\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.'),_0x57e662[_0x239301(0xae)]('\x0a');}function p(_0x1ad425){const _0x2c5c1f=_0x52e3;return _0x1ad425<0x400?_0x1ad425+'\x20B':_0x1ad425<0x100000?(_0x1ad425/0x400)['toFixed'](0x1)+'\x20KB':(_0x1ad425/0x100000)[_0x2c5c1f(0xa2)](0x1)+_0x2c5c1f(0x9a);}function _0x505d(){const _0xd03799=['writeOut','padStart','\x20could\x20not\x20be\x20exported.','--registry\x20<id>','1407655bJzyrc','restrict\x20results\x20to\x20a\x20registry;\x20repeatable','<queries...>','177558MXuIiE','label','path','configureOutput','find','out','argument','24TGjLtT','Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory','name','clearCache','GROUP','addOption','intrinsicSize','limit','878760karjgt','fixed','description','5801026gEYCEg','resourceCount','Cleared\x20','61570YogWRR','--limit\x20<number>','push','resources.failed','--json','colorEditableCount','resources','maximum\x20number\x20of\x20results','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','Show\x20the\x20resource\x20cache\x20path','code','1837744YTUdwd','default','clear','svg','Expected\x20a\x20positive\x20integer;\x20received\x20\x22','option','935007gCaFCo','groupCount','command','outputHelp','cache','7fcDmrv','failed','NAME','argParser','registry','resources.export.failed','json','error','Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog','height','TAGS','registries','colorEditable','tagCount','Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword','\x20MB','action','map','padEnd','stringify','export','GROUPS','group','toFixed','isInteger','4LYClTs','REGISTRY','144ekqdNa','write\x20structured\x20JSON','length',')\x20from\x20','message','resources.invalid-input','List\x20available\x20resource\x20registries','handle','join','total','2cPVLqb','read','openLibrary'];_0x505d=function(){return _0xd03799;};return _0x505d();}export{a as createResourcesCommand};
1
+ function _0x3373(_0x282998,_0x46cef2){_0x282998=_0x282998-0x18c;const _0x78ac48=_0x78ac();let _0x3373fd=_0x78ac48[_0x282998];return _0x3373fd;}(function(_0x341127,_0x5639cc){const _0x174acb=_0x3373,_0xeeb036=_0x341127();while(!![]){try{const _0x290aaa=parseInt(_0x174acb(0x1ba))/0x1+parseInt(_0x174acb(0x1d5))/0x2+parseInt(_0x174acb(0x1a0))/0x3*(-parseInt(_0x174acb(0x1ce))/0x4)+parseInt(_0x174acb(0x1bc))/0x5*(-parseInt(_0x174acb(0x1d6))/0x6)+-parseInt(_0x174acb(0x191))/0x7*(parseInt(_0x174acb(0x1b0))/0x8)+parseInt(_0x174acb(0x192))/0x9+-parseInt(_0x174acb(0x1c7))/0xa;if(_0x290aaa===_0x5639cc)break;else _0xeeb036['push'](_0xeeb036['shift']());}catch(_0x4659cb){_0xeeb036['push'](_0xeeb036['shift']());}}}(_0x78ac,0x56156));import{isResourceLibraryError as _0x2d3010}from'@univer-cli/resource-library';import{Command as _0x577ef8,InvalidArgumentError as _0x2da239,Option as _0x3375eb}from'commander';function _0x78ac(){const _0x208f53=['label','svg','resources','argParser','1109560QxmRdq','422922gbBbEf','Show\x20the\x20resource\x20cache\x20path','resources.failed','intrinsicSize','action','<handles...>','\x20resources\x20(','total','REGISTRY','message','padStart','default','join','writeOut','code','resourceCount','read','failed','<queries...>','handle','name','configureOutput','outputHelp','Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory','132314eQxOMW','4093407MVleco','listRegistries','editable','one\x20or\x20more\x20queries,\x20searched\x20independently','padEnd','registry','addOption','path','description','TAGS','registries','resources.export.failed','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','write\x20structured\x20JSON','57XGPRAC','cacheLocation','canonical\x20<registryId>/<resourceId>\x20handles','error','--json','\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.','Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword','cache','limit',')\x20from\x20','\x20\x20SIZE','NAME','Clear\x20all\x20cached\x20resources','maximum\x20number\x20of\x20results','GROUPS','Inspect\x20or\x20clear\x20the\x20resource\x20cache','112RPjhPE','COLOR','HANDLE','--registry\x20<id>','Expected\x20a\x20positive\x20integer;\x20received\x20\x22','find','GROUP','stringify','out','groupCount','658329AzYoXX','RESOURCES','35IkihNk','json','command','exported','--out\x20<directory>','writeErr','toFixed','openLibrary','option','export','length','3341800IqvMMf','\x20resource','argument','resources.invalid-input','height','group','map','46972GAidcp','colorEditable','Cleared\x20'];_0x78ac=function(){return _0x208f53;};return _0x78ac();}var i=0x1e;function a(_0x421917){const _0x5bb735=_0x3373;let _0x17d2ee=new _0x577ef8(_0x5bb735(0x1d3))[_0x5bb735(0x19a)]('Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog')[_0x5bb735(0x1da)](()=>_0x17d2ee[_0x5bb735(0x18f)]());_0x17d2ee['command'](_0x5bb735(0x19c))[_0x5bb735(0x19a)]('List\x20available\x20resource\x20registries')[_0x5bb735(0x1c4)](_0x5bb735(0x1a4),_0x5bb735(0x19f))[_0x5bb735(0x1da)](async _0x3acc24=>{const _0x58f901=_0x5bb735;let _0x2f76b3=await c(_0x17d2ee,async()=>_0x421917['openLibrary']()[_0x58f901(0x193)]());l(_0x17d2ee,_0x3acc24,{'registries':_0x2f76b3},d(_0x2f76b3));}),_0x17d2ee['command'](_0x5bb735(0x1b5))['description'](_0x5bb735(0x1a6))[_0x5bb735(0x1c9)](_0x5bb735(0x1e8),_0x5bb735(0x195))[_0x5bb735(0x198)](new _0x3375eb(_0x5bb735(0x1b3),'restrict\x20results\x20to\x20a\x20registry;\x20repeatable')[_0x5bb735(0x1d4)](o)[_0x5bb735(0x1e1)]([]))[_0x5bb735(0x198)](new _0x3375eb('--limit\x20<number>',_0x5bb735(0x1ad))[_0x5bb735(0x1d4)](s)['default'](i))[_0x5bb735(0x1c4)]('--json','write\x20structured\x20JSON')[_0x5bb735(0x1da)](async(_0x3c5f57,_0x5e535e)=>{const _0x288c07=_0x5bb735;let _0x195547=await c(_0x17d2ee,async()=>_0x421917[_0x288c07(0x1c3)]()['find']({'queries':_0x3c5f57,'registries':_0x5e535e[_0x288c07(0x197)],'limit':_0x5e535e[_0x288c07(0x1a8)]}));l(_0x17d2ee,_0x5e535e,{'query':{'queries':_0x3c5f57,'registries':_0x5e535e[_0x288c07(0x197)]},'resources':_0x195547[_0x288c07(0x1d3)],'total':_0x195547[_0x288c07(0x1dd)],'limit':_0x5e535e[_0x288c07(0x1a8)]},f(_0x195547[_0x288c07(0x1d3)],_0x195547[_0x288c07(0x1dd)]));}),_0x17d2ee[_0x5bb735(0x1be)](_0x5bb735(0x1c5))['description'](_0x5bb735(0x190))[_0x5bb735(0x1c9)](_0x5bb735(0x1db),_0x5bb735(0x1a2))[_0x5bb735(0x1c4)](_0x5bb735(0x1c0),'write\x20flat\x20<registry>--<resource>.svg\x20files')[_0x5bb735(0x1c4)](_0x5bb735(0x1a4),_0x5bb735(0x19f))[_0x5bb735(0x1da)](async(_0x400196,_0xdbdd9e)=>{const _0x3d20c8=_0x5bb735;if(_0xdbdd9e[_0x3d20c8(0x1b8)]===void 0x0){_0x400196[_0x3d20c8(0x1c6)]!==0x1&&_0x17d2ee[_0x3d20c8(0x1a3)](_0x3d20c8(0x19e),{'code':_0x3d20c8(0x1ca),'exitCode':0x1});let _0x101ee2=await c(_0x17d2ee,async()=>_0x421917[_0x3d20c8(0x1c3)]()[_0x3d20c8(0x1e6)]({'handle':_0x400196[0x0]}));_0xdbdd9e['json']===!0x0?u(_0x17d2ee,_0x101ee2):_0x17d2ee[_0x3d20c8(0x18e)]()[_0x3d20c8(0x1e3)]?.(_0x101ee2[_0x3d20c8(0x1d2)]);return;}let _0x38f7db=await c(_0x17d2ee,async()=>_0x421917[_0x3d20c8(0x1c3)]()[_0x3d20c8(0x1c5)]({'handles':_0x400196,'destination':_0xdbdd9e['out']}));if(_0xdbdd9e['json']===!0x0)u(_0x17d2ee,_0x38f7db);else{let _0x9d67bf=_0x17d2ee['configureOutput']();for(let _0xfc9523 of _0x38f7db[_0x3d20c8(0x1bf)])_0x9d67bf[_0x3d20c8(0x1e3)]?.(_0xfc9523['path']+'\x0a');for(let _0x2dcb0f of _0x38f7db['failed'])_0x9d67bf[_0x3d20c8(0x1c1)]?.(_0x2dcb0f['handle']+':\x20'+_0x2dcb0f[_0x3d20c8(0x1e4)]+':\x20'+_0x2dcb0f['message']+'\x0a');}_0x38f7db[_0x3d20c8(0x1e7)][_0x3d20c8(0x1c6)]>0x0&&_0x17d2ee[_0x3d20c8(0x1a3)](_0x38f7db[_0x3d20c8(0x1e7)][_0x3d20c8(0x1c6)]+_0x3d20c8(0x1c8)+(_0x38f7db['failed'][_0x3d20c8(0x1c6)]===0x1?'':'s')+'\x20could\x20not\x20be\x20exported.',{'code':_0x3d20c8(0x19d),'exitCode':0x1});});let _0x334894=_0x17d2ee['command'](_0x5bb735(0x1a7))[_0x5bb735(0x19a)](_0x5bb735(0x1af));return _0x334894[_0x5bb735(0x1da)](()=>_0x334894[_0x5bb735(0x18f)]()),_0x334894[_0x5bb735(0x1be)](_0x5bb735(0x199))[_0x5bb735(0x19a)](_0x5bb735(0x1d7))['option'](_0x5bb735(0x1a4),_0x5bb735(0x19f))['action'](_0x9a62d9=>{const _0x45e5c0=_0x5bb735;let _0x1db9c1=_0x421917['openLibrary']()[_0x45e5c0(0x1a1)];l(_0x17d2ee,_0x9a62d9,{'path':_0x1db9c1},_0x1db9c1);}),_0x334894[_0x5bb735(0x1be)]('clear')['description'](_0x5bb735(0x1ac))[_0x5bb735(0x1c4)](_0x5bb735(0x1a4),_0x5bb735(0x19f))[_0x5bb735(0x1da)](async _0x2f8382=>{const _0x236e99=_0x5bb735;let _0x1004fc=await c(_0x17d2ee,async()=>_0x421917['openLibrary']()['clearCache']());l(_0x17d2ee,_0x2f8382,{'cleared':_0x1004fc},_0x236e99(0x1d0)+_0x1004fc[_0x236e99(0x1e5)]+_0x236e99(0x1dc)+p(_0x1004fc['byteCount'])+_0x236e99(0x1a9)+_0x1004fc[_0x236e99(0x199)]+'.');}),_0x17d2ee;}function o(_0x368da9,_0xc87816){return[..._0xc87816,_0x368da9];}function s(_0x18d917){const _0x29c7ac=_0x3373;let _0xe05ca6=Number(_0x18d917);if(!Number['isInteger'](_0xe05ca6)||_0xe05ca6<0x1)throw new _0x2da239(_0x29c7ac(0x1b4)+_0x18d917+'\x22.');return _0xe05ca6;}async function c(_0x40fc29,_0x2efce2){const _0x1d0824=_0x3373;try{return await _0x2efce2();}catch(_0x20ab3a){throw _0x2d3010(_0x20ab3a)&&_0x40fc29[_0x1d0824(0x1a3)](_0x20ab3a['code']+':\x20'+_0x20ab3a[_0x1d0824(0x1df)],{'code':_0x1d0824(0x1d8),'exitCode':0x1}),_0x20ab3a;}}function l(_0x42e7ed,_0x3ed79a,_0x2d9b05,_0x2964a2){const _0x8ffa20=_0x3373;_0x3ed79a[_0x8ffa20(0x1bd)]===!0x0?u(_0x42e7ed,_0x2d9b05):_0x42e7ed['configureOutput']()['writeOut']?.(_0x2964a2+'\x0a');}function u(_0x5f0bbc,_0x53b105){const _0x5e0a3e=_0x3373;_0x5f0bbc[_0x5e0a3e(0x18e)]()['writeOut']?.(JSON[_0x5e0a3e(0x1b7)](_0x53b105,null,0x2)+'\x0a');}function d(_0x373bdd){const _0x500274=_0x3373;return[_0x500274(0x1de)['padEnd'](0x22)+'\x20\x20'+_0x500274(0x1bb)[_0x500274(0x1e0)](0x9)+'\x20\x20'+_0x500274(0x1ae)[_0x500274(0x1e0)](0x7)+'\x20\x20'+_0x500274(0x19b)[_0x500274(0x1e0)](0x6)+'\x20\x20'+'EDITABLE'[_0x500274(0x1e0)](0xa),..._0x373bdd[_0x500274(0x1cd)](_0x1eb79c=>[_0x1eb79c['id'][_0x500274(0x196)](0x22),String(_0x1eb79c[_0x500274(0x1e5)])[_0x500274(0x1e0)](0x9),String(_0x1eb79c[_0x500274(0x1b9)])[_0x500274(0x1e0)](0x7),String(_0x1eb79c['tagCount'])[_0x500274(0x1e0)](0x6),(_0x1eb79c['colorEditableCount']+'/'+_0x1eb79c['resourceCount'])[_0x500274(0x1e0)](0xa)][_0x500274(0x1e2)]('\x20\x20'))][_0x500274(0x1e2)]('\x0a');}function f(_0x2a9ce2,_0x31a696){const _0x354432=_0x3373;if(_0x2a9ce2[_0x354432(0x1c6)]===0x0)return'No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.';let _0xd3604c=[_0x354432(0x1b2)[_0x354432(0x196)](0x32)+'\x20\x20'+_0x354432(0x1ab)[_0x354432(0x196)](0x1c)+'\x20\x20'+_0x354432(0x1b6)[_0x354432(0x196)](0x12)+'\x20\x20'+_0x354432(0x1b1)['padEnd'](0x8)+_0x354432(0x1aa),..._0x2a9ce2['map'](_0x44d5ff=>{const _0x2160f6=_0x354432;let _0x2565bc=_0x44d5ff[_0x2160f6(0x1cc)]?.[_0x2160f6(0x1d1)]??'-',_0x56f35e=_0x44d5ff[_0x2160f6(0x1cf)]?_0x2160f6(0x194):'fixed',_0x29b8f4=_0x44d5ff[_0x2160f6(0x1d9)]['width']+'×'+_0x44d5ff[_0x2160f6(0x1d9)][_0x2160f6(0x1cb)];return _0x44d5ff[_0x2160f6(0x18c)][_0x2160f6(0x196)](0x32)+'\x20\x20'+_0x44d5ff[_0x2160f6(0x18d)]['padEnd'](0x1c)+'\x20\x20'+_0x2565bc[_0x2160f6(0x196)](0x12)+'\x20\x20'+_0x56f35e[_0x2160f6(0x196)](0x8)+'\x20\x20'+_0x29b8f4;})];return _0x31a696>_0x2a9ce2[_0x354432(0x1c6)]&&_0xd3604c['push']('…\x20'+(_0x31a696-_0x2a9ce2[_0x354432(0x1c6)])+_0x354432(0x1a5)),_0xd3604c[_0x354432(0x1e2)]('\x0a');}function p(_0x5dcd75){const _0x2cd88f=_0x3373;return _0x5dcd75<0x400?_0x5dcd75+'\x20B':_0x5dcd75<0x100000?(_0x5dcd75/0x400)[_0x2cd88f(0x1c2)](0x1)+'\x20KB':(_0x5dcd75/0x100000)[_0x2cd88f(0x1c2)](0x1)+'\x20MB';}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.3.0",
4
+ "version": "1.4.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.3.0"
21
+ "@univer-cli/resource-library": "1.4.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"