tinacms 0.70.2 → 1.0.1
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.es.js +6 -0
- package/dist/index.js +6 -0
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -5366,6 +5366,12 @@ const RenderForm$1 = ({ cms, collection, templateName, mutationInfo }) => {
|
|
|
5366
5366
|
navigate(`/collections/${collection.name}`);
|
|
5367
5367
|
} catch (error) {
|
|
5368
5368
|
console.error(error);
|
|
5369
|
+
const defaultErrorText = "There was a problem saving your document.";
|
|
5370
|
+
if (error.message.includes("already exists")) {
|
|
5371
|
+
cms.alerts.error(`${defaultErrorText} The "Filename" is alredy used for another document, please modify it.`);
|
|
5372
|
+
} else {
|
|
5373
|
+
cms.alerts.error(defaultErrorText);
|
|
5374
|
+
}
|
|
5369
5375
|
throw new Error(`[${error.name}] CreateDocument failed: ${error.message}`);
|
|
5370
5376
|
}
|
|
5371
5377
|
}
|
package/dist/index.js
CHANGED
|
@@ -5382,6 +5382,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
5382
5382
|
navigate(`/collections/${collection.name}`);
|
|
5383
5383
|
} catch (error) {
|
|
5384
5384
|
console.error(error);
|
|
5385
|
+
const defaultErrorText = "There was a problem saving your document.";
|
|
5386
|
+
if (error.message.includes("already exists")) {
|
|
5387
|
+
cms.alerts.error(`${defaultErrorText} The "Filename" is alredy used for another document, please modify it.`);
|
|
5388
|
+
} else {
|
|
5389
|
+
cms.alerts.error(defaultErrorText);
|
|
5390
|
+
}
|
|
5385
5391
|
throw new Error(`[${error.name}] CreateDocument failed: ${error.message}`);
|
|
5386
5392
|
}
|
|
5387
5393
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@headlessui/react": "^1.5.0",
|
|
56
56
|
"@heroicons/react": "^1.0.4",
|
|
57
57
|
"@react-hook/window-size": "^3.0.7",
|
|
58
|
-
"@tinacms/schema-tools": "0.
|
|
59
|
-
"@tinacms/sharedctx": "0.
|
|
60
|
-
"@tinacms/toolkit": "0.
|
|
58
|
+
"@tinacms/schema-tools": "1.0.1",
|
|
59
|
+
"@tinacms/sharedctx": "1.0.0",
|
|
60
|
+
"@tinacms/toolkit": "1.0.1",
|
|
61
61
|
"crypto-js": "^4.0.0",
|
|
62
62
|
"encoding": "0.1.13",
|
|
63
63
|
"fetch-ponyfill": "^7.1.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@testing-library/react": "^12.0.0",
|
|
78
78
|
"@testing-library/react-hooks": "^7.0.2",
|
|
79
79
|
"@testing-library/user-event": "^12.7.0",
|
|
80
|
-
"@tinacms/scripts": "0.
|
|
80
|
+
"@tinacms/scripts": "1.0.0",
|
|
81
81
|
"@types/jest": "^27.0.1",
|
|
82
82
|
"@types/lodash": "^4.14.169",
|
|
83
83
|
"@types/node": "^14.0.13",
|