@midscene/android 1.4.5 → 1.4.7
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/cli.mjs +2 -5
- package/dist/es/index.mjs +2 -5
- package/dist/es/mcp-server.mjs +2 -5
- package/dist/lib/cli.js +2 -5
- package/dist/lib/index.js +2 -5
- package/dist/lib/mcp-server.js +2 -5
- package/dist/types/index.d.ts +0 -1
- package/package.json +4 -4
package/dist/es/cli.mjs
CHANGED
|
@@ -602,8 +602,7 @@ class ScrcpyDeviceAdapter {
|
|
|
602
602
|
debugAdapter(`Using scrcpy resolution: ${resolution.width}x${resolution.height}`);
|
|
603
603
|
return {
|
|
604
604
|
width: resolution.width,
|
|
605
|
-
height: resolution.height
|
|
606
|
-
dpr: deviceInfo.dpr
|
|
605
|
+
height: resolution.height
|
|
607
606
|
};
|
|
608
607
|
}
|
|
609
608
|
getScalingRatio(physicalWidth) {
|
|
@@ -885,7 +884,6 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
885
884
|
return {
|
|
886
885
|
physicalWidth: Number.parseInt(match[1], 10),
|
|
887
886
|
physicalHeight: Number.parseInt(match[2], 10),
|
|
888
|
-
dpr: this.devicePixelRatio,
|
|
889
887
|
orientation: screenSize.orientation,
|
|
890
888
|
isCurrentOrientation: screenSize.isCurrentOrientation
|
|
891
889
|
};
|
|
@@ -1108,8 +1106,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1108
1106
|
const logicalHeight = Math.round(height * scale);
|
|
1109
1107
|
return {
|
|
1110
1108
|
width: logicalWidth,
|
|
1111
|
-
height: logicalHeight
|
|
1112
|
-
dpr: this.devicePixelRatio
|
|
1109
|
+
height: logicalHeight
|
|
1113
1110
|
};
|
|
1114
1111
|
}
|
|
1115
1112
|
adjustCoordinates(x, y) {
|
package/dist/es/index.mjs
CHANGED
|
@@ -504,8 +504,7 @@ class ScrcpyDeviceAdapter {
|
|
|
504
504
|
debugAdapter(`Using scrcpy resolution: ${resolution.width}x${resolution.height}`);
|
|
505
505
|
return {
|
|
506
506
|
width: resolution.width,
|
|
507
|
-
height: resolution.height
|
|
508
|
-
dpr: deviceInfo.dpr
|
|
507
|
+
height: resolution.height
|
|
509
508
|
};
|
|
510
509
|
}
|
|
511
510
|
getScalingRatio(physicalWidth) {
|
|
@@ -787,7 +786,6 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
787
786
|
return {
|
|
788
787
|
physicalWidth: Number.parseInt(match[1], 10),
|
|
789
788
|
physicalHeight: Number.parseInt(match[2], 10),
|
|
790
|
-
dpr: this.devicePixelRatio,
|
|
791
789
|
orientation: screenSize.orientation,
|
|
792
790
|
isCurrentOrientation: screenSize.isCurrentOrientation
|
|
793
791
|
};
|
|
@@ -1010,8 +1008,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1010
1008
|
const logicalHeight = Math.round(height * scale);
|
|
1011
1009
|
return {
|
|
1012
1010
|
width: logicalWidth,
|
|
1013
|
-
height: logicalHeight
|
|
1014
|
-
dpr: this.devicePixelRatio
|
|
1011
|
+
height: logicalHeight
|
|
1015
1012
|
};
|
|
1016
1013
|
}
|
|
1017
1014
|
adjustCoordinates(x, y) {
|
package/dist/es/mcp-server.mjs
CHANGED
|
@@ -601,8 +601,7 @@ class ScrcpyDeviceAdapter {
|
|
|
601
601
|
debugAdapter(`Using scrcpy resolution: ${resolution.width}x${resolution.height}`);
|
|
602
602
|
return {
|
|
603
603
|
width: resolution.width,
|
|
604
|
-
height: resolution.height
|
|
605
|
-
dpr: deviceInfo.dpr
|
|
604
|
+
height: resolution.height
|
|
606
605
|
};
|
|
607
606
|
}
|
|
608
607
|
getScalingRatio(physicalWidth) {
|
|
@@ -884,7 +883,6 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
884
883
|
return {
|
|
885
884
|
physicalWidth: Number.parseInt(match[1], 10),
|
|
886
885
|
physicalHeight: Number.parseInt(match[2], 10),
|
|
887
|
-
dpr: this.devicePixelRatio,
|
|
888
886
|
orientation: screenSize.orientation,
|
|
889
887
|
isCurrentOrientation: screenSize.isCurrentOrientation
|
|
890
888
|
};
|
|
@@ -1107,8 +1105,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1107
1105
|
const logicalHeight = Math.round(height * scale);
|
|
1108
1106
|
return {
|
|
1109
1107
|
width: logicalWidth,
|
|
1110
|
-
height: logicalHeight
|
|
1111
|
-
dpr: this.devicePixelRatio
|
|
1108
|
+
height: logicalHeight
|
|
1112
1109
|
};
|
|
1113
1110
|
}
|
|
1114
1111
|
adjustCoordinates(x, y) {
|
package/dist/lib/cli.js
CHANGED
|
@@ -617,8 +617,7 @@ var __webpack_exports__ = {};
|
|
|
617
617
|
debugAdapter(`Using scrcpy resolution: ${resolution.width}x${resolution.height}`);
|
|
618
618
|
return {
|
|
619
619
|
width: resolution.width,
|
|
620
|
-
height: resolution.height
|
|
621
|
-
dpr: deviceInfo.dpr
|
|
620
|
+
height: resolution.height
|
|
622
621
|
};
|
|
623
622
|
}
|
|
624
623
|
getScalingRatio(physicalWidth) {
|
|
@@ -900,7 +899,6 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
900
899
|
return {
|
|
901
900
|
physicalWidth: Number.parseInt(match[1], 10),
|
|
902
901
|
physicalHeight: Number.parseInt(match[2], 10),
|
|
903
|
-
dpr: this.devicePixelRatio,
|
|
904
902
|
orientation: screenSize.orientation,
|
|
905
903
|
isCurrentOrientation: screenSize.isCurrentOrientation
|
|
906
904
|
};
|
|
@@ -1123,8 +1121,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1123
1121
|
const logicalHeight = Math.round(height * scale);
|
|
1124
1122
|
return {
|
|
1125
1123
|
width: logicalWidth,
|
|
1126
|
-
height: logicalHeight
|
|
1127
|
-
dpr: this.devicePixelRatio
|
|
1124
|
+
height: logicalHeight
|
|
1128
1125
|
};
|
|
1129
1126
|
}
|
|
1130
1127
|
adjustCoordinates(x, y) {
|
package/dist/lib/index.js
CHANGED
|
@@ -537,8 +537,7 @@ var __webpack_exports__ = {};
|
|
|
537
537
|
debugAdapter(`Using scrcpy resolution: ${resolution.width}x${resolution.height}`);
|
|
538
538
|
return {
|
|
539
539
|
width: resolution.width,
|
|
540
|
-
height: resolution.height
|
|
541
|
-
dpr: deviceInfo.dpr
|
|
540
|
+
height: resolution.height
|
|
542
541
|
};
|
|
543
542
|
}
|
|
544
543
|
getScalingRatio(physicalWidth) {
|
|
@@ -820,7 +819,6 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
820
819
|
return {
|
|
821
820
|
physicalWidth: Number.parseInt(match[1], 10),
|
|
822
821
|
physicalHeight: Number.parseInt(match[2], 10),
|
|
823
|
-
dpr: this.devicePixelRatio,
|
|
824
822
|
orientation: screenSize.orientation,
|
|
825
823
|
isCurrentOrientation: screenSize.isCurrentOrientation
|
|
826
824
|
};
|
|
@@ -1043,8 +1041,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1043
1041
|
const logicalHeight = Math.round(height * scale);
|
|
1044
1042
|
return {
|
|
1045
1043
|
width: logicalWidth,
|
|
1046
|
-
height: logicalHeight
|
|
1047
|
-
dpr: this.devicePixelRatio
|
|
1044
|
+
height: logicalHeight
|
|
1048
1045
|
};
|
|
1049
1046
|
}
|
|
1050
1047
|
adjustCoordinates(x, y) {
|
package/dist/lib/mcp-server.js
CHANGED
|
@@ -632,8 +632,7 @@ var __webpack_exports__ = {};
|
|
|
632
632
|
debugAdapter(`Using scrcpy resolution: ${resolution.width}x${resolution.height}`);
|
|
633
633
|
return {
|
|
634
634
|
width: resolution.width,
|
|
635
|
-
height: resolution.height
|
|
636
|
-
dpr: deviceInfo.dpr
|
|
635
|
+
height: resolution.height
|
|
637
636
|
};
|
|
638
637
|
}
|
|
639
638
|
getScalingRatio(physicalWidth) {
|
|
@@ -915,7 +914,6 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
915
914
|
return {
|
|
916
915
|
physicalWidth: Number.parseInt(match[1], 10),
|
|
917
916
|
physicalHeight: Number.parseInt(match[2], 10),
|
|
918
|
-
dpr: this.devicePixelRatio,
|
|
919
917
|
orientation: screenSize.orientation,
|
|
920
918
|
isCurrentOrientation: screenSize.isCurrentOrientation
|
|
921
919
|
};
|
|
@@ -1138,8 +1136,7 @@ ${Object.keys(size).filter((key)=>size[key]).map((key)=>` ${key} size: ${size[k
|
|
|
1138
1136
|
const logicalHeight = Math.round(height * scale);
|
|
1139
1137
|
return {
|
|
1140
1138
|
width: logicalWidth,
|
|
1141
|
-
height: logicalHeight
|
|
1142
|
-
dpr: this.devicePixelRatio
|
|
1139
|
+
height: logicalHeight
|
|
1143
1140
|
};
|
|
1144
1141
|
}
|
|
1145
1142
|
adjustCoordinates(x, y) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -203,7 +203,6 @@ declare type DeviceActionAndroidRecentAppsButton = DeviceAction<undefined, void>
|
|
|
203
203
|
declare interface DevicePhysicalInfo {
|
|
204
204
|
physicalWidth: number;
|
|
205
205
|
physicalHeight: number;
|
|
206
|
-
dpr: number;
|
|
207
206
|
orientation: number;
|
|
208
207
|
isCurrentOrientation?: boolean;
|
|
209
208
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/android",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "Android automation library for Midscene",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Android UI automation",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@yume-chan/stream-extra": "^1.0.0",
|
|
42
42
|
"appium-adb": "12.12.1",
|
|
43
43
|
"sharp": "^0.34.3",
|
|
44
|
-
"@midscene/core": "1.4.
|
|
45
|
-
"@midscene/shared": "1.4.
|
|
44
|
+
"@midscene/core": "1.4.7",
|
|
45
|
+
"@midscene/shared": "1.4.7"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
48
|
"@ffmpeg-installer/ffmpeg": "^1.1.0"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"tsx": "^4.19.2",
|
|
57
57
|
"vitest": "3.0.5",
|
|
58
58
|
"zod": "3.24.3",
|
|
59
|
-
"@midscene/playground": "1.4.
|
|
59
|
+
"@midscene/playground": "1.4.7"
|
|
60
60
|
},
|
|
61
61
|
"license": "MIT",
|
|
62
62
|
"scripts": {
|