npm package diff

Package: @forge/cli

Versions: 11.1.0 - 11.2.0-next.17-experimental-26b1489

File: package/out/command-line/uninstall-command-helpers.js

Index: package/out/command-line/uninstall-command-helpers.js
===================================================================
--- package/out/command-line/uninstall-command-helpers.js
+++ package/out/command-line/uninstall-command-helpers.js
@@ -3,33 +3,33 @@
 exports.performMultipleUninstalls = exports.performSingleUninstall = exports.getInstallationsFromSelection = exports.getMultiChoiceOptionsForUninstall = void 0;
 const cli_shared_1 = require("@forge/cli-shared");
 const shared_1 = require("../installations/shared");
 const errors_1 = require("./errors");
-function addPrimarySuffix(productDisplayName, secondaryCount) {
-    return secondaryCount ? `${productDisplayName} (Primary)` : productDisplayName;
+function addRequiredSuffix(productDisplayName, secondaryCount) {
+    return secondaryCount ? `${productDisplayName} (Required)` : productDisplayName;
 }
 const getMultiChoiceOptionsForUninstall = (filteredInstallations) => {
     return filteredInstallations.reduce((acc, { id, environmentKey, site, product, secondaryProducts, secondaryContexts }, idx) => {
         acc.push({
             names: [
                 (0, cli_shared_1.environmentToOption)(environmentKey),
                 site,
-                addPrimarySuffix((0, cli_shared_1.productDisplayName)(product), secondaryProducts?.length)
+                addRequiredSuffix((0, cli_shared_1.productDisplayName)(product), secondaryProducts?.length)
             ],
             value: id,
             extra: {
                 installationIdx: idx,
                 product: product,
-                primary: !!secondaryProducts?.length
+                required: !!secondaryProducts?.length
             }
         });
         if (secondaryProducts) {
             secondaryProducts.forEach((secondaryProduct, secondaryIdx) => {
                 const contextAri = secondaryContexts?.[secondaryIdx];
                 acc.push({
                     names: [(0, cli_shared_1.environmentToOption)(environmentKey), site, (0, cli_shared_1.productDisplayName)(secondaryProduct)],
                     value: id,
-                    extra: { secondary: true, contextAri, installationIdx: idx, product: secondaryProduct }
+                    extra: { optional: true, contextAri, installationIdx: idx, product: secondaryProduct }
                 });
             });
         }
         return acc;
@@ -38,16 +38,16 @@
 exports.getMultiChoiceOptionsForUninstall = getMultiChoiceOptionsForUninstall;
 const getInstallationsFromSelection = (options, selectedSitesIndexes, filteredInstallations) => {
     const firstUninstall = options
         .filter((_, idx) => selectedSitesIndexes.includes(idx))
-        .filter(({ extra }) => !extra?.primary)
+        .filter(({ extra }) => !extra?.required)
         .map(({ extra }) => ({
         ...filteredInstallations[extra.installationIdx],
-        ...(extra.secondary && { context: extra.contextAri, product: extra.product })
+        ...(extra.optional && { context: extra.contextAri, product: extra.product })
     }));
     const secondUninstall = options
         .filter((_, idx) => selectedSitesIndexes.includes(idx))
-        .filter(({ extra }) => extra?.primary)
+        .filter(({ extra }) => extra?.required)
         .map(({ extra }) => filteredInstallations[extra.installationIdx]);
     return [firstUninstall, secondUninstall];
 };
 exports.getInstallationsFromSelection = getInstallationsFromSelection;