@univer-cli/unit-layout-lint-command 1.0.1 → 1.0.2
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(_0x59b7b7,_0x36cbbe){const _0x32e66b=_0x5b26,_0x547f65=_0x59b7b7();while(!![]){try{const _0x2598fe=-parseInt(_0x32e66b(0x1b8))/0x1+-parseInt(_0x32e66b(0x1bb))/0x2+-parseInt(_0x32e66b(0x1dd))/0x3+parseInt(_0x32e66b(0x1ca))/0x4*(-parseInt(_0x32e66b(0x1e3))/0x5)+-parseInt(_0x32e66b(0x1d3))/0x6*(parseInt(_0x32e66b(0x1c6))/0x7)+parseInt(_0x32e66b(0x1e0))/0x8+parseInt(_0x32e66b(0x1d5))/0x9;if(_0x2598fe===_0x36cbbe)break;else _0x547f65['push'](_0x547f65['shift']());}catch(_0x2d9d9c){_0x547f65['push'](_0x547f65['shift']());}}}(_0x25cf,0x2bdd9));function _0x5b26(_0x55da90,_0x5a9e6b){_0x55da90=_0x55da90-0x1b5;const _0x25cf51=_0x25cf();let _0x5b268d=_0x25cf51[_0x55da90];return _0x5b268d;}import{isUnitLayoutLintError as _0x495296}from'@univer-cli/unit-layout-lint';function _0x25cf(){const _0x31be47=['Slide\x20layout\x20lint:\x20no\x20findings\x20(','\x20findings\x20(','--pages\x20cannot\x20be\x20empty','page\x20','configureOutput','21Tnwnmq','exec','requiredOption','name','176hWBMBE','--pages\x20<pages>','option','--json','--pages\x20contains\x20an\x20empty\x20selector','detail','description','Slide\x20layout\x20lint:\x20','--pages\x20expands\x20to\x20too\x20many\x20pages','706170JPrIMy','writeOut','6133167KZwQKN','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','stringify','\x20pages\x20checked)','pages','lint','findings','352791fghsuy','length','--unit\x20<unit-id>','2138128kiNtiB','UnitLayoutLintCommandInputError','trim','235IyfIdW','message','unit-layout-lint.failed','json','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit','245647GOsJXh','join','loadUnit','101318OaQmYY','split','rule','coverage','code','push'];_0x25cf=function(){return _0x31be47;};return _0x25cf();}import{Command as _0x1cbb95}from'commander';var n=0x2710,r=class extends Error{constructor(_0x302fed){const _0x1fcc21=_0x5b26;super(_0x302fed),this[_0x1fcc21(0x1c9)]=_0x1fcc21(0x1e1);}};function i(_0x331f47){const _0x587db2=_0x5b26;let _0x4d4a56=new _0x1cbb95(_0x587db2(0x1db))[_0x587db2(0x1d0)]('Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)')[_0x587db2(0x1c8)](_0x587db2(0x1df),_0x587db2(0x1b7))['option'](_0x587db2(0x1cb),_0x587db2(0x1d6))[_0x587db2(0x1cc)](_0x587db2(0x1cd),_0x587db2(0x1d7))['action'](async _0x46dc63=>{const _0x1a5ba8=_0x587db2;let _0x3498df;try{let _0x28342e=_0x46dc63[_0x1a5ba8(0x1da)]===void 0x0?void 0x0:s(_0x46dc63[_0x1a5ba8(0x1da)]),_0x16e45d=await _0x331f47[_0x1a5ba8(0x1ba)]({'unitId':_0x46dc63['unit']});_0x3498df=await _0x331f47[_0x1a5ba8(0x1db)]['lint']({..._0x16e45d,..._0x28342e===void 0x0?{}:{'pages':_0x28342e}});}catch(_0x3f2eaa){throw(_0x3f2eaa instanceof r||_0x495296(_0x3f2eaa)||c(_0x3f2eaa))&&_0x4d4a56['error'](''+(_0x1a5ba8(0x1bf)in _0x3f2eaa?String(_0x3f2eaa[_0x1a5ba8(0x1bf)])+':\x20':'')+_0x3f2eaa[_0x1a5ba8(0x1e4)],{'code':_0x1a5ba8(0x1b5),'exitCode':0x1}),_0x3f2eaa;}_0x4d4a56[_0x1a5ba8(0x1c5)]()[_0x1a5ba8(0x1d4)]?.((_0x46dc63[_0x1a5ba8(0x1b6)]===!0x0?JSON[_0x1a5ba8(0x1d8)](_0x3498df,null,0x2):a(_0x3498df))+'\x0a');});return _0x4d4a56;}function a(_0x179460){const _0xcd7648=_0x5b26;if(_0x179460[_0xcd7648(0x1dc)][_0xcd7648(0x1de)]===0x0)return _0xcd7648(0x1c1)+String(_0x179460[_0xcd7648(0x1be)][_0xcd7648(0x1da)]['length'])+'\x20pages\x20checked)';let _0x59cd2c=[_0xcd7648(0x1d1)+String(_0x179460[_0xcd7648(0x1dc)]['length'])+_0xcd7648(0x1c2)+String(_0x179460[_0xcd7648(0x1be)][_0xcd7648(0x1da)][_0xcd7648(0x1de)])+_0xcd7648(0x1d9)];for(let _0x3c2164 of _0x179460[_0xcd7648(0x1dc)])_0x59cd2c[_0xcd7648(0x1c0)](_0xcd7648(0x1c4)+String(_0x3c2164['page'])+'\x20\x20'+_0x3c2164[_0xcd7648(0x1bd)]+'\x20\x20'+_0x3c2164['id']),_0x59cd2c[_0xcd7648(0x1c0)]('\x20\x20'+_0x3c2164[_0xcd7648(0x1cf)]);return _0x59cd2c[_0xcd7648(0x1b9)]('\x0a');}function o(_0x2dd666){return s(_0x2dd666);}function s(_0x118643){const _0x28f41c=_0x5b26;if(_0x118643[_0x28f41c(0x1e2)]()==='all')return;if(_0x118643[_0x28f41c(0x1e2)]()==='')throw new r(_0x28f41c(0x1c3));let _0x36ed16=[];for(let _0x5e4d58 of _0x118643[_0x28f41c(0x1bc)](',')){let _0xe77819=_0x5e4d58[_0x28f41c(0x1e2)]();if(_0xe77819==='')throw new r(_0x28f41c(0x1ce));let _0xbc6f5=/^(\d+)(?:-(\d+))?$/[_0x28f41c(0x1c7)](_0xe77819);if(_0xbc6f5===null){_0x36ed16['push'](_0xe77819);continue;}let _0x535c66=Number(_0xbc6f5[0x1]),_0xc9ec08=Number(_0xbc6f5[0x2]??_0xbc6f5[0x1]);if(_0x535c66<0x1||_0xc9ec08<_0x535c66)throw new r('Invalid\x20page\x20selector:\x20'+_0xe77819);if(_0x36ed16[_0x28f41c(0x1de)]+_0xc9ec08-_0x535c66+0x1>n)throw new r(_0x28f41c(0x1d2));for(let _0x3084d7=_0x535c66;_0x3084d7<=_0xc9ec08;_0x3084d7+=0x1)_0x36ed16[_0x28f41c(0x1c0)](_0x3084d7);}return _0x36ed16;}function c(_0x459eb5){const _0x425cfa=_0x5b26;return _0x459eb5 instanceof Error&&typeof _0x459eb5[_0x425cfa(0x1bf)]=='string';}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.2",
|
|
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.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|