ios-sim-portable
Advanced tools
Comparing version 1.0.13-beta to 1.0.13-gamma
///<reference path="./.d.ts"/> | ||
"use strict"; | ||
var fs = require("fs"); | ||
var path = require("path"); | ||
require("colors"); | ||
@@ -17,7 +19,10 @@ var errors = require("./errors"); | ||
try { | ||
var command = new (require("./commands/" + commandName).Command)(); | ||
if (!command) { | ||
errors.fail("Unable to resolve commandName %s", commandName); | ||
var filePath = path.join(__dirname, "commands", commandName + ".js"); | ||
if (fs.existsSync(filePath)) { | ||
var command = new (require(filePath).Command)(); | ||
if (!command) { | ||
errors.fail("Unable to resolve commandName %s", commandName); | ||
} | ||
command.execute(commandArguments).wait(); | ||
} | ||
command.execute(commandArguments).wait(); | ||
} | ||
@@ -24,0 +29,0 @@ catch (e) { |
@@ -5,2 +5,4 @@ ///<reference path="./.d.ts"/> | ||
import Future = require("fibers/future"); | ||
import fs = require("fs"); | ||
import path = require("path"); | ||
import util = require("util"); | ||
@@ -24,8 +26,12 @@ require("colors"); | ||
try { | ||
var command: ICommand = new (require("./commands/" + commandName).Command)(); | ||
if(!command) { | ||
errors.fail("Unable to resolve commandName %s", commandName); | ||
let filePath = path.join(__dirname, "commands", commandName + ".js"); | ||
if(fs.existsSync(filePath)) { | ||
var command: ICommand = new (require(filePath).Command)(); | ||
if(!command) { | ||
errors.fail("Unable to resolve commandName %s", commandName); | ||
} | ||
command.execute(commandArguments).wait(); | ||
} | ||
command.execute(commandArguments).wait(); | ||
} catch(e) { | ||
@@ -32,0 +38,0 @@ if(options.debug) { |
{ | ||
"name": "ios-sim-portable", | ||
"version": "1.0.13-beta", | ||
"version": "1.0.13-gamma", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/ios-sim.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
301150
8874
6