@google-cloud/storage
Advanced tools
Comparing version 7.9.0 to 7.10.0
@@ -834,2 +834,11 @@ /// <reference types="node" /> | ||
setEncryptionKey(encryptionKey: string | Buffer): this; | ||
/** | ||
* Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format. | ||
* @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file | ||
* or https://storage.googleapis.com/bucket/file. | ||
* @param {Storage} storageInstance an instance of a Storage object. | ||
* @param {FileOptions} [options] Configuration options | ||
* @returns {File} | ||
*/ | ||
static from(publicUrlOrGsUrl: string, storageInstance: Storage, options?: FileOptions): File; | ||
get(options?: GetFileOptions): Promise<GetResponse<File>>; | ||
@@ -836,0 +845,0 @@ get(callback: InstanceResponseCallback<File>): void; |
@@ -177,3 +177,4 @@ "use strict"; | ||
if (reqOpts[util_js_1.GCCL_GCS_CMD_KEY]) { | ||
reqOpts.headers['x-goog-api-client'] += ` gccl-gcs-cmd/${reqOpts[util_js_1.GCCL_GCS_CMD_KEY]}`; | ||
reqOpts.headers['x-goog-api-client'] += | ||
` gccl-gcs-cmd/${reqOpts[util_js_1.GCCL_GCS_CMD_KEY]}`; | ||
} | ||
@@ -180,0 +181,0 @@ if (reqOpts.shouldReturnStream) { |
@@ -557,3 +557,4 @@ "use strict"; | ||
headers['Content-Length'] = bytesToUpload; | ||
headers['Content-Range'] = `bytes ${this.offset}-${endingByte}/${totalObjectSize}`; | ||
headers['Content-Range'] = | ||
`bytes ${this.offset}-${endingByte}/${totalObjectSize}`; | ||
} | ||
@@ -560,0 +561,0 @@ else { |
@@ -276,3 +276,4 @@ "use strict"; | ||
if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) { | ||
headers[key] = `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; | ||
headers[key] = | ||
`${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; | ||
} | ||
@@ -279,0 +280,0 @@ } |
@@ -834,2 +834,11 @@ /// <reference types="node" /> | ||
setEncryptionKey(encryptionKey: string | Buffer): this; | ||
/** | ||
* Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format. | ||
* @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file | ||
* or https://storage.googleapis.com/bucket/file. | ||
* @param {Storage} storageInstance an instance of a Storage object. | ||
* @param {FileOptions} [options] Configuration options | ||
* @returns {File} | ||
*/ | ||
static from(publicUrlOrGsUrl: string, storageInstance: Storage, options?: FileOptions): File; | ||
get(options?: GetFileOptions): Promise<GetResponse<File>>; | ||
@@ -836,0 +845,0 @@ get(callback: InstanceResponseCallback<File>): void; |
@@ -151,3 +151,4 @@ /*! | ||
if (reqOpts[GCCL_GCS_CMD_KEY]) { | ||
reqOpts.headers['x-goog-api-client'] += ` gccl-gcs-cmd/${reqOpts[GCCL_GCS_CMD_KEY]}`; | ||
reqOpts.headers['x-goog-api-client'] += | ||
` gccl-gcs-cmd/${reqOpts[GCCL_GCS_CMD_KEY]}`; | ||
} | ||
@@ -154,0 +155,0 @@ if (reqOpts.shouldReturnStream) { |
@@ -528,3 +528,4 @@ // Copyright 2022 Google LLC | ||
headers['Content-Length'] = bytesToUpload; | ||
headers['Content-Range'] = `bytes ${this.offset}-${endingByte}/${totalObjectSize}`; | ||
headers['Content-Range'] = | ||
`bytes ${this.offset}-${endingByte}/${totalObjectSize}`; | ||
} | ||
@@ -531,0 +532,0 @@ else { |
@@ -246,3 +246,4 @@ /*! | ||
if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) { | ||
headers[key] = `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; | ||
headers[key] = | ||
`${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; | ||
} | ||
@@ -249,0 +250,0 @@ } |
{ | ||
"name": "@google-cloud/storage", | ||
"description": "Cloud Storage Client Library for Node.js", | ||
"version": "7.9.0", | ||
"version": "7.10.0", | ||
"license": "Apache-2.0", | ||
@@ -80,3 +80,2 @@ "author": "Google Inc.", | ||
"async-retry": "^1.3.3", | ||
"compressible": "^2.0.12", | ||
"duplexify": "^4.1.3", | ||
@@ -88,3 +87,2 @@ "ent": "^2.2.0", | ||
"mime": "^3.0.0", | ||
"mime-types": "^2.0.8", | ||
"p-limit": "^3.0.1", | ||
@@ -102,6 +100,4 @@ "retry-request": "^7.0.0", | ||
"@types/async-retry": "^1.4.3", | ||
"@types/compressible": "^2.0.0", | ||
"@types/ent": "^2.2.1", | ||
"@types/mime": "^3.0.0", | ||
"@types/mime-types": "^2.1.0", | ||
"@types/mocha": "^9.1.1", | ||
@@ -108,0 +104,0 @@ "@types/mockery": "^1.4.29", |
@@ -118,2 +118,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
| Create a Dual-Region Bucket | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/createBucketWithDualRegion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/createBucketWithDualRegion.js,samples/README.md) | | ||
| Create a Bucket with object retention enabled. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/createBucketWithObjectRetention.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/createBucketWithObjectRetention.js,samples/README.md) | | ||
| Create Bucket With Storage Class and Location. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/createBucketWithStorageClassAndLocation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/createBucketWithStorageClassAndLocation.js,samples/README.md) | | ||
@@ -201,2 +202,3 @@ | Create Bucket With Turbo Replication | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/createBucketWithTurboReplication.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/createBucketWithTurboReplication.js,samples/README.md) | | ||
| Set Event Based Hold | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setEventBasedHold.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setEventBasedHold.js,samples/README.md) | | ||
| Set the object retention policy of a File. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setObjectRetentionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setObjectRetentionPolicy.js,samples/README.md) | | ||
| Set Public Access Prevention Enforced | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setPublicAccessPreventionEnforced.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setPublicAccessPreventionEnforced.js,samples/README.md) | | ||
@@ -203,0 +205,0 @@ | Set Public Access Prevention Inherited | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setPublicAccessPreventionInherited.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setPublicAccessPreventionInherited.js,samples/README.md) | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1660830
15
36
36592
291
- Removedcompressible@^2.0.12
- Removedmime-types@^2.0.8
- Removedcompressible@2.0.18(transitive)
- Removedmime-db@1.53.0(transitive)