@univer-cli/unit-layout-lint-command 1.0.0-rc.0 → 1.0.0
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
|
-
|
|
1
|
+
(function(_0x48d682,_0x45b8a6){const _0x15207c=_0x24fb,_0x5758a5=_0x48d682();while(!![]){try{const _0x2f3772=-parseInt(_0x15207c(0xab))/0x1+-parseInt(_0x15207c(0x8f))/0x2*(parseInt(_0x15207c(0xa3))/0x3)+parseInt(_0x15207c(0xae))/0x4+parseInt(_0x15207c(0x9d))/0x5*(-parseInt(_0x15207c(0x9e))/0x6)+parseInt(_0x15207c(0xac))/0x7+-parseInt(_0x15207c(0xa8))/0x8+parseInt(_0x15207c(0x99))/0x9;if(_0x2f3772===_0x45b8a6)break;else _0x5758a5['push'](_0x5758a5['shift']());}catch(_0x281ba0){_0x5758a5['push'](_0x5758a5['shift']());}}}(_0x33fb,0x90522));import{isUnitLayoutLintError as _0x54d0b5}from'@univer-cli/unit-layout-lint';function _0x33fb(){const _0x5aaf07=['Slide\x20layout\x20lint:\x20no\x20findings\x20(','split','rule','3FNkhjp','trim','join','writeOut','--pages\x20cannot\x20be\x20empty','8249624QdunpI','push','Invalid\x20page\x20selector:\x20','804242ZJborW','2931103FlXjOl','unit','4568764chtIzE','Lint\x20browser-rendered\x20Unit\x20layout\x20(currently\x20Slide\x20only)','option','--pages\x20<pages>','exec','coverage','stringify','--pages\x20contains\x20an\x20empty\x20selector','configureOutput','json','code','Slide\x20pages\x20or\x20page\x20IDs,\x20for\x20example\x201,3-5,cover','length','all','write\x20the\x20complete\x20lint\x20report\x20as\x20JSON','requiredOption','detail','--unit\x20<unit-id>','description','action','801594ZgwRDr','pages','findings','loadUnit','string','--json','\x20findings\x20(','page\x20','lint','page','16091523yLfQQF','message','unit-layout-lint.failed','name','289715TYdCuh','54JNthcj','Unit\x20to\x20lint;\x20currently\x20requires\x20a\x20Slide\x20Unit'];_0x33fb=function(){return _0x5aaf07;};return _0x33fb();}function _0x24fb(_0x3bd9ba,_0x3c2de4){_0x3bd9ba=_0x3bd9ba-0x8c;const _0x33fbd0=_0x33fb();let _0x24fbbf=_0x33fbd0[_0x3bd9ba];return _0x24fbbf;}import{Command as _0x5809ad}from'commander';var n=0x2710,r=class extends Error{constructor(_0x47b393){const _0x366d77=_0x24fb;super(_0x47b393),this[_0x366d77(0x9c)]='UnitLayoutLintCommandInputError';}};function i(_0x47d1f2){const _0x1e5119=_0x24fb;let _0x39789c=new _0x5809ad('lint')[_0x1e5119(0x8d)](_0x1e5119(0xaf))[_0x1e5119(0xbd)](_0x1e5119(0x8c),_0x1e5119(0x9f))[_0x1e5119(0xb0)](_0x1e5119(0xb1),_0x1e5119(0xb9))[_0x1e5119(0xb0)](_0x1e5119(0x94),_0x1e5119(0xbc))[_0x1e5119(0x8e)](async _0x1c615f=>{const _0x5dab0a=_0x1e5119;let _0x4fda2e;try{let _0x859b09=_0x1c615f['pages']===void 0x0?void 0x0:s(_0x1c615f['pages']),_0x297f68=await _0x47d1f2[_0x5dab0a(0x92)]({'unitId':_0x1c615f[_0x5dab0a(0xad)]});_0x4fda2e=await _0x47d1f2[_0x5dab0a(0x97)][_0x5dab0a(0x97)]({..._0x297f68,..._0x859b09===void 0x0?{}:{'pages':_0x859b09}});}catch(_0x302bb9){throw(_0x302bb9 instanceof r||_0x54d0b5(_0x302bb9)||c(_0x302bb9))&&_0x39789c['error'](''+(_0x5dab0a(0xb8)in _0x302bb9?String(_0x302bb9['code'])+':\x20':'')+_0x302bb9[_0x5dab0a(0x9a)],{'code':_0x5dab0a(0x9b),'exitCode':0x1}),_0x302bb9;}_0x39789c[_0x5dab0a(0xb6)]()[_0x5dab0a(0xa6)]?.((_0x1c615f[_0x5dab0a(0xb7)]===!0x0?JSON[_0x5dab0a(0xb4)](_0x4fda2e,null,0x2):a(_0x4fda2e))+'\x0a');});return _0x39789c;}function a(_0x2f3af2){const _0x2a2c41=_0x24fb;if(_0x2f3af2[_0x2a2c41(0x91)]['length']===0x0)return _0x2a2c41(0xa0)+String(_0x2f3af2[_0x2a2c41(0xb3)]['pages']['length'])+'\x20pages\x20checked)';let _0x54392c=['Slide\x20layout\x20lint:\x20'+String(_0x2f3af2['findings'][_0x2a2c41(0xba)])+_0x2a2c41(0x95)+String(_0x2f3af2[_0x2a2c41(0xb3)][_0x2a2c41(0x90)][_0x2a2c41(0xba)])+'\x20pages\x20checked)'];for(let _0x132e63 of _0x2f3af2['findings'])_0x54392c['push'](_0x2a2c41(0x96)+String(_0x132e63[_0x2a2c41(0x98)])+'\x20\x20'+_0x132e63[_0x2a2c41(0xa2)]+'\x20\x20'+_0x132e63['id']),_0x54392c[_0x2a2c41(0xa9)]('\x20\x20'+_0x132e63[_0x2a2c41(0xbe)]);return _0x54392c[_0x2a2c41(0xa5)]('\x0a');}function o(_0x394e63){return s(_0x394e63);}function s(_0x10cb3c){const _0x29a373=_0x24fb;if(_0x10cb3c[_0x29a373(0xa4)]()===_0x29a373(0xbb))return;if(_0x10cb3c['trim']()==='')throw new r(_0x29a373(0xa7));let _0x4616a2=[];for(let _0x5a34a8 of _0x10cb3c[_0x29a373(0xa1)](',')){let _0x31e0eb=_0x5a34a8['trim']();if(_0x31e0eb==='')throw new r(_0x29a373(0xb5));let _0x2fe54f=/^(\d+)(?:-(\d+))?$/[_0x29a373(0xb2)](_0x31e0eb);if(_0x2fe54f===null){_0x4616a2[_0x29a373(0xa9)](_0x31e0eb);continue;}let _0xd4a33d=Number(_0x2fe54f[0x1]),_0x4ee78f=Number(_0x2fe54f[0x2]??_0x2fe54f[0x1]);if(_0xd4a33d<0x1||_0x4ee78f<_0xd4a33d)throw new r(_0x29a373(0xaa)+_0x31e0eb);if(_0x4616a2[_0x29a373(0xba)]+_0x4ee78f-_0xd4a33d+0x1>n)throw new r('--pages\x20expands\x20to\x20too\x20many\x20pages');for(let _0x17a26c=_0xd4a33d;_0x17a26c<=_0x4ee78f;_0x17a26c+=0x1)_0x4616a2['push'](_0x17a26c);}return _0x4616a2;}function c(_0x4e12ea){const _0x45f18b=_0x24fb;return _0x4e12ea instanceof Error&&typeof _0x4e12ea[_0x45f18b(0xb8)]==_0x45f18b(0x93);}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
|
|
4
|
+
"version": "1.0.0",
|
|
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
|
|
21
|
+
"@univer-cli/unit-layout-lint": "1.0.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|