confidence
Advanced tools
+2
-2
@@ -5,4 +5,4 @@ language: node_js | ||
| - 0.10 | ||
| - 0.12 | ||
| - iojs | ||
| - 4 | ||
| sudo: false |
+1
-1
@@ -45,3 +45,3 @@ // Load modules | ||
| while (!bytes) { // This can theoretically loop forever if the machine random device generates garbage | ||
| var rand = Crypto.randomBytes(3); | ||
| rand = Crypto.randomBytes(3); | ||
| var value = (rand[0] << 16) | (rand[1] << 8) | rand[2]; | ||
@@ -48,0 +48,0 @@ if (value >= 10000000) { |
+9
-9
@@ -298,5 +298,5 @@ // Load modules | ||
| found.default = true; | ||
| var err = internals.Store.validate(node.$default, path + '/$default'); | ||
| if (err) { | ||
| return err; | ||
| var err2 = internals.Store.validate(node.$default, path + '/$default'); | ||
| if (err2) { | ||
| return err2; | ||
| } | ||
@@ -321,5 +321,5 @@ } | ||
| found.value = true; | ||
| var err = internals.Store.validate(node.$value, path + '/$value'); | ||
| if (err) { | ||
| return err; | ||
| var err3 = internals.Store.validate(node.$value, path + '/$value'); | ||
| if (err3) { | ||
| return err3; | ||
| } | ||
@@ -334,5 +334,5 @@ } | ||
| var value = node[key]; | ||
| var err = internals.Store.validate(value, path + '/' + key); | ||
| if (err) { | ||
| return err; | ||
| var err4 = internals.Store.validate(value, path + '/' + key); | ||
| if (err4) { | ||
| return err4; | ||
| } | ||
@@ -339,0 +339,0 @@ } |
+4
-3
| { | ||
| "name": "confidence", | ||
| "description": "Configuration API", | ||
| "version": "1.4.0", | ||
| "version": "1.4.1", | ||
| "repository": "git://github.com/hapijs/confidence", | ||
| "main": "index", | ||
| "main": "lib/index.js", | ||
| "keywords": [ | ||
@@ -30,3 +30,4 @@ "hapi", | ||
| "scripts": { | ||
| "test": "make test-cov" | ||
| "test": "lab -r console -t 100 -a code -L", | ||
| "test-cov-html": "lab -r html -o coverage.html -a code -L" | ||
| }, | ||
@@ -33,0 +34,0 @@ "licenses": [ |
+3
-0
@@ -156,2 +156,3 @@ // Load modules | ||
| confidence.stdout.on('data', function (data) { | ||
| expect(data.toString()).to.not.exist(); | ||
@@ -161,2 +162,3 @@ }); | ||
| confidence.stderr.on('data', function (data) { | ||
| expect(data.toString()).to.exist(); | ||
@@ -166,4 +168,5 @@ }); | ||
| confidence.on('close', function () { | ||
| done(); | ||
| }); | ||
| }); |
+1
-1
@@ -43,3 +43,3 @@ // Load modules | ||
| describe('criteria()', function() { | ||
| describe('criteria()', function () { | ||
@@ -46,0 +46,0 @@ it('converts id to criteria', function (done) { |
+16
-15
@@ -73,10 +73,10 @@ // Load modules | ||
| production: [ | ||
| {animal: 'chicken'}, | ||
| {animal: 'dog'} | ||
| { animal: 'chicken' }, | ||
| { animal: 'dog' } | ||
| ], | ||
| staging: [ | ||
| {animal: 'cow'} | ||
| { animal: 'cow' } | ||
| ], | ||
| $base: [ | ||
| {animal: 'cat'} | ||
| { animal: 'cat' } | ||
| ] | ||
@@ -87,11 +87,11 @@ }, | ||
| production: [ | ||
| {animal: 'chicken'}, | ||
| {animal: 'dog'} | ||
| { animal: 'chicken' }, | ||
| { animal: 'dog' } | ||
| ], | ||
| $base: {animal: 'cat'} | ||
| $base: { animal: 'cat' } | ||
| }, | ||
| key9: { | ||
| $filter: 'env', | ||
| production: {animal: 'chicken'}, | ||
| $base: [{animal: 'cat'}] | ||
| production: { animal: 'chicken' }, | ||
| $base: [{ animal: 'cat' }] | ||
| }, | ||
@@ -146,6 +146,6 @@ ab: { | ||
| get('/key6', { color: 'red', animal: 'cow' }, { env: 'staging' }); | ||
| get('/key7', [{ animal: 'cat'},{ animal: 'chicken'},{ animal: 'dog'}], { env: 'production' }); | ||
| get('/key7', [{ animal: 'cat'},{ animal: 'cow'}], { env: 'staging' }); | ||
| get('/key8', [{ animal: 'chicken'},{ animal: 'dog'}], { env: 'production' }); | ||
| get('/key9', { animal: 'chicken'}, { env: 'production' }); | ||
| get('/key7', [{ animal: 'cat' },{ animal: 'chicken' },{ animal: 'dog' }], { env: 'production' }); | ||
| get('/key7', [{ animal: 'cat' },{ animal: 'cow' }], { env: 'staging' }); | ||
| get('/key8', [{ animal: 'chicken' },{ animal: 'dog' }], { env: 'production' }); | ||
| get('/key9', { animal: 'chicken' }, { env: 'production' }); | ||
| get('/', { key1: 'abc', key2: 2, key3: { sub1: 0 }, key4: [12, 13, 14], key5: {}, ab: 6 }); | ||
@@ -443,3 +443,3 @@ get('/', { key1: 'abc', key2: 2, key3: { sub1: 0, sub2: '' }, key4: [12, 13, 14], key5: {}, ab: 6 }, { xfactor: 'yes' }); | ||
| var err = Confidence.Store.validate(new Date); | ||
| var err = Confidence.Store.validate(new Date()); | ||
@@ -454,5 +454,6 @@ expect(err.message).to.equal('Invalid node object type'); | ||
| it('adds the filter to the list of applied filters if node or criteria is not defined ', function (done) { | ||
| var applied = []; | ||
| Confidence.Store._logApplied(applied, { filter: 'env', valueId: '$default'}); | ||
| Confidence.Store._logApplied(applied, { filter: 'env', valueId: '$default' }); | ||
| expect(applied.length).to.equal(1); | ||
@@ -459,0 +460,0 @@ done(); |
-1
| module.exports = require('./lib'); |
-8
| test: | ||
| @node node_modules/lab/bin/lab -a code | ||
| test-cov: | ||
| @node node_modules/lab/bin/lab -t 100 -a code | ||
| test-cov-html: | ||
| @node node_modules/lab/bin/lab -t 100 -r html -o coverage.html -a code | ||
| .PHONY: test test-cov test-cov-html |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
85769
-0.15%15
-11.76%