@univer-cli/doc-typst-facade-command 1.1.0 → 1.3.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(_0x226f27,_0x5678ff){const _0x3f5557=_0x5510,_0x1c6f2a=_0x226f27();while(!![]){try{const _0x5b44b6=parseInt(_0x3f5557(0x1a4))/0x1*(parseInt(_0x3f5557(0x19a))/0x2)+-parseInt(_0x3f5557(0x1a2))/0x3+-parseInt(_0x3f5557(0x19f))/0x4+parseInt(_0x3f5557(0x18c))/0x5+-parseInt(_0x3f5557(0x1a8))/0x6+-parseInt(_0x3f5557(0x1ac))/0x7*(-parseInt(_0x3f5557(0x190))/0x8)+parseInt(_0x3f5557(0x1b0))/0x9;if(_0x5b44b6===_0x5678ff)break;else _0x1c6f2a['push'](_0x1c6f2a['shift']());}catch(_0x5e17ee){_0x1c6f2a['push'](_0x1c6f2a['shift']());}}}(_0x4759,0x2e945));function _0x5510(_0x8d8f75,_0x334ce0){_0x8d8f75=_0x8d8f75-0x186;const _0x47595d=_0x4759();let _0x551056=_0x47595d[_0x8d8f75];return _0x551056;}import{mkdir as _0x160b53,writeFile as _0x4c499f}from'node:fs/promises';import{dirname as _0x31fc29,resolve as _0x5d68f0}from'node:path';import{compileDocTypstBundle as _0x26a1f6,isDocTypstFacadeError as _0x595cf1}from'@univer-cli/doc-typst-facade';function _0x4759(){const _0x13196b=['write\x20the\x20generated\x20JavaScript\x20program','727470oLMIsH','diagnostics','\x20diagnostics)\x0a','out','8ddEaDQ','configureOutput','action','compile','bundle\x20directory\x20or\x20typst.json\x20path','compile-typst','option','--json','<bundle>','--diagnostics-out\x20<file>','33758TixZAj','length','javascript','utf8','Compiled\x20','827724CxoGwl','title','argument','216249aLjBbZ','code','9KoWpCg','write\x20the\x20structured\x20compile\x20result\x20as\x20JSON','write\x20structured\x20diagnostics\x20as\x20JSON','targetUnitId','858570TxMsAd','previewDir','json','message','1459528TDLxbN','writeOut','--out\x20<file>','string','962901gnBsyJ','Compile\x20a\x20Typst\x20bundle\x20to\x20a\x20target-neutral\x20Univer\x20Facade\x20program','description','requiredOption','render\x20PNG\x20previews\x20into\x20this\x20directory','diagnosticsOut','stringify'];_0x4759=function(){return _0x13196b;};return _0x4759();}import{Command as _0x32798c}from'commander';function s(_0x45ac5e={}){const _0x51075e=_0x5510;let _0x37087c=_0x45ac5e[_0x51075e(0x193)]??_0x26a1f6,_0x44f42f=new _0x32798c(_0x51075e(0x195))[_0x51075e(0x186)](_0x51075e(0x1b1))[_0x51075e(0x1a1)](_0x51075e(0x198),_0x51075e(0x194))[_0x51075e(0x187)](_0x51075e(0x1ae),_0x51075e(0x18b))[_0x51075e(0x196)](_0x51075e(0x199),_0x51075e(0x1a6))[_0x51075e(0x196)]('--preview-dir\x20<directory>',_0x51075e(0x188))[_0x51075e(0x196)](_0x51075e(0x197),_0x51075e(0x1a5))[_0x51075e(0x192)](async(_0x51eaec,_0x2dd6b0)=>{const _0x4c5c7f=_0x51075e;try{let _0x1863a3=_0x2dd6b0[_0x4c5c7f(0x1a9)]===void 0x0?{}:{'previewDir':_0x2dd6b0[_0x4c5c7f(0x1a9)]},_0x3c272f=await _0x37087c(_0x51eaec,_0x1863a3),_0x209932=_0x5d68f0(_0x2dd6b0[_0x4c5c7f(0x18f)]);await _0x160b53(_0x31fc29(_0x209932),{'recursive':!0x0}),await _0x4c499f(_0x209932,_0x3c272f[_0x4c5c7f(0x19c)],'utf8');let _0xdb9f80;_0x2dd6b0['diagnosticsOut']!==void 0x0&&(_0xdb9f80=_0x5d68f0(_0x2dd6b0[_0x4c5c7f(0x189)]),await _0x160b53(_0x31fc29(_0xdb9f80),{'recursive':!0x0}),await _0x4c499f(_0xdb9f80,JSON[_0x4c5c7f(0x18a)]({'schemaVersion':0x1,'diagnostics':_0x3c272f[_0x4c5c7f(0x18d)]},null,0x2)+'\x0a',_0x4c5c7f(0x19d)));let _0x260d6f={'targetUnitId':_0x3c272f[_0x4c5c7f(0x1a7)],'title':_0x3c272f[_0x4c5c7f(0x1a0)],'javascriptPath':_0x209932,..._0xdb9f80===void 0x0?{}:{'diagnosticsPath':_0xdb9f80},'diagnostics':_0x3c272f[_0x4c5c7f(0x18d)],'previews':_0x3c272f['previews']};_0x44f42f[_0x4c5c7f(0x191)]()[_0x4c5c7f(0x1ad)]?.(_0x2dd6b0[_0x4c5c7f(0x1aa)]===!0x0?JSON[_0x4c5c7f(0x18a)](_0x260d6f,null,0x2)+'\x0a':_0x4c5c7f(0x19e)+_0x3c272f[_0x4c5c7f(0x1a7)]+'\x20to\x20'+_0x209932+'\x20('+String(_0x3c272f['diagnostics'][_0x4c5c7f(0x19b)])+_0x4c5c7f(0x18e));}catch(_0x5e745e){throw(_0x595cf1(_0x5e745e)||c(_0x5e745e))&&_0x44f42f['error'](_0x5e745e[_0x4c5c7f(0x1a3)]+':\x20'+_0x5e745e[_0x4c5c7f(0x1ab)],{'code':'compile-typst.failed','exitCode':0x1}),_0x5e745e;}});return _0x44f42f;}function c(_0xc04356){const _0x325070=_0x5510;return _0xc04356 instanceof Error&&typeof _0xc04356['code']==_0x325070(0x1af);}export{s as createCompileTypstCommand};
1
+ (function(_0x37ee88,_0x298998){const _0xc9145e=_0x20ae,_0x536b6a=_0x37ee88();while(!![]){try{const _0x44163a=parseInt(_0xc9145e(0x177))/0x1*(parseInt(_0xc9145e(0x197))/0x2)+parseInt(_0xc9145e(0x17c))/0x3+parseInt(_0xc9145e(0x18d))/0x4+-parseInt(_0xc9145e(0x188))/0x5*(parseInt(_0xc9145e(0x187))/0x6)+-parseInt(_0xc9145e(0x19c))/0x7+parseInt(_0xc9145e(0x192))/0x8*(parseInt(_0xc9145e(0x179))/0x9)+-parseInt(_0xc9145e(0x186))/0xa;if(_0x44163a===_0x298998)break;else _0x536b6a['push'](_0x536b6a['shift']());}catch(_0x101caa){_0x536b6a['push'](_0x536b6a['shift']());}}}(_0x7906,0x84586));import{mkdir as _0x2dcf03,writeFile as _0x449a31}from'node:fs/promises';function _0x7906(){const _0x4d472f=['diagnosticsOut','title','message','writeOut','3430030vVKIoA','6VTOwZf','1260695LDwhmT','targetUnitId','Compile\x20a\x20Typst\x20bundle\x20to\x20a\x20target-neutral\x20Univer\x20Facade\x20program','string','diagnostics','2199364gcEGqe','option','out','code','description','8LLjmdP','error','compile-typst','utf8','previews','55672kqMSgs','--json','javascript','\x20diagnostics)\x0a','length','2958312FrGnEQ','action','argument','write\x20the\x20structured\x20compile\x20result\x20as\x20JSON','write\x20structured\x20diagnostics\x20as\x20JSON','json','4cHwTKq','\x20to\x20','6894603qgpQxz','bundle\x20directory\x20or\x20typst.json\x20path','previewDir','397776ifliET','configureOutput','--diagnostics-out\x20<file>','compile-typst.failed','stringify','--out\x20<file>'];_0x7906=function(){return _0x4d472f;};return _0x7906();}import{dirname as _0x15530b,resolve as _0x247b42}from'node:path';import{compileDocTypstBundle as _0x5bedc8,isDocTypstFacadeError as _0x4b399d}from'@univer-cli/doc-typst-facade';function _0x20ae(_0x445be0,_0x158cb5){_0x445be0=_0x445be0-0x177;const _0x790603=_0x7906();let _0x20aef7=_0x790603[_0x445be0];return _0x20aef7;}import{Command as _0x372e98}from'commander';function s(_0x2c68bf={}){const _0x52a82b=_0x20ae;let _0x1b6179=_0x2c68bf['compile']??_0x5bedc8,_0x14d1bf=new _0x372e98(_0x52a82b(0x194))[_0x52a82b(0x191)](_0x52a82b(0x18a))[_0x52a82b(0x19e)]('<bundle>',_0x52a82b(0x17a))['requiredOption'](_0x52a82b(0x181),'write\x20the\x20generated\x20JavaScript\x20program')['option'](_0x52a82b(0x17e),_0x52a82b(0x1a0))[_0x52a82b(0x18e)]('--preview-dir\x20<directory>','render\x20PNG\x20previews\x20into\x20this\x20directory')[_0x52a82b(0x18e)](_0x52a82b(0x198),_0x52a82b(0x19f))[_0x52a82b(0x19d)](async(_0x1c727d,_0x3b845a)=>{const _0x28ae84=_0x52a82b;try{let _0x3bef7d=_0x3b845a[_0x28ae84(0x17b)]===void 0x0?{}:{'previewDir':_0x3b845a[_0x28ae84(0x17b)]},_0xd5c141=await _0x1b6179(_0x1c727d,_0x3bef7d),_0x150df4=_0x247b42(_0x3b845a[_0x28ae84(0x18f)]);await _0x2dcf03(_0x15530b(_0x150df4),{'recursive':!0x0}),await _0x449a31(_0x150df4,_0xd5c141[_0x28ae84(0x199)],_0x28ae84(0x195));let _0x37fdc0;_0x3b845a[_0x28ae84(0x182)]!==void 0x0&&(_0x37fdc0=_0x247b42(_0x3b845a['diagnosticsOut']),await _0x2dcf03(_0x15530b(_0x37fdc0),{'recursive':!0x0}),await _0x449a31(_0x37fdc0,JSON[_0x28ae84(0x180)]({'schemaVersion':0x1,'diagnostics':_0xd5c141[_0x28ae84(0x18c)]},null,0x2)+'\x0a',_0x28ae84(0x195)));let _0x4f0c0c={'targetUnitId':_0xd5c141[_0x28ae84(0x189)],'title':_0xd5c141[_0x28ae84(0x183)],'javascriptPath':_0x150df4,..._0x37fdc0===void 0x0?{}:{'diagnosticsPath':_0x37fdc0},'diagnostics':_0xd5c141[_0x28ae84(0x18c)],'previews':_0xd5c141[_0x28ae84(0x196)]};_0x14d1bf[_0x28ae84(0x17d)]()[_0x28ae84(0x185)]?.(_0x3b845a[_0x28ae84(0x1a1)]===!0x0?JSON['stringify'](_0x4f0c0c,null,0x2)+'\x0a':'Compiled\x20'+_0xd5c141[_0x28ae84(0x189)]+_0x28ae84(0x178)+_0x150df4+'\x20('+String(_0xd5c141[_0x28ae84(0x18c)][_0x28ae84(0x19b)])+_0x28ae84(0x19a));}catch(_0x173334){throw(_0x4b399d(_0x173334)||c(_0x173334))&&_0x14d1bf[_0x28ae84(0x193)](_0x173334['code']+':\x20'+_0x173334[_0x28ae84(0x184)],{'code':_0x28ae84(0x17f),'exitCode':0x1}),_0x173334;}});return _0x14d1bf;}function c(_0x5278fe){const _0x26f6d0=_0x20ae;return _0x5278fe instanceof Error&&typeof _0x5278fe[_0x26f6d0(0x190)]==_0x26f6d0(0x18b);}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.1.0",
4
+ "version": "1.3.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.1.0"
21
+ "@univer-cli/doc-typst-facade": "1.3.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"