@forge/cli-shared

8.16.1-next.08.17.0-next.1
out/ui/text.js
~out/ui/text.jsModified
+7−2
Index: package/out/ui/text.js
===================================================================
--- package/out/ui/text.js
+++ package/out/ui/text.js
@@ -10,8 +10,9 @@
 const graphql_types_1 = require("../graphql/graphql-types");
 const cli_details_1 = require("../shared/cli-details");
 const environment_1 = require("../shared/environment");
 const manifest_1 = require("@forge/manifest");
+const installations_1 = require("../shared/installations");
 const ctrlC = 'Press Ctrl+C to cancel.';
 const encryptedValue = '****';
 const greenTick = `${chalk_1.default.bold(chalk_1.default.green('✔'))}`;
 const buildTerminalLink = (text) => (0, terminal_link_1.default)(chalk_1.default.bold(text), text, { fallback: () => chalk_1.default.underline.bold(text) });
@@ -147,8 +148,9 @@
         incorrectFormat: 'shard identifier should be formatted "<id>:<region>"'
     },
     optionVerbose: 'enable verbose mode',
     optionJson: 'output results in JSON format',
+    optionBatchUninstall: 'select up to 10 installations to uninstall',
     invalidCmd: (command) => `’${command}’ is not a Forge command.`,
     invalidCmdHelp: `Run ${forge('--help')} to see the full list of available commands.`,
     rerunningWithVerbose: 'Rerunning the command with --verbose may give more details.',
     ctrlC,
@@ -1130,14 +1132,17 @@
         interactive: {
             desc: 'Select where to uninstall the app:',
             progressInfo: `To uninstall your app from a site or workspace, select it from the list.\nPress Ctrl+C to cancel.`,
             done: `\n${log_symbols_1.default.success} Apps uninstalled`,
-            confirmOptionalContexts: 'This will uninstall the app from all Atlasian apps and platform tools in this site. Are you sure you want to continue?'
+            confirmOptionalContexts: 'This will uninstall the app from all Atlasian apps and platform tools in this site. Are you sure you want to continue?',
+            confirmAllInstallations: 'This will uninstall the app from the listed contexts. Are you sure you want to continue?'
         },
         info: 'Uninstalling...',
         done: (product, domain, environment, isMulti) => `${isMulti ? log_symbols_1.default.info : log_symbols_1.default.success} Uninstalled from the ${(0, environment_1.environmentToOption)(environment)} environment in ${product} on ${buildTerminalLink(domain)}.`,
         failed: (product, domain, environment) => `Failed to uninstall the app from the ${(0, environment_1.environmentToOption)(environment)} environment in ${product} on ${buildTerminalLink(domain)}. Try rerunning the command, or ask for help if you continue to see this error.`,
-        missingUninstallTask: `Cannot uninstall the app: something went wrong with starting the uninstall task.`
+        missingUninstallTask: `Cannot uninstall the app: something went wrong with starting the uninstall task.`,
+        uninstallBatchBanner: (remainingInstallations) => log_color_1.LogColor.warn(`${log_symbols_1.default.info} ${chalk_1.default.bold(`Batch uninstallations are limited to ${installations_1.MAX_BATCH_UNINSTALLS} per request and there ${remainingInstallations > 1 ? `are ${remainingInstallations} installations` : 'is 1 installation'} remaining. Run the command multiple times to perform more uninstallations`)}`),
+        uninstallBatchProductionError: `${log_symbols_1.default.error} ${chalk_1.default.bold('Batch uninstallations are not supported in production environments.')}`
     },
     webtrigger: {
         cmd: 'manage webtriggers',
         copy: (url) => `\nCopy your web trigger URL below to start using it:\n\n${buildTerminalLink(url)}`,