@tinacms/graphql 1.3.4 → 1.4.0

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/build.d.ts CHANGED
@@ -2,14 +2,16 @@
2
2
 
3
3
  */
4
4
  import { DocumentNode } from 'graphql';
5
- import { TinaSchema } from '@tinacms/schema-tools';
5
+ import { TinaSchema, Config } from '@tinacms/schema-tools';
6
6
  import { Database } from './database';
7
7
  export declare const buildDotTinaFiles: ({ database, config, flags, buildSDK, }: {
8
8
  database: Database;
9
- config: TinaSchema['config'];
9
+ config: Config;
10
10
  flags?: string[];
11
11
  buildSDK?: boolean;
12
12
  }) => Promise<{
13
13
  graphQLSchema: DocumentNode;
14
14
  tinaSchema: TinaSchema;
15
+ fragDoc: string;
16
+ queryDoc: string;
15
17
  }>;
@@ -7,8 +7,7 @@ import type { Bridge } from './index';
7
7
  export declare class FilesystemBridge implements Bridge {
8
8
  rootPath: string;
9
9
  outputPath?: string;
10
- constructor(rootPath: string);
11
- addOutputPath(outputPath: string): void;
10
+ constructor(rootPath: string, outputPath?: string);
12
11
  glob(pattern: string, extension: string): Promise<string[]>;
13
12
  supportsBuilding(): boolean;
14
13
  delete(filepath: string): Promise<void>;
@@ -1,6 +1,3 @@
1
- /**
2
-
3
- */
4
1
  import type { DocumentNode } from 'graphql';
5
2
  import type { CollectionTemplateable, TinaCloudCollection, Schema, TinaSchema } from '@tinacms/schema-tools';
6
3
  import type { Bridge } from '../database/bridge';
@@ -119,11 +116,15 @@ export declare class Database {
119
116
  graphQLSchema: DocumentNode;
120
117
  tinaSchema: TinaSchema;
121
118
  lookup?: object;
122
- }) => Promise<void>;
119
+ }) => Promise<{
120
+ warnings: string[];
121
+ }>;
123
122
  deleteContentByPaths: (documentPaths: string[]) => Promise<void>;
124
123
  indexContentByPaths: (documentPaths: string[]) => Promise<void>;
125
124
  delete: (filepath: string) => Promise<void>;
126
- _indexAllContent: (level: Level) => Promise<void>;
125
+ _indexAllContent: (level: Level) => Promise<{
126
+ warnings: string[];
127
+ }>;
127
128
  addToLookupMap: (lookup: LookupMapType) => Promise<void>;
128
129
  }
129
130
  export declare type LookupMapType = GlobalDocumentLookup | CollectionDocumentLookup | MultiCollectionDocumentLookup | MultiCollectionDocumentListLookup | CollectionDocumentListLookup | UnionDataLookup | NodeDocument;
@@ -2,6 +2,8 @@
2
2
 
3
3
  */
4
4
  import * as yup from 'yup';
5
+ import { normalizePath } from '@tinacms/schema-tools';
6
+ export { normalizePath };
5
7
  export declare const stringifyFile: (content: object, format: FormatType | string, keepTemplateKey: boolean, markdownParseConfig?: {
6
8
  frontmatterFormat?: 'toml' | 'yaml' | 'json';
7
9
  frontmatterDelimiters?: [string, string] | string;
@@ -11,6 +13,5 @@ export declare const parseFile: <T extends object>(content: string, format: Form
11
13
  frontmatterDelimiters?: [string, string] | string;
12
14
  }) => T;
13
15
  export declare type FormatType = 'json' | 'md' | 'mdx' | 'markdown';
14
- export declare const normalizePath: (filepath: string) => string;
15
16
  export declare const atob: (b64Encoded: string) => string;
16
17
  export declare const btoa: (string: string) => string;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- /**
2
-
3
- */
4
1
  import type { Schema, Collection, Template as TinaTemplate } from '@tinacms/schema-tools';
5
2
  import { buildDotTinaFiles } from './build';
6
3
  export { resolve } from './resolve';
@@ -9,14 +6,17 @@ export { createDatabase } from './database';
9
6
  export { TinaLevelClient } from './level/tinaLevel';
10
7
  export type { QueryOptions, Database, OnDeleteCallback, OnPutCallback, CreateDatabase, } from './database';
11
8
  import type { Database } from './database';
9
+ import type { Config } from '@tinacms/schema-tools';
12
10
  export { sequential, assertShape } from './util';
13
11
  export { stringifyFile, parseFile } from './database/util';
14
12
  export { createSchema } from './schema/createSchema';
15
13
  export { buildDotTinaFiles };
16
14
  export declare type DummyType = unknown;
17
- export declare const buildSchema: (rootPath: string, database: Database, flags?: string[]) => Promise<{
15
+ export declare const buildSchema: (database: Database, config: Config, flags?: string[]) => Promise<{
18
16
  graphQLSchema: import("graphql").DocumentNode;
19
17
  tinaSchema: import("@tinacms/schema-tools").TinaSchema;
18
+ fragDoc: string;
19
+ queryDoc: string;
20
20
  }>;
21
21
  export declare const getASTSchema: (database: Database) => Promise<import("graphql").GraphQLSchema>;
22
22
  export declare type TinaSchema = Schema;