aws-s3-facia-tool
Advanced tools
Comparing version 0.2.0 to 0.2.1
var jsonQuery = require('sift'); | ||
var _ = require('lodash'); | ||
@@ -29,4 +30,6 @@ function Config (json) { | ||
if (!allValues) { | ||
allValues = Object.keys(config.json[key]).map(function (front) { | ||
return config.json[key][front]; | ||
allValues = Object.keys(config.json[key]).map(function (value) { | ||
return _.assign({ | ||
_id: value | ||
}, config.json[key][value]); | ||
}); | ||
@@ -33,0 +36,0 @@ } |
{ | ||
"name": "aws-s3-facia-tool", | ||
"description": "Iterate on S3 buckets in facia tool", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "lib/facia-tool.js", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
@@ -68,5 +68,5 @@ var expect = require('chai').expect; | ||
expect(instance.collections.find({ | ||
a: 'some' | ||
'collection.live.id': 'b' | ||
})).to.deep.equal([jsonFind.collections.one]); | ||
}); | ||
}); |
{ | ||
"fronts": { | ||
"one": { | ||
"_id": "one", | ||
"a": "text" | ||
}, | ||
"two": { | ||
"_id": "two", | ||
"a": "more text" | ||
}, | ||
"three": { | ||
"_id": "three", | ||
"b": ["c1", "c2", "c3"] | ||
}, | ||
"four": { | ||
"_id": "four", | ||
"a": "string", | ||
@@ -17,2 +21,3 @@ "b": ["c2"] | ||
"five": { | ||
"_id": "five", | ||
"a": "text", | ||
@@ -22,2 +27,3 @@ "c": 20 | ||
"six": { | ||
"_id": "six", | ||
"a": "out of order", | ||
@@ -29,8 +35,22 @@ "b": ["c2", "c3", "c1"] | ||
"one": { | ||
"a": "some" | ||
"_id": "one", | ||
"collection": { | ||
"live": [{ | ||
"id": "a" | ||
}, { | ||
"id": "b" | ||
}] | ||
} | ||
}, | ||
"two": { | ||
"a": "other" | ||
"_id": "two", | ||
"collection": { | ||
"live": [{ | ||
"id": "a" | ||
}, { | ||
"id": "c" | ||
}] | ||
} | ||
} | ||
} | ||
} |
45525
1401