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

ios-sim-portable

Package Overview
Dependencies
Maintainers
5
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ios-sim-portable - npm Package Compare versions

Comparing version 3.4.4 to 3.4.5

1

lib/child-process.js

@@ -63,1 +63,2 @@ "use strict";

exports.spawn = spawn;
//# sourceMappingURL=child-process.js.map

@@ -43,1 +43,2 @@ "use strict";

exports.CommandExecutor = CommandExecutor;
//# sourceMappingURL=command-executor.js.map

@@ -0,1 +1,2 @@

///<reference path=".././.d.ts"/>
"use strict";

@@ -10,1 +11,2 @@ const iphoneSimulatorLibPath = require("./../iphone-simulator");

exports.Command = Command;
//# sourceMappingURL=device-types.js.map

@@ -0,1 +1,2 @@

///<reference path=".././.d.ts"/>
"use strict";

@@ -25,1 +26,2 @@ const fs = require("fs");

exports.Command = Command;
//# sourceMappingURL=help.js.map

@@ -11,1 +11,2 @@ "use strict";

exports.Command = Command;
//# sourceMappingURL=launch.js.map

@@ -10,1 +10,2 @@ "use strict";

exports.Command = Command;
//# sourceMappingURL=notify-post.js.map

@@ -0,1 +1,2 @@

///<reference path=".././.d.ts"/>
"use strict";

@@ -10,1 +11,2 @@ const iphoneSimulatorLibPath = require("./../iphone-simulator");

exports.Command = Command;
//# sourceMappingURL=sdks.js.map

@@ -0,1 +1,3 @@

///<reference path="./.d.ts"/>
"use strict";
//# sourceMappingURL=declarations.js.map

@@ -0,1 +1,2 @@

///<reference path="./.d.ts"/>
"use strict";

@@ -8,1 +9,2 @@ const util = require("util");

exports.fail = fail;
//# sourceMappingURL=errors.js.map

@@ -5,1 +5,2 @@ "use strict";

commandExecutor.execute();
//# sourceMappingURL=ios-sim-standalone.js.map

@@ -138,1 +138,2 @@ "use strict";

module.exports = publicApi;
//# sourceMappingURL=ios-sim.js.map

@@ -53,1 +53,2 @@ "use strict";

}
//# sourceMappingURL=iphone-simulator-common.js.map

@@ -0,1 +1,2 @@

///<reference path="./.d.ts"/>
"use strict";

