@directus/storage-driver-supabase 3.0.11 → 3.0.13

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { DEFAULT_CHUNK_SIZE } from "@directus/constants";
2
2
  import { normalizePath } from "@directus/utils";
3
3
  import { StorageClient } from "@supabase/storage-js";
4
- import { join } from "node:path";
4
+ import { basename, join } from "node:path";
5
5
  import { Readable } from "node:stream";
6
6
  import * as tus from "tus-js-client";
7
7
  import { fetch } from "undici";
@@ -57,8 +57,9 @@ var DriverSupabase = class {
57
57
  return Readable.fromWeb(response.body);
58
58
  }
59
59
  async stat(filepath) {
60
- const { data, error } = await this.bucket.list(this.config.root, {
61
- search: filepath,
60
+ const rootFolder = normalizePath(join(this.config.root, dirname(filepath)));
61
+ const { data, error } = await this.bucket.list(rootFolder, {
62
+ search: basename(filepath),
62
63
  limit: 1
63
64
  });
64
65
  if (error || data.length === 0) throw new Error("File not found");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directus/storage-driver-supabase",
3
- "version": "3.0.11",
3
+ "version": "3.0.13",
4
4
  "description": "Supabase file storage abstraction for `@directus/storage`",
5
5
  "homepage": "https://directus.io",
6
6
  "repository": {
@@ -21,12 +21,12 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@supabase/storage-js": "2.76.1",
24
+ "@supabase/storage-js": "2.81.0",
25
25
  "tus-js-client": "4.3.1",
26
26
  "undici": "7.16.0",
27
27
  "@directus/constants": "14.0.0",
28
28
  "@directus/storage": "12.0.3",
29
- "@directus/utils": "13.0.12"
29
+ "@directus/utils": "13.1.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@directus/tsconfig": "3.0.0",
@@ -35,7 +35,7 @@
35
35
  "tsdown": "0.15.11",
36
36
  "typescript": "5.9.3",
37
37
  "vitest": "3.2.4",
38
- "@directus/types": "13.3.1"
38
+ "@directus/types": "13.5.0"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsdown src/index.ts --dts",