@tinacms/schema-tools 1.4.18 → 1.4.19
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 +1526 -20
- package/dist/index.mjs +1524 -19
- package/dist/schema/TinaSchema.d.ts +3 -3
- package/dist/schema/resolveField.d.ts +3 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/validate/index.d.ts +1 -1
- package/package.json +7 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema, Collection, Template, Collectable, CollectionTemplateable, TinaField } from '../types/index';
|
|
1
|
+
import type { Schema, Collection, Template, Collectable, CollectionTemplateable, TinaField } from '../types/index';
|
|
2
2
|
declare type Version = {
|
|
3
3
|
fullVersion: string;
|
|
4
4
|
major: string;
|
|
@@ -41,7 +41,7 @@ export declare class TinaSchema {
|
|
|
41
41
|
}) => Template<true>;
|
|
42
42
|
transformPayload: (collectionName: string, payload: object) => {
|
|
43
43
|
[x: string]: {
|
|
44
|
-
[
|
|
44
|
+
[key: string]: unknown;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
private transformCollectablePayload;
|
|
@@ -76,6 +76,6 @@ export declare class TinaSchema {
|
|
|
76
76
|
matchFiles({ collection, files, }: {
|
|
77
77
|
collection: string | Collection;
|
|
78
78
|
files: string[];
|
|
79
|
-
}):
|
|
79
|
+
}): string[];
|
|
80
80
|
}
|
|
81
81
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
|
-
import { TinaField } from '../types/index';
|
|
5
|
-
import { TinaSchema } from './TinaSchema';
|
|
4
|
+
import type { TinaField } from '../types/index';
|
|
5
|
+
import type { TinaSchema } from './TinaSchema';
|
|
6
6
|
/**
|
|
7
7
|
* Turns a field the schema (schema.{js,ts} file) into a valid front end FieldConfig
|
|
8
8
|
*/
|
|
9
9
|
export declare const resolveField: (field: TinaField<true>, schema: TinaSchema) => {
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
name: string;
|
|
12
|
-
component: TinaField<true>['ui']['component'];
|
|
12
|
+
component: NonNullable<TinaField<true>['ui']>['component'];
|
|
13
13
|
type: string;
|
|
14
14
|
};
|
package/dist/types/index.d.ts
CHANGED
package/dist/validate/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Schema } from '../types/index';
|
|
2
2
|
export { validateTinaCloudSchemaConfig } from './tinaCloudSchemaConfig';
|
|
3
3
|
export declare class TinaSchemaValidationError extends Error {
|
|
4
|
-
constructor(message:
|
|
4
|
+
constructor(message: string);
|
|
5
5
|
}
|
|
6
6
|
export declare const validateSchema: ({ schema }: {
|
|
7
7
|
schema: Schema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/schema-tools",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.19",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -23,14 +23,16 @@
|
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@types/jest": "^29.5.12",
|
|
26
27
|
"@types/micromatch": "^4.0.2",
|
|
27
|
-
"@types/react": "
|
|
28
|
+
"@types/react": "^18.3.3",
|
|
28
29
|
"@types/yup": "^0.29.10",
|
|
29
30
|
"jest": "^29.5.0",
|
|
30
|
-
"react": "
|
|
31
|
+
"react": "^18.3.1",
|
|
32
|
+
"ts-jest": "^29.2.3",
|
|
31
33
|
"typescript": "4.6.4",
|
|
32
34
|
"yup": "^0.32.0",
|
|
33
|
-
"@tinacms/scripts": "1.1.
|
|
35
|
+
"@tinacms/scripts": "1.1.6"
|
|
34
36
|
},
|
|
35
37
|
"peerDependencies": {
|
|
36
38
|
"react": ">=16.14.0",
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
},
|
|
51
53
|
"scripts": {
|
|
52
54
|
"build": "tinacms-scripts build",
|
|
53
|
-
"test": "jest --
|
|
55
|
+
"test": "jest --config jest.config.js",
|
|
54
56
|
"types": "pnpm tsc",
|
|
55
57
|
"test-watch": "jest --passWithNoTests --watch",
|
|
56
58
|
"generate:schema": "pnpm node scripts/generateSchema.js"
|