@lvce-editor/about-view 7.39.0 → 7.40.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/aboutWorkerMain.js +46 -30
- package/dist/aboutWorkerMain.js.map +1 -1
- package/package.json +1 -1
package/dist/aboutWorkerMain.js
CHANGED
|
@@ -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);
|
|
@@ -1203,6 +1212,12 @@ const {
|
|
|
1203
1212
|
invokeAndTransfer,
|
|
1204
1213
|
set: set$2
|
|
1205
1214
|
} = create$2(RendererWorker);
|
|
1215
|
+
const initializeRendererWorkerForWorker = async commandMap => {
|
|
1216
|
+
const rpc = await create$3({
|
|
1217
|
+
commandMap
|
|
1218
|
+
});
|
|
1219
|
+
set$2(rpc);
|
|
1220
|
+
};
|
|
1206
1221
|
const getElectronVersion$1 = async () => {
|
|
1207
1222
|
return invoke$1('Process.getElectronVersion');
|
|
1208
1223
|
};
|
|
@@ -1238,6 +1253,23 @@ const openWidget = async name => {
|
|
|
1238
1253
|
const getWindowId$1 = async () => {
|
|
1239
1254
|
return invoke$1('GetWindowId.getWindowId');
|
|
1240
1255
|
};
|
|
1256
|
+
const sendFs = async port => {
|
|
1257
|
+
await sendMessagePortToFileSystemWorker(port, 0);
|
|
1258
|
+
};
|
|
1259
|
+
const initializeFileSystemWorker = async () => {
|
|
1260
|
+
const rpc = await create$4({
|
|
1261
|
+
commandMap: {},
|
|
1262
|
+
send: sendFs
|
|
1263
|
+
});
|
|
1264
|
+
set$4(rpc);
|
|
1265
|
+
};
|
|
1266
|
+
const initializeDialogWorker = async () => {
|
|
1267
|
+
const rpc = await create$4({
|
|
1268
|
+
commandMap: {},
|
|
1269
|
+
send: sendMessagePortToDialogWorker
|
|
1270
|
+
});
|
|
1271
|
+
set$5(rpc);
|
|
1272
|
+
};
|
|
1241
1273
|
|
|
1242
1274
|
const toCommandId = key => {
|
|
1243
1275
|
const dotIndex = key.indexOf('.');
|
|
@@ -1245,6 +1277,7 @@ const toCommandId = key => {
|
|
|
1245
1277
|
};
|
|
1246
1278
|
const create$1 = () => {
|
|
1247
1279
|
const commandQueues = new Map();
|
|
1280
|
+
const instanceIds = Object.create(null);
|
|
1248
1281
|
const generations = Object.create(null);
|
|
1249
1282
|
const states = Object.create(null);
|
|
1250
1283
|
const commandMapRef = Object.create(null);
|
|
@@ -1359,6 +1392,9 @@ const create$1 = () => {
|
|
|
1359
1392
|
},
|
|
1360
1393
|
set(uid, oldState, newState, scheduledState) {
|
|
1361
1394
|
const current = states[uid];
|
|
1395
|
+
if (!current) {
|
|
1396
|
+
instanceIds[uid] = (instanceIds[uid] || 0) + 1;
|
|
1397
|
+
}
|
|
1362
1398
|
if (!current || oldState === newState && newState !== current.newState) {
|
|
1363
1399
|
generations[uid] = getGeneration(uid) + 1;
|
|
1364
1400
|
}
|
|
@@ -1452,8 +1488,9 @@ const create$1 = () => {
|
|
|
1452
1488
|
},
|
|
1453
1489
|
wrapSerialAsyncCommand(fn) {
|
|
1454
1490
|
const wrapped = async (uid, ...args) => {
|
|
1491
|
+
const instanceId = instanceIds[uid];
|
|
1455
1492
|
await enqueueCommand(uid, async () => {
|
|
1456
|
-
if (!states[uid]) {
|
|
1493
|
+
if (!states[uid] || instanceIds[uid] !== instanceId) {
|
|
1457
1494
|
return;
|
|
1458
1495
|
}
|
|
1459
1496
|
const generation = getGeneration(uid);
|
|
@@ -1465,8 +1502,9 @@ const create$1 = () => {
|
|
|
1465
1502
|
},
|
|
1466
1503
|
wrapSerialCommand(fn) {
|
|
1467
1504
|
const wrapped = async (uid, ...args) => {
|
|
1505
|
+
const instanceId = instanceIds[uid];
|
|
1468
1506
|
await enqueueCommand(uid, async () => {
|
|
1469
|
-
if (!states[uid]) {
|
|
1507
|
+
if (!states[uid] || instanceIds[uid] !== instanceId) {
|
|
1470
1508
|
return;
|
|
1471
1509
|
}
|
|
1472
1510
|
const generation = getGeneration(uid);
|
|
@@ -2472,33 +2510,11 @@ const commandMap = {
|
|
|
2472
2510
|
'About.showAboutElectron': showAboutElectron
|
|
2473
2511
|
};
|
|
2474
2512
|
|
|
2475
|
-
const send = async port => {
|
|
2476
|
-
await sendMessagePortToFileSystemWorker(port, 0);
|
|
2477
|
-
};
|
|
2478
|
-
const initializeFileSystemWorker = async () => {
|
|
2479
|
-
const rpc = await create$4({
|
|
2480
|
-
commandMap: {},
|
|
2481
|
-
send
|
|
2482
|
-
});
|
|
2483
|
-
set$4(rpc);
|
|
2484
|
-
};
|
|
2485
|
-
|
|
2486
|
-
const initializeRendererWorker = async () => {
|
|
2487
|
-
const rpc = await create$3({
|
|
2488
|
-
commandMap: commandMap
|
|
2489
|
-
});
|
|
2490
|
-
set$2(rpc);
|
|
2491
|
-
};
|
|
2492
|
-
|
|
2493
2513
|
const listen = async () => {
|
|
2494
2514
|
registerCommands(commandMap);
|
|
2495
|
-
await
|
|
2515
|
+
await initializeRendererWorkerForWorker(commandMap);
|
|
2496
2516
|
await initializeFileSystemWorker();
|
|
2497
|
-
|
|
2498
|
-
commandMap: {},
|
|
2499
|
-
send: sendMessagePortToDialogWorker
|
|
2500
|
-
});
|
|
2501
|
-
set$5(dialogRpc);
|
|
2517
|
+
await initializeDialogWorker();
|
|
2502
2518
|
};
|
|
2503
2519
|
|
|
2504
2520
|
const main = async () => {
|