@midscene/android 1.18.1 → 1.18.2-beta-20261119143629.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/README.md +1 -1
- package/dist/es/430.mjs +4 -4
- package/dist/es/cli.mjs +1 -1
- package/dist/lib/cli.js +4 -4
- package/dist/lib/index.js +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/es/430.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { execFile as external_node_child_process_execFile } from "node:child_pro
|
|
|
3
3
|
import node_fs, { existsSync, unlink } from "node:fs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import node_path from "node:path";
|
|
6
|
-
import { createReportCliCommands, getMidsceneLocationSchema, z } from "@midscene/core";
|
|
6
|
+
import { createReportCliCommands, getMidsceneDistanceSchema, getMidsceneLocationSchema, z } from "@midscene/core";
|
|
7
7
|
import { createDefaultMobileActions, defineAction, resolveDefaultMobileScroll, resolveTextInputOptions, sendTextSequentially, shouldInputSequentially } from "@midscene/core/device";
|
|
8
8
|
import { getTmpFile, sleep } from "@midscene/core/utils";
|
|
9
9
|
import { MIDSCENE_ADB_PATH, MIDSCENE_ADB_REMOTE_HOST, MIDSCENE_ADB_REMOTE_PORT, MIDSCENE_ANDROID_IME_STRATEGY, MIDSCENE_ANDROID_SCREENSHOT_STRATEGY, globalConfigManager, overrideAIConfig } from "@midscene/shared/env";
|
|
@@ -1742,7 +1742,7 @@ class AndroidDevice {
|
|
|
1742
1742
|
'up',
|
|
1743
1743
|
'down'
|
|
1744
1744
|
]).describe('The direction to pull'),
|
|
1745
|
-
distance:
|
|
1745
|
+
distance: getMidsceneDistanceSchema().optional().describe('The distance to pull (in pixels)'),
|
|
1746
1746
|
duration: z.number().optional().describe('The duration of the pull (in milliseconds)'),
|
|
1747
1747
|
locate: getMidsceneLocationSchema().optional().describe('The element to start the pull from (optional)')
|
|
1748
1748
|
}),
|
|
@@ -1875,7 +1875,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1875
1875
|
const deviceId = this.deviceId;
|
|
1876
1876
|
const adbExecutable = target.executable.path;
|
|
1877
1877
|
debugDevice(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}): ${error}`);
|
|
1878
|
-
throw new Error(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}), please check https://midscenejs.com/
|
|
1878
|
+
throw new Error(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}), please check https://www.midscenejs.com/platforms/android#faq : ${error.message}`, {
|
|
1879
1879
|
cause: error
|
|
1880
1880
|
});
|
|
1881
1881
|
}
|
|
@@ -3235,7 +3235,7 @@ async function getConnectedDevices(deviceOptions) {
|
|
|
3235
3235
|
} catch (error) {
|
|
3236
3236
|
console.error('Failed to get device list:', error);
|
|
3237
3237
|
const adbExecutableContext = adbExecutable ? ` (ADB executable: ${adbExecutable})` : '';
|
|
3238
|
-
throw new Error(`Unable to get connected Android device list${adbExecutableContext}, please check https://midscenejs.com/
|
|
3238
|
+
throw new Error(`Unable to get connected Android device list${adbExecutableContext}, please check https://www.midscenejs.com/platforms/android#faq : ${error.message}`, {
|
|
3239
3239
|
cause: error
|
|
3240
3240
|
});
|
|
3241
3241
|
}
|
package/dist/es/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { AndroidMidsceneTools, createReportCliCommands } from "./430.mjs";
|
|
|
3
3
|
const tools = new AndroidMidsceneTools();
|
|
4
4
|
runToolsCLI(tools, 'midscene-android', {
|
|
5
5
|
stripPrefix: 'android_',
|
|
6
|
-
version: "1.18.
|
|
6
|
+
version: "1.18.2-beta-20261119143629.0",
|
|
7
7
|
extraCommands: createReportCliCommands()
|
|
8
8
|
}).catch((e)=>{
|
|
9
9
|
process.exit(reportCLIError(e));
|
package/dist/lib/cli.js
CHANGED
|
@@ -2022,7 +2022,7 @@ ${stdout ? truncateAdbShellStream(stdout, 'stdout') : EMPTY_ADB_SHELL_STDOUT}`;
|
|
|
2022
2022
|
'up',
|
|
2023
2023
|
'down'
|
|
2024
2024
|
]).describe('The direction to pull'),
|
|
2025
|
-
distance: core_namespaceObject.
|
|
2025
|
+
distance: (0, core_namespaceObject.getMidsceneDistanceSchema)().optional().describe('The distance to pull (in pixels)'),
|
|
2026
2026
|
duration: core_namespaceObject.z.number().optional().describe('The duration of the pull (in milliseconds)'),
|
|
2027
2027
|
locate: (0, core_namespaceObject.getMidsceneLocationSchema)().optional().describe('The element to start the pull from (optional)')
|
|
2028
2028
|
}),
|
|
@@ -2155,7 +2155,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
2155
2155
|
const deviceId = this.deviceId;
|
|
2156
2156
|
const adbExecutable = target.executable.path;
|
|
2157
2157
|
debugDevice(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}): ${error}`);
|
|
2158
|
-
throw new Error(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}), please check https://midscenejs.com/
|
|
2158
|
+
throw new Error(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}), please check https://www.midscenejs.com/platforms/android#faq : ${error.message}`, {
|
|
2159
2159
|
cause: error
|
|
2160
2160
|
});
|
|
2161
2161
|
}
|
|
@@ -3387,7 +3387,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
3387
3387
|
} catch (error) {
|
|
3388
3388
|
console.error('Failed to get device list:', error);
|
|
3389
3389
|
const adbExecutableContext = adbExecutable ? ` (ADB executable: ${adbExecutable})` : '';
|
|
3390
|
-
throw new Error(`Unable to get connected Android device list${adbExecutableContext}, please check https://midscenejs.com/
|
|
3390
|
+
throw new Error(`Unable to get connected Android device list${adbExecutableContext}, please check https://www.midscenejs.com/platforms/android#faq : ${error.message}`, {
|
|
3391
3391
|
cause: error
|
|
3392
3392
|
});
|
|
3393
3393
|
}
|
|
@@ -3583,7 +3583,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
3583
3583
|
const tools = new AndroidMidsceneTools();
|
|
3584
3584
|
(0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-android', {
|
|
3585
3585
|
stripPrefix: 'android_',
|
|
3586
|
-
version: "1.18.
|
|
3586
|
+
version: "1.18.2-beta-20261119143629.0",
|
|
3587
3587
|
extraCommands: (0, core_namespaceObject.createReportCliCommands)()
|
|
3588
3588
|
}).catch((e)=>{
|
|
3589
3589
|
process.exit((0, cli_namespaceObject.reportCLIError)(e));
|
package/dist/lib/index.js
CHANGED
|
@@ -1953,7 +1953,7 @@ ${stdout ? truncateAdbShellStream(stdout, 'stdout') : EMPTY_ADB_SHELL_STDOUT}`;
|
|
|
1953
1953
|
'up',
|
|
1954
1954
|
'down'
|
|
1955
1955
|
]).describe('The direction to pull'),
|
|
1956
|
-
distance: core_namespaceObject.
|
|
1956
|
+
distance: (0, core_namespaceObject.getMidsceneDistanceSchema)().optional().describe('The distance to pull (in pixels)'),
|
|
1957
1957
|
duration: core_namespaceObject.z.number().optional().describe('The duration of the pull (in milliseconds)'),
|
|
1958
1958
|
locate: (0, core_namespaceObject.getMidsceneLocationSchema)().optional().describe('The element to start the pull from (optional)')
|
|
1959
1959
|
}),
|
|
@@ -2086,7 +2086,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
2086
2086
|
const deviceId = this.deviceId;
|
|
2087
2087
|
const adbExecutable = target.executable.path;
|
|
2088
2088
|
debugDevice(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}): ${error}`);
|
|
2089
|
-
throw new Error(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}), please check https://midscenejs.com/
|
|
2089
|
+
throw new Error(`ADB error with device ${deviceId} when calling ${methodName} (ADB executable: ${adbExecutable}), please check https://www.midscenejs.com/platforms/android#faq : ${error.message}`, {
|
|
2090
2090
|
cause: error
|
|
2091
2091
|
});
|
|
2092
2092
|
}
|
|
@@ -3448,7 +3448,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
3448
3448
|
} catch (error) {
|
|
3449
3449
|
console.error('Failed to get device list:', error);
|
|
3450
3450
|
const adbExecutableContext = adbExecutable ? ` (ADB executable: ${adbExecutable})` : '';
|
|
3451
|
-
throw new Error(`Unable to get connected Android device list${adbExecutableContext}, please check https://midscenejs.com/
|
|
3451
|
+
throw new Error(`Unable to get connected Android device list${adbExecutableContext}, please check https://www.midscenejs.com/platforms/android#faq : ${error.message}`, {
|
|
3452
3452
|
cause: error
|
|
3453
3453
|
});
|
|
3454
3454
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/android",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.2-beta-20261119143629.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/midscene.git",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"appium-adb": "15.0.9",
|
|
48
48
|
"sharp": "^0.35.5",
|
|
49
49
|
"zod": "^3.25.1",
|
|
50
|
-
"@midscene/core": "1.18.
|
|
51
|
-
"@midscene/shared": "1.18.
|
|
50
|
+
"@midscene/core": "1.18.2-beta-20261119143629.0",
|
|
51
|
+
"@midscene/shared": "1.18.2-beta-20261119143629.0"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
54
|
"@ffmpeg-installer/ffmpeg": "^1.1.0"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"tsx": "^4.23.15",
|
|
62
62
|
"typescript": "^5.8.3",
|
|
63
63
|
"undici": "^7.30.1",
|
|
64
|
-
"@midscene/playground": "1.18.
|
|
64
|
+
"@midscene/playground": "1.18.2-beta-20261119143629.0"
|
|
65
65
|
},
|
|
66
66
|
"license": "MIT",
|
|
67
67
|
"scripts": {
|