@@ -97,7 +97,7 @@ export const addApiWithoutSchema = async (
9797 . wait ( 'Choose a schema template:' )
9898 . sendCarriageReturn ( )
9999 . wait ( 'Do you want to edit the schema now?' )
100- . sendNo ( )
100+ . sendConfirmNo ( )
101101 . wait (
102102 '"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud' ,
103103 )
@@ -124,7 +124,7 @@ export function addApiWithOneModel(cwd: string, opts: Partial<AddApiOptions & {
124124 . wait ( 'Choose a schema template:' )
125125 . sendCarriageReturn ( )
126126 . wait ( 'Do you want to edit the schema now?' )
127- . sendNo ( )
127+ . sendConfirmNo ( )
128128 . wait (
129129 '"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud' ,
130130 )
@@ -153,7 +153,7 @@ export function addApiWithThreeModels(cwd: string, opts: Partial<AddApiOptions &
153153 . sendKeyDown ( 1 )
154154 . sendCarriageReturn ( )
155155 . wait ( 'Do you want to edit the schema now?' )
156- . sendNo ( )
156+ . sendConfirmNo ( )
157157 . wait (
158158 '"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud' ,
159159 )
@@ -243,7 +243,7 @@ export function addApiWithBlankSchemaAndConflictDetection(
243243 . sendKeyUp ( )
244244 . sendCarriageReturn ( )
245245 . wait ( / .* E n a b l e c o n f l i c t d e t e c t i o n .* / )
246- . sendYes ( )
246+ . sendConfirmYes ( )
247247 . wait ( / .* S e l e c t t h e d e f a u l t r e s o l u t i o n s t r a t e g y .* / ) ;
248248
249249 selectConflictHandlerType ( chain , { conflictHandlerType : opts . conflictHandlerType || ConflictHandlerType . AUTOMERGE , isUpdate : false } ) ;
@@ -296,7 +296,7 @@ export function addApiWithAllAuthModes(cwd: string, opts: Partial<AddApiOptions
296296 . wait ( / .* A f t e r h o w m a n y d a y s f r o m n o w t h e A P I k e y s h o u l d e x p i r e .* / )
297297 . sendLine ( '300' )
298298 . wait ( / .* C o n f i g u r e a d d i t i o n a l a u t h t y p e s .* / )
299- . sendYes ( )
299+ . sendConfirmYes ( )
300300 . wait ( / .* C h o o s e t h e a d d i t i o n a l a u t h o r i z a t i o n t y p e s y o u w a n t t o c o n f i g u r e f o r t h e A P I .* / )
301301 . sendLine ( 'a\r' ) // All items
302302 // Cognito
@@ -321,7 +321,7 @@ export function addApiWithAllAuthModes(cwd: string, opts: Partial<AddApiOptions
321321 . wait ( / .* C h o o s e a L a m b d a a u t h o r i z a t i o n f u n c t i o n * / )
322322 . sendCarriageReturn ( )
323323 . wait ( / .* D o y o u w a n t t o e d i t t h e l o c a l l a m b d a f u n c t i o n n o w * / )
324- . sendNo ( )
324+ . sendConfirmNo ( )
325325 . wait ( / .* H o w l o n g s h o u l d t h e a u t h o r i z a t i o n r e s p o n s e b e c a c h e d i n s e c o n d s .* / )
326326 . sendLine ( '600' )
327327 . wait ( / .* H e r e i s t h e G r a p h Q L A P I t h a t w e w i l l c r e a t e . S e l e c t a s e t t i n g t o e d i t o r c o n t i n u e .* / )
@@ -331,7 +331,7 @@ export function addApiWithAllAuthModes(cwd: string, opts: Partial<AddApiOptions
331331 . sendKeyDown ( 2 )
332332 . sendCarriageReturn ( )
333333 . wait ( 'Do you want to edit the schema now?' )
334- . sendNo ( )
334+ . sendConfirmNo ( )
335335 . wait ( '"amplify publish" will build all your local backend and frontend resources' )
336336 . run ( ( err : Error ) => {
337337 if ( ! err ) {
@@ -370,15 +370,15 @@ export function addApiWithApiKeyAndLambda(cwd: string, opts: Partial<AddApiOptio
370370 . wait ( / .* A f t e r h o w m a n y d a y s f r o m n o w t h e A P I k e y s h o u l d e x p i r e .* / )
371371 . sendLine ( '300' )
372372 . wait ( / .* C o n f i g u r e a d d i t i o n a l a u t h t y p e s .* / )
373- . sendYes ( )
373+ . sendConfirmYes ( )
374374 . wait ( / .* C h o o s e t h e a d d i t i o n a l a u t h o r i z a t i o n t y p e s y o u w a n t t o c o n f i g u r e f o r t h e A P I .* / )
375375 . sendKeyDown ( 3 )
376376 . sendLine ( ' ' )
377377 // Lambda
378378 . wait ( / .* C h o o s e a L a m b d a a u t h o r i z a t i o n f u n c t i o n * / )
379379 . sendCarriageReturn ( )
380380 . wait ( / .* D o y o u w a n t t o e d i t t h e l o c a l l a m b d a f u n c t i o n n o w * / )
381- . sendNo ( )
381+ . sendConfirmNo ( )
382382 . wait ( / .* H o w l o n g s h o u l d t h e a u t h o r i z a t i o n r e s p o n s e b e c a c h e d i n s e c o n d s .* / )
383383 . sendLine ( '600' )
384384 . wait ( / .* H e r e i s t h e G r a p h Q L A P I t h a t w e w i l l c r e a t e . S e l e c t a s e t t i n g t o e d i t o r c o n t i n u e .* / )
@@ -388,7 +388,7 @@ export function addApiWithApiKeyAndLambda(cwd: string, opts: Partial<AddApiOptio
388388 . sendKeyDown ( 2 )
389389 . sendCarriageReturn ( )
390390 . wait ( 'Do you want to edit the schema now?' )
391- . sendNo ( )
391+ . sendConfirmNo ( )
392392 . wait ( '"amplify publish" will build all your local backend and frontend resources' )
393393 . run ( ( err : Error ) => {
394394 if ( ! err ) {
@@ -421,9 +421,9 @@ export function updateApiWithMultiAuth(cwd: string, settings?: { testingWithLate
421421 if ( testingWithLatestCodebase ) {
422422 chain . wait ( 'Do you want to migrate api resource' ) ;
423423 if ( doMigrate ) {
424- chain . sendYes ( ) ;
424+ chain . sendConfirmYes ( ) ;
425425 } else {
426- chain . sendNo ( ) ;
426+ chain . sendConfirmNo ( ) ;
427427 }
428428 }
429429 chain
@@ -436,7 +436,7 @@ export function updateApiWithMultiAuth(cwd: string, settings?: { testingWithLate
436436 . wait ( / .* A f t e r h o w m a n y d a y s f r o m n o w t h e A P I k e y s h o u l d e x p i r e .* / )
437437 . sendLine ( '300' )
438438 . wait ( / .* C o n f i g u r e a d d i t i o n a l a u t h t y p e s .* / )
439- . sendYes ( )
439+ . sendConfirmYes ( )
440440 . wait ( / .* C h o o s e t h e a d d i t i o n a l a u t h o r i z a t i o n t y p e s y o u w a n t t o c o n f i g u r e f o r t h e A P I .* / )
441441 . sendLine ( 'a' ) // All items
442442 // Cognito
@@ -504,7 +504,7 @@ export function updateApiConflictHandlerTypePerModel(cwd: string, opts?: Partial
504504 . wait ( / .* S e l e c t t h e d e f a u l t r e s o l u t i o n s t r a t e g y .* / )
505505 . sendCarriageReturn ( ) // Select Automerge Handler for project
506506 . wait ( / .* D o y o u w a n t t o o v e r r i d e d e f a u l t p e r m o d e l s e t t i n g s * / )
507- . sendYes ( )
507+ . sendConfirmYes ( )
508508 . wait ( 'Select the models from below:' )
509509 . send ( 'a' )
510510 . sendCarriageReturn ( )
@@ -537,7 +537,7 @@ export function apiEnableDataStore(cwd: string, settings: any) {
537537 . wait ( / .* S e l e c t t h e d e f a u l t r e s o l u t i o n s t r a t e g y .* / )
538538 . sendCarriageReturn ( )
539539 . wait ( / .* D o y o u w a n t t o o v e r r i d e d e f a u l t p e r m o d e l s e t t i n g s ? .* / )
540- . sendNo ( )
540+ . sendConfirmNo ( )
541541 . wait ( / .* S u c c e s s f u l l y u p d a t e d r e s o u r c e .* / )
542542 . sendEof ( )
543543 . run ( ( err : Error ) => {
@@ -609,7 +609,7 @@ export function updateAPIWithResolutionStrategyWithModels(cwd: string, settings:
609609 . sendKeyDown ( )
610610 . sendCarriageReturn ( )
611611 . wait ( / .* D o y o u w a n t t o o v e r r i d e d e f a u l t p e r m o d e l s e t t i n g s ? .* / )
612- . sendNo ( )
612+ . sendConfirmNo ( )
613613 . wait ( / .* S u c c e s s f u l l y u p d a t e d r e s o u r c e .* / )
614614 . sendEof ( )
615615 . run ( ( err : Error ) => {
@@ -753,9 +753,9 @@ function chooseLambdaFunctionForRestApi(chain: ExecutionContext, settings: { pro
753753
754754 chain
755755 . wait ( 'Do you want to configure advanced settings?' )
756- . sendNo ( )
756+ . sendConfirmNo ( )
757757 . wait ( 'Do you want to edit the local lambda function now' )
758- . sendNo ( ) ;
758+ . sendConfirmNo ( ) ;
759759}
760760
761761const updateRestApiDefaultSettings = {
@@ -822,7 +822,7 @@ export function addApi(projectDir: string, settings?: any): Promise<void> {
822822 if ( authTypesToAdd . length > 1 ) {
823823 authTypesToAdd . shift ( ) ;
824824
825- chain . wait ( 'Configure additional auth types?' ) . sendYes ( ) ;
825+ chain . wait ( 'Configure additional auth types?' ) . sendConfirmYes ( ) ;
826826
827827 authTypesToSelectFrom = authTypesToSelectFrom . filter ( ( x ) => x !== defaultType ) ;
828828
@@ -846,7 +846,7 @@ export function addApi(projectDir: string, settings?: any): Promise<void> {
846846 . wait ( 'Choose a schema template:' )
847847 . sendCarriageReturn ( )
848848 . wait ( 'Do you want to edit the schema now?' )
849- . sendNo ( )
849+ . sendConfirmNo ( )
850850 . wait ( '"amplify publish" will build all your local backend and frontend resources' )
851851 . run ( ( err : Error ) => {
852852 if ( ! err ) {
@@ -969,7 +969,7 @@ export function addApiWithCognitoUserPoolAuthTypeWhenAuthExists(
969969 . wait ( 'Choose a schema template:' )
970970 . sendCarriageReturn ( )
971971 . wait ( 'Do you want to edit the schema now?' )
972- . sendNo ( )
972+ . sendConfirmNo ( )
973973 . wait ( '"amplify publish" will build all your local backend and frontend resources' )
974974 . run ( ( err : Error ) => {
975975 if ( ! err ) {
@@ -1001,7 +1001,7 @@ export function addRestContainerApi(projectDir: string, opts: Partial<AddApiOpti
10011001 . wait ( 'When do you want to build & deploy the Fargate task' )
10021002 . sendCarriageReturn ( )
10031003 . wait ( 'Do you want to restrict API access' )
1004- . sendNo ( )
1004+ . sendConfirmNo ( )
10051005 . wait ( 'Select which container is the entrypoint' )
10061006 . sendCarriageReturn ( )
10071007 . wait ( '"amplify publish" will build all your local backend and frontend resources' )
@@ -1042,7 +1042,7 @@ export function addRestContainerApiForCustomPolicies(projectDir: string, setting
10421042 . wait ( 'When do you want to build & deploy the Fargate task' )
10431043 . sendCarriageReturn ( )
10441044 . wait ( 'Do you want to restrict API access' )
1045- . sendNo ( )
1045+ . sendConfirmNo ( )
10461046 . wait ( 'Select which container is the entrypoint' )
10471047 . sendCarriageReturn ( )
10481048 . wait ( '"amplify publish" will build all your local backend and frontend resources' )
0 commit comments