@lvce-editor/ipc 10.0.4 → 10.1.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/browser.js +13 -12
- package/dist/electron.js +13 -12
- package/dist/index.js +13 -12
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -143,6 +143,19 @@ const splitLines = lines => {
|
|
|
143
143
|
return lines.split(NewLine$1);
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
+
const isModuleNotFoundMessage = line => {
|
|
147
|
+
return line.includes('[ERR_MODULE_NOT_FOUND]');
|
|
148
|
+
};
|
|
149
|
+
const getModuleNotFoundError = stderr => {
|
|
150
|
+
const lines = splitLines(stderr);
|
|
151
|
+
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
152
|
+
const message = lines[messageIndex];
|
|
153
|
+
return {
|
|
154
|
+
message,
|
|
155
|
+
code: ERR_MODULE_NOT_FOUND
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
|
|
146
159
|
const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
|
|
147
160
|
const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
|
|
148
161
|
const RE_MESSAGE_CODE_BLOCK_START = /^Error: The module '.*'$/;
|
|
@@ -191,18 +204,6 @@ const isModuleNotFoundError = stderr => {
|
|
|
191
204
|
}
|
|
192
205
|
return stderr.includes('ERR_MODULE_NOT_FOUND');
|
|
193
206
|
};
|
|
194
|
-
const isModuleNotFoundMessage = line => {
|
|
195
|
-
return line.includes('ERR_MODULE_NOT_FOUND');
|
|
196
|
-
};
|
|
197
|
-
const getModuleNotFoundError = stderr => {
|
|
198
|
-
const lines = splitLines(stderr);
|
|
199
|
-
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
200
|
-
const message = lines[messageIndex];
|
|
201
|
-
return {
|
|
202
|
-
message,
|
|
203
|
-
code: ERR_MODULE_NOT_FOUND
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
207
|
const isNormalStackLine = line => {
|
|
207
208
|
return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
|
|
208
209
|
};
|
package/dist/electron.js
CHANGED
|
@@ -249,6 +249,19 @@ const splitLines = lines => {
|
|
|
249
249
|
return lines.split(NewLine$1);
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
+
const isModuleNotFoundMessage = line => {
|
|
253
|
+
return line.includes('[ERR_MODULE_NOT_FOUND]');
|
|
254
|
+
};
|
|
255
|
+
const getModuleNotFoundError = stderr => {
|
|
256
|
+
const lines = splitLines(stderr);
|
|
257
|
+
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
258
|
+
const message = lines[messageIndex];
|
|
259
|
+
return {
|
|
260
|
+
message,
|
|
261
|
+
code: ERR_MODULE_NOT_FOUND
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
|
|
252
265
|
const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
|
|
253
266
|
const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
|
|
254
267
|
const RE_MESSAGE_CODE_BLOCK_START = /^Error: The module '.*'$/;
|
|
@@ -297,18 +310,6 @@ const isModuleNotFoundError = stderr => {
|
|
|
297
310
|
}
|
|
298
311
|
return stderr.includes('ERR_MODULE_NOT_FOUND');
|
|
299
312
|
};
|
|
300
|
-
const isModuleNotFoundMessage = line => {
|
|
301
|
-
return line.includes('ERR_MODULE_NOT_FOUND');
|
|
302
|
-
};
|
|
303
|
-
const getModuleNotFoundError = stderr => {
|
|
304
|
-
const lines = splitLines(stderr);
|
|
305
|
-
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
306
|
-
const message = lines[messageIndex];
|
|
307
|
-
return {
|
|
308
|
-
message,
|
|
309
|
-
code: ERR_MODULE_NOT_FOUND
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
313
|
const isNormalStackLine = line => {
|
|
313
314
|
return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
|
|
314
315
|
};
|
package/dist/index.js
CHANGED
|
@@ -133,6 +133,19 @@ const splitLines = lines => {
|
|
|
133
133
|
return lines.split(NewLine);
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
+
const isModuleNotFoundMessage = line => {
|
|
137
|
+
return line.includes('[ERR_MODULE_NOT_FOUND]');
|
|
138
|
+
};
|
|
139
|
+
const getModuleNotFoundError = stderr => {
|
|
140
|
+
const lines = splitLines(stderr);
|
|
141
|
+
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
142
|
+
const message = lines[messageIndex];
|
|
143
|
+
return {
|
|
144
|
+
message,
|
|
145
|
+
code: ERR_MODULE_NOT_FOUND
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
|
|
136
149
|
const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
|
|
137
150
|
const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
|
|
138
151
|
const RE_MESSAGE_CODE_BLOCK_START = /^Error: The module '.*'$/;
|
|
@@ -181,18 +194,6 @@ const isModuleNotFoundError = stderr => {
|
|
|
181
194
|
}
|
|
182
195
|
return stderr.includes('ERR_MODULE_NOT_FOUND');
|
|
183
196
|
};
|
|
184
|
-
const isModuleNotFoundMessage = line => {
|
|
185
|
-
return line.includes('ERR_MODULE_NOT_FOUND');
|
|
186
|
-
};
|
|
187
|
-
const getModuleNotFoundError = stderr => {
|
|
188
|
-
const lines = splitLines(stderr);
|
|
189
|
-
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
190
|
-
const message = lines[messageIndex];
|
|
191
|
-
return {
|
|
192
|
-
message,
|
|
193
|
-
code: ERR_MODULE_NOT_FOUND
|
|
194
|
-
};
|
|
195
|
-
};
|
|
196
197
|
const isNormalStackLine = line => {
|
|
197
198
|
return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
|
|
198
199
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/ipc",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "Inter Process Communication for Lvce Editor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/lvce-editor/ipc.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lvce-editor/assert": "^1.
|
|
17
|
+
"@lvce-editor/assert": "^1.3.0",
|
|
18
18
|
"@lvce-editor/verror": "^1.4.0",
|
|
19
19
|
"@lvce-editor/web-socket-server": "^1.3.0"
|
|
20
20
|
},
|