@supabase/storage-js 2.80.1-canary.0 → 999.9.2-canary.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
@@ -9,6 +9,7 @@
9
9
  JS Client library to interact with Supabase Storage.
10
10
 
11
11
  - Documentation: https://supabase.io/docs/reference/javascript/storage-createbucket
12
+ - Typedoc: https://supabase.github.io/supabase-js/storage-js/v2/spec.json
12
13
 
13
14
  ## Quick Start Guide
14
15
 
@@ -158,7 +159,7 @@ const storageClient = new StorageClient(STORAGE_URL, {
158
159
 
159
160
  ## Development
160
161
 
161
- This package is part of the [Supabase JavaScript monorepo](https://github.com/supabase/js-client-libs). To work on this package:
162
+ This package is part of the [Supabase JavaScript monorepo](https://github.com/supabase/supabase-js). To work on this package:
162
163
 
163
164
  ### Building
164
165
 
@@ -1,2 +1,2 @@
1
- export declare const version = "2.80.1-canary.0";
1
+ export declare const version = "999.9.2-canary.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,oBAAoB,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,qBAAqB,CAAA"}
@@ -7,5 +7,5 @@ exports.version = void 0;
7
7
  // - Debugging and support (identifying which version is running)
8
8
  // - Telemetry and logging (version reporting in errors/analytics)
9
9
  // - Ensuring build artifacts match the published package version
10
- exports.version = '2.80.1-canary.0';
10
+ exports.version = '999.9.2-canary.0';
11
11
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,gEAAgE;AAChE,uEAAuE;AACvE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACpD,QAAA,OAAO,GAAG,iBAAiB,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,gEAAgE;AAChE,uEAAuE;AACvE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACpD,QAAA,OAAO,GAAG,kBAAkB,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "2.80.1-canary.0";
1
+ export declare const version = "999.9.2-canary.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,oBAAoB,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,qBAAqB,CAAA"}
@@ -4,5 +4,5 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.80.1-canary.0';
7
+ export const version = '999.9.2-canary.0';
8
8
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,gEAAgE;AAChE,uEAAuE;AACvE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACjE,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,gEAAgE;AAChE,uEAAuE;AACvE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACjE,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAA"}
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.supabase=e():t.supabase=e()}(self,()=>(()=>{var t={97:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=97,t.exports=e},251:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_HEADERS=void 0;const o=r(822);e.DEFAULT_HEADERS={"X-Client-Info":`storage-js/${o.version}`}},368:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(607),s=n(r(857));e.default=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}asStream(){return new s.default(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.execute().then(t,e)}execute(){return o(this,void 0,void 0,function*(){try{const t=yield this.downloadFn();return{data:yield t.blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}}},411:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},442:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.get=function(t,e,r,n){return o(this,void 0,void 0,function*(){return h(t,"GET",e,r,n)})},e.post=function(t,e,r,n,i){return o(this,void 0,void 0,function*(){return h(t,"POST",e,n,i,r)})},e.put=function(t,e,r,n,i){return o(this,void 0,void 0,function*(){return h(t,"PUT",e,n,i,r)})},e.head=function(t,e,r,n){return o(this,void 0,void 0,function*(){return h(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})},e.remove=function(t,e,r,n,i){return o(this,void 0,void 0,function*(){return h(t,"DELETE",e,n,i,r)})};const n=r(607),i=r(819),s=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),a=(t,e,r)=>o(void 0,void 0,void 0,function*(){const o=yield(0,i.resolveResponse)();t instanceof o&&!(null==r?void 0:r.noResolveJson)?t.json().then(r=>{const o=t.status||500,i=(null==r?void 0:r.statusCode)||o+"";e(new n.StorageApiError(s(r),o,i))}).catch(t=>{e(new n.StorageUnknownError(s(t),t))}):e(new n.StorageUnknownError(s(t),t))}),u=(t,e,r,o)=>{const n={method:t,headers:(null==e?void 0:e.headers)||{}};return"GET"!==t&&o?((0,i.isPlainObject)(o)?(n.headers=Object.assign({"Content-Type":"application/json"},null==e?void 0:e.headers),n.body=JSON.stringify(o)):n.body=o,(null==e?void 0:e.duplex)&&(n.duplex=e.duplex),Object.assign(Object.assign({},n),r)):n};function h(t,e,r,n,i,s){return o(this,void 0,void 0,function*(){return new Promise((o,h)=>{t(r,u(e,n,i,s)).then(t=>{if(!t.ok)throw t;return(null==n?void 0:n.noResolveJson)?t:t.json()}).then(t=>o(t)).catch(t=>a(t,h,n))})})}},456:function(t,e,r){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageClient=void 0;const n=o(r(781)),i=o(r(485));class s extends i.default{constructor(t,e={},r,o){super(t,e,r,o)}from(t){return new n.default(this.url,this.headers,t,this.fetch)}}e.StorageClient=s},485:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});const n=r(251),i=r(607),s=r(442),a=r(819);e.default=class{constructor(t,e={},r,o){this.shouldThrowOnError=!1;const i=new URL(t);(null==o?void 0:o.useNewHostname)&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({},n.DEFAULT_HEADERS),e),this.fetch=(0,a.resolveFetch)(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.get)(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}getBucket(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.get)(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createBucket(t){return o(this,arguments,void 0,function*(t,e={public:!1}){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}updateBucket(t,e){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.put)(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}emptyBucket(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}deleteBucket(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.remove)(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}}},607:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageUnknownError=e.StorageApiError=e.StorageError=void 0,e.isStorageError=function(t){return"object"==typeof t&&null!==t&&"__isStorageError"in t};class r extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}e.StorageError=r,e.StorageApiError=class extends r{constructor(t,e,r){super(t),this.name="StorageApiError",this.status=e,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},e.StorageUnknownError=class extends r{constructor(t,e){super(t),this.name="StorageUnknownError",this.originalError=e}}},646:function(t,e,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageClient=void 0;var i=r(456);Object.defineProperty(e,"StorageClient",{enumerable:!0,get:function(){return i.StorageClient}}),n(r(411),e),n(r(607),e)},781:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(607),s=r(442),a=r(819),u=n(r(368)),h={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},c={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};e.default=class{constructor(t,e={},r,o){this.shouldThrowOnError=!1,this.url=t,this.headers=e,this.bucketId=r,this.fetch=(0,a.resolveFetch)(o)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,e,r,n){return o(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},c),n);let a=Object.assign(Object.assign({},this.headers),"POST"===t&&{"x-upsert":String(i.upsert)});const u=i.metadata;"undefined"!=typeof Blob&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),u&&o.append("metadata",this.encodeMetadata(u)),o.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(o=r,o.append("cacheControl",i.cacheControl),u&&o.append("metadata",this.encodeMetadata(u))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,u&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(u)))),(null==n?void 0:n.headers)&&(a=Object.assign(Object.assign({},a),n.headers));const h=this._removeEmptyFolders(e),l=this._getFinalPath(h),d=yield("PUT"==t?s.put:s.post)(this.fetch,`${this.url}/object/${l}`,o,Object.assign({headers:a},(null==i?void 0:i.duplex)?{duplex:i.duplex}:{}));return{data:{path:h,id:d.Id,fullPath:d.Key},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}upload(t,e,r){return o(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,e,r)})}uploadToSignedUrl(t,e,r,n){return o(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),a=this._getFinalPath(o),u=new URL(this.url+`/object/upload/sign/${a}`);u.searchParams.set("token",e);try{let t;const e=Object.assign({upsert:c.upsert},n),i=Object.assign(Object.assign({},this.headers),{"x-upsert":String(e.upsert)});return"undefined"!=typeof Blob&&r instanceof Blob?(t=new FormData,t.append("cacheControl",e.cacheControl),t.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(t=r,t.append("cacheControl",e.cacheControl)):(t=r,i["cache-control"]=`max-age=${e.cacheControl}`,i["content-type"]=e.contentType),{data:{path:o,fullPath:(yield(0,s.put)(this.fetch,u.toString(),t,{headers:i})).Key},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createSignedUploadUrl(t,e){return o(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const o=Object.assign({},this.headers);(null==e?void 0:e.upsert)&&(o["x-upsert"]="true");const n=yield(0,s.post)(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:o}),a=new URL(this.url+n.url),u=a.searchParams.get("token");if(!u)throw new i.StorageError("No token returned by API");return{data:{signedUrl:a.toString(),path:t,token:u},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}update(t,e,r){return o(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,e,r)})}move(t,e,r){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:e,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}copy(t,e,r){return o(this,void 0,void 0,function*(){try{return{data:{path:(yield(0,s.post)(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:e,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createSignedUrl(t,e,r){return o(this,void 0,void 0,function*(){try{let o=this._getFinalPath(t),n=yield(0,s.post)(this.fetch,`${this.url}/object/sign/${o}`,Object.assign({expiresIn:e},(null==r?void 0:r.transform)?{transform:r.transform}:{}),{headers:this.headers});const i=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return n={signedUrl:encodeURI(`${this.url}${n.signedURL}${i}`)},{data:n,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createSignedUrls(t,e,r){return o(this,void 0,void 0,function*(){try{const o=yield(0,s.post)(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:e,paths:t},{headers:this.headers}),n=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return{data:o.map(t=>Object.assign(Object.assign({},t),{signedUrl:t.signedURL?encodeURI(`${this.url}${t.signedURL}${n}`):null})),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}download(t,e){const r=void 0!==(null==e?void 0:e.transform)?"render/image/authenticated":"object",o=this.transformOptsToQueryString((null==e?void 0:e.transform)||{}),n=o?`?${o}`:"",i=this._getFinalPath(t);return new u.default(()=>(0,s.get)(this.fetch,`${this.url}/${r}/${i}${n}`,{headers:this.headers,noResolveJson:!0}),this.shouldThrowOnError)}info(t){return o(this,void 0,void 0,function*(){const e=this._getFinalPath(t);try{const t=yield(0,s.get)(this.fetch,`${this.url}/object/info/${e}`,{headers:this.headers});return{data:(0,a.recursiveToCamel)(t),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}exists(t){return o(this,void 0,void 0,function*(){const e=this._getFinalPath(t);try{return yield(0,s.head)(this.fetch,`${this.url}/object/${e}`,{headers:this.headers}),{data:!0,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t)&&t instanceof i.StorageUnknownError){const e=t.originalError;if([400,404].includes(null==e?void 0:e.status))return{data:!1,error:t}}throw t}})}getPublicUrl(t,e){const r=this._getFinalPath(t),o=[],n=(null==e?void 0:e.download)?`download=${!0===e.download?"":e.download}`:"";""!==n&&o.push(n);const i=void 0!==(null==e?void 0:e.transform)?"render/image":"object",s=this.transformOptsToQueryString((null==e?void 0:e.transform)||{});""!==s&&o.push(s);let a=o.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}remove(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.remove)(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}list(t,e,r){return o(this,void 0,void 0,function*(){try{const o=Object.assign(Object.assign(Object.assign({},h),e),{prefix:t||""});return{data:yield(0,s.post)(this.fetch,`${this.url}/object/list/${this.bucketId}`,o,{headers:this.headers},r),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}listV2(t,e){return o(this,void 0,void 0,function*(){try{const r=Object.assign({},t);return{data:yield(0,s.post)(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},e),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return"undefined"!=typeof Buffer?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const e=[];return t.width&&e.push(`width=${t.width}`),t.height&&e.push(`height=${t.height}`),t.resize&&e.push(`resize=${t.resize}`),t.format&&e.push(`format=${t.format}`),t.quality&&e.push(`quality=${t.quality}`),e.join("&")}}},819:function(t,e,r){"use strict";var o,n=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||(o=function(t){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e},o(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=o(t),s=0;s<r.length;s++)"default"!==r[s]&&n(e,t,r[s]);return i(e,t),e}),a=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.isPlainObject=e.recursiveToCamel=e.resolveResponse=e.resolveFetch=void 0,e.resolveFetch=t=>{let e;return e=t||("undefined"==typeof fetch?(...t)=>Promise.resolve("@supabase/node-fetch").then(t=>s(r(97)(t))).then(({default:e})=>e(...t)):fetch),(...t)=>e(...t)},e.resolveResponse=()=>a(void 0,void 0,void 0,function*(){return"undefined"==typeof Response?(yield Promise.resolve("@supabase/node-fetch").then(t=>s(r(97)(t)))).Response:Response}),e.recursiveToCamel=t=>{if(Array.isArray(t))return t.map(t=>(0,e.recursiveToCamel)(t));if("function"==typeof t||t!==Object(t))return t;const r={};return Object.entries(t).forEach(([t,o])=>{const n=t.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace(/[-_]/g,""));r[n]=(0,e.recursiveToCamel)(o)}),r},e.isPlainObject=t=>{if("object"!=typeof t||null===t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)}},822:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.version="2.80.1-canary.0"},857:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});const n=r(607);e.default=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}execute(){return o(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,n.isStorageError)(t))return{data:null,error:t};throw t}})}}}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}return r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r(646)})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.supabase=e():t.supabase=e()}(self,()=>(()=>{var t={97:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=97,t.exports=e},251:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_HEADERS=void 0;const o=r(822);e.DEFAULT_HEADERS={"X-Client-Info":`storage-js/${o.version}`}},368:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(607),s=n(r(857));e.default=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}asStream(){return new s.default(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.execute().then(t,e)}execute(){return o(this,void 0,void 0,function*(){try{const t=yield this.downloadFn();return{data:yield t.blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}}},411:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},442:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.get=function(t,e,r,n){return o(this,void 0,void 0,function*(){return h(t,"GET",e,r,n)})},e.post=function(t,e,r,n,i){return o(this,void 0,void 0,function*(){return h(t,"POST",e,n,i,r)})},e.put=function(t,e,r,n,i){return o(this,void 0,void 0,function*(){return h(t,"PUT",e,n,i,r)})},e.head=function(t,e,r,n){return o(this,void 0,void 0,function*(){return h(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})},e.remove=function(t,e,r,n,i){return o(this,void 0,void 0,function*(){return h(t,"DELETE",e,n,i,r)})};const n=r(607),i=r(819),s=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),a=(t,e,r)=>o(void 0,void 0,void 0,function*(){const o=yield(0,i.resolveResponse)();t instanceof o&&!(null==r?void 0:r.noResolveJson)?t.json().then(r=>{const o=t.status||500,i=(null==r?void 0:r.statusCode)||o+"";e(new n.StorageApiError(s(r),o,i))}).catch(t=>{e(new n.StorageUnknownError(s(t),t))}):e(new n.StorageUnknownError(s(t),t))}),u=(t,e,r,o)=>{const n={method:t,headers:(null==e?void 0:e.headers)||{}};return"GET"!==t&&o?((0,i.isPlainObject)(o)?(n.headers=Object.assign({"Content-Type":"application/json"},null==e?void 0:e.headers),n.body=JSON.stringify(o)):n.body=o,(null==e?void 0:e.duplex)&&(n.duplex=e.duplex),Object.assign(Object.assign({},n),r)):n};function h(t,e,r,n,i,s){return o(this,void 0,void 0,function*(){return new Promise((o,h)=>{t(r,u(e,n,i,s)).then(t=>{if(!t.ok)throw t;return(null==n?void 0:n.noResolveJson)?t:t.json()}).then(t=>o(t)).catch(t=>a(t,h,n))})})}},456:function(t,e,r){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageClient=void 0;const n=o(r(781)),i=o(r(485));class s extends i.default{constructor(t,e={},r,o){super(t,e,r,o)}from(t){return new n.default(this.url,this.headers,t,this.fetch)}}e.StorageClient=s},485:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});const n=r(251),i=r(607),s=r(442),a=r(819);e.default=class{constructor(t,e={},r,o){this.shouldThrowOnError=!1;const i=new URL(t);(null==o?void 0:o.useNewHostname)&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({},n.DEFAULT_HEADERS),e),this.fetch=(0,a.resolveFetch)(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.get)(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}getBucket(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.get)(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createBucket(t){return o(this,arguments,void 0,function*(t,e={public:!1}){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}updateBucket(t,e){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.put)(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}emptyBucket(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}deleteBucket(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.remove)(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}}},607:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageUnknownError=e.StorageApiError=e.StorageError=void 0,e.isStorageError=function(t){return"object"==typeof t&&null!==t&&"__isStorageError"in t};class r extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}e.StorageError=r,e.StorageApiError=class extends r{constructor(t,e,r){super(t),this.name="StorageApiError",this.status=e,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},e.StorageUnknownError=class extends r{constructor(t,e){super(t),this.name="StorageUnknownError",this.originalError=e}}},646:function(t,e,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageClient=void 0;var i=r(456);Object.defineProperty(e,"StorageClient",{enumerable:!0,get:function(){return i.StorageClient}}),n(r(411),e),n(r(607),e)},781:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(607),s=r(442),a=r(819),u=n(r(368)),h={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},c={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};e.default=class{constructor(t,e={},r,o){this.shouldThrowOnError=!1,this.url=t,this.headers=e,this.bucketId=r,this.fetch=(0,a.resolveFetch)(o)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,e,r,n){return o(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},c),n);let a=Object.assign(Object.assign({},this.headers),"POST"===t&&{"x-upsert":String(i.upsert)});const u=i.metadata;"undefined"!=typeof Blob&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),u&&o.append("metadata",this.encodeMetadata(u)),o.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(o=r,o.append("cacheControl",i.cacheControl),u&&o.append("metadata",this.encodeMetadata(u))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,u&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(u)))),(null==n?void 0:n.headers)&&(a=Object.assign(Object.assign({},a),n.headers));const h=this._removeEmptyFolders(e),l=this._getFinalPath(h),d=yield("PUT"==t?s.put:s.post)(this.fetch,`${this.url}/object/${l}`,o,Object.assign({headers:a},(null==i?void 0:i.duplex)?{duplex:i.duplex}:{}));return{data:{path:h,id:d.Id,fullPath:d.Key},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}upload(t,e,r){return o(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,e,r)})}uploadToSignedUrl(t,e,r,n){return o(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),a=this._getFinalPath(o),u=new URL(this.url+`/object/upload/sign/${a}`);u.searchParams.set("token",e);try{let t;const e=Object.assign({upsert:c.upsert},n),i=Object.assign(Object.assign({},this.headers),{"x-upsert":String(e.upsert)});return"undefined"!=typeof Blob&&r instanceof Blob?(t=new FormData,t.append("cacheControl",e.cacheControl),t.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(t=r,t.append("cacheControl",e.cacheControl)):(t=r,i["cache-control"]=`max-age=${e.cacheControl}`,i["content-type"]=e.contentType),{data:{path:o,fullPath:(yield(0,s.put)(this.fetch,u.toString(),t,{headers:i})).Key},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createSignedUploadUrl(t,e){return o(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const o=Object.assign({},this.headers);(null==e?void 0:e.upsert)&&(o["x-upsert"]="true");const n=yield(0,s.post)(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:o}),a=new URL(this.url+n.url),u=a.searchParams.get("token");if(!u)throw new i.StorageError("No token returned by API");return{data:{signedUrl:a.toString(),path:t,token:u},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}update(t,e,r){return o(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,e,r)})}move(t,e,r){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:e,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}copy(t,e,r){return o(this,void 0,void 0,function*(){try{return{data:{path:(yield(0,s.post)(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:e,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createSignedUrl(t,e,r){return o(this,void 0,void 0,function*(){try{let o=this._getFinalPath(t),n=yield(0,s.post)(this.fetch,`${this.url}/object/sign/${o}`,Object.assign({expiresIn:e},(null==r?void 0:r.transform)?{transform:r.transform}:{}),{headers:this.headers});const i=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return n={signedUrl:encodeURI(`${this.url}${n.signedURL}${i}`)},{data:n,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}createSignedUrls(t,e,r){return o(this,void 0,void 0,function*(){try{const o=yield(0,s.post)(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:e,paths:t},{headers:this.headers}),n=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return{data:o.map(t=>Object.assign(Object.assign({},t),{signedUrl:t.signedURL?encodeURI(`${this.url}${t.signedURL}${n}`):null})),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}download(t,e){const r=void 0!==(null==e?void 0:e.transform)?"render/image/authenticated":"object",o=this.transformOptsToQueryString((null==e?void 0:e.transform)||{}),n=o?`?${o}`:"",i=this._getFinalPath(t);return new u.default(()=>(0,s.get)(this.fetch,`${this.url}/${r}/${i}${n}`,{headers:this.headers,noResolveJson:!0}),this.shouldThrowOnError)}info(t){return o(this,void 0,void 0,function*(){const e=this._getFinalPath(t);try{const t=yield(0,s.get)(this.fetch,`${this.url}/object/info/${e}`,{headers:this.headers});return{data:(0,a.recursiveToCamel)(t),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}exists(t){return o(this,void 0,void 0,function*(){const e=this._getFinalPath(t);try{return yield(0,s.head)(this.fetch,`${this.url}/object/${e}`,{headers:this.headers}),{data:!0,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t)&&t instanceof i.StorageUnknownError){const e=t.originalError;if([400,404].includes(null==e?void 0:e.status))return{data:!1,error:t}}throw t}})}getPublicUrl(t,e){const r=this._getFinalPath(t),o=[],n=(null==e?void 0:e.download)?`download=${!0===e.download?"":e.download}`:"";""!==n&&o.push(n);const i=void 0!==(null==e?void 0:e.transform)?"render/image":"object",s=this.transformOptsToQueryString((null==e?void 0:e.transform)||{});""!==s&&o.push(s);let a=o.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}remove(t){return o(this,void 0,void 0,function*(){try{return{data:yield(0,s.remove)(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}list(t,e,r){return o(this,void 0,void 0,function*(){try{const o=Object.assign(Object.assign(Object.assign({},h),e),{prefix:t||""});return{data:yield(0,s.post)(this.fetch,`${this.url}/object/list/${this.bucketId}`,o,{headers:this.headers},r),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}listV2(t,e){return o(this,void 0,void 0,function*(){try{const r=Object.assign({},t);return{data:yield(0,s.post)(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},e),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,i.isStorageError)(t))return{data:null,error:t};throw t}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return"undefined"!=typeof Buffer?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const e=[];return t.width&&e.push(`width=${t.width}`),t.height&&e.push(`height=${t.height}`),t.resize&&e.push(`resize=${t.resize}`),t.format&&e.push(`format=${t.format}`),t.quality&&e.push(`quality=${t.quality}`),e.join("&")}}},819:function(t,e,r){"use strict";var o,n=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||(o=function(t){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e},o(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=o(t),s=0;s<r.length;s++)"default"!==r[s]&&n(e,t,r[s]);return i(e,t),e}),a=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.isPlainObject=e.recursiveToCamel=e.resolveResponse=e.resolveFetch=void 0,e.resolveFetch=t=>{let e;return e=t||("undefined"==typeof fetch?(...t)=>Promise.resolve("@supabase/node-fetch").then(t=>s(r(97)(t))).then(({default:e})=>e(...t)):fetch),(...t)=>e(...t)},e.resolveResponse=()=>a(void 0,void 0,void 0,function*(){return"undefined"==typeof Response?(yield Promise.resolve("@supabase/node-fetch").then(t=>s(r(97)(t)))).Response:Response}),e.recursiveToCamel=t=>{if(Array.isArray(t))return t.map(t=>(0,e.recursiveToCamel)(t));if("function"==typeof t||t!==Object(t))return t;const r={};return Object.entries(t).forEach(([t,o])=>{const n=t.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace(/[-_]/g,""));r[n]=(0,e.recursiveToCamel)(o)}),r},e.isPlainObject=t=>{if("object"!=typeof t||null===t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)}},822:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.version="999.9.2-canary.0"},857:function(t,e,r){"use strict";var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0});const n=r(607);e.default=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}execute(){return o(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if((0,n.isStorageError)(t))return{data:null,error:t};throw t}})}}}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}return r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r(646)})());
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@supabase/storage-js",
3
- "version": "2.80.1-canary.0",
3
+ "version": "999.9.2-canary.0",
4
4
  "description": "Isomorphic storage client for Supabase.",
5
5
  "keywords": [
6
6
  "javascript",
7
7
  "typescript",
8
8
  "supabase"
9
9
  ],
10
- "homepage": "https://github.com/supabase/js-client-libs/tree/main/packages/core/storage-js",
11
- "bugs": "https://github.com/supabase/js-client-libs/issues",
10
+ "homepage": "https://github.com/supabase/supabase-js/tree/master/packages/core/storage-js",
11
+ "bugs": "https://github.com/supabase/supabase-js/issues",
12
12
  "license": "MIT",
13
13
  "author": "Supabase",
14
14
  "files": [
@@ -21,7 +21,7 @@
21
21
  "sideEffects": false,
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "https://github.com/supabase/js-client-libs.git",
24
+ "url": "https://github.com/supabase/supabase-js.git",
25
25
  "directory": "packages/core/storage-js"
26
26
  },
27
27
  "scripts": {
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.80.1-canary.0'
7
+ export const version = '999.9.2-canary.0'