Skip to content

Commit 724aa51

Browse files
committed
fix: 修复强制提交参数-f问题
1 parent 3786061 commit 724aa51

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { handleOptions } from './utils'
66
program.name(name).version(version).description(description)
77
.addOption(new Option('-p, --platform <platform>', '操作的平台').choices(Object.values(PLATFORM)))
88
.addOption(new Option('-a, --action <action>', '提审或者发布').choices(Object.values(ACTION)))
9-
.addOption(new Option('-f, --force-submit', '如果存在【审核中】或【审核通过】的版本,这将强制提交新的审核版本').default(BOOL.FALSE).choices(Object.values(BOOL)))
9+
.addOption(new Option('-f, --force-submit', '如果存在【审核中】或【审核通过】的版本,这将强制提交新的审核版本'))
1010
.addOption(new Option('-hl, --headless [headless]', '浏览器无头模式').default('new').choices(['false', 'new']))
1111

1212
program.parse()

src/types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { PuppeteerLaunchOptions } from 'puppeteer'
2-
import type { ACTION, BOOL, PLATFORM } from '../constants'
2+
import type { ACTION, PLATFORM } from '../constants'
33

44
declare global {
55
interface InputOptions {
66
platform: PLATFORM
77
action: ACTION
88
headless: PuppeteerLaunchOptions['headless']
9-
forceSubmit: BOOL
9+
forceSubmit?: boolean
1010
}
1111
}

src/utils/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export function transBooleanStrToBool(value: string) {
7676

7777
export function handleOptions(opts: InputOptions) {
7878
opts.headless = transBooleanStrToBool(opts.headless as string) as never
79-
opts.forceSubmit = transBooleanStrToBool(opts.forceSubmit as string) as never
8079
return opts
8180
}
8281

0 commit comments

Comments
 (0)