1 | import { PrismaDefinition } from './prisma-json-schema';
|
2 | import { Args } from './types/common';
|
3 | import { Environment } from './Environment';
|
4 | import { IOutput } from './Output';
|
5 | import { Cluster } from './Cluster';
|
6 | import { FunctionInput } from './types/rc';
|
7 | import { ParseEndpointResult } from './utils/parseEndpoint';
|
8 | export interface EnvVars {
|
9 | [key: string]: string | undefined;
|
10 | }
|
11 | export declare type HookType = 'post-deploy';
|
12 | export declare class PrismaDefinitionClass {
|
13 | definition?: PrismaDefinition;
|
14 | rawJson?: any;
|
15 | typesString?: string;
|
16 | secrets: string[] | null;
|
17 | definitionPath?: string | null;
|
18 | definitionDir: string;
|
19 | env: Environment;
|
20 | out?: IOutput;
|
21 | envVars: any;
|
22 | rawEndpoint?: string;
|
23 | private definitionString;
|
24 | constructor(env: Environment, definitionPath?: string | null, envVars?: EnvVars, out?: IOutput);
|
25 | load(args: Args, envPath?: string, graceful?: boolean): Promise<void>;
|
26 | private loadDefinition;
|
27 | get endpoint(): string | undefined;
|
28 | get clusterBaseUrl(): string | undefined;
|
29 | get service(): string | undefined;
|
30 | get stage(): string | undefined;
|
31 | get cluster(): string | undefined;
|
32 | validate(): void;
|
33 | getToken(serviceName: string, stageName: string): string | undefined;
|
34 | getCluster(_?: boolean): Promise<Cluster | undefined>;
|
35 | findClusterByBaseUrl(baseUrl: string): Cluster;
|
36 | getClusterByEndpoint(data: ParseEndpointResult): Promise<Cluster>;
|
37 | getTypesString(definition: PrismaDefinition): string;
|
38 | getClusterName(): string | null;
|
39 | getWorkspace(): string | null;
|
40 | getDeployName(): Promise<string>;
|
41 | getSubscriptions(): FunctionInput[];
|
42 | replaceEndpoint(newEndpoint: any): void;
|
43 | addDatamodel(datamodel: any): void;
|
44 | getEndpoint(serviceInput?: string, stageInput?: string): Promise<string>;
|
45 | getHooks(hookType: HookType): string[];
|
46 | }
|
47 | export declare function concatName(cluster: Cluster, name: string, workspace: string | null): string;
|