@tinacms/schema-tools 1.4.17 → 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 +3 -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
|
@@ -333,6 +333,7 @@ export interface AuthProvider {
|
|
|
333
333
|
getLoginScreen: () => FC<LoginScreenProps> | null;
|
|
334
334
|
getSessionProvider: () => FC<{
|
|
335
335
|
basePath?: string;
|
|
336
|
+
children?: React.ReactNode;
|
|
336
337
|
}>;
|
|
337
338
|
}
|
|
338
339
|
interface AuthHooks {
|
|
@@ -475,6 +476,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
475
476
|
*/
|
|
476
477
|
loadCustomStore: () => Promise<Store>;
|
|
477
478
|
tina?: never;
|
|
479
|
+
accept?: string | string[];
|
|
478
480
|
} | {
|
|
479
481
|
/**
|
|
480
482
|
* Use Git-backed assets for media, these values will
|
|
@@ -496,6 +498,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
496
498
|
static?: boolean;
|
|
497
499
|
};
|
|
498
500
|
loadCustomStore?: never;
|
|
501
|
+
accept?: string | string[];
|
|
499
502
|
};
|
|
500
503
|
search?: ({
|
|
501
504
|
/**
|
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"
|