Skip to content

Commit

Permalink
Merge pull request #999 from blackflux/dev
Browse files Browse the repository at this point in the history
[Gally]: master <- dev
  • Loading branch information
simlu committed Oct 3, 2019
2 parents 4b6f1e4 + 869d721 commit aca9354
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 273 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"homepage": "https://github.com/blackflux/s3-cached#readme",
"dependencies": {
"aws-sdk-wrap": "3.4.2",
"aws-sdk-wrap": "3.5.2",
"cache-manager": "2.10.0",
"cache-manager-fs": "1.0.8",
"lodash.defaults": "4.2.0",
Expand All @@ -58,19 +58,19 @@
"@babel/plugin-proposal-object-rest-spread": "7.6.2",
"@babel/register": "7.6.2",
"@blackflux/eslint-plugin-rules": "1.3.12",
"@blackflux/robo-config-plugin": "2.6.13",
"aws-sdk": "2.538.0",
"@blackflux/robo-config-plugin": "2.6.15",
"aws-sdk": "2.541.0",
"babel-eslint": "10.0.3",
"chai": "4.2.0",
"coveralls": "3.0.6",
"eslint": "6.4.0",
"eslint": "6.5.1",
"eslint-config-airbnb-base": "14.0.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-json": "1.4.0",
"eslint-plugin-markdown": "1.0.0",
"eslint-plugin-mocha": "6.1.1",
"js-gardener": "2.0.102",
"mocha": "6.2.0",
"js-gardener": "2.0.103",
"mocha": "6.2.1",
"node-tdd": "2.5.12",
"nyc": "14.1.1",
"semantic-release": "15.13.24"
Expand Down
13 changes: 1 addition & 12 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,7 @@ module.exports = (options) => {
assert(typeof prefix === 'string');
assert(typeof ttl === 'number');
assert(typeof bucket === 'string');
const result = [];
let data = null;
do {
// eslint-disable-next-line no-await-in-loop
data = await aws.call('s3:listObjectsV2', {
Prefix: prefix,
Bucket: bucket,
ContinuationToken: get(data, 'NextContinuationToken')
});
result.push(...data.Contents);
} while (data.IsTruncated);
return result;
return aws.s3.listObjects({ bucket, prefix });
}, { ttl });

const getBinaryObjectCached = (
Expand Down
Loading

0 comments on commit aca9354

Please sign in to comment.