Skip to content

Commit

Permalink
fix: notifications and deploy spinners clashing (#12007)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhockett committed Feb 15, 2023
1 parent ffb8e5e commit 6b04e69
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/amplify-category-notifications/src/display-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { spinner } from 'amplify-cli-core';
import { printer } from 'amplify-prompts';

/**
Expand All @@ -18,14 +17,14 @@ export const viewShowDeferredModeInstructions = (): void => {
* Display status that Auth and Pinpoint resources are being deployed to the cloud
*/
export const viewShowInlineModeInstructionsStart = async (channelName: string): Promise<void> => {
spinner.start(`Channel ${channelName} requires a Pinpoint resource in the cloud. Proceeding to deploy Auth and Pinpoint resources...`);
printer.info(`Channel ${channelName} requires a Pinpoint resource in the cloud. Proceeding to deploy Auth and Pinpoint resources...`);
};

/**
* Display status that Auth and Pinpoint resources have been successfully deployed to the cloud
*/
export const viewShowInlineModeInstructionsStop = async (channelName: string): Promise<void> => {
spinner.succeed(`Channel ${channelName}: Auth and Pinpoint resources deployed successfully...`);
printer.success(`Channel ${channelName}: Auth and Pinpoint resources deployed successfully.`);
};

/**
Expand All @@ -34,5 +33,5 @@ export const viewShowInlineModeInstructionsStop = async (channelName: string): P
* @param err Error thrown by the pinpoint helper
*/
export const viewShowInlineModeInstructionsFail = async (channelName: string, err: Error|string): Promise<void> => {
spinner.fail(`Channel ${channelName}: Auth and Pinpoint resources deployment failed with Error ${err}`);
printer.error(`Channel ${channelName}: Auth and Pinpoint resources deployment failed with Error ${err}`);
};

0 comments on commit 6b04e69

Please sign in to comment.