@univer-cli/resource-library-command 1.6.2 → 1.6.3
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(_0x2df93d,_0x36ad7d){const _0x21ed3d=_0x4c67,_0x9ab03c=_0x2df93d();while(!![]){try{const _0x2af3b6=-parseInt(_0x21ed3d(0x184))/0x1+parseInt(_0x21ed3d(0x18a))/0x2*(parseInt(_0x21ed3d(0x181))/0x3)+parseInt(_0x21ed3d(0x1c4))/0x4+-parseInt(_0x21ed3d(0x1a1))/0x5*(parseInt(_0x21ed3d(0x195))/0x6)+parseInt(_0x21ed3d(0x19e))/0x7*(-parseInt(_0x21ed3d(0x1ae))/0x8)+-parseInt(_0x21ed3d(0x18b))/0x9+-parseInt(_0x21ed3d(0x1b0))/0xa*(-parseInt(_0x21ed3d(0x1ce))/0xb);if(_0x2af3b6===_0x36ad7d)break;else _0x9ab03c['push'](_0x9ab03c['shift']());}catch(_0x3c2c1d){_0x9ab03c['push'](_0x9ab03c['shift']());}}}(_0x4146,0xd44e6));import{isResourceLibraryError as _0x2a7b27}from'@univer-cli/resource-library';function _0x4c67(_0x586400,_0x4bb1b6){_0x586400=_0x586400-0x174;const _0x41463a=_0x4146();let _0x4c6780=_0x41463a[_0x586400];return _0x4c6780;}import{Command as _0x5b45b4,InvalidArgumentError as _0x8ced9b,Option as _0x2a4713}from'commander';var i=0x1e;function a(_0x135b4e){const _0x486e89=_0x4c67;let _0x1006a1=new _0x5b45b4(_0x486e89(0x174))[_0x486e89(0x1a2)](_0x486e89(0x1ac))[_0x486e89(0x1cd)](()=>_0x1006a1[_0x486e89(0x192)]());_0x1006a1[_0x486e89(0x194)](_0x486e89(0x19b))[_0x486e89(0x1a2)](_0x486e89(0x18c))[_0x486e89(0x1b8)](_0x486e89(0x178),_0x486e89(0x1bb))[_0x486e89(0x1cd)](async _0xd905da=>{const _0x4453f4=_0x486e89;let _0x27bf1c=await c(_0x1006a1,async()=>_0x135b4e['openLibrary']()[_0x4453f4(0x1ca)]());l(_0x1006a1,_0xd905da,{'registries':_0x27bf1c},d(_0x27bf1c));}),_0x1006a1[_0x486e89(0x194)](_0x486e89(0x179))[_0x486e89(0x1a2)]('Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword')[_0x486e89(0x1b9)](_0x486e89(0x1cf),'one\x20or\x20more\x20queries,\x20searched\x20independently')[_0x486e89(0x17b)](new _0x2a4713(_0x486e89(0x1a6),'restrict\x20results\x20to\x20a\x20registry;\x20repeatable')[_0x486e89(0x1c5)](o)[_0x486e89(0x1a5)]([]))[_0x486e89(0x17b)](new _0x2a4713(_0x486e89(0x177),_0x486e89(0x1a3))[_0x486e89(0x1c5)](s)['default'](i))[_0x486e89(0x1b8)]('--json',_0x486e89(0x1bb))[_0x486e89(0x1cd)](async(_0xb783ba,_0x54eb2f)=>{const _0x53a085=_0x486e89;let _0x587af8=await c(_0x1006a1,async()=>_0x135b4e['openLibrary']()['find']({'queries':_0xb783ba,'registries':_0x54eb2f[_0x53a085(0x187)],'limit':_0x54eb2f[_0x53a085(0x17e)]}));l(_0x1006a1,_0x54eb2f,{'query':{'queries':_0xb783ba,'registries':_0x54eb2f[_0x53a085(0x187)]},'resources':_0x587af8['resources'],'total':_0x587af8[_0x53a085(0x1b2)],'limit':_0x54eb2f[_0x53a085(0x17e)]},f(_0x587af8['resources'],_0x587af8[_0x53a085(0x1b2)]));}),_0x1006a1['command']('export')[_0x486e89(0x1a2)](_0x486e89(0x1bf))[_0x486e89(0x1b9)]('<handles...>',_0x486e89(0x1c1))[_0x486e89(0x1b8)](_0x486e89(0x1c8),_0x486e89(0x176))[_0x486e89(0x1b8)](_0x486e89(0x178),_0x486e89(0x1bb))[_0x486e89(0x1cd)](async(_0x4e84c5,_0x4ce3a8)=>{const _0x52ff51=_0x486e89;if(_0x4ce3a8[_0x52ff51(0x17d)]===void 0x0){_0x4e84c5['length']!==0x1&&_0x1006a1['error'](_0x52ff51(0x1c0),{'code':_0x52ff51(0x18e),'exitCode':0x1});let _0x4f2647=await c(_0x1006a1,async()=>_0x135b4e[_0x52ff51(0x1d1)]()[_0x52ff51(0x1b3)]({'handle':_0x4e84c5[0x0]}));_0x4ce3a8[_0x52ff51(0x175)]===!0x0?u(_0x1006a1,_0x4f2647):_0x1006a1['configureOutput']()[_0x52ff51(0x182)]?.(_0x4f2647[_0x52ff51(0x190)]);return;}let _0x4a3d72=await c(_0x1006a1,async()=>_0x135b4e[_0x52ff51(0x1d1)]()[_0x52ff51(0x19f)]({'handles':_0x4e84c5,'destination':_0x4ce3a8[_0x52ff51(0x17d)]}));if(_0x4ce3a8[_0x52ff51(0x175)]===!0x0)u(_0x1006a1,_0x4a3d72);else{let _0x3783cd=_0x1006a1[_0x52ff51(0x1a7)]();for(let _0x2d03d6 of _0x4a3d72[_0x52ff51(0x196)])_0x3783cd[_0x52ff51(0x182)]?.(_0x2d03d6[_0x52ff51(0x185)]+'\x0a');for(let _0x161117 of _0x4a3d72[_0x52ff51(0x1bc)])_0x3783cd['writeErr']?.(_0x161117[_0x52ff51(0x18f)]+':\x20'+_0x161117[_0x52ff51(0x1cc)]+':\x20'+_0x161117[_0x52ff51(0x180)]+'\x0a');}_0x4a3d72[_0x52ff51(0x1bc)][_0x52ff51(0x197)]>0x0&&_0x1006a1[_0x52ff51(0x17f)](_0x4a3d72[_0x52ff51(0x1bc)][_0x52ff51(0x197)]+'\x20resource'+(_0x4a3d72[_0x52ff51(0x1bc)][_0x52ff51(0x197)]===0x1?'':'s')+'\x20could\x20not\x20be\x20exported.',{'code':_0x52ff51(0x1a9),'exitCode':0x1});});let _0x22f2b6=_0x1006a1[_0x486e89(0x194)](_0x486e89(0x1b7))[_0x486e89(0x1a2)](_0x486e89(0x1a0));return _0x22f2b6['action'](()=>_0x22f2b6[_0x486e89(0x192)]()),_0x22f2b6[_0x486e89(0x194)](_0x486e89(0x185))[_0x486e89(0x1a2)]('Show\x20the\x20resource\x20cache\x20path')[_0x486e89(0x1b8)](_0x486e89(0x178),_0x486e89(0x1bb))[_0x486e89(0x1cd)](_0x448b74=>{const _0x4f17c8=_0x486e89;let _0x1d3490=_0x135b4e[_0x4f17c8(0x1d1)]()[_0x4f17c8(0x193)];l(_0x1006a1,_0x448b74,{'path':_0x1d3490},_0x1d3490);}),_0x22f2b6[_0x486e89(0x194)](_0x486e89(0x18d))[_0x486e89(0x1a2)]('Clear\x20all\x20cached\x20resources')[_0x486e89(0x1b8)](_0x486e89(0x178),_0x486e89(0x1bb))[_0x486e89(0x1cd)](async _0x12ced1=>{const _0x2ec588=_0x486e89;let _0x4b21ae=await c(_0x1006a1,async()=>_0x135b4e[_0x2ec588(0x1d1)]()[_0x2ec588(0x1c7)]());l(_0x1006a1,_0x12ced1,{'cleared':_0x4b21ae},_0x2ec588(0x1c3)+_0x4b21ae[_0x2ec588(0x1c6)]+'\x20resources\x20('+p(_0x4b21ae[_0x2ec588(0x1c2)])+_0x2ec588(0x1a8)+_0x4b21ae[_0x2ec588(0x185)]+'.');}),_0x1006a1;}function o(_0x5ae7b9,_0x568d39){return[..._0x568d39,_0x5ae7b9];}function s(_0x1b739b){let _0xf52b12=Number(_0x1b739b);if(!Number['isInteger'](_0xf52b12)||_0xf52b12<0x1)throw new _0x8ced9b('Expected\x20a\x20positive\x20integer;\x20received\x20\x22'+_0x1b739b+'\x22.');return _0xf52b12;}async function c(_0x3e5764,_0x5363e0){const _0x3da687=_0x4c67;try{return await _0x5363e0();}catch(_0x144d0c){throw _0x2a7b27(_0x144d0c)&&_0x3e5764[_0x3da687(0x17f)](_0x144d0c['code']+':\x20'+_0x144d0c[_0x3da687(0x180)],{'code':_0x3da687(0x17a),'exitCode':0x1}),_0x144d0c;}}function l(_0x160836,_0xa0bbfc,_0x3263da,_0x43a02c){const _0x4608b5=_0x4c67;_0xa0bbfc[_0x4608b5(0x175)]===!0x0?u(_0x160836,_0x3263da):_0x160836[_0x4608b5(0x1a7)]()[_0x4608b5(0x182)]?.(_0x43a02c+'\x0a');}function u(_0x2e8dea,_0x30f620){const _0x1a10a4=_0x4c67;_0x2e8dea['configureOutput']()[_0x1a10a4(0x182)]?.(JSON['stringify'](_0x30f620,null,0x2)+'\x0a');}function d(_0x2f3108){const _0x525de6=_0x4c67;return[_0x525de6(0x1ab)[_0x525de6(0x1ba)](0x22)+'\x20\x20'+_0x525de6(0x1a4)[_0x525de6(0x191)](0x9)+'\x20\x20'+_0x525de6(0x188)[_0x525de6(0x191)](0x7)+'\x20\x20'+_0x525de6(0x1cb)[_0x525de6(0x191)](0x6)+'\x20\x20'+_0x525de6(0x189)['padStart'](0xa),..._0x2f3108[_0x525de6(0x1af)](_0x210980=>[_0x210980['id'][_0x525de6(0x1ba)](0x22),String(_0x210980[_0x525de6(0x1c6)])['padStart'](0x9),String(_0x210980[_0x525de6(0x1b4)])[_0x525de6(0x191)](0x7),String(_0x210980[_0x525de6(0x1ad)])[_0x525de6(0x191)](0x6),(_0x210980[_0x525de6(0x1bd)]+'/'+_0x210980[_0x525de6(0x1c6)])[_0x525de6(0x191)](0xa)][_0x525de6(0x1c9)]('\x20\x20'))]['join']('\x0a');}function f(_0x215fb4,_0x340e30){const _0x4a537b=_0x4c67;if(_0x215fb4[_0x4a537b(0x197)]===0x0)return _0x4a537b(0x1b5);let _0x5c8214=[_0x4a537b(0x19c)[_0x4a537b(0x1ba)](0x32)+'\x20\x20'+_0x4a537b(0x19a)['padEnd'](0x1c)+'\x20\x20'+_0x4a537b(0x199)['padEnd'](0x12)+'\x20\x20'+_0x4a537b(0x1be)[_0x4a537b(0x1ba)](0x8)+_0x4a537b(0x1d0),..._0x215fb4[_0x4a537b(0x1af)](_0x589c64=>{const _0x53f384=_0x4a537b;let _0x1151dc=_0x589c64[_0x53f384(0x186)]?.['label']??'-',_0x42a03f=_0x589c64[_0x53f384(0x1b1)]?'editable':'fixed',_0x5c8484=_0x589c64[_0x53f384(0x1b6)][_0x53f384(0x198)]+'×'+_0x589c64[_0x53f384(0x1b6)]['height'];return _0x589c64[_0x53f384(0x18f)]['padEnd'](0x32)+'\x20\x20'+_0x589c64[_0x53f384(0x17c)][_0x53f384(0x1ba)](0x1c)+'\x20\x20'+_0x1151dc['padEnd'](0x12)+'\x20\x20'+_0x42a03f[_0x53f384(0x1ba)](0x8)+'\x20\x20'+_0x5c8484;})];return _0x340e30>_0x215fb4[_0x4a537b(0x197)]&&_0x5c8214['push']('…\x20'+(_0x340e30-_0x215fb4['length'])+_0x4a537b(0x1aa)),_0x5c8214[_0x4a537b(0x1c9)]('\x0a');}function p(_0x1a1d95){const _0x539d59=_0x4c67;return _0x1a1d95<0x400?_0x1a1d95+'\x20B':_0x1a1d95<0x100000?(_0x1a1d95/0x400)[_0x539d59(0x183)](0x1)+_0x539d59(0x19d):(_0x1a1d95/0x100000)['toFixed'](0x1)+'\x20MB';}export{a as createResourcesCommand};function _0x4146(){const _0x4b98f4=['read','groupCount','No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.','intrinsicSize','cache','option','argument','padEnd','write\x20structured\x20JSON','failed','colorEditableCount','COLOR','Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','canonical\x20<registryId>/<resourceId>\x20handles','byteCount','Cleared\x20','6136508mINiGs','argParser','resourceCount','clearCache','--out\x20<directory>','join','listRegistries','TAGS','code','action','6369uXkuZZ','<queries...>','\x20\x20SIZE','openLibrary','resources','json','write\x20flat\x20<registry>--<resource>.svg\x20files','--limit\x20<number>','--json','find','resources.failed','addOption','name','out','limit','error','message','3TXvTGa','writeOut','toFixed','825728FDjXQT','path','group','registry','GROUPS','EDITABLE','2734814pODelI','15218397TRSRet','List\x20available\x20resource\x20registries','clear','resources.invalid-input','handle','svg','padStart','outputHelp','cacheLocation','command','306NgRvQB','exported','length','width','GROUP','NAME','registries','HANDLE','\x20KB','4193fnRnzM','export','Inspect\x20or\x20clear\x20the\x20resource\x20cache','65755YTGDCY','description','maximum\x20number\x20of\x20results','RESOURCES','default','--registry\x20<id>','configureOutput',')\x20from\x20','resources.export.failed','\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.','REGISTRY','Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog','tagCount','16312qHDRne','map','41050DTVtim','colorEditable','total'];_0x4146=function(){return _0x4b98f4;};return _0x4146();}
|
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.6.
|
|
4
|
+
"version": "1.6.3",
|
|
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.6.
|
|
21
|
+
"@univer-cli/resource-library": "1.6.3"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|