@@ -11,1 +12,2 @@ class IPhoneSimulatorNameGetter {

exports.IPhoneSimulatorNameGetter = IPhoneSimulatorNameGetter;
//# sourceMappingURL=iphone-simulator-name-getter.js.map

@@ -0,1 +1,2 @@

///<reference path="./.d.ts"/>
"use strict";

@@ -61,2 +62,4 @@ const childProcess = require("./child-process");

startApplication(deviceId, appIdentifier, options) {
// simctl launch command does not launch the process immediately and we have to wait a little bit,
// just to ensure all related processes and services are alive.
const launchResult = this.simctl.launch(deviceId, appIdentifier, options);

@@ -77,2 +80,3 @@ utils.sleep(0.5);

if (xcodeMajorVersion && xcodeMajorVersion < 8) {
// Xcode 7.x does not have support for `xcrun simctl terminate` command
resultOfTermination = childProcess.execSync(`killall ${bundleExecutable}`, { skipError: true });

@@ -83,2 +87,5 @@ }

}
// killall command does not terminate the processes immediately and we have to wait a little bit,
// just to ensure all related processes and services are dead.
// Same is valid for simctl terminate when Simulator's OS version is below 10.
utils.sleep(0.5);

@@ -148,3 +155,7 @@ return resultOfTermination;

startSimulator(options, device) {
if (!device && options.device) {
this.verifyDevice(options.device);
}
device = device || this.getDeviceToRun(options);
// In case the id is undefined, skip verification - we'll start default simulator.
if (device && device.id) {

@@ -160,2 +171,3 @@ this.verifyDevice(device);

if (isSimulatorAppRunning) {
// In case user closes simulator window but simulator app is still alive
if (!haveBootedDevices) {

@@ -170,2 +182,5 @@ device = this.getDeviceToRun(options);

common.startSimulator(device.id);
// startSimulaltor doesn't always finish immediately, and the subsequent
// install fails since the simulator is not running.
// Give it some time to start before we attempt installing.
utils.sleep(1);

@@ -190,4 +205,5 @@ }

const availableDevices = this.getDevices();
if (!_.find(availableDevices, { id: device.id }) && !_.find(availableDevices, { name: device.id })) {
errors.fail(`No simulator image available for device identifier '${device.id}'.`);
const deviceId = device.id || device;
if (!_.find(availableDevices, { id: deviceId }) && !_.find(availableDevices, { name: deviceId })) {
errors.fail(`No simulator image available for device identifier '${deviceId}'.`);
}

@@ -205,1 +221,2 @@ }

exports.XCodeSimctlSimulator = XCodeSimctlSimulator;
//# sourceMappingURL=iphone-simulator-xcode-simctl.js.map

@@ -56,1 +56,2 @@ "use strict";

exports.iPhoneSimulator = iPhoneSimulator;
//# sourceMappingURL=iphone-simulator.js.map

@@ -0,1 +1,2 @@

///<reference path=".d.ts"/>
"use strict";

@@ -20,2 +21,3 @@ var yargs = require("yargs");

var argv = yargs(process.argv.slice(2)).options(knownOptions).argv;
// DO NOT REMOVE { } as when they are missing and some of the option values is false, the each stops as it thinks we have set "return false".
_.each(_.keys(argv), optionName => {

@@ -25,1 +27,2 @@ parsed[optionName] = argv[optionName];

module.exports = parsed;
//# sourceMappingURL=options.js.map

@@ -52,5 +52,15 @@ "use strict";

let rawDevices = this.simctlExec("list", ["devices"]);
// expect to get a listing like
// -- iOS 8.1 --
// iPhone 4s (3CA6E7DD-220E-45E5-B716-1E992B3A429C) (Shutdown)
// ...
// -- iOS 8.2 --
// iPhone 4s (A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E) (Shutdown)
// ...
// so, get the `-- iOS X.X --` line to find the sdk (X.X)
// and the rest of the listing in order to later find the devices
let deviceSectionRegex = /-- (iOS) (.+) --(\n .+)*/mg;
let match = deviceSectionRegex.exec(rawDevices);
let matches = [];
// make an entry for each sdk version
while (match !== null) {

@@ -63,6 +73,17 @@ matches.push(match);

}
// get all the devices for each sdk
let devices = [];
for (match of matches) {
let sdk = match[2];
// split the full match into lines and remove the first
for (let line of match[0].split('\n').slice(1)) {
// a line is something like
// iPhone 4s (A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E) (Shutdown)
// iPad Air 2 (9696A8ED-3020-49FC-90D6-DAFD29A0EA8D) (Shutdown)
// iPad Pro (9.7 inch) (7FF984D4-0755-432D-BE0E-6EB44F0489CB) (Shutdown)
// iPad Pro (12.9 inch) (F02012C8-6D4D-46FF-90D7-5DF90EF579E8) (Booted)
// retrieve:
// iPhone 4s
// A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E
// Shutdown
let lineRegex = /^\s+(.*?)\s+\(([0-9A-F]{8}(?:-[0-9A-F]{4}){3}-[0-9A-F]{12})\)\s+\((.*?)\)(\s+\((?:.*?)\))?/;

@@ -101,2 +122,4 @@ let lineMatch = lineRegex.exec(line);

if (result.signal) {
// In some cases, sending Ctrl + C (SIGINT) is handled by the simctl itself and spawnSync finishes, but the SIGINT does not stop current process.
// In order to ensure the same signal is sent to the caller (CLI for example), send the signal manually:
process.send(result.signal);

@@ -115,1 +138,2 @@ }

exports.Simctl = Simctl;
//# sourceMappingURL=simctl.js.map

@@ -17,1 +17,2 @@ "use strict";

exports.sleep = sleep;
//# sourceMappingURL=utils.js.map

@@ -18,1 +18,2 @@ "use strict";

exports.getXcodeVersionData = getXcodeVersionData;
//# sourceMappingURL=xcode.js.map

5

package.json
{
"name": "ios-sim-portable",
"version": "3.4.4",
"version": "3.4.5",
"description": "",
"main": "./lib/ios-sim.js",
"scripts": {
"prepublish": "node prepublish.js",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -46,2 +47,2 @@ },

}
}
}
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