@tinacms/graphql 1.4.15 → 1.4.16

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.
@@ -47,7 +47,6 @@ export declare class Database {
47
47
  constructor(config: CreateDatabase);
48
48
  private collectionForPath;
49
49
  private getGeneratedFolder;
50
- private partitionPathsByCollection;
51
50
  private updateDatabaseVersion;
52
51
  private getDatabaseVersion;
53
52
  private initLevel;
@@ -2,7 +2,8 @@
2
2
 
3
3
  */
4
4
  import * as yup from 'yup';
5
- import { normalizePath } from '@tinacms/schema-tools';
5
+ import { Collection, CollectionTemplateable, normalizePath, TinaSchema } from '@tinacms/schema-tools';
6
+ import { Bridge } from './bridge';
6
7
  export { normalizePath };
7
8
  export declare const stringifyFile: (content: object, format: FormatType | string, keepTemplateKey: boolean, markdownParseConfig?: {
8
9
  frontmatterFormat?: 'toml' | 'yaml' | 'json';
@@ -15,3 +16,18 @@ export declare const parseFile: <T extends object>(content: string, format: Form
15
16
  export declare type FormatType = 'json' | 'md' | 'mdx' | 'markdown';
16
17
  export declare const atob: (b64Encoded: string) => string;
17
18
  export declare const btoa: (string: string) => string;
19
+ export declare const scanAllContent: (tinaSchema: TinaSchema, bridge: Bridge, callback: (collection: Collection<true>, contentPaths: string[]) => Promise<void>) => Promise<string[]>;
20
+ export declare const scanContentByPaths: (tinaSchema: TinaSchema, documentPaths: string[], callback: (collection: Collection<true> | undefined, documentPaths: string[]) => Promise<void>) => Promise<void>;
21
+ export declare const partitionPathsByCollection: (tinaSchema: TinaSchema, documentPaths: string[]) => Promise<{
22
+ pathsByCollection: Record<string, string[]>;
23
+ nonCollectionPaths: string[];
24
+ collections: Record<string, Collection<true>>;
25
+ }>;
26
+ /** TODO help needed with name of this function **/
27
+ export declare const transformDocument: <T extends object>(filepath: string, contentObject: any, tinaSchema: TinaSchema) => T;
28
+ export declare function hasOwnProperty<X extends {}, Y extends PropertyKey>(obj: X, prop: Y): obj is X & Record<Y, unknown>;
29
+ export declare const getTemplateForFile: (templateInfo: CollectionTemplateable, data: {
30
+ [key: string]: unknown;
31
+ }) => import("@tinacms/schema-tools").Template<true>;
32
+ /** TODO help needed with name of this function **/
33
+ export declare const loadAndParseWithAliases: (bridge: Bridge, filepath: string, collection?: Collection<true>, templateInfo?: CollectionTemplateable) => Promise<object>;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import type { Schema, Collection, Template as TinaTemplate } from '@tinacms/schema-tools';
2
2
  import { buildDotTinaFiles } from './build';
3
3
  export { resolve } from './resolve';
4
+ export { transformDocumentIntoPayload } from './resolver';
4
5
  export * from './resolver/error';
5
6
  export { createDatabase } from './database';
6
7
  export { TinaLevelClient } from './level/tinaLevel';
7
8
  export type { QueryOptions, Database, OnDeleteCallback, OnPutCallback, CreateDatabase, } from './database';
8
9
  import type { Config } from '@tinacms/schema-tools';
9
10
  export { sequential, assertShape } from './util';
10
- export { stringifyFile, parseFile } from './database/util';
11
+ export { loadAndParseWithAliases, stringifyFile, parseFile, scanAllContent, scanContentByPaths, transformDocument, } from './database/util';
11
12
  export { createSchema } from './schema/createSchema';
12
13
  export { buildDotTinaFiles };
13
14
  export declare type DummyType = unknown;