@tinacms/graphql 0.57.0 → 0.58.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/{primitives/ast-builder → ast-builder}/index.d.ts +0 -0
  3. package/dist/build.d.ts +18 -0
  4. package/dist/{primitives/builder → builder}/index.d.ts +5 -11
  5. package/dist/{primitives/builder → builder}/static-definitions.d.ts +0 -0
  6. package/dist/{primitives/database/bridge.d.ts → database/bridge/filesystem.d.ts} +3 -5
  7. package/dist/{primitives/database → database/bridge}/github.d.ts +3 -1
  8. package/dist/database/bridge/index.d.ts +23 -0
  9. package/dist/{primitives/database → database}/index.d.ts +26 -16
  10. package/dist/database/store/filesystem.d.ts +28 -0
  11. package/dist/database/store/github.d.ts +37 -0
  12. package/dist/database/store/index.d.ts +74 -0
  13. package/dist/database/store/level.d.ts +29 -0
  14. package/dist/database/store/memory.d.ts +33 -0
  15. package/dist/database/util.d.ts +16 -0
  16. package/dist/index.d.ts +13 -4
  17. package/dist/index.js +1588 -734
  18. package/dist/{primitives/mdx → mdx}/index.d.ts +0 -0
  19. package/dist/{primitives/mdx → mdx}/parse.d.ts +0 -0
  20. package/dist/{primitives/mdx → mdx}/stringify.d.ts +0 -0
  21. package/dist/{primitives/resolve.d.ts → resolve.d.ts} +0 -0
  22. package/dist/{primitives/resolver → resolver}/error.d.ts +12 -0
  23. package/dist/{primitives/resolver → resolver}/index.d.ts +3 -34
  24. package/dist/{primitives/schema → schema}/index.d.ts +1 -0
  25. package/dist/{primitives/build.d.ts → schema/validate.d.ts} +2 -4
  26. package/dist/sdkBuilder/index.d.ts +1 -1
  27. package/dist/{primitives/spec → spec}/setup.d.ts +24 -30
  28. package/dist/{primitives/types.d.ts → types.d.ts} +1 -0
  29. package/dist/{primitives/util.d.ts → util.d.ts} +0 -0
  30. package/package.json +12 -8
  31. package/dist/primitives/index.d.ts +0 -40
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # tina-graphql
2
2
 
3
+ ## 0.58.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4700d7ae4: Patch fix to ensure builds include latest dependencies
8
+
9
+ ## 0.58.0
10
+
11
+ ### Minor Changes
12
+
13
+ - fa7a0419f: Adds experimental support for a data layer between file-based content and the GraphQL API. This allows documents to be indexed so the CMS can behave more like a traditional CMS, with the ability enforce foreign reference constraints and filtering/pagination capabilities.
14
+
15
+ ### Patch Changes
16
+
17
+ - eb5fbfac7: Ensure GraphQL resolve doesn't access "bridge" documents
18
+ - 47d126029: Fix support of objects in a list for MDX templates
19
+
20
+ ## 0.57.2
21
+
22
+ ### Patch Changes
23
+
24
+ - edb2f4011: Trim path property on collections during compilation
25
+
26
+ ## 0.57.1
27
+
28
+ ### Patch Changes
29
+
30
+ - 60729f60c: Adds a `reference` field
31
+
3
32
  ## 0.57.0
4
33
 
5
34
  ### Minor Changes
