@supabase/storage-js 2.99.1 → 2.99.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.cjs CHANGED
@@ -909,9 +909,10 @@ var StorageFileApi = class extends BaseApiClient {
909
909
  var _this8 = this;
910
910
  return _this8.handleOperation(async () => {
911
911
  let _path = _this8._getFinalPath(path);
912
- let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread2({ expiresIn }, (options === null || options === void 0 ? void 0 : options.transform) ? { transform: options.transform } : {}), { headers: _this8.headers });
912
+ const hasTransform = typeof (options === null || options === void 0 ? void 0 : options.transform) === "object" && options.transform !== null && Object.keys(options.transform).length > 0;
913
+ let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread2({ expiresIn }, hasTransform ? { transform: options.transform } : {}), { headers: _this8.headers });
913
914
  const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download) ? `&download=${options.download === true ? "" : options.download}` : "";
914
- const returnedPath = (options === null || options === void 0 ? void 0 : options.transform) && data.signedURL.includes("/object/sign/") ? data.signedURL.replace("/object/sign/", "/render/image/sign/") : data.signedURL;
915
+ const returnedPath = hasTransform && data.signedURL.includes("/object/sign/") ? data.signedURL.replace("/object/sign/", "/render/image/sign/") : data.signedURL;
915
916
  return { signedUrl: encodeURI(`${_this8.url}${returnedPath}${downloadQueryParam}`) };
916
917
  });
917
918
  }
@@ -1364,7 +1365,7 @@ var StorageFileApi = class extends BaseApiClient {
1364
1365
 
1365
1366
  //#endregion
1366
1367
  //#region src/lib/version.ts
1367
- const version = "2.99.1";
1368
+ const version = "2.99.2";
1368
1369
 
1369
1370
  //#endregion
1370
1371
  //#region src/lib/constants.ts