@q42philips/statsd-daemon
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "@q42philips/statsd-daemon", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Simple statsd deamon to observe metrics being emitted on localhost", | ||
@@ -30,3 +30,7 @@ "main": "src/index.js", | ||
"eslint": "^3.19.0" | ||
}, | ||
"dependencies": { | ||
"chalk": "^1.1.3", | ||
"update-notifier": "^2.1.0" | ||
} | ||
} |
@@ -9,2 +9,4 @@ # Statsd Daemon | ||
# Usage | ||
## Install | ||
@@ -26,1 +28,32 @@ You can install globally for convenience, which will add a `statsd-daemon` executable to your path: | ||
``` | ||
# Contributing | ||
## Local development | ||
You can also create a symlink in your global node modules, making the `hue` binary globally accessible. Note that this only works if you first uninstall the NPM version | ||
``` bash | ||
$ npm uninstall -g @q42philips/statsd-daemon | ||
$ npm link | ||
$ hue <command> | ||
``` | ||
And then after testing, just run | ||
``` bash | ||
$ npm unlink | ||
$ npm install -g @q42philips/statsd-daemon | ||
``` | ||
## Creating a new release | ||
After PRs are merged to master, you can create a new version using npm. Please carefully check the changes made since the last release and [choose your update type accordingly](http://semver.org/), then create a new version using the command below. This will succeed only if the tests pass, to avoid versioning broken code. It will also push the newly created tag to this repository. | ||
``` bash | ||
$ npm version <major|minor|patch> | ||
``` | ||
After creating a new version, you may publish it to the npm registry using the following command, which will automatically compile it using babel before publishing: | ||
``` bash | ||
$ npm publish | ||
``` | ||
Finally, please take the time to add a changelog to the newly created release on Github, noting the new features, fixes or other notable stuff. |
#! /usr/bin/env node | ||
const updateNotifier = require('update-notifier'); | ||
/* Notify if an update is available */ | ||
const packageJson = require('../package.json'); | ||
updateNotifier({ packageJson }).notify(); | ||
const dgram = require('dgram'); | ||
const server = dgram.createSocket('udp4'); | ||
const chalk = require('chalk'); | ||
const PORT = 8125; | ||
@@ -15,6 +23,7 @@ const HOST = '127.0.0.1'; | ||
server.on('message', (message, remote) => { | ||
const [keyval, datatype, tags] = message.toString('utf8').split('|'); | ||
// eslint-disable-next-line no-console | ||
console.log(`${remote.address}:${remote.port} - ${message}`); | ||
console.log(chalk.cyan(new Date().toTimeString()) + '\t' + chalk.green(keyval) + '(' + chalk.italic.red(datatype) + ')\t' + chalk.italic.yellow(tags)); | ||
}); | ||
server.bind(PORT, HOST); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
6741
21
58
2
2
+ Addedchalk@^1.1.3
+ Addedupdate-notifier@^2.1.0
+ Addedansi-align@2.0.0(transitive)
+ Addedansi-regex@2.1.13.0.1(transitive)
+ Addedansi-styles@2.2.13.2.1(transitive)
+ Addedboxen@1.3.0(transitive)
+ Addedcamelcase@4.1.0(transitive)
+ Addedcapture-stack-trace@1.0.2(transitive)
+ Addedchalk@1.1.32.4.2(transitive)
+ Addedci-info@1.6.0(transitive)
+ Addedcli-boxes@1.0.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedconfigstore@3.1.5(transitive)
+ Addedcreate-error-class@3.0.2(transitive)
+ Addedcross-spawn@5.1.0(transitive)
+ Addedcrypto-random-string@1.0.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddot-prop@4.2.1(transitive)
+ Addedduplexer3@0.1.5(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexeca@0.7.0(transitive)
+ Addedget-stream@3.0.0(transitive)
+ Addedglobal-dirs@0.1.1(transitive)
+ Addedgot@6.7.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedimport-lazy@2.1.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-ci@1.2.1(transitive)
+ Addedis-fullwidth-code-point@2.0.0(transitive)
+ Addedis-installed-globally@0.1.0(transitive)
+ Addedis-npm@1.0.0(transitive)
+ Addedis-obj@1.0.1(transitive)
+ Addedis-path-inside@1.0.1(transitive)
+ Addedis-redirect@1.0.0(transitive)
+ Addedis-retry-allowed@1.2.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedlatest-version@3.1.0(transitive)
+ Addedlowercase-keys@1.0.1(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedmake-dir@1.3.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedpackage-json@4.0.1(transitive)
+ Addedpath-is-inside@1.0.2(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpify@3.0.0(transitive)
+ Addedprepend-http@1.0.4(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedregistry-auth-token@3.4.0(transitive)
+ Addedregistry-url@3.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsemver-diff@2.1.0(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstring-width@2.1.1(transitive)
+ Addedstrip-ansi@3.0.14.0.0(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsupports-color@2.0.05.5.0(transitive)
+ Addedterm-size@1.2.0(transitive)
+ Addedtimed-out@4.0.1(transitive)
+ Addedunique-string@1.0.0(transitive)
+ Addedunzip-response@2.0.1(transitive)
+ Addedupdate-notifier@2.5.0(transitive)
+ Addedurl-parse-lax@1.0.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwidest-line@2.0.1(transitive)
+ Addedwrite-file-atomic@2.4.3(transitive)
+ Addedxdg-basedir@3.0.0(transitive)
+ Addedyallist@2.1.2(transitive)