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

vm2

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vm2 - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

lib/cli.js

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
var NodeVM, VMError, ex, fs, pa, path, stack, started, _ref;

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

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

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
var contextify, global;

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

@@ -1,9 +0,11 @@

// Generated by CoffeeScript 1.8.0
var AVAILABLE_NATIVE_MODULES, EventEmitter, NodeVM, VM, VMError, cf, fs, pa, sb, ut, vm, _compileToJS, _prepareContextify,
// Generated by CoffeeScript 1.9.0
var AVAILABLE_NATIVE_MODULES, EventEmitter, NodeVM, VM, VMError, cf, fs, pa, sb, ut, version, vm, _compileToJS, _prepareContextify,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
if (!process.versions.node.match(/^0\.[1-9][1-9]\./)) {
throw new Error("vm2 requires node.js version 0.11 or later (current version: " + process.versions.node + ")");
version = process.versions.node.split('.');
if (parseInt(version[0]) === 0 && parseInt(version[1]) < 11) {
throw new Error("vm2 requires Node.js version 0.11+ or io.js 1.0+ (current version: " + process.versions.node + ")");
}

@@ -21,5 +23,5 @@

sb = fs.readFileSync("" + __dirname + "/sandbox.js", "utf8");
sb = fs.readFileSync(__dirname + "/sandbox.js", "utf8");
cf = fs.readFileSync("" + __dirname + "/contextify.js", "utf8");
cf = fs.readFileSync(__dirname + "/contextify.js", "utf8");

@@ -338,18 +340,18 @@ AVAILABLE_NATIVE_MODULES = ['assert', 'buffer', 'child_process', 'crypto', 'tls', 'dgram', 'dns', 'http', 'https', 'net', 'querystring', 'url', 'domain', 'events', 'fs', 'path', 'os', 'stream', 'string_decoder', 'timers', 'tty', 'util', 'sys', 'vm', 'zlib'];

if (global.DTRACE_HTTP_SERVER_RESPONSE) {
parent.DTRACE_HTTP_SERVER_RESPONSE = DTRACE_HTTP_SERVER_RESPONSE;
parent.DTRACE_HTTP_SERVER_REQUEST = DTRACE_HTTP_SERVER_REQUEST;
parent.DTRACE_HTTP_CLIENT_RESPONSE = DTRACE_HTTP_CLIENT_RESPONSE;
parent.DTRACE_HTTP_CLIENT_REQUEST = DTRACE_HTTP_CLIENT_REQUEST;
parent.DTRACE_NET_STREAM_END = DTRACE_NET_STREAM_END;
parent.DTRACE_NET_SERVER_CONNECTION = DTRACE_NET_SERVER_CONNECTION;
parent.DTRACE_NET_SOCKET_READ = DTRACE_NET_SOCKET_READ;
parent.DTRACE_NET_SOCKET_WRITE = DTRACE_NET_SOCKET_WRITE;
parent.DTRACE_HTTP_SERVER_RESPONSE = global.DTRACE_HTTP_SERVER_RESPONSE;
parent.DTRACE_HTTP_SERVER_REQUEST = global.DTRACE_HTTP_SERVER_REQUEST;
parent.DTRACE_HTTP_CLIENT_RESPONSE = global.DTRACE_HTTP_CLIENT_RESPONSE;
parent.DTRACE_HTTP_CLIENT_REQUEST = global.DTRACE_HTTP_CLIENT_REQUEST;
parent.DTRACE_NET_STREAM_END = global.DTRACE_NET_STREAM_END;
parent.DTRACE_NET_SERVER_CONNECTION = global.DTRACE_NET_SERVER_CONNECTION;
parent.DTRACE_NET_SOCKET_READ = global.DTRACE_NET_SOCKET_READ;
parent.DTRACE_NET_SOCKET_WRITE = global.DTRACE_NET_SOCKET_WRITE;
}
if (global.COUNTER_NET_SERVER_CONNECTION) {
parent.COUNTER_NET_SERVER_CONNECTION = COUNTER_NET_SERVER_CONNECTION;
parent.COUNTER_NET_SERVER_CONNECTION_CLOSE = COUNTER_NET_SERVER_CONNECTION_CLOSE;
parent.COUNTER_HTTP_SERVER_REQUEST = COUNTER_HTTP_SERVER_REQUEST;
parent.COUNTER_HTTP_SERVER_RESPONSE = COUNTER_HTTP_SERVER_RESPONSE;
parent.COUNTER_HTTP_CLIENT_REQUEST = COUNTER_HTTP_CLIENT_REQUEST;
parent.COUNTER_HTTP_CLIENT_RESPONSE = COUNTER_HTTP_CLIENT_RESPONSE;
parent.COUNTER_NET_SERVER_CONNECTION = global.COUNTER_NET_SERVER_CONNECTION;
parent.COUNTER_NET_SERVER_CONNECTION_CLOSE = global.COUNTER_NET_SERVER_CONNECTION_CLOSE;
parent.COUNTER_HTTP_SERVER_REQUEST = global.COUNTER_HTTP_SERVER_REQUEST;
parent.COUNTER_HTTP_SERVER_RESPONSE = global.COUNTER_HTTP_SERVER_RESPONSE;
parent.COUNTER_HTTP_CLIENT_REQUEST = global.COUNTER_HTTP_CLIENT_REQUEST;
parent.COUNTER_HTTP_CLIENT_RESPONSE = global.COUNTER_HTTP_CLIENT_RESPONSE;
}

@@ -356,0 +358,0 @@ this.context = vm.createContext();

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
var EXTENSIONS, NATIVE_MODULES, Script, fs, noop, pa,
__slice = [].slice,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;

@@ -47,14 +47,14 @@ fs = parent.require('fs');

}
if (fs.existsSync("" + path + ".js")) {
return "" + path + ".js";
if (fs.existsSync(path + ".js")) {
return path + ".js";
}
if (fs.existsSync("" + path + ".node")) {
return "" + path + ".node";
if (fs.existsSync(path + ".node")) {
return path + ".node";
}
if (fs.existsSync("" + path + ".json")) {
return "" + path + ".json";
if (fs.existsSync(path + ".json")) {
return path + ".json";
}
if (fs.existsSync("" + path + "/package.json")) {
if (fs.existsSync(path + "/package.json")) {
try {
pkg = JSON.parse(fs.readFileSync("" + path + "/package.json", "utf8"));
pkg = JSON.parse(fs.readFileSync(path + "/package.json", "utf8"));
if (pkg.main == null) {

@@ -67,9 +67,9 @@ pkg.main = "index.js";

}
return _resolveFilename("" + path + "/" + pkg.main);
return _resolveFilename(path + "/" + pkg.main);
}
if (fs.existsSync("" + path + "/index.js")) {
return "" + path + "/index.js";
if (fs.existsSync(path + "/index.js")) {
return path + "/index.js";
}
if (fs.existsSync("" + path + "/index.node")) {
return "" + path + "/index.node";
if (fs.existsSync(path + "/index.node")) {
return path + "/index.node";
}

@@ -89,3 +89,3 @@ return null;

script = new Script("(function (exports, require, module, process) { 'use strict'; " + NATIVE_MODULES[modulename] + " \n});", {
filename: "" + modulename + ".sb.js"
filename: modulename + ".sb.js"
});

@@ -125,3 +125,3 @@ vm.natives[modulename] = module = {

if (/^(\.\/|\.\.\/)/.exec(modulename)) {
filename = _resolveFilename("" + current_dirname + "/" + modulename);
filename = _resolveFilename(current_dirname + "/" + modulename);
} else if (/^(\/|\\|[a-zA-Z]:\\)/.exec(modulename)) {

@@ -128,0 +128,0 @@ filename = _resolveFilename(modulename);

@@ -16,3 +16,3 @@ {

],
"version": "0.2.1",
"version": "0.2.2",
"main": "index.js",

@@ -19,0 +19,0 @@ "repository": {

@@ -26,3 +26,3 @@ # vm2 [![Dependency Status](https://david-dm.org/patriksimek/vm2.png)](https://david-dm.org/patriksimek/vm2) [![NPM version](https://badge.fury.io/js/vm2.png)](http://badge.fury.io/js/vm2) [![Build Status](https://secure.travis-ci.org/patriksimek/vm2.png)](http://travis-ci.org/patriksimek/vm2)

**IMPORTANT: Requires Node.js 0.11.x**
**IMPORTANT: Requires Node.js 0.11+ / io.js 1.0+**

@@ -29,0 +29,0 @@ npm install vm2

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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