@tinacms/graphql 0.0.0-20225820237 → 0.0.0-202261192534
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 +87 -6
- package/dist/ast-builder/index.d.ts +3 -1
- package/dist/database/bridge/index.d.ts +1 -1
- package/dist/database/index.d.ts +5 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +561 -225
- package/dist/mdx/parse.d.ts +4 -3
- package/dist/mdx/stringify.d.ts +3 -2
- package/dist/resolve.d.ts +2 -1
- package/dist/resolver/error.d.ts +30 -1
- package/dist/resolver/index.d.ts +0 -1
- package/dist/resolver/media-utils.d.ts +4 -3
- package/package.json +6 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,100 @@
|
|
|
1
1
|
# tina-graphql
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-202261192534
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- b5b0dfd66: chore: migrate from fs.rmdir -> fs.rm
|
|
8
|
+
- Updated dependencies [ae23e9ad6]
|
|
9
|
+
- @tinacms/schema-tools@0.0.0-202261192534
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## 0.61.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 4daf15b36: Updated matching logic to only return the correct extension.
|
|
16
|
+
|
|
17
|
+
This means if you are using any other files besides `.md` the format must be provided in the schema.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// .tina/schema.ts
|
|
21
|
+
|
|
22
|
+
import { defineSchema } from 'tinacms'
|
|
23
|
+
|
|
24
|
+
const schema = defineSchema({
|
|
25
|
+
collections: [
|
|
26
|
+
{
|
|
27
|
+
name: 'page',
|
|
28
|
+
path: 'content/page',
|
|
29
|
+
label: 'Page',
|
|
30
|
+
// Need to provide the format if the file being used (default is `.md`)
|
|
31
|
+
format: 'mdx',
|
|
32
|
+
fields: [
|
|
33
|
+
//...
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
})
|
|
38
|
+
//...
|
|
39
|
+
|
|
40
|
+
export default schema
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- 2ef5a1f33: Use media config from the schema in the local media server
|
|
46
|
+
- 2ef5a1f33: Uses new `schema.config` when resolving media/asset urls
|
|
47
|
+
- b348f8b6b: Experimental isomorphic git bridge implementation
|
|
48
|
+
- fb73fb355: Renames syncFolder to a mediaRoot when configuring Repo-Based Media
|
|
49
|
+
- Updated dependencies [b348f8b6b]
|
|
50
|
+
- Updated dependencies [fb73fb355]
|
|
51
|
+
- Updated dependencies [4daf15b36]
|
|
52
|
+
- @tinacms/datalayer@0.2.0
|
|
53
|
+
- @tinacms/schema-tools@0.0.6
|
|
54
|
+
|
|
55
|
+
## 0.60.8
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- 3325cd226: Make @tinacms/schema-tools a regular dependency of @tinacms/graphql
|
|
60
|
+
|
|
61
|
+
## 0.60.7
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- f6cb634c2: Added an optional config key to the schema that will be used for tina cloud media store
|
|
66
|
+
- b1a4290e6: Use media config from the schema in the local media server
|
|
67
|
+
- 1955b8842: Uses new `schema.config` when resolving media/asset urls
|
|
68
|
+
- 8b81c3cf3: Added more context to error messages to help to user debug issues
|
|
69
|
+
- @tinacms/datalayer@0.1.1
|
|
70
|
+
|
|
71
|
+
## 0.60.6
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- e2aafcd93: Add more GraphQL variables to the generated queries.
|
|
76
|
+
- a20fed8b7: Resolve Cloud URLs to Relative URLs when saving TinaCloud's media
|
|
77
|
+
|
|
78
|
+
Introduces a pair of functions (inside `media-utils.ts`) for handling URLs provided by TinaCloud (`resolveMediaCloudToRelative` and `resolveMediaRelativeToCloud`).
|
|
10
79
|
|
|
11
80
|
These are used in conjuction with two pairs of functions:
|
|
12
81
|
|
|
13
|
-
|
|
14
|
-
|
|
82
|
+
- When providing data to the preview: `resolveFieldData` and `parseMDX`
|
|
83
|
+
- When saving data to the document: `buildFieldMutations` and `stringifyMDX`
|
|
84
|
+
|
|
85
|
+
I also introduced tests around `media-utils.ts` (`media-utils.test.ts`).
|
|
86
|
+
|
|
87
|
+
## 0.60.5
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- 57f09bdd7: Always use the query function when the dataLayer in enabled
|
|
92
|
+
|
|
93
|
+
## 0.60.4
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
15
96
|
|
|
16
|
-
|
|
97
|
+
- d103b27ad: Fix issue where new collections would not be added when CLI restarts
|
|
17
98
|
|
|
18
99
|
## 0.60.3
|
|
19
100
|
|
|
@@ -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[];
|
|
@@ -12,7 +12,7 @@ limitations under the License.
|
|
|
12
12
|
*/
|
|
13
13
|
export interface Bridge {
|
|
14
14
|
rootPath: string;
|
|
15
|
-
glob(pattern: string): Promise<string[]>;
|
|
15
|
+
glob(pattern: string, extension: string): Promise<string[]>;
|
|
16
16
|
get(filepath: string): Promise<string>;
|
|
17
17
|
put(filepath: string, data: string): Promise<void>;
|
|
18
18
|
delete(filepath: string): Promise<void>;
|
package/dist/database/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare type CreateDatabase = {
|
|
|
28
28
|
export declare const createDatabase: (config: CreateDatabase) => Promise<Database>;
|
|
29
29
|
/** Options for {@link Database.query} **/
|
|
30
30
|
export declare type QueryOptions = {
|
|
31
|
+
fileExtension?: string;
|
|
31
32
|
collection: string;
|
|
32
33
|
filterChain?: (BinaryFilter | TernaryFilter)[];
|
|
33
34
|
sort?: string;
|
|
@@ -44,8 +45,6 @@ export declare class Database {
|
|
|
44
45
|
private tinaSchema;
|
|
45
46
|
private collectionIndexDefinitions;
|
|
46
47
|
private _lookup;
|
|
47
|
-
private _graphql;
|
|
48
|
-
private _tinaSchema;
|
|
49
48
|
constructor(config: CreateDatabase);
|
|
50
49
|
private collectionForPath;
|
|
51
50
|
private partitionPathsByCollection;
|
|
@@ -65,6 +64,10 @@ export declare class Database {
|
|
|
65
64
|
};
|
|
66
65
|
keepTemplateKey: boolean;
|
|
67
66
|
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Clears the internal cache of the tinaSchema and the lookup file. This allows the state to be reset
|
|
69
|
+
*/
|
|
70
|
+
clearCache(): void;
|
|
68
71
|
flush: (filepath: string) => Promise<string>;
|
|
69
72
|
getLookup: (returnType: string) => Promise<LookupMapType>;
|
|
70
73
|
getGraphQLSchema: () => Promise<DocumentNode>;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ limitations under the License.
|
|
|
12
12
|
*/
|
|
13
13
|
export { indexDB } from './build';
|
|
14
14
|
export { resolve } from './resolve';
|
|
15
|
+
export * from './resolver/error';
|
|
15
16
|
export { createDatabase } from './database';
|
|
16
17
|
export type { QueryOptions } from './database';
|
|
17
18
|
import type { Database } from './database';
|