@lvce-editor/status-bar-worker 3.36.0 → 3.37.0
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/dist/statusBarWorkerMain.js +28 -9
- package/package.json +2 -1
|
@@ -632,9 +632,12 @@ const applyDataProperties = (restoredError, error) => {
|
|
|
632
632
|
writable: true
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
restoredError
|
|
635
|
+
const name = error.data.name || error.data.type;
|
|
636
|
+
if (name) {
|
|
637
|
+
Object.defineProperty(restoredError, 'name', {
|
|
638
|
+
configurable: true,
|
|
639
|
+
value: name
|
|
640
|
+
});
|
|
638
641
|
}
|
|
639
642
|
};
|
|
640
643
|
const applyDirectProperties = (restoredError, error) => {
|
|
@@ -651,7 +654,7 @@ const applyDirectProperties = (restoredError, error) => {
|
|
|
651
654
|
}
|
|
652
655
|
};
|
|
653
656
|
const restoreMessageError = (error, _currentStack) => {
|
|
654
|
-
const restoredError = constructError(error.message, error.type || error.data?.type, error.name);
|
|
657
|
+
const restoredError = constructError(error.message, error.type || error.data?.type, error.name || error.data?.name);
|
|
655
658
|
if (typeof error.code === 'string' || typeof error.code === 'number') {
|
|
656
659
|
Object.defineProperty(restoredError, 'code', {
|
|
657
660
|
configurable: true,
|
|
@@ -861,6 +864,12 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
861
864
|
requiresSocket,
|
|
862
865
|
resolve
|
|
863
866
|
} = options;
|
|
867
|
+
if (message === 'ready') {
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
if (!message || typeof message !== 'object') {
|
|
871
|
+
throw new JsonRpcError('unexpected message');
|
|
872
|
+
}
|
|
864
873
|
if ('id' in message) {
|
|
865
874
|
if ('method' in message) {
|
|
866
875
|
const response = await getResponse(message, ipc, execute, preparePrettyError, logError, requiresSocket);
|
|
@@ -1517,7 +1526,8 @@ const {
|
|
|
1517
1526
|
set: set$4,
|
|
1518
1527
|
wrapCommand,
|
|
1519
1528
|
wrapGetter,
|
|
1520
|
-
wrapSerialAsyncCommand
|
|
1529
|
+
wrapSerialAsyncCommand
|
|
1530
|
+
} = create$1();
|
|
1521
1531
|
|
|
1522
1532
|
const create = (uid, uri, x, y, width, height, platform, assetDir, applicationId) => {
|
|
1523
1533
|
const state = {
|
|
@@ -2188,9 +2198,15 @@ const getStatusBarItemContextMenuItems = async (extensionId, providerId, applica
|
|
|
2188
2198
|
const StatusBar = 31;
|
|
2189
2199
|
|
|
2190
2200
|
const handleContextMenu = async (state, button, x, y, targetName = '') => {
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2193
|
-
|
|
2201
|
+
const {
|
|
2202
|
+
applicationId,
|
|
2203
|
+
statusBarItemsLeft,
|
|
2204
|
+
statusBarItemsRight,
|
|
2205
|
+
uid
|
|
2206
|
+
} = state;
|
|
2207
|
+
const item = [...statusBarItemsLeft, ...statusBarItemsRight].find(statusBarItem => statusBarItem.name === targetName);
|
|
2208
|
+
const contextMenuItems = item?.extensionId && item.providerId ? await getStatusBarItemContextMenuItems(item.extensionId, item.providerId, applicationId) : [];
|
|
2209
|
+
await show2(uid, StatusBar, x, y, {
|
|
2194
2210
|
contextMenuItems,
|
|
2195
2211
|
menuId: StatusBar
|
|
2196
2212
|
});
|
|
@@ -3172,9 +3188,12 @@ const updateArray = (items, newItem) => {
|
|
|
3172
3188
|
};
|
|
3173
3189
|
|
|
3174
3190
|
const itemLeftUpdate = (state, newItem) => {
|
|
3191
|
+
const {
|
|
3192
|
+
statusBarItemsLeft
|
|
3193
|
+
} = state;
|
|
3175
3194
|
return {
|
|
3176
3195
|
...state,
|
|
3177
|
-
statusBarItemsLeft: updateArray([...
|
|
3196
|
+
statusBarItemsLeft: updateArray([...statusBarItemsLeft], newItem)
|
|
3178
3197
|
};
|
|
3179
3198
|
};
|
|
3180
3199
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/status-bar-worker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.37.0",
|
|
4
4
|
"description": "Status Bar Worker",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"main": "dist/statusBarWorkerMain.js",
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@lvce-editor/constants": "^5.31.1",
|
|
14
15
|
"@lvce-editor/i18n": "^2.10.0"
|
|
15
16
|
}
|
|
16
17
|
}
|