ios-sim-portable
Advanced tools
Comparing version 1.0.9-beta to 1.0.10-alpha
#!/usr/bin/env node | ||
require("../lib/ios-sim.js"); |
@@ -0,0 +0,0 @@ //grunt-start |
///<reference path="./.d.ts"/> | ||
"use strict"; | ||
require("colors"); | ||
var errors = require("./errors"); | ||
var options = require("./options"); | ||
var CommandExecutor = (function () { | ||
@@ -14,9 +12,7 @@ function CommandExecutor() { | ||
var commandArguments = this.getCommandArguments(); | ||
return this.executeCore(commandName, commandArguments); | ||
}; | ||
CommandExecutor.prototype.executeCore = function (commandName, commandArguments) { | ||
return (function () { | ||
try { | ||
try { | ||
var command = new (require("./commands/" + commandName).Command)(); | ||
@@ -26,8 +22,9 @@ if (!command) { | ||
} | ||
command.execute(commandArguments).wait(); | ||
} catch (e) { | ||
} | ||
catch (e) { | ||
if (options.debug) { | ||
throw e; | ||
} else { | ||
} | ||
else { | ||
console.log("\x1B[31;1m" + e.message + "\x1B[0m"); | ||
@@ -38,3 +35,2 @@ } | ||
}; | ||
CommandExecutor.prototype.getCommandArguments = function () { | ||
@@ -44,3 +40,2 @@ var remaining = options._; | ||
}; | ||
CommandExecutor.prototype.getCommandName = function () { | ||
@@ -53,2 +48,2 @@ var remaining = options._; | ||
exports.CommandExecutor = CommandExecutor; | ||
//# sourceMappingURL=command-executor.js.map | ||
//# sourceMappingURL=command-executor.js.map |
@@ -0,0 +0,0 @@ ///<reference path="./.d.ts"/> |
///<reference path=".././.d.ts"/> | ||
"use strict"; | ||
var iphoneSimulatorLibPath = require("./../iphone-simulator"); | ||
var Command = (function () { | ||
@@ -15,2 +14,2 @@ function Command() { | ||
exports.Command = Command; | ||
//# sourceMappingURL=device-types.js.map | ||
//# sourceMappingURL=device-types.js.map |
@@ -0,0 +0,0 @@ ///<reference path=".././.d.ts"/> |
@@ -6,3 +6,2 @@ ///<reference path=".././.d.ts"/> | ||
var util = require("util"); | ||
var Command = (function () { | ||
@@ -18,5 +17,3 @@ function Command() { | ||
} | ||
var helpContent = fs.readFileSync(path.join(__dirname, "../../resources/help.txt")).toString(); | ||
var pattern = util.format("--\\[%s\\]--((.|[\\r\\n])+?)--\\[/\\]--", _this.escape(topic)); | ||
@@ -31,3 +28,2 @@ var regex = new RegExp(pattern); | ||
}; | ||
Command.prototype.escape = function (s) { | ||
@@ -39,2 +35,2 @@ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); | ||
exports.Command = Command; | ||
//# sourceMappingURL=help.js.map | ||
//# sourceMappingURL=help.js.map |
@@ -0,0 +0,0 @@ ///<reference path=".././.d.ts"/> |
///<reference path=".././.d.ts"/> | ||
"use strict"; | ||
var iphoneSimulatorLibPath = require("./../iphone-simulator"); | ||
var Command = (function () { | ||
@@ -15,2 +14,2 @@ function Command() { | ||
exports.Command = Command; | ||
//# sourceMappingURL=launch.js.map | ||
//# sourceMappingURL=launch.js.map |
@@ -0,0 +0,0 @@ ///<reference path=".././.d.ts"/> |
///<reference path=".././.d.ts"/> | ||
"use strict"; | ||
var iphoneSimulatorLibPath = require("./../iphone-simulator"); | ||
var Command = (function () { | ||
@@ -15,2 +14,2 @@ function Command() { | ||
exports.Command = Command; | ||
//# sourceMappingURL=notify-post.js.map | ||
//# sourceMappingURL=notify-post.js.map |
@@ -0,0 +0,0 @@ ///<reference path=".././.d.ts"/> |
///<reference path=".././.d.ts"/> | ||
"use strict"; | ||
var iphoneSimulatorLibPath = require("./../iphone-simulator"); | ||
var Command = (function () { | ||
@@ -15,2 +14,2 @@ function Command() { | ||
exports.Command = Command; | ||
//# sourceMappingURL=sdks.js.map | ||
//# sourceMappingURL=sdks.js.map |
@@ -0,0 +0,0 @@ ///<reference path=".././.d.ts"/> |
///<reference path="./.d.ts"/> | ||
"use strict"; | ||
//# sourceMappingURL=declarations.js.map | ||
//# sourceMappingURL=declarations.js.map |
@@ -20,3 +20,3 @@ ///<reference path="./.d.ts"/> | ||
interface IDevice { | ||
device: any; // nodobjc wrapper to device | ||
device: any; // NodObjC wrapper to device | ||
deviceIdentifier: string; | ||
@@ -23,0 +23,0 @@ fullDeviceIdentifier: string; |
@@ -0,0 +0,0 @@ // Type definitions for node-fibers |
@@ -0,0 +0,0 @@ /************************************************ |
@@ -1,2 +0,2 @@ | ||
declare module "nodobjc" { | ||
declare module "NodObjC" { | ||
export function importFramework(frameworkName: string): void; | ||
@@ -3,0 +3,0 @@ export var classDefinition: IClass; |
///<reference path="./.d.ts"/> | ||
"use strict"; | ||
var util = require("util"); | ||
function fail(errorMessage) { | ||
var args = []; | ||
for (var _i = 0; _i < (arguments.length - 1); _i++) { | ||
args[_i] = arguments[_i + 1]; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
args[_i - 1] = arguments[_i]; | ||
} | ||
@@ -14,2 +13,2 @@ args.unshift(errorMessage); | ||
exports.fail = fail; | ||
//# sourceMappingURL=errors.js.map | ||
//# sourceMappingURL=errors.js.map |
@@ -0,0 +0,0 @@ ///<reference path="./.d.ts"/> |
///<reference path="./.d.ts"/> | ||
"use strict"; | ||
global._ = require("lodash"); | ||
var Fiber = require("fibers"); | ||
var Future = require("fibers/future"); | ||
var commandExecutorLibPath = require("./command-executor"); | ||
var fiber = Fiber(function () { | ||
@@ -15,4 +12,3 @@ var commandExecutor = new commandExecutorLibPath.CommandExecutor(); | ||
}); | ||
fiber.run(); | ||
//# sourceMappingURL=ios-sim.js.map | ||
//# sourceMappingURL=ios-sim.js.map |
@@ -0,0 +0,0 @@ ///<reference path="./.d.ts"/> |
///<reference path="./.d.ts"/> | ||
"use strict"; | ||
var options = require("./options"); | ||
var $ = require("nodobjc"); | ||
var $ = require("NodObjC"); | ||
var XCode5Simulator = (function () { | ||
@@ -17,3 +15,2 @@ function XCode5Simulator() { | ||
}); | ||
Object.defineProperty(XCode5Simulator.prototype, "deviceIdentifiersInfo", { | ||
@@ -26,7 +23,5 @@ get: function () { | ||
}); | ||
XCode5Simulator.prototype.setSimulatedDevice = function (config) { | ||
config("setSimulatedDeviceInfoName", $(this.deviceIdentifier)); | ||
}; | ||
Object.defineProperty(XCode5Simulator.prototype, "deviceIdentifier", { | ||
@@ -41,3 +36,2 @@ get: function () { | ||
XCode5Simulator.DEFAULT_DEVICE_IDENTIFIER = "iPhone"; | ||
XCode5Simulator.allowedDeviceIdentifiers = { | ||
@@ -55,2 +49,2 @@ "iPhone": "iPhone", | ||
exports.XCode5Simulator = XCode5Simulator; | ||
//# sourceMappingURL=iphone-simulator-xcode-5.js.map | ||
//# sourceMappingURL=iphone-simulator-xcode-5.js.map |
@@ -9,3 +9,3 @@ ///<reference path="./.d.ts"/> | ||
var $ = require("nodobjc"); | ||
var $ = require("NodObjC"); | ||
@@ -12,0 +12,0 @@ export class XCode5Simulator implements ISimulator { |
@@ -5,7 +5,5 @@ ///<reference path="./.d.ts"/> | ||
var options = require("./options"); | ||
var util = require("util"); | ||
var os = require("os"); | ||
var $ = require("nodobjc"); | ||
var $ = require("NodObjC"); | ||
var XCode6Simulator = (function () { | ||
@@ -18,5 +16,3 @@ function XCode6Simulator() { | ||
var devices = this.getDevicesInfo(); | ||
return _.map(devices, function (device) { | ||
return device.deviceIdentifier; | ||
}); | ||
return _.map(devices, function (device) { return device.deviceIdentifier; }); | ||
}, | ||
@@ -26,9 +22,6 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(XCode6Simulator.prototype, "deviceIdentifiersInfo", { | ||
get: function () { | ||
var devices = this.getDevicesInfo(); | ||
return _.map(devices, function (device) { | ||
return util.format("Device Identifier: %s. %sRuntime Version: %s %s", device.fullDeviceIdentifier, os.EOL, device.runtimeVersion, os.EOL); | ||
}); | ||
return _.map(devices, function (device) { return util.format("Device Identifier: %s. %sRuntime Version: %s %s", device.fullDeviceIdentifier, os.EOL, device.runtimeVersion, os.EOL); }); | ||
}, | ||
@@ -38,3 +31,2 @@ enumerable: true, | ||
}); | ||
XCode6Simulator.prototype.setSimulatedDevice = function (config) { | ||
@@ -44,11 +36,11 @@ var device = this.getDeviceByIdentifier(this.deviceIdentifier); | ||
}; | ||
XCode6Simulator.prototype.getSimulatedDevice = function () { | ||
return this.getDeviceByIdentifier(this.deviceIdentifier); | ||
}; | ||
XCode6Simulator.prototype.getDevicesInfo = function () { | ||
return _(this.getAvailableDevices()).map(_.identity).flatten().value(); | ||
return _(this.getAvailableDevices()) | ||
.map(_.identity) | ||
.flatten() | ||
.value(); | ||
}; | ||
Object.defineProperty(XCode6Simulator.prototype, "deviceIdentifier", { | ||
@@ -61,3 +53,2 @@ get: function () { | ||
}); | ||
XCode6Simulator.prototype.getAvailableDevices = function () { | ||
@@ -71,13 +62,9 @@ if (_.isEmpty(this.availableDevices)) { | ||
var device = devices("objectAtIndex", index); | ||
var deviceIdentifier = device("deviceType")("identifier").toString(); | ||
var deviceIdentifierPrefixIndex = deviceIdentifier.indexOf(XCode6Simulator.DEVICE_IDENTIFIER_PREFIX); | ||
var deviceIdentifierWithoutPrefix = deviceIdentifier.substring(deviceIdentifierPrefixIndex + XCode6Simulator.DEVICE_IDENTIFIER_PREFIX.length + 1); | ||
var runtimeVersion = device("runtime")("versionString").toString(); | ||
if (!this.availableDevices[deviceIdentifier]) { | ||
this.availableDevices[deviceIdentifier] = []; | ||
} | ||
this.availableDevices[deviceIdentifier].push({ | ||
@@ -92,6 +79,4 @@ device: device, | ||
} | ||
return this.availableDevices; | ||
}; | ||
XCode6Simulator.prototype.getDeviceByIdentifier = function (deviceIdentifier) { | ||
@@ -106,6 +91,4 @@ var availableDevices = this.getAvailableDevices(); | ||
} | ||
errors.fail("Unable to find device with identifier ", deviceIdentifier); | ||
}; | ||
XCode6Simulator.prototype.buildFullDeviceIdentifier = function (deviceIdentifier) { | ||
@@ -119,2 +102,2 @@ return util.format("%s.%s", XCode6Simulator.DEVICE_IDENTIFIER_PREFIX, deviceIdentifier); | ||
exports.XCode6Simulator = XCode6Simulator; | ||
//# sourceMappingURL=iphone-simulator-xcode-6.js.map | ||
//# sourceMappingURL=iphone-simulator-xcode-6.js.map |
@@ -8,3 +8,3 @@ ///<reference path="./.d.ts"/> | ||
import os = require("os"); | ||
var $ = require("nodobjc"); | ||
var $ = require("NodObjC"); | ||
@@ -11,0 +11,0 @@ export class XCode6Simulator implements ISimulator { |
@@ -9,3 +9,2 @@ ///<reference path="./.d.ts"/> | ||
var util = require("util"); | ||
var errors = require("./errors"); | ||
@@ -16,5 +15,3 @@ var options = require("./options"); | ||
var xcode5SimulatorLib = require("./iphone-simulator-xcode-5"); | ||
var $ = require("nodobjc"); | ||
var $ = require("NodObjC"); | ||
var iPhoneSimulator = (function () { | ||
@@ -27,6 +24,4 @@ function iPhoneSimulator() { | ||
} | ||
return this.execute(this.launch, { canRunMainLoop: true, appPath: appPath }); | ||
}; | ||
iPhoneSimulator.prototype.printDeviceTypes = function () { | ||
@@ -36,10 +31,6 @@ var _this = this; | ||
var simulator = _this.createSimulator(); | ||
_.each(simulator.deviceIdentifiersInfo, function (identifier) { | ||
return console.log(identifier); | ||
}); | ||
_.each(simulator.deviceIdentifiersInfo, function (identifier) { return console.log(identifier); }); | ||
}; | ||
return this.execute(action, { canRunMainLoop: false }); | ||
}; | ||
iPhoneSimulator.prototype.printSDKS = function () { | ||
@@ -51,25 +42,15 @@ var _this = this; | ||
var count = roots("count"); | ||
var sdks = []; | ||
for (var index = 0; index < count; index++) { | ||
var root = roots("objectAtIndex", index); | ||
var displayName = root("sdkDisplayName").toString(); | ||
var version = root("sdkVersion").toString(); | ||
var rootPath = root("sdkRootPath").toString(); | ||
sdks.push(new Sdk(displayName, version, rootPath)); | ||
} | ||
sdks = _.sortBy(sdks, function (sdk) { | ||
return sdk.version; | ||
}); | ||
_.each(sdks, function (sdk) { | ||
return console.log(sdk.sdkInfo() + os.EOL); | ||
}); | ||
sdks = _.sortBy(sdks, function (sdk) { return sdk.version; }); | ||
_.each(sdks, function (sdk) { return console.log(sdk.sdkInfo() + os.EOL); }); | ||
}; | ||
return this.execute(action, { canRunMainLoop: false }); | ||
}; | ||
iPhoneSimulator.prototype.sendNotification = function (notification) { | ||
@@ -79,11 +60,8 @@ if (!notification) { | ||
} | ||
var action = function () { | ||
var simulator = new xcode6SimulatorLib.XCode6Simulator(); | ||
var device = simulator.getSimulatedDevice(); | ||
if (!device) { | ||
errors.fail("Could not find device"); | ||
} | ||
var result = device("postDarwinNotification", $(notification), "error", null); | ||
@@ -94,12 +72,8 @@ if (!result) { | ||
}; | ||
return this.execute(action, { canRunMainLoop: false }); | ||
}; | ||
iPhoneSimulator.prototype.execute = function (action, opts) { | ||
$.importFramework(iPhoneSimulator.FOUNDATION_FRAMEWORK_NAME); | ||
$.importFramework(iPhoneSimulator.APPKIT_FRAMEWORK_NAME); | ||
var pool = $.NSAutoreleasePool("alloc")("init"); | ||
var developerDirectoryPath = this.findDeveloperDirectory().wait(); | ||
@@ -109,7 +83,4 @@ if (!developerDirectoryPath) { | ||
} | ||
this.loadFrameworks(developerDirectoryPath); | ||
action.apply(this, [opts.appPath]); | ||
var future = new Future(); | ||
@@ -121,3 +92,4 @@ if (opts.canRunMainLoop) { | ||
setTimeout(runLoop, 0); | ||
} else { | ||
} | ||
else { | ||
pool("release"); | ||
@@ -127,3 +99,4 @@ future.return(); | ||
}()); | ||
} else { | ||
} | ||
else { | ||
future.return(); | ||
@@ -133,3 +106,2 @@ } | ||
}; | ||
iPhoneSimulator.prototype.launch = function (appPath) { | ||
@@ -143,2 +115,3 @@ var sessionDelegate = $.NSObject.extend("DTiPhoneSimulatorSessionDelegate"); | ||
iPhoneSimulator.logSessionInfo(error, "Session started without errors.", "Session started with error "); | ||
console.log(appPath + ": " + session("simulatedApplicationPID")); | ||
if (options.exit) { | ||
@@ -149,10 +122,8 @@ process.exit(0); | ||
sessionDelegate.register(); | ||
var appSpec = this.getClassByName("DTiPhoneSimulatorApplicationSpecifier")("specifierWithApplicationPath", $(appPath)); | ||
var config = this.getClassByName("DTiPhoneSimulatorSessionConfig")("alloc")("init")("autorelease"); | ||
config("setApplicationToSimulateOnStart", appSpec); | ||
config("setSimulatedApplicationShouldWaitForDebugger", options.waitForDebugger); | ||
var sdkRoot = options.sdkRoot ? $(options.sdkRoot) : this.getClassByName("DTiPhoneSimulatorSystemRoot")("defaultRoot"); | ||
config("setSimulatedSystemRoot", sdkRoot); | ||
var simulator = this.createSimulator(config); | ||
@@ -166,3 +137,2 @@ if (options.device) { | ||
simulator.setSimulatedDevice(config); | ||
if (options.logging) { | ||
@@ -173,3 +143,4 @@ var logPath = this.createLogPipe(appPath).wait(); | ||
config("setSimulatedApplicationStdOutPath", $(logPath)); | ||
} else { | ||
} | ||
else { | ||
if (options.stderr) { | ||
@@ -182,14 +153,9 @@ config("setSimulatedApplicationStdErrPath", $(options.stderr)); | ||
} | ||
if (options.args) { | ||
var args = options.args.trim().split(/\s+/); | ||
var nsArgs = $.NSMutableArray("array"); | ||
args.forEach(function (x) { | ||
return nsArgs("addObject", $(x)); | ||
}); | ||
args.forEach(function (x) { return nsArgs("addObject", $(x)); }); | ||
config("setSimulatedApplicationLaunchArgs", nsArgs); | ||
} | ||
config("setLocalizedClientName", $("ios-sim-portable")); | ||
var sessionError = new Buffer(""); | ||
@@ -201,14 +167,12 @@ var timeoutParam = iPhoneSimulator.DEFAULT_TIMEOUT_IN_SECONDS; | ||
timeoutParam = parsedValue; | ||
} else { | ||
} | ||
else { | ||
console.log(util.format("Specify the timeout in number of seconds to wait. It should be greater than 0. Default value %s seconds will be used.", iPhoneSimulator.DEFAULT_TIMEOUT_IN_SECONDS.toString())); | ||
} | ||
} | ||
var time = $.NSNumber("numberWithDouble", timeoutParam); | ||
var timeout = time("doubleValue"); | ||
var session = this.getClassByName("DTiPhoneSimulatorSession")("alloc")("init")("autorelease"); | ||
var delegate = sessionDelegate("alloc")("init"); | ||
session("setDelegate", delegate); | ||
if (!session("requestStartWithConfig", config, "timeout", timeout, "error", sessionError)) { | ||
@@ -218,11 +182,8 @@ errors.fail("Could not start simulator session ", sessionError); | ||
}; | ||
iPhoneSimulator.prototype.loadFrameworks = function (developerDirectoryPath) { | ||
this.loadFramework(path.join(developerDirectoryPath, iPhoneSimulator.DVT_FOUNDATION_RELATIVE_PATH)); | ||
this.loadFramework(path.join(developerDirectoryPath, iPhoneSimulator.DEV_TOOLS_FOUNDATION_RELATIVE_PATH)); | ||
if (fs.existsSync(path.join(developerDirectoryPath, iPhoneSimulator.CORE_SIMULATOR_RELATIVE_PATH))) { | ||
this.loadFramework(path.join(developerDirectoryPath, iPhoneSimulator.CORE_SIMULATOR_RELATIVE_PATH)); | ||
} | ||
var platformsError = null; | ||
@@ -233,3 +194,2 @@ var dvtPlatformClass = this.getClassByName("DVTPlatform"); | ||
} | ||
var simulatorFrameworkPath = path.join(developerDirectoryPath, iPhoneSimulator.SIMULATOR_FRAMEWORK_RELATIVE_PATH_LEGACY); | ||
@@ -241,3 +201,2 @@ if (!fs.existsSync(simulatorFrameworkPath)) { | ||
}; | ||
iPhoneSimulator.prototype.loadFramework = function (frameworkPath) { | ||
@@ -249,3 +208,2 @@ var bundle = $.NSBundle("bundleWithPath", $(frameworkPath)); | ||
}; | ||
iPhoneSimulator.prototype.findDeveloperDirectory = function () { | ||
@@ -255,5 +213,3 @@ var future = new Future(); | ||
var capturedErr = ""; | ||
var childProcess = child_process.spawn("xcode-select", ["-print-path"]); | ||
if (childProcess.stdout) { | ||
@@ -264,3 +220,2 @@ childProcess.stdout.on("data", function (data) { | ||
} | ||
if (childProcess.stderr) { | ||
@@ -271,3 +226,2 @@ childProcess.stderr.on("data", function (data) { | ||
} | ||
childProcess.on("close", function (arg) { | ||
@@ -277,14 +231,12 @@ var exitCode = typeof arg == 'number' ? arg : arg && arg.code; | ||
future.return(capturedOut ? capturedOut.trim() : null); | ||
} else { | ||
} | ||
else { | ||
future.throw(util.format("Command xcode-select -print-path failed with exit code %s. Error output: \n %s", exitCode, capturedErr)); | ||
} | ||
}); | ||
return future; | ||
}; | ||
iPhoneSimulator.prototype.getClassByName = function (className) { | ||
return $.classDefinition.getClassByName(className); | ||
}; | ||
iPhoneSimulator.logSessionInfo = function (error, successfulMessage, errorMessage) { | ||
@@ -295,6 +247,4 @@ if (error) { | ||
} | ||
console.log(successfulMessage); | ||
}; | ||
iPhoneSimulator.prototype.createSimulator = function (config) { | ||
@@ -304,17 +254,14 @@ if (!config) { | ||
} | ||
var simulator; | ||
if (_.contains(config.methods(), "setDevice:")) { | ||
simulator = new xcode6SimulatorLib.XCode6Simulator(); | ||
} else { | ||
} | ||
else { | ||
simulator = new xcode5SimulatorLib.XCode5Simulator(); | ||
} | ||
return simulator; | ||
}; | ||
iPhoneSimulator.prototype.createLogPipe = function (appPath) { | ||
var future = new Future(); | ||
var logPath = path.join(path.dirname(appPath), "." + path.basename(appPath, ".app") + ".log"); | ||
var command = util.format("rm -f \"%s\" && mkfifo \"%s\"", logPath, logPath); | ||
@@ -324,7 +271,7 @@ child_process.exec(command, function (error, stdout, stderr) { | ||
future.throw(error); | ||
} else { | ||
} | ||
else { | ||
future.return(logPath); | ||
} | ||
}); | ||
return future; | ||
@@ -334,3 +281,2 @@ }; | ||
iPhoneSimulator.APPKIT_FRAMEWORK_NAME = "AppKit"; | ||
iPhoneSimulator.DVT_FOUNDATION_RELATIVE_PATH = "../SharedFrameworks/DVTFoundation.framework"; | ||
@@ -341,3 +287,2 @@ iPhoneSimulator.DEV_TOOLS_FOUNDATION_RELATIVE_PATH = "../OtherFrameworks/DevToolsFoundation.framework"; | ||
iPhoneSimulator.SIMULATOR_FRAMEWORK_RELATIVE_PATH = "../SharedFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; | ||
iPhoneSimulator.DEFAULT_TIMEOUT_IN_SECONDS = 90; | ||
@@ -347,3 +292,2 @@ return iPhoneSimulator; | ||
exports.iPhoneSimulator = iPhoneSimulator; | ||
var Sdk = (function () { | ||
@@ -356,4 +300,3 @@ function Sdk(displayName, version, rootPath) { | ||
Sdk.prototype.sdkInfo = function () { | ||
return [ | ||
util.format(" Display Name: %s", this.displayName), | ||
return [util.format(" Display Name: %s", this.displayName), | ||
util.format(" Version: %s", this.version), | ||
@@ -364,2 +307,2 @@ util.format(" Root path: %s", this.rootPath)].join(os.EOL); | ||
})(); | ||
//# sourceMappingURL=iphone-simulator.js.map | ||
//# sourceMappingURL=iphone-simulator.js.map |
@@ -17,3 +17,3 @@ ///<reference path="./.d.ts"/> | ||
var $ = require("nodobjc"); | ||
var $ = require("NodObjC"); | ||
@@ -136,2 +136,4 @@ export class iPhoneSimulator implements IiPhoneSimulator { | ||
iPhoneSimulator.logSessionInfo(error, "Session started without errors.", "Session started with error "); | ||
console.log(`${appPath}: ${session("simulatedApplicationPID")}`); | ||
if(options.exit) { | ||
@@ -146,2 +148,3 @@ process.exit(0); | ||
config("setApplicationToSimulateOnStart", appSpec); | ||
config("setSimulatedApplicationShouldWaitForDebugger", options.waitForDebugger); | ||
@@ -148,0 +151,0 @@ var sdkRoot = options.sdkRoot ? $(options.sdkRoot) : this.getClassByName("DTiPhoneSimulatorSystemRoot")("defaultRoot"); |
///<reference path=".d.ts"/> | ||
"use strict"; | ||
var yargs = require("yargs"); | ||
var knownOptions = { | ||
@@ -15,7 +14,6 @@ "debug": Boolean, | ||
"help": Boolean, | ||
"logging": Boolean | ||
"logging": Boolean, | ||
"waitForDebugger": Boolean | ||
}; | ||
var parsed = {}; | ||
_.each(_.keys(knownOptions), function (opt) { | ||
@@ -25,12 +23,9 @@ var type = knownOptions[opt]; | ||
yargs.string(opt); | ||
} else if (type === Boolean) { | ||
} | ||
else if (type === Boolean) { | ||
yargs.boolean(opt); | ||
} | ||
}); | ||
_.each(_.keys(yargs.argv), function (opt) { | ||
return parsed[opt] = yargs.argv[opt]; | ||
}); | ||
_.each(_.keys(yargs.argv), function (opt) { return parsed[opt] = yargs.argv[opt]; }); | ||
module.exports = parsed; | ||
//# sourceMappingURL=options.js.map | ||
//# sourceMappingURL=options.js.map |
@@ -16,3 +16,4 @@ ///<reference path=".d.ts"/> | ||
"help": Boolean, | ||
"logging": Boolean | ||
"logging": Boolean, | ||
"waitForDebugger": Boolean | ||
}; | ||
@@ -19,0 +20,0 @@ |
@@ -6,2 +6,2 @@ function stringify(arr, delimiter) { | ||
exports.stringify = stringify; | ||
//# sourceMappingURL=utils.js.map | ||
//# sourceMappingURL=utils.js.map |
@@ -0,0 +0,0 @@ export function stringify(arr: string[], delimiter?: string): string { |
{ | ||
"name": "ios-sim-portable", | ||
"version": "1.0.9-beta", | ||
"version": "1.0.10-alpha", | ||
"description": "", | ||
@@ -29,12 +29,12 @@ "main": "./lib/ios-sim.js", | ||
"dependencies": { | ||
"NodObjC": "https://github.com/telerik/NodObjC/tarball/v1.0.0.0", | ||
"colors": "0.6.2", | ||
"fibers": "https://github.com/icenium/node-fibers/tarball/v1.0.6.0", | ||
"lodash": "3.2.0", | ||
"nodobjc": "https://github.com/telerik/NodObjC/tarball/v2.0.0.0", | ||
"yargs": "1.2.2" | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-clean": "0.5.0", | ||
"grunt": "0.4.2", | ||
"grunt-ts": "1.11.2" | ||
"grunt-contrib-clean": "0.6.0", | ||
"grunt": "0.4.5", | ||
"grunt-ts": "4.2.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "engines": { |
@@ -0,0 +0,0 @@ var fs = require("fs"); |
@@ -0,0 +0,0 @@ ios-sim-portable |
@@ -0,0 +0,0 @@ --[]-- |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
266116
8001