import * as yaml from 'yaml'; import Command from '../base'; import { Container, InitParams, InitPaths, Question } from '../types'; import { OpTypes } from '../constants/opConfig'; export default class Init extends Command { static description: string; static flags: { help: import("@oclif/parser/lib/flags").IBooleanFlag; }; questions: object[]; srcDir: string; destDir: string; initPrompts: Container; determineTemplate: (prompts: Container>>) => Promise<{ prompts: Container>>; templates: OpTypes[] | undefined; }>; determineQuestions: ({ prompts, templates, }: { prompts: Container>>; templates: OpTypes[]; }) => { questions: Question>[]; templates: OpTypes[]; }; askQuestions: ({ questions, templates, }: { questions: Question>[]; templates: OpTypes[]; }) => Promise<{ answers: Partial; templates: OpTypes[]; }>; determineInitPaths: ({ answers, templates, }: { answers: Partial; templates: OpTypes[]; }) => { initPaths: { sharedDir: string; destDir: string; }; initParams: { templates: OpTypes[]; commandName?: string | undefined; commandDescription?: string | undefined; commandVersion?: string | undefined; workflowName?: string | undefined; workflowDescription?: string | undefined; workflowVersion?: string | undefined; help?: void | undefined; }; }; copyTemplateFiles: ({ initPaths, initParams, }: { initPaths: InitPaths; initParams: InitParams; }) => Promise<{ initPaths: InitPaths; initParams: InitParams; }>; customizePackageJson: ({ initPaths, initParams, }: { initPaths: InitPaths; initParams: InitParams; }) => Promise<{ initPaths: InitPaths; initParams: InitParams; }>; customizeYaml: ({ initPaths, initParams, }: { initPaths: InitPaths; initParams: InitParams; }) => Promise<{ initPaths: InitPaths; initParams: InitParams; }>; addHelpCommentsFor: (key: string, yamlDoc: yaml.ast.Document) => void; customizeOpsYaml: (initParams: InitParams, yamlDoc: yaml.ast.Document) => Promise; customizeWorkflowYaml: (initParams: InitParams, yamlDoc: yaml.ast.Document) => Promise; logMessages: ({ initPaths, initParams, }: { initPaths: InitPaths; initParams: InitParams; }) => Promise<{ initPaths: InitPaths; initParams: InitParams; }>; logCommandMessage: (initParams: InitParams) => void; logWorkflowMessage: (initParams: InitParams) => void; logSuccessMessage: (templates: OpTypes[]) => void; sendAnalytics: ({ initPaths, initParams, }: { initPaths: InitPaths; initParams: InitParams; }) => Promise<{ initPaths: InitPaths; initParams: InitParams; }>; getNameAndDescription: (initParams: Partial) => { name: string | undefined; description: string | undefined; }; _validateName(input: string): true | "You need name your op before you can continue" | "Sorry, please name the Op using only numbers, letters, -, or _"; _validateDescription(input: string): true | "You need to provide a description of your op before continuing"; private _validateVersion; run(): Promise; }