Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appium-adb

Package Overview
Dependencies
Maintainers
6
Versions
445
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium-adb - npm Package Compare versions

Comparing version 2.0.0-beta8 to 2.0.0-beta9

.package.json.un~

56

build/lib/tools/apk-utils.js

@@ -461,3 +461,3 @@ 'use strict';

apkUtilsMethods.extractStringsFromApk = function callee$0$0(apk, language, out) {
var stringsJson, apkTools, args, fileData, apkStrings, msg;
var stringsJson, localPath, apkTools, args, fileData, apkStrings, msg;
return _regeneratorRuntime.async(function callee$0$0$(context$1$0) {

@@ -468,52 +468,54 @@ while (1) switch (context$1$0.prev = context$1$0.next) {

stringsJson = 'strings.json';
localPath = undefined;
if (language) {
context$1$0.next = 6;
context$1$0.next = 7;
break;
}
context$1$0.next = 5;
context$1$0.next = 6;
return _regeneratorRuntime.awrap(this.getDeviceLanguage());
case 5:
case 6:
language = context$1$0.sent;
case 6:
case 7:
apkTools = this.jars['appium_apk_tools.jar'];
args = ['-jar', apkTools, 'stringsFromApk', apk, out, language];
fileData = undefined, apkStrings = undefined;
context$1$0.prev = 9;
context$1$0.next = 12;
context$1$0.prev = 10;
context$1$0.next = 13;
return _regeneratorRuntime.awrap((0, _teen_process.exec)('java', args));
case 12:
context$1$0.next = 20;
case 13:
context$1$0.next = 21;
break;
case 14:
context$1$0.prev = 14;
context$1$0.t0 = context$1$0['catch'](9);
case 15:
context$1$0.prev = 15;
context$1$0.t0 = context$1$0['catch'](10);
_loggerJs2['default'].debug('No strings.xml for language \'' + language + '\', getting default ' + 'strings.xml');
args.pop();
context$1$0.next = 20;
context$1$0.next = 21;
return _regeneratorRuntime.awrap((0, _teen_process.exec)('java', args));
case 20:
context$1$0.prev = 20;
case 21:
context$1$0.prev = 21;
_loggerJs2['default'].debug('Reading strings from converted strings.json');
context$1$0.next = 24;
return _regeneratorRuntime.awrap(_utils.fs.readFile(_path2['default'].join(out, stringsJson), 'utf8'));
localPath = _path2['default'].join(out, stringsJson);
context$1$0.next = 26;
return _regeneratorRuntime.awrap(_utils.fs.readFile(localPath, 'utf8'));
case 24:
case 26:
fileData = context$1$0.sent;
apkStrings = JSON.parse(fileData);
context$1$0.next = 33;
context$1$0.next = 35;
break;
case 28:
context$1$0.prev = 28;
context$1$0.t1 = context$1$0['catch'](20);
case 30:
context$1$0.prev = 30;
context$1$0.t1 = context$1$0['catch'](21);

@@ -527,10 +529,10 @@ if (fileData) {

case 33:
return context$1$0.abrupt('return', apkStrings);
case 35:
return context$1$0.abrupt('return', { apkStrings: apkStrings, localPath: localPath });
case 34:
case 36:
case 'end':
return context$1$0.stop();
}
}, null, this, [[9, 14], [20, 28]]);
}, null, this, [[10, 15], [21, 30]]);
};

@@ -543,2 +545,2 @@

// stdout may contain warnings meaning success is not on the first line.
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi90b29scy9hcGstdXRpbHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7eUJBQXVELGVBQWU7OzRCQUNqRCxjQUFjOzt3QkFDbkIsY0FBYzs7OztvQkFDYixNQUFNOzs7O3NCQUNULFFBQVE7Ozs7d0JBQ0EsVUFBVTs7cUJBQ2IsVUFBVTs7QUFFN0IsSUFBSSxlQUFlLEdBQUcsRUFBRSxDQUFDOztBQUV6QixlQUFlLENBQUMsY0FBYyxHQUFHLG9CQUFnQixHQUFHO01BRTVDLFNBQVMsRUFFVCxRQUFRLEVBQ1IsVUFBVSxFQUNWLE1BQU0sRUFDTixlQUFlOzs7OztBQUxmLGlCQUFTLEdBQUcsS0FBSzs7QUFDckIsOEJBQUksS0FBSyxpQ0FBK0IsR0FBRyxDQUFHLENBQUM7O3lDQUMxQixJQUFJLENBQUMsV0FBVyxFQUFFOzs7QUFBbkMsZ0JBQVE7QUFDUixrQkFBVSxH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AgIGlmIChmaWxlRGF0YSkge1xuICAgICAgbG9nLmRlYnVnKGBDb250ZW50IHN0YXJ0ZWQgd2l0aDogJHtmaWxlRGF0YS5zbGljZSgwLCAzMDApfWApO1xuICAgIH1cbiAgICBsZXQgbXNnID0gYENvdWxkIG5vdCBwYXJzZSBzdHJpbmdzIGZyb20gc3RyaW5ncy5qc29uLiBPcmlnaW5hbCBgICtcbiAgICAgICAgICAgICAgYGVycm9yOiAke2UubWVzc2FnZX1gO1xuICAgIGxvZy5lcnJvckFuZFRocm93KG1zZyk7XG4gIH1cbiAgcmV0dXJuIHthcGtTdHJpbmdzLCBsb2NhbFBhdGh9O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgYXBrVXRpbHNNZXRob2RzO1xuIl19

@@ -164,4 +164,5 @@ import { buildStartCmd, getActivityRelativeName } from '../helpers.js';

apkUtilsMethods.extractStringsFromApk = async function (apk, language, out) {
log.debug("Extracting strings for language: " + (language || "default"));
log.debug(`Extracting strings for language: ${language || "default"}`);
let stringsJson = 'strings.json';
let localPath;
if (!language) {

@@ -184,7 +185,8 @@ language = await this.getDeviceLanguage();

log.debug("Reading strings from converted strings.json");
fileData = await fs.readFile(path.join(out, stringsJson), 'utf8');
localPath = path.join(out, stringsJson);
fileData = await fs.readFile(localPath, 'utf8');
apkStrings = JSON.parse(fileData);
} catch (e) {
if (fileData) {
log.debug("Content started with: " + fileData.slice(0, 300));
log.debug(`Content started with: ${fileData.slice(0, 300)}`);
}

@@ -195,5 +197,5 @@ let msg = `Could not parse strings from strings.json. Original ` +

}
return apkStrings;
return {apkStrings, localPath};
};
export default apkUtilsMethods;
{
"name": "appium-adb",
"version": "2.0.0-beta8",
"version": "2.0.0-beta9",
"description": "appium-adb",

@@ -5,0 +5,0 @@ "main": "./build/index.js",

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