import { VipSemverReleaseType } from './browser.cjs'; export { Alphabet, DateFormatTemplate, JsonRecord, LoggerOptions, NextVersion, VipColor, VipConsole, VipConsoleLogLevel, VipDayjs, VipDocSite, VipLodash, VipLogger, VipLoggerOptions, VipNanoId, VipQs, VipReleaseType, VipSemver, VipSymbols, VipYaml, prereleaseTypes, releaseTypes, vipDataTransform, vipDayjs, vipDocSite, vipLodash, vipLogger, vipNanoId, vipQs } from './browser.cjs'; import { GitInfo, GitCommit } from './enums/index.cjs'; export { CliCommandBaseOptions, CpuArchitectureEnum, GitGeneralBranch, HttpMethod, HttpStatus, ProcessExitCodeEnum, RegistryAddressEnum, ReleaseVersionTypeEnum, TimeDurationMs, TimeDurationSec } from './enums/index.cjs'; import * as childProcess from 'node:child_process'; import { PathLike } from 'node:fs'; import { Command as Command$1 } from 'commander'; import { OptionsSync } from 'cosmiconfig'; import { Separator } from '@inquirer/prompts'; import 'ansi-colors'; import 'dayjs'; import 'lodash'; import 'qs'; import 'semver'; import 'js-yaml'; type Command = string | string[]; /** * 标准执行器响应结果 */ interface StandardExecutorResponse { code: number | null; stdout: string; stderr: string; } interface CommandResponse extends StandardExecutorResponse { error?: Error; command: string; } /** * 异步执行命令,并返回结果 */ declare function execCommand(cmd: Command, opts?: Omit): Promise; /** * 标准Linux命令执行器 * - 支持打印结果 * - 异步 */ declare function commandStandardExecutor(cmd: Command): Promise; declare function execCommandSync(cmd: string, cwd?: string): string; interface ShellCommand { command: string; description?: string; } /** * 脚本执行器,执行shell命令 */ declare function execShell(commands: string | ShellCommand | ShellCommand[]): Promise; /** * 获取命令执行的trim操作后的结果 */ declare function getCommandTrimResponse(command: string): Promise; /** * 执行器 */ declare const VipExecutor: { execCommandSync: typeof execCommandSync; execCommand: typeof execCommand; execShell: typeof execShell; commandStandardExecutor: typeof commandStandardExecutor; getCommandTrimResponse: typeof getCommandTrimResponse; }; interface DockerOptions { logger?: boolean; } /** * 构建镜像 */ interface BuildImageDockerOptions extends DockerOptions { imageName: string; buildArgs?: [string, number | boolean | string][]; delete?: boolean; push?: boolean; target?: string; memory?: number; platform?: string; progress?: 'plain' | 'auto' | boolean; } interface UserLoginDockerOptions extends DockerOptions { username: string; password: string; registry?: string; } /** * 创建容器 */ interface CreateContainerOptions extends DockerOptions { containerName: string; imageName: string; port: Array<[number, number]>; networkName?: string; ip?: string; } interface CreateNetworkOptions extends DockerOptions { networkName: string; subnet?: string; gateway?: string; } /** * docker命令的通用执行器 */ declare function scriptExecutor(command: string): Promise; /** * 判断是否存在镜像 */ declare function isExistImage(imageName: string): Promise; /** * 删除Docker镜像 */ declare function deleteImage(imageName: string): Promise; /** * 删除虚悬镜像 */ declare function deletePruneImages(): Promise; /** * 列出虚线镜像 */ declare function listPruneImages(): Promise; /** * 判断容器是否存在 */ declare function isExistContainer(containerName: string): Promise; /** * 用户登录 */ declare function userLogin$1(args: UserLoginDockerOptions): Promise; /** * 删除容器 */ declare function deleteContainer(containerName: string): Promise; /** * 强制删除容器,同时删除镜像 */ declare function deleteForceContainer(containerName: string): Promise; /** * 基于容器名获取镜像地址 */ declare function getImageAddress(containerName: string): Promise; /** * 是否安装docker */ declare function isExistDocker(args?: DockerOptions): Promise; /** * 是否安装docker-compose */ declare function isExistDockerCompose(args?: DockerOptions): Promise; /** * 推送Docker镜像到指定仓库 */ declare function pushImage(imageName: string): Promise; declare function pullImage(imageAddress: string): Promise; /** * 构建Docker镜像 * - 根据tag标记,推送到远程仓库 * - 推送完成后,删除本地镜像 */ declare function buildImage(args: BuildImageDockerOptions): Promise; /** * 创建容器 */ declare function createContainer(args: CreateContainerOptions): Promise; /** * 查询所有容器 */ declare function listContainer(): Promise; /** * 查看正在运行的容器 */ declare function listRunningContainer(): Promise; /** * 列出所有正在运行的容器名称 */ declare function listContainerNames(): Promise; /** * 列出所有正在运行的容器名称 */ declare function listRunningContainerNames(): Promise; /** * 列出所有未运行的容器名称 */ declare function listNoRunningContainerNames(): Promise; /** * 列出所有容器名称、状态 */ declare function listContainerStatus(): Promise<{ name: string; running: boolean; }[]>; /** * 判断网络是否存在 */ declare function isExistNetwork(networkName: string): Promise; /** * 列举出所有的网络名称 */ declare function listNetworkNames(): Promise; /** * 创建网络 */ declare function createNetwork(options: CreateNetworkOptions): Promise; /** * docker工具 */ declare const VipDocker: { isExistDocker: typeof isExistDocker; isExistDockerCompose: typeof isExistDockerCompose; isExistImage: typeof isExistImage; isExistContainer: typeof isExistContainer; deleteImage: typeof deleteImage; deletePruneImages: typeof deletePruneImages; deleteContainer: typeof deleteContainer; pullImage: typeof pullImage; pushImage: typeof pushImage; buildImage: typeof buildImage; listPruneImages: typeof listPruneImages; getImageAddress: typeof getImageAddress; createContainer: typeof createContainer; listContainer: typeof listContainer; listRunningContainer: typeof listRunningContainer; deleteForceContainer: typeof deleteForceContainer; userLogin: typeof userLogin$1; listContainerStatus: typeof listContainerStatus; listContainerNames: typeof listContainerNames; listRunningContainerNames: typeof listRunningContainerNames; listNoRunningContainerNames: typeof listNoRunningContainerNames; createNetwork: typeof createNetwork; listNetworkNames: typeof listNetworkNames; isExistNetwork: typeof isExistNetwork; scriptExecutor: typeof scriptExecutor; }; /** * 获取某个分支上的commit日志 */ declare function getCommitLogs(latestTag: string, branch?: string): string[]; /** * 获取分支最近的一次GitTag标记到Head标记之间的git commit信息 */ declare function getRecentCommitsByScope(gitScope: string): string[]; /** * 获取最近一次Git提交信息【包含merge信息】 * - 短哈希值 * - 提交信息 */ declare function getRecentCommit(): GitInfo; /** * 获取最近一次提交的完整哈希值 */ declare function getRecentCommitHash(): string; /** * 获取最近一次提交的短哈希值 */ declare function getRecentCommitShortHash(): string; /** * 获取github仓库 */ declare function getGitHubRepo(baseUrl: string): string; /** * 获取当前分支 */ declare function getCurrentBranch(): string; /** * 判断仓库是否克隆太浅 */ declare function isRepoShallow(): boolean; /** * 获取所有tag标签 */ declare function getTags(): string[]; /** * 获取指向当前提交(HEAD)的所有标签 */ declare function getTagInHead(): string | null; /** * 获取最近一次tag标签 */ declare function getLastMatchingTag(inputTag: string): string | undefined; /** * 是否预发布 */ declare function isPrerelease(version: string): boolean; /** * 提交操作 */ declare function execCommit(args: string[]): void; /** * 标签操作 */ declare function execTag(args: string[]): void; /** * 推送操作 * - 推送分支 * - 推送tag标签 --tags */ declare function execPush(args: string[]): void; /** * 列出所有的remote信息 */ declare function getRemoteNames(): string[]; /** * git emoji表情转换 * 参考:https://www.npmjs.com/package/convert-gitmoji */ declare function convertEmoji(content: string, withSpace?: boolean | 'leading' | 'trailing' | 'both'): string; /** * 获取commit信息 * - 去除空行 */ declare function getCommitTrimMsg(): string; /** * 获取commit信息中的第一行内容 * - 去除空行 * - 去除换行符 */ declare function getCommitFirstLineMsg(): string; /** * 解析Git提交信息 */ declare function parseCommitMsg(message: string): GitCommit | null; /** * 检测当前分支,是否允许操作的分支,默认:main|next|master */ declare function validateBranch(allowBranch?: string | string[]): void; /** * Git业务相关 */ declare const VipGit: { getRecentCommit: typeof getRecentCommit; getRecentCommitHash: typeof getRecentCommitHash; getRecentCommitShortHash: typeof getRecentCommitShortHash; getCommitLogs: typeof getCommitLogs; getRecentCommitsByScope: typeof getRecentCommitsByScope; getGitHubRepo: typeof getGitHubRepo; getCurrentBranch: typeof getCurrentBranch; isRepoShallow: typeof isRepoShallow; getTags: typeof getTags; getTagInHead: typeof getTagInHead; getLastMatchingTag: typeof getLastMatchingTag; isPrerelease: typeof isPrerelease; execCommit: typeof execCommit; execTag: typeof execTag; execPush: typeof execPush; convertEmoji: typeof convertEmoji; getCommitTrimMsg: typeof getCommitTrimMsg; getCommitFirstLineMsg: typeof getCommitFirstLineMsg; parseCommitMsg: typeof parseCommitMsg; getRemoteNames: typeof getRemoteNames; validateBranch: typeof validateBranch; }; interface VipCommanderDetailOptions { command: string; aliases: string[]; summary: string; description: string; } interface VipCommanderOptions { /** * 试运行 */ dryRun?: boolean; /** * 142vip 组织专用功能,用户标记是否用于142vip组织的项目 */ vip?: boolean; /** * 是否开启日志追踪模式,打印重要执行日志 */ trace?: boolean; /** * 是否开启帮助模式,打印帮助信息 */ help?: boolean; } type VipCommanderDetailRecord = Record; /** * 终端交互 * 参考:https://www.npmjs.com/package/commander */ declare class VipCommander extends Command$1 { constructor(name: string, version: string, description?: string); /** * 初始化,不包括命令 */ init(options: Pick, args?: VipCommanderOptions): Command$1; /** * 对命令初始化,增加aliases,summary,description等信息 * - 增加默认的一些参数 */ initCommand(options: VipCommanderDetailOptions, args?: VipCommanderOptions): Command$1; /** * 初始化参数 */ private initOptions; } /** * 配置加载 */ declare class VipConfig { /** * 加载配置 * - 本地配置,形如:xxx.config.ts * - 包配置,package.json中的xxx字段 */ loadCliConfig(configName: string, defaultValue: any, cosmiconfigOptions?: Partial): T; /** * 加载cli配置 * @param configName * @param cosmiconfigOptions */ loadConfig(configName: string, cosmiconfigOptions?: Partial): T | undefined; /** * 合并配置 * @param cliConfig cli自定义配置 * @param commanderConfig 用户在cli终端输入的配置 */ mergeCommanderConfig(cliConfig: Partial, commanderConfig: Partial): T; /** * 合并配置,后面配置覆盖前面的 * @private */ private mergeConfig; } declare const vipConfig: VipConfig; interface DetectIndent { type?: string; amount: number; indent: string; } interface Address { local?: string; ip?: string; ipv6?: string; mac?: string; } declare class VipDetect { /** * 检测端口 */ detectPort(port: number): Promise; detectIndent(str: string): DetectIndent; detectNewLine(str: string): "\n" | "\r\n" | undefined; /** * 获取地址 */ getAddress(): Promise
; } declare const vipDetect: VipDetect; /** * 参考: * - https://www.npmjs.com/package/inquirer#answers * - https://github.com/SBoudrias/Inquirer.js * - inquirer@8 兼容commonjs */ interface VipInquirerChoice { value: T; name?: string; description?: string; short?: string; checked?: boolean; disabled?: boolean | string; } type VipInquirerChoiceList = Array>; interface VipInquirerOptions { default?: string; pageSize?: number; loop?: false; } type SearchSourceResponse = (string | VipInquirerSeparator)[] | readonly (Separator | VipInquirerChoice)[] | Promise<(string | VipInquirerSeparator)[]> | Promise<(VipInquirerSeparator | VipInquirerChoice)[]>; /** * 搜索源 */ type SearchSource = (term: string | undefined, opt: { signal: AbortSignal; }) => SearchSourceResponse; /** * 简单搜索源 */ type SimpleSearchSource = (input: T | undefined) => SearchSourceResponse; /** * 输入框,只输入数字 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/number */ declare function promptNumber(message: string, defaultValue?: number): Promise; /** * 终端交互选择,单选 */ declare function promptList(message: string, choices: VipInquirerChoiceList): Promise; /** * 终端交互输入,输入框,可选 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/input */ declare function promptInput(message: string, defaultValue?: string): Promise; /** * 终端交互输入,输入框,必填 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/input */ declare function promptInputRequired(message: string): Promise; /** * 输入框,隐藏输入 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/password */ declare function promptPassword(message: string): Promise; /** * 选择框,必选选择框 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/select */ declare function promptSelect(message: string, choices: VipInquirerChoiceList | string[], options?: VipInquirerOptions): Promise; /** * 终端交互选择,多选 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/checkbox */ declare function promptCheckBox(message: string, choices: VipInquirerChoiceList | string[], options?: VipInquirerOptions): Promise; /** * 终端交互确认,确认框,可配置默认值 */ declare function promptConfirm(message: string, defaultValue?: boolean): Promise; /** * 终端交互确认,支持安全退出、自定义信息 */ declare function promptConfirmWithSuccessExit(message: string, { exitMsg, defaultValue }: { exitMsg?: string; defaultValue?: boolean; }): Promise; /** * 搜索框 * - https://github.com/SBoudrias/Inquirer.js/tree/main/packages/search */ declare function promptSearch(message: string, source: SearchSource, pageSize?: number): Promise; /** * 搜索源简单处理 */ declare function handleSimpleSearchSource(sources: string[]): SimpleSearchSource; /** * 终端交互 */ declare const VipInquirer: { promptList: typeof promptList; promptInput: typeof promptInput; promptInputRequired: typeof promptInputRequired; promptNumber: typeof promptNumber; promptPassword: typeof promptPassword; promptSelect: typeof promptSelect; promptCheckBox: typeof promptCheckBox; promptConfirm: typeof promptConfirm; promptConfirmWithSuccessExit: typeof promptConfirmWithSuccessExit; promptSearch: typeof promptSearch; handleSimpleSearchSource: typeof handleSimpleSearchSource; }; /** * 分隔符 */ declare class VipInquirerSeparator extends Separator { } /** * option数组参数解析器,支持传多个 */ declare function VipInquirerDefaultArrayParser(value: string, previous: string[]): string[]; /** * json克隆复制 * 参考:https://www.npmjs.com/package/klona */ declare function clone(json: T): T; /** * JSON序列化 */ declare function stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; /** * 解析JSON串 */ declare function parse(originData: string | undefined | null, defaultData: Partial): T; interface JSONFile { path: string; data: PackageJSONMainFest; indent: string; newline: string | undefined; } /** * Reads a JSON file and returns the parsed data. */ declare function readFile(name: string, cwd: string): JSONFile; /** * Writes the given data to the specified JSON file. */ declare function writeFile(file: JSONFile): void; /** * 处理JSON */ declare const VipJSON: { clone: typeof clone; stringify: typeof stringify; parse: typeof parse; readFile: typeof readFile; writeFile: typeof writeFile; }; /** * 获取 package.json 路径。 * - 找不到文件时直接退出,保持现有行为不变。 */ declare function getPackagePath(cwd?: string): string; /** * 执行脚本 */ declare function runScript(scriptName: string, cwd?: string): Promise; /** * 判断package.json文件中是否存在指定的脚本 */ declare function hasScript(packageJSON: PackageJSONMainFest, script: string): boolean; /** * 读取package.json文件,获取version字段 */ declare function getCurrentVersion(cwd?: string): string | null; /** * 获取仓库Version对应的tag * - 优先从package.json中获取version * - version对应的tag不存在时,再从git记录中获取最新tag */ declare function getVersionGitTag(): string | null; /** * 基于当前版本,生成新的version */ declare function getReleaseVersion(currentVersion: string, releaseType: VipSemverReleaseType): string | null; /** * 提供选择框,支持用户自动选择version */ declare function promptReleaseVersion(currentVersion: string, preid?: string): Promise; /** * 增加或替换JSON数据 * - add 增加key、value * - replace 替换某个key的值 */ declare function replaceOrAddToJSON(json: Record, cwd?: string): void; /** * 更新package.json中的version字段 */ declare function updateVersion(newVersion: string, cwd?: string): void; /** * 获取package.json信息 */ declare function getPackageJSON(cwd?: string): T & PackageJSONMainFest; /** * 判断package.json是否存在,存在则返回绝对路径 */ declare function isExistPackageJSON(cwd?: string): boolean; /** * 判断package-lock.json是否存在 */ declare function isExistPackageLock(cwd?: string): boolean; /** * 判断是否存在pnpm-lock.yaml文件 */ declare function isExistPnpmLock(cwd?: string): boolean; /** * 判断是否为package.json读取的JSON对象 * - name|version | description 必须存在一个 */ declare function isPackageJSON(packageJSON: PackageJSONMainFest): boolean; declare function getPkgRedLabel(pkgName: string): string; declare function getPkgGreenLabel(pkgName: string): string; /** * 获取port字段,默认3000 * @param cwd */ declare function getPort(cwd?: string): number; interface PackageJSON { name: string; version: string; private: boolean; } interface PackageJSONWithPath extends PackageJSON { path: string; } interface PackageJSONMainFest extends PackageJSON { [key: string]: unknown; } /** * package.json处理 */ declare const VipPackageJSON: { runScript: typeof runScript; hasScript: typeof hasScript; getCurrentVersion: typeof getCurrentVersion; getVersionGitTag: typeof getVersionGitTag; getReleaseVersion: typeof getReleaseVersion; promptReleaseVersion: typeof promptReleaseVersion; getPackagePath: typeof getPackagePath; isExistPackageJSON: typeof isExistPackageJSON; isPackageJSON: typeof isPackageJSON; isExistPackageLock: typeof isExistPackageLock; isExistPnpmLock: typeof isExistPnpmLock; replaceOrAddToJSON: typeof replaceOrAddToJSON; getPackageJSON: typeof getPackageJSON; getPkgRedLabel: typeof getPkgRedLabel; getPkgGreenLabel: typeof getPkgGreenLabel; updateVersion: typeof updateVersion; getPort: typeof getPort; }; /** * 获取monorepo下所有包的package.json,返回所有包的路径列表 */ declare function getPackageJSONPathList(): string[]; /** * 获取发布的包名 * 参考: * - pnpm 命令: https://pnpm.io/cli/list * - filter参数: https://pnpm.io/filtering */ declare function getReleasePkgJSON(filter?: string | string[]): PackageJSONWithPath[]; /** * 获取某个包的PkgJSON信息 */ declare function getPkgJSONPath(pkgName: string, filter?: string | string[]): PackageJSONWithPath | undefined; /** * 获取所有包名 * - 仅仅支持pnpm * 参考命令:`pnpm ls --json --only-projects ${filter} --depth -1` */ declare function getPkgNames(filter?: string | string[]): string[]; declare const VipMonorepo: { getPackageJSONPathList: typeof getPackageJSONPathList; getPkgNames: typeof getPkgNames; getReleasePkgJSON: typeof getReleasePkgJSON; getPkgJSONPath: typeof getPkgJSONPath; }; declare function getProcess(): NodeJS.Process; /** * 获取环境变量 */ declare function getEnv(): NodeJS.ProcessEnv; /** * 进程参数 */ declare function getProcessArgv(): string[]; /** * 进程第一个参数 */ declare function getProcessFirstArgv(): string; /** * 根据索引获取进程参数 * node process-args.js one two=three four * Would generate the output: * 0: /usr/local/bin/node * 1: /Users/xxx/work/node/process-args.js * 2: one * 3: two=three * 4: fou */ declare function getProcessArgvByIndex(index: number): string | null; /** * 进程环境变量 */ declare function getProcessEnv(key: string): string | undefined; /** * 设置当前京城环境变量 * @param key 键 * @param value 值 */ declare function setProcessEnv(key: string, value: string): void; /** * 进程平台 */ declare function getProcessPlatform(): NodeJS.Platform; /** * 进程工作目录 */ declare function getProcessCwd(): string; /** * 进程版本信息 */ declare function getProcessVersions(): NodeJS.ProcessVersions; /** * CPU 架构 */ declare function getCPUArch(): NodeJS.Architecture; /** * 路径拼接 * - path.join() */ declare function pathJoin(...paths: string[]): string; declare function pathDirname(dirPath: string): string; /** * 路径扩展名 */ declare function pathExtname(path: string): string; /** * 进程退出 */ declare function exitProcess(exitCode?: number): void; /** * 正常退出进程,退出码为0,异常无法捕获 */ declare function existSuccessProcess(): void; /** * 异常退出进程,错误码为1 */ declare function existErrorProcess(): void; /** * 路径是否存在 */ declare function existPath(path: PathLike): boolean; /** * 是否存在文件 */ declare function isExistFile(name: string, cwd?: string): boolean; /** * 目录是否存在 */ declare function isExistDir(name: string, cwd?: string): boolean; /** * 是否为目录 */ declare function isDirectory(path: PathLike): boolean; /** * 读文件 */ declare function readFileToStrByUTF8(filePath: PathLike): string; /** * 读取目录 * @param path * @param options */ declare function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false | undefined; recursive?: boolean | undefined; } | BufferEncoding | null): string[]; /** * 写文件 */ declare function writeFileByUTF8(filePath: PathLike, data: string | NodeJS.ArrayBufferView): void; /** * 判断是否为Buffer类型 * @param data 输入数据 * @return boolean */ declare function isBuffer(data: object): boolean; /** * 创建目录 * @param path 目录路径 */ declare function mkdirSync(path: PathLike): void; /** * 打印标准的Node开发环境信息 */ declare function printStandardNodeDevEnv(): Promise; declare function pathResolve(...pathSegments: string[]): string; /** * */ declare function getProcessStdin(): NodeJS.ReadStream; declare function getProcessStdout(): NodeJS.WriteStream; declare function pick(obj: T, keys: K[]): Pick; declare const VipNodeJS: { getProcess: typeof getProcess; getEnv: typeof getEnv; getProcessFirstArgv: typeof getProcessFirstArgv; getProcessArgv: typeof getProcessArgv; getProcessArgvByIndex: typeof getProcessArgvByIndex; getCPUArch: typeof getCPUArch; setProcessEnv: typeof setProcessEnv; getProcessEnv: typeof getProcessEnv; getProcessPlatform: typeof getProcessPlatform; getProcessCwd: typeof getProcessCwd; getProcessVersions: typeof getProcessVersions; getProcessStdin: typeof getProcessStdin; getProcessStdout: typeof getProcessStdout; exitProcess: typeof exitProcess; existSuccessProcess: typeof existSuccessProcess; existErrorProcess: typeof existErrorProcess; existPath: typeof existPath; isExistFile: typeof isExistFile; isExistDir: typeof isExistDir; isDirectory: typeof isDirectory; readdirSync: typeof readdirSync; readFileToStrByUTF8: typeof readFileToStrByUTF8; writeFileByUTF8: typeof writeFileByUTF8; mkdirSync: typeof mkdirSync; pathJoin: typeof pathJoin; pathResolve: typeof pathResolve; pathDirname: typeof pathDirname; pathExtname: typeof pathExtname; isBuffer: typeof isBuffer; pick: typeof pick; printStandardNodeDevEnv: typeof printStandardNodeDevEnv; }; /** * 接受版本字符串模板(例如“release v”或“This is the %s release”)。 * - 如果模板包含任何“%s”占位符,则它们将替换为版本号; * - 否则,版本号将追加到字符串 */ declare function formatVersionStr(template: string, newVersion: string): string; /** * 获取npm版本 */ declare function getNpmVersion(): Promise; /** * 获取node版本 */ declare function getNodeVersion(): Promise; declare function getPnpmVersion(): Promise; declare function isExistNodeJs(): Promise; declare function isExistNpm(): Promise; declare function isExistPnpm(): Promise; declare function getTurboPackVersion(): Promise; declare function isExistTurboPack(): Promise; /** * 获取TurboPack匹配到的所有apps */ declare function getTurboPackApps(): Promise; /** * 获取pnpm ls命令执行后的结果,并返回一个PackageJSON * 参考: * - pnpm 命令: https://pnpm.io/cli/list * - filter参数: https://pnpm.io/filtering */ declare function getPackageJSONByPnpm(pnpmLsCommand: string): Array; /** * 基于npm安装依赖 */ declare function installByNpm(args: { force?: boolean; registry?: string; cwd?: string; }): Promise; /** * 基于pnpm安装依赖 */ declare function installByPnpm(args: { force?: boolean; registry?: string; cwd?: string; }): Promise; declare function userLogin(args: { registry: string; }): Promise; declare const VipNpm: { formatVersionStr: typeof formatVersionStr; getNpmVersion: typeof getNpmVersion; getNodeVersion: typeof getNodeVersion; getPnpmVersion: typeof getPnpmVersion; getTurboPackVersion: typeof getTurboPackVersion; isExistTurboPack: typeof isExistTurboPack; getTurboPackApps: typeof getTurboPackApps; isExistNodeJs: typeof isExistNodeJs; isExistNpm: typeof isExistNpm; isExistPnpm: typeof isExistPnpm; installByNpm: typeof installByNpm; installByPnpm: typeof installByPnpm; getPackageJSONByPnpm: typeof getPackageJSONByPnpm; userLogin: typeof userLogin; }; export { type Address, type Command, type CommandResponse, GitCommit, GitInfo, type PackageJSON, type PackageJSONMainFest, type PackageJSONWithPath, type ShellCommand, type StandardExecutorResponse, VipCommander, type VipCommanderDetailOptions, type VipCommanderDetailRecord, type VipCommanderOptions, VipConfig, VipDetect, VipDocker, VipExecutor, VipGit, VipInquirer, VipInquirerDefaultArrayParser, VipInquirerSeparator, VipJSON, VipMonorepo, VipNodeJS, VipNpm, VipPackageJSON, VipSemverReleaseType, getLastMatchingTag, vipConfig, vipDetect };