@univer-cli/resource-library-command 1.0.3 → 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.
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x304622,_0x996e48){const _0x3a465f=_0x9872,_0xfce4f7=_0x304622();while(!![]){try{const _0x303303=parseInt(_0x3a465f(0x1a4))/0x1*(parseInt(_0x3a465f(0x167))/0x2)+parseInt(_0x3a465f(0x1a0))/0x3*(parseInt(_0x3a465f(0x1b8))/0x4)+parseInt(_0x3a465f(0x19f))/0x5+-parseInt(_0x3a465f(0x17a))/0x6*(parseInt(_0x3a465f(0x180))/0x7)+-parseInt(_0x3a465f(0x174))/0x8*(parseInt(_0x3a465f(0x16a))/0x9)+-parseInt(_0x3a465f(0x19e))/0xa*(parseInt(_0x3a465f(0x1c4))/0xb)+parseInt(_0x3a465f(0x189))/0xc;if(_0x303303===_0x996e48)break;else _0xfce4f7['push'](_0xfce4f7['shift']());}catch(_0x29e209){_0xfce4f7['push'](_0xfce4f7['shift']());}}}(_0x5922,0x4aa20));import{isResourceLibraryError as _0xb1c350}from'@univer-cli/resource-library';import{Command as _0x2ec724,InvalidArgumentError as _0x1cfd78,Option as _0x3bd1f}from'commander';var i=0x1e;function _0x5922(){const _0x53633a=['cache','558lHkdKc','message','limit','TAGS','resources.invalid-input','HANDLE','total','configureOutput','--out\x20<directory>','padEnd','34056UUDZXm','addOption','command',')\x20from\x20','Cleared\x20','isInteger','30fDVPfj','listRegistries','handle','height','write\x20flat\x20<registry>--<resource>.svg\x20files','--registry\x20<id>','744569lOqnmX','GROUPS','REGISTRY','label','fixed','\x20resources\x20(','Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword','--json','COLOR','6010584KlblIx','Clear\x20all\x20cached\x20resources','out','description','group','option','code','outputHelp','maximum\x20number\x20of\x20results','RESOURCES','intrinsicSize','clear','svg','argument','width','failed','one\x20or\x20more\x20queries,\x20searched\x20independently','canonical\x20<registryId>/<resourceId>\x20handles','toFixed','error','json','20lLINhN','1991240KLcMGK','1038705fNqCXd','No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.','argParser','Show\x20the\x20resource\x20cache\x20path','1lBxZyf','registry','path','read','clearCache','Expected\x20a\x20positive\x20integer;\x20received\x20\x22','export','name','action','resources','EDITABLE','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','\x20KB','exported','writeErr','groupCount','\x20\x20SIZE','resources.failed','openLibrary','length','4EVtBZB','write\x20structured\x20JSON','\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.','Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog','tagCount','find','\x20MB','Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory','restrict\x20results\x20to\x20a\x20registry;\x20repeatable','default','padStart','cacheLocation','1473527jJUKRz','writeOut','resourceCount','join','map','<handles...>','248028YGsHqI','colorEditable'];_0x5922=function(){return _0x53633a;};return _0x5922();}function a(_0x24e7bc){const _0x45f66b=_0x9872;let _0x5c11e6=new _0x2ec724('resources')[_0x45f66b(0x18c)](_0x45f66b(0x1bb))[_0x45f66b(0x1ac)](()=>_0x5c11e6[_0x45f66b(0x190)]());_0x5c11e6[_0x45f66b(0x176)]('registries')['description']('List\x20available\x20resource\x20registries')['option'](_0x45f66b(0x187),_0x45f66b(0x1b9))[_0x45f66b(0x1ac)](async _0x2f9d28=>{const _0x501aa5=_0x45f66b;let _0x3229b0=await c(_0x5c11e6,async()=>_0x24e7bc[_0x501aa5(0x1b6)]()[_0x501aa5(0x17b)]());l(_0x5c11e6,_0x2f9d28,{'registries':_0x3229b0},d(_0x3229b0));}),_0x5c11e6[_0x45f66b(0x176)](_0x45f66b(0x1bd))[_0x45f66b(0x18c)](_0x45f66b(0x186))[_0x45f66b(0x196)]('<queries...>',_0x45f66b(0x199))[_0x45f66b(0x175)](new _0x3bd1f(_0x45f66b(0x17f),_0x45f66b(0x1c0))[_0x45f66b(0x1a2)](o)['default']([]))[_0x45f66b(0x175)](new _0x3bd1f('--limit\x20<number>',_0x45f66b(0x191))[_0x45f66b(0x1a2)](s)[_0x45f66b(0x1c1)](i))[_0x45f66b(0x18e)]('--json',_0x45f66b(0x1b9))[_0x45f66b(0x1ac)](async(_0xef491a,_0x28ad45)=>{const _0x38f223=_0x45f66b;let _0x30174f=await c(_0x5c11e6,async()=>_0x24e7bc[_0x38f223(0x1b6)]()[_0x38f223(0x1bd)]({'queries':_0xef491a,'registries':_0x28ad45[_0x38f223(0x1a5)],'limit':_0x28ad45[_0x38f223(0x16c)]}));l(_0x5c11e6,_0x28ad45,{'query':{'queries':_0xef491a,'registries':_0x28ad45[_0x38f223(0x1a5)]},'resources':_0x30174f['resources'],'total':_0x30174f[_0x38f223(0x170)],'limit':_0x28ad45['limit']},f(_0x30174f[_0x38f223(0x1ad)],_0x30174f[_0x38f223(0x170)]));}),_0x5c11e6[_0x45f66b(0x176)]('export')['description'](_0x45f66b(0x1bf))[_0x45f66b(0x196)](_0x45f66b(0x166),_0x45f66b(0x19a))[_0x45f66b(0x18e)](_0x45f66b(0x172),_0x45f66b(0x17e))['option']('--json',_0x45f66b(0x1b9))[_0x45f66b(0x1ac)](async(_0x4b3b0e,_0x313820)=>{const _0x139dd9=_0x45f66b;if(_0x313820[_0x139dd9(0x18b)]===void 0x0){_0x4b3b0e[_0x139dd9(0x1b7)]!==0x1&&_0x5c11e6[_0x139dd9(0x19c)](_0x139dd9(0x1af),{'code':_0x139dd9(0x16e),'exitCode':0x1});let _0x391ce1=await c(_0x5c11e6,async()=>_0x24e7bc[_0x139dd9(0x1b6)]()[_0x139dd9(0x1a7)]({'handle':_0x4b3b0e[0x0]}));_0x313820[_0x139dd9(0x19d)]===!0x0?u(_0x5c11e6,_0x391ce1):_0x5c11e6[_0x139dd9(0x171)]()[_0x139dd9(0x1c5)]?.(_0x391ce1[_0x139dd9(0x195)]);return;}let _0x176256=await c(_0x5c11e6,async()=>_0x24e7bc[_0x139dd9(0x1b6)]()[_0x139dd9(0x1aa)]({'handles':_0x4b3b0e,'destination':_0x313820[_0x139dd9(0x18b)]}));if(_0x313820[_0x139dd9(0x19d)]===!0x0)u(_0x5c11e6,_0x176256);else{let _0x12f9e1=_0x5c11e6[_0x139dd9(0x171)]();for(let _0x25f95a of _0x176256[_0x139dd9(0x1b1)])_0x12f9e1[_0x139dd9(0x1c5)]?.(_0x25f95a[_0x139dd9(0x1a6)]+'\x0a');for(let _0x48796e of _0x176256['failed'])_0x12f9e1[_0x139dd9(0x1b2)]?.(_0x48796e['handle']+':\x20'+_0x48796e[_0x139dd9(0x18f)]+':\x20'+_0x48796e[_0x139dd9(0x16b)]+'\x0a');}_0x176256[_0x139dd9(0x198)][_0x139dd9(0x1b7)]>0x0&&_0x5c11e6[_0x139dd9(0x19c)](_0x176256['failed'][_0x139dd9(0x1b7)]+'\x20resource'+(_0x176256[_0x139dd9(0x198)]['length']===0x1?'':'s')+'\x20could\x20not\x20be\x20exported.',{'code':'resources.export.failed','exitCode':0x1});});let _0x3a7284=_0x5c11e6[_0x45f66b(0x176)](_0x45f66b(0x169))[_0x45f66b(0x18c)]('Inspect\x20or\x20clear\x20the\x20resource\x20cache');return _0x3a7284[_0x45f66b(0x1ac)](()=>_0x3a7284[_0x45f66b(0x190)]()),_0x3a7284['command'](_0x45f66b(0x1a6))[_0x45f66b(0x18c)](_0x45f66b(0x1a3))['option'](_0x45f66b(0x187),'write\x20structured\x20JSON')[_0x45f66b(0x1ac)](_0x5bbb08=>{const _0x50691f=_0x45f66b;let _0x4798f1=_0x24e7bc['openLibrary']()[_0x50691f(0x1c3)];l(_0x5c11e6,_0x5bbb08,{'path':_0x4798f1},_0x4798f1);}),_0x3a7284[_0x45f66b(0x176)](_0x45f66b(0x194))['description'](_0x45f66b(0x18a))['option'](_0x45f66b(0x187),_0x45f66b(0x1b9))[_0x45f66b(0x1ac)](async _0x1e2704=>{const _0x3fb62c=_0x45f66b;let _0xba3744=await c(_0x5c11e6,async()=>_0x24e7bc['openLibrary']()[_0x3fb62c(0x1a8)]());l(_0x5c11e6,_0x1e2704,{'cleared':_0xba3744},_0x3fb62c(0x178)+_0xba3744[_0x3fb62c(0x1c6)]+_0x3fb62c(0x185)+p(_0xba3744['byteCount'])+_0x3fb62c(0x177)+_0xba3744['path']+'.');}),_0x5c11e6;}function _0x9872(_0x4be066,_0x405ce8){_0x4be066=_0x4be066-0x166;const _0x5922b1=_0x5922();let _0x987211=_0x5922b1[_0x4be066];return _0x987211;}function o(_0x46c9fe,_0x1972c9){return[..._0x1972c9,_0x46c9fe];}function s(_0x4d97f3){const _0x3d1981=_0x9872;let _0x487ee5=Number(_0x4d97f3);if(!Number[_0x3d1981(0x179)](_0x487ee5)||_0x487ee5<0x1)throw new _0x1cfd78(_0x3d1981(0x1a9)+_0x4d97f3+'\x22.');return _0x487ee5;}async function c(_0x4dd4ec,_0x293914){const _0x3787ba=_0x9872;try{return await _0x293914();}catch(_0x17ad40){throw _0xb1c350(_0x17ad40)&&_0x4dd4ec[_0x3787ba(0x19c)](_0x17ad40[_0x3787ba(0x18f)]+':\x20'+_0x17ad40['message'],{'code':_0x3787ba(0x1b5),'exitCode':0x1}),_0x17ad40;}}function l(_0x15c647,_0x2bb44d,_0x2c4aae,_0x27252b){const _0x16eb58=_0x9872;_0x2bb44d[_0x16eb58(0x19d)]===!0x0?u(_0x15c647,_0x2c4aae):_0x15c647['configureOutput']()[_0x16eb58(0x1c5)]?.(_0x27252b+'\x0a');}function u(_0x21d341,_0x24c917){const _0x1ad442=_0x9872;_0x21d341[_0x1ad442(0x171)]()[_0x1ad442(0x1c5)]?.(JSON['stringify'](_0x24c917,null,0x2)+'\x0a');}function d(_0x1ec122){const _0x4076c1=_0x9872;return[_0x4076c1(0x182)['padEnd'](0x22)+'\x20\x20'+_0x4076c1(0x192)[_0x4076c1(0x1c2)](0x9)+'\x20\x20'+_0x4076c1(0x181)[_0x4076c1(0x1c2)](0x7)+'\x20\x20'+_0x4076c1(0x16d)[_0x4076c1(0x1c2)](0x6)+'\x20\x20'+_0x4076c1(0x1ae)['padStart'](0xa),..._0x1ec122[_0x4076c1(0x1c8)](_0x3d7ca9=>[_0x3d7ca9['id'][_0x4076c1(0x173)](0x22),String(_0x3d7ca9[_0x4076c1(0x1c6)])[_0x4076c1(0x1c2)](0x9),String(_0x3d7ca9[_0x4076c1(0x1b3)])['padStart'](0x7),String(_0x3d7ca9[_0x4076c1(0x1bc)])[_0x4076c1(0x1c2)](0x6),(_0x3d7ca9['colorEditableCount']+'/'+_0x3d7ca9[_0x4076c1(0x1c6)])[_0x4076c1(0x1c2)](0xa)][_0x4076c1(0x1c7)]('\x20\x20'))][_0x4076c1(0x1c7)]('\x0a');}function f(_0x2d97f3,_0x1ca534){const _0x3f7b42=_0x9872;if(_0x2d97f3[_0x3f7b42(0x1b7)]===0x0)return _0x3f7b42(0x1a1);let _0x35e4de=[_0x3f7b42(0x16f)['padEnd'](0x32)+'\x20\x20'+'NAME'[_0x3f7b42(0x173)](0x1c)+'\x20\x20'+'GROUP'[_0x3f7b42(0x173)](0x12)+'\x20\x20'+_0x3f7b42(0x188)[_0x3f7b42(0x173)](0x8)+_0x3f7b42(0x1b4),..._0x2d97f3['map'](_0x5d33ca=>{const _0x1b2316=_0x3f7b42;let _0x339ef5=_0x5d33ca[_0x1b2316(0x18d)]?.[_0x1b2316(0x183)]??'-',_0x246baf=_0x5d33ca[_0x1b2316(0x168)]?'editable':_0x1b2316(0x184),_0x1f282e=_0x5d33ca[_0x1b2316(0x193)][_0x1b2316(0x197)]+'×'+_0x5d33ca[_0x1b2316(0x193)][_0x1b2316(0x17d)];return _0x5d33ca[_0x1b2316(0x17c)][_0x1b2316(0x173)](0x32)+'\x20\x20'+_0x5d33ca[_0x1b2316(0x1ab)][_0x1b2316(0x173)](0x1c)+'\x20\x20'+_0x339ef5[_0x1b2316(0x173)](0x12)+'\x20\x20'+_0x246baf[_0x1b2316(0x173)](0x8)+'\x20\x20'+_0x1f282e;})];return _0x1ca534>_0x2d97f3['length']&&_0x35e4de['push']('…\x20'+(_0x1ca534-_0x2d97f3[_0x3f7b42(0x1b7)])+_0x3f7b42(0x1ba)),_0x35e4de[_0x3f7b42(0x1c7)]('\x0a');}function p(_0x19eea7){const _0x328ff9=_0x9872;return _0x19eea7<0x400?_0x19eea7+'\x20B':_0x19eea7<0x100000?(_0x19eea7/0x400)[_0x328ff9(0x19b)](0x1)+_0x328ff9(0x1b0):(_0x19eea7/0x100000)[_0x328ff9(0x19b)](0x1)+_0x328ff9(0x1be);}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.0
|
|
4
|
+
"version": "1.1.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.0
|
|
21
|
+
"@univer-cli/resource-library": "1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|