Comparing version 0.2.1 to 0.3.0
@@ -21,3 +21,9 @@ (function() { | ||
io.on("connection", function(socket) { | ||
var convertErrorToEmit, emitResult, runWithPromise, runWithCallback, run; | ||
var serverRequire, convertErrorToEmit, emitResult, runWithPromise, runWithCallback, run; | ||
serverRequire = function(path) { | ||
if (path[0] === ".") { | ||
path = process.cwd() + "/" + path; | ||
} | ||
return require(path); | ||
}; | ||
convertErrorToEmit = function(options, run) { | ||
@@ -84,5 +90,5 @@ var gen2_asyncResult; | ||
return socket.on("stop", function(options) { | ||
var task, gen4_asyncResult; | ||
var runningTask, gen4_asyncResult; | ||
return new Promise(function(gen3_onFulfilled) { | ||
task = function() { | ||
runningTask = function() { | ||
var gen5_results, gen6_items, gen7_i, task; | ||
@@ -102,9 +108,9 @@ gen5_results = []; | ||
gen3_onFulfilled(Promise.resolve(function() { | ||
if (task) { | ||
if (runningTask) { | ||
return new Promise(function(gen3_onFulfilled) { | ||
gen3_onFulfilled(gen1_promisify(function(gen8_callback) { | ||
return task.stop(gen8_callback); | ||
return runningTask.stop(gen8_callback); | ||
}).then(function(gen9_asyncResult) { | ||
gen9_asyncResult; | ||
tasks.splice(tasks.indexOf(task), 1); | ||
tasks.splice(tasks.indexOf(runningTask), 1); | ||
return socket.emit("stopped:" + options.id); | ||
@@ -111,0 +117,0 @@ })); |
{ | ||
"name": "censeo", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Run arbitrary JavaScript or PogoScript on a server", | ||
@@ -5,0 +5,0 @@ "author": "Derek Ekins <derek@spathi.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12406
199
1