@dishantlangayan/sc-cli-core 0.7.0 → 0.7.1

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.
@@ -278,6 +278,19 @@ export class BrokerAuthManager {
278
278
  if (!this.masterKey || !this.machineId) {
279
279
  throw new BrokerAuthError('Auth manager not initialized', BrokerAuthErrorCode.NOT_INITIALIZED);
280
280
  }
281
+ // If storage is empty, delete the file instead of saving
282
+ if (this.storage.brokers.length === 0) {
283
+ try {
284
+ await unlink(this.configFile);
285
+ }
286
+ catch (error) {
287
+ // Ignore if file doesn't exist (ENOENT)
288
+ if (error.code !== 'ENOENT') {
289
+ throw error;
290
+ }
291
+ }
292
+ return;
293
+ }
281
294
  // Ensure directory exists
282
295
  await mkdir(this.configDir, { mode: 0o700, recursive: true });
283
296
  // Generate new salt and derive key for THIS save
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dishantlangayan/sc-cli-core",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Base library for the Solace Cloud CLI and plugins",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dishant Langayan",