Huge News!Announcing our $40M Series B led by Abstract Ventures.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.15.1 to 0.15.2

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

### [0.15.2](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.15.1...v0.15.2) (2019-10-27)
### Bug Fixes
* Cannot set the 'Cache-Control' header when uploading file to bucket ([18fb1dc](https://github.com/nicolasdao/google-cloud-bucket/commit/18fb1dc))
### [0.15.1](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.15.0...v0.15.1) (2019-10-27)

@@ -7,0 +16,0 @@

2

package.json
{
"name": "google-cloud-bucket",
"version": "0.15.1",
"version": "0.15.2",
"description": "Nodejs package to manage Google Cloud Buckets and its objects.",

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

@@ -106,4 +106,5 @@ /**

const v = headers[header]
const keyValue = typeof(v) == 'string' ? `"${header}": "${v}"` : `"${header}": ${v}`
if (_isStdHeader(header))
const stdHeader = _getStdHeader(header)
const keyValue = typeof(v) == 'string' ? `"${stdHeader || header}": "${v}"` : `"${stdHeader || header}": ${v}`
if (stdHeader)
acc.std.push(keyValue)

@@ -669,10 +670,23 @@ else

const _isStdHeader = header =>
header == 'cacheControl'
|| header == 'contentDisposition'
|| header == 'contentEncoding'
|| header == 'contentLanguage'
|| header == 'contentType'
|| header == 'eventBasedHold'
|| header == 'temporaryHold'
const _getStdHeader = header => {
if (!header)
return null
const h = header.toLowerCase().replace(/-/g,'')
if (h == 'cachecontrol')
return 'cacheControl'
else if (h == 'contentdisposition')
return 'contentDisposition'
else if (h == 'contentencoding')
return 'contentEncoding'
else if (h == 'contentlanguage')
return 'contentLanguage'
else if (h == 'contenttype')
return 'contentType'
else if (h == 'eventbasedhold')
return 'eventBasedHold'
else if (h == 'temporaryhold')
return 'temporaryHold'
else
return null
}

@@ -708,4 +722,5 @@ // Doc: https://cloud.google.com/storage/docs/json_api/v1/objects/update

metaKeys.forEach(key => {
if (_isStdHeader(key))
data[key] = meta[key]
const stdKey = _getStdHeader(key)
if (stdKey)
data[stdKey] = meta[key]
else {

@@ -712,0 +727,0 @@ if (!data.metadata)

Sorry, the diff of this file is not supported yet

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