import { DEFAULT_BRANCH, ExportViewMode } from "@superblocksteam/shared"; import type { LocalGitRepoState, SuperblocksMonorepoConfig, VersionedResourceConfig, ApiInfo, ApiWrapper } from "@superblocksteam/util"; import type { ApplicationWrapper, MultiPageApplicationWrapper, TypedMultiPageApplicationWrapper, CodeModeApplicationWrapper } from "./client.js"; import type { FeatureFlags } from "./flag.js"; import type { SuperblocksSdk } from "./sdk.js"; export { DEFAULT_BRANCH }; export declare const DRAFT_MODE = "draft"; export declare const modeFlagValuesMap: Record; export declare enum FileStructureType { SINGLE_PAGE = "single-page", MULTI_PAGE = "multi-page" } export type ModeFlag = (keyof typeof modeFlagValuesMap)[number]; export declare const SELECT_PROMPT_HELP = "Use \u2191/\u2193 arrow keys, Enter to confirm"; export declare const MULTI_SELECT_PROMPT_HELP = "Type to filter, Use \u2191/\u2193 arrow keys, Space to select, Enter to confirm"; export declare const atLeastOneSelection: (value: string[]) => string | true; export type ApiRepresentation = { extractLargeSourceFiles: boolean; minLinesForExtraction: number; }; export declare function getFileStructureType(rootPath: string, existingRelativeLocation: string): Promise; export declare function readApplicationFromDisk(rootPath: string, existingRelativeLocation: string): Promise; export declare function readMultiPageApplicationFromDisk(rootPath: string, existingRelativeLocation: string): Promise; export declare function readApiFromDisk(rootPath: string, existingRelativeLocation: string): Promise; export declare function writeResourceToDisk(resourceType: string, resourceId: string, resource: any, rootPath: string, featureFlags: FeatureFlags, existingRelativeLocation?: string, preferredApiRepresentation?: ApiRepresentation): Promise; export declare function writeApplicationToDisk({ sdk, resource, projectRootFolder, appRelativePath, directoryContentsHash, branch, featureFlags, migrateFromSinglePage, preferredApiRepresentation, }: { sdk: SuperblocksSdk; resource: TypedMultiPageApplicationWrapper | CodeModeApplicationWrapper; projectRootFolder: string; appRelativePath?: string; directoryContentsHash?: string; branch?: string; featureFlags: FeatureFlags; migrateFromSinglePage?: boolean; preferredApiRepresentation?: ApiRepresentation; }): Promise; export declare function addExistingFilePathsForApi(api: ApiInfo, location: string, paths: Set, useNestedFolder: boolean): Set; export declare function removeResourceFromDisk(rootPath: string, resourceRelativeLocation: string): Promise; export declare function getMode(task: any, mode: ModeFlag): Promise; export declare function sortByKey(obj: unknown): unknown; export declare function getLocalGitRepoState(overrideLocalBranch?: string): Promise; /** * Returns the root directory of the git repository, or null if not in a git repo */ export declare function findGitRepositoryRoot(): Promise; /** * Returns the current git branch, or undefined if not in a git repo */ export declare function getCurrentGitBranchIfGit(): Promise; /** * Returns the current git branch, or throws if not in a git repo */ export declare function getCurrentGitBranch(): Promise; export declare function getHeadCommit(branch: string): Promise<[string, string]>; export declare function isCI(): boolean; export declare function isGitRepoDirty(): Promise; export declare function extractApiName(api: ApiWrapper): string; export declare function writeAppApi(api: ApiWrapper, directoryPath: string, existingFilePaths: Set, apiPromises: Array>, apiRepresentation?: ApiRepresentation): Promise; export declare function validateLocalResource(superblocksRootPath: string, resource: VersionedResourceConfig): Promise; export declare function deleteResourcesAndUpdateRootConfig(removedResourceIds: string[], existingSuperblocksRootConfig: SuperblocksMonorepoConfig, superblocksRootPath: string, superblocksRootConfigPath: string): Promise; //# sourceMappingURL=version-control.d.mts.map