Socket
Socket
Sign inDemoInstall

@google-cloud/storage

Package Overview
Dependencies
Maintainers
1
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/storage - npm Package Compare versions

Comparing version 6.4.0 to 6.4.1

1

build/src/file.d.ts

@@ -253,2 +253,3 @@ /// <reference types="node" />

declare class File extends ServiceObject<File> {
#private;
acl: Acl;

@@ -255,0 +256,0 @@ crc32cGenerator: CRC32CValidatorGenerator;

1

build/src/resumable-upload.d.ts

@@ -247,3 +247,2 @@ /// <reference types="node" />

private makeRequestStream;
private restart;
/**

@@ -250,0 +249,0 @@ * @return {bool} is the request good?

@@ -258,3 +258,14 @@ "use strict";

async createURIAsync() {
const metadata = this.metadata;
const metadata = { ...this.metadata };
const headers = {};
// Delete content length and content type from metadata if they exist.
// These are headers and should not be sent as part of the metadata.
if (metadata.contentLength) {
headers['X-Upload-Content-Length'] = metadata.contentLength.toString();
delete metadata.contentLength;
}
if (metadata.contentType) {
headers['X-Upload-Content-Type'] = metadata.contentType;
delete metadata.contentType;
}
// Check if headers already exist before creating new ones

@@ -271,2 +282,3 @@ const reqOpts = {

'x-goog-api-client': `gl-node/${process.versions.node} gccl/${packageJson.version} gccl-invocation-id/${this.currentInvocationId.uri}`,
...headers,
},

@@ -428,5 +440,12 @@ };

}
catch (err) {
const e = err;
this.destroy(e);
catch (e) {
const err = e;
if (this.retryOptions.retryableErrorFn(err)) {
this.attemptDelayedRetry({
status: NaN,
data: err,
});
return;
}
this.destroy(err);
}

@@ -512,2 +531,9 @@ }

const err = e;
if (this.retryOptions.retryableErrorFn(err)) {
this.attemptDelayedRetry({
status: NaN,
data: err,
});
return;
}
this.destroy(err);

@@ -556,17 +582,2 @@ }

}
restart() {
if (this.numBytesWritten) {
const message = 'Attempting to restart an upload after unrecoverable bytes have been written from upstream. Stopping as this could result in data loss. Initiate a new upload to continue.';
this.emit('error', new RangeError(message));
return;
}
this.lastChunkSent = Buffer.alloc(0);
this.createURI(err => {
if (err) {
return this.destroy(err);
}
this.startUploading();
return;
});
}
/**

@@ -573,0 +584,0 @@ * @return {bool} is the request good?

@@ -96,5 +96,6 @@ "use strict";

const isConnectionProblem = (reason) => {
return ((reason && reason.includes('eai_again')) || //DNS lookup error
return (reason.includes('eai_again') || // DNS lookup error
reason === 'econnreset' ||
reason === 'unexpected connection closure');
reason === 'unexpected connection closure' ||
reason === 'epipe');
};

@@ -114,3 +115,3 @@ if (err) {

const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
if (isConnectionProblem(reason)) {
if (reason && isConnectionProblem(reason)) {
return true;

@@ -117,0 +118,0 @@ }

{
"name": "@google-cloud/storage",
"description": "Cloud Storage Client Library for Node.js",
"version": "6.4.0",
"version": "6.4.1",
"license": "Apache-2.0",

@@ -68,3 +68,2 @@ "author": "Google Inc.",

"p-limit": "^3.0.1",
"pumpify": "^2.0.0",
"retry-request": "^5.0.0",

@@ -89,3 +88,2 @@ "teeny-request": "^8.0.0",

"@types/proxyquire": "^1.3.28",
"@types/pumpify": "^1.4.1",
"@types/request": "^2.48.4",

@@ -92,0 +90,0 @@ "@types/sinon": "^10.0.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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