@univerjs-pro/collaboration-client-node 0.5.1-nightly.202412090546
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/README.md +16 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/types/config.schema.d.ts +6 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/plugin.d.ts +13 -0
- package/lib/types/services/node-web-socket.service.d.ts +7 -0
- package/lib/umd/index.js +1 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# @univerjs/collaboration-client-node
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/packages/@univerjs/collaboration-client-node)
|
|
4
|
+
[](https://img.shields.io/npm/l/@univerjs/collaboration-client-node)
|
|
5
|
+
|
|
6
|
+
## Introduction
|
|
7
|
+
|
|
8
|
+
> TODO: Introduction
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```shell
|
|
15
|
+
npm i @univerjs/collaboration-client-node
|
|
16
|
+
```
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x4da63a=_0x3ce6;(function(_0x58e4ef,_0x4c063){const _0x542497=_0x3ce6,_0x1332ff=_0x58e4ef();while(!![]){try{const _0x1537a6=parseInt(_0x542497(0xe5))/0x1+-parseInt(_0x542497(0xe3))/0x2+parseInt(_0x542497(0x104))/0x3*(-parseInt(_0x542497(0xfa))/0x4)+-parseInt(_0x542497(0x102))/0x5*(parseInt(_0x542497(0xf7))/0x6)+parseInt(_0x542497(0xf3))/0x7+-parseInt(_0x542497(0xf0))/0x8+parseInt(_0x542497(0x116))/0x9;if(_0x1537a6===_0x4c063)break;else _0x1332ff['push'](_0x1332ff['shift']());}catch(_0x16024b){_0x1332ff['push'](_0x1332ff['shift']());}}}(_0x5d29,0xedaf3));Object[_0x4da63a(0x115)](exports,Symbol[_0x4da63a(0x105)],{'value':_0x4da63a(0xf2)});const f=require(_0x4da63a(0xec)),c=require(_0x4da63a(0x10a)),d=require(_0x4da63a(0xfc)),l=require(_0x4da63a(0xf8)),_='collaboration-client-node.config',C={'cookie':''};var v,p;function h(){return p||(p=0x1,v=function(){const _0x2b5647=_0x3ce6;throw new Error(_0x2b5647(0x114));}),v;}var w=h(),P=Object['defineProperty'],O=Object[_0x4da63a(0x100)],S=(_0x18700c,_0x45ca3b,_0x11ed12,_0x4fa0bc)=>{const _0x32a8e5=_0x4da63a;for(var _0x485fb9=_0x4fa0bc>0x1?void 0x0:_0x4fa0bc?O(_0x45ca3b,_0x11ed12):_0x45ca3b,_0x4024c0=_0x18700c[_0x32a8e5(0xe7)]-0x1,_0x221bf8;_0x4024c0>=0x0;_0x4024c0--)(_0x221bf8=_0x18700c[_0x4024c0])&&(_0x485fb9=(_0x4fa0bc?_0x221bf8(_0x45ca3b,_0x11ed12,_0x485fb9):_0x221bf8(_0x485fb9))||_0x485fb9);return _0x4fa0bc&&_0x485fb9&&P(_0x45ca3b,_0x11ed12,_0x485fb9),_0x485fb9;},N=(_0x424641,_0x2ceb70)=>(_0xf07a4d,_0x57c1c3)=>_0x2ceb70(_0xf07a4d,_0x57c1c3,_0x424641);let b=class extends c[_0x4da63a(0x109)]{constructor(_0x282e81){const _0x1e14f3=_0x4da63a;super(),this[_0x1e14f3(0x108)]=_0x282e81;}[_0x4da63a(0x10f)](_0x10c9f5){const _0x302234=_0x4da63a,_0xecc8e5=this[_0x302234(0x108)]['getConfig'](_)[_0x302234(0x10c)];try{const _0x2fca43=new w[(_0x302234(0x101))](_0x10c9f5,{'headers':{'cookie':_0xecc8e5}}),_0x5c1909=new c[(_0x302234(0xed))]();return{'URL':_0x10c9f5,'close':(_0x4cbfcd,_0x1b9af2)=>{const _0x1be788=_0x302234;_0x2fca43[_0x1be788(0xe9)](_0x4cbfcd,_0x1b9af2),_0x5c1909[_0x1be788(0x103)]();},'send':_0x205e40=>{_0x2fca43['send'](_0x205e40);},'open$':new l[(_0x302234(0x112))](_0x55dc81=>{const _0xc925a=_0x302234,_0x1dc190=_0x4e3795=>_0x55dc81[_0xc925a(0x10b)](_0x4e3795);_0x2fca43[_0xc925a(0xee)](_0xc925a(0xf1),_0x1dc190),_0x5c1909[_0xc925a(0x119)](c[_0xc925a(0x117)](()=>_0x2fca43[_0xc925a(0xe8)](_0xc925a(0xf1),_0x1dc190)));})['pipe'](l[_0x302234(0x113)]()),'close$':new l[(_0x302234(0x112))](_0x3d4765=>{const _0x2c2f85=_0x302234,_0x4920a1=_0x4c3bab=>_0x3d4765['next'](_0x4c3bab);_0x2fca43[_0x2c2f85(0xee)](_0x2c2f85(0xe9),_0x4920a1),_0x5c1909[_0x2c2f85(0x119)](c[_0x2c2f85(0x117)](()=>_0x2fca43[_0x2c2f85(0xe8)](_0x2c2f85(0xe9),_0x4920a1)));})[_0x302234(0x10e)](l['share']()),'error$':new l[(_0x302234(0x112))](_0x335b92=>{const _0xb4940a=_0x302234,_0x2df41f=_0x48d0a5=>_0x335b92[_0xb4940a(0x10b)](_0x48d0a5);_0x2fca43[_0xb4940a(0xee)](_0xb4940a(0x107),_0x2df41f),_0x5c1909[_0xb4940a(0x119)](c[_0xb4940a(0x117)](()=>_0x2fca43['removeEventListener'](_0xb4940a(0x107),_0x2df41f)));})[_0x302234(0x10e)](l['share']()),'message$':new l[(_0x302234(0x112))](_0x481cb6=>{const _0x352fa4=_0x302234,_0x279e54=_0x55d21e=>_0x481cb6[_0x352fa4(0x10b)](_0x55d21e);_0x2fca43[_0x352fa4(0xee)]('message',_0x279e54),_0x5c1909[_0x352fa4(0x119)](c['toDisposable'](()=>_0x2fca43[_0x352fa4(0xe8)]('message',_0x279e54)));})[_0x302234(0x10e)](l[_0x302234(0x113)]())};}catch(_0x40ab61){return console[_0x302234(0x107)](_0x40ab61),null;}}};b=S([N(0x0,c[_0x4da63a(0xf4)])],b);function _0x3ce6(_0x415990,_0x447ba1){const _0x5d2925=_0x5d29();return _0x3ce6=function(_0x3ce6b1,_0x3996fd){_0x3ce6b1=_0x3ce6b1-0xe3;let _0x4a25b6=_0x5d2925[_0x3ce6b1];return _0x4a25b6;},_0x3ce6(_0x415990,_0x447ba1);}var g=Object[_0x4da63a(0x115)],E=Object['getOwnPropertyDescriptor'],D=(_0x5d18f9,_0x1c0e3a,_0x5758c7)=>_0x1c0e3a in _0x5d18f9?g(_0x5d18f9,_0x1c0e3a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5758c7}):_0x5d18f9[_0x1c0e3a]=_0x5758c7,m=(_0x4a0aff,_0x369850,_0x3a59b0,_0x50927e)=>{const _0x32453b=_0x4da63a;for(var _0x289c3a=_0x50927e>0x1?void 0x0:_0x50927e?E(_0x369850,_0x3a59b0):_0x369850,_0x144ef7=_0x4a0aff[_0x32453b(0xe7)]-0x1,_0xdf54df;_0x144ef7>=0x0;_0x144ef7--)(_0xdf54df=_0x4a0aff[_0x144ef7])&&(_0x289c3a=(_0x50927e?_0xdf54df(_0x369850,_0x3a59b0,_0x289c3a):_0xdf54df(_0x289c3a))||_0x289c3a);return _0x50927e&&_0x289c3a&&g(_0x369850,_0x3a59b0,_0x289c3a),_0x289c3a;},u=(_0x523dec,_0x4db6e0)=>(_0x428960,_0x4e1b1c)=>_0x4db6e0(_0x428960,_0x4e1b1c,_0x523dec),I=(_0x71cb8,_0x5b59c4,_0x42e57b)=>D(_0x71cb8,_0x5b59c4+'',_0x42e57b);function _0x5d29(){const _0x5f06e9=['WebSocket','9495HfBhVd','dispose','5871tRrlxK','toStringTag','Injector','error','_configService','Disposable','@univerjs/core','next','cookie','_injector','pipe','createSocket','setConfig','headers','Observable','share','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','defineProperty','29311893yaEvlu','toDisposable','set','add','2236334FWvGta','Cookie','1784602GnEoxQ','Plugin','length','removeEventListener','close','registerHTTPInterceptor','_httpService','@univerjs-pro/collaboration-client','DisposableCollection','addEventListener','UniverCollaborationClientNodePlugin','2761672sLWlFs','open','Module','3188248fdIDxf','IConfigService','DependentOn','_config','4530RYlJAO','rxjs','ISocketService','3324bgszDw','_registerDependencies','@univerjs/network','Inject','onStarting','registerDependencies','getOwnPropertyDescriptor'];_0x5d29=function(){return _0x5f06e9;};return _0x5d29();}exports[_0x4da63a(0xef)]=class extends c[_0x4da63a(0xe6)]{constructor(_0x12fd39=C,_0x1f0219,_0x50ed48,_0x29ec19){const _0xf1cbd5=_0x4da63a;if(!_0x12fd39[_0xf1cbd5(0x10c)])throw new Error('[UniverCollaborationClientNodePlugin]:\x20you\x20should\x20set\x20cookie\x20for\x20authentication\x20in\x20UniverCollaborationClientNodePlugin\x27s\x20config.');super(),this[_0xf1cbd5(0xf6)]=_0x12fd39,this['_configService']=_0x1f0219,this[_0xf1cbd5(0xeb)]=_0x50ed48,this['_injector']=_0x29ec19,this[_0xf1cbd5(0x108)][_0xf1cbd5(0x110)](_,this[_0xf1cbd5(0xf6)]);}[_0x4da63a(0xfe)](){this['_registerDependencies']();}[_0x4da63a(0xfb)](){const _0x995b2=_0x4da63a;c[_0x995b2(0xff)](this[_0x995b2(0x10d)],[[d[_0x995b2(0xf9)],{'useClass':b}]]),this[_0x995b2(0xeb)][_0x995b2(0xea)]({'priority':0x1,'interceptor':(_0x338424,_0x40d587)=>(_0x338424[_0x995b2(0x111)][_0x995b2(0x118)](_0x995b2(0xe4),this[_0x995b2(0xf6)]['cookie']),_0x40d587(_0x338424))});}},I(exports[_0x4da63a(0xef)],'pluginName','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),exports[_0x4da63a(0xef)]=m([c[_0x4da63a(0xf5)](f['UniverCollaborationClientPlugin']),u(0x1,c['IConfigService']),u(0x2,c[_0x4da63a(0xfd)](d['HTTPService'])),u(0x3,c[_0x4da63a(0xfd)](c[_0x4da63a(0x106)]))],exports[_0x4da63a(0xef)]);
|
package/lib/es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x116e7f=_0x449c;(function(_0x31e428,_0x2c47d6){const _0x23e2df=_0x449c,_0x4de507=_0x31e428();while(!![]){try{const _0xd5e418=-parseInt(_0x23e2df(0x6d))/0x1*(parseInt(_0x23e2df(0x8e))/0x2)+parseInt(_0x23e2df(0x7a))/0x3+-parseInt(_0x23e2df(0x7e))/0x4+-parseInt(_0x23e2df(0x79))/0x5*(-parseInt(_0x23e2df(0x87))/0x6)+-parseInt(_0x23e2df(0x8f))/0x7*(parseInt(_0x23e2df(0x6c))/0x8)+-parseInt(_0x23e2df(0x72))/0x9+-parseInt(_0x23e2df(0x81))/0xa*(-parseInt(_0x23e2df(0x8a))/0xb);if(_0xd5e418===_0x2c47d6)break;else _0x4de507['push'](_0x4de507['shift']());}catch(_0x199994){_0x4de507['push'](_0x4de507['shift']());}}}(_0x37ea,0xa22bc));import{UniverCollaborationClientPlugin as _0x3a19f3}from'@univerjs-pro/collaboration-client';import{Disposable as _0x179880,DisposableCollection as _0x328eec,toDisposable as _0xad308f,IConfigService as _0x3610d4,DependentOn as _0x272ef7,Inject as _0x11350d,Injector as _0x3c066b,Plugin as _0x4c7ec6,registerDependencies as _0x11801d}from'@univerjs/core';import{HTTPService as _0x70118d,ISocketService as _0x3d2cfe}from'@univerjs/network';import{Observable as _0x51b5fd,share as _0xf0af24}from'rxjs';const h=_0x116e7f(0x84),I={'cookie':''};var v,b;function x(){return b||(b=0x1,v=function(){throw new Error('ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object');}),v;}var T=x(),$=Object[_0x116e7f(0x6b)],j=Object[_0x116e7f(0x73)],k=(_0xa10067,_0x44846c,_0x4a9404,_0x39cffd)=>{for(var _0x16d954=_0x39cffd>0x1?void 0x0:_0x39cffd?j(_0x44846c,_0x4a9404):_0x44846c,_0x243a31=_0xa10067['length']-0x1,_0x3eeb08;_0x243a31>=0x0;_0x243a31--)(_0x3eeb08=_0xa10067[_0x243a31])&&(_0x16d954=(_0x39cffd?_0x3eeb08(_0x44846c,_0x4a9404,_0x16d954):_0x3eeb08(_0x16d954))||_0x16d954);return _0x39cffd&&_0x16d954&&$(_0x44846c,_0x4a9404,_0x16d954),_0x16d954;},B=(_0x29be3c,_0x4d2e6e)=>(_0x12e3b1,_0x1810a6)=>_0x4d2e6e(_0x12e3b1,_0x1810a6,_0x29be3c);let d=class extends _0x179880{constructor(_0x2d2123){const _0x572127=_0x116e7f;super(),this[_0x572127(0x86)]=_0x2d2123;}['createSocket'](_0x4fe2d2){const _0x640c08=_0x116e7f,_0x373526=this['_configService'][_0x640c08(0x88)](h)[_0x640c08(0x8b)];try{const _0x16296f=new T[(_0x640c08(0x78))](_0x4fe2d2,{'headers':{'cookie':_0x373526}}),_0x45d872=new _0x328eec();return{'URL':_0x4fe2d2,'close':(_0x5f163f,_0x55b7b9)=>{const _0x4e4546=_0x640c08;_0x16296f[_0x4e4546(0x80)](_0x5f163f,_0x55b7b9),_0x45d872[_0x4e4546(0x83)]();},'send':_0x3b516f=>{const _0x10d866=_0x640c08;_0x16296f[_0x10d866(0x90)](_0x3b516f);},'open$':new _0x51b5fd(_0x187cf5=>{const _0x1338b2=_0x640c08,_0x131f33=_0x15a5f0=>_0x187cf5[_0x1338b2(0x7c)](_0x15a5f0);_0x16296f[_0x1338b2(0x75)](_0x1338b2(0x89),_0x131f33),_0x45d872[_0x1338b2(0x7f)](_0xad308f(()=>_0x16296f[_0x1338b2(0x6f)](_0x1338b2(0x89),_0x131f33)));})[_0x640c08(0x77)](_0xf0af24()),'close$':new _0x51b5fd(_0x38457b=>{const _0x18c2ef=_0x640c08,_0x5efcf2=_0x379804=>_0x38457b['next'](_0x379804);_0x16296f[_0x18c2ef(0x75)](_0x18c2ef(0x80),_0x5efcf2),_0x45d872[_0x18c2ef(0x7f)](_0xad308f(()=>_0x16296f[_0x18c2ef(0x6f)](_0x18c2ef(0x80),_0x5efcf2)));})[_0x640c08(0x77)](_0xf0af24()),'error$':new _0x51b5fd(_0x210462=>{const _0x2d1067=_0x640c08,_0x4dc2ca=_0x4bd19f=>_0x210462[_0x2d1067(0x7c)](_0x4bd19f);_0x16296f[_0x2d1067(0x75)]('error',_0x4dc2ca),_0x45d872[_0x2d1067(0x7f)](_0xad308f(()=>_0x16296f[_0x2d1067(0x6f)](_0x2d1067(0x76),_0x4dc2ca)));})[_0x640c08(0x77)](_0xf0af24()),'message$':new _0x51b5fd(_0x440f0b=>{const _0x564134=_0x640c08,_0x37b312=_0x29e68a=>_0x440f0b['next'](_0x29e68a);_0x16296f[_0x564134(0x75)](_0x564134(0x71),_0x37b312),_0x45d872[_0x564134(0x7f)](_0xad308f(()=>_0x16296f[_0x564134(0x6f)](_0x564134(0x71),_0x37b312)));})[_0x640c08(0x77)](_0xf0af24())};}catch(_0x293b50){return console[_0x640c08(0x76)](_0x293b50),null;}}};d=k([B(0x0,_0x3610d4)],d);function _0x449c(_0x1c2a9c,_0x417d51){const _0x37eaa5=_0x37ea();return _0x449c=function(_0x449c6b,_0x29cde2){_0x449c6b=_0x449c6b-0x6a;let _0x5769f4=_0x37eaa5[_0x449c6b];return _0x5769f4;},_0x449c(_0x1c2a9c,_0x417d51);}function _0x37ea(){const _0x3e5c1a=['registerHTTPInterceptor','addEventListener','error','pipe','WebSocket','305ccEoua','3873873OAwtlv','pluginName','next','_registerDependencies','2948604WTnuOD','add','close','10FmfcTx','[UniverCollaborationClientNodePlugin]:\x20you\x20should\x20set\x20cookie\x20for\x20authentication\x20in\x20UniverCollaborationClientNodePlugin\x27s\x20config.','dispose','collaboration-client-node.config','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN','_configService','20124WtPbPI','getConfig','open','21244487PTRCQq','cookie','_httpService','_config','1838764vtIgpr','1687LsOoyj','send','Cookie','setConfig','headers','defineProperty','1528GDTArX','1msCoxQ','set','removeEventListener','_injector','message','9543474VqoWmm','getOwnPropertyDescriptor'];_0x37ea=function(){return _0x3e5c1a;};return _0x37ea();}var w=Object[_0x116e7f(0x6b)],U=Object['getOwnPropertyDescriptor'],A=(_0x4f353b,_0x210006,_0x2925d6)=>_0x210006 in _0x4f353b?w(_0x4f353b,_0x210006,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2925d6}):_0x4f353b[_0x210006]=_0x2925d6,R=(_0x417bee,_0x6e3060,_0x4c2205,_0x100cfc)=>{for(var _0xced341=_0x100cfc>0x1?void 0x0:_0x100cfc?U(_0x6e3060,_0x4c2205):_0x6e3060,_0x90226b=_0x417bee['length']-0x1,_0x2a7de9;_0x90226b>=0x0;_0x90226b--)(_0x2a7de9=_0x417bee[_0x90226b])&&(_0xced341=(_0x100cfc?_0x2a7de9(_0x6e3060,_0x4c2205,_0xced341):_0x2a7de9(_0xced341))||_0xced341);return _0x100cfc&&_0xced341&&w(_0x6e3060,_0x4c2205,_0xced341),_0xced341;},_=(_0x199bd7,_0x135555)=>(_0x10a780,_0x3596b5)=>_0x135555(_0x10a780,_0x3596b5,_0x199bd7),W=(_0x2487ca,_0x4b17c1,_0x731747)=>A(_0x2487ca,_0x4b17c1+'',_0x731747);let u=class extends _0x4c7ec6{constructor(_0x581070=I,_0x6a4e4d,_0xe32d45,_0x2762ca){const _0x207913=_0x116e7f;if(!_0x581070[_0x207913(0x8b)])throw new Error(_0x207913(0x82));super(),this['_config']=_0x581070,this[_0x207913(0x86)]=_0x6a4e4d,this[_0x207913(0x8c)]=_0xe32d45,this[_0x207913(0x70)]=_0x2762ca,this[_0x207913(0x86)][_0x207913(0x92)](h,this[_0x207913(0x8d)]);}['onStarting'](){const _0x5bd6d8=_0x116e7f;this[_0x5bd6d8(0x7d)]();}['_registerDependencies'](){const _0x250562=_0x116e7f;_0x11801d(this['_injector'],[[_0x3d2cfe,{'useClass':d}]]),this[_0x250562(0x8c)][_0x250562(0x74)]({'priority':0x1,'interceptor':(_0x143d98,_0x5ef0a0)=>(_0x143d98[_0x250562(0x6a)][_0x250562(0x6e)](_0x250562(0x91),this[_0x250562(0x8d)][_0x250562(0x8b)]),_0x5ef0a0(_0x143d98))});}};W(u,_0x116e7f(0x7b),_0x116e7f(0x85)),u=R([_0x272ef7(_0x3a19f3),_(0x1,_0x3610d4),_(0x2,_0x11350d(_0x70118d)),_(0x3,_0x11350d(_0x3c066b))],u);export{u as UniverCollaborationClientNodePlugin};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const COLLABORATION_CLIENT_NODE_CONFIG_KEY = "collaboration-client-node.config";
|
|
2
|
+
export declare const configSymbol: unique symbol;
|
|
3
|
+
export interface IUniverCollaborationClientNodeConfig {
|
|
4
|
+
cookie: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const defaultPluginConfig: IUniverCollaborationClientNodeConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UniverCollaborationClientNodePlugin } from './plugin';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IUniverCollaborationClientNodeConfig } from './config.schema';
|
|
2
|
+
import { IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
3
|
+
import { HTTPService } from '@univerjs/network';
|
|
4
|
+
export declare class UniverCollaborationClientNodePlugin extends Plugin {
|
|
5
|
+
private readonly _config;
|
|
6
|
+
private readonly _configService;
|
|
7
|
+
private readonly _httpService;
|
|
8
|
+
protected _injector: Injector;
|
|
9
|
+
static pluginName: string;
|
|
10
|
+
constructor(_config: IUniverCollaborationClientNodeConfig | undefined, _configService: IConfigService, _httpService: HTTPService, _injector: Injector);
|
|
11
|
+
onStarting(): void;
|
|
12
|
+
private _registerDependencies;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Nullable, Disposable, IConfigService } from '@univerjs/core';
|
|
2
|
+
import { ISocket, ISocketService } from '@univerjs/network';
|
|
3
|
+
export declare class NodeWebSocketService extends Disposable implements ISocketService {
|
|
4
|
+
private readonly _configService;
|
|
5
|
+
constructor(_configService: IConfigService);
|
|
6
|
+
createSocket(URL: string): Nullable<ISocket>;
|
|
7
|
+
}
|
package/lib/umd/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x515b84,_0x36ee61){const _0x4a5985=_0x4b67,_0x586bfa=_0x515b84();while(!![]){try{const _0x4b1038=parseInt(_0x4a5985(0x220))/0x1+-parseInt(_0x4a5985(0x202))/0x2*(parseInt(_0x4a5985(0x1ed))/0x3)+parseInt(_0x4a5985(0x1f5))/0x4*(-parseInt(_0x4a5985(0x1fa))/0x5)+-parseInt(_0x4a5985(0x1fc))/0x6+-parseInt(_0x4a5985(0x217))/0x7+parseInt(_0x4a5985(0x222))/0x8*(-parseInt(_0x4a5985(0x210))/0x9)+-parseInt(_0x4a5985(0x207))/0xa*(-parseInt(_0x4a5985(0x227))/0xb);if(_0x4b1038===_0x36ee61)break;else _0x586bfa['push'](_0x586bfa['shift']());}catch(_0x366a95){_0x586bfa['push'](_0x586bfa['shift']());}}}(_0x49aa,0x29a93),function(_0x4153e2,_0x2cfdec){const _0x13a356=_0x4b67;typeof exports==_0x13a356(0x223)&&typeof module<'u'?_0x2cfdec(exports,require(_0x13a356(0x214)),require('@univerjs/core'),require(_0x13a356(0x21d)),require(_0x13a356(0x209))):typeof define==_0x13a356(0x21e)&&define['amd']?define([_0x13a356(0x21a),_0x13a356(0x214),_0x13a356(0x213),_0x13a356(0x21d),'rxjs'],_0x2cfdec):(_0x4153e2=typeof globalThis<'u'?globalThis:_0x4153e2||self,_0x2cfdec(_0x4153e2[_0x13a356(0x21f)]={},_0x4153e2[_0x13a356(0x1f9)],_0x4153e2['UniverCore'],_0x4153e2['UniverNetwork'],_0x4153e2[_0x13a356(0x209)]));}(this,function(_0x3f8b82,_0x23a2d8,_0xce5011,_0x25c143,_0x155e3a){'use strict';const _0x551b37=_0x4b67;const _0x56664b=_0x551b37(0x21c),_0x1c2d18={'cookie':''};var _0x479af9,_0x45b9c4;function _0x318af6(){return _0x45b9c4||(_0x45b9c4=0x1,_0x479af9=function(){const _0x1e8b4b=_0x4b67;throw new Error(_0x1e8b4b(0x20f));}),_0x479af9;}var _0x461ca3=_0x318af6(),_0x2c9122=Object[_0x551b37(0x1fd)],_0x169729=Object[_0x551b37(0x226)],_0x1760f4=(_0x39e085,_0x17d2df,_0x276415,_0x16f6b1)=>{const _0x1f3155=_0x551b37;for(var _0x510692=_0x16f6b1>0x1?void 0x0:_0x16f6b1?_0x169729(_0x17d2df,_0x276415):_0x17d2df,_0x2028e1=_0x39e085[_0x1f3155(0x221)]-0x1,_0x138cf1;_0x2028e1>=0x0;_0x2028e1--)(_0x138cf1=_0x39e085[_0x2028e1])&&(_0x510692=(_0x16f6b1?_0x138cf1(_0x17d2df,_0x276415,_0x510692):_0x138cf1(_0x510692))||_0x510692);return _0x16f6b1&&_0x510692&&_0x2c9122(_0x17d2df,_0x276415,_0x510692),_0x510692;},_0x13c1c3=(_0x24a37b,_0x3bd8a3)=>(_0x280e13,_0x5db9f1)=>_0x3bd8a3(_0x280e13,_0x5db9f1,_0x24a37b);let _0x103101=class extends _0xce5011[_0x551b37(0x211)]{constructor(_0x3297fa){const _0x13a1e5=_0x551b37;super(),this[_0x13a1e5(0x1ee)]=_0x3297fa;}[_0x551b37(0x200)](_0x21ab7f){const _0x41723d=_0x551b37,_0x4305d2=this['_configService'][_0x41723d(0x1f6)](_0x56664b)[_0x41723d(0x218)];try{const _0x373e4a=new _0x461ca3['WebSocket'](_0x21ab7f,{'headers':{'cookie':_0x4305d2}}),_0x3e6895=new _0xce5011['DisposableCollection']();return{'URL':_0x21ab7f,'close':(_0xa889e3,_0x28bea9)=>{const _0x45c47e=_0x41723d;_0x373e4a[_0x45c47e(0x224)](_0xa889e3,_0x28bea9),_0x3e6895[_0x45c47e(0x1fe)]();},'send':_0x539e0c=>{const _0x465c8e=_0x41723d;_0x373e4a[_0x465c8e(0x1fb)](_0x539e0c);},'open$':new _0x155e3a['Observable'](_0x194e34=>{const _0x5efd0b=_0x41723d,_0x1cef01=_0x4e776c=>_0x194e34[_0x5efd0b(0x20a)](_0x4e776c);_0x373e4a['addEventListener']('open',_0x1cef01),_0x3e6895[_0x5efd0b(0x205)](_0xce5011['toDisposable'](()=>_0x373e4a[_0x5efd0b(0x228)](_0x5efd0b(0x20b),_0x1cef01)));})['pipe'](_0x155e3a[_0x41723d(0x1f8)]()),'close$':new _0x155e3a[(_0x41723d(0x203))](_0xd7d799=>{const _0x47613c=_0x41723d,_0x5058d1=_0x3ccbd7=>_0xd7d799[_0x47613c(0x20a)](_0x3ccbd7);_0x373e4a[_0x47613c(0x219)]('close',_0x5058d1),_0x3e6895['add'](_0xce5011['toDisposable'](()=>_0x373e4a[_0x47613c(0x228)](_0x47613c(0x224),_0x5058d1)));})[_0x41723d(0x1f2)](_0x155e3a[_0x41723d(0x1f8)]()),'error$':new _0x155e3a[(_0x41723d(0x203))](_0x206b5b=>{const _0x1f41e4=_0x41723d,_0xd4f74d=_0x5852f2=>_0x206b5b[_0x1f41e4(0x20a)](_0x5852f2);_0x373e4a[_0x1f41e4(0x219)](_0x1f41e4(0x201),_0xd4f74d),_0x3e6895[_0x1f41e4(0x205)](_0xce5011[_0x1f41e4(0x1ff)](()=>_0x373e4a[_0x1f41e4(0x228)](_0x1f41e4(0x201),_0xd4f74d)));})[_0x41723d(0x1f2)](_0x155e3a['share']()),'message$':new _0x155e3a[(_0x41723d(0x203))](_0x19eef6=>{const _0x16b7d1=_0x41723d,_0x498b1e=_0xa88c19=>_0x19eef6[_0x16b7d1(0x20a)](_0xa88c19);_0x373e4a[_0x16b7d1(0x219)](_0x16b7d1(0x225),_0x498b1e),_0x3e6895[_0x16b7d1(0x205)](_0xce5011[_0x16b7d1(0x1ff)](()=>_0x373e4a[_0x16b7d1(0x228)]('message',_0x498b1e)));})[_0x41723d(0x1f2)](_0x155e3a[_0x41723d(0x1f8)]())};}catch(_0xa16197){return console[_0x41723d(0x201)](_0xa16197),null;}}};_0x103101=_0x1760f4([_0x13c1c3(0x0,_0xce5011[_0x551b37(0x21b)])],_0x103101);var _0x2674bf=Object[_0x551b37(0x1fd)],_0xa39b05=Object[_0x551b37(0x226)],_0x5599e7=(_0x104c73,_0x7a6d0f,_0x55b870)=>_0x7a6d0f in _0x104c73?_0x2674bf(_0x104c73,_0x7a6d0f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55b870}):_0x104c73[_0x7a6d0f]=_0x55b870,_0x193982=(_0x4e5e74,_0x470903,_0x11c26d,_0x45d9d8)=>{const _0x313071=_0x551b37;for(var _0x5b92d2=_0x45d9d8>0x1?void 0x0:_0x45d9d8?_0xa39b05(_0x470903,_0x11c26d):_0x470903,_0x1eb051=_0x4e5e74[_0x313071(0x221)]-0x1,_0x1d6026;_0x1eb051>=0x0;_0x1eb051--)(_0x1d6026=_0x4e5e74[_0x1eb051])&&(_0x5b92d2=(_0x45d9d8?_0x1d6026(_0x470903,_0x11c26d,_0x5b92d2):_0x1d6026(_0x5b92d2))||_0x5b92d2);return _0x45d9d8&&_0x5b92d2&&_0x2674bf(_0x470903,_0x11c26d,_0x5b92d2),_0x5b92d2;},_0x471d7d=(_0x3237c5,_0x4207d6)=>(_0x40492e,_0x340fe4)=>_0x4207d6(_0x40492e,_0x340fe4,_0x3237c5),_0x2cda42=(_0x10b26c,_0x5b08d7,_0x444c26)=>_0x5599e7(_0x10b26c,_0x5b08d7+'',_0x444c26);_0x3f8b82[_0x551b37(0x1f4)]=class extends _0xce5011[_0x551b37(0x1ef)]{constructor(_0x39be00=_0x1c2d18,_0x166ab1,_0x2635a9,_0x1b39b1){const _0x472f04=_0x551b37;if(!_0x39be00['cookie'])throw new Error(_0x472f04(0x22c));super(),this[_0x472f04(0x20c)]=_0x39be00,this[_0x472f04(0x1ee)]=_0x166ab1,this[_0x472f04(0x22b)]=_0x2635a9,this[_0x472f04(0x20e)]=_0x1b39b1,this[_0x472f04(0x1ee)][_0x472f04(0x1f3)](_0x56664b,this['_config']);}[_0x551b37(0x1ec)](){const _0x2cfaf4=_0x551b37;this[_0x2cfaf4(0x208)]();}[_0x551b37(0x208)](){const _0x3696bd=_0x551b37;_0xce5011[_0x3696bd(0x1f7)](this[_0x3696bd(0x20e)],[[_0x25c143[_0x3696bd(0x206)],{'useClass':_0x103101}]]),this[_0x3696bd(0x22b)][_0x3696bd(0x212)]({'priority':0x1,'interceptor':(_0x1a3cca,_0x5b9843)=>(_0x1a3cca[_0x3696bd(0x204)][_0x3696bd(0x22a)](_0x3696bd(0x20d),this[_0x3696bd(0x20c)][_0x3696bd(0x218)]),_0x5b9843(_0x1a3cca))});}},_0x2cda42(_0x3f8b82[_0x551b37(0x1f4)],'pluginName','UNIVER_COLLABORATION_CLIENT_NODE_PLUGIN'),_0x3f8b82[_0x551b37(0x1f4)]=_0x193982([_0xce5011[_0x551b37(0x215)](_0x23a2d8['UniverCollaborationClientPlugin']),_0x471d7d(0x1,_0xce5011['IConfigService']),_0x471d7d(0x2,_0xce5011['Inject'](_0x25c143['HTTPService'])),_0x471d7d(0x3,_0xce5011[_0x551b37(0x1f1)](_0xce5011[_0x551b37(0x229)]))],_0x3f8b82['UniverCollaborationClientNodePlugin']),Object['defineProperty'](_0x3f8b82,Symbol[_0x551b37(0x1f0)],{'value':_0x551b37(0x216)});}));function _0x4b67(_0xd53689,_0xdd8d4e){const _0x49aa5f=_0x49aa();return _0x4b67=function(_0x4b675a,_0x32fcd2){_0x4b675a=_0x4b675a-0x1ec;let _0x25e2aa=_0x49aa5f[_0x4b675a];return _0x25e2aa;},_0x4b67(_0xd53689,_0xdd8d4e);}function _0x49aa(){const _0x38d39a=['1644286XkZxao','cookie','addEventListener','exports','IConfigService','collaboration-client-node.config','@univerjs/network','function','UniverProCollaborationClientNode','125762hjKzXh','length','536KHPvEI','object','close','message','getOwnPropertyDescriptor','22572xEnHsA','removeEventListener','Injector','set','_httpService','[UniverCollaborationClientNodePlugin]:\x20you\x20should\x20set\x20cookie\x20for\x20authentication\x20in\x20UniverCollaborationClientNodePlugin\x27s\x20config.','onStarting','3yyKMmP','_configService','Plugin','toStringTag','Inject','pipe','setConfig','UniverCollaborationClientNodePlugin','36268DljIdH','getConfig','registerDependencies','share','UniverProCollaborationClient','135inSLyR','send','306096XWaVRM','defineProperty','dispose','toDisposable','createSocket','error','143014yIUAmm','Observable','headers','add','ISocketService','4010atPzVM','_registerDependencies','rxjs','next','open','_config','Cookie','_injector','ws\x20does\x20not\x20work\x20in\x20the\x20browser.\x20Browser\x20clients\x20must\x20use\x20the\x20native\x20WebSocket\x20object','23607eofJon','Disposable','registerHTTPInterceptor','@univerjs/core','@univerjs-pro/collaboration-client','DependentOn','Module'];_0x49aa=function(){return _0x38d39a;};return _0x49aa();}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@univerjs-pro/collaboration-client-node",
|
|
3
|
+
"version": "0.5.1-nightly.202412090546",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": "DreamNum <developer@univer.ai>",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/univer"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://univer.ai",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/dream-num/univer"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/dream-num/univer/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./lib/es/index.js",
|
|
24
|
+
"require": "./lib/cjs/index.js",
|
|
25
|
+
"types": "./lib/types/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./*": {
|
|
28
|
+
"import": "./lib/es/*",
|
|
29
|
+
"require": "./lib/cjs/*",
|
|
30
|
+
"types": "./lib/types/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./lib/*": "./lib/*"
|
|
33
|
+
},
|
|
34
|
+
"main": "./lib/es/index.js",
|
|
35
|
+
"module": "./lib/es/index.js",
|
|
36
|
+
"types": "./lib/types/index.d.ts",
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"directories": {
|
|
41
|
+
"lib": "lib"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"lib"
|
|
45
|
+
],
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"rxjs": ">=7.0.0"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"ws": "8.18.0",
|
|
51
|
+
"@univerjs-pro/collaboration-client": "0.5.1-nightly.202412090546",
|
|
52
|
+
"@univerjs/network": "0.5.1-nightly.202412090546",
|
|
53
|
+
"@univerjs/core": "0.5.1-nightly.202412090546"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/ws": "8.5.13",
|
|
57
|
+
"rxjs": "^7.8.1",
|
|
58
|
+
"typescript": "^5.7.2",
|
|
59
|
+
"vite": "^6.0.1",
|
|
60
|
+
"vitest": "^2.1.6",
|
|
61
|
+
"@univerjs/core": "0.5.1-nightly.202412090546",
|
|
62
|
+
"@univerjs-infra/shared": "0.5.1"
|
|
63
|
+
},
|
|
64
|
+
"space": {
|
|
65
|
+
".": {
|
|
66
|
+
"import": "./lib/es/index.js",
|
|
67
|
+
"require": "./lib/cjs/index.js",
|
|
68
|
+
"types": "./lib/types/index.d.ts"
|
|
69
|
+
},
|
|
70
|
+
"./*": {
|
|
71
|
+
"import": "./lib/es/*",
|
|
72
|
+
"require": "./lib/cjs/*",
|
|
73
|
+
"types": "./lib/types/index.d.ts"
|
|
74
|
+
},
|
|
75
|
+
"./lib/*": "./lib/*"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"test": "vitest run",
|
|
79
|
+
"test:watch": "vitest",
|
|
80
|
+
"coverage": "vitest run --coverage",
|
|
81
|
+
"lint:types": "tsc --noEmit",
|
|
82
|
+
"build": "univer-cli build"
|
|
83
|
+
}
|
|
84
|
+
}
|