Coder Social home page Coder Social logo

vinyl-s3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vinyl-s3's Issues

Question: how to set credentials and region?

Hi Izaak @izaakschroeder,
thank you for this wonderful idea and implementation!

May I ask you for your advice, as I'm having trouble setting AWS options and am not sure where and how to set them correctly. I understand that vinyl-s3 builds upon aws-sdk, so I read their docs and had some success.

I tried setting AWS options with AWS.config.update before instantiating vinyl-s3, but unfortunately that had no effect at all (and I don't quite understand why). What did work was setting environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY - fair enough.

Where I'm still having difficulty is the region.

I tried setting AWS_DEFAULT_REGION but unfortunately that was not successful.
I then tried AWS.config.update({region:'eu-west-1'});, but I'm still getting

PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

I'm a bit stuck here and am hoping you might have an idea?

Thank you very much for your help!

Best,
Andreas

UPDATE: setting AWS_REGION worked - but I'm still wondering if and how it's possible to set options programmatically? Thank you!

automatically avoid uploading unchanged files

Use the ETag result from listObjects, and compare to the MD5 hash of the local file.

I'm using gulp-filter and gulp-vinyl-md5 to achieve something similar, but it is probably worth it to just have this library magically handle that.

Upload Progress

I understand this isn't really an "issue". Is there a way to get vinyl-s3 to show the upload progress?

The "meta" task doesn't work

Assuming you figure out that you need the "through2" plugin, the meta task does not work.

It throws an exception:
TypeError: Cannot read property 'length' of null

how to specify extra headers

I could not find a way to set headers for an s3 upload.
In my case I'd like to specify Content-Type, Content-Encoding, Cache-Control as well as x-amz-acl.
Did I overlook anything?

Cannot "yarn add" due to outdated `s3-glob` "engines" field

Running "yarn add --dev vinyl-s3" in Node 6.x fails:

$ yarn add --dev vinyl-s3
yarn add v0.17.9
[1/4] ๐Ÿ”  Resolving packages...
warning vinyl-s3 > s3-glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[2/4] ๐Ÿšš  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^1.0.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

This is because the "engines" field of the s3-glob dependency is outdated. There are a few ways this could be resolved:

  • s3-glob publishes a new version permitting Node 4+ as "engines".
  • This repo subsumes the functionality of s3-glob and removes its dependency.
  • This repo uses a different package to handle S3 globs.

Obviously the first one would be the most ideal, but any of the three would solve the issue.

s3.src('mybucket', {read:false}); could be faster

I tried to using vinyl-s3 to fetch metadata on existing object in my bucket.
I see the {read: false} option discussed, but things still move pretty slow.

I ended up using the aws-sdk directly and doing

var s3 = new AWS.S3();
s3.listObjects({
  Bucket: 'myBucket'
});

This returned the same metadata more than 100x faster. Any reason for this?

Document configuration options

Details on the available config options are pretty sparse.

In particular #16 had information I needed, but I had to search for it.

It would be helpful if that was documented upfront for those unfamiliar with the aws-sdk.

Engines out of date

The current array of engines doesn't cover any LTS Node engines. this needs anything greater than 0.8, the engines should be >=0.8 as is what it appears to need. Without up-to-date engines (or simply removing it entirely as the versions in currently are no longer supported), package managers like yarn will yell and be unable to install without exceptions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.