@@ -0,0 +1,18 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import type { TinaSchema } from './schema';
14
+ import { Database } from './database';
15
+ export declare const indexDB: ({ database, config, }: {
16
+ database: Database;
17
+ config: TinaSchema['config'];
18
+ }) => Promise<void>;
@@ -183,17 +183,7 @@ export declare class Builder {
183
183
  * @public
184
184
  * @param collection a Tina Cloud collection
185
185
  */
186
- collectionFragment: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FragmentDefinitionNode | {
187
- name: {
188
- kind: "Name";
189
- value: string;
190
- };
191
- kind: "Field";
192
- selectionSet: {
193
- kind: "SelectionSet";
194
- selections: import("graphql").SelectionNode[];
195
- };
196
- }>;
186
+ collectionFragment: (collection: TinaCloudCollectionEnriched) => Promise<import("graphql").FragmentDefinitionNode>;
197
187
  private _buildFieldNodeForFragments;
198
188
  buildTemplateFragments(template: Template<true>): Promise<InlineFragmentNode>;
199
189
  /**
@@ -247,13 +237,17 @@ export declare class Builder {
247
237
  */
248
238
  buildStaticDefinitions: () => (import("graphql").ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | import("graphql").InterfaceTypeDefinitionNode[])[];
249
239
  private _buildCollectionDocumentType;
240
+ private _filterCollectionDocumentType;
241
+ private _buildTemplateFilter;
250
242
  private _updateCollectionDocumentMutationType;
251
243
  private _buildTemplateMutation;
252
244
  private _buildMultiCollectionDocumentDefinition;
253
245
  private _buildMultiCollectionDocumentListDefinition;
246
+ private _buildFieldFilter;
254
247
  private _buildFieldMutation;
255
248
  private _buildReferenceMutation;
256
249
  private _buildObjectOrUnionData;
250
+ private _connectionFilterBuilder;
257
251
  private _connectionFieldBuilder;
258
252
  private _buildDataField;
259
253
  private _buildTemplateData;
@@ -10,6 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
+ import type { Bridge } from './index';
13
14
  /**
14
15
  * This is the bridge from whatever datasource we need for I/O.
15
16
  * The basic example here is for the filesystem, one is needed
@@ -19,11 +20,8 @@ export declare class FilesystemBridge implements Bridge {
19
20
  rootPath: string;
20
21
  constructor(rootPath: string);
21
22
  glob(pattern: string): Promise<string[]>;
23
+ supportsBuilding(): boolean;
22
24
  get(filepath: string): Promise<string>;
23
- put(filepath: string, data: string): Promise<void>;
24
- }
25
- export interface Bridge {
26
- glob(pattern: string): Promise<string[]>;
27
- get(filepath: string): Promise<string>;
25
+ putConfig(filepath: string, data: string): Promise<void>;
28
26
  put(filepath: string, data: string): Promise<void>;
29
27
  }
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
13
  import { Octokit } from '@octokit/rest';
14
- import { Bridge } from './bridge';
14
+ import { Bridge } from '.';
15
15
  export declare type GithubManagerInit = {
16
16
  rootPath: string;
17
17
  accessToken: string;
@@ -25,7 +25,9 @@ export declare class GithubBridge implements Bridge {
25
25
  appOctoKit: Octokit;
26
26
  constructor({ rootPath, accessToken, owner, repo, ref }: GithubManagerInit);
27
27
  private readDir;
28
+ supportsBuilding(): boolean;
28
29
  glob(pattern: string): Promise<string[]>;
29
30
  get(filepath: string): Promise<string>;
31
+ putConfig(filepath: string, data: string): Promise<void>;
30
32
  put(filepath: string, data: string): Promise<void>;
31
33
  }
@@ -0,0 +1,23 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export interface Bridge {
14
+ rootPath: string;
15
+ glob(pattern: string): Promise<string[]>;
16
+ get(filepath: string): Promise<string>;
17
+ put(filepath: string, data: string): Promise<void>;
18
+ /**
19
+ * Whether this bridge supports the ability to build the schema.
20
+ */
21
+ supportsBuilding(): boolean;
22
+ putConfig(filepath: string, data: string): Promise<void>;
23
+ }
@@ -10,43 +10,53 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
- import { Bridge } from './bridge';
13
+ import type { DocumentNode } from 'graphql';
14
+ import type { TinaSchema } from '../schema';
14
15
  import type { TinaCloudSchemaBase } from '../types';
15
- import { DocumentNode } from 'graphql';
16
+ import type { Store } from './store';
17
+ import type { Bridge } from './bridge';
16
18
  declare type CreateDatabase = {
17
- rootPath?: string;
18
- bridge?: Bridge;
19
+ bridge: Bridge;
20
+ store: Store;
19
21
  };
20
22
  export declare const createDatabase: (config: CreateDatabase) => Promise<Database>;
21
23
  export declare class Database {
22
24
  config: CreateDatabase;
23
25
  bridge: Bridge;
26
+ store: Store;
24
27
  private tinaSchema;
25
28
  private _lookup;
26
29
  private _graphql;
27
30
  private _tinaSchema;
28
31
  constructor(config: CreateDatabase);
29
32
  get: <T extends object>(filepath: string) => Promise<T>;
33
+ addPendingDocument: (filepath: string, data: {
34
+ [key: string]: unknown;
35
+ }) => Promise<void>;
30
36
  put: (filepath: string, data: {
31
37
  [key: string]: unknown;
32
38
  }) => Promise<boolean>;
39
+ stringifyFile: (filepath: string, data: {
40
+ [key: string]: unknown;
41
+ }) => Promise<{
42
+ stringifiedFile: string;
43
+ payload: {
44
+ [key: string]: unknown;
45
+ };
46
+ }>;
47
+ flush: (filepath: string) => Promise<string>;
33
48
  getLookup: (returnType: string) => Promise<LookupMapType>;
34
49
  getGraphQLSchema: () => Promise<DocumentNode>;
50
+ getGraphQLSchemaFromBridge: () => Promise<DocumentNode>;
35
51
  getTinaSchema: () => Promise<TinaCloudSchemaBase>;
36
- private getSchema;
37
- getDocument: (fullPath: unknown) => Promise<{
38
- __typename: string;
39
- id: string;
40
- data: {
41
- _collection: string;
42
- _template: string;
43
- };
44
- }>;
52
+ getSchema: () => Promise<TinaSchema>;
45
53
  documentExists: (fullpath: unknown) => Promise<boolean>;
46
- getDocumentsForCollection: (collectionName: string) => Promise<string[]>;
54
+ query: (queryStrings: string[], hydrator: any) => Promise<object[]>;
55
+ indexData: ({ graphQLSchema, tinaSchema, }: {
56
+ graphQLSchema: DocumentNode;
57
+ tinaSchema: TinaSchema;
58
+ }) => Promise<void>;
47
59
  addToLookupMap: (lookup: LookupMapType) => Promise<void>;
48
- private stringifyFile;
49
- private parseFile;
50
60
  }
