@cto.ai/ops
Version:
💻 CTO.ai - The CLI built for Teams 🚀
48 lines (47 loc) • 2.82 kB
TypeScript
import Command, { flags } from '../base';
import { OpCommand, OpsYml, OpWorkflow, RegistryAuth, Config } from './../types';
import { OpPipeline, OpService, Ops } from './../types/OpsYml';
import { BuildOptions } from '../types/Docker';
export default class Publish extends Command {
static description: string;
static flags: flags.Input<any>;
static args: {
name: string;
description: string;
required: boolean;
}[];
resolvePath: (opPath: string) => string;
checkDocker: () => Promise<void>;
getOpsAndWorkflows: (opPath: string) => Promise<OpsYml>;
convertPipelinesToWorkflows: (pipelines: OpPipeline[], opPath: string) => {
pipelineWorkflows: OpWorkflow[];
pipelineCommands: OpCommand[];
};
choosePublishKind: (commands: OpCommand[], pipelines: OpPipeline[]) => Promise<string>;
selectOpsAndWorkflows: (commandsOrPipelines: string, commands: OpCommand[], workflows: OpWorkflow[]) => Promise<{
selectedCommands: OpCommand[];
selectedWorkflows: never[];
} | {
selectedCommands: never[];
selectedWorkflows: OpWorkflow[];
}>;
selectOps: (ops: OpCommand[]) => Promise<OpCommand[]>;
selectWorkflows: (workflows: OpWorkflow[]) => Promise<OpWorkflow[]>;
checkForExistingVersion: (name: string, version: string) => Promise<boolean>;
ensureAvailableVersion: (opPath: string, op: any, options: BuildOptions) => Promise<any>;
getMaxSemver: (versions: any) => Promise<string>;
bumpUpVersion: (teamName: string, opName: string, version: string) => Promise<string>;
filterOps: (ops: Array<OpCommand | OpPipeline | OpService>, names: Array<string>) => (OpCommand | OpPipeline | OpService)[];
getRegistryAuth: (name: string, version: string) => Promise<RegistryAuth>;
promptForChangelog: (opName: any, opVersion: any) => Promise<string>;
opsPublishLoop: (opCommands: OpCommand[], version: string, config: Config, changelog: string | undefined) => Promise<void>;
pipelineCommandsPublishLoop: (pipelineCommands: OpCommand[], version: string, config: Config) => Promise<void>;
sleep: (ms: any) => Promise<unknown>;
workflowsPublishLoop: (opWorkflows: OpWorkflow[], version: string, config: Config, changelog: string | undefined) => Promise<void>;
eventsWarning: (opsToBuild: (OpCommand | OpPipeline | OpService | OpWorkflow)[], teamName: string) => void;
sendAnalytics: (publishType: string, opOrWorkflow: OpCommand | OpWorkflow, config: Config) => void;
validateBilling: (config: Config, op: OpCommand | OpWorkflow) => Promise<void>;
_validateChangelog(input: string): true | "You need to provide a publish changelog of your workflow before continuing";
_selectOption: (ops: Ops, name: string) => Promise<Ops>;
run(): Promise<void>;
}