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

mobile-cli-lib

Package Overview
Dependencies
Maintainers
8
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobile-cli-lib - npm Package Compare versions

Comparing version 0.18.0 to 0.19.0

1

appbuilder/appbuilder-bootstrap.js

@@ -5,2 +5,3 @@ require("../bootstrap");

$injector.require("pathFilteringService", "./appbuilder/services/path-filtering");
$injector.require("liveSyncServiceBase", "./services/livesync-service-base");
$injector.require("androidLiveSyncServiceLocator", "./appbuilder/services/livesync/android-livesync-service");

@@ -7,0 +8,0 @@ $injector.require("iosLiveSyncServiceLocator", "./appbuilder/services/livesync/ios-livesync-service");

1

bootstrap.js

@@ -77,3 +77,2 @@ global._ = require("lodash");

$injector.require("autoCompletionService", "./services/auto-completion-service");
$injector.require("liveSyncServiceBase", "./services/livesync-service-base");
$injector.require("opener", "./opener");

@@ -80,0 +79,0 @@ $injector.require("dynamicHelpService", "./services/dynamic-help-service");

@@ -82,3 +82,3 @@ "use strict";

return (function () {
var mappedAppIdentifierPorts = _this.$androidProcessService.getMappedAbstractToTcpPorts(_this.identifier, appIdentifiers).wait(), applicationViews = {};
var mappedAppIdentifierPorts = _this.$androidProcessService.getMappedAbstractToTcpPorts(_this.identifier, appIdentifiers, constants_1.TARGET_FRAMEWORK_IDENTIFIERS.Cordova).wait(), applicationViews = {};
_.each(mappedAppIdentifierPorts, function (port, appIdentifier) {

@@ -85,0 +85,0 @@ applicationViews[appIdentifier] = [];

@@ -24,3 +24,3 @@ "use strict";

});
AndroidProcessService.prototype.mapAbstractToTcpPort = function (deviceIdentifier, appIdentifier) {
AndroidProcessService.prototype.mapAbstractToTcpPort = function (deviceIdentifier, appIdentifier, framework) {
var _this = this;

@@ -35,3 +35,3 @@ return (function () {

var abstractPortsInformation = _this.getAbstractPortsInformation(adb).wait();
var abstractPort = _this.getAbstractPortForApplication(adb, processId, appIdentifier, abstractPortsInformation).wait();
var abstractPort = _this.getAbstractPortForApplication(adb, processId, appIdentifier, abstractPortsInformation, framework).wait();
if (!abstractPort) {

@@ -48,3 +48,3 @@ _this.$errors.failWithoutHelp(applicationNotStartedErrorMessage);

};
AndroidProcessService.prototype.getMappedAbstractToTcpPorts = function (deviceIdentifier, appIdentifiers) {
AndroidProcessService.prototype.getMappedAbstractToTcpPorts = function (deviceIdentifier, appIdentifiers, framework) {
var _this = this;

@@ -59,3 +59,3 @@ return (function () {

}
var abstractPort = _this.getAbstractPortForApplication(adb, processId, appIdentifier, abstractPortsInformation).wait();
var abstractPort = _this.getAbstractPortForApplication(adb, processId, appIdentifier, abstractPortsInformation, framework).wait();
if (!abstractPort) {

@@ -81,3 +81,5 @@ return;

.filter(function (deviceAppInfo) { return !!deviceAppInfo; })
.uniqBy(function (deviceAppInfo) { return deviceAppInfo.appIdentifier; })
.groupBy(function (element) { return element.framework; })
.map(function (group) { return _.uniqBy(group, function (g) { return g.appIdentifier; }); })
.flatten()
.value();

@@ -126,10 +128,23 @@ }).future()();

};
AndroidProcessService.prototype.getAbstractPortForApplication = function (adb, processId, appIdentifier, abstractPortsInformation) {
AndroidProcessService.prototype.getAbstractPortForApplication = function (adb, processId, appIdentifier, abstractPortsInformation, framework) {
var _this = this;
return (function () {
return _this.getPortInformation(abstractPortsInformation, processId) ||
_this.getPortInformation(abstractPortsInformation, appIdentifier + "_devtools_remote") ||
_this.getPortInformation(abstractPortsInformation, appIdentifier + "-debug");
framework = framework || "";
switch (framework.toLowerCase()) {
case constants_1.TARGET_FRAMEWORK_IDENTIFIERS.Cordova.toLowerCase():
return _this.getCordovaPortInformation(abstractPortsInformation, appIdentifier, processId);
case constants_1.TARGET_FRAMEWORK_IDENTIFIERS.NativeScript.toLowerCase():
return _this.getNativeScriptPortInformation(abstractPortsInformation, appIdentifier);
default:
return _this.getCordovaPortInformation(abstractPortsInformation, appIdentifier, processId) ||
_this.getNativeScriptPortInformation(abstractPortsInformation, appIdentifier);
}
}).future()();
};
AndroidProcessService.prototype.getCordovaPortInformation = function (abstractPortsInformation, appIdentifier, processId) {
return this.getPortInformation(abstractPortsInformation, appIdentifier + "_devtools_remote") || this.getPortInformation(abstractPortsInformation, processId);
};
AndroidProcessService.prototype.getNativeScriptPortInformation = function (abstractPortsInformation, appIdentifier) {
return this.getPortInformation(abstractPortsInformation, appIdentifier + "-debug");
};
AndroidProcessService.prototype.getAbstractPortsInformation = function (adb) {

@@ -136,0 +151,0 @@ return adb.executeShellCommand(["cat", "/proc/net/unix"]);

@@ -391,4 +391,4 @@ "use strict";

};
DevicesService.prototype.mapAbstractToTcpPort = function (deviceIdentifier, appIdentifier) {
return this.$androidProcessService.mapAbstractToTcpPort(deviceIdentifier, appIdentifier);
DevicesService.prototype.mapAbstractToTcpPort = function (deviceIdentifier, appIdentifier, framework) {
return this.$androidProcessService.mapAbstractToTcpPort(deviceIdentifier, appIdentifier, framework);
};

@@ -553,3 +553,3 @@ DevicesService.prototype.getDebuggableApps = function (deviceIdentifiers) {

__metadata('design:type', Function),
__metadata('design:paramtypes', [String, String]),
__metadata('design:paramtypes', [String, String, String]),
__metadata('design:returntype', Object)

@@ -556,0 +556,0 @@ ], DevicesService.prototype, "mapAbstractToTcpPort", null);

{
"name": "mobile-cli-lib",
"preferGlobal": false,
"version": "0.18.0",
"version": "0.19.0",
"author": "Telerik <support@telerik.com>",

@@ -94,3 +94,3 @@ "description": "common lib used by different CLI",

},
"buildVersion": "218"
"buildVersion": "221"
}

@@ -10,5 +10,5 @@ mobile-cli-lib

Latest version: 0.18.0
Latest version: 0.19.0
Release date: 2016, July 14
Release date: 2016, July 19

@@ -555,7 +555,7 @@ ### System Requirements

* `mapAbstractToTcpPort(deviceIdentifier: string, appIdentifier: string): Promise<string>` - This function forwards the abstract port of the web view on the device to available tcp port on the host and returns the tcp port.
* `mapAbstractToTcpPort(deviceIdentifier: string, appIdentifier: string, framework: string): Promise<string>` - This function forwards the abstract port of the web view on the device to available tcp port on the host and returns the tcp port.
Sample usage:
```JavaScript
require("mobile-cli-lib").devicesService.mapAbstractToTcpPort("4df18f307d8a8f1b", "com.telerik.test")
require("mobile-cli-lib").devicesService.mapAbstractToTcpPort("4df18f307d8a8f1b", "com.telerik.test", "Cordova")
.then(function(port) {

@@ -562,0 +562,0 @@ console.log(port);

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