@univer-cli/resource-library-command 1.6.2 → 1.7.0-alpha.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(_0x2eaf0e,_0x4d458b){const _0x185649=_0x5c0b,_0x1ee426=_0x2eaf0e();while(!![]){try{const _0x54626b=parseInt(_0x185649(0x103))/0x1*(-parseInt(_0x185649(0xd1))/0x2)+-parseInt(_0x185649(0xeb))/0x3+parseInt(_0x185649(0xde))/0x4*(parseInt(_0x185649(0x102))/0x5)+-parseInt(_0x185649(0xfd))/0x6*(-parseInt(_0x185649(0xf1))/0x7)+-parseInt(_0x185649(0xc0))/0x8+-parseInt(_0x185649(0xee))/0x9*(parseInt(_0x185649(0xca))/0xa)+parseInt(_0x185649(0xd3))/0xb;if(_0x54626b===_0x4d458b)break;else _0x1ee426['push'](_0x1ee426['shift']());}catch(_0x41555f){_0x1ee426['push'](_0x1ee426['shift']());}}}(_0x5d83,0x8673c));import{isResourceLibraryError as _0x44d507}from'@univer-cli/resource-library';import{Command as _0x480a42,InvalidArgumentError as _0xb7edce,Option as _0x1b0889}from'commander';var i=0x1e;function _0x5d83(){const _0x1ec222=['argParser','default','svg','writeErr','REGISTRY','14940bHprCa','Inspect\x20or\x20clear\x20the\x20resource\x20cache','padEnd','colorEditable','maximum\x20number\x20of\x20results','202985mHzenh','1gRUZyU','Cleared\x20','total','handle','resources','resourceCount','label','<queries...>','padStart','NAME','addOption','description','message','openLibrary','No\x20resources\x20matched;\x20try\x20a\x20shorter\x20substring,\x20a\x20synonym,\x20or\x20another\x20registry.',')\x20from\x20','width','Exporting\x20more\x20than\x20one\x20resource\x20requires\x20--out\x20<directory>.','cache','--out\x20<directory>','TAGS','\x20\x20SIZE','limit','argument','outputHelp','Read\x20one\x20SVG\x20or\x20export\x20resources\x20to\x20a\x20directory','621784TMGjwN','configureOutput','failed','intrinsicSize','write\x20flat\x20<registry>--<resource>.svg\x20files','json','--limit\x20<number>','toFixed','\x20resource','fixed','944410muhsmU','command','\x20resources\x20(','export','name','read','\x20could\x20not\x20be\x20exported.','1998650lBjEYy','option','11796433IXfzwj','\x20MB','find','EDITABLE','exported','HANDLE','group','--registry\x20<id>','out','registries','join','56xhJsWM','resources.export.failed','write\x20structured\x20JSON','action','listRegistries','stringify','writeOut','path','canonical\x20<registryId>/<resourceId>\x20handles','isInteger','error','push','length','1244883oImbpY','RESOURCES','colorEditableCount','54gbpDpd','<handles...>','Show\x20the\x20resource\x20cache\x20path','2723adtHGf','--json','byteCount','map','\x20more;\x20raise\x20--limit\x20or\x20narrow\x20the\x20query.','COLOR','clearCache'];_0x5d83=function(){return _0x1ec222;};return _0x5d83();}function a(_0x4b863e){const _0x733d2a=_0x5c0b;let _0x11d81f=new _0x480a42(_0x733d2a(0x107))[_0x733d2a(0x10e)]('Find\x20and\x20export\x20SVG\x20resources\x20from\x20a\x20multi-registry\x20catalog')[_0x733d2a(0xe1)](()=>_0x11d81f[_0x733d2a(0xbe)]());_0x11d81f['command'](_0x733d2a(0xdc))['description']('List\x20available\x20resource\x20registries')[_0x733d2a(0xd2)](_0x733d2a(0xf2),_0x733d2a(0xe0))['action'](async _0x54b3ce=>{const _0x3f73f6=_0x733d2a;let _0x582b87=await c(_0x11d81f,async()=>_0x4b863e[_0x3f73f6(0x110)]()[_0x3f73f6(0xe2)]());l(_0x11d81f,_0x54b3ce,{'registries':_0x582b87},d(_0x582b87));}),_0x11d81f[_0x733d2a(0xcb)]('find')[_0x733d2a(0x10e)]('Find\x20resources\x20by\x20name,\x20description,\x20group,\x20tag,\x20or\x20keyword')[_0x733d2a(0xbd)](_0x733d2a(0x10a),'one\x20or\x20more\x20queries,\x20searched\x20independently')[_0x733d2a(0x10d)](new _0x1b0889(_0x733d2a(0xda),'restrict\x20results\x20to\x20a\x20registry;\x20repeatable')[_0x733d2a(0xf8)](o)[_0x733d2a(0xf9)]([]))['addOption'](new _0x1b0889(_0x733d2a(0xc6),_0x733d2a(0x101))[_0x733d2a(0xf8)](s)[_0x733d2a(0xf9)](i))[_0x733d2a(0xd2)](_0x733d2a(0xf2),_0x733d2a(0xe0))[_0x733d2a(0xe1)](async(_0x53fc29,_0x5268a9)=>{const _0x406187=_0x733d2a;let _0x2990a6=await c(_0x11d81f,async()=>_0x4b863e[_0x406187(0x110)]()[_0x406187(0xd5)]({'queries':_0x53fc29,'registries':_0x5268a9['registry'],'limit':_0x5268a9['limit']}));l(_0x11d81f,_0x5268a9,{'query':{'queries':_0x53fc29,'registries':_0x5268a9['registry']},'resources':_0x2990a6[_0x406187(0x107)],'total':_0x2990a6[_0x406187(0x105)],'limit':_0x5268a9[_0x406187(0xbc)]},f(_0x2990a6[_0x406187(0x107)],_0x2990a6[_0x406187(0x105)]));}),_0x11d81f[_0x733d2a(0xcb)](_0x733d2a(0xcd))['description'](_0x733d2a(0xbf))[_0x733d2a(0xbd)](_0x733d2a(0xef),_0x733d2a(0xe6))[_0x733d2a(0xd2)](_0x733d2a(0x116),_0x733d2a(0xc4))['option']('--json',_0x733d2a(0xe0))[_0x733d2a(0xe1)](async(_0x380e48,_0xf74808)=>{const _0x229885=_0x733d2a;if(_0xf74808[_0x229885(0xdb)]===void 0x0){_0x380e48['length']!==0x1&&_0x11d81f[_0x229885(0xe8)](_0x229885(0x114),{'code':'resources.invalid-input','exitCode':0x1});let _0x379de2=await c(_0x11d81f,async()=>_0x4b863e[_0x229885(0x110)]()[_0x229885(0xcf)]({'handle':_0x380e48[0x0]}));_0xf74808['json']===!0x0?u(_0x11d81f,_0x379de2):_0x11d81f[_0x229885(0xc1)]()[_0x229885(0xe4)]?.(_0x379de2[_0x229885(0xfa)]);return;}let _0x9cfe4e=await c(_0x11d81f,async()=>_0x4b863e['openLibrary']()[_0x229885(0xcd)]({'handles':_0x380e48,'destination':_0xf74808[_0x229885(0xdb)]}));if(_0xf74808[_0x229885(0xc5)]===!0x0)u(_0x11d81f,_0x9cfe4e);else{let _0xee7282=_0x11d81f['configureOutput']();for(let _0x2711e6 of _0x9cfe4e[_0x229885(0xd7)])_0xee7282[_0x229885(0xe4)]?.(_0x2711e6[_0x229885(0xe5)]+'\x0a');for(let _0x5efa6f of _0x9cfe4e[_0x229885(0xc2)])_0xee7282[_0x229885(0xfb)]?.(_0x5efa6f[_0x229885(0x106)]+':\x20'+_0x5efa6f['code']+':\x20'+_0x5efa6f[_0x229885(0x10f)]+'\x0a');}_0x9cfe4e[_0x229885(0xc2)]['length']>0x0&&_0x11d81f[_0x229885(0xe8)](_0x9cfe4e[_0x229885(0xc2)][_0x229885(0xea)]+_0x229885(0xc8)+(_0x9cfe4e[_0x229885(0xc2)][_0x229885(0xea)]===0x1?'':'s')+_0x229885(0xd0),{'code':_0x229885(0xdf),'exitCode':0x1});});let _0x59ea02=_0x11d81f[_0x733d2a(0xcb)](_0x733d2a(0x115))[_0x733d2a(0x10e)](_0x733d2a(0xfe));return _0x59ea02['action'](()=>_0x59ea02[_0x733d2a(0xbe)]()),_0x59ea02[_0x733d2a(0xcb)](_0x733d2a(0xe5))['description'](_0x733d2a(0xf0))[_0x733d2a(0xd2)](_0x733d2a(0xf2),_0x733d2a(0xe0))[_0x733d2a(0xe1)](_0x2631b4=>{const _0x5c5b36=_0x733d2a;let _0x54b21a=_0x4b863e[_0x5c5b36(0x110)]()['cacheLocation'];l(_0x11d81f,_0x2631b4,{'path':_0x54b21a},_0x54b21a);}),_0x59ea02[_0x733d2a(0xcb)]('clear')[_0x733d2a(0x10e)]('Clear\x20all\x20cached\x20resources')[_0x733d2a(0xd2)](_0x733d2a(0xf2),_0x733d2a(0xe0))[_0x733d2a(0xe1)](async _0x1b1d49=>{const _0x333db1=_0x733d2a;let _0x1bd214=await c(_0x11d81f,async()=>_0x4b863e['openLibrary']()[_0x333db1(0xf7)]());l(_0x11d81f,_0x1b1d49,{'cleared':_0x1bd214},_0x333db1(0x104)+_0x1bd214['resourceCount']+_0x333db1(0xcc)+p(_0x1bd214[_0x333db1(0xf3)])+_0x333db1(0x112)+_0x1bd214['path']+'.');}),_0x11d81f;}function o(_0x11af1b,_0x3401a2){return[..._0x3401a2,_0x11af1b];}function s(_0x107353){const _0x4c3385=_0x5c0b;let _0x1f5ca9=Number(_0x107353);if(!Number[_0x4c3385(0xe7)](_0x1f5ca9)||_0x1f5ca9<0x1)throw new _0xb7edce('Expected\x20a\x20positive\x20integer;\x20received\x20\x22'+_0x107353+'\x22.');return _0x1f5ca9;}async function c(_0x89d410,_0x583a8c){const _0x38b08d=_0x5c0b;try{return await _0x583a8c();}catch(_0x2a54bc){throw _0x44d507(_0x2a54bc)&&_0x89d410[_0x38b08d(0xe8)](_0x2a54bc['code']+':\x20'+_0x2a54bc[_0x38b08d(0x10f)],{'code':'resources.failed','exitCode':0x1}),_0x2a54bc;}}function l(_0x589c7d,_0x1ab553,_0x494021,_0x38ca54){const _0x40bd9d=_0x5c0b;_0x1ab553['json']===!0x0?u(_0x589c7d,_0x494021):_0x589c7d[_0x40bd9d(0xc1)]()[_0x40bd9d(0xe4)]?.(_0x38ca54+'\x0a');}function u(_0x503e30,_0x39155a){const _0x29d068=_0x5c0b;_0x503e30[_0x29d068(0xc1)]()[_0x29d068(0xe4)]?.(JSON[_0x29d068(0xe3)](_0x39155a,null,0x2)+'\x0a');}function d(_0xb4c0fc){const _0xffdc81=_0x5c0b;return[_0xffdc81(0xfc)['padEnd'](0x22)+'\x20\x20'+_0xffdc81(0xec)[_0xffdc81(0x10b)](0x9)+'\x20\x20'+'GROUPS'[_0xffdc81(0x10b)](0x7)+'\x20\x20'+_0xffdc81(0x117)[_0xffdc81(0x10b)](0x6)+'\x20\x20'+_0xffdc81(0xd6)['padStart'](0xa),..._0xb4c0fc['map'](_0x1ab549=>[_0x1ab549['id']['padEnd'](0x22),String(_0x1ab549['resourceCount'])[_0xffdc81(0x10b)](0x9),String(_0x1ab549['groupCount'])[_0xffdc81(0x10b)](0x7),String(_0x1ab549['tagCount'])[_0xffdc81(0x10b)](0x6),(_0x1ab549[_0xffdc81(0xed)]+'/'+_0x1ab549[_0xffdc81(0x108)])[_0xffdc81(0x10b)](0xa)][_0xffdc81(0xdd)]('\x20\x20'))][_0xffdc81(0xdd)]('\x0a');}function f(_0x335d9e,_0x43c553){const _0x4ab2df=_0x5c0b;if(_0x335d9e[_0x4ab2df(0xea)]===0x0)return _0x4ab2df(0x111);let _0x4d454a=[_0x4ab2df(0xd8)[_0x4ab2df(0xff)](0x32)+'\x20\x20'+_0x4ab2df(0x10c)[_0x4ab2df(0xff)](0x1c)+'\x20\x20'+'GROUP'[_0x4ab2df(0xff)](0x12)+'\x20\x20'+_0x4ab2df(0xf6)[_0x4ab2df(0xff)](0x8)+_0x4ab2df(0x118),..._0x335d9e[_0x4ab2df(0xf4)](_0x448d9f=>{const _0x5c9471=_0x4ab2df;let _0x14369d=_0x448d9f[_0x5c9471(0xd9)]?.[_0x5c9471(0x109)]??'-',_0x392d32=_0x448d9f[_0x5c9471(0x100)]?'editable':_0x5c9471(0xc9),_0x319ceb=_0x448d9f[_0x5c9471(0xc3)][_0x5c9471(0x113)]+'×'+_0x448d9f[_0x5c9471(0xc3)]['height'];return _0x448d9f['handle']['padEnd'](0x32)+'\x20\x20'+_0x448d9f[_0x5c9471(0xce)][_0x5c9471(0xff)](0x1c)+'\x20\x20'+_0x14369d[_0x5c9471(0xff)](0x12)+'\x20\x20'+_0x392d32[_0x5c9471(0xff)](0x8)+'\x20\x20'+_0x319ceb;})];return _0x43c553>_0x335d9e['length']&&_0x4d454a[_0x4ab2df(0xe9)]('…\x20'+(_0x43c553-_0x335d9e[_0x4ab2df(0xea)])+_0x4ab2df(0xf5)),_0x4d454a['join']('\x0a');}function p(_0x42e2ed){const _0x38737c=_0x5c0b;return _0x42e2ed<0x400?_0x42e2ed+'\x20B':_0x42e2ed<0x100000?(_0x42e2ed/0x400)[_0x38737c(0xc7)](0x1)+'\x20KB':(_0x42e2ed/0x100000)[_0x38737c(0xc7)](0x1)+_0x38737c(0xd4);}function _0x5c0b(_0x5c9fe0,_0x3eab80){_0x5c9fe0=_0x5c9fe0-0xbc;const _0x5d836c=_0x5d83();let _0x5c0ba5=_0x5d836c[_0x5c9fe0];return _0x5c0ba5;}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.
|
|
4
|
+
"version": "1.7.0-alpha.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.
|
|
21
|
+
"@univer-cli/resource-library": "1.7.0-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|