tinacms 1.5.12 → 1.5.14

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/client.es.js CHANGED
@@ -29,14 +29,18 @@ class TinaClient {
29
29
  if (res.status === 401) {
30
30
  additionalInfo = "Please check that your client ID, URL and read only token are configured properly.";
31
31
  }
32
- throw new Error(`Server responded with status code ${res.status}, ${res.statusText}. ${additionalInfo ? additionalInfo : ""} Please see our FAQ for more information: https://tina.io/docs/errors/faq/`);
32
+ throw new Error(
33
+ `Server responded with status code ${res.status}, ${res.statusText}. ${additionalInfo ? additionalInfo : ""} Please see our FAQ for more information: https://tina.io/docs/errors/faq/`
34
+ );
33
35
  }
34
36
  const json = await res.json();
35
37
  if (json.errors) {
36
- throw new Error(`Unable to fetch, please see our FAQ for more information: https://tina.io/docs/errors/faq/
38
+ throw new Error(
39
+ `Unable to fetch, please see our FAQ for more information: https://tina.io/docs/errors/faq/
37
40
 
38
41
  Errors:
39
- ${json.errors.map((error) => error.message).join("\n")}`);
42
+ ${json.errors.map((error) => error.message).join("\n")}`
43
+ );
40
44
  }
41
45
  return {
42
46
  data: json == null ? void 0 : json.data,
@@ -48,4 +52,8 @@ function createClient(args) {
48
52
  const client = new TinaClient(args);
49
53
  return client;
50
54
  }
51
- export { TINA_HOST, TinaClient, createClient };
55
+ export {
56
+ TINA_HOST,
57
+ TinaClient,
58
+ createClient
59
+ };
package/dist/client.js CHANGED
@@ -2,11 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("fetch-ponyfill")) : typeof define === "function" && define.amd ? define(["exports", "fetch-ponyfill"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.tinacms = {}, global.NOOP));
3
3
  })(this, function(exports2, fetchPonyfill) {
4
4
  "use strict";
5
- function _interopDefaultLegacy(e) {
6
- return e && typeof e === "object" && "default" in e ? e : { "default": e };
7
- }
8
- var fetchPonyfill__default = /* @__PURE__ */ _interopDefaultLegacy(fetchPonyfill);
9
- const { fetch, Headers } = fetchPonyfill__default["default"]();
5
+ const { fetch, Headers } = fetchPonyfill();
10
6
  const TINA_HOST = "content.tinajs.io";
11
7
  class TinaClient {
12
8
  constructor({ token, url, queries }) {
@@ -36,14 +32,18 @@
36
32
  if (res.status === 401) {
37
33
  additionalInfo = "Please check that your client ID, URL and read only token are configured properly.";
38
34
  }
39
- throw new Error(`Server responded with status code ${res.status}, ${res.statusText}. ${additionalInfo ? additionalInfo : ""} Please see our FAQ for more information: https://tina.io/docs/errors/faq/`);
35
+ throw new Error(
36
+ `Server responded with status code ${res.status}, ${res.statusText}. ${additionalInfo ? additionalInfo : ""} Please see our FAQ for more information: https://tina.io/docs/errors/faq/`
37
+ );
40
38
  }
41
39
  const json = await res.json();
42
40
  if (json.errors) {
43
- throw new Error(`Unable to fetch, please see our FAQ for more information: https://tina.io/docs/errors/faq/
41
+ throw new Error(
42
+ `Unable to fetch, please see our FAQ for more information: https://tina.io/docs/errors/faq/
44
43
 
45
44
  Errors:
46
- ${json.errors.map((error) => error.message).join("\n")}`);
45
+ ${json.errors.map((error) => error.message).join("\n")}`
46
+ );
47
47
  }
48
48
  return {
49
49
  data: json == null ? void 0 : json.data,
@@ -58,5 +58,5 @@
58
58
  exports2.TINA_HOST = TINA_HOST;
59
59
  exports2.TinaClient = TinaClient;
60
60
  exports2.createClient = createClient;
61
- Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
61
+ Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
62
62
  });