New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

macaca-android

Package Overview
Dependencies
Maintainers
5
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macaca-android - npm Package Compare versions

Comparing version 1.1.26 to 1.1.27

lib/key-map.js

48

lib/controllers.js

@@ -8,2 +8,3 @@ 'use strict';

const _ = require('./helper');
const keyMap = require('./key-map');
const pkg = require('../package.json');

@@ -78,26 +79,27 @@

value = value.join('');
var content = '';
if (!!~value.indexOf('[ADB_INPUT_TEXT]')) {
value = value.replace('[ADB_INPUT_TEXT]', '');
content = `am broadcast -a ADB_INPUT_TEXT --es msg '${value}'`;
yield this.adb.shell(content);
} else if (!!~value.indexOf('[ADB_INPUT_CHARS]')) {
value = value.replace('[ADB_INPUT_CHARS]', '');
content = `am broadcast -a ADB_INPUT_CHARS --eia chars '${value}'`;
yield this.adb.shell(content);
} else if (!!~value.indexOf('[ADB_INPUT_CODE]')) {
value = value.replace('[ADB_INPUT_CODE]', '');
content = `am broadcast -a ADB_INPUT_CODE --ei code '${value}'`;
yield this.adb.shell(content);
} else if (!!~value.indexOf('[ADB_EDITOR_CODE]')) {
value = value.replace('[ADB_EDITOR_CODE]', '');
content = `am broadcast -a ADB_EDITOR_CODE --ei code '${value}'`;
yield this.adb.shell(content);
} else {
value = value.split('');
const keyActions = value.map(key => {
return () => this.adb.input(`text "${key}"`);
});
yield _.serialTasks.apply(null, keyActions);
var text = '';
for (var i = 0; i < value.length; i++) {
var key = value.charAt(i);
const keyEvent = keyMap[key];
if (keyEvent) {
yield this.adb.input(`keyevent ${keyEvent}`);
} else {
text = text + key;
if (i + 1 < value.length) {
var nextKeyEvent = keyMap[value.charAt(i + 1)];
if (nextKeyEvent) {
yield this.setValue('', text.split(''));
text = '';
}
}
}
}
if (text !== '') {
yield this.setValue('', text.split(''));
}
return null;

@@ -104,0 +106,0 @@ };

{
"name": "macaca-android",
"version": "1.1.26",
"version": "1.1.27",
"description": "Macaca Android driver",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc