Giter Site home page Giter Site logo

gulp-s3-publish's People

Contributors

adrianfalleiro avatar and-re avatar austinhallock avatar dixhuit avatar mathisonian avatar mbjorkegren avatar michaelthorne avatar nitaigao avatar ohierro avatar steadicat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gulp-s3-publish's Issues

Files nested deeper than ./*/* are not uploaded to S3

var s3 = require("gulp-s3-publish");

gulp.task('deploy', function () {
  var aws = JSON.parse(fs.readFileSync('./aws.json'));
  gulp.src('./dist/**/*')
    .pipe(s3(aws));
});

The task starts and finishes without error but only the first 2 levels of files are uploaded to S3 (./* and ./*/*). Any files nested more deeply appear to be skipped.

Support for AWS Signature Version 4

This is also an issue in the gulp-s3 plugin, but mentioning it here too.

I've been unable to upload to certain (newer) S3 regions and it is as a result of them only supporting V4. i.e. eu-west-2 (London) as a region, returns an ambiguous HTTP 400 error when attempting to publish files to a bucket in that region.

Message:
    [400] C:\file.css.gz -> file.css
Stack:
Error: [400] C:\file.css.gz -> file.css
    at DestroyableTransform.uploadCallback (C:\node_modules\gulp-s3-publish\index.js:76:24)

If I only switch the region to e.g. us-east-1 (formerly US Standard which supports V2 and V4) and leave everything else as is, the publish works as expected.

Unable to get this working - no error thrown to help debug

Almost straight from the docs:

    try {
        console.log("The AWS object is....");
        console.log(aws);

        var shortOptions = { headers: { 'Cache-Control': 'public, max-age=28800' } }; // 8 hours

        gulp.src(['build/dist/**', '!build/dist/*.html'], { read: false })
            .pipe(debug())
            .pipe(s3(aws, shortOptions));

    } catch (error) {
        console.log("S3 upload error....");
        console.log(error);
    }

The output is minimal, no errors to help debug, credentials are good...

[07:44:25] Starting 's3'...
The AWS object is....
{ key: 'AKIAJK6O7IBQXNOTREAL',
secret: '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',
bucket: 'my.validbucket.com',
region: 'us-east-1' }
[07:44:25] Finished 's3' after 26 ms
[07:44:25] gulp-debug: build\dist
[07:44:25] gulp-debug: build\dist\favicon.ico
[07:44:25] gulp-debug: build\dist\fonts
[07:44:25] gulp-debug: build\dist\app-0.3.7.min.css
[07:44:25] gulp-debug: build\dist\app-0.3.7.min.js
[07:44:25] gulp-debug: build\dist\sprite-123.png

Several attempts at bug fixing have been made but with no error messages to go on, this seems fruitless.

Feature request: Add option to delete orphaned files/folders in destination bucket

Deploying from gulp using this plugin only ever seems to add files. If legacy orphan files exist on the destination they will still be there after deploying from gulp. Currently, I'm having to do the occasional check or even nuke the bucket contents to ensure that this is covered.

What would be really nice is if we could add an option to handle this for us. At its most basic it would involve gulp wiping the bucket contents before upload. A potentially more performant option would be to start by comparing the src and dest directory contents, deleting any orphans that result from that diff and then doing a regular upload (so you only try to delete what really needs to be deleted).

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.