univer-cli 0.1.14 → 0.1.16
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/build-info-CYwzl-uD.js +1 -0
- package/chunks/headless-univer-CbMCumXv.js +1 -0
- package/chunks/node-0IWqXZGJ.js +1 -0
- package/chunks/runtime-eval-kernels-BWvkXRlB.js +1 -1
- package/chunks/runtime-manifest-ChxEzYC3.js +1 -0
- package/chunks/trace-DPfd8LdJ.js +1 -1
- package/chunks/{vendor-BzHSCzgc.js → vendor-BUmrAeJ_.js} +162 -162
- package/chunks/vendor-dynamic-proxies.js +1 -1
- package/internal/cli.js +1 -1
- package/internal/daemon.js +1 -1
- package/internal/product-telemetry.js +1 -1
- package/internal/univer-runner.js +1 -1
- package/package.json +3 -2
- package/sac-help/topics/apply-ledger.md +59 -0
- package/sac-help/topics/authoring.md +58 -0
- package/sac-help/topics/data-assets.md +34 -0
- package/sac-help/topics/facade-api.md +42 -0
- package/sac-help/topics/rebuild.md +22 -0
- package/sac-help/topics/workflow.md +69 -0
- package/view/browser/assets/formula-dependency-graph-panel.js +1 -1
- package/view/browser/assets/vendor.js +1 -1
- package/view/browser/assets/viewer.css +1 -1
- package/view/browser/assets/viewer.js +1 -1
- package/chunks/build-info-CEz0HGcR.js +0 -1
- package/chunks/headless-univer-BHRYaTxY.js +0 -1
- package/chunks/node-C6ZVE15U.js +0 -1
- package/chunks/runtime-manifest-Bdf66z_K.js +0 -1
package/internal/daemon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x2fcc66=_0x3a22;(function(_0x4e1d74,_0x3b064f){const _0xc6cd41=_0x3a22,_0x59a7a1=_0x4e1d74();while(!![]){try{const _0x1a6c46=-parseInt(_0xc6cd41(0xb2))/0x1*(-parseInt(_0xc6cd41(0xe1))/0x2)+parseInt(_0xc6cd41(0xaf))/0x3*(-parseInt(_0xc6cd41(0xab))/0x4)+parseInt(_0xc6cd41(0xbf))/0x5*(parseInt(_0xc6cd41(0xe6))/0x6)+-parseInt(_0xc6cd41(0x111))/0x7+-parseInt(_0xc6cd41(0xf1))/0x8*(parseInt(_0xc6cd41(0x11b))/0x9)+-parseInt(_0xc6cd41(0xdc))/0xa*(parseInt(_0xc6cd41(0xac))/0xb)+-parseInt(_0xc6cd41(0xd4))/0xc*(-parseInt(_0xc6cd41(0xc1))/0xd);if(_0x1a6c46===_0x3b064f)break;else _0x59a7a1['push'](_0x59a7a1['shift']());}catch(_0x214e66){_0x59a7a1['push'](_0x59a7a1['shift']());}}}(_0x585e,0xdda26));import'../chunks/vendor-BzHSCzgc.js';import{a as _0x4b7473,i as _0x5b699d,n,o as _0x51ccf2,r as _0x223b97,t as _0x240cfa}from'../chunks/trace-DPfd8LdJ.js';import{c as _0x589b19,f as _0x24e7c2,l as _0x432bc5,r as _0x1cebe8,s as _0x54e680,t as _0x233b51}from'../chunks/node-C6ZVE15U.js';import{t as _0x3a8fa4}from'../chunks/build-id-Coc3wh1M.js';import{n as _0x52f330}from'../chunks/runtime-manifest-Bdf66z_K.js';import{existsSync as _0x34d839}from'node:fs';function _0x3a22(_0x5729fc,_0x1bccec){_0x5729fc=_0x5729fc-0xa9;const _0x585e5f=_0x585e();let _0x3a22fd=_0x585e5f[_0x5729fc];return _0x3a22fd;}import{chmod as _0x52d7b9,mkdir as _0x1decc1,readFile as _0x4bd474,rm as _0xa20bd4,writeFile as _0x48f00a}from'node:fs/promises';import _0xea2916 from'node:net';import _0x589d0b from'node:process';var S=new _0x233b51();async function C(_0x3df288={}){const _0x44e652=_0x3a22;let _0x2fb42d=_0x3df288['env']??_0x589d0b[_0x44e652(0xb4)],_0x572336=_0x589b19(_0x2fb42d),_0x30cbb4=_0x52f330(_0x2fb42d),_0x90f2f3=_0x3df288[_0x44e652(0x106)]??E(new _0x1cebe8({'env':_0x2fb42d,'logger':_0x432bc5({'env':_0x2fb42d,'role':_0x4b7473[_0x44e652(0x112)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0x30cbb4[_0x44e652(0xad)]['execArgv']],'modulePath':_0x30cbb4[_0x44e652(0xad)][_0x44e652(0xf2)]})})),_0x2dbc28=_0x3a8fa4(_0x2fb42d),_0x2d9791=new Date()[_0x44e652(0xd1)]();if(await _0x1decc1(_0x572336[_0x44e652(0xd3)],{'recursive':!0x0,'mode':0x1c0}),await _0x1decc1(_0x572336[_0x44e652(0xed)],{'recursive':!0x0,'mode':0x1c0}),!await M(_0x572336[_0x44e652(0x115)],_0x572336[_0x44e652(0x113)])){if(await N(_0x572336[_0x44e652(0xe9)]))return;throw Error(_0x44e652(0x110)+_0x572336[_0x44e652(0x115)]);}await j(_0x572336);let _0x1ddbee=_0x432bc5({'env':_0x2fb42d,'role':_0x4b7473['Daemon']}),_0x62a564=k({'buildId':_0x2dbc28,'env':_0x2fb42d,'pid':_0x589d0b[_0x44e652(0xef)]}),_0xde3b73=!0x1,_0x53fc77={},_0xf6ab57=async _0x9179cb=>z(null,-0x7f5b,Error(_0x44e652(0xc7)+_0x9179cb)),_0x53c62f=_0xea2916['createServer'](_0x2d395a=>{const _0x4cc4f9=_0x44e652;let _0x25df1e='';_0x2d395a['on'](_0x4cc4f9(0xbe),_0x12f802=>{const _0x3b0683=_0x4cc4f9;_0x25df1e+=_0x12f802[_0x3b0683(0xc9)](_0x3b0683(0xf6)),_0x22d654();}),_0x2d395a['on'](_0x4cc4f9(0xfc),()=>void 0x0);let _0x22d654=async()=>{const _0x577da1=_0x4cc4f9;for(;;){let _0x1d7428=_0x25df1e[_0x577da1(0xf8)]('\x0a');if(_0x1d7428<0x0)return;let _0x38fdd5=_0x25df1e['slice'](0x0,_0x1d7428)[_0x577da1(0xc6)]();if(_0x25df1e=_0x25df1e['slice'](_0x1d7428+0x1),!_0x38fdd5)continue;let _0x48ebef=await _0xf6ab57(_0x38fdd5);_0x2d395a[_0x577da1(0x10a)](JSON[_0x577da1(0xec)](_0x48ebef)+'\x0a');}};});_0xf6ab57=w({'buildId':_0x2dbc28,'logRequestEvent':async _0x32e9f6=>{const _0x281276=_0x44e652;_0x1ddbee[_0x281276(0xd6)]({'level':_0x32e9f6[_0x281276(0xd0)]===_0x5b699d[_0x281276(0xcd)]?_0x281276(0xfc):_0x281276(0x10d),'event_name':_0x32e9f6[_0x281276(0xd0)],'component':_0x223b97[_0x281276(0xa9)],'process_role':_0x4b7473[_0x281276(0xa9)],..._0x32e9f6['error']===void 0x0?{}:{'error':_0x32e9f6[_0x281276(0xfc)]},'fields':{..._0x62a564,..._0x32e9f6[_0x281276(0x11d)]===void 0x0?{}:{'duration_ms':_0x32e9f6[_0x281276(0x11d)]},'method':_0x32e9f6[_0x281276(0xca)],'timestamp':_0x32e9f6['timestamp']}});},'logRequestError':async _0x4b0cb0=>{const _0xf444e0=_0x44e652;_0x1ddbee['error']({'event_name':_0x5b699d[_0xf444e0(0xcd)],'component':_0x223b97[_0xf444e0(0xa9)],'process_role':_0x4b7473['Daemon'],'error':_0x4b0cb0[_0xf444e0(0xfc)],'fields':{..._0x62a564,'method':_0x4b0cb0['method'],'timestamp':_0x4b0cb0['timestamp']}});},'onShutdownRequest':()=>{const _0xaa9479=_0x44e652;_0x55a13d(_0xaa9479(0xeb))[_0xaa9479(0xbc)](()=>{const _0x206c42=_0xaa9479;_0x589d0b[_0x206c42(0xbd)](0x0);});},'pid':_0x589d0b['pid'],'runtimeRoot':_0x572336[_0x44e652(0x100)],'sessionHost':_0x90f2f3,'socketPath':_0x572336['socketPath'],'startedAt':_0x2d9791}),await new Promise((_0x6800ff,_0x5a4689)=>{const _0x46ef50=_0x44e652;_0x53c62f['once'](_0x46ef50(0xfc),_0x5a4689),_0x53c62f[_0x46ef50(0xe8)](_0x572336['socketPath'],_0x6800ff);}),_0x54e680(_0x572336[_0x44e652(0xe9)])||await _0x52d7b9(_0x572336[_0x44e652(0xe9)],0x180);let _0x45330e={'pid':_0x589d0b['pid'],'startedAt':_0x2d9791,'socketPath':_0x572336[_0x44e652(0xe9)],'runtimeRoot':_0x572336[_0x44e652(0x100)],'buildId':_0x2dbc28};await _0x48f00a(_0x572336[_0x44e652(0x113)],String(_0x589d0b['pid']),_0x44e652(0xf6)),await _0x48f00a(_0x572336['metaPath'],JSON['stringify'](_0x45330e,null,0x2),_0x44e652(0xf6)),_0x1ddbee[_0x44e652(0x10d)]({'event_name':_0x5b699d['DaemonStart'],'component':_0x223b97[_0x44e652(0xa9)],'process_role':_0x4b7473[_0x44e652(0xa9)],'fields':{..._0x62a564,'pid':_0x589d0b[_0x44e652(0xef)],'runtime_root':_0x572336[_0x44e652(0x100)],'socket_path':_0x572336[_0x44e652(0xe9)],'started_at':_0x2d9791}}),await _0x1ddbee[_0x44e652(0x105)]();let _0x4b1f60=setInterval(()=>{const _0xdce17f=_0x44e652;_0x90f2f3[_0xdce17f(0xee)]();},Math['max'](0x3e8,Math[_0x44e652(0xe7)](_0x90f2f3[_0x44e652(0x123)](),0xea60)));_0x4b1f60[_0x44e652(0xb1)](),_0x53fc77[_0x44e652(0xf7)]=_0x4b1f60;async function _0x55a13d(_0x43599d){const _0x33165c=_0x44e652;_0xde3b73||(_0xde3b73=!0x0,_0x53fc77[_0x33165c(0xf7)]!==void 0x0&&clearInterval(_0x53fc77[_0x33165c(0xf7)]),_0x1ddbee[_0x33165c(0x10d)]({'event_name':_0x5b699d[_0x33165c(0xda)],'component':_0x223b97['Daemon'],'process_role':_0x4b7473[_0x33165c(0xa9)],'fields':{..._0x62a564,'pid':_0x589d0b[_0x33165c(0xef)],'reason':_0x43599d,'timestamp':new Date()[_0x33165c(0xd1)]()}}),await _0x1ddbee[_0x33165c(0x105)](),await _0x90f2f3['destroyAll'](_0x43599d),await new Promise(_0x5df949=>{const _0x3ad508=_0x33165c;_0x53c62f[_0x3ad508(0xdd)](()=>_0x5df949());}),await F(_0x572336[_0x33165c(0xe9)]),await _0xa20bd4(_0x572336['pidPath'],{'force':!0x0})[_0x33165c(0x107)](()=>void 0x0),await _0xa20bd4(_0x572336['metaPath'],{'force':!0x0})[_0x33165c(0x107)](()=>void 0x0),await _0xa20bd4(_0x572336[_0x33165c(0x115)],{'recursive':!0x0,'force':!0x0})[_0x33165c(0x107)](()=>void 0x0));}_0x589d0b['on']('SIGINT',()=>{const _0x3d1f54=_0x44e652;_0x55a13d(_0x3d1f54(0x102))[_0x3d1f54(0xbc)](()=>{const _0x39b5fe=_0x3d1f54;_0x589d0b[_0x39b5fe(0xbd)](0x0);});}),_0x589d0b['on'](_0x44e652(0xe3),()=>{const _0x27ad07=_0x44e652;_0x55a13d(_0x27ad07(0xe0))[_0x27ad07(0xbc)](()=>{const _0x4c5dd2=_0x27ad07;_0x589d0b[_0x4c5dd2(0xbd)](0x0);});});}function w(_0x3245fb){return async _0xc1f062=>{const _0x3082f0=_0x3a22;let _0x533d91;try{_0x533d91=JSON[_0x3082f0(0xd7)](_0xc1f062);}catch(_0x143d07){return z(null,-0x7fbc,_0x143d07);}let _0x1cf17a=_0x240cfa(_0x533d91[_0x3082f0(0xcf)]?.['traceparent']),_0x4b6a97=async()=>await n[_0x3082f0(0x116)]({'name':_0x51ccf2[_0x3082f0(0xc0)],'kind':_0x3082f0(0xe2)},async()=>{const _0x2b2757=_0x3082f0;let _0x351997=Date[_0x2b2757(0xf0)]();await _0x3245fb[_0x2b2757(0x121)]?.({'eventName':_0x5b699d[_0x2b2757(0xb9)],'method':_0x533d91[_0x2b2757(0xca)],'timestamp':new Date()[_0x2b2757(0xd1)]()});try{let _0x55a8cf=await T(_0x533d91,_0x3245fb);return await _0x3245fb['logRequestEvent']?.({'durationMs':Date[_0x2b2757(0xf0)]()-_0x351997,'eventName':_0x5b699d[_0x2b2757(0xfa)],'method':_0x533d91[_0x2b2757(0xca)],'timestamp':new Date()[_0x2b2757(0xd1)]()}),_0x55a8cf;}catch(_0xc97f90){return await _0x3245fb['logRequestEvent']?.({'durationMs':Date[_0x2b2757(0xf0)]()-_0x351997,'eventName':_0x5b699d['DaemonRpcError'],'method':_0x533d91[_0x2b2757(0xca)],'error':_0xc97f90,'timestamp':new Date()[_0x2b2757(0xd1)]()}),_0x3245fb[_0x2b2757(0x121)]===void 0x0&&await _0x3245fb[_0x2b2757(0x101)]?.({'method':_0x533d91[_0x2b2757(0xca)],'error':_0xc97f90 instanceof Error?_0xc97f90[_0x2b2757(0xcb)]:String(_0xc97f90),'timestamp':new Date()['toISOString']()}),z(_0x533d91['id'],-0x7f5b,_0xc97f90);}});return _0x1cf17a===void 0x0?await _0x4b6a97():await n[_0x3082f0(0x103)](_0x1cf17a,_0x4b6a97);};}async function T(_0x57b9a7,_0xd51cd9){const _0x18b725=_0x3a22;switch(_0x57b9a7[_0x18b725(0xca)]){case _0x24e7c2[_0x18b725(0xf9)]:return{'jsonrpc':'2.0','id':_0x57b9a7['id'],'result':{'ok':!0x0,'pid':_0xd51cd9[_0x18b725(0xef)],'startedAt':_0xd51cd9[_0x18b725(0x11c)],'socketPath':_0xd51cd9[_0x18b725(0xe9)],'runtimeRoot':_0xd51cd9['runtimeRoot'],'buildId':_0xd51cd9[_0x18b725(0xd9)],'sessionCount':_0xd51cd9['sessionHost'][_0x18b725(0x10e)]()}};case _0x24e7c2[_0x18b725(0xea)]:return _0xd51cd9['onShutdownRequest']?.(),{'jsonrpc':'2.0','id':_0x57b9a7['id'],'result':{'stopping':!0x0}};case _0x24e7c2[_0x18b725(0xdb)]:{let _0x5bd670=await _0xd51cd9[_0x18b725(0x106)][_0x18b725(0xe4)](_0x57b9a7['params']);return R(_0x57b9a7['id'],_0x5bd670);}case _0x24e7c2[_0x18b725(0xfd)]:{let _0x62bae9=await _0xd51cd9['sessionHost'][_0x18b725(0xc2)](_0x57b9a7[_0x18b725(0x119)]);return R(_0x57b9a7['id'],_0x62bae9);}case _0x24e7c2[_0x18b725(0x104)]:{let _0x13a455=await _0xd51cd9[_0x18b725(0x106)][_0x18b725(0xb3)](_0x57b9a7['params']);return R(_0x57b9a7['id'],_0x13a455);}case _0x24e7c2[_0x18b725(0xf5)]:{let _0x1a1b9e=await _0xd51cd9[_0x18b725(0x106)][_0x18b725(0xb8)](_0x57b9a7[_0x18b725(0x119)]);return R(_0x57b9a7['id'],_0x1a1b9e);}case _0x24e7c2[_0x18b725(0xff)]:{let _0x24a279=await _0xd51cd9['sessionHost']['exportWorkbookFile'](_0x57b9a7['params']);return R(_0x57b9a7['id'],_0x24a279);}case _0x24e7c2[_0x18b725(0x11f)]:{let _0x2dcd1c=_0x57b9a7['params'],_0x346c89=await _0xd51cd9['sessionHost'][_0x18b725(0xba)](_0x2dcd1c);return R(_0x57b9a7['id'],_0x346c89);}case _0x24e7c2[_0x18b725(0xb5)]:{let _0x4db0c8=await _0xd51cd9['sessionHost'][_0x18b725(0xc5)](_0x57b9a7['params']);return R(_0x57b9a7['id'],_0x4db0c8);}case _0x24e7c2[_0x18b725(0xaa)]:{let _0x49b9c2=await _0xd51cd9[_0x18b725(0x106)][_0x18b725(0xb7)](_0x57b9a7[_0x18b725(0x119)]);return R(_0x57b9a7['id'],_0x49b9c2);}default:return z(_0x57b9a7['id'],-0x7f59,Error(_0x18b725(0xe5)+_0x57b9a7['method']));}}function E(_0x24d3a2){return{async 'createWorkbook'(_0x3e148e){const _0x456c6f=_0x3a22;let _0x2f2106=await D(_0x3e148e),_0x2b863a=await _0x24d3a2['createWorkbook']({..._0x3e148e[_0x456c6f(0xae)]===void 0x0?{}:{'cwd':_0x3e148e[_0x456c6f(0xae)]},'identity':_0x2f2106,..._0x3e148e['id']===void 0x0?{}:{'workbookId':_0x3e148e['id']},..._0x3e148e['name']===void 0x0?{}:{'workbookName':_0x3e148e['name']}});return{'success':!0x0,'workbookData':_0x2b863a[_0x456c6f(0xf4)],'session':O(_0x2b863a[_0x456c6f(0xd5)])};},async 'dispose'(_0x217eb8){const _0x533855=_0x3a22;let _0x248534=await D(_0x217eb8);return await _0x24d3a2['dispose']({..._0x217eb8[_0x533855(0xae)]===void 0x0?{}:{'cwd':_0x217eb8[_0x533855(0xae)]},'identity':_0x248534}),{'disposed':!0x0,'workbookIdentity':_0x248534[_0x533855(0x118)]};},async 'destroyAll'(_0x16d82e){const _0x5efd59=_0x3a22;await _0x24d3a2[_0x5efd59(0x11e)]?.(_0x16d82e);},async 'evalJs'(_0x4ad3fe){const _0x1204ff=_0x3a22;let _0x26903f=await D(_0x4ad3fe),_0x4f8dd1=await _0x24d3a2[_0x1204ff(0xb8)]({'code':_0x4ad3fe['code'],..._0x4ad3fe[_0x1204ff(0xae)]===void 0x0?{}:{'cwd':_0x4ad3fe[_0x1204ff(0xae)]},'identity':_0x26903f,..._0x4ad3fe[_0x1204ff(0x109)]===void 0x0?{}:{'mutates':_0x4ad3fe[_0x1204ff(0x109)]}});return{..._0x4f8dd1[_0x1204ff(0x11a)]===void 0x0?{}:{'mutations':_0x4f8dd1['mutations']},'success':!0x0,'value':_0x4f8dd1[_0x1204ff(0x114)],'session':O(_0x4f8dd1[_0x1204ff(0xd5)])};},async 'exportWorkbookData'(_0x381512){const _0x36d572=_0x3a22;let _0x2b0f1f=await D(_0x381512),_0x1eb9ca=await _0x24d3a2[_0x36d572(0xba)]({..._0x381512[_0x36d572(0xae)]===void 0x0?{}:{'cwd':_0x381512[_0x36d572(0xae)]},'identity':_0x2b0f1f});return{'success':!0x0,'workbookData':_0x1eb9ca[_0x36d572(0xf4)],'session':O(_0x1eb9ca[_0x36d572(0xd5)])};},async 'exportWorkbookFile'(_0x1fedc1){const _0x4aabc2=_0x3a22;let _0x16376d=await D(_0x1fedc1),_0x45e6e5=await _0x24d3a2['exportWorkbookFile']({..._0x1fedc1['cwd']===void 0x0?{}:{'cwd':_0x1fedc1['cwd']},'format':_0x1fedc1[_0x4aabc2(0xdf)],'identity':_0x16376d,'outputPath':_0x1fedc1[_0x4aabc2(0xd8)]});return{'success':!0x0,'format':_0x45e6e5[_0x4aabc2(0xdf)],'outputPath':_0x45e6e5[_0x4aabc2(0xd8)],'sizeBytes':_0x45e6e5[_0x4aabc2(0xfe)],'session':O(_0x45e6e5['session'])};},async 'getWorkbookSession'(_0x3fa447){const _0x47faf5=_0x3a22;let _0x18e76c=await D(_0x3fa447),_0x3ddabb=await _0x24d3a2[_0x47faf5(0x108)]({..._0x3fa447['cwd']===void 0x0?{}:{'cwd':_0x3fa447[_0x47faf5(0xae)]},'identity':_0x18e76c});return{'exists':_0x3ddabb!==null,'session':_0x3ddabb===null?null:O(_0x3ddabb)};},'getSessionCount'(){const _0x21ac7e=_0x3a22;return _0x24d3a2[_0x21ac7e(0x10e)]?.()??0x0;},'getSessionIdleTtlMs'(){const _0x31d623=_0x3a22;return _0x24d3a2[_0x31d623(0x123)]?.()??0xea60;},async 'loadWorkbook'(_0x271cb3){const _0x3aafc4=_0x3a22;let _0x3f264b=await D(_0x271cb3),_0x3c7c7f=await _0x24d3a2[_0x3aafc4(0xfb)]({..._0x271cb3[_0x3aafc4(0xae)]===void 0x0?{}:{'cwd':_0x271cb3[_0x3aafc4(0xae)]},'identity':_0x3f264b,'workbookData':_0x271cb3[_0x3aafc4(0xf4)]});return{'success':!0x0,'workbookData':_0x3c7c7f[_0x3aafc4(0xf4)],'session':O(_0x3c7c7f[_0x3aafc4(0xd5)])};},async 'loadWorkbookDataReplayPack'(_0x34e6f5){const _0x2e50a9=_0x3a22;let _0x1208fd=await D(_0x34e6f5);return{'success':!0x0,'session':O((await _0x24d3a2[_0x2e50a9(0xc2)]({..._0x34e6f5[_0x2e50a9(0xae)]===void 0x0?{}:{'cwd':_0x34e6f5[_0x2e50a9(0xae)]},'identity':_0x1208fd,'replayPack':{'baseWorkbookData':_0x34e6f5[_0x2e50a9(0xce)],'mutations':_0x34e6f5[_0x2e50a9(0x11a)]}}))['session'])};},async 'unloadIdleSessions'(){const _0x3e4898=_0x3a22;await _0x24d3a2[_0x3e4898(0xee)]?.();}};}async function D(_0x468d42){const _0x52aab2=_0x3a22;return await S[_0x52aab2(0xbb)](_0x468d42);}function O(_0x458fb3){const _0x1c6711=_0x3a22;return{'createdAt':_0x458fb3[_0x1c6711(0xc8)]??'','lastAccessedAt':_0x458fb3[_0x1c6711(0xcc)]??'','sessionId':_0x458fb3[_0x1c6711(0xf3)],'workbookIdentity':_0x458fb3[_0x1c6711(0xd2)][_0x1c6711(0x118)]};}function k(_0x28ea0b){const _0x3d0504=_0x3a22;return{'build.id':A(_0x28ea0b[_0x3d0504(0xb4)],_0x3d0504(0xb6))??_0x28ea0b[_0x3d0504(0xd9)],'deployment.environment.name':'local','distribution.channel':A(_0x28ea0b[_0x3d0504(0xb4)],'UNIVER_DISTRIBUTION_CHANNEL')??_0x3d0504(0x125),'service.instance.id':String(_0x28ea0b[_0x3d0504(0xef)]),'service.name':_0x3d0504(0x10c),...A(_0x28ea0b[_0x3d0504(0xb4)],'UNIVER_CLI_VERSION')===void 0x0?{}:{'service.version':A(_0x28ea0b[_0x3d0504(0xb4)],_0x3d0504(0x10b))}};}function A(_0x587e95,_0x195e39){const _0x4991b1=_0x3a22;let _0x5694b0=_0x587e95[_0x195e39]?.[_0x4991b1(0xc6)]();return _0x5694b0===void 0x0||_0x5694b0[_0x4991b1(0xb0)]===0x0?void 0x0:_0x5694b0;}async function j(_0x27dbcb){const _0x580284=_0x3a22;P(_0x27dbcb['socketPath'])&&!await N(_0x27dbcb[_0x580284(0xe9)])&&await F(_0x27dbcb[_0x580284(0xe9)]);let _0x2961c1=await I(_0x27dbcb['pidPath']);_0x2961c1!==null&&!L(_0x2961c1)&&(await _0xa20bd4(_0x27dbcb[_0x580284(0x113)],{'force':!0x0})[_0x580284(0x107)](()=>void 0x0),await _0xa20bd4(_0x27dbcb[_0x580284(0xc4)],{'force':!0x0})[_0x580284(0x107)](()=>void 0x0),await _0xa20bd4(_0x27dbcb['lockPath'],{'recursive':!0x0,'force':!0x0})['catch'](()=>void 0x0));}async function M(_0x416854,_0x42f9d7){const _0x212f5d=_0x3a22;try{return await _0x1decc1(_0x416854,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x5c9532){if(_0x5c9532[_0x212f5d(0xc3)]!==_0x212f5d(0x120))throw _0x5c9532;let _0x150089=await I(_0x42f9d7);return _0x150089!==null&&L(_0x150089)?!0x1:(await _0xa20bd4(_0x416854,{'recursive':!0x0,'force':!0x0}),await _0x1decc1(_0x416854,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function N(_0x23158b){return await new Promise(_0x5824f2=>{const _0x566582=_0x3a22;let _0x41593d=_0xea2916['createConnection'](_0x23158b);_0x41593d[_0x566582(0x117)]('connect',()=>{_0x41593d['end'](),_0x5824f2(!0x0);}),_0x41593d[_0x566582(0x117)](_0x566582(0xfc),()=>{_0x5824f2(!0x1);});});}function P(_0x50099c){return _0x54e680(_0x50099c)?!0x1:_0x34d839(_0x50099c);}function _0x585e(){const _0x1a989f=['env','SessionDispose','UNIVER_CLI_BUILD_ID','getWorkbookSession','evalJs','DaemonRpcStart','exportWorkbookData','resolveIdentity','finally','exit','data','76990JjvWJp','DaemonRpcServer','117kFlDXV','loadWorkbookDataReplayPack','code','metaPath','dispose','trim','Daemon\x20handler\x20not\x20ready:\x20','createdAt','toString','method','message','lastAccessedAt','DaemonRpcError','baseWorkbookData','meta','eventName','toISOString','packageIdentity','daemonDir','3048036FZlJfj','session','event','parse','outputPath','buildId','DaemonStop','SessionLoadWorkbook','9970OxMDdj','close','Unknown\x20daemon\x20subcommand:\x20','format','sigterm','31342mZBjff','server','SIGTERM','loadWorkbook','Method\x20not\x20found:\x20','30MpCQEf','min','listen','socketPath','Shutdown','rpc-shutdown','stringify','sessionRoot','unloadIdleSessions','pid','now','464yscoXb','modulePath','sessionId','workbookData','SessionEvalJs','utf8','current','indexOf','Health','DaemonRpcFinish','loadWorkbookData','error','SessionLoadWorkbookDataReplayPack','sizeBytes','SessionExportWorkbookFile','homeDir','logRequestError','sigint','withContext','SessionCreateWorkbook','flush','sessionHost','catch','getSession','mutates','write','UNIVER_CLI_VERSION','univer-daemon','info','getSessionCount','serve','Another\x20daemon\x20startup\x20owns\x20','2854264SEiPfL','Runtime','pidPath','value','lockPath','withSpan','once','absolutePath','params','mutations','95373gVxkaU','startedAt','durationMs','destroyAll','SessionExportWorkbookData','EEXIST','logRequestEvent','2.0','getSessionIdleTtlMs','kill','unknown','Daemon','SessionGetWorkbook','6227472yWiMjh','220NyTXcd','runtimeExecutionPlaneEntry','cwd','3KmDyTT','length','unref','73GWjqUq','createWorkbook'];_0x585e=function(){return _0x1a989f;};return _0x585e();}async function F(_0x280ab7){const _0x14d7dc=_0x3a22;_0x54e680(_0x280ab7)||await _0xa20bd4(_0x280ab7,{'force':!0x0})[_0x14d7dc(0x107)](()=>void 0x0);}async function I(_0xa6719a){const _0x2d1b6d=_0x3a22;try{let _0x54a537=await _0x4bd474(_0xa6719a,'utf8'),_0x5e1db6=Number(_0x54a537[_0x2d1b6d(0xc6)]());return Number['isFinite'](_0x5e1db6)?_0x5e1db6:null;}catch{return null;}}function L(_0x3f4c16){const _0x2c1dda=_0x3a22;try{return _0x589d0b[_0x2c1dda(0x124)](_0x3f4c16,0x0),!0x0;}catch{return!0x1;}}function R(_0x2b2d98,_0x393232){const _0x3d253a=_0x3a22;return{'jsonrpc':_0x3d253a(0x122),'id':_0x2b2d98,'result':_0x393232};}function z(_0x2ad133,_0x43247b,_0x4f0ff2){return{'jsonrpc':'2.0','id':_0x2ad133,'error':{'code':_0x43247b,'message':_0x4f0ff2 instanceof Error?_0x4f0ff2['message']:String(_0x4f0ff2)}};}var B=process['argv'][0x2]??_0x2fcc66(0x10f);B!=='serve'&&(console[_0x2fcc66(0xfc)](_0x2fcc66(0xde)+B),process[_0x2fcc66(0xbd)](0x1)),C()[_0x2fcc66(0x107)](_0x54061a=>{const _0xcc4de1=_0x2fcc66;console[_0xcc4de1(0xfc)](_0x54061a instanceof Error?_0x54061a[_0xcc4de1(0xcb)]:String(_0x54061a)),process[_0xcc4de1(0xbd)](0x1);});
|
|
2
|
+
const _0x430fd8=_0x222b;(function(_0x1936a6,_0x233909){const _0x1e7ffb=_0x222b,_0x162a66=_0x1936a6();while(!![]){try{const _0x4b1209=-parseInt(_0x1e7ffb(0x18c))/0x1*(-parseInt(_0x1e7ffb(0x1ab))/0x2)+parseInt(_0x1e7ffb(0x1af))/0x3*(-parseInt(_0x1e7ffb(0x194))/0x4)+-parseInt(_0x1e7ffb(0x17d))/0x5*(-parseInt(_0x1e7ffb(0x180))/0x6)+-parseInt(_0x1e7ffb(0x1c0))/0x7+-parseInt(_0x1e7ffb(0x17a))/0x8*(-parseInt(_0x1e7ffb(0x1a1))/0x9)+-parseInt(_0x1e7ffb(0x1a4))/0xa*(-parseInt(_0x1e7ffb(0x160))/0xb)+parseInt(_0x1e7ffb(0x195))/0xc*(-parseInt(_0x1e7ffb(0x1b4))/0xd);if(_0x4b1209===_0x233909)break;else _0x162a66['push'](_0x162a66['shift']());}catch(_0x24ea2c){_0x162a66['push'](_0x162a66['shift']());}}}(_0x5751,0xc3e29));import'../chunks/vendor-BUmrAeJ_.js';import{a as _0x4dc68b,i as _0x2bea10,n,o as _0x47e69a,r as _0x5898da,t as _0x3037d5}from'../chunks/trace-DPfd8LdJ.js';function _0x5751(){const _0x4e3af1=['packageIdentity','getWorkbookSession','evalJs','utf8','Shutdown','destroyAll','toString','durationMs','serve','getSession','496yZxYtq','homeDir','dispose','2858685XcCbwH','mutations','event','12knzBbz','runtimeExecutionPlaneEntry','timestamp','sigint','SessionEvalJs','absolutePath','method','SessionExportWorkbookData','exit','flush','pidPath','rpc-shutdown','60483nrCnyE','env','unknown','baseWorkbookData','lockPath','length','loadWorkbookDataReplayPack','argv','410464YeBGlF','12598260xMpgdD','connect','createWorkbook','SessionLoadWorkbook','socketPath','traceparent','indexOf','now','getSessionCount','Health','sizeBytes','UNIVER_CLI_BUILD_ID','49257vXMjGN','EEXIST','params','70xkaMFl','stringify','withSpan','sigterm','SIGINT','trim','format','6ZNcndu','withContext','Daemon','SessionCreateWorkbook','3PykJFi','parse','SessionDispose','cwd','end','13XgXIdx','UNIVER_CLI_VERSION','write','data','exportWorkbookFile','2.0','message','local','buildId','server','slice','DaemonStart','4725679cwMsUd','createdAt','once','workbookData','name','kill','univer-daemon','DaemonRpcError','error','DaemonStop','DaemonRpcServer','runtimeRoot','max','pid','sessionHost','mutates','loadWorkbookData','finally','current','lastAccessedAt','code','sessionId','session','execArgv','Another\x20daemon\x20startup\x20owns\x20','logRequestEvent','loadWorkbook','resolveIdentity','metaPath','listen','info','toISOString','1517472JeSwZR','catch','Runtime','createConnection','eventName','value','createServer','Unknown\x20daemon\x20subcommand:\x20','min','getSessionIdleTtlMs','modulePath','DaemonRpcStart','unloadIdleSessions','SessionGetWorkbook','exportWorkbookData','unref'];_0x5751=function(){return _0x4e3af1;};return _0x5751();}import{c as _0x21a6e4,i as _0xa323ff,l as _0x5ddebf,p as _0x9b23e4,t as _0x1043f7,u as _0x5e2459}from'../chunks/node-0IWqXZGJ.js';import{t as _0x4f7ab3}from'../chunks/build-id-Coc3wh1M.js';import{n as _0x521e2e}from'../chunks/runtime-manifest-ChxEzYC3.js';import{existsSync as _0x5c19e9}from'node:fs';import{chmod as _0x29c632,mkdir as _0x84f010,readFile as _0x2277a1,rm as _0x1797cd,writeFile as _0x322b92}from'node:fs/promises';import _0x4e3ec4 from'node:net';import _0x662e25 from'node:process';var S=0x2bf20,C=new _0x1043f7();async function w(_0x2af26d={}){const _0x5afda1=_0x222b;let _0x4e08ac=_0x2af26d[_0x5afda1(0x18d)]??_0x662e25['env'],_0x1942c8=_0x5ddebf(_0x4e08ac),_0xf05d1a=_0x521e2e(_0x4e08ac),_0x323da4=_0x2af26d[_0x5afda1(0x1ce)]??D(new _0xa323ff({'env':_0x4e08ac,'logger':_0x5e2459({'env':_0x4e08ac,'role':_0x4dc68b[_0x5afda1(0x162)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0xf05d1a[_0x5afda1(0x181)][_0x5afda1(0x1d7)]],'modulePath':_0xf05d1a[_0x5afda1(0x181)][_0x5afda1(0x16a)]}),'rpcTimeoutMs':S})),_0x115de2=_0x4f7ab3(_0x4e08ac),_0x42487d=new Date()[_0x5afda1(0x15f)]();if(await _0x84f010(_0x1942c8['daemonDir'],{'recursive':!0x0,'mode':0x1c0}),await _0x84f010(_0x1942c8['sessionRoot'],{'recursive':!0x0,'mode':0x1c0}),!await N(_0x1942c8[_0x5afda1(0x190)],_0x1942c8[_0x5afda1(0x18a)])){if(await P(_0x1942c8[_0x5afda1(0x199)]))return;throw Error(_0x5afda1(0x1d8)+_0x1942c8[_0x5afda1(0x190)]);}await M(_0x1942c8);let _0x4764dc=_0x5e2459({'env':_0x4e08ac,'role':_0x4dc68b[_0x5afda1(0x1ad)]}),_0x11320a=A({'buildId':_0x115de2,'env':_0x4e08ac,'pid':_0x662e25[_0x5afda1(0x1cd)]}),_0x120d47=!0x1,_0x2b7cbf={},_0x153aa2=async _0x835590=>B(null,-0x7f5b,Error('Daemon\x20handler\x20not\x20ready:\x20'+_0x835590)),_0x532512=_0x4e3ec4[_0x5afda1(0x166)](_0x408565=>{const _0x956849=_0x5afda1;let _0x35b206='';_0x408565['on'](_0x956849(0x1b7),_0x203c98=>{const _0x5e6807=_0x956849;_0x35b206+=_0x203c98[_0x5e6807(0x176)](_0x5e6807(0x173)),_0x19ea2c();}),_0x408565['on'](_0x956849(0x1c8),()=>void 0x0);let _0x19ea2c=async()=>{const _0x3179b8=_0x956849;for(;;){let _0x39d6ea=_0x35b206[_0x3179b8(0x19b)]('\x0a');if(_0x39d6ea<0x0)return;let _0x33ad4a=_0x35b206[_0x3179b8(0x1be)](0x0,_0x39d6ea)[_0x3179b8(0x1a9)]();if(_0x35b206=_0x35b206[_0x3179b8(0x1be)](_0x39d6ea+0x1),!_0x33ad4a)continue;let _0x3e4bcd=await _0x153aa2(_0x33ad4a);_0x408565[_0x3179b8(0x1b6)](JSON[_0x3179b8(0x1a5)](_0x3e4bcd)+'\x0a');}};});_0x153aa2=T({'buildId':_0x115de2,'logRequestEvent':async _0x2f1b2a=>{const _0x514b79=_0x5afda1;_0x4764dc[_0x514b79(0x17f)]({'level':_0x2f1b2a[_0x514b79(0x164)]===_0x2bea10[_0x514b79(0x1c7)]?_0x514b79(0x1c8):_0x514b79(0x1de),'event_name':_0x2f1b2a[_0x514b79(0x164)],'component':_0x5898da[_0x514b79(0x1ad)],'process_role':_0x4dc68b[_0x514b79(0x1ad)],..._0x2f1b2a['error']===void 0x0?{}:{'error':_0x2f1b2a[_0x514b79(0x1c8)]},'fields':{..._0x11320a,..._0x2f1b2a['durationMs']===void 0x0?{}:{'duration_ms':_0x2f1b2a[_0x514b79(0x177)]},'method':_0x2f1b2a['method'],'timestamp':_0x2f1b2a[_0x514b79(0x182)]}});},'logRequestError':async _0x22d5a6=>{const _0x2d4234=_0x5afda1;_0x4764dc['error']({'event_name':_0x2bea10['DaemonRpcError'],'component':_0x5898da[_0x2d4234(0x1ad)],'process_role':_0x4dc68b[_0x2d4234(0x1ad)],'error':_0x22d5a6[_0x2d4234(0x1c8)],'fields':{..._0x11320a,'method':_0x22d5a6['method'],'timestamp':_0x22d5a6['timestamp']}});},'onShutdownRequest':()=>{const _0x58e693=_0x5afda1;_0x23e708(_0x58e693(0x18b))[_0x58e693(0x1d1)](()=>{const _0x4fa380=_0x58e693;_0x662e25[_0x4fa380(0x188)](0x0);});},'pid':_0x662e25[_0x5afda1(0x1cd)],'runtimeRoot':_0x1942c8['homeDir'],'sessionHost':_0x323da4,'socketPath':_0x1942c8['socketPath'],'startedAt':_0x42487d}),await new Promise((_0x51cbf5,_0x2ad717)=>{const _0x62f142=_0x5afda1;_0x532512[_0x62f142(0x1c2)](_0x62f142(0x1c8),_0x2ad717),_0x532512[_0x62f142(0x1dd)](_0x1942c8['socketPath'],_0x51cbf5);}),_0x21a6e4(_0x1942c8[_0x5afda1(0x199)])||await _0x29c632(_0x1942c8[_0x5afda1(0x199)],0x180);let _0x1c8d24={'pid':_0x662e25['pid'],'startedAt':_0x42487d,'socketPath':_0x1942c8[_0x5afda1(0x199)],'runtimeRoot':_0x1942c8[_0x5afda1(0x17b)],'buildId':_0x115de2};await _0x322b92(_0x1942c8['pidPath'],String(_0x662e25[_0x5afda1(0x1cd)]),'utf8'),await _0x322b92(_0x1942c8['metaPath'],JSON[_0x5afda1(0x1a5)](_0x1c8d24,null,0x2),_0x5afda1(0x173)),_0x4764dc[_0x5afda1(0x1de)]({'event_name':_0x2bea10[_0x5afda1(0x1bf)],'component':_0x5898da[_0x5afda1(0x1ad)],'process_role':_0x4dc68b[_0x5afda1(0x1ad)],'fields':{..._0x11320a,'pid':_0x662e25[_0x5afda1(0x1cd)],'runtime_root':_0x1942c8['homeDir'],'socket_path':_0x1942c8[_0x5afda1(0x199)],'started_at':_0x42487d}}),await _0x4764dc[_0x5afda1(0x189)]();let _0x146241=setInterval(()=>{const _0x511b3f=_0x5afda1;_0x323da4[_0x511b3f(0x16c)]();},Math[_0x5afda1(0x1cc)](0x3e8,Math[_0x5afda1(0x168)](_0x323da4[_0x5afda1(0x169)](),0xea60)));_0x146241[_0x5afda1(0x16f)](),_0x2b7cbf[_0x5afda1(0x1d2)]=_0x146241;async function _0x23e708(_0x52a89f){const _0x5e4caa=_0x5afda1;_0x120d47||(_0x120d47=!0x0,_0x2b7cbf['current']!==void 0x0&&clearInterval(_0x2b7cbf['current']),_0x4764dc[_0x5e4caa(0x1de)]({'event_name':_0x2bea10[_0x5e4caa(0x1c9)],'component':_0x5898da[_0x5e4caa(0x1ad)],'process_role':_0x4dc68b[_0x5e4caa(0x1ad)],'fields':{..._0x11320a,'pid':_0x662e25['pid'],'reason':_0x52a89f,'timestamp':new Date()['toISOString']()}}),await _0x4764dc[_0x5e4caa(0x189)](),await _0x323da4[_0x5e4caa(0x175)](_0x52a89f),await new Promise(_0x568ec8=>{_0x532512['close'](()=>_0x568ec8());}),await I(_0x1942c8[_0x5e4caa(0x199)]),await _0x1797cd(_0x1942c8[_0x5e4caa(0x18a)],{'force':!0x0})[_0x5e4caa(0x161)](()=>void 0x0),await _0x1797cd(_0x1942c8['metaPath'],{'force':!0x0})[_0x5e4caa(0x161)](()=>void 0x0),await _0x1797cd(_0x1942c8['lockPath'],{'recursive':!0x0,'force':!0x0})['catch'](()=>void 0x0));}_0x662e25['on'](_0x5afda1(0x1a8),()=>{const _0x55821c=_0x5afda1;_0x23e708(_0x55821c(0x183))[_0x55821c(0x1d1)](()=>{const _0x31b773=_0x55821c;_0x662e25[_0x31b773(0x188)](0x0);});}),_0x662e25['on']('SIGTERM',()=>{const _0x5949f3=_0x5afda1;_0x23e708(_0x5949f3(0x1a7))[_0x5949f3(0x1d1)](()=>{const _0x5b1f1f=_0x5949f3;_0x662e25[_0x5b1f1f(0x188)](0x0);});});}function T(_0x1e07d6){return async _0x430e1f=>{const _0x576849=_0x222b;let _0x3aa622;try{_0x3aa622=JSON[_0x576849(0x1b0)](_0x430e1f);}catch(_0xa3efbc){return B(null,-0x7fbc,_0xa3efbc);}let _0x1cd839=_0x3037d5(_0x3aa622['meta']?.[_0x576849(0x19a)]),_0x548d56=async()=>await n[_0x576849(0x1a6)]({'name':_0x47e69a[_0x576849(0x1ca)],'kind':_0x576849(0x1bd)},async()=>{const _0x55dff8=_0x576849;let _0x467dbd=Date[_0x55dff8(0x19c)]();await _0x1e07d6[_0x55dff8(0x1d9)]?.({'eventName':_0x2bea10[_0x55dff8(0x16b)],'method':_0x3aa622['method'],'timestamp':new Date()[_0x55dff8(0x15f)]()});try{let _0x4df8ec=await E(_0x3aa622,_0x1e07d6);return await _0x1e07d6[_0x55dff8(0x1d9)]?.({'durationMs':Date[_0x55dff8(0x19c)]()-_0x467dbd,'eventName':_0x2bea10['DaemonRpcFinish'],'method':_0x3aa622['method'],'timestamp':new Date()[_0x55dff8(0x15f)]()}),_0x4df8ec;}catch(_0x1d4887){return await _0x1e07d6[_0x55dff8(0x1d9)]?.({'durationMs':Date[_0x55dff8(0x19c)]()-_0x467dbd,'eventName':_0x2bea10[_0x55dff8(0x1c7)],'method':_0x3aa622['method'],'error':_0x1d4887,'timestamp':new Date()['toISOString']()}),_0x1e07d6[_0x55dff8(0x1d9)]===void 0x0&&await _0x1e07d6['logRequestError']?.({'method':_0x3aa622[_0x55dff8(0x186)],'error':_0x1d4887 instanceof Error?_0x1d4887[_0x55dff8(0x1ba)]:String(_0x1d4887),'timestamp':new Date()['toISOString']()}),B(_0x3aa622['id'],-0x7f5b,_0x1d4887);}});return _0x1cd839===void 0x0?await _0x548d56():await n[_0x576849(0x1ac)](_0x1cd839,_0x548d56);};}async function E(_0x2a684b,_0x50f52e){const _0x54998=_0x222b;switch(_0x2a684b[_0x54998(0x186)]){case _0x9b23e4[_0x54998(0x19e)]:return{'jsonrpc':_0x54998(0x1b9),'id':_0x2a684b['id'],'result':{'ok':!0x0,'pid':_0x50f52e['pid'],'startedAt':_0x50f52e['startedAt'],'socketPath':_0x50f52e[_0x54998(0x199)],'runtimeRoot':_0x50f52e[_0x54998(0x1cb)],'buildId':_0x50f52e[_0x54998(0x1bc)],'sessionCount':_0x50f52e['sessionHost'][_0x54998(0x19d)]()}};case _0x9b23e4[_0x54998(0x174)]:return _0x50f52e['onShutdownRequest']?.(),{'jsonrpc':_0x54998(0x1b9),'id':_0x2a684b['id'],'result':{'stopping':!0x0}};case _0x9b23e4[_0x54998(0x198)]:{let _0xaba713=await _0x50f52e[_0x54998(0x1ce)][_0x54998(0x1da)](_0x2a684b[_0x54998(0x1a3)]);return z(_0x2a684b['id'],_0xaba713);}case _0x9b23e4['SessionLoadWorkbookDataReplayPack']:{let _0x111d06=await _0x50f52e[_0x54998(0x1ce)][_0x54998(0x192)](_0x2a684b[_0x54998(0x1a3)]);return z(_0x2a684b['id'],_0x111d06);}case _0x9b23e4[_0x54998(0x1ae)]:{let _0x733234=await _0x50f52e['sessionHost'][_0x54998(0x197)](_0x2a684b[_0x54998(0x1a3)]);return z(_0x2a684b['id'],_0x733234);}case _0x9b23e4[_0x54998(0x184)]:{let _0x3bcbe3=await _0x50f52e[_0x54998(0x1ce)][_0x54998(0x172)](_0x2a684b[_0x54998(0x1a3)]);return z(_0x2a684b['id'],_0x3bcbe3);}case _0x9b23e4['SessionExportWorkbookFile']:{let _0x3789b1=await _0x50f52e[_0x54998(0x1ce)]['exportWorkbookFile'](_0x2a684b['params']);return z(_0x2a684b['id'],_0x3789b1);}case _0x9b23e4[_0x54998(0x187)]:{let _0x196751=_0x2a684b[_0x54998(0x1a3)],_0x40ea0c=await _0x50f52e[_0x54998(0x1ce)][_0x54998(0x16e)](_0x196751);return z(_0x2a684b['id'],_0x40ea0c);}case _0x9b23e4[_0x54998(0x1b1)]:{let _0x46ea9c=await _0x50f52e['sessionHost'][_0x54998(0x17c)](_0x2a684b[_0x54998(0x1a3)]);return z(_0x2a684b['id'],_0x46ea9c);}case _0x9b23e4[_0x54998(0x16d)]:{let _0x4b7839=await _0x50f52e['sessionHost'][_0x54998(0x171)](_0x2a684b[_0x54998(0x1a3)]);return z(_0x2a684b['id'],_0x4b7839);}default:return B(_0x2a684b['id'],-0x7f59,Error('Method\x20not\x20found:\x20'+_0x2a684b[_0x54998(0x186)]));}}function D(_0x24202a){return{async 'createWorkbook'(_0x12f91a){const _0x23c9a4=_0x222b;let _0x528ca8=await O(_0x12f91a),_0x2b1349=await _0x24202a[_0x23c9a4(0x197)]({..._0x12f91a['cwd']===void 0x0?{}:{'cwd':_0x12f91a[_0x23c9a4(0x1b2)]},'identity':_0x528ca8,..._0x12f91a['id']===void 0x0?{}:{'workbookId':_0x12f91a['id']},..._0x12f91a[_0x23c9a4(0x1c4)]===void 0x0?{}:{'workbookName':_0x12f91a[_0x23c9a4(0x1c4)]}});return{'success':!0x0,'workbookData':_0x2b1349[_0x23c9a4(0x1c3)],'session':k(_0x2b1349[_0x23c9a4(0x1d6)])};},async 'dispose'(_0xa246b3){const _0x598de0=_0x222b;let _0x365f93=await O(_0xa246b3);return await _0x24202a[_0x598de0(0x17c)]({..._0xa246b3[_0x598de0(0x1b2)]===void 0x0?{}:{'cwd':_0xa246b3['cwd']},'identity':_0x365f93}),{'disposed':!0x0,'workbookIdentity':_0x365f93[_0x598de0(0x185)]};},async 'destroyAll'(_0x164bb6){await _0x24202a['destroyAll']?.(_0x164bb6);},async 'evalJs'(_0x54180e){const _0x1e9c39=_0x222b;let _0x3ce6ac=await O(_0x54180e),_0x4b981d=await _0x24202a[_0x1e9c39(0x172)]({'code':_0x54180e['code'],..._0x54180e['cwd']===void 0x0?{}:{'cwd':_0x54180e[_0x1e9c39(0x1b2)]},'identity':_0x3ce6ac,..._0x54180e['maxCodeLength']===void 0x0?{}:{'maxCodeLength':_0x54180e['maxCodeLength']},..._0x54180e[_0x1e9c39(0x1cf)]===void 0x0?{}:{'mutates':_0x54180e[_0x1e9c39(0x1cf)]}});return{..._0x4b981d[_0x1e9c39(0x17e)]===void 0x0?{}:{'mutations':_0x4b981d[_0x1e9c39(0x17e)]},'success':!0x0,'value':_0x4b981d[_0x1e9c39(0x165)],'session':k(_0x4b981d['session'])};},async 'exportWorkbookData'(_0x27cac4){const _0xaf81c0=_0x222b;let _0x5d38b9=await O(_0x27cac4),_0x34e9e9=await _0x24202a[_0xaf81c0(0x16e)]({..._0x27cac4['cwd']===void 0x0?{}:{'cwd':_0x27cac4['cwd']},'identity':_0x5d38b9});return{'success':!0x0,'workbookData':_0x34e9e9[_0xaf81c0(0x1c3)],'session':k(_0x34e9e9[_0xaf81c0(0x1d6)])};},async 'exportWorkbookFile'(_0x34fbc3){const _0x4d1830=_0x222b;let _0x4d1b9d=await O(_0x34fbc3),_0x3196bf=await _0x24202a[_0x4d1830(0x1b8)]({..._0x34fbc3[_0x4d1830(0x1b2)]===void 0x0?{}:{'cwd':_0x34fbc3[_0x4d1830(0x1b2)]},'format':_0x34fbc3[_0x4d1830(0x1aa)],'identity':_0x4d1b9d,'outputPath':_0x34fbc3['outputPath']});return{'success':!0x0,'format':_0x3196bf[_0x4d1830(0x1aa)],'outputPath':_0x3196bf['outputPath'],'sizeBytes':_0x3196bf[_0x4d1830(0x19f)],'session':k(_0x3196bf['session'])};},async 'getWorkbookSession'(_0x32f68a){const _0x1e19c3=_0x222b;let _0x2fef06=await O(_0x32f68a),_0x2fd658=await _0x24202a[_0x1e19c3(0x179)]({..._0x32f68a[_0x1e19c3(0x1b2)]===void 0x0?{}:{'cwd':_0x32f68a['cwd']},'identity':_0x2fef06});return{'exists':_0x2fd658!==null,'session':_0x2fd658===null?null:k(_0x2fd658)};},'getSessionCount'(){const _0x571cb5=_0x222b;return _0x24202a[_0x571cb5(0x19d)]?.()??0x0;},'getSessionIdleTtlMs'(){return _0x24202a['getSessionIdleTtlMs']?.()??0xea60;},async 'loadWorkbook'(_0x111c14){const _0x524ce6=_0x222b;let _0x5b2010=await O(_0x111c14),_0x28061e=await _0x24202a[_0x524ce6(0x1d0)]({..._0x111c14[_0x524ce6(0x1b2)]===void 0x0?{}:{'cwd':_0x111c14[_0x524ce6(0x1b2)]},'identity':_0x5b2010,'workbookData':_0x111c14['workbookData']});return{'success':!0x0,'workbookData':_0x28061e['workbookData'],'session':k(_0x28061e[_0x524ce6(0x1d6)])};},async 'loadWorkbookDataReplayPack'(_0x23612b){const _0x3365eb=_0x222b;let _0x16c08e=await O(_0x23612b);return{'success':!0x0,'session':k((await _0x24202a[_0x3365eb(0x192)]({..._0x23612b[_0x3365eb(0x1b2)]===void 0x0?{}:{'cwd':_0x23612b['cwd']},'identity':_0x16c08e,'replayPack':{'baseWorkbookData':_0x23612b[_0x3365eb(0x18f)],'mutations':_0x23612b[_0x3365eb(0x17e)]}}))[_0x3365eb(0x1d6)])};},async 'unloadIdleSessions'(){const _0xfe31b6=_0x222b;await _0x24202a[_0xfe31b6(0x16c)]?.();}};}async function O(_0x32ac01){const _0x5094bf=_0x222b;return await C[_0x5094bf(0x1db)](_0x32ac01);}function k(_0x32dd70){const _0x17fd18=_0x222b;return{'createdAt':_0x32dd70[_0x17fd18(0x1c1)]??'','lastAccessedAt':_0x32dd70[_0x17fd18(0x1d3)]??'','sessionId':_0x32dd70[_0x17fd18(0x1d5)],'workbookIdentity':_0x32dd70[_0x17fd18(0x170)]['absolutePath']};}function A(_0x1fd532){const _0x117bb1=_0x222b;return{'build.id':j(_0x1fd532[_0x117bb1(0x18d)],_0x117bb1(0x1a0))??_0x1fd532[_0x117bb1(0x1bc)],'deployment.environment.name':_0x117bb1(0x1bb),'distribution.channel':j(_0x1fd532[_0x117bb1(0x18d)],'UNIVER_DISTRIBUTION_CHANNEL')??_0x117bb1(0x18e),'service.instance.id':String(_0x1fd532[_0x117bb1(0x1cd)]),'service.name':_0x117bb1(0x1c6),...j(_0x1fd532[_0x117bb1(0x18d)],_0x117bb1(0x1b5))===void 0x0?{}:{'service.version':j(_0x1fd532['env'],'UNIVER_CLI_VERSION')}};}function _0x222b(_0x31bfa1,_0x183f03){_0x31bfa1=_0x31bfa1-0x15f;const _0x5751c4=_0x5751();let _0x222b3d=_0x5751c4[_0x31bfa1];return _0x222b3d;}function j(_0x4ba5c6,_0x12b8f1){const _0x5ec643=_0x222b;let _0x21e526=_0x4ba5c6[_0x12b8f1]?.[_0x5ec643(0x1a9)]();return _0x21e526===void 0x0||_0x21e526[_0x5ec643(0x191)]===0x0?void 0x0:_0x21e526;}async function M(_0x207d1c){const _0x2a1626=_0x222b;F(_0x207d1c['socketPath'])&&!await P(_0x207d1c['socketPath'])&&await I(_0x207d1c[_0x2a1626(0x199)]);let _0x5820b3=await L(_0x207d1c['pidPath']);_0x5820b3!==null&&!R(_0x5820b3)&&(await _0x1797cd(_0x207d1c[_0x2a1626(0x18a)],{'force':!0x0})['catch'](()=>void 0x0),await _0x1797cd(_0x207d1c[_0x2a1626(0x1dc)],{'force':!0x0})['catch'](()=>void 0x0),await _0x1797cd(_0x207d1c[_0x2a1626(0x190)],{'recursive':!0x0,'force':!0x0})[_0x2a1626(0x161)](()=>void 0x0));}async function N(_0x3f495b,_0x3fb5ed){const _0x4d0e74=_0x222b;try{return await _0x84f010(_0x3f495b,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x557e16){if(_0x557e16[_0x4d0e74(0x1d4)]!==_0x4d0e74(0x1a2))throw _0x557e16;let _0x5862a8=await L(_0x3fb5ed);return _0x5862a8!==null&&R(_0x5862a8)?!0x1:(await _0x1797cd(_0x3f495b,{'recursive':!0x0,'force':!0x0}),await _0x84f010(_0x3f495b,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function P(_0x2375c4){return await new Promise(_0x4dc4a9=>{const _0x90857=_0x222b;let _0x51f456=_0x4e3ec4[_0x90857(0x163)](_0x2375c4);_0x51f456[_0x90857(0x1c2)](_0x90857(0x196),()=>{const _0x15deec=_0x90857;_0x51f456[_0x15deec(0x1b3)](),_0x4dc4a9(!0x0);}),_0x51f456[_0x90857(0x1c2)]('error',()=>{_0x4dc4a9(!0x1);});});}function F(_0x18ece0){return _0x21a6e4(_0x18ece0)?!0x1:_0x5c19e9(_0x18ece0);}async function I(_0x48306b){const _0x233366=_0x222b;_0x21a6e4(_0x48306b)||await _0x1797cd(_0x48306b,{'force':!0x0})[_0x233366(0x161)](()=>void 0x0);}async function L(_0x52f98c){const _0x158a0e=_0x222b;try{let _0x153819=await _0x2277a1(_0x52f98c,_0x158a0e(0x173)),_0x6d281d=Number(_0x153819['trim']());return Number['isFinite'](_0x6d281d)?_0x6d281d:null;}catch{return null;}}function R(_0x580d31){const _0x2eeba8=_0x222b;try{return _0x662e25[_0x2eeba8(0x1c5)](_0x580d31,0x0),!0x0;}catch{return!0x1;}}function z(_0x1b971a,_0x2e3164){const _0x267799=_0x222b;return{'jsonrpc':_0x267799(0x1b9),'id':_0x1b971a,'result':_0x2e3164};}function B(_0x3209eb,_0xf69b88,_0x2faa34){const _0x5db292=_0x222b;return{'jsonrpc':'2.0','id':_0x3209eb,'error':{'code':_0xf69b88,'message':_0x2faa34 instanceof Error?_0x2faa34[_0x5db292(0x1ba)]:String(_0x2faa34)}};}var V=process[_0x430fd8(0x193)][0x2]??_0x430fd8(0x178);V!==_0x430fd8(0x178)&&(console[_0x430fd8(0x1c8)](_0x430fd8(0x167)+V),process[_0x430fd8(0x188)](0x1)),w()[_0x430fd8(0x161)](_0x347deb=>{const _0x341d58=_0x430fd8;console[_0x341d58(0x1c8)](_0x347deb instanceof Error?_0x347deb[_0x341d58(0x1ba)]:String(_0x347deb)),process[_0x341d58(0x188)](0x1);});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x46143c=_0x2536;(function(_0x172147,_0x4f60dc){const _0x5d9c88=_0x2536,_0x1dc1a5=_0x172147();while(!![]){try{const _0xef7f8f=-parseInt(_0x5d9c88(0xd7))/0x1*(-parseInt(_0x5d9c88(0xdc))/0x2)+parseInt(_0x5d9c88(0xe5))/0x3+parseInt(_0x5d9c88(0xf6))/0x4*(-parseInt(_0x5d9c88(0xc0))/0x5)+-parseInt(_0x5d9c88(0xb4))/0x6*(parseInt(_0x5d9c88(0xf5))/0x7)+parseInt(_0x5d9c88(0xc4))/0x8+parseInt(_0x5d9c88(0xfc))/0x9*(parseInt(_0x5d9c88(0xfd))/0xa)+-parseInt(_0x5d9c88(0xb9))/0xb;if(_0xef7f8f===_0x4f60dc)break;else _0x1dc1a5['push'](_0x1dc1a5['shift']());}catch(_0x3e4230){_0x1dc1a5['push'](_0x1dc1a5['shift']());}}}(_0x5495,0xd7fab));import{t as _0xc20e9b}from'../chunks/build-info-CEz0HGcR.js';import{n as _0x18c318}from'../chunks/runtime-manifest-Bdf66z_K.js';import{readFileSync as _0x3e2942}from'node:fs';import{mkdir as _0x4e4fcb,readFile as _0x2e8f03,rename as _0x39eee6,writeFile as _0x508995}from'node:fs/promises';import{dirname as _0x249ef1,join as _0x6750df,resolve as _0xf59e61}from'node:path';import{homedir as _0x314676,platform as _0x3556ce}from'node:os';import{randomUUID as _0x460225}from'node:crypto';async function p(_0x1c42aa){const _0x5d120f=_0x2536;let _0x2c4340=_0x1c42aa['env']??process.env,_0x44d29c=_0x1c42aa[_0x5d120f(0xa8)]??_0x18c318(_0x2c4340);if(_0x44d29c[_0x5d120f(0xec)]!=='packaged')return{'reason':_0x5d120f(0xba),'status':'skipped'};let _0x12684e=_0x1c42aa[_0x5d120f(0xcc)]??_0xc20e9b;if(j(_0x12684e))return{'reason':_0x5d120f(0xda),'status':_0x5d120f(0xde)};let _0x1859c6=_0x1c42aa[_0x5d120f(0xd2)]??await E(_0x44d29c[_0x5d120f(0xbd)]);if(_0x1859c6[_0x5d120f(0xc2)][_0x5d120f(0xe4)]===0x0)return{'reason':_0x5d120f(0xe1),'status':_0x5d120f(0xde)};let _0x216adf=_0x1c42aa[_0x5d120f(0xd3)]??new Date(),_0xfd47be=_0x1c42aa[_0x5d120f(0xc7)]??g({'env':_0x2c4340}),_0x2f70ba=await v({'path':_0xfd47be,..._0x1c42aa['randomId']===void 0x0?{}:{'randomId':_0x1c42aa['randomId']},..._0x1c42aa[_0x5d120f(0xcb)]===void 0x0?{}:{'stateIo':_0x1c42aa['stateIo']}});if(_0x2f70ba[_0x5d120f(0xd8)]===void 0x0)return{'reason':'state-unavailable','status':_0x5d120f(0xde)};if(_0x1c42aa[_0x5d120f(0xa9)]===_0x5d120f(0xb7)&&_0x2f70ba[_0x5d120f(0xd8)][_0x5d120f(0xd9)][_0x5d120f(0xb7)]!==void 0x0)return{'reason':_0x5d120f(0xb5),'status':_0x5d120f(0xde)};let _0x270ca0=S({'buildInfo':_0x12684e,'eventName':_0x1c42aa[_0x5d120f(0xa9)],'now':_0x216adf,'state':_0x2f70ba['state']});await x({'path':_0xfd47be,'state':_0x270ca0,..._0x1c42aa[_0x5d120f(0xcb)]===void 0x0?{}:{'stateIo':_0x1c42aa[_0x5d120f(0xcb)]}});let _0x2794c2=C({'buildInfo':_0x12684e,'env':_0x2c4340,'eventName':_0x1c42aa[_0x5d120f(0xa9)],'eventSource':_0x1c42aa[_0x5d120f(0xe9)],'manifest':_0x44d29c,'state':_0x270ca0});try{return await(_0x1c42aa[_0x5d120f(0xb3)]??new O())[_0x5d120f(0xf3)]({'capture':_0x2794c2,'config':_0x1859c6}),{'status':_0x5d120f(0xaf)};}catch{return{'reason':_0x5d120f(0xfb),'status':_0x5d120f(0xde)};}}async function m(_0x58cbc7={}){const _0x8803a8=_0x2536;return await p({..._0x58cbc7,'eventName':_0x8803a8(0xb2),'eventSource':_0x8803a8(0xc9)});}async function h(_0x254c95={}){const _0xeefe8f=_0x2536;return await p({..._0x254c95,'eventName':'cli_first_opened','eventSource':_0xeefe8f(0xad)});}function g(_0x5bd96d={}){const _0x1644af=_0x2536;let _0x176f92=(_0x5bd96d[_0x1644af(0xf2)]??process.env)[_0x1644af(0xe3)]?.['trim']();return _0xf59e61(_0x176f92&&_0x176f92['length']>0x0?_0x176f92:_0x6750df(_0x5bd96d[_0x1644af(0xe0)]??_0x314676(),_0x1644af(0xe6)),'telemetry',_0x1644af(0xee));}function _(_0x3b3d48={}){const _0x2496cf=_0x2536;return{'anonymousInstallId':_0x3b3d48[_0x2496cf(0xe8)]?.()??_0x460225(),'events':{},'version':0x1};}async function v(_0x43cc4d){const _0x2fd872=_0x2536;let _0x3322f7=_0x43cc4d[_0x2fd872(0xcb)]?.[_0x2fd872(0xd1)]??_0x2e8f03;try{return{'state':y(await _0x3322f7(_0x43cc4d[_0x2fd872(0xae)],_0x2fd872(0xbf)))};}catch{return{'state':_({..._0x43cc4d[_0x2fd872(0xe8)]===void 0x0?{}:{'randomId':_0x43cc4d[_0x2fd872(0xe8)]}})};}}function y(_0x5c4dda){const _0x2db1af=_0x2536;let _0x5bd11c=JSON[_0x2db1af(0xf8)](_0x5c4dda);if(!I(_0x5bd11c)||_0x5bd11c[_0x2db1af(0xd6)]!==0x1)throw Error(_0x2db1af(0xeb));if(typeof _0x5bd11c[_0x2db1af(0xdb)]!=_0x2db1af(0xfa)||_0x5bd11c[_0x2db1af(0xdb)]['length']===0x0)throw Error(_0x2db1af(0xa7));let _0x2b9dec=I(_0x5bd11c[_0x2db1af(0xd9)])?_0x5bd11c['events']:{};return{'anonymousInstallId':_0x5bd11c['anonymousInstallId'],'events':{...M(_0x2b9dec['cli_installed'],_0x2db1af(0xb2)),...M(_0x2b9dec['cli_first_opened'],_0x2db1af(0xb7))},'version':0x1};}function b(_0x4abacb){const _0x1b4821=_0x2536;return JSON[_0x1b4821(0xb0)](_0x4abacb,null,0x2)+'\x0a';}async function x(_0x11e081){const _0x4c94fe=_0x2536;let _0x5e90eb=_0x11e081['stateIo']?.[_0x4c94fe(0xe7)]??_0x508995,_0x467a78=_0x11e081[_0x4c94fe(0xcb)]?.['rename']??_0x39eee6,_0xd54e29=_0x11e081[_0x4c94fe(0xae)]+'.'+process[_0x4c94fe(0xb1)]+'.'+Date[_0x4c94fe(0xd3)]()+_0x4c94fe(0xe2);try{await _0x4e4fcb(_0x249ef1(_0x11e081[_0x4c94fe(0xae)]),{'mode':0x1c0,'recursive':!0x0}),await _0x5e90eb(_0xd54e29,b(_0x11e081[_0x4c94fe(0xd8)]),{'encoding':'utf8','mode':0x180}),await _0x467a78(_0xd54e29,_0x11e081[_0x4c94fe(0xae)]);}catch{}}function _0x5495(){const _0x13f49d=['UNIVER_HOME','length','1855527hnhQHH','.univer','writeFile','randomId','eventSource','test','Invalid\x20product\x20telemetry\x20state\x20version.','mode','isSafeInteger','state.json','trim','attemptedAt','versions','env','capture','object','117880HmlZOo','281632ozijtm','status','parse','name','string','capture-failed','12145941GvNSvL','10WhGdfW','unknown','0.0.0','bun','Invalid\x20product\x20telemetry\x20anonymous\x20install\x20id.','manifest','eventName','argv','public-npm','npm_execpath','cli-startup','path','captured','stringify','pid','cli_installed','transport','36XJpNBj','already-attempted','https://univer.ai/api/telemetry/cli','cli_first_opened','npm','23343320HatsDU','not-packaged','internal','commitHash','packageRoot','package.json','utf8','45IBjaZi','UNIVER_MANAGED_BY_NPM','endpoint','node','9575832PGkKym','npm_config_user_agent','univer-cli','statePath','arch','postinstall','distinctId','stateIo','buildInfo','first-open','toISOString','UNIVER_MANAGED_BY_BUN','cliVersion','readFile','config','now','buildCommit','yarn','version','576446yGNxAS','state','events','development-build','anonymousInstallId','2ZtUklK','event','skipped','CLI\x20telemetry\x20proxy\x20failed\x20with\x20status\x20','homeDir','missing-endpoint','.tmp'];_0x5495=function(){return _0x13f49d;};return _0x5495();}function S(_0xcc77b0){const _0x467fcd=_0x2536;return{..._0xcc77b0[_0x467fcd(0xd8)],'events':{..._0xcc77b0[_0x467fcd(0xd8)]['events'],[_0xcc77b0[_0x467fcd(0xa9)]]:{'attemptedAt':_0xcc77b0['now'][_0x467fcd(0xce)](),'buildCommit':_0xcc77b0[_0x467fcd(0xcc)]['commitHash'],'cliVersion':_0xcc77b0[_0x467fcd(0xcc)][_0x467fcd(0xd6)]}}};}function C(_0xf6d1d6){const _0x3fee62=_0x2536;return{'distinctId':_0xf6d1d6[_0x3fee62(0xd8)][_0x3fee62(0xdb)],'event':_0xf6d1d6[_0x3fee62(0xa9)],'properties':w(_0xf6d1d6)};}function w(_0x38aa0f){const _0x96c86e=_0x2536;return{'arch':process[_0x96c86e(0xc8)],'build_commit':_0x38aa0f[_0x96c86e(0xcc)][_0x96c86e(0xbc)],'cli_version':_0x38aa0f[_0x96c86e(0xcc)][_0x96c86e(0xd6)],'distribution_channel':A(_0x38aa0f[_0x96c86e(0xa8)]),'event_source':_0x38aa0f[_0x96c86e(0xe9)],'install_manager':T(_0x38aa0f[_0x96c86e(0xf2)]??process.env),'node_major_version':N(process[_0x96c86e(0xf1)][_0x96c86e(0xc3)]),'package_name':k(_0x38aa0f[_0x96c86e(0xa8)]),'platform':_0x3556ce(),'telemetry_state_version':0x1};}function T(_0x4e29ba=process.env){const _0x36aed1=_0x2536;let _0x1c9195=process[_0x36aed1(0xf1)];if(typeof _0x1c9195['bun']=='string'&&_0x1c9195['bun'][_0x36aed1(0xe4)]>0x0)return'bun';let _0x1e4e97=_0x4e29ba[_0x36aed1(0xc5)]??'';if(/\bbun\//u[_0x36aed1(0xea)](_0x1e4e97))return _0x36aed1(0x100);if(/\bpnpm\//u[_0x36aed1(0xea)](_0x1e4e97))return'pnpm';if(/\byarn\//u[_0x36aed1(0xea)](_0x1e4e97))return _0x36aed1(0xd5);if(/\bnpm\//u[_0x36aed1(0xea)](_0x1e4e97))return _0x36aed1(0xb8);let _0x13c004=_0x4e29ba[_0x36aed1(0xac)]??'';return/(^|[/\\])bun(?:\.exe)?$/u['test'](_0x13c004)?'bun':/(^|[/\\])pnpm(?:\.cmd|\.ps1|\.exe)?$/u[_0x36aed1(0xea)](_0x13c004)?'pnpm':/(^|[/\\])yarn(?:\.cmd|\.ps1|\.exe)?$/u['test'](_0x13c004)?'yarn':/(^|[/\\])npm(?:\.cmd|\.ps1|\.exe)?$/u['test'](_0x13c004)?_0x36aed1(0xb8):_0x4e29ba[_0x36aed1(0xcf)]==='1'?_0x36aed1(0x100):_0x4e29ba[_0x36aed1(0xc1)]==='1'?_0x36aed1(0xb8):_0x36aed1(0xfe);}async function E(_0x562ad8){const _0x2fa7ab=_0x2536;try{let _0x2ecd4f=await _0x2e8f03(_0x6750df(_0x562ad8,_0x2fa7ab(0xbb),'product-telemetry.json'),_0x2fa7ab(0xbf));return D(JSON[_0x2fa7ab(0xf8)](_0x2ecd4f));}catch{return D({});}}function D(_0x369245){const _0x3b6b64=_0x2536;let _0x2987ed=I(_0x369245)?_0x369245:{};return{'endpoint':P(_0x2987ed['endpoint'],_0x3b6b64(0xb6)),'timeoutMs':F(_0x2987ed['timeoutMs'],0x1388)};}var O=class{async[_0x46143c(0xf3)](_0x1b299d){const _0x483751=_0x46143c;let _0x1fcfca=await fetch(_0x1b299d['config']['endpoint'],{'body':JSON[_0x483751(0xb0)]({'distinctId':_0x1b299d[_0x483751(0xf3)][_0x483751(0xca)],'event':_0x1b299d[_0x483751(0xf3)][_0x483751(0xdd)],'properties':_0x1b299d[_0x483751(0xf3)]['properties']}),'headers':{'content-type':'application/json'},'method':'POST','signal':AbortSignal['timeout'](_0x1b299d['config']['timeoutMs'])});if(!_0x1fcfca['ok'])throw Error(_0x483751(0xdf)+_0x1fcfca[_0x483751(0xf7)]);}};function k(_0x2319b6){const _0x19d2a0=_0x46143c;try{let _0x31697b=JSON[_0x19d2a0(0xf8)](_0x3e2942(_0x6750df(_0x2319b6[_0x19d2a0(0xbd)],_0x19d2a0(0xbe)),_0x19d2a0(0xbf)));return typeof _0x31697b[_0x19d2a0(0xf9)]==_0x19d2a0(0xfa)&&_0x31697b['name'][_0x19d2a0(0xef)]()[_0x19d2a0(0xe4)]>0x0?_0x31697b[_0x19d2a0(0xf9)]:_0x19d2a0(0xc6);}catch{return _0x19d2a0(0xc6);}}function A(_0x5da9b0){const _0x469d7d=_0x46143c;let _0x3814ad=k(_0x5da9b0);return _0x3814ad==='@dream-num/univer-cli'?'internal-github':_0x3814ad==='univer-cli'?_0x469d7d(0xab):_0x5da9b0[_0x469d7d(0xec)];}function j(_0x41fa06){const _0x348c38=_0x46143c;return _0x41fa06[_0x348c38(0xd6)]===_0x348c38(0xff);}function M(_0xd73c4d,_0x3b48ca){const _0x172486=_0x46143c;return!I(_0xd73c4d)||typeof _0xd73c4d[_0x172486(0xf0)]!=_0x172486(0xfa)||typeof _0xd73c4d[_0x172486(0xd4)]!=_0x172486(0xfa)||typeof _0xd73c4d[_0x172486(0xd0)]!=_0x172486(0xfa)?{}:{[_0x3b48ca]:{'attemptedAt':_0xd73c4d[_0x172486(0xf0)],'buildCommit':_0xd73c4d[_0x172486(0xd4)],'cliVersion':_0xd73c4d[_0x172486(0xd0)]}};}function N(_0x52ded3){const _0x42993a=_0x46143c;let _0x593ee2=Number(_0x52ded3['split']('.')[0x0]);return Number[_0x42993a(0xed)](_0x593ee2)&&_0x593ee2>0x0?_0x593ee2:void 0x0;}function P(_0x287b20,_0x4c5d9e){const _0x52b11d=_0x46143c;return typeof _0x287b20==_0x52b11d(0xfa)&&_0x287b20[_0x52b11d(0xef)]()[_0x52b11d(0xe4)]>0x0?_0x287b20['trim']():_0x4c5d9e;}function F(_0x28b114,_0x2de87c){const _0x5ad2b5=_0x46143c;return typeof _0x28b114=='number'&&Number[_0x5ad2b5(0xed)](_0x28b114)&&_0x28b114>0x0?_0x28b114:_0x2de87c;}function _0x2536(_0x1a651f,_0x56cf74){_0x1a651f=_0x1a651f-0xa7;const _0x549561=_0x5495();let _0x2536ca=_0x549561[_0x1a651f];return _0x2536ca;}function I(_0x1414b2){const _0x3830fe=_0x46143c;return typeof _0x1414b2==_0x3830fe(0xf4)&&!!_0x1414b2;}var L=process[_0x46143c(0xaa)][0x2];try{L===_0x46143c(0xcd)?await h():L==='postinstall'&&await m();}catch{}
|
|
2
|
+
const _0x60eacd=_0x4d96;(function(_0x46c63e,_0x5108f7){const _0xc8a1bb=_0x4d96,_0x1773ef=_0x46c63e();while(!![]){try{const _0x2150a4=parseInt(_0xc8a1bb(0x1de))/0x1*(parseInt(_0xc8a1bb(0x1d2))/0x2)+-parseInt(_0xc8a1bb(0x1ae))/0x3+parseInt(_0xc8a1bb(0x1ec))/0x4*(parseInt(_0xc8a1bb(0x1f4))/0x5)+parseInt(_0xc8a1bb(0x200))/0x6*(-parseInt(_0xc8a1bb(0x1f9))/0x7)+-parseInt(_0xc8a1bb(0x202))/0x8*(parseInt(_0xc8a1bb(0x1da))/0x9)+parseInt(_0xc8a1bb(0x1d3))/0xa*(parseInt(_0xc8a1bb(0x1d6))/0xb)+parseInt(_0xc8a1bb(0x1ff))/0xc*(parseInt(_0xc8a1bb(0x1e1))/0xd);if(_0x2150a4===_0x5108f7)break;else _0x1773ef['push'](_0x1773ef['shift']());}catch(_0x1b8724){_0x1773ef['push'](_0x1773ef['shift']());}}}(_0x1b8a,0x41da6));import{t as _0x4228b8}from'../chunks/build-info-CYwzl-uD.js';import{n as _0x5bf70c}from'../chunks/runtime-manifest-ChxEzYC3.js';import{spawn as _0x523bf8}from'node:child_process';import{readFileSync as _0x43279f}from'node:fs';import{mkdir as _0x4f6007,readFile as _0x4a7386,rename as _0x71a450,writeFile as _0x556f7f}from'node:fs/promises';import{dirname as _0x38c37a,join as _0x3d820d,resolve as _0x2b6ff4}from'node:path';import{fileURLToPath as _0x3a7fa7}from'node:url';import{homedir as _0x2c0a61,platform as _0x1f4a2d}from'node:os';import{randomUUID as _0x2f0562}from'node:crypto';async function h(_0x4111c6){const _0x37d276=_0x4d96;let _0xc5b212=_0x4111c6[_0x37d276(0x1bc)]??process.env,_0x1f368b=_0x4111c6[_0x37d276(0x1f7)]??_0x5bf70c(_0xc5b212);if(_0x1f368b[_0x37d276(0x206)]!=='packaged')return{'reason':_0x37d276(0x1b0),'status':_0x37d276(0x1fe)};let _0x480a43=_0x4111c6[_0x37d276(0x204)]??_0x4228b8;if(N(_0x480a43))return{'reason':'development-build','status':_0x37d276(0x1fe)};let _0x4af7bb=_0x4111c6[_0x37d276(0x1ad)]??await O(_0x1f368b[_0x37d276(0x1fa)]);if(_0x4af7bb['endpoint'][_0x37d276(0x1c2)]===0x0)return{'reason':'missing-endpoint','status':_0x37d276(0x1fe)};let _0x156e3a=_0x4111c6[_0x37d276(0x205)]??new Date(),_0x30bc22=_0x4111c6['statePath']??v({'env':_0xc5b212}),_0x32b42c=await b({'path':_0x30bc22,..._0x4111c6[_0x37d276(0x1c1)]===void 0x0?{}:{'randomId':_0x4111c6['randomId']},..._0x4111c6[_0x37d276(0x1b2)]===void 0x0?{}:{'stateIo':_0x4111c6[_0x37d276(0x1b2)]}});if(_0x32b42c[_0x37d276(0x1db)]===void 0x0)return{'reason':_0x37d276(0x203),'status':_0x37d276(0x1fe)};if(_0x4111c6[_0x37d276(0x1f1)]===_0x37d276(0x1b1)&&_0x32b42c[_0x37d276(0x1db)][_0x37d276(0x1be)]['cli_first_opened']!==void 0x0)return{'reason':'already-attempted','status':_0x37d276(0x1fe)};let _0x13794a=w({'buildInfo':_0x480a43,'eventName':_0x4111c6[_0x37d276(0x1f1)],'now':_0x156e3a,'state':_0x32b42c[_0x37d276(0x1db)]});await C({'path':_0x30bc22,'state':_0x13794a,..._0x4111c6['stateIo']===void 0x0?{}:{'stateIo':_0x4111c6[_0x37d276(0x1b2)]}});let _0x120961=T({'buildInfo':_0x480a43,'env':_0xc5b212,'eventName':_0x4111c6[_0x37d276(0x1f1)],'eventSource':_0x4111c6['eventSource'],'manifest':_0x1f368b,'state':_0x13794a});try{return await(_0x4111c6['transport']??new A())[_0x37d276(0x1c9)]({'capture':_0x120961,'config':_0x4af7bb}),{'status':_0x37d276(0x1b7)};}catch{return{'reason':_0x37d276(0x1b6),'status':_0x37d276(0x1fe)};}}async function g(_0x4d09d5={}){const _0xc1fcd5=_0x4d96;return await h({..._0x4d09d5,'eventName':_0xc1fcd5(0x1e5),'eventSource':_0xc1fcd5(0x1cf)});}async function _(_0x255ddf={}){const _0x4337fd=_0x4d96;return await h({..._0x255ddf,'eventName':'cli_first_opened','eventSource':_0x4337fd(0x1e8)});}function v(_0x2367d8={}){const _0x320055=_0x4d96;let _0x551fb7=(_0x2367d8[_0x320055(0x1bc)]??process.env)[_0x320055(0x1c7)]?.[_0x320055(0x1f2)]();return _0x2b6ff4(_0x551fb7&&_0x551fb7['length']>0x0?_0x551fb7:_0x3d820d(_0x2367d8['homeDir']??_0x2c0a61(),_0x320055(0x1dd)),_0x320055(0x1c4),_0x320055(0x207));}function y(_0x1647ba={}){const _0x4e3fb6=_0x4d96;return{'anonymousInstallId':_0x1647ba[_0x4e3fb6(0x1c1)]?.()??_0x2f0562(),'events':{},'version':0x1};}async function b(_0x1ce454){const _0x4cb411=_0x4d96;let _0x3223ab=_0x1ce454[_0x4cb411(0x1b2)]?.[_0x4cb411(0x1ac)]??_0x4a7386;try{return{'state':x(await _0x3223ab(_0x1ce454[_0x4cb411(0x1ee)],'utf8'))};}catch{return{'state':y({..._0x1ce454[_0x4cb411(0x1c1)]===void 0x0?{}:{'randomId':_0x1ce454[_0x4cb411(0x1c1)]}})};}}function x(_0x475033){const _0x1e71db=_0x4d96;let _0x48cc19=JSON['parse'](_0x475033);if(!R(_0x48cc19)||_0x48cc19[_0x1e71db(0x1af)]!==0x1)throw Error('Invalid\x20product\x20telemetry\x20state\x20version.');if(typeof _0x48cc19[_0x1e71db(0x20a)]!='string'||_0x48cc19['anonymousInstallId'][_0x1e71db(0x1c2)]===0x0)throw Error(_0x1e71db(0x1e2));let _0x4f2006=R(_0x48cc19['events'])?_0x48cc19[_0x1e71db(0x1be)]:{};return{'anonymousInstallId':_0x48cc19[_0x1e71db(0x20a)],'events':{...P(_0x4f2006[_0x1e71db(0x1e5)],'cli_installed'),...P(_0x4f2006[_0x1e71db(0x1b1)],_0x1e71db(0x1b1))},'version':0x1};}function S(_0x116663){const _0x3882eb=_0x4d96;return JSON[_0x3882eb(0x20b)](_0x116663,null,0x2)+'\x0a';}async function C(_0x451b22){const _0x10f6c7=_0x4d96;let _0x3e885d=_0x451b22[_0x10f6c7(0x1b2)]?.['writeFile']??_0x556f7f,_0x34b158=_0x451b22[_0x10f6c7(0x1b2)]?.[_0x10f6c7(0x208)]??_0x71a450,_0x30f915=_0x451b22[_0x10f6c7(0x1ee)]+'.'+process[_0x10f6c7(0x1cd)]+'.'+Date[_0x10f6c7(0x205)]()+_0x10f6c7(0x1fd);try{await _0x4f6007(_0x38c37a(_0x451b22['path']),{'mode':0x1c0,'recursive':!0x0}),await _0x3e885d(_0x30f915,S(_0x451b22[_0x10f6c7(0x1db)]),{'encoding':_0x10f6c7(0x1f8),'mode':0x180}),await _0x34b158(_0x30f915,_0x451b22[_0x10f6c7(0x1ee)]);}catch{}}function w(_0x29fc82){const _0x3f82dd=_0x4d96;return{..._0x29fc82['state'],'events':{..._0x29fc82['state'][_0x3f82dd(0x1be)],[_0x29fc82[_0x3f82dd(0x1f1)]]:{'attemptedAt':_0x29fc82['now'][_0x3f82dd(0x1cc)](),'buildCommit':_0x29fc82[_0x3f82dd(0x204)][_0x3f82dd(0x1e4)],'cliVersion':_0x29fc82[_0x3f82dd(0x204)]['version']}}};}function T(_0x24ffe7){const _0x314f1c=_0x4d96;return{'distinctId':_0x24ffe7[_0x314f1c(0x1db)][_0x314f1c(0x20a)],'event':_0x24ffe7['eventName'],'properties':E(_0x24ffe7)};}function E(_0x10388e){const _0x2f894b=_0x4d96;return{'arch':process[_0x2f894b(0x1c0)],'build_commit':_0x10388e[_0x2f894b(0x204)][_0x2f894b(0x1e4)],'cli_version':_0x10388e[_0x2f894b(0x204)][_0x2f894b(0x1af)],'distribution_channel':M(_0x10388e[_0x2f894b(0x1f7)]),'event_source':_0x10388e[_0x2f894b(0x1d1)],'install_manager':D(_0x10388e['env']??process.env),'node_major_version':F(process['versions'][_0x2f894b(0x1bf)]),'package_name':j(_0x10388e[_0x2f894b(0x1f7)]),'platform':_0x1f4a2d(),'telemetry_state_version':0x1};}function D(_0x58eba6=process.env){const _0x460264=_0x4d96;let _0x251a53=process[_0x460264(0x1e7)];if(typeof _0x251a53[_0x460264(0x1dc)]==_0x460264(0x1ce)&&_0x251a53['bun'][_0x460264(0x1c2)]>0x0)return'bun';let _0x2d1ea0=_0x58eba6[_0x460264(0x1ca)]??'';if(/\bbun\//u[_0x460264(0x1ba)](_0x2d1ea0))return'bun';if(/\bpnpm\//u[_0x460264(0x1ba)](_0x2d1ea0))return _0x460264(0x1b9);if(/\byarn\//u[_0x460264(0x1ba)](_0x2d1ea0))return _0x460264(0x1d4);if(/\bnpm\//u[_0x460264(0x1ba)](_0x2d1ea0))return'npm';let _0x5702b8=_0x58eba6[_0x460264(0x1c5)]??'';return/(^|[/\\])bun(?:\.exe)?$/u[_0x460264(0x1ba)](_0x5702b8)?_0x460264(0x1dc):/(^|[/\\])pnpm(?:\.cmd|\.ps1|\.exe)?$/u['test'](_0x5702b8)?_0x460264(0x1b9):/(^|[/\\])yarn(?:\.cmd|\.ps1|\.exe)?$/u[_0x460264(0x1ba)](_0x5702b8)?'yarn':/(^|[/\\])npm(?:\.cmd|\.ps1|\.exe)?$/u[_0x460264(0x1ba)](_0x5702b8)?_0x460264(0x1ea):_0x58eba6[_0x460264(0x201)]==='1'?'bun':_0x58eba6[_0x460264(0x1c6)]==='1'?_0x460264(0x1ea):_0x460264(0x1fb);}async function O(_0x1aea41){const _0x4089ed=_0x4d96;try{let _0x1c516c=await _0x4a7386(_0x3d820d(_0x1aea41,_0x4089ed(0x1f6),_0x4089ed(0x1f0)),'utf8');return k(JSON[_0x4089ed(0x1d7)](_0x1c516c));}catch{return k({});}}function k(_0x5ad348){const _0x56eb9e=_0x4d96;let _0x24fb27=R(_0x5ad348)?_0x5ad348:{};return{'endpoint':I(_0x24fb27['endpoint'],_0x56eb9e(0x1c3)),'timeoutMs':L(_0x24fb27['timeoutMs'],0x1388)};}var A=class{async[_0x60eacd(0x1c9)](_0x18432c){const _0x35f8f2=_0x60eacd;let _0x1b480c=await fetch(_0x18432c[_0x35f8f2(0x1ad)][_0x35f8f2(0x1b8)],{'body':JSON['stringify']({'distinctId':_0x18432c[_0x35f8f2(0x1c9)][_0x35f8f2(0x1eb)],'event':_0x18432c[_0x35f8f2(0x1c9)][_0x35f8f2(0x1b5)],'properties':_0x18432c[_0x35f8f2(0x1c9)]['properties']}),'headers':{'content-type':_0x35f8f2(0x1ef)},'method':_0x35f8f2(0x1e0),'signal':AbortSignal[_0x35f8f2(0x1f5)](_0x18432c[_0x35f8f2(0x1ad)][_0x35f8f2(0x1e3)])});if(!_0x1b480c['ok'])throw Error(_0x35f8f2(0x1e6)+_0x1b480c[_0x35f8f2(0x1fc)]);}};function j(_0x4aa213){const _0x3b3a19=_0x60eacd;try{let _0x26ce8b=JSON['parse'](_0x43279f(_0x3d820d(_0x4aa213['packageRoot'],_0x3b3a19(0x1ed)),_0x3b3a19(0x1f8)));return typeof _0x26ce8b['name']==_0x3b3a19(0x1ce)&&_0x26ce8b['name']['trim']()['length']>0x0?_0x26ce8b[_0x3b3a19(0x1c8)]:_0x3b3a19(0x1df);}catch{return _0x3b3a19(0x1df);}}function M(_0x3f3ac2){const _0x1d150e=_0x60eacd;let _0x2cc410=j(_0x3f3ac2);return _0x2cc410===_0x1d150e(0x1d5)?_0x1d150e(0x1cb):_0x2cc410===_0x1d150e(0x1df)?_0x1d150e(0x1d9):_0x3f3ac2[_0x1d150e(0x206)];}function _0x1b8a(){const _0x434fc7=['packageRoot','unknown','status','.tmp','skipped','12FvABnG','18cfIrGE','UNIVER_MANAGED_BY_BUN','866504fBpmSa','state-unavailable','buildInfo','now','mode','state.json','rename','isSafeInteger','anonymousInstallId','stringify','number','0.0.0','readFile','config','1234164iGrcFA','version','not-packaged','cli_first_opened','stateIo','split','cliVersion','event','capture-failed','captured','endpoint','pnpm','test','object','env','execPath','events','node','arch','randomId','length','https://univer.ai/api/telemetry/cli','telemetry','npm_execpath','UNIVER_MANAGED_BY_NPM','UNIVER_HOME','name','capture','npm_config_user_agent','internal-github','toISOString','pid','string','postinstall','buildCommit','eventSource','1962JIjzwB','30GWqBmG','yarn','@dream-num/univer-cli','1467499QIfTrS','parse','first-open','public-npm','27VVeWmh','state','bun','.univer','371Ppmsxo','univer-cli','POST','7821944EvskoX','Invalid\x20product\x20telemetry\x20anonymous\x20install\x20id.','timeoutMs','commitHash','cli_installed','CLI\x20telemetry\x20proxy\x20failed\x20with\x20status\x20','versions','cli-startup','attemptedAt','npm','distinctId','1388DZwjGH','package.json','path','application/json','product-telemetry.json','eventName','trim','argv','1230hGxgfX','timeout','internal','manifest','utf8','1038723QZPkZn'];_0x1b8a=function(){return _0x434fc7;};return _0x1b8a();}function N(_0xa31bbe){const _0x3c95f2=_0x60eacd;return _0xa31bbe[_0x3c95f2(0x1af)]===_0x3c95f2(0x1ab);}function P(_0x1df85a,_0x1ac6b9){const _0x34880d=_0x60eacd;return!R(_0x1df85a)||typeof _0x1df85a[_0x34880d(0x1e9)]!=_0x34880d(0x1ce)||typeof _0x1df85a['buildCommit']!=_0x34880d(0x1ce)||typeof _0x1df85a[_0x34880d(0x1b4)]!=_0x34880d(0x1ce)?{}:{[_0x1ac6b9]:{'attemptedAt':_0x1df85a[_0x34880d(0x1e9)],'buildCommit':_0x1df85a[_0x34880d(0x1d0)],'cliVersion':_0x1df85a[_0x34880d(0x1b4)]}};}function F(_0x1aaa95){const _0x20d2c9=_0x60eacd;let _0x160187=Number(_0x1aaa95[_0x20d2c9(0x1b3)]('.')[0x0]);return Number['isSafeInteger'](_0x160187)&&_0x160187>0x0?_0x160187:void 0x0;}function _0x4d96(_0x4b2580,_0x43e9f3){_0x4b2580=_0x4b2580-0x1ab;const _0x1b8a00=_0x1b8a();let _0x4d9671=_0x1b8a00[_0x4b2580];return _0x4d9671;}function I(_0x1ff680,_0x4cf924){const _0x3406b8=_0x60eacd;return typeof _0x1ff680==_0x3406b8(0x1ce)&&_0x1ff680[_0x3406b8(0x1f2)]()[_0x3406b8(0x1c2)]>0x0?_0x1ff680[_0x3406b8(0x1f2)]():_0x4cf924;}function L(_0x227140,_0x4cd5dd){const _0x5338b8=_0x60eacd;return typeof _0x227140==_0x5338b8(0x20c)&&Number[_0x5338b8(0x209)](_0x227140)&&_0x227140>0x0?_0x227140:_0x4cd5dd;}function R(_0x1b3147){const _0x27db24=_0x60eacd;return typeof _0x1b3147==_0x27db24(0x1bb)&&!!_0x1b3147;}var z=process[_0x60eacd(0x1f3)][0x2];try{z===_0x60eacd(0x1d8)?await _():z==='postinstall'?B('postinstall-worker'):z==='postinstall-worker'&&await g();}catch{}function B(_0x725984){const _0x54cd24=_0x60eacd;_0x523bf8(process[_0x54cd24(0x1bd)],[_0x3a7fa7(import.meta.url),_0x725984],{'detached':!0x0,'env':process.env,'stdio':'ignore','windowsHide':!0x0})['unref']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x9ccb59=_0x2b79;function _0x5ca3(){const _0x4f2732=['LoadWorkbookDataReplayPack','data','enqueue','ExportWorkbookFile','traceparent','2QzIPxG','6Dsulcg','server','params','1374690CKacqv','loadWorkbookDataReplayPack','exportWorkbookData','513736JXhhZE','tail','13650iSdtXY','createWorkbook','outputPath','rpc-request','CreateWorkbook','EvalJs','send','method','RuntimeRpcClient','5782272eSKOJG','275boNBQM','rpc-response','ready','Method\x20not\x20implemented:\x20','maxCodeLength','withContext','value','resolve','9698544wHYjHI','mutates','2170UMgbdU','1017452yzCjQH','type','code','642803ustaIB','ExportWorkbookData','exit','message','evalJs','2.0'];_0x5ca3=function(){return _0x4f2732;};return _0x5ca3();}(function(_0x21f002,_0x4f0f43){const _0xaf0c3d=_0x2b79,_0x34bc74=_0x21f002();while(!![]){try{const _0x5d50f0=-parseInt(_0xaf0c3d(0x202))/0x1*(-parseInt(_0xaf0c3d(0x210))/0x2)+-parseInt(_0xaf0c3d(0x211))/0x3*(-parseInt(_0xaf0c3d(0x1eb))/0x4)+-parseInt(_0xaf0c3d(0x201))/0x5*(-parseInt(_0xaf0c3d(0x1ed))/0x6)+parseInt(_0xaf0c3d(0x205))/0x7+parseInt(_0xaf0c3d(0x1f6))/0x8+parseInt(_0xaf0c3d(0x1ff))/0x9+-parseInt(_0xaf0c3d(0x1e8))/0xa*(parseInt(_0xaf0c3d(0x1f7))/0xb);if(_0x5d50f0===_0x4f0f43)break;else _0x34bc74['push'](_0x34bc74['shift']());}catch(_0x544360){_0x34bc74['push'](_0x34bc74['shift']());}}}(_0x5ca3,0xaf176));import'../chunks/vendor-BUmrAeJ_.js';import{t as _0x2dff6c}from'../chunks/headless-univer-CbMCumXv.js';import{n as _0x4d937b,o as _0x56073a,t as _0x56abd2}from'../chunks/trace-DPfd8LdJ.js';let i=function(_0x27019b){const _0x5e629=_0x2b79;return _0x27019b[_0x5e629(0x1f1)]=_0x5e629(0x1ee),_0x27019b['EvalJs']='evaljs',_0x27019b[_0x5e629(0x20e)]='exportWorkbookFile',_0x27019b['ExportWorkbookData']=_0x5e629(0x1ea),_0x27019b['LoadWorkbook']='loadWorkbook',_0x27019b[_0x5e629(0x20b)]='loadWorkbookDataReplayPack',_0x27019b;}({});var a=class{[_0x9ccb59(0x1ec)]=Promise[_0x9ccb59(0x1fe)]();async[_0x9ccb59(0x20d)](_0x278be9){const _0x55047a=_0x9ccb59;let _0x3e3e01=this[_0x55047a(0x1ec)],_0x2b369b;this[_0x55047a(0x1ec)]=new Promise(_0x1b2d23=>{_0x2b369b=_0x1b2d23;}),await _0x3e3e01;try{return await _0x278be9();}finally{_0x2b369b?.();}}},o=_0x2dff6c(),s=new a();process['send']?.({'type':_0x9ccb59(0x1f9)}),process['on']('message',async _0x6fb840=>{const _0xf6ac35=_0x9ccb59;if(_0x6fb840?.[_0xf6ac35(0x203)]!==_0xf6ac35(0x1f0))return;let _0x5b2799=await c(_0x6fb840[_0xf6ac35(0x20c)]);process[_0xf6ac35(0x1f3)]?.({'type':_0xf6ac35(0x1f8),'id':_0x6fb840['id'],'data':_0x5b2799});}),process['on']('disconnect',()=>{o['dispose'](),process['exit'](0x0);}),process['on']('SIGTERM',()=>{const _0xe4fff7=_0x9ccb59;o['dispose'](),process[_0xe4fff7(0x207)](0x0);});function _0x2b79(_0x3375d1,_0x211adc){_0x3375d1=_0x3375d1-0x1e8;const _0x5ca31c=_0x5ca3();let _0x2b7910=_0x5ca31c[_0x3375d1];return _0x2b7910;}async function c(_0x24605f){const _0xd0d7c4=_0x9ccb59;let _0x22dcd2=_0x56abd2(_0x24605f['meta']?.[_0xd0d7c4(0x20f)]),_0x134248=async()=>await _0x4d937b['withSpan']({'name':_0x56073a[_0xd0d7c4(0x1f5)],'kind':_0xd0d7c4(0x212)},async()=>await l(_0x24605f));return _0x22dcd2===void 0x0?await _0x134248():await _0x4d937b[_0xd0d7c4(0x1fc)](_0x22dcd2,_0x134248);}async function l(_0x11a632){const _0x2efaae=_0x9ccb59;try{switch(_0x11a632[_0x2efaae(0x1f4)]){case i[_0x2efaae(0x1f1)]:{let _0x4739d4=o[_0x2efaae(0x1ee)](_0x11a632[_0x2efaae(0x213)]??{});return{'jsonrpc':'2.0','id':_0x11a632['id'],'result':{'success':!0x0,'workbookData':_0x4739d4}};}case i['LoadWorkbook']:{let _0x4c40dc=o['loadWorkbookData'](_0x11a632[_0x2efaae(0x213)]['workbookData']);return{'jsonrpc':_0x2efaae(0x20a),'id':_0x11a632['id'],'result':{'success':!0x0,'workbookData':_0x4c40dc}};}case i[_0x2efaae(0x20b)]:return await o[_0x2efaae(0x1e9)](_0x11a632[_0x2efaae(0x213)]),{'jsonrpc':_0x2efaae(0x20a),'id':_0x11a632['id'],'result':{'success':!0x0}};case i[_0x2efaae(0x206)]:return{'jsonrpc':_0x2efaae(0x20a),'id':_0x11a632['id'],'result':{'success':!0x0,'workbookData':o['exportWorkbookData']()}};case i[_0x2efaae(0x20e)]:{let _0x26c8d6=_0x11a632[_0x2efaae(0x213)],_0x19a444=await o['exportWorkbookFile'](_0x26c8d6[_0x2efaae(0x1ef)],_0x26c8d6['format']);return{'jsonrpc':_0x2efaae(0x20a),'id':_0x11a632['id'],'result':{'success':!0x0,..._0x19a444}};}case i[_0x2efaae(0x1f2)]:{let _0x2eb8f3=_0x11a632[_0x2efaae(0x213)]??{},_0x4adf57=async()=>{const _0x4c5c82=_0x2efaae;let _0x4571d4=_0x2eb8f3[_0x4c5c82(0x200)]?await o['evalJsWithMutationCapture'](_0x2eb8f3[_0x4c5c82(0x204)],_0x2eb8f3[_0x4c5c82(0x1fb)]):{'value':await o[_0x4c5c82(0x209)](_0x2eb8f3[_0x4c5c82(0x204)],_0x2eb8f3[_0x4c5c82(0x1fb)]),'mutations':void 0x0};return{'success':!0x0,..._0x4571d4['mutations']===void 0x0?{}:{'mutations':_0x4571d4['mutations']},'value':_0x4571d4[_0x4c5c82(0x1fd)]};},_0x190ca5=_0x2eb8f3[_0x2efaae(0x200)]?await s[_0x2efaae(0x20d)](_0x4adf57):await _0x4adf57();return{'jsonrpc':_0x2efaae(0x20a),'id':_0x11a632['id'],'result':_0x190ca5};}default:throw Error(_0x2efaae(0x1fa)+String(_0x11a632['method']));}}catch(_0x1cb6fe){return{'jsonrpc':'2.0','id':_0x11a632['id'],'error':{'code':-0x7f5b,'message':_0x1cb6fe instanceof Error?_0x1cb6fe[_0x2efaae(0x208)]:String(_0x1cb6fe)}};}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "univer-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Command-line tools for local Univer workbook automation.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
"internal",
|
|
32
32
|
"chunks",
|
|
33
33
|
"run-help",
|
|
34
|
+
"sac-help",
|
|
34
35
|
"view",
|
|
35
36
|
"README.md"
|
|
36
37
|
],
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@univerjs-pro/uexcli": "0.1.
|
|
39
|
+
"@univerjs-pro/uexcli": "^0.1.21"
|
|
39
40
|
},
|
|
40
41
|
"private": false,
|
|
41
42
|
"publishConfig": {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# SaC Apply And Ledger
|
|
2
|
+
|
|
3
|
+
`univer sac apply` validates the source chain, validates the target ledger, bundles one pending pack, applies it to an isolated working artifact, commits it, and then moves to the next pack. The commit model is pack by pack.
|
|
4
|
+
|
|
5
|
+
By default, every successfully applied pack is also committed through workbook versioning as one local changeset. If the newest applied pack is wrong, roll back the target workbook with `univer reset <target> --hard HEAD~1`, inspect, then fix the migration source before applying again.
|
|
6
|
+
|
|
7
|
+
Use `univer sac apply <workspace> --no-commit` only for compatibility or recovery workflows where SaC should write ledger metadata without creating workbook local changesets.
|
|
8
|
+
|
|
9
|
+
## Target Lifecycle
|
|
10
|
+
|
|
11
|
+
When no `--target` is provided, the target path comes from `sac.config.ts` and must match the workspace artifact mode.
|
|
12
|
+
|
|
13
|
+
Generated workspaces are created by `univer sac init ./model`. They use `artifacts.mode: "generated"` and must write the managed result to `artifacts/<workspace-name>.univer`, for example `./model/artifacts/model.univer`.
|
|
14
|
+
|
|
15
|
+
Adopted workspaces are created by `univer sac init ./model --from ./existing.univer`. They use `artifacts.mode: "adopted"` and must continue updating the original artifact recorded in `artifacts.defaultWorkbook`.
|
|
16
|
+
|
|
17
|
+
If `--target` is provided, it must still resolve to the target required by the workspace artifact mode. Do not write SaC result workbooks to `dist/`, the workspace root, or ad hoc output names.
|
|
18
|
+
|
|
19
|
+
Generated workspaces are created by `univer sac init ./model`. They use `artifacts.mode: "generated"` and must write the managed result to `artifacts/<workspace-name>.univer`, for example `./model/artifacts/model.univer`.
|
|
20
|
+
|
|
21
|
+
Adopted workspaces are created by `univer sac init ./model --from ./existing.univer`. They use `artifacts.mode: "adopted"` and must continue updating the original artifact recorded in `artifacts.defaultWorkbook`.
|
|
22
|
+
|
|
23
|
+
If `--target` is provided, it must still resolve to the target required by the workspace artifact mode. Do not write SaC result workbooks to `dist/`, the workspace root, or ad hoc output names.
|
|
24
|
+
|
|
25
|
+
If the target `.univer` artifact does not exist, apply starts from an empty logical workbook and creates the artifact. The resulting workbook should contain only sheets declared by migration source.
|
|
26
|
+
|
|
27
|
+
If the target exists, it must be managed by SaC and contain the artifact-local ledger in package manifest metadata.
|
|
28
|
+
|
|
29
|
+
The ledger is artifact-local to the required result artifact. Apply rejects any default target or `--target` path that does not match the workspace artifact mode.
|
|
30
|
+
|
|
31
|
+
## Ledger Contract
|
|
32
|
+
|
|
33
|
+
Each applied pack writes a ledger entry with pack id, source hash, previous pack pointer, artifact content hash, runner metadata, timestamp, and origin.
|
|
34
|
+
|
|
35
|
+
New default apply entries also include `workbookCommit` with the local changeset `sid`, `reqId`, commit message, and mutation count. Entries created with `--no-commit` omit `workbookCommit` and report the workbook commit as skipped in command output.
|
|
36
|
+
|
|
37
|
+
Apply fails before executing pending source when:
|
|
38
|
+
|
|
39
|
+
- the target exists but is unmanaged
|
|
40
|
+
- the ledger is malformed
|
|
41
|
+
- the target ledger is ahead of source
|
|
42
|
+
- an already-applied pack id has a different source hash
|
|
43
|
+
- artifact content has drifted since the ledger head
|
|
44
|
+
- automatic workbook commit finds no pending workbook mutations
|
|
45
|
+
- automatic workbook commit returns more than one local changeset for a single pack
|
|
46
|
+
|
|
47
|
+
If every source pack is already ledgered with matching hashes and the artifact has not drifted, apply succeeds as an up to date no-op.
|
|
48
|
+
|
|
49
|
+
## Verification
|
|
50
|
+
|
|
51
|
+
After apply, verify workbook-visible state:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
univer inspect workbook ./model/artifacts/model.univer
|
|
55
|
+
univer pipe out ./model/artifacts/model.univer --range "Revenue!A1:C4" --format tsv
|
|
56
|
+
univer view ./model/artifacts/model.univer
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Do not treat successful command output as the only validation for a non-trivial workbook change.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# SaC Authoring
|
|
2
|
+
|
|
3
|
+
`univer sac migration create` writes a draft `pack.ts` with `files: []`. The draft is intentionally empty. Before `apply`, add one or more `*.sheet.ts` files, list them in `pack.files`, and export the migration module.
|
|
4
|
+
|
|
5
|
+
## Migration Module Shape
|
|
6
|
+
|
|
7
|
+
`pack.ts` owns pack metadata and sheet execution order:
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { defineFacadeMigrationPack } from "univer:sac/facade-migration-pack";
|
|
11
|
+
import type { FacadeMigrationModule } from "univer:sac/facade-migration-pack";
|
|
12
|
+
import revenue from "./revenue.sheet";
|
|
13
|
+
|
|
14
|
+
const pack = defineFacadeMigrationPack({
|
|
15
|
+
id: "20260523090000-add-revenue-model",
|
|
16
|
+
title: "Add Revenue Model",
|
|
17
|
+
appliesAfter: null,
|
|
18
|
+
files: ["revenue.sheet.ts"]
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
pack,
|
|
23
|
+
sheetMigrations: [revenue]
|
|
24
|
+
} satisfies FacadeMigrationModule;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The `files` list is authoritative. Every `*.sheet.ts` file in the pack directory must be listed, and files execute in that order.
|
|
28
|
+
|
|
29
|
+
## Sheet Migration Shape
|
|
30
|
+
|
|
31
|
+
Each sheet migration declares one primary sheet. `create: true` allows the CLI to create the sheet when it does not exist.
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { defineSheetMigration } from "univer:sac/facade-migration-pack";
|
|
35
|
+
import rowsText from "./revenue.tsv";
|
|
36
|
+
|
|
37
|
+
const rows = rowsText
|
|
38
|
+
.trim()
|
|
39
|
+
.split("\n")
|
|
40
|
+
.map((line) => line.split("\t"));
|
|
41
|
+
|
|
42
|
+
export default defineSheetMigration({
|
|
43
|
+
sheet: { id: "revenue", name: "Revenue", create: true },
|
|
44
|
+
apply({ sheet }) {
|
|
45
|
+
sheet.getRange("A1:C4").setValues(rows);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Put tabular seed data in CSV or TSV files when that keeps the migration easier to review. Referenced data assets are part of the source hash.
|
|
51
|
+
|
|
52
|
+
## Authoring Rules
|
|
53
|
+
|
|
54
|
+
- Keep one durable workbook intent per migration.
|
|
55
|
+
- Use stable sheet ids in `sheet.id`; use human-visible sheet names in `sheet.name`.
|
|
56
|
+
- Prefer one primary sheet per `*.sheet.ts` file.
|
|
57
|
+
- Use `univer:sac/facade-migration-pack` for helper types and definitions.
|
|
58
|
+
- Check `univer help sac facade-api` before using unfamiliar Facade APIs.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# SaC Data Assets
|
|
2
|
+
|
|
3
|
+
Migration source may import workspace-local CSV and TSV files when external data makes the workbook intent easier to review.
|
|
4
|
+
|
|
5
|
+
## CSV And TSV Assets
|
|
6
|
+
|
|
7
|
+
Keep data assets next to the migration that uses them:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
migrations/
|
|
11
|
+
20260523090000-add-revenue-model/
|
|
12
|
+
pack.ts
|
|
13
|
+
revenue.sheet.ts
|
|
14
|
+
revenue.tsv
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The TypeScript bundler treats referenced CSV and TSV assets as source inputs. They participate in the same source hash as `pack.ts`, `*.sheet.ts`, and workspace-local helper files.
|
|
18
|
+
|
|
19
|
+
## Import Boundary
|
|
20
|
+
|
|
21
|
+
SaC source must stay inside the workspace realpath boundary. These inputs are allowed:
|
|
22
|
+
|
|
23
|
+
- relative TypeScript imports that resolve inside the workspace
|
|
24
|
+
- relative CSV or TSV imports that resolve inside the workspace
|
|
25
|
+
- the CLI-provided helper specifier `univer:sac/facade-migration-pack`
|
|
26
|
+
|
|
27
|
+
These inputs are rejected before any workbook mutation runs:
|
|
28
|
+
|
|
29
|
+
- parent-path or symlink escapes outside the workspace
|
|
30
|
+
- ordinary package imports such as `lodash`
|
|
31
|
+
- Node builtins such as `node:fs`
|
|
32
|
+
- non-literal dynamic imports
|
|
33
|
+
|
|
34
|
+
The generated `package.json` is for the local toolchain, not for arbitrary migration source package imports.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# SaC Facade API
|
|
2
|
+
|
|
3
|
+
SaC migrations run inside the same Univer runtime family as `univer run`, but they are committed as ordered source packs with ledger entries. SaC help does not duplicate the full Facade API reference.
|
|
4
|
+
|
|
5
|
+
## Migration Context
|
|
6
|
+
|
|
7
|
+
A sheet migration `apply` function receives a bounded context:
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
apply({ workbook, sheet, univerAPI }) {
|
|
11
|
+
sheet.getRange("A1").setValue("ready");
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- `sheet` is the declared primary sheet, resolved or created before `apply` runs.
|
|
16
|
+
- `workbook` is the active workbook facade.
|
|
17
|
+
- `univerAPI` is available for Facade APIs that are not sheet-local.
|
|
18
|
+
|
|
19
|
+
## Use The Run Manual
|
|
20
|
+
|
|
21
|
+
Before using unfamiliar APIs, read the relevant run manual topic:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
univer help run sheets
|
|
25
|
+
univer help run ranges
|
|
26
|
+
univer help run formulas
|
|
27
|
+
univer help run formatting
|
|
28
|
+
univer help run conditional-formatting
|
|
29
|
+
univer help run charts
|
|
30
|
+
univer help run shapes
|
|
31
|
+
univer help run images
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use only APIs documented by those topics. Strictly do not guess or invent Facade method names, overloads, enum names, or object relationships.
|
|
35
|
+
|
|
36
|
+
## Common Starting Points
|
|
37
|
+
|
|
38
|
+
- Sheet creation, rename, visibility, gridlines, and freeze panes: `univer help run sheets`
|
|
39
|
+
- Range values, formulas, merges, clears, and AutoFill: `univer help run ranges`
|
|
40
|
+
- Formula write and async calculation readback: `univer help run formulas`
|
|
41
|
+
- Fonts, fills, borders, alignment, and number formats: `univer help run formatting`
|
|
42
|
+
- Charts, shapes, and floating images: read their dedicated run manual topics first.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# SaC Rebuild
|
|
2
|
+
|
|
3
|
+
Rebuild is an advanced checkpoint operation for a managed SaC artifact. It is not the first local happy path for creating a new SaC project.
|
|
4
|
+
|
|
5
|
+
## When Rebuild Helps
|
|
6
|
+
|
|
7
|
+
Use rebuild when the current workbook state is clearer than a noisy migration history, for example after repeated trial migrations or redundant table reshapes. The goal is to compact active source into one full checkpoint migration.
|
|
8
|
+
|
|
9
|
+
Rebuild does not extract mutation groups. It materializes the current managed artifact state as a full source checkpoint.
|
|
10
|
+
|
|
11
|
+
## Checkpoint Semantics
|
|
12
|
+
|
|
13
|
+
A successful rebuild replaces active `migrations/` with one generated checkpoint pack and resets the active artifact ledger to one rebuild entry. Historical source preservation is owned by git or external backups.
|
|
14
|
+
|
|
15
|
+
Default rebuild requires the source chain and artifact ledger to match. `--force` may discard active source history only inside the same workspace artifact boundary; it does not bypass managed-artifact validation, materialization gaps, package locks, transaction recovery, or path safety.
|
|
16
|
+
|
|
17
|
+
Rebuild recovery state is stored in `.sac/rebuild-recovery` and is cleaned after a successful rebuild or rollback. Agent runner evidence belongs in `.sac/runs/` and must not be removed by rebuild recovery cleanup.
|
|
18
|
+
|
|
19
|
+
## Related Help
|
|
20
|
+
|
|
21
|
+
- `univer help sac workflow`
|
|
22
|
+
- `univer help sac apply-ledger`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# SaC Workflow
|
|
2
|
+
|
|
3
|
+
Use SaC when the workbook should be maintained as a source project with ordered Facade Migration Packs. Use `univer run` for one-off workbook-local edits. In SaC, migrations/ is the source of truth and the .univer target artifact is generated by replaying migration source.
|
|
4
|
+
|
|
5
|
+
## Local Happy Path
|
|
6
|
+
|
|
7
|
+
Enable the experimental command surface first:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
univer config set experimental.sac true
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Create an empty SaC project:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
univer sac init ./model
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Install the workspace-local TypeScript toolchain declared by the generated `package.json`:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cd model
|
|
23
|
+
pnpm install
|
|
24
|
+
cd ..
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Create one migration, then edit the generated source before applying it:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
univer sac migration create "Add Revenue Model" --workspace ./model
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Apply the source chain to the default `.univer` artifact from `sac.config.ts`:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
univer sac apply ./model
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For an empty project, `univer sac init ./model` creates a generated workspace. Its result workbook is `./model/artifacts/model.univer`. Keep `inspect`, `pipe out`, and `view` pointed at that same artifact.
|
|
40
|
+
|
|
41
|
+
Each successful apply creates one workbook local changeset per migration pack. To undo the newest applied migration, use:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
univer reset ./model/artifacts/model.univer --hard HEAD~1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Verify workbook-visible state after apply:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
univer inspect workbook ./model/artifacts/model.univer
|
|
51
|
+
univer pipe out ./model/artifacts/model.univer --range "Revenue!A1:C4" --format tsv
|
|
52
|
+
univer view ./model/artifacts/model.univer
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Repeat the loop one migration at a time: create, edit source, apply, verify. Keep each migration focused on one durable workbook intent.
|
|
56
|
+
|
|
57
|
+
## Project Shape
|
|
58
|
+
|
|
59
|
+
- `sac.config.ts` declares the migration directory, artifact mode, and default artifact path.
|
|
60
|
+
- `package.json` is private and exists for the workspace-local bundling toolchain.
|
|
61
|
+
- `migrations/` contains timestamped migration pack directories.
|
|
62
|
+
- Empty init uses generated mode: `artifacts/<workspace-name>.univer` is the generated workbook result and should stay ignored by git unless a workflow explicitly chooses otherwise.
|
|
63
|
+
- `.sac/runs/` is reserved for agent runner evidence and is separate from generated workbook results.
|
|
64
|
+
|
|
65
|
+
## Related Help
|
|
66
|
+
|
|
67
|
+
- `univer help sac authoring`
|
|
68
|
+
- `univer help sac facade-api`
|
|
69
|
+
- `univer help sac apply-ledger`
|