UNPKG

convex

Version:

Client for the Convex Cloud

73 lines 2.67 kB
import { Bundle } from "../../bundler/index.js"; export { provisionHost, productionProvisionHost } from "./utils.js"; import { Context } from "./context.js"; /** Type representing auth configuration. */ export interface AuthInfo { applicationID: string; domain: string; } /** Type representing Convex project configuration. */ export interface ProjectConfig { project: string; team: string; prodUrl: string; functions: string; authInfo: AuthInfo[]; } export interface Config { projectConfig: ProjectConfig; modules: Bundle[]; udfServerVersion?: string; } /** Parse object to ProjectConfig. */ export declare function parseProjectConfig(obj: any): ProjectConfig; export declare function configName(): string; export declare function configFilepath(ctx: Context): Promise<string>; /** Read configuration from a local `convex.json` file. */ export declare function readProjectConfig(ctx: Context): Promise<{ projectConfig: ProjectConfig; configPath: string; }>; /** * Given an {@link ProjectConfig}, add in the bundled modules to produce the * complete config. */ export declare function configFromProjectConfig(ctx: Context, projectConfig: ProjectConfig, configPath: string, verbose: boolean): Promise<Config>; /** * Read the config from `convex.json` and bundle all the modules. */ export declare function readConfig(ctx: Context, verbose: boolean): Promise<{ config: Config; configPath: string; }>; /** Write the config to `convex.json` in the current working directory. */ export declare function writeProjectConfig(ctx: Context, projectConfig: ProjectConfig): Promise<undefined>; /** Pull configuration from the given remote origin. */ export declare function pullConfig(ctx: Context, project: string, team: string, origin: string, adminKey: string): Promise<Config>; export declare function configJSON(config: Config, adminKey: string): { config: { projectSlug: string; teamSlug: string; functions: string; authInfo: AuthInfo[]; }; modules: Bundle[]; udfServerVersion: string | undefined; adminKey: string; }; /** Push configuration to the given remote origin. */ export declare function pushConfig(ctx: Context, config: Config, adminKey: string, url: string): Promise<void>; declare type Files = { source: string; filename: string; }[]; export declare type CodegenResponse = { success: true; files: Files; } | { success: false; error: string; }; /** Generate a human-readable diff between the two configs. */ export declare function diffConfig(oldConfig: Config, newConfig: Config): string; //# sourceMappingURL=config.d.ts.map