@lvce-editor/test-with-playwright 14.3.0 → 14.5.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/main.js +33 -34
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -901,12 +901,12 @@ const getErrorConstructor = (message, type) => {
|
|
|
901
901
|
switch (type) {
|
|
902
902
|
case DomException:
|
|
903
903
|
return DOMException;
|
|
904
|
-
case TypeError$1:
|
|
905
|
-
return TypeError;
|
|
906
|
-
case SyntaxError$1:
|
|
907
|
-
return SyntaxError;
|
|
908
904
|
case ReferenceError$1:
|
|
909
905
|
return ReferenceError;
|
|
906
|
+
case SyntaxError$1:
|
|
907
|
+
return SyntaxError;
|
|
908
|
+
case TypeError$1:
|
|
909
|
+
return TypeError;
|
|
910
910
|
default:
|
|
911
911
|
return Error;
|
|
912
912
|
}
|
|
@@ -1062,27 +1062,27 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
1062
1062
|
if (error && error.code === E_COMMAND_NOT_FOUND) {
|
|
1063
1063
|
return {
|
|
1064
1064
|
code: MethodNotFound,
|
|
1065
|
-
|
|
1066
|
-
|
|
1065
|
+
data: error.stack,
|
|
1066
|
+
message: error.message
|
|
1067
1067
|
};
|
|
1068
1068
|
}
|
|
1069
1069
|
return {
|
|
1070
1070
|
code: Custom,
|
|
1071
|
-
message: prettyError.message,
|
|
1072
1071
|
data: {
|
|
1073
|
-
stack: getStack(prettyError),
|
|
1074
|
-
codeFrame: prettyError.codeFrame,
|
|
1075
|
-
type: getErrorType(prettyError),
|
|
1076
1072
|
code: prettyError.code,
|
|
1077
|
-
|
|
1078
|
-
|
|
1073
|
+
codeFrame: prettyError.codeFrame,
|
|
1074
|
+
name: prettyError.name,
|
|
1075
|
+
stack: getStack(prettyError),
|
|
1076
|
+
type: getErrorType(prettyError)
|
|
1077
|
+
},
|
|
1078
|
+
message: prettyError.message
|
|
1079
1079
|
};
|
|
1080
1080
|
};
|
|
1081
1081
|
const create$1$1 = (id, error) => {
|
|
1082
1082
|
return {
|
|
1083
|
-
|
|
1083
|
+
error,
|
|
1084
1084
|
id,
|
|
1085
|
-
|
|
1085
|
+
jsonrpc: Two$1
|
|
1086
1086
|
};
|
|
1087
1087
|
};
|
|
1088
1088
|
const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
@@ -1093,8 +1093,8 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
1093
1093
|
};
|
|
1094
1094
|
const create$4 = (message, result) => {
|
|
1095
1095
|
return {
|
|
1096
|
-
jsonrpc: Two$1,
|
|
1097
1096
|
id: message.id,
|
|
1097
|
+
jsonrpc: Two$1,
|
|
1098
1098
|
result: result ?? null
|
|
1099
1099
|
};
|
|
1100
1100
|
};
|
|
@@ -1104,14 +1104,14 @@ const getSuccessResponse = (message, result) => {
|
|
|
1104
1104
|
};
|
|
1105
1105
|
const getErrorResponseSimple = (id, error) => {
|
|
1106
1106
|
return {
|
|
1107
|
-
jsonrpc: Two$1,
|
|
1108
|
-
id,
|
|
1109
1107
|
error: {
|
|
1110
1108
|
code: Custom,
|
|
1109
|
+
data: error,
|
|
1111
1110
|
// @ts-ignore
|
|
1112
|
-
message: error.message
|
|
1113
|
-
|
|
1114
|
-
|
|
1111
|
+
message: error.message
|
|
1112
|
+
},
|
|
1113
|
+
id,
|
|
1114
|
+
jsonrpc: Two$1
|
|
1115
1115
|
};
|
|
1116
1116
|
};
|
|
1117
1117
|
const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
|
|
@@ -1141,35 +1141,35 @@ const normalizeParams = args => {
|
|
|
1141
1141
|
if (args.length === 1) {
|
|
1142
1142
|
const options = args[0];
|
|
1143
1143
|
return {
|
|
1144
|
+
execute: options.execute,
|
|
1144
1145
|
ipc: options.ipc,
|
|
1146
|
+
logError: options.logError || defaultLogError,
|
|
1145
1147
|
message: options.message,
|
|
1146
|
-
execute: options.execute,
|
|
1147
|
-
resolve: options.resolve || defaultResolve,
|
|
1148
1148
|
preparePrettyError: options.preparePrettyError || defaultPreparePrettyError,
|
|
1149
|
-
|
|
1150
|
-
|
|
1149
|
+
requiresSocket: options.requiresSocket || defaultRequiresSocket,
|
|
1150
|
+
resolve: options.resolve || defaultResolve
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
1153
|
return {
|
|
1154
|
+
execute: args[2],
|
|
1154
1155
|
ipc: args[0],
|
|
1156
|
+
logError: args[5],
|
|
1155
1157
|
message: args[1],
|
|
1156
|
-
execute: args[2],
|
|
1157
|
-
resolve: args[3],
|
|
1158
1158
|
preparePrettyError: args[4],
|
|
1159
|
-
|
|
1160
|
-
|
|
1159
|
+
requiresSocket: args[6],
|
|
1160
|
+
resolve: args[3]
|
|
1161
1161
|
};
|
|
1162
1162
|
};
|
|
1163
1163
|
const handleJsonRpcMessage = async (...args) => {
|
|
1164
1164
|
const options = normalizeParams(args);
|
|
1165
1165
|
const {
|
|
1166
|
-
message,
|
|
1167
|
-
ipc,
|
|
1168
1166
|
execute,
|
|
1169
|
-
|
|
1170
|
-
preparePrettyError,
|
|
1167
|
+
ipc,
|
|
1171
1168
|
logError,
|
|
1172
|
-
|
|
1169
|
+
message,
|
|
1170
|
+
preparePrettyError,
|
|
1171
|
+
requiresSocket,
|
|
1172
|
+
resolve
|
|
1173
1173
|
} = options;
|
|
1174
1174
|
if ('id' in message) {
|
|
1175
1175
|
if ('method' in message) {
|
|
@@ -1230,7 +1230,6 @@ const registerPromise = map => {
|
|
|
1230
1230
|
};
|
|
1231
1231
|
};
|
|
1232
1232
|
|
|
1233
|
-
// @ts-ignore
|
|
1234
1233
|
const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer) => {
|
|
1235
1234
|
const {
|
|
1236
1235
|
id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/test-with-playwright",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0",
|
|
4
4
|
"description": "CLI tool for running Playwright tests",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"main": "dist/main.js",
|
|
13
13
|
"bin": "bin/test-with-playwright.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@lvce-editor/test-with-playwright-worker": "14.
|
|
16
|
-
"@lvce-editor/test-worker": "^
|
|
15
|
+
"@lvce-editor/test-with-playwright-worker": "14.5.0",
|
|
16
|
+
"@lvce-editor/test-worker": "^13.2.0"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=24"
|