mobile-devices-controller
Advanced tools
+65
-46
@@ -471,3 +471,3 @@ "use strict"; | ||
| density: v.density, | ||
| offsetPixels: v.actionBarHeight | ||
| offsetPixels: v.actionBarHeight * v.density | ||
| }; | ||
@@ -739,7 +739,8 @@ } | ||
| static loadIOSDevicesScreenInfo() { | ||
| const devices = new Map(); | ||
| // IOSController.devicesScreenInfo.set("iPhone 5", new IOSDeviceScreenInfo("iPhone 5", 640, 1336, 326, 30)); | ||
| // IOSController.devicesScreenInfo.set("iPhone 5C", new IOSDeviceScreenInfo("iPhone 5C", 640, 1336, 326, 30)); | ||
| // IOSController.devicesScreenInfo.set("iPhone 5S", new IOSDeviceScreenInfo("iPhone 5S", 640, 1336, 326, 30)); | ||
| IOSController.devicesScreenInfo.set("iPhone 6", { | ||
| IOSController.getDevicesScreenInfo().forEach(d => { | ||
| IOSController.devicesScreenInfo.set(d.deviceType, d); | ||
| }); | ||
| } | ||
| static devicesDisplaysInfos() { | ||
| const devicesInfo = new Array({ | ||
| deviceType: "iPhone 6", | ||
@@ -750,4 +751,3 @@ width: 750, | ||
| actionBarHeight: 33 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("iPhone 6s", { | ||
| }, { | ||
| deviceType: "iPhone 6s", | ||
@@ -758,4 +758,15 @@ width: 750, | ||
| actionBarHeight: 33 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("iPhone 7", { | ||
| }, { | ||
| deviceType: "iPhone 6 Plus", | ||
| width: 1242, | ||
| height: 2208, | ||
| density: 3, | ||
| actionBarHeight: 50 | ||
| }, { | ||
| deviceType: "iPhone 7 Plus", | ||
| width: 1242, | ||
| height: 2208, | ||
| density: 3, | ||
| actionBarHeight: 50 | ||
| }, { | ||
| deviceType: "iPhone 7", | ||
@@ -766,12 +777,10 @@ width: 750, | ||
| actionBarHeight: 33 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("iPhone 8", { | ||
| }, { | ||
| deviceType: "iPhone 8", | ||
| height: 1334, | ||
| width: 750, | ||
| height: 1334, | ||
| density: 2, | ||
| actionBarHeight: 33 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("iPhone 6 Plus", { | ||
| deviceType: "iPhone 6 Plus", | ||
| actionBarHeight: 20 | ||
| }, { | ||
| deviceType: "iPhone 8 Plus", | ||
| width: 1242, | ||
@@ -781,40 +790,50 @@ height: 2208, | ||
| actionBarHeight: 50 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("6 Plus", { | ||
| deviceType: "iPhone 6 Plus", | ||
| }, { | ||
| deviceType: "iPhone X", | ||
| width: 1242, | ||
| height: 2208, | ||
| density: 3, | ||
| actionBarHeight: 50 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("7 Plus", { | ||
| deviceType: "iPhone 7 Plus", | ||
| width: 1242, | ||
| height: 2208, | ||
| actionBarHeight: 44 | ||
| }, { | ||
| deviceType: "iPhone XR", | ||
| width: 828, | ||
| height: 1792, | ||
| density: 2, | ||
| actionBarHeight: 44 | ||
| }, { | ||
| deviceType: "iPhone XS", | ||
| width: 1125, | ||
| height: 2436, | ||
| density: 3, | ||
| actionBarHeight: 50 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("8 Plus", { | ||
| deviceType: "iPhone 8 Plus", | ||
| actionBarHeight: 44 | ||
| }, { | ||
| deviceType: "iPhone XS Max", | ||
| width: 1242, | ||
| height: 2208, | ||
| height: 2688, | ||
| density: 3, | ||
| actionBarHeight: 50 | ||
| }); | ||
| IOSController.devicesScreenInfo.set("X", { | ||
| deviceType: "iPhone X", | ||
| actionBarHeight: 44 | ||
| }, { | ||
| deviceType: "iPhone 11", | ||
| width: 828, | ||
| height: 1792, | ||
| density: 2, | ||
| actionBarHeight: 44 | ||
| }, { | ||
| deviceType: "iPhone 11 Pro", | ||
| width: 375, | ||
| height: 812, | ||
| density: 3, | ||
| actionBarHeight: 44 | ||
| }, { | ||
| deviceType: "iPhone 11", | ||
| width: 1242, | ||
| height: 2208, | ||
| height: 2688, | ||
| density: 3, | ||
| actionBarHeight: 87 | ||
| actionBarHeight: 44 | ||
| }); | ||
| // IOSController.devicesScreenInfo("Mini 2", new IOSDeviceScreenInfo("Mini 2", 11242, 2208, 401)); | ||
| // IOSController.devicesScreenInfo("Mini 3", new IOSDeviceScreenInfo("Mini 3", 11242, 2208, 401)); | ||
| // IOSController.devicesScreenInfo("Mini 4", new IOSDeviceScreenInfo("Mini 4", 11242, 2208, 401)); | ||
| // IOSController.devicesScreenInfo("iPad 3", new IOSDeviceScreenInfo("iPad 3", 1536, 2048, 264)); | ||
| // IOSController.devicesScreenInfo("iPad 4", new IOSDeviceScreenInfo("iPad 4", 1536, 2048, 264)); | ||
| // IOSController.devicesScreenInfo("iPad Air", new IOSDeviceScreenInfo("iPad Air", 1536, 2048, 264)); | ||
| // IOSController.devicesScreenInfo.set("iPad Air 2", new IOSDeviceScreenInfo("iPad Air 2", 1536, 2048, 264, 32)); | ||
| // IOSController.devicesScreenInfo("9.7-inch Pro", new IOSDeviceScreenInfo("iPad Pro", 1536, 2048, 264)); | ||
| // IOSController.devicesScreenInfo("12.9-inch iPad Pro", new IOSDeviceScreenInfo("12.9-inch iPad Pro", 1536, 2048, 264)); | ||
| // longest names at the start | ||
| const sortedDevices = devicesInfo.sort((a, b) => { | ||
| return b.deviceType.length - a.deviceType.length; | ||
| }); | ||
| return sortedDevices; | ||
| } | ||
@@ -821,0 +840,0 @@ } |
+1
-1
| { | ||
| "name": "mobile-devices-controller", | ||
| "version": "5.1.0", | ||
| "version": "5.2.0", | ||
| "main": "index.js", | ||
@@ -5,0 +5,0 @@ "description": "Manage devices, emulators and simulators.", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3144
0.61%10615298
-0.01%