Skip to content

Commit

Permalink
fix(@142vip/fairy-cli): 修复VipInquirer模块使用异常
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdapl committed Jan 19, 2025
1 parent de8c2a0 commit 589122b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/fairy-cli/src/commands/clean.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as process from 'node:process'
import { deleteAsync } from 'del'
import type { VipCommander } from '@142vip/utils'
import { promptConfirm } from '@142vip/utils'
import { CliCommandEnum } from '../shared'

/**
Expand Down Expand Up @@ -73,7 +72,7 @@ async function execCleanUp(args: CleanUpOptions) {

// 删除前,对话框确认
if (!args.ignoreTips) {
const deleted = await promptConfirm('是否需要删除?', true)
const deleted = await VipInquirer.promptConfirm('是否需要删除?', true)

if (!deleted) {
// 不删除,非0退出
Expand Down
6 changes: 3 additions & 3 deletions packages/fairy-cli/src/commands/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import process from 'node:process'
import type { VersionBumpOptions } from '@142vip/release-version'
import { versionBump } from '@142vip/release-version'
import type { VipCommander } from '@142vip/utils'
import { VipColor, promptConfirm, promptList } from '@142vip/utils'
import { VipColor, VipInquirer } from '@142vip/utils'
import {
CliCommandEnum,
getBranchName,
Expand Down Expand Up @@ -87,10 +87,10 @@ function execVipRelease(args: VipReleaseExtraOptions) {
defaultRepoName,
...packageNames,
]
promptList(choices, `选择需要使用${VipColor.red('Release')}命令发布的模块名称:`)
VipInquirer.promptList(choices, `选择需要使用${VipColor.red('Release')}命令发布的模块名称:`)
.then(async (packageName) => {
// 确认框
const isRelease = await promptConfirm(`将对模块${VipColor.green(packageName)}进行版本迭代,是否继续操作?`)
const isRelease = await VipInquirer.promptConfirm(`将对模块${VipColor.green(packageName)}进行版本迭代,是否继续操作?`)

if (!isRelease) {
console.log(VipColor.yellow('用户取消发布操作!!'))
Expand Down

0 comments on commit 589122b

Please sign in to comment.