@lvce-editor/test-worker 1.5.0 → 1.6.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 +18 -13
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -1277,7 +1277,7 @@ const getIsFirefox = () => {
|
|
|
1277
1277
|
const isFirefox$1 = getIsFirefox();
|
|
1278
1278
|
|
|
1279
1279
|
const getNodePath$1 = () => {
|
|
1280
|
-
return invoke(
|
|
1280
|
+
return invoke(/* Platform.getNodePath */'Platform.getNodePath');
|
|
1281
1281
|
};
|
|
1282
1282
|
|
|
1283
1283
|
const getNodePath = () => {
|
|
@@ -1799,6 +1799,18 @@ const joinLines = lines => {
|
|
|
1799
1799
|
const splitLines = lines => {
|
|
1800
1800
|
return lines.split(NewLine$1);
|
|
1801
1801
|
};
|
|
1802
|
+
const isModuleNotFoundMessage = line => {
|
|
1803
|
+
return line.includes('[ERR_MODULE_NOT_FOUND]');
|
|
1804
|
+
};
|
|
1805
|
+
const getModuleNotFoundError = stderr => {
|
|
1806
|
+
const lines = splitLines(stderr);
|
|
1807
|
+
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
1808
|
+
const message = lines[messageIndex];
|
|
1809
|
+
return {
|
|
1810
|
+
message,
|
|
1811
|
+
code: ERR_MODULE_NOT_FOUND
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1802
1814
|
const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
|
|
1803
1815
|
const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
|
|
1804
1816
|
const RE_MESSAGE_CODE_BLOCK_START = /^Error: The module '.*'$/;
|
|
@@ -1847,18 +1859,6 @@ const isModuleNotFoundError = stderr => {
|
|
|
1847
1859
|
}
|
|
1848
1860
|
return stderr.includes('ERR_MODULE_NOT_FOUND');
|
|
1849
1861
|
};
|
|
1850
|
-
const isModuleNotFoundMessage = line => {
|
|
1851
|
-
return line.includes('ERR_MODULE_NOT_FOUND');
|
|
1852
|
-
};
|
|
1853
|
-
const getModuleNotFoundError = stderr => {
|
|
1854
|
-
const lines = splitLines(stderr);
|
|
1855
|
-
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
1856
|
-
const message = lines[messageIndex];
|
|
1857
|
-
return {
|
|
1858
|
-
message,
|
|
1859
|
-
code: ERR_MODULE_NOT_FOUND
|
|
1860
|
-
};
|
|
1861
|
-
};
|
|
1862
1862
|
const isNormalStackLine = line => {
|
|
1863
1863
|
return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
|
|
1864
1864
|
};
|
|
@@ -2015,6 +2015,11 @@ const listen$3 = async () => {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
const type = firstMessage.params[0];
|
|
2017
2017
|
if (type === 'message-port') {
|
|
2018
|
+
parentIpc.send({
|
|
2019
|
+
jsonrpc: '2.0',
|
|
2020
|
+
id: firstMessage.id,
|
|
2021
|
+
result: null
|
|
2022
|
+
});
|
|
2018
2023
|
parentIpc.dispose();
|
|
2019
2024
|
const port = firstMessage.params[1];
|
|
2020
2025
|
return port;
|