@@ -2,7 +2,7 @@ import type { CredentialExchangeRecord, ProofExchangeRecord } from '@aries-frame
22
33import { clear } from 'console'
44import { textSync } from 'figlet'
5- import inquirer from 'inquirer'
5+ import { prompt } from 'inquirer'
66
77import { Alice } from './Alice'
88import { BaseInquirer , ConfirmOptions } from './BaseInquirer'
@@ -42,10 +42,10 @@ export class AliceInquirer extends BaseInquirer {
4242 }
4343
4444 private async getPromptChoice ( ) {
45- if ( this . alice . connectionRecordFaberId ) return inquirer . prompt ( [ this . inquireOptions ( this . promptOptionsString ) ] )
45+ if ( this . alice . connectionRecordFaberId ) return prompt ( [ this . inquireOptions ( this . promptOptionsString ) ] )
4646
4747 const reducedOption = [ PromptOptions . ReceiveConnectionUrl , PromptOptions . Exit , PromptOptions . Restart ]
48- return inquirer . prompt ( [ this . inquireOptions ( reducedOption ) ] )
48+ return prompt ( [ this . inquireOptions ( reducedOption ) ] )
4949 }
5050
5151 public async processAnswer ( ) {
@@ -70,7 +70,7 @@ export class AliceInquirer extends BaseInquirer {
7070 }
7171
7272 public async acceptCredentialOffer ( credentialRecord : CredentialExchangeRecord ) {
73- const confirm = await inquirer . prompt ( [ this . inquireConfirmation ( Title . CredentialOfferTitle ) ] )
73+ const confirm = await prompt ( [ this . inquireConfirmation ( Title . CredentialOfferTitle ) ] )
7474 if ( confirm . options === ConfirmOptions . No ) {
7575 await this . alice . agent . credentials . declineOffer ( credentialRecord . id )
7676 } else if ( confirm . options === ConfirmOptions . Yes ) {
@@ -79,7 +79,7 @@ export class AliceInquirer extends BaseInquirer {
7979 }
8080
8181 public async acceptProofRequest ( proofRecord : ProofExchangeRecord ) {
82- const confirm = await inquirer . prompt ( [ this . inquireConfirmation ( Title . ProofRequestTitle ) ] )
82+ const confirm = await prompt ( [ this . inquireConfirmation ( Title . ProofRequestTitle ) ] )
8383 if ( confirm . options === ConfirmOptions . No ) {
8484 await this . alice . agent . proofs . declineRequest ( proofRecord . id )
8585 } else if ( confirm . options === ConfirmOptions . Yes ) {
@@ -89,7 +89,7 @@ export class AliceInquirer extends BaseInquirer {
8989
9090 public async connection ( ) {
9191 const title = Title . InvitationTitle
92- const getUrl = await inquirer . prompt ( [ this . inquireInput ( title ) ] )
92+ const getUrl = await prompt ( [ this . inquireInput ( title ) ] )
9393 await this . alice . acceptConnection ( getUrl . input )
9494 if ( ! this . alice . connected ) return
9595
@@ -105,7 +105,7 @@ export class AliceInquirer extends BaseInquirer {
105105 }
106106
107107 public async exit ( ) {
108- const confirm = await inquirer . prompt ( [ this . inquireConfirmation ( Title . ConfirmTitle ) ] )
108+ const confirm = await prompt ( [ this . inquireConfirmation ( Title . ConfirmTitle ) ] )
109109 if ( confirm . options === ConfirmOptions . No ) {
110110 return
111111 } else if ( confirm . options === ConfirmOptions . Yes ) {
@@ -114,7 +114,7 @@ export class AliceInquirer extends BaseInquirer {
114114 }
115115
116116 public async restart ( ) {
117- const confirm = await inquirer . prompt ( [ this . inquireConfirmation ( Title . ConfirmTitle ) ] )
117+ const confirm = await prompt ( [ this . inquireConfirmation ( Title . ConfirmTitle ) ] )
118118 if ( confirm . options === ConfirmOptions . No ) {
119119 await this . processAnswer ( )
120120 return
0 commit comments