npm package diff

Package: @forge/cli

Versions: 10.6.0-next.15 - 10.6.0-next.18

File: package/out/command-line/controller/deploy-controller.js

Index: package/out/command-line/controller/deploy-controller.js
===================================================================
--- package/out/command-line/controller/deploy-controller.js
+++ package/out/command-line/controller/deploy-controller.js
@@ -70,14 +70,24 @@
     }
     connectKeyChanged(connectKey, comparisonKey) {
         return !!(comparisonKey && connectKey && connectKey !== comparisonKey);
     }
+    connectKeyMutatedInProduction(connectKey, comparisonKey, environment, isSkeletonVersion) {
+        if (isSkeletonVersion || environment !== 'production') {
+            return false;
+        }
+        return !!(connectKey !== comparisonKey);
+    }
     async validateConnectKeyChange(environment, keys) {
-        const { migrationKeys, mpacAppKey } = keys;
+        const { migrationKeys, mpacAppKey, isSkeletonVersion } = keys;
         const connectKey = await this.configFile.getConnectKey();
         const migrationKey = migrationKeys?.confluence || migrationKeys?.jira;
         const isMpacApp = this.isMpacProductionApp(mpacAppKey, environment);
-        if (this.connectKeyDeleted(connectKey, migrationKey)) {
+        if (!isMpacApp && this.connectKeyMutatedInProduction(connectKey, migrationKey, environment, !!isSkeletonVersion)) {
+            this.deployView.displayConnectKeyMutationInProductionError(migrationKey, connectKey);
+            throw new InvalidConnectKeyError(cli_shared_1.Text.deploy.connectKeyChange.mpacAppConnectKeyChangeAnalyticsError);
+        }
+        else if (this.connectKeyDeleted(connectKey, migrationKey)) {
             this.deployView.displayConnectKeyDeleteWarning(environment);
             const proceed = await this.deployView.promptToContinueDeletingConnectKey();
             return { proceed, connectKeyDeleted: proceed, connectKeyChanged: false };
         }