flaschenpost
Advanced tools
Comparing version 0.15.3 to 0.15.4
@@ -5,8 +5,28 @@ #!/usr/bin/env node | ||
const split2 = require('split2'); | ||
const processenv = require('processenv'), | ||
split2 = require('split2'); | ||
const FormatterHumanReadable = require('../lib/formatters/HumanReadable'); | ||
const FormatterCustom = require('../lib/formatters/Custom'), | ||
FormatterGelf = require('../lib/formatters/Gelf'), | ||
FormatterHumanReadable = require('../lib/formatters/HumanReadable'), | ||
FormatterJson = require('../lib/formatters/Json'); | ||
const formatter = new FormatterHumanReadable(); | ||
const requestedFormatter = | ||
processenv('FLASCHENPOST_FORMATTER') || | ||
(process.stdout.isTTY ? 'human' : 'json'); | ||
let formatter; | ||
if (requestedFormatter === 'gelf') { | ||
formatter = new FormatterGelf(); | ||
} else if (requestedFormatter === 'human') { | ||
formatter = new FormatterHumanReadable(); | ||
} else if (requestedFormatter === 'json') { | ||
formatter = new FormatterJson(); | ||
} else if (requestedFormatter.startsWith('js:')) { | ||
formatter = new FormatterCustom({ js: /^js:(.*)$/g.exec(requestedFormatter)[1] }); | ||
} else { | ||
throw new Error('Unsupported formatter.'); | ||
} | ||
formatter.pipe(process.stdout); | ||
@@ -13,0 +33,0 @@ |
{ | ||
"name": "flaschenpost", | ||
"version": "0.15.3", | ||
"version": "0.15.4", | ||
"description": "flaschenpost is a logger for cloud-based applications.", | ||
@@ -36,31 +36,31 @@ "contributors": [ | ||
}, | ||
"main": "lib/flaschenpost.js", | ||
"main": "dist/flaschenpost.js", | ||
"dependencies": { | ||
"app-root-path": "2.0.1", | ||
"chalk": "1.1.3", | ||
"elasticsearch": "11.0.1", | ||
"elasticsearch": "12.1.3", | ||
"find-root": "1.0.0", | ||
"lodash": "4.16.6", | ||
"moment": "2.16.0", | ||
"processenv": "0.1.0", | ||
"split2": "2.1.0", | ||
"lodash": "4.17.4", | ||
"moment": "2.17.1", | ||
"processenv": "0.1.1", | ||
"split2": "2.1.1", | ||
"stack-trace": "0.0.9", | ||
"stringify-object": "2.4.0", | ||
"stringify-object": "3.1.0", | ||
"untildify": "3.0.2", | ||
"uuidv4": "0.4.0", | ||
"varname": "2.0.2" | ||
"uuidv4": "0.4.1", | ||
"varname": "2.0.3" | ||
}, | ||
"devDependencies": { | ||
"assertthat": "0.8.2", | ||
"async": "2.1.2", | ||
"express": "4.14.0", | ||
"fs-extra": "1.0.0", | ||
"assertthat": "0.8.5", | ||
"async": "2.1.5", | ||
"express": "4.14.1", | ||
"fs-extra": "2.0.0", | ||
"knockat": "0.2.1", | ||
"morgan": "1.7.0", | ||
"morgan": "1.8.1", | ||
"nodeenv": "0.2.1", | ||
"roboter": "0.13.9", | ||
"roboter-server": "0.13.9", | ||
"shelljs": "0.7.5", | ||
"sinon": "1.17.6", | ||
"supertest": "2.0.1" | ||
"roboter": "0.14.11", | ||
"roboter-server": "0.14.11", | ||
"shelljs": "0.7.6", | ||
"sinon": "1.17.7", | ||
"supertest": "3.0.0" | ||
}, | ||
@@ -67,0 +67,0 @@ "repository": { |
@@ -11,3 +11,46 @@ 'use strict'; | ||
}); | ||
task('universal/release', { | ||
createDistribution: true | ||
}); | ||
task('universal/license', { | ||
compatible: [ | ||
// Individual licenses | ||
'Apache-2.0', 'Apache-2.0*', | ||
'BSD-2-Clause', 'BSD-3-Clause', | ||
'ISC', | ||
'MIT', 'MIT*', 'MIT/X11', | ||
'MIT Licensed. http://www.opensource.org/licenses/mit-license.php', | ||
'Public Domain', | ||
'Unlicense', | ||
// Combined licenses | ||
'(Apache-2.0 OR MPL-1.1)', | ||
'BSD-3-Clause OR MIT', | ||
'(MIT AND CC-BY-3.0)', | ||
'(WTFPL OR MIT)' | ||
], | ||
ignore: { | ||
// BSD-3-Clause, see https://github.com/deoxxa/duplexer2/blob/0.0.2/LICENSE.md | ||
duplexer2: '0.0.2', | ||
// MIT, see https://github.com/mklabs/node-fileset/blob/v0.2.1/LICENSE-MIT | ||
fileset: '0.2.1', | ||
// MIT, https://github.com/tarruda/has/blob/1.0.1/package.json | ||
has: '1.0.1', | ||
// BSD-2-Clause, see https://github.com/facebook/regenerator/blob/e22c9317987ebcf4041e9188cb208b94f662df35/LICENSE | ||
'regenerator-transform': '0.9.8', | ||
// BSD-2-Clause, see https://github.com/jviereck/regjsparser/blob/0.1.5/LICENSE.BSD | ||
regjsparser: '0.1.5', | ||
// MIT, see https://github.com/eugeneware/unique-stream/blob/v1.0.0/LICENSE | ||
'unique-stream': '1.0.0' | ||
} | ||
}); | ||
}). | ||
start(); |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const assert = require('assertthat'), | ||
defaults = require('lodash/defaults'), | ||
shell = require('shelljs'); | ||
@@ -13,4 +14,9 @@ | ||
test('humanizes messages.', done => { | ||
shell.exec('node writeMessages.js | node ../../bin/flaschenpost-uncork.js', { | ||
cwd: path.join(__dirname, '..', 'helpers') | ||
shell.exec('FLASCHENPOST_FORMATTER=json node writeMessages.js | node ../../bin/flaschenpost-uncork.js', { | ||
cwd: path.join(__dirname, '..', 'helpers'), | ||
/* eslint-disable no-process-env */ | ||
env: defaults({ | ||
FLASCHENPOST_FORMATTER: 'human' | ||
}, process.env) | ||
/* eslint-enable no-process-env */ | ||
}, (code, stdout, stderr) => { | ||
@@ -17,0 +23,0 @@ assert.that(code).is.equalTo(0); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
175236
67
2617
9
+ Addedelasticsearch@12.1.3(transitive)
+ Addedget-own-enumerable-property-symbols@1.0.1(transitive)
+ Addedis-obj@1.0.1(transitive)
+ Addedlodash@4.17.4(transitive)
+ Addedmoment@2.17.1(transitive)
+ Addedprocessenv@0.1.1(transitive)
+ Addedsplit2@2.1.1(transitive)
+ Addedstringify-object@3.1.0(transitive)
+ Addeduuidv4@0.4.1(transitive)
+ Addedvarname@2.0.3(transitive)
- Removedelasticsearch@11.0.1(transitive)
- Removedis-plain-obj@1.1.0(transitive)
- Removedlodash@3.10.14.16.6(transitive)
- Removedlodash-compat@3.10.2(transitive)
- Removedmoment@2.16.0(transitive)
- Removedprocessenv@0.1.0(transitive)
- Removedsplit2@2.1.0(transitive)
- Removedstringify-object@2.4.0(transitive)
- Removeduuidv4@0.4.0(transitive)
- Removedvarname@2.0.2(transitive)
Updatedelasticsearch@12.1.3
Updatedlodash@4.17.4
Updatedmoment@2.17.1
Updatedprocessenv@0.1.1
Updatedsplit2@2.1.1
Updatedstringify-object@3.1.0
Updateduuidv4@0.4.1
Updatedvarname@2.0.3