@rytass/storages-adapter-gcs 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -12,7 +12,9 @@ class StorageGCSService extends storages.Storage {
12
12
  super(options);
13
13
  this.storage = new storage.Storage({
14
14
  projectId: options.projectId,
15
- credentials: options.credentials
15
+ ...options.credentials ? {
16
+ credentials: options.credentials
17
+ } : {}
16
18
  });
17
19
  this.bucket = this.storage.bucket(options.bucket);
18
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/storages-adapter-gcs",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Google Cloud Storage Adapter for @rytass/storages",
5
5
  "keywords": [
6
6
  "gcp",
@@ -10,7 +10,9 @@ class StorageGCSService extends Storage {
10
10
  super(options);
11
11
  this.storage = new Storage$1({
12
12
  projectId: options.projectId,
13
- credentials: options.credentials
13
+ ...options.credentials ? {
14
+ credentials: options.credentials
15
+ } : {}
14
16
  });
15
17
  this.bucket = this.storage.bucket(options.bucket);
16
18
  }
package/typings.d.ts CHANGED
@@ -2,7 +2,7 @@ import { StorageOptions } from '@rytass/storages';
2
2
  export interface GCSOptions extends StorageOptions {
3
3
  bucket: string;
4
4
  projectId: string;
5
- credentials: {
5
+ credentials?: {
6
6
  client_email: string;
7
7
  private_key: string;
8
8
  };