qraftai-runner 0.2.0 → 0.3.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/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ import { execFile } from "node:child_process";
|
|
|
68
68
|
import { promisify } from "node:util";
|
|
69
69
|
var pexec = promisify(execFile);
|
|
70
70
|
var DEFAULT_NEW_COMMAND_TIMEOUT = parseInt(process.env.APPIUM_CMD_TIMEOUT || "120");
|
|
71
|
+
var STUDIO_CMD_TIMEOUT = parseInt(process.env.STUDIO_APPIUM_CMD_TIMEOUT || "3600");
|
|
71
72
|
var MJPEG_PORT = parseInt(process.env.MOBILE_MJPEG_PORT || "9100");
|
|
72
73
|
async function listIosSimulators() {
|
|
73
74
|
try {
|
|
@@ -1179,11 +1180,12 @@ function sendMsg(type, payload = {}, reqId) {
|
|
|
1179
1180
|
var ok = (reqId, result) => sendMsg("RESULT", { result }, reqId);
|
|
1180
1181
|
var err = (reqId, message) => sendMsg("ERROR", { message }, reqId);
|
|
1181
1182
|
var HANDLERS = {
|
|
1182
|
-
async OPEN_SESSION({ sessionId, device, kind = "avd", platform = "android", app }) {
|
|
1183
|
+
async OPEN_SESSION({ sessionId, device, kind = "avd", platform = "android", app, studio = false }) {
|
|
1183
1184
|
if (sessions.has(sessionId)) return { platform: sessions.get(sessionId).platform };
|
|
1184
1185
|
const resolvedApp = await resolveApp(app);
|
|
1185
1186
|
const { host, port } = await ensureAppium();
|
|
1186
|
-
const
|
|
1187
|
+
const overrides = studio ? { "appium:newCommandTimeout": STUDIO_CMD_TIMEOUT } : {};
|
|
1188
|
+
const capabilities = buildCapabilities(device, resolvedApp, kind, overrides, platform);
|
|
1187
1189
|
const driver = new AppiumDriver({
|
|
1188
1190
|
capabilities,
|
|
1189
1191
|
connection: { protocol: "http", hostname: host, port, path: "/" }
|