Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "riemann", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "node.js client for Riemann, supports hybrid UDP/TCP connections.", | ||
"license": "MIT", | ||
"author": { | ||
@@ -14,20 +15,20 @@ "Derek Perez": "derek@derekperez.com", | ||
"engines": { | ||
"node": ">= 0.12" | ||
"node": ">= 0.14" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/perezd/riemann-nodejs-client.git" | ||
"url": "git://github.com/riemann/riemann-nodejs-client.git" | ||
}, | ||
"dependencies": { | ||
"protobufjs": "6.8.8", | ||
"event-to-promise": "^0.8.0" | ||
"event-to-promise": "^0.8.0", | ||
"protobufjs": "6.11.2" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*", | ||
"jshint": "*" | ||
"jshint": "*", | ||
"mocha": "*" | ||
}, | ||
"scripts": { | ||
"lint": "find . -name '*.js' -and -not -path './node_modules/*' | xargs ./node_modules/.bin/jshint --config ./.jshint", | ||
"lint": "find . -name '*.js' -and -not -path './node_modules/*' | xargs ./node_modules/.bin/jshint --config ./.jshintrc", | ||
"test": "NODE_PATH=./ mocha --ui tdd --reporter list --timeout 2000 --slow 5000" | ||
} | ||
} |
# [Riemann](http://aphyr.github.com/riemann/) Node.js Client | ||
[![Build Status](https://travis-ci.com/riemann/riemann-nodejs-client.svg?branch=master)](https://travis-ci.com/riemann/riemann-nodejs-client) | ||
because you should be monitoring all of those [non-blocking buffet plates.](http://www.infinitelooper.com/?v=-sfZqL4Plxc&p=n#/242;267) | ||
@@ -4,0 +6,0 @@ |
@@ -76,3 +76,4 @@ var assert = require('assert'); | ||
if (typeof payload.metric !== "undefined" && payload.metric !== null) { | ||
payload.metric_f = payload.metric; | ||
// protobufjs requires this to be camel case | ||
payload.metricF = payload.metric; | ||
delete payload.metric; | ||
@@ -79,0 +80,0 @@ } |
var protobuf = require('protobufjs'); | ||
var path = require('path'); | ||
/* initialize our protobuf schema, | ||
and cache it in memory. */ | ||
var riemannSchema; | ||
if (!riemannSchema) { | ||
schemaLoad(); | ||
} | ||
/* initialize our protobuf schema, and cache it in memory. */ | ||
var riemannSchema = protobuf.loadSync(path.join(__dirname, '/proto/proto.proto')); | ||
function schemaLoad() { | ||
return new Promise((resolve, reject) => { | ||
if (riemannSchema) { | ||
resolve(); | ||
} | ||
protobuf.load(path.join(__dirname, '/proto/proto.proto'), (err, root) => { | ||
if (err) { | ||
reject(err); | ||
} | ||
// Pull the message type out. | ||
riemannSchema = root; | ||
resolve(); | ||
}); | ||
}); | ||
} | ||
exports.schemaLoad = schemaLoad; | ||
function _serialize(type, value) { | ||
@@ -32,0 +8,0 @@ var messageType = riemannSchema.lookupType(type); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24623
13
106
306
+ Added@types/node@22.10.10(transitive)
+ Addedprotobufjs@6.11.2(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removed@types/node@10.17.60(transitive)
- Removedprotobufjs@6.8.8(transitive)
Updatedprotobufjs@6.11.2