@univer-cli/unit-layout-lint-command 1.0.0-rc.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- function _0x1ef3(_0xdf94c8,_0x373e2d){_0xdf94c8=_0xdf94c8-0x19c;const _0x49117e=_0x4911();let _0x1ef3b4=_0x49117e[_0xdf94c8];return _0x1ef3b4;}(function(_0x2bca05,_0x411b79){const _0x5d3e84=_0x1ef3,_0x30a749=_0x2bca05();while(!![]){try{const _0x4e29e5=parseInt(_0x5d3e84(0x1c1))/0x1+-parseInt(_0x5d3e84(0x1c6))/0x2+parseInt(_0x5d3e84(0x1b8))/0x3*(parseInt(_0x5d3e84(0x1bf))/0x4)+-parseInt(_0x5d3e84(0x1a9))/0x5+parseInt(_0x5d3e84(0x1a5))/0x6+parseInt(_0x5d3e84(0x1bb))/0x7*(parseInt(_0x5d3e84(0x1a0))/0x8)+-parseInt(_0x5d3e84(0x1ae))/0x9;if(_0x4e29e5===_0x411b79)break;else _0x30a749['push'](_0x30a749['shift']());}catch(_0x3dab53){_0x30a749['push'](_0x30a749['shift']());}}}(_0x4911,0x5029e));import{isUnitLayoutLintError as _0x4c2183}from'@univer-cli/unit-layout-lint';import{Command as _0x247ad6}from'commander';var n=0x2710,r=class extends Error{constructor(_0x5bfd67){const _0x3f4055=_0x1ef3;super(_0x5bfd67),this[_0x3f4055(0x1c2)]=_0x3f4055(0x1a1);}};function i(_0x3d3a25){const _0x1c7621=_0x1ef3;let _0x3e79c1=new _0x247ad6('lint')[_0x1c7621(0x1ad)](_0x1c7621(0x1b3))[_0x1c7621(0x1a4)]('--unit\x20<unit-id>','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit')[_0x1c7621(0x1c9)](_0x1c7621(0x1bc),_0x1c7621(0x1a7))['option'](_0x1c7621(0x1c7),_0x1c7621(0x1b6))[_0x1c7621(0x1a8)](async _0x49d26b=>{const _0x1b81ec=_0x1c7621;let _0x57352a;try{let _0x1e5e41=_0x49d26b[_0x1b81ec(0x1b4)]===void 0x0?void 0x0:s(_0x49d26b[_0x1b81ec(0x1b4)]),_0xf1fa94=await _0x3d3a25['loadUnit']({'unitId':_0x49d26b['unit']});_0x57352a=await _0x3d3a25[_0x1b81ec(0x1b5)][_0x1b81ec(0x1b5)]({..._0xf1fa94,..._0x1e5e41===void 0x0?{}:{'pages':_0x1e5e41}});}catch(_0x40dbbb){throw(_0x40dbbb instanceof r||_0x4c2183(_0x40dbbb)||c(_0x40dbbb))&&_0x3e79c1[_0x1b81ec(0x1c3)](''+('code'in _0x40dbbb?String(_0x40dbbb[_0x1b81ec(0x1c0)])+':\x20':'')+_0x40dbbb[_0x1b81ec(0x1a3)],{'code':_0x1b81ec(0x1af),'exitCode':0x1}),_0x40dbbb;}_0x3e79c1[_0x1b81ec(0x1b0)]()[_0x1b81ec(0x1c4)]?.((_0x49d26b['json']===!0x0?JSON[_0x1b81ec(0x1a2)](_0x57352a,null,0x2):a(_0x57352a))+'\x0a');});return _0x3e79c1;}function a(_0x260a10){const _0x392a81=_0x1ef3;if(_0x260a10[_0x392a81(0x1bd)][_0x392a81(0x19c)]===0x0)return _0x392a81(0x1b2)+String(_0x260a10['coverage'][_0x392a81(0x1b4)][_0x392a81(0x19c)])+_0x392a81(0x1ac);let _0x38df5d=[_0x392a81(0x1c8)+String(_0x260a10['findings'][_0x392a81(0x19c)])+'\x20findings\x20('+String(_0x260a10[_0x392a81(0x1a6)]['pages'][_0x392a81(0x19c)])+_0x392a81(0x1ac)];for(let _0x5906d0 of _0x260a10['findings'])_0x38df5d[_0x392a81(0x1ca)](_0x392a81(0x1b1)+String(_0x5906d0[_0x392a81(0x1ba)])+'\x20\x20'+_0x5906d0[_0x392a81(0x1b9)]+'\x20\x20'+_0x5906d0['id']),_0x38df5d[_0x392a81(0x1ca)]('\x20\x20'+_0x5906d0['detail']);return _0x38df5d[_0x392a81(0x1aa)]('\x0a');}function _0x4911(){const _0x396396=['\x20pages\x20checked)','description','4222170wWjamZ','unit-layout-lint.failed','configureOutput','page\x20','Slide\x20layout\x20lint:\x20no\x20findings\x20(','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','pages','lint','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','Invalid\x20page\x20selector:\x20','12DWTZiu','rule','page','14GJxhzu','--pages\x20<pages>','findings','--pages\x20contains\x20an\x20empty\x20selector','164584oxUbfB','code','638743CPQyzM','name','error','writeOut','all','971008eNdMuj','--json','Slide\x20layout\x20lint:\x20','option','push','trim','length','string','split','exec','1395064sUvSjX','UnitLayoutLintCommandInputError','stringify','message','requiredOption','3869580CkjQAO','coverage','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','action','2570195hiPRfN','join','--pages\x20expands\x20to\x20too\x20many\x20pages'];_0x4911=function(){return _0x396396;};return _0x4911();}function o(_0x2aab7f){return s(_0x2aab7f);}function s(_0x39fdba){const _0x37f50f=_0x1ef3;if(_0x39fdba[_0x37f50f(0x1cb)]()===_0x37f50f(0x1c5))return;if(_0x39fdba[_0x37f50f(0x1cb)]()==='')throw new r('--pages\x20cannot\x20be\x20empty');let _0x5abfa0=[];for(let _0x58b839 of _0x39fdba[_0x37f50f(0x19e)](',')){let _0x1a5c4e=_0x58b839['trim']();if(_0x1a5c4e==='')throw new r(_0x37f50f(0x1be));let _0x551f63=/^(\d+)(?:-(\d+))?$/[_0x37f50f(0x19f)](_0x1a5c4e);if(_0x551f63===null){_0x5abfa0[_0x37f50f(0x1ca)](_0x1a5c4e);continue;}let _0x4978a2=Number(_0x551f63[0x1]),_0x462fc8=Number(_0x551f63[0x2]??_0x551f63[0x1]);if(_0x4978a2<0x1||_0x462fc8<_0x4978a2)throw new r(_0x37f50f(0x1b7)+_0x1a5c4e);if(_0x5abfa0[_0x37f50f(0x19c)]+_0x462fc8-_0x4978a2+0x1>n)throw new r(_0x37f50f(0x1ab));for(let _0x4e3025=_0x4978a2;_0x4e3025<=_0x462fc8;_0x4e3025+=0x1)_0x5abfa0[_0x37f50f(0x1ca)](_0x4e3025);}return _0x5abfa0;}function c(_0x2b39dd){const _0x515708=_0x1ef3;return _0x2b39dd instanceof Error&&typeof _0x2b39dd[_0x515708(0x1c0)]==_0x515708(0x19d);}export{r as UnitLayoutLintCommandInputError,i as createUnitLayoutLintCommand,o as parseUnitLayoutLintPages,a as renderUnitLayoutLint};
1
+ (function(_0x334cdb,_0x1c78ee){const _0x4a5154=_0x2c4a,_0x120e20=_0x334cdb();while(!![]){try{const _0x434cee=parseInt(_0x4a5154(0x1eb))/0x1*(parseInt(_0x4a5154(0x20d))/0x2)+-parseInt(_0x4a5154(0x202))/0x3*(-parseInt(_0x4a5154(0x20a))/0x4)+parseInt(_0x4a5154(0x1f0))/0x5*(parseInt(_0x4a5154(0x20c))/0x6)+parseInt(_0x4a5154(0x1fe))/0x7*(-parseInt(_0x4a5154(0x200))/0x8)+parseInt(_0x4a5154(0x1fb))/0x9*(parseInt(_0x4a5154(0x212))/0xa)+-parseInt(_0x4a5154(0x1fd))/0xb+-parseInt(_0x4a5154(0x1f6))/0xc*(-parseInt(_0x4a5154(0x1ed))/0xd);if(_0x434cee===_0x1c78ee)break;else _0x120e20['push'](_0x120e20['shift']());}catch(_0x4543b9){_0x120e20['push'](_0x120e20['shift']());}}}(_0xdbae,0xaec9a));import{isUnitLayoutLintError as _0x2569d8}from'@univer-cli/unit-layout-lint';import{Command as _0x1f9c4b}from'commander';function _0x2c4a(_0x1d2107,_0x22fe9d){_0x1d2107=_0x1d2107-0x1e9;const _0xdbae60=_0xdbae();let _0x2c4ab8=_0xdbae60[_0x1d2107];return _0x2c4ab8;}var n=0x2710,r=class extends Error{constructor(_0x1647b6){const _0x10c811=_0x2c4a;super(_0x1647b6),this[_0x10c811(0x204)]=_0x10c811(0x209);}};function i(_0x3d8fd7){const _0x4caeb6=_0x2c4a;let _0x2df51e=new _0x1f9c4b('lint')[_0x4caeb6(0x214)](_0x4caeb6(0x20b))[_0x4caeb6(0x1fa)](_0x4caeb6(0x211),_0x4caeb6(0x21a))[_0x4caeb6(0x215)](_0x4caeb6(0x1e9),_0x4caeb6(0x1ee))[_0x4caeb6(0x215)](_0x4caeb6(0x21b),'write\x20the\x20complete\x20lint\x20report\x20as\x20JSON')[_0x4caeb6(0x218)](async _0x2b9501=>{const _0x42d1c4=_0x4caeb6;let _0x27a49c;try{let _0x43b564=_0x2b9501[_0x42d1c4(0x217)]===void 0x0?void 0x0:s(_0x2b9501[_0x42d1c4(0x217)]),_0x54ad90=await _0x3d8fd7[_0x42d1c4(0x203)]({'unitId':_0x2b9501[_0x42d1c4(0x1f4)]});_0x27a49c=await _0x3d8fd7[_0x42d1c4(0x1ff)]['lint']({..._0x54ad90,..._0x43b564===void 0x0?{}:{'pages':_0x43b564}});}catch(_0x498ae0){throw(_0x498ae0 instanceof r||_0x2569d8(_0x498ae0)||c(_0x498ae0))&&_0x2df51e[_0x42d1c4(0x1f3)](''+(_0x42d1c4(0x1ea)in _0x498ae0?String(_0x498ae0[_0x42d1c4(0x1ea)])+':\x20':'')+_0x498ae0['message'],{'code':_0x42d1c4(0x1f7),'exitCode':0x1}),_0x498ae0;}_0x2df51e[_0x42d1c4(0x219)]()['writeOut']?.((_0x2b9501[_0x42d1c4(0x1fc)]===!0x0?JSON[_0x42d1c4(0x201)](_0x27a49c,null,0x2):a(_0x27a49c))+'\x0a');});return _0x2df51e;}function a(_0x3e545b){const _0x4f891f=_0x2c4a;if(_0x3e545b['findings'][_0x4f891f(0x208)]===0x0)return _0x4f891f(0x1f2)+String(_0x3e545b['coverage'][_0x4f891f(0x217)][_0x4f891f(0x208)])+_0x4f891f(0x1f1);let _0x3d7761=[_0x4f891f(0x1ec)+String(_0x3e545b['findings'][_0x4f891f(0x208)])+'\x20findings\x20('+String(_0x3e545b[_0x4f891f(0x206)][_0x4f891f(0x217)][_0x4f891f(0x208)])+_0x4f891f(0x1f1)];for(let _0x177f6b of _0x3e545b['findings'])_0x3d7761[_0x4f891f(0x20e)](_0x4f891f(0x1f8)+String(_0x177f6b['page'])+'\x20\x20'+_0x177f6b[_0x4f891f(0x213)]+'\x20\x20'+_0x177f6b['id']),_0x3d7761[_0x4f891f(0x20e)]('\x20\x20'+_0x177f6b['detail']);return _0x3d7761[_0x4f891f(0x216)]('\x0a');}function o(_0x190a7e){return s(_0x190a7e);}function s(_0x3809f2){const _0x4fe36d=_0x2c4a;if(_0x3809f2[_0x4fe36d(0x207)]()===_0x4fe36d(0x1f5))return;if(_0x3809f2[_0x4fe36d(0x207)]()==='')throw new r('--pages\x20cannot\x20be\x20empty');let _0x63d08=[];for(let _0x24c45d of _0x3809f2[_0x4fe36d(0x1ef)](',')){let _0x75f5a4=_0x24c45d[_0x4fe36d(0x207)]();if(_0x75f5a4==='')throw new r(_0x4fe36d(0x205));let _0x311b81=/^(\d+)(?:-(\d+))?$/[_0x4fe36d(0x20f)](_0x75f5a4);if(_0x311b81===null){_0x63d08[_0x4fe36d(0x20e)](_0x75f5a4);continue;}let _0x3c68c5=Number(_0x311b81[0x1]),_0x442658=Number(_0x311b81[0x2]??_0x311b81[0x1]);if(_0x3c68c5<0x1||_0x442658<_0x3c68c5)throw new r(_0x4fe36d(0x1f9)+_0x75f5a4);if(_0x63d08['length']+_0x442658-_0x3c68c5+0x1>n)throw new r('--pages\x20expands\x20to\x20too\x20many\x20pages');for(let _0x5becbb=_0x3c68c5;_0x5becbb<=_0x442658;_0x5becbb+=0x1)_0x63d08[_0x4fe36d(0x20e)](_0x5becbb);}return _0x63d08;}function c(_0x45d57f){const _0x45dab7=_0x2c4a;return _0x45d57f instanceof Error&&typeof _0x45d57f['code']==_0x45dab7(0x210);}function _0xdbae(){const _0x1e68fe=['stringify','159QxqbbG','loadUnit','name','--pages\x20contains\x20an\x20empty\x20selector','coverage','trim','length','UnitLayoutLintCommandInputError','51416mGGjJl','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','835338EFrMHV','71834sFdWzX','push','exec','string','--unit\x20<unit-id>','31510BPoMRk','rule','description','option','join','pages','action','configureOutput','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit','--json','--pages\x20<pages>','code','20XpVyHw','Slide\x20layout\x20lint:\x20','2769XdQdZm','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','split','5JfleLy','\x20pages\x20checked)','Slide\x20layout\x20lint:\x20no\x20findings\x20(','error','unit','all','42852hSZfiU','unit-layout-lint.failed','page\x20','Invalid\x20page\x20selector:\x20','requiredOption','1017LZzmXu','json','14328479PmzRWS','2072oRRmLi','lint','17216mdwprY'];_0xdbae=function(){return _0x1e68fe;};return _0xdbae();}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.0-rc.0",
4
+ "version": "1.0.1",
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.0-rc.0"
21
+ "@univer-cli/unit-layout-lint": "1.0.1"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"