1 | import { NormalizedEnvironment, SchemaPointer, Endpoint } from './config';
|
2 | import * as probot from 'probot';
|
3 | import { Source } from 'graphql';
|
4 | declare type FileLoaderConfig = {
|
5 | context: probot.Context;
|
6 | owner: string;
|
7 | repo: string;
|
8 | action: string;
|
9 | release: string;
|
10 | };
|
11 | interface FileLoaderInput {
|
12 | path: string;
|
13 | ref: string;
|
14 | alias: string;
|
15 | throwNotFound?: boolean;
|
16 | onError?: (error: any) => void;
|
17 | }
|
18 | export declare type FileLoader = (input: FileLoaderInput) => Promise<string | null>;
|
19 | export declare type ConfigLoader = () => Promise<object | null | undefined>;
|
20 | export declare function createFileLoader(config: FileLoaderConfig): FileLoader;
|
21 | export declare function createConfigLoader(config: FileLoaderConfig & {
|
22 | ref: string;
|
23 | }, loadFile: FileLoader): ConfigLoader;
|
24 | export declare function printSchemaFromEndpoint(endpoint: Endpoint): Promise<string>;
|
25 | export declare function loadSources({ config, oldPointer, newPointer, loadFile, }: {
|
26 | config: NormalizedEnvironment;
|
27 | oldPointer: SchemaPointer;
|
28 | newPointer: SchemaPointer;
|
29 | loadFile: FileLoader;
|
30 | }): Promise<{
|
31 | old: Source;
|
32 | new: Source;
|
33 | }>;
|
34 | export {};
|