New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

google-cloud-bucket

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-cloud-bucket - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="0.0.2"></a>
## [0.0.2](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.0.1...v0.0.2) (2018-11-11)
### Features
* Add support for throwing an exception if access denied ([aa76923](https://github.com/nicolasdao/google-cloud-bucket/commit/aa76923))
<a name="0.0.1"></a>

@@ -7,0 +17,0 @@ ## 0.0.1 (2018-11-10)

21

index.js

@@ -29,3 +29,11 @@ /**

Authorization: `Bearer ${token}`
}, content)
}, content).then(({ status, data }) => {
if (status > 299) {
const message = ((data || {}).error || {}).message || JSON.stringify(data || {})
let e = new Error(message)
e.code = status
throw e
}
return { status, data }
})
})

@@ -43,3 +51,12 @@

const retryPutObject = (object, filePath, options={}) => retry(() => putObject(object, filePath), () => true, { ignoreFailure: true, retryInterval: 800 })
const retryPutObject = (object, filePath, options={}) => retry(
() => putObject(object, filePath),
() => true,
err => {
if (err && err.message && err.message.indexOf('access') > 0)
return false
else
return true
},
{ ignoreFailure: true, retryInterval: 800 })
.catch(e => {

@@ -46,0 +63,0 @@ if (options.retryCatch)

2

package.json
{
"name": "google-cloud-bucket",
"version": "0.0.1",
"version": "0.0.2",
"description": "Nodejs package to add objects to a Google Cloud Bucket.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -51,3 +51,3 @@ # Google Cloud Bucket &middot; [![NPM](https://img.shields.io/npm/v/google-cloud-bucket.svg?style=flat)](https://www.npmjs.com/package/google-cloud-bucket) [![Tests](https://travis-ci.org/nicolasdao/google-cloud-bucket.svg?branch=master)](https://travis-ci.org/nicolasdao/google-cloud-bucket) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Neap](https://neap.co/img/made_by_neap.svg)](#this-is-what-we-re-up-to)

client.putObject(task_01, 'your-bucket/a-path/filename.json').then(res => console.log(res))
client.putObject(someObject, 'your-bucket/a-path/filename.json').then(res => console.log(res))
```

@@ -54,0 +54,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc