google-cloud-bucket
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -5,2 +5,7 @@ # Change Log | ||
<a name="0.3.8"></a> | ||
## [0.3.8](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.3.7...v0.3.8) (2018-12-08) | ||
<a name="0.3.7"></a> | ||
@@ -7,0 +12,0 @@ ## [0.3.7](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.3.6...v0.3.7) (2018-12-08) |
@@ -57,4 +57,4 @@ /** | ||
const isCorsSetUp = (bucket, corsConfig) => getToken(auth).then(token => gcp.config.cors.isCorsSetup(bucket, corsConfig, token)) | ||
const setupCors = (bucket, corsConfig) => getToken(auth).then(token => gcp.config.cors.setup(bucket, corsConfig, token)) | ||
const disableCors = (bucket) => getToken(auth).then(token => gcp.config.cors.disable(bucket, token)) | ||
const setupCors = (bucket, corsConfig) => getToken(auth).then(token => gcp.config.cors.setup(bucket, corsConfig, token)).then(({ data }) => data) | ||
const disableCors = (bucket) => getToken(auth).then(token => gcp.config.cors.disable(bucket, token)).then(({ data }) => data) | ||
const updateConfig = (bucket, config={}) => getToken(auth).then(token => gcp.config.update(bucket, config, token)).then(({ data }) => data) | ||
@@ -61,0 +61,0 @@ const addPublicAccess = filePath => getToken(auth).then(token => { |
{ | ||
"name": "google-cloud-bucket", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "Nodejs package to add objects to a Google Cloud Bucket.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -74,3 +74,3 @@ # Google Cloud Bucket · [![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) | ||
storage.insert(html, 'your-bucket/a-path/index.html', { public: true }) | ||
.then(({ data:{ uri } }) => console.log(`Your web page is publicly available at: ${uri}`)) | ||
.then(({ publicUri }) => console.log(`Your web page is publicly available at: ${publicUri}`)) | ||
@@ -97,3 +97,3 @@ // UPLOADING AN IMAGE | ||
bucket.addPublicAccess() | ||
.then(({ data:{ uri } }) => console.log(`Your web page is publicly available at: ${uri}`)) | ||
.then(({ publicUri }) => console.log(`Your web page is publicly available at: ${publicUri}`)) | ||
@@ -105,3 +105,3 @@ // REMOVING THE PUBLICLY READABLE ACCESS FROM A BUCKET (warning: Your service account must have the 'roles/storage.admin' role) | ||
bucket.object('a-path/private.html').addPublicAccess() | ||
.then(({ data:{ uri } }) => console.log(`Your web page is publicly available at: ${uri}`)) | ||
.then(({ publicUri }) => console.log(`Your web page is publicly available at: ${publicUri}`)) | ||
@@ -108,0 +108,0 @@ // REMOVING THE PUBLICLY READABLE ACCESS FROM A FILE (warning: Your service account must have the 'roles/storage.objectAdmin' role) |
@@ -156,2 +156,3 @@ /** | ||
data = data || {} | ||
data.publicUri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
data.uri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
@@ -187,2 +188,3 @@ return { status, data } | ||
data = data || {} | ||
data.publicUri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
data.uri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
@@ -217,2 +219,3 @@ return { status, data } | ||
data = data || {} | ||
data.publicUri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
data.uri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
@@ -253,2 +256,3 @@ return { status, data } | ||
data = data || {} | ||
data.publicUri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
data.uri = `https://storage.googleapis.com/${encodeURIComponent(bucket)}/${filepath}` | ||
@@ -255,0 +259,0 @@ return { status, data } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54409
1015