@lvce-editor/explorer-view 5.11.0 → 5.12.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/explorerViewWorkerMain.js +23 -22
- package/package.json +1 -1
|
@@ -243,8 +243,8 @@ const getModuleNotFoundError = stderr => {
|
|
|
243
243
|
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
244
244
|
const message = lines[messageIndex];
|
|
245
245
|
return {
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
code: ERR_MODULE_NOT_FOUND,
|
|
247
|
+
message
|
|
248
248
|
};
|
|
249
249
|
};
|
|
250
250
|
const isModuleNotFoundError = stderr => {
|
|
@@ -267,14 +267,14 @@ const isUnhelpfulNativeModuleError = stderr => {
|
|
|
267
267
|
const getNativeModuleErrorMessage = stderr => {
|
|
268
268
|
const message = getMessageCodeBlock(stderr);
|
|
269
269
|
return {
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
code: E_INCOMPATIBLE_NATIVE_MODULE,
|
|
271
|
+
message: `Incompatible native node module: ${message}`
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
274
|
const getModuleSyntaxError = () => {
|
|
275
275
|
return {
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON,
|
|
277
|
+
message: `ES Modules are not supported in electron`
|
|
278
278
|
};
|
|
279
279
|
};
|
|
280
280
|
const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
@@ -293,8 +293,8 @@ const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
|
293
293
|
rest
|
|
294
294
|
} = getDetails(lines);
|
|
295
295
|
return {
|
|
296
|
-
message: actualMessage,
|
|
297
296
|
code: '',
|
|
297
|
+
message: actualMessage,
|
|
298
298
|
stack: rest
|
|
299
299
|
};
|
|
300
300
|
};
|
|
@@ -304,8 +304,8 @@ class IpcError extends VError {
|
|
|
304
304
|
if (stdout || stderr) {
|
|
305
305
|
// @ts-ignore
|
|
306
306
|
const {
|
|
307
|
-
message,
|
|
308
307
|
code,
|
|
308
|
+
message,
|
|
309
309
|
stack
|
|
310
310
|
} = getHelpfulChildProcessError(stdout, stderr);
|
|
311
311
|
const cause = new Error(message);
|
|
@@ -366,8 +366,8 @@ const wrap$f = global => {
|
|
|
366
366
|
};
|
|
367
367
|
const waitForFirstMessage = async port => {
|
|
368
368
|
const {
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
promise,
|
|
370
|
+
resolve
|
|
371
371
|
} = Promise.withResolvers();
|
|
372
372
|
port.addEventListener('message', resolve, {
|
|
373
373
|
once: true
|
|
@@ -387,8 +387,8 @@ const listen$6 = async () => {
|
|
|
387
387
|
const type = firstMessage.params[0];
|
|
388
388
|
if (type === 'message-port') {
|
|
389
389
|
parentIpc.send({
|
|
390
|
-
jsonrpc: '2.0',
|
|
391
390
|
id: firstMessage.id,
|
|
391
|
+
jsonrpc: '2.0',
|
|
392
392
|
result: null
|
|
393
393
|
});
|
|
394
394
|
parentIpc.dispose();
|
|
@@ -445,8 +445,8 @@ const removeListener = (emitter, type, callback) => {
|
|
|
445
445
|
};
|
|
446
446
|
const getFirstEvent = (eventEmitter, eventMap) => {
|
|
447
447
|
const {
|
|
448
|
-
|
|
449
|
-
|
|
448
|
+
promise,
|
|
449
|
+
resolve
|
|
450
450
|
} = Promise.withResolvers();
|
|
451
451
|
const listenerMap = Object.create(null);
|
|
452
452
|
const cleanup = value => {
|
|
@@ -458,8 +458,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
458
458
|
for (const [event, type] of Object.entries(eventMap)) {
|
|
459
459
|
const listener = event => {
|
|
460
460
|
cleanup({
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
event,
|
|
462
|
+
type
|
|
463
463
|
});
|
|
464
464
|
};
|
|
465
465
|
addListener(eventEmitter, event, listener);
|
|
@@ -469,8 +469,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
469
469
|
};
|
|
470
470
|
const Message$1 = 3;
|
|
471
471
|
const create$5$1 = async ({
|
|
472
|
-
|
|
473
|
-
|
|
472
|
+
isMessagePortOpen,
|
|
473
|
+
messagePort
|
|
474
474
|
}) => {
|
|
475
475
|
if (!isMessagePort(messagePort)) {
|
|
476
476
|
throw new IpcError('port must be of type MessagePort');
|
|
@@ -483,8 +483,8 @@ const create$5$1 = async ({
|
|
|
483
483
|
});
|
|
484
484
|
messagePort.start();
|
|
485
485
|
const {
|
|
486
|
-
|
|
487
|
-
|
|
486
|
+
event,
|
|
487
|
+
type
|
|
488
488
|
} = await eventPromise;
|
|
489
489
|
if (type !== Message$1) {
|
|
490
490
|
throw new IpcError('Failed to wait for ipc message');
|
|
@@ -2628,8 +2628,9 @@ const ListItem = 22;
|
|
|
2628
2628
|
const Slash = '/';
|
|
2629
2629
|
|
|
2630
2630
|
// TODO parentUid might ot be needed
|
|
2631
|
-
const create = (id, uri, x, y, width, height, args, parentUid, platform = 0) => {
|
|
2631
|
+
const create = (id, uri, x, y, width, height, args, parentUid, platform = 0, assetDir = '') => {
|
|
2632
2632
|
const state = {
|
|
2633
|
+
assetDir,
|
|
2633
2634
|
confirmDelete: false,
|
|
2634
2635
|
confirmPaste: false,
|
|
2635
2636
|
cutItems: [],
|
|
@@ -2688,8 +2689,8 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0) =>
|
|
|
2688
2689
|
};
|
|
2689
2690
|
|
|
2690
2691
|
// TODO parentUid might ot be needed
|
|
2691
|
-
const create2 = (uid, uri, x, y, width, height, args, parentUid, platform = 0) => {
|
|
2692
|
-
return create(uid, uri, x, y, width, height, args, parentUid, platform);
|
|
2692
|
+
const create2 = (uid, uri, x, y, width, height, args, parentUid, platform = 0, assetDir = '') => {
|
|
2693
|
+
return create(uid, uri, x, y, width, height, args, parentUid, platform, assetDir);
|
|
2693
2694
|
};
|
|
2694
2695
|
|
|
2695
2696
|
const isEqual$6 = (oldState, newState) => {
|