@directus/storage-driver-gcs 11.0.1 → 11.0.2

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Driver, Range } from '@directus/storage';
1
+ import { Driver, ReadOptions } from '@directus/storage';
2
2
  import { Readable } from 'node:stream';
3
3
 
4
4
  type DriverGCSConfig = {
@@ -12,7 +12,7 @@ declare class DriverGCS implements Driver {
12
12
  constructor(config: DriverGCSConfig);
13
13
  private fullPath;
14
14
  private file;
15
- read(filepath: string, range?: Range): Promise<Readable>;
15
+ read(filepath: string, options?: ReadOptions): Promise<Readable>;
16
16
  write(filepath: string, content: Readable): Promise<void>;
17
17
  delete(filepath: string): Promise<void>;
18
18
  stat(filepath: string): Promise<{
package/dist/index.js CHANGED
@@ -18,11 +18,12 @@ var DriverGCS = class {
18
18
  file(filepath) {
19
19
  return this.bucket.file(filepath);
20
20
  }
21
- async read(filepath, range) {
22
- const options = {};
23
- if (range?.start) options.start = range.start;
24
- if (range?.end) options.end = range.end;
25
- return this.file(this.fullPath(filepath)).createReadStream(options);
21
+ async read(filepath, options) {
22
+ const { range } = options || {};
23
+ const stream_options = {};
24
+ if (range?.start) stream_options.start = range.start;
25
+ if (range?.end) stream_options.end = range.end;
26
+ return this.file(this.fullPath(filepath)).createReadStream(stream_options);
26
27
  }
27
28
  async write(filepath, content) {
28
29
  const file = this.file(this.fullPath(filepath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directus/storage-driver-gcs",
3
- "version": "11.0.1",
3
+ "version": "11.0.2",
4
4
  "description": "GCS file storage abstraction for `@directus/storage`",
5
5
  "homepage": "https://directus.io",
6
6
  "repository": {
@@ -21,15 +21,15 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@google-cloud/storage": "7.12.0",
25
- "@directus/storage": "11.0.0",
26
- "@directus/utils": "12.0.1"
24
+ "@google-cloud/storage": "7.13.0",
25
+ "@directus/utils": "12.0.2",
26
+ "@directus/storage": "11.0.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@ngneat/falso": "7.2.0",
30
30
  "@vitest/coverage-v8": "2.1.2",
31
- "tsup": "8.2.4",
32
- "typescript": "5.6.2",
31
+ "tsup": "8.3.0",
32
+ "typescript": "5.6.3",
33
33
  "vitest": "2.1.2",
34
34
  "@directus/tsconfig": "2.0.0"
35
35
  },