tinacms 0.0.0-9d5e351-20241023053720 → 0.0.0-a5bc4cd-20241024211559
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/cache/node-cache.d.ts +1 -0
- package/dist/client.js +11 -18
- package/dist/client.mjs +1 -1
- package/dist/index.js +4 -6
- package/dist/index.mjs +4 -6
- package/dist/{node-cache-8f9e873e.mjs → node-cache-4c336858.mjs} +11 -13
- package/package.json +4 -4
- package/dist/__vite-browser-external-d06ac358.mjs +0 -4
package/dist/client.js
CHANGED
|
@@ -105,16 +105,12 @@
|
|
|
105
105
|
const client = new TinaClient(args);
|
|
106
106
|
return client;
|
|
107
107
|
}
|
|
108
|
-
const makeCacheDir = async (dir, fs) => {
|
|
109
|
-
const
|
|
110
|
-
const os = await Promise.resolve().then(() => __viteBrowserExternal$1);
|
|
111
|
-
if (typeof dir !== "string" || !dir.trim()) {
|
|
112
|
-
throw new Error("Invalid directory path");
|
|
113
|
-
}
|
|
114
|
-
const pathParts = dir.split(path.sep);
|
|
108
|
+
const makeCacheDir = async (dir, fs, path, os) => {
|
|
109
|
+
const pathParts = dir.split(path.sep).filter(Boolean);
|
|
115
110
|
const cacheHash = pathParts[pathParts.length - 1];
|
|
111
|
+
const rootUser = pathParts[0];
|
|
116
112
|
let cacheDir = dir;
|
|
117
|
-
if (!fs.existsSync(
|
|
113
|
+
if (!fs.existsSync(path.join(path.sep, rootUser))) {
|
|
118
114
|
cacheDir = path.join(os.tmpdir(), cacheHash);
|
|
119
115
|
}
|
|
120
116
|
try {
|
|
@@ -125,10 +121,11 @@
|
|
|
125
121
|
return cacheDir;
|
|
126
122
|
};
|
|
127
123
|
const NodeCache = async (dir) => {
|
|
128
|
-
const fs = (
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
const
|
|
124
|
+
const fs = require("node:fs");
|
|
125
|
+
const path = require("node:path");
|
|
126
|
+
const os = require("node:os");
|
|
127
|
+
const { createHash } = require("node:crypto");
|
|
128
|
+
const cacheDir = await makeCacheDir(dir, fs, path, os);
|
|
132
129
|
return {
|
|
133
130
|
makeKey: (key) => {
|
|
134
131
|
const input = key && key instanceof Object ? JSON.stringify(key) : key || "";
|
|
@@ -156,12 +153,8 @@
|
|
|
156
153
|
};
|
|
157
154
|
const nodeCache = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
158
155
|
__proto__: null,
|
|
159
|
-
NodeCache
|
|
160
|
-
|
|
161
|
-
const __viteBrowserExternal = {};
|
|
162
|
-
const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
163
|
-
__proto__: null,
|
|
164
|
-
default: __viteBrowserExternal
|
|
156
|
+
NodeCache,
|
|
157
|
+
makeCacheDir
|
|
165
158
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
166
159
|
exports2.TINA_HOST = TINA_HOST;
|
|
167
160
|
exports2.TinaClient = TinaClient;
|
package/dist/client.mjs
CHANGED
|
@@ -24,7 +24,7 @@ class TinaClient {
|
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
26
|
if (this.cacheDir && typeof window === "undefined" && typeof require !== "undefined") {
|
|
27
|
-
const { NodeCache } = await import("./node-cache-
|
|
27
|
+
const { NodeCache } = await import("./node-cache-4c336858.mjs");
|
|
28
28
|
this.cache = await NodeCache(this.cacheDir);
|
|
29
29
|
}
|
|
30
30
|
} catch (e) {
|
package/dist/index.js
CHANGED
|
@@ -3676,7 +3676,7 @@ flowchart TD
|
|
|
3676
3676
|
};
|
|
3677
3677
|
const sizeClasses = {
|
|
3678
3678
|
small: `text-xs h-8 px-3`,
|
|
3679
|
-
medium: `text-sm h-10 px-
|
|
3679
|
+
medium: `text-sm h-10 px-8`,
|
|
3680
3680
|
custom: ``
|
|
3681
3681
|
};
|
|
3682
3682
|
return /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -12839,15 +12839,14 @@ flowchart TD
|
|
|
12839
12839
|
fields: fieldGroup.fields
|
|
12840
12840
|
}
|
|
12841
12841
|
) : /* @__PURE__ */ React__namespace.createElement(NoFieldsPlaceholder, null)
|
|
12842
|
-
)), !hideFooter && /* @__PURE__ */ React__namespace.createElement("div", { className: "relative flex-none w-full h-16 px-
|
|
12842
|
+
)), !hideFooter && /* @__PURE__ */ React__namespace.createElement("div", { className: "relative flex-none w-full h-16 px-12 bg-white border-t border-gray-100 flex items-center justify-end" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex-1 w-full justify-end gap-2 flex items-center max-w-form" }, tinaForm.reset && /* @__PURE__ */ React__namespace.createElement(
|
|
12843
12843
|
ResetForm,
|
|
12844
12844
|
{
|
|
12845
12845
|
pristine,
|
|
12846
12846
|
reset: async () => {
|
|
12847
12847
|
finalForm2.reset();
|
|
12848
12848
|
await tinaForm.reset();
|
|
12849
|
-
}
|
|
12850
|
-
style: { flexGrow: 1 }
|
|
12849
|
+
}
|
|
12851
12850
|
},
|
|
12852
12851
|
tinaForm.buttons.reset
|
|
12853
12852
|
), /* @__PURE__ */ React__namespace.createElement(
|
|
@@ -12856,8 +12855,7 @@ flowchart TD
|
|
|
12856
12855
|
onClick: safeHandleSubmit,
|
|
12857
12856
|
disabled: !canSubmit,
|
|
12858
12857
|
busy: submitting,
|
|
12859
|
-
variant: "primary"
|
|
12860
|
-
style: { flexGrow: 3 }
|
|
12858
|
+
variant: "primary"
|
|
12861
12859
|
},
|
|
12862
12860
|
submitting && /* @__PURE__ */ React__namespace.createElement(LoadingDots, null),
|
|
12863
12861
|
!submitting && tinaForm.buttons.save
|
package/dist/index.mjs
CHANGED
|
@@ -3703,7 +3703,7 @@ const Button$1 = ({
|
|
|
3703
3703
|
};
|
|
3704
3704
|
const sizeClasses = {
|
|
3705
3705
|
small: `text-xs h-8 px-3`,
|
|
3706
|
-
medium: `text-sm h-10 px-
|
|
3706
|
+
medium: `text-sm h-10 px-8`,
|
|
3707
3707
|
custom: ``
|
|
3708
3708
|
};
|
|
3709
3709
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -12866,15 +12866,14 @@ const FormBuilder = ({
|
|
|
12866
12866
|
fields: fieldGroup.fields
|
|
12867
12867
|
}
|
|
12868
12868
|
) : /* @__PURE__ */ React.createElement(NoFieldsPlaceholder, null)
|
|
12869
|
-
)), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: "relative flex-none w-full h-16 px-
|
|
12869
|
+
)), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: "relative flex-none w-full h-16 px-12 bg-white border-t border-gray-100 flex items-center justify-end" }, /* @__PURE__ */ React.createElement("div", { className: "flex-1 w-full justify-end gap-2 flex items-center max-w-form" }, tinaForm.reset && /* @__PURE__ */ React.createElement(
|
|
12870
12870
|
ResetForm,
|
|
12871
12871
|
{
|
|
12872
12872
|
pristine,
|
|
12873
12873
|
reset: async () => {
|
|
12874
12874
|
finalForm.reset();
|
|
12875
12875
|
await tinaForm.reset();
|
|
12876
|
-
}
|
|
12877
|
-
style: { flexGrow: 1 }
|
|
12876
|
+
}
|
|
12878
12877
|
},
|
|
12879
12878
|
tinaForm.buttons.reset
|
|
12880
12879
|
), /* @__PURE__ */ React.createElement(
|
|
@@ -12883,8 +12882,7 @@ const FormBuilder = ({
|
|
|
12883
12882
|
onClick: safeHandleSubmit,
|
|
12884
12883
|
disabled: !canSubmit,
|
|
12885
12884
|
busy: submitting,
|
|
12886
|
-
variant: "primary"
|
|
12887
|
-
style: { flexGrow: 3 }
|
|
12885
|
+
variant: "primary"
|
|
12888
12886
|
},
|
|
12889
12887
|
submitting && /* @__PURE__ */ React.createElement(LoadingDots, null),
|
|
12890
12888
|
!submitting && tinaForm.buttons.save
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
const makeCacheDir = async (dir, fs) => {
|
|
2
|
-
const
|
|
3
|
-
const os = await import("./__vite-browser-external-d06ac358.mjs");
|
|
4
|
-
if (typeof dir !== "string" || !dir.trim()) {
|
|
5
|
-
throw new Error("Invalid directory path");
|
|
6
|
-
}
|
|
7
|
-
const pathParts = dir.split(path.sep);
|
|
1
|
+
const makeCacheDir = async (dir, fs, path, os) => {
|
|
2
|
+
const pathParts = dir.split(path.sep).filter(Boolean);
|
|
8
3
|
const cacheHash = pathParts[pathParts.length - 1];
|
|
4
|
+
const rootUser = pathParts[0];
|
|
9
5
|
let cacheDir = dir;
|
|
10
|
-
if (!fs.existsSync(
|
|
6
|
+
if (!fs.existsSync(path.join(path.sep, rootUser))) {
|
|
11
7
|
cacheDir = path.join(os.tmpdir(), cacheHash);
|
|
12
8
|
}
|
|
13
9
|
try {
|
|
@@ -18,10 +14,11 @@ const makeCacheDir = async (dir, fs) => {
|
|
|
18
14
|
return cacheDir;
|
|
19
15
|
};
|
|
20
16
|
const NodeCache = async (dir) => {
|
|
21
|
-
const fs = (
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
17
|
+
const fs = require("node:fs");
|
|
18
|
+
const path = require("node:path");
|
|
19
|
+
const os = require("node:os");
|
|
20
|
+
const { createHash } = require("node:crypto");
|
|
21
|
+
const cacheDir = await makeCacheDir(dir, fs, path, os);
|
|
25
22
|
return {
|
|
26
23
|
makeKey: (key) => {
|
|
27
24
|
const input = key && key instanceof Object ? JSON.stringify(key) : key || "";
|
|
@@ -48,5 +45,6 @@ const NodeCache = async (dir) => {
|
|
|
48
45
|
};
|
|
49
46
|
};
|
|
50
47
|
export {
|
|
51
|
-
NodeCache
|
|
48
|
+
NodeCache,
|
|
49
|
+
makeCacheDir
|
|
52
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-a5bc4cd-20241024211559",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -129,9 +129,9 @@
|
|
|
129
129
|
"webfontloader": "1.6.28",
|
|
130
130
|
"yup": "^1.4.0",
|
|
131
131
|
"zod": "^3.23.8",
|
|
132
|
-
"@tinacms/mdx": "
|
|
133
|
-
"@tinacms/schema-tools": "
|
|
134
|
-
"@tinacms/search": "
|
|
132
|
+
"@tinacms/mdx": "0.0.0-a5bc4cd-20241024211559",
|
|
133
|
+
"@tinacms/schema-tools": "0.0.0-a5bc4cd-20241024211559",
|
|
134
|
+
"@tinacms/search": "0.0.0-a5bc4cd-20241024211559"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@graphql-tools/utils": "^10.5.4",
|