tinacms 2.2.6 → 2.2.7

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.
@@ -0,0 +1,4 @@
1
+ const __viteBrowserExternal = {};
2
+ export {
3
+ __viteBrowserExternal as default
4
+ };
package/dist/client.js CHANGED
@@ -26,7 +26,7 @@
26
26
  return;
27
27
  }
28
28
  try {
29
- if (this.cacheDir && typeof require !== "undefined") {
29
+ if (this.cacheDir && window === void 0 && typeof require !== "undefined") {
30
30
  const { NodeCache: NodeCache2 } = await Promise.resolve().then(() => nodeCache);
31
31
  this.cache = await NodeCache2(this.cacheDir);
32
32
  }
@@ -106,8 +106,8 @@
106
106
  return client;
107
107
  }
108
108
  const makeCacheDir = async (dir, fs) => {
109
- const path = await import("path");
110
- const os = await import("os");
109
+ const path = await Promise.resolve().then(() => __viteBrowserExternal$1);
110
+ const os = await Promise.resolve().then(() => __viteBrowserExternal$1);
111
111
  const parts = dir.split(path.sep).filter(Boolean);
112
112
  let cacheDir = dir;
113
113
  if (!fs.existsSync(path.join(path.sep, parts[0]))) {
@@ -117,8 +117,8 @@
117
117
  return cacheDir;
118
118
  };
119
119
  const NodeCache = async (dir) => {
120
- const fs = await import("fs");
121
- const { createHash } = await import("crypto");
120
+ const fs = await Promise.resolve().then(() => __viteBrowserExternal$1);
121
+ const { createHash } = await Promise.resolve().then(() => __viteBrowserExternal$1);
122
122
  const cacheDir = await makeCacheDir(dir, fs);
123
123
  return {
124
124
  makeKey: (key) => {
@@ -149,6 +149,11 @@
149
149
  __proto__: null,
150
150
  NodeCache
151
151
  }, Symbol.toStringTag, { value: "Module" }));
152
+ const __viteBrowserExternal = {};
153
+ const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154
+ __proto__: null,
155
+ default: __viteBrowserExternal
156
+ }, Symbol.toStringTag, { value: "Module" }));
152
157
  exports2.TINA_HOST = TINA_HOST;
153
158
  exports2.TinaClient = TinaClient;
154
159
  exports2.createClient = createClient;
package/dist/client.mjs CHANGED
@@ -23,8 +23,8 @@ class TinaClient {
23
23
  return;
24
24
  }
25
25
  try {
26
- if (this.cacheDir && typeof require !== "undefined") {
27
- const { NodeCache } = await import("./node-cache-2267a9e4.mjs");
26
+ if (this.cacheDir && window === void 0 && typeof require !== "undefined") {
27
+ const { NodeCache } = await import("./node-cache-7fa2452c.mjs");
28
28
  this.cache = await NodeCache(this.cacheDir);
29
29
  }
30
30
  } catch (e) {
@@ -1,6 +1,6 @@
1
1
  const makeCacheDir = async (dir, fs) => {
2
- const path = await import("path");
3
- const os = await import("os");
2
+ const path = await import("./__vite-browser-external-d06ac358.mjs");
3
+ const os = await import("./__vite-browser-external-d06ac358.mjs");
4
4
  const parts = dir.split(path.sep).filter(Boolean);
5
5
  let cacheDir = dir;
6
6
  if (!fs.existsSync(path.join(path.sep, parts[0]))) {
@@ -10,8 +10,8 @@ const makeCacheDir = async (dir, fs) => {
10
10
  return cacheDir;
11
11
  };
12
12
  const NodeCache = async (dir) => {
13
- const fs = await import("fs");
14
- const { createHash } = await import("crypto");
13
+ const fs = await import("./__vite-browser-external-d06ac358.mjs");
14
+ const { createHash } = await import("./__vite-browser-external-d06ac358.mjs");
15
15
  const cacheDir = await makeCacheDir(dir, fs);
16
16
  return {
17
17
  makeKey: (key) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -127,9 +127,9 @@
127
127
  "webfontloader": "1.6.28",
128
128
  "yup": "^1.4.0",
129
129
  "zod": "^3.23.8",
130
+ "@tinacms/mdx": "1.4.3",
130
131
  "@tinacms/schema-tools": "1.6.3",
131
- "@tinacms/search": "1.0.30",
132
- "@tinacms/mdx": "1.4.3"
132
+ "@tinacms/search": "1.0.30"
133
133
  },
134
134
  "devDependencies": {
135
135
  "@graphql-tools/utils": "^10.3.3",