@univer-cli/doc-typst-facade-command 1.0.4 → 1.1.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(_0x2136b0,_0x54a6ac){const _0x4c2946=_0x5d4f,_0x8bf08c=_0x2136b0();while(!![]){try{const _0xa925bd=parseInt(_0x4c2946(0xd5))/0x1+parseInt(_0x4c2946(0xb0))/0x2+parseInt(_0x4c2946(0xb9))/0x3*(parseInt(_0x4c2946(0xd6))/0x4)+-parseInt(_0x4c2946(0xd3))/0x5+-parseInt(_0x4c2946(0xb2))/0x6*(parseInt(_0x4c2946(0xc3))/0x7)+parseInt(_0x4c2946(0xbe))/0x8+parseInt(_0x4c2946(0xbb))/0x9*(parseInt(_0x4c2946(0xcd))/0xa);if(_0xa925bd===_0x54a6ac)break;else _0x8bf08c['push'](_0x8bf08c['shift']());}catch(_0x5d11cf){_0x8bf08c['push'](_0x8bf08c['shift']());}}}(_0x28fc,0x9a53d));import{mkdir as _0x56424d,writeFile as _0x2f3ded}from'node:fs/promises';import{dirname as _0x21816e,resolve as _0x2e91f4}from'node:path';import{compileDocTypstBundle as _0x5072f8,isDocTypstFacadeError as _0x700d2f}from'@univer-cli/doc-typst-facade';import{Command as _0x566ec5}from'commander';function _0x5d4f(_0x308833,_0x276d0a){_0x308833=_0x308833-0xae;const _0x28fcd1=_0x28fc();let _0x5d4fa5=_0x28fcd1[_0x308833];return _0x5d4fa5;}function s(_0x3bfe7a={}){const _0x1a6891=_0x5d4f;let _0x525fea=_0x3bfe7a[_0x1a6891(0xbd)]??_0x5072f8,_0x47ec7c=new _0x566ec5('compile-typst')[_0x1a6891(0xae)]('Compile\x20a\x20Typst\x20bundle\x20to\x20a\x20target-neutral\x20Univer\x20Facade\x20program')[_0x1a6891(0xbc)](_0x1a6891(0xb5),_0x1a6891(0xd7))[_0x1a6891(0xba)](_0x1a6891(0xb3),_0x1a6891(0xb7))[_0x1a6891(0xc8)](_0x1a6891(0xcb),'write\x20structured\x20diagnostics\x20as\x20JSON')['option'](_0x1a6891(0xc9),_0x1a6891(0xc1))[_0x1a6891(0xc8)](_0x1a6891(0xc6),_0x1a6891(0xd1))[_0x1a6891(0xb8)](async(_0x39942c,_0x29b631)=>{const _0x2e9c7f=_0x1a6891;try{let _0x1f71c9=_0x29b631[_0x2e9c7f(0xc5)]===void 0x0?{}:{'previewDir':_0x29b631[_0x2e9c7f(0xc5)]},_0x48168a=await _0x525fea(_0x39942c,_0x1f71c9),_0x175f04=_0x2e91f4(_0x29b631[_0x2e9c7f(0xb4)]);await _0x56424d(_0x21816e(_0x175f04),{'recursive':!0x0}),await _0x2f3ded(_0x175f04,_0x48168a[_0x2e9c7f(0xaf)],'utf8');let _0x29d322;_0x29b631['diagnosticsOut']!==void 0x0&&(_0x29d322=_0x2e91f4(_0x29b631[_0x2e9c7f(0xc4)]),await _0x56424d(_0x21816e(_0x29d322),{'recursive':!0x0}),await _0x2f3ded(_0x29d322,JSON['stringify']({'schemaVersion':0x1,'diagnostics':_0x48168a[_0x2e9c7f(0xd2)]},null,0x2)+'\x0a',_0x2e9c7f(0xb1)));let _0x40c0a4={'targetUnitId':_0x48168a[_0x2e9c7f(0xce)],'title':_0x48168a[_0x2e9c7f(0xc0)],'javascriptPath':_0x175f04,..._0x29d322===void 0x0?{}:{'diagnosticsPath':_0x29d322},'diagnostics':_0x48168a[_0x2e9c7f(0xd2)],'previews':_0x48168a[_0x2e9c7f(0xbf)]};_0x47ec7c['configureOutput']()[_0x2e9c7f(0xd0)]?.(_0x29b631[_0x2e9c7f(0xc2)]===!0x0?JSON[_0x2e9c7f(0xb6)](_0x40c0a4,null,0x2)+'\x0a':'Compiled\x20'+_0x48168a[_0x2e9c7f(0xce)]+_0x2e9c7f(0xc7)+_0x175f04+'\x20('+String(_0x48168a['diagnostics']['length'])+_0x2e9c7f(0xd4));}catch(_0x50f2c5){throw(_0x700d2f(_0x50f2c5)||c(_0x50f2c5))&&_0x47ec7c[_0x2e9c7f(0xca)](_0x50f2c5['code']+':\x20'+_0x50f2c5[_0x2e9c7f(0xcf)],{'code':_0x2e9c7f(0xd8),'exitCode':0x1}),_0x50f2c5;}});return _0x47ec7c;}function _0x28fc(){const _0x599100=['--diagnostics-out\x20<file>','code','150140QDCRxo','targetUnitId','message','writeOut','write\x20the\x20structured\x20compile\x20result\x20as\x20JSON','diagnostics','4966965YvQIhR','\x20diagnostics)\x0a','414927pdaQai','7800mWsPqP','bundle\x20directory\x20or\x20typst.json\x20path','compile-typst.failed','description','javascript','240872HZzAsX','utf8','6fZKPFu','--out\x20<file>','out','<bundle>','stringify','write\x20the\x20generated\x20JavaScript\x20program','action','1095ObWDlA','requiredOption','558HDxkCz','argument','compile','5047328YCTQBV','previews','title','render\x20PNG\x20previews\x20into\x20this\x20directory','json','8283653NSvfDq','diagnosticsOut','previewDir','--json','\x20to\x20','option','--preview-dir\x20<directory>','error'];_0x28fc=function(){return _0x599100;};return _0x28fc();}function c(_0x379a96){const _0x1eea91=_0x5d4f;return _0x379a96 instanceof Error&&typeof _0x379a96[_0x1eea91(0xcc)]=='string';}export{s as createCompileTypstCommand};
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};
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.0.4",
4
+ "version": "1.1.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.0.4"
21
+ "@univer-cli/doc-typst-facade": "1.1.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "commander": "^15.0.0"