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

rookout

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rookout - npm Package Compare versions

Comparing version 0.1.53 to 0.1.54

com/AgentComWs.js

17

config.js

@@ -30,4 +30,4 @@ "use strict";

this.VersionConfiguration = {
VERSION: "0.1.53",
COMMIT: "8b695dabdad01c0d3284b58c017ccb2a8a3d2faa"
VERSION: "0.1.54",
COMMIT: "fadb0503ecd3ee57d058de6340b344b30b201fae"
};

@@ -51,3 +51,8 @@ this.DefaultConfiguration = {

GRPC_TIMEOUT: 2,
REQUEST_TIMEOUT_SECS: 30
REQUEST_TIMEOUT_SECS: 30,
WS_CONNECT_TIMEOUT: 2,
WS_PING_TIMEOUT: 30,
WS_PING_INTERVAL: 10,
WS_RESET_BACKOFF_TIMEOUT: 3 * 60,
MAX_QUEUED_MESSAGES: 500
};

@@ -60,2 +65,8 @@ this.OutputConfiguration = {

};
this.OutputWsConfiguration = {
BUCKET_WINDOW: 10,
MAX_ITEMS: 100,
MAX_LOG_ITEMS: 200,
MAX_STATUS_UPDATES: 200
};
this.InstrumentationConfig = {

@@ -62,0 +73,0 @@ ENGINE: "auto",

2

git.js

@@ -8,3 +8,3 @@ "use strict";

function _wrapRegExp(re, groups) { _wrapRegExp = function (re, groups) { return new BabelRegExp(re, groups); }; var _RegExp = _wrapNativeSuper(RegExp); var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, groups) { var _this = _RegExp.call(this, re); _groups.set(_this, groups); return _this; } _inherits(BabelRegExp, _RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = []; args.push.apply(args, arguments); if (typeof args[args.length - 1] !== "object") { args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(groups).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
function _wrapRegExp(re, groups) { _wrapRegExp = function (re, groups) { return new BabelRegExp(re, groups); }; var _RegExp = _wrapNativeSuper(RegExp); var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, groups) { var _this = _RegExp.call(this, re); _groups.set(_this, groups); return _this; } _inherits(BabelRegExp, _RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = []; args.push.apply(args, arguments); if (typeof args[args.length - 1] !== "object") { args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }

@@ -11,0 +11,0 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

{
"name": "rookout",
"commit": "8b695dabdad01c0d3284b58c017ccb2a8a3d2faa",
"version": "0.1.53",
"commit": "fadb0503ecd3ee57d058de6340b344b30b201fae",
"version": "0.1.54",
"description": "Rook is a package for on the fly debugging and data extraction for applications in production",

@@ -11,9 +11,11 @@ "main": "index.js",

"scripts": {
"test": "jest",
"test": "npm run protobuf2 && jest",
"grpc": "mkdir -p src/static_codegen/ && grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./src/static_codegen/ --grpc_out=./src/static_codegen -I=../../../interfaces/protobuf ../../../interfaces/protobuf/rook.proto",
"protobuf2": "ls -l ../../../interfaces2 && mkdir -p src/protobuf2/ && protoc --js_out=import_style=commonjs,binary:./src/protobuf2/ -I ../../../interfaces2/proto -I ../../../interfaces2/proto/include ../../../interfaces2/proto/*.proto",
"perf": "babel-node ./tests/debugger_service_perfomance.js",
"build:package": "cp package.json package-lock.json README.md LICENSE output/npm && cd output/npm && npm pack",
"build:package:windows": "robocopy . output/npm package.json package-lock.json README.md LICENSE /is /it || cd output/npm && npm pack",
"build": "babel src --out-dir output/npm --ignore *.test.* -s true && npm run build:package",
"build:windows": "babel src --out-dir output/npm --ignore *.test.* -s true && npm run build:package:windows"
"build": "npm run protobuf2 && babel src --out-dir output/npm --ignore *.test.* -s true && npm run build:package",
"build:windows": "babel src --out-dir output/npm --ignore *.test.* -s true && npm run build:package:windows",
"run_rook": "cp run_rook.js src/ && babel src --out-dir output/local --ignore *.test.* -s true && node $NODE_DEBUG_OPTION ./output/local/run_rook.js sleep"
},

@@ -35,7 +37,7 @@ "author": "",

"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/core": "^7.4.0",
"@babel/polyfill": "^7.2.5",
"@babel/preset-env": "^7.3.1",
"@babel/preset-env": "^7.4.2",
"@babel/register": "^7.4.0",
"@types/jest": "^24.0.0",
"babel-jest": "^24.1.0",
"babel-plugin-transform-builtin-extend": "^1.1.2",

@@ -45,3 +47,3 @@ "babel-plugin-transform-define": "^1.3.1",

"grpc-tools": "^1.6.6",
"jest": "^24.1.0",
"jest": "^24.5.0",
"sleep": "^6.0.0",

@@ -55,4 +57,5 @@ "ts-jest": "^23.10.5",

"crypto-js": "^3.1.9-1",
"getos": "^3.1.1",
"google-protobuf": "^3.5.0",
"grpc": "^1.16.1",
"grpc": "^1.19.0",
"ip": "^1.1.5",

@@ -62,3 +65,5 @@ "lock": "^1.1.0",

"source-map-resolve": "^0.5.1",
"source-map-support": "^0.5.0"
"source-map-support": "^0.5.0",
"uuid": "^3.3.2",
"ws": "^6.2.1"
},

@@ -65,0 +70,0 @@ "bin": {

@@ -378,2 +378,7 @@ "use strict";

let functionName = elements[0].text + elements[1].text;
if (elements[3] instanceof ToolException_) {
throw elements[3];
}
let args = elements[3].text;

@@ -385,2 +390,7 @@ return new FunctionOperation(functionName, args);

let functionName = elements[1].text + elements[2].text;
if (elements[4] instanceof ToolException_) {
throw elements[4];
}
let args = elements[4].text;

@@ -405,2 +415,9 @@ return new FunctionOperation(functionName, args);

this.operations.push(nn);
} // Check if we have some exceptions in the operations chain - might happen if function parsing failed.
for (let op of this.operations) {
if (op instanceof ToolException_) {
return op;
}
}

@@ -562,2 +579,6 @@

} catch (e) {
if (e instanceof ToolException_) {
throw e.obj;
}
if (e instanceof _exceptions.ToolException) {

@@ -564,0 +585,0 @@ throw e;

@@ -277,2 +277,14 @@ "use strict";

});
test('read from namespace with bad arg', () => {
let namespace = new _ListNamespace.default([new _JSObjectNamespace.default(1), new _JSObjectNamespace.default(2), new _JSObjectNamespace.default(3), new _JSObjectNamespace.default(4)]);
let containerNamespace = new _ContainerNamespace.default({
a: namespace
});
const path = new _ArithmeticPath.default({
path: 'obj["test_test"].len(bad)'
});
expect(() => {
path.readFrom(containerNamespace);
}).toThrow(_exceptions.RookAttributeNotFound);
});
test('arithmetic complex array access', () => {

@@ -279,0 +291,0 @@ let namespace1 = new _ListNamespace.default([new _JSObjectNamespace.default([new _JSObjectNamespace.default(1337), new _JSObjectNamespace.default(2), new _JSObjectNamespace.default(3), new _JSObjectNamespace.default(4)])]);

@@ -8,2 +8,4 @@ "use strict";

var _CommandHandler = _interopRequireDefault(require("./com/CommandHandler"));
var _logger = require("./logger");

@@ -17,6 +19,2 @@

var _AgentCom = _interopRequireDefault(require("./com/AgentCom"));
var _exceptions = require("./exceptions");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -73,15 +71,31 @@

if (tags !== undefined) {
this.output.tags = tags;
}
_logger.logger.debug("Initiating AgentCom-\t%s:%d", host, port);
if (labels !== undefined) {
this.output.labels = labels;
if (host.startsWith("ws://") || host.startsWith("wss://")) {
const AgentCom = require("./com/AgentComWs").default;
const OutputWs = require("./com/OutputWs").default;
this.output = new OutputWs();
this.augManager.output = this.output;
this.augManager.factory.output = this.output;
this.agentCom = new AgentCom(host, port, token, labels, tags);
this.commandHandler = new _CommandHandler.default(this.agentCom, this.augManager);
this.output.setAgentCom(this.agentCom);
} else {
if (tags !== undefined) {
this.output.tags = tags;
}
if (labels !== undefined) {
this.output.labels = labels;
}
const AgentCom = require("./com/AgentCom").default;
this.agentCom = new AgentCom(this.augManager, this.output, host, port, token);
this.output.setAgentCom(this.agentCom);
}
_logger.logger.debug("Initiating AgentCom-\t%s:%d", host, port);
this.agentCom = new _AgentCom.default(this.augManager, this.output, host, port, token);
this.output.setAgentCom(this.agentCom);
return this.agentCom.connectToAgent();
return this.agentCom.connectToAgent(config.AgentComConfiguration.GRPC_TIMEOUT * 1000);
}

@@ -88,0 +102,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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