@tinacms/graphql 2.4.0 → 2.4.2
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/README.md +1 -1
- package/dist/index.js +6 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ Visit [Tina's documentation](https://tina.io/docs/) to learn more.
|
|
|
137
137
|
[](https://twitter.com/intent/tweet?url=https%3A%2F%2Ftinacms.org&text=I%20just%20checked%20out%20@tinacms%20on%20GitHub%20and%20it%20is%20sweet%21&hashtags=TinaCMS%2Cjamstack%2Cheadlesscms)
|
|
138
138
|
[](https://github.com/tinacms/tinacms/discussions)
|
|
139
139
|
|
|
140
|
-
Visit the [GitHub Discussions](https://github.com/tinacms/tinacms/discussions) or our [Community Discord](https://discord.com/invite/zumN63Ybpf) to ask questions, or look us up on
|
|
140
|
+
Visit the [GitHub Discussions](https://github.com/tinacms/tinacms/discussions) or our [Community Discord](https://discord.com/invite/zumN63Ybpf) to ask questions, or look us up on Twitter at [@tinacms](https://twitter.com/tinacms).
|
|
141
141
|
|
|
142
142
|
## Contributing
|
|
143
143
|
|
package/dist/index.js
CHANGED
|
@@ -3035,7 +3035,7 @@ var validateField = async (field) => {
|
|
|
3035
3035
|
var package_default = {
|
|
3036
3036
|
name: "@tinacms/graphql",
|
|
3037
3037
|
type: "module",
|
|
3038
|
-
version: "2.4.
|
|
3038
|
+
version: "2.4.2",
|
|
3039
3039
|
main: "dist/index.js",
|
|
3040
3040
|
module: "./dist/index.js",
|
|
3041
3041
|
files: [
|
|
@@ -4671,13 +4671,17 @@ var resolveMediaRelativeToCloud = (value, config = { useRelativeMedia: true }, s
|
|
|
4671
4671
|
const cleanMediaRoot = cleanUpSlashes(schema.config.media.tina.mediaRoot);
|
|
4672
4672
|
const prefix = stagingPrefix(config);
|
|
4673
4673
|
if (typeof value === "string") {
|
|
4674
|
+
if (ABSOLUTE_URL.test(value)) return value;
|
|
4674
4675
|
const strippedValue = value.replace(cleanMediaRoot, "");
|
|
4676
|
+
if (ABSOLUTE_URL.test(strippedValue)) return strippedValue;
|
|
4675
4677
|
return `https://${config.assetsHost}/${config.clientId}${prefix}${strippedValue}`;
|
|
4676
4678
|
}
|
|
4677
4679
|
if (Array.isArray(value)) {
|
|
4678
4680
|
return value.map((v) => {
|
|
4679
4681
|
if (!v || typeof v !== "string") return v;
|
|
4682
|
+
if (ABSOLUTE_URL.test(v)) return v;
|
|
4680
4683
|
const strippedValue = v.replace(cleanMediaRoot, "");
|
|
4684
|
+
if (ABSOLUTE_URL.test(strippedValue)) return strippedValue;
|
|
4681
4685
|
return `https://${config.assetsHost}/${config.clientId}${prefix}${strippedValue}`;
|
|
4682
4686
|
});
|
|
4683
4687
|
}
|
|
@@ -4693,6 +4697,7 @@ var stripStagingPrefix = (path9) => {
|
|
|
4693
4697
|
const match = path9.match(STAGING_SEGMENT);
|
|
4694
4698
|
return match ? match[1] : path9;
|
|
4695
4699
|
};
|
|
4700
|
+
var ABSOLUTE_URL = /^[a-z][a-z0-9+.\-]*:|^\/\//i;
|
|
4696
4701
|
var escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4697
4702
|
var cloudUrlPattern = (clientId) => new RegExp(`^https://[^/]+/${escapeRegExp(clientId)}`);
|
|
4698
4703
|
var cleanUpSlashes = (path9) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/graphql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"normalize-path": "^3.0.0",
|
|
44
44
|
"readable-stream": "^4.7.0",
|
|
45
45
|
"yup": "^1.6.1",
|
|
46
|
-
"@tinacms/
|
|
47
|
-
"@tinacms/
|
|
46
|
+
"@tinacms/schema-tools": "2.8.0",
|
|
47
|
+
"@tinacms/mdx": "2.1.5"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"registry": "https://registry.npmjs.org"
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"vite": "^4.5.9",
|
|
73
73
|
"vitest": "^0.32.4",
|
|
74
74
|
"zod": "^3.24.2",
|
|
75
|
-
"@tinacms/
|
|
76
|
-
"@tinacms/
|
|
75
|
+
"@tinacms/schema-tools": "2.8.0",
|
|
76
|
+
"@tinacms/scripts": "1.6.1"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"types": "pnpm tsc",
|