@xata.io/client 0.28.0 → 0.28.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @xata.io/client@0.28.0 add-version /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.28.1 add-version /home/runner/work/client-ts/client-ts/packages/client
3
3
  > node ../../scripts/add-version-file.mjs
4
4
 
@@ -1,13 +1,13 @@
1
1
 
2
- > @xata.io/client@0.28.0 build /home/runner/work/client-ts/client-ts/packages/client
2
+ > @xata.io/client@0.28.1 build /home/runner/work/client-ts/client-ts/packages/client
3
3
  > rimraf dist && rollup -c
4
4
 
5
5
  
6
6
  src/index.ts → dist/index.cjs...
7
- created dist/index.cjs in 734ms
7
+ created dist/index.cjs in 733ms
8
8
  
9
9
  src/index.ts → dist/index.mjs...
10
- created dist/index.mjs in 465ms
10
+ created dist/index.mjs in 474ms
11
11
  
12
12
  src/index.ts → dist/index.d.ts...
13
- created dist/index.d.ts in 5s
13
+ created dist/index.d.ts in 5.1s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @xata.io/client
2
2
 
3
+ ## 0.28.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1281](https://github.com/xataio/client-ts/pull/1281) [`9a7e3f5`](https://github.com/xataio/client-ts/commit/9a7e3f5029e53efc6750e9c86bab936427788209) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix issue with default public access
8
+
3
9
  ## 0.28.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -528,7 +528,7 @@ function defaultOnOpen(response) {
528
528
  }
529
529
  }
530
530
 
531
- const VERSION = "0.28.0";
531
+ const VERSION = "0.28.1";
532
532
 
533
533
  class ErrorWithCause extends Error {
534
534
  constructor(message, options) {
@@ -2666,16 +2666,16 @@ function transformImage(url, ...transformations) {
2666
2666
  class XataFile {
2667
2667
  constructor(file) {
2668
2668
  this.id = file.id;
2669
- this.name = file.name || "";
2670
- this.mediaType = file.mediaType || "application/octet-stream";
2669
+ this.name = file.name;
2670
+ this.mediaType = file.mediaType;
2671
2671
  this.base64Content = file.base64Content;
2672
- this.enablePublicUrl = file.enablePublicUrl ?? false;
2673
- this.signedUrlTimeout = file.signedUrlTimeout ?? 300;
2674
- this.size = file.size ?? 0;
2675
- this.version = file.version ?? 1;
2676
- this.url = file.url || "";
2672
+ this.enablePublicUrl = file.enablePublicUrl;
2673
+ this.signedUrlTimeout = file.signedUrlTimeout;
2674
+ this.size = file.size;
2675
+ this.version = file.version;
2676
+ this.url = file.url;
2677
2677
  this.signedUrl = file.signedUrl;
2678
- this.attributes = file.attributes || {};
2678
+ this.attributes = file.attributes;
2679
2679
  }
2680
2680
  static fromBuffer(buffer, options = {}) {
2681
2681
  const base64Content = buffer.toString("base64");
@@ -4372,7 +4372,7 @@ function getContentType(file) {
4372
4372
  if (typeof file === "string") {
4373
4373
  return "text/plain";
4374
4374
  }
4375
- if ("mediaType" in file) {
4375
+ if ("mediaType" in file && file.mediaType !== void 0) {
4376
4376
  return file.mediaType;
4377
4377
  }
4378
4378
  if (isBlob(file)) {