@supabase/storage-js 2.104.2-canary.3 → 2.105.0

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/README.md CHANGED
@@ -67,7 +67,7 @@ If you're already using `@supabase/supabase-js`, access storage through the clie
67
67
  ```js
68
68
  import { createClient } from '@supabase/supabase-js'
69
69
 
70
- // Use publishable/anon key for frontend applications
70
+ // Use publishable key for frontend applications
71
71
  const supabase = createClient('https://<project_ref>.supabase.co', '<your-publishable-key>')
72
72
 
73
73
  // Access storage
package/dist/index.cjs CHANGED
@@ -726,11 +726,12 @@ var StorageFileApi = class extends BaseApiClient {
726
726
  headers["cache-control"] = `max-age=${options.cacheControl}`;
727
727
  headers["content-type"] = options.contentType;
728
728
  if (metadata) headers["x-metadata"] = _this3.toBase64(_this3.encodeMetadata(metadata));
729
+ if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options.duplex) options.duplex = "half";
729
730
  }
730
731
  if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader(headers, key, value);
731
732
  return {
732
733
  path: cleanPath,
733
- fullPath: (await put(_this3.fetch, url.toString(), body, { headers })).Key
734
+ fullPath: (await put(_this3.fetch, url.toString(), body, _objectSpread2({ headers }, (options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {}))).Key
734
735
  };
735
736
  });
736
737
  }
@@ -1486,7 +1487,7 @@ var StorageFileApi = class extends BaseApiClient {
1486
1487
 
1487
1488
  //#endregion
1488
1489
  //#region src/lib/version.ts
1489
- const version = "2.104.2-canary.3";
1490
+ const version = "2.105.0";
1490
1491
 
1491
1492
  //#endregion
1492
1493
  //#region src/lib/constants.ts
@@ -1812,7 +1813,7 @@ var StorageAnalyticsClient = class extends BaseApiClient {
1812
1813
  * ```typescript
1813
1814
  * import { createClient } from '@supabase/supabase-js'
1814
1815
  *
1815
- * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')
1816
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
1816
1817
  * const { data, error } = await supabase.storage.analytics.listBuckets()
1817
1818
  * ```
1818
1819
  *
@@ -2347,7 +2348,7 @@ var StorageVectorsClient = class extends VectorBucketApi {
2347
2348
  * ```typescript
2348
2349
  * import { createClient } from '@supabase/supabase-js'
2349
2350
  *
2350
- * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')
2351
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
2351
2352
  * const bucket = supabase.storage.vectors.from('embeddings-prod')
2352
2353
  * ```
2353
2354
  *
@@ -2844,7 +2845,7 @@ var StorageClient = class extends StorageBucketApi {
2844
2845
  * ```ts
2845
2846
  * import { createClient } from '@supabase/supabase-js'
2846
2847
  *
2847
- * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')
2848
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
2848
2849
  * const avatars = supabase.storage.from('avatars')
2849
2850
  * ```
2850
2851
  *
@@ -2853,7 +2854,7 @@ var StorageClient = class extends StorageBucketApi {
2853
2854
  * import { StorageClient } from '@supabase/storage-js'
2854
2855
  *
2855
2856
  * const storage = new StorageClient('https://xyzcompany.supabase.co/storage/v1', {
2856
- * apikey: 'publishable-or-anon-key',
2857
+ * apikey: 'your-publishable-key',
2857
2858
  * })
2858
2859
  * const avatars = storage.from('avatars')
2859
2860
  * ```