@vibe-assurance/cli 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-assurance/cli",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Vibe Assurance CLI - Connect AI coding agents to your governance platform via MCP",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -5,7 +5,7 @@ const chalk = require('chalk');
5
5
  const ora = require('ora');
6
6
  const inquirer = require('inquirer');
7
7
  const axios = require('axios');
8
- const { storeCredentials, hasValidCredentials, setProjectId, setUserInfo, getEnvironment } = require('../config/credentials');
8
+ const { storeCredentials, getCredentials, hasValidCredentials, setProjectId, setUserInfo, getEnvironment } = require('../config/credentials');
9
9
  const { getApiBaseUrl } = require('../api/client');
10
10
  const { getEnvironmentConfig } = require('../config/environments');
11
11
 
@@ -87,8 +87,10 @@ async function login() {
87
87
  ? new Date(Date.now() + parseInt(expiresIn) * 1000)
88
88
  : new Date(Date.now() + 3600 * 1000); // Default 1 hour
89
89
 
90
- // Store credentials securely
90
+ // CR-2026-061: Preserve environment when storing new credentials
91
+ const existingCreds = await getCredentials();
91
92
  await storeCredentials({
93
+ environment: existingCreds?.environment, // Preserve environment
92
94
  accessToken,
93
95
  refreshToken,
94
96
  expiresAt: expiresAt.toISOString()