Skip to content

Commit bddb662

Browse files
committed
miniprogram
1 parent 8c6436b commit bddb662

File tree

14 files changed

+38
-22
lines changed

14 files changed

+38
-22
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/monorepo",
33
"description": "这是一个git工作流工具",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"packageManager": "[email protected]",
66
"main": "index.js",
77
"files": [

packages/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/api",
33
"description": "gitmars api",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/build",
33
"description": "gitmars build",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/cache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/cache",
33
"description": "gitmars cache",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/core",
33
"description": "gitmars核心程序",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/docs",
33
"description": "gitmars文档库",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"private": false,
66
"files": [
77
"dist",

packages/git/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/git",
33
"description": "gitmars git",
4-
"version": "7.0.0-beta.32",
4+
"version": "7.0.0-beta.33",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/gitmars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitmars",
33
"description": "这是一个git工作流工具",
44
"type": "module",
5-
"version": "7.0.0-beta.32",
5+
"version": "7.0.0-beta.33",
66
"private": false,
77
"bin": {
88
"gitm": "lib/gitm.mjs"

packages/gitmars/src/gitm-go.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ program.action(async (command: string): Promise<void> => {
5252
// 选择指令
5353
const [, command = ''] = await to(
5454
select<string>({
55-
message: t('Please select the operation you want?'),
55+
message: t('Select the operation you want?'),
5656
default: 'combine',
5757
choices: [
5858
new Separator(' === 1. ' + t('Gitmars Workflow') + ' === '),

packages/gitmars/src/gitm-miniprogram.ts

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
getAuthorizerListWithAllDetail,
1414
getClientsConfig,
1515
getPreAuthQrCode,
16+
getTester,
1617
getTrialQrCode,
1718
unbindTester,
1819
undoAudit
@@ -54,7 +55,7 @@ program.action(async (miniprogram: string, opt: GitmMiniprogramOption): Promise<
5455
)
5556
;[, miniprogram = ''] = await to(
5657
select<string>({
57-
message: t('Select the application to build'),
58+
message: t('Select miniprogram'),
5859
choices: list.map(({ authorizer_info: info, authorizer_appid }) => ({
5960
name: info.nick_name,
6061
value: authorizer_appid
@@ -67,7 +68,7 @@ program.action(async (miniprogram: string, opt: GitmMiniprogramOption): Promise<
6768

6869
const [, action = ''] = await to(
6970
select<string>({
70-
message: t('Please select the operation you want?'),
71+
message: t('Select the operation you want?'),
7172
choices: [
7273
new Separator(' === 1. ' + t('Audit') + ' === '),
7374
{
@@ -150,15 +151,27 @@ program.action(async (miniprogram: string, opt: GitmMiniprogramOption): Promise<
150151
sh.echo(chalk.green(t('Implementation success')))
151152
}
152153
} else if (action === 'unbind_tester') {
154+
const [, list = []] = await to(getTester(miniprogram))
153155
const [, userstr = ''] = await to(
154-
input({
155-
message: t('Enter wechat userstr'),
156-
transformer: val => val.trim()
157-
}).then(val => val.trim())
156+
select<string>({
157+
message: t('Select wechat account'),
158+
choices: list.map(({ userstr }) => ({
159+
name: userstr,
160+
value: userstr
161+
}))
162+
})
158163
)
159164
if (userstr) {
160-
await unbindTester({ userstr, authorizer_appid: miniprogram })
161-
sh.echo(chalk.green(t('Implementation success')))
165+
const [, answer] = await to(
166+
confirm({
167+
message: t('Confirm unbind wechat account'),
168+
default: false
169+
})
170+
)
171+
if (answer) {
172+
await unbindTester({ userstr, authorizer_appid: miniprogram })
173+
sh.echo(chalk.green(t('Implementation success')))
174+
}
162175
}
163176
}
164177
})

0 commit comments

Comments
 (0)