@lvce-editor/source-control-worker 3.15.0 → 3.16.1
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.
|
@@ -3386,7 +3386,7 @@ const set = rpc => {
|
|
|
3386
3386
|
state.connected = true;
|
|
3387
3387
|
};
|
|
3388
3388
|
|
|
3389
|
-
const handleRendererProcessMessagePort = async (port, viewletCommandMap) => {
|
|
3389
|
+
const handleRendererProcessMessagePort = async (port, viewletCommandMap, setAsRendererProcess = true) => {
|
|
3390
3390
|
const executeViewletCommand = async (uid, command, ...args) => {
|
|
3391
3391
|
const fn = viewletCommandMap[`SourceControl.${command}`];
|
|
3392
3392
|
if (typeof fn !== 'function') {
|
|
@@ -3401,7 +3401,9 @@ const handleRendererProcessMessagePort = async (port, viewletCommandMap) => {
|
|
|
3401
3401
|
},
|
|
3402
3402
|
messagePort: port
|
|
3403
3403
|
});
|
|
3404
|
-
|
|
3404
|
+
if (setAsRendererProcess) {
|
|
3405
|
+
set(rpc);
|
|
3406
|
+
}
|
|
3405
3407
|
};
|
|
3406
3408
|
|
|
3407
3409
|
const handleScrollBarCaptureLost = state => {
|
|
@@ -4038,6 +4040,9 @@ const renderItems = (oldState, newState) => {
|
|
|
4038
4040
|
};
|
|
4039
4041
|
|
|
4040
4042
|
const renderIncremental = (oldState, newState) => {
|
|
4043
|
+
if (oldState.loading !== newState.loading || oldState.workspacePath !== newState.workspacePath) {
|
|
4044
|
+
return renderItems(oldState, newState);
|
|
4045
|
+
}
|
|
4041
4046
|
const oldDom = renderItems(oldState, oldState)[2];
|
|
4042
4047
|
const newDom = renderItems(newState, newState)[2];
|
|
4043
4048
|
const patches = diffTree(oldDom, newDom);
|
|
@@ -4309,7 +4314,7 @@ const viewAsList = state => {
|
|
|
4309
4314
|
};
|
|
4310
4315
|
};
|
|
4311
4316
|
|
|
4312
|
-
const handleDirectMessagePort = port => handleRendererProcessMessagePort(port, commandMap);
|
|
4317
|
+
const handleDirectMessagePort = (port, setAsRendererProcess = true) => handleRendererProcessMessagePort(port, commandMap, setAsRendererProcess);
|
|
4313
4318
|
const commandMap = {
|
|
4314
4319
|
'Initialize.initialize': initialize,
|
|
4315
4320
|
'SourceControl.acceptInput': wrapCommand(acceptInput),
|