@univer-cli/doc-typst-facade-command 1.6.1 → 1.7.0-alpha.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.
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(_0x1ba00f,_0x2696b6){const _0x36b0fb=_0x2f55,_0x2ffacd=_0x1ba00f();while(!![]){try{const _0x37f433=parseInt(_0x36b0fb(0x143))/0x1*(-parseInt(_0x36b0fb(0x149))/0x2)+parseInt(_0x36b0fb(0x12a))/0x3*(-parseInt(_0x36b0fb(0x13d))/0x4)+parseInt(_0x36b0fb(0x13f))/0x5+-parseInt(_0x36b0fb(0x12d))/0x6+parseInt(_0x36b0fb(0x129))/0x7+-parseInt(_0x36b0fb(0x142))/0x8+parseInt(_0x36b0fb(0x14c))/0x9;if(_0x37f433===_0x2696b6)break;else _0x2ffacd['push'](_0x2ffacd['shift']());}catch(_0x3a6968){_0x2ffacd['push'](_0x2ffacd['shift']());}}}(_0x23ae,0xed427));import{mkdir as _0xd95a4a,writeFile as _0x24cc99}from'node:fs/promises';function _0x2f55(_0x12469b,_0x99de31){_0x12469b=_0x12469b-0x127;const _0x23ae6b=_0x23ae();let _0x2f557f=_0x23ae6b[_0x12469b];return _0x2f557f;}import{dirname as _0x2bd5bd,resolve as _0x46bb5a}from'node:path';import{compileDocTypstBundle as _0x3b089b,isDocTypstFacadeError as _0x46f9fb}from'@univer-cli/doc-typst-facade';import{Command as _0xb94092}from'commander';function s(_0x13c71e={}){const _0x1ed383=_0x2f55;let _0x298d7e=_0x13c71e[_0x1ed383(0x131)]??_0x3b089b,_0x440217=new _0xb94092('compile-typst')[_0x1ed383(0x12e)](_0x1ed383(0x146))[_0x1ed383(0x13a)]('<bundle>',_0x1ed383(0x14b))[_0x1ed383(0x128)](_0x1ed383(0x14e),_0x1ed383(0x132))[_0x1ed383(0x14d)](_0x1ed383(0x137),_0x1ed383(0x14a))[_0x1ed383(0x14d)](_0x1ed383(0x148),_0x1ed383(0x134))[_0x1ed383(0x14d)](_0x1ed383(0x127),_0x1ed383(0x138))['action'](async(_0x3247ae,_0x490a2a)=>{const _0xefe4e7=_0x1ed383;try{let _0x3bfb56=_0x490a2a[_0xefe4e7(0x12c)]===void 0x0?{}:{'previewDir':_0x490a2a[_0xefe4e7(0x12c)]},_0x117791=await _0x298d7e(_0x3247ae,_0x3bfb56),_0x1eca09=_0x46bb5a(_0x490a2a[_0xefe4e7(0x140)]);await _0xd95a4a(_0x2bd5bd(_0x1eca09),{'recursive':!0x0}),await _0x24cc99(_0x1eca09,_0x117791[_0xefe4e7(0x130)],_0xefe4e7(0x141));let _0x42bee8;_0x490a2a['diagnosticsOut']!==void 0x0&&(_0x42bee8=_0x46bb5a(_0x490a2a[_0xefe4e7(0x13e)]),await _0xd95a4a(_0x2bd5bd(_0x42bee8),{'recursive':!0x0}),await _0x24cc99(_0x42bee8,JSON[_0xefe4e7(0x12b)]({'schemaVersion':0x1,'diagnostics':_0x117791[_0xefe4e7(0x145)]},null,0x2)+'\x0a',_0xefe4e7(0x141)));let _0x5efe1a={'targetUnitId':_0x117791['targetUnitId'],'title':_0x117791[_0xefe4e7(0x144)],'javascriptPath':_0x1eca09,..._0x42bee8===void 0x0?{}:{'diagnosticsPath':_0x42bee8},'diagnostics':_0x117791[_0xefe4e7(0x145)],'previews':_0x117791['previews']};_0x440217['configureOutput']()[_0xefe4e7(0x135)]?.(_0x490a2a[_0xefe4e7(0x147)]===!0x0?JSON[_0xefe4e7(0x12b)](_0x5efe1a,null,0x2)+'\x0a':_0xefe4e7(0x13b)+_0x117791['targetUnitId']+_0xefe4e7(0x13c)+_0x1eca09+'\x20('+String(_0x117791[_0xefe4e7(0x145)][_0xefe4e7(0x139)])+'\x20diagnostics)\x0a');}catch(_0x5c8ce1){throw(_0x46f9fb(_0x5c8ce1)||c(_0x5c8ce1))&&_0x440217['error'](_0x5c8ce1[_0xefe4e7(0x136)]+':\x20'+_0x5c8ce1[_0xefe4e7(0x12f)],{'code':'compile-typst.failed','exitCode':0x1}),_0x5c8ce1;}});return _0x440217;}function c(_0x3401f3){const _0x44d3d5=_0x2f55;return _0x3401f3 instanceof Error&&typeof _0x3401f3[_0x44d3d5(0x136)]==_0x44d3d5(0x133);}export{s as createCompileTypstCommand};function _0x23ae(){const _0x14c124=['json','--preview-dir\x20<directory>','1969834xVtNRS','write\x20structured\x20diagnostics\x20as\x20JSON','bundle\x20directory\x20or\x20typst.json\x20path','36267057fuaoFI','option','--out\x20<file>','--json','requiredOption','4730789HGUhin','2391fpgjqX','stringify','previewDir','2988606AbaYdZ','description','message','javascript','compile','write\x20the\x20generated\x20JavaScript\x20program','string','render\x20PNG\x20previews\x20into\x20this\x20directory','writeOut','code','--diagnostics-out\x20<file>','write\x20the\x20structured\x20compile\x20result\x20as\x20JSON','length','argument','Compiled\x20','\x20to\x20','4772HuBLfM','diagnosticsOut','3020265rtTJyk','out','utf8','15231192JaXfGO','1DWRUeQ','title','diagnostics','Compile\x20a\x20Typst\x20bundle\x20to\x20a\x20target-neutral\x20Univer\x20Facade\x20program'];_0x23ae=function(){return _0x14c124;};return _0x23ae();}
1
+ (function(_0x210110,_0x1f4a32){const _0x57658d=_0x374a,_0x3d9416=_0x210110();while(!![]){try{const _0x3597ce=-parseInt(_0x57658d(0x168))/0x1*(parseInt(_0x57658d(0x158))/0x2)+-parseInt(_0x57658d(0x165))/0x3*(parseInt(_0x57658d(0x151))/0x4)+-parseInt(_0x57658d(0x15b))/0x5*(-parseInt(_0x57658d(0x150))/0x6)+parseInt(_0x57658d(0x155))/0x7+parseInt(_0x57658d(0x176))/0x8+-parseInt(_0x57658d(0x154))/0x9*(-parseInt(_0x57658d(0x157))/0xa)+-parseInt(_0x57658d(0x16c))/0xb;if(_0x3597ce===_0x1f4a32)break;else _0x3d9416['push'](_0x3d9416['shift']());}catch(_0x2a87e9){_0x3d9416['push'](_0x3d9416['shift']());}}}(_0x20b7,0x9e40d));import{mkdir as _0x363771,writeFile as _0xfcd92c}from'node:fs/promises';function _0x20b7(){const _0x2f90be=['render\x20PNG\x20previews\x20into\x20this\x20directory','configureOutput','code','option','compile-typst.failed','json','compile','1717602SFCWEQ','writeOut','--diagnostics-out\x20<file>','6778soHlSI','Compiled\x20','stringify','Compile\x20a\x20Typst\x20bundle\x20to\x20a\x20target-neutral\x20Univer\x20Facade\x20program','5086565PIJVZK','description','write\x20structured\x20diagnostics\x20as\x20JSON','\x20to\x20','<bundle>','diagnosticsOut','javascript','out','previews','\x20diagnostics)\x0a','1445576oNQxWI','targetUnitId','length','diagnostics','42aacjbi','8kDhQSA','--json','message','27URuFcp','6007281WWXuGE','string','3593220VgojSi','108McHuFY','argument','utf8','360610eFYDDW','write\x20the\x20structured\x20compile\x20result\x20as\x20JSON','--preview-dir\x20<directory>'];_0x20b7=function(){return _0x2f90be;};return _0x20b7();}import{dirname as _0x354697,resolve as _0x1fed4d}from'node:path';import{compileDocTypstBundle as _0xeceffc,isDocTypstFacadeError as _0x591b94}from'@univer-cli/doc-typst-facade';function _0x374a(_0x4f82c6,_0x22704c){_0x4f82c6=_0x4f82c6-0x14f;const _0x20b71c=_0x20b7();let _0x374aa9=_0x20b71c[_0x4f82c6];return _0x374aa9;}import{Command as _0x43b9d0}from'commander';function s(_0x22aab4={}){const _0x580e13=_0x374a;let _0x1207bf=_0x22aab4[_0x580e13(0x164)]??_0xeceffc,_0xcdeec4=new _0x43b9d0('compile-typst')[_0x580e13(0x16d)](_0x580e13(0x16b))[_0x580e13(0x159)](_0x580e13(0x170),'bundle\x20directory\x20or\x20typst.json\x20path')['requiredOption']('--out\x20<file>','write\x20the\x20generated\x20JavaScript\x20program')[_0x580e13(0x161)](_0x580e13(0x167),_0x580e13(0x16e))[_0x580e13(0x161)](_0x580e13(0x15d),_0x580e13(0x15e))['option'](_0x580e13(0x152),_0x580e13(0x15c))['action'](async(_0x2c0cce,_0x9dd18b)=>{const _0x33f2a2=_0x580e13;try{let _0x8206ca=_0x9dd18b['previewDir']===void 0x0?{}:{'previewDir':_0x9dd18b['previewDir']},_0x2278a8=await _0x1207bf(_0x2c0cce,_0x8206ca),_0x43484b=_0x1fed4d(_0x9dd18b[_0x33f2a2(0x173)]);await _0x363771(_0x354697(_0x43484b),{'recursive':!0x0}),await _0xfcd92c(_0x43484b,_0x2278a8[_0x33f2a2(0x172)],_0x33f2a2(0x15a));let _0xc3bafa;_0x9dd18b[_0x33f2a2(0x171)]!==void 0x0&&(_0xc3bafa=_0x1fed4d(_0x9dd18b[_0x33f2a2(0x171)]),await _0x363771(_0x354697(_0xc3bafa),{'recursive':!0x0}),await _0xfcd92c(_0xc3bafa,JSON[_0x33f2a2(0x16a)]({'schemaVersion':0x1,'diagnostics':_0x2278a8['diagnostics']},null,0x2)+'\x0a',_0x33f2a2(0x15a)));let _0x3c7a00={'targetUnitId':_0x2278a8[_0x33f2a2(0x177)],'title':_0x2278a8['title'],'javascriptPath':_0x43484b,..._0xc3bafa===void 0x0?{}:{'diagnosticsPath':_0xc3bafa},'diagnostics':_0x2278a8[_0x33f2a2(0x14f)],'previews':_0x2278a8[_0x33f2a2(0x174)]};_0xcdeec4[_0x33f2a2(0x15f)]()[_0x33f2a2(0x166)]?.(_0x9dd18b[_0x33f2a2(0x163)]===!0x0?JSON[_0x33f2a2(0x16a)](_0x3c7a00,null,0x2)+'\x0a':_0x33f2a2(0x169)+_0x2278a8[_0x33f2a2(0x177)]+_0x33f2a2(0x16f)+_0x43484b+'\x20('+String(_0x2278a8['diagnostics'][_0x33f2a2(0x178)])+_0x33f2a2(0x175));}catch(_0x4cf823){throw(_0x591b94(_0x4cf823)||c(_0x4cf823))&&_0xcdeec4['error'](_0x4cf823[_0x33f2a2(0x160)]+':\x20'+_0x4cf823[_0x33f2a2(0x153)],{'code':_0x33f2a2(0x162),'exitCode':0x1}),_0x4cf823;}});return _0xcdeec4;}function c(_0x1828af){const _0xc0fc0c=_0x374a;return _0x1828af instanceof Error&&typeof _0x1828af[_0xc0fc0c(0x160)]==_0xc0fc0c(0x156);}export{s as createCompileTypstCommand};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/doc-typst-facade-command",
3
3
  "type": "module",
4
- "version": "1.6.1",
4
+ "version": "1.7.0-alpha.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/doc-typst-facade": "1.6.1"
21
+ "@univer-cli/doc-typst-facade": "1.7.0-alpha.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"