amplify-cli-core
Version:
Amplify CLI Core
69 lines • 4.87 kB
TypeScript
import { $TSMeta, $TSTeamProviderInfo, $TSAny, DeploymentSecrets, HooksConfig, $TSObject } from '..';
import { Tag } from '../tags';
import { CustomIAMPolicies } from '../customPoliciesUtils';
export type GetOptions<T> = {
throwIfNotExist?: boolean;
preserveComments?: boolean;
default?: T;
};
export type ResourceEntry = {
resourceName: string;
resource: Record<string, unknown>;
};
export declare class StateManager {
metaFileExists: (projectPath?: string) => boolean;
getMeta: (projectPath?: string, options?: GetOptions<$TSMeta>) => $TSMeta;
currentMetaFileExists: (projectPath?: string) => boolean;
setDeploymentSecrets: (deploymentSecrets: DeploymentSecrets) => void;
getCurrentMeta: (projectPath?: string, options?: GetOptions<$TSMeta>) => $TSMeta;
getDeploymentSecrets: () => DeploymentSecrets;
getProjectTags: (projectPath?: string) => Tag[];
getCurrentProjectTags: (projectPath?: string) => Tag[];
teamProviderInfoExists: (projectPath?: string) => boolean;
getTeamProviderInfo: (projectPath?: string, options?: GetOptions<$TSTeamProviderInfo>) => $TSTeamProviderInfo;
getCustomPolicies: (categoryName: string, resourceName: string) => CustomIAMPolicies;
getCurrentRegion: (projectPath?: string) => string | undefined;
getCurrentEnvName: (projectPath?: string) => string | undefined;
localEnvInfoExists: (projectPath?: string) => boolean;
getLocalEnvInfo: (projectPath?: string, options?: GetOptions<$TSAny>) => $TSAny;
localAWSInfoExists: (projectPath?: string) => boolean;
getLocalAWSInfo: (projectPath?: string, options?: GetOptions<$TSAny>) => $TSAny;
projectConfigExists: (projectPath?: string) => boolean;
getProjectConfig: (projectPath?: string, options?: GetOptions<$TSAny>) => $TSAny;
backendConfigFileExists: (projectPath?: string) => boolean;
getBackendConfig: (projectPath?: string, options?: GetOptions<$TSAny>, includeParameters?: boolean) => $TSAny;
getCurrentBackendConfig: (projectPath?: string, options?: GetOptions<$TSAny>) => $TSAny;
getProjectName: () => string;
getAppID: () => string;
getResourceParametersJson: (projectPath: string | undefined, category: string, resourceName: string, options?: GetOptions<$TSAny>) => $TSAny;
getResourceInputsJson: (projectPath: string | undefined, category: string, resourceName: string, options?: GetOptions<$TSAny>) => $TSAny;
getCurrentResourceParametersJson: (projectPath: string | undefined, category: string, resourceName: string, options?: GetOptions<$TSAny>) => $TSAny;
getAmplifyAdminConfigEntry: (appId: string, options?: GetOptions<$TSAny>) => $TSAny;
removeAmplifyAdminConfigEntry: (appId: string) => void;
setAmplifyAdminConfigEntry: (appId: string, config: $TSAny) => void;
setLocalEnvInfo: (projectPath: string | undefined, localEnvInfo: $TSAny) => void;
setLocalAWSInfo: (projectPath: string | undefined, localAWSInfo: $TSAny) => void;
getHydratedTags: (projectPath?: string | undefined, skipProjEnv?: boolean) => Tag[];
isTagFilePresent: (projectPath?: string | undefined) => boolean;
setProjectFileTags: (projectPath: string | undefined, tags: Tag[]) => void;
setProjectConfig: (projectPath: string | undefined, projectConfig: $TSAny) => void;
setTeamProviderInfo: (projectPath: string | undefined, teamProviderInfo: $TSTeamProviderInfo) => void;
setBackendConfig: (projectPath: string | undefined, backendConfig: $TSAny) => void;
setCurrentBackendConfig: (projectPath: string | undefined, backendConfig: $TSAny) => void;
setMeta: (projectPath: string | undefined, meta: $TSMeta) => void;
setCurrentMeta: (projectPath: string | undefined, meta: $TSMeta) => void;
getHooksConfigJson: (projectPath?: string) => HooksConfig;
setSampleHooksDir: (projectPath: string | undefined, sourceDirPath: string) => void;
setResourceParametersJson: (projectPath: string | undefined, category: string, resourceName: string, parameters: $TSAny) => void;
setResourceInputsJson: (projectPath: string | undefined, category: string, resourceName: string, inputs: $TSObject) => void;
resourceInputsJsonExists: (projectPath: string | undefined, category: string, resourceName: string) => boolean;
cliJSONFileExists: (projectPath: string, env?: string) => boolean;
getCLIJSON: (projectPath: string, env?: string, options?: GetOptions<$TSAny>) => $TSAny;
setCLIJSON: (projectPath: string, cliJSON: $TSAny, env?: string) => void;
getResourceFromMeta: (amplifyMeta: Record<string, $TSAny>, categoryName: string, serviceName: string, resourceName?: string | undefined, throwIfNotExist?: boolean) => ResourceEntry | null;
private filterResourcesFromMeta;
private doesExist;
private getData;
}
export declare const stateManager: StateManager;
//# sourceMappingURL=stateManager.d.ts.map