@lvce-editor/test-worker 2.1.0 → 2.2.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/testWorkerMain.js +10 -10
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -308,14 +308,14 @@ const readyMessage = 'ready';
|
|
|
308
308
|
const getData$2 = event => {
|
|
309
309
|
return event.data;
|
|
310
310
|
};
|
|
311
|
-
const listen$
|
|
311
|
+
const listen$7 = () => {
|
|
312
312
|
// @ts-ignore
|
|
313
313
|
if (typeof WorkerGlobalScope === 'undefined') {
|
|
314
314
|
throw new TypeError('module is not in web worker scope');
|
|
315
315
|
}
|
|
316
316
|
return globalThis;
|
|
317
317
|
};
|
|
318
|
-
const signal$
|
|
318
|
+
const signal$7 = global => {
|
|
319
319
|
global.postMessage(readyMessage);
|
|
320
320
|
};
|
|
321
321
|
class IpcChildWithModuleWorker extends Ipc {
|
|
@@ -341,7 +341,7 @@ class IpcChildWithModuleWorker extends Ipc {
|
|
|
341
341
|
this._rawIpc.addEventListener('message', callback);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
const wrap$
|
|
344
|
+
const wrap$e = global => {
|
|
345
345
|
return new IpcChildWithModuleWorker(global);
|
|
346
346
|
};
|
|
347
347
|
const withResolvers = () => {
|
|
@@ -366,10 +366,10 @@ const waitForFirstMessage = async port => {
|
|
|
366
366
|
// @ts-ignore
|
|
367
367
|
return event.data;
|
|
368
368
|
};
|
|
369
|
-
const listen$
|
|
370
|
-
const parentIpcRaw = listen$
|
|
371
|
-
signal$
|
|
372
|
-
const parentIpc = wrap$
|
|
369
|
+
const listen$6 = async () => {
|
|
370
|
+
const parentIpcRaw = listen$7();
|
|
371
|
+
signal$7(parentIpcRaw);
|
|
372
|
+
const parentIpc = wrap$e(parentIpcRaw);
|
|
373
373
|
const firstMessage = await waitForFirstMessage(parentIpc);
|
|
374
374
|
if (firstMessage.method !== 'initialize') {
|
|
375
375
|
throw new IpcError('unexpected first message');
|
|
@@ -414,13 +414,13 @@ class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
|
|
|
414
414
|
this._rawIpc.start();
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
const wrap$
|
|
417
|
+
const wrap$d = port => {
|
|
418
418
|
return new IpcChildWithModuleWorkerAndMessagePort(port);
|
|
419
419
|
};
|
|
420
420
|
const IpcChildWithModuleWorkerAndMessagePort$1 = {
|
|
421
421
|
__proto__: null,
|
|
422
|
-
listen: listen$
|
|
423
|
-
wrap: wrap$
|
|
422
|
+
listen: listen$6,
|
|
423
|
+
wrap: wrap$d
|
|
424
424
|
};
|
|
425
425
|
|
|
426
426
|
const Two = '2.0';
|