51
61
  export declare type LookupMapType = GlobalDocumentLookup | CollectionDocumentLookup | MultiCollectionDocumentLookup | MultiCollectionDocumentListLookup | CollectionDocumentListLookup | UnionDataLookup | NodeDocument;
52
62
  declare type NodeDocument = {
@@ -0,0 +1,28 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { Store } from '.';
14
+ export declare class FilesystemStore implements Store {
15
+ rootPath: string;
16
+ clear(): Promise<void>;
17
+ print(): Promise<void>;
18
+ constructor({ rootPath }: {
19
+ rootPath?: string;
20
+ });
21
+ query(queryStrings: string[]): Promise<object[]>;
22
+ seed(): Promise<void>;
23
+ get<T extends object>(filepath: string): Promise<T>;
24
+ supportsSeeding(): boolean;
25
+ supportsIndexing(): boolean;
26
+ glob(pattern: string, callback: any): Promise<any[]>;
27
+ put(filepath: string, data: object): Promise<void>;
28
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import { Octokit } from '@octokit/rest';
14
+ import { Store } from '.';
15
+ export declare type GithubManagerInit = {
16
+ rootPath: string;
17
+ accessToken: string;
18
+ owner: string;
19
+ repo: string;
20
+ ref: string;
21
+ };
22
+ export declare class GithubStore implements Store {
23
+ rootPath: string;
24
+ repoConfig: Pick<GithubManagerInit, 'owner' | 'ref' | 'repo'>;
25
+ appOctoKit: Octokit;
26
+ clear(): Promise<void>;
27
+ print(): Promise<void>;
28
+ constructor({ rootPath, accessToken, owner, repo, ref }: GithubManagerInit);
29
+ query(queryStrings: string[]): Promise<object[]>;
30
+ supportsSeeding(): boolean;
31
+ seed(): Promise<void>;
32
+ private readDir;
33
+ glob(pattern: string, callback: any): Promise<any[]>;
34
+ get(filepath: string): Promise<never>;
35
+ supportsIndexing(): boolean;
36
+ put(filepath: string, data: object): Promise<void>;
37
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ export interface Store {
14
+ glob(pattern: string, hydrator?: (fullPath: string) => Promise<object>): Promise<string[]>;
15
+ get<T extends object>(filepath: string): Promise<T>;
16
+ clear(): void;
17
+ /**
18
+ *
19
+ * @param queryStrings
20
+ * Queries are currently structured as prefixed keys where that last portion
21
+ * of the key is the value provided by the query
22
+ * ```graphql
23
+ * {
24
+ * getPostsList(filter: {
25
+ * title: {
26
+ * eq: "Hello, World"
27
+ * }
28
+ * }) {
29
+ * ...
30
+ * }
31
+ * }
32
+ * ```
33
+ * Would equate to a query string of:
34
+ * ```
35
+ * __attribute__#posts#posts#title#Hello, World
36
+ * ```
37
+ * This can be used by a data store as a secondary index of sorts
38
+ *
39
+ * It's important to note that for now each query string acts as an "AND" clause,
40
+ * meaning the resulting records need to be present in _each_ query string.
41
+ *
42
+ * @param hydrator
43
+ * hydrator is an optional callback, which may be useful depending on the storage mechanism.
44
+ * For example, the in-memory storage only stores the path to its records as its value,
45
+ * but in something like DynamoDB the query strings may be used to look up the full record,
46
+ * meaning there's no need to "hydrate" the return value
47
+ */
48
+ query(queryStrings: string[], hydrator?: (fullPath: string) => Promise<object>): Promise<object[]>;
49
+ /**
50
+ * In this context, seeding is the act of putting records and indexing data into an ephemeral
51
+ * storage layer for use during the GraphQL runtime. What might seem suprising is that some stores
52
+ * don't support seeding, this is because they're behaving more like a "bridge" (GithubStore and FilesystemStore).
53
+ * Currently they're acting as a way to swap out true data-layer behavior with a backwards-compatible
54
+ * "store". In the future, all stores should be able to query and seed data.
55
+ *
56
+ * At this time it seems that it would never make sense to be able to "query" without "seed"-ing, and
57
+ * there'd be no value in "seeding" without "query"-ing.
58
+ */
59
+ seed(filepath: string, data: object, options?: {
60
+ includeTemplate?: boolean;
61
+ }): Promise<void>;
62
+ supportsSeeding(): boolean;
63
+ /**
64
+ * Whether this store supports the ability to index data.
65
+ * Indexing data requires writing arbitrary keys/values to
66
+ * the external service, so is not advisable to use for
67
+ * something like Github, which would write commits to the
68
+ * user's repo.
69
+ */
70
+ supportsIndexing(): boolean;
71
+ put(filepath: string, data: object, options?: {
72
+ includeTemplate?: boolean;
73
+ }): Promise<void>;
74
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import type { Store } from './index';
14
+ import { LevelDB } from 'level';
15
+ export declare class LevelStore implements Store {
16
+ rootPath: any;
17
+ db: LevelDB;
18
+ constructor(rootPath: string, useMemory?: boolean);
19
+ query(queryStrings: string[], hydrator: any): Promise<any[]>;
20
+ seed(filepath: string, data: object): Promise<void>;
21
+ supportsSeeding(): boolean;
22
+ supportsIndexing(): boolean;
23
+ print(): Promise<void>;
24
+ open(): Promise<void>;
25
+ clear(): Promise<void>;
26
+ glob(pattern: string, callback: any): Promise<any[]>;
27
+ get(filepath: string): Promise<any>;
28
+ put(filepath: string, data: object): Promise<void>;
29
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import type { Store } from './index';
14
+ /**
15
+ * This is the bridge from whatever datasource we need for I/O.
16
+ * The basic example here is for the filesystem, one is needed
17
+ * for Github has well.
18
+ */
19
+ export declare class MemoryStore implements Store {
20
+ rootPath: any;
21
+ db: any;
22
+ private map;
23
+ constructor(rootPath: string, object?: object);
24
+ query(queryStrings: string[], hydrator: any): Promise<any[]>;
25
+ seed(filepath: string, data: object): Promise<void>;
26
+ supportsSeeding(): boolean;
27
+ supportsIndexing(): boolean;
28
+ print(): Promise<void>;
29
+ clear(): Promise<void>;
30
+ glob(pattern: string, callback: any): Promise<any[]>;
31
+ get(filepath: string): Promise<any>;
32
+ put(filepath: string, data: object): Promise<void>;
33
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ Copyright 2021 Forestry.io Holdings, Inc.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ */
13
+ import * as yup from 'yup';
14
+ export declare const stringifyFile: (content: object, format: FormatType | string, keepTemplateKey: boolean) => string;
15
+ export declare const parseFile: <T extends object>(content: string, format: FormatType | string, yupSchema: (args: typeof yup) => yup.ObjectSchema<any>) => T;
16
+ export declare type FormatType = 'json' | 'md' | 'mdx' | 'markdown';
package/dist/index.d.ts CHANGED
@@ -10,10 +10,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
- export { GithubBridge } from './primitives/database/github';
14
- export type { GithubManagerInit } from './primitives/database/github';
15
- export { gql, resolve, buildSchema, indexDB, createDatabase, githubRoute, } from './primitives';
16
- import type { TinaCloudSchema as TinaCloudSchemaBase, TinaCloudCollection as TinaCloudCollectionBase, TinaCloudTemplateBase as TinaTemplate, TinaFieldBase } from './primitives/types';
13
+ export { indexDB } from './build';
14
+ export { resolve } from './resolve';
15
+ export { createDatabase } from './database';
16
+ export { GithubBridge } from './database/bridge/github';
17
+ export { GithubStore } from './database/store/github';
18
+ export { FilesystemBridge } from './database/bridge/filesystem';
19
+ export { FilesystemStore } from './database/store/filesystem';
20
+ export { MemoryStore } from './database/store/memory';
21
+ export { LevelStore } from './database/store/level';
22
+ export type { GithubManagerInit } from './database/bridge/github';
23
+ import type { Database } from './database';
24
+ export declare const buildSchema: (rootPath: string, database: Database) => Promise<import("graphql").GraphQLSchema>;
25
+ import type { TinaCloudSchema as TinaCloudSchemaBase, TinaCloudCollection as TinaCloudCollectionBase, TinaCloudTemplateBase as TinaTemplate, TinaFieldBase } from './types';
17
26
  export declare const listBranches: ({ auth, owner, repo }: {
18
27
  auth: any;
19
28
  owner: any;