@tinacms/graphql 0.0.0-202246155224 → 0.0.0-202251016285
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/CHANGELOG.md +46 -1
- package/dist/ast-builder/index.d.ts +3 -1
- package/dist/build.d.ts +2 -1
- package/dist/database/index.d.ts +4 -2
- package/dist/database/util.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +423 -117
- package/dist/mdx/parse.d.ts +4 -4
- package/dist/mdx/stringify.d.ts +3 -3
- package/dist/resolve.d.ts +3 -1
- package/dist/resolver/index.d.ts +22 -11
- package/dist/resolver/media-utils.d.ts +29 -0
- package/dist/types.d.ts +7 -0
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
# tina-graphql
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-202251016285
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e2aafcd93: Add more GraphQL variables to the generated queries.
|
|
8
|
+
- a20fed8b7: Resolve Cloud URLs to Relative URLs when saving TinaCloud's media
|
|
9
|
+
|
|
10
|
+
Introduces a pair of functions (inside `media-utils.ts`) for handling URLs provided by TinaCloud (`resolveMediaCloudToRelative` and `resolveMediaRelativeToCloud`).
|
|
11
|
+
|
|
12
|
+
These are used in conjuction with two pairs of functions:
|
|
13
|
+
|
|
14
|
+
- When providing data to the preview: `resolveFieldData` and `parseMDX`
|
|
15
|
+
- When saving data to the document: `buildFieldMutations` and `stringifyMDX`
|
|
16
|
+
|
|
17
|
+
I also introduced tests around `media-utils.ts` (`media-utils.test.ts`).
|
|
18
|
+
|
|
19
|
+
## 0.60.5
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 57f09bdd7: Always use the query function when the dataLayer in enabled
|
|
24
|
+
|
|
25
|
+
## 0.60.4
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- d103b27ad: Fix issue where new collections would not be added when CLI restarts
|
|
30
|
+
|
|
31
|
+
## 0.60.3
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 79d112d79: Update cli to accept tinaCloudMediaStore flag and add to metadata during schema compilation
|
|
36
|
+
- 3f46c6706: Fixed issue where generated SDK would not work with templates
|
|
37
|
+
- db9168578: Adds support for an `assetsHost` when resolving `image` fields with `useRelativeMedia`
|
|
38
|
+
- 91d6e6758: Fix issues with experimentalData on windows related to path separator inconsistency and interference with the .tina/**generated** folder
|
|
39
|
+
|
|
40
|
+
## 0.60.2
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 08cdb672a: Adds `useRelativeMedia` support to local graphql client
|
|
45
|
+
- fdbfe9a16: Fixes issue where on windows documents could not be deleted localy
|
|
46
|
+
- 6e2ed31a2: Added `isTitle` property to the schema that allows the title to be displayed in the CMS
|
|
47
|
+
|
|
48
|
+
## 0.60.1
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
|
6
51
|
|
|
@@ -126,9 +126,11 @@ export declare const astBuilder: {
|
|
|
126
126
|
queryName: string;
|
|
127
127
|
fragName: string;
|
|
128
128
|
}) => OperationDefinitionNode;
|
|
129
|
-
ListQueryOperationDefinition: ({ queryName, fragName, }: {
|
|
129
|
+
ListQueryOperationDefinition: ({ queryName, fragName, filterType, dataLayer, }: {
|
|
130
130
|
queryName: string;
|
|
131
131
|
fragName: string;
|
|
132
|
+
filterType: string;
|
|
133
|
+
dataLayer: boolean;
|
|
132
134
|
}) => OperationDefinitionNode;
|
|
133
135
|
toGraphQLAst: (ast: {
|
|
134
136
|
globalTemplates: TypeDefinitionNode[];
|
package/dist/build.d.ts
CHANGED
|
@@ -12,8 +12,9 @@ limitations under the License.
|
|
|
12
12
|
*/
|
|
13
13
|
import type { TinaSchema } from './schema';
|
|
14
14
|
import { Database } from './database';
|
|
15
|
-
export declare const indexDB: ({ database, config, buildSDK, }: {
|
|
15
|
+
export declare const indexDB: ({ database, config, flags, buildSDK, }: {
|
|
16
16
|
database: Database;
|
|
17
17
|
config: TinaSchema['config'];
|
|
18
|
+
flags?: string[];
|
|
18
19
|
buildSDK?: boolean;
|
|
19
20
|
}) => Promise<void>;
|
package/dist/database/index.d.ts
CHANGED
|
@@ -44,8 +44,6 @@ export declare class Database {
|
|
|
44
44
|
private tinaSchema;
|
|
45
45
|
private collectionIndexDefinitions;
|
|
46
46
|
private _lookup;
|
|
47
|
-
private _graphql;
|
|
48
|
-
private _tinaSchema;
|
|
49
47
|
constructor(config: CreateDatabase);
|
|
50
48
|
private collectionForPath;
|
|
51
49
|
private partitionPathsByCollection;
|
|
@@ -65,6 +63,10 @@ export declare class Database {
|
|
|
65
63
|
};
|
|
66
64
|
keepTemplateKey: boolean;
|
|
67
65
|
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Clears the internal cache of the tinaSchema and the lookup file. This allows the state to be reset
|
|
68
|
+
*/
|
|
69
|
+
clearCache(): void;
|
|
68
70
|
flush: (filepath: string) => Promise<string>;
|
|
69
71
|
getLookup: (returnType: string) => Promise<LookupMapType>;
|
|
70
72
|
getGraphQLSchema: () => Promise<DocumentNode>;
|
package/dist/database/util.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ import * as yup from 'yup';
|
|
|
14
14
|
export declare const stringifyFile: (content: object, format: FormatType | string, keepTemplateKey: boolean) => string;
|
|
15
15
|
export declare const parseFile: <T extends object>(content: string, format: FormatType | string, yupSchema: (args: typeof yup) => yup.ObjectSchema<any>) => T;
|
|
16
16
|
export declare type FormatType = 'json' | 'md' | 'mdx' | 'markdown';
|
|
17
|
+
export declare const normalizePath: (filepath: string) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type { Store } from '@tinacms/datalayer';
|
|
|
20
20
|
export type { Bridge } from './database/bridge';
|
|
21
21
|
export { sequential, assertShape } from './util';
|
|
22
22
|
export { stringifyFile, parseFile } from './database/util';
|
|
23
|
-
export declare const buildSchema: (rootPath: string, database: Database) => Promise<import("graphql").GraphQLSchema>;
|
|
23
|
+
export declare const buildSchema: (rootPath: string, database: Database, flags?: string[]) => Promise<import("graphql").GraphQLSchema>;
|
|
24
24
|
import type { TinaCloudSchema as TinaCloudSchemaBase, TinaCloudCollection as TinaCloudCollectionBase, TinaCloudTemplateBase as TinaTemplate, TinaFieldBase } from './types';
|
|
25
25
|
export declare type TinaCloudSchema = TinaCloudSchemaBase<false>;
|
|
26
26
|
export declare type TinaSchema = TinaCloudSchema;
|