@midscene/android 0.17.5-beta-20250530085206.0 → 0.17.5
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/es/index.js +6 -11
- package/dist/lib/index.js +5 -6
- package/package.json +4 -4
package/dist/es/index.js
CHANGED
|
@@ -4,11 +4,7 @@ import fs from "fs";
|
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { getAIConfig } from "@midscene/core";
|
|
6
6
|
import { getTmpFile, sleep } from "@midscene/core/utils";
|
|
7
|
-
import {
|
|
8
|
-
MIDSCENE_ADB_PATH,
|
|
9
|
-
MIDSCENE_ADB_REMOTE_HOST,
|
|
10
|
-
MIDSCENE_ADB_REMOTE_PORT
|
|
11
|
-
} from "@midscene/shared/env";
|
|
7
|
+
import { MIDSCENE_ADB_PATH } from "@midscene/shared/env";
|
|
12
8
|
import { isValidPNGImageBuffer, resizeImg } from "@midscene/shared/img";
|
|
13
9
|
import { getDebug } from "@midscene/shared/logger";
|
|
14
10
|
import { repeat } from "@midscene/shared/utils";
|
|
@@ -44,14 +40,13 @@ var AndroidDevice = class {
|
|
|
44
40
|
debugPage(`Initializing ADB with device ID: ${this.deviceId}`);
|
|
45
41
|
try {
|
|
46
42
|
const androidAdbPath = getAIConfig(MIDSCENE_ADB_PATH);
|
|
47
|
-
|
|
48
|
-
const remoteAdbPort = getAIConfig(MIDSCENE_ADB_REMOTE_PORT);
|
|
49
|
-
this.adb = await new ADB({
|
|
43
|
+
this.adb = androidAdbPath ? await new ADB({
|
|
50
44
|
udid: this.deviceId,
|
|
51
45
|
adbExecTimeout: 6e4,
|
|
52
|
-
executable:
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
executable: { path: androidAdbPath, defaultArgs: [] }
|
|
47
|
+
}) : await ADB.createADB({
|
|
48
|
+
udid: this.deviceId,
|
|
49
|
+
adbExecTimeout: 6e4
|
|
55
50
|
});
|
|
56
51
|
const size = await this.getScreenSize();
|
|
57
52
|
console.log(`
|
package/dist/lib/index.js
CHANGED
|
@@ -80,14 +80,13 @@ var AndroidDevice = class {
|
|
|
80
80
|
debugPage(`Initializing ADB with device ID: ${this.deviceId}`);
|
|
81
81
|
try {
|
|
82
82
|
const androidAdbPath = (0, import_core.getAIConfig)(import_env.MIDSCENE_ADB_PATH);
|
|
83
|
-
|
|
84
|
-
const remoteAdbPort = (0, import_core.getAIConfig)(import_env.MIDSCENE_ADB_REMOTE_PORT);
|
|
85
|
-
this.adb = await new import_appium_adb.ADB({
|
|
83
|
+
this.adb = androidAdbPath ? await new import_appium_adb.ADB({
|
|
86
84
|
udid: this.deviceId,
|
|
87
85
|
adbExecTimeout: 6e4,
|
|
88
|
-
executable:
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
executable: { path: androidAdbPath, defaultArgs: [] }
|
|
87
|
+
}) : await import_appium_adb.ADB.createADB({
|
|
88
|
+
udid: this.deviceId,
|
|
89
|
+
adbExecTimeout: 6e4
|
|
91
90
|
});
|
|
92
91
|
const size = await this.getScreenSize();
|
|
93
92
|
console.log(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/android",
|
|
3
|
-
"version": "0.17.5
|
|
3
|
+
"version": "0.17.5",
|
|
4
4
|
"description": "Android automation library for Midscene",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Android UI automation",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"appium-adb": "12.12.1",
|
|
27
|
-
"@midscene/core": "0.17.5
|
|
28
|
-
"@midscene/shared": "0.17.5
|
|
29
|
-
"@midscene/web": "0.17.5
|
|
27
|
+
"@midscene/core": "0.17.5",
|
|
28
|
+
"@midscene/shared": "0.17.5",
|
|
29
|
+
"@midscene/web": "0.17.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@modern-js/module-tools": "2.60.6",
|