UNPKG

@adinsure-ops/ops-cli

Version:

Operations CLI for working with AdInsure

59 lines (58 loc) 2.83 kB
import { AxiosResponse } from 'axios'; import semver from 'semver'; import CommandBase from '../command.base.js'; type ReleaseType = semver.ReleaseType | 'new'; export default class Version extends CommandBase<typeof Version> { static description: string; static usage: string; static examples: string[]; static args: { type: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>; }; static flags: { independent: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; 'script-prefix': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; 'no-deps': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; 'no-script': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>; 'only-npm-packages': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; 'exclude-dir': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>; }; /** * Update NPM packages with wsrun * @param type Release type of NPM package * @param version Version * @param filter Regular Expression filter for packages * @param excludeDirs Excluded directories * @returns {Promise<void>} Void */ bumpNpm(type: ReleaseType, version: string, filter: string, excludeDirs: string[] | undefined): Promise<string[]>; /** * Validate args and flags */ validateOptions(args: any, flags: any): boolean; /** * Update dependencies in package.json files for @adinsure packages * @param version Version * @param updatedPackages Array of updated packages * @returns {void} */ updateDependencies(version: string, updatedPackages: Array<string>): Promise<void>; insertScriptRequest(token: string, version: string, prefix: string): Promise<AxiosResponse<any, any>>; insertScript(token: string, version: string, prefix: string, skip?: boolean): Promise<void>; /** * Check if version has valid prerelease as 'rc' or '201910' (year month) * @param version Version * @param month Month of release * @returns {boolean} True or false */ checkPrerelease(version: string, month: string): boolean; /** * Write new version in VERSION file * @param version The new version * @returns {void} */ setVersion(version: string): Promise<void>; run(): Promise<undefined>; } export {};