@univer-cli/unit-layout-lint-command 1.6.0 → 1.6.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.
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 _0xa862(){const _0x162c22=['coverage','660929vTcgmo','UnitLayoutLintCommandInputError','must\x20be\x20a\x20finite\x20ratio\x20from\x201\x20to\x202','lint','UNIT_LAYOUT_LINT_BOARD_FAILED','4oKYUnV','Invalid\x20page\x20selector:\x20','Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage','slide','keys','string','configureOutput','object','217PRvjyU','Slide\x20layout\x20lint:\x20','include\x20a\x20read-only\x20native\x20Board\x20automatic\x20port-order\x20plan','18YbMoHs','findings','planText','--mode,\x20--plan,\x20--plan-ids,\x20--plan-options,\x20--plan-labels,\x20--plan-ports,\x20--plan-text,\x20--text-width-growth\x20and\x20--maximum-automatic-label-distance\x20are\x20only\x20supported\x20for\x20Board\x20Units','fixedElementIds','textWidthGrowth','name','stringify','planPorts','coverage:\x20','origin','some','\x20pages,\x20','--mode\x20<mode>','8673115FjDlGx','\x20pages\x20checked)','action','Slide\x20or\x20Board\x20Unit\x20to\x20lint','planIds','\x20findings\x20(','limitations','maximumAutomaticLabelDistance','rule','option','planLabels','unitType','page\x20','incomplete\x20\x20','direction','--plan-text\x20requires\x20rendered\x20or\x20both\x20mode','pages','mode','Board\x20layout\x20lint:\x20','pageId','--unit\x20<unit-id>','--text-width-growth\x20<ratio>','ports','exec','json','--json','set\x20graph\x20layout\x20options\x20as\x20a\x20JSON\x20object','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','Pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','--plan-options\x20must\x20contain\x20a\x20JSON\x20object','writeOut','--plan-options\x20<json>','board','error','addOption','severity','--pages\x20contains\x20an\x20empty\x20selector','source','limit\x20the\x20layout\x20plan\x20to\x20generated\x20element\x20or\x20connector\x20IDs','limit\x20text\x20sizing\x20width\x20growth\x20to\x20a\x20finite\x20ratio\x20from\x201\x20to\x202\x20for\x20graph\x20or\x20text\x20planning','2QgrZDE','Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage;\x20see\x20the\x20report','description','choices','planOptions','--maximum-automatic-label-distance\x20<board-units>','model','reason','incomplete','has','8572704tKPydL','isArray','--pages\x20cannot\x20be\x20empty','--plan-ids\x20requires\x20--plan','--maximum-automatic-label-distance\x20requires\x20rendered\x20or\x20both\x20mode','--plan-labels\x20requires\x20rendered\x20or\x20both\x20mode','push','--text-width-growth\x20requires\x20graph\x20or\x20text\x20planning','routes','8719870hJYroe','4567659nundXf','isFinite','text','complete','trim','--plan-ports','--plan-options\x20requires\x20--plan\x20graph','labels','must\x20be\x20a\x20finite\x20non-negative\x20number\x20of\x20Board\x20units','join','message','layerGap','code','graph','unit','rendered','60508239CUCwKf','length','include\x20a\x20read-only\x20measured\x20text-size\x20plan\x20for\x20selected\x20generated\x20Board\x20shapes','include\x20a\x20read-only\x20measured\x20Board\x20label\x20repair\x20plan','Slide\x20layout\x20lint:\x20no\x20findings\x20(','--plan\x20<mode>','471352mVYgYh','--plan-ids\x20<id...>','include\x20a\x20read-only\x20native\x20Board\x20layout\x20plan','assign'];_0xa862=function(){return _0x162c22;};return _0xa862();}(function(_0x289d12,_0x4ccf99){const _0x4c2318=_0x26d9,_0x5ad216=_0x289d12();while(!![]){try{const _0x29fcaf=parseInt(_0x4c2318(0x116))/0x1*(parseInt(_0x4c2318(0xe7))/0x2)+parseInt(_0x4c2318(0xfb))/0x3*(parseInt(_0x4c2318(0x11b))/0x4)+-parseInt(_0x4c2318(0x134))/0x5+-parseInt(_0x4c2318(0xf1))/0x6+parseInt(_0x4c2318(0x123))/0x7*(-parseInt(_0x4c2318(0x111))/0x8)+-parseInt(_0x4c2318(0x126))/0x9*(parseInt(_0x4c2318(0xfa))/0xa)+parseInt(_0x4c2318(0x10b))/0xb;if(_0x29fcaf===_0x4ccf99)break;else _0x5ad216['push'](_0x5ad216['shift']());}catch(_0xcbacb3){_0x5ad216['push'](_0x5ad216['shift']());}}}(_0xa862,0xe8059));import{isUnitLayoutLintError as _0x5f33df}from'@univer-cli/unit-layout-lint';import{Command as _0x16f733,InvalidArgumentError as _0x144bbc,Option as _0x38196e}from'commander';var i=0x2710,a=class extends Error{constructor(_0x35f7fb){const _0x248d47=_0x26d9;super(_0x35f7fb),this[_0x248d47(0x12c)]=_0x248d47(0x117);}};function o(_0x68e077){const _0x2d91b8=_0x26d9;let _0x23cbf3=new _0x16f733('lint')[_0x2d91b8(0xe9)]('Lint\x20Slide\x20or\x20Board\x20layout\x20with\x20SDK\x20geometry\x20evidence')['requiredOption'](_0x2d91b8(0x148),_0x2d91b8(0x137))['option']('--pages\x20<pages>',_0x2d91b8(0xdb))[_0x2d91b8(0xe1)](new _0x38196e(_0x2d91b8(0x133),'Board\x20analysis\x20mode\x20(default:\x20both)')[_0x2d91b8(0xea)]([_0x2d91b8(0xed),_0x2d91b8(0x10a),'both']))[_0x2d91b8(0x13d)](_0x2d91b8(0xec),'require\x20native\x20automatic\x20Board\x20labels\x20within\x20this\x20distance\x20of\x20their\x20rendered\x20stroke',p)['option'](_0x2d91b8(0x14d),_0x2d91b8(0xda))[_0x2d91b8(0xe1)](new _0x38196e(_0x2d91b8(0x110),_0x2d91b8(0x113))[_0x2d91b8(0xea)]([_0x2d91b8(0x108),_0x2d91b8(0xf9),_0x2d91b8(0x14a),_0x2d91b8(0x102),_0x2d91b8(0xfd)]))[_0x2d91b8(0x13d)](_0x2d91b8(0x112),_0x2d91b8(0xe5))[_0x2d91b8(0x13d)](_0x2d91b8(0xde),_0x2d91b8(0xd9))[_0x2d91b8(0x13d)]('--plan-labels',_0x2d91b8(0x10e))['option'](_0x2d91b8(0x100),_0x2d91b8(0x125))[_0x2d91b8(0x13d)]('--plan-text\x20<element-id...>',_0x2d91b8(0x10d))[_0x2d91b8(0x13d)](_0x2d91b8(0x149),_0x2d91b8(0xe6),m)[_0x2d91b8(0x136)](async _0x2e3154=>{const _0x5d4b3f=_0x2d91b8;let _0x3f1520;try{let _0x41b7d7=_0x2e3154['pages']===void 0x0?void 0x0:d(_0x2e3154['pages']),_0x2a6172=await _0x68e077['loadUnit']({'unitId':_0x2e3154[_0x5d4b3f(0x109)]});if(_0x2a6172[_0x5d4b3f(0x13f)]===_0x5d4b3f(0x11e)&&(_0x2e3154[_0x5d4b3f(0x145)]!==void 0x0||_0x2e3154['plan']!==void 0x0||_0x2e3154[_0x5d4b3f(0x138)]!==void 0x0||_0x2e3154[_0x5d4b3f(0xeb)]!==void 0x0||_0x2e3154[_0x5d4b3f(0x13e)]===!0x0||_0x2e3154[_0x5d4b3f(0x12e)]===!0x0||_0x2e3154[_0x5d4b3f(0x128)]!==void 0x0||_0x2e3154[_0x5d4b3f(0x12b)]!==void 0x0||_0x2e3154['maximumAutomaticLabelDistance']!==void 0x0))throw new a(_0x5d4b3f(0x129));if(_0x2e3154[_0x5d4b3f(0x13e)]===!0x0&&_0x2e3154[_0x5d4b3f(0x145)]===_0x5d4b3f(0xed))throw new a(_0x5d4b3f(0xf6));if(_0x2e3154[_0x5d4b3f(0x12e)]===!0x0&&_0x2e3154[_0x5d4b3f(0x145)]===_0x5d4b3f(0xed))throw new a('--plan-ports\x20requires\x20rendered\x20or\x20both\x20mode');let _0x5254bb=s(_0x2e3154);if(_0x2e3154['textWidthGrowth']!==void 0x0&&!_0x5254bb&&!_0x2e3154[_0x5d4b3f(0x128)]?.['length'])throw new a('--text-width-growth\x20requires\x20--plan-text\x20or\x20--plan\x20graph/text');if(_0x2e3154['planText']!==void 0x0&&_0x2e3154[_0x5d4b3f(0x145)]===_0x5d4b3f(0xed))throw new a(_0x5d4b3f(0x143));if(_0x2e3154['maximumAutomaticLabelDistance']!==void 0x0&&_0x2e3154[_0x5d4b3f(0x145)]===_0x5d4b3f(0xed))throw new a(_0x5d4b3f(0xf5));_0x3f1520=await _0x68e077[_0x5d4b3f(0x119)][_0x5d4b3f(0x119)]({..._0x2a6172,..._0x41b7d7===void 0x0?{}:{'pages':_0x41b7d7},..._0x2a6172['unitType']===_0x5d4b3f(0xdf)&&_0x5254bb?{'layoutPlan':_0x5254bb}:{},..._0x2a6172[_0x5d4b3f(0x13f)]===_0x5d4b3f(0xdf)&&_0x2e3154['mode']!==void 0x0?{'mode':_0x2e3154[_0x5d4b3f(0x145)]}:{},..._0x2a6172['unitType']==='board'&&_0x2e3154['maximumAutomaticLabelDistance']!==void 0x0?{'maximumAutomaticLabelDistance':_0x2e3154[_0x5d4b3f(0x13b)]}:{},..._0x2a6172[_0x5d4b3f(0x13f)]===_0x5d4b3f(0xdf)&&_0x2e3154[_0x5d4b3f(0x128)]!==void 0x0?{'textPlanElementIds':_0x2e3154[_0x5d4b3f(0x128)]}:{},..._0x2a6172[_0x5d4b3f(0x13f)]===_0x5d4b3f(0xdf)&&!_0x5254bb&&_0x2e3154[_0x5d4b3f(0x12b)]!==void 0x0?{'textPlanMaximumWidthGrowth':_0x2e3154[_0x5d4b3f(0x12b)]}:{},..._0x2a6172[_0x5d4b3f(0x13f)]===_0x5d4b3f(0xdf)&&_0x2e3154[_0x5d4b3f(0x13e)]===!0x0?{'includeLabelPlan':!0x0}:{},..._0x2a6172[_0x5d4b3f(0x13f)]==='board'&&_0x2e3154[_0x5d4b3f(0x12e)]===!0x0?{'includePortPlan':!0x0}:{}});}catch(_0x5a496d){throw(_0x5a496d instanceof a||_0x5f33df(_0x5a496d)||f(_0x5a496d))&&_0x23cbf3[_0x5d4b3f(0xe0)](''+(_0x5d4b3f(0x107)in _0x5a496d?String(_0x5a496d[_0x5d4b3f(0x107)])+':\x20':'')+_0x5a496d[_0x5d4b3f(0x105)],{'code':'unit-layout-lint.failed','exitCode':0x1}),_0x5a496d;}let _0x140d30=_0x3f1520[_0x5d4b3f(0x13f)]===_0x5d4b3f(0xdf)&&(!_0x3f1520['coverage'][_0x5d4b3f(0xfe)]||_0x3f1520[_0x5d4b3f(0x127)][_0x5d4b3f(0x131)](({severity:_0x5d9d64})=>_0x5d9d64==='error'));if(_0x140d30&&_0x2e3154['json']===!0x0){let _0x126ef2={..._0x23cbf3['configureOutput']()};_0x126ef2['writeErr']?.(JSON[_0x5d4b3f(0x12d)]({'ok':!0x1,'error':{'code':_0x5d4b3f(0x11a),'message':'Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage','details':{'report':_0x3f1520}}})+'\x0a'),_0x23cbf3[_0x5d4b3f(0x121)]({'outputError':()=>{}});try{_0x23cbf3['error'](_0x5d4b3f(0x11d),{'code':_0x5d4b3f(0x11a),'exitCode':0x2});}catch(_0x5dc21a){throw _0x5dc21a instanceof Error&&Object[_0x5d4b3f(0x114)](_0x5dc21a,{'details':{'report':_0x3f1520}}),_0x5dc21a;}finally{_0x23cbf3[_0x5d4b3f(0x121)](_0x126ef2);}}_0x23cbf3[_0x5d4b3f(0x121)]()[_0x5d4b3f(0xdd)]?.((_0x2e3154[_0x5d4b3f(0x14c)]===!0x0?JSON[_0x5d4b3f(0x12d)](_0x3f1520,null,0x2):l(_0x3f1520))+'\x0a'),_0x140d30&&_0x23cbf3[_0x5d4b3f(0xe0)](_0x5d4b3f(0xe8),{'code':_0x5d4b3f(0x11a),'exitCode':0x2});});return _0x23cbf3;}function s(_0x5b2f49){const _0x39adcf=_0x26d9;let {plan:_0x2a89da,planIds:_0x264eb8,planOptions:_0x14d7ef,textWidthGrowth:_0x357c72}=_0x5b2f49;if(_0x14d7ef!==void 0x0&&_0x2a89da!==_0x39adcf(0x108))throw new a(_0x39adcf(0x101));if(_0x2a89da===void 0x0){if(_0x264eb8!==void 0x0)throw new a(_0x39adcf(0xf4));return;}if(_0x5b2f49[_0x39adcf(0x145)]===_0x39adcf(0xed)||_0x5b2f49[_0x39adcf(0x13e)]||_0x5b2f49[_0x39adcf(0x12e)]||_0x5b2f49['planText'])throw new a('--plan\x20requires\x20rendered\x20or\x20both\x20mode\x20and\x20cannot\x20be\x20combined\x20with\x20another\x20plan');if(_0x357c72!==void 0x0&&_0x2a89da!=='graph'&&_0x2a89da!==_0x39adcf(0xfd))throw new a(_0x39adcf(0xf8));let _0x5b2a79=_0x357c72===void 0x0?{}:{'maximumWidthGrowth':_0x357c72};if(_0x2a89da===_0x39adcf(0xfd)){if(!_0x264eb8?.[_0x39adcf(0x10c)])throw new a('--plan\x20text\x20requires\x20--plan-ids');return{'mode':_0x2a89da,'elementIds':_0x264eb8,..._0x5b2a79};}return _0x2a89da===_0x39adcf(0x108)?{...c(_0x14d7ef),'mode':_0x2a89da,..._0x264eb8===void 0x0?{}:{'elementIds':_0x264eb8},..._0x5b2a79}:{'mode':_0x2a89da,..._0x264eb8===void 0x0?{}:{'connectorIds':_0x264eb8}};}function c(_0x54c650){const _0x8fb07e=_0x26d9;if(_0x54c650===void 0x0)return{};let _0x1bfc33=new Set([_0x8fb07e(0x142),_0x8fb07e(0x106),'itemGap',_0x8fb07e(0x130),'maxNodes',_0x8fb07e(0x12a),'feedbackConnectorIds']),_0x9aa001;try{_0x9aa001=JSON['parse'](_0x54c650);}catch{throw new a(_0x8fb07e(0xdc));}if(!_0x9aa001||typeof _0x9aa001!=_0x8fb07e(0x122)||Array[_0x8fb07e(0xf2)](_0x9aa001)||Object[_0x8fb07e(0x11f)](_0x9aa001)[_0x8fb07e(0x131)](_0x471b32=>!_0x1bfc33[_0x8fb07e(0xf0)](_0x471b32)))throw new a('--plan-options\x20accepts\x20direction,\x20layerGap,\x20itemGap,\x20origin,\x20maxNodes,\x20fixedElementIds\x20and\x20feedbackConnectorIds');return _0x9aa001;}function l(_0x1bac46){const _0x518932=_0x26d9;if(_0x1bac46[_0x518932(0x13f)]===_0x518932(0xdf)){let _0x139cef=[_0x518932(0x146)+_0x1bac46['status']+'\x20('+String(_0x1bac46[_0x518932(0x115)][_0x518932(0x144)][_0x518932(0x10c)])+_0x518932(0x132)+_0x1bac46[_0x518932(0x145)]+')'];for(let _0x1d496d of _0x1bac46[_0x518932(0x127)])_0x139cef[_0x518932(0xf7)]('page\x20'+String(_0x1d496d['page'])+'\x20\x20'+_0x1d496d[_0x518932(0xe4)]+'\x20\x20'+_0x1d496d[_0x518932(0xe2)]+'\x20\x20'+_0x1d496d[_0x518932(0x13c)]+'\x20\x20'+_0x1d496d['id']);for(let _0x569d36 of _0x1bac46[_0x518932(0x115)][_0x518932(0xef)])_0x139cef['push'](_0x518932(0x141)+_0x569d36[_0x518932(0x147)]+'\x20\x20'+_0x569d36[_0x518932(0xe4)]+'\x20\x20'+_0x569d36[_0x518932(0xee)]);for(let _0x1f1db3 of _0x1bac46[_0x518932(0x115)][_0x518932(0x13a)])_0x139cef[_0x518932(0xf7)](_0x518932(0x12f)+_0x1f1db3);return _0x139cef[_0x518932(0x104)]('\x0a');}if(_0x1bac46['findings'][_0x518932(0x10c)]===0x0)return _0x518932(0x10f)+String(_0x1bac46[_0x518932(0x115)][_0x518932(0x144)][_0x518932(0x10c)])+_0x518932(0x135);let _0x554201=[_0x518932(0x124)+String(_0x1bac46['findings']['length'])+_0x518932(0x139)+String(_0x1bac46[_0x518932(0x115)]['pages'][_0x518932(0x10c)])+_0x518932(0x135)];for(let _0x320717 of _0x1bac46['findings'])_0x554201[_0x518932(0xf7)](_0x518932(0x140)+String(_0x320717['page'])+'\x20\x20'+_0x320717['rule']+'\x20\x20'+_0x320717['id']),_0x554201[_0x518932(0xf7)]('\x20\x20'+_0x320717['detail']);return _0x554201[_0x518932(0x104)]('\x0a');}function u(_0x3e721b){return d(_0x3e721b);}function d(_0x9d9b53){const _0x2c3588=_0x26d9;if(_0x9d9b53[_0x2c3588(0xff)]()==='all')return;if(_0x9d9b53[_0x2c3588(0xff)]()==='')throw new a(_0x2c3588(0xf3));let _0x3681f7=[];for(let _0x5daf96 of _0x9d9b53['split'](',')){let _0x5e04a8=_0x5daf96['trim']();if(_0x5e04a8==='')throw new a(_0x2c3588(0xe3));let _0x548660=/^(\d+)(?:-(\d+))?$/[_0x2c3588(0x14b)](_0x5e04a8);if(_0x548660===null){_0x3681f7[_0x2c3588(0xf7)](_0x5e04a8);continue;}let _0x15f044=Number(_0x548660[0x1]),_0x2b1162=Number(_0x548660[0x2]??_0x548660[0x1]);if(_0x15f044<0x1||_0x2b1162<_0x15f044)throw new a(_0x2c3588(0x11c)+_0x5e04a8);if(_0x3681f7[_0x2c3588(0x10c)]+_0x2b1162-_0x15f044+0x1>i)throw new a('--pages\x20expands\x20to\x20too\x20many\x20pages');for(let _0x3d195a=_0x15f044;_0x3d195a<=_0x2b1162;_0x3d195a+=0x1)_0x3681f7[_0x2c3588(0xf7)](_0x3d195a);}return _0x3681f7;}function _0x26d9(_0x2a42a7,_0x389d82){_0x2a42a7=_0x2a42a7-0xd9;const _0xa86202=_0xa862();let _0x26d9a6=_0xa86202[_0x2a42a7];return _0x26d9a6;}function f(_0x5974a1){const _0x3f5ee7=_0x26d9;return _0x5974a1 instanceof Error&&typeof _0x5974a1[_0x3f5ee7(0x107)]==_0x3f5ee7(0x120);}function p(_0x3e8ed7){const _0xa6438f=_0x26d9;let _0x47b711=Number(_0x3e8ed7);if(_0x3e8ed7[_0xa6438f(0xff)]()===''||!Number[_0xa6438f(0xfc)](_0x47b711)||_0x47b711<0x0)throw new _0x144bbc(_0xa6438f(0x103));return _0x47b711;}function m(_0x211819){const _0x27eab0=_0x26d9;let _0x52d180=Number(_0x211819);if(_0x211819['trim']()===''||!Number[_0x27eab0(0xfc)](_0x52d180)||_0x52d180<0x1||_0x52d180>0x2)throw new _0x144bbc(_0x27eab0(0x118));return _0x52d180;}export{a as UnitLayoutLintCommandInputError,o as createUnitLayoutLintCommand,u as parseUnitLayoutLintPages,l as renderUnitLayoutLint};
1
+ function _0xcca4(){const _0x445cde=['action','Slide\x20layout\x20lint:\x20','model','assign','error','pages','1763140bHtEKG','planOptions','--mode\x20<mode>','UnitLayoutLintCommandInputError','addOption','maximumAutomaticLabelDistance','--plan\x20<mode>','rule','lint','direction','pageId','88cXCeiK','3TVwWeh','ports','parse','rendered','Slide\x20or\x20Board\x20Unit\x20to\x20lint','2745470kUCHSB','--text-width-growth\x20<ratio>','origin','41073168QZfjAj','--maximum-automatic-label-distance\x20<board-units>','incomplete\x20\x20','--plan\x20text\x20requires\x20--plan-ids','board','set\x20graph\x20layout\x20options\x20as\x20a\x20JSON\x20object','--plan-options\x20accepts\x20direction,\x20layerGap,\x20itemGap,\x20origin,\x20maxNodes,\x20fixedElementIds\x20and\x20feedbackConnectorIds','Board\x20layout\x20lint:\x20','join','14pVcluv','loadUnit','writeErr','--plan-options\x20must\x20contain\x20a\x20JSON\x20object','--unit\x20<unit-id>','page\x20','length','--plan-labels','1482608VbzAzW','planPorts','requiredOption','exec','\x20pages\x20checked)','push','Lint\x20Slide\x20or\x20Board\x20layout\x20with\x20SDK\x20geometry\x20evidence','status','code','has','must\x20be\x20a\x20finite\x20ratio\x20from\x201\x20to\x202','page','unit','some','--mode,\x20--plan,\x20--plan-ids,\x20--plan-options,\x20--plan-labels,\x20--plan-ports,\x20--plan-text,\x20--text-width-growth\x20and\x20--maximum-automatic-label-distance\x20are\x20only\x20supported\x20for\x20Board\x20Units','--plan-ids\x20<id...>','graph','object','include\x20a\x20read-only\x20native\x20Board\x20layout\x20plan','configureOutput','coverage','Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage;\x20see\x20the\x20report','limit\x20text\x20sizing\x20width\x20growth\x20to\x20a\x20finite\x20ratio\x20from\x201\x20to\x202\x20for\x20graph\x20or\x20text\x20planning','--plan\x20requires\x20rendered\x20or\x20both\x20mode\x20and\x20cannot\x20be\x20combined\x20with\x20another\x20plan','text','Pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','stringify','--plan-labels\x20requires\x20rendered\x20or\x20both\x20mode','planLabels','require\x20native\x20automatic\x20Board\x20labels\x20within\x20this\x20distance\x20of\x20their\x20rendered\x20stroke','both','string','plan','coverage:\x20','writeOut','textWidthGrowth','9454527clJdHK','name','6IMczxb','feedbackConnectorIds','findings','--pages\x20cannot\x20be\x20empty','include\x20a\x20read-only\x20native\x20Board\x20automatic\x20port-order\x20plan','--plan-ports\x20requires\x20rendered\x20or\x20both\x20mode','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','description','include\x20a\x20read-only\x20measured\x20text-size\x20plan\x20for\x20selected\x20generated\x20Board\x20shapes','trim','reason','fixedElementIds','unitType','choices','limit\x20the\x20layout\x20plan\x20to\x20generated\x20element\x20or\x20connector\x20IDs','must\x20be\x20a\x20finite\x20non-negative\x20number\x20of\x20Board\x20units','Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage','include\x20a\x20read-only\x20measured\x20Board\x20label\x20repair\x20plan','388JvSbNW','complete','source','--plan-text\x20requires\x20rendered\x20or\x20both\x20mode','option','\x20findings\x20(','--json','mode','779704MmJdoZ','planText','isFinite','split','limitations','UNIT_LAYOUT_LINT_BOARD_FAILED','--pages\x20expands\x20to\x20too\x20many\x20pages','4208UbtuuL','planIds','json','--text-width-growth\x20requires\x20--plan-text\x20or\x20--plan\x20graph/text'];_0xcca4=function(){return _0x445cde;};return _0xcca4();}(function(_0x2552ed,_0x4c10be){const _0x37a1de=_0x4b92,_0x5bb1b3=_0x2552ed();while(!![]){try{const _0x49ae70=parseInt(_0x37a1de(0x134))/0x1*(parseInt(_0x37a1de(0x125))/0x2)+parseInt(_0x37a1de(0x14a))/0x3*(parseInt(_0x37a1de(0xed))/0x4)+parseInt(_0x37a1de(0x14f))/0x5*(parseInt(_0x37a1de(0x113))/0x6)+parseInt(_0x37a1de(0xe5))/0x7*(parseInt(_0x37a1de(0x12d))/0x8)+parseInt(_0x37a1de(0x111))/0x9+-parseInt(_0x37a1de(0x13e))/0xa*(-parseInt(_0x37a1de(0x149))/0xb)+-parseInt(_0x37a1de(0xdc))/0xc;if(_0x49ae70===_0x4c10be)break;else _0x5bb1b3['push'](_0x5bb1b3['shift']());}catch(_0x31862b){_0x5bb1b3['push'](_0x5bb1b3['shift']());}}}(_0xcca4,0xeca3b));import{isUnitLayoutLintError as _0x472053}from'@univer-cli/unit-layout-lint';function _0x4b92(_0x2cf3d1,_0x20c258){_0x2cf3d1=_0x2cf3d1-0xdb;const _0xcca45e=_0xcca4();let _0x4b92d0=_0xcca45e[_0x2cf3d1];return _0x4b92d0;}import{Command as _0x165d17,InvalidArgumentError as _0x420daa,Option as _0x52902c}from'commander';var i=0x2710,a=class extends Error{constructor(_0x191630){const _0x1b7fd2=_0x4b92;super(_0x191630),this[_0x1b7fd2(0x112)]=_0x1b7fd2(0x141);}};function o(_0x4c1a2f){const _0x4cb469=_0x4b92;let _0x40613c=new _0x165d17('lint')[_0x4cb469(0x11a)](_0x4cb469(0xf3))[_0x4cb469(0xef)](_0x4cb469(0xe9),_0x4cb469(0x14e))['option']('--pages\x20<pages>',_0x4cb469(0x106))[_0x4cb469(0x142)](new _0x52902c(_0x4cb469(0x140),'Board\x20analysis\x20mode\x20(default:\x20both)')[_0x4cb469(0x120)](['model',_0x4cb469(0x14d),_0x4cb469(0x10b)]))[_0x4cb469(0x129)](_0x4cb469(0xdd),_0x4cb469(0x10a),p)[_0x4cb469(0x129)](_0x4cb469(0x12b),_0x4cb469(0x119))[_0x4cb469(0x142)](new _0x52902c(_0x4cb469(0x144),_0x4cb469(0xff))['choices'](['graph','routes',_0x4cb469(0x14b),'labels','text']))['option'](_0x4cb469(0xfc),_0x4cb469(0x121))[_0x4cb469(0x129)]('--plan-options\x20<json>',_0x4cb469(0xe1))[_0x4cb469(0x129)](_0x4cb469(0xec),_0x4cb469(0x124))[_0x4cb469(0x129)]('--plan-ports',_0x4cb469(0x117))[_0x4cb469(0x129)]('--plan-text\x20<element-id...>',_0x4cb469(0x11b))[_0x4cb469(0x129)](_0x4cb469(0x150),_0x4cb469(0x103),m)[_0x4cb469(0x138)](async _0x23508e=>{const _0x30455f=_0x4cb469;let _0x1f6d9b;try{let _0x1de09c=_0x23508e[_0x30455f(0x13d)]===void 0x0?void 0x0:d(_0x23508e[_0x30455f(0x13d)]),_0x598358=await _0x4c1a2f[_0x30455f(0xe6)]({'unitId':_0x23508e[_0x30455f(0xf9)]});if(_0x598358['unitType']==='slide'&&(_0x23508e[_0x30455f(0x12c)]!==void 0x0||_0x23508e[_0x30455f(0x10d)]!==void 0x0||_0x23508e[_0x30455f(0x135)]!==void 0x0||_0x23508e[_0x30455f(0x13f)]!==void 0x0||_0x23508e[_0x30455f(0x109)]===!0x0||_0x23508e[_0x30455f(0xee)]===!0x0||_0x23508e[_0x30455f(0x12e)]!==void 0x0||_0x23508e[_0x30455f(0x110)]!==void 0x0||_0x23508e[_0x30455f(0x143)]!==void 0x0))throw new a(_0x30455f(0xfb));if(_0x23508e['planLabels']===!0x0&&_0x23508e['mode']===_0x30455f(0x13a))throw new a(_0x30455f(0x108));if(_0x23508e[_0x30455f(0xee)]===!0x0&&_0x23508e['mode']===_0x30455f(0x13a))throw new a(_0x30455f(0x118));let _0x39c575=s(_0x23508e);if(_0x23508e[_0x30455f(0x110)]!==void 0x0&&!_0x39c575&&!_0x23508e['planText']?.[_0x30455f(0xeb)])throw new a(_0x30455f(0x137));if(_0x23508e['planText']!==void 0x0&&_0x23508e[_0x30455f(0x12c)]===_0x30455f(0x13a))throw new a(_0x30455f(0x128));if(_0x23508e[_0x30455f(0x143)]!==void 0x0&&_0x23508e[_0x30455f(0x12c)]===_0x30455f(0x13a))throw new a('--maximum-automatic-label-distance\x20requires\x20rendered\x20or\x20both\x20mode');_0x1f6d9b=await _0x4c1a2f[_0x30455f(0x146)][_0x30455f(0x146)]({..._0x598358,..._0x1de09c===void 0x0?{}:{'pages':_0x1de09c},..._0x598358[_0x30455f(0x11f)]===_0x30455f(0xe0)&&_0x39c575?{'layoutPlan':_0x39c575}:{},..._0x598358[_0x30455f(0x11f)]===_0x30455f(0xe0)&&_0x23508e['mode']!==void 0x0?{'mode':_0x23508e[_0x30455f(0x12c)]}:{},..._0x598358[_0x30455f(0x11f)]===_0x30455f(0xe0)&&_0x23508e['maximumAutomaticLabelDistance']!==void 0x0?{'maximumAutomaticLabelDistance':_0x23508e[_0x30455f(0x143)]}:{},..._0x598358['unitType']===_0x30455f(0xe0)&&_0x23508e[_0x30455f(0x12e)]!==void 0x0?{'textPlanElementIds':_0x23508e[_0x30455f(0x12e)]}:{},..._0x598358['unitType']===_0x30455f(0xe0)&&!_0x39c575&&_0x23508e[_0x30455f(0x110)]!==void 0x0?{'textPlanMaximumWidthGrowth':_0x23508e[_0x30455f(0x110)]}:{},..._0x598358[_0x30455f(0x11f)]===_0x30455f(0xe0)&&_0x23508e['planLabels']===!0x0?{'includeLabelPlan':!0x0}:{},..._0x598358['unitType']===_0x30455f(0xe0)&&_0x23508e['planPorts']===!0x0?{'includePortPlan':!0x0}:{}});}catch(_0x5a0ff9){throw(_0x5a0ff9 instanceof a||_0x472053(_0x5a0ff9)||f(_0x5a0ff9))&&_0x40613c[_0x30455f(0x13c)](''+(_0x30455f(0xf5)in _0x5a0ff9?String(_0x5a0ff9[_0x30455f(0xf5)])+':\x20':'')+_0x5a0ff9['message'],{'code':'unit-layout-lint.failed','exitCode':0x1}),_0x5a0ff9;}let _0x1119f4=_0x1f6d9b[_0x30455f(0x11f)]===_0x30455f(0xe0)&&(!_0x1f6d9b[_0x30455f(0x101)][_0x30455f(0x126)]||_0x1f6d9b[_0x30455f(0x115)][_0x30455f(0xfa)](({severity:_0x558401})=>_0x558401===_0x30455f(0x13c)));if(_0x1119f4&&_0x23508e[_0x30455f(0x136)]===!0x0){let _0x16c73d={..._0x40613c[_0x30455f(0x100)]()};_0x16c73d[_0x30455f(0xe7)]?.(JSON[_0x30455f(0x107)]({'ok':!0x1,'error':{'code':_0x30455f(0x132),'message':'Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage','details':{'report':_0x1f6d9b}}})+'\x0a'),_0x40613c['configureOutput']({'outputError':()=>{}});try{_0x40613c['error'](_0x30455f(0x123),{'code':'UNIT_LAYOUT_LINT_BOARD_FAILED','exitCode':0x2});}catch(_0x318f6b){throw _0x318f6b instanceof Error&&Object[_0x30455f(0x13b)](_0x318f6b,{'details':{'report':_0x1f6d9b}}),_0x318f6b;}finally{_0x40613c[_0x30455f(0x100)](_0x16c73d);}}_0x40613c['configureOutput']()[_0x30455f(0x10f)]?.((_0x23508e[_0x30455f(0x136)]===!0x0?JSON['stringify'](_0x1f6d9b,null,0x2):l(_0x1f6d9b))+'\x0a'),_0x1119f4&&_0x40613c[_0x30455f(0x13c)](_0x30455f(0x102),{'code':_0x30455f(0x132),'exitCode':0x2});});return _0x40613c;}function s(_0xead148){const _0x34e20a=_0x4b92;let {plan:_0x4ef0aa,planIds:_0x45f966,planOptions:_0x63ca0e,textWidthGrowth:_0x4f2591}=_0xead148;if(_0x63ca0e!==void 0x0&&_0x4ef0aa!==_0x34e20a(0xfd))throw new a('--plan-options\x20requires\x20--plan\x20graph');if(_0x4ef0aa===void 0x0){if(_0x45f966!==void 0x0)throw new a('--plan-ids\x20requires\x20--plan');return;}if(_0xead148[_0x34e20a(0x12c)]==='model'||_0xead148['planLabels']||_0xead148[_0x34e20a(0xee)]||_0xead148['planText'])throw new a(_0x34e20a(0x104));if(_0x4f2591!==void 0x0&&_0x4ef0aa!==_0x34e20a(0xfd)&&_0x4ef0aa!==_0x34e20a(0x105))throw new a('--text-width-growth\x20requires\x20graph\x20or\x20text\x20planning');let _0x1133e8=_0x4f2591===void 0x0?{}:{'maximumWidthGrowth':_0x4f2591};if(_0x4ef0aa==='text'){if(!_0x45f966?.[_0x34e20a(0xeb)])throw new a(_0x34e20a(0xdf));return{'mode':_0x4ef0aa,'elementIds':_0x45f966,..._0x1133e8};}return _0x4ef0aa===_0x34e20a(0xfd)?{...c(_0x63ca0e),'mode':_0x4ef0aa,..._0x45f966===void 0x0?{}:{'elementIds':_0x45f966},..._0x1133e8}:{'mode':_0x4ef0aa,..._0x45f966===void 0x0?{}:{'connectorIds':_0x45f966}};}function c(_0x406069){const _0x774b42=_0x4b92;if(_0x406069===void 0x0)return{};let _0x2f90f5=new Set([_0x774b42(0x147),'layerGap','itemGap',_0x774b42(0xdb),'maxNodes',_0x774b42(0x11e),_0x774b42(0x114)]),_0xdda4bd;try{_0xdda4bd=JSON[_0x774b42(0x14c)](_0x406069);}catch{throw new a(_0x774b42(0xe8));}if(!_0xdda4bd||typeof _0xdda4bd!=_0x774b42(0xfe)||Array['isArray'](_0xdda4bd)||Object['keys'](_0xdda4bd)[_0x774b42(0xfa)](_0x4c0579=>!_0x2f90f5[_0x774b42(0xf6)](_0x4c0579)))throw new a(_0x774b42(0xe2));return _0xdda4bd;}function l(_0x5bfa31){const _0x5d0382=_0x4b92;if(_0x5bfa31[_0x5d0382(0x11f)]===_0x5d0382(0xe0)){let _0x2645b8=[_0x5d0382(0xe3)+_0x5bfa31[_0x5d0382(0xf4)]+'\x20('+String(_0x5bfa31[_0x5d0382(0x101)][_0x5d0382(0x13d)][_0x5d0382(0xeb)])+'\x20pages,\x20'+_0x5bfa31['mode']+')'];for(let _0x2802e7 of _0x5bfa31[_0x5d0382(0x115)])_0x2645b8[_0x5d0382(0xf2)](_0x5d0382(0xea)+String(_0x2802e7['page'])+'\x20\x20'+_0x2802e7[_0x5d0382(0x127)]+'\x20\x20'+_0x2802e7['severity']+'\x20\x20'+_0x2802e7['rule']+'\x20\x20'+_0x2802e7['id']);for(let _0x72d8a of _0x5bfa31['coverage']['incomplete'])_0x2645b8[_0x5d0382(0xf2)](_0x5d0382(0xde)+_0x72d8a[_0x5d0382(0x148)]+'\x20\x20'+_0x72d8a[_0x5d0382(0x127)]+'\x20\x20'+_0x72d8a[_0x5d0382(0x11d)]);for(let _0x599843 of _0x5bfa31[_0x5d0382(0x101)][_0x5d0382(0x131)])_0x2645b8['push'](_0x5d0382(0x10e)+_0x599843);return _0x2645b8['join']('\x0a');}if(_0x5bfa31['findings'][_0x5d0382(0xeb)]===0x0)return'Slide\x20layout\x20lint:\x20no\x20findings\x20('+String(_0x5bfa31[_0x5d0382(0x101)]['pages'][_0x5d0382(0xeb)])+_0x5d0382(0xf1);let _0x64abb7=[_0x5d0382(0x139)+String(_0x5bfa31[_0x5d0382(0x115)][_0x5d0382(0xeb)])+_0x5d0382(0x12a)+String(_0x5bfa31[_0x5d0382(0x101)][_0x5d0382(0x13d)][_0x5d0382(0xeb)])+_0x5d0382(0xf1)];for(let _0x5c1d92 of _0x5bfa31['findings'])_0x64abb7[_0x5d0382(0xf2)]('page\x20'+String(_0x5c1d92[_0x5d0382(0xf8)])+'\x20\x20'+_0x5c1d92[_0x5d0382(0x145)]+'\x20\x20'+_0x5c1d92['id']),_0x64abb7[_0x5d0382(0xf2)]('\x20\x20'+_0x5c1d92['detail']);return _0x64abb7[_0x5d0382(0xe4)]('\x0a');}function u(_0x280e61){return d(_0x280e61);}function d(_0x44765c){const _0x175e10=_0x4b92;if(_0x44765c[_0x175e10(0x11c)]()==='all')return;if(_0x44765c[_0x175e10(0x11c)]()==='')throw new a(_0x175e10(0x116));let _0x394600=[];for(let _0x2d12d5 of _0x44765c[_0x175e10(0x130)](',')){let _0x49f629=_0x2d12d5['trim']();if(_0x49f629==='')throw new a('--pages\x20contains\x20an\x20empty\x20selector');let _0x318d6b=/^(\d+)(?:-(\d+))?$/[_0x175e10(0xf0)](_0x49f629);if(_0x318d6b===null){_0x394600[_0x175e10(0xf2)](_0x49f629);continue;}let _0xb53317=Number(_0x318d6b[0x1]),_0x2dcb2b=Number(_0x318d6b[0x2]??_0x318d6b[0x1]);if(_0xb53317<0x1||_0x2dcb2b<_0xb53317)throw new a('Invalid\x20page\x20selector:\x20'+_0x49f629);if(_0x394600[_0x175e10(0xeb)]+_0x2dcb2b-_0xb53317+0x1>i)throw new a(_0x175e10(0x133));for(let _0x1a3b35=_0xb53317;_0x1a3b35<=_0x2dcb2b;_0x1a3b35+=0x1)_0x394600[_0x175e10(0xf2)](_0x1a3b35);}return _0x394600;}function f(_0x456280){const _0x267616=_0x4b92;return _0x456280 instanceof Error&&typeof _0x456280[_0x267616(0xf5)]==_0x267616(0x10c);}function p(_0x298cc7){const _0x527387=_0x4b92;let _0x545bcf=Number(_0x298cc7);if(_0x298cc7[_0x527387(0x11c)]()===''||!Number[_0x527387(0x12f)](_0x545bcf)||_0x545bcf<0x0)throw new _0x420daa(_0x527387(0x122));return _0x545bcf;}function m(_0x3b90d4){const _0x20901d=_0x4b92;let _0x2977b3=Number(_0x3b90d4);if(_0x3b90d4[_0x20901d(0x11c)]()===''||!Number['isFinite'](_0x2977b3)||_0x2977b3<0x1||_0x2977b3>0x2)throw new _0x420daa(_0x20901d(0xf7));return _0x2977b3;}export{a as UnitLayoutLintCommandInputError,o as createUnitLayoutLintCommand,u as parseUnitLayoutLintPages,l 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.6.0",
4
+ "version": "1.6.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.6.0"
21
+ "@univer-cli/unit-layout-lint": "1.6.2"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"