@univer-cli/unit-layout-lint-command 1.0.1 → 1.0.3

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(_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};
1
+ (function(_0x5c31df,_0x4e92a5){const _0x2bdc8c=_0x552e,_0x48fad4=_0x5c31df();while(!![]){try{const _0x1866ef=-parseInt(_0x2bdc8c(0x108))/0x1*(-parseInt(_0x2bdc8c(0x107))/0x2)+-parseInt(_0x2bdc8c(0x100))/0x3+-parseInt(_0x2bdc8c(0x126))/0x4*(-parseInt(_0x2bdc8c(0x109))/0x5)+-parseInt(_0x2bdc8c(0x121))/0x6*(parseInt(_0x2bdc8c(0x110))/0x7)+-parseInt(_0x2bdc8c(0x12d))/0x8*(-parseInt(_0x2bdc8c(0xfe))/0x9)+-parseInt(_0x2bdc8c(0x111))/0xa*(parseInt(_0x2bdc8c(0x117))/0xb)+parseInt(_0x2bdc8c(0x11f))/0xc;if(_0x1866ef===_0x4e92a5)break;else _0x48fad4['push'](_0x48fad4['shift']());}catch(_0x3ad73c){_0x48fad4['push'](_0x48fad4['shift']());}}}(_0x3ec8,0xa8458));import{isUnitLayoutLintError as _0x2df5b6}from'@univer-cli/unit-layout-lint';function _0x552e(_0x1d8298,_0x452f1a){_0x1d8298=_0x1d8298-0xfb;const _0x3ec856=_0x3ec8();let _0x552e4c=_0x3ec856[_0x1d8298];return _0x552e4c;}import{Command as _0x567116}from'commander';var n=0x2710,r=class extends Error{constructor(_0x42ea25){const _0xebb6e3=_0x552e;super(_0x42ea25),this[_0xebb6e3(0x10e)]=_0xebb6e3(0x101);}};function i(_0x454990){const _0x9c320b=_0x552e;let _0x1164b7=new _0x567116(_0x9c320b(0x12e))['description'](_0x9c320b(0x11a))[_0x9c320b(0x115)]('--unit\x20<unit-id>',_0x9c320b(0x114))['option'](_0x9c320b(0x11c),_0x9c320b(0x11b))[_0x9c320b(0x129)]('--json',_0x9c320b(0x10c))[_0x9c320b(0x11d)](async _0x363854=>{const _0x3cf689=_0x9c320b;let _0x813818;try{let _0x4cc8ec=_0x363854[_0x3cf689(0x106)]===void 0x0?void 0x0:s(_0x363854[_0x3cf689(0x106)]),_0x5c88ea=await _0x454990[_0x3cf689(0x12b)]({'unitId':_0x363854[_0x3cf689(0x125)]});_0x813818=await _0x454990[_0x3cf689(0x12e)][_0x3cf689(0x12e)]({..._0x5c88ea,..._0x4cc8ec===void 0x0?{}:{'pages':_0x4cc8ec}});}catch(_0x4fa51f){throw(_0x4fa51f instanceof r||_0x2df5b6(_0x4fa51f)||c(_0x4fa51f))&&_0x1164b7[_0x3cf689(0x10a)](''+(_0x3cf689(0x123)in _0x4fa51f?String(_0x4fa51f[_0x3cf689(0x123)])+':\x20':'')+_0x4fa51f[_0x3cf689(0x118)],{'code':'unit-layout-lint.failed','exitCode':0x1}),_0x4fa51f;}_0x1164b7[_0x3cf689(0x12a)]()[_0x3cf689(0x120)]?.((_0x363854[_0x3cf689(0x102)]===!0x0?JSON[_0x3cf689(0x10b)](_0x813818,null,0x2):a(_0x813818))+'\x0a');});return _0x1164b7;}function a(_0x373344){const _0x296233=_0x552e;if(_0x373344[_0x296233(0x105)][_0x296233(0xfb)]===0x0)return _0x296233(0x127)+String(_0x373344[_0x296233(0x10f)][_0x296233(0x106)][_0x296233(0xfb)])+_0x296233(0x11e);let _0x57614b=[_0x296233(0x122)+String(_0x373344['findings'][_0x296233(0xfb)])+_0x296233(0x12c)+String(_0x373344[_0x296233(0x10f)][_0x296233(0x106)][_0x296233(0xfb)])+_0x296233(0x11e)];for(let _0x203e4a of _0x373344['findings'])_0x57614b[_0x296233(0xfc)](_0x296233(0x113)+String(_0x203e4a[_0x296233(0x124)])+'\x20\x20'+_0x203e4a[_0x296233(0x104)]+'\x20\x20'+_0x203e4a['id']),_0x57614b[_0x296233(0xfc)]('\x20\x20'+_0x203e4a[_0x296233(0x116)]);return _0x57614b['join']('\x0a');}function o(_0x59fb01){return s(_0x59fb01);}function s(_0x1b69b8){const _0x2892c5=_0x552e;if(_0x1b69b8[_0x2892c5(0x119)]()===_0x2892c5(0x12f))return;if(_0x1b69b8[_0x2892c5(0x119)]()==='')throw new r(_0x2892c5(0x10d));let _0x1c009c=[];for(let _0x45f2cd of _0x1b69b8[_0x2892c5(0x112)](',')){let _0x1ae844=_0x45f2cd['trim']();if(_0x1ae844==='')throw new r(_0x2892c5(0x103));let _0x52ae80=/^(\d+)(?:-(\d+))?$/[_0x2892c5(0xff)](_0x1ae844);if(_0x52ae80===null){_0x1c009c[_0x2892c5(0xfc)](_0x1ae844);continue;}let _0x23a8e8=Number(_0x52ae80[0x1]),_0x1950da=Number(_0x52ae80[0x2]??_0x52ae80[0x1]);if(_0x23a8e8<0x1||_0x1950da<_0x23a8e8)throw new r(_0x2892c5(0xfd)+_0x1ae844);if(_0x1c009c['length']+_0x1950da-_0x23a8e8+0x1>n)throw new r('--pages\x20expands\x20to\x20too\x20many\x20pages');for(let _0x3a4203=_0x23a8e8;_0x3a4203<=_0x1950da;_0x3a4203+=0x1)_0x1c009c[_0x2892c5(0xfc)](_0x3a4203);}return _0x1c009c;}function c(_0x300956){const _0x542a8d=_0x552e;return _0x300956 instanceof Error&&typeof _0x300956[_0x542a8d(0x123)]==_0x542a8d(0x128);}export{r as UnitLayoutLintCommandInputError,i as createUnitLayoutLintCommand,o as parseUnitLayoutLintPages,a as renderUnitLayoutLint};function _0x3ec8(){const _0x2c9410=['stringify','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','--pages\x20cannot\x20be\x20empty','name','coverage','2949107vTQFoj','10xtYGYB','split','page\x20','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit','requiredOption','detail','11540485JigVBv','message','trim','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','--pages\x20<pages>','action','\x20pages\x20checked)','350604dFgPqh','writeOut','6GTevjY','Slide\x20layout\x20lint:\x20','code','page','unit','2056072jkKesS','Slide\x20layout\x20lint:\x20no\x20findings\x20(','string','option','configureOutput','loadUnit','\x20findings\x20(','272EAhXPo','lint','all','length','push','Invalid\x20page\x20selector:\x20','333468sXwcMA','exec','2982792FilmjJ','UnitLayoutLintCommandInputError','json','--pages\x20contains\x20an\x20empty\x20selector','rule','findings','pages','385982ADtTZs','7ziaQhJ','5BYKMsl','error'];_0x3ec8=function(){return _0x2c9410;};return _0x3ec8();}
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.1",
4
+ "version": "1.0.3",
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.1"
21
+ "@univer-cli/unit-layout-lint": "1.0.3"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"