@univer-cli/unit-layout-lint-command 1.6.2 → 1.6.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 _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};
1
+ (function(_0x52192e,_0x45ae41){const _0x3c6139=_0x58fb,_0x4f0f39=_0x52192e();while(!![]){try{const _0xe6aebe=-parseInt(_0x3c6139(0x1e4))/0x1*(-parseInt(_0x3c6139(0x1b6))/0x2)+parseInt(_0x3c6139(0x1c9))/0x3+-parseInt(_0x3c6139(0x1c6))/0x4+parseInt(_0x3c6139(0x194))/0x5+-parseInt(_0x3c6139(0x1a6))/0x6*(parseInt(_0x3c6139(0x18c))/0x7)+-parseInt(_0x3c6139(0x1d5))/0x8+parseInt(_0x3c6139(0x1f2))/0x9;if(_0xe6aebe===_0x45ae41)break;else _0x4f0f39['push'](_0x4f0f39['shift']());}catch(_0x55dff){_0x4f0f39['push'](_0x4f0f39['shift']());}}}(_0x3c18,0x5dacf));import{isUnitLayoutLintError as _0xe2b53}from'@univer-cli/unit-layout-lint';import{Command as _0x311e1d,InvalidArgumentError as _0xfca4c5,Option as _0xd184de}from'commander';var i=0x2710,a=class extends Error{constructor(_0x2d9346){const _0x2843ed=_0x58fb;super(_0x2d9346),this[_0x2843ed(0x1c0)]=_0x2843ed(0x1a0);}};function o(_0x49d933){const _0x28adf7=_0x58fb;let _0x1725fa=new _0x311e1d(_0x28adf7(0x1e1))[_0x28adf7(0x196)](_0x28adf7(0x1ef))[_0x28adf7(0x199)]('--unit\x20<unit-id>',_0x28adf7(0x1eb))[_0x28adf7(0x1ca)](_0x28adf7(0x1da),_0x28adf7(0x1c3))[_0x28adf7(0x1b2)](new _0xd184de(_0x28adf7(0x1dd),_0x28adf7(0x1af))[_0x28adf7(0x1a9)]([_0x28adf7(0x1e9),_0x28adf7(0x1d2),_0x28adf7(0x18b)]))[_0x28adf7(0x1ca)](_0x28adf7(0x1ae),_0x28adf7(0x19b),p)[_0x28adf7(0x1ca)](_0x28adf7(0x18f),'write\x20the\x20complete\x20lint\x20report\x20as\x20JSON')['addOption'](new _0xd184de(_0x28adf7(0x188),_0x28adf7(0x192))[_0x28adf7(0x1a9)]([_0x28adf7(0x19a),_0x28adf7(0x18e),_0x28adf7(0x193),'labels',_0x28adf7(0x1b5)]))['option'](_0x28adf7(0x1ab),'limit\x20the\x20layout\x20plan\x20to\x20generated\x20element\x20or\x20connector\x20IDs')[_0x28adf7(0x1ca)](_0x28adf7(0x1bd),_0x28adf7(0x1cc))[_0x28adf7(0x1ca)](_0x28adf7(0x1cd),_0x28adf7(0x190))[_0x28adf7(0x1ca)]('--plan-ports',_0x28adf7(0x1d7))[_0x28adf7(0x1ca)](_0x28adf7(0x1a4),'include\x20a\x20read-only\x20measured\x20text-size\x20plan\x20for\x20selected\x20generated\x20Board\x20shapes')[_0x28adf7(0x1ca)]('--text-width-growth\x20<ratio>',_0x28adf7(0x1d3),m)['action'](async _0x4c10c1=>{const _0x5c9841=_0x28adf7;let _0x36fd2b;try{let _0x3dc4d3=_0x4c10c1[_0x5c9841(0x1b9)]===void 0x0?void 0x0:d(_0x4c10c1[_0x5c9841(0x1b9)]),_0x4fa84a=await _0x49d933[_0x5c9841(0x195)]({'unitId':_0x4c10c1[_0x5c9841(0x1b0)]});if(_0x4fa84a[_0x5c9841(0x1e5)]==='slide'&&(_0x4c10c1[_0x5c9841(0x1db)]!==void 0x0||_0x4c10c1[_0x5c9841(0x1d1)]!==void 0x0||_0x4c10c1['planIds']!==void 0x0||_0x4c10c1['planOptions']!==void 0x0||_0x4c10c1[_0x5c9841(0x1c5)]===!0x0||_0x4c10c1[_0x5c9841(0x1ad)]===!0x0||_0x4c10c1['planText']!==void 0x0||_0x4c10c1['textWidthGrowth']!==void 0x0||_0x4c10c1[_0x5c9841(0x1aa)]!==void 0x0))throw new a(_0x5c9841(0x1a3));if(_0x4c10c1[_0x5c9841(0x1c5)]===!0x0&&_0x4c10c1[_0x5c9841(0x1db)]===_0x5c9841(0x1e9))throw new a('--plan-labels\x20requires\x20rendered\x20or\x20both\x20mode');if(_0x4c10c1['planPorts']===!0x0&&_0x4c10c1[_0x5c9841(0x1db)]===_0x5c9841(0x1e9))throw new a(_0x5c9841(0x1f5));let _0x3f6595=s(_0x4c10c1);if(_0x4c10c1[_0x5c9841(0x1e3)]!==void 0x0&&!_0x3f6595&&!_0x4c10c1[_0x5c9841(0x197)]?.[_0x5c9841(0x189)])throw new a(_0x5c9841(0x1ed));if(_0x4c10c1[_0x5c9841(0x197)]!==void 0x0&&_0x4c10c1[_0x5c9841(0x1db)]==='model')throw new a(_0x5c9841(0x19f));if(_0x4c10c1[_0x5c9841(0x1aa)]!==void 0x0&&_0x4c10c1['mode']===_0x5c9841(0x1e9))throw new a(_0x5c9841(0x1cf));_0x36fd2b=await _0x49d933['lint'][_0x5c9841(0x1e1)]({..._0x4fa84a,..._0x3dc4d3===void 0x0?{}:{'pages':_0x3dc4d3},..._0x4fa84a[_0x5c9841(0x1e5)]===_0x5c9841(0x1a8)&&_0x3f6595?{'layoutPlan':_0x3f6595}:{},..._0x4fa84a['unitType']===_0x5c9841(0x1a8)&&_0x4c10c1['mode']!==void 0x0?{'mode':_0x4c10c1['mode']}:{},..._0x4fa84a[_0x5c9841(0x1e5)]===_0x5c9841(0x1a8)&&_0x4c10c1[_0x5c9841(0x1aa)]!==void 0x0?{'maximumAutomaticLabelDistance':_0x4c10c1[_0x5c9841(0x1aa)]}:{},..._0x4fa84a[_0x5c9841(0x1e5)]==='board'&&_0x4c10c1[_0x5c9841(0x197)]!==void 0x0?{'textPlanElementIds':_0x4c10c1['planText']}:{},..._0x4fa84a[_0x5c9841(0x1e5)]===_0x5c9841(0x1a8)&&!_0x3f6595&&_0x4c10c1['textWidthGrowth']!==void 0x0?{'textPlanMaximumWidthGrowth':_0x4c10c1[_0x5c9841(0x1e3)]}:{},..._0x4fa84a['unitType']===_0x5c9841(0x1a8)&&_0x4c10c1[_0x5c9841(0x1c5)]===!0x0?{'includeLabelPlan':!0x0}:{},..._0x4fa84a[_0x5c9841(0x1e5)]==='board'&&_0x4c10c1[_0x5c9841(0x1ad)]===!0x0?{'includePortPlan':!0x0}:{}});}catch(_0x2ac679){throw(_0x2ac679 instanceof a||_0xe2b53(_0x2ac679)||f(_0x2ac679))&&_0x1725fa[_0x5c9841(0x1be)](''+('code'in _0x2ac679?String(_0x2ac679[_0x5c9841(0x198)])+':\x20':'')+_0x2ac679[_0x5c9841(0x18a)],{'code':_0x5c9841(0x1b7),'exitCode':0x1}),_0x2ac679;}let _0x570f2d=_0x36fd2b[_0x5c9841(0x1e5)]===_0x5c9841(0x1a8)&&(!_0x36fd2b[_0x5c9841(0x1de)]['complete']||_0x36fd2b[_0x5c9841(0x1a5)][_0x5c9841(0x1b3)](({severity:_0x2316d9})=>_0x2316d9===_0x5c9841(0x1be)));if(_0x570f2d&&_0x4c10c1[_0x5c9841(0x1a7)]===!0x0){let _0x1f00db={..._0x1725fa[_0x5c9841(0x1dc)]()};_0x1f00db[_0x5c9841(0x1ee)]?.(JSON[_0x5c9841(0x1d6)]({'ok':!0x1,'error':{'code':'UNIT_LAYOUT_LINT_BOARD_FAILED','message':'Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage','details':{'report':_0x36fd2b}}})+'\x0a'),_0x1725fa[_0x5c9841(0x1dc)]({'outputError':()=>{}});try{_0x1725fa['error'](_0x5c9841(0x1f3),{'code':_0x5c9841(0x1ac),'exitCode':0x2});}catch(_0x5f37ac){throw _0x5f37ac instanceof Error&&Object['assign'](_0x5f37ac,{'details':{'report':_0x36fd2b}}),_0x5f37ac;}finally{_0x1725fa[_0x5c9841(0x1dc)](_0x1f00db);}}_0x1725fa[_0x5c9841(0x1dc)]()['writeOut']?.((_0x4c10c1[_0x5c9841(0x1a7)]===!0x0?JSON[_0x5c9841(0x1d6)](_0x36fd2b,null,0x2):l(_0x36fd2b))+'\x0a'),_0x570f2d&&_0x1725fa[_0x5c9841(0x1be)](_0x5c9841(0x1c2),{'code':_0x5c9841(0x1ac),'exitCode':0x2});});return _0x1725fa;}function s(_0x5d7a5b){const _0x55e9f0=_0x58fb;let {plan:_0x302481,planIds:_0x184d46,planOptions:_0x23079f,textWidthGrowth:_0x528c4d}=_0x5d7a5b;if(_0x23079f!==void 0x0&&_0x302481!==_0x55e9f0(0x19a))throw new a(_0x55e9f0(0x1d0));if(_0x302481===void 0x0){if(_0x184d46!==void 0x0)throw new a(_0x55e9f0(0x1cb));return;}if(_0x5d7a5b[_0x55e9f0(0x1db)]===_0x55e9f0(0x1e9)||_0x5d7a5b[_0x55e9f0(0x1c5)]||_0x5d7a5b['planPorts']||_0x5d7a5b['planText'])throw new a(_0x55e9f0(0x1ea));if(_0x528c4d!==void 0x0&&_0x302481!==_0x55e9f0(0x19a)&&_0x302481!=='text')throw new a(_0x55e9f0(0x1a1));let _0x4afc60=_0x528c4d===void 0x0?{}:{'maximumWidthGrowth':_0x528c4d};if(_0x302481===_0x55e9f0(0x1b5)){if(!_0x184d46?.[_0x55e9f0(0x189)])throw new a('--plan\x20text\x20requires\x20--plan-ids');return{'mode':_0x302481,'elementIds':_0x184d46,..._0x4afc60};}return _0x302481===_0x55e9f0(0x19a)?{...c(_0x23079f),'mode':_0x302481,..._0x184d46===void 0x0?{}:{'elementIds':_0x184d46},..._0x4afc60}:{'mode':_0x302481,..._0x184d46===void 0x0?{}:{'connectorIds':_0x184d46}};}function c(_0x27a0e9){const _0x159542=_0x58fb;if(_0x27a0e9===void 0x0)return{};let _0x44f307=new Set(['direction',_0x159542(0x1d8),_0x159542(0x1a2),_0x159542(0x1ba),'maxNodes',_0x159542(0x1c1),_0x159542(0x1e8)]),_0x9269a3;try{_0x9269a3=JSON['parse'](_0x27a0e9);}catch{throw new a(_0x159542(0x1e6));}if(!_0x9269a3||typeof _0x9269a3!=_0x159542(0x1e7)||Array['isArray'](_0x9269a3)||Object['keys'](_0x9269a3)[_0x159542(0x1b3)](_0x5efc51=>!_0x44f307['has'](_0x5efc51)))throw new a(_0x159542(0x1e2));return _0x9269a3;}function _0x3c18(){const _0x3dfe05=['include\x20a\x20read-only\x20measured\x20Board\x20label\x20repair\x20plan','Slide\x20layout\x20lint:\x20','include\x20a\x20read-only\x20native\x20Board\x20layout\x20plan','ports','1801770eajIoa','loadUnit','description','planText','code','requiredOption','graph','require\x20native\x20automatic\x20Board\x20labels\x20within\x20this\x20distance\x20of\x20their\x20rendered\x20stroke','Invalid\x20page\x20selector:\x20','coverage:\x20','pageId','--plan-text\x20requires\x20rendered\x20or\x20both\x20mode','UnitLayoutLintCommandInputError','--text-width-growth\x20requires\x20graph\x20or\x20text\x20planning','itemGap','--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-text\x20<element-id...>','findings','347430qISEjj','json','board','choices','maximumAutomaticLabelDistance','--plan-ids\x20<id...>','UNIT_LAYOUT_LINT_BOARD_FAILED','planPorts','--maximum-automatic-label-distance\x20<board-units>','Board\x20analysis\x20mode\x20(default:\x20both)','unit','page\x20','addOption','some','split','text','118zwNgVI','unit-layout-lint.failed','Board\x20layout\x20lint:\x20','pages','origin','Slide\x20layout\x20lint:\x20no\x20findings\x20(','must\x20be\x20a\x20finite\x20ratio\x20from\x201\x20to\x202','--plan-options\x20<json>','error','isFinite','name','fixedElementIds','Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage;\x20see\x20the\x20report','Pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','--pages\x20cannot\x20be\x20empty','planLabels','383388KLpRGe','\x20findings\x20(','string','693429ccovYT','option','--plan-ids\x20requires\x20--plan','set\x20graph\x20layout\x20options\x20as\x20a\x20JSON\x20object','--plan-labels','must\x20be\x20a\x20finite\x20non-negative\x20number\x20of\x20Board\x20units','--maximum-automatic-label-distance\x20requires\x20rendered\x20or\x20both\x20mode','--plan-options\x20requires\x20--plan\x20graph','plan','rendered','limit\x20text\x20sizing\x20width\x20growth\x20to\x20a\x20finite\x20ratio\x20from\x201\x20to\x202\x20for\x20graph\x20or\x20text\x20planning','push','4408840hGbCtT','stringify','include\x20a\x20read-only\x20native\x20Board\x20automatic\x20port-order\x20plan','layerGap','\x20pages\x20checked)','--pages\x20<pages>','mode','configureOutput','--mode\x20<mode>','coverage','trim','incomplete\x20\x20','lint','--plan-options\x20accepts\x20direction,\x20layerGap,\x20itemGap,\x20origin,\x20maxNodes,\x20fixedElementIds\x20and\x20feedbackConnectorIds','textWidthGrowth','4611NRtpaj','unitType','--plan-options\x20must\x20contain\x20a\x20JSON\x20object','object','feedbackConnectorIds','model','--plan\x20requires\x20rendered\x20or\x20both\x20mode\x20and\x20cannot\x20be\x20combined\x20with\x20another\x20plan','Slide\x20or\x20Board\x20Unit\x20to\x20lint','join','--text-width-growth\x20requires\x20--plan-text\x20or\x20--plan\x20graph/text','writeErr','Lint\x20Slide\x20or\x20Board\x20layout\x20with\x20SDK\x20geometry\x20evidence','--pages\x20expands\x20to\x20too\x20many\x20pages','severity','7236504AtDhvJ','Board\x20layout\x20lint\x20has\x20errors\x20or\x20incomplete\x20coverage','rule','--plan-ports\x20requires\x20rendered\x20or\x20both\x20mode','--plan\x20<mode>','length','message','both','77llReVI','source','routes','--json'];_0x3c18=function(){return _0x3dfe05;};return _0x3c18();}function l(_0x4bdc92){const _0x17f9bb=_0x58fb;if(_0x4bdc92[_0x17f9bb(0x1e5)]==='board'){let _0x489544=[_0x17f9bb(0x1b8)+_0x4bdc92['status']+'\x20('+String(_0x4bdc92[_0x17f9bb(0x1de)][_0x17f9bb(0x1b9)][_0x17f9bb(0x189)])+'\x20pages,\x20'+_0x4bdc92[_0x17f9bb(0x1db)]+')'];for(let _0x14bc0c of _0x4bdc92[_0x17f9bb(0x1a5)])_0x489544[_0x17f9bb(0x1d4)](_0x17f9bb(0x1b1)+String(_0x14bc0c['page'])+'\x20\x20'+_0x14bc0c[_0x17f9bb(0x18d)]+'\x20\x20'+_0x14bc0c[_0x17f9bb(0x1f1)]+'\x20\x20'+_0x14bc0c[_0x17f9bb(0x1f4)]+'\x20\x20'+_0x14bc0c['id']);for(let _0x5549d8 of _0x4bdc92[_0x17f9bb(0x1de)]['incomplete'])_0x489544[_0x17f9bb(0x1d4)](_0x17f9bb(0x1e0)+_0x5549d8[_0x17f9bb(0x19e)]+'\x20\x20'+_0x5549d8[_0x17f9bb(0x18d)]+'\x20\x20'+_0x5549d8['reason']);for(let _0x5ba7b0 of _0x4bdc92[_0x17f9bb(0x1de)]['limitations'])_0x489544[_0x17f9bb(0x1d4)](_0x17f9bb(0x19d)+_0x5ba7b0);return _0x489544[_0x17f9bb(0x1ec)]('\x0a');}if(_0x4bdc92[_0x17f9bb(0x1a5)][_0x17f9bb(0x189)]===0x0)return _0x17f9bb(0x1bb)+String(_0x4bdc92['coverage'][_0x17f9bb(0x1b9)]['length'])+_0x17f9bb(0x1d9);let _0x38f7a2=[_0x17f9bb(0x191)+String(_0x4bdc92['findings'][_0x17f9bb(0x189)])+_0x17f9bb(0x1c7)+String(_0x4bdc92[_0x17f9bb(0x1de)]['pages'][_0x17f9bb(0x189)])+_0x17f9bb(0x1d9)];for(let _0x585847 of _0x4bdc92[_0x17f9bb(0x1a5)])_0x38f7a2[_0x17f9bb(0x1d4)]('page\x20'+String(_0x585847['page'])+'\x20\x20'+_0x585847[_0x17f9bb(0x1f4)]+'\x20\x20'+_0x585847['id']),_0x38f7a2[_0x17f9bb(0x1d4)]('\x20\x20'+_0x585847['detail']);return _0x38f7a2[_0x17f9bb(0x1ec)]('\x0a');}function u(_0x40bfd7){return d(_0x40bfd7);}function d(_0x458c6d){const _0x124a4f=_0x58fb;if(_0x458c6d[_0x124a4f(0x1df)]()==='all')return;if(_0x458c6d[_0x124a4f(0x1df)]()==='')throw new a(_0x124a4f(0x1c4));let _0x485d7b=[];for(let _0x44b1d3 of _0x458c6d[_0x124a4f(0x1b4)](',')){let _0x42fe2a=_0x44b1d3[_0x124a4f(0x1df)]();if(_0x42fe2a==='')throw new a('--pages\x20contains\x20an\x20empty\x20selector');let _0x4bc8a8=/^(\d+)(?:-(\d+))?$/['exec'](_0x42fe2a);if(_0x4bc8a8===null){_0x485d7b[_0x124a4f(0x1d4)](_0x42fe2a);continue;}let _0x421442=Number(_0x4bc8a8[0x1]),_0x403113=Number(_0x4bc8a8[0x2]??_0x4bc8a8[0x1]);if(_0x421442<0x1||_0x403113<_0x421442)throw new a(_0x124a4f(0x19c)+_0x42fe2a);if(_0x485d7b[_0x124a4f(0x189)]+_0x403113-_0x421442+0x1>i)throw new a(_0x124a4f(0x1f0));for(let _0x42ae27=_0x421442;_0x42ae27<=_0x403113;_0x42ae27+=0x1)_0x485d7b[_0x124a4f(0x1d4)](_0x42ae27);}return _0x485d7b;}function f(_0x25d351){const _0x17a38b=_0x58fb;return _0x25d351 instanceof Error&&typeof _0x25d351[_0x17a38b(0x198)]==_0x17a38b(0x1c8);}function p(_0x5825df){const _0x1ebe48=_0x58fb;let _0x26578a=Number(_0x5825df);if(_0x5825df[_0x1ebe48(0x1df)]()===''||!Number[_0x1ebe48(0x1bf)](_0x26578a)||_0x26578a<0x0)throw new _0xfca4c5(_0x1ebe48(0x1ce));return _0x26578a;}function _0x58fb(_0x5650e5,_0x50286a){_0x5650e5=_0x5650e5-0x188;const _0x3c1866=_0x3c18();let _0x58fb11=_0x3c1866[_0x5650e5];return _0x58fb11;}function m(_0x2c9e82){const _0x229d92=_0x58fb;let _0x5c4459=Number(_0x2c9e82);if(_0x2c9e82['trim']()===''||!Number[_0x229d92(0x1bf)](_0x5c4459)||_0x5c4459<0x1||_0x5c4459>0x2)throw new _0xfca4c5(_0x229d92(0x1bc));return _0x5c4459;}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.2",
4
+ "version": "1.6.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.6.2"
21
+ "@univer-cli/unit-layout-lint": "1.6.3"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"