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

@google-cloud/storage

Package Overview
Dependencies
Maintainers
1
Versions
185
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 4.4.0 to 4.5.0

build/src/signer.d.ts

17

build/src/bucket.d.ts
/// <reference types="node" />
import { ApiError, BodyResponseCallback, DecorateRequestOptions, DeleteCallback, ExistsCallback, GetConfig, Metadata, ResponseBody, ServiceObject } from '@google-cloud/common';
import * as http from 'http';
import { Acl } from './acl';

@@ -9,2 +10,3 @@ import { Channel } from './channel';

import { Storage, Cors } from './storage';
import { GetSignedUrlResponse, GetSignedUrlCallback, URLSigner, Query } from './signer';
interface BucketOptions {

@@ -136,2 +138,14 @@ userProject?: string;

}
export interface GetBucketSignedUrlConfig {
action: 'list';
version?: 'v2' | 'v4';
cname?: string;
virtualHostedStyle?: boolean;
expires: string | number | Date;
extensionHeaders?: http.OutgoingHttpHeaders;
queryParams?: Query;
}
export declare enum BucketActionToHTTPMethod {
list = "GET"
}
export interface GetNotificationsOptions {

@@ -424,2 +438,3 @@ userProject?: string;

getFilesStream: Function;
signer?: URLSigner;
constructor(storage: Storage, name: string, options?: BucketOptions);

@@ -483,2 +498,4 @@ addLifecycleRule(rule: LifecycleRule, options?: AddLifecycleRuleOptions): Promise<SetBucketMetadataResponse>;

getNotifications(options: GetNotificationsOptions, callback: GetNotificationsCallback): void;
getSignedUrl(cfg: GetBucketSignedUrlConfig): Promise<GetSignedUrlResponse>;
getSignedUrl(cfg: GetBucketSignedUrlConfig, callback: GetSignedUrlCallback): void;
lock(metageneration: number | string): Promise<BucketLockResponse>;

@@ -485,0 +502,0 @@ lock(metageneration: number | string, callback: BucketLockCallback): void;

60

build/src/file.d.ts

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

import { Acl } from './acl';
import { GetSignedUrlResponse, GetSignedUrlCallback, URLSigner, Query } from './signer';
import { ResponseBody, Duplexify } from '@google-cloud/common/build/src/util';

@@ -14,24 +15,2 @@ export declare type GetExpirationDateResponse = [Date];

}
export interface GetSignedUrlConfig {
action: 'read' | 'write' | 'delete' | 'resumable';
version?: 'v2' | 'v4';
cname?: string;
contentMd5?: string;
contentType?: string;
expires: string | number | Date;
extensionHeaders?: http.OutgoingHttpHeaders;
promptSaveAs?: string;
responseDisposition?: string;
responseType?: string;
}
export declare enum ActionToHTTPMethod {
read = "GET",
write = "PUT",
delete = "DELETE",
resumable = "POST"
}
export declare type GetSignedUrlResponse = [string];
export interface GetSignedUrlCallback {
(err: Error | null, url?: string): void;
}
export interface PolicyDocument {

@@ -58,2 +37,16 @@ string: string;

}
export interface GetSignedUrlConfig {
action: 'read' | 'write' | 'delete' | 'resumable';
version?: 'v2' | 'v4';
virtualHostedStyle?: boolean;
cname?: string;
contentMd5?: string;
contentType?: string;
expires: string | number | Date;
extensionHeaders?: http.OutgoingHttpHeaders;
promptSaveAs?: string;
responseDisposition?: string;
responseType?: string;
queryParams?: Query;
}
export interface GetFileMetadataOptions {

@@ -139,2 +132,8 @@ userProject?: string;

export declare type RotateEncryptionKeyResponse = CopyResponse;
export declare enum ActionToHTTPMethod {
read = "GET",
write = "PUT",
delete = "DELETE",
resumable = "POST"
}
export interface FileOptions {

@@ -247,2 +246,3 @@ encryptionKey?: string | Buffer;

userProject?: string;
signer?: URLSigner;
name: string;

@@ -625,4 +625,2 @@ generation?: number;

getSignedUrl(cfg: GetSignedUrlConfig, callback: GetSignedUrlCallback): void;
private getSignedUrlV2;
private getSignedUrlV4;
isPublic(): Promise<IsPublicResponse>;

@@ -686,16 +684,2 @@ isPublic(callback: IsPublicCallback): void;

startSimpleUpload_(dup: Duplexify, options?: CreateResumableUploadOptions): void;
/**
* Create canonical headers for signing v4 url.
*
* The canonical headers for v4-signing a request demands header names are
* first lowercased, followed by sorting the header names.
* Then, construct the canonical headers part of the request:
* <lowercasedHeaderName> + ":" + Trim(<value>) + "\n"
* ..
* <lowercasedHeaderName> + ":" + Trim(<value>) + "\n"
*
* @param headers
* @private
*/
private getCanonicalHeaders;
}

@@ -702,0 +686,0 @@ export declare function emitWarning(): void;

@@ -33,5 +33,5 @@ /**

export { AccessControlObject, AclOptions, AddAclCallback, AddAclOptions, AddAclResponse, GetAclCallback, GetAclOptions, GetAclResponse, RemoveAclCallback, RemoveAclOptions, RemoveAclResponse, UpdateAclCallback, UpdateAclOptions, UpdateAclResponse, } from './acl';
export { Bucket, BucketExistsCallback, BucketExistsOptions, BucketExistsResponse, BucketLockCallback, BucketLockResponse, CombineCallback, CombineOptions, CombineResponse, CreateChannelCallback, CreateChannelConfig, CreateChannelOptions, CreateChannelResponse, CreateNotificationCallback, CreateNotificationOptions, CreateNotificationResponse, DeleteBucketCallback, DeleteBucketOptions, DeleteBucketResponse, DeleteFilesCallback, DeleteFilesOptions, DeleteLabelsCallback, DeleteLabelsResponse, DisableRequesterPaysCallback, DisableRequesterPaysResponse, EnableRequesterPaysCallback, EnableRequesterPaysResponse, GetBucketCallback, GetBucketMetadataCallback, GetBucketMetadataOptions, GetBucketMetadataResponse, GetBucketOptions, GetBucketResponse, GetFilesCallback, GetFilesOptions, GetFilesResponse, GetLabelsCallback, GetLabelsOptions, GetLabelsResponse, GetNotificationsCallback, GetNotificationsOptions, GetNotificationsResponse, Labels, MakeBucketPrivateCallback, MakeBucketPrivateOptions, MakeBucketPrivateResponse, MakeBucketPublicCallback, MakeBucketPublicOptions, MakeBucketPublicResponse, SetBucketMetadataCallback, SetBucketMetadataOptions, SetBucketMetadataResponse, SetBucketStorageClassCallback, SetBucketStorageClassOptions, SetLabelsCallback, SetLabelsOptions, SetLabelsResponse, UploadCallback, UploadOptions, UploadResponse, } from './bucket';
export { Bucket, BucketExistsCallback, BucketExistsOptions, BucketExistsResponse, BucketLockCallback, BucketLockResponse, CombineCallback, CombineOptions, CombineResponse, CreateChannelCallback, CreateChannelConfig, CreateChannelOptions, CreateChannelResponse, CreateNotificationCallback, CreateNotificationOptions, CreateNotificationResponse, DeleteBucketCallback, DeleteBucketOptions, DeleteBucketResponse, DeleteFilesCallback, DeleteFilesOptions, DeleteLabelsCallback, DeleteLabelsResponse, DisableRequesterPaysCallback, DisableRequesterPaysResponse, EnableRequesterPaysCallback, EnableRequesterPaysResponse, GetBucketCallback, GetBucketMetadataCallback, GetBucketMetadataOptions, GetBucketMetadataResponse, GetBucketOptions, GetBucketResponse, GetBucketSignedUrlConfig, GetFilesCallback, GetFilesOptions, GetFilesResponse, GetLabelsCallback, GetLabelsOptions, GetLabelsResponse, GetNotificationsCallback, GetNotificationsOptions, GetNotificationsResponse, Labels, MakeBucketPrivateCallback, MakeBucketPrivateOptions, MakeBucketPrivateResponse, MakeBucketPublicCallback, MakeBucketPublicOptions, MakeBucketPublicResponse, SetBucketMetadataCallback, SetBucketMetadataOptions, SetBucketMetadataResponse, SetBucketStorageClassCallback, SetBucketStorageClassOptions, SetLabelsCallback, SetLabelsOptions, SetLabelsResponse, UploadCallback, UploadOptions, UploadResponse, } from './bucket';
export { Channel, StopCallback } from './channel';
export { CopyCallback, CopyOptions, CopyResponse, CreateReadStreamOptions, CreateResumableUploadCallback, CreateResumableUploadOptions, CreateResumableUploadResponse, CreateWriteStreamOptions, DeleteFileCallback, DeleteFileOptions, DeleteFileResponse, DownloadCallback, DownloadOptions, DownloadResponse, EncryptionKeyOptions, File, FileExistsCallback, FileExistsOptions, FileExistsResponse, FileOptions, GetExpirationDateCallback, GetExpirationDateResponse, GetFileCallback, GetFileMetadataCallback, GetFileMetadataOptions, GetFileMetadataResponse, GetFileOptions, GetFileResponse, GetSignedPolicyCallback, GetSignedPolicyOptions, GetSignedPolicyResponse, GetSignedUrlCallback, GetSignedUrlConfig, GetSignedUrlResponse, MakeFilePrivateCallback, MakeFilePrivateOptions, MakeFilePrivateResponse, MakeFilePublicCallback, MakeFilePublicResponse, MoveCallback, MoveOptions, MoveResponse, PolicyDocument, PredefinedAcl, RotateEncryptionKeyCallback, RotateEncryptionKeyOptions, RotateEncryptionKeyResponse, SaveCallback, SaveOptions, SetFileMetadataCallback, SetFileMetadataOptions, SetFileMetadataResponse, SetStorageClassCallback, SetStorageClassOptions, SetStorageClassResponse, } from './file';
export { CopyCallback, CopyOptions, CopyResponse, CreateReadStreamOptions, CreateResumableUploadCallback, CreateResumableUploadOptions, CreateResumableUploadResponse, CreateWriteStreamOptions, DeleteFileCallback, DeleteFileOptions, DeleteFileResponse, DownloadCallback, DownloadOptions, DownloadResponse, EncryptionKeyOptions, File, FileExistsCallback, FileExistsOptions, FileExistsResponse, FileOptions, GetExpirationDateCallback, GetExpirationDateResponse, GetFileCallback, GetFileMetadataCallback, GetFileMetadataOptions, GetFileMetadataResponse, GetFileOptions, GetFileResponse, GetSignedPolicyCallback, GetSignedPolicyOptions, GetSignedPolicyResponse, GetSignedUrlConfig, MakeFilePrivateCallback, MakeFilePrivateOptions, MakeFilePrivateResponse, MakeFilePublicCallback, MakeFilePublicResponse, MoveCallback, MoveOptions, MoveResponse, PolicyDocument, PredefinedAcl, RotateEncryptionKeyCallback, RotateEncryptionKeyOptions, RotateEncryptionKeyResponse, SaveCallback, SaveOptions, SetFileMetadataCallback, SetFileMetadataOptions, SetFileMetadataResponse, SetStorageClassCallback, SetStorageClassOptions, SetStorageClassResponse, } from './file';
export { HmacKey, HmacKeyMetadata, HmacKeyMetadataCallback, HmacKeyMetadataResponse, SetHmacKeyMetadata, SetHmacKeyMetadataOptions, } from './hmacKey';

@@ -41,1 +41,2 @@ export { GetPolicyCallback, GetPolicyOptions, GetPolicyResponse, Iam, Policy, SetPolicyCallback, SetPolicyOptions, SetPolicyResponse, TestIamPermissionsCallback, TestIamPermissionsOptions, TestIamPermissionsResponse, } from './iam';

export { BucketCallback, BucketOptions, CreateBucketQuery, CreateBucketRequest, CreateBucketResponse, CreateHmacKeyCallback, CreateHmacKeyOptions, CreateHmacKeyResponse, GetBucketsCallback, GetBucketsRequest, GetBucketsResponse, GetHmacKeysCallback, GetHmacKeysOptions, GetHmacKeysResponse, GetServiceAccountCallback, GetServiceAccountOptions, GetServiceAccountResponse, HmacKeyResourceResponse, ServiceAccount, Storage, StorageOptions, } from './storage';
export { GetSignedUrlCallback, GetSignedUrlResponse } from './signer';

@@ -41,1 +41,6 @@ /// <reference types="node" />

export declare function qsStringify(qs: querystring.ParsedUrlQueryInput): string;
export declare function objectKeyToLowercase<T>(object: {
[key: string]: T;
}): {
[key: string]: T;
};

@@ -82,2 +82,12 @@ "use strict";

exports.qsStringify = qsStringify;
function objectKeyToLowercase(object) {
const newObj = {};
for (let key of Object.keys(object)) {
const value = object[key];
key = key.toLowerCase();
newObj[key] = value;
}
return newObj;
}
exports.objectKeyToLowercase = objectKeyToLowercase;
//# sourceMappingURL=util.js.map

@@ -7,2 +7,9 @@ # Changelog

## [4.5.0](https://www.github.com/googleapis/nodejs-storage/compare/v4.4.0...v4.5.0) (2020-03-06)
### Features
* **v4:** support v4 signed URL for GA ([#1072](https://www.github.com/googleapis/nodejs-storage/issues/1072)) ([79d7b8f](https://www.github.com/googleapis/nodejs-storage/commit/79d7b8f5a187f23e58bf84db3f4b8c4b1a921978)), closes [#1051](https://www.github.com/googleapis/nodejs-storage/issues/1051) [#1056](https://www.github.com/googleapis/nodejs-storage/issues/1056) [#1066](https://www.github.com/googleapis/nodejs-storage/issues/1066) [#1068](https://www.github.com/googleapis/nodejs-storage/issues/1068) [#1069](https://www.github.com/googleapis/nodejs-storage/issues/1069) [#1067](https://www.github.com/googleapis/nodejs-storage/issues/1067) [#1070](https://www.github.com/googleapis/nodejs-storage/issues/1070)
## [4.4.0](https://www.github.com/googleapis/nodejs-storage/compare/v4.3.2...v4.4.0) (2020-03-03)

@@ -9,0 +16,0 @@

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

@@ -6,0 +6,0 @@ "author": "Google Inc.",

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