@univer-cli/unit-layout-lint-command 1.1.0 → 1.2.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(_0xa93c3c,_0x18301b){const _0x1825da=_0x2709,_0x244eac=_0xa93c3c();while(!![]){try{const _0x5978a6=-parseInt(_0x1825da(0x13a))/0x1*(parseInt(_0x1825da(0x157))/0x2)+parseInt(_0x1825da(0x133))/0x3+-parseInt(_0x1825da(0x144))/0x4+parseInt(_0x1825da(0x147))/0x5+parseInt(_0x1825da(0x13e))/0x6+-parseInt(_0x1825da(0x142))/0x7+-parseInt(_0x1825da(0x153))/0x8*(-parseInt(_0x1825da(0x134))/0x9);if(_0x5978a6===_0x18301b)break;else _0x244eac['push'](_0x244eac['shift']());}catch(_0xf8ec2a){_0x244eac['push'](_0x244eac['shift']());}}}(_0x1cf4,0x356fd));function _0x2709(_0x1f520b,_0x158620){_0x1f520b=_0x1f520b-0x12c;const _0x1cf415=_0x1cf4();let _0x270949=_0x1cf415[_0x1f520b];return _0x270949;}import{isUnitLayoutLintError as _0x1099fb}from'@univer-cli/unit-layout-lint';import{Command as _0x27d3a1}from'commander';function _0x1cf4(){const _0x5888df=['push','json','UnitLayoutLintCommandInputError','string','--json','findings','\x20pages\x20checked)','description','detail','trim','writeOut','8lBuMzu','\x20findings\x20(','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','pages','10QtofWD','rule','unit','--unit\x20<unit-id>','split','page','join','--pages\x20expands\x20to\x20too\x20many\x20pages','name','unit-layout-lint.failed','configureOutput','page\x20','1125858hWkFJd','1204209TZkYXf','option','exec','all','--pages\x20contains\x20an\x20empty\x20selector','loadUnit','77527zenEwu','coverage','length','requiredOption','2559402SUHApR','stringify','code','Invalid\x20page\x20selector:\x20','532609sXJHbe','error','1467792rrAvXF','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','Slide\x20layout\x20lint:\x20','569465LvCteH'];_0x1cf4=function(){return _0x5888df;};return _0x1cf4();}var n=0x2710,r=class extends Error{constructor(_0x3448b9){const _0x1579f8=_0x2709;super(_0x3448b9),this[_0x1579f8(0x12f)]=_0x1579f8(0x14a);}};function i(_0x3399ae){const _0x3c065=_0x2709;let _0x40994a=new _0x27d3a1('lint')[_0x3c065(0x14f)](_0x3c065(0x155))[_0x3c065(0x13d)](_0x3c065(0x15a),'Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit')['option']('--pages\x20<pages>','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover')[_0x3c065(0x135)](_0x3c065(0x14c),_0x3c065(0x145))['action'](async _0x58875a=>{const _0x1a4a99=_0x3c065;let _0x5a8c0f;try{let _0x1421af=_0x58875a[_0x1a4a99(0x156)]===void 0x0?void 0x0:s(_0x58875a[_0x1a4a99(0x156)]),_0x5d1383=await _0x3399ae[_0x1a4a99(0x139)]({'unitId':_0x58875a[_0x1a4a99(0x159)]});_0x5a8c0f=await _0x3399ae['lint']['lint']({..._0x5d1383,..._0x1421af===void 0x0?{}:{'pages':_0x1421af}});}catch(_0x2244c2){throw(_0x2244c2 instanceof r||_0x1099fb(_0x2244c2)||c(_0x2244c2))&&_0x40994a[_0x1a4a99(0x143)](''+('code'in _0x2244c2?String(_0x2244c2[_0x1a4a99(0x140)])+':\x20':'')+_0x2244c2['message'],{'code':_0x1a4a99(0x130),'exitCode':0x1}),_0x2244c2;}_0x40994a[_0x1a4a99(0x131)]()[_0x1a4a99(0x152)]?.((_0x58875a[_0x1a4a99(0x149)]===!0x0?JSON[_0x1a4a99(0x13f)](_0x5a8c0f,null,0x2):a(_0x5a8c0f))+'\x0a');});return _0x40994a;}function a(_0x5b1235){const _0x33dd63=_0x2709;if(_0x5b1235[_0x33dd63(0x14d)][_0x33dd63(0x13c)]===0x0)return'Slide\x20layout\x20lint:\x20no\x20findings\x20('+String(_0x5b1235[_0x33dd63(0x13b)][_0x33dd63(0x156)][_0x33dd63(0x13c)])+_0x33dd63(0x14e);let _0x3f5c42=[_0x33dd63(0x146)+String(_0x5b1235[_0x33dd63(0x14d)][_0x33dd63(0x13c)])+_0x33dd63(0x154)+String(_0x5b1235[_0x33dd63(0x13b)][_0x33dd63(0x156)][_0x33dd63(0x13c)])+_0x33dd63(0x14e)];for(let _0x8c224b of _0x5b1235[_0x33dd63(0x14d)])_0x3f5c42[_0x33dd63(0x148)](_0x33dd63(0x132)+String(_0x8c224b[_0x33dd63(0x12c)])+'\x20\x20'+_0x8c224b[_0x33dd63(0x158)]+'\x20\x20'+_0x8c224b['id']),_0x3f5c42['push']('\x20\x20'+_0x8c224b[_0x33dd63(0x150)]);return _0x3f5c42[_0x33dd63(0x12d)]('\x0a');}function o(_0x391e1b){return s(_0x391e1b);}function s(_0x81a0f8){const _0x7db8dc=_0x2709;if(_0x81a0f8['trim']()===_0x7db8dc(0x137))return;if(_0x81a0f8[_0x7db8dc(0x151)]()==='')throw new r('--pages\x20cannot\x20be\x20empty');let _0x2a7ac6=[];for(let _0x3a5cdd of _0x81a0f8[_0x7db8dc(0x15b)](',')){let _0x3b64bb=_0x3a5cdd[_0x7db8dc(0x151)]();if(_0x3b64bb==='')throw new r(_0x7db8dc(0x138));let _0x19b605=/^(\d+)(?:-(\d+))?$/[_0x7db8dc(0x136)](_0x3b64bb);if(_0x19b605===null){_0x2a7ac6['push'](_0x3b64bb);continue;}let _0x24e825=Number(_0x19b605[0x1]),_0x2e014e=Number(_0x19b605[0x2]??_0x19b605[0x1]);if(_0x24e825<0x1||_0x2e014e<_0x24e825)throw new r(_0x7db8dc(0x141)+_0x3b64bb);if(_0x2a7ac6[_0x7db8dc(0x13c)]+_0x2e014e-_0x24e825+0x1>n)throw new r(_0x7db8dc(0x12e));for(let _0x4601e7=_0x24e825;_0x4601e7<=_0x2e014e;_0x4601e7+=0x1)_0x2a7ac6['push'](_0x4601e7);}return _0x2a7ac6;}function c(_0x43f806){const _0x33b8d5=_0x2709;return _0x43f806 instanceof Error&&typeof _0x43f806[_0x33b8d5(0x140)]==_0x33b8d5(0x14b);}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.2.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.2.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|