Skip to content
 
 

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3-URL-EXISTS

npm node

About

S3 Url Exists is an abstraction package made to check if the key into the buckets really exist and it's public

Usage

$ npm i Btime/s3-url-exists#semver:^1 -S

Example

const S3UrlExists = require('s3-url-exists')
const options = {
  region: 'sa-east-1',
  bucket: 'bucket-name',
  key: 'file-name'
}

S3UrlExists(options)
  .then((result) => {
    /*
    * { status: true, url: 'https://s3-region.amazonaws.com/bucket-name/file-name' }
    */
  })
  .catch(err => {
    /*
    * Request Error
    */
  })

Pushing versions - SemVer

All pushes must come with a new tag. The tag usage must consider semantic versions.

[major version: incompatible changes].[minor version: compatible with major].[patch version: bug fixes]

Before pushing each version, type:

  • For patch changes: npm version patch
  • For minor changes: npm version minor
  • For major changes: npm version major

The version set must also be set in package.json file, at version field.

Tests

  • Create .env file:
$ cp .env .env.dist
  • Run tests:
$ npm test

About

S3 URL Exists

Resources

Stars

0 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages