@tinacms/graphql 0.0.0-20231020151608 → 0.0.0-20231020155949
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/ast-builder/index.d.ts +1 -2
- package/dist/builder/index.d.ts +0 -4
- package/dist/database/datalayer.d.ts +1 -1
- package/dist/database/index.d.ts +7 -36
- package/dist/index.d.ts +2 -4
- package/dist/index.js +184 -682
- package/dist/index.mjs +184 -675
- package/dist/resolve.d.ts +1 -4
- package/dist/resolver/index.d.ts +2 -6
- package/package.json +7 -8
- package/dist/auth/utils.d.ts +0 -22
|
@@ -123,7 +123,6 @@ export declare const astBuilder: {
|
|
|
123
123
|
CollectionDocumentUnion: string;
|
|
124
124
|
Folder: string;
|
|
125
125
|
String: string;
|
|
126
|
-
Password: string;
|
|
127
126
|
Reference: string;
|
|
128
127
|
Collection: string;
|
|
129
128
|
ID: string;
|
|
@@ -152,7 +151,7 @@ export declare const astBuilder: {
|
|
|
152
151
|
definitions: TypeDefinitionNode[];
|
|
153
152
|
}) => DocumentNode;
|
|
154
153
|
};
|
|
155
|
-
declare type scalarNames = 'string' | 'boolean' | 'datetime' | 'image' | 'text' | 'number'
|
|
154
|
+
declare type scalarNames = 'string' | 'boolean' | 'datetime' | 'image' | 'text' | 'number';
|
|
156
155
|
export declare const extractInlineTypes: (item: TypeDefinitionNode | TypeDefinitionNode[]) => TypeDefinitionNode[];
|
|
157
156
|
export declare function walk(maybeNode: TypeDefinitionNode, visited?: WeakSet<object>): IterableIterator<TypeDefinitionNode>;
|
|
158
157
|
export declare function addNamespaceToSchema<T extends object | string>(maybeNode: T, namespace?: string[]): T;
|
package/dist/builder/index.d.ts
CHANGED
|
@@ -148,9 +148,6 @@ export declare class Builder {
|
|
|
148
148
|
* @param collection
|
|
149
149
|
*/
|
|
150
150
|
collectionDocument: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
|
|
151
|
-
authenticationCollectionDocument: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
|
|
152
|
-
updatePasswordMutation: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
|
|
153
|
-
authorizationCollectionDocument: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
|
|
154
151
|
/**
|
|
155
152
|
* Turns a collection into a fragment that gets updated on build. This fragment does not resolve references
|
|
156
153
|
* ```graphql
|
|
@@ -234,7 +231,6 @@ export declare class Builder {
|
|
|
234
231
|
*/
|
|
235
232
|
buildStaticDefinitions: () => (import("graphql").ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | import("graphql").InterfaceTypeDefinitionNode[])[];
|
|
236
233
|
private _buildCollectionDocumentType;
|
|
237
|
-
private _buildAuthDocumentType;
|
|
238
234
|
private _filterCollectionDocumentType;
|
|
239
235
|
private _buildTemplateFilter;
|
|
240
236
|
private _updateCollectionDocumentMutationType;
|
|
@@ -69,7 +69,7 @@ export declare class FolderTreeBuilder {
|
|
|
69
69
|
get tree(): FolderTree;
|
|
70
70
|
update(documentPath: string, collectionPath: string): any;
|
|
71
71
|
}
|
|
72
|
-
export declare const makeFolderOpsForCollection: <T extends object>(folderTree: FolderTree, collection: Collection<true>, indexDefinitions:
|
|
72
|
+
export declare const makeFolderOpsForCollection: <T extends object>(folderTree: FolderTree, collection: Collection<true>, indexDefinitions: IndexDefinition[], opType: 'put' | 'del', level: Level, escapeStr?: StringEscaper) => BatchOp[];
|
|
73
73
|
export declare const makeIndexOpsForDocument: <T extends object>(filepath: string, collection: string | undefined, indexDefinitions: Record<string, IndexDefinition>, data: T, opType: 'put' | 'del', level: Level, escapeStr?: StringEscaper) => BatchOp[];
|
|
74
74
|
export declare const makeStringEscaper: (regex: RegExp, replacement: string) => StringEscaper;
|
|
75
75
|
export declare const stringEscaper: StringEscaper;
|
package/dist/database/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare type IndexStatusEvent = {
|
|
|
10
10
|
declare type IndexStatusCallback = (event: IndexStatusEvent) => Promise<void>;
|
|
11
11
|
export declare type OnPutCallback = (key: string, value: any) => Promise<void>;
|
|
12
12
|
export declare type OnDeleteCallback = (key: string) => Promise<void>;
|
|
13
|
-
export
|
|
13
|
+
export declare type CreateDatabase = {
|
|
14
14
|
bridge?: Bridge;
|
|
15
15
|
level: Level;
|
|
16
16
|
onPut?: (key: string, value: any) => Promise<void>;
|
|
@@ -18,35 +18,8 @@ export interface DatabaseArgs {
|
|
|
18
18
|
tinaDirectory?: string;
|
|
19
19
|
indexStatusCallback?: IndexStatusCallback;
|
|
20
20
|
version?: boolean;
|
|
21
|
-
namespace?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface GitProvider {
|
|
24
|
-
onPut: (key: string, value: string) => Promise<void>;
|
|
25
|
-
onDelete: (key: string) => Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export declare type CreateDatabase = Omit<DatabaseArgs, 'level' | 'onPut' | 'onDelete'> & {
|
|
28
|
-
databaseAdapter: Level;
|
|
29
|
-
gitProvider: GitProvider;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use databaseAdapter instead
|
|
32
|
-
*/
|
|
33
|
-
level?: Level;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use gitProvider instead
|
|
36
|
-
*/
|
|
37
|
-
onPut?: OnPutCallback;
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated Use gitProvider instead
|
|
40
|
-
*/
|
|
41
|
-
onDelete?: OnDeleteCallback;
|
|
42
|
-
};
|
|
43
|
-
export declare type CreateLocalDatabaseArgs = Omit<DatabaseArgs, 'level'> & {
|
|
44
|
-
port?: number;
|
|
45
|
-
rootPath?: string;
|
|
46
21
|
};
|
|
47
|
-
export declare const createLocalDatabase: (config?: CreateLocalDatabaseArgs) => Database;
|
|
48
22
|
export declare const createDatabase: (config: CreateDatabase) => Database;
|
|
49
|
-
export declare const createDatabaseInternal: (config: DatabaseArgs) => Database;
|
|
50
23
|
/** Options for {@link Database.query} **/
|
|
51
24
|
export declare type QueryOptions = {
|
|
52
25
|
fileExtension?: string;
|
|
@@ -60,20 +33,18 @@ export declare type QueryOptions = {
|
|
|
60
33
|
folder?: string;
|
|
61
34
|
};
|
|
62
35
|
export declare class Database {
|
|
63
|
-
config:
|
|
36
|
+
config: CreateDatabase;
|
|
64
37
|
bridge?: Bridge;
|
|
65
38
|
rootLevel: Level;
|
|
66
|
-
|
|
67
|
-
contentLevel: Level | undefined;
|
|
39
|
+
level: Level | undefined;
|
|
68
40
|
tinaDirectory: string;
|
|
69
41
|
indexStatusCallback: IndexStatusCallback | undefined;
|
|
70
|
-
private
|
|
71
|
-
private
|
|
42
|
+
private onPut;
|
|
43
|
+
private onDelete;
|
|
72
44
|
private tinaSchema;
|
|
73
|
-
private contentNamespace;
|
|
74
45
|
private collectionIndexDefinitions;
|
|
75
46
|
private _lookup;
|
|
76
|
-
constructor(config:
|
|
47
|
+
constructor(config: CreateDatabase);
|
|
77
48
|
private collectionForPath;
|
|
78
49
|
private getGeneratedFolder;
|
|
79
50
|
private updateDatabaseVersion;
|
|
@@ -103,7 +74,7 @@ export declare class Database {
|
|
|
103
74
|
defaultItem?: import("@tinacms/schema-tools").DefaultItem<Record<string, any>>;
|
|
104
75
|
previewSrc?: string;
|
|
105
76
|
};
|
|
106
|
-
fields: ((import("@tinacms/schema-tools").StringField | import("@tinacms/schema-tools").NumberField | import("@tinacms/schema-tools").BooleanField | import("@tinacms/schema-tools").DateTimeField | import("@tinacms/schema-tools").ImageField | import("@tinacms/schema-tools").ReferenceField | import("@tinacms/schema-tools").
|
|
77
|
+
fields: ((import("@tinacms/schema-tools").StringField | import("@tinacms/schema-tools").NumberField | import("@tinacms/schema-tools").BooleanField | import("@tinacms/schema-tools").DateTimeField | import("@tinacms/schema-tools").ImageField | import("@tinacms/schema-tools").ReferenceField | import("@tinacms/schema-tools").RichTextField<false> | import("@tinacms/schema-tools").ObjectField<false>) & {})[];
|
|
107
78
|
};
|
|
108
79
|
info: CollectionTemplateable;
|
|
109
80
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,13 +3,11 @@ import { buildDotTinaFiles } from './build';
|
|
|
3
3
|
export { resolve } from './resolve';
|
|
4
4
|
export { transformDocumentIntoPayload } from './resolver';
|
|
5
5
|
export * from './resolver/error';
|
|
6
|
+
export { createDatabase } from './database';
|
|
6
7
|
export { TinaLevelClient } from './level/tinaLevel';
|
|
7
|
-
export type {
|
|
8
|
-
export type { QueryOptions, OnDeleteCallback, OnPutCallback, DatabaseArgs, GitProvider, CreateDatabase, } from './database';
|
|
9
|
-
export { Database, createDatabaseInternal, createDatabase, createLocalDatabase, } from './database';
|
|
8
|
+
export type { QueryOptions, Database, OnDeleteCallback, OnPutCallback, CreateDatabase, } from './database';
|
|
10
9
|
import type { Config } from '@tinacms/schema-tools';
|
|
11
10
|
export { getChangedFiles, getSha, shaExists } from './git';
|
|
12
|
-
export * from './auth/utils';
|
|
13
11
|
export { sequential, assertShape } from './util';
|
|
14
12
|
export { loadAndParseWithAliases, stringifyFile, parseFile, scanAllContent, scanContentByPaths, transformDocument, } from './database/util';
|
|
15
13
|
export { createSchema } from './schema/createSchema';
|