@univer-cli/unit-layout-lint-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.
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x5d98(){const _0x25539c=['\x20pages\x20checked)','\x20findings\x20(','--pages\x20cannot\x20be\x20empty','action','coverage','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit','Slide\x20layout\x20lint:\x20','code','detail','error','json','1iUSaSt','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','page\x20','configureOutput','129894DkXZkV','page','stringify','requiredOption','25eHtCem','message','trim','--pages\x20contains\x20an\x20empty\x20selector','all','split','pages','--unit\x20<unit-id>','35jlUAkb','--json','294688oNxiaa','push','findings','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','join','Slide\x20layout\x20lint:\x20no\x20findings\x20(','1278990vXxYWB','137374oQNRhu','unit-layout-lint.failed','name','--pages\x20<pages>','length','lint','467720JIzAmV','string','4316480PumdPu','exec','writeOut','375807UiRBYK','option'];_0x5d98=function(){return _0x25539c;};return _0x5d98();}(function(_0x457304,_0x1515db){const _0xe4117f=_0x1060,_0x4a4673=_0x457304();while(!![]){try{const _0x4e64cc=-parseInt(_0xe4117f(0x13c))/0x1*(-parseInt(_0xe4117f(0x155))/0x2)+-parseInt(_0xe4117f(0x160))/0x3+-parseInt(_0xe4117f(0x15b))/0x4+parseInt(_0xe4117f(0x144))/0x5*(-parseInt(_0xe4117f(0x140))/0x6)+parseInt(_0xe4117f(0x14c))/0x7*(-parseInt(_0xe4117f(0x14e))/0x8)+parseInt(_0xe4117f(0x154))/0x9+parseInt(_0xe4117f(0x15d))/0xa;if(_0x4e64cc===_0x1515db)break;else _0x4a4673['push'](_0x4a4673['shift']());}catch(_0x367ae0){_0x4a4673['push'](_0x4a4673['shift']());}}}(_0x5d98,0x1a52d));function _0x1060(_0x348831,_0x8fbc72){_0x348831=_0x348831-0x13b;const _0x5d984f=_0x5d98();let _0x10600b=_0x5d984f[_0x348831];return _0x10600b;}import{isUnitLayoutLintError as _0x163f60}from'@univer-cli/unit-layout-lint';import{Command as _0x5d9840}from'commander';var n=0x2710,r=class extends Error{constructor(_0x381a1f){const _0x279e17=_0x1060;super(_0x381a1f),this[_0x279e17(0x157)]='UnitLayoutLintCommandInputError';}};function i(_0x361f42){const _0x51df03=_0x1060;let _0x253aa4=new _0x5d9840('lint')['description'](_0x51df03(0x13d))[_0x51df03(0x143)](_0x51df03(0x14b),_0x51df03(0x167))[_0x51df03(0x161)](_0x51df03(0x158),'Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover')[_0x51df03(0x161)](_0x51df03(0x14d),_0x51df03(0x151))[_0x51df03(0x165)](async _0x30df64=>{const _0x1a5f9a=_0x51df03;let _0x35c1e0;try{let _0x1273f0=_0x30df64[_0x1a5f9a(0x14a)]===void 0x0?void 0x0:s(_0x30df64[_0x1a5f9a(0x14a)]),_0x2384e8=await _0x361f42['loadUnit']({'unitId':_0x30df64['unit']});_0x35c1e0=await _0x361f42[_0x1a5f9a(0x15a)][_0x1a5f9a(0x15a)]({..._0x2384e8,..._0x1273f0===void 0x0?{}:{'pages':_0x1273f0}});}catch(_0x33e544){throw(_0x33e544 instanceof r||_0x163f60(_0x33e544)||c(_0x33e544))&&_0x253aa4[_0x1a5f9a(0x16b)](''+(_0x1a5f9a(0x169)in _0x33e544?String(_0x33e544[_0x1a5f9a(0x169)])+':\x20':'')+_0x33e544[_0x1a5f9a(0x145)],{'code':_0x1a5f9a(0x156),'exitCode':0x1}),_0x33e544;}_0x253aa4[_0x1a5f9a(0x13f)]()[_0x1a5f9a(0x15f)]?.((_0x30df64[_0x1a5f9a(0x13b)]===!0x0?JSON[_0x1a5f9a(0x142)](_0x35c1e0,null,0x2):a(_0x35c1e0))+'\x0a');});return _0x253aa4;}function a(_0xf317f1){const _0x37612c=_0x1060;if(_0xf317f1[_0x37612c(0x150)][_0x37612c(0x159)]===0x0)return _0x37612c(0x153)+String(_0xf317f1[_0x37612c(0x166)][_0x37612c(0x14a)][_0x37612c(0x159)])+'\x20pages\x20checked)';let _0x1cce60=[_0x37612c(0x168)+String(_0xf317f1[_0x37612c(0x150)]['length'])+_0x37612c(0x163)+String(_0xf317f1['coverage']['pages'][_0x37612c(0x159)])+_0x37612c(0x162)];for(let _0x4b1c9e of _0xf317f1[_0x37612c(0x150)])_0x1cce60['push'](_0x37612c(0x13e)+String(_0x4b1c9e[_0x37612c(0x141)])+'\x20\x20'+_0x4b1c9e['rule']+'\x20\x20'+_0x4b1c9e['id']),_0x1cce60[_0x37612c(0x14f)]('\x20\x20'+_0x4b1c9e[_0x37612c(0x16a)]);return _0x1cce60[_0x37612c(0x152)]('\x0a');}function o(_0x1be6d5){return s(_0x1be6d5);}function s(_0x570d81){const _0x1a0bc8=_0x1060;if(_0x570d81['trim']()===_0x1a0bc8(0x148))return;if(_0x570d81[_0x1a0bc8(0x146)]()==='')throw new r(_0x1a0bc8(0x164));let _0x2cfd7d=[];for(let _0x48118a of _0x570d81[_0x1a0bc8(0x149)](',')){let _0x519f2d=_0x48118a['trim']();if(_0x519f2d==='')throw new r(_0x1a0bc8(0x147));let _0x3c72ff=/^(\d+)(?:-(\d+))?$/[_0x1a0bc8(0x15e)](_0x519f2d);if(_0x3c72ff===null){_0x2cfd7d[_0x1a0bc8(0x14f)](_0x519f2d);continue;}let _0x10384f=Number(_0x3c72ff[0x1]),_0x1740be=Number(_0x3c72ff[0x2]??_0x3c72ff[0x1]);if(_0x10384f<0x1||_0x1740be<_0x10384f)throw new r('Invalid\x20page\x20selector:\x20'+_0x519f2d);if(_0x2cfd7d[_0x1a0bc8(0x159)]+_0x1740be-_0x10384f+0x1>n)throw new r('--pages\x20expands\x20to\x20too\x20many\x20pages');for(let _0x3e92ae=_0x10384f;_0x3e92ae<=_0x1740be;_0x3e92ae+=0x1)_0x2cfd7d[_0x1a0bc8(0x14f)](_0x3e92ae);}return _0x2cfd7d;}function c(_0x1f9b45){const _0x2955a5=_0x1060;return _0x1f9b45 instanceof Error&&typeof _0x1f9b45[_0x2955a5(0x169)]==_0x2955a5(0x15c);}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.
|
|
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/unit-layout-lint": "1.
|
|
21
|
+
"@univer-cli/unit-layout-lint": "1.4.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|