UNPKG

autoforce

Version:

Developer Automation tool for Github / Gitlab and Salesforce projects.

56 lines (55 loc) 2.93 kB
import { Choice } from "prompts"; import { AnyValue, CommandOptions } from "../types/auto.js"; export declare const WORKING_FOLDER: string; export declare const PROJECT_FOLDER: string; export declare const CONFIG_FILE: string; export declare const DICTIONARY_FOLDER: string; export declare const filterJson: (fullPath: string) => boolean; export declare const filterDirectory: (fullPath: string) => boolean; export declare const filterFiles: (fullPath: string) => boolean; export declare const filterBash: (fullPath: string) => boolean; export declare const camelToText: (s: string) => string; export declare const kebabToText: (s: string) => string; export declare const snakeToText: (s: string) => string; export declare function valuesToChoices(list: string[], valueToTitle?: (value: string) => string): { value: string; title: string; }[]; export declare function titlesToChoices(list: string[], titleToValue?: (title: string) => string): { title: string; value: string; }[]; export declare function findChoicesPosition(choices: Choice[], value: string): number; export declare function getFilesInFolders(folders: string[], filter: (fullPath: string) => boolean, recursive?: boolean, ignoreList?: string[]): string[]; export declare function getModelFolders(subfolder: string): string[]; export declare function createConfigurationFile(taskName?: string, options?: CommandOptions): Promise<boolean>; export declare function getConfigFile(file: string, variable: string, defaultValue: AnyValue): any; export declare function getConfig(variable: string, defaultValue: AnyValue): any; export declare function storeConfig(record: Record<string, AnyValue>): void; export declare function sortByName(objA: { Name: string; }, objB: { Name: string; }): 0 | 1 | -1; export declare function sortByLabel(objA: { label?: string | null; }, objB: { label?: string | null; }): 0 | 1 | -1; export declare function verFecha(this: Date): string | Date; export declare function getNamesByExtension(folder: string, extension: string): string[]; export declare function splitFilename(fullname: string, defaultFolder?: string): { filename: string; folder: string; }; /** * Agrega los elementos de newArray a baseArray, si no existen previamente en baseArray. * @param {string[]} baseArray El array donde se agregan los elementos * @param {string[]} newArray El array de elementos a agregar */ export declare function addNewItems(baseArray: string[], newArray: string[]): void; export declare function searchInFolderHierarchy(element: string, parentFolder: string): string; export declare function getFiles(source: string, filter?: (file: string) => boolean, recursive?: boolean, ignoreList?: string[]): string[]; export declare function convertNameToKey(name: string): string; export declare function convertKeyToName(key: string): string; export declare function readJsonSync<T>(filename: string): T;