import Command from '../base'; import { OpCommand, Config, OpWorkflow, RunCommandArgs, OpsYml } from '../types'; export interface RunInputs { parsedArgs: RunCommandArgs; teamName: string; opName: string; opVersion: string; config: Config; opsAndWorkflows: (OpCommand | OpWorkflow)[]; opOrWorkflow: OpCommand | OpWorkflow; } export default class Run extends Command { static description: string; static flags: { help: import("@oclif/parser/lib/flags").IBooleanFlag; build: import("@oclif/parser/lib/flags").IBooleanFlag; }; static strict: boolean; static args: { name: string; description: string; parse: (input: string) => string; }[]; opsAndWorkflows: (OpCommand | OpWorkflow)[]; customParse: (options: typeof Run, argv: string[]) => { args: any; flags: any; opParams: string[]; }; checkPathOpsYmlExists: (nameOrPath: string) => boolean; parseYamlFile: (relativePathToOpsYml: string) => Promise; logResolvedLocalMessage: (inputs: RunInputs) => RunInputs; getOpsAndWorkflowsFromFileSystem: (relativePathToOpsYml: string) => (inputs: RunInputs) => Promise; addMissingApiFieldsToLocalOps: (inputs: RunInputs) => Promise; filterLocalOps: (inputs: RunInputs) => RunInputs; formatOpOrWorkflowEmoji: (opOrWorkflow: OpCommand | OpWorkflow) => string; formatOpOrWorkflowName: (opOrWorkflow: OpCommand | OpWorkflow) => string; fuzzyFilterParams: () => { list: { name: string; value: OpCommand | OpWorkflow; }[]; options: { extract: (el: any) => any; }; }; autocompleteSearch: (_: Record, input?: string) => Promise<{ value: OpCommand | OpWorkflow; name: string; }[]>; selectOpOrWorkflowToRun: (inputs: RunInputs) => Promise; printCustomHelp: (op: OpCommand) => void; checkForHelpMessage: (inputs: RunInputs) => void | RunInputs; executeOpOrWorkflowService: (inputs: RunInputs) => Promise; /** * Extracts the Op Team and Name from the input argument * @cto.ai/github -> { teamName: cto.ai, opname: github, opVersion: '' } * cto.ai/github -> { teamName: cto.ai, opname: github, opVersion: '' } * github -> { teamName: '', opname: github, opVersion: '' } * @cto.ai/github:0.1.0 -> { teamName: cto.ai, opname: github, opVersion: '0.1.0' } * cto.ai/github:customVersion -> { teamName: cto.ai, opname: github, opVersion: 'customVersion' } * github:myVersion -> { teamName: '', opname: github, opVersion: 'myVersion' } * cto.ai/extra/blah -> InvalidOpName * cto.ai/extra:version1:version2 -> InvalidOpName * null -> InvalidOpName */ parseTeamOpNameVersion: (inputs: RunInputs) => { teamName: string; opName: string; opVersion: string; parsedArgs: RunCommandArgs; config: Config; opsAndWorkflows: (OpCommand | OpWorkflow)[]; opOrWorkflow: OpCommand | OpWorkflow; }; /** * Extracts the version and op name from input argument. * github -> { opName: 'github', opVersion: '' } * github:0.1.0 -> { opName: 'github', opVersion: '0.1.0' } * github:: -> InvalidOpName */ parseOpNameAndVersion: (opNameAndVersion: string) => { opName: string; opVersion: string; }; getApiOps: (inputs: RunInputs) => Promise; sendAnalytics: (inputs: RunInputs) => Promise; run(): Promise; }