@tinacms/schema-tools 1.4.15 → 1.4.16
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.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -232,9 +232,10 @@
|
|
|
232
232
|
this.getCollectionByFullPath = (filepath) => {
|
|
233
233
|
const fileExtension = filepath.split(".").pop();
|
|
234
234
|
const normalizedPath = filepath.replace(/\\/g, "/");
|
|
235
|
+
const isGitKeep = normalizedPath.endsWith(".gitkeep");
|
|
235
236
|
const possibleCollections = this.getCollections().filter((collection) => {
|
|
236
237
|
var _a, _b;
|
|
237
|
-
if (fileExtension !== (collection.format || "md")) {
|
|
238
|
+
if (!isGitKeep && fileExtension !== (collection.format || "md")) {
|
|
238
239
|
return false;
|
|
239
240
|
}
|
|
240
241
|
if (((_a = collection == null ? void 0 : collection.match) == null ? void 0 : _a.include) || ((_b = collection == null ? void 0 : collection.match) == null ? void 0 : _b.exclude)) {
|
package/dist/index.mjs
CHANGED
|
@@ -215,9 +215,10 @@ class TinaSchema {
|
|
|
215
215
|
this.getCollectionByFullPath = (filepath) => {
|
|
216
216
|
const fileExtension = filepath.split(".").pop();
|
|
217
217
|
const normalizedPath = filepath.replace(/\\/g, "/");
|
|
218
|
+
const isGitKeep = normalizedPath.endsWith(".gitkeep");
|
|
218
219
|
const possibleCollections = this.getCollections().filter((collection) => {
|
|
219
220
|
var _a, _b;
|
|
220
|
-
if (fileExtension !== (collection.format || "md")) {
|
|
221
|
+
if (!isGitKeep && fileExtension !== (collection.format || "md")) {
|
|
221
222
|
return false;
|
|
222
223
|
}
|
|
223
224
|
if (((_a = collection == null ? void 0 : collection.match) == null ? void 0 : _a.include) || ((_b = collection == null ? void 0 : collection.match) == null ? void 0 : _b.exclude)) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -647,6 +647,7 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
|
|
|
647
647
|
allowedActions?: {
|
|
648
648
|
create?: boolean;
|
|
649
649
|
delete?: boolean;
|
|
650
|
+
createNestedFolder?: boolean;
|
|
650
651
|
};
|
|
651
652
|
/**
|
|
652
653
|
* Forms for this collection will be editable from the global sidebar rather than the form panel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/schema-tools",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.16",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/react": "17.0.2",
|
|
27
|
-
"@tinacms/scripts": "1.1.
|
|
27
|
+
"@tinacms/scripts": "1.1.4",
|
|
28
28
|
"@types/micromatch": "^4.0.2",
|
|
29
29
|
"@types/yup": "^0.29.10",
|
|
30
30
|
"jest": "^29.5.0",
|