@supabase/storage-js 2.105.5-beta.0 → 2.105.5-beta.8

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Supabase
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1159,13 +1159,13 @@ This package is part of the [Supabase JavaScript monorepo](https://github.com/su
1159
1159
 
1160
1160
  ```bash
1161
1161
  # Build the package
1162
- npx nx build storage-js
1162
+ pnpm nx build storage-js
1163
1163
 
1164
1164
  # Watch mode for development
1165
- npx nx build storage-js --watch
1165
+ pnpm nx build storage-js --watch
1166
1166
 
1167
1167
  # Generate documentation
1168
- npx nx docs storage-js
1168
+ pnpm nx docs storage-js
1169
1169
  ```
1170
1170
 
1171
1171
  ### Testing
@@ -1175,7 +1175,7 @@ npx nx docs storage-js
1175
1175
  #### Prerequisites
1176
1176
 
1177
1177
  1. **Docker** must be installed and running (used by Supabase CLI internally)
1178
- 2. **Supabase CLI** — installed automatically via `npx supabase`
1178
+ 2. **Supabase CLI** — installed automatically via `pnpm exec supabase`
1179
1179
 
1180
1180
  #### Test Scripts Overview
1181
1181
 
@@ -1194,7 +1194,7 @@ This handles everything automatically - starting infrastructure, running tests,
1194
1194
 
1195
1195
  ```bash
1196
1196
  # From monorepo root
1197
- npx nx test:storage storage-js
1197
+ pnpm nx test:storage storage-js
1198
1198
  ```
1199
1199
 
1200
1200
  This command will:
@@ -1212,14 +1212,14 @@ Useful for development when you want to run tests multiple times without restart
1212
1212
  ```bash
1213
1213
  # Step 1: Start the test infrastructure
1214
1214
  # From root
1215
- npx nx test:infra storage-js
1215
+ pnpm nx test:infra storage-js
1216
1216
  # This starts: PostgreSQL, Storage API, Kong Gateway, and imgproxy
1217
1217
 
1218
1218
  # Step 2: Run tests (can run multiple times)
1219
- npx nx test:suite storage-js
1219
+ pnpm nx test:suite storage-js
1220
1220
 
1221
1221
  # Step 3: When done, clean up the infrastructure
1222
- npx nx test:clean-post storage-js
1222
+ pnpm nx test:clean-post storage-js
1223
1223
  ```
1224
1224
 
1225
1225
  ##### Option 3: Development Mode
@@ -1228,27 +1228,27 @@ For actively developing and debugging tests:
1228
1228
 
1229
1229
  ```bash
1230
1230
  # Start infrastructure once (from root)
1231
- npx nx test:infra storage-js
1231
+ pnpm nx test:infra storage-js
1232
1232
 
1233
1233
  # Run tests in watch mode
1234
- npx nx test:suite storage-js --watch
1234
+ pnpm nx test:suite storage-js --watch
1235
1235
 
1236
1236
  # Clean up when done
1237
- npx nx test:clean-post storage-js
1237
+ pnpm nx test:clean-post storage-js
1238
1238
  ```
1239
1239
 
1240
1240
  #### Test Infrastructure Details
1241
1241
 
1242
- The test infrastructure is managed via the Supabase CLI (`npx supabase start --workdir test`), which starts a local Supabase stack defined by the config in `test/`. This includes PostgreSQL, the Storage API, Kong Gateway, and supporting services.
1242
+ The test infrastructure is managed via the Supabase CLI (`pnpm exec supabase start --workdir test`), which starts a local Supabase stack defined by the config in `test/`. This includes PostgreSQL, the Storage API, Kong Gateway, and supporting services.
1243
1243
 
1244
1244
  #### Common Issues and Solutions
1245
1245
 
1246
- | Issue | Solution |
1247
- | --------------------------------- | ------------------------------------------------------------------------------------------------ |
1248
- | Port conflicts | Another service is using a required port. Run `npx nx test:clean-post storage-js` then try again |
1249
- | "request failed, reason:" errors | Infrastructure isn't running. Run `npx nx test:infra storage-js` first |
1250
- | Tests fail with connection errors | Ensure Docker is running (Supabase CLI requires Docker) |
1251
- | Stack already running | Run `npx nx test:clean-post storage-js` to stop it before restarting |
1246
+ | Issue | Solution |
1247
+ | --------------------------------- | ------------------------------------------------------------------------------------------------- |
1248
+ | Port conflicts | Another service is using a required port. Run `pnpm nx test:clean-post storage-js` then try again |
1249
+ | "request failed, reason:" errors | Infrastructure isn't running. Run `pnpm nx test:infra storage-js` first |
1250
+ | Tests fail with connection errors | Ensure Docker is running (Supabase CLI requires Docker) |
1251
+ | Stack already running | Run `pnpm nx test:clean-post storage-js` to stop it before restarting |
1252
1252
 
1253
1253
  #### Understanding Test Failures
1254
1254
 
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  let iceberg_js = require("iceberg-js");
2
2
 
3
- //#region \0@oxc-project+runtime@0.101.0/helpers/typeof.js
3
+ //#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
4
4
  function _typeof(o) {
5
5
  "@babel/helpers - typeof";
6
6
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
@@ -11,7 +11,7 @@ function _typeof(o) {
11
11
  }
12
12
 
13
13
  //#endregion
14
- //#region \0@oxc-project+runtime@0.101.0/helpers/toPrimitive.js
14
+ //#region \0@oxc-project+runtime@0.103.0/helpers/toPrimitive.js
15
15
  function toPrimitive(t, r) {
16
16
  if ("object" != _typeof(t) || !t) return t;
17
17
  var e = t[Symbol.toPrimitive];
@@ -24,14 +24,14 @@ function toPrimitive(t, r) {
24
24
  }
25
25
 
26
26
  //#endregion
27
- //#region \0@oxc-project+runtime@0.101.0/helpers/toPropertyKey.js
27
+ //#region \0@oxc-project+runtime@0.103.0/helpers/toPropertyKey.js
28
28
  function toPropertyKey(t) {
29
29
  var i = toPrimitive(t, "string");
30
30
  return "symbol" == _typeof(i) ? i : i + "";
31
31
  }
32
32
 
33
33
  //#endregion
34
- //#region \0@oxc-project+runtime@0.101.0/helpers/defineProperty.js
34
+ //#region \0@oxc-project+runtime@0.103.0/helpers/defineProperty.js
35
35
  function _defineProperty(e, r, t) {
36
36
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
37
37
  value: t,
@@ -42,7 +42,7 @@ function _defineProperty(e, r, t) {
42
42
  }
43
43
 
44
44
  //#endregion
45
- //#region \0@oxc-project+runtime@0.101.0/helpers/objectSpread2.js
45
+ //#region \0@oxc-project+runtime@0.103.0/helpers/objectSpread2.js
46
46
  function ownKeys(e, r) {
47
47
  var t = Object.keys(e);
48
48
  if (Object.getOwnPropertySymbols) {
@@ -1197,7 +1197,7 @@ var StorageFileApi = class extends BaseApiClient {
1197
1197
  * @category Storage
1198
1198
  * @subcategory File Buckets
1199
1199
  * @param path The file path, including the file name. For example `folder/image.png`.
1200
- * @returns `{ data: true, error: null }` when the file exists, `{ data: false, error: null }` when it does not (HTTP 400 or 404), or throws/returns a `StorageError` for any other failure.
1200
+ * @returns Promise with response containing boolean indicating file existence or error
1201
1201
  *
1202
1202
  * @example Check file existence
1203
1203
  * ```js
@@ -1223,7 +1223,7 @@ var StorageFileApi = class extends BaseApiClient {
1223
1223
  const status = error instanceof StorageApiError ? error.status : error instanceof StorageUnknownError ? (_error$originalError = error.originalError) === null || _error$originalError === void 0 ? void 0 : _error$originalError.status : void 0;
1224
1224
  if (status !== void 0 && [400, 404].includes(status)) return {
1225
1225
  data: false,
1226
- error: null
1226
+ error
1227
1227
  };
1228
1228
  }
1229
1229
  throw error;
@@ -1515,7 +1515,7 @@ var StorageFileApi = class extends BaseApiClient {
1515
1515
 
1516
1516
  //#endregion
1517
1517
  //#region src/lib/version.ts
1518
- const version = "2.105.5-beta.0";
1518
+ const version = "2.105.5-beta.8";
1519
1519
 
1520
1520
  //#endregion
1521
1521
  //#region src/lib/constants.ts