import { CrossbowConfiguration } from "./config"; import { CommandTrigger } from "./command.run"; import { ExternalFileInput, ExternalFile } from "./file.utils"; import { Task } from "./task.resolve"; import { CrossbowInput } from "./index"; export declare enum InputErrorTypes { InputFileNotFound, NoTasksAvailable, NoWatchersAvailable, FileNotFound, NotAFile, InvalidYaml, InvalidInput, InvalidJson, BinDirectoryNotFound, BinPathNotADirectory, EnvFileNotFound, EnvFileParseError, } export interface InputFileNotFoundError extends InputError { } export interface NoTasksAvailableError extends InputError { } export interface NoWatchersAvailableError extends InputError { } export interface InputError { type: InputErrorTypes; } export interface InputFiles { all: ExternalFileInput[]; valid: ExternalFileInput[]; invalid: ExternalFileInput[]; } export declare function locateModule(config: CrossbowConfiguration, taskName: string): ExternalFile[]; export declare function getChildTaskNames(task: Task): string[]; /** * Convert a JS object into ENV vars * eg: * var obj = { * options: { * docker: { * port: 8000 * } * } * } * -> * envifyObject(obj, 'CB', 'OPTIONS') * -> * CB_OPTIONS_DOCKER_PORT=8000 */ export declare function envifyObject(object: any, prefix: string, objectKeyName: string): any; export declare function envifyObjectPlain(object: any, prefixes: string[]): any; export declare function excludeKeys(input: any, blacklist: string[]): any; /** * Make some task context vars available as env vars * eg: * * $cb_ctx_watcheEvent_path * $cb_ctx_type * * etc... * * @param {CommandTrigger} trigger * @param ctx * @returns {any} */ export declare function getContextEnv(trigger: CommandTrigger, ctx: any): any; export declare function getCBEnv(trigger: CommandTrigger): {}; export declare function getFunctionName(fn: any): string; export declare const removeNewlines: (x: string) => string; export declare const escapeNewLines: (x: string) => string; export declare const removeTrailingNewlines: (x: string) => string; export declare function stringifyObj(incoming: any, max?: number): string; export declare function isPlainObject(val: any): boolean; export declare function isString(val: any): boolean; export declare function isFunction(val: any): boolean; export declare function isReport(report: any): boolean; export declare function isPrivateTask(taskName: string): boolean; export declare function isPublicTask(taskName: string): boolean; export declare function isParentGroupName(name: string): RegExpMatchArray; export declare function isParentRef(name: string, names: string[]): boolean; export declare function getChildItems(name: string, input: any): any; export declare function getPossibleTaskNames(input: CrossbowInput): any[]; export declare function getChildName(name: any): any; export declare function isInternal(incoming: string): boolean; export declare function isSupportedFileType(incoming: any): boolean; export declare function _e(x: any): any; export declare function __e(x: any): any; export declare function longestString(col: string[]): number; export declare function getLongestTaskName(tasks: Task[]): number; export declare function padLine(incoming: any, max?: any): any; export declare function concatProps(tasks: any, initial: string[], propname: string): string[];