tinacms 1.5.10 → 1.5.12
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/admin/pages/IndexingPage.d.ts +2 -0
- package/dist/dev-tools.d.ts +21 -0
- package/dist/dev-tools.es.js +486 -0
- package/dist/dev-tools.js +496 -0
- package/dist/index.es.js +714 -98
- package/dist/index.js +713 -97
- package/dist/internalClient/index.d.ts +18 -11
- package/dist/internalClient/types.d.ts +52 -0
- package/dist/react.d.ts +1 -1
- package/dist/react.es.js +3 -0
- package/dist/react.js +3 -0
- package/dist/style.css +412 -26
- package/package.json +11 -5
|
@@ -3,6 +3,7 @@ import { BranchData, EventBus } from '@tinacms/toolkit';
|
|
|
3
3
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
|
4
4
|
import gql from 'graphql-tag';
|
|
5
5
|
import { TinaSchema, Schema } from '@tinacms/schema-tools';
|
|
6
|
+
import { TinaCloudProject } from './types';
|
|
6
7
|
import { SearchClient } from '@tinacms/search/dist/index-client';
|
|
7
8
|
export declare type OnLoginFunc = (args: {
|
|
8
9
|
token: TokenObject;
|
|
@@ -121,10 +122,12 @@ export declare class Client {
|
|
|
121
122
|
tinaGraphQLVersion: string;
|
|
122
123
|
setToken: (_token: TokenObject) => void;
|
|
123
124
|
private getToken;
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
token: string;
|
|
126
|
+
branch: string;
|
|
126
127
|
private options;
|
|
127
128
|
events: EventBus;
|
|
129
|
+
protectedBranches: string[];
|
|
130
|
+
usingEditorialWorkflow: boolean;
|
|
128
131
|
constructor({ tokenStorage, ...options }: ServerOptions);
|
|
129
132
|
get isLocalMode(): boolean;
|
|
130
133
|
setBranch(branchName: string): void;
|
|
@@ -167,6 +170,12 @@ export declare class Client {
|
|
|
167
170
|
}): Promise<{
|
|
168
171
|
assetsSyncing: string[];
|
|
169
172
|
}>;
|
|
173
|
+
getProject(): Promise<TinaCloudProject>;
|
|
174
|
+
createPullRequest({ baseBranch, branch, title, }: {
|
|
175
|
+
baseBranch: string;
|
|
176
|
+
branch: string;
|
|
177
|
+
title: string;
|
|
178
|
+
}): Promise<any>;
|
|
170
179
|
fetchEvents(limit?: number, cursor?: string): Promise<{
|
|
171
180
|
events: {
|
|
172
181
|
message: string;
|
|
@@ -178,7 +187,6 @@ export declare class Client {
|
|
|
178
187
|
cursor?: string;
|
|
179
188
|
}>;
|
|
180
189
|
parseJwt(token: any): any;
|
|
181
|
-
getProject(): Promise<any>;
|
|
182
190
|
getRefreshedToken(tokens: string): Promise<TokenObject>;
|
|
183
191
|
isAuthorized(): Promise<boolean>;
|
|
184
192
|
isAuthenticated(): Promise<boolean>;
|
|
@@ -202,22 +210,21 @@ export declare class Client {
|
|
|
202
210
|
}>;
|
|
203
211
|
waitForIndexStatus({ ref }: {
|
|
204
212
|
ref: string;
|
|
205
|
-
}): (Promise<any> | (() => void))[]
|
|
206
|
-
status: string;
|
|
207
|
-
};
|
|
213
|
+
}): (Promise<any> | (() => void))[];
|
|
208
214
|
getIndexStatus({ ref }: {
|
|
209
215
|
ref: string;
|
|
210
216
|
}): Promise<{
|
|
211
217
|
status?: "unknown" | "complete" | "failed" | "inprogress";
|
|
212
218
|
timestamp?: number;
|
|
213
219
|
}>;
|
|
214
|
-
listBranches(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
timestamp?: number;
|
|
218
|
-
};
|
|
220
|
+
listBranches(args?: {
|
|
221
|
+
includeIndexStatus?: boolean;
|
|
222
|
+
}): Promise<{
|
|
219
223
|
name?: string;
|
|
224
|
+
protected?: boolean;
|
|
225
|
+
githubPullRequestUrl?: string;
|
|
220
226
|
}[]>;
|
|
227
|
+
usingProtectedBranch(): boolean;
|
|
221
228
|
createBranch({ baseBranch, branchName }: BranchData): Promise<string>;
|
|
222
229
|
}
|
|
223
230
|
export declare const DEFAULT_LOCAL_TINA_GQL_SERVER_URL = "http://localhost:4001/graphql";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface TinaCloudProject {
|
|
2
|
+
tokens: Token[];
|
|
3
|
+
orgId: string;
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
repoUrl: string;
|
|
7
|
+
installationId: number;
|
|
8
|
+
hookId: string;
|
|
9
|
+
siteUrl: string;
|
|
10
|
+
pathToTina: string;
|
|
11
|
+
dateCreated: number;
|
|
12
|
+
dateUpdated: number;
|
|
13
|
+
metadata: Metadata;
|
|
14
|
+
defaultBranch?: string;
|
|
15
|
+
accessDisabled?: boolean;
|
|
16
|
+
indexVersion?: string;
|
|
17
|
+
mediaBranch?: string;
|
|
18
|
+
role: string;
|
|
19
|
+
protectedBranches: string[];
|
|
20
|
+
features?: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface Token {
|
|
23
|
+
token: string;
|
|
24
|
+
name: string;
|
|
25
|
+
branches: string[];
|
|
26
|
+
repoURL: string;
|
|
27
|
+
lastUsed: number;
|
|
28
|
+
}
|
|
29
|
+
export interface Metadata {
|
|
30
|
+
[key: string]: MetaDataBranch;
|
|
31
|
+
}
|
|
32
|
+
export interface MetaDataBranch {
|
|
33
|
+
tinaVersion: TinaVersion;
|
|
34
|
+
tinaMeta: TinaMeta;
|
|
35
|
+
tinaLockVersion: string;
|
|
36
|
+
}
|
|
37
|
+
export interface TinaVersion {
|
|
38
|
+
fullVersion: string;
|
|
39
|
+
major: string;
|
|
40
|
+
minor: string;
|
|
41
|
+
patch: string;
|
|
42
|
+
}
|
|
43
|
+
export interface TinaMeta {
|
|
44
|
+
flags: string[];
|
|
45
|
+
media: {
|
|
46
|
+
tina: TinaMedia;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface TinaMedia {
|
|
50
|
+
publicFolder: string;
|
|
51
|
+
mediaRoot: string;
|
|
52
|
+
}
|
package/dist/react.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const tinaField: <T extends object & {
|
|
|
19
19
|
queryId: string;
|
|
20
20
|
path: (number | string)[];
|
|
21
21
|
};
|
|
22
|
-
}>(object: T, property?: Exclude<keyof T
|
|
22
|
+
}>(object: T, property?: Exclude<keyof NonNullable<T>, "__typename" | "_sys">, index?: number) => string;
|
|
23
23
|
export declare const addMetadata: <T extends object>(id: string, object: T & {
|
|
24
24
|
type?: string;
|
|
25
25
|
_content_source?: unknown;
|
package/dist/react.es.js
CHANGED