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

cube

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cube - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

3

lib/cube/client/piece-area.js

@@ -30,3 +30,4 @@ cube.piece.type.area = function(board) {

time.append("input");
time.append("input")
.property("value", 1440);

@@ -33,0 +34,0 @@ time.append("select").selectAll("option")

@@ -31,3 +31,4 @@ cube.piece.type.sum = function(board) {

time.append("input");
time.append("input")
.property("value", 1440);

@@ -34,0 +35,0 @@ time.append("select").selectAll("option")

@@ -5,3 +5,4 @@ var endpoint = require("./endpoint"),

exports.register = function(db, endpoints) {
var putter = require("./event").putter(db);
var putter = require("./event").putter(db),
poster = post(putter);
endpoints.ws.push(

@@ -11,3 +12,4 @@ endpoint.exact("/1.0/event/put", putter)

endpoints.http.push(
endpoint.exact("POST", "/1.0/event/put", post(putter)),
endpoint.exact("POST", "/1.0/event", poster),
endpoint.exact("POST", "/1.0/event/put", poster),
endpoint.exact("POST", "/collectd", require("./collectd").putter(putter))

@@ -14,0 +16,0 @@ );

@@ -1,8 +0,39 @@

var endpoint = require("./endpoint");
var endpoint = require("./endpoint"),
url = require("url");
var headers = {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*"
};
exports.register = function(db, endpoints) {
var event = require("./event").getter(db),
metric = require("./metric").getter(db);
endpoints.ws.push(
endpoint.exact("/1.0/event/get", require("./event").getter(db)),
endpoint.exact("/1.0/metric/get", require("./metric").getter(db))
endpoint.exact("/1.0/event/get", event),
endpoint.exact("/1.0/metric/get", metric)
);
endpoints.http.push(
endpoint.exact("GET", "/1.0/metric", metricGet),
endpoint.exact("GET", "/1.0/metric/get", metricGet)
);
function metricGet(request, response) {
var values = [],
expected = metric(url.parse(request.url, true).query, callback);
response.writeHead(expected < 0 ? 400 : 200, headers);
if (expected <= 0) response.end(JSON.stringify([]));
function callback(value) {
if (values.push(value) === expected) {
response.end(JSON.stringify(values.sort(chronological)));
}
}
}
};
function chronological(a, b) {
return a.time - b.time;
}

@@ -264,4 +264,4 @@ var util = require("util"),

id = request.id;
if (isNaN(start)) return util.log("invalid start: " + request.start);
if (isNaN(stop)) return util.log("invalid stop: " + request.stop);
if (isNaN(start)) return util.log("invalid start: " + request.start), -1;
if (isNaN(stop)) return util.log("invalid stop: " + request.stop), -1;

@@ -273,4 +273,4 @@ // Parse the expression.

expression = parser.parse(request.expression);
} catch (error) {
return util.log("invalid expression: " + error);
} catch (e) {
return util.log("invalid expression: " + e), -1;
}

@@ -280,3 +280,3 @@

var tier = tiers[request.step];
if (!tier) return util.log("invalid step: " + request.step);
if (!tier) return util.log("invalid step: " + request.step), -1;
start = tier.floor(start);

@@ -305,3 +305,8 @@ stop = tier.ceil(stop);

: ("id" in request ? callbackValueId : callbackValue));
// Return the expected number of values.
var expected = 0;
while ((start = tier.step(start)) < stop) ++expected;
return expected;
};
};
{
"name": "cube",
"version": "0.0.14",
"version": "0.0.15",
"description": "A system for time series visualization using MongoDB, Node and D3.",

@@ -11,3 +11,3 @@ "keywords": ["time series", "visualization"],

"dependencies": {
"d3": "2.6.0",
"d3": "2.7.2",
"mongodb": "0.9.7-1.3",

@@ -14,0 +14,0 @@ "pegjs": "0.6.2",

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