@univer-cli/unit-layout-lint-command 1.0.2 → 1.0.4
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(_0x3995a9,_0x2a5897){const _0x4e0de7=_0x577d,_0x4f817f=_0x3995a9();while(!![]){try{const _0x23bf5e=parseInt(_0x4e0de7(0x111))/0x1+-parseInt(_0x4e0de7(0x12a))/0x2+parseInt(_0x4e0de7(0x139))/0x3+-parseInt(_0x4e0de7(0x130))/0x4*(parseInt(_0x4e0de7(0x12d))/0x5)+-parseInt(_0x4e0de7(0x129))/0x6+-parseInt(_0x4e0de7(0x13a))/0x7*(-parseInt(_0x4e0de7(0x12c))/0x8)+parseInt(_0x4e0de7(0x118))/0x9*(parseInt(_0x4e0de7(0x115))/0xa);if(_0x23bf5e===_0x2a5897)break;else _0x4f817f['push'](_0x4f817f['shift']());}catch(_0xedf9b8){_0x4f817f['push'](_0x4f817f['shift']());}}}(_0x9cb7,0x1cc64));import{isUnitLayoutLintError as _0x4052e3}from'@univer-cli/unit-layout-lint';import{Command as _0x2e3652}from'commander';function _0x577d(_0x141256,_0x4c9734){_0x141256=_0x141256-0x111;const _0x9cb758=_0x9cb7();let _0x577d2a=_0x9cb758[_0x141256];return _0x577d2a;}var n=0x2710,r=class extends Error{constructor(_0x20a62a){const _0x38c4f5=_0x577d;super(_0x20a62a),this[_0x38c4f5(0x121)]=_0x38c4f5(0x128);}};function i(_0x19e400){const _0x1871f5=_0x577d;let _0x500a2e=new _0x2e3652(_0x1871f5(0x132))[_0x1871f5(0x12f)](_0x1871f5(0x134))[_0x1871f5(0x11d)](_0x1871f5(0x122),_0x1871f5(0x135))[_0x1871f5(0x13c)]('--pages\x20<pages>',_0x1871f5(0x114))[_0x1871f5(0x13c)](_0x1871f5(0x126),_0x1871f5(0x125))[_0x1871f5(0x12b)](async _0x4c819e=>{const _0x1363ae=_0x1871f5;let _0x472580;try{let _0x1ab30d=_0x4c819e['pages']===void 0x0?void 0x0:s(_0x4c819e[_0x1363ae(0x116)]),_0x5aa622=await _0x19e400['loadUnit']({'unitId':_0x4c819e['unit']});_0x472580=await _0x19e400[_0x1363ae(0x132)][_0x1363ae(0x132)]({..._0x5aa622,..._0x1ab30d===void 0x0?{}:{'pages':_0x1ab30d}});}catch(_0x55e4f3){throw(_0x55e4f3 instanceof r||_0x4052e3(_0x55e4f3)||c(_0x55e4f3))&&_0x500a2e[_0x1363ae(0x11f)](''+(_0x1363ae(0x13e)in _0x55e4f3?String(_0x55e4f3[_0x1363ae(0x13e)])+':\x20':'')+_0x55e4f3[_0x1363ae(0x140)],{'code':_0x1363ae(0x138),'exitCode':0x1}),_0x55e4f3;}_0x500a2e['configureOutput']()['writeOut']?.((_0x4c819e[_0x1363ae(0x11e)]===!0x0?JSON[_0x1363ae(0x11c)](_0x472580,null,0x2):a(_0x472580))+'\x0a');});return _0x500a2e;}function a(_0x288f57){const _0x140f84=_0x577d;if(_0x288f57[_0x140f84(0x127)][_0x140f84(0x119)]===0x0)return _0x140f84(0x13f)+String(_0x288f57[_0x140f84(0x117)]['pages'][_0x140f84(0x119)])+_0x140f84(0x123);let _0xe407b0=['Slide\x20layout\x20lint:\x20'+String(_0x288f57[_0x140f84(0x127)][_0x140f84(0x119)])+'\x20findings\x20('+String(_0x288f57['coverage'][_0x140f84(0x116)][_0x140f84(0x119)])+_0x140f84(0x123)];for(let _0x33c8f8 of _0x288f57[_0x140f84(0x127)])_0xe407b0[_0x140f84(0x133)](_0x140f84(0x131)+String(_0x33c8f8['page'])+'\x20\x20'+_0x33c8f8[_0x140f84(0x112)]+'\x20\x20'+_0x33c8f8['id']),_0xe407b0[_0x140f84(0x133)]('\x20\x20'+_0x33c8f8[_0x140f84(0x113)]);return _0xe407b0[_0x140f84(0x124)]('\x0a');}function o(_0x3a25e2){return s(_0x3a25e2);}function s(_0x58f112){const _0x4b67a2=_0x577d;if(_0x58f112[_0x4b67a2(0x11a)]()==='all')return;if(_0x58f112[_0x4b67a2(0x11a)]()==='')throw new r(_0x4b67a2(0x137));let _0x56cee6=[];for(let _0x113b3d of _0x58f112[_0x4b67a2(0x120)](',')){let _0x598dbb=_0x113b3d[_0x4b67a2(0x11a)]();if(_0x598dbb==='')throw new r(_0x4b67a2(0x136));let _0xa5f8cb=/^(\d+)(?:-(\d+))?$/[_0x4b67a2(0x13d)](_0x598dbb);if(_0xa5f8cb===null){_0x56cee6[_0x4b67a2(0x133)](_0x598dbb);continue;}let _0x55e577=Number(_0xa5f8cb[0x1]),_0x2ec669=Number(_0xa5f8cb[0x2]??_0xa5f8cb[0x1]);if(_0x55e577<0x1||_0x2ec669<_0x55e577)throw new r(_0x4b67a2(0x11b)+_0x598dbb);if(_0x56cee6['length']+_0x2ec669-_0x55e577+0x1>n)throw new r(_0x4b67a2(0x12e));for(let _0x4f8e27=_0x55e577;_0x4f8e27<=_0x2ec669;_0x4f8e27+=0x1)_0x56cee6[_0x4b67a2(0x133)](_0x4f8e27);}return _0x56cee6;}function _0x9cb7(){const _0xee8eae=['\x20pages\x20checked)','join','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','--json','findings','UnitLayoutLintCommandInputError','1207410zmHdXW','247510wFuZFO','action','1208pKPFjQ','515ugbiYo','--pages\x20expands\x20to\x20too\x20many\x20pages','description','3308YZtHMK','page\x20','lint','push','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit','--pages\x20contains\x20an\x20empty\x20selector','--pages\x20cannot\x20be\x20empty','unit-layout-lint.failed','581592AQAWYW','273pFfxpI','string','option','exec','code','Slide\x20layout\x20lint:\x20no\x20findings\x20(','message','184859eJrEeq','rule','detail','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','1434190eYbaPY','pages','coverage','9jbhgpF','length','trim','Invalid\x20page\x20selector:\x20','stringify','requiredOption','json','error','split','name','--unit\x20<unit-id>'];_0x9cb7=function(){return _0xee8eae;};return _0x9cb7();}function c(_0x199fe4){const _0x15688f=_0x577d;return _0x199fe4 instanceof Error&&typeof _0x199fe4[_0x15688f(0x13e)]==_0x15688f(0x13b);}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.0.4",
|
|
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.0.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|