@tinacms/schema-tools 1.4.16 → 1.4.17

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 CHANGED
@@ -232,10 +232,9 @@
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");
236
235
  const possibleCollections = this.getCollections().filter((collection) => {
237
236
  var _a, _b;
238
- if (!isGitKeep && fileExtension !== (collection.format || "md")) {
237
+ if (!normalizedPath.endsWith(`.gitkeep.${collection.format || "md"}`) && fileExtension !== (collection.format || "md")) {
239
238
  return false;
240
239
  }
241
240
  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,10 +215,9 @@ 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");
219
218
  const possibleCollections = this.getCollections().filter((collection) => {
220
219
  var _a, _b;
221
- if (!isGitKeep && fileExtension !== (collection.format || "md")) {
220
+ if (!normalizedPath.endsWith(`.gitkeep.${collection.format || "md"}`) && fileExtension !== (collection.format || "md")) {
222
221
  return false;
223
222
  }
224
223
  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)) {
@@ -20,11 +20,11 @@ export declare const resolveForm: ({ collection, basename, template, schema, }:
20
20
  };
21
21
  input: {
22
22
  name: string;
23
- onBlur: (event?: import("react").FocusEvent<string, Element>) => void;
24
- onChange: (event: import("react").ChangeEvent<string>) => void;
25
- onFocus: (event?: import("react").FocusEvent<string, Element>) => void;
23
+ onBlur: (event?: import("react").FocusEvent<number, Element>) => void;
24
+ onChange: (event: import("react").ChangeEvent<number>) => void;
25
+ onFocus: (event?: import("react").FocusEvent<number, Element>) => void;
26
26
  type?: string;
27
- value: string[];
27
+ value: number[];
28
28
  };
29
29
  meta: {
30
30
  active?: boolean;
@@ -37,11 +37,11 @@ export declare const resolveForm: ({ collection, basename, template, schema, }:
37
37
  };
38
38
  input: {
39
39
  name: string;
40
- onBlur: (event?: import("react").FocusEvent<number, Element>) => void;
41
- onChange: (event: import("react").ChangeEvent<number>) => void;
42
- onFocus: (event?: import("react").FocusEvent<number, Element>) => void;
40
+ onBlur: (event?: import("react").FocusEvent<string, Element>) => void;
41
+ onChange: (event: import("react").ChangeEvent<string>) => void;
42
+ onFocus: (event?: import("react").FocusEvent<string, Element>) => void;
43
43
  type?: string;
44
- value: number[];
44
+ value: string[];
45
45
  };
46
46
  meta: {
47
47
  active?: boolean;
@@ -100,11 +100,11 @@ export declare const resolveForm: ({ collection, basename, template, schema, }:
100
100
  };
101
101
  input: {
102
102
  name: string;
103
- onBlur: (event?: import("react").FocusEvent<string, Element>) => void;
104
- onChange: (event: import("react").ChangeEvent<string>) => void;
105
- onFocus: (event?: import("react").FocusEvent<string, Element>) => void;
103
+ onBlur: (event?: import("react").FocusEvent<number, Element>) => void;
104
+ onChange: (event: import("react").ChangeEvent<number>) => void;
105
+ onFocus: (event?: import("react").FocusEvent<number, Element>) => void;
106
106
  type?: string;
107
- value: string;
107
+ value: number;
108
108
  };
109
109
  meta: {
110
110
  active?: boolean;
@@ -117,11 +117,11 @@ export declare const resolveForm: ({ collection, basename, template, schema, }:
117
117
  };
118
118
  input: {
119
119
  name: string;
120
- onBlur: (event?: import("react").FocusEvent<number, Element>) => void;
121
- onChange: (event: import("react").ChangeEvent<number>) => void;
122
- onFocus: (event?: import("react").FocusEvent<number, Element>) => void;
120
+ onBlur: (event?: import("react").FocusEvent<string, Element>) => void;
121
+ onChange: (event: import("react").ChangeEvent<string>) => void;
122
+ onFocus: (event?: import("react").FocusEvent<string, Element>) => void;
123
123
  type?: string;
124
- value: number;
124
+ value: string;
125
125
  };
126
126
  meta: {
127
127
  active?: boolean;
@@ -25,7 +25,7 @@ export declare const CollectionBaseSchema: z.ZodObject<{
25
25
  isAuthCollection?: boolean;
26
26
  }>;
27
27
  export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
28
- collections: z.ZodArray<z.ZodEffects<z.ZodObject<z.extendShape<{
28
+ collections: z.ZodArray<z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
29
29
  label: z.ZodOptional<z.ZodString>;
30
30
  name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
31
31
  path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
@@ -128,7 +128,7 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
128
128
  tina: z.ZodOptional<z.ZodObject<{
129
129
  publicFolder: z.ZodString;
130
130
  mediaRoot: z.ZodString;
131
- static: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
131
+ static: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
132
132
  }, "strict", z.ZodTypeAny, {
133
133
  publicFolder?: string;
134
134
  mediaRoot?: string;
@@ -15,7 +15,7 @@ export declare const tinaConfigZod: z.ZodObject<{
15
15
  tina: z.ZodOptional<z.ZodObject<{
16
16
  publicFolder: z.ZodString;
17
17
  mediaRoot: z.ZodString;
18
- static: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
18
+ static: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
19
19
  }, "strict", z.ZodTypeAny, {
20
20
  publicFolder?: string;
21
21
  mediaRoot?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "1.4.16",
3
+ "version": "1.4.17",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -23,14 +23,14 @@
23
23
  ]
24
24
  },
25
25
  "devDependencies": {
26
- "@types/react": "17.0.2",
27
- "@tinacms/scripts": "1.1.4",
28
26
  "@types/micromatch": "^4.0.2",
27
+ "@types/react": "17.0.2",
29
28
  "@types/yup": "^0.29.10",
30
29
  "jest": "^29.5.0",
31
30
  "react": "17.0.2",
32
- "typescript": "4.3.5",
33
- "yup": "^0.32.0"
31
+ "typescript": "4.6.4",
32
+ "yup": "^0.32.0",
33
+ "@tinacms/scripts": "1.1.5"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": ">=16.14.0",
@@ -53,6 +53,6 @@
53
53
  "test": "jest --passWithNoTests",
54
54
  "types": "pnpm tsc",
55
55
  "test-watch": "jest --passWithNoTests --watch",
56
- "generate:schema": "yarn node scripts/generateSchema.js"
56
+ "generate:schema": "pnpm node scripts/generateSchema.js"
57
57
  }
58
58
  }