@univer-cli/unit-layout-lint-command 1.0.4 → 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 _0x5796(){const _0x5cdc0a=['--pages\x20cannot\x20be\x20empty','--pages\x20<pages>','\x20pages\x20checked)','page','--pages\x20contains\x20an\x20empty\x20selector','lint','coverage','pages','59806953jAsOFB','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','trim','length','Invalid\x20page\x20selector:\x20','--pages\x20expands\x20to\x20too\x20many\x20pages','--unit\x20<unit-id>','name','push','986263sSzOjG','9941412dokosz','loadUnit','page\x20','option','findings','string','requiredOption','7413968UIhleu','split','code','rule','50862kgHRrp','4519081mujPKr','exec','85745gFZfOh','writeOut','6eKzVWR','unit-layout-lint.failed','Slide\x20layout\x20lint:\x20','message','--json','348IDJEdR','UnitLayoutLintCommandInputError','join','description'];_0x5796=function(){return _0x5cdc0a;};return _0x5796();}function _0x1760(_0x3e6ec9,_0x5bccda){_0x3e6ec9=_0x3e6ec9-0x10b;const _0x579651=_0x5796();let _0x176033=_0x579651[_0x3e6ec9];return _0x176033;}(function(_0x21a826,_0x21d6ca){const _0x15de42=_0x1760,_0x14fe44=_0x21a826();while(!![]){try{const _0x334b89=-parseInt(_0x15de42(0x11c))/0x1+parseInt(_0x15de42(0x128))/0x2*(-parseInt(_0x15de42(0x12d))/0x3)+-parseInt(_0x15de42(0x132))/0x4*(parseInt(_0x15de42(0x12b))/0x5)+-parseInt(_0x15de42(0x11d))/0x6+-parseInt(_0x15de42(0x129))/0x7+-parseInt(_0x15de42(0x124))/0x8+parseInt(_0x15de42(0x113))/0x9;if(_0x334b89===_0x21d6ca)break;else _0x14fe44['push'](_0x14fe44['shift']());}catch(_0x599d8f){_0x14fe44['push'](_0x14fe44['shift']());}}}(_0x5796,0xd8872));import{isUnitLayoutLintError as _0x34bdf6}from'@univer-cli/unit-layout-lint';import{Command as _0x5f5c6e}from'commander';var n=0x2710,r=class extends Error{constructor(_0x28d0e9){const _0x53e4ce=_0x1760;super(_0x28d0e9),this[_0x53e4ce(0x11a)]=_0x53e4ce(0x133);}};function i(_0x1a3ed3){const _0x429bf9=_0x1760;let _0x1ae672=new _0x5f5c6e(_0x429bf9(0x110))[_0x429bf9(0x135)]('Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)')[_0x429bf9(0x123)](_0x429bf9(0x119),'Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit')[_0x429bf9(0x120)](_0x429bf9(0x10c),_0x429bf9(0x114))['option'](_0x429bf9(0x131),'write\x20the\x20complete\x20lint\x20report\x20as\x20JSON')['action'](async _0x548a9f=>{const _0x1d14c7=_0x429bf9;let _0x5f2b85;try{let _0x53de5b=_0x548a9f[_0x1d14c7(0x112)]===void 0x0?void 0x0:s(_0x548a9f['pages']),_0x43892c=await _0x1a3ed3[_0x1d14c7(0x11e)]({'unitId':_0x548a9f['unit']});_0x5f2b85=await _0x1a3ed3[_0x1d14c7(0x110)][_0x1d14c7(0x110)]({..._0x43892c,..._0x53de5b===void 0x0?{}:{'pages':_0x53de5b}});}catch(_0x555ca6){throw(_0x555ca6 instanceof r||_0x34bdf6(_0x555ca6)||c(_0x555ca6))&&_0x1ae672['error'](''+(_0x1d14c7(0x126)in _0x555ca6?String(_0x555ca6['code'])+':\x20':'')+_0x555ca6[_0x1d14c7(0x130)],{'code':_0x1d14c7(0x12e),'exitCode':0x1}),_0x555ca6;}_0x1ae672['configureOutput']()[_0x1d14c7(0x12c)]?.((_0x548a9f['json']===!0x0?JSON['stringify'](_0x5f2b85,null,0x2):a(_0x5f2b85))+'\x0a');});return _0x1ae672;}function a(_0x4b9497){const _0xb134d4=_0x1760;if(_0x4b9497[_0xb134d4(0x121)][_0xb134d4(0x116)]===0x0)return'Slide\x20layout\x20lint:\x20no\x20findings\x20('+String(_0x4b9497['coverage'][_0xb134d4(0x112)][_0xb134d4(0x116)])+_0xb134d4(0x10d);let _0x231b10=[_0xb134d4(0x12f)+String(_0x4b9497[_0xb134d4(0x121)][_0xb134d4(0x116)])+'\x20findings\x20('+String(_0x4b9497[_0xb134d4(0x111)][_0xb134d4(0x112)][_0xb134d4(0x116)])+'\x20pages\x20checked)'];for(let _0x17f8c0 of _0x4b9497['findings'])_0x231b10[_0xb134d4(0x11b)](_0xb134d4(0x11f)+String(_0x17f8c0[_0xb134d4(0x10e)])+'\x20\x20'+_0x17f8c0[_0xb134d4(0x127)]+'\x20\x20'+_0x17f8c0['id']),_0x231b10[_0xb134d4(0x11b)]('\x20\x20'+_0x17f8c0['detail']);return _0x231b10[_0xb134d4(0x134)]('\x0a');}function o(_0x3a0bfc){return s(_0x3a0bfc);}function s(_0x4f8995){const _0x294a76=_0x1760;if(_0x4f8995[_0x294a76(0x115)]()==='all')return;if(_0x4f8995['trim']()==='')throw new r(_0x294a76(0x10b));let _0x2b5c3d=[];for(let _0x1a9906 of _0x4f8995[_0x294a76(0x125)](',')){let _0x57edf2=_0x1a9906[_0x294a76(0x115)]();if(_0x57edf2==='')throw new r(_0x294a76(0x10f));let _0x15b740=/^(\d+)(?:-(\d+))?$/[_0x294a76(0x12a)](_0x57edf2);if(_0x15b740===null){_0x2b5c3d[_0x294a76(0x11b)](_0x57edf2);continue;}let _0x6a4f8d=Number(_0x15b740[0x1]),_0x2087c6=Number(_0x15b740[0x2]??_0x15b740[0x1]);if(_0x6a4f8d<0x1||_0x2087c6<_0x6a4f8d)throw new r(_0x294a76(0x117)+_0x57edf2);if(_0x2b5c3d[_0x294a76(0x116)]+_0x2087c6-_0x6a4f8d+0x1>n)throw new r(_0x294a76(0x118));for(let _0x13cb45=_0x6a4f8d;_0x13cb45<=_0x2087c6;_0x13cb45+=0x1)_0x2b5c3d[_0x294a76(0x11b)](_0x13cb45);}return _0x2b5c3d;}function c(_0x300dbc){const _0x478bb6=_0x1760;return _0x300dbc instanceof Error&&typeof _0x300dbc[_0x478bb6(0x126)]==_0x478bb6(0x122);}export{r as UnitLayoutLintCommandInputError,i as createUnitLayoutLintCommand,o as parseUnitLayoutLintPages,a as renderUnitLayoutLint};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univer-cli/unit-layout-lint-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/unit-layout-lint": "1.0
|
|
21
|
+
"@univer-cli/unit-layout-lint": "1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|