-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env and blob commands Co-authored-by: Thomas Lane <163203257+tlane25@users.noreply.github.com> Co-authored-by: Thomas Lane <tlane25@users.noreply.github.com>
- Loading branch information
1 parent
f6aa58d
commit 9ba5ada
Showing
16 changed files
with
80 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { chalk, log } from '../command-helpers.js' | ||
import { log } from '../command-helpers.js' | ||
|
||
import { confirmPrompt } from './confirm-prompt.js' | ||
import { destructiveCommandMessages } from './prompt-messages.js' | ||
|
||
export const promptBlobDelete = async (key: string, storeName: string): Promise<void> => { | ||
const { overwriteNoticeMessage } = destructiveCommandMessages | ||
const { generateWarningMessage, overwriteConfirmationMessage } = destructiveCommandMessages.blobDelete | ||
|
||
const warningMessage = generateWarningMessage(key, storeName) | ||
|
||
const generateBlobWarningMessage = (key: string, storeName: string): void => { | ||
log() | ||
log( | ||
`${chalk.redBright('Warning')}: The following blob key ${chalk.cyan(key)} will be deleted from store ${chalk.cyan( | ||
storeName, | ||
)}:`, | ||
) | ||
log(warningMessage) | ||
log() | ||
log(`${chalk.yellowBright('Notice')}: To overwrite without this warning, you can use the --force flag.`) | ||
} | ||
|
||
export const blobDeletePrompts = async (key: string, storeName: string): Promise<void> => { | ||
generateBlobWarningMessage(key, storeName) | ||
await confirmPrompt('Do you want to proceed with deleting the value at this key?') | ||
log(overwriteNoticeMessage) | ||
await confirmPrompt(overwriteConfirmationMessage) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.