autoforce
Version:
Developer Automation tool for Github / Gitlab and Salesforce projects.
120 lines (119 loc) • 4.44 kB
TypeScript
import prompts from "prompts";
import type { PromptChoices } from "../types/helpers/context.js";
import type { IProcessHeader, Processes, AnyValue, IProcessInfo, ObjectRecord, IObjectRecord } from "../types/auto.js";
import type { TaskArguments, TaskArgument, StepArguments } from "../types/helpers/tasks.js";
export declare enum GitServices {
GitHub = "github",
GitLab = "gitlab",
None = "none"
}
export declare enum ListFilters {
Mios = "mios",
PorMilestone = "milestone",
PorLabel = "label"
}
export declare enum ProjectServices {
GitHub = "github",
GitLab = "gitlab",
Jira = "Jira",
None = "none"
}
declare class Context implements IObjectRecord {
[s: string]: AnyValue | undefined;
devModel: string | undefined;
gitModel: string | undefined;
docModel: string | undefined;
errorMessage: string;
projectPath: string;
projectModel: string | undefined;
gitServices: GitServices;
isGitApi: boolean;
gitApi: IGitApi | undefined;
version: string | undefined;
options: Record<string, AnyValue>;
projectServices: ProjectServices;
isProjectApi: boolean;
projectApi: IProjectApi | undefined;
sfInstalled: boolean;
sfToken: boolean;
branchName: string | undefined;
issueNumber: string | undefined;
issueType: string | undefined;
_dictionaryFolder: string | undefined;
_process: string | undefined;
_processesHeader: Record<string, IProcessHeader> | undefined;
_newIssueNumber: string | undefined;
_newIssueType: string | undefined;
newBranchName: string | undefined;
defaultDias: number;
permissionSet: string | undefined;
issueTitle: string | undefined;
isVerbose: boolean;
_scratch: OrganizationInfo | undefined;
_branchScratch: OrganizationInfo | undefined;
existNewBranch: boolean;
_targetOrg: string | undefined;
processes: Processes | undefined;
salida: string;
repositoryUrl: string | undefined;
repositoryType: string | undefined;
repositoryOwner: string | undefined;
repositoryRepo: string | undefined;
projectId: string | undefined;
backlogColumn: string;
listFilter: ListFilters;
listTemplate: string;
constructor();
labels(): Promise<prompts.Choice[]>;
listFilters(): prompts.Choice[];
milestoneNumbers(): Promise<prompts.Choice[]>;
milestones(): Promise<prompts.Choice[]>;
loadProjectApi(): void;
loadGitApi(): void;
loadPackage(): void;
createConfig(): Promise<boolean | undefined>;
loadConfig(): true | undefined;
init(): void;
get targetOrg(): string;
get existBranchScratch(): boolean;
get branchScratch(): OrganizationInfo | undefined;
getProcessHeader(fullpath: string): {
[key: string]: any;
};
addProcessMetadata(component: string, items: string[]): void;
set dictionaryFolder(value: string);
get dictionaryFolder(): string;
get processesHeader(): Record<string, IProcessHeader>;
getProcessMetadata(): IProcessInfo[];
modulesFolders(): PromptChoices;
get existScratch(): boolean;
get scratch(): OrganizationInfo;
validate(guards: string[]): Promise<void>;
issueFromBranch(branchName: string): void;
branchNameFromIssue(issueType: string, issueNumber: string, title?: string): string;
get isDevelopment(): boolean;
get isNewDevelopment(): boolean;
get newIssueNumber(): string | undefined;
set newIssueNumber(value: string | undefined);
get newIssueType(): string | undefined;
set newIssueType(value: string | undefined);
setNewBranchName(): void;
askFornewBranchName(): Promise<string | undefined>;
askFornewIssueNumber(): Promise<any>;
set process(value: string | undefined);
getProcessFromTitle(title: string): string | undefined;
get process(): string | undefined;
askForprocess(): Promise<any>;
askFornewIssueType(): Promise<any>;
convertToArrayOfInputs(inputs: TaskArguments): Promise<TaskArgument[]>;
askForExit(): Promise<void>;
mergeArgs(args: StepArguments): StepArguments;
askForArguments(inputs: TaskArguments): Promise<void>;
setObject(obj: ObjectRecord): void;
set(key: keyof IObjectRecord, value: AnyValue): void;
get(key: string): Promise<AnyValue>;
merge(text?: string): string;
}
declare const context: Context;
export declare function initializeContext(): void;
export default context;