tinacms 1.5.24 → 1.5.26

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.js CHANGED
@@ -7641,7 +7641,7 @@ var __publicField = (obj, key, value) => {
7641
7641
  }
7642
7642
  async isAuthenticated() {
7643
7643
  this.setup();
7644
- return await this.api.isAuthenticated();
7644
+ return await this.api.authProvider.isAuthenticated();
7645
7645
  }
7646
7646
  async persist_cloud(media) {
7647
7647
  const newFiles = [];
@@ -7652,7 +7652,7 @@ var __publicField = (obj, key, value) => {
7652
7652
  directory = directory.substr(0, directory.length - 1);
7653
7653
  }
7654
7654
  const path = `${directory && directory !== "/" ? `${directory}/${item.file.name}` : item.file.name}`;
7655
- const res = await this.api.fetchWithToken(
7655
+ const res = await this.api.authProvider.fetchWithToken(
7656
7656
  `${this.url}/upload_url/${path}`,
7657
7657
  { method: "GET" }
7658
7658
  );
@@ -7809,7 +7809,7 @@ var __publicField = (obj, key, value) => {
7809
7809
  let res;
7810
7810
  if (!this.isLocal) {
7811
7811
  if (await this.isAuthenticated()) {
7812
- res = await this.api.fetchWithToken(
7812
+ res = await this.api.authProvider.fetchWithToken(
7813
7813
  `${this.url}/list/${options.directory || ""}?limit=${options.limit || 20}${options.offset ? `&cursor=${options.offset}` : ""}`
7814
7814
  );
7815
7815
  if (res.status == 401) {
@@ -7867,7 +7867,7 @@ var __publicField = (obj, key, value) => {
7867
7867
  const path = `${media.directory ? `${media.directory}/${media.filename}` : media.filename}`;
7868
7868
  if (!this.isLocal) {
7869
7869
  if (await this.isAuthenticated()) {
7870
- await this.api.fetchWithToken(`${this.url}/${path}`, {
7870
+ await this.api.authProvider.fetchWithToken(`${this.url}/${path}`, {
7871
7871
  method: "DELETE"
7872
7872
  });
7873
7873
  } else {
package/dist/index.mjs CHANGED
@@ -7649,7 +7649,7 @@ class TinaMediaStore {
7649
7649
  }
7650
7650
  async isAuthenticated() {
7651
7651
  this.setup();
7652
- return await this.api.isAuthenticated();
7652
+ return await this.api.authProvider.isAuthenticated();
7653
7653
  }
7654
7654
  async persist_cloud(media) {
7655
7655
  const newFiles = [];
@@ -7660,7 +7660,7 @@ class TinaMediaStore {
7660
7660
  directory = directory.substr(0, directory.length - 1);
7661
7661
  }
7662
7662
  const path = `${directory && directory !== "/" ? `${directory}/${item.file.name}` : item.file.name}`;
7663
- const res = await this.api.fetchWithToken(
7663
+ const res = await this.api.authProvider.fetchWithToken(
7664
7664
  `${this.url}/upload_url/${path}`,
7665
7665
  { method: "GET" }
7666
7666
  );
@@ -7817,7 +7817,7 @@ class TinaMediaStore {
7817
7817
  let res;
7818
7818
  if (!this.isLocal) {
7819
7819
  if (await this.isAuthenticated()) {
7820
- res = await this.api.fetchWithToken(
7820
+ res = await this.api.authProvider.fetchWithToken(
7821
7821
  `${this.url}/list/${options.directory || ""}?limit=${options.limit || 20}${options.offset ? `&cursor=${options.offset}` : ""}`
7822
7822
  );
7823
7823
  if (res.status == 401) {
@@ -7875,7 +7875,7 @@ class TinaMediaStore {
7875
7875
  const path = `${media.directory ? `${media.directory}/${media.filename}` : media.filename}`;
7876
7876
  if (!this.isLocal) {
7877
7877
  if (await this.isAuthenticated()) {
7878
- await this.api.fetchWithToken(`${this.url}/${path}`, {
7878
+ await this.api.authProvider.fetchWithToken(`${this.url}/${path}`, {
7879
7879
  method: "DELETE"
7880
7880
  });
7881
7881
  } else {
@@ -32,7 +32,7 @@ export declare class TinaMediaStore implements MediaStore {
32
32
  isStatic?: boolean;
33
33
  constructor(cms: CMS, staticMedia?: StaticMedia);
34
34
  setup(): void;
35
- isAuthenticated(): Promise<any>;
35
+ isAuthenticated(): Promise<boolean>;
36
36
  accept: string;
37
37
  private persist_cloud;
38
38
  private persist_local;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "1.5.24",
3
+ "version": "1.5.26",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -70,7 +70,7 @@
70
70
  "@react-types/shared": "^3.10.0",
71
71
  "@sambego/storybook-styles": "^1.0.0",
72
72
  "@tinacms/schema-tools": "1.4.14",
73
- "@tinacms/search": "1.0.14",
73
+ "@tinacms/search": "1.0.15",
74
74
  "@tinacms/mdx": "1.3.22",
75
75
  "@tinacms/sharedctx": "1.0.2",
76
76
  "@udecode/plate-headless": "^21.4.0",