@univerjs/rpc-node 0.12.2-nightly.202511241159 → 0.12.2-nightly.202511290732
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +68 -56
- package/lib/index.js +68 -56
- package/lib/types/plugin.d.ts +2 -0
- package/lib/umd/index.js +1 -1
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var R=(n,e,r)=>e in n?p(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;var l=(n,e,r)=>R(n,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("node:child_process"),h=require("node:process"),c=require("@univerjs/core"),t=require("@univerjs/rpc"),g=require("rxjs"),N="rpc-node.main-thread.config",P={},I="rpc-node.worker-thread.config",v={};var m=Object.getOwnPropertyDescriptor,f=(n,e,r,o)=>{for(var s=o>1?void 0:o?m(e,r):e,i=n.length-1,a;i>=0;i--)(a=n[i])&&(s=a(s)||s);return s},d=(n,e)=>(r,o)=>e(r,o,n),u;exports.UniverRPCNodeMainPlugin=(u=class extends c.Plugin{constructor(r=P,o,s){super();l(this,"_child",null);this._config=r,this._injector=o,this._configService=s;const{...i}=c.merge({},P,this._config);this._configService.setConfig(N,i)}onStarting(){const{workerSrc:r}=this._config;if(!r)throw new Error("[UniverRPCNodeMainPlugin] workerSrc is required for UniverRPCNodeMainPlugin");const[o,s]=y(this._injector,r);[[t.IRPCChannelService,{useFactory:()=>new t.ChannelService(o)}],[t.DataSyncPrimaryController],[t.IRemoteSyncService,{useClass:t.RemoteSyncPrimaryService}]].forEach(a=>this._injector.add(a)),this._injector.get(t.DataSyncPrimaryController),this._child=s}dispose(){if(super.dispose(),this._child){try{this._child.kill()}catch(r){console.error("Failed to kill child process:",r)}this._child=null}}},l(u,"pluginName","UNIVER_RPC_NODE_MAIN_PLUGIN"),u);exports.UniverRPCNodeMainPlugin=f([d(1,c.Inject(c.Injector)),d(2,c.IConfigService)],exports.UniverRPCNodeMainPlugin);var _;exports.UniverRPCNodeWorkerPlugin=(_=class extends c.Plugin{constructor(e=v,r,o){super(),this._config=e,this._injector=r,this._configService=o;const{...s}=c.merge({},v,this._config);this._configService.setConfig(I,s)}onStarting(){[[t.DataSyncReplicaController],[t.IRPCChannelService,{useFactory:()=>new t.ChannelService(U())}],[t.IRemoteInstanceService,{useClass:t.WebWorkerRemoteInstanceService}]].forEach(e=>this._injector.add(e)),this._injector.get(t.DataSyncReplicaController)}},l(_,"pluginName","UNIVER_RPC_NODE_WORKER_PLUGIN"),_);exports.UniverRPCNodeWorkerPlugin=f([d(1,c.Inject(c.Injector)),d(2,c.IConfigService)],exports.UniverRPCNodeWorkerPlugin);function y(n,e){const r=n.get(c.ILogService),o=S.fork(e);return o.on("spawn",()=>r.log("Child computing process spawned!")),o.on("error",i=>r.error(i)),[{send(i){o.send(i)},onMessage:new g.Observable(i=>{const a=C=>{i.next(C)};return o.on("message",a),()=>o.off("message",a)}).pipe(g.shareReplay(1))},o]}function U(){return{send(n){h.send(n)},onMessage:new g.Observable(n=>{const e=r=>{n.next(r)};return h.on("message",e),()=>h.off("message",e)}).pipe(g.shareReplay(1))}}
|
package/lib/es/index.js
CHANGED
|
@@ -1,98 +1,110 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var j = (r, e, o) => e in r ? O(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o;
|
|
3
|
+
var c = (r, e, o) => j(r, typeof e != "symbol" ? e + "" : e, o);
|
|
4
4
|
import { fork as U } from "node:child_process";
|
|
5
|
-
import
|
|
6
|
-
import { Inject as P, Injector as v, IConfigService as C, Plugin as R, merge as S, ILogService as
|
|
7
|
-
import { IRPCChannelService as N, ChannelService as I, DataSyncPrimaryController as
|
|
5
|
+
import l from "node:process";
|
|
6
|
+
import { Inject as P, Injector as v, IConfigService as C, Plugin as R, merge as S, ILogService as k } from "@univerjs/core";
|
|
7
|
+
import { IRPCChannelService as N, ChannelService as I, DataSyncPrimaryController as h, IRemoteSyncService as D, RemoteSyncPrimaryService as W, DataSyncReplicaController as _, IRemoteInstanceService as G, WebWorkerRemoteInstanceService as x } from "@univerjs/rpc";
|
|
8
8
|
import { Observable as w, shareReplay as E } from "rxjs";
|
|
9
|
-
const
|
|
10
|
-
var
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
13
|
-
return
|
|
14
|
-
},
|
|
15
|
-
let u = (
|
|
16
|
-
constructor(e =
|
|
17
|
-
super()
|
|
18
|
-
|
|
9
|
+
const F = "rpc-node.main-thread.config", f = {}, L = "rpc-node.worker-thread.config", p = {};
|
|
10
|
+
var b = Object.getOwnPropertyDescriptor, y = (r, e, o, n) => {
|
|
11
|
+
for (var i = n > 1 ? void 0 : n ? b(e, o) : e, t = r.length - 1, s; t >= 0; t--)
|
|
12
|
+
(s = r[t]) && (i = s(i) || i);
|
|
13
|
+
return i;
|
|
14
|
+
}, a = (r, e) => (o, n) => e(o, n, r), g;
|
|
15
|
+
let u = (g = class extends R {
|
|
16
|
+
constructor(e = f, o, n) {
|
|
17
|
+
super();
|
|
18
|
+
c(this, "_child", null);
|
|
19
|
+
this._config = e, this._injector = o, this._configService = n;
|
|
20
|
+
const { ...i } = S(
|
|
19
21
|
{},
|
|
20
|
-
|
|
22
|
+
f,
|
|
21
23
|
this._config
|
|
22
24
|
);
|
|
23
|
-
this._configService.setConfig(
|
|
25
|
+
this._configService.setConfig(F, i);
|
|
24
26
|
}
|
|
25
27
|
onStarting() {
|
|
26
28
|
const { workerSrc: e } = this._config;
|
|
27
29
|
if (!e)
|
|
28
30
|
throw new Error("[UniverRPCNodeMainPlugin] workerSrc is required for UniverRPCNodeMainPlugin");
|
|
29
|
-
const
|
|
31
|
+
const [o, n] = A(this._injector, e);
|
|
30
32
|
[
|
|
31
33
|
[N, {
|
|
32
|
-
useFactory: () => new I(
|
|
34
|
+
useFactory: () => new I(o)
|
|
33
35
|
}],
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
].forEach((
|
|
36
|
+
[h],
|
|
37
|
+
[D, { useClass: W }]
|
|
38
|
+
].forEach((t) => this._injector.add(t)), this._injector.get(h), this._child = n;
|
|
37
39
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
dispose() {
|
|
41
|
+
if (super.dispose(), this._child) {
|
|
42
|
+
try {
|
|
43
|
+
this._child.kill();
|
|
44
|
+
} catch (e) {
|
|
45
|
+
console.error("Failed to kill child process:", e);
|
|
46
|
+
}
|
|
47
|
+
this._child = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, c(g, "pluginName", "UNIVER_RPC_NODE_MAIN_PLUGIN"), g);
|
|
51
|
+
u = y([
|
|
52
|
+
a(1, P(v)),
|
|
53
|
+
a(2, C)
|
|
42
54
|
], u);
|
|
43
|
-
var
|
|
44
|
-
let
|
|
45
|
-
constructor(
|
|
46
|
-
super(), this._config =
|
|
47
|
-
const { ...
|
|
55
|
+
var d;
|
|
56
|
+
let m = (d = class extends R {
|
|
57
|
+
constructor(r = p, e, o) {
|
|
58
|
+
super(), this._config = r, this._injector = e, this._configService = o;
|
|
59
|
+
const { ...n } = S(
|
|
48
60
|
{},
|
|
49
|
-
|
|
61
|
+
p,
|
|
50
62
|
this._config
|
|
51
63
|
);
|
|
52
|
-
this._configService.setConfig(
|
|
64
|
+
this._configService.setConfig(L, n);
|
|
53
65
|
}
|
|
54
66
|
onStarting() {
|
|
55
67
|
[
|
|
56
|
-
[
|
|
68
|
+
[_],
|
|
57
69
|
[N, {
|
|
58
70
|
useFactory: () => new I(K())
|
|
59
71
|
}],
|
|
60
72
|
[G, { useClass: x }]
|
|
61
|
-
].forEach((
|
|
73
|
+
].forEach((r) => this._injector.add(r)), this._injector.get(_);
|
|
62
74
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
],
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
return
|
|
75
|
+
}, c(d, "pluginName", "UNIVER_RPC_NODE_WORKER_PLUGIN"), d);
|
|
76
|
+
m = y([
|
|
77
|
+
a(1, P(v)),
|
|
78
|
+
a(2, C)
|
|
79
|
+
], m);
|
|
80
|
+
function A(r, e) {
|
|
81
|
+
const o = r.get(k), n = U(e);
|
|
82
|
+
return n.on("spawn", () => o.log("Child computing process spawned!")), n.on("error", (t) => o.error(t)), [{
|
|
71
83
|
send(t) {
|
|
72
|
-
|
|
84
|
+
n.send(t);
|
|
73
85
|
},
|
|
74
86
|
onMessage: new w((t) => {
|
|
75
|
-
const
|
|
76
|
-
t.next(
|
|
87
|
+
const s = (M) => {
|
|
88
|
+
t.next(M);
|
|
77
89
|
};
|
|
78
|
-
return
|
|
90
|
+
return n.on("message", s), () => n.off("message", s);
|
|
79
91
|
}).pipe(E(1))
|
|
80
|
-
};
|
|
92
|
+
}, n];
|
|
81
93
|
}
|
|
82
94
|
function K() {
|
|
83
95
|
return {
|
|
84
|
-
send(
|
|
85
|
-
|
|
96
|
+
send(r) {
|
|
97
|
+
l.send(r);
|
|
86
98
|
},
|
|
87
|
-
onMessage: new w((
|
|
88
|
-
const
|
|
89
|
-
|
|
99
|
+
onMessage: new w((r) => {
|
|
100
|
+
const e = (o) => {
|
|
101
|
+
r.next(o);
|
|
90
102
|
};
|
|
91
|
-
return
|
|
103
|
+
return l.on("message", e), () => l.off("message", e);
|
|
92
104
|
}).pipe(E(1))
|
|
93
105
|
};
|
|
94
106
|
}
|
|
95
107
|
export {
|
|
96
108
|
u as UniverRPCNodeMainPlugin,
|
|
97
|
-
|
|
109
|
+
m as UniverRPCNodeWorkerPlugin
|
|
98
110
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,98 +1,110 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var j = (r, e, o) => e in r ? O(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o;
|
|
3
|
+
var c = (r, e, o) => j(r, typeof e != "symbol" ? e + "" : e, o);
|
|
4
4
|
import { fork as U } from "node:child_process";
|
|
5
|
-
import
|
|
6
|
-
import { Inject as P, Injector as v, IConfigService as C, Plugin as R, merge as S, ILogService as
|
|
7
|
-
import { IRPCChannelService as N, ChannelService as I, DataSyncPrimaryController as
|
|
5
|
+
import l from "node:process";
|
|
6
|
+
import { Inject as P, Injector as v, IConfigService as C, Plugin as R, merge as S, ILogService as k } from "@univerjs/core";
|
|
7
|
+
import { IRPCChannelService as N, ChannelService as I, DataSyncPrimaryController as h, IRemoteSyncService as D, RemoteSyncPrimaryService as W, DataSyncReplicaController as _, IRemoteInstanceService as G, WebWorkerRemoteInstanceService as x } from "@univerjs/rpc";
|
|
8
8
|
import { Observable as w, shareReplay as E } from "rxjs";
|
|
9
|
-
const
|
|
10
|
-
var
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
13
|
-
return
|
|
14
|
-
},
|
|
15
|
-
let u = (
|
|
16
|
-
constructor(e =
|
|
17
|
-
super()
|
|
18
|
-
|
|
9
|
+
const F = "rpc-node.main-thread.config", f = {}, L = "rpc-node.worker-thread.config", p = {};
|
|
10
|
+
var b = Object.getOwnPropertyDescriptor, y = (r, e, o, n) => {
|
|
11
|
+
for (var i = n > 1 ? void 0 : n ? b(e, o) : e, t = r.length - 1, s; t >= 0; t--)
|
|
12
|
+
(s = r[t]) && (i = s(i) || i);
|
|
13
|
+
return i;
|
|
14
|
+
}, a = (r, e) => (o, n) => e(o, n, r), g;
|
|
15
|
+
let u = (g = class extends R {
|
|
16
|
+
constructor(e = f, o, n) {
|
|
17
|
+
super();
|
|
18
|
+
c(this, "_child", null);
|
|
19
|
+
this._config = e, this._injector = o, this._configService = n;
|
|
20
|
+
const { ...i } = S(
|
|
19
21
|
{},
|
|
20
|
-
|
|
22
|
+
f,
|
|
21
23
|
this._config
|
|
22
24
|
);
|
|
23
|
-
this._configService.setConfig(
|
|
25
|
+
this._configService.setConfig(F, i);
|
|
24
26
|
}
|
|
25
27
|
onStarting() {
|
|
26
28
|
const { workerSrc: e } = this._config;
|
|
27
29
|
if (!e)
|
|
28
30
|
throw new Error("[UniverRPCNodeMainPlugin] workerSrc is required for UniverRPCNodeMainPlugin");
|
|
29
|
-
const
|
|
31
|
+
const [o, n] = A(this._injector, e);
|
|
30
32
|
[
|
|
31
33
|
[N, {
|
|
32
|
-
useFactory: () => new I(
|
|
34
|
+
useFactory: () => new I(o)
|
|
33
35
|
}],
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
].forEach((
|
|
36
|
+
[h],
|
|
37
|
+
[D, { useClass: W }]
|
|
38
|
+
].forEach((t) => this._injector.add(t)), this._injector.get(h), this._child = n;
|
|
37
39
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
dispose() {
|
|
41
|
+
if (super.dispose(), this._child) {
|
|
42
|
+
try {
|
|
43
|
+
this._child.kill();
|
|
44
|
+
} catch (e) {
|
|
45
|
+
console.error("Failed to kill child process:", e);
|
|
46
|
+
}
|
|
47
|
+
this._child = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, c(g, "pluginName", "UNIVER_RPC_NODE_MAIN_PLUGIN"), g);
|
|
51
|
+
u = y([
|
|
52
|
+
a(1, P(v)),
|
|
53
|
+
a(2, C)
|
|
42
54
|
], u);
|
|
43
|
-
var
|
|
44
|
-
let
|
|
45
|
-
constructor(
|
|
46
|
-
super(), this._config =
|
|
47
|
-
const { ...
|
|
55
|
+
var d;
|
|
56
|
+
let m = (d = class extends R {
|
|
57
|
+
constructor(r = p, e, o) {
|
|
58
|
+
super(), this._config = r, this._injector = e, this._configService = o;
|
|
59
|
+
const { ...n } = S(
|
|
48
60
|
{},
|
|
49
|
-
|
|
61
|
+
p,
|
|
50
62
|
this._config
|
|
51
63
|
);
|
|
52
|
-
this._configService.setConfig(
|
|
64
|
+
this._configService.setConfig(L, n);
|
|
53
65
|
}
|
|
54
66
|
onStarting() {
|
|
55
67
|
[
|
|
56
|
-
[
|
|
68
|
+
[_],
|
|
57
69
|
[N, {
|
|
58
70
|
useFactory: () => new I(K())
|
|
59
71
|
}],
|
|
60
72
|
[G, { useClass: x }]
|
|
61
|
-
].forEach((
|
|
73
|
+
].forEach((r) => this._injector.add(r)), this._injector.get(_);
|
|
62
74
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
],
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
return
|
|
75
|
+
}, c(d, "pluginName", "UNIVER_RPC_NODE_WORKER_PLUGIN"), d);
|
|
76
|
+
m = y([
|
|
77
|
+
a(1, P(v)),
|
|
78
|
+
a(2, C)
|
|
79
|
+
], m);
|
|
80
|
+
function A(r, e) {
|
|
81
|
+
const o = r.get(k), n = U(e);
|
|
82
|
+
return n.on("spawn", () => o.log("Child computing process spawned!")), n.on("error", (t) => o.error(t)), [{
|
|
71
83
|
send(t) {
|
|
72
|
-
|
|
84
|
+
n.send(t);
|
|
73
85
|
},
|
|
74
86
|
onMessage: new w((t) => {
|
|
75
|
-
const
|
|
76
|
-
t.next(
|
|
87
|
+
const s = (M) => {
|
|
88
|
+
t.next(M);
|
|
77
89
|
};
|
|
78
|
-
return
|
|
90
|
+
return n.on("message", s), () => n.off("message", s);
|
|
79
91
|
}).pipe(E(1))
|
|
80
|
-
};
|
|
92
|
+
}, n];
|
|
81
93
|
}
|
|
82
94
|
function K() {
|
|
83
95
|
return {
|
|
84
|
-
send(
|
|
85
|
-
|
|
96
|
+
send(r) {
|
|
97
|
+
l.send(r);
|
|
86
98
|
},
|
|
87
|
-
onMessage: new w((
|
|
88
|
-
const
|
|
89
|
-
|
|
99
|
+
onMessage: new w((r) => {
|
|
100
|
+
const e = (o) => {
|
|
101
|
+
r.next(o);
|
|
90
102
|
};
|
|
91
|
-
return
|
|
103
|
+
return l.on("message", e), () => l.off("message", e);
|
|
92
104
|
}).pipe(E(1))
|
|
93
105
|
};
|
|
94
106
|
}
|
|
95
107
|
export {
|
|
96
108
|
u as UniverRPCNodeMainPlugin,
|
|
97
|
-
|
|
109
|
+
m as UniverRPCNodeWorkerPlugin
|
|
98
110
|
};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ export declare class UniverRPCNodeMainPlugin extends Plugin {
|
|
|
5
5
|
protected readonly _injector: Injector;
|
|
6
6
|
private readonly _configService;
|
|
7
7
|
static pluginName: string;
|
|
8
|
+
private _child;
|
|
8
9
|
constructor(_config: Partial<IUniverRPCNodeMainConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
9
10
|
onStarting(): void;
|
|
11
|
+
dispose(): void;
|
|
10
12
|
}
|
|
11
13
|
export declare class UniverRPCNodeWorkerPlugin extends Plugin {
|
|
12
14
|
private readonly _config;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("node:child_process"),require("node:process"),require("@univerjs/core"),require("@univerjs/rpc"),require("rxjs")):typeof define=="function"&&define.amd?define(["exports","node:child_process","node:process","@univerjs/core","@univerjs/rpc","rxjs"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.UniverRpcNode={},e.node_child_process,e.process,e.UniverCore,e.UniverRpc,e.rxjs))})(this,(function(e,o,
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("node:child_process"),require("node:process"),require("@univerjs/core"),require("@univerjs/rpc"),require("rxjs")):typeof define=="function"&&define.amd?define(["exports","node:child_process","node:process","@univerjs/core","@univerjs/rpc","rxjs"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.UniverRpcNode={},e.node_child_process,e.process,e.UniverCore,e.UniverRpc,e.rxjs))})(this,(function(e,o,l,a,s,g){"use strict";var U=Object.defineProperty;var j=(e,o,l)=>o in e?U(e,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[o]=l;var _=(e,o,l)=>j(e,typeof o!="symbol"?o+"":o,l);var f,P;const S="rpc-node.main-thread.config",v={},N="rpc-node.worker-thread.config",C={};var p=Object.getOwnPropertyDescriptor,R=(t,r,n,i)=>{for(var d=i>1?void 0:i?p(r,n):r,c=t.length-1,u;c>=0;c--)(u=t[c])&&(d=u(d)||d);return d},h=(t,r)=>(n,i)=>r(n,i,t);e.UniverRPCNodeMainPlugin=(f=class extends a.Plugin{constructor(n=v,i,d){super();_(this,"_child",null);this._config=n,this._injector=i,this._configService=d;const{...c}=a.merge({},v,this._config);this._configService.setConfig(S,c)}onStarting(){const{workerSrc:n}=this._config;if(!n)throw new Error("[UniverRPCNodeMainPlugin] workerSrc is required for UniverRPCNodeMainPlugin");const[i,d]=m(this._injector,n);[[s.IRPCChannelService,{useFactory:()=>new s.ChannelService(i)}],[s.DataSyncPrimaryController],[s.IRemoteSyncService,{useClass:s.RemoteSyncPrimaryService}]].forEach(u=>this._injector.add(u)),this._injector.get(s.DataSyncPrimaryController),this._child=d}dispose(){if(super.dispose(),this._child){try{this._child.kill()}catch(n){console.error("Failed to kill child process:",n)}this._child=null}}},_(f,"pluginName","UNIVER_RPC_NODE_MAIN_PLUGIN"),f),e.UniverRPCNodeMainPlugin=R([h(1,a.Inject(a.Injector)),h(2,a.IConfigService)],e.UniverRPCNodeMainPlugin),e.UniverRPCNodeWorkerPlugin=(P=class extends a.Plugin{constructor(r=C,n,i){super(),this._config=r,this._injector=n,this._configService=i;const{...d}=a.merge({},C,this._config);this._configService.setConfig(N,d)}onStarting(){[[s.DataSyncReplicaController],[s.IRPCChannelService,{useFactory:()=>new s.ChannelService(I())}],[s.IRemoteInstanceService,{useClass:s.WebWorkerRemoteInstanceService}]].forEach(r=>this._injector.add(r)),this._injector.get(s.DataSyncReplicaController)}},_(P,"pluginName","UNIVER_RPC_NODE_WORKER_PLUGIN"),P),e.UniverRPCNodeWorkerPlugin=R([h(1,a.Inject(a.Injector)),h(2,a.IConfigService)],e.UniverRPCNodeWorkerPlugin);function m(t,r){const n=t.get(a.ILogService),i=o.fork(r);return i.on("spawn",()=>n.log("Child computing process spawned!")),i.on("error",c=>n.error(c)),[{send(c){i.send(c)},onMessage:new g.Observable(c=>{const u=y=>{c.next(y)};return i.on("message",u),()=>i.off("message",u)}).pipe(g.shareReplay(1))},i]}function I(){return{send(t){l.send(t)},onMessage:new g.Observable(t=>{const r=n=>{t.next(n)};return l.on("message",r),()=>l.off("message",r)}).pipe(g.shareReplay(1))}}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/rpc-node",
|
|
3
|
-
"version": "0.12.2-nightly.
|
|
3
|
+
"version": "0.12.2-nightly.202511290732",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"rxjs": ">=7.0.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@univerjs/core": "0.12.2-nightly.
|
|
50
|
-
"@univerjs/rpc": "0.12.2-nightly.
|
|
49
|
+
"@univerjs/core": "0.12.2-nightly.202511290732",
|
|
50
|
+
"@univerjs/rpc": "0.12.2-nightly.202511290732"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"rxjs": "^7.8.2",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
|
-
"vite": "^7.2.
|
|
56
|
-
"vitest": "^
|
|
55
|
+
"vite": "^7.2.4",
|
|
56
|
+
"vitest": "^4.0.14",
|
|
57
57
|
"@univerjs-infra/shared": "0.12.2"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|