@lvce-editor/editor-worker 5.19.0 → 5.20.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/editorWorkerMain.js +3 -14
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -1482,7 +1482,7 @@ const sendMessagePortToExtensionHostWorker = async port => {
|
|
|
1482
1482
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, 'HandleMessagePort.handleMessagePort');
|
|
1483
1483
|
};
|
|
1484
1484
|
|
|
1485
|
-
const withResolvers
|
|
1485
|
+
const withResolvers = () => {
|
|
1486
1486
|
let _resolve;
|
|
1487
1487
|
const promise = new Promise(resolve => {
|
|
1488
1488
|
_resolve = resolve;
|
|
@@ -1497,7 +1497,7 @@ const waitForFirstMessage$1 = async port => {
|
|
|
1497
1497
|
const {
|
|
1498
1498
|
resolve,
|
|
1499
1499
|
promise
|
|
1500
|
-
} = withResolvers
|
|
1500
|
+
} = withResolvers();
|
|
1501
1501
|
const cleanup = value => {
|
|
1502
1502
|
port.onmessage = null;
|
|
1503
1503
|
resolve(value);
|
|
@@ -10535,22 +10535,11 @@ const IpcChildWithModuleWorker$1 = {
|
|
|
10535
10535
|
signal: signal$8,
|
|
10536
10536
|
wrap: wrap$f
|
|
10537
10537
|
};
|
|
10538
|
-
const withResolvers = () => {
|
|
10539
|
-
let _resolve;
|
|
10540
|
-
const promise = new Promise(resolve => {
|
|
10541
|
-
_resolve = resolve;
|
|
10542
|
-
});
|
|
10543
|
-
return {
|
|
10544
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10545
|
-
resolve: _resolve,
|
|
10546
|
-
promise
|
|
10547
|
-
};
|
|
10548
|
-
};
|
|
10549
10538
|
const waitForFirstMessage = async port => {
|
|
10550
10539
|
const {
|
|
10551
10540
|
resolve,
|
|
10552
10541
|
promise
|
|
10553
|
-
} = withResolvers();
|
|
10542
|
+
} = Promise.withResolvers();
|
|
10554
10543
|
port.addEventListener('message', resolve, {
|
|
10555
10544
|
once: true
|
|
10556
10545
|
});
|