Skip to content

Commit

Permalink
chore: fix command typo and wrong example
Browse files Browse the repository at this point in the history
  • Loading branch information
kidneyweakx committed Mar 18, 2024
1 parent 887d307 commit 6b058f8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/quorum/command/cluster/apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface OptType {

export const builder = (yargs: Argv<OptType>) => {
return yargs
.example('bdk quorum cluster create --interactive', 'Cathay BDK 互動式問答')
.example('bdk quorum cluster apply --interactive', 'Cathay BDK 互動式問答')
.option('interactive', { type: 'boolean', description: '是否使用 Cathay BDK 互動式問答', alias: 'i' })
}

Expand All @@ -34,11 +34,11 @@ export const handler = async (argv: Arguments<OptType>) => {
const confirmDelete = (await prompts({
type: 'confirm',
name: 'value',
message: '⚠️ Detecting quorum nodes already exists. The following processes will remove all existing files. Continue?',
message: '⚠️ Detecting quorum cluster already exists. The following processes will remove all existing files. Continue?',
initial: false,
}, { onCancel })).value
if (confirmDelete) {
const spinner = ora('Quorum Network Create ...').start()
const spinner = ora('Quorum Cluster Delete ...').start()
cluster.removeHelmChartFiles()
spinner.succeed('Remove all existing files!')
}
Expand All @@ -50,7 +50,7 @@ export const handler = async (argv: Arguments<OptType>) => {

if (confirm) {
// network create
const networkCreate: ClusterCreateType = await (async () => {
const clusterCreate: ClusterCreateType = await (async () => {
if (argv.interactive) {
const { provider } = await prompts({
type: 'select',
Expand Down Expand Up @@ -164,8 +164,8 @@ export const handler = async (argv: Arguments<OptType>) => {
return { ...config, provider: 'local' }
}
})()
const spinner = ora('Quorum Network Import ...').start()
await cluster.apply(networkCreate, spinner)
spinner.succeed('Quorum Network Import Successfully!')
const spinner = ora('Quorum Network Apply ...').start()
await cluster.apply(clusterCreate, spinner)
spinner.succeed('Quorum Network Apply Successfully!')
}
}
2 changes: 1 addition & 1 deletion src/quorum/command/cluster/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const handler = async () => {
const confirmDelete = (await prompts({
type: 'confirm',
name: 'value',
message: '⚠️ Detecting quorum nodes already exists. The following processes will remove all existing files. Continue?',
message: '⚠️ Detecting quorum cluster already exists. The following processes will remove all existing files. Continue?',
initial: false,
}, { onCancel })).value
if (confirmDelete) {
Expand Down
8 changes: 4 additions & 4 deletions src/quorum/command/cluster/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export const handler = async (argv: Arguments<OptType>) => {
const confirmDelete = (await prompts({
type: 'confirm',
name: 'value',
message: '⚠️ Detecting quorum nodes already exists. The following processes will remove all existing files. Continue?',
message: '⚠️ Detecting quorum cluster already exists. The following processes will remove all existing files. Continue?',
initial: false,
}, { onCancel })).value
if (confirmDelete) {
const spinner = ora('Quorum Network Create ...').start()
const spinner = ora('Quorum Network Delete ...').start()
cluster.removeHelmChartFiles()
spinner.succeed('Remove all existing files!')
}
Expand Down Expand Up @@ -191,8 +191,8 @@ export const handler = async (argv: Arguments<OptType>) => {
}
})()

const spinner = ora('Quorum Network Import ...').start()
const spinner = ora('Quorum Network Generate ...').start()
await cluster.generate(clusterGenerate, networkCreate)
spinner.succeed('Quorum Network Import Successfully!')
spinner.succeed('Quorum Network Generate Successfully!')
}
}

0 comments on commit 6b058f8

Please sign in to comment.