univer-cli 0.1.6 → 0.1.7
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/chunks/build-id-Coc3wh1M.js +1 -1
- package/chunks/headless-univer-BWfA31gd.js +1 -1
- package/chunks/runtime-eval-kernels-dRCWgwtH.js +1 -1
- package/chunks/runtime-manifest-DvhuIQzx.js +1 -1
- package/chunks/trace-DPfd8LdJ.js +1 -1
- package/internal/cli.js +1 -1
- package/internal/daemon.js +1 -1
- package/internal/univer-runner.js +1 -1
- package/package.json +1 -1
- package/view/browser/assets/formula-dependency-graph-panel.js +1 -1
- package/view/browser/assets/viewer.js +1 -2
package/internal/daemon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x92d56a=_0x2ce2;(function(_0x160e6b,_0x5e10d9){const _0x2a9dbb=_0x2ce2,_0x38a90d=_0x160e6b();while(!![]){try{const _0x46f4bc=parseInt(_0x2a9dbb(0x101))/0x1+-parseInt(_0x2a9dbb(0x136))/0x2+parseInt(_0x2a9dbb(0x158))/0x3+-parseInt(_0x2a9dbb(0x131))/0x4*(-parseInt(_0x2a9dbb(0x122))/0x5)+parseInt(_0x2a9dbb(0x110))/0x6+parseInt(_0x2a9dbb(0x144))/0x7+parseInt(_0x2a9dbb(0x10f))/0x8;if(_0x46f4bc===_0x5e10d9)break;else _0x38a90d['push'](_0x38a90d['shift']());}catch(_0x1d80d1){_0x38a90d['push'](_0x38a90d['shift']());}}}(_0x3167,0x48354));import'../chunks/vendor-DjomC5bd.js';import{a as _0x2caa0c,i as _0x496065,n,o as _0x5df699,r as _0x4d443b,t as _0x292d4d}from'../chunks/trace-DPfd8LdJ.js';import{a as _0x124330,d as _0x4b506a,l as _0x243bd7,m as _0x47b28e,n as _0xf5ea4c,r as _0x113345,u as _0x25bae2}from'../chunks/runtime-manifest-DvhuIQzx.js';import{t as _0x64146d}from'../chunks/build-id-Coc3wh1M.js';import{existsSync as _0x1ec61b}from'node:fs';import{chmod as _0xda8f70,mkdir as _0x3d68e4,readFile as _0x278b63,rm as _0x469cb0,writeFile as _0x3e7f53}from'node:fs/promises';import _0x5c2237 from'node:net';import _0x2ad829 from'node:process';var S=new _0x113345();async function C(_0x28d4b6={}){const _0xa1fcf5=_0x2ce2;let _0x5da397=_0x28d4b6['env']??_0x2ad829[_0xa1fcf5(0x125)],_0x35de03=_0x25bae2(_0x5da397),_0xb09732=_0xf5ea4c(_0x5da397),_0x1e58c6=_0x28d4b6[_0xa1fcf5(0x163)]??E(new _0x124330({'env':_0x5da397,'logger':_0x4b506a({'env':_0x5da397,'role':_0x2caa0c[_0xa1fcf5(0x11e)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0xb09732[_0xa1fcf5(0x10a)]['execArgv']],'modulePath':_0xb09732[_0xa1fcf5(0x10a)]['modulePath']})})),_0x3e1005=_0x64146d(_0x5da397),_0x4eeb8a=new Date()[_0xa1fcf5(0x141)]();if(await _0x3d68e4(_0x35de03['daemonDir'],{'recursive':!0x0,'mode':0x1c0}),await _0x3d68e4(_0x35de03[_0xa1fcf5(0x14d)],{'recursive':!0x0,'mode':0x1c0}),!await M(_0x35de03['lockPath'],_0x35de03[_0xa1fcf5(0x160)])){if(await N(_0x35de03[_0xa1fcf5(0x127)]))return;throw Error('Another\x20daemon\x20startup\x20owns\x20'+_0x35de03['lockPath']);}await j(_0x35de03);let _0x53863c=_0x4b506a({'env':_0x5da397,'role':_0x2caa0c[_0xa1fcf5(0x129)]}),_0x48b614=k({'buildId':_0x3e1005,'env':_0x5da397,'pid':_0x2ad829['pid']}),_0x36cb0c=!0x1,_0x337a6={},_0x3a9678=async _0x5a50bf=>z(null,-0x7f5b,Error(_0xa1fcf5(0x148)+_0x5a50bf)),_0xcb41d6=_0x5c2237[_0xa1fcf5(0x126)](_0x464f07=>{const _0x6e5ee0=_0xa1fcf5;let _0x225c96='';_0x464f07['on'](_0x6e5ee0(0x135),_0x586517=>{const _0x25a33d=_0x6e5ee0;_0x225c96+=_0x586517[_0x25a33d(0x11f)](_0x25a33d(0x155)),_0x1b26a6();}),_0x464f07['on']('error',()=>void 0x0);let _0x1b26a6=async()=>{const _0x20a74c=_0x6e5ee0;for(;;){let _0x11691d=_0x225c96[_0x20a74c(0xf6)]('\x0a');if(_0x11691d<0x0)return;let _0x3ef55c=_0x225c96[_0x20a74c(0x152)](0x0,_0x11691d)['trim']();if(_0x225c96=_0x225c96['slice'](_0x11691d+0x1),!_0x3ef55c)continue;let _0x23d97c=await _0x3a9678(_0x3ef55c);_0x464f07[_0x20a74c(0x119)](JSON[_0x20a74c(0x14f)](_0x23d97c)+'\x0a');}};});_0x3a9678=w({'buildId':_0x3e1005,'logRequestEvent':async _0x19973a=>{const _0x434c84=_0xa1fcf5;_0x53863c[_0x434c84(0x108)]({'level':_0x19973a[_0x434c84(0x15e)]===_0x496065[_0x434c84(0x12f)]?_0x434c84(0x10d):_0x434c84(0x10b),'event_name':_0x19973a[_0x434c84(0x15e)],'component':_0x4d443b[_0x434c84(0x129)],'process_role':_0x2caa0c[_0x434c84(0x129)],..._0x19973a[_0x434c84(0x10d)]===void 0x0?{}:{'error':_0x19973a[_0x434c84(0x10d)]},'fields':{..._0x48b614,..._0x19973a['durationMs']===void 0x0?{}:{'duration_ms':_0x19973a[_0x434c84(0x109)]},'method':_0x19973a[_0x434c84(0x15f)],'timestamp':_0x19973a[_0x434c84(0x138)]}});},'logRequestError':async _0x3f2c72=>{const _0x345d30=_0xa1fcf5;_0x53863c[_0x345d30(0x10d)]({'event_name':_0x496065['DaemonRpcError'],'component':_0x4d443b[_0x345d30(0x129)],'process_role':_0x2caa0c[_0x345d30(0x129)],'error':_0x3f2c72[_0x345d30(0x10d)],'fields':{..._0x48b614,'method':_0x3f2c72[_0x345d30(0x15f)],'timestamp':_0x3f2c72[_0x345d30(0x138)]}});},'onShutdownRequest':()=>{const _0x2d0bfb=_0xa1fcf5;_0x241aed('rpc-shutdown')[_0x2d0bfb(0x146)](()=>{const _0x2bcaf5=_0x2d0bfb;_0x2ad829[_0x2bcaf5(0x166)](0x0);});},'pid':_0x2ad829[_0xa1fcf5(0x165)],'runtimeRoot':_0x35de03[_0xa1fcf5(0x114)],'sessionHost':_0x1e58c6,'socketPath':_0x35de03[_0xa1fcf5(0x127)],'startedAt':_0x4eeb8a}),await new Promise((_0x19fc3b,_0x19d0fc)=>{const _0x895e3c=_0xa1fcf5;_0xcb41d6[_0x895e3c(0x157)](_0x895e3c(0x10d),_0x19d0fc),_0xcb41d6[_0x895e3c(0x168)](_0x35de03[_0x895e3c(0x127)],_0x19fc3b);}),_0x243bd7(_0x35de03[_0xa1fcf5(0x127)])||await _0xda8f70(_0x35de03[_0xa1fcf5(0x127)],0x180);let _0x354b68={'pid':_0x2ad829['pid'],'startedAt':_0x4eeb8a,'socketPath':_0x35de03[_0xa1fcf5(0x127)],'runtimeRoot':_0x35de03[_0xa1fcf5(0x114)],'buildId':_0x3e1005};await _0x3e7f53(_0x35de03[_0xa1fcf5(0x160)],String(_0x2ad829[_0xa1fcf5(0x165)]),_0xa1fcf5(0x155)),await _0x3e7f53(_0x35de03['metaPath'],JSON[_0xa1fcf5(0x14f)](_0x354b68,null,0x2),_0xa1fcf5(0x155)),_0x53863c['info']({'event_name':_0x496065['DaemonStart'],'component':_0x4d443b[_0xa1fcf5(0x129)],'process_role':_0x2caa0c[_0xa1fcf5(0x129)],'fields':{..._0x48b614,'pid':_0x2ad829[_0xa1fcf5(0x165)],'runtime_root':_0x35de03[_0xa1fcf5(0x114)],'socket_path':_0x35de03['socketPath'],'started_at':_0x4eeb8a}}),await _0x53863c[_0xa1fcf5(0x12e)]();let _0x169deb=setInterval(()=>{const _0x1ba670=_0xa1fcf5;_0x1e58c6[_0x1ba670(0x15b)]();},Math[_0xa1fcf5(0x102)](0x3e8,Math[_0xa1fcf5(0x130)](_0x1e58c6['getSessionIdleTtlMs'](),0xea60)));_0x169deb[_0xa1fcf5(0xff)](),_0x337a6[_0xa1fcf5(0x150)]=_0x169deb;async function _0x241aed(_0x50efc0){const _0x242717=_0xa1fcf5;_0x36cb0c||(_0x36cb0c=!0x0,_0x337a6['current']!==void 0x0&&clearInterval(_0x337a6[_0x242717(0x150)]),_0x53863c['info']({'event_name':_0x496065[_0x242717(0x147)],'component':_0x4d443b['Daemon'],'process_role':_0x2caa0c[_0x242717(0x129)],'fields':{..._0x48b614,'pid':_0x2ad829['pid'],'reason':_0x50efc0,'timestamp':new Date()[_0x242717(0x141)]()}}),await _0x53863c[_0x242717(0x12e)](),await _0x1e58c6['destroyAll'](_0x50efc0),await new Promise(_0x13397c=>{const _0x598811=_0x242717;_0xcb41d6[_0x598811(0x10e)](()=>_0x13397c());}),await F(_0x35de03['socketPath']),await _0x469cb0(_0x35de03[_0x242717(0x160)],{'force':!0x0})['catch'](()=>void 0x0),await _0x469cb0(_0x35de03[_0x242717(0x167)],{'force':!0x0})['catch'](()=>void 0x0),await _0x469cb0(_0x35de03[_0x242717(0x113)],{'recursive':!0x0,'force':!0x0})['catch'](()=>void 0x0));}_0x2ad829['on'](_0xa1fcf5(0x121),()=>{const _0x3ddf3e=_0xa1fcf5;_0x241aed(_0x3ddf3e(0x15a))[_0x3ddf3e(0x146)](()=>{const _0x3a3b11=_0x3ddf3e;_0x2ad829[_0x3a3b11(0x166)](0x0);});}),_0x2ad829['on']('SIGTERM',()=>{_0x241aed('sigterm')['finally'](()=>{const _0x371b15=_0x2ce2;_0x2ad829[_0x371b15(0x166)](0x0);});});}function w(_0x1bfd97){return async _0x29d552=>{const _0x1e52b5=_0x2ce2;let _0x34d3ab;try{_0x34d3ab=JSON[_0x1e52b5(0xfb)](_0x29d552);}catch(_0x5c428f){return z(null,-0x7fbc,_0x5c428f);}let _0x423dfd=_0x292d4d(_0x34d3ab[_0x1e52b5(0x115)]?.[_0x1e52b5(0x159)]),_0x48b1da=async()=>await n[_0x1e52b5(0x137)]({'name':_0x5df699[_0x1e52b5(0xf8)],'kind':_0x1e52b5(0x116)},async()=>{const _0x9b61cb=_0x1e52b5;let _0x582fcf=Date['now']();await _0x1bfd97[_0x9b61cb(0x139)]?.({'eventName':_0x496065[_0x9b61cb(0x13d)],'method':_0x34d3ab[_0x9b61cb(0x15f)],'timestamp':new Date()[_0x9b61cb(0x141)]()});try{let _0x1bf188=await T(_0x34d3ab,_0x1bfd97);return await _0x1bfd97[_0x9b61cb(0x139)]?.({'durationMs':Date['now']()-_0x582fcf,'eventName':_0x496065[_0x9b61cb(0xfe)],'method':_0x34d3ab[_0x9b61cb(0x15f)],'timestamp':new Date()[_0x9b61cb(0x141)]()}),_0x1bf188;}catch(_0x4469ff){return await _0x1bfd97[_0x9b61cb(0x139)]?.({'durationMs':Date[_0x9b61cb(0x169)]()-_0x582fcf,'eventName':_0x496065['DaemonRpcError'],'method':_0x34d3ab[_0x9b61cb(0x15f)],'error':_0x4469ff,'timestamp':new Date()['toISOString']()}),_0x1bfd97['logRequestEvent']===void 0x0&&await _0x1bfd97[_0x9b61cb(0x15d)]?.({'method':_0x34d3ab[_0x9b61cb(0x15f)],'error':_0x4469ff instanceof Error?_0x4469ff[_0x9b61cb(0x14b)]:String(_0x4469ff),'timestamp':new Date()[_0x9b61cb(0x141)]()}),z(_0x34d3ab['id'],-0x7f5b,_0x4469ff);}});return _0x423dfd===void 0x0?await _0x48b1da():await n['withContext'](_0x423dfd,_0x48b1da);};}async function T(_0x38b3a0,_0x2c8c07){const _0x100636=_0x2ce2;switch(_0x38b3a0[_0x100636(0x15f)]){case _0x47b28e[_0x100636(0x107)]:return{'jsonrpc':_0x100636(0x12b),'id':_0x38b3a0['id'],'result':{'ok':!0x0,'pid':_0x2c8c07[_0x100636(0x165)],'startedAt':_0x2c8c07[_0x100636(0x12d)],'socketPath':_0x2c8c07[_0x100636(0x127)],'runtimeRoot':_0x2c8c07[_0x100636(0x154)],'buildId':_0x2c8c07[_0x100636(0x14a)],'sessionCount':_0x2c8c07[_0x100636(0x163)][_0x100636(0xfd)]()}};case _0x47b28e['Shutdown']:return _0x2c8c07['onShutdownRequest']?.(),{'jsonrpc':_0x100636(0x12b),'id':_0x38b3a0['id'],'result':{'stopping':!0x0}};case _0x47b28e[_0x100636(0xf5)]:{let _0x4dd52b=await _0x2c8c07[_0x100636(0x163)][_0x100636(0x106)](_0x38b3a0['params']);return R(_0x38b3a0['id'],_0x4dd52b);}case _0x47b28e[_0x100636(0x100)]:{let _0x273480=await _0x2c8c07[_0x100636(0x163)]['loadWorkbookDataReplayPack'](_0x38b3a0[_0x100636(0x153)]);return R(_0x38b3a0['id'],_0x273480);}case _0x47b28e[_0x100636(0x105)]:{let _0x4e8ac6=await _0x2c8c07[_0x100636(0x163)][_0x100636(0x143)](_0x38b3a0[_0x100636(0x153)]);return R(_0x38b3a0['id'],_0x4e8ac6);}case _0x47b28e[_0x100636(0x11c)]:{let _0x1535a9=await _0x2c8c07[_0x100636(0x163)]['evalJs'](_0x38b3a0[_0x100636(0x153)]);return R(_0x38b3a0['id'],_0x1535a9);}case _0x47b28e['SessionExportWorkbookFile']:{let _0x3c5c20=await _0x2c8c07['sessionHost'][_0x100636(0x132)](_0x38b3a0[_0x100636(0x153)]);return R(_0x38b3a0['id'],_0x3c5c20);}case _0x47b28e[_0x100636(0x124)]:{let _0x3d3b7b=_0x38b3a0[_0x100636(0x153)],_0x33699d=await _0x2c8c07['sessionHost']['exportWorkbookData'](_0x3d3b7b);return R(_0x38b3a0['id'],_0x33699d);}case _0x47b28e[_0x100636(0x11b)]:{let _0x1e9b5f=await _0x2c8c07[_0x100636(0x163)][_0x100636(0x156)](_0x38b3a0[_0x100636(0x153)]);return R(_0x38b3a0['id'],_0x1e9b5f);}case _0x47b28e[_0x100636(0x161)]:{let _0x57136b=await _0x2c8c07[_0x100636(0x163)][_0x100636(0x123)](_0x38b3a0[_0x100636(0x153)]);return R(_0x38b3a0['id'],_0x57136b);}default:return z(_0x38b3a0['id'],-0x7f59,Error(_0x100636(0x11d)+_0x38b3a0[_0x100636(0x15f)]));}}function E(_0x239db9){return{async 'createWorkbook'(_0x71af80){const _0x536089=_0x2ce2;let _0x173164=await D(_0x71af80),_0x15dc8e=await _0x239db9['createWorkbook']({..._0x71af80[_0x536089(0x10c)]===void 0x0?{}:{'cwd':_0x71af80[_0x536089(0x10c)]},'identity':_0x173164,..._0x71af80['id']===void 0x0?{}:{'workbookId':_0x71af80['id']},..._0x71af80['name']===void 0x0?{}:{'workbookName':_0x71af80[_0x536089(0x140)]}});return{'success':!0x0,'workbookData':_0x15dc8e[_0x536089(0x118)],'session':O(_0x15dc8e[_0x536089(0x13f)])};},async 'dispose'(_0x4e44e6){const _0x1e5a51=_0x2ce2;let _0x187e99=await D(_0x4e44e6);return await _0x239db9[_0x1e5a51(0x156)]({..._0x4e44e6[_0x1e5a51(0x10c)]===void 0x0?{}:{'cwd':_0x4e44e6[_0x1e5a51(0x10c)]},'identity':_0x187e99}),{'disposed':!0x0,'workbookIdentity':_0x187e99[_0x1e5a51(0x103)]};},async 'destroyAll'(_0x2f854b){const _0x4ab3cf=_0x2ce2;await _0x239db9[_0x4ab3cf(0x162)]?.(_0x2f854b);},async 'evalJs'(_0x1c610b){const _0x3deb8d=_0x2ce2;let _0x44d065=await D(_0x1c610b),_0x19cf4a=await _0x239db9['evalJs']({'code':_0x1c610b['code'],..._0x1c610b[_0x3deb8d(0x10c)]===void 0x0?{}:{'cwd':_0x1c610b[_0x3deb8d(0x10c)]},'identity':_0x44d065,..._0x1c610b[_0x3deb8d(0x151)]===void 0x0?{}:{'mutates':_0x1c610b[_0x3deb8d(0x151)]}});return{..._0x19cf4a['mutations']===void 0x0?{}:{'mutations':_0x19cf4a[_0x3deb8d(0x112)]},'success':!0x0,'value':_0x19cf4a[_0x3deb8d(0xfc)],'session':O(_0x19cf4a[_0x3deb8d(0x13f)])};},async 'exportWorkbookData'(_0x47e2d2){const _0x9b4fdb=_0x2ce2;let _0x24f799=await D(_0x47e2d2),_0x4de37a=await _0x239db9[_0x9b4fdb(0x104)]({..._0x47e2d2['cwd']===void 0x0?{}:{'cwd':_0x47e2d2[_0x9b4fdb(0x10c)]},'identity':_0x24f799});return{'success':!0x0,'workbookData':_0x4de37a['workbookData'],'session':O(_0x4de37a[_0x9b4fdb(0x13f)])};},async 'exportWorkbookFile'(_0x1f0e25){const _0x15c291=_0x2ce2;let _0x38c3ca=await D(_0x1f0e25),_0x40e4d6=await _0x239db9[_0x15c291(0x132)]({..._0x1f0e25[_0x15c291(0x10c)]===void 0x0?{}:{'cwd':_0x1f0e25['cwd']},'format':_0x1f0e25['format'],'identity':_0x38c3ca,'outputPath':_0x1f0e25[_0x15c291(0x13a)]});return{'success':!0x0,'format':_0x40e4d6[_0x15c291(0xf7)],'outputPath':_0x40e4d6[_0x15c291(0x13a)],'sizeBytes':_0x40e4d6[_0x15c291(0x128)],'session':O(_0x40e4d6[_0x15c291(0x13f)])};},async 'getWorkbookSession'(_0x121b00){const _0x4afdc5=_0x2ce2;let _0x21c93e=await D(_0x121b00),_0x51a34d=await _0x239db9[_0x4afdc5(0x142)]({..._0x121b00[_0x4afdc5(0x10c)]===void 0x0?{}:{'cwd':_0x121b00[_0x4afdc5(0x10c)]},'identity':_0x21c93e});return{'exists':_0x51a34d!==null,'session':_0x51a34d===null?null:O(_0x51a34d)};},'getSessionCount'(){const _0x353ff0=_0x2ce2;return _0x239db9[_0x353ff0(0xfd)]?.()??0x0;},'getSessionIdleTtlMs'(){return _0x239db9['getSessionIdleTtlMs']?.()??0xea60;},async 'loadWorkbook'(_0x559ff5){const _0xe866c0=_0x2ce2;let _0x4373b2=await D(_0x559ff5),_0xf58940=await _0x239db9[_0xe866c0(0xfa)]({..._0x559ff5[_0xe866c0(0x10c)]===void 0x0?{}:{'cwd':_0x559ff5[_0xe866c0(0x10c)]},'identity':_0x4373b2,'workbookData':_0x559ff5[_0xe866c0(0x118)]});return{'success':!0x0,'workbookData':_0xf58940['workbookData'],'session':O(_0xf58940['session'])};},async 'loadWorkbookDataReplayPack'(_0x3bccf6){const _0x52d9b4=_0x2ce2;let _0x3d44eb=await D(_0x3bccf6),_0x456750=await _0x239db9[_0x52d9b4(0xf9)]({..._0x3bccf6[_0x52d9b4(0x10c)]===void 0x0?{}:{'cwd':_0x3bccf6[_0x52d9b4(0x10c)]},'identity':_0x3d44eb,'replayPack':{'baseWorkbookData':_0x3bccf6[_0x52d9b4(0x11a)],'mutations':_0x3bccf6[_0x52d9b4(0x112)]}});return{'success':!0x0,'workbookData':_0x456750['workbookData'],'session':O(_0x456750[_0x52d9b4(0x13f)])};},async 'unloadIdleSessions'(){const _0x2c1d0a=_0x2ce2;await _0x239db9[_0x2c1d0a(0x15b)]?.();}};}function _0x2ce2(_0x8f12e2,_0x3a6ae5){_0x8f12e2=_0x8f12e2-0xf5;const _0x3167e5=_0x3167();let _0x2ce2f4=_0x3167e5[_0x8f12e2];return _0x2ce2f4;}async function D(_0x201357){return await S['resolveIdentity'](_0x201357);}function O(_0x2ea40b){const _0x19d628=_0x2ce2;return{'createdAt':_0x2ea40b[_0x19d628(0x13b)]??'','lastAccessedAt':_0x2ea40b['lastAccessedAt']??'','sessionId':_0x2ea40b[_0x19d628(0x13e)],'workbookIdentity':_0x2ea40b[_0x19d628(0x14c)][_0x19d628(0x103)]};}function k(_0x10d9d1){const _0x50edeb=_0x2ce2;return{'build.id':A(_0x10d9d1['env'],_0x50edeb(0x12a))??_0x10d9d1['buildId'],'deployment.environment.name':'local','distribution.channel':A(_0x10d9d1[_0x50edeb(0x125)],_0x50edeb(0x149))??'unknown','service.instance.id':String(_0x10d9d1[_0x50edeb(0x165)]),'service.name':_0x50edeb(0x13c),...A(_0x10d9d1[_0x50edeb(0x125)],_0x50edeb(0x145))===void 0x0?{}:{'service.version':A(_0x10d9d1[_0x50edeb(0x125)],'UNIVER_CLI_VERSION')}};}function A(_0x3ed46c,_0x36f975){let _0x59a2c9=_0x3ed46c[_0x36f975]?.['trim']();return _0x59a2c9===void 0x0||_0x59a2c9['length']===0x0?void 0x0:_0x59a2c9;}async function j(_0x3f49af){const _0xf18cec=_0x2ce2;P(_0x3f49af[_0xf18cec(0x127)])&&!await N(_0x3f49af[_0xf18cec(0x127)])&&await F(_0x3f49af[_0xf18cec(0x127)]);let _0x18568c=await I(_0x3f49af[_0xf18cec(0x160)]);_0x18568c!==null&&!L(_0x18568c)&&(await _0x469cb0(_0x3f49af[_0xf18cec(0x160)],{'force':!0x0})[_0xf18cec(0x134)](()=>void 0x0),await _0x469cb0(_0x3f49af[_0xf18cec(0x167)],{'force':!0x0})[_0xf18cec(0x134)](()=>void 0x0),await _0x469cb0(_0x3f49af[_0xf18cec(0x113)],{'recursive':!0x0,'force':!0x0})[_0xf18cec(0x134)](()=>void 0x0));}async function M(_0x1053bd,_0x550328){const _0x3580f1=_0x2ce2;try{return await _0x3d68e4(_0x1053bd,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x3c4336){if(_0x3c4336[_0x3580f1(0x164)]!==_0x3580f1(0x117))throw _0x3c4336;let _0x4fc1f7=await I(_0x550328);return _0x4fc1f7!==null&&L(_0x4fc1f7)?!0x1:(await _0x469cb0(_0x1053bd,{'recursive':!0x0,'force':!0x0}),await _0x3d68e4(_0x1053bd,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function N(_0x22efe3){return await new Promise(_0x4bac6c=>{const _0x2b65d4=_0x2ce2;let _0x42cdc4=_0x5c2237[_0x2b65d4(0x14e)](_0x22efe3);_0x42cdc4[_0x2b65d4(0x157)](_0x2b65d4(0x111),()=>{const _0xaaf731=_0x2b65d4;_0x42cdc4[_0xaaf731(0x120)](),_0x4bac6c(!0x0);}),_0x42cdc4['once'](_0x2b65d4(0x10d),()=>{_0x4bac6c(!0x1);});});}function P(_0x526272){return _0x243bd7(_0x526272)?!0x1:_0x1ec61b(_0x526272);}async function F(_0x55661f){const _0x44e112=_0x2ce2;_0x243bd7(_0x55661f)||await _0x469cb0(_0x55661f,{'force':!0x0})[_0x44e112(0x134)](()=>void 0x0);}async function I(_0x2b5936){const _0x46e765=_0x2ce2;try{let _0x45ea58=await _0x278b63(_0x2b5936,_0x46e765(0x155)),_0x4addfa=Number(_0x45ea58[_0x46e765(0x133)]());return Number['isFinite'](_0x4addfa)?_0x4addfa:null;}catch{return null;}}function L(_0x26c9c5){try{return _0x2ad829['kill'](_0x26c9c5,0x0),!0x0;}catch{return!0x1;}}function _0x3167(){const _0x1460ae=['createConnection','stringify','current','mutates','slice','params','runtimeRoot','utf8','dispose','once','58320FvhuJO','traceparent','sigint','unloadIdleSessions','argv','logRequestError','eventName','method','pidPath','SessionGetWorkbook','destroyAll','sessionHost','code','pid','exit','metaPath','listen','now','SessionLoadWorkbook','indexOf','format','DaemonRpcServer','loadWorkbookDataReplayPack','loadWorkbookData','parse','value','getSessionCount','DaemonRpcFinish','unref','SessionLoadWorkbookDataReplayPack','473423uwdpej','max','absolutePath','exportWorkbookData','SessionCreateWorkbook','loadWorkbook','Health','event','durationMs','runtimeExecutionPlaneEntry','info','cwd','error','close','196760EJxzps','920934uHHAEi','connect','mutations','lockPath','homeDir','meta','server','EEXIST','workbookData','write','baseWorkbookData','SessionDispose','SessionEvalJs','Method\x20not\x20found:\x20','Runtime','toString','end','SIGINT','66245gLSkWy','getWorkbookSession','SessionExportWorkbookData','env','createServer','socketPath','sizeBytes','Daemon','UNIVER_CLI_BUILD_ID','2.0','serve','startedAt','flush','DaemonRpcError','min','12MxdWoU','exportWorkbookFile','trim','catch','data','1136618obBXCs','withSpan','timestamp','logRequestEvent','outputPath','createdAt','univer-daemon','DaemonRpcStart','sessionId','session','name','toISOString','getSession','createWorkbook','1073653leIpxu','UNIVER_CLI_VERSION','finally','DaemonStop','Daemon\x20handler\x20not\x20ready:\x20','UNIVER_DISTRIBUTION_CHANNEL','buildId','message','packageIdentity','sessionRoot'];_0x3167=function(){return _0x1460ae;};return _0x3167();}function R(_0x5a6098,_0x1e8442){const _0x48e60c=_0x2ce2;return{'jsonrpc':_0x48e60c(0x12b),'id':_0x5a6098,'result':_0x1e8442};}function z(_0x583c32,_0x2f1104,_0x4f7734){const _0x489600=_0x2ce2;return{'jsonrpc':_0x489600(0x12b),'id':_0x583c32,'error':{'code':_0x2f1104,'message':_0x4f7734 instanceof Error?_0x4f7734[_0x489600(0x14b)]:String(_0x4f7734)}};}var B=process[_0x92d56a(0x15c)][0x2]??_0x92d56a(0x12c);B!==_0x92d56a(0x12c)&&(console['error']('Unknown\x20daemon\x20subcommand:\x20'+B),process['exit'](0x1)),C()[_0x92d56a(0x134)](_0x2b4484=>{const _0x54f68d=_0x92d56a;console[_0x54f68d(0x10d)](_0x2b4484 instanceof Error?_0x2b4484[_0x54f68d(0x14b)]:String(_0x2b4484)),process[_0x54f68d(0x166)](0x1);});
|
|
2
|
+
const _0x15a6ee=_0x263f;function _0x3ada(){const _0x2fca47=['472574jZdNRz','dispose','event','absolutePath','mutates','unknown','toISOString','SIGINT','EEXIST','SessionExportWorkbookFile','kill','7460290Wmbyhc','18516BlulhL','univer-daemon','Method\x20not\x20found:\x20','4725TEAxQr','baseWorkbookData','server','params','runtimeExecutionPlaneEntry','loadWorkbook','daemonDir','withContext','evalJs','connect','format','38oZmPoN','SessionCreateWorkbook','close','env','getWorkbookSession','Daemon','now','resolveIdentity','getSessionIdleTtlMs','metaPath','isFinite','packageIdentity','durationMs','lockPath','loadWorkbookDataReplayPack','max','method','DaemonRpcError','6883352CuNhdA','min','local','SessionExportWorkbookData','createConnection','sigterm','createWorkbook','Another\x20daemon\x20startup\x20owns\x20','lastAccessedAt','destroyAll','outputPath','error','SIGTERM','name','finally','onShutdownRequest','mutations','modulePath','message','Health','execArgv','stringify','flush','serve','createServer','parse','getSessionCount','trim','sizeBytes','1722dUCYEL','pid','2.0','cwd','buildId','workbookData','socketPath','code','UNIVER_CLI_VERSION','eventName','homeDir','DaemonRpcStart','sessionId','getSession','logRequestEvent','DaemonRpcServer','exportWorkbookData','SessionLoadWorkbook','228639NKbkbR','23656InxXOi','timestamp','loadWorkbookData','pidPath','rpc-shutdown','once','slice','catch','utf8','session','Runtime','length','info','6016265HmtEkb','unloadIdleSessions','logRequestError','withSpan','sessionHost','current','sigint','exportWorkbookFile','DaemonStop','exit','startedAt','data','SessionEvalJs','toString'];_0x3ada=function(){return _0x2fca47;};return _0x3ada();}(function(_0x2ff1ec,_0x3dacff){const _0x320821=_0x263f,_0x5d6c98=_0x2ff1ec();while(!![]){try{const _0x1f898d=parseInt(_0x320821(0x107))/0x1+parseInt(_0x320821(0xaa))/0x2*(parseInt(_0x320821(0xeb))/0x3)+parseInt(_0x320821(0xbc))/0x4+-parseInt(_0x320821(0xf9))/0x5+parseInt(_0x320821(0x9c))/0x6*(parseInt(_0x320821(0xd9))/0x7)+-parseInt(_0x320821(0xec))/0x8*(parseInt(_0x320821(0x9f))/0x9)+-parseInt(_0x320821(0x9b))/0xa;if(_0x1f898d===_0x3dacff)break;else _0x5d6c98['push'](_0x5d6c98['shift']());}catch(_0x45180f){_0x5d6c98['push'](_0x5d6c98['shift']());}}}(_0x3ada,0xdb75c));import'../chunks/vendor-DjomC5bd.js';import{a as _0x2b4b66,i as _0x5e5666,n,o as _0x308d60,r as _0x6ec121,t as _0x21fccf}from'../chunks/trace-DPfd8LdJ.js';import{a as _0x42f9a6,d as _0x1e2e74,l as _0x5d3ce8,m as _0x1e9a35,n as _0x4a3956,r as _0xa2dd6a,u as _0x1e3e2e}from'../chunks/runtime-manifest-DvhuIQzx.js';import{t as _0x192876}from'../chunks/build-id-Coc3wh1M.js';import{existsSync as _0x1af927}from'node:fs';import{chmod as _0x35cf0a,mkdir as _0x57fb52,readFile as _0x244d80,rm as _0x2dc4ad,writeFile as _0x1c0409}from'node:fs/promises';import _0x1b3873 from'node:net';import _0x42f172 from'node:process';var S=new _0xa2dd6a();async function C(_0x45706e={}){const _0x4ec474=_0x263f;let _0x32c352=_0x45706e[_0x4ec474(0xad)]??_0x42f172[_0x4ec474(0xad)],_0xb2f3ae=_0x1e3e2e(_0x32c352),_0x5b0419=_0x4a3956(_0x32c352),_0x360369=_0x45706e[_0x4ec474(0xfd)]??E(new _0x42f9a6({'env':_0x32c352,'logger':_0x1e2e74({'env':_0x32c352,'role':_0x2b4b66[_0x4ec474(0xf6)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0x5b0419[_0x4ec474(0xa3)][_0x4ec474(0xd0)]],'modulePath':_0x5b0419[_0x4ec474(0xa3)][_0x4ec474(0xcd)]})})),_0x2ac5a4=_0x192876(_0x32c352),_0x5907ad=new Date()[_0x4ec474(0x10d)]();if(await _0x57fb52(_0xb2f3ae[_0x4ec474(0xa5)],{'recursive':!0x0,'mode':0x1c0}),await _0x57fb52(_0xb2f3ae['sessionRoot'],{'recursive':!0x0,'mode':0x1c0}),!await M(_0xb2f3ae['lockPath'],_0xb2f3ae[_0x4ec474(0xef)])){if(await N(_0xb2f3ae[_0x4ec474(0xdf)]))return;throw Error(_0x4ec474(0xc3)+_0xb2f3ae['lockPath']);}await j(_0xb2f3ae);let _0x4d5801=_0x1e2e74({'env':_0x32c352,'role':_0x2b4b66[_0x4ec474(0xaf)]}),_0x3c8445=k({'buildId':_0x2ac5a4,'env':_0x32c352,'pid':_0x42f172['pid']}),_0x109932=!0x1,_0x56cc80={},_0x2d9831=async _0x23ffc9=>z(null,-0x7f5b,Error('Daemon\x20handler\x20not\x20ready:\x20'+_0x23ffc9)),_0x1eaa2e=_0x1b3873[_0x4ec474(0xd4)](_0x1625ce=>{const _0xe748b4=_0x4ec474;let _0x1febe4='';_0x1625ce['on'](_0xe748b4(0x104),_0x553eb4=>{const _0x1ad250=_0xe748b4;_0x1febe4+=_0x553eb4[_0x1ad250(0x106)](_0x1ad250(0xf4)),_0x5532d6();}),_0x1625ce['on'](_0xe748b4(0xc7),()=>void 0x0);let _0x5532d6=async()=>{const _0x4020f6=_0xe748b4;for(;;){let _0x218412=_0x1febe4['indexOf']('\x0a');if(_0x218412<0x0)return;let _0x5bb3f8=_0x1febe4['slice'](0x0,_0x218412)[_0x4020f6(0xd7)]();if(_0x1febe4=_0x1febe4[_0x4020f6(0xf2)](_0x218412+0x1),!_0x5bb3f8)continue;let _0x2d1016=await _0x2d9831(_0x5bb3f8);_0x1625ce['write'](JSON['stringify'](_0x2d1016)+'\x0a');}};});_0x2d9831=w({'buildId':_0x2ac5a4,'logRequestEvent':async _0x1f51b6=>{const _0x19abf1=_0x4ec474;_0x4d5801[_0x19abf1(0x109)]({'level':_0x1f51b6[_0x19abf1(0xe2)]===_0x5e5666[_0x19abf1(0xbb)]?_0x19abf1(0xc7):_0x19abf1(0xf8),'event_name':_0x1f51b6[_0x19abf1(0xe2)],'component':_0x6ec121[_0x19abf1(0xaf)],'process_role':_0x2b4b66[_0x19abf1(0xaf)],..._0x1f51b6[_0x19abf1(0xc7)]===void 0x0?{}:{'error':_0x1f51b6[_0x19abf1(0xc7)]},'fields':{..._0x3c8445,..._0x1f51b6['durationMs']===void 0x0?{}:{'duration_ms':_0x1f51b6[_0x19abf1(0xb6)]},'method':_0x1f51b6[_0x19abf1(0xba)],'timestamp':_0x1f51b6[_0x19abf1(0xed)]}});},'logRequestError':async _0xce5e15=>{const _0x21670c=_0x4ec474;_0x4d5801[_0x21670c(0xc7)]({'event_name':_0x5e5666[_0x21670c(0xbb)],'component':_0x6ec121[_0x21670c(0xaf)],'process_role':_0x2b4b66[_0x21670c(0xaf)],'error':_0xce5e15[_0x21670c(0xc7)],'fields':{..._0x3c8445,'method':_0xce5e15['method'],'timestamp':_0xce5e15[_0x21670c(0xed)]}});},'onShutdownRequest':()=>{const _0x4fe417=_0x4ec474;_0x51cf61(_0x4fe417(0xf0))[_0x4fe417(0xca)](()=>{const _0x3465a0=_0x4fe417;_0x42f172[_0x3465a0(0x102)](0x0);});},'pid':_0x42f172[_0x4ec474(0xda)],'runtimeRoot':_0xb2f3ae[_0x4ec474(0xe3)],'sessionHost':_0x360369,'socketPath':_0xb2f3ae['socketPath'],'startedAt':_0x5907ad}),await new Promise((_0x5aade6,_0x447784)=>{const _0x5ab40c=_0x4ec474;_0x1eaa2e[_0x5ab40c(0xf1)](_0x5ab40c(0xc7),_0x447784),_0x1eaa2e['listen'](_0xb2f3ae[_0x5ab40c(0xdf)],_0x5aade6);}),_0x5d3ce8(_0xb2f3ae[_0x4ec474(0xdf)])||await _0x35cf0a(_0xb2f3ae['socketPath'],0x180);let _0x10872f={'pid':_0x42f172[_0x4ec474(0xda)],'startedAt':_0x5907ad,'socketPath':_0xb2f3ae['socketPath'],'runtimeRoot':_0xb2f3ae[_0x4ec474(0xe3)],'buildId':_0x2ac5a4};await _0x1c0409(_0xb2f3ae[_0x4ec474(0xef)],String(_0x42f172[_0x4ec474(0xda)]),'utf8'),await _0x1c0409(_0xb2f3ae['metaPath'],JSON[_0x4ec474(0xd1)](_0x10872f,null,0x2),'utf8'),_0x4d5801['info']({'event_name':_0x5e5666['DaemonStart'],'component':_0x6ec121[_0x4ec474(0xaf)],'process_role':_0x2b4b66[_0x4ec474(0xaf)],'fields':{..._0x3c8445,'pid':_0x42f172['pid'],'runtime_root':_0xb2f3ae[_0x4ec474(0xe3)],'socket_path':_0xb2f3ae[_0x4ec474(0xdf)],'started_at':_0x5907ad}}),await _0x4d5801['flush']();let _0x4479ce=setInterval(()=>{const _0x5749a7=_0x4ec474;_0x360369[_0x5749a7(0xfa)]();},Math[_0x4ec474(0xb9)](0x3e8,Math[_0x4ec474(0xbd)](_0x360369[_0x4ec474(0xb2)](),0xea60)));_0x4479ce['unref'](),_0x56cc80[_0x4ec474(0xfe)]=_0x4479ce;async function _0x51cf61(_0x4291e5){const _0x22260d=_0x4ec474;_0x109932||(_0x109932=!0x0,_0x56cc80[_0x22260d(0xfe)]!==void 0x0&&clearInterval(_0x56cc80[_0x22260d(0xfe)]),_0x4d5801['info']({'event_name':_0x5e5666[_0x22260d(0x101)],'component':_0x6ec121[_0x22260d(0xaf)],'process_role':_0x2b4b66[_0x22260d(0xaf)],'fields':{..._0x3c8445,'pid':_0x42f172[_0x22260d(0xda)],'reason':_0x4291e5,'timestamp':new Date()[_0x22260d(0x10d)]()}}),await _0x4d5801[_0x22260d(0xd2)](),await _0x360369[_0x22260d(0xc5)](_0x4291e5),await new Promise(_0x190df7=>{const _0x2525ea=_0x22260d;_0x1eaa2e[_0x2525ea(0xac)](()=>_0x190df7());}),await F(_0xb2f3ae[_0x22260d(0xdf)]),await _0x2dc4ad(_0xb2f3ae[_0x22260d(0xef)],{'force':!0x0})[_0x22260d(0xf3)](()=>void 0x0),await _0x2dc4ad(_0xb2f3ae[_0x22260d(0xb3)],{'force':!0x0})['catch'](()=>void 0x0),await _0x2dc4ad(_0xb2f3ae[_0x22260d(0xb7)],{'recursive':!0x0,'force':!0x0})[_0x22260d(0xf3)](()=>void 0x0));}_0x42f172['on'](_0x4ec474(0x10e),()=>{const _0x21528e=_0x4ec474;_0x51cf61(_0x21528e(0xff))[_0x21528e(0xca)](()=>{const _0x6d1d22=_0x21528e;_0x42f172[_0x6d1d22(0x102)](0x0);});}),_0x42f172['on'](_0x4ec474(0xc8),()=>{const _0x38b45e=_0x4ec474;_0x51cf61(_0x38b45e(0xc1))[_0x38b45e(0xca)](()=>{const _0x38692d=_0x38b45e;_0x42f172[_0x38692d(0x102)](0x0);});});}function w(_0x46da71){return async _0x2bb0d8=>{const _0x518ecd=_0x263f;let _0x420c65;try{_0x420c65=JSON[_0x518ecd(0xd5)](_0x2bb0d8);}catch(_0xfddf9d){return z(null,-0x7fbc,_0xfddf9d);}let _0x380924=_0x21fccf(_0x420c65['meta']?.['traceparent']),_0x50439c=async()=>await n[_0x518ecd(0xfc)]({'name':_0x308d60[_0x518ecd(0xe8)],'kind':_0x518ecd(0xa1)},async()=>{const _0x151ad6=_0x518ecd;let _0x46ae8f=Date[_0x151ad6(0xb0)]();await _0x46da71[_0x151ad6(0xe7)]?.({'eventName':_0x5e5666[_0x151ad6(0xe4)],'method':_0x420c65[_0x151ad6(0xba)],'timestamp':new Date()['toISOString']()});try{let _0xe9dda8=await T(_0x420c65,_0x46da71);return await _0x46da71[_0x151ad6(0xe7)]?.({'durationMs':Date[_0x151ad6(0xb0)]()-_0x46ae8f,'eventName':_0x5e5666['DaemonRpcFinish'],'method':_0x420c65[_0x151ad6(0xba)],'timestamp':new Date()['toISOString']()}),_0xe9dda8;}catch(_0x31a57f){return await _0x46da71['logRequestEvent']?.({'durationMs':Date[_0x151ad6(0xb0)]()-_0x46ae8f,'eventName':_0x5e5666[_0x151ad6(0xbb)],'method':_0x420c65[_0x151ad6(0xba)],'error':_0x31a57f,'timestamp':new Date()[_0x151ad6(0x10d)]()}),_0x46da71[_0x151ad6(0xe7)]===void 0x0&&await _0x46da71[_0x151ad6(0xfb)]?.({'method':_0x420c65[_0x151ad6(0xba)],'error':_0x31a57f instanceof Error?_0x31a57f['message']:String(_0x31a57f),'timestamp':new Date()[_0x151ad6(0x10d)]()}),z(_0x420c65['id'],-0x7f5b,_0x31a57f);}});return _0x380924===void 0x0?await _0x50439c():await n[_0x518ecd(0xa6)](_0x380924,_0x50439c);};}async function T(_0x4fb03c,_0x42afe6){const _0x503eab=_0x263f;switch(_0x4fb03c[_0x503eab(0xba)]){case _0x1e9a35[_0x503eab(0xcf)]:return{'jsonrpc':_0x503eab(0xdb),'id':_0x4fb03c['id'],'result':{'ok':!0x0,'pid':_0x42afe6['pid'],'startedAt':_0x42afe6[_0x503eab(0x103)],'socketPath':_0x42afe6['socketPath'],'runtimeRoot':_0x42afe6['runtimeRoot'],'buildId':_0x42afe6['buildId'],'sessionCount':_0x42afe6['sessionHost'][_0x503eab(0xd6)]()}};case _0x1e9a35['Shutdown']:return _0x42afe6[_0x503eab(0xcb)]?.(),{'jsonrpc':_0x503eab(0xdb),'id':_0x4fb03c['id'],'result':{'stopping':!0x0}};case _0x1e9a35[_0x503eab(0xea)]:{let _0x25415b=await _0x42afe6['sessionHost'][_0x503eab(0xa4)](_0x4fb03c[_0x503eab(0xa2)]);return R(_0x4fb03c['id'],_0x25415b);}case _0x1e9a35['SessionLoadWorkbookDataReplayPack']:{let _0x3b7a15=await _0x42afe6[_0x503eab(0xfd)][_0x503eab(0xb8)](_0x4fb03c[_0x503eab(0xa2)]);return R(_0x4fb03c['id'],_0x3b7a15);}case _0x1e9a35[_0x503eab(0xab)]:{let _0x402e0f=await _0x42afe6[_0x503eab(0xfd)][_0x503eab(0xc2)](_0x4fb03c[_0x503eab(0xa2)]);return R(_0x4fb03c['id'],_0x402e0f);}case _0x1e9a35[_0x503eab(0x105)]:{let _0x34da11=await _0x42afe6['sessionHost'][_0x503eab(0xa7)](_0x4fb03c['params']);return R(_0x4fb03c['id'],_0x34da11);}case _0x1e9a35[_0x503eab(0x99)]:{let _0x1aa3a6=await _0x42afe6[_0x503eab(0xfd)][_0x503eab(0x100)](_0x4fb03c[_0x503eab(0xa2)]);return R(_0x4fb03c['id'],_0x1aa3a6);}case _0x1e9a35[_0x503eab(0xbf)]:{let _0x334bb6=_0x4fb03c[_0x503eab(0xa2)],_0x2b3a9d=await _0x42afe6[_0x503eab(0xfd)][_0x503eab(0xe9)](_0x334bb6);return R(_0x4fb03c['id'],_0x2b3a9d);}case _0x1e9a35['SessionDispose']:{let _0x4b69e7=await _0x42afe6[_0x503eab(0xfd)][_0x503eab(0x108)](_0x4fb03c[_0x503eab(0xa2)]);return R(_0x4fb03c['id'],_0x4b69e7);}case _0x1e9a35['SessionGetWorkbook']:{let _0x982464=await _0x42afe6[_0x503eab(0xfd)][_0x503eab(0xae)](_0x4fb03c[_0x503eab(0xa2)]);return R(_0x4fb03c['id'],_0x982464);}default:return z(_0x4fb03c['id'],-0x7f59,Error(_0x503eab(0x9e)+_0x4fb03c[_0x503eab(0xba)]));}}function E(_0x2965b7){return{async 'createWorkbook'(_0x239fae){const _0x1a335f=_0x263f;let _0x272bd6=await D(_0x239fae),_0x369c1f=await _0x2965b7[_0x1a335f(0xc2)]({..._0x239fae[_0x1a335f(0xdc)]===void 0x0?{}:{'cwd':_0x239fae[_0x1a335f(0xdc)]},'identity':_0x272bd6,..._0x239fae['id']===void 0x0?{}:{'workbookId':_0x239fae['id']},..._0x239fae['name']===void 0x0?{}:{'workbookName':_0x239fae[_0x1a335f(0xc9)]}});return{'success':!0x0,'workbookData':_0x369c1f['workbookData'],'session':O(_0x369c1f[_0x1a335f(0xf5)])};},async 'dispose'(_0x18f589){const _0x1fa703=_0x263f;let _0x3c3281=await D(_0x18f589);return await _0x2965b7[_0x1fa703(0x108)]({..._0x18f589[_0x1fa703(0xdc)]===void 0x0?{}:{'cwd':_0x18f589[_0x1fa703(0xdc)]},'identity':_0x3c3281}),{'disposed':!0x0,'workbookIdentity':_0x3c3281[_0x1fa703(0x10a)]};},async 'destroyAll'(_0x331f7f){const _0x10a32f=_0x263f;await _0x2965b7[_0x10a32f(0xc5)]?.(_0x331f7f);},async 'evalJs'(_0x32e168){const _0x5b1fb7=_0x263f;let _0xfd6e61=await D(_0x32e168),_0x1c736e=await _0x2965b7[_0x5b1fb7(0xa7)]({'code':_0x32e168[_0x5b1fb7(0xe0)],..._0x32e168[_0x5b1fb7(0xdc)]===void 0x0?{}:{'cwd':_0x32e168['cwd']},'identity':_0xfd6e61,..._0x32e168[_0x5b1fb7(0x10b)]===void 0x0?{}:{'mutates':_0x32e168[_0x5b1fb7(0x10b)]}});return{..._0x1c736e['mutations']===void 0x0?{}:{'mutations':_0x1c736e[_0x5b1fb7(0xcc)]},'success':!0x0,'value':_0x1c736e['value'],'session':O(_0x1c736e[_0x5b1fb7(0xf5)])};},async 'exportWorkbookData'(_0x57500f){const _0x3fc6a2=_0x263f;let _0x1991fe=await D(_0x57500f),_0x20ae8b=await _0x2965b7[_0x3fc6a2(0xe9)]({..._0x57500f['cwd']===void 0x0?{}:{'cwd':_0x57500f[_0x3fc6a2(0xdc)]},'identity':_0x1991fe});return{'success':!0x0,'workbookData':_0x20ae8b[_0x3fc6a2(0xde)],'session':O(_0x20ae8b[_0x3fc6a2(0xf5)])};},async 'exportWorkbookFile'(_0x4470fa){const _0x3102fe=_0x263f;let _0x10358d=await D(_0x4470fa),_0x4972be=await _0x2965b7[_0x3102fe(0x100)]({..._0x4470fa[_0x3102fe(0xdc)]===void 0x0?{}:{'cwd':_0x4470fa[_0x3102fe(0xdc)]},'format':_0x4470fa[_0x3102fe(0xa9)],'identity':_0x10358d,'outputPath':_0x4470fa[_0x3102fe(0xc6)]});return{'success':!0x0,'format':_0x4972be[_0x3102fe(0xa9)],'outputPath':_0x4972be[_0x3102fe(0xc6)],'sizeBytes':_0x4972be[_0x3102fe(0xd8)],'session':O(_0x4972be[_0x3102fe(0xf5)])};},async 'getWorkbookSession'(_0x50c65f){const _0x279bae=_0x263f;let _0x4b12f3=await D(_0x50c65f),_0x150d3e=await _0x2965b7[_0x279bae(0xe6)]({..._0x50c65f['cwd']===void 0x0?{}:{'cwd':_0x50c65f[_0x279bae(0xdc)]},'identity':_0x4b12f3});return{'exists':_0x150d3e!==null,'session':_0x150d3e===null?null:O(_0x150d3e)};},'getSessionCount'(){return _0x2965b7['getSessionCount']?.()??0x0;},'getSessionIdleTtlMs'(){return _0x2965b7['getSessionIdleTtlMs']?.()??0xea60;},async 'loadWorkbook'(_0x2fbd48){const _0x48569b=_0x263f;let _0x1c1837=await D(_0x2fbd48),_0x10da2a=await _0x2965b7[_0x48569b(0xee)]({..._0x2fbd48[_0x48569b(0xdc)]===void 0x0?{}:{'cwd':_0x2fbd48['cwd']},'identity':_0x1c1837,'workbookData':_0x2fbd48[_0x48569b(0xde)]});return{'success':!0x0,'workbookData':_0x10da2a[_0x48569b(0xde)],'session':O(_0x10da2a[_0x48569b(0xf5)])};},async 'loadWorkbookDataReplayPack'(_0x3f2507){const _0x343c98=_0x263f;let _0x30104b=await D(_0x3f2507),_0x5bacbc=await _0x2965b7[_0x343c98(0xb8)]({..._0x3f2507['cwd']===void 0x0?{}:{'cwd':_0x3f2507[_0x343c98(0xdc)]},'identity':_0x30104b,'replayPack':{'baseWorkbookData':_0x3f2507[_0x343c98(0xa0)],'mutations':_0x3f2507['mutations']}});return{'success':!0x0,'workbookData':_0x5bacbc[_0x343c98(0xde)],'session':O(_0x5bacbc[_0x343c98(0xf5)])};},async 'unloadIdleSessions'(){const _0x417206=_0x263f;await _0x2965b7[_0x417206(0xfa)]?.();}};}async function D(_0x41f403){const _0x56054d=_0x263f;return await S[_0x56054d(0xb1)](_0x41f403);}function O(_0x590853){const _0x4eab56=_0x263f;return{'createdAt':_0x590853['createdAt']??'','lastAccessedAt':_0x590853[_0x4eab56(0xc4)]??'','sessionId':_0x590853[_0x4eab56(0xe5)],'workbookIdentity':_0x590853[_0x4eab56(0xb5)]['absolutePath']};}function k(_0x58ce00){const _0x45b992=_0x263f;return{'build.id':A(_0x58ce00[_0x45b992(0xad)],'UNIVER_CLI_BUILD_ID')??_0x58ce00[_0x45b992(0xdd)],'deployment.environment.name':_0x45b992(0xbe),'distribution.channel':A(_0x58ce00[_0x45b992(0xad)],'UNIVER_DISTRIBUTION_CHANNEL')??_0x45b992(0x10c),'service.instance.id':String(_0x58ce00[_0x45b992(0xda)]),'service.name':_0x45b992(0x9d),...A(_0x58ce00[_0x45b992(0xad)],_0x45b992(0xe1))===void 0x0?{}:{'service.version':A(_0x58ce00['env'],'UNIVER_CLI_VERSION')}};}function A(_0x4955ab,_0x5255f6){const _0x5581b8=_0x263f;let _0x55fef8=_0x4955ab[_0x5255f6]?.[_0x5581b8(0xd7)]();return _0x55fef8===void 0x0||_0x55fef8[_0x5581b8(0xf7)]===0x0?void 0x0:_0x55fef8;}async function j(_0x2c1614){const _0x192aa0=_0x263f;P(_0x2c1614['socketPath'])&&!await N(_0x2c1614[_0x192aa0(0xdf)])&&await F(_0x2c1614[_0x192aa0(0xdf)]);let _0x4da38d=await I(_0x2c1614[_0x192aa0(0xef)]);_0x4da38d!==null&&!L(_0x4da38d)&&(await _0x2dc4ad(_0x2c1614[_0x192aa0(0xef)],{'force':!0x0})[_0x192aa0(0xf3)](()=>void 0x0),await _0x2dc4ad(_0x2c1614[_0x192aa0(0xb3)],{'force':!0x0})['catch'](()=>void 0x0),await _0x2dc4ad(_0x2c1614['lockPath'],{'recursive':!0x0,'force':!0x0})['catch'](()=>void 0x0));}async function M(_0xf9928d,_0x44d035){const _0x408b99=_0x263f;try{return await _0x57fb52(_0xf9928d,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x38a39b){if(_0x38a39b['code']!==_0x408b99(0x10f))throw _0x38a39b;let _0x5d1f8f=await I(_0x44d035);return _0x5d1f8f!==null&&L(_0x5d1f8f)?!0x1:(await _0x2dc4ad(_0xf9928d,{'recursive':!0x0,'force':!0x0}),await _0x57fb52(_0xf9928d,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function N(_0x4bd3e6){return await new Promise(_0x6c55a7=>{const _0x538b16=_0x263f;let _0x352c0e=_0x1b3873[_0x538b16(0xc0)](_0x4bd3e6);_0x352c0e['once'](_0x538b16(0xa8),()=>{_0x352c0e['end'](),_0x6c55a7(!0x0);}),_0x352c0e[_0x538b16(0xf1)]('error',()=>{_0x6c55a7(!0x1);});});}function P(_0x7a2e91){return _0x5d3ce8(_0x7a2e91)?!0x1:_0x1af927(_0x7a2e91);}async function F(_0x24772b){const _0x3b7042=_0x263f;_0x5d3ce8(_0x24772b)||await _0x2dc4ad(_0x24772b,{'force':!0x0})[_0x3b7042(0xf3)](()=>void 0x0);}function _0x263f(_0x1420f7,_0x14c5ef){_0x1420f7=_0x1420f7-0x99;const _0x3ada2f=_0x3ada();let _0x263f02=_0x3ada2f[_0x1420f7];return _0x263f02;}async function I(_0x3bb8ff){const _0x4dc143=_0x263f;try{let _0x1ec8e3=await _0x244d80(_0x3bb8ff,_0x4dc143(0xf4)),_0x39acf4=Number(_0x1ec8e3[_0x4dc143(0xd7)]());return Number[_0x4dc143(0xb4)](_0x39acf4)?_0x39acf4:null;}catch{return null;}}function L(_0x4ef4f5){const _0x5c006d=_0x263f;try{return _0x42f172[_0x5c006d(0x9a)](_0x4ef4f5,0x0),!0x0;}catch{return!0x1;}}function R(_0x269843,_0xff042b){const _0x3b601d=_0x263f;return{'jsonrpc':_0x3b601d(0xdb),'id':_0x269843,'result':_0xff042b};}function z(_0x4c0715,_0x417f73,_0x1149b5){const _0x2f093e=_0x263f;return{'jsonrpc':'2.0','id':_0x4c0715,'error':{'code':_0x417f73,'message':_0x1149b5 instanceof Error?_0x1149b5[_0x2f093e(0xce)]:String(_0x1149b5)}};}var B=process['argv'][0x2]??_0x15a6ee(0xd3);B!=='serve'&&(console[_0x15a6ee(0xc7)]('Unknown\x20daemon\x20subcommand:\x20'+B),process[_0x15a6ee(0x102)](0x1)),C()[_0x15a6ee(0xf3)](_0x5baefd=>{const _0x110548=_0x15a6ee;console['error'](_0x5baefd instanceof Error?_0x5baefd[_0x110548(0xce)]:String(_0x5baefd)),process['exit'](0x1);});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x458efc=_0x556d;(function(_0x4b95cd,_0x3fa430){const _0x1286eb=_0x556d,_0x15595e=_0x4b95cd();while(!![]){try{const _0x2102b9=-parseInt(_0x1286eb(0xec))/0x1+-parseInt(_0x1286eb(0xea))/0x2+-parseInt(_0x1286eb(0xeb))/0x3+parseInt(_0x1286eb(0xee))/0x4*(parseInt(_0x1286eb(0xdc))/0x5)+parseInt(_0x1286eb(0x103))/0x6*(parseInt(_0x1286eb(0xfb))/0x7)+parseInt(_0x1286eb(0xed))/0x8+parseInt(_0x1286eb(0xff))/0x9*(-parseInt(_0x1286eb(0xf0))/0xa);if(_0x2102b9===_0x3fa430)break;else _0x15595e['push'](_0x15595e['shift']());}catch(_0x86db03){_0x15595e['push'](_0x15595e['shift']());}}}(_0x389f,0x2c1db));import'../chunks/vendor-DjomC5bd.js';import{t as _0x5cedae}from'../chunks/headless-univer-BWfA31gd.js';import{n as _0x3b742e,o as _0x1f1cfc,t as _0x283f33}from'../chunks/trace-DPfd8LdJ.js';function _0x556d(_0x422bd5,_0x2ece8f){_0x422bd5=_0x422bd5-0xdb;const _0x389f6b=_0x389f();let _0x556d7a=_0x389f6b[_0x422bd5];return _0x556d7a;}let i=function(_0x2b3f93){const _0x3dfdfc=_0x556d;return _0x2b3f93['CreateWorkbook']=_0x3dfdfc(0x100),_0x2b3f93[_0x3dfdfc(0x106)]=_0x3dfdfc(0xe5),_0x2b3f93[_0x3dfdfc(0xe3)]=_0x3dfdfc(0xf4),_0x2b3f93[_0x3dfdfc(0x101)]='exportWorkbookData',_0x2b3f93['LoadWorkbook']='loadWorkbook',_0x2b3f93['LoadWorkbookDataReplayPack']=_0x3dfdfc(0xe7),_0x2b3f93;}({});var a=class{['tail']=Promise[_0x458efc(0x107)]();async['enqueue'](_0x38ca5a){const _0x4b6fcb=_0x458efc;let _0x521ff5=this[_0x4b6fcb(0xf5)],_0x5bd2a3;this[_0x4b6fcb(0xf5)]=new Promise(_0xe9bf6=>{_0x5bd2a3=_0xe9bf6;}),await _0x521ff5;try{return await _0x38ca5a();}finally{_0x5bd2a3?.();}}},o=_0x5cedae(),s=new a();process[_0x458efc(0xdd)]?.({'type':_0x458efc(0xde)}),process['on'](_0x458efc(0xf8),async _0x24117d=>{const _0x2a789c=_0x458efc;if(_0x24117d?.[_0x2a789c(0xe9)]!=='rpc-request')return;let _0x540386=await c(_0x24117d['data']);process[_0x2a789c(0xdd)]?.({'type':_0x2a789c(0xfe),'id':_0x24117d['id'],'data':_0x540386});}),process['on']('disconnect',()=>{const _0x5c5d8d=_0x458efc;o[_0x5c5d8d(0xe1)](),process[_0x5c5d8d(0xf7)](0x0);}),process['on'](_0x458efc(0xe0),()=>{const _0x48ceb4=_0x458efc;o[_0x48ceb4(0xe1)](),process[_0x48ceb4(0xf7)](0x0);});async function c(_0x330e65){const _0x12a0cc=_0x458efc;let _0x47c447=_0x283f33(_0x330e65[_0x12a0cc(0xfa)]?.['traceparent']),_0x7a762e=async()=>await _0x3b742e[_0x12a0cc(0xef)]({'name':_0x1f1cfc[_0x12a0cc(0x104)],'kind':'server'},async()=>await l(_0x330e65));return _0x47c447===void 0x0?await _0x7a762e():await _0x3b742e[_0x12a0cc(0xe4)](_0x47c447,_0x7a762e);}function _0x389f(){const _0x49714c=['evaljs','mutates','loadWorkbookDataReplayPack','value','type','123856uEwNPw','616035SEAMEV','89486PXWdLo','2747472wxOKER','20RIykMY','withSpan','100mfqzfS','evalJs','code','2.0','exportWorkbookFile','tail','evalJsWithMutationCapture','exit','message','LoadWorkbookDataReplayPack','meta','161VogYCC','Method\x20not\x20implemented:\x20','workbookData','rpc-response','309177PRXyJR','createWorkbook','ExportWorkbookData','mutations','71718dTDOrL','RuntimeRpcClient','format','EvalJs','resolve','exportWorkbookData','loadWorkbookData','262635nLQsTh','send','ready','method','SIGTERM','dispose','params','ExportWorkbookFile','withContext'];_0x389f=function(){return _0x49714c;};return _0x389f();}async function l(_0x1942d7){const _0x1db177=_0x458efc;try{switch(_0x1942d7[_0x1db177(0xdf)]){case i['CreateWorkbook']:{let _0x1010de=o['createWorkbook'](_0x1942d7['params']??{});return{'jsonrpc':'2.0','id':_0x1942d7['id'],'result':{'success':!0x0,'workbookData':_0x1010de}};}case i['LoadWorkbook']:{let _0x5dc298=o[_0x1db177(0xdb)](_0x1942d7[_0x1db177(0xe2)][_0x1db177(0xfd)]);return{'jsonrpc':_0x1db177(0xf3),'id':_0x1942d7['id'],'result':{'success':!0x0,'workbookData':_0x5dc298}};}case i[_0x1db177(0xf9)]:{let _0x2184a4=await o[_0x1db177(0xe7)](_0x1942d7[_0x1db177(0xe2)]);return{'jsonrpc':_0x1db177(0xf3),'id':_0x1942d7['id'],'result':{'success':!0x0,'workbookData':_0x2184a4}};}case i[_0x1db177(0x101)]:return{'jsonrpc':'2.0','id':_0x1942d7['id'],'result':{'success':!0x0,'workbookData':o[_0x1db177(0x108)]()}};case i[_0x1db177(0xe3)]:{let _0x5da72e=_0x1942d7[_0x1db177(0xe2)],_0x6202cf=await o['exportWorkbookFile'](_0x5da72e['outputPath'],_0x5da72e[_0x1db177(0x105)]);return{'jsonrpc':_0x1db177(0xf3),'id':_0x1942d7['id'],'result':{'success':!0x0,..._0x6202cf}};}case i['EvalJs']:{let _0x2f8709=_0x1942d7[_0x1db177(0xe2)]??{},_0x5555be=async()=>{const _0x17bb4c=_0x1db177;let _0xfc0e3c=_0x2f8709[_0x17bb4c(0xe6)]?await o[_0x17bb4c(0xf6)](_0x2f8709[_0x17bb4c(0xf2)]):{'value':await o[_0x17bb4c(0xf1)](_0x2f8709[_0x17bb4c(0xf2)]),'mutations':void 0x0};return{'success':!0x0,..._0xfc0e3c['mutations']===void 0x0?{}:{'mutations':_0xfc0e3c[_0x17bb4c(0x102)]},'value':_0xfc0e3c[_0x17bb4c(0xe8)]};},_0x15da3c=_0x2f8709[_0x1db177(0xe6)]?await s['enqueue'](_0x5555be):await _0x5555be();return{'jsonrpc':_0x1db177(0xf3),'id':_0x1942d7['id'],'result':_0x15da3c};}default:throw Error(_0x1db177(0xfc)+String(_0x1942d7['method']));}}catch(_0x217af8){return{'jsonrpc':'2.0','id':_0x1942d7['id'],'error':{'code':-0x7f5b,'message':_0x217af8 instanceof Error?_0x217af8['message']:String(_0x217af8)}};}}
|