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.10.0 to 0.11.0

5

CHANGELOG.md

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

<a name="0.11.0"></a>
# [0.11.0](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.10.0...v0.11.0) (2019-02-08)
<a name="0.10.0"></a>

@@ -7,0 +12,0 @@ # [0.10.0](https://github.com/nicolasdao/google-cloud-bucket/compare/v0.9.2...v0.10.0) (2019-02-08)

36

index.js

@@ -134,14 +134,14 @@ /**

* [description]
* @param {[type]} bucket Source Bucket
* @param {[type]} filePath Source path where the files are located
* @param {String} options.to.local Destination in the local machine where the zip file will be stored
* @param {String} options.to.bucket.name Destination bucket in the Google Cloud Storage machine where the zip file will be stored
* @param {String} options.to.bucket.path Destination path in the destination bucket where the zip file will be stored
* @param {String} options.ignore Array if strings or regex , or string or regex that will be ignored
* @param {String} options.eventHandlers['files-listed']
* @param {String} options.eventHandlers['file-received']
* @param {String} options.eventHandlers['finished']
* @param {String} options.eventHandlers['saved']
* @param {String} options.eventHandlers['error']
* @return {[type]} [description]
* @param {[type]} bucket Source Bucket
* @param {[type]} filePath Source path where the files are located
* @param {String} options.to.local Destination in the local machine where the zip file will be stored
* @param {String} options.to.bucket.name Destination bucket in the Google Cloud Storage machine where the zip file will be stored
* @param {String} options.to.bucket.path Destination path in the destination bucket where the zip file will be stored
* @param {String} options.ignore Array if strings or regex , or string or regex that will be ignored
* @param {String} options.on['files-listed']
* @param {String} options.on['file-received']
* @param {String} options.on['finished']
* @param {String} options.on['saved']
* @param {String} options.on['error']
* @return {[type]} [description]
*/

@@ -158,7 +158,7 @@ const zipFiles = (bucket, filePath, options) => listObjects(bucket, filePath, options)

const eventHandlers = options.eventHandlers || {}
const onFilesListed = eventHandlers['files-listed'] || (() => null)
const onFileReceived = eventHandlers['file-received'] || (() => null)
const onFilesZipped = eventHandlers['finished'] || (() => null)
const onFilesSaved = eventHandlers['saved'] || (() => null)
const on = options.on || {}
const onFilesListed = on['files-listed'] || (() => null)
const onFileReceived = on['file-received'] || (() => null)
const onFilesZipped = on['finished'] || (() => null)
const onFilesSaved = on['saved'] || (() => null)
onFilesListed({ count: objects.length, size: totalSize, data:objects })

@@ -232,3 +232,3 @@

.catch(err => {
const onError = ((options || {}).eventHandlers || {})['error']
const onError = ((options || {}).on || {})['error']
if (onError)

@@ -235,0 +235,0 @@ onError(err)

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

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

@@ -301,3 +301,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)

You can also track the various steps of the zipping process with the optional `eventHandlers` object:
You can also track the various steps of the zipping process with the optional `on` object:

@@ -315,3 +315,3 @@ ```js

},
eventHandlers:{
on:{
'files-listed': (files) => {

@@ -318,0 +318,0 @@ console.log(`Total number of files to be zipped: ${files.count}`